aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-31 02:31:57 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-31 02:31:57 -0500
commita9de18eb761f7c1c860964b2e5addc1a35c7e861 (patch)
tree886e75fdfd09690cd262ca69cb7f5d1d42b48602 /include
parentb2aaf8f74cdc84a9182f6cabf198b7763bcb9d40 (diff)
parent6a94cb73064c952255336cc57731904174b2c58f (diff)
Merge branch 'linus' into stackprotector
Conflicts: arch/x86/include/asm/pda.h kernel/fork.c
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acdebug.h8
-rw-r--r--include/acpi/acdisasm.h4
-rw-r--r--include/acpi/acdispat.h6
-rw-r--r--include/acpi/acexcep.h128
-rw-r--r--include/acpi/aclocal.h77
-rw-r--r--include/acpi/acmacros.h259
-rw-r--r--include/acpi/acnamesp.h16
-rw-r--r--include/acpi/acobject.h37
-rw-r--r--include/acpi/acoutput.h32
-rw-r--r--include/acpi/acpi_bus.h13
-rw-r--r--include/acpi/acpi_drivers.h33
-rw-r--r--include/acpi/acpiosxf.h3
-rw-r--r--include/acpi/acpixf.h4
-rw-r--r--include/acpi/acpredef.h371
-rw-r--r--include/acpi/actbl1.h51
-rw-r--r--include/acpi/actypes.h38
-rw-r--r--include/acpi/acutils.h4
-rw-r--r--include/acpi/platform/acgcc.h2
-rw-r--r--include/acpi/platform/aclinux.h10
-rw-r--r--include/asm-arm/plat-s3c/debug-macro.S75
-rw-r--r--include/asm-arm/plat-s3c/iic.h33
-rw-r--r--include/asm-arm/plat-s3c/map.h40
-rw-r--r--include/asm-arm/plat-s3c/nand.h50
-rw-r--r--include/asm-arm/plat-s3c/regs-ac97.h67
-rw-r--r--include/asm-arm/plat-s3c/regs-adc.h60
-rw-r--r--include/asm-arm/plat-s3c/regs-iic.h56
-rw-r--r--include/asm-arm/plat-s3c/regs-nand.h123
-rw-r--r--include/asm-arm/plat-s3c/regs-rtc.h61
-rw-r--r--include/asm-arm/plat-s3c/regs-serial.h232
-rw-r--r--include/asm-arm/plat-s3c/regs-timer.h115
-rw-r--r--include/asm-arm/plat-s3c/regs-watchdog.h41
-rw-r--r--include/asm-arm/plat-s3c/uncompress.h155
-rw-r--r--include/asm-arm/plat-s3c24xx/clock.h64
-rw-r--r--include/asm-arm/plat-s3c24xx/common-smdk.h15
-rw-r--r--include/asm-arm/plat-s3c24xx/cpu.h54
-rw-r--r--include/asm-arm/plat-s3c24xx/devs.h49
-rw-r--r--include/asm-arm/plat-s3c24xx/dma.h82
-rw-r--r--include/asm-arm/plat-s3c24xx/irq.h109
-rw-r--r--include/asm-arm/plat-s3c24xx/mci.h15
-rw-r--r--include/asm-arm/plat-s3c24xx/pm.h73
-rw-r--r--include/asm-arm/plat-s3c24xx/regs-spi.h82
-rw-r--r--include/asm-arm/plat-s3c24xx/regs-udc.h153
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2400.h31
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2410.h31
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2412.h29
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2440.h17
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2442.h17
-rw-r--r--include/asm-arm/plat-s3c24xx/s3c2443.h32
-rw-r--r--include/asm-arm/plat-s3c24xx/udc.h36
-rw-r--r--include/asm-cris/Kbuild11
-rw-r--r--include/asm-cris/arch-v10/Kbuild4
-rw-r--r--include/asm-cris/arch-v10/atomic.h7
-rw-r--r--include/asm-cris/arch-v10/bitops.h73
-rw-r--r--include/asm-cris/arch-v10/bug.h66
-rw-r--r--include/asm-cris/arch-v10/byteorder.h26
-rw-r--r--include/asm-cris/arch-v10/cache.h8
-rw-r--r--include/asm-cris/arch-v10/checksum.h29
-rw-r--r--include/asm-cris/arch-v10/delay.h20
-rw-r--r--include/asm-cris/arch-v10/dma.h74
-rw-r--r--include/asm-cris/arch-v10/elf.h81
-rw-r--r--include/asm-cris/arch-v10/io.h199
-rw-r--r--include/asm-cris/arch-v10/io_interface_mux.h75
-rw-r--r--include/asm-cris/arch-v10/irq.h160
-rw-r--r--include/asm-cris/arch-v10/memmap.h22
-rw-r--r--include/asm-cris/arch-v10/mmu.h109
-rw-r--r--include/asm-cris/arch-v10/offset.h33
-rw-r--r--include/asm-cris/arch-v10/page.h30
-rw-r--r--include/asm-cris/arch-v10/pgtable.h17
-rw-r--r--include/asm-cris/arch-v10/processor.h70
-rw-r--r--include/asm-cris/arch-v10/ptrace.h119
-rw-r--r--include/asm-cris/arch-v10/sv_addr.agh7306
-rw-r--r--include/asm-cris/arch-v10/sv_addr_ag.h139
-rw-r--r--include/asm-cris/arch-v10/svinto.h64
-rw-r--r--include/asm-cris/arch-v10/system.h63
-rw-r--r--include/asm-cris/arch-v10/thread_info.h12
-rw-r--r--include/asm-cris/arch-v10/timex.h30
-rw-r--r--include/asm-cris/arch-v10/tlb.h13
-rw-r--r--include/asm-cris/arch-v10/uaccess.h660
-rw-r--r--include/asm-cris/arch-v10/unistd.h148
-rw-r--r--include/asm-cris/arch-v10/user.h46
-rw-r--r--include/asm-cris/arch-v32/Kbuild2
-rw-r--r--include/asm-cris/arch-v32/arbiter.h30
-rw-r--r--include/asm-cris/arch-v32/atomic.h36
-rw-r--r--include/asm-cris/arch-v32/bitops.h64
-rw-r--r--include/asm-cris/arch-v32/bug.h33
-rw-r--r--include/asm-cris/arch-v32/byteorder.h20
-rw-r--r--include/asm-cris/arch-v32/cache.h19
-rw-r--r--include/asm-cris/arch-v32/checksum.h29
-rw-r--r--include/asm-cris/arch-v32/cryptocop.h272
-rw-r--r--include/asm-cris/arch-v32/delay.h28
-rw-r--r--include/asm-cris/arch-v32/dma.h79
-rw-r--r--include/asm-cris/arch-v32/elf.h73
-rw-r--r--include/asm-cris/arch-v32/hwregs/Makefile186
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/ata_defs_asm.h222
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/bif_core_defs_asm.h319
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/bif_dma_defs_asm.h495
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/bif_slave_defs_asm.h249
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/config_defs_asm.h131
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/cpu_vect.h41
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/cris_defs_asm.h114
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/cris_supp_reg.h10
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/dma_defs_asm.h368
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/eth_defs_asm.h498
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/gio_defs_asm.h276
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/intr_vect.h38
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/intr_vect_defs_asm.h355
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/irq_nmi_defs_asm.h69
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/marb_defs_asm.h579
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/mmu_defs_asm.h212
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/mmu_supp_reg.h7
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/pinmux_defs_asm.h632
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/reg_map_asm.h96
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/rt_trace_defs_asm.h142
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/ser_defs_asm.h359
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/sser_defs_asm.h462
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/strcop_defs_asm.h84
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/strmux_defs_asm.h100
-rw-r--r--include/asm-cris/arch-v32/hwregs/asm/timer_defs_asm.h229
-rw-r--r--include/asm-cris/arch-v32/hwregs/ata_defs.h222
-rw-r--r--include/asm-cris/arch-v32/hwregs/bif_core_defs.h284
-rw-r--r--include/asm-cris/arch-v32/hwregs/bif_dma_defs.h473
-rw-r--r--include/asm-cris/arch-v32/hwregs/bif_slave_defs.h249
-rw-r--r--include/asm-cris/arch-v32/hwregs/config_defs.h142
-rw-r--r--include/asm-cris/arch-v32/hwregs/cpu_vect.h41
-rw-r--r--include/asm-cris/arch-v32/hwregs/dma.h127
-rw-r--r--include/asm-cris/arch-v32/hwregs/dma_defs.h436
-rw-r--r--include/asm-cris/arch-v32/hwregs/eth_defs.h378
-rw-r--r--include/asm-cris/arch-v32/hwregs/extmem_defs.h369
-rw-r--r--include/asm-cris/arch-v32/hwregs/gio_defs.h295
-rw-r--r--include/asm-cris/arch-v32/hwregs/intr_vect.h39
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/Makefile146
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_crc_par_defs_asm.h171
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_in_defs_asm.h321
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_out_defs_asm.h349
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_defs_asm.h234
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h155
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_defs_asm.h254
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h158
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_mpu_defs_asm.h177
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_reg_space_asm.h44
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_in_defs_asm.h182
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_out_defs_asm.h346
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_in_defs_asm.h111
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_out_defs_asm.h105
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_spu_defs_asm.h573
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cfg_defs_asm.h1052
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cpu_defs_asm.h1758
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_mpu_defs_asm.h1776
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_spu_defs_asm.h691
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_timer_grp_defs_asm.h237
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_trigger_grp_defs_asm.h157
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/asm/iop_version_defs_asm.h64
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_crc_par_defs.h232
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_dmc_in_defs.h325
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_dmc_out_defs.h326
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_defs.h255
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_extra_defs.h164
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_defs.h278
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_extra_defs.h164
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_mpu_defs.h190
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_mpu_macros.h764
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_reg_space.h44
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_sap_in_defs.h179
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_sap_out_defs.h306
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_scrc_in_defs.h160
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_scrc_out_defs.h146
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_spu_defs.h453
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_sw_cfg_defs.h1042
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_sw_cpu_defs.h853
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_sw_mpu_defs.h893
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_sw_spu_defs.h552
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_timer_grp_defs.h249
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_trigger_grp_defs.h170
-rw-r--r--include/asm-cris/arch-v32/hwregs/iop/iop_version_defs.h99
-rw-r--r--include/asm-cris/arch-v32/hwregs/irq_nmi_defs.h104
-rw-r--r--include/asm-cris/arch-v32/hwregs/marb_bp_defs.h205
-rw-r--r--include/asm-cris/arch-v32/hwregs/marb_defs.h475
-rw-r--r--include/asm-cris/arch-v32/hwregs/pinmux_defs.h357
-rw-r--r--include/asm-cris/arch-v32/hwregs/reg_rdwr.h17
-rw-r--r--include/asm-cris/arch-v32/hwregs/rt_trace_defs.h173
-rw-r--r--include/asm-cris/arch-v32/hwregs/ser_defs.h308
-rw-r--r--include/asm-cris/arch-v32/hwregs/sser_defs.h331
-rw-r--r--include/asm-cris/arch-v32/hwregs/strcop.h57
-rw-r--r--include/asm-cris/arch-v32/hwregs/strcop_defs.h109
-rw-r--r--include/asm-cris/arch-v32/hwregs/strmux_defs.h127
-rw-r--r--include/asm-cris/arch-v32/hwregs/supp_reg.h78
-rw-r--r--include/asm-cris/arch-v32/intmem.h9
-rw-r--r--include/asm-cris/arch-v32/io.h136
-rw-r--r--include/asm-cris/arch-v32/irq.h124
-rw-r--r--include/asm-cris/arch-v32/mach-a3/arbiter.h34
-rw-r--r--include/asm-cris/arch-v32/mach-a3/dma.h31
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/clkgen_defs_asm.h164
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/ddr2_defs_asm.h266
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/gio_defs_asm.h849
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/pinmux_defs_asm.h572
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/pio_defs_asm.h337
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/reg_map_asm.h99
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/asm/timer_defs_asm.h228
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/clkgen_defs.h159
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/ddr2_defs.h281
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/gio_defs.h837
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect.h46
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect_defs.h341
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_reg_space_asm.h31
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_in_defs_asm.h109
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_out_defs_asm.h276
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cfg_defs_asm.h739
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cpu_defs_asm.h950
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_mpu_defs_asm.h1086
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_spu_defs_asm.h523
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_version_defs_asm.h61
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_reg_space.h31
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_in_defs.h141
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_out_defs.h231
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cfg_defs.h725
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cpu_defs.h522
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_mpu_defs.h648
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_spu_defs.h441
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_version_defs.h96
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/l2cache_defs.h142
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/marb_bar_defs.h482
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/marb_foo_defs.h626
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/pinmux_defs.h312
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/pio_defs.h371
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/reg_map.h103
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/strmux_defs.h120
-rw-r--r--include/asm-cris/arch-v32/mach-a3/hwregs/timer_defs.h265
-rw-r--r--include/asm-cris/arch-v32/mach-a3/memmap.h10
-rw-r--r--include/asm-cris/arch-v32/mach-a3/pinmux.h45
-rw-r--r--include/asm-cris/arch-v32/mach-a3/startup.inc60
-rw-r--r--include/asm-cris/arch-v32/mach-fs/arbiter.h28
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/asm/bif_core_defs_asm.h319
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/asm/config_defs_asm.h131
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/asm/gio_defs_asm.h276
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/asm/pinmux_defs_asm.h632
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/asm/reg_map_asm.h96
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/asm/timer_defs_asm.h229
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/bif_core_defs.h284
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/bif_dma_defs.h473
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/bif_slave_defs.h249
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/config_defs.h142
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/gio_defs.h295
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect.h41
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect_defs.h228
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/marb_bp_defs.h205
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/marb_defs.h475
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/pinmux_defs.h357
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/reg_map.h104
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/strmux_defs.h127
-rw-r--r--include/asm-cris/arch-v32/mach-fs/hwregs/timer_defs.h266
-rw-r--r--include/asm-cris/arch-v32/mach-fs/pinmux.h38
-rw-r--r--include/asm-cris/arch-v32/mach-fs/startup.inc77
-rw-r--r--include/asm-cris/arch-v32/memmap.h24
-rw-r--r--include/asm-cris/arch-v32/mmu.h111
-rw-r--r--include/asm-cris/arch-v32/offset.h35
-rw-r--r--include/asm-cris/arch-v32/page.h27
-rw-r--r--include/asm-cris/arch-v32/pgtable.h9
-rw-r--r--include/asm-cris/arch-v32/pinmux.h40
-rw-r--r--include/asm-cris/arch-v32/processor.h59
-rw-r--r--include/asm-cris/arch-v32/ptrace.h118
-rw-r--r--include/asm-cris/arch-v32/spinlock.h129
-rw-r--r--include/asm-cris/arch-v32/system.h69
-rw-r--r--include/asm-cris/arch-v32/thread_info.h13
-rw-r--r--include/asm-cris/arch-v32/timex.h31
-rw-r--r--include/asm-cris/arch-v32/tlb.h14
-rw-r--r--include/asm-cris/arch-v32/uaccess.h748
-rw-r--r--include/asm-cris/arch-v32/unistd.h155
-rw-r--r--include/asm-cris/arch-v32/user.h41
-rw-r--r--include/asm-cris/atomic.h164
-rw-r--r--include/asm-cris/auxvec.h4
-rw-r--r--include/asm-cris/axisflashmap.h61
-rw-r--r--include/asm-cris/bitops.h166
-rw-r--r--include/asm-cris/bug.h4
-rw-r--r--include/asm-cris/bugs.h21
-rw-r--r--include/asm-cris/byteorder.h27
-rw-r--r--include/asm-cris/cache.h6
-rw-r--r--include/asm-cris/cacheflush.h31
-rw-r--r--include/asm-cris/checksum.h83
-rw-r--r--include/asm-cris/cputime.h6
-rw-r--r--include/asm-cris/current.h15
-rw-r--r--include/asm-cris/delay.h27
-rw-r--r--include/asm-cris/device.h7
-rw-r--r--include/asm-cris/div64.h1
-rw-r--r--include/asm-cris/dma-mapping.h170
-rw-r--r--include/asm-cris/dma.h21
-rw-r--r--include/asm-cris/elf.h93
-rw-r--r--include/asm-cris/emergency-restart.h6
-rw-r--r--include/asm-cris/errno.h6
-rw-r--r--include/asm-cris/eshlibld.h113
-rw-r--r--include/asm-cris/ethernet.h21
-rw-r--r--include/asm-cris/etraxgpio.h179
-rw-r--r--include/asm-cris/etraxi2c.h36
-rw-r--r--include/asm-cris/fasttimer.h47
-rw-r--r--include/asm-cris/fb.h12
-rw-r--r--include/asm-cris/fcntl.h1
-rw-r--r--include/asm-cris/futex.h6
-rw-r--r--include/asm-cris/hardirq.h27
-rw-r--r--include/asm-cris/hw_irq.h5
-rw-r--r--include/asm-cris/io.h154
-rw-r--r--include/asm-cris/ioctl.h1
-rw-r--r--include/asm-cris/ioctls.h91
-rw-r--r--include/asm-cris/ipcbuf.h29
-rw-r--r--include/asm-cris/irq.h13
-rw-r--r--include/asm-cris/irq_regs.h1
-rw-r--r--include/asm-cris/kdebug.h1
-rw-r--r--include/asm-cris/kmap_types.h25
-rw-r--r--include/asm-cris/linkage.h6
-rw-r--r--include/asm-cris/local.h1
-rw-r--r--include/asm-cris/mman.h19
-rw-r--r--include/asm-cris/mmu.h10
-rw-r--r--include/asm-cris/mmu_context.h26
-rw-r--r--include/asm-cris/module.h9
-rw-r--r--include/asm-cris/msgbuf.h33
-rw-r--r--include/asm-cris/mutex.h9
-rw-r--r--include/asm-cris/page.h74
-rw-r--r--include/asm-cris/param.h23
-rw-r--r--include/asm-cris/pci.h68
-rw-r--r--include/asm-cris/percpu.h6
-rw-r--r--include/asm-cris/pgalloc.h58
-rw-r--r--include/asm-cris/pgtable.h299
-rw-r--r--include/asm-cris/poll.h1
-rw-r--r--include/asm-cris/posix_types.h66
-rw-r--r--include/asm-cris/processor.h75
-rw-r--r--include/asm-cris/ptrace.h16
-rw-r--r--include/asm-cris/resource.h6
-rw-r--r--include/asm-cris/rs485.h20
-rw-r--r--include/asm-cris/rtc.h107
-rw-r--r--include/asm-cris/scatterlist.h23
-rw-r--r--include/asm-cris/sections.h7
-rw-r--r--include/asm-cris/segment.h8
-rw-r--r--include/asm-cris/sembuf.h25
-rw-r--r--include/asm-cris/setup.h6
-rw-r--r--include/asm-cris/shmbuf.h42
-rw-r--r--include/asm-cris/shmparam.h8
-rw-r--r--include/asm-cris/sigcontext.h24
-rw-r--r--include/asm-cris/siginfo.h6
-rw-r--r--include/asm-cris/signal.h163
-rw-r--r--include/asm-cris/smp.h11
-rw-r--r--include/asm-cris/socket.h61
-rw-r--r--include/asm-cris/sockios.h13
-rw-r--r--include/asm-cris/spinlock.h1
-rw-r--r--include/asm-cris/stat.h81
-rw-r--r--include/asm-cris/statfs.h6
-rw-r--r--include/asm-cris/string.h14
-rw-r--r--include/asm-cris/sync_serial.h107
-rw-r--r--include/asm-cris/system.h88
-rw-r--r--include/asm-cris/termbits.h234
-rw-r--r--include/asm-cris/termios.h91
-rw-r--r--include/asm-cris/thread_info.h104
-rw-r--r--include/asm-cris/timex.h24
-rw-r--r--include/asm-cris/tlb.h19
-rw-r--r--include/asm-cris/tlbflush.h48
-rw-r--r--include/asm-cris/topology.h6
-rw-r--r--include/asm-cris/types.h30
-rw-r--r--include/asm-cris/uaccess.h404
-rw-r--r--include/asm-cris/ucontext.h12
-rw-r--r--include/asm-cris/unaligned.h13
-rw-r--r--include/asm-cris/unistd.h374
-rw-r--r--include/asm-cris/user.h52
-rw-r--r--include/asm-frv/elf.h2
-rw-r--r--include/asm-frv/ide.h10
-rw-r--r--include/asm-frv/unaligned.h2
-rw-r--r--include/asm-generic/atomic.h2
-rw-r--r--include/asm-generic/audit_write.h2
-rw-r--r--include/asm-generic/bug.h17
-rw-r--r--include/asm-generic/gpio.h18
-rw-r--r--include/asm-generic/kdebug.h1
-rw-r--r--include/asm-generic/memory_model.h4
-rw-r--r--include/asm-generic/mutex-dec.h26
-rw-r--r--include/asm-generic/mutex-xchg.h9
-rw-r--r--include/asm-generic/pgtable.h50
-rw-r--r--include/asm-generic/rtc.h24
-rw-r--r--include/asm-generic/vmlinux.lds.h53
-rw-r--r--include/asm-h8300/timer.h25
-rw-r--r--include/asm-m32r/elf.h2
-rw-r--r--include/asm-m32r/system.h2
-rw-r--r--include/asm-m68k/byteorder.h16
-rw-r--r--include/asm-m68k/elf.h2
-rw-r--r--include/asm-m68k/ide.h9
-rw-r--r--include/asm-m68k/machdep.h2
-rw-r--r--include/asm-m68k/machw.h22
-rw-r--r--include/asm-m68k/thread_info.h1
-rw-r--r--include/asm-mips/cevt-r4k.h46
-rw-r--r--include/asm-mn10300/elf.h2
-rw-r--r--include/asm-mn10300/uaccess.h2
-rw-r--r--include/asm-parisc/Kbuild3
-rw-r--r--include/asm-parisc/agp.h24
-rw-r--r--include/asm-parisc/asmregs.h183
-rw-r--r--include/asm-parisc/assembly.h519
-rw-r--r--include/asm-parisc/atomic.h348
-rw-r--r--include/asm-parisc/auxvec.h4
-rw-r--r--include/asm-parisc/bitops.h239
-rw-r--r--include/asm-parisc/bug.h92
-rw-r--r--include/asm-parisc/bugs.h19
-rw-r--r--include/asm-parisc/byteorder.h82
-rw-r--r--include/asm-parisc/cache.h60
-rw-r--r--include/asm-parisc/cacheflush.h121
-rw-r--r--include/asm-parisc/checksum.h210
-rw-r--r--include/asm-parisc/compat.h165
-rw-r--r--include/asm-parisc/compat_rt_sigframe.h50
-rw-r--r--include/asm-parisc/compat_signal.h2
-rw-r--r--include/asm-parisc/compat_ucontext.h17
-rw-r--r--include/asm-parisc/cputime.h6
-rw-r--r--include/asm-parisc/current.h15
-rw-r--r--include/asm-parisc/delay.h43
-rw-r--r--include/asm-parisc/device.h7
-rw-r--r--include/asm-parisc/div64.h1
-rw-r--r--include/asm-parisc/dma-mapping.h253
-rw-r--r--include/asm-parisc/dma.h186
-rw-r--r--include/asm-parisc/eisa_bus.h23
-rw-r--r--include/asm-parisc/eisa_eeprom.h153
-rw-r--r--include/asm-parisc/elf.h342
-rw-r--r--include/asm-parisc/emergency-restart.h6
-rw-r--r--include/asm-parisc/errno.h124
-rw-r--r--include/asm-parisc/fb.h19
-rw-r--r--include/asm-parisc/fcntl.h39
-rw-r--r--include/asm-parisc/fixmap.h30
-rw-r--r--include/asm-parisc/floppy.h271
-rw-r--r--include/asm-parisc/futex.h77
-rw-r--r--include/asm-parisc/grfioctl.h113
-rw-r--r--include/asm-parisc/hardirq.h29
-rw-r--r--include/asm-parisc/hardware.h127
-rw-r--r--include/asm-parisc/hw_irq.h8
-rw-r--r--include/asm-parisc/ide.h61
-rw-r--r--include/asm-parisc/io.h293
-rw-r--r--include/asm-parisc/ioctl.h44
-rw-r--r--include/asm-parisc/ioctls.h90
-rw-r--r--include/asm-parisc/ipcbuf.h27
-rw-r--r--include/asm-parisc/irq.h57
-rw-r--r--include/asm-parisc/irq_regs.h1
-rw-r--r--include/asm-parisc/kdebug.h1
-rw-r--r--include/asm-parisc/kmap_types.h30
-rw-r--r--include/asm-parisc/led.h42
-rw-r--r--include/asm-parisc/linkage.h31
-rw-r--r--include/asm-parisc/local.h1
-rw-r--r--include/asm-parisc/machdep.h16
-rw-r--r--include/asm-parisc/mc146818rtc.h9
-rw-r--r--include/asm-parisc/mckinley.h9
-rw-r--r--include/asm-parisc/mman.h61
-rw-r--r--include/asm-parisc/mmu.h7
-rw-r--r--include/asm-parisc/mmu_context.h75
-rw-r--r--include/asm-parisc/mmzone.h73
-rw-r--r--include/asm-parisc/module.h32
-rw-r--r--include/asm-parisc/msgbuf.h37
-rw-r--r--include/asm-parisc/mutex.h9
-rw-r--r--include/asm-parisc/page.h173
-rw-r--r--include/asm-parisc/param.h22
-rw-r--r--include/asm-parisc/parisc-device.h64
-rw-r--r--include/asm-parisc/parport.h18
-rw-r--r--include/asm-parisc/pci.h294
-rw-r--r--include/asm-parisc/pdc.h757
-rw-r--r--include/asm-parisc/pdc_chassis.h381
-rw-r--r--include/asm-parisc/pdcpat.h308
-rw-r--r--include/asm-parisc/percpu.h7
-rw-r--r--include/asm-parisc/perf.h74
-rw-r--r--include/asm-parisc/pgalloc.h149
-rw-r--r--include/asm-parisc/pgtable.h508
-rw-r--r--include/asm-parisc/poll.h1
-rw-r--r--include/asm-parisc/posix_types.h129
-rw-r--r--include/asm-parisc/prefetch.h39
-rw-r--r--include/asm-parisc/processor.h357
-rw-r--r--include/asm-parisc/psw.h62
-rw-r--r--include/asm-parisc/ptrace.h58
-rw-r--r--include/asm-parisc/real.h5
-rw-r--r--include/asm-parisc/resource.h7
-rw-r--r--include/asm-parisc/ropes.h322
-rw-r--r--include/asm-parisc/rt_sigframe.h23
-rw-r--r--include/asm-parisc/rtc.h131
-rw-r--r--include/asm-parisc/runway.h12
-rw-r--r--include/asm-parisc/scatterlist.h27
-rw-r--r--include/asm-parisc/sections.h12
-rw-r--r--include/asm-parisc/segment.h6
-rw-r--r--include/asm-parisc/sembuf.h29
-rw-r--r--include/asm-parisc/serial.h10
-rw-r--r--include/asm-parisc/setup.h6
-rw-r--r--include/asm-parisc/shmbuf.h58
-rw-r--r--include/asm-parisc/shmparam.h8
-rw-r--r--include/asm-parisc/sigcontext.h20
-rw-r--r--include/asm-parisc/siginfo.h9
-rw-r--r--include/asm-parisc/signal.h153
-rw-r--r--include/asm-parisc/smp.h68
-rw-r--r--include/asm-parisc/socket.h62
-rw-r--r--include/asm-parisc/sockios.h13
-rw-r--r--include/asm-parisc/spinlock.h194
-rw-r--r--include/asm-parisc/spinlock_types.h21
-rw-r--r--include/asm-parisc/stat.h100
-rw-r--r--include/asm-parisc/statfs.h7
-rw-r--r--include/asm-parisc/string.h10
-rw-r--r--include/asm-parisc/superio.h85
-rw-r--r--include/asm-parisc/system.h182
-rw-r--r--include/asm-parisc/termbits.h200
-rw-r--r--include/asm-parisc/termios.h90
-rw-r--r--include/asm-parisc/thread_info.h74
-rw-r--r--include/asm-parisc/timex.h20
-rw-r--r--include/asm-parisc/tlb.h27
-rw-r--r--include/asm-parisc/tlbflush.h80
-rw-r--r--include/asm-parisc/topology.h6
-rw-r--r--include/asm-parisc/traps.h16
-rw-r--r--include/asm-parisc/types.h36
-rw-r--r--include/asm-parisc/uaccess.h244
-rw-r--r--include/asm-parisc/ucontext.h12
-rw-r--r--include/asm-parisc/unaligned.h16
-rw-r--r--include/asm-parisc/unistd.h991
-rw-r--r--include/asm-parisc/unwind.h77
-rw-r--r--include/asm-parisc/user.h5
-rw-r--r--include/asm-parisc/vga.h6
-rw-r--r--include/asm-parisc/xor.h1
-rw-r--r--include/asm-um/a.out-core.h27
-rw-r--r--include/asm-um/a.out.h11
-rw-r--r--include/asm-um/alternative-asm.h6
-rw-r--r--include/asm-um/alternative.h6
-rw-r--r--include/asm-um/apic.h4
-rw-r--r--include/asm-um/archparam-i386.h26
-rw-r--r--include/asm-um/archparam-ppc.h8
-rw-r--r--include/asm-um/archparam-x86_64.h26
-rw-r--r--include/asm-um/asm.h6
-rw-r--r--include/asm-um/atomic.h11
-rw-r--r--include/asm-um/auxvec.h4
-rw-r--r--include/asm-um/bitops.h10
-rw-r--r--include/asm-um/boot.h6
-rw-r--r--include/asm-um/bug.h6
-rw-r--r--include/asm-um/bugs.h6
-rw-r--r--include/asm-um/byteorder.h6
-rw-r--r--include/asm-um/cache.h17
-rw-r--r--include/asm-um/cacheflush.h6
-rw-r--r--include/asm-um/calling.h9
-rw-r--r--include/asm-um/checksum.h6
-rw-r--r--include/asm-um/cmpxchg.h6
-rw-r--r--include/asm-um/cobalt.h6
-rw-r--r--include/asm-um/common.lds.S130
-rw-r--r--include/asm-um/cpufeature.h6
-rw-r--r--include/asm-um/cputime.h6
-rw-r--r--include/asm-um/current.h13
-rw-r--r--include/asm-um/delay.h20
-rw-r--r--include/asm-um/desc.h16
-rw-r--r--include/asm-um/device.h7
-rw-r--r--include/asm-um/div64.h6
-rw-r--r--include/asm-um/dma-mapping.h128
-rw-r--r--include/asm-um/dma.h10
-rw-r--r--include/asm-um/dwarf2.h11
-rw-r--r--include/asm-um/elf-i386.h163
-rw-r--r--include/asm-um/elf-ppc.h53
-rw-r--r--include/asm-um/elf-x86_64.h119
-rw-r--r--include/asm-um/emergency-restart.h6
-rw-r--r--include/asm-um/errno.h6
-rw-r--r--include/asm-um/fcntl.h6
-rw-r--r--include/asm-um/fixmap.h98
-rw-r--r--include/asm-um/floppy.h6
-rw-r--r--include/asm-um/frame.h6
-rw-r--r--include/asm-um/futex.h6
-rw-r--r--include/asm-um/hardirq.h25
-rw-r--r--include/asm-um/highmem.h12
-rw-r--r--include/asm-um/host_ldt-i386.h34
-rw-r--r--include/asm-um/host_ldt-x86_64.h38
-rw-r--r--include/asm-um/hw_irq.h7
-rw-r--r--include/asm-um/ide.h6
-rw-r--r--include/asm-um/io.h57
-rw-r--r--include/asm-um/ioctl.h6
-rw-r--r--include/asm-um/ioctls.h6
-rw-r--r--include/asm-um/ipcbuf.h6
-rw-r--r--include/asm-um/irq.h23
-rw-r--r--include/asm-um/irq_regs.h1
-rw-r--r--include/asm-um/irq_vectors.h20
-rw-r--r--include/asm-um/irqflags.h6
-rw-r--r--include/asm-um/kdebug.h1
-rw-r--r--include/asm-um/kmap_types.h29
-rw-r--r--include/asm-um/ldt.h37
-rw-r--r--include/asm-um/linkage.h6
-rw-r--r--include/asm-um/local.h6
-rw-r--r--include/asm-um/locks.h6
-rw-r--r--include/asm-um/mca_dma.h6
-rw-r--r--include/asm-um/mman.h6
-rw-r--r--include/asm-um/mmu.h22
-rw-r--r--include/asm-um/mmu_context.h54
-rw-r--r--include/asm-um/module-generic.h6
-rw-r--r--include/asm-um/module-i386.h13
-rw-r--r--include/asm-um/module-x86_64.h30
-rw-r--r--include/asm-um/msgbuf.h6
-rw-r--r--include/asm-um/mtrr.h6
-rw-r--r--include/asm-um/mutex.h9
-rw-r--r--include/asm-um/nops.h6
-rw-r--r--include/asm-um/page.h122
-rw-r--r--include/asm-um/page_offset.h1
-rw-r--r--include/asm-um/param.h20
-rw-r--r--include/asm-um/paravirt.h6
-rw-r--r--include/asm-um/pci.h7
-rw-r--r--include/asm-um/pda.h31
-rw-r--r--include/asm-um/percpu.h6
-rw-r--r--include/asm-um/pgalloc.h72
-rw-r--r--include/asm-um/pgtable-2level.h53
-rw-r--r--include/asm-um/pgtable-3level.h146
-rw-r--r--include/asm-um/pgtable.h358
-rw-r--r--include/asm-um/poll.h6
-rw-r--r--include/asm-um/posix_types.h6
-rw-r--r--include/asm-um/prctl.h6
-rw-r--r--include/asm-um/processor-generic.h136
-rw-r--r--include/asm-um/processor-i386.h78
-rw-r--r--include/asm-um/processor-ppc.h15
-rw-r--r--include/asm-um/processor-x86_64.h56
-rw-r--r--include/asm-um/ptrace-generic.h55
-rw-r--r--include/asm-um/ptrace-i386.h60
-rw-r--r--include/asm-um/ptrace-x86_64.h81
-rw-r--r--include/asm-um/required-features.h9
-rw-r--r--include/asm-um/resource.h6
-rw-r--r--include/asm-um/rwlock.h6
-rw-r--r--include/asm-um/rwsem.h6
-rw-r--r--include/asm-um/scatterlist.h6
-rw-r--r--include/asm-um/sections.h7
-rw-r--r--include/asm-um/segment.h10
-rw-r--r--include/asm-um/sembuf.h6
-rw-r--r--include/asm-um/serial.h6
-rw-r--r--include/asm-um/setup.h10
-rw-r--r--include/asm-um/shmbuf.h6
-rw-r--r--include/asm-um/shmparam.h6
-rw-r--r--include/asm-um/sigcontext-generic.h6
-rw-r--r--include/asm-um/sigcontext-i386.h6
-rw-r--r--include/asm-um/sigcontext-ppc.h10
-rw-r--r--include/asm-um/sigcontext-x86_64.h22
-rw-r--r--include/asm-um/siginfo.h6
-rw-r--r--include/asm-um/signal.h29
-rw-r--r--include/asm-um/smp.h33
-rw-r--r--include/asm-um/socket.h6
-rw-r--r--include/asm-um/sockios.h6
-rw-r--r--include/asm-um/spinlock.h6
-rw-r--r--include/asm-um/spinlock_types.h6
-rw-r--r--include/asm-um/stat.h6
-rw-r--r--include/asm-um/statfs.h6
-rw-r--r--include/asm-um/string.h7
-rw-r--r--include/asm-um/suspend.h4
-rw-r--r--include/asm-um/system-generic.h47
-rw-r--r--include/asm-um/system-i386.h6
-rw-r--r--include/asm-um/system-ppc.h12
-rw-r--r--include/asm-um/system-x86_64.h23
-rw-r--r--include/asm-um/termbits.h6
-rw-r--r--include/asm-um/termios.h6
-rw-r--r--include/asm-um/thread_info.h81
-rw-r--r--include/asm-um/timex.h13
-rw-r--r--include/asm-um/tlb.h127
-rw-r--r--include/asm-um/tlbflush.h31
-rw-r--r--include/asm-um/topology.h6
-rw-r--r--include/asm-um/types.h6
-rw-r--r--include/asm-um/uaccess.h99
-rw-r--r--include/asm-um/ucontext.h6
-rw-r--r--include/asm-um/unaligned.h6
-rw-r--r--include/asm-um/unistd.h41
-rw-r--r--include/asm-um/user.h6
-rw-r--r--include/asm-um/vga.h6
-rw-r--r--include/asm-um/vm-flags-i386.h14
-rw-r--r--include/asm-um/vm-flags-x86_64.h33
-rw-r--r--include/asm-um/vm86.h6
-rw-r--r--include/asm-um/xor.h6
-rw-r--r--include/asm-x86/Kbuild24
-rw-r--r--include/asm-x86/a.out-core.h73
-rw-r--r--include/asm-x86/a.out.h20
-rw-r--r--include/asm-x86/acpi.h178
-rw-r--r--include/asm-x86/agp.h35
-rw-r--r--include/asm-x86/alternative-asm.h22
-rw-r--r--include/asm-x86/alternative.h183
-rw-r--r--include/asm-x86/amd_iommu.h35
-rw-r--r--include/asm-x86/amd_iommu_types.h404
-rw-r--r--include/asm-x86/apic.h187
-rw-r--r--include/asm-x86/apicdef.h417
-rw-r--r--include/asm-x86/arch_hooks.h26
-rw-r--r--include/asm-x86/asm.h47
-rw-r--r--include/asm-x86/atomic.h5
-rw-r--r--include/asm-x86/atomic_32.h259
-rw-r--r--include/asm-x86/atomic_64.h473
-rw-r--r--include/asm-x86/auxvec.h12
-rw-r--r--include/asm-x86/bigsmp/apic.h144
-rw-r--r--include/asm-x86/bigsmp/apicdef.h13
-rw-r--r--include/asm-x86/bigsmp/ipi.h25
-rw-r--r--include/asm-x86/bios_ebda.h36
-rw-r--r--include/asm-x86/bitops.h451
-rw-r--r--include/asm-x86/boot.h26
-rw-r--r--include/asm-x86/bootparam.h111
-rw-r--r--include/asm-x86/bug.h39
-rw-r--r--include/asm-x86/bugs.h12
-rw-r--r--include/asm-x86/byteorder.h81
-rw-r--r--include/asm-x86/cache.h20
-rw-r--r--include/asm-x86/cacheflush.h118
-rw-r--r--include/asm-x86/calgary.h72
-rw-r--r--include/asm-x86/calling.h170
-rw-r--r--include/asm-x86/checksum.h5
-rw-r--r--include/asm-x86/checksum_32.h189
-rw-r--r--include/asm-x86/checksum_64.h191
-rw-r--r--include/asm-x86/cmpxchg.h5
-rw-r--r--include/asm-x86/cmpxchg_32.h344
-rw-r--r--include/asm-x86/cmpxchg_64.h185
-rw-r--r--include/asm-x86/compat.h218
-rw-r--r--include/asm-x86/cpu.h20
-rw-r--r--include/asm-x86/cpufeature.h271
-rw-r--r--include/asm-x86/cputime.h1
-rw-r--r--include/asm-x86/current.h39
-rw-r--r--include/asm-x86/debugreg.h70
-rw-r--r--include/asm-x86/delay.h31
-rw-r--r--include/asm-x86/desc.h409
-rw-r--r--include/asm-x86/desc_defs.h95
-rw-r--r--include/asm-x86/device.h16
-rw-r--r--include/asm-x86/div64.h60
-rw-r--r--include/asm-x86/dma-mapping.h308
-rw-r--r--include/asm-x86/dma.h318
-rw-r--r--include/asm-x86/dmi.h26
-rw-r--r--include/asm-x86/ds.h238
-rw-r--r--include/asm-x86/dwarf2.h61
-rw-r--r--include/asm-x86/e820.h146
-rw-r--r--include/asm-x86/edac.h18
-rw-r--r--include/asm-x86/efi.h97
-rw-r--r--include/asm-x86/elf.h336
-rw-r--r--include/asm-x86/emergency-restart.h18
-rw-r--r--include/asm-x86/errno.h1
-rw-r--r--include/asm-x86/es7000/apic.h194
-rw-r--r--include/asm-x86/es7000/apicdef.h13
-rw-r--r--include/asm-x86/es7000/ipi.h24
-rw-r--r--include/asm-x86/es7000/mpparse.h30
-rw-r--r--include/asm-x86/es7000/wakecpu.h59
-rw-r--r--include/asm-x86/fb.h21
-rw-r--r--include/asm-x86/fcntl.h1
-rw-r--r--include/asm-x86/fixmap.h68
-rw-r--r--include/asm-x86/fixmap_32.h123
-rw-r--r--include/asm-x86/fixmap_64.h83
-rw-r--r--include/asm-x86/floppy.h281
-rw-r--r--include/asm-x86/frame.h27
-rw-r--r--include/asm-x86/ftrace.h14
-rw-r--r--include/asm-x86/futex.h140
-rw-r--r--include/asm-x86/gart.h73
-rw-r--r--include/asm-x86/genapic.h5
-rw-r--r--include/asm-x86/genapic_32.h124
-rw-r--r--include/asm-x86/genapic_64.h58
-rw-r--r--include/asm-x86/geode.h253
-rw-r--r--include/asm-x86/gpio.h56
-rw-r--r--include/asm-x86/hardirq.h11
-rw-r--r--include/asm-x86/hardirq_32.h28
-rw-r--r--include/asm-x86/hardirq_64.h23
-rw-r--r--include/asm-x86/highmem.h82
-rw-r--r--include/asm-x86/hpet.h93
-rw-r--r--include/asm-x86/hugetlb.h93
-rw-r--r--include/asm-x86/hw_irq.h136
-rw-r--r--include/asm-x86/hypertransport.h45
-rw-r--r--include/asm-x86/i387.h400
-rw-r--r--include/asm-x86/i8253.h18
-rw-r--r--include/asm-x86/i8259.h63
-rw-r--r--include/asm-x86/ia32.h170
-rw-r--r--include/asm-x86/ia32_unistd.h18
-rw-r--r--include/asm-x86/idle.h15
-rw-r--r--include/asm-x86/intel_arch_perfmon.h31
-rw-r--r--include/asm-x86/io.h91
-rw-r--r--include/asm-x86/io_32.h284
-rw-r--r--include/asm-x86/io_64.h244
-rw-r--r--include/asm-x86/io_apic.h212
-rw-r--r--include/asm-x86/ioctl.h1
-rw-r--r--include/asm-x86/ioctls.h94
-rw-r--r--include/asm-x86/iommu.h46
-rw-r--r--include/asm-x86/ipcbuf.h28
-rw-r--r--include/asm-x86/ipi.h138
-rw-r--r--include/asm-x86/irq.h50
-rw-r--r--include/asm-x86/irq_regs.h5
-rw-r--r--include/asm-x86/irq_regs_32.h29
-rw-r--r--include/asm-x86/irq_regs_64.h1
-rw-r--r--include/asm-x86/irq_remapping.h8
-rw-r--r--include/asm-x86/irq_vectors.h182
-rw-r--r--include/asm-x86/irqflags.h211
-rw-r--r--include/asm-x86/ist.h34
-rw-r--r--include/asm-x86/k8.h15
-rw-r--r--include/asm-x86/kdebug.h37
-rw-r--r--include/asm-x86/kexec.h175
-rw-r--r--include/asm-x86/kgdb.h79
-rw-r--r--include/asm-x86/kmap_types.h29
-rw-r--r--include/asm-x86/kprobes.h88
-rw-r--r--include/asm-x86/kvm.h233
-rw-r--r--include/asm-x86/kvm_host.h738
-rw-r--r--include/asm-x86/kvm_para.h147
-rw-r--r--include/asm-x86/kvm_x86_emulate.h184
-rw-r--r--include/asm-x86/ldt.h40
-rw-r--r--include/asm-x86/lguest.h94
-rw-r--r--include/asm-x86/lguest_hcall.h71
-rw-r--r--include/asm-x86/linkage.h61
-rw-r--r--include/asm-x86/local.h235
-rw-r--r--include/asm-x86/mach-default/apm.h73
-rw-r--r--include/asm-x86/mach-default/do_timer.h16
-rw-r--r--include/asm-x86/mach-default/entry_arch.h35
-rw-r--r--include/asm-x86/mach-default/mach_apic.h143
-rw-r--r--include/asm-x86/mach-default/mach_apicdef.h24
-rw-r--r--include/asm-x86/mach-default/mach_ipi.h64
-rw-r--r--include/asm-x86/mach-default/mach_mpparse.h17
-rw-r--r--include/asm-x86/mach-default/mach_mpspec.h12
-rw-r--r--include/asm-x86/mach-default/mach_timer.h48
-rw-r--r--include/asm-x86/mach-default/mach_traps.h33
-rw-r--r--include/asm-x86/mach-default/mach_wakecpu.h42
-rw-r--r--include/asm-x86/mach-default/pci-functions.h19
-rw-r--r--include/asm-x86/mach-default/setup_arch.h3
-rw-r--r--include/asm-x86/mach-default/smpboot_hooks.h59
-rw-r--r--include/asm-x86/mach-generic/gpio.h15
-rw-r--r--include/asm-x86/mach-generic/irq_vectors_limits.h14
-rw-r--r--include/asm-x86/mach-generic/mach_apic.h32
-rw-r--r--include/asm-x86/mach-generic/mach_apicdef.h11
-rw-r--r--include/asm-x86/mach-generic/mach_ipi.h10
-rw-r--r--include/asm-x86/mach-generic/mach_mpparse.h10
-rw-r--r--include/asm-x86/mach-generic/mach_mpspec.h12
-rw-r--r--include/asm-x86/mach-rdc321x/gpio.h60
-rw-r--r--include/asm-x86/mach-rdc321x/rdc321x_defs.h12
-rw-r--r--include/asm-x86/mach-voyager/do_timer.h17
-rw-r--r--include/asm-x86/mach-voyager/entry_arch.h26
-rw-r--r--include/asm-x86/mach-voyager/setup_arch.h12
-rw-r--r--include/asm-x86/math_emu.h31
-rw-r--r--include/asm-x86/mc146818rtc.h104
-rw-r--r--include/asm-x86/mca.h43
-rw-r--r--include/asm-x86/mca_dma.h201
-rw-r--r--include/asm-x86/mce.h130
-rw-r--r--include/asm-x86/microcode.h47
-rw-r--r--include/asm-x86/mman.h20
-rw-r--r--include/asm-x86/mmconfig.h12
-rw-r--r--include/asm-x86/mmu.h26
-rw-r--r--include/asm-x86/mmu_context.h37
-rw-r--r--include/asm-x86/mmu_context_32.h56
-rw-r--r--include/asm-x86/mmu_context_64.h54
-rw-r--r--include/asm-x86/mmx.h14
-rw-r--r--include/asm-x86/mmzone.h5
-rw-r--r--include/asm-x86/mmzone_32.h134
-rw-r--r--include/asm-x86/mmzone_64.h51
-rw-r--r--include/asm-x86/module.h80
-rw-r--r--include/asm-x86/mpspec.h145
-rw-r--r--include/asm-x86/mpspec_def.h180
-rw-r--r--include/asm-x86/msgbuf.h39
-rw-r--r--include/asm-x86/msidef.h55
-rw-r--r--include/asm-x86/msr-index.h329
-rw-r--r--include/asm-x86/msr.h247
-rw-r--r--include/asm-x86/mtrr.h173
-rw-r--r--include/asm-x86/mutex.h5
-rw-r--r--include/asm-x86/mutex_32.h125
-rw-r--r--include/asm-x86/mutex_64.h100
-rw-r--r--include/asm-x86/nmi.h81
-rw-r--r--include/asm-x86/nops.h118
-rw-r--r--include/asm-x86/numa.h5
-rw-r--r--include/asm-x86/numa_32.h11
-rw-r--r--include/asm-x86/numa_64.h43
-rw-r--r--include/asm-x86/numaq.h169
-rw-r--r--include/asm-x86/numaq/apic.h138
-rw-r--r--include/asm-x86/numaq/apicdef.h14
-rw-r--r--include/asm-x86/numaq/ipi.h25
-rw-r--r--include/asm-x86/numaq/mpparse.h7
-rw-r--r--include/asm-x86/numaq/wakecpu.h43
-rw-r--r--include/asm-x86/olpc.h132
-rw-r--r--include/asm-x86/page.h209
-rw-r--r--include/asm-x86/page_32.h138
-rw-r--r--include/asm-x86/page_64.h106
-rw-r--r--include/asm-x86/param.h22
-rw-r--r--include/asm-x86/paravirt.h1650
-rw-r--r--include/asm-x86/parport.h10
-rw-r--r--include/asm-x86/pat.h22
-rw-r--r--include/asm-x86/pci-direct.h21
-rw-r--r--include/asm-x86/pci.h114
-rw-r--r--include/asm-x86/pci_32.h34
-rw-r--r--include/asm-x86/pci_64.h66
-rw-r--r--include/asm-x86/pda.h137
-rw-r--r--include/asm-x86/percpu.h218
-rw-r--r--include/asm-x86/pgalloc.h114
-rw-r--r--include/asm-x86/pgtable-2level-defs.h20
-rw-r--r--include/asm-x86/pgtable-2level.h79
-rw-r--r--include/asm-x86/pgtable-3level-defs.h28
-rw-r--r--include/asm-x86/pgtable-3level.h175
-rw-r--r--include/asm-x86/pgtable.h556
-rw-r--r--include/asm-x86/pgtable_32.h191
-rw-r--r--include/asm-x86/pgtable_64.h285
-rw-r--r--include/asm-x86/poll.h1
-rw-r--r--include/asm-x86/posix_types.h13
-rw-r--r--include/asm-x86/posix_types_32.h85
-rw-r--r--include/asm-x86/posix_types_64.h119
-rw-r--r--include/asm-x86/prctl.h10
-rw-r--r--include/asm-x86/processor-cyrix.h38
-rw-r--r--include/asm-x86/processor-flags.h100
-rw-r--r--include/asm-x86/processor.h936
-rw-r--r--include/asm-x86/proto.h32
-rw-r--r--include/asm-x86/ptrace-abi.h145
-rw-r--r--include/asm-x86/ptrace.h280
-rw-r--r--include/asm-x86/pvclock-abi.h42
-rw-r--r--include/asm-x86/pvclock.h13
-rw-r--r--include/asm-x86/reboot.h21
-rw-r--r--include/asm-x86/reboot_fixups.h6
-rw-r--r--include/asm-x86/required-features.h82
-rw-r--r--include/asm-x86/resource.h1
-rw-r--r--include/asm-x86/resume-trace.h21
-rw-r--r--include/asm-x86/rio.h63
-rw-r--r--include/asm-x86/rtc.h1
-rw-r--r--include/asm-x86/rwlock.h8
-rw-r--r--include/asm-x86/rwsem.h265
-rw-r--r--include/asm-x86/scatterlist.h33
-rw-r--r--include/asm-x86/seccomp.h5
-rw-r--r--include/asm-x86/seccomp_32.h17
-rw-r--r--include/asm-x86/seccomp_64.h25
-rw-r--r--include/asm-x86/sections.h1
-rw-r--r--include/asm-x86/segment.h209
-rw-r--r--include/asm-x86/sembuf.h24
-rw-r--r--include/asm-x86/serial.h29
-rw-r--r--include/asm-x86/setup.h105
-rw-r--r--include/asm-x86/shmbuf.h51
-rw-r--r--include/asm-x86/shmparam.h6
-rw-r--r--include/asm-x86/sigcontext.h284
-rw-r--r--include/asm-x86/sigcontext32.h75
-rw-r--r--include/asm-x86/siginfo.h10
-rw-r--r--include/asm-x86/signal.h262
-rw-r--r--include/asm-x86/smp.h229
-rw-r--r--include/asm-x86/socket.h57
-rw-r--r--include/asm-x86/sockios.h13
-rw-r--r--include/asm-x86/sparsemem.h34
-rw-r--r--include/asm-x86/spinlock.h364
-rw-r--r--include/asm-x86/spinlock_types.h20
-rw-r--r--include/asm-x86/srat.h39
-rw-r--r--include/asm-x86/stacktrace.h21
-rw-r--r--include/asm-x86/stat.h114
-rw-r--r--include/asm-x86/statfs.h12
-rw-r--r--include/asm-x86/string.h5
-rw-r--r--include/asm-x86/string_32.h326
-rw-r--r--include/asm-x86/string_64.h60
-rw-r--r--include/asm-x86/summit/apic.h185
-rw-r--r--include/asm-x86/summit/apicdef.h13
-rw-r--r--include/asm-x86/summit/ipi.h25
-rw-r--r--include/asm-x86/summit/irq_vectors_limits.h14
-rw-r--r--include/asm-x86/summit/mpparse.h109
-rw-r--r--include/asm-x86/suspend.h5
-rw-r--r--include/asm-x86/suspend_32.h51
-rw-r--r--include/asm-x86/suspend_64.h52
-rw-r--r--include/asm-x86/swiotlb.h58
-rw-r--r--include/asm-x86/sync_bitops.h130
-rw-r--r--include/asm-x86/syscall.h211
-rw-r--r--include/asm-x86/syscalls.h93
-rw-r--r--include/asm-x86/system.h429
-rw-r--r--include/asm-x86/system_64.h22
-rw-r--r--include/asm-x86/tce.h48
-rw-r--r--include/asm-x86/termbits.h198
-rw-r--r--include/asm-x86/termios.h113
-rw-r--r--include/asm-x86/therm_throt.h9
-rw-r--r--include/asm-x86/thread_info.h264
-rw-r--r--include/asm-x86/time.h63
-rw-r--r--include/asm-x86/timer.h66
-rw-r--r--include/asm-x86/timex.h19
-rw-r--r--include/asm-x86/tlb.h11
-rw-r--r--include/asm-x86/tlbflush.h178
-rw-r--r--include/asm-x86/topology.h258
-rw-r--r--include/asm-x86/trampoline.h21
-rw-r--r--include/asm-x86/traps.h81
-rw-r--r--include/asm-x86/tsc.h62
-rw-r--r--include/asm-x86/types.h36
-rw-r--r--include/asm-x86/uaccess.h454
-rw-r--r--include/asm-x86/uaccess_32.h218
-rw-r--r--include/asm-x86/uaccess_64.h202
-rw-r--r--include/asm-x86/ucontext.h18
-rw-r--r--include/asm-x86/unaligned.h14
-rw-r--r--include/asm-x86/unistd.h13
-rw-r--r--include/asm-x86/unistd_32.h379
-rw-r--r--include/asm-x86/unistd_64.h693
-rw-r--r--include/asm-x86/unwind.h13
-rw-r--r--include/asm-x86/user.h5
-rw-r--r--include/asm-x86/user32.h70
-rw-r--r--include/asm-x86/user_32.h131
-rw-r--r--include/asm-x86/user_64.h137
-rw-r--r--include/asm-x86/uv/bios.h68
-rw-r--r--include/asm-x86/uv/uv_bau.h332
-rw-r--r--include/asm-x86/uv/uv_hub.h354
-rw-r--r--include/asm-x86/uv/uv_mmrs.h1295
-rw-r--r--include/asm-x86/vdso.h47
-rw-r--r--include/asm-x86/vga.h20
-rw-r--r--include/asm-x86/vgtod.h29
-rw-r--r--include/asm-x86/vic.h61
-rw-r--r--include/asm-x86/visws/cobalt.h125
-rw-r--r--include/asm-x86/visws/lithium.h53
-rw-r--r--include/asm-x86/visws/piix4.h107
-rw-r--r--include/asm-x86/visws/sgivw.h5
-rw-r--r--include/asm-x86/vm86.h208
-rw-r--r--include/asm-x86/vmi.h263
-rw-r--r--include/asm-x86/vmi_time.h98
-rw-r--r--include/asm-x86/voyager.h528
-rw-r--r--include/asm-x86/vsyscall.h44
-rw-r--r--include/asm-x86/xcr.h49
-rw-r--r--include/asm-x86/xen/events.h24
-rw-r--r--include/asm-x86/xen/grant_table.h7
-rw-r--r--include/asm-x86/xen/hypercall.h527
-rw-r--r--include/asm-x86/xen/hypervisor.h82
-rw-r--r--include/asm-x86/xen/interface.h175
-rw-r--r--include/asm-x86/xen/interface_32.h97
-rw-r--r--include/asm-x86/xen/interface_64.h159
-rw-r--r--include/asm-x86/xen/page.h165
-rw-r--r--include/asm-x86/xor.h5
-rw-r--r--include/asm-x86/xor_32.h888
-rw-r--r--include/asm-x86/xor_64.h361
-rw-r--r--include/asm-x86/xsave.h118
-rw-r--r--include/asm-xtensa/elf.h2
-rw-r--r--include/asm-xtensa/io.h8
-rw-r--r--include/asm-xtensa/rwsem.h4
-rw-r--r--include/asm-xtensa/thread_info.h2
-rw-r--r--include/asm-xtensa/variant-dc232b/core.h424
-rw-r--r--include/asm-xtensa/variant-dc232b/tie-asm.h122
-rw-r--r--include/asm-xtensa/variant-dc232b/tie.h131
-rw-r--r--include/crypto/aes.h8
-rw-r--r--include/crypto/algapi.h16
-rw-r--r--include/crypto/hash.h125
-rw-r--r--include/crypto/internal/hash.h16
-rw-r--r--include/drm/Kbuild2
-rw-r--r--include/drm/drm.h87
-rw-r--r--include/drm/drmP.h359
-rw-r--r--include/drm/drm_crtc.h733
-rw-r--r--include/drm/drm_crtc_helper.h124
-rw-r--r--include/drm/drm_edid.h202
-rw-r--r--include/drm/drm_mode.h271
-rw-r--r--include/drm/drm_pciids.h100
-rw-r--r--include/drm/drm_sarea.h6
-rw-r--r--include/drm/i915_drm.h387
-rw-r--r--include/keys/keyring-type.h31
-rw-r--r--include/linux/Kbuild4
-rw-r--r--include/linux/acpi.h56
-rw-r--r--include/linux/aer.h5
-rw-r--r--include/linux/aio.h14
-rw-r--r--include/linux/atm.h17
-rw-r--r--include/linux/atmdev.h15
-rw-r--r--include/linux/audit.h32
-rw-r--r--include/linux/auto_dev-ioctl.h157
-rw-r--r--include/linux/auto_fs4.h7
-rw-r--r--include/linux/backing-dev.h13
-rw-r--r--include/linux/bcd.h16
-rw-r--r--include/linux/binfmts.h21
-rw-r--r--include/linux/bio.h65
-rw-r--r--include/linux/bitmap.h2
-rw-r--r--include/linux/blkdev.h105
-rw-r--r--include/linux/blktrace_api.h146
-rw-r--r--include/linux/bottom_half.h1
-rw-r--r--include/linux/buffer_head.h3
-rw-r--r--include/linux/byteorder/Kbuild1
-rw-r--r--include/linux/byteorder/big_endian.h1
-rw-r--r--include/linux/byteorder/little_endian.h1
-rw-r--r--include/linux/c2port.h65
-rw-r--r--include/linux/can/core.h2
-rw-r--r--include/linux/capability.h25
-rw-r--r--include/linux/cdrom.h10
-rw-r--r--include/linux/cgroup.h35
-rw-r--r--include/linux/cgroup_subsys.h12
-rw-r--r--include/linux/clk.h4
-rw-r--r--include/linux/clocksource.h14
-rw-r--r--include/linux/cnt32_to_63.h22
-rw-r--r--include/linux/compat.h8
-rw-r--r--include/linux/compiler.h86
-rw-r--r--include/linux/console.h4
-rw-r--r--include/linux/cpumask.h559
-rw-r--r--include/linux/cpuset.h4
-rw-r--r--include/linux/crash_dump.h40
-rw-r--r--include/linux/crc32c.h6
-rw-r--r--include/linux/cred.h342
-rw-r--r--include/linux/crypto.h10
-rw-r--r--include/linux/dcache.h3
-rw-r--r--include/linux/dcbnl.h340
-rw-r--r--include/linux/dccp.h42
-rw-r--r--include/linux/debug_locks.h2
-rw-r--r--include/linux/device-mapper.h14
-rw-r--r--include/linux/device.h20
-rw-r--r--include/linux/dm-region-hash.h104
-rw-r--r--include/linux/dma_remapping.h156
-rw-r--r--include/linux/dmar.h1
-rw-r--r--include/linux/dmi.h5
-rw-r--r--include/linux/ds1286.h2
-rw-r--r--include/linux/dvb/frontend.h2
-rw-r--r--include/linux/dynamic_printk.h93
-rw-r--r--include/linux/efi.h4
-rw-r--r--include/linux/elevator.h8
-rw-r--r--include/linux/etherdevice.h46
-rw-r--r--include/linux/ethtool.h2
-rw-r--r--include/linux/ext2_fs.h2
-rw-r--r--include/linux/ext3_fs.h6
-rw-r--r--include/linux/ext3_jbd.h14
-rw-r--r--include/linux/fault-inject.h9
-rw-r--r--include/linux/fb.h3
-rw-r--r--include/linux/fddidevice.h1
-rw-r--r--include/linux/file.h4
-rw-r--r--include/linux/filter.h3
-rw-r--r--include/linux/firewire-cdev.h9
-rw-r--r--include/linux/freezer.h40
-rw-r--r--include/linux/fs.h96
-rw-r--r--include/linux/fsl_devices.h17
-rw-r--r--include/linux/fsnotify.h2
-rw-r--r--include/linux/ftrace.h374
-rw-r--r--include/linux/ftrace_irq.h13
-rw-r--r--include/linux/fuse.h12
-rw-r--r--include/linux/futex.h5
-rw-r--r--include/linux/gameport.h7
-rw-r--r--include/linux/genhd.h8
-rw-r--r--include/linux/gpio.h3
-rw-r--r--include/linux/hardirq.h28
-rw-r--r--include/linux/hdlc.h4
-rw-r--r--include/linux/hid.h7
-rw-r--r--include/linux/highmem.h2
-rw-r--r--include/linux/hippidevice.h4
-rw-r--r--include/linux/hrtimer.h152
-rw-r--r--include/linux/hugetlb.h6
-rw-r--r--include/linux/i2c-algo-pcf.h5
-rw-r--r--include/linux/i2c-id.h2
-rw-r--r--include/linux/i2c.h163
-rw-r--r--include/linux/i2c/twl4030.h343
-rw-r--r--include/linux/i2o.h292
-rw-r--r--include/linux/i7300_idle.h83
-rw-r--r--include/linux/icmpv6.h6
-rw-r--r--include/linux/ide.h84
-rw-r--r--include/linux/idr.h3
-rw-r--r--include/linux/ieee80211.h212
-rw-r--r--include/linux/if.h1
-rw-r--r--include/linux/if_arp.h3
-rw-r--r--include/linux/if_vlan.h7
-rw-r--r--include/linux/in.h4
-rw-r--r--include/linux/init.h12
-rw-r--r--include/linux/init_task.h15
-rw-r--r--include/linux/inotify.h11
-rw-r--r--include/linux/input.h19
-rw-r--r--include/linux/intel-iommu.h363
-rw-r--r--include/linux/interrupt.h29
-rw-r--r--include/linux/io-mapping.h125
-rw-r--r--include/linux/iommu-helper.h3
-rw-r--r--include/linux/ioport.h8
-rw-r--r--include/linux/iova.h52
-rw-r--r--include/linux/ipv6.h1
-rw-r--r--include/linux/irq.h127
-rw-r--r--include/linux/irqnr.h38
-rw-r--r--include/linux/jbd.h9
-rw-r--r--include/linux/jbd2.h13
-rw-r--r--include/linux/jiffies.h10
-rw-r--r--include/linux/journal-head.h2
-rw-r--r--include/linux/kallsyms.h8
-rw-r--r--include/linux/kernel.h134
-rw-r--r--include/linux/kernel_stat.h35
-rw-r--r--include/linux/kexec.h4
-rw-r--r--include/linux/key-ui.h66
-rw-r--r--include/linux/key.h32
-rw-r--r--include/linux/keyctl.h4
-rw-r--r--include/linux/kmod.h3
-rw-r--r--include/linux/kprobes.h5
-rw-r--r--include/linux/kvm.h78
-rw-r--r--include/linux/kvm_host.h87
-rw-r--r--include/linux/leds.h4
-rw-r--r--include/linux/lguest_launcher.h6
-rw-r--r--include/linux/libata.h78
-rw-r--r--include/linux/linkage.h10
-rw-r--r--include/linux/list_nulls.h94
-rw-r--r--include/linux/lockd/bind.h1
-rw-r--r--include/linux/lockd/lockd.h4
-rw-r--r--include/linux/lockdep.h50
-rw-r--r--include/linux/map_to_7segment.h187
-rw-r--r--include/linux/marker.h78
-rw-r--r--include/linux/mdio-gpio.h25
-rw-r--r--include/linux/memcontrol.h34
-rw-r--r--include/linux/memory.h2
-rw-r--r--include/linux/mfd/da903x.h201
-rw-r--r--include/linux/mfd/t7l66xb.h2
-rw-r--r--include/linux/mfd/tc6387xb.h3
-rw-r--r--include/linux/mfd/tc6393xb.h17
-rw-r--r--include/linux/mfd/tmio.h19
-rw-r--r--include/linux/mfd/wm8350/audio.h38
-rw-r--r--include/linux/mfd/wm8350/rtc.h2
-rw-r--r--include/linux/migrate.h3
-rw-r--r--include/linux/mii.h33
-rw-r--r--include/linux/mlx4/cmd.h9
-rw-r--r--include/linux/mlx4/device.h59
-rw-r--r--include/linux/mm.h30
-rw-r--r--include/linux/mm_inline.h98
-rw-r--r--include/linux/mm_types.h8
-rw-r--r--include/linux/mmc/card.h2
-rw-r--r--include/linux/mmc/host.h2
-rw-r--r--include/linux/mmc/sdio_func.h2
-rw-r--r--include/linux/mmiotrace.h20
-rw-r--r--include/linux/mmzone.h105
-rw-r--r--include/linux/mod_devicetable.h3
-rw-r--r--include/linux/module.h24
-rw-r--r--include/linux/moduleparam.h25
-rw-r--r--include/linux/mount.h2
-rw-r--r--include/linux/mroute6.h26
-rw-r--r--include/linux/msdos_fs.h281
-rw-r--r--include/linux/msi.h3
-rw-r--r--include/linux/mtd/cfi.h31
-rw-r--r--include/linux/mtd/flashchip.h4
-rw-r--r--include/linux/mtd/mtd.h4
-rw-r--r--include/linux/mtd/nand-gpio.h19
-rw-r--r--include/linux/mtd/nand.h1
-rw-r--r--include/linux/mtd/onenand_regs.h2
-rw-r--r--include/linux/mtd/partitions.h1
-rw-r--r--include/linux/mtd/sh_flctl.h125
-rw-r--r--include/linux/mutex.h2
-rw-r--r--include/linux/namei.h8
-rw-r--r--include/linux/net.h6
-rw-r--r--include/linux/netdevice.h406
-rw-r--r--include/linux/netfilter/nfnetlink.h3
-rw-r--r--include/linux/netfilter/nfnetlink_conntrack.h1
-rw-r--r--include/linux/netfilter/x_tables.h2
-rw-r--r--include/linux/netfilter_bridge/ebtables.h3
-rw-r--r--include/linux/netfilter_ipv4/ipt_policy.h2
-rw-r--r--include/linux/netfilter_ipv6/ip6t_policy.h2
-rw-r--r--include/linux/netlink.h3
-rw-r--r--include/linux/netpoll.h5
-rw-r--r--include/linux/nfs_fs.h44
-rw-r--r--include/linux/nfs_fs_sb.h7
-rw-r--r--include/linux/nfs_mount.h7
-rw-r--r--include/linux/nfs_xdr.h18
-rw-r--r--include/linux/nfsd/state.h2
-rw-r--r--include/linux/nl80211.h223
-rw-r--r--include/linux/nsproxy.h1
-rw-r--r--include/linux/of.h9
-rw-r--r--include/linux/of_gpio.h44
-rw-r--r--include/linux/of_platform.h3
-rw-r--r--include/linux/oprofile.h19
-rw-r--r--include/linux/page-flags.h55
-rw-r--r--include/linux/page_cgroup.h108
-rw-r--r--include/linux/pagemap.h44
-rw-r--r--include/linux/pagevec.h34
-rw-r--r--include/linux/parport.h2
-rw-r--r--include/linux/pci.h52
-rw-r--r--include/linux/pci_hotplug.h11
-rw-r--r--include/linux/pci_ids.h21
-rw-r--r--include/linux/pci_regs.h16
-rw-r--r--include/linux/pfn.h6
-rw-r--r--include/linux/phonet.h1
-rw-r--r--include/linux/phy.h2
-rw-r--r--include/linux/pid.h4
-rw-r--r--include/linux/pid_namespace.h6
-rw-r--r--include/linux/pkt_cls.h14
-rw-r--r--include/linux/pkt_sched.h16
-rw-r--r--include/linux/platform_device.h2
-rw-r--r--include/linux/pm.h2
-rw-r--r--include/linux/pnp.h16
-rw-r--r--include/linux/poll.h8
-rw-r--r--include/linux/posix-timers.h10
-rw-r--r--include/linux/power_supply.h6
-rw-r--r--include/linux/prctl.h7
-rw-r--r--include/linux/proc_fs.h6
-rw-r--r--include/linux/profile.h13
-rw-r--r--include/linux/ptrace.h23
-rw-r--r--include/linux/quota.h2
-rw-r--r--include/linux/quotaops.h3
-rw-r--r--include/linux/raid/linear.h10
-rw-r--r--include/linux/raid/md.h32
-rw-r--r--include/linux/raid/md_k.h8
-rw-r--r--include/linux/random.h51
-rw-r--r--include/linux/ratelimit.h7
-rw-r--r--include/linux/rcuclassic.h2
-rw-r--r--include/linux/rculist_nulls.h110
-rw-r--r--include/linux/rcupdate.h12
-rw-r--r--include/linux/rcutree.h329
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/linux/reiserfs_fs_sb.h1
-rw-r--r--include/linux/resource.h4
-rw-r--r--include/linux/rfkill.h8
-rw-r--r--include/linux/ring_buffer.h140
-rw-r--r--include/linux/rio_drv.h4
-rw-r--r--include/linux/rmap.h29
-rw-r--r--include/linux/rtmutex.h2
-rw-r--r--include/linux/rtnetlink.h5
-rw-r--r--include/linux/sched.h230
-rw-r--r--include/linux/securebits.h2
-rw-r--r--include/linux/security.h348
-rw-r--r--include/linux/seq_file.h14
-rw-r--r--include/linux/serial_core.h5
-rw-r--r--include/linux/sh_intc.h91
-rw-r--r--include/linux/skbuff.h54
-rw-r--r--include/linux/slab.h43
-rw-r--r--include/linux/smc911x.h1
-rw-r--r--include/linux/smp.h15
-rw-r--r--include/linux/smsc911x.h47
-rw-r--r--include/linux/snmp.h3
-rw-r--r--include/linux/spi/orion_spi.h1
-rw-r--r--include/linux/spi/spi_bitbang.h3
-rw-r--r--include/linux/ssb/ssb.h42
-rw-r--r--include/linux/stacktrace.h8
-rw-r--r--include/linux/string.h2
-rw-r--r--include/linux/sunrpc/clnt.h2
-rw-r--r--include/linux/sunrpc/rpc_pipe_fs.h1
-rw-r--r--include/linux/sunrpc/svc_xprt.h8
-rw-r--r--include/linux/sunrpc/svcauth_gss.h1
-rw-r--r--include/linux/sunrpc/xdr.h15
-rw-r--r--include/linux/sunrpc/xprt.h3
-rw-r--r--include/linux/sunrpc/xprtrdma.h4
-rw-r--r--include/linux/swab.h10
-rw-r--r--include/linux/swap.h69
-rw-r--r--include/linux/swiotlb.h105
-rw-r--r--include/linux/syscalls.h3
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/sysfs.h41
-rw-r--r--include/linux/task_io_accounting.h2
-rw-r--r--include/linux/telephony.h6
-rw-r--r--include/linux/thread_info.h8
-rw-r--r--include/linux/tick.h7
-rw-r--r--include/linux/time.h11
-rw-r--r--include/linux/timer.h5
-rw-r--r--include/linux/timex.h82
-rw-r--r--include/linux/topology.h10
-rw-r--r--include/linux/tracepoint.h156
-rw-r--r--include/linux/tty.h6
-rw-r--r--include/linux/types.h20
-rw-r--r--include/linux/uaccess.h2
-rw-r--r--include/linux/usb.h9
-rw-r--r--include/linux/usb/Kbuild3
-rw-r--r--include/linux/usb/cdc.h9
-rw-r--r--include/linux/usb/ch9.h8
-rw-r--r--include/linux/usb/composite.h11
-rw-r--r--include/linux/usb/serial.h2
-rw-r--r--include/linux/usb/tmc.h43
-rw-r--r--include/linux/usb/vstusb.h71
-rw-r--r--include/linux/usb/wusb-wa.h271
-rw-r--r--include/linux/usb/wusb.h376
-rw-r--r--include/linux/user_namespace.h13
-rw-r--r--include/linux/uwb.h765
-rw-r--r--include/linux/uwb/debug-cmd.h57
-rw-r--r--include/linux/uwb/debug.h82
-rw-r--r--include/linux/uwb/spec.h727
-rw-r--r--include/linux/uwb/umc.h194
-rw-r--r--include/linux/uwb/whci.h117
-rw-r--r--include/linux/videodev2.h21
-rw-r--r--include/linux/virtio_balloon.h3
-rw-r--r--include/linux/virtio_console.h11
-rw-r--r--include/linux/virtio_net.h9
-rw-r--r--include/linux/virtio_pci.h8
-rw-r--r--include/linux/virtio_ring.h13
-rw-r--r--include/linux/vmalloc.h17
-rw-r--r--include/linux/vmstat.h24
-rw-r--r--include/linux/wait.h9
-rw-r--r--include/linux/wlp.h735
-rw-r--r--include/linux/workqueue.h26
-rw-r--r--include/linux/writeback.h10
-rw-r--r--include/linux/xfrm.h14
-rw-r--r--include/math-emu/op-2.h2
-rw-r--r--include/math-emu/op-common.h31
-rw-r--r--include/math-emu/soft-fp.h19
-rw-r--r--include/media/i2c-addr.h2
-rw-r--r--include/media/ir-common.h2
-rw-r--r--include/media/ov772x.h21
-rw-r--r--include/media/saa7146.h2
-rw-r--r--include/media/saa7146_vv.h3
-rw-r--r--include/media/soc_camera.h111
-rw-r--r--include/media/soc_camera_platform.h11
-rw-r--r--include/media/tuner.h1
-rw-r--r--include/media/tvp514x.h118
-rw-r--r--include/media/tw9910.h39
-rw-r--r--include/media/v4l2-chip-ident.h10
-rw-r--r--include/media/v4l2-common.h41
-rw-r--r--include/media/v4l2-dev.h51
-rw-r--r--include/media/v4l2-device.h109
-rw-r--r--include/media/v4l2-i2c-drv-legacy.h11
-rw-r--r--include/media/v4l2-i2c-drv.h11
-rw-r--r--include/media/v4l2-int-device.h34
-rw-r--r--include/media/v4l2-ioctl.h36
-rw-r--r--include/media/v4l2-subdev.h189
-rw-r--r--include/media/videobuf-dvb.h30
-rw-r--r--include/net/9p/9p.h121
-rw-r--r--include/net/9p/client.h126
-rw-r--r--include/net/9p/transport.h55
-rw-r--r--include/net/af_unix.h2
-rw-r--r--include/net/bluetooth/bluetooth.h4
-rw-r--r--include/net/bluetooth/hci.h2
-rw-r--r--include/net/cfg80211.h142
-rw-r--r--include/net/checksum.h2
-rw-r--r--include/net/dcbnl.h53
-rw-r--r--include/net/dn.h8
-rw-r--r--include/net/dn_fib.h6
-rw-r--r--include/net/dst.h39
-rw-r--r--include/net/flow.h9
-rw-r--r--include/net/gen_stats.h3
-rw-r--r--include/net/ieee80211.h150
-rw-r--r--include/net/ieee80211_radiotap.h15
-rw-r--r--include/net/inet_hashtables.h85
-rw-r--r--include/net/inet_timewait_sock.h10
-rw-r--r--include/net/ip.h5
-rw-r--r--include/net/ip_vs.h21
-rw-r--r--include/net/irda/irda.h2
-rw-r--r--include/net/irda/irda_device.h4
-rw-r--r--include/net/iucv/iucv.h45
-rw-r--r--include/net/lib80211.h (renamed from include/net/ieee80211_crypt.h)75
-rw-r--r--include/net/mac80211.h480
-rw-r--r--include/net/ndisc.h19
-rw-r--r--include/net/neighbour.h15
-rw-r--r--include/net/net_namespace.h24
-rw-r--r--include/net/netfilter/nf_conntrack.h5
-rw-r--r--include/net/netfilter/nf_conntrack_ecache.h57
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h2
-rw-r--r--include/net/netfilter/nf_conntrack_helper.h5
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h2
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h12
-rw-r--r--include/net/netfilter/nf_nat_core.h8
-rw-r--r--include/net/netfilter/nfnetlink_log.h14
-rw-r--r--include/net/netlink.h24
-rw-r--r--include/net/netns/ipv4.h2
-rw-r--r--include/net/netns/ipv6.h12
-rw-r--r--include/net/netns/mib.h3
-rw-r--r--include/net/netns/x_tables.h9
-rw-r--r--include/net/netns/xfrm.h56
-rw-r--r--include/net/phonet/pep.h2
-rw-r--r--include/net/phonet/phonet.h4
-rw-r--r--include/net/phonet/pn_dev.h2
-rw-r--r--include/net/pkt_cls.h2
-rw-r--r--include/net/protocol.h3
-rw-r--r--include/net/request_sock.h1
-rw-r--r--include/net/sch_generic.h38
-rw-r--r--include/net/scm.h9
-rw-r--r--include/net/sctp/sctp.h11
-rw-r--r--include/net/sctp/sm.h1
-rw-r--r--include/net/sctp/user.h2
-rw-r--r--include/net/sock.h89
-rw-r--r--include/net/syncppp.h102
-rw-r--r--include/net/tcp.h20
-rw-r--r--include/net/timewait_sock.h1
-rw-r--r--include/net/udp.h25
-rw-r--r--include/net/udplite.h2
-rw-r--r--include/net/wireless.h90
-rw-r--r--include/net/xfrm.h110
-rw-r--r--include/scsi/fc/fc_els.h816
-rw-r--r--include/scsi/fc/fc_encaps.h138
-rw-r--r--include/scsi/fc/fc_fc2.h124
-rw-r--r--include/scsi/fc/fc_fcoe.h114
-rw-r--r--include/scsi/fc/fc_fcp.h199
-rw-r--r--include/scsi/fc/fc_fs.h340
-rw-r--r--include/scsi/fc/fc_gs.h93
-rw-r--r--include/scsi/fc/fc_ns.h159
-rw-r--r--include/scsi/fc_encode.h309
-rw-r--r--include/scsi/fc_frame.h242
-rw-r--r--include/scsi/fc_transport_fcoe.h54
-rw-r--r--include/scsi/iscsi_if.h9
-rw-r--r--include/scsi/libfc.h938
-rw-r--r--include/scsi/libfcoe.h176
-rw-r--r--include/scsi/libiscsi.h54
-rw-r--r--include/scsi/libiscsi_tcp.h132
-rw-r--r--include/scsi/scsi.h6
-rw-r--r--include/scsi/scsi_device.h17
-rw-r--r--include/scsi/scsi_ioctl.h2
-rw-r--r--include/scsi/scsi_tcq.h14
-rw-r--r--include/scsi/scsi_transport_fc.h8
-rw-r--r--include/scsi/scsi_transport_iscsi.h17
-rw-r--r--include/sound/ac97_codec.h2
-rw-r--r--include/sound/asound.h1
-rw-r--r--include/sound/core.h34
-rw-r--r--include/sound/info.h106
-rw-r--r--include/sound/jack.h2
-rw-r--r--include/sound/l3.h18
-rw-r--r--include/sound/s3c24xx_uda134x.h14
-rw-r--r--include/sound/soc-dai.h231
-rw-r--r--include/sound/soc-dapm.h2
-rw-r--r--include/sound/soc.h209
-rw-r--r--include/sound/uda134x.h26
-rw-r--r--include/sound/version.h2
-rw-r--r--include/trace/block.h76
-rw-r--r--include/trace/boot.h60
-rw-r--r--include/trace/sched.h56
-rw-r--r--include/video/atmel_lcdc.h2
-rw-r--r--include/video/cyblafb.h2
-rw-r--r--include/video/neomagic.h1
-rw-r--r--include/video/radeon.h5
-rw-r--r--include/video/s1d13xxxfb.h3
-rw-r--r--include/video/sh_mobile_lcdc.h79
-rw-r--r--include/xen/interface/event_channel.h2
1449 files changed, 23498 insertions, 124470 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 4eb75a88795a..29feee27f0ea 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20080609 66#define ACPI_CA_VERSION 0x20080926
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h
index c5a1b50d8d94..62c59df3b86c 100644
--- a/include/acpi/acdebug.h
+++ b/include/acpi/acdebug.h
@@ -123,6 +123,10 @@ void acpi_db_check_integrity(void);
123 123
124void acpi_db_generate_gpe(char *gpe_arg, char *block_arg); 124void acpi_db_generate_gpe(char *gpe_arg, char *block_arg);
125 125
126void acpi_db_check_predefined_names(void);
127
128void acpi_db_batch_execute(void);
129
126/* 130/*
127 * dbdisply - debug display commands 131 * dbdisply - debug display commands
128 */ 132 */
@@ -150,6 +154,10 @@ void
150acpi_db_display_argument_object(union acpi_operand_object *obj_desc, 154acpi_db_display_argument_object(union acpi_operand_object *obj_desc,
151 struct acpi_walk_state *walk_state); 155 struct acpi_walk_state *walk_state);
152 156
157void acpi_db_check_predefined_names(void);
158
159void acpi_db_batch_execute(void);
160
153/* 161/*
154 * dbexec - debugger control method execution 162 * dbexec - debugger control method execution
155 */ 163 */
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h
index f53faca8ec80..0c1ed387073c 100644
--- a/include/acpi/acdisasm.h
+++ b/include/acpi/acdisasm.h
@@ -186,6 +186,8 @@ extern struct acpi_dmtable_info acpi_dm_table_info_madt5[];
186extern struct acpi_dmtable_info acpi_dm_table_info_madt6[]; 186extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
187extern struct acpi_dmtable_info acpi_dm_table_info_madt7[]; 187extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
188extern struct acpi_dmtable_info acpi_dm_table_info_madt8[]; 188extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
189extern struct acpi_dmtable_info acpi_dm_table_info_madt9[];
190extern struct acpi_dmtable_info acpi_dm_table_info_madt10[];
189extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[]; 191extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
190extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[]; 192extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
191extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[]; 193extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
@@ -197,8 +199,10 @@ extern struct acpi_dmtable_info acpi_dm_table_info_slit[];
197extern struct acpi_dmtable_info acpi_dm_table_info_spcr[]; 199extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
198extern struct acpi_dmtable_info acpi_dm_table_info_spmi[]; 200extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
199extern struct acpi_dmtable_info acpi_dm_table_info_srat[]; 201extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
202extern struct acpi_dmtable_info acpi_dm_table_info_srat_hdr[];
200extern struct acpi_dmtable_info acpi_dm_table_info_srat0[]; 203extern struct acpi_dmtable_info acpi_dm_table_info_srat0[];
201extern struct acpi_dmtable_info acpi_dm_table_info_srat1[]; 204extern struct acpi_dmtable_info acpi_dm_table_info_srat1[];
205extern struct acpi_dmtable_info acpi_dm_table_info_srat2[];
202extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[]; 206extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
203extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[]; 207extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
204 208
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 21a73a105d0a..6291904be01e 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -157,7 +157,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
157 * dsmthdat - method data (locals/args) 157 * dsmthdat - method data (locals/args)
158 */ 158 */
159acpi_status 159acpi_status
160acpi_ds_store_object_to_local(u16 opcode, 160acpi_ds_store_object_to_local(u8 type,
161 u32 index, 161 u32 index,
162 union acpi_operand_object *src_desc, 162 union acpi_operand_object *src_desc,
163 struct acpi_walk_state *walk_state); 163 struct acpi_walk_state *walk_state);
@@ -173,7 +173,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state);
173u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc); 173u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc);
174 174
175acpi_status 175acpi_status
176acpi_ds_method_data_get_value(u16 opcode, 176acpi_ds_method_data_get_value(u8 type,
177 u32 index, 177 u32 index,
178 struct acpi_walk_state *walk_state, 178 struct acpi_walk_state *walk_state,
179 union acpi_operand_object **dest_desc); 179 union acpi_operand_object **dest_desc);
@@ -184,7 +184,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
184 struct acpi_walk_state *walk_state); 184 struct acpi_walk_state *walk_state);
185 185
186acpi_status 186acpi_status
187acpi_ds_method_data_get_node(u16 opcode, 187acpi_ds_method_data_get_node(u8 type,
188 u32 index, 188 u32 index,
189 struct acpi_walk_state *walk_state, 189 struct acpi_walk_state *walk_state,
190 struct acpi_namespace_node **node); 190 struct acpi_namespace_node **node);
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index e5a890ffeb02..84f5cb242863 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -76,25 +76,21 @@
76#define AE_STACK_OVERFLOW (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL) 76#define AE_STACK_OVERFLOW (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL)
77#define AE_STACK_UNDERFLOW (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL) 77#define AE_STACK_UNDERFLOW (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL)
78#define AE_NOT_IMPLEMENTED (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL) 78#define AE_NOT_IMPLEMENTED (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL)
79#define AE_VERSION_MISMATCH (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL) 79#define AE_SUPPORT (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL)
80#define AE_SUPPORT (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL) 80#define AE_LIMIT (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL)
81#define AE_SHARE (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL) 81#define AE_TIME (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL)
82#define AE_LIMIT (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL) 82#define AE_ACQUIRE_DEADLOCK (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL)
83#define AE_TIME (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL) 83#define AE_RELEASE_DEADLOCK (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL)
84#define AE_UNKNOWN_STATUS (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL) 84#define AE_NOT_ACQUIRED (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL)
85#define AE_ACQUIRE_DEADLOCK (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL) 85#define AE_ALREADY_ACQUIRED (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL)
86#define AE_RELEASE_DEADLOCK (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL) 86#define AE_NO_HARDWARE_RESPONSE (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL)
87#define AE_NOT_ACQUIRED (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL) 87#define AE_NO_GLOBAL_LOCK (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL)
88#define AE_ALREADY_ACQUIRED (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL) 88#define AE_ABORT_METHOD (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL)
89#define AE_NO_HARDWARE_RESPONSE (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) 89#define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL)
90#define AE_NO_GLOBAL_LOCK (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) 90#define AE_WAKE_ONLY_GPE (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL)
91#define AE_LOGICAL_ADDRESS (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) 91#define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL)
92#define AE_ABORT_METHOD (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL)
93#define AE_SAME_HANDLER (acpi_status) (0x001D | AE_CODE_ENVIRONMENTAL)
94#define AE_WAKE_ONLY_GPE (acpi_status) (0x001E | AE_CODE_ENVIRONMENTAL)
95#define AE_OWNER_ID_LIMIT (acpi_status) (0x001F | AE_CODE_ENVIRONMENTAL)
96 92
97#define AE_CODE_ENV_MAX 0x001F 93#define AE_CODE_ENV_MAX 0x001B
98 94
99/* 95/*
100 * Programmer exceptions 96 * Programmer exceptions
@@ -103,14 +99,12 @@
103#define AE_BAD_CHARACTER (acpi_status) (0x0002 | AE_CODE_PROGRAMMER) 99#define AE_BAD_CHARACTER (acpi_status) (0x0002 | AE_CODE_PROGRAMMER)
104#define AE_BAD_PATHNAME (acpi_status) (0x0003 | AE_CODE_PROGRAMMER) 100#define AE_BAD_PATHNAME (acpi_status) (0x0003 | AE_CODE_PROGRAMMER)
105#define AE_BAD_DATA (acpi_status) (0x0004 | AE_CODE_PROGRAMMER) 101#define AE_BAD_DATA (acpi_status) (0x0004 | AE_CODE_PROGRAMMER)
106#define AE_BAD_ADDRESS (acpi_status) (0x0005 | AE_CODE_PROGRAMMER) 102#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0005 | AE_CODE_PROGRAMMER)
107#define AE_ALIGNMENT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) 103#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER)
108#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) 104#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)
109#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) 105#define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)
110#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0009 | AE_CODE_PROGRAMMER)
111#define AE_MISSING_ARGUMENTS (acpi_status) (0x000A | AE_CODE_PROGRAMMER)
112 106
113#define AE_CODE_PGM_MAX 0x000A 107#define AE_CODE_PGM_MAX 0x0008
114 108
115/* 109/*
116 * Acpi table exceptions 110 * Acpi table exceptions
@@ -119,51 +113,48 @@
119#define AE_BAD_HEADER (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES) 113#define AE_BAD_HEADER (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES)
120#define AE_BAD_CHECKSUM (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES) 114#define AE_BAD_CHECKSUM (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES)
121#define AE_BAD_VALUE (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES) 115#define AE_BAD_VALUE (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES)
122#define AE_TABLE_NOT_SUPPORTED (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES) 116#define AE_INVALID_TABLE_LENGTH (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES)
123#define AE_INVALID_TABLE_LENGTH (acpi_status) (0x0006 | AE_CODE_ACPI_TABLES)
124 117
125#define AE_CODE_TBL_MAX 0x0006 118#define AE_CODE_TBL_MAX 0x0005
126 119
127/* 120/*
128 * AML exceptions. These are caused by problems with 121 * AML exceptions. These are caused by problems with
129 * the actual AML byte stream 122 * the actual AML byte stream
130 */ 123 */
131#define AE_AML_ERROR (acpi_status) (0x0001 | AE_CODE_AML) 124#define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML)
132#define AE_AML_PARSE (acpi_status) (0x0002 | AE_CODE_AML) 125#define AE_AML_NO_OPERAND (acpi_status) (0x0002 | AE_CODE_AML)
133#define AE_AML_BAD_OPCODE (acpi_status) (0x0003 | AE_CODE_AML) 126#define AE_AML_OPERAND_TYPE (acpi_status) (0x0003 | AE_CODE_AML)
134#define AE_AML_NO_OPERAND (acpi_status) (0x0004 | AE_CODE_AML) 127#define AE_AML_OPERAND_VALUE (acpi_status) (0x0004 | AE_CODE_AML)
135#define AE_AML_OPERAND_TYPE (acpi_status) (0x0005 | AE_CODE_AML) 128#define AE_AML_UNINITIALIZED_LOCAL (acpi_status) (0x0005 | AE_CODE_AML)
136#define AE_AML_OPERAND_VALUE (acpi_status) (0x0006 | AE_CODE_AML) 129#define AE_AML_UNINITIALIZED_ARG (acpi_status) (0x0006 | AE_CODE_AML)
137#define AE_AML_UNINITIALIZED_LOCAL (acpi_status) (0x0007 | AE_CODE_AML) 130#define AE_AML_UNINITIALIZED_ELEMENT (acpi_status) (0x0007 | AE_CODE_AML)
138#define AE_AML_UNINITIALIZED_ARG (acpi_status) (0x0008 | AE_CODE_AML) 131#define AE_AML_NUMERIC_OVERFLOW (acpi_status) (0x0008 | AE_CODE_AML)
139#define AE_AML_UNINITIALIZED_ELEMENT (acpi_status) (0x0009 | AE_CODE_AML) 132#define AE_AML_REGION_LIMIT (acpi_status) (0x0009 | AE_CODE_AML)
140#define AE_AML_NUMERIC_OVERFLOW (acpi_status) (0x000A | AE_CODE_AML) 133#define AE_AML_BUFFER_LIMIT (acpi_status) (0x000A | AE_CODE_AML)
141#define AE_AML_REGION_LIMIT (acpi_status) (0x000B | AE_CODE_AML) 134#define AE_AML_PACKAGE_LIMIT (acpi_status) (0x000B | AE_CODE_AML)
142#define AE_AML_BUFFER_LIMIT (acpi_status) (0x000C | AE_CODE_AML) 135#define AE_AML_DIVIDE_BY_ZERO (acpi_status) (0x000C | AE_CODE_AML)
143#define AE_AML_PACKAGE_LIMIT (acpi_status) (0x000D | AE_CODE_AML) 136#define AE_AML_BAD_NAME (acpi_status) (0x000D | AE_CODE_AML)
144#define AE_AML_DIVIDE_BY_ZERO (acpi_status) (0x000E | AE_CODE_AML) 137#define AE_AML_NAME_NOT_FOUND (acpi_status) (0x000E | AE_CODE_AML)
145#define AE_AML_BAD_NAME (acpi_status) (0x000F | AE_CODE_AML) 138#define AE_AML_INTERNAL (acpi_status) (0x000F | AE_CODE_AML)
146#define AE_AML_NAME_NOT_FOUND (acpi_status) (0x0010 | AE_CODE_AML) 139#define AE_AML_INVALID_SPACE_ID (acpi_status) (0x0010 | AE_CODE_AML)
147#define AE_AML_INTERNAL (acpi_status) (0x0011 | AE_CODE_AML) 140#define AE_AML_STRING_LIMIT (acpi_status) (0x0011 | AE_CODE_AML)
148#define AE_AML_INVALID_SPACE_ID (acpi_status) (0x0012 | AE_CODE_AML) 141#define AE_AML_NO_RETURN_VALUE (acpi_status) (0x0012 | AE_CODE_AML)
149#define AE_AML_STRING_LIMIT (acpi_status) (0x0013 | AE_CODE_AML) 142#define AE_AML_METHOD_LIMIT (acpi_status) (0x0013 | AE_CODE_AML)
150#define AE_AML_NO_RETURN_VALUE (acpi_status) (0x0014 | AE_CODE_AML) 143#define AE_AML_NOT_OWNER (acpi_status) (0x0014 | AE_CODE_AML)
151#define AE_AML_METHOD_LIMIT (acpi_status) (0x0015 | AE_CODE_AML) 144#define AE_AML_MUTEX_ORDER (acpi_status) (0x0015 | AE_CODE_AML)
152#define AE_AML_NOT_OWNER (acpi_status) (0x0016 | AE_CODE_AML) 145#define AE_AML_MUTEX_NOT_ACQUIRED (acpi_status) (0x0016 | AE_CODE_AML)
153#define AE_AML_MUTEX_ORDER (acpi_status) (0x0017 | AE_CODE_AML) 146#define AE_AML_INVALID_RESOURCE_TYPE (acpi_status) (0x0017 | AE_CODE_AML)
154#define AE_AML_MUTEX_NOT_ACQUIRED (acpi_status) (0x0018 | AE_CODE_AML) 147#define AE_AML_INVALID_INDEX (acpi_status) (0x0018 | AE_CODE_AML)
155#define AE_AML_INVALID_RESOURCE_TYPE (acpi_status) (0x0019 | AE_CODE_AML) 148#define AE_AML_REGISTER_LIMIT (acpi_status) (0x0019 | AE_CODE_AML)
156#define AE_AML_INVALID_INDEX (acpi_status) (0x001A | AE_CODE_AML) 149#define AE_AML_NO_WHILE (acpi_status) (0x001A | AE_CODE_AML)
157#define AE_AML_REGISTER_LIMIT (acpi_status) (0x001B | AE_CODE_AML) 150#define AE_AML_ALIGNMENT (acpi_status) (0x001B | AE_CODE_AML)
158#define AE_AML_NO_WHILE (acpi_status) (0x001C | AE_CODE_AML) 151#define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001C | AE_CODE_AML)
159#define AE_AML_ALIGNMENT (acpi_status) (0x001D | AE_CODE_AML) 152#define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001D | AE_CODE_AML)
160#define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001E | AE_CODE_AML) 153#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x001E | AE_CODE_AML)
161#define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001F | AE_CODE_AML) 154#define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x001F | AE_CODE_AML)
162#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML) 155#define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0020 | AE_CODE_AML)
163#define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML)
164#define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0022 | AE_CODE_AML)
165 156
166#define AE_CODE_AML_MAX 0x0022 157#define AE_CODE_AML_MAX 0x0020
167 158
168/* 159/*
169 * Internal exceptions used for control 160 * Internal exceptions used for control
@@ -206,19 +197,15 @@ char const *acpi_gbl_exception_names_env[] = {
206 "AE_STACK_OVERFLOW", 197 "AE_STACK_OVERFLOW",
207 "AE_STACK_UNDERFLOW", 198 "AE_STACK_UNDERFLOW",
208 "AE_NOT_IMPLEMENTED", 199 "AE_NOT_IMPLEMENTED",
209 "AE_VERSION_MISMATCH",
210 "AE_SUPPORT", 200 "AE_SUPPORT",
211 "AE_SHARE",
212 "AE_LIMIT", 201 "AE_LIMIT",
213 "AE_TIME", 202 "AE_TIME",
214 "AE_UNKNOWN_STATUS",
215 "AE_ACQUIRE_DEADLOCK", 203 "AE_ACQUIRE_DEADLOCK",
216 "AE_RELEASE_DEADLOCK", 204 "AE_RELEASE_DEADLOCK",
217 "AE_NOT_ACQUIRED", 205 "AE_NOT_ACQUIRED",
218 "AE_ALREADY_ACQUIRED", 206 "AE_ALREADY_ACQUIRED",
219 "AE_NO_HARDWARE_RESPONSE", 207 "AE_NO_HARDWARE_RESPONSE",
220 "AE_NO_GLOBAL_LOCK", 208 "AE_NO_GLOBAL_LOCK",
221 "AE_LOGICAL_ADDRESS",
222 "AE_ABORT_METHOD", 209 "AE_ABORT_METHOD",
223 "AE_SAME_HANDLER", 210 "AE_SAME_HANDLER",
224 "AE_WAKE_ONLY_GPE", 211 "AE_WAKE_ONLY_GPE",
@@ -231,8 +218,6 @@ char const *acpi_gbl_exception_names_pgm[] = {
231 "AE_BAD_CHARACTER", 218 "AE_BAD_CHARACTER",
232 "AE_BAD_PATHNAME", 219 "AE_BAD_PATHNAME",
233 "AE_BAD_DATA", 220 "AE_BAD_DATA",
234 "AE_BAD_ADDRESS",
235 "AE_ALIGNMENT",
236 "AE_BAD_HEX_CONSTANT", 221 "AE_BAD_HEX_CONSTANT",
237 "AE_BAD_OCTAL_CONSTANT", 222 "AE_BAD_OCTAL_CONSTANT",
238 "AE_BAD_DECIMAL_CONSTANT", 223 "AE_BAD_DECIMAL_CONSTANT",
@@ -245,14 +230,11 @@ char const *acpi_gbl_exception_names_tbl[] = {
245 "AE_BAD_HEADER", 230 "AE_BAD_HEADER",
246 "AE_BAD_CHECKSUM", 231 "AE_BAD_CHECKSUM",
247 "AE_BAD_VALUE", 232 "AE_BAD_VALUE",
248 "AE_TABLE_NOT_SUPPORTED",
249 "AE_INVALID_TABLE_LENGTH" 233 "AE_INVALID_TABLE_LENGTH"
250}; 234};
251 235
252char const *acpi_gbl_exception_names_aml[] = { 236char const *acpi_gbl_exception_names_aml[] = {
253 NULL, 237 NULL,
254 "AE_AML_ERROR",
255 "AE_AML_PARSE",
256 "AE_AML_BAD_OPCODE", 238 "AE_AML_BAD_OPCODE",
257 "AE_AML_NO_OPERAND", 239 "AE_AML_NO_OPERAND",
258 "AE_AML_OPERAND_TYPE", 240 "AE_AML_OPERAND_TYPE",
@@ -284,7 +266,7 @@ char const *acpi_gbl_exception_names_aml[] = {
284 "AE_AML_BAD_RESOURCE_VALUE", 266 "AE_AML_BAD_RESOURCE_VALUE",
285 "AE_AML_CIRCULAR_REFERENCE", 267 "AE_AML_CIRCULAR_REFERENCE",
286 "AE_AML_BAD_RESOURCE_LENGTH", 268 "AE_AML_BAD_RESOURCE_LENGTH",
287 "AE_AML_ILLEGAL_ADDRESS" 269 "AE_AML_ILLEGAL_ADDRESS",
288}; 270};
289 271
290char const *acpi_gbl_exception_names_ctrl[] = { 272char const *acpi_gbl_exception_names_ctrl[] = {
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index b221c8583ddd..ecab527cf78e 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -208,6 +208,7 @@ struct acpi_namespace_node {
208#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ 208#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
209#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ 209#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
210#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ 210#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
211#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
211 212
212#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */ 213#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */
213#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */ 214#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */
@@ -340,6 +341,82 @@ acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
340#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ 341#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */
341#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF 342#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF
342 343
344/*
345 * Information structure for ACPI predefined names.
346 * Each entry in the table contains the following items:
347 *
348 * Name - The ACPI reserved name
349 * param_count - Number of arguments to the method
350 * expected_return_btypes - Allowed type(s) for the return value
351 */
352struct acpi_name_info {
353 char name[ACPI_NAME_SIZE];
354 u8 param_count;
355 u8 expected_btypes;
356};
357
358/*
359 * Secondary information structures for ACPI predefined objects that return
360 * package objects. This structure appears as the next entry in the table
361 * after the NAME_INFO structure above.
362 *
363 * The reason for this is to minimize the size of the predefined name table.
364 */
365
366/*
367 * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
368 * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT
369 */
370struct acpi_package_info {
371 u8 type;
372 u8 object_type1;
373 u8 count1;
374 u8 object_type2;
375 u8 count2;
376 u8 reserved;
377};
378
379/* Used for ACPI_PTYPE2_FIXED */
380
381struct acpi_package_info2 {
382 u8 type;
383 u8 count;
384 u8 object_type[4];
385};
386
387/* Used for ACPI_PTYPE1_OPTION */
388
389struct acpi_package_info3 {
390 u8 type;
391 u8 count;
392 u8 object_type[2];
393 u8 tail_object_type;
394 u8 reserved;
395};
396
397union acpi_predefined_info {
398 struct acpi_name_info info;
399 struct acpi_package_info ret_info;
400 struct acpi_package_info2 ret_info2;
401 struct acpi_package_info3 ret_info3;
402};
403
404/*
405 * Bitmapped return value types
406 * Note: the actual data types must be contiguous, a loop in nspredef.c
407 * depends on this.
408 */
409#define ACPI_RTYPE_ANY 0x00
410#define ACPI_RTYPE_NONE 0x01
411#define ACPI_RTYPE_INTEGER 0x02
412#define ACPI_RTYPE_STRING 0x04
413#define ACPI_RTYPE_BUFFER 0x08
414#define ACPI_RTYPE_PACKAGE 0x10
415#define ACPI_RTYPE_REFERENCE 0x20
416#define ACPI_RTYPE_ALL 0x3F
417
418#define ACPI_NUM_RTYPES 5 /* Number of actual object types */
419
343/***************************************************************************** 420/*****************************************************************************
344 * 421 *
345 * Event typedefs and structs 422 * Event typedefs and structs
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 57ab9e9d7593..a597207e2835 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -62,7 +62,7 @@
62#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) 62#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
63 63
64/* 64/*
65 * Extract data using a pointer. Any more than a byte and we 65 * Extract data using a pointer. Any more than a byte and we
66 * get into potential aligment issues -- see the STORE macros below. 66 * get into potential aligment issues -- see the STORE macros below.
67 * Use with care. 67 * Use with care.
68 */ 68 */
@@ -80,21 +80,21 @@
80 */ 80 */
81#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) 81#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))
82#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) 82#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p))
83#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_size)(b))) 83#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b)))
84#define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b))) 84#define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b)))
85 85
86/* Pointer/Integer type conversions */ 86/* Pointer/Integer type conversions */
87 87
88#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i) 88#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i)
89#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) 89#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) NULL)
90#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) 90#define ACPI_OFFSET(d, f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL)
91#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) 91#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
92#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) 92#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
93 93
94#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 94#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
95#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) 95#define ACPI_COMPARE_NAME(a, b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b)))
96#else 96#else
97#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE)) 97#define ACPI_COMPARE_NAME(a, b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
98#endif 98#endif
99 99
100/* 100/*
@@ -114,7 +114,7 @@ struct acpi_integer_overlay {
114 114
115/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */ 115/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
116 116
117#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) 117#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
118 118
119#if ACPI_MACHINE_WIDTH == 64 119#if ACPI_MACHINE_WIDTH == 64
120#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) 120#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
@@ -132,37 +132,33 @@ struct acpi_integer_overlay {
132 * Macros for big-endian machines 132 * Macros for big-endian machines
133 */ 133 */
134 134
135/* This macro sets a buffer index, starting from the end of the buffer */
136
137#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) ((buf_len) - (((buf_offset)+1) * (byte_gran)))
138
139/* These macros reverse the bytes during the move, converting little-endian to big endian */ 135/* These macros reverse the bytes during the move, converting little-endian to big endian */
140 136
141 /* Big Endian <== Little Endian */ 137 /* Big Endian <== Little Endian */
142 /* Hi...Lo Lo...Hi */ 138 /* Hi...Lo Lo...Hi */
143/* 16-bit source, 16/32/64 destination */ 139/* 16-bit source, 16/32/64 destination */
144 140
145#define ACPI_MOVE_16_TO_16(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\ 141#define ACPI_MOVE_16_TO_16(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\
146 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];} 142 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];}
147 143
148#define ACPI_MOVE_16_TO_32(d,s) {(*(u32 *)(void *)(d))=0;\ 144#define ACPI_MOVE_16_TO_32(d, s) {(*(u32 *)(void *)(d))=0;\
149 ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\ 145 ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
150 ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];} 146 ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
151 147
152#define ACPI_MOVE_16_TO_64(d,s) {(*(u64 *)(void *)(d))=0;\ 148#define ACPI_MOVE_16_TO_64(d, s) {(*(u64 *)(void *)(d))=0;\
153 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ 149 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
154 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];} 150 ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
155 151
156/* 32-bit source, 16/32/64 destination */ 152/* 32-bit source, 16/32/64 destination */
157 153
158#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 154#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
159 155
160#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\ 156#define ACPI_MOVE_32_TO_32(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
161 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\ 157 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
162 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\ 158 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
163 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];} 159 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
164 160
165#define ACPI_MOVE_32_TO_64(d,s) {(*(u64 *)(void *)(d))=0;\ 161#define ACPI_MOVE_32_TO_64(d, s) {(*(u64 *)(void *)(d))=0;\
166 ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\ 162 ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
167 ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\ 163 ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
168 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\ 164 ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
@@ -170,11 +166,11 @@ struct acpi_integer_overlay {
170 166
171/* 64-bit source, 16/32/64 destination */ 167/* 64-bit source, 16/32/64 destination */
172 168
173#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 169#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
174 170
175#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 171#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
176 172
177#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\ 173#define ACPI_MOVE_64_TO_64(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
178 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\ 174 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
179 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\ 175 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\
180 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\ 176 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\
@@ -187,63 +183,59 @@ struct acpi_integer_overlay {
187 * Macros for little-endian machines 183 * Macros for little-endian machines
188 */ 184 */
189 185
190/* This macro sets a buffer index, starting from the beginning of the buffer */
191
192#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset)
193
194#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 186#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
195 187
196/* The hardware supports unaligned transfers, just do the little-endian move */ 188/* The hardware supports unaligned transfers, just do the little-endian move */
197 189
198/* 16-bit source, 16/32/64 destination */ 190/* 16-bit source, 16/32/64 destination */
199 191
200#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) 192#define ACPI_MOVE_16_TO_16(d, s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
201#define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s) 193#define ACPI_MOVE_16_TO_32(d, s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
202#define ACPI_MOVE_16_TO_64(d,s) *(u64 *)(void *)(d) = *(u16 *)(void *)(s) 194#define ACPI_MOVE_16_TO_64(d, s) *(u64 *)(void *)(d) = *(u16 *)(void *)(s)
203 195
204/* 32-bit source, 16/32/64 destination */ 196/* 32-bit source, 16/32/64 destination */
205 197
206#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 198#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
207#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) 199#define ACPI_MOVE_32_TO_32(d, s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
208#define ACPI_MOVE_32_TO_64(d,s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s) 200#define ACPI_MOVE_32_TO_64(d, s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s)
209 201
210/* 64-bit source, 16/32/64 destination */ 202/* 64-bit source, 16/32/64 destination */
211 203
212#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 204#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
213#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 205#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
214#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) 206#define ACPI_MOVE_64_TO_64(d, s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
215 207
216#else 208#else
217/* 209/*
218 * The hardware does not support unaligned transfers. We must move the 210 * The hardware does not support unaligned transfers. We must move the
219 * data one byte at a time. These macros work whether the source or 211 * data one byte at a time. These macros work whether the source or
220 * the destination (or both) is/are unaligned. (Little-endian move) 212 * the destination (or both) is/are unaligned. (Little-endian move)
221 */ 213 */
222 214
223/* 16-bit source, 16/32/64 destination */ 215/* 16-bit source, 16/32/64 destination */
224 216
225#define ACPI_MOVE_16_TO_16(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 217#define ACPI_MOVE_16_TO_16(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
226 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];} 218 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];}
227 219
228#define ACPI_MOVE_16_TO_32(d,s) {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} 220#define ACPI_MOVE_16_TO_32(d, s) {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
229#define ACPI_MOVE_16_TO_64(d,s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);} 221#define ACPI_MOVE_16_TO_64(d, s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
230 222
231/* 32-bit source, 16/32/64 destination */ 223/* 32-bit source, 16/32/64 destination */
232 224
233#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 225#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
234 226
235#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 227#define ACPI_MOVE_32_TO_32(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
236 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ 228 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
237 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ 229 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
238 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];} 230 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];}
239 231
240#define ACPI_MOVE_32_TO_64(d,s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);} 232#define ACPI_MOVE_32_TO_64(d, s) {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d, s);}
241 233
242/* 64-bit source, 16/32/64 destination */ 234/* 64-bit source, 16/32/64 destination */
243 235
244#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 236#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
245#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 237#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
246#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 238#define ACPI_MOVE_64_TO_64(d, s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
247 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ 239 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
248 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ 240 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
249 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\ 241 (( u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\
@@ -257,10 +249,10 @@ struct acpi_integer_overlay {
257/* Macros based on machine integer width */ 249/* Macros based on machine integer width */
258 250
259#if ACPI_MACHINE_WIDTH == 32 251#if ACPI_MACHINE_WIDTH == 32
260#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s) 252#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_32_TO_16(d, s)
261 253
262#elif ACPI_MACHINE_WIDTH == 64 254#elif ACPI_MACHINE_WIDTH == 64
263#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_64_TO_16(d,s) 255#define ACPI_MOVE_SIZE_TO_16(d, s) ACPI_MOVE_64_TO_16(d, s)
264 256
265#else 257#else
266#error unknown ACPI_MACHINE_WIDTH 258#error unknown ACPI_MACHINE_WIDTH
@@ -269,29 +261,29 @@ struct acpi_integer_overlay {
269/* 261/*
270 * Fast power-of-two math macros for non-optimized compilers 262 * Fast power-of-two math macros for non-optimized compilers
271 */ 263 */
272#define _ACPI_DIV(value,power_of2) ((u32) ((value) >> (power_of2))) 264#define _ACPI_DIV(value, power_of2) ((u32) ((value) >> (power_of2)))
273#define _ACPI_MUL(value,power_of2) ((u32) ((value) << (power_of2))) 265#define _ACPI_MUL(value, power_of2) ((u32) ((value) << (power_of2)))
274#define _ACPI_MOD(value,divisor) ((u32) ((value) & ((divisor) -1))) 266#define _ACPI_MOD(value, divisor) ((u32) ((value) & ((divisor) -1)))
275 267
276#define ACPI_DIV_2(a) _ACPI_DIV(a,1) 268#define ACPI_DIV_2(a) _ACPI_DIV(a, 1)
277#define ACPI_MUL_2(a) _ACPI_MUL(a,1) 269#define ACPI_MUL_2(a) _ACPI_MUL(a, 1)
278#define ACPI_MOD_2(a) _ACPI_MOD(a,2) 270#define ACPI_MOD_2(a) _ACPI_MOD(a, 2)
279 271
280#define ACPI_DIV_4(a) _ACPI_DIV(a,2) 272#define ACPI_DIV_4(a) _ACPI_DIV(a, 2)
281#define ACPI_MUL_4(a) _ACPI_MUL(a,2) 273#define ACPI_MUL_4(a) _ACPI_MUL(a, 2)
282#define ACPI_MOD_4(a) _ACPI_MOD(a,4) 274#define ACPI_MOD_4(a) _ACPI_MOD(a, 4)
283 275
284#define ACPI_DIV_8(a) _ACPI_DIV(a,3) 276#define ACPI_DIV_8(a) _ACPI_DIV(a, 3)
285#define ACPI_MUL_8(a) _ACPI_MUL(a,3) 277#define ACPI_MUL_8(a) _ACPI_MUL(a, 3)
286#define ACPI_MOD_8(a) _ACPI_MOD(a,8) 278#define ACPI_MOD_8(a) _ACPI_MOD(a, 8)
287 279
288#define ACPI_DIV_16(a) _ACPI_DIV(a,4) 280#define ACPI_DIV_16(a) _ACPI_DIV(a, 4)
289#define ACPI_MUL_16(a) _ACPI_MUL(a,4) 281#define ACPI_MUL_16(a) _ACPI_MUL(a, 4)
290#define ACPI_MOD_16(a) _ACPI_MOD(a,16) 282#define ACPI_MOD_16(a) _ACPI_MOD(a, 16)
291 283
292#define ACPI_DIV_32(a) _ACPI_DIV(a,5) 284#define ACPI_DIV_32(a) _ACPI_DIV(a, 5)
293#define ACPI_MUL_32(a) _ACPI_MUL(a,5) 285#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
294#define ACPI_MOD_32(a) _ACPI_MOD(a,32) 286#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)
295 287
296/* 288/*
297 * Rounding macros (Power of two boundaries only) 289 * Rounding macros (Power of two boundaries only)
@@ -305,13 +297,13 @@ struct acpi_integer_overlay {
305 297
306/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */ 298/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */
307 299
308#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4) 300#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a, 4)
309#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8) 301#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a, 8)
310#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_size)) 302#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a, sizeof(acpi_size))
311 303
312#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4) 304#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a, 4)
313#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8) 305#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a, 8)
314#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_size)) 306#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a, sizeof(acpi_size))
315 307
316#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) 308#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
317#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) 309#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
@@ -320,9 +312,9 @@ struct acpi_integer_overlay {
320 312
321/* Generic (non-power-of-two) rounding */ 313/* Generic (non-power-of-two) rounding */
322 314
323#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) 315#define ACPI_ROUND_UP_TO(value, boundary) (((value) + ((boundary)-1)) / (boundary))
324 316
325#define ACPI_IS_MISALIGNED(value) (((acpi_size)value) & (sizeof(acpi_size)-1)) 317#define ACPI_IS_MISALIGNED(value) (((acpi_size) value) & (sizeof(acpi_size)-1))
326 318
327/* 319/*
328 * Bitmask creation 320 * Bitmask creation
@@ -333,8 +325,6 @@ struct acpi_integer_overlay {
333#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position)))) 325#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
334#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) 326#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
335 327
336#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
337
338/* Bitfields within ACPI registers */ 328/* Bitfields within ACPI registers */
339 329
340#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 330#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
@@ -342,39 +332,29 @@ struct acpi_integer_overlay {
342 332
343#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) 333#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask))
344 334
345/* Generate a UUID */
346
347#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
348 (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
349 (b) & 0xFF, ((b) >> 8) & 0xFF, \
350 (c) & 0xFF, ((c) >> 8) & 0xFF, \
351 (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
352
353/* 335/*
354 * An struct acpi_namespace_node * can appear in some contexts, 336 * An struct acpi_namespace_node can appear in some contexts
355 * where a pointer to an union acpi_operand_object can also 337 * where a pointer to an union acpi_operand_object can also
356 * appear. This macro is used to distinguish them. 338 * appear. This macro is used to distinguish them.
357 * 339 *
358 * The "Descriptor" field is the first field in both structures. 340 * The "Descriptor" field is the first field in both structures.
359 */ 341 */
360#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type) 342#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
361#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t) 343#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
362 344
363/* Macro to test the object type */ 345/* Macro to test the object type */
364 346
365#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type) 347#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
366 348
367/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
368
369#define ACPI_IS_SINGLE_TABLE(x) (((x) & 0x01) == ACPI_TABLE_SINGLE ? 1 : 0)
370
371/* 349/*
372 * Macros for the master AML opcode table 350 * Macros for the master AML opcode table
373 */ 351 */
374#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT) 352#if defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
375#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {name,(u32)(Pargs),(u32)(Iargs),(u32)(flags),obj_type,class,type} 353#define ACPI_OP(name, Pargs, Iargs, obj_type, class, type, flags) \
354 {name, (u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
376#else 355#else
377#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {(u32)(Pargs),(u32)(Iargs),(u32)(flags),obj_type,class,type} 356#define ACPI_OP(name, Pargs, Iargs, obj_type, class, type, flags) \
357 {(u32)(Pargs), (u32)(Iargs), (u32)(flags), obj_type, class, type}
378#endif 358#endif
379 359
380#ifdef ACPI_DISASSEMBLER 360#ifdef ACPI_DISASSEMBLER
@@ -392,18 +372,18 @@ struct acpi_integer_overlay {
392#define ARG_6(x) ((u32)(x) << (5 * ARG_TYPE_WIDTH)) 372#define ARG_6(x) ((u32)(x) << (5 * ARG_TYPE_WIDTH))
393 373
394#define ARGI_LIST1(a) (ARG_1(a)) 374#define ARGI_LIST1(a) (ARG_1(a))
395#define ARGI_LIST2(a,b) (ARG_1(b)|ARG_2(a)) 375#define ARGI_LIST2(a, b) (ARG_1(b)|ARG_2(a))
396#define ARGI_LIST3(a,b,c) (ARG_1(c)|ARG_2(b)|ARG_3(a)) 376#define ARGI_LIST3(a, b, c) (ARG_1(c)|ARG_2(b)|ARG_3(a))
397#define ARGI_LIST4(a,b,c,d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a)) 377#define ARGI_LIST4(a, b, c, d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a))
398#define ARGI_LIST5(a,b,c,d,e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a)) 378#define ARGI_LIST5(a, b, c, d, e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a))
399#define ARGI_LIST6(a,b,c,d,e,f) (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a)) 379#define ARGI_LIST6(a, b, c, d, e, f) (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a))
400 380
401#define ARGP_LIST1(a) (ARG_1(a)) 381#define ARGP_LIST1(a) (ARG_1(a))
402#define ARGP_LIST2(a,b) (ARG_1(a)|ARG_2(b)) 382#define ARGP_LIST2(a, b) (ARG_1(a)|ARG_2(b))
403#define ARGP_LIST3(a,b,c) (ARG_1(a)|ARG_2(b)|ARG_3(c)) 383#define ARGP_LIST3(a, b, c) (ARG_1(a)|ARG_2(b)|ARG_3(c))
404#define ARGP_LIST4(a,b,c,d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)) 384#define ARGP_LIST4(a, b, c, d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d))
405#define ARGP_LIST5(a,b,c,d,e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)) 385#define ARGP_LIST5(a, b, c, d, e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e))
406#define ARGP_LIST6(a,b,c,d,e,f) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f)) 386#define ARGP_LIST6(a, b, c, d, e, f) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f))
407 387
408#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) 388#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F))
409#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) 389#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
@@ -434,8 +414,8 @@ struct acpi_integer_overlay {
434#define ACPI_WARNING(plist) acpi_ut_warning plist 414#define ACPI_WARNING(plist) acpi_ut_warning plist
435#define ACPI_EXCEPTION(plist) acpi_ut_exception plist 415#define ACPI_EXCEPTION(plist) acpi_ut_exception plist
436#define ACPI_ERROR(plist) acpi_ut_error plist 416#define ACPI_ERROR(plist) acpi_ut_error plist
437#define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e); 417#define ACPI_ERROR_NAMESPACE(s, e) acpi_ns_report_error (AE_INFO, s, e);
438#define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e); 418#define ACPI_ERROR_METHOD(s, n, p, e) acpi_ns_report_method_error (AE_INFO, s, n, p, e);
439 419
440#else 420#else
441 421
@@ -445,8 +425,8 @@ struct acpi_integer_overlay {
445#define ACPI_WARNING(plist) 425#define ACPI_WARNING(plist)
446#define ACPI_EXCEPTION(plist) 426#define ACPI_EXCEPTION(plist)
447#define ACPI_ERROR(plist) 427#define ACPI_ERROR(plist)
448#define ACPI_ERROR_NAMESPACE(s,e) 428#define ACPI_ERROR_NAMESPACE(s, e)
449#define ACPI_ERROR_METHOD(s,n,p,e) 429#define ACPI_ERROR_METHOD(s, n, p, e)
450#endif 430#endif
451 431
452/* 432/*
@@ -467,7 +447,7 @@ struct acpi_integer_overlay {
467/* 447/*
468 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, 448 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
469 * define it now. This is the case where there the compiler does not support 449 * define it now. This is the case where there the compiler does not support
470 * a __FUNCTION__ macro or equivalent. 450 * a __func__ macro or equivalent.
471 */ 451 */
472#ifndef ACPI_GET_FUNCTION_NAME 452#ifndef ACPI_GET_FUNCTION_NAME
473#define ACPI_GET_FUNCTION_NAME _acpi_function_name 453#define ACPI_GET_FUNCTION_NAME _acpi_function_name
@@ -475,12 +455,12 @@ struct acpi_integer_overlay {
475 * The Name parameter should be the procedure name as a quoted string. 455 * The Name parameter should be the procedure name as a quoted string.
476 * The function name is also used by the function exit macros below. 456 * The function name is also used by the function exit macros below.
477 * Note: (const char) is used to be compatible with the debug interfaces 457 * Note: (const char) is used to be compatible with the debug interfaces
478 * and macros such as __FUNCTION__. 458 * and macros such as __func__.
479 */ 459 */
480#define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name; 460#define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name;
481 461
482#else 462#else
483/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ 463/* Compiler supports __func__ (or equivalent) -- Ignore this macro */
484 464
485#define ACPI_FUNCTION_NAME(name) 465#define ACPI_FUNCTION_NAME(name)
486#endif 466#endif
@@ -489,18 +469,18 @@ struct acpi_integer_overlay {
489 469
490#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ 470#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
491 acpi_ut_trace(ACPI_DEBUG_PARAMETERS) 471 acpi_ut_trace(ACPI_DEBUG_PARAMETERS)
492#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ 472#define ACPI_FUNCTION_TRACE_PTR(a, b) ACPI_FUNCTION_NAME(a) \
493 acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) 473 acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS, (void *)b)
494#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ 474#define ACPI_FUNCTION_TRACE_U32(a, b) ACPI_FUNCTION_NAME(a) \
495 acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS,(u32)b) 475 acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS, (u32)b)
496#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \ 476#define ACPI_FUNCTION_TRACE_STR(a, b) ACPI_FUNCTION_NAME(a) \
497 acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS,(char *)b) 477 acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS, (char *)b)
498 478
499#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr() 479#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr()
500 480
501/* 481/*
502 * Function exit tracing. 482 * Function exit tracing.
503 * WARNING: These macros include a return statement. This is usually considered 483 * WARNING: These macros include a return statement. This is usually considered
504 * bad form, but having a separate exit macro is very ugly and difficult to maintain. 484 * bad form, but having a separate exit macro is very ugly and difficult to maintain.
505 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros 485 * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
506 * so that "_AcpiFunctionName" is defined. 486 * so that "_AcpiFunctionName" is defined.
@@ -596,13 +576,13 @@ struct acpi_integer_overlay {
596 576
597/* Stack and buffer dumping */ 577/* Stack and buffer dumping */
598 578
599#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0) 579#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a), 0)
600#define ACPI_DUMP_OPERANDS(a,b,c) acpi_ex_dump_operands(a,b,c) 580#define ACPI_DUMP_OPERANDS(a, b, c) acpi_ex_dump_operands(a, b, c)
601 581
602#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) 582#define ACPI_DUMP_ENTRY(a, b) acpi_ns_dump_entry (a, b)
603#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) 583#define ACPI_DUMP_PATHNAME(a, b, c, d) acpi_ns_dump_pathname(a, b, c, d)
604#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) 584#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
605#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) 585#define ACPI_DUMP_BUFFER(a, b) acpi_ut_dump_buffer((u8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
606 586
607/* 587/*
608 * Master debug print macros 588 * Master debug print macros
@@ -625,20 +605,20 @@ struct acpi_integer_overlay {
625#define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0) 605#define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0)
626#define ACPI_FUNCTION_NAME(a) do { } while(0) 606#define ACPI_FUNCTION_NAME(a) do { } while(0)
627#define ACPI_FUNCTION_TRACE(a) do { } while(0) 607#define ACPI_FUNCTION_TRACE(a) do { } while(0)
628#define ACPI_FUNCTION_TRACE_PTR(a,b) do { } while(0) 608#define ACPI_FUNCTION_TRACE_PTR(a, b) do { } while(0)
629#define ACPI_FUNCTION_TRACE_U32(a,b) do { } while(0) 609#define ACPI_FUNCTION_TRACE_U32(a, b) do { } while(0)
630#define ACPI_FUNCTION_TRACE_STR(a,b) do { } while(0) 610#define ACPI_FUNCTION_TRACE_STR(a, b) do { } while(0)
631#define ACPI_FUNCTION_EXIT do { } while(0) 611#define ACPI_FUNCTION_EXIT do { } while(0)
632#define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0) 612#define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0)
633#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0) 613#define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0)
634#define ACPI_FUNCTION_ENTRY() do { } while(0) 614#define ACPI_FUNCTION_ENTRY() do { } while(0)
635#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0) 615#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0)
636#define ACPI_DUMP_OPERANDS(a,b,c) do { } while(0) 616#define ACPI_DUMP_OPERANDS(a, b, c) do { } while(0)
637#define ACPI_DUMP_ENTRY(a,b) do { } while(0) 617#define ACPI_DUMP_ENTRY(a, b) do { } while(0)
638#define ACPI_DUMP_TABLES(a,b) do { } while(0) 618#define ACPI_DUMP_TABLES(a, b) do { } while(0)
639#define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0) 619#define ACPI_DUMP_PATHNAME(a, b, c, d) do { } while(0)
640#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0) 620#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0)
641#define ACPI_DUMP_BUFFER(a,b) do { } while(0) 621#define ACPI_DUMP_BUFFER(a, b) do { } while(0)
642#define ACPI_DEBUG_PRINT(pl) do { } while(0) 622#define ACPI_DEBUG_PRINT(pl) do { } while(0)
643#define ACPI_DEBUG_PRINT_RAW(pl) do { } while(0) 623#define ACPI_DEBUG_PRINT_RAW(pl) do { } while(0)
644 624
@@ -677,15 +657,17 @@ struct acpi_integer_overlay {
677/* 657/*
678 * Memory allocation tracking (DEBUG ONLY) 658 * Memory allocation tracking (DEBUG ONLY)
679 */ 659 */
660#define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__
661
680#ifndef ACPI_DBG_TRACK_ALLOCATIONS 662#ifndef ACPI_DBG_TRACK_ALLOCATIONS
681 663
682/* Memory allocation */ 664/* Memory allocation */
683 665
684#ifndef ACPI_ALLOCATE 666#ifndef ACPI_ALLOCATE
685#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) 667#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a), ACPI_MEM_PARAMETERS)
686#endif 668#endif
687#ifndef ACPI_ALLOCATE_ZEROED 669#ifndef ACPI_ALLOCATE_ZEROED
688#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) 670#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), ACPI_MEM_PARAMETERS)
689#endif 671#endif
690#ifndef ACPI_FREE 672#ifndef ACPI_FREE
691#define ACPI_FREE(a) acpio_os_free(a) 673#define ACPI_FREE(a) acpio_os_free(a)
@@ -696,11 +678,16 @@ struct acpi_integer_overlay {
696 678
697/* Memory allocation */ 679/* Memory allocation */
698 680
699#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) 681#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS)
700#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) 682#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), ACPI_MEM_PARAMETERS)
701#define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) 683#define ACPI_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS)
702#define ACPI_MEM_TRACKING(a) a 684#define ACPI_MEM_TRACKING(a) a
703 685
704#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ 686#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
705 687
688/* Preemption point */
689#ifndef ACPI_PREEMPTION_POINT
690#define ACPI_PREEMPTION_POINT() /* no preemption */
691#endif
692
706#endif /* ACMACROS_H */ 693#endif /* ACMACROS_H */
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index c34008507b69..db4e6f677855 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -178,6 +178,22 @@ acpi_ns_dump_objects(acpi_object_type type,
178acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info); 178acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
179 179
180/* 180/*
181 * nspredef - Support for predefined/reserved names
182 */
183acpi_status
184acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
185 union acpi_operand_object *return_object);
186
187const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct
188 acpi_namespace_node
189 *node);
190
191void
192acpi_ns_check_parameter_count(char *pathname,
193 struct acpi_namespace_node *node,
194 const union acpi_predefined_info *info);
195
196/*
181 * nsnames - Name and Scope manipulation 197 * nsnames - Name and Scope manipulation
182 */ 198 */
183u32 acpi_ns_opens_scope(acpi_object_type type); 199u32 acpi_ns_opens_scope(acpi_object_type type);
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index e9657dac69b7..eb6f038b03d9 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -308,18 +308,34 @@ struct acpi_object_addr_handler {
308 *****************************************************************************/ 308 *****************************************************************************/
309 309
310/* 310/*
311 * The Reference object type is used for these opcodes: 311 * The Reference object is used for these opcodes:
312 * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op 312 * Arg[0-6], Local[0-7], index_op, name_op, ref_of_op, load_op, load_table_op, debug_op
313 * The Reference.Class differentiates these types.
313 */ 314 */
314struct acpi_object_reference { 315struct acpi_object_reference {
315 ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for index_op */ 316 ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */
316 u16 opcode; 317 u8 target_type; /* Used for Index Op */
318 u8 reserved;
317 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ 319 void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
318 struct acpi_namespace_node *node; 320 struct acpi_namespace_node *node; /* ref_of or Namepath */
319 union acpi_operand_object **where; 321 union acpi_operand_object **where; /* Target of Index */
320 u32 offset; /* Used for arg_op, local_op, and index_op */ 322 u32 value; /* Used for Local/Arg/Index/ddb_handle */
321}; 323};
322 324
325/* Values for Reference.Class above */
326
327typedef enum {
328 ACPI_REFCLASS_LOCAL = 0, /* Method local */
329 ACPI_REFCLASS_ARG = 1, /* Method argument */
330 ACPI_REFCLASS_REFOF = 2, /* Result of ref_of() TBD: Split to Ref/Node and Ref/operand_obj? */
331 ACPI_REFCLASS_INDEX = 3, /* Result of Index() */
332 ACPI_REFCLASS_TABLE = 4, /* ddb_handle - Load(), load_table() */
333 ACPI_REFCLASS_NAME = 5, /* Reference to a named object */
334 ACPI_REFCLASS_DEBUG = 6, /* Debug object */
335
336 ACPI_REFCLASS_MAX = 6
337} ACPI_REFERENCE_CLASSES;
338
323/* 339/*
324 * Extra object is used as additional storage for types that 340 * Extra object is used as additional storage for types that
325 * have AML code in their declarations (term_args) that must be 341 * have AML code in their declarations (term_args) that must be
@@ -379,6 +395,13 @@ union acpi_operand_object {
379 struct acpi_object_extra extra; 395 struct acpi_object_extra extra;
380 struct acpi_object_data data; 396 struct acpi_object_data data;
381 struct acpi_object_cache_list cache; 397 struct acpi_object_cache_list cache;
398
399 /*
400 * Add namespace node to union in order to simplify code that accepts both
401 * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share
402 * a common descriptor_type field in order to differentiate them.
403 */
404 struct acpi_namespace_node node;
382}; 405};
383 406
384/****************************************************************************** 407/******************************************************************************
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index e17873defcec..db8852d8bcf7 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -80,12 +80,10 @@
80/* 80/*
81 * Raw debug output levels, do not use these in the DEBUG_PRINT macros 81 * Raw debug output levels, do not use these in the DEBUG_PRINT macros
82 */ 82 */
83#define ACPI_LV_ERROR 0x00000001 83#define ACPI_LV_INIT 0x00000001
84#define ACPI_LV_WARN 0x00000002 84#define ACPI_LV_DEBUG_OBJECT 0x00000002
85#define ACPI_LV_INIT 0x00000004 85#define ACPI_LV_INFO 0x00000004
86#define ACPI_LV_DEBUG_OBJECT 0x00000008 86#define ACPI_LV_ALL_EXCEPTIONS 0x00000007
87#define ACPI_LV_INFO 0x00000010
88#define ACPI_LV_ALL_EXCEPTIONS 0x0000001F
89 87
90/* Trace verbosity level 1 [Standard Trace Level] */ 88/* Trace verbosity level 1 [Standard Trace Level] */
91 89
@@ -127,7 +125,6 @@
127#define ACPI_LV_VERBOSE_INFO 0x20000000 125#define ACPI_LV_VERBOSE_INFO 0x20000000
128#define ACPI_LV_FULL_TABLES 0x40000000 126#define ACPI_LV_FULL_TABLES 0x40000000
129#define ACPI_LV_EVENTS 0x80000000 127#define ACPI_LV_EVENTS 0x80000000
130
131#define ACPI_LV_VERBOSE 0xF0000000 128#define ACPI_LV_VERBOSE 0xF0000000
132 129
133/* 130/*
@@ -135,21 +132,17 @@
135 */ 132 */
136#define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS 133#define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS
137 134
138/* Exception level -- used in the global "DebugLevel" */ 135/*
139 136 * Exception level -- used in the global "DebugLevel"
137 *
138 * Note: For errors, use the ACPI_ERROR or ACPI_EXCEPTION interfaces.
139 * For warnings, use ACPI_WARNING.
140 */
140#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) 141#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
141#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) 142#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
142#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) 143#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
143#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) 144#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
144 145
145/*
146 * These two levels are essentially obsolete, all instances in the
147 * ACPICA core code have been replaced by ACPI_ERROR and ACPI_WARNING
148 * (Kept here because some drivers may still use them)
149 */
150#define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
151#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
152
153/* Trace level -- also used in the global "DebugLevel" */ 146/* Trace level -- also used in the global "DebugLevel" */
154 147
155#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) 148#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
@@ -173,13 +166,14 @@
173#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS) 166#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
174#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE) 167#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
175#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX) 168#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
169#define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
176 170
177#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL) 171#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
178 172
179/* Defaults for debug_level, debug and normal */ 173/* Defaults for debug_level, debug and normal */
180 174
181#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR) 175#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO)
182#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR) 176#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
183#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) 177#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
184 178
185#endif /* __ACOUTPUT_H__ */ 179#endif /* __ACOUTPUT_H__ */
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index a5ac0bc7f52e..e9f6574930ef 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *package,
46acpi_status 46acpi_status
47acpi_evaluate_integer(acpi_handle handle, 47acpi_evaluate_integer(acpi_handle handle,
48 acpi_string pathname, 48 acpi_string pathname,
49 struct acpi_object_list *arguments, unsigned long *data); 49 struct acpi_object_list *arguments, unsigned long long *data);
50acpi_status 50acpi_status
51acpi_evaluate_reference(acpi_handle handle, 51acpi_evaluate_reference(acpi_handle handle,
52 acpi_string pathname, 52 acpi_string pathname,
@@ -300,7 +300,11 @@ struct acpi_device {
300 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ 300 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
301}; 301};
302 302
303#define acpi_driver_data(d) ((d)->driver_data) 303static inline void *acpi_driver_data(struct acpi_device *d)
304{
305 return d->driver_data;
306}
307
304#define to_acpi_device(d) container_of(d, struct acpi_device, dev) 308#define to_acpi_device(d) container_of(d, struct acpi_device, dev)
305#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) 309#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv)
306 310
@@ -327,6 +331,9 @@ int acpi_bus_get_private_data(acpi_handle, void **);
327extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32); 331extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
328extern int register_acpi_notifier(struct notifier_block *); 332extern int register_acpi_notifier(struct notifier_block *);
329extern int unregister_acpi_notifier(struct notifier_block *); 333extern int unregister_acpi_notifier(struct notifier_block *);
334
335extern int register_acpi_bus_notifier(struct notifier_block *nb);
336extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
330/* 337/*
331 * External Functions 338 * External Functions
332 */ 339 */
@@ -373,6 +380,8 @@ struct acpi_bus_type {
373int register_acpi_bus_type(struct acpi_bus_type *); 380int register_acpi_bus_type(struct acpi_bus_type *);
374int unregister_acpi_bus_type(struct acpi_bus_type *); 381int unregister_acpi_bus_type(struct acpi_bus_type *);
375struct device *acpi_get_physical_device(acpi_handle); 382struct device *acpi_get_physical_device(acpi_handle);
383struct device *acpi_get_physical_pci_device(acpi_handle);
384
376/* helper */ 385/* helper */
377acpi_handle acpi_get_child(acpi_handle, acpi_integer); 386acpi_handle acpi_get_child(acpi_handle, acpi_integer);
378acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); 387acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index e5f38e5ce86f..5fc1bb0f4a90 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -31,8 +31,24 @@
31 31
32#define ACPI_MAX_STRING 80 32#define ACPI_MAX_STRING 80
33 33
34/*
35 * Please update drivers/acpi/debug.c and Documentation/acpi/debug.txt
36 * if you add to this list.
37 */
34#define ACPI_BUS_COMPONENT 0x00010000 38#define ACPI_BUS_COMPONENT 0x00010000
39#define ACPI_AC_COMPONENT 0x00020000
40#define ACPI_BATTERY_COMPONENT 0x00040000
41#define ACPI_BUTTON_COMPONENT 0x00080000
42#define ACPI_SBS_COMPONENT 0x00100000
43#define ACPI_FAN_COMPONENT 0x00200000
44#define ACPI_PCI_COMPONENT 0x00400000
45#define ACPI_POWER_COMPONENT 0x00800000
46#define ACPI_CONTAINER_COMPONENT 0x01000000
35#define ACPI_SYSTEM_COMPONENT 0x02000000 47#define ACPI_SYSTEM_COMPONENT 0x02000000
48#define ACPI_THERMAL_COMPONENT 0x04000000
49#define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
50#define ACPI_VIDEO_COMPONENT 0x10000000
51#define ACPI_PROCESSOR_COMPONENT 0x20000000
36 52
37/* 53/*
38 * _HID definitions 54 * _HID definitions
@@ -41,6 +57,7 @@
41 */ 57 */
42 58
43#define ACPI_POWER_HID "LNXPOWER" 59#define ACPI_POWER_HID "LNXPOWER"
60#define ACPI_PROCESSOR_OBJECT_HID "ACPI_CPU"
44#define ACPI_PROCESSOR_HID "ACPI0007" 61#define ACPI_PROCESSOR_HID "ACPI0007"
45#define ACPI_SYSTEM_HID "LNXSYSTM" 62#define ACPI_SYSTEM_HID "LNXSYSTM"
46#define ACPI_THERMAL_HID "LNXTHERM" 63#define ACPI_THERMAL_HID "LNXTHERM"
@@ -54,7 +71,6 @@
54 PCI 71 PCI
55 -------------------------------------------------------------------------- */ 72 -------------------------------------------------------------------------- */
56 73
57#define ACPI_PCI_COMPONENT 0x00400000
58 74
59/* ACPI PCI Interrupt Link (pci_link.c) */ 75/* ACPI PCI Interrupt Link (pci_link.c) */
60 76
@@ -86,21 +102,19 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
86 Power Resource 102 Power Resource
87 -------------------------------------------------------------------------- */ 103 -------------------------------------------------------------------------- */
88 104
89#ifdef CONFIG_ACPI_POWER
90int acpi_device_sleep_wake(struct acpi_device *dev, 105int acpi_device_sleep_wake(struct acpi_device *dev,
91 int enable, int sleep_state, int dev_state); 106 int enable, int sleep_state, int dev_state);
92int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state); 107int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state);
93int acpi_disable_wakeup_device_power(struct acpi_device *dev); 108int acpi_disable_wakeup_device_power(struct acpi_device *dev);
94int acpi_power_get_inferred_state(struct acpi_device *device); 109int acpi_power_get_inferred_state(struct acpi_device *device);
95int acpi_power_transition(struct acpi_device *device, int state); 110int acpi_power_transition(struct acpi_device *device, int state);
96#endif 111extern int acpi_power_nocheck;
97 112
98/* -------------------------------------------------------------------------- 113/* --------------------------------------------------------------------------
99 Embedded Controller 114 Embedded Controller
100 -------------------------------------------------------------------------- */ 115 -------------------------------------------------------------------------- */
101#ifdef CONFIG_ACPI_EC
102int acpi_ec_ecdt_probe(void); 116int acpi_ec_ecdt_probe(void);
103#endif 117int acpi_boot_ec_enable(void);
104 118
105/* -------------------------------------------------------------------------- 119/* --------------------------------------------------------------------------
106 Processor 120 Processor
@@ -115,12 +129,17 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
115/*-------------------------------------------------------------------------- 129/*--------------------------------------------------------------------------
116 Dock Station 130 Dock Station
117 -------------------------------------------------------------------------- */ 131 -------------------------------------------------------------------------- */
132struct acpi_dock_ops {
133 acpi_notify_handler handler;
134 acpi_notify_handler uevent;
135};
136
118#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE) 137#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
119extern int is_dock_device(acpi_handle handle); 138extern int is_dock_device(acpi_handle handle);
120extern int register_dock_notifier(struct notifier_block *nb); 139extern int register_dock_notifier(struct notifier_block *nb);
121extern void unregister_dock_notifier(struct notifier_block *nb); 140extern void unregister_dock_notifier(struct notifier_block *nb);
122extern int register_hotplug_dock_device(acpi_handle handle, 141extern int register_hotplug_dock_device(acpi_handle handle,
123 acpi_notify_handler handler, 142 struct acpi_dock_ops *ops,
124 void *context); 143 void *context);
125extern void unregister_hotplug_dock_device(acpi_handle handle); 144extern void unregister_hotplug_dock_device(acpi_handle handle);
126#else 145#else
@@ -136,7 +155,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
136{ 155{
137} 156}
138static inline int register_hotplug_dock_device(acpi_handle handle, 157static inline int register_hotplug_dock_device(acpi_handle handle,
139 acpi_notify_handler handler, 158 struct acpi_dock_ops *ops,
140 void *context) 159 void *context)
141{ 160{
142 return -ENODEV; 161 return -ENODEV;
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 3f93a6b4e17f..b91440ac0d16 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -193,6 +193,9 @@ acpi_status
193acpi_os_execute(acpi_execute_type type, 193acpi_os_execute(acpi_execute_type type,
194 acpi_osd_exec_callback function, void *context); 194 acpi_osd_exec_callback function, void *context);
195 195
196acpi_status
197acpi_os_hotplug_execute(acpi_osd_exec_callback function, void *context);
198
196void acpi_os_wait_events_complete(void *context); 199void acpi_os_wait_events_complete(void *context);
197 200
198void acpi_os_sleep(acpi_integer milliseconds); 201void acpi_os_sleep(acpi_integer milliseconds);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 94d94e126e9f..33bc0e3b1954 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -252,9 +252,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
252 252
253acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); 253acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
254 254
255acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); 255acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number);
256 256
257acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); 257acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number);
258 258
259acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); 259acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
260 260
diff --git a/include/acpi/acpredef.h b/include/acpi/acpredef.h
new file mode 100644
index 000000000000..16a9ca9a66e4
--- /dev/null
+++ b/include/acpi/acpredef.h
@@ -0,0 +1,371 @@
1/******************************************************************************
2 *
3 * Name: acpredef - Information table for ACPI predefined methods and objects
4 * $Revision: 1.1 $
5 *
6 *****************************************************************************/
7
8/*
9 * Copyright (C) 2000 - 2008, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45#ifndef __ACPREDEF_H__
46#define __ACPREDEF_H__
47
48/******************************************************************************
49 *
50 * Return Package types
51 *
52 * 1) PTYPE1 packages do not contain sub-packages.
53 *
54 * ACPI_PTYPE1_FIXED: Fixed length, 1 or 2 object types:
55 * object type
56 * count
57 * object type
58 * count
59 *
60 * ACPI_PTYPE1_VAR: Variable length:
61 * object type (Int/Buf/Ref)
62 *
63 * ACPI_PTYPE1_OPTION: Package has some required and some optional elements:
64 * Used for _PRW
65 *
66 *
67 * 2) PTYPE2 packages contain a variable number of sub-packages. Each of the
68 * different types describe the contents of each of the sub-packages.
69 *
70 * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types:
71 * object type
72 * count
73 * object type
74 * count
75 *
76 * ACPI_PTYPE2_COUNT: Each subpackage has a count as first element:
77 * object type
78 *
79 * ACPI_PTYPE2_PKG_COUNT: Count of subpackages at start, 1 or 2 object types:
80 * object type
81 * count
82 * object type
83 * count
84 *
85 * ACPI_PTYPE2_FIXED: Each subpackage is of fixed length:
86 * Used for _PRT
87 *
88 * ACPI_PTYPE2_MIN: Each subpackage has a variable but minimum length
89 * Used for _HPX
90 *
91 *****************************************************************************/
92
93enum acpi_return_package_types {
94 ACPI_PTYPE1_FIXED = 1,
95 ACPI_PTYPE1_VAR = 2,
96 ACPI_PTYPE1_OPTION = 3,
97 ACPI_PTYPE2 = 4,
98 ACPI_PTYPE2_COUNT = 5,
99 ACPI_PTYPE2_PKG_COUNT = 6,
100 ACPI_PTYPE2_FIXED = 7,
101 ACPI_PTYPE2_MIN = 8
102};
103
104/*
105 * Predefined method/object information table.
106 *
107 * These are the names that can actually be evaluated via acpi_evaluate_object.
108 * Not present in this table are the following:
109 *
110 * 1) Predefined/Reserved names that are never evaluated via acpi_evaluate_object:
111 * _Lxx and _Exx GPE methods
112 * _Qxx EC methods
113 * _T_x compiler temporary variables
114 *
115 * 2) Predefined names that never actually exist within the AML code:
116 * Predefined resource descriptor field names
117 *
118 * 3) Predefined names that are implemented within ACPICA:
119 * _OSI
120 *
121 * 4) Some predefined names that are not documented within the ACPI spec.
122 * _WDG, _WED
123 *
124 * The main entries in the table each contain the following items:
125 *
126 * Name - The ACPI reserved name
127 * param_count - Number of arguments to the method
128 * expected_btypes - Allowed type(s) for the return value.
129 * 0 means that no return value is expected.
130 *
131 * For methods that return packages, the next entry in the table contains
132 * information about the expected structure of the package. This information
133 * is saved here (rather than in a separate table) in order to minimize the
134 * overall size of the stored data.
135 */
136static const union acpi_predefined_info predefined_names[] = {
137 {.info = {"_AC0", 0, ACPI_RTYPE_INTEGER}},
138 {.info = {"_AC1", 0, ACPI_RTYPE_INTEGER}},
139 {.info = {"_AC2", 0, ACPI_RTYPE_INTEGER}},
140 {.info = {"_AC3", 0, ACPI_RTYPE_INTEGER}},
141 {.info = {"_AC4", 0, ACPI_RTYPE_INTEGER}},
142 {.info = {"_AC5", 0, ACPI_RTYPE_INTEGER}},
143 {.info = {"_AC6", 0, ACPI_RTYPE_INTEGER}},
144 {.info = {"_AC7", 0, ACPI_RTYPE_INTEGER}},
145 {.info = {"_AC8", 0, ACPI_RTYPE_INTEGER}},
146 {.info = {"_AC9", 0, ACPI_RTYPE_INTEGER}},
147 {.info = {"_ADR", 0, ACPI_RTYPE_INTEGER}},
148 {.info = {"_AL0", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
149 {.info = {"_AL1", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
150 {.info = {"_AL2", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
151 {.info = {"_AL3", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
152 {.info = {"_AL4", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
153 {.info = {"_AL5", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
154 {.info = {"_AL6", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
155 {.info = {"_AL7", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
156 {.info = {"_AL8", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
157 {.info = {"_AL9", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
158 {.info = {"_ALC", 0, ACPI_RTYPE_INTEGER}},
159 {.info = {"_ALI", 0, ACPI_RTYPE_INTEGER}},
160 {.info = {"_ALP", 0, ACPI_RTYPE_INTEGER}},
161 {.info = {"_ALR", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}}, /* variable (Pkgs) each 2 (Ints) */
162 {.info = {"_ALT", 0, ACPI_RTYPE_INTEGER}},
163 {.info = {"_BBN", 0, ACPI_RTYPE_INTEGER}},
164 {.info = {"_BCL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
165 {.info = {"_BCM", 1, 0}},
166 {.info = {"_BDN", 0, ACPI_RTYPE_INTEGER}},
167 {.info = {"_BFS", 1, 0}},
168 {.info = {"_BIF", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER,
169 9,
170 ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER, 4, 0}}, /* fixed (9 Int),(4 Str) */
171 {.info = {"_BLT", 3, 0}},
172 {.info = {"_BMC", 1, 0}},
173 {.info = {"_BMD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* fixed (5 Int) */
174 {.info = {"_BQC", 0, ACPI_RTYPE_INTEGER}},
175 {.info = {"_BST", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
176 {.info = {"_BTM", 1, ACPI_RTYPE_INTEGER}},
177 {.info = {"_BTP", 1, 0}},
178 {.info = {"_CBA", 0, ACPI_RTYPE_INTEGER}}, /* see PCI firmware spec 3.0 */
179 {.info = {"_CID", 0,
180 ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE}},
181 {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0, 0, 0, 0}}, /* variable (Ints/Strs) */
182 {.info = {"_CRS", 0, ACPI_RTYPE_BUFFER}},
183 {.info = {"_CRT", 0, ACPI_RTYPE_INTEGER}},
184 {.info = {"_CSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (1 Int(n), n-1 Int) */
185 {.info = {"_CST", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_PKG_COUNT,
186 ACPI_RTYPE_BUFFER, 1,
187 ACPI_RTYPE_INTEGER, 3, 0}}, /* variable (1 Int(n), n Pkg (1 Buf/3 Int) */
188 {.info = {"_DCK", 1, ACPI_RTYPE_INTEGER}},
189 {.info = {"_DCS", 0, ACPI_RTYPE_INTEGER}},
190 {.info = {"_DDC", 1, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER}},
191 {.info = {"_DDN", 0, ACPI_RTYPE_STRING}},
192 {.info = {"_DGS", 0, ACPI_RTYPE_INTEGER}},
193 {.info = {"_DIS", 0, 0}},
194 {.info = {"_DMA", 0, ACPI_RTYPE_BUFFER}},
195 {.info = {"_DOD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
196 {.info = {"_DOS", 1, 0}},
197 {.info = {"_DSM", 4, ACPI_RTYPE_ALL}}, /* Must return a type, but it can be of any type */
198 {.info = {"_DSS", 1, 0}},
199 {.info = {"_DSW", 3, 0}},
200 {.info = {"_EC_", 0, ACPI_RTYPE_INTEGER}},
201 {.info = {"_EDL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
202 {.info = {"_EJ0", 1, 0}},
203 {.info = {"_EJ1", 1, 0}},
204 {.info = {"_EJ2", 1, 0}},
205 {.info = {"_EJ3", 1, 0}},
206 {.info = {"_EJ4", 1, 0}},
207 {.info = {"_EJD", 0, ACPI_RTYPE_STRING}},
208 {.info = {"_FDE", 0, ACPI_RTYPE_BUFFER}},
209 {.info = {"_FDI", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, 0, 0, 0}}, /* fixed (16 Int) */
210 {.info = {"_FDM", 1, 0}},
211 {.info = {"_FIX", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
212 {.info = {"_GLK", 0, ACPI_RTYPE_INTEGER}},
213 {.info = {"_GPD", 0, ACPI_RTYPE_INTEGER}},
214 {.info = {"_GPE", 0, ACPI_RTYPE_INTEGER}}, /* _GPE method, not _GPE scope */
215 {.info = {"_GSB", 0, ACPI_RTYPE_INTEGER}},
216 {.info = {"_GTF", 0, ACPI_RTYPE_BUFFER}},
217 {.info = {"_GTM", 0, ACPI_RTYPE_BUFFER}},
218 {.info = {"_GTS", 1, 0}},
219 {.info = {"_HID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
220 {.info = {"_HOT", 0, ACPI_RTYPE_INTEGER}},
221 {.info = {"_HPP", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
222
223 /*
224 * For _HPX, a single package is returned, containing a variable number of sub-packages.
225 * Each sub-package contains a PCI record setting. There are several different type of
226 * record settings, of different lengths, but all elements of all settings are Integers.
227 */
228 {.info = {"_HPX", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each (var Ints) */
229 {.info = {"_IFT", 0, ACPI_RTYPE_INTEGER}}, /* see IPMI spec */
230 {.info = {"_INI", 0, 0}},
231 {.info = {"_IRC", 0, 0}},
232 {.info = {"_LCK", 1, 0}},
233 {.info = {"_LID", 0, ACPI_RTYPE_INTEGER}},
234 {.info = {"_MAT", 0, ACPI_RTYPE_BUFFER}},
235 {.info = {"_MLS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_STRING, 2, 0, 0, 0}}, /* variable (Pkgs) each (2 Str) */
236 {.info = {"_MSG", 1, 0}},
237 {.info = {"_OFF", 0, 0}},
238 {.info = {"_ON_", 0, 0}},
239 {.info = {"_OS_", 0, ACPI_RTYPE_STRING}},
240 {.info = {"_OSC", 4, ACPI_RTYPE_BUFFER}},
241 {.info = {"_OST", 3, 0}},
242 {.info = {"_PCL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
243 {.info = {"_PCT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0}}, /* fixed (2 Buf) */
244 {.info = {"_PDC", 1, 0}},
245 {.info = {"_PIC", 1, 0}},
246 {.info = {"_PLD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_BUFFER, 0, 0, 0, 0}}, /* variable (Bufs) */
247 {.info = {"_PPC", 0, ACPI_RTYPE_INTEGER}},
248 {.info = {"_PPE", 0, ACPI_RTYPE_INTEGER}}, /* see dig64 spec */
249 {.info = {"_PR0", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
250 {.info = {"_PR1", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
251 {.info = {"_PR2", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
252 {.info = {"_PRS", 0, ACPI_RTYPE_BUFFER}},
253
254 /*
255 * For _PRT, many BIOSs reverse the 2nd and 3rd Package elements. This bug is so prevalent that there
256 * is code in the ACPICA Resource Manager to detect this and switch them back. For now, do not allow
257 * and issue a warning. To allow this and eliminate the warning, add the ACPI_RTYPE_REFERENCE
258 * type to the 2nd element (index 1) in the statement below.
259 */
260 {.info = {"_PRT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_FIXED, 4,
261 ACPI_RTYPE_INTEGER,
262 ACPI_RTYPE_INTEGER,
263 ACPI_RTYPE_INTEGER | ACPI_RTYPE_REFERENCE, ACPI_RTYPE_INTEGER}}, /* variable (Pkgs) each (4): Int,Int,Int/Ref,Int */
264
265 {.info = {"_PRW", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_OPTION, 2,
266 ACPI_RTYPE_INTEGER |
267 ACPI_RTYPE_PACKAGE,
268 ACPI_RTYPE_INTEGER, ACPI_RTYPE_REFERENCE, 0}}, /* variable (Pkgs) each: Pkg/Int,Int,[variable Refs] (Pkg is Ref/Int) */
269
270 {.info = {"_PS0", 0, 0}},
271 {.info = {"_PS1", 0, 0}},
272 {.info = {"_PS2", 0, 0}},
273 {.info = {"_PS3", 0, 0}},
274 {.info = {"_PSC", 0, ACPI_RTYPE_INTEGER}},
275 {.info = {"_PSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Pkgs) each (5 Int) with count */
276 {.info = {"_PSL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
277 {.info = {"_PSR", 0, ACPI_RTYPE_INTEGER}},
278 {.info = {"_PSS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 6, 0, 0, 0}}, /* variable (Pkgs) each (6 Int) */
279 {.info = {"_PSV", 0, ACPI_RTYPE_INTEGER}},
280 {.info = {"_PSW", 1, 0}},
281 {.info = {"_PTC", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0}}, /* fixed (2 Buf) */
282 {.info = {"_PTS", 1, 0}},
283 {.info = {"_PXM", 0, ACPI_RTYPE_INTEGER}},
284 {.info = {"_REG", 2, 0}},
285 {.info = {"_REV", 0, ACPI_RTYPE_INTEGER}},
286 {.info = {"_RMV", 0, ACPI_RTYPE_INTEGER}},
287 {.info = {"_ROM", 2, ACPI_RTYPE_BUFFER}},
288 {.info = {"_RTV", 0, ACPI_RTYPE_INTEGER}},
289
290 /*
291 * For _S0_ through _S5_, the ACPI spec defines a return Package containing 1 Integer,
292 * but most DSDTs have it wrong - 2,3, or 4 integers. Allow this by making the objects "variable length",
293 * but all elements must be Integers.
294 */
295 {.info = {"_S0_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
296 {.info = {"_S1_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
297 {.info = {"_S2_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
298 {.info = {"_S3_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
299 {.info = {"_S4_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
300 {.info = {"_S5_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
301
302 {.info = {"_S1D", 0, ACPI_RTYPE_INTEGER}},
303 {.info = {"_S2D", 0, ACPI_RTYPE_INTEGER}},
304 {.info = {"_S3D", 0, ACPI_RTYPE_INTEGER}},
305 {.info = {"_S4D", 0, ACPI_RTYPE_INTEGER}},
306 {.info = {"_S0W", 0, ACPI_RTYPE_INTEGER}},
307 {.info = {"_S1W", 0, ACPI_RTYPE_INTEGER}},
308 {.info = {"_S2W", 0, ACPI_RTYPE_INTEGER}},
309 {.info = {"_S3W", 0, ACPI_RTYPE_INTEGER}},
310 {.info = {"_S4W", 0, ACPI_RTYPE_INTEGER}},
311 {.info = {"_SBS", 0, ACPI_RTYPE_INTEGER}},
312 {.info = {"_SCP", 0x13, 0}}, /* Acpi 1.0 allowed 1 arg. Acpi 3.0 expanded to 3 args. Allow both. */
313 /* Note: the 3-arg definition may be removed for ACPI 4.0 */
314 {.info = {"_SDD", 1, 0}},
315 {.info = {"_SEG", 0, ACPI_RTYPE_INTEGER}},
316 {.info = {"_SLI", 0, ACPI_RTYPE_BUFFER}},
317 {.info = {"_SPD", 1, ACPI_RTYPE_INTEGER}},
318 {.info = {"_SRS", 1, 0}},
319 {.info = {"_SRV", 0, ACPI_RTYPE_INTEGER}}, /* see IPMI spec */
320 {.info = {"_SST", 1, 0}},
321 {.info = {"_STA", 0, ACPI_RTYPE_INTEGER}},
322 {.info = {"_STM", 3, 0}},
323 {.info = {"_STR", 0, ACPI_RTYPE_BUFFER}},
324 {.info = {"_SUN", 0, ACPI_RTYPE_INTEGER}},
325 {.info = {"_SWS", 0, ACPI_RTYPE_INTEGER}},
326 {.info = {"_TC1", 0, ACPI_RTYPE_INTEGER}},
327 {.info = {"_TC2", 0, ACPI_RTYPE_INTEGER}},
328 {.info = {"_TMP", 0, ACPI_RTYPE_INTEGER}},
329 {.info = {"_TPC", 0, ACPI_RTYPE_INTEGER}},
330 {.info = {"_TPT", 1, 0}},
331 {.info = {"_TRT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2,
332 ACPI_RTYPE_INTEGER, 6, 0}}, /* variable (Pkgs) each 2_ref/6_int */
333 {.info = {"_TSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each 5_int with count */
334 {.info = {"_TSP", 0, ACPI_RTYPE_INTEGER}},
335 {.info = {"_TSS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each 5_int */
336 {.info = {"_TST", 0, ACPI_RTYPE_INTEGER}},
337 {.info = {"_TTS", 1, 0}},
338 {.info = {"_TZD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
339 {.info = {"_TZM", 0, ACPI_RTYPE_REFERENCE}},
340 {.info = {"_TZP", 0, ACPI_RTYPE_INTEGER}},
341 {.info = {"_UID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
342 {.info = {"_UPC", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
343 {.info = {"_UPD", 0, ACPI_RTYPE_INTEGER}},
344 {.info = {"_UPP", 0, ACPI_RTYPE_INTEGER}},
345 {.info = {"_VPO", 0, ACPI_RTYPE_INTEGER}},
346
347 /* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */
348
349 {.info = {"_WAK", 1, ACPI_RTYPE_NONE | ACPI_RTYPE_INTEGER | ACPI_RTYPE_PACKAGE}},
350 {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}}, /* fixed (2 Int), but is optional */
351 {.ret_info = {0, 0, 0, 0, 0, 0}} /* Table terminator */
352};
353
354#if 0
355 /* Not implemented */
356
357{
358"_WDG", 0, ACPI_RTYPE_BUFFER}, /* MS Extension */
359
360{
361"_WED", 1, ACPI_RTYPE_PACKAGE}, /* MS Extension */
362
363 /* This is an internally implemented control method, no need to check */
364{
365"_OSI", 1, ACPI_RTYPE_INTEGER},
366
367 /* TBD: */
368 _PRT - currently ignore reversed entries.attempt to fix here ?
369 think about code that attempts to fix package elements like _BIF, etc.
370#endif
371#endif
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index d38f9be2f6ee..63f5b4cf4de1 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -908,7 +908,9 @@ enum acpi_madt_type {
908 ACPI_MADT_TYPE_IO_SAPIC = 6, 908 ACPI_MADT_TYPE_IO_SAPIC = 6,
909 ACPI_MADT_TYPE_LOCAL_SAPIC = 7, 909 ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
910 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, 910 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
911 ACPI_MADT_TYPE_RESERVED = 9 /* 9 and greater are reserved */ 911 ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
912 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
913 ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
912}; 914};
913 915
914/* 916/*
@@ -1009,6 +1011,26 @@ struct acpi_madt_interrupt_source {
1009 1011
1010#define ACPI_MADT_CPEI_OVERRIDE (1) 1012#define ACPI_MADT_CPEI_OVERRIDE (1)
1011 1013
1014/* 9: Processor Local X2_APIC (07/2008) */
1015
1016struct acpi_madt_local_x2apic {
1017 struct acpi_subtable_header header;
1018 u16 reserved; /* Reserved - must be zero */
1019 u32 local_apic_id; /* Processor X2_APIC ID */
1020 u32 lapic_flags;
1021 u32 uid; /* Extended X2_APIC processor ID */
1022};
1023
1024/* 10: Local X2APIC NMI (07/2008) */
1025
1026struct acpi_madt_local_x2apic_nmi {
1027 struct acpi_subtable_header header;
1028 u16 inti_flags;
1029 u32 uid; /* Processor X2_APIC ID */
1030 u8 lint; /* LINTn to which NMI is connected */
1031 u8 reserved[3];
1032};
1033
1012/* 1034/*
1013 * Common flags fields for MADT subtables 1035 * Common flags fields for MADT subtables
1014 */ 1036 */
@@ -1150,10 +1172,15 @@ struct acpi_table_srat {
1150enum acpi_srat_type { 1172enum acpi_srat_type {
1151 ACPI_SRAT_TYPE_CPU_AFFINITY = 0, 1173 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
1152 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, 1174 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
1153 ACPI_SRAT_TYPE_RESERVED = 2 1175 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
1176 ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
1154}; 1177};
1155 1178
1156/* SRAT sub-tables */ 1179/*
1180 * SRAT Sub-tables, correspond to Type in struct acpi_subtable_header
1181 */
1182
1183/* 0: Processor Local APIC/SAPIC Affinity */
1157 1184
1158struct acpi_srat_cpu_affinity { 1185struct acpi_srat_cpu_affinity {
1159 struct acpi_subtable_header header; 1186 struct acpi_subtable_header header;
@@ -1165,9 +1192,7 @@ struct acpi_srat_cpu_affinity {
1165 u32 reserved; /* Reserved, must be zero */ 1192 u32 reserved; /* Reserved, must be zero */
1166}; 1193};
1167 1194
1168/* Flags */ 1195/* 1: Memory Affinity */
1169
1170#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1171 1196
1172struct acpi_srat_mem_affinity { 1197struct acpi_srat_mem_affinity {
1173 struct acpi_subtable_header header; 1198 struct acpi_subtable_header header;
@@ -1186,6 +1211,20 @@ struct acpi_srat_mem_affinity {
1186#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ 1211#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
1187#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ 1212#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
1188 1213
1214/* 2: Processor Local X2_APIC Affinity (07/2008) */
1215
1216struct acpi_srat_x2apic_cpu_affinity {
1217 struct acpi_subtable_header header;
1218 u16 reserved; /* Reserved, must be zero */
1219 u32 proximity_domain;
1220 u32 apic_id;
1221 u32 flags;
1222};
1223
1224/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */
1225
1226#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
1227
1189/******************************************************************************* 1228/*******************************************************************************
1190 * 1229 *
1191 * TCPA - Trusted Computing Platform Alliance table 1230 * TCPA - Trusted Computing Platform Alliance table
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 4ea4f40bf894..7220361790b3 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -525,6 +525,7 @@ typedef u32 acpi_event_status;
525#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01 525#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
526#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02 526#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02
527#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04 527#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04
528#define ACPI_EVENT_FLAG_HANDLE (acpi_event_status) 0x08
528 529
529/* 530/*
530 * General Purpose Events (GPE) 531 * General Purpose Events (GPE)
@@ -607,8 +608,15 @@ typedef u8 acpi_adr_space_type;
607 608
608/* 609/*
609 * bit_register IDs 610 * bit_register IDs
610 * These are bitfields defined within the full ACPI registers 611 *
612 * These values are intended to be used by the hardware interfaces
613 * and are mapped to individual bitfields defined within the ACPI
614 * registers. See the acpi_gbl_bit_register_info global table in utglobal.c
615 * for this mapping.
611 */ 616 */
617
618/* PM1 Status register */
619
612#define ACPI_BITREG_TIMER_STATUS 0x00 620#define ACPI_BITREG_TIMER_STATUS 0x00
613#define ACPI_BITREG_BUS_MASTER_STATUS 0x01 621#define ACPI_BITREG_BUS_MASTER_STATUS 0x01
614#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02 622#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02
@@ -618,24 +626,29 @@ typedef u8 acpi_adr_space_type;
618#define ACPI_BITREG_WAKE_STATUS 0x06 626#define ACPI_BITREG_WAKE_STATUS 0x06
619#define ACPI_BITREG_PCIEXP_WAKE_STATUS 0x07 627#define ACPI_BITREG_PCIEXP_WAKE_STATUS 0x07
620 628
629/* PM1 Enable register */
630
621#define ACPI_BITREG_TIMER_ENABLE 0x08 631#define ACPI_BITREG_TIMER_ENABLE 0x08
622#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x09 632#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x09
623#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x0A 633#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x0A
624#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0B 634#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0B
625#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0C 635#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0C
626#define ACPI_BITREG_WAKE_ENABLE 0x0D 636#define ACPI_BITREG_PCIEXP_WAKE_DISABLE 0x0D
627#define ACPI_BITREG_PCIEXP_WAKE_DISABLE 0x0E 637
638/* PM1 Control register */
639
640#define ACPI_BITREG_SCI_ENABLE 0x0E
641#define ACPI_BITREG_BUS_MASTER_RLD 0x0F
642#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x10
643#define ACPI_BITREG_SLEEP_TYPE_A 0x11
644#define ACPI_BITREG_SLEEP_TYPE_B 0x12
645#define ACPI_BITREG_SLEEP_ENABLE 0x13
628 646
629#define ACPI_BITREG_SCI_ENABLE 0x0F 647/* PM2 Control register */
630#define ACPI_BITREG_BUS_MASTER_RLD 0x10
631#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x11
632#define ACPI_BITREG_SLEEP_TYPE_A 0x12
633#define ACPI_BITREG_SLEEP_TYPE_B 0x13
634#define ACPI_BITREG_SLEEP_ENABLE 0x14
635 648
636#define ACPI_BITREG_ARB_DISABLE 0x15 649#define ACPI_BITREG_ARB_DISABLE 0x14
637 650
638#define ACPI_BITREG_MAX 0x15 651#define ACPI_BITREG_MAX 0x14
639#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 652#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1
640 653
641/* 654/*
@@ -859,6 +872,7 @@ struct acpi_obj_info_header {
859struct acpi_device_info { 872struct acpi_device_info {
860 ACPI_COMMON_OBJ_INFO; 873 ACPI_COMMON_OBJ_INFO;
861 874
875 u32 param_count; /* If a method, required parameter count */
862 u32 valid; /* Indicates which fields below are valid */ 876 u32 valid; /* Indicates which fields below are valid */
863 u32 current_status; /* _STA value */ 877 u32 current_status; /* _STA value */
864 acpi_integer address; /* _ADR value if any */ 878 acpi_integer address; /* _ADR value if any */
@@ -1225,8 +1239,8 @@ struct acpi_resource {
1225 1239
1226#pragma pack() 1240#pragma pack()
1227 1241
1228#define ACPI_RS_SIZE_MIN 12
1229#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ 1242#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
1243#define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
1230#define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) 1244#define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
1231 1245
1232#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) 1246#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length)
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h
index 69f8888771ff..d8307b2987e3 100644
--- a/include/acpi/acutils.h
+++ b/include/acpi/acutils.h
@@ -110,7 +110,7 @@ struct acpi_pkg_info {
110/* 110/*
111 * utglobal - Global data structures and procedures 111 * utglobal - Global data structures and procedures
112 */ 112 */
113void acpi_ut_init_globals(void); 113acpi_status acpi_ut_init_globals(void);
114 114
115#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 115#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
116 116
@@ -126,6 +126,8 @@ char *acpi_ut_get_node_name(void *object);
126 126
127char *acpi_ut_get_descriptor_name(void *object); 127char *acpi_ut_get_descriptor_name(void *object);
128 128
129const char *acpi_ut_get_reference_name(union acpi_operand_object *object);
130
129char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc); 131char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
130 132
131char *acpi_ut_get_region_name(u8 space_id); 133char *acpi_ut_get_region_name(u8 space_id);
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h
index 8996dba90cd9..8e2cdc57b197 100644
--- a/include/acpi/platform/acgcc.h
+++ b/include/acpi/platform/acgcc.h
@@ -46,7 +46,7 @@
46 46
47/* Function name is used for debug output. Non-ANSI, compiler-dependent */ 47/* Function name is used for debug output. Non-ANSI, compiler-dependent */
48 48
49#define ACPI_GET_FUNCTION_NAME __FUNCTION__ 49#define ACPI_GET_FUNCTION_NAME __func__
50 50
51/* 51/*
52 * This macro is used to tag functions as "printf-like" because 52 * This macro is used to tag functions as "printf-like" because
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 9af464598682..0515e754449d 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -53,6 +53,7 @@
53#include <linux/kernel.h> 53#include <linux/kernel.h>
54#include <linux/module.h> 54#include <linux/module.h>
55#include <linux/ctype.h> 55#include <linux/ctype.h>
56#include <linux/sched.h>
56#include <asm/system.h> 57#include <asm/system.h>
57#include <asm/atomic.h> 58#include <asm/atomic.h>
58#include <asm/div64.h> 59#include <asm/div64.h>
@@ -137,4 +138,13 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
137#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) 138#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
138#define ACPI_FREE(a) kfree(a) 139#define ACPI_FREE(a) kfree(a)
139 140
141/*
142 * We need to show where it is safe to preempt execution of ACPICA
143 */
144#define ACPI_PREEMPTION_POINT() \
145 do { \
146 if (!irqs_disabled()) \
147 cond_resched(); \
148 } while (0)
149
140#endif /* __ACLINUX_H__ */ 150#endif /* __ACLINUX_H__ */
diff --git a/include/asm-arm/plat-s3c/debug-macro.S b/include/asm-arm/plat-s3c/debug-macro.S
deleted file mode 100644
index 84c40b847da8..000000000000
--- a/include/asm-arm/plat-s3c/debug-macro.S
+++ /dev/null
@@ -1,75 +0,0 @@
1/* linux/include/asm-arm/plat-s3c/debug-macro.S
2 *
3 * Copyright 2005, 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include <asm/plat-s3c/regs-serial.h>
13
14/* The S3C2440 implementations are used by default as they are the
15 * most widely re-used */
16
17 .macro fifo_level_s3c2440 rd, rx
18 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
19 and \rd, \rd, #S3C2440_UFSTAT_TXMASK
20 .endm
21
22#ifndef fifo_level
23#define fifo_level fifo_level_s3c2410
24#endif
25
26 .macro fifo_full_s3c2440 rd, rx
27 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
28 tst \rd, #S3C2440_UFSTAT_TXFULL
29 .endm
30
31#ifndef fifo_full
32#define fifo_full fifo_full_s3c2440
33#endif
34
35 .macro senduart,rd,rx
36 strb \rd, [\rx, # S3C2410_UTXH ]
37 .endm
38
39 .macro busyuart, rd, rx
40 ldr \rd, [ \rx, # S3C2410_UFCON ]
41 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
42 beq 1001f @
43 @ FIFO enabled...
441003:
45 fifo_full \rd, \rx
46 bne 1003b
47 b 1002f
48
491001:
50 @ busy waiting for non fifo
51 ldr \rd, [ \rx, # S3C2410_UTRSTAT ]
52 tst \rd, #S3C2410_UTRSTAT_TXFE
53 beq 1001b
54
551002: @ exit busyuart
56 .endm
57
58 .macro waituart,rd,rx
59 ldr \rd, [ \rx, # S3C2410_UFCON ]
60 tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled?
61 beq 1001f @
62 @ FIFO enabled...
631003:
64 fifo_level \rd, \rx
65 teq \rd, #0
66 bne 1003b
67 b 1002f
681001:
69 @ idle waiting for non fifo
70 ldr \rd, [ \rx, # S3C2410_UTRSTAT ]
71 tst \rd, #S3C2410_UTRSTAT_TXFE
72 beq 1001b
73
741002: @ exit busyuart
75 .endm
diff --git a/include/asm-arm/plat-s3c/iic.h b/include/asm-arm/plat-s3c/iic.h
deleted file mode 100644
index 5106acaa1d0e..000000000000
--- a/include/asm-arm/plat-s3c/iic.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/iic.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - I2C Controller platfrom_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_IIC_H
14#define __ASM_ARCH_IIC_H __FILE__
15
16#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
17
18/* Notes:
19 * 1) All frequencies are expressed in Hz
20 * 2) A value of zero is `do not care`
21*/
22
23struct s3c2410_platform_i2c {
24 int bus_num; /* bus number to use */
25 unsigned int flags;
26 unsigned int slave_addr; /* slave address for controller */
27 unsigned long bus_freq; /* standard bus frequency */
28 unsigned long max_freq; /* max frequency for the bus */
29 unsigned long min_freq; /* min frequency for the bus */
30 unsigned int sda_delay; /* pclks (s3c2440 only) */
31};
32
33#endif /* __ASM_ARCH_IIC_H */
diff --git a/include/asm-arm/plat-s3c/map.h b/include/asm-arm/plat-s3c/map.h
deleted file mode 100644
index b84289d32a54..000000000000
--- a/include/asm-arm/plat-s3c/map.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/include/asm-arm/plat-s3c/map.h
2 *
3 * Copyright 2003, 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C - Memory map definitions (virtual addresses)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_PLAT_MAP_H
15#define __ASM_PLAT_MAP_H __FILE__
16
17/* Fit all our registers in at 0xF4000000 upwards, trying to use as
18 * little of the VA space as possible so vmalloc and friends have a
19 * better chance of getting memory.
20 *
21 * we try to ensure stuff like the IRQ registers are available for
22 * an single MOVS instruction (ie, only 8 bits of set data)
23 */
24
25#define S3C_ADDR_BASE (0xF4000000)
26
27#ifndef __ASSEMBLY__
28#define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x))
29#else
30#define S3C_ADDR(x) (S3C_ADDR_BASE + (x))
31#endif
32
33#define S3C_VA_IRQ S3C_ADDR(0x00000000) /* irq controller(s) */
34#define S3C_VA_SYS S3C_ADDR(0x00100000) /* system control */
35#define S3C_VA_MEM S3C_ADDR(0x00200000) /* system control */
36#define S3C_VA_TIMER S3C_ADDR(0x00300000) /* timer block */
37#define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */
38#define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */
39
40#endif /* __ASM_PLAT_MAP_H */
diff --git a/include/asm-arm/plat-s3c/nand.h b/include/asm-arm/plat-s3c/nand.h
deleted file mode 100644
index f4dcd14af059..000000000000
--- a/include/asm-arm/plat-s3c/nand.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/nand.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - NAND device controller platfrom_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* struct s3c2410_nand_set
14 *
15 * define an set of one or more nand chips registered with an unique mtd
16 *
17 * nr_chips = number of chips in this set
18 * nr_partitions = number of partitions pointed to be partitoons (or zero)
19 * name = name of set (optional)
20 * nr_map = map for low-layer logical to physical chip numbers (option)
21 * partitions = mtd partition list
22*/
23
24struct s3c2410_nand_set {
25 unsigned int disable_ecc : 1;
26
27 int nr_chips;
28 int nr_partitions;
29 char *name;
30 int *nr_map;
31 struct mtd_partition *partitions;
32 struct nand_ecclayout *ecc_layout;
33};
34
35struct s3c2410_platform_nand {
36 /* timing information for controller, all times in nanoseconds */
37
38 int tacls; /* time for active CLE/ALE to nWE/nOE */
39 int twrph0; /* active time for nWE/nOE */
40 int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */
41
42 unsigned int ignore_unset_ecc : 1;
43
44 int nr_sets;
45 struct s3c2410_nand_set *sets;
46
47 void (*select_chip)(struct s3c2410_nand_set *,
48 int chip);
49};
50
diff --git a/include/asm-arm/plat-s3c/regs-ac97.h b/include/asm-arm/plat-s3c/regs-ac97.h
deleted file mode 100644
index c3878f7acb83..000000000000
--- a/include/asm-arm/plat-s3c/regs-ac97.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-ac97.h
2 *
3 * Copyright (c) 2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2440 AC97 Controller
11*/
12
13#ifndef __ASM_ARCH_REGS_AC97_H
14#define __ASM_ARCH_REGS_AC97_H __FILE__
15
16#define S3C_AC97_GLBCTRL (0x00)
17
18#define S3C_AC97_GLBCTRL_CODECREADYIE (1<<22)
19#define S3C_AC97_GLBCTRL_PCMOUTURIE (1<<21)
20#define S3C_AC97_GLBCTRL_PCMINORIE (1<<20)
21#define S3C_AC97_GLBCTRL_MICINORIE (1<<19)
22#define S3C_AC97_GLBCTRL_PCMOUTTIE (1<<18)
23#define S3C_AC97_GLBCTRL_PCMINTIE (1<<17)
24#define S3C_AC97_GLBCTRL_MICINTIE (1<<16)
25#define S3C_AC97_GLBCTRL_PCMOUTTM_OFF (0<<12)
26#define S3C_AC97_GLBCTRL_PCMOUTTM_PIO (1<<12)
27#define S3C_AC97_GLBCTRL_PCMOUTTM_DMA (2<<12)
28#define S3C_AC97_GLBCTRL_PCMOUTTM_MASK (3<<12)
29#define S3C_AC97_GLBCTRL_PCMINTM_OFF (0<<10)
30#define S3C_AC97_GLBCTRL_PCMINTM_PIO (1<<10)
31#define S3C_AC97_GLBCTRL_PCMINTM_DMA (2<<10)
32#define S3C_AC97_GLBCTRL_PCMINTM_MASK (3<<10)
33#define S3C_AC97_GLBCTRL_MICINTM_OFF (0<<8)
34#define S3C_AC97_GLBCTRL_MICINTM_PIO (1<<8)
35#define S3C_AC97_GLBCTRL_MICINTM_DMA (2<<8)
36#define S3C_AC97_GLBCTRL_MICINTM_MASK (3<<8)
37#define S3C_AC97_GLBCTRL_TRANSFERDATAENABLE (1<<3)
38#define S3C_AC97_GLBCTRL_ACLINKON (1<<2)
39#define S3C_AC97_GLBCTRL_WARMRESET (1<<1)
40#define S3C_AC97_GLBCTRL_COLDRESET (1<<0)
41
42#define S3C_AC97_GLBSTAT (0x04)
43
44#define S3C_AC97_GLBSTAT_CODECREADY (1<<22)
45#define S3C_AC97_GLBSTAT_PCMOUTUR (1<<21)
46#define S3C_AC97_GLBSTAT_PCMINORI (1<<20)
47#define S3C_AC97_GLBSTAT_MICINORI (1<<19)
48#define S3C_AC97_GLBSTAT_PCMOUTTI (1<<18)
49#define S3C_AC97_GLBSTAT_PCMINTI (1<<17)
50#define S3C_AC97_GLBSTAT_MICINTI (1<<16)
51#define S3C_AC97_GLBSTAT_MAINSTATE_IDLE (0<<0)
52#define S3C_AC97_GLBSTAT_MAINSTATE_INIT (1<<0)
53#define S3C_AC97_GLBSTAT_MAINSTATE_READY (2<<0)
54#define S3C_AC97_GLBSTAT_MAINSTATE_ACTIVE (3<<0)
55#define S3C_AC97_GLBSTAT_MAINSTATE_LP (4<<0)
56#define S3C_AC97_GLBSTAT_MAINSTATE_WARM (5<<0)
57
58#define S3C_AC97_CODEC_CMD (0x08)
59
60#define S3C_AC97_CODEC_CMD_READ (1<<23)
61
62#define S3C_AC97_STAT (0x0c)
63#define S3C_AC97_PCM_ADDR (0x10)
64#define S3C_AC97_PCM_DATA (0x18)
65#define S3C_AC97_MIC_DATA (0x1C)
66
67#endif /* __ASM_ARCH_REGS_AC97_H */
diff --git a/include/asm-arm/plat-s3c/regs-adc.h b/include/asm-arm/plat-s3c/regs-adc.h
deleted file mode 100644
index 4323cccc86cd..000000000000
--- a/include/asm-arm/plat-s3c/regs-adc.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-adc.h
2 *
3 * Copyright (c) 2004 Shannon Holland <holland@loser.net>
4 *
5 * This program is free software; yosu can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * S3C2410 ADC registers
10*/
11
12#ifndef __ASM_ARCH_REGS_ADC_H
13#define __ASM_ARCH_REGS_ADC_H "regs-adc.h"
14
15#define S3C2410_ADCREG(x) (x)
16
17#define S3C2410_ADCCON S3C2410_ADCREG(0x00)
18#define S3C2410_ADCTSC S3C2410_ADCREG(0x04)
19#define S3C2410_ADCDLY S3C2410_ADCREG(0x08)
20#define S3C2410_ADCDAT0 S3C2410_ADCREG(0x0C)
21#define S3C2410_ADCDAT1 S3C2410_ADCREG(0x10)
22
23
24/* ADCCON Register Bits */
25#define S3C2410_ADCCON_ECFLG (1<<15)
26#define S3C2410_ADCCON_PRSCEN (1<<14)
27#define S3C2410_ADCCON_PRSCVL(x) (((x)&0xFF)<<6)
28#define S3C2410_ADCCON_PRSCVLMASK (0xFF<<6)
29#define S3C2410_ADCCON_SELMUX(x) (((x)&0x7)<<3)
30#define S3C2410_ADCCON_MUXMASK (0x7<<3)
31#define S3C2410_ADCCON_STDBM (1<<2)
32#define S3C2410_ADCCON_READ_START (1<<1)
33#define S3C2410_ADCCON_ENABLE_START (1<<0)
34#define S3C2410_ADCCON_STARTMASK (0x3<<0)
35
36
37/* ADCTSC Register Bits */
38#define S3C2410_ADCTSC_YM_SEN (1<<7)
39#define S3C2410_ADCTSC_YP_SEN (1<<6)
40#define S3C2410_ADCTSC_XM_SEN (1<<5)
41#define S3C2410_ADCTSC_XP_SEN (1<<4)
42#define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3)
43#define S3C2410_ADCTSC_AUTO_PST (1<<2)
44#define S3C2410_ADCTSC_XY_PST(x) (((x)&0x3)<<0)
45
46/* ADCDAT0 Bits */
47#define S3C2410_ADCDAT0_UPDOWN (1<<15)
48#define S3C2410_ADCDAT0_AUTO_PST (1<<14)
49#define S3C2410_ADCDAT0_XY_PST (0x3<<12)
50#define S3C2410_ADCDAT0_XPDATA_MASK (0x03FF)
51
52/* ADCDAT1 Bits */
53#define S3C2410_ADCDAT1_UPDOWN (1<<15)
54#define S3C2410_ADCDAT1_AUTO_PST (1<<14)
55#define S3C2410_ADCDAT1_XY_PST (0x3<<12)
56#define S3C2410_ADCDAT1_YPDATA_MASK (0x03FF)
57
58#endif /* __ASM_ARCH_REGS_ADC_H */
59
60
diff --git a/include/asm-arm/plat-s3c/regs-iic.h b/include/asm-arm/plat-s3c/regs-iic.h
deleted file mode 100644
index 2f7c17de8ac8..000000000000
--- a/include/asm-arm/plat-s3c/regs-iic.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-iic.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 I2C Controller
11*/
12
13#ifndef __ASM_ARCH_REGS_IIC_H
14#define __ASM_ARCH_REGS_IIC_H __FILE__
15
16/* see s3c2410x user guide, v1.1, section 9 (p447) for more info */
17
18#define S3C2410_IICREG(x) (x)
19
20#define S3C2410_IICCON S3C2410_IICREG(0x00)
21#define S3C2410_IICSTAT S3C2410_IICREG(0x04)
22#define S3C2410_IICADD S3C2410_IICREG(0x08)
23#define S3C2410_IICDS S3C2410_IICREG(0x0C)
24#define S3C2440_IICLC S3C2410_IICREG(0x10)
25
26#define S3C2410_IICCON_ACKEN (1<<7)
27#define S3C2410_IICCON_TXDIV_16 (0<<6)
28#define S3C2410_IICCON_TXDIV_512 (1<<6)
29#define S3C2410_IICCON_IRQEN (1<<5)
30#define S3C2410_IICCON_IRQPEND (1<<4)
31#define S3C2410_IICCON_SCALE(x) ((x)&15)
32#define S3C2410_IICCON_SCALEMASK (0xf)
33
34#define S3C2410_IICSTAT_MASTER_RX (2<<6)
35#define S3C2410_IICSTAT_MASTER_TX (3<<6)
36#define S3C2410_IICSTAT_SLAVE_RX (0<<6)
37#define S3C2410_IICSTAT_SLAVE_TX (1<<6)
38#define S3C2410_IICSTAT_MODEMASK (3<<6)
39
40#define S3C2410_IICSTAT_START (1<<5)
41#define S3C2410_IICSTAT_BUSBUSY (1<<5)
42#define S3C2410_IICSTAT_TXRXEN (1<<4)
43#define S3C2410_IICSTAT_ARBITR (1<<3)
44#define S3C2410_IICSTAT_ASSLAVE (1<<2)
45#define S3C2410_IICSTAT_ADDR0 (1<<1)
46#define S3C2410_IICSTAT_LASTBIT (1<<0)
47
48#define S3C2410_IICLC_SDA_DELAY0 (0 << 0)
49#define S3C2410_IICLC_SDA_DELAY5 (1 << 0)
50#define S3C2410_IICLC_SDA_DELAY10 (2 << 0)
51#define S3C2410_IICLC_SDA_DELAY15 (3 << 0)
52#define S3C2410_IICLC_SDA_DELAY_MASK (3 << 0)
53
54#define S3C2410_IICLC_FILTER_ON (1<<2)
55
56#endif /* __ASM_ARCH_REGS_IIC_H */
diff --git a/include/asm-arm/plat-s3c/regs-nand.h b/include/asm-arm/plat-s3c/regs-nand.h
deleted file mode 100644
index b2caa4bca270..000000000000
--- a/include/asm-arm/plat-s3c/regs-nand.h
+++ /dev/null
@@ -1,123 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-nand.h
2 *
3 * Copyright (c) 2004,2005 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 NAND register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_NAND
14#define __ASM_ARM_REGS_NAND
15
16
17#define S3C2410_NFREG(x) (x)
18
19#define S3C2410_NFCONF S3C2410_NFREG(0x00)
20#define S3C2410_NFCMD S3C2410_NFREG(0x04)
21#define S3C2410_NFADDR S3C2410_NFREG(0x08)
22#define S3C2410_NFDATA S3C2410_NFREG(0x0C)
23#define S3C2410_NFSTAT S3C2410_NFREG(0x10)
24#define S3C2410_NFECC S3C2410_NFREG(0x14)
25
26#define S3C2440_NFCONT S3C2410_NFREG(0x04)
27#define S3C2440_NFCMD S3C2410_NFREG(0x08)
28#define S3C2440_NFADDR S3C2410_NFREG(0x0C)
29#define S3C2440_NFDATA S3C2410_NFREG(0x10)
30#define S3C2440_NFECCD0 S3C2410_NFREG(0x14)
31#define S3C2440_NFECCD1 S3C2410_NFREG(0x18)
32#define S3C2440_NFECCD S3C2410_NFREG(0x1C)
33#define S3C2440_NFSTAT S3C2410_NFREG(0x20)
34#define S3C2440_NFESTAT0 S3C2410_NFREG(0x24)
35#define S3C2440_NFESTAT1 S3C2410_NFREG(0x28)
36#define S3C2440_NFMECC0 S3C2410_NFREG(0x2C)
37#define S3C2440_NFMECC1 S3C2410_NFREG(0x30)
38#define S3C2440_NFSECC S3C2410_NFREG(0x34)
39#define S3C2440_NFSBLK S3C2410_NFREG(0x38)
40#define S3C2440_NFEBLK S3C2410_NFREG(0x3C)
41
42#define S3C2412_NFSBLK S3C2410_NFREG(0x20)
43#define S3C2412_NFEBLK S3C2410_NFREG(0x24)
44#define S3C2412_NFSTAT S3C2410_NFREG(0x28)
45#define S3C2412_NFMECC_ERR0 S3C2410_NFREG(0x2C)
46#define S3C2412_NFMECC_ERR1 S3C2410_NFREG(0x30)
47#define S3C2412_NFMECC0 S3C2410_NFREG(0x34)
48#define S3C2412_NFMECC1 S3C2410_NFREG(0x38)
49#define S3C2412_NFSECC S3C2410_NFREG(0x3C)
50
51#define S3C2410_NFCONF_EN (1<<15)
52#define S3C2410_NFCONF_512BYTE (1<<14)
53#define S3C2410_NFCONF_4STEP (1<<13)
54#define S3C2410_NFCONF_INITECC (1<<12)
55#define S3C2410_NFCONF_nFCE (1<<11)
56#define S3C2410_NFCONF_TACLS(x) ((x)<<8)
57#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4)
58#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0)
59
60#define S3C2410_NFSTAT_BUSY (1<<0)
61
62#define S3C2440_NFCONF_BUSWIDTH_8 (0<<0)
63#define S3C2440_NFCONF_BUSWIDTH_16 (1<<0)
64#define S3C2440_NFCONF_ADVFLASH (1<<3)
65#define S3C2440_NFCONF_TACLS(x) ((x)<<12)
66#define S3C2440_NFCONF_TWRPH0(x) ((x)<<8)
67#define S3C2440_NFCONF_TWRPH1(x) ((x)<<4)
68
69#define S3C2440_NFCONT_LOCKTIGHT (1<<13)
70#define S3C2440_NFCONT_SOFTLOCK (1<<12)
71#define S3C2440_NFCONT_ILLEGALACC_EN (1<<10)
72#define S3C2440_NFCONT_RNBINT_EN (1<<9)
73#define S3C2440_NFCONT_RN_FALLING (1<<8)
74#define S3C2440_NFCONT_SPARE_ECCLOCK (1<<6)
75#define S3C2440_NFCONT_MAIN_ECCLOCK (1<<5)
76#define S3C2440_NFCONT_INITECC (1<<4)
77#define S3C2440_NFCONT_nFCE (1<<1)
78#define S3C2440_NFCONT_ENABLE (1<<0)
79
80#define S3C2440_NFSTAT_READY (1<<0)
81#define S3C2440_NFSTAT_nCE (1<<1)
82#define S3C2440_NFSTAT_RnB_CHANGE (1<<2)
83#define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3)
84
85#define S3C2412_NFCONF_NANDBOOT (1<<31)
86#define S3C2412_NFCONF_ECCCLKCON (1<<30)
87#define S3C2412_NFCONF_ECC_MLC (1<<24)
88#define S3C2412_NFCONF_TACLS_MASK (7<<12) /* 1 extra bit of Tacls */
89
90#define S3C2412_NFCONT_ECC4_DIRWR (1<<18)
91#define S3C2412_NFCONT_LOCKTIGHT (1<<17)
92#define S3C2412_NFCONT_SOFTLOCK (1<<16)
93#define S3C2412_NFCONT_ECC4_ENCINT (1<<13)
94#define S3C2412_NFCONT_ECC4_DECINT (1<<12)
95#define S3C2412_NFCONT_MAIN_ECC_LOCK (1<<7)
96#define S3C2412_NFCONT_INIT_MAIN_ECC (1<<5)
97#define S3C2412_NFCONT_nFCE1 (1<<2)
98#define S3C2412_NFCONT_nFCE0 (1<<1)
99
100#define S3C2412_NFSTAT_ECC_ENCDONE (1<<7)
101#define S3C2412_NFSTAT_ECC_DECDONE (1<<6)
102#define S3C2412_NFSTAT_ILLEGAL_ACCESS (1<<5)
103#define S3C2412_NFSTAT_RnB_CHANGE (1<<4)
104#define S3C2412_NFSTAT_nFCE1 (1<<3)
105#define S3C2412_NFSTAT_nFCE0 (1<<2)
106#define S3C2412_NFSTAT_Res1 (1<<1)
107#define S3C2412_NFSTAT_READY (1<<0)
108
109#define S3C2412_NFECCERR_SERRDATA(x) (((x) >> 21) & 0xf)
110#define S3C2412_NFECCERR_SERRBIT(x) (((x) >> 18) & 0x7)
111#define S3C2412_NFECCERR_MERRDATA(x) (((x) >> 7) & 0x3ff)
112#define S3C2412_NFECCERR_MERRBIT(x) (((x) >> 4) & 0x7)
113#define S3C2412_NFECCERR_SPARE_ERR(x) (((x) >> 2) & 0x3)
114#define S3C2412_NFECCERR_MAIN_ERR(x) (((x) >> 2) & 0x3)
115#define S3C2412_NFECCERR_NONE (0)
116#define S3C2412_NFECCERR_1BIT (1)
117#define S3C2412_NFECCERR_MULTIBIT (2)
118#define S3C2412_NFECCERR_ECCAREA (3)
119
120
121
122#endif /* __ASM_ARM_REGS_NAND */
123
diff --git a/include/asm-arm/plat-s3c/regs-rtc.h b/include/asm-arm/plat-s3c/regs-rtc.h
deleted file mode 100644
index d5837cf8e402..000000000000
--- a/include/asm-arm/plat-s3c/regs-rtc.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-rtc.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 Internal RTC register definition
11*/
12
13#ifndef __ASM_ARCH_REGS_RTC_H
14#define __ASM_ARCH_REGS_RTC_H __FILE__
15
16#define S3C2410_RTCREG(x) (x)
17
18#define S3C2410_RTCCON S3C2410_RTCREG(0x40)
19#define S3C2410_RTCCON_RTCEN (1<<0)
20#define S3C2410_RTCCON_CLKSEL (1<<1)
21#define S3C2410_RTCCON_CNTSEL (1<<2)
22#define S3C2410_RTCCON_CLKRST (1<<3)
23
24#define S3C2410_TICNT S3C2410_RTCREG(0x44)
25#define S3C2410_TICNT_ENABLE (1<<7)
26
27#define S3C2410_RTCALM S3C2410_RTCREG(0x50)
28#define S3C2410_RTCALM_ALMEN (1<<6)
29#define S3C2410_RTCALM_YEAREN (1<<5)
30#define S3C2410_RTCALM_MONEN (1<<4)
31#define S3C2410_RTCALM_DAYEN (1<<3)
32#define S3C2410_RTCALM_HOUREN (1<<2)
33#define S3C2410_RTCALM_MINEN (1<<1)
34#define S3C2410_RTCALM_SECEN (1<<0)
35
36#define S3C2410_RTCALM_ALL \
37 S3C2410_RTCALM_ALMEN | S3C2410_RTCALM_YEAREN | S3C2410_RTCALM_MONEN |\
38 S3C2410_RTCALM_DAYEN | S3C2410_RTCALM_HOUREN | S3C2410_RTCALM_MINEN |\
39 S3C2410_RTCALM_SECEN
40
41
42#define S3C2410_ALMSEC S3C2410_RTCREG(0x54)
43#define S3C2410_ALMMIN S3C2410_RTCREG(0x58)
44#define S3C2410_ALMHOUR S3C2410_RTCREG(0x5c)
45
46#define S3C2410_ALMDATE S3C2410_RTCREG(0x60)
47#define S3C2410_ALMMON S3C2410_RTCREG(0x64)
48#define S3C2410_ALMYEAR S3C2410_RTCREG(0x68)
49
50#define S3C2410_RTCRST S3C2410_RTCREG(0x6c)
51
52#define S3C2410_RTCSEC S3C2410_RTCREG(0x70)
53#define S3C2410_RTCMIN S3C2410_RTCREG(0x74)
54#define S3C2410_RTCHOUR S3C2410_RTCREG(0x78)
55#define S3C2410_RTCDATE S3C2410_RTCREG(0x7c)
56#define S3C2410_RTCDAY S3C2410_RTCREG(0x80)
57#define S3C2410_RTCMON S3C2410_RTCREG(0x84)
58#define S3C2410_RTCYEAR S3C2410_RTCREG(0x88)
59
60
61#endif /* __ASM_ARCH_REGS_RTC_H */
diff --git a/include/asm-arm/plat-s3c/regs-serial.h b/include/asm-arm/plat-s3c/regs-serial.h
deleted file mode 100644
index a0daa647b92c..000000000000
--- a/include/asm-arm/plat-s3c/regs-serial.h
+++ /dev/null
@@ -1,232 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-serial.h
2 *
3 * From linux/include/asm-arm/hardware/serial_s3c2410.h
4 *
5 * Internal header file for Samsung S3C2410 serial ports (UART0-2)
6 *
7 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
8 *
9 * Additional defines, (c) 2003 Simtec Electronics (linux@simtec.co.uk)
10 *
11 * Adapted from:
12 *
13 * Internal header file for MX1ADS serial ports (UART1 & 2)
14 *
15 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30*/
31
32#ifndef __ASM_ARM_REGS_SERIAL_H
33#define __ASM_ARM_REGS_SERIAL_H
34
35#define S3C24XX_VA_UART0 (S3C_VA_UART)
36#define S3C24XX_VA_UART1 (S3C_VA_UART + 0x4000 )
37#define S3C24XX_VA_UART2 (S3C_VA_UART + 0x8000 )
38#define S3C24XX_VA_UART3 (S3C_VA_UART + 0xC000 )
39
40#define S3C2410_PA_UART0 (S3C24XX_PA_UART)
41#define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 )
42#define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 )
43#define S3C2443_PA_UART3 (S3C24XX_PA_UART + 0xC000 )
44
45#define S3C2410_URXH (0x24)
46#define S3C2410_UTXH (0x20)
47#define S3C2410_ULCON (0x00)
48#define S3C2410_UCON (0x04)
49#define S3C2410_UFCON (0x08)
50#define S3C2410_UMCON (0x0C)
51#define S3C2410_UBRDIV (0x28)
52#define S3C2410_UTRSTAT (0x10)
53#define S3C2410_UERSTAT (0x14)
54#define S3C2410_UFSTAT (0x18)
55#define S3C2410_UMSTAT (0x1C)
56
57#define S3C2410_LCON_CFGMASK ((0xF<<3)|(0x3))
58
59#define S3C2410_LCON_CS5 (0x0)
60#define S3C2410_LCON_CS6 (0x1)
61#define S3C2410_LCON_CS7 (0x2)
62#define S3C2410_LCON_CS8 (0x3)
63#define S3C2410_LCON_CSMASK (0x3)
64
65#define S3C2410_LCON_PNONE (0x0)
66#define S3C2410_LCON_PEVEN (0x5 << 3)
67#define S3C2410_LCON_PODD (0x4 << 3)
68#define S3C2410_LCON_PMASK (0x7 << 3)
69
70#define S3C2410_LCON_STOPB (1<<2)
71#define S3C2410_LCON_IRM (1<<6)
72
73#define S3C2440_UCON_CLKMASK (3<<10)
74#define S3C2440_UCON_PCLK (0<<10)
75#define S3C2440_UCON_UCLK (1<<10)
76#define S3C2440_UCON_PCLK2 (2<<10)
77#define S3C2440_UCON_FCLK (3<<10)
78#define S3C2443_UCON_EPLL (3<<10)
79
80#define S3C2440_UCON2_FCLK_EN (1<<15)
81#define S3C2440_UCON0_DIVMASK (15 << 12)
82#define S3C2440_UCON1_DIVMASK (15 << 12)
83#define S3C2440_UCON2_DIVMASK (7 << 12)
84#define S3C2440_UCON_DIVSHIFT (12)
85
86#define S3C2412_UCON_CLKMASK (3<<10)
87#define S3C2412_UCON_UCLK (1<<10)
88#define S3C2412_UCON_USYSCLK (3<<10)
89#define S3C2412_UCON_PCLK (0<<10)
90#define S3C2412_UCON_PCLK2 (2<<10)
91
92#define S3C2410_UCON_UCLK (1<<10)
93#define S3C2410_UCON_SBREAK (1<<4)
94
95#define S3C2410_UCON_TXILEVEL (1<<9)
96#define S3C2410_UCON_RXILEVEL (1<<8)
97#define S3C2410_UCON_TXIRQMODE (1<<2)
98#define S3C2410_UCON_RXIRQMODE (1<<0)
99#define S3C2410_UCON_RXFIFO_TOI (1<<7)
100#define S3C2443_UCON_RXERR_IRQEN (1<<6)
101#define S3C2443_UCON_LOOPBACK (1<<5)
102
103#define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
104 S3C2410_UCON_RXILEVEL | \
105 S3C2410_UCON_TXIRQMODE | \
106 S3C2410_UCON_RXIRQMODE | \
107 S3C2410_UCON_RXFIFO_TOI)
108
109#define S3C2410_UFCON_FIFOMODE (1<<0)
110#define S3C2410_UFCON_TXTRIG0 (0<<6)
111#define S3C2410_UFCON_RXTRIG8 (1<<4)
112#define S3C2410_UFCON_RXTRIG12 (2<<4)
113
114/* S3C2440 FIFO trigger levels */
115#define S3C2440_UFCON_RXTRIG1 (0<<4)
116#define S3C2440_UFCON_RXTRIG8 (1<<4)
117#define S3C2440_UFCON_RXTRIG16 (2<<4)
118#define S3C2440_UFCON_RXTRIG32 (3<<4)
119
120#define S3C2440_UFCON_TXTRIG0 (0<<6)
121#define S3C2440_UFCON_TXTRIG16 (1<<6)
122#define S3C2440_UFCON_TXTRIG32 (2<<6)
123#define S3C2440_UFCON_TXTRIG48 (3<<6)
124
125#define S3C2410_UFCON_RESETBOTH (3<<1)
126#define S3C2410_UFCON_RESETTX (1<<2)
127#define S3C2410_UFCON_RESETRX (1<<1)
128
129#define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
130 S3C2410_UFCON_TXTRIG0 | \
131 S3C2410_UFCON_RXTRIG8 )
132
133#define S3C2410_UMCOM_AFC (1<<4)
134#define S3C2410_UMCOM_RTS_LOW (1<<0)
135
136#define S3C2412_UMCON_AFC_63 (0<<5) /* same as s3c2443 */
137#define S3C2412_UMCON_AFC_56 (1<<5)
138#define S3C2412_UMCON_AFC_48 (2<<5)
139#define S3C2412_UMCON_AFC_40 (3<<5)
140#define S3C2412_UMCON_AFC_32 (4<<5)
141#define S3C2412_UMCON_AFC_24 (5<<5)
142#define S3C2412_UMCON_AFC_16 (6<<5)
143#define S3C2412_UMCON_AFC_8 (7<<5)
144
145#define S3C2410_UFSTAT_TXFULL (1<<9)
146#define S3C2410_UFSTAT_RXFULL (1<<8)
147#define S3C2410_UFSTAT_TXMASK (15<<4)
148#define S3C2410_UFSTAT_TXSHIFT (4)
149#define S3C2410_UFSTAT_RXMASK (15<<0)
150#define S3C2410_UFSTAT_RXSHIFT (0)
151
152/* UFSTAT S3C2443 same as S3C2440 */
153#define S3C2440_UFSTAT_TXFULL (1<<14)
154#define S3C2440_UFSTAT_RXFULL (1<<6)
155#define S3C2440_UFSTAT_TXSHIFT (8)
156#define S3C2440_UFSTAT_RXSHIFT (0)
157#define S3C2440_UFSTAT_TXMASK (63<<8)
158#define S3C2440_UFSTAT_RXMASK (63)
159
160#define S3C2410_UTRSTAT_TXE (1<<2)
161#define S3C2410_UTRSTAT_TXFE (1<<1)
162#define S3C2410_UTRSTAT_RXDR (1<<0)
163
164#define S3C2410_UERSTAT_OVERRUN (1<<0)
165#define S3C2410_UERSTAT_FRAME (1<<2)
166#define S3C2410_UERSTAT_BREAK (1<<3)
167#define S3C2443_UERSTAT_PARITY (1<<1)
168
169#define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \
170 S3C2410_UERSTAT_FRAME | \
171 S3C2410_UERSTAT_BREAK)
172
173#define S3C2410_UMSTAT_CTS (1<<0)
174#define S3C2410_UMSTAT_DeltaCTS (1<<2)
175
176#define S3C2443_DIVSLOT (0x2C)
177
178#ifndef __ASSEMBLY__
179
180/* struct s3c24xx_uart_clksrc
181 *
182 * this structure defines a named clock source that can be used for the
183 * uart, so that the best clock can be selected for the requested baud
184 * rate.
185 *
186 * min_baud and max_baud define the range of baud-rates this clock is
187 * acceptable for, if they are both zero, it is assumed any baud rate that
188 * can be generated from this clock will be used.
189 *
190 * divisor gives the divisor from the clock to the one seen by the uart
191*/
192
193struct s3c24xx_uart_clksrc {
194 const char *name;
195 unsigned int divisor;
196 unsigned int min_baud;
197 unsigned int max_baud;
198};
199
200/* configuration structure for per-machine configurations for the
201 * serial port
202 *
203 * the pointer is setup by the machine specific initialisation from the
204 * arch/arm/mach-s3c2410/ directory.
205*/
206
207struct s3c2410_uartcfg {
208 unsigned char hwport; /* hardware port number */
209 unsigned char unused;
210 unsigned short flags;
211 upf_t uart_flags; /* default uart flags */
212
213 unsigned long ucon; /* value of ucon for port */
214 unsigned long ulcon; /* value of ulcon for port */
215 unsigned long ufcon; /* value of ufcon for port */
216
217 struct s3c24xx_uart_clksrc *clocks;
218 unsigned int clocks_size;
219};
220
221/* s3c24xx_uart_devs
222 *
223 * this is exported from the core as we cannot use driver_register(),
224 * or platform_add_device() before the console_initcall()
225*/
226
227extern struct platform_device *s3c24xx_uart_devs[3];
228
229#endif /* __ASSEMBLY__ */
230
231#endif /* __ASM_ARM_REGS_SERIAL_H */
232
diff --git a/include/asm-arm/plat-s3c/regs-timer.h b/include/asm-arm/plat-s3c/regs-timer.h
deleted file mode 100644
index cc0eedd53e38..000000000000
--- a/include/asm-arm/plat-s3c/regs-timer.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-timer.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 Timer configuration
11*/
12
13
14#ifndef __ASM_ARCH_REGS_TIMER_H
15#define __ASM_ARCH_REGS_TIMER_H
16
17#define S3C_TIMERREG(x) (S3C_VA_TIMER + (x))
18#define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c))
19
20#define S3C2410_TCFG0 S3C_TIMERREG(0x00)
21#define S3C2410_TCFG1 S3C_TIMERREG(0x04)
22#define S3C2410_TCON S3C_TIMERREG(0x08)
23
24#define S3C2410_TCFG_PRESCALER0_MASK (255<<0)
25#define S3C2410_TCFG_PRESCALER1_MASK (255<<8)
26#define S3C2410_TCFG_PRESCALER1_SHIFT (8)
27#define S3C2410_TCFG_DEADZONE_MASK (255<<16)
28#define S3C2410_TCFG_DEADZONE_SHIFT (16)
29
30#define S3C2410_TCFG1_MUX4_DIV2 (0<<16)
31#define S3C2410_TCFG1_MUX4_DIV4 (1<<16)
32#define S3C2410_TCFG1_MUX4_DIV8 (2<<16)
33#define S3C2410_TCFG1_MUX4_DIV16 (3<<16)
34#define S3C2410_TCFG1_MUX4_TCLK1 (4<<16)
35#define S3C2410_TCFG1_MUX4_MASK (15<<16)
36#define S3C2410_TCFG1_MUX4_SHIFT (16)
37
38#define S3C2410_TCFG1_MUX3_DIV2 (0<<12)
39#define S3C2410_TCFG1_MUX3_DIV4 (1<<12)
40#define S3C2410_TCFG1_MUX3_DIV8 (2<<12)
41#define S3C2410_TCFG1_MUX3_DIV16 (3<<12)
42#define S3C2410_TCFG1_MUX3_TCLK1 (4<<12)
43#define S3C2410_TCFG1_MUX3_MASK (15<<12)
44
45
46#define S3C2410_TCFG1_MUX2_DIV2 (0<<8)
47#define S3C2410_TCFG1_MUX2_DIV4 (1<<8)
48#define S3C2410_TCFG1_MUX2_DIV8 (2<<8)
49#define S3C2410_TCFG1_MUX2_DIV16 (3<<8)
50#define S3C2410_TCFG1_MUX2_TCLK1 (4<<8)
51#define S3C2410_TCFG1_MUX2_MASK (15<<8)
52
53
54#define S3C2410_TCFG1_MUX1_DIV2 (0<<4)
55#define S3C2410_TCFG1_MUX1_DIV4 (1<<4)
56#define S3C2410_TCFG1_MUX1_DIV8 (2<<4)
57#define S3C2410_TCFG1_MUX1_DIV16 (3<<4)
58#define S3C2410_TCFG1_MUX1_TCLK0 (4<<4)
59#define S3C2410_TCFG1_MUX1_MASK (15<<4)
60
61#define S3C2410_TCFG1_MUX0_DIV2 (0<<0)
62#define S3C2410_TCFG1_MUX0_DIV4 (1<<0)
63#define S3C2410_TCFG1_MUX0_DIV8 (2<<0)
64#define S3C2410_TCFG1_MUX0_DIV16 (3<<0)
65#define S3C2410_TCFG1_MUX0_TCLK0 (4<<0)
66#define S3C2410_TCFG1_MUX0_MASK (15<<0)
67
68#define S3C2410_TCFG1_MUX_DIV2 (0<<0)
69#define S3C2410_TCFG1_MUX_DIV4 (1<<0)
70#define S3C2410_TCFG1_MUX_DIV8 (2<<0)
71#define S3C2410_TCFG1_MUX_DIV16 (3<<0)
72#define S3C2410_TCFG1_MUX_TCLK (4<<0)
73#define S3C2410_TCFG1_MUX_MASK (15<<0)
74
75#define S3C2410_TCFG1_SHIFT(x) ((x) * 4)
76
77/* for each timer, we have an count buffer, an compare buffer and
78 * an observation buffer
79*/
80
81/* WARNING - timer 4 has no buffer reg, and it's observation is at +4 */
82
83#define S3C2410_TCNTB(tmr) S3C_TIMERREG2(tmr, 0x00)
84#define S3C2410_TCMPB(tmr) S3C_TIMERREG2(tmr, 0x04)
85#define S3C2410_TCNTO(tmr) S3C_TIMERREG2(tmr, (((tmr) == 4) ? 0x04 : 0x08))
86
87#define S3C2410_TCON_T4RELOAD (1<<22)
88#define S3C2410_TCON_T4MANUALUPD (1<<21)
89#define S3C2410_TCON_T4START (1<<20)
90
91#define S3C2410_TCON_T3RELOAD (1<<19)
92#define S3C2410_TCON_T3INVERT (1<<18)
93#define S3C2410_TCON_T3MANUALUPD (1<<17)
94#define S3C2410_TCON_T3START (1<<16)
95
96#define S3C2410_TCON_T2RELOAD (1<<15)
97#define S3C2410_TCON_T2INVERT (1<<14)
98#define S3C2410_TCON_T2MANUALUPD (1<<13)
99#define S3C2410_TCON_T2START (1<<12)
100
101#define S3C2410_TCON_T1RELOAD (1<<11)
102#define S3C2410_TCON_T1INVERT (1<<10)
103#define S3C2410_TCON_T1MANUALUPD (1<<9)
104#define S3C2410_TCON_T1START (1<<8)
105
106#define S3C2410_TCON_T0DEADZONE (1<<4)
107#define S3C2410_TCON_T0RELOAD (1<<3)
108#define S3C2410_TCON_T0INVERT (1<<2)
109#define S3C2410_TCON_T0MANUALUPD (1<<1)
110#define S3C2410_TCON_T0START (1<<0)
111
112#endif /* __ASM_ARCH_REGS_TIMER_H */
113
114
115
diff --git a/include/asm-arm/plat-s3c/regs-watchdog.h b/include/asm-arm/plat-s3c/regs-watchdog.h
deleted file mode 100644
index 4938492470f7..000000000000
--- a/include/asm-arm/plat-s3c/regs-watchdog.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-watchdog.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 Watchdog timer control
11*/
12
13
14#ifndef __ASM_ARCH_REGS_WATCHDOG_H
15#define __ASM_ARCH_REGS_WATCHDOG_H
16
17#define S3C_WDOGREG(x) ((x) + S3C_VA_WATCHDOG)
18
19#define S3C2410_WTCON S3C_WDOGREG(0x00)
20#define S3C2410_WTDAT S3C_WDOGREG(0x04)
21#define S3C2410_WTCNT S3C_WDOGREG(0x08)
22
23/* the watchdog can either generate a reset pulse, or an
24 * interrupt.
25 */
26
27#define S3C2410_WTCON_RSTEN (0x01)
28#define S3C2410_WTCON_INTEN (1<<2)
29#define S3C2410_WTCON_ENABLE (1<<5)
30
31#define S3C2410_WTCON_DIV16 (0<<3)
32#define S3C2410_WTCON_DIV32 (1<<3)
33#define S3C2410_WTCON_DIV64 (2<<3)
34#define S3C2410_WTCON_DIV128 (3<<3)
35
36#define S3C2410_WTCON_PRESCALE(x) ((x) << 8)
37#define S3C2410_WTCON_PRESCALE_MASK (0xff00)
38
39#endif /* __ASM_ARCH_REGS_WATCHDOG_H */
40
41
diff --git a/include/asm-arm/plat-s3c/uncompress.h b/include/asm-arm/plat-s3c/uncompress.h
deleted file mode 100644
index 19b9eda39485..000000000000
--- a/include/asm-arm/plat-s3c/uncompress.h
+++ /dev/null
@@ -1,155 +0,0 @@
1/* linux/include/asm-arm/plat-s3c/uncompress.h
2 *
3 * Copyright 2003, 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C - uncompress code
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_PLAT_UNCOMPRESS_H
15#define __ASM_PLAT_UNCOMPRESS_H
16
17typedef unsigned int upf_t; /* cannot include linux/serial_core.h */
18
19/* uart setup */
20
21static unsigned int fifo_mask;
22static unsigned int fifo_max;
23
24/* forward declerations */
25
26static void arch_detect_cpu(void);
27
28/* defines for UART registers */
29
30#include <asm/plat-s3c/regs-serial.h>
31#include <asm/plat-s3c/regs-watchdog.h>
32
33/* working in physical space... */
34#undef S3C2410_WDOGREG
35#define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x)))
36
37/* how many bytes we allow into the FIFO at a time in FIFO mode */
38#define FIFO_MAX (14)
39
40#define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C_LOWLEVEL_UART_PORT)
41
42static __inline__ void
43uart_wr(unsigned int reg, unsigned int val)
44{
45 volatile unsigned int *ptr;
46
47 ptr = (volatile unsigned int *)(reg + uart_base);
48 *ptr = val;
49}
50
51static __inline__ unsigned int
52uart_rd(unsigned int reg)
53{
54 volatile unsigned int *ptr;
55
56 ptr = (volatile unsigned int *)(reg + uart_base);
57 return *ptr;
58}
59
60/* we can deal with the case the UARTs are being run
61 * in FIFO mode, so that we don't hold up our execution
62 * waiting for tx to happen...
63*/
64
65static void putc(int ch)
66{
67 if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) {
68 int level;
69
70 while (1) {
71 level = uart_rd(S3C2410_UFSTAT);
72 level &= fifo_mask;
73
74 if (level < fifo_max)
75 break;
76 }
77
78 } else {
79 /* not using fifos */
80
81 while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE)
82 barrier();
83 }
84
85 /* write byte to transmission register */
86 uart_wr(S3C2410_UTXH, ch);
87}
88
89static inline void flush(void)
90{
91}
92
93#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0)
94
95/* CONFIG_S3C_BOOT_WATCHDOG
96 *
97 * Simple boot-time watchdog setup, to reboot the system if there is
98 * any problem with the boot process
99*/
100
101#ifdef CONFIG_S3C_BOOT_WATCHDOG
102
103#define WDOG_COUNT (0xff00)
104
105static inline void arch_decomp_wdog(void)
106{
107 __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
108}
109
110static void arch_decomp_wdog_start(void)
111{
112 __raw_writel(WDOG_COUNT, S3C2410_WTDAT);
113 __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
114 __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON);
115}
116
117#else
118#define arch_decomp_wdog_start()
119#define arch_decomp_wdog()
120#endif
121
122#ifdef CONFIG_S3C_BOOT_ERROR_RESET
123
124static void arch_decomp_error(const char *x)
125{
126 putstr("\n\n");
127 putstr(x);
128 putstr("\n\n -- System resetting\n");
129
130 __raw_writel(0x4000, S3C2410_WTDAT);
131 __raw_writel(0x4000, S3C2410_WTCNT);
132 __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON);
133
134 while(1);
135}
136
137#define arch_error arch_decomp_error
138#endif
139
140static void error(char *err);
141
142static void
143arch_decomp_setup(void)
144{
145 /* we may need to setup the uart(s) here if we are not running
146 * on an BAST... the BAST will have left the uarts configured
147 * after calling linux.
148 */
149
150 arch_detect_cpu();
151 arch_decomp_wdog_start();
152}
153
154
155#endif /* __ASM_PLAT_UNCOMPRESS_H */
diff --git a/include/asm-arm/plat-s3c24xx/clock.h b/include/asm-arm/plat-s3c24xx/clock.h
deleted file mode 100644
index 235b753cd877..000000000000
--- a/include/asm-arm/plat-s3c24xx/clock.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/clock.h
2 * linux/arch/arm/mach-s3c2410/clock.h
3 *
4 * Copyright (c) 2004-2005 Simtec Electronics
5 * http://www.simtec.co.uk/products/SWLINUX/
6 * Written by Ben Dooks, <ben@simtec.co.uk>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13struct clk {
14 struct list_head list;
15 struct module *owner;
16 struct clk *parent;
17 const char *name;
18 int id;
19 int usage;
20 unsigned long rate;
21 unsigned long ctrlbit;
22
23 int (*enable)(struct clk *, int enable);
24 int (*set_rate)(struct clk *c, unsigned long rate);
25 unsigned long (*get_rate)(struct clk *c);
26 unsigned long (*round_rate)(struct clk *c, unsigned long rate);
27 int (*set_parent)(struct clk *c, struct clk *parent);
28};
29
30/* other clocks which may be registered by board support */
31
32extern struct clk s3c24xx_dclk0;
33extern struct clk s3c24xx_dclk1;
34extern struct clk s3c24xx_clkout0;
35extern struct clk s3c24xx_clkout1;
36extern struct clk s3c24xx_uclk;
37
38extern struct clk clk_usb_bus;
39
40/* core clock support */
41
42extern struct clk clk_f;
43extern struct clk clk_h;
44extern struct clk clk_p;
45extern struct clk clk_mpll;
46extern struct clk clk_upll;
47extern struct clk clk_xtal;
48
49/* exports for arch/arm/mach-s3c2410
50 *
51 * Please DO NOT use these outside of arch/arm/mach-s3c2410
52*/
53
54extern struct mutex clocks_mutex;
55
56extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
57
58extern int s3c24xx_register_clock(struct clk *clk);
59extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks);
60
61extern int s3c24xx_setup_clocks(unsigned long xtal,
62 unsigned long fclk,
63 unsigned long hclk,
64 unsigned long pclk);
diff --git a/include/asm-arm/plat-s3c24xx/common-smdk.h b/include/asm-arm/plat-s3c24xx/common-smdk.h
deleted file mode 100644
index 58d9094c935c..000000000000
--- a/include/asm-arm/plat-s3c24xx/common-smdk.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/common-smdk.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Common code for SMDK2410 and SMDK2440 boards
7 *
8 * http://www.fluff.org/ben/smdk2440/
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15extern void smdk_machine_init(void);
diff --git a/include/asm-arm/plat-s3c24xx/cpu.h b/include/asm-arm/plat-s3c24xx/cpu.h
deleted file mode 100644
index 23e420e8bd5b..000000000000
--- a/include/asm-arm/plat-s3c24xx/cpu.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/cpu.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* todo - fix when rmk changes iodescs to use `void __iomem *` */
14
15#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
16
17#ifndef MHZ
18#define MHZ (1000*1000)
19#endif
20
21#define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000)
22
23/* forward declaration */
24struct s3c24xx_uart_resources;
25struct platform_device;
26struct s3c2410_uartcfg;
27struct map_desc;
28
29/* core initialisation functions */
30
31extern void s3c24xx_init_irq(void);
32
33extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
34
35extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
36
37extern void s3c24xx_init_clocks(int xtal);
38
39extern void s3c24xx_init_uartdevs(char *name,
40 struct s3c24xx_uart_resources *res,
41 struct s3c2410_uartcfg *cfg, int no);
42
43/* timer for 2410/2440 */
44
45struct sys_timer;
46extern struct sys_timer s3c24xx_timer;
47
48/* system device classes */
49
50extern struct sysdev_class s3c2410_sysclass;
51extern struct sysdev_class s3c2412_sysclass;
52extern struct sysdev_class s3c2440_sysclass;
53extern struct sysdev_class s3c2442_sysclass;
54extern struct sysdev_class s3c2443_sysclass;
diff --git a/include/asm-arm/plat-s3c24xx/devs.h b/include/asm-arm/plat-s3c24xx/devs.h
deleted file mode 100644
index badaac9d64a8..000000000000
--- a/include/asm-arm/plat-s3c24xx/devs.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/devs.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2410 standard platform devices
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12#include <linux/platform_device.h>
13
14struct s3c24xx_uart_resources {
15 struct resource *resources;
16 unsigned long nr_resources;
17};
18
19extern struct s3c24xx_uart_resources s3c2410_uart_resources[];
20
21extern struct platform_device *s3c24xx_uart_devs[];
22extern struct platform_device *s3c24xx_uart_src[];
23
24extern struct platform_device s3c_device_timer[];
25
26extern struct platform_device s3c_device_usb;
27extern struct platform_device s3c_device_lcd;
28extern struct platform_device s3c_device_wdt;
29extern struct platform_device s3c_device_i2c;
30extern struct platform_device s3c_device_iis;
31extern struct platform_device s3c_device_rtc;
32extern struct platform_device s3c_device_adc;
33extern struct platform_device s3c_device_sdi;
34extern struct platform_device s3c_device_hsmmc;
35
36extern struct platform_device s3c_device_spi0;
37extern struct platform_device s3c_device_spi1;
38
39extern struct platform_device s3c_device_nand;
40
41extern struct platform_device s3c_device_usbgadget;
42
43/* s3c2440 specific devices */
44
45#ifdef CONFIG_CPU_S3C2440
46
47extern struct platform_device s3c_device_camif;
48
49#endif
diff --git a/include/asm-arm/plat-s3c24xx/dma.h b/include/asm-arm/plat-s3c24xx/dma.h
deleted file mode 100644
index c78efe316fc8..000000000000
--- a/include/asm-arm/plat-s3c24xx/dma.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/dma.h
2 *
3 * Copyright (C) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C24XX DMA support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13extern struct sysdev_class dma_sysclass;
14extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
15
16#define DMA_CH_VALID (1<<31)
17#define DMA_CH_NEVER (1<<30)
18
19struct s3c24xx_dma_addr {
20 unsigned long from;
21 unsigned long to;
22};
23
24/* struct s3c24xx_dma_map
25 *
26 * this holds the mapping information for the channel selected
27 * to be connected to the specified device
28*/
29
30struct s3c24xx_dma_map {
31 const char *name;
32 struct s3c24xx_dma_addr hw_addr;
33
34 unsigned long channels[S3C2410_DMA_CHANNELS];
35 unsigned long channels_rx[S3C2410_DMA_CHANNELS];
36};
37
38struct s3c24xx_dma_selection {
39 struct s3c24xx_dma_map *map;
40 unsigned long map_size;
41 unsigned long dcon_mask;
42
43 void (*select)(struct s3c2410_dma_chan *chan,
44 struct s3c24xx_dma_map *map);
45
46 void (*direction)(struct s3c2410_dma_chan *chan,
47 struct s3c24xx_dma_map *map,
48 enum s3c2410_dmasrc dir);
49};
50
51extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);
52
53/* struct s3c24xx_dma_order_ch
54 *
55 * channel map for one of the `enum dma_ch` dma channels. the list
56 * entry contains a set of low-level channel numbers, orred with
57 * DMA_CH_VALID, which are checked in the order in the array.
58*/
59
60struct s3c24xx_dma_order_ch {
61 unsigned int list[S3C2410_DMA_CHANNELS]; /* list of channels */
62 unsigned int flags; /* flags */
63};
64
65/* struct s3c24xx_dma_order
66 *
67 * information provided by either the core or the board to give the
68 * dma system a hint on how to allocate channels
69*/
70
71struct s3c24xx_dma_order {
72 struct s3c24xx_dma_order_ch channels[DMACH_MAX];
73};
74
75extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map);
76
77/* DMA init code, called from the cpu support code */
78
79extern int s3c2410_dma_init(void);
80
81extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq,
82 unsigned int stride);
diff --git a/include/asm-arm/plat-s3c24xx/irq.h b/include/asm-arm/plat-s3c24xx/irq.h
deleted file mode 100644
index 45746a995343..000000000000
--- a/include/asm-arm/plat-s3c24xx/irq.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/irq.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU IRQ support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#define irqdbf(x...)
14#define irqdbf2(x...)
15
16#define EXTINT_OFF (IRQ_EINT4 - 4)
17
18/* these are exported for arch/arm/mach-* usage */
19extern struct irq_chip s3c_irq_level_chip;
20extern struct irq_chip s3c_irq_chip;
21
22static inline void
23s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
24 int subcheck)
25{
26 unsigned long mask;
27 unsigned long submask;
28
29 submask = __raw_readl(S3C2410_INTSUBMSK);
30 mask = __raw_readl(S3C2410_INTMSK);
31
32 submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
33
34 /* check to see if we need to mask the parent IRQ */
35
36 if ((submask & subcheck) == subcheck) {
37 __raw_writel(mask | parentbit, S3C2410_INTMSK);
38 }
39
40 /* write back masks */
41 __raw_writel(submask, S3C2410_INTSUBMSK);
42
43}
44
45static inline void
46s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)
47{
48 unsigned long mask;
49 unsigned long submask;
50
51 submask = __raw_readl(S3C2410_INTSUBMSK);
52 mask = __raw_readl(S3C2410_INTMSK);
53
54 submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
55 mask &= ~parentbit;
56
57 /* write back masks */
58 __raw_writel(submask, S3C2410_INTSUBMSK);
59 __raw_writel(mask, S3C2410_INTMSK);
60}
61
62
63static inline void
64s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)
65{
66 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
67
68 s3c_irqsub_mask(irqno, parentmask, group);
69
70 __raw_writel(bit, S3C2410_SUBSRCPND);
71
72 /* only ack parent if we've got all the irqs (seems we must
73 * ack, all and hope that the irq system retriggers ok when
74 * the interrupt goes off again)
75 */
76
77 if (1) {
78 __raw_writel(parentmask, S3C2410_SRCPND);
79 __raw_writel(parentmask, S3C2410_INTPND);
80 }
81}
82
83static inline void
84s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
85{
86 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
87
88 __raw_writel(bit, S3C2410_SUBSRCPND);
89
90 /* only ack parent if we've got all the irqs (seems we must
91 * ack, all and hope that the irq system retriggers ok when
92 * the interrupt goes off again)
93 */
94
95 if (1) {
96 __raw_writel(parentmask, S3C2410_SRCPND);
97 __raw_writel(parentmask, S3C2410_INTPND);
98 }
99}
100
101/* exported for use in arch/arm/mach-s3c2410 */
102
103#ifdef CONFIG_PM
104extern int s3c_irq_wake(unsigned int irqno, unsigned int state);
105#else
106#define s3c_irq_wake NULL
107#endif
108
109extern int s3c_irqext_type(unsigned int irq, unsigned int type);
diff --git a/include/asm-arm/plat-s3c24xx/mci.h b/include/asm-arm/plat-s3c24xx/mci.h
deleted file mode 100644
index 2d0852ac3b27..000000000000
--- a/include/asm-arm/plat-s3c24xx/mci.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ARCH_MCI_H
2#define _ARCH_MCI_H
3
4struct s3c24xx_mci_pdata {
5 unsigned int wprotect_invert : 1;
6 unsigned int detect_invert : 1; /* set => detect active high. */
7
8 unsigned int gpio_detect;
9 unsigned int gpio_wprotect;
10 unsigned long ocr_avail;
11 void (*set_power)(unsigned char power_mode,
12 unsigned short vdd);
13};
14
15#endif /* _ARCH_NCI_H */
diff --git a/include/asm-arm/plat-s3c24xx/pm.h b/include/asm-arm/plat-s3c24xx/pm.h
deleted file mode 100644
index cc623667e48a..000000000000
--- a/include/asm-arm/plat-s3c24xx/pm.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/pm.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Written by Ben Dooks, <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11/* s3c2410_pm_init
12 *
13 * called from board at initialisation time to setup the power
14 * management
15*/
16
17#ifdef CONFIG_PM
18
19extern __init int s3c2410_pm_init(void);
20
21#else
22
23static inline int s3c2410_pm_init(void)
24{
25 return 0;
26}
27#endif
28
29/* configuration for the IRQ mask over sleep */
30extern unsigned long s3c_irqwake_intmask;
31extern unsigned long s3c_irqwake_eintmask;
32
33/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
34extern unsigned long s3c_irqwake_intallow;
35extern unsigned long s3c_irqwake_eintallow;
36
37/* per-cpu sleep functions */
38
39extern void (*pm_cpu_prep)(void);
40extern void (*pm_cpu_sleep)(void);
41
42/* Flags for PM Control */
43
44extern unsigned long s3c_pm_flags;
45
46/* from sleep.S */
47
48extern int s3c2410_cpu_save(unsigned long *saveblk);
49extern void s3c2410_cpu_suspend(void);
50extern void s3c2410_cpu_resume(void);
51
52extern unsigned long s3c2410_sleep_save_phys;
53
54/* sleep save info */
55
56struct sleep_save {
57 void __iomem *reg;
58 unsigned long val;
59};
60
61#define SAVE_ITEM(x) \
62 { .reg = (x) }
63
64extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count);
65extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count);
66
67#ifdef CONFIG_PM
68extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state);
69extern int s3c24xx_irq_resume(struct sys_device *dev);
70#else
71#define s3c24xx_irq_suspend NULL
72#define s3c24xx_irq_resume NULL
73#endif
diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h b/include/asm-arm/plat-s3c24xx/regs-spi.h
deleted file mode 100644
index 2b35479ee35c..000000000000
--- a/include/asm-arm/plat-s3c24xx/regs-spi.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-spi.h
2 *
3 * Copyright (c) 2004 Fetron GmbH
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * S3C2410 SPI register definition
10*/
11
12#ifndef __ASM_ARCH_REGS_SPI_H
13#define __ASM_ARCH_REGS_SPI_H
14
15#define S3C2410_SPI1 (0x20)
16#define S3C2412_SPI1 (0x100)
17
18#define S3C2410_SPCON (0x00)
19
20#define S3C2412_SPCON_RXFIFO_RB2 (0<<14)
21#define S3C2412_SPCON_RXFIFO_RB4 (1<<14)
22#define S3C2412_SPCON_RXFIFO_RB12 (2<<14)
23#define S3C2412_SPCON_RXFIFO_RB14 (3<<14)
24#define S3C2412_SPCON_TXFIFO_RB2 (0<<12)
25#define S3C2412_SPCON_TXFIFO_RB4 (1<<12)
26#define S3C2412_SPCON_TXFIFO_RB12 (2<<12)
27#define S3C2412_SPCON_TXFIFO_RB14 (3<<12)
28#define S3C2412_SPCON_RXFIFO_RESET (1<<11) /* RxFIFO reset */
29#define S3C2412_SPCON_TXFIFO_RESET (1<<10) /* TxFIFO reset */
30#define S3C2412_SPCON_RXFIFO_EN (1<<9) /* RxFIFO Enable */
31#define S3C2412_SPCON_TXFIFO_EN (1<<8) /* TxFIFO Enable */
32
33#define S3C2412_SPCON_DIRC_RX (1<<7)
34
35#define S3C2410_SPCON_SMOD_DMA (2<<5) /* DMA mode */
36#define S3C2410_SPCON_SMOD_INT (1<<5) /* interrupt mode */
37#define S3C2410_SPCON_SMOD_POLL (0<<5) /* polling mode */
38#define S3C2410_SPCON_ENSCK (1<<4) /* Enable SCK */
39#define S3C2410_SPCON_MSTR (1<<3) /* Master/Slave select
40 0: slave, 1: master */
41#define S3C2410_SPCON_CPOL_HIGH (1<<2) /* Clock polarity select */
42#define S3C2410_SPCON_CPOL_LOW (0<<2) /* Clock polarity select */
43
44#define S3C2410_SPCON_CPHA_FMTB (1<<1) /* Clock Phase Select */
45#define S3C2410_SPCON_CPHA_FMTA (0<<1) /* Clock Phase Select */
46
47#define S3C2410_SPCON_TAGD (1<<0) /* Tx auto garbage data mode */
48
49
50#define S3C2410_SPSTA (0x04)
51
52#define S3C2412_SPSTA_RXFIFO_AE (1<<11)
53#define S3C2412_SPSTA_TXFIFO_AE (1<<10)
54#define S3C2412_SPSTA_RXFIFO_ERROR (1<<9)
55#define S3C2412_SPSTA_TXFIFO_ERROR (1<<8)
56#define S3C2412_SPSTA_RXFIFO_FIFO (1<<7)
57#define S3C2412_SPSTA_RXFIFO_EMPTY (1<<6)
58#define S3C2412_SPSTA_TXFIFO_NFULL (1<<5)
59#define S3C2412_SPSTA_TXFIFO_EMPTY (1<<4)
60
61#define S3C2410_SPSTA_DCOL (1<<2) /* Data Collision Error */
62#define S3C2410_SPSTA_MULD (1<<1) /* Multi Master Error */
63#define S3C2410_SPSTA_READY (1<<0) /* Data Tx/Rx ready */
64#define S3C2412_SPSTA_READY_ORG (1<<3)
65
66#define S3C2410_SPPIN (0x08)
67
68#define S3C2410_SPPIN_ENMUL (1<<2) /* Multi Master Error detect */
69#define S3C2410_SPPIN_RESERVED (1<<1)
70#define S3C2400_SPPIN_nCS (1<<1) /* SPI Card Select */
71#define S3C2410_SPPIN_KEEP (1<<0) /* Master Out keep */
72
73#define S3C2410_SPPRE (0x0C)
74#define S3C2410_SPTDAT (0x10)
75#define S3C2410_SPRDAT (0x14)
76
77#define S3C2412_TXFIFO (0x18)
78#define S3C2412_RXFIFO (0x18)
79#define S3C2412_SPFIC (0x24)
80
81
82#endif /* __ASM_ARCH_REGS_SPI_H */
diff --git a/include/asm-arm/plat-s3c24xx/regs-udc.h b/include/asm-arm/plat-s3c24xx/regs-udc.h
deleted file mode 100644
index f0dd4a41b37b..000000000000
--- a/include/asm-arm/plat-s3c24xx/regs-udc.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-udc.h
2 *
3 * Copyright (C) 2004 Herbert Poetzl <herbert@13thfloor.at>
4 *
5 * This include file is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
9*/
10
11#ifndef __ASM_ARCH_REGS_UDC_H
12#define __ASM_ARCH_REGS_UDC_H
13
14#define S3C2410_USBDREG(x) (x)
15
16#define S3C2410_UDC_FUNC_ADDR_REG S3C2410_USBDREG(0x0140)
17#define S3C2410_UDC_PWR_REG S3C2410_USBDREG(0x0144)
18#define S3C2410_UDC_EP_INT_REG S3C2410_USBDREG(0x0148)
19
20#define S3C2410_UDC_USB_INT_REG S3C2410_USBDREG(0x0158)
21#define S3C2410_UDC_EP_INT_EN_REG S3C2410_USBDREG(0x015c)
22
23#define S3C2410_UDC_USB_INT_EN_REG S3C2410_USBDREG(0x016c)
24
25#define S3C2410_UDC_FRAME_NUM1_REG S3C2410_USBDREG(0x0170)
26#define S3C2410_UDC_FRAME_NUM2_REG S3C2410_USBDREG(0x0174)
27
28#define S3C2410_UDC_EP0_FIFO_REG S3C2410_USBDREG(0x01c0)
29#define S3C2410_UDC_EP1_FIFO_REG S3C2410_USBDREG(0x01c4)
30#define S3C2410_UDC_EP2_FIFO_REG S3C2410_USBDREG(0x01c8)
31#define S3C2410_UDC_EP3_FIFO_REG S3C2410_USBDREG(0x01cc)
32#define S3C2410_UDC_EP4_FIFO_REG S3C2410_USBDREG(0x01d0)
33
34#define S3C2410_UDC_EP1_DMA_CON S3C2410_USBDREG(0x0200)
35#define S3C2410_UDC_EP1_DMA_UNIT S3C2410_USBDREG(0x0204)
36#define S3C2410_UDC_EP1_DMA_FIFO S3C2410_USBDREG(0x0208)
37#define S3C2410_UDC_EP1_DMA_TTC_L S3C2410_USBDREG(0x020c)
38#define S3C2410_UDC_EP1_DMA_TTC_M S3C2410_USBDREG(0x0210)
39#define S3C2410_UDC_EP1_DMA_TTC_H S3C2410_USBDREG(0x0214)
40
41#define S3C2410_UDC_EP2_DMA_CON S3C2410_USBDREG(0x0218)
42#define S3C2410_UDC_EP2_DMA_UNIT S3C2410_USBDREG(0x021c)
43#define S3C2410_UDC_EP2_DMA_FIFO S3C2410_USBDREG(0x0220)
44#define S3C2410_UDC_EP2_DMA_TTC_L S3C2410_USBDREG(0x0224)
45#define S3C2410_UDC_EP2_DMA_TTC_M S3C2410_USBDREG(0x0228)
46#define S3C2410_UDC_EP2_DMA_TTC_H S3C2410_USBDREG(0x022c)
47
48#define S3C2410_UDC_EP3_DMA_CON S3C2410_USBDREG(0x0240)
49#define S3C2410_UDC_EP3_DMA_UNIT S3C2410_USBDREG(0x0244)
50#define S3C2410_UDC_EP3_DMA_FIFO S3C2410_USBDREG(0x0248)
51#define S3C2410_UDC_EP3_DMA_TTC_L S3C2410_USBDREG(0x024c)
52#define S3C2410_UDC_EP3_DMA_TTC_M S3C2410_USBDREG(0x0250)
53#define S3C2410_UDC_EP3_DMA_TTC_H S3C2410_USBDREG(0x0254)
54
55#define S3C2410_UDC_EP4_DMA_CON S3C2410_USBDREG(0x0258)
56#define S3C2410_UDC_EP4_DMA_UNIT S3C2410_USBDREG(0x025c)
57#define S3C2410_UDC_EP4_DMA_FIFO S3C2410_USBDREG(0x0260)
58#define S3C2410_UDC_EP4_DMA_TTC_L S3C2410_USBDREG(0x0264)
59#define S3C2410_UDC_EP4_DMA_TTC_M S3C2410_USBDREG(0x0268)
60#define S3C2410_UDC_EP4_DMA_TTC_H S3C2410_USBDREG(0x026c)
61
62#define S3C2410_UDC_INDEX_REG S3C2410_USBDREG(0x0178)
63
64/* indexed registers */
65
66#define S3C2410_UDC_MAXP_REG S3C2410_USBDREG(0x0180)
67
68#define S3C2410_UDC_EP0_CSR_REG S3C2410_USBDREG(0x0184)
69
70#define S3C2410_UDC_IN_CSR1_REG S3C2410_USBDREG(0x0184)
71#define S3C2410_UDC_IN_CSR2_REG S3C2410_USBDREG(0x0188)
72
73#define S3C2410_UDC_OUT_CSR1_REG S3C2410_USBDREG(0x0190)
74#define S3C2410_UDC_OUT_CSR2_REG S3C2410_USBDREG(0x0194)
75#define S3C2410_UDC_OUT_FIFO_CNT1_REG S3C2410_USBDREG(0x0198)
76#define S3C2410_UDC_OUT_FIFO_CNT2_REG S3C2410_USBDREG(0x019c)
77
78#define S3C2410_UDC_FUNCADDR_UPDATE (1<<7)
79
80#define S3C2410_UDC_PWR_ISOUP (1<<7) // R/W
81#define S3C2410_UDC_PWR_RESET (1<<3) // R
82#define S3C2410_UDC_PWR_RESUME (1<<2) // R/W
83#define S3C2410_UDC_PWR_SUSPEND (1<<1) // R
84#define S3C2410_UDC_PWR_ENSUSPEND (1<<0) // R/W
85
86#define S3C2410_UDC_PWR_DEFAULT 0x00
87
88#define S3C2410_UDC_INT_EP4 (1<<4) // R/W (clear only)
89#define S3C2410_UDC_INT_EP3 (1<<3) // R/W (clear only)
90#define S3C2410_UDC_INT_EP2 (1<<2) // R/W (clear only)
91#define S3C2410_UDC_INT_EP1 (1<<1) // R/W (clear only)
92#define S3C2410_UDC_INT_EP0 (1<<0) // R/W (clear only)
93
94#define S3C2410_UDC_USBINT_RESET (1<<2) // R/W (clear only)
95#define S3C2410_UDC_USBINT_RESUME (1<<1) // R/W (clear only)
96#define S3C2410_UDC_USBINT_SUSPEND (1<<0) // R/W (clear only)
97
98#define S3C2410_UDC_INTE_EP4 (1<<4) // R/W
99#define S3C2410_UDC_INTE_EP3 (1<<3) // R/W
100#define S3C2410_UDC_INTE_EP2 (1<<2) // R/W
101#define S3C2410_UDC_INTE_EP1 (1<<1) // R/W
102#define S3C2410_UDC_INTE_EP0 (1<<0) // R/W
103
104#define S3C2410_UDC_USBINTE_RESET (1<<2) // R/W
105#define S3C2410_UDC_USBINTE_SUSPEND (1<<0) // R/W
106
107
108#define S3C2410_UDC_INDEX_EP0 (0x00)
109#define S3C2410_UDC_INDEX_EP1 (0x01) // ??
110#define S3C2410_UDC_INDEX_EP2 (0x02) // ??
111#define S3C2410_UDC_INDEX_EP3 (0x03) // ??
112#define S3C2410_UDC_INDEX_EP4 (0x04) // ??
113
114#define S3C2410_UDC_ICSR1_CLRDT (1<<6) // R/W
115#define S3C2410_UDC_ICSR1_SENTSTL (1<<5) // R/W (clear only)
116#define S3C2410_UDC_ICSR1_SENDSTL (1<<4) // R/W
117#define S3C2410_UDC_ICSR1_FFLUSH (1<<3) // W (set only)
118#define S3C2410_UDC_ICSR1_UNDRUN (1<<2) // R/W (clear only)
119#define S3C2410_UDC_ICSR1_PKTRDY (1<<0) // R/W (set only)
120
121#define S3C2410_UDC_ICSR2_AUTOSET (1<<7) // R/W
122#define S3C2410_UDC_ICSR2_ISO (1<<6) // R/W
123#define S3C2410_UDC_ICSR2_MODEIN (1<<5) // R/W
124#define S3C2410_UDC_ICSR2_DMAIEN (1<<4) // R/W
125
126#define S3C2410_UDC_OCSR1_CLRDT (1<<7) // R/W
127#define S3C2410_UDC_OCSR1_SENTSTL (1<<6) // R/W (clear only)
128#define S3C2410_UDC_OCSR1_SENDSTL (1<<5) // R/W
129#define S3C2410_UDC_OCSR1_FFLUSH (1<<4) // R/W
130#define S3C2410_UDC_OCSR1_DERROR (1<<3) // R
131#define S3C2410_UDC_OCSR1_OVRRUN (1<<2) // R/W (clear only)
132#define S3C2410_UDC_OCSR1_PKTRDY (1<<0) // R/W (clear only)
133
134#define S3C2410_UDC_OCSR2_AUTOCLR (1<<7) // R/W
135#define S3C2410_UDC_OCSR2_ISO (1<<6) // R/W
136#define S3C2410_UDC_OCSR2_DMAIEN (1<<5) // R/W
137
138#define S3C2410_UDC_EP0_CSR_OPKRDY (1<<0)
139#define S3C2410_UDC_EP0_CSR_IPKRDY (1<<1)
140#define S3C2410_UDC_EP0_CSR_SENTSTL (1<<2)
141#define S3C2410_UDC_EP0_CSR_DE (1<<3)
142#define S3C2410_UDC_EP0_CSR_SE (1<<4)
143#define S3C2410_UDC_EP0_CSR_SENDSTL (1<<5)
144#define S3C2410_UDC_EP0_CSR_SOPKTRDY (1<<6)
145#define S3C2410_UDC_EP0_CSR_SSE (1<<7)
146
147#define S3C2410_UDC_MAXP_8 (1<<0)
148#define S3C2410_UDC_MAXP_16 (1<<1)
149#define S3C2410_UDC_MAXP_32 (1<<2)
150#define S3C2410_UDC_MAXP_64 (1<<3)
151
152
153#endif
diff --git a/include/asm-arm/plat-s3c24xx/s3c2400.h b/include/asm-arm/plat-s3c24xx/s3c2400.h
deleted file mode 100644
index 3a5a16821af8..000000000000
--- a/include/asm-arm/plat-s3c24xx/s3c2400.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2400.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C2400 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 09-Fev-2006 LCVR First version, based on s3c2410.h
14*/
15
16#ifdef CONFIG_CPU_S3C2400
17
18extern int s3c2400_init(void);
19
20extern void s3c2400_map_io(struct map_desc *mach_desc, int size);
21
22extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no);
23
24extern void s3c2400_init_clocks(int xtal);
25
26#else
27#define s3c2400_init_clocks NULL
28#define s3c2400_init_uarts NULL
29#define s3c2400_map_io NULL
30#define s3c2400_init NULL
31#endif
diff --git a/include/asm-arm/plat-s3c24xx/s3c2410.h b/include/asm-arm/plat-s3c24xx/s3c2410.h
deleted file mode 100644
index 3cd1ec677b3f..000000000000
--- a/include/asm-arm/plat-s3c24xx/s3c2410.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2410.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2410 machine directory
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#ifdef CONFIG_CPU_S3C2410
15
16extern int s3c2410_init(void);
17
18extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
19
20extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
21
22extern void s3c2410_init_clocks(int xtal);
23
24#else
25#define s3c2410_init_clocks NULL
26#define s3c2410_init_uarts NULL
27#define s3c2410_map_io NULL
28#define s3c2410_init NULL
29#endif
30
31extern int s3c2410_baseclk_add(void);
diff --git a/include/asm-arm/plat-s3c24xx/s3c2412.h b/include/asm-arm/plat-s3c24xx/s3c2412.h
deleted file mode 100644
index 3ec97685e781..000000000000
--- a/include/asm-arm/plat-s3c24xx/s3c2412.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2412.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2412 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2412
14
15extern int s3c2412_init(void);
16
17extern void s3c2412_map_io(struct map_desc *mach_desc, int size);
18
19extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);
20
21extern void s3c2412_init_clocks(int xtal);
22
23extern int s3c2412_baseclk_add(void);
24#else
25#define s3c2412_init_clocks NULL
26#define s3c2412_init_uarts NULL
27#define s3c2412_map_io NULL
28#define s3c2412_init NULL
29#endif
diff --git a/include/asm-arm/plat-s3c24xx/s3c2440.h b/include/asm-arm/plat-s3c24xx/s3c2440.h
deleted file mode 100644
index 107853bf9481..000000000000
--- a/include/asm-arm/plat-s3c24xx/s3c2440.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2440.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2440 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2440
14extern int s3c2440_init(void);
15#else
16#define s3c2440_init NULL
17#endif
diff --git a/include/asm-arm/plat-s3c24xx/s3c2442.h b/include/asm-arm/plat-s3c24xx/s3c2442.h
deleted file mode 100644
index 451a23a2092a..000000000000
--- a/include/asm-arm/plat-s3c24xx/s3c2442.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2442.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2442 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2442
14extern int s3c2442_init(void);
15#else
16#define s3c2442_init NULL
17#endif
diff --git a/include/asm-arm/plat-s3c24xx/s3c2443.h b/include/asm-arm/plat-s3c24xx/s3c2443.h
deleted file mode 100644
index 11d83b5c84e6..000000000000
--- a/include/asm-arm/plat-s3c24xx/s3c2443.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/* linux/include/asm-arm/plat-s3c24xx/s3c2443.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for s3c2443 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifdef CONFIG_CPU_S3C2443
14
15struct s3c2410_uartcfg;
16
17extern int s3c2443_init(void);
18
19extern void s3c2443_map_io(struct map_desc *mach_desc, int size);
20
21extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no);
22
23extern void s3c2443_init_clocks(int xtal);
24
25extern int s3c2443_baseclk_add(void);
26
27#else
28#define s3c2443_init_clocks NULL
29#define s3c2443_init_uarts NULL
30#define s3c2443_map_io NULL
31#define s3c2443_init NULL
32#endif
diff --git a/include/asm-arm/plat-s3c24xx/udc.h b/include/asm-arm/plat-s3c24xx/udc.h
deleted file mode 100644
index 546bb4008f49..000000000000
--- a/include/asm-arm/plat-s3c24xx/udc.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/udc.h
2 *
3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
4 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 *
11 * Changelog:
12 * 14-Mar-2005 RTP Created file
13 * 02-Aug-2005 RTP File rename
14 * 07-Sep-2005 BJD Minor cleanups, changed cmd to enum
15 * 18-Jan-2007 HMW Add per-platform vbus_draw function
16*/
17
18#ifndef __ASM_ARM_ARCH_UDC_H
19#define __ASM_ARM_ARCH_UDC_H
20
21enum s3c2410_udc_cmd_e {
22 S3C2410_UDC_P_ENABLE = 1, /* Pull-up enable */
23 S3C2410_UDC_P_DISABLE = 2, /* Pull-up disable */
24 S3C2410_UDC_P_RESET = 3, /* UDC reset, in case of */
25};
26
27struct s3c2410_udc_mach_info {
28 void (*udc_command)(enum s3c2410_udc_cmd_e);
29 void (*vbus_draw)(unsigned int ma);
30 unsigned int vbus_pin;
31 unsigned char vbus_pin_inverted;
32};
33
34extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *);
35
36#endif /* __ASM_ARM_ARCH_UDC_H */
diff --git a/include/asm-cris/Kbuild b/include/asm-cris/Kbuild
deleted file mode 100644
index d5b631935ec8..000000000000
--- a/include/asm-cris/Kbuild
+++ /dev/null
@@ -1,11 +0,0 @@
1include include/asm-generic/Kbuild.asm
2
3header-y += arch-v10/
4header-y += arch-v32/
5
6header-y += ethernet.h
7header-y += rtc.h
8header-y += sync_serial.h
9
10unifdef-y += etraxgpio.h
11unifdef-y += rs485.h
diff --git a/include/asm-cris/arch-v10/Kbuild b/include/asm-cris/arch-v10/Kbuild
deleted file mode 100644
index 7a192e1290b1..000000000000
--- a/include/asm-cris/arch-v10/Kbuild
+++ /dev/null
@@ -1,4 +0,0 @@
1header-y += user.h
2header-y += svinto.h
3header-y += sv_addr_ag.h
4header-y += sv_addr.agh
diff --git a/include/asm-cris/arch-v10/atomic.h b/include/asm-cris/arch-v10/atomic.h
deleted file mode 100644
index 6ef5e7d09024..000000000000
--- a/include/asm-cris/arch-v10/atomic.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_CRIS_ARCH_ATOMIC__
2#define __ASM_CRIS_ARCH_ATOMIC__
3
4#define cris_atomic_save(addr, flags) local_irq_save(flags);
5#define cris_atomic_restore(addr, flags) local_irq_restore(flags);
6
7#endif
diff --git a/include/asm-cris/arch-v10/bitops.h b/include/asm-cris/arch-v10/bitops.h
deleted file mode 100644
index be85f6de25d3..000000000000
--- a/include/asm-cris/arch-v10/bitops.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/* asm/arch/bitops.h for Linux/CRISv10 */
2
3#ifndef _CRIS_ARCH_BITOPS_H
4#define _CRIS_ARCH_BITOPS_H
5
6/*
7 * Helper functions for the core of the ff[sz] functions, wrapping the
8 * syntactically awkward asms. The asms compute the number of leading
9 * zeroes of a bits-in-byte and byte-in-word and word-in-dword-swapped
10 * number. They differ in that the first function also inverts all bits
11 * in the input.
12 */
13static inline unsigned long cris_swapnwbrlz(unsigned long w)
14{
15 /* Let's just say we return the result in the same register as the
16 input. Saying we clobber the input but can return the result
17 in another register:
18 ! __asm__ ("swapnwbr %2\n\tlz %2,%0"
19 ! : "=r,r" (res), "=r,X" (dummy) : "1,0" (w));
20 confuses gcc (sched.c, gcc from cris-dist-1.14). */
21
22 unsigned long res;
23 __asm__ ("swapnwbr %0 \n\t"
24 "lz %0,%0"
25 : "=r" (res) : "0" (w));
26 return res;
27}
28
29static inline unsigned long cris_swapwbrlz(unsigned long w)
30{
31 unsigned res;
32 __asm__ ("swapwbr %0 \n\t"
33 "lz %0,%0"
34 : "=r" (res)
35 : "0" (w));
36 return res;
37}
38
39/*
40 * ffz = Find First Zero in word. Undefined if no zero exists,
41 * so code should check against ~0UL first..
42 */
43static inline unsigned long ffz(unsigned long w)
44{
45 return cris_swapnwbrlz(w);
46}
47
48/**
49 * __ffs - find first bit in word.
50 * @word: The word to search
51 *
52 * Undefined if no bit exists, so code should check against 0 first.
53 */
54static inline unsigned long __ffs(unsigned long word)
55{
56 return cris_swapnwbrlz(~word);
57}
58
59/**
60 * ffs - find first bit set
61 * @x: the word to search
62 *
63 * This is defined the same way as
64 * the libc and compiler builtin ffs routines, therefore
65 * differs in spirit from the above ffz (man ffs).
66 */
67
68static inline unsigned long kernel_ffs(unsigned long w)
69{
70 return w ? cris_swapwbrlz (w) + 1 : 0;
71}
72
73#endif
diff --git a/include/asm-cris/arch-v10/bug.h b/include/asm-cris/arch-v10/bug.h
deleted file mode 100644
index 3485d6b34bb0..000000000000
--- a/include/asm-cris/arch-v10/bug.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#ifndef __ASM_CRISv10_ARCH_BUG_H
2#define __ASM_CRISv10_ARCH_BUG_H
3
4#include <linux/stringify.h>
5
6#ifdef CONFIG_BUG
7#ifdef CONFIG_DEBUG_BUGVERBOSE
8/* The BUG() macro is used for marking obviously incorrect code paths.
9 * It will cause a message with the file name and line number to be printed,
10 * and then cause an oops. The message is actually printed by handle_BUG()
11 * in arch/cris/kernel/traps.c, and the reason we use this method of storing
12 * the file name and line number is that we do not want to affect the registers
13 * by calling printk() before causing the oops.
14 */
15
16#define BUG_PREFIX 0x0D7F
17#define BUG_MAGIC 0x00001234
18
19struct bug_frame {
20 unsigned short prefix;
21 unsigned int magic;
22 unsigned short clear;
23 unsigned short movu;
24 unsigned short line;
25 unsigned short jump;
26 unsigned char *filename;
27};
28
29#if 0
30/* Unfortunately this version of the macro does not work due to a problem
31 * with the compiler (aka a bug) when compiling with -O2, which sometimes
32 * erroneously causes the second input to be stored in a register...
33 */
34#define BUG() \
35 __asm__ __volatile__ ("clear.d [" __stringify(BUG_MAGIC) "]\n\t"\
36 "movu.w %0,$r0\n\t" \
37 "jump %1\n\t" \
38 : : "i" (__LINE__), "i" (__FILE__))
39#else
40/* This version will have to do for now, until the compiler is fixed.
41 * The drawbacks of this version are that the file name will appear multiple
42 * times in the .rodata section, and that __LINE__ and __FILE__ can probably
43 * not be used like this with newer versions of gcc.
44 */
45#define BUG() \
46 __asm__ __volatile__ ("clear.d [" __stringify(BUG_MAGIC) "]\n\t"\
47 "movu.w " __stringify(__LINE__) ",$r0\n\t"\
48 "jump 0f\n\t" \
49 ".section .rodata\n" \
50 "0:\t.string \"" __FILE__ "\"\n\t" \
51 ".previous")
52#endif
53
54#else
55
56/* This just causes an oops. */
57#define BUG() (*(int *)0 = 0)
58
59#endif
60
61#define HAVE_ARCH_BUG
62#endif
63
64#include <asm-generic/bug.h>
65
66#endif
diff --git a/include/asm-cris/arch-v10/byteorder.h b/include/asm-cris/arch-v10/byteorder.h
deleted file mode 100644
index 255b646b7fa8..000000000000
--- a/include/asm-cris/arch-v10/byteorder.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef _CRIS_ARCH_BYTEORDER_H
2#define _CRIS_ARCH_BYTEORDER_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6
7/* we just define these two (as we can do the swap in a single
8 * asm instruction in CRIS) and the arch-independent files will put
9 * them together into ntohl etc.
10 */
11
12static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
13{
14 __asm__ ("swapwb %0" : "=r" (x) : "0" (x));
15
16 return(x);
17}
18
19static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
20{
21 __asm__ ("swapb %0" : "=r" (x) : "0" (x));
22
23 return(x);
24}
25
26#endif
diff --git a/include/asm-cris/arch-v10/cache.h b/include/asm-cris/arch-v10/cache.h
deleted file mode 100644
index aea27184d2d2..000000000000
--- a/include/asm-cris/arch-v10/cache.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_ARCH_CACHE_H
2#define _ASM_ARCH_CACHE_H
3
4/* Etrax 100LX have 32-byte cache-lines. */
5#define L1_CACHE_BYTES 32
6#define L1_CACHE_SHIFT 5
7
8#endif /* _ASM_ARCH_CACHE_H */
diff --git a/include/asm-cris/arch-v10/checksum.h b/include/asm-cris/arch-v10/checksum.h
deleted file mode 100644
index b8000c5d7fe1..000000000000
--- a/include/asm-cris/arch-v10/checksum.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef _CRIS_ARCH_CHECKSUM_H
2#define _CRIS_ARCH_CHECKSUM_H
3
4/* Checksum some values used in TCP/UDP headers.
5 *
6 * The gain by doing this in asm is that C will not generate carry-additions
7 * for the 32-bit components of the checksum, so otherwise we would have had
8 * to split all of those into 16-bit components, then add.
9 */
10
11static inline __wsum
12csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
13 unsigned short proto, __wsum sum)
14{
15 __wsum res;
16 __asm__ ("add.d %2, %0\n\t"
17 "ax\n\t"
18 "add.d %3, %0\n\t"
19 "ax\n\t"
20 "add.d %4, %0\n\t"
21 "ax\n\t"
22 "addq 0, %0\n"
23 : "=r" (res)
24 : "0" (sum), "r" (daddr), "r" (saddr), "r" ((len + proto) << 8));
25
26 return res;
27}
28
29#endif
diff --git a/include/asm-cris/arch-v10/delay.h b/include/asm-cris/arch-v10/delay.h
deleted file mode 100644
index 39481f6e0c30..000000000000
--- a/include/asm-cris/arch-v10/delay.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _CRIS_ARCH_DELAY_H
2#define _CRIS_ARCH_DELAY_H
3
4static inline void __delay(int loops)
5{
6 __asm__ __volatile__ (
7 "move.d %0,$r9\n\t"
8 "beq 2f\n\t"
9 "subq 1,$r9\n\t"
10 "1:\n\t"
11 "bne 1b\n\t"
12 "subq 1,$r9\n"
13 "2:"
14 : : "g" (loops) : "r9");
15}
16
17#endif /* defined(_CRIS_ARCH_DELAY_H) */
18
19
20
diff --git a/include/asm-cris/arch-v10/dma.h b/include/asm-cris/arch-v10/dma.h
deleted file mode 100644
index ecb9dba6fa4f..000000000000
--- a/include/asm-cris/arch-v10/dma.h
+++ /dev/null
@@ -1,74 +0,0 @@
1/* Defines for using and allocating dma channels. */
2
3#ifndef _ASM_ARCH_DMA_H
4#define _ASM_ARCH_DMA_H
5
6#define MAX_DMA_CHANNELS 10
7
8/* dma0 and dma1 used for network (ethernet) */
9#define NETWORK_TX_DMA_NBR 0
10#define NETWORK_RX_DMA_NBR 1
11
12/* dma2 and dma3 shared by par0, scsi0, ser2 and ata */
13#define PAR0_TX_DMA_NBR 2
14#define PAR0_RX_DMA_NBR 3
15#define SCSI0_TX_DMA_NBR 2
16#define SCSI0_RX_DMA_NBR 3
17#define SER2_TX_DMA_NBR 2
18#define SER2_RX_DMA_NBR 3
19#define ATA_TX_DMA_NBR 2
20#define ATA_RX_DMA_NBR 3
21
22/* dma4 and dma5 shared by par1, scsi1, ser3 and extdma0 */
23#define PAR1_TX_DMA_NBR 4
24#define PAR1_RX_DMA_NBR 5
25#define SCSI1_TX_DMA_NBR 4
26#define SCSI1_RX_DMA_NBR 5
27#define SER3_TX_DMA_NBR 4
28#define SER3_RX_DMA_NBR 5
29#define EXTDMA0_TX_DMA_NBR 4
30#define EXTDMA0_RX_DMA_NBR 5
31
32/* dma6 and dma7 shared by ser0, extdma1 and mem2mem */
33#define SER0_TX_DMA_NBR 6
34#define SER0_RX_DMA_NBR 7
35#define EXTDMA1_TX_DMA_NBR 6
36#define EXTDMA1_RX_DMA_NBR 7
37#define MEM2MEM_TX_DMA_NBR 6
38#define MEM2MEM_RX_DMA_NBR 7
39
40/* dma8 and dma9 shared by ser1 and usb */
41#define SER1_TX_DMA_NBR 8
42#define SER1_RX_DMA_NBR 9
43#define USB_TX_DMA_NBR 8
44#define USB_RX_DMA_NBR 9
45
46#endif
47
48enum dma_owner
49{
50 dma_eth,
51 dma_ser0,
52 dma_ser1, /* Async and sync */
53 dma_ser2,
54 dma_ser3, /* Async and sync */
55 dma_ata,
56 dma_par0,
57 dma_par1,
58 dma_ext0,
59 dma_ext1,
60 dma_int6,
61 dma_int7,
62 dma_usb,
63 dma_scsi0,
64 dma_scsi1
65};
66
67/* Masks used by cris_request_dma options: */
68#define DMA_VERBOSE_ON_ERROR (1<<0)
69#define DMA_PANIC_ON_ERROR ((1<<1)|DMA_VERBOSE_ON_ERROR)
70
71int cris_request_dma(unsigned int dmanr, const char * device_id,
72 unsigned options, enum dma_owner owner);
73
74void cris_free_dma(unsigned int dmanr, const char * device_id);
diff --git a/include/asm-cris/arch-v10/elf.h b/include/asm-cris/arch-v10/elf.h
deleted file mode 100644
index 1c38ee728b17..000000000000
--- a/include/asm-cris/arch-v10/elf.h
+++ /dev/null
@@ -1,81 +0,0 @@
1#ifndef __ASMCRIS_ARCH_ELF_H
2#define __ASMCRIS_ARCH_ELF_H
3
4#define ELF_MACH EF_CRIS_VARIANT_ANY_V0_V10
5
6/*
7 * This is used to ensure we don't load something for the wrong architecture.
8 */
9#define elf_check_arch(x) \
10 ((x)->e_machine == EM_CRIS \
11 && ((((x)->e_flags & EF_CRIS_VARIANT_MASK) == EF_CRIS_VARIANT_ANY_V0_V10 \
12 || (((x)->e_flags & EF_CRIS_VARIANT_MASK) == EF_CRIS_VARIANT_COMMON_V10_V32))))
13
14/*
15 * ELF register definitions..
16 */
17
18#include <asm/ptrace.h>
19
20/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program
21 starts (a register; assume first param register for CRIS)
22 contains a pointer to a function which might be
23 registered using `atexit'. This provides a mean for the
24 dynamic linker to call DT_FINI functions for shared libraries
25 that have been loaded before the code runs.
26
27 A value of 0 tells we have no such handler. */
28
29/* Explicitly set registers to 0 to increase determinism. */
30#define ELF_PLAT_INIT(_r, load_addr) do { \
31 (_r)->r13 = 0; (_r)->r12 = 0; (_r)->r11 = 0; (_r)->r10 = 0; \
32 (_r)->r9 = 0; (_r)->r8 = 0; (_r)->r7 = 0; (_r)->r6 = 0; \
33 (_r)->r5 = 0; (_r)->r4 = 0; (_r)->r3 = 0; (_r)->r2 = 0; \
34 (_r)->r1 = 0; (_r)->r0 = 0; (_r)->mof = 0; (_r)->srp = 0; \
35} while (0)
36
37/* The additional layer below is because the stack pointer is missing in
38 the pt_regs struct, but needed in a core dump. pr_reg is a elf_gregset_t,
39 and should be filled in according to the layout of the user_regs_struct
40 struct; regs is a pt_regs struct. We dump all registers, though several are
41 obviously unnecessary. That way there's less need for intelligence at
42 the receiving end (i.e. gdb). */
43#define ELF_CORE_COPY_REGS(pr_reg, regs) \
44 pr_reg[0] = regs->r0; \
45 pr_reg[1] = regs->r1; \
46 pr_reg[2] = regs->r2; \
47 pr_reg[3] = regs->r3; \
48 pr_reg[4] = regs->r4; \
49 pr_reg[5] = regs->r5; \
50 pr_reg[6] = regs->r6; \
51 pr_reg[7] = regs->r7; \
52 pr_reg[8] = regs->r8; \
53 pr_reg[9] = regs->r9; \
54 pr_reg[10] = regs->r10; \
55 pr_reg[11] = regs->r11; \
56 pr_reg[12] = regs->r12; \
57 pr_reg[13] = regs->r13; \
58 pr_reg[14] = rdusp(); /* sp */ \
59 pr_reg[15] = regs->irp; /* pc */ \
60 pr_reg[16] = 0; /* p0 */ \
61 pr_reg[17] = rdvr(); /* vr */ \
62 pr_reg[18] = 0; /* p2 */ \
63 pr_reg[19] = 0; /* p3 */ \
64 pr_reg[20] = 0; /* p4 */ \
65 pr_reg[21] = (regs->dccr & 0xffff); /* ccr */ \
66 pr_reg[22] = 0; /* p6 */ \
67 pr_reg[23] = regs->mof; /* mof */ \
68 pr_reg[24] = 0; /* p8 */ \
69 pr_reg[25] = 0; /* ibr */ \
70 pr_reg[26] = 0; /* irp */ \
71 pr_reg[27] = regs->srp; /* srp */ \
72 pr_reg[28] = 0; /* bar */ \
73 pr_reg[29] = regs->dccr; /* dccr */ \
74 pr_reg[30] = 0; /* brp */ \
75 pr_reg[31] = rdusp(); /* usp */ \
76 pr_reg[32] = 0; /* csrinstr */ \
77 pr_reg[33] = 0; /* csraddr */ \
78 pr_reg[34] = 0; /* csrdata */
79
80
81#endif
diff --git a/include/asm-cris/arch-v10/io.h b/include/asm-cris/arch-v10/io.h
deleted file mode 100644
index c08c24265299..000000000000
--- a/include/asm-cris/arch-v10/io.h
+++ /dev/null
@@ -1,199 +0,0 @@
1#ifndef _ASM_ARCH_CRIS_IO_H
2#define _ASM_ARCH_CRIS_IO_H
3
4#include <asm/arch/svinto.h>
5
6/* Etrax shadow registers - which live in arch/cris/kernel/shadows.c */
7
8extern unsigned long gen_config_ii_shadow;
9extern unsigned long port_g_data_shadow;
10extern unsigned char port_pa_dir_shadow;
11extern unsigned char port_pa_data_shadow;
12extern unsigned char port_pb_i2c_shadow;
13extern unsigned char port_pb_config_shadow;
14extern unsigned char port_pb_dir_shadow;
15extern unsigned char port_pb_data_shadow;
16extern unsigned long r_timer_ctrl_shadow;
17
18extern unsigned long port_cse1_shadow;
19extern unsigned long port_csp0_shadow;
20extern unsigned long port_csp4_shadow;
21
22extern volatile unsigned long *port_cse1_addr;
23extern volatile unsigned long *port_csp0_addr;
24extern volatile unsigned long *port_csp4_addr;
25
26/* macro for setting regs through a shadow -
27 * r = register name (like R_PORT_PA_DATA)
28 * s = shadow name (like port_pa_data_shadow)
29 * b = bit number
30 * v = value (0 or 1)
31 */
32
33#define REG_SHADOW_SET(r,s,b,v) *r = s = (s & ~(1 << (b))) | ((v) << (b))
34
35/* The LED's on various Etrax-based products are set differently. */
36
37#if defined(CONFIG_ETRAX_NO_LEDS) || defined(CONFIG_SVINTO_SIM)
38#undef CONFIG_ETRAX_PA_LEDS
39#undef CONFIG_ETRAX_PB_LEDS
40#undef CONFIG_ETRAX_CSP0_LEDS
41#define CRIS_LED_NETWORK_SET_G(x)
42#define CRIS_LED_NETWORK_SET_R(x)
43#define CRIS_LED_ACTIVE_SET_G(x)
44#define CRIS_LED_ACTIVE_SET_R(x)
45#define CRIS_LED_DISK_WRITE(x)
46#define CRIS_LED_DISK_READ(x)
47#endif
48
49#if !defined(CONFIG_ETRAX_CSP0_LEDS)
50#define CRIS_LED_BIT_SET(x)
51#define CRIS_LED_BIT_CLR(x)
52#endif
53
54#define CRIS_LED_OFF 0x00
55#define CRIS_LED_GREEN 0x01
56#define CRIS_LED_RED 0x02
57#define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED)
58
59#if defined(CONFIG_ETRAX_NO_LEDS)
60#define CRIS_LED_NETWORK_SET(x)
61#else
62#if CONFIG_ETRAX_LED1G == CONFIG_ETRAX_LED1R
63#define CRIS_LED_NETWORK_SET(x) \
64 do { \
65 CRIS_LED_NETWORK_SET_G((x) & CRIS_LED_GREEN); \
66 } while (0)
67#else
68#define CRIS_LED_NETWORK_SET(x) \
69 do { \
70 CRIS_LED_NETWORK_SET_G((x) & CRIS_LED_GREEN); \
71 CRIS_LED_NETWORK_SET_R((x) & CRIS_LED_RED); \
72 } while (0)
73#endif
74#if CONFIG_ETRAX_LED2G == CONFIG_ETRAX_LED2R
75#define CRIS_LED_ACTIVE_SET(x) \
76 do { \
77 CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \
78 } while (0)
79#else
80#define CRIS_LED_ACTIVE_SET(x) \
81 do { \
82 CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \
83 CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \
84 } while (0)
85#endif
86#endif
87
88#ifdef CONFIG_ETRAX_PA_LEDS
89#define CRIS_LED_NETWORK_SET_G(x) \
90 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1G, !(x))
91#define CRIS_LED_NETWORK_SET_R(x) \
92 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1R, !(x))
93#define CRIS_LED_ACTIVE_SET_G(x) \
94 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2G, !(x))
95#define CRIS_LED_ACTIVE_SET_R(x) \
96 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2R, !(x))
97#define CRIS_LED_DISK_WRITE(x) \
98 do{\
99 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3G, !(x));\
100 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3R, !(x));\
101 }while(0)
102#define CRIS_LED_DISK_READ(x) \
103 REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, \
104 CONFIG_ETRAX_LED3G, !(x))
105#endif
106
107#ifdef CONFIG_ETRAX_PB_LEDS
108#define CRIS_LED_NETWORK_SET_G(x) \
109 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1G, !(x))
110#define CRIS_LED_NETWORK_SET_R(x) \
111 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1R, !(x))
112#define CRIS_LED_ACTIVE_SET_G(x) \
113 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2G, !(x))
114#define CRIS_LED_ACTIVE_SET_R(x) \
115 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2R, !(x))
116#define CRIS_LED_DISK_WRITE(x) \
117 do{\
118 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3G, !(x));\
119 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3R, !(x));\
120 }while(0)
121#define CRIS_LED_DISK_READ(x) \
122 REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, \
123 CONFIG_ETRAX_LED3G, !(x))
124#endif
125
126#ifdef CONFIG_ETRAX_CSP0_LEDS
127#define CONFIGURABLE_LEDS\
128 ((1 << CONFIG_ETRAX_LED1G ) | (1 << CONFIG_ETRAX_LED1R ) |\
129 (1 << CONFIG_ETRAX_LED2G ) | (1 << CONFIG_ETRAX_LED2R ) |\
130 (1 << CONFIG_ETRAX_LED3G ) | (1 << CONFIG_ETRAX_LED3R ) |\
131 (1 << CONFIG_ETRAX_LED4G ) | (1 << CONFIG_ETRAX_LED4R ) |\
132 (1 << CONFIG_ETRAX_LED5G ) | (1 << CONFIG_ETRAX_LED5R ) |\
133 (1 << CONFIG_ETRAX_LED6G ) | (1 << CONFIG_ETRAX_LED6R ) |\
134 (1 << CONFIG_ETRAX_LED7G ) | (1 << CONFIG_ETRAX_LED7R ) |\
135 (1 << CONFIG_ETRAX_LED8Y ) | (1 << CONFIG_ETRAX_LED9Y ) |\
136 (1 << CONFIG_ETRAX_LED10Y ) |(1 << CONFIG_ETRAX_LED11Y )|\
137 (1 << CONFIG_ETRAX_LED12R ))
138
139#define CRIS_LED_NETWORK_SET_G(x) \
140 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1G, !(x))
141#define CRIS_LED_NETWORK_SET_R(x) \
142 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1R, !(x))
143#define CRIS_LED_ACTIVE_SET_G(x) \
144 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2G, !(x))
145#define CRIS_LED_ACTIVE_SET_R(x) \
146 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2R, !(x))
147#define CRIS_LED_DISK_WRITE(x) \
148 do{\
149 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x));\
150 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3R, !(x));\
151 }while(0)
152#define CRIS_LED_DISK_READ(x) \
153 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x))
154#define CRIS_LED_BIT_SET(x)\
155 do{\
156 if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\
157 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 1);\
158 }while(0)
159#define CRIS_LED_BIT_CLR(x)\
160 do{\
161 if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\
162 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 0);\
163 }while(0)
164#endif
165
166#
167#ifdef CONFIG_ETRAX_SOFT_SHUTDOWN
168#define SOFT_SHUTDOWN() \
169 REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_SHUTDOWN_BIT, 1)
170#else
171#define SOFT_SHUTDOWN()
172#endif
173
174/* Console I/O for simulated etrax100. Use #ifdef so erroneous
175 use will be evident. */
176#ifdef CONFIG_SVINTO_SIM
177 /* Let's use the ucsim interface since it lets us do write(2, ...) */
178#define SIMCOUT(s,len) \
179 asm ("moveq 4,$r9 \n\t" \
180 "moveq 2,$r10 \n\t" \
181 "move.d %0,$r11 \n\t" \
182 "move.d %1,$r12 \n\t" \
183 "push $irp \n\t" \
184 "move 0f,$irp \n\t" \
185 "jump -6809 \n" \
186 "0: \n\t" \
187 "pop $irp" \
188 : : "rm" (s), "rm" (len) : "r9","r10","r11","r12","memory")
189#define TRACE_ON() __extension__ \
190 ({ int _Foofoo; __asm__ volatile ("bmod [%0],%0" : "=r" (_Foofoo) : "0" \
191 (255)); _Foofoo; })
192
193#define TRACE_OFF() do { __asm__ volatile ("bmod [%0],%0" :: "r" (254)); } while (0)
194#define SIM_END() do { __asm__ volatile ("bmod [%0],%0" :: "r" (28)); } while (0)
195#define CRIS_CYCLES() __extension__ \
196 ({ unsigned long c; asm ("bmod [%1],%0" : "=r" (c) : "r" (27)); c;})
197#endif /* ! defined CONFIG_SVINTO_SIM */
198
199#endif
diff --git a/include/asm-cris/arch-v10/io_interface_mux.h b/include/asm-cris/arch-v10/io_interface_mux.h
deleted file mode 100644
index d92500080883..000000000000
--- a/include/asm-cris/arch-v10/io_interface_mux.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/* IO interface mux allocator for ETRAX100LX.
2 * Copyright 2004, Axis Communications AB
3 * $Id: io_interface_mux.h,v 1.1 2004/12/13 12:21:53 starvik Exp $
4 */
5
6
7#ifndef _IO_INTERFACE_MUX_H
8#define _IO_INTERFACE_MUX_H
9
10
11/* C.f. ETRAX100LX Designer's Reference 20.9 */
12
13/* The order in enum must match the order of interfaces[] in
14 * io_interface_mux.c */
15enum cris_io_interface {
16 /* Begin Non-multiplexed interfaces */
17 if_eth = 0,
18 if_serial_0,
19 /* End Non-multiplexed interfaces */
20 if_serial_1,
21 if_serial_2,
22 if_serial_3,
23 if_sync_serial_1,
24 if_sync_serial_3,
25 if_shared_ram,
26 if_shared_ram_w,
27 if_par_0,
28 if_par_1,
29 if_par_w,
30 if_scsi8_0,
31 if_scsi8_1,
32 if_scsi_w,
33 if_ata,
34 if_csp,
35 if_i2c,
36 if_usb_1,
37 if_usb_2,
38 /* GPIO pins */
39 if_gpio_grp_a,
40 if_gpio_grp_b,
41 if_gpio_grp_c,
42 if_gpio_grp_d,
43 if_gpio_grp_e,
44 if_gpio_grp_f,
45 if_max_interfaces,
46 if_unclaimed
47};
48
49int cris_request_io_interface(enum cris_io_interface ioif, const char *device_id);
50
51void cris_free_io_interface(enum cris_io_interface ioif);
52
53/* port can be 'a', 'b' or 'g' */
54int cris_io_interface_allocate_pins(const enum cris_io_interface ioif,
55 const char port,
56 const unsigned start_bit,
57 const unsigned stop_bit);
58
59/* port can be 'a', 'b' or 'g' */
60int cris_io_interface_free_pins(const enum cris_io_interface ioif,
61 const char port,
62 const unsigned start_bit,
63 const unsigned stop_bit);
64
65int cris_io_interface_register_watcher(void (*notify)(const unsigned int gpio_in_available,
66 const unsigned int gpio_out_available,
67 const unsigned char pa_available,
68 const unsigned char pb_available));
69
70void cris_io_interface_delete_watcher(void (*notify)(const unsigned int gpio_in_available,
71 const unsigned int gpio_out_available,
72 const unsigned char pa_available,
73 const unsigned char pb_available));
74
75#endif /* _IO_INTERFACE_MUX_H */
diff --git a/include/asm-cris/arch-v10/irq.h b/include/asm-cris/arch-v10/irq.h
deleted file mode 100644
index b1128a9984ae..000000000000
--- a/include/asm-cris/arch-v10/irq.h
+++ /dev/null
@@ -1,160 +0,0 @@
1/*
2 * Interrupt handling assembler and defines for Linux/CRISv10
3 */
4
5#ifndef _ASM_ARCH_IRQ_H
6#define _ASM_ARCH_IRQ_H
7
8#include <asm/arch/sv_addr_ag.h>
9
10#define NR_IRQS 32
11
12/* The first vector number used for IRQs in v10 is really 0x20 */
13/* but all the code and constants are offseted to make 0 the first */
14#define FIRST_IRQ 0
15
16#define SOME_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, some) /* 0 ? */
17#define NMI_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, nmi) /* 1 */
18#define TIMER0_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, timer0) /* 2 */
19#define TIMER1_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, timer1) /* 3 */
20/* mio, ata, par0, scsi0 on 4 */
21/* par1, scsi1 on 5 */
22#define NETWORK_STATUS_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, network) /* 6 */
23
24#define SERIAL_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, serial) /* 8 */
25#define PA_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, pa) /* 11 */
26/* extdma0 and extdma1 is at irq 12 and 13 and/or same as dma5 and dma6 ? */
27#define EXTDMA0_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, ext_dma0)
28#define EXTDMA1_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, ext_dma1)
29
30/* dma0-9 is irq 16..25 */
31/* 16,17: network */
32#define DMA0_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma0)
33#define DMA1_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma1)
34#define NETWORK_DMA_TX_IRQ_NBR DMA0_TX_IRQ_NBR
35#define NETWORK_DMA_RX_IRQ_NBR DMA1_RX_IRQ_NBR
36
37/* 18,19: dma2 and dma3 shared by par0, scsi0, ser2 and ata */
38#define DMA2_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma2)
39#define DMA3_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma3)
40#define SER2_DMA_TX_IRQ_NBR DMA2_TX_IRQ_NBR
41#define SER2_DMA_RX_IRQ_NBR DMA3_RX_IRQ_NBR
42
43/* 20,21: dma4 and dma5 shared by par1, scsi1, ser3 and extdma0 */
44#define DMA4_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma4)
45#define DMA5_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma5)
46#define SER3_DMA_TX_IRQ_NBR DMA4_TX_IRQ_NBR
47#define SER3_DMA_RX_IRQ_NBR DMA5_RX_IRQ_NBR
48
49/* 22,23: dma6 and dma7 shared by ser0, extdma1 and mem2mem */
50#define DMA6_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma6)
51#define DMA7_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma7)
52#define SER0_DMA_TX_IRQ_NBR DMA6_TX_IRQ_NBR
53#define SER0_DMA_RX_IRQ_NBR DMA7_RX_IRQ_NBR
54#define MEM2MEM_DMA_TX_IRQ_NBR DMA6_TX_IRQ_NBR
55#define MEM2MEM_DMA_RX_IRQ_NBR DMA7_RX_IRQ_NBR
56
57/* 24,25: dma8 and dma9 shared by ser1 and usb */
58#define DMA8_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma8)
59#define DMA9_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma9)
60#define SER1_DMA_TX_IRQ_NBR DMA8_TX_IRQ_NBR
61#define SER1_DMA_RX_IRQ_NBR DMA9_RX_IRQ_NBR
62#define USB_DMA_TX_IRQ_NBR DMA8_TX_IRQ_NBR
63#define USB_DMA_RX_IRQ_NBR DMA9_RX_IRQ_NBR
64
65/* usb: controller at irq 31 + uses DMA8 and DMA9 */
66#define USB_HC_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, usb)
67
68/* our fine, global, etrax irq vector! the pointer lives in the head.S file. */
69
70typedef void (*irqvectptr)(void);
71
72struct etrax_interrupt_vector {
73 irqvectptr v[256];
74};
75
76extern struct etrax_interrupt_vector *etrax_irv;
77void set_int_vector(int n, irqvectptr addr);
78void set_break_vector(int n, irqvectptr addr);
79
80#define __STR(x) #x
81#define STR(x) __STR(x)
82
83/* SAVE_ALL saves registers so they match pt_regs */
84
85#define SAVE_ALL \
86 "move $irp,[$sp=$sp-16]\n\t" /* push instruction pointer and fake SBFS struct */ \
87 "push $srp\n\t" /* push subroutine return pointer */ \
88 "push $dccr\n\t" /* push condition codes */ \
89 "push $mof\n\t" /* push multiply overflow reg */ \
90 "di\n\t" /* need to disable irq's at this point */\
91 "subq 14*4,$sp\n\t" /* make room for r0-r13 */ \
92 "movem $r13,[$sp]\n\t" /* push the r0-r13 registers */ \
93 "push $r10\n\t" /* push orig_r10 */ \
94 "clear.d [$sp=$sp-4]\n\t" /* frametype - this is a normal stackframe */
95
96 /* BLOCK_IRQ and UNBLOCK_IRQ do the same as mask_irq and unmask_irq */
97
98#define BLOCK_IRQ(mask,nr) \
99 "move.d " #mask ",$r0\n\t" \
100 "move.d $r0,[0xb00000d8]\n\t"
101
102#define UNBLOCK_IRQ(mask) \
103 "move.d " #mask ",$r0\n\t" \
104 "move.d $r0,[0xb00000dc]\n\t"
105
106#define IRQ_NAME2(nr) nr##_interrupt(void)
107#define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
108#define sIRQ_NAME(nr) IRQ_NAME2(sIRQ##nr)
109#define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr)
110
111 /* the asm IRQ handler makes sure the causing IRQ is blocked, then it calls
112 * do_IRQ (with irq disabled still). after that it unblocks and jumps to
113 * ret_from_intr (entry.S)
114 *
115 * The reason the IRQ is blocked is to allow an sti() before the handler which
116 * will acknowledge the interrupt is run.
117 */
118
119#define BUILD_IRQ(nr,mask) \
120void IRQ_NAME(nr); \
121__asm__ ( \
122 ".text\n\t" \
123 "IRQ" #nr "_interrupt:\n\t" \
124 SAVE_ALL \
125 BLOCK_IRQ(mask,nr) /* this must be done to prevent irq loops when we ei later */ \
126 "moveq "#nr",$r10\n\t" \
127 "move.d $sp,$r11\n\t" \
128 "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \
129 UNBLOCK_IRQ(mask) \
130 "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \
131 "jump ret_from_intr\n\t");
132
133/* This is subtle. The timer interrupt is crucial and it should not be disabled for
134 * too long. However, if it had been a normal interrupt as per BUILD_IRQ, it would
135 * have been BLOCK'ed, and then softirq's are run before we return here to UNBLOCK.
136 * If the softirq's take too much time to run, the timer irq won't run and the
137 * watchdog will kill us.
138 *
139 * Furthermore, if a lot of other irq's occur before we return here, the multiple_irq
140 * handler is run and it prioritizes the timer interrupt. However if we had BLOCK'ed
141 * it here, we would not get the multiple_irq at all.
142 *
143 * The non-blocking here is based on the knowledge that the timer interrupt is
144 * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
145 * be an sti() before the timer irq handler is run to acknowledge the interrupt.
146 */
147
148#define BUILD_TIMER_IRQ(nr,mask) \
149void IRQ_NAME(nr); \
150__asm__ ( \
151 ".text\n\t" \
152 "IRQ" #nr "_interrupt:\n\t" \
153 SAVE_ALL \
154 "moveq "#nr",$r10\n\t" \
155 "move.d $sp,$r11\n\t" \
156 "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \
157 "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \
158 "jump ret_from_intr\n\t");
159
160#endif
diff --git a/include/asm-cris/arch-v10/memmap.h b/include/asm-cris/arch-v10/memmap.h
deleted file mode 100644
index 13f3b971407f..000000000000
--- a/include/asm-cris/arch-v10/memmap.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ASM_ARCH_MEMMAP_H
2#define _ASM_ARCH_MEMMAP_H
3
4#define MEM_CSE0_START (0x00000000)
5#define MEM_CSE0_SIZE (0x04000000)
6#define MEM_CSE1_START (0x04000000)
7#define MEM_CSE1_SIZE (0x04000000)
8#define MEM_CSR0_START (0x08000000)
9#define MEM_CSR1_START (0x0c000000)
10#define MEM_CSP0_START (0x10000000)
11#define MEM_CSP1_START (0x14000000)
12#define MEM_CSP2_START (0x18000000)
13#define MEM_CSP3_START (0x1c000000)
14#define MEM_CSP4_START (0x20000000)
15#define MEM_CSP5_START (0x24000000)
16#define MEM_CSP6_START (0x28000000)
17#define MEM_CSP7_START (0x2c000000)
18#define MEM_DRAM_START (0x40000000)
19
20#define MEM_NON_CACHEABLE (0x80000000)
21
22#endif
diff --git a/include/asm-cris/arch-v10/mmu.h b/include/asm-cris/arch-v10/mmu.h
deleted file mode 100644
index df84f1716e6b..000000000000
--- a/include/asm-cris/arch-v10/mmu.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * CRIS MMU constants and PTE layout
3 */
4
5#ifndef _CRIS_ARCH_MMU_H
6#define _CRIS_ARCH_MMU_H
7
8/* type used in struct mm to couple an MMU context to an active mm */
9
10typedef struct
11{
12 unsigned int page_id;
13} mm_context_t;
14
15/* kernel memory segments */
16
17#define KSEG_F 0xf0000000UL
18#define KSEG_E 0xe0000000UL
19#define KSEG_D 0xd0000000UL
20#define KSEG_C 0xc0000000UL
21#define KSEG_B 0xb0000000UL
22#define KSEG_A 0xa0000000UL
23#define KSEG_9 0x90000000UL
24#define KSEG_8 0x80000000UL
25#define KSEG_7 0x70000000UL
26#define KSEG_6 0x60000000UL
27#define KSEG_5 0x50000000UL
28#define KSEG_4 0x40000000UL
29#define KSEG_3 0x30000000UL
30#define KSEG_2 0x20000000UL
31#define KSEG_1 0x10000000UL
32#define KSEG_0 0x00000000UL
33
34/* CRIS PTE bits (see R_TLB_LO in the register description)
35 *
36 * Bit: 31-13 12-------4 3 2 1 0
37 * ________________________________________________
38 * | pfn | reserved | global | valid | kernel | we |
39 * |_____|__________|________|_______|________|_____|
40 *
41 * (pfn = physical frame number)
42 */
43
44/* Real HW-based PTE bits. We use some synonym names so that
45 * things become less confusing in combination with the SW-based
46 * bits further below.
47 *
48 */
49
50#define _PAGE_WE (1<<0) /* page is write-enabled */
51#define _PAGE_SILENT_WRITE (1<<0) /* synonym */
52#define _PAGE_KERNEL (1<<1) /* page is kernel only */
53#define _PAGE_VALID (1<<2) /* page is valid */
54#define _PAGE_SILENT_READ (1<<2) /* synonym */
55#define _PAGE_GLOBAL (1<<3) /* global page - context is ignored */
56
57/* Bits the HW doesn't care about but the kernel uses them in SW */
58
59#define _PAGE_PRESENT (1<<4) /* page present in memory */
60#define _PAGE_FILE (1<<5) /* set: pagecache, unset: swap (when !PRESENT) */
61#define _PAGE_ACCESSED (1<<5) /* simulated in software using valid bit */
62#define _PAGE_MODIFIED (1<<6) /* simulated in software using we bit */
63#define _PAGE_READ (1<<7) /* read-enabled */
64#define _PAGE_WRITE (1<<8) /* write-enabled */
65
66/* Define some higher level generic page attributes. */
67
68#define __READABLE (_PAGE_READ | _PAGE_SILENT_READ | _PAGE_ACCESSED)
69#define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED)
70
71#define _PAGE_TABLE (_PAGE_PRESENT | __READABLE | __WRITEABLE)
72#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED)
73
74#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
75#define PAGE_SHARED __pgprot(_PAGE_PRESENT | __READABLE | _PAGE_WRITE | \
76 _PAGE_ACCESSED)
77#define PAGE_COPY __pgprot(_PAGE_PRESENT | __READABLE) // | _PAGE_COW
78#define PAGE_READONLY __pgprot(_PAGE_PRESENT | __READABLE)
79#define PAGE_KERNEL __pgprot(_PAGE_GLOBAL | _PAGE_KERNEL | \
80 _PAGE_PRESENT | __READABLE | __WRITEABLE)
81#define _KERNPG_TABLE (_PAGE_TABLE | _PAGE_KERNEL)
82
83/*
84 * CRIS can't do page protection for execute, and considers read the same.
85 * Also, write permissions imply read permissions. This is the closest we can
86 * get..
87 */
88
89#define __P000 PAGE_NONE
90#define __P001 PAGE_READONLY
91#define __P010 PAGE_COPY
92#define __P011 PAGE_COPY
93#define __P100 PAGE_READONLY
94#define __P101 PAGE_READONLY
95#define __P110 PAGE_COPY
96#define __P111 PAGE_COPY
97
98#define __S000 PAGE_NONE
99#define __S001 PAGE_READONLY
100#define __S010 PAGE_SHARED
101#define __S011 PAGE_SHARED
102#define __S100 PAGE_READONLY
103#define __S101 PAGE_READONLY
104#define __S110 PAGE_SHARED
105#define __S111 PAGE_SHARED
106
107#define PTE_FILE_MAX_BITS 26
108
109#endif
diff --git a/include/asm-cris/arch-v10/offset.h b/include/asm-cris/arch-v10/offset.h
deleted file mode 100644
index 675b51d85639..000000000000
--- a/include/asm-cris/arch-v10/offset.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __ASM_OFFSETS_H__
2#define __ASM_OFFSETS_H__
3/*
4 * DO NOT MODIFY.
5 *
6 * This file was generated by arch/cris/Makefile
7 *
8 */
9
10#define PT_orig_r10 4 /* offsetof(struct pt_regs, orig_r10) */
11#define PT_r13 8 /* offsetof(struct pt_regs, r13) */
12#define PT_r12 12 /* offsetof(struct pt_regs, r12) */
13#define PT_r11 16 /* offsetof(struct pt_regs, r11) */
14#define PT_r10 20 /* offsetof(struct pt_regs, r10) */
15#define PT_r9 24 /* offsetof(struct pt_regs, r9) */
16#define PT_mof 64 /* offsetof(struct pt_regs, mof) */
17#define PT_dccr 68 /* offsetof(struct pt_regs, dccr) */
18#define PT_srp 72 /* offsetof(struct pt_regs, srp) */
19
20#define TI_task 0 /* offsetof(struct thread_info, task) */
21#define TI_flags 8 /* offsetof(struct thread_info, flags) */
22#define TI_preempt_count 16 /* offsetof(struct thread_info, preempt_count) */
23
24#define THREAD_ksp 0 /* offsetof(struct thread_struct, ksp) */
25#define THREAD_usp 4 /* offsetof(struct thread_struct, usp) */
26#define THREAD_dccr 8 /* offsetof(struct thread_struct, dccr) */
27
28#define TASK_pid 141 /* offsetof(struct task_struct, pid) */
29
30#define LCLONE_VM 256 /* CLONE_VM */
31#define LCLONE_UNTRACED 8388608 /* CLONE_UNTRACED */
32
33#endif
diff --git a/include/asm-cris/arch-v10/page.h b/include/asm-cris/arch-v10/page.h
deleted file mode 100644
index ffafc99c3472..000000000000
--- a/include/asm-cris/arch-v10/page.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _CRIS_ARCH_PAGE_H
2#define _CRIS_ARCH_PAGE_H
3
4
5#ifdef __KERNEL__
6
7/* This handles the memory map.. */
8#ifdef CONFIG_CRIS_LOW_MAP
9#define PAGE_OFFSET KSEG_6 /* kseg_6 is mapped to physical ram */
10#else
11#define PAGE_OFFSET KSEG_C /* kseg_c is mapped to physical ram */
12#endif
13
14/* macros to convert between really physical and virtual addresses
15 * by stripping a selected bit, we can convert between KSEG_x and
16 * 0x40000000 where the DRAM really resides
17 */
18
19#ifdef CONFIG_CRIS_LOW_MAP
20/* we have DRAM virtually at 0x6 */
21#define __pa(x) ((unsigned long)(x) & 0xdfffffff)
22#define __va(x) ((void *)((unsigned long)(x) | 0x20000000))
23#else
24/* we have DRAM virtually at 0xc */
25#define __pa(x) ((unsigned long)(x) & 0x7fffffff)
26#define __va(x) ((void *)((unsigned long)(x) | 0x80000000))
27#endif
28
29#endif
30#endif
diff --git a/include/asm-cris/arch-v10/pgtable.h b/include/asm-cris/arch-v10/pgtable.h
deleted file mode 100644
index 2a2576d1fc97..000000000000
--- a/include/asm-cris/arch-v10/pgtable.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef _CRIS_ARCH_PGTABLE_H
2#define _CRIS_ARCH_PGTABLE_H
3
4/*
5 * Kernels own virtual memory area.
6 */
7
8#ifdef CONFIG_CRIS_LOW_MAP
9#define VMALLOC_START KSEG_7
10#define VMALLOC_END KSEG_8
11#else
12#define VMALLOC_START KSEG_D
13#define VMALLOC_END KSEG_E
14#endif
15
16#endif
17
diff --git a/include/asm-cris/arch-v10/processor.h b/include/asm-cris/arch-v10/processor.h
deleted file mode 100644
index cc692c7a0660..000000000000
--- a/include/asm-cris/arch-v10/processor.h
+++ /dev/null
@@ -1,70 +0,0 @@
1#ifndef __ASM_CRIS_ARCH_PROCESSOR_H
2#define __ASM_CRIS_ARCH_PROCESSOR_H
3
4/*
5 * Default implementation of macro that returns current
6 * instruction pointer ("program counter").
7 */
8#define current_text_addr() ({void *pc; __asm__ ("move.d $pc,%0" : "=rm" (pc)); pc; })
9
10/* CRIS has no problems with write protection */
11#define wp_works_ok 1
12
13/* CRIS thread_struct. this really has nothing to do with the processor itself, since
14 * CRIS does not do any hardware task-switching, but it's here for legacy reasons.
15 * The thread_struct here is used when task-switching using _resume defined in entry.S.
16 * The offsets here are hardcoded into _resume - if you change this struct, you need to
17 * change them as well!!!
18*/
19
20struct thread_struct {
21 unsigned long ksp; /* kernel stack pointer */
22 unsigned long usp; /* user stack pointer */
23 unsigned long dccr; /* saved flag register */
24};
25
26/*
27 * User space process size. This is hardcoded into a few places,
28 * so don't change it unless you know what you are doing.
29 */
30
31#ifdef CONFIG_CRIS_LOW_MAP
32#define TASK_SIZE (0x50000000UL) /* 1.25 GB */
33#else
34#define TASK_SIZE (0xA0000000UL) /* 2.56 GB */
35#endif
36
37#define INIT_THREAD { \
38 0, 0, 0x20 } /* ccr = int enable, nothing else */
39
40#define KSTK_EIP(tsk) \
41({ \
42 unsigned long eip = 0; \
43 unsigned long regs = (unsigned long)task_pt_regs(tsk); \
44 if (regs > PAGE_SIZE && \
45 virt_addr_valid(regs)) \
46 eip = ((struct pt_regs *)regs)->irp; \
47 eip; \
48})
49
50/* give the thread a program location
51 * set user-mode (The 'U' flag (User mode flag) is CCR/DCCR bit 8)
52 * switch user-stackpointer
53 */
54
55#define start_thread(regs, ip, usp) do { \
56 set_fs(USER_DS); \
57 regs->irp = ip; \
58 regs->dccr |= 1 << U_DCCR_BITNR; \
59 wrusp(usp); \
60} while(0)
61
62/* Called when handling a kernel bus fault fixup.
63 *
64 * After a fixup we do not want to return by restoring the CPU-state
65 * anymore, so switch frame-types (see ptrace.h)
66 */
67#define arch_fixup(regs) \
68 regs->frametype = CRIS_FRAME_NORMAL;
69
70#endif
diff --git a/include/asm-cris/arch-v10/ptrace.h b/include/asm-cris/arch-v10/ptrace.h
deleted file mode 100644
index 2f464eab3a51..000000000000
--- a/include/asm-cris/arch-v10/ptrace.h
+++ /dev/null
@@ -1,119 +0,0 @@
1#ifndef _CRIS_ARCH_PTRACE_H
2#define _CRIS_ARCH_PTRACE_H
3
4/* Frame types */
5
6#define CRIS_FRAME_NORMAL 0 /* normal frame without SBFS stacking */
7#define CRIS_FRAME_BUSFAULT 1 /* frame stacked using SBFS, need RBF return
8 path */
9
10/* Register numbers in the ptrace system call interface */
11
12#define PT_FRAMETYPE 0
13#define PT_ORIG_R10 1
14#define PT_R13 2
15#define PT_R12 3
16#define PT_R11 4
17#define PT_R10 5
18#define PT_R9 6
19#define PT_R8 7
20#define PT_R7 8
21#define PT_R6 9
22#define PT_R5 10
23#define PT_R4 11
24#define PT_R3 12
25#define PT_R2 13
26#define PT_R1 14
27#define PT_R0 15
28#define PT_MOF 16
29#define PT_DCCR 17
30#define PT_SRP 18
31#define PT_IRP 19 /* This is actually the debugged process' PC */
32#define PT_CSRINSTR 20 /* CPU Status record remnants -
33 valid if frametype == busfault */
34#define PT_CSRADDR 21
35#define PT_CSRDATA 22
36#define PT_USP 23 /* special case - USP is not in the pt_regs */
37#define PT_MAX 23
38
39/* Condition code bit numbers. The same numbers apply to CCR of course,
40 but we use DCCR everywhere else, so let's try and be consistent. */
41#define C_DCCR_BITNR 0
42#define V_DCCR_BITNR 1
43#define Z_DCCR_BITNR 2
44#define N_DCCR_BITNR 3
45#define X_DCCR_BITNR 4
46#define I_DCCR_BITNR 5
47#define B_DCCR_BITNR 6
48#define M_DCCR_BITNR 7
49#define U_DCCR_BITNR 8
50#define P_DCCR_BITNR 9
51#define F_DCCR_BITNR 10
52
53/* pt_regs not only specifices the format in the user-struct during
54 * ptrace but is also the frame format used in the kernel prologue/epilogues
55 * themselves
56 */
57
58struct pt_regs {
59 unsigned long frametype; /* type of stackframe */
60 unsigned long orig_r10;
61 /* pushed by movem r13, [sp] in SAVE_ALL, movem pushes backwards */
62 unsigned long r13;
63 unsigned long r12;
64 unsigned long r11;
65 unsigned long r10;
66 unsigned long r9;
67 unsigned long r8;
68 unsigned long r7;
69 unsigned long r6;
70 unsigned long r5;
71 unsigned long r4;
72 unsigned long r3;
73 unsigned long r2;
74 unsigned long r1;
75 unsigned long r0;
76 unsigned long mof;
77 unsigned long dccr;
78 unsigned long srp;
79 unsigned long irp; /* This is actually the debugged process' PC */
80 unsigned long csrinstr;
81 unsigned long csraddr;
82 unsigned long csrdata;
83};
84
85/* switch_stack is the extra stuff pushed onto the stack in _resume (entry.S)
86 * when doing a context-switch. it is used (apart from in resume) when a new
87 * thread is made and we need to make _resume (which is starting it for the
88 * first time) realise what is going on.
89 *
90 * Actually, the use is very close to the thread struct (TSS) in that both the
91 * switch_stack and the TSS are used to keep thread stuff when switching in
92 * _resume.
93 */
94
95struct switch_stack {
96 unsigned long r9;
97 unsigned long r8;
98 unsigned long r7;
99 unsigned long r6;
100 unsigned long r5;
101 unsigned long r4;
102 unsigned long r3;
103 unsigned long r2;
104 unsigned long r1;
105 unsigned long r0;
106 unsigned long return_ip; /* ip that _resume will return to */
107};
108
109#ifdef __KERNEL__
110
111/* bit 8 is user-mode flag */
112#define user_mode(regs) (((regs)->dccr & 0x100) != 0)
113#define instruction_pointer(regs) ((regs)->irp)
114#define profile_pc(regs) instruction_pointer(regs)
115extern void show_regs(struct pt_regs *);
116
117#endif /* __KERNEL__ */
118
119#endif
diff --git a/include/asm-cris/arch-v10/sv_addr.agh b/include/asm-cris/arch-v10/sv_addr.agh
deleted file mode 100644
index 6ac3a7bc9760..000000000000
--- a/include/asm-cris/arch-v10/sv_addr.agh
+++ /dev/null
@@ -1,7306 +0,0 @@
1/*
2!* This file was automatically generated by /n/asic/bin/reg_macro_gen
3!* from the file `/n/asic/projects/etrax_ng/doc/work/etrax_ng_regs.rd'.
4!* Editing within this file is thus not recommended,
5!* make the changes in `/n/asic/projects/etrax_ng/doc/work/etrax_ng_regs.rd' instead.
6!*/
7
8
9/*
10!* Bus interface configuration registers
11!*/
12
13#define R_WAITSTATES (IO_TYPECAST_UDWORD 0xb0000000)
14#define R_WAITSTATES__pcs4_7_zw__BITNR 30
15#define R_WAITSTATES__pcs4_7_zw__WIDTH 2
16#define R_WAITSTATES__pcs4_7_ew__BITNR 28
17#define R_WAITSTATES__pcs4_7_ew__WIDTH 2
18#define R_WAITSTATES__pcs4_7_lw__BITNR 24
19#define R_WAITSTATES__pcs4_7_lw__WIDTH 4
20#define R_WAITSTATES__pcs0_3_zw__BITNR 22
21#define R_WAITSTATES__pcs0_3_zw__WIDTH 2
22#define R_WAITSTATES__pcs0_3_ew__BITNR 20
23#define R_WAITSTATES__pcs0_3_ew__WIDTH 2
24#define R_WAITSTATES__pcs0_3_lw__BITNR 16
25#define R_WAITSTATES__pcs0_3_lw__WIDTH 4
26#define R_WAITSTATES__sram_zw__BITNR 14
27#define R_WAITSTATES__sram_zw__WIDTH 2
28#define R_WAITSTATES__sram_ew__BITNR 12
29#define R_WAITSTATES__sram_ew__WIDTH 2
30#define R_WAITSTATES__sram_lw__BITNR 8
31#define R_WAITSTATES__sram_lw__WIDTH 4
32#define R_WAITSTATES__flash_zw__BITNR 6
33#define R_WAITSTATES__flash_zw__WIDTH 2
34#define R_WAITSTATES__flash_ew__BITNR 4
35#define R_WAITSTATES__flash_ew__WIDTH 2
36#define R_WAITSTATES__flash_lw__BITNR 0
37#define R_WAITSTATES__flash_lw__WIDTH 4
38
39#define R_BUS_CONFIG (IO_TYPECAST_UDWORD 0xb0000004)
40#define R_BUS_CONFIG__sram_type__BITNR 9
41#define R_BUS_CONFIG__sram_type__WIDTH 1
42#define R_BUS_CONFIG__sram_type__cwe 1
43#define R_BUS_CONFIG__sram_type__bwe 0
44#define R_BUS_CONFIG__dma_burst__BITNR 8
45#define R_BUS_CONFIG__dma_burst__WIDTH 1
46#define R_BUS_CONFIG__dma_burst__burst16 1
47#define R_BUS_CONFIG__dma_burst__burst32 0
48#define R_BUS_CONFIG__pcs4_7_wr__BITNR 7
49#define R_BUS_CONFIG__pcs4_7_wr__WIDTH 1
50#define R_BUS_CONFIG__pcs4_7_wr__ext 1
51#define R_BUS_CONFIG__pcs4_7_wr__norm 0
52#define R_BUS_CONFIG__pcs0_3_wr__BITNR 6
53#define R_BUS_CONFIG__pcs0_3_wr__WIDTH 1
54#define R_BUS_CONFIG__pcs0_3_wr__ext 1
55#define R_BUS_CONFIG__pcs0_3_wr__norm 0
56#define R_BUS_CONFIG__sram_wr__BITNR 5
57#define R_BUS_CONFIG__sram_wr__WIDTH 1
58#define R_BUS_CONFIG__sram_wr__ext 1
59#define R_BUS_CONFIG__sram_wr__norm 0
60#define R_BUS_CONFIG__flash_wr__BITNR 4
61#define R_BUS_CONFIG__flash_wr__WIDTH 1
62#define R_BUS_CONFIG__flash_wr__ext 1
63#define R_BUS_CONFIG__flash_wr__norm 0
64#define R_BUS_CONFIG__pcs4_7_bw__BITNR 3
65#define R_BUS_CONFIG__pcs4_7_bw__WIDTH 1
66#define R_BUS_CONFIG__pcs4_7_bw__bw32 1
67#define R_BUS_CONFIG__pcs4_7_bw__bw16 0
68#define R_BUS_CONFIG__pcs0_3_bw__BITNR 2
69#define R_BUS_CONFIG__pcs0_3_bw__WIDTH 1
70#define R_BUS_CONFIG__pcs0_3_bw__bw32 1
71#define R_BUS_CONFIG__pcs0_3_bw__bw16 0
72#define R_BUS_CONFIG__sram_bw__BITNR 1
73#define R_BUS_CONFIG__sram_bw__WIDTH 1
74#define R_BUS_CONFIG__sram_bw__bw32 1
75#define R_BUS_CONFIG__sram_bw__bw16 0
76#define R_BUS_CONFIG__flash_bw__BITNR 0
77#define R_BUS_CONFIG__flash_bw__WIDTH 1
78#define R_BUS_CONFIG__flash_bw__bw32 1
79#define R_BUS_CONFIG__flash_bw__bw16 0
80
81#define R_BUS_STATUS (IO_TYPECAST_RO_UDWORD 0xb0000004)
82#define R_BUS_STATUS__pll_lock_tm__BITNR 5
83#define R_BUS_STATUS__pll_lock_tm__WIDTH 1
84#define R_BUS_STATUS__pll_lock_tm__expired 0
85#define R_BUS_STATUS__pll_lock_tm__counting 1
86#define R_BUS_STATUS__both_faults__BITNR 4
87#define R_BUS_STATUS__both_faults__WIDTH 1
88#define R_BUS_STATUS__both_faults__no 0
89#define R_BUS_STATUS__both_faults__yes 1
90#define R_BUS_STATUS__bsen___BITNR 3
91#define R_BUS_STATUS__bsen___WIDTH 1
92#define R_BUS_STATUS__bsen___enable 0
93#define R_BUS_STATUS__bsen___disable 1
94#define R_BUS_STATUS__boot__BITNR 1
95#define R_BUS_STATUS__boot__WIDTH 2
96#define R_BUS_STATUS__boot__uncached 0
97#define R_BUS_STATUS__boot__serial 1
98#define R_BUS_STATUS__boot__network 2
99#define R_BUS_STATUS__boot__parallel 3
100#define R_BUS_STATUS__flashw__BITNR 0
101#define R_BUS_STATUS__flashw__WIDTH 1
102#define R_BUS_STATUS__flashw__bw32 1
103#define R_BUS_STATUS__flashw__bw16 0
104
105#define R_DRAM_TIMING (IO_TYPECAST_UDWORD 0xb0000008)
106#define R_DRAM_TIMING__sdram__BITNR 31
107#define R_DRAM_TIMING__sdram__WIDTH 1
108#define R_DRAM_TIMING__sdram__enable 1
109#define R_DRAM_TIMING__sdram__disable 0
110#define R_DRAM_TIMING__ref__BITNR 14
111#define R_DRAM_TIMING__ref__WIDTH 2
112#define R_DRAM_TIMING__ref__e52us 0
113#define R_DRAM_TIMING__ref__e13us 1
114#define R_DRAM_TIMING__ref__e8700ns 2
115#define R_DRAM_TIMING__ref__disable 3
116#define R_DRAM_TIMING__rp__BITNR 12
117#define R_DRAM_TIMING__rp__WIDTH 2
118#define R_DRAM_TIMING__rs__BITNR 10
119#define R_DRAM_TIMING__rs__WIDTH 2
120#define R_DRAM_TIMING__rh__BITNR 8
121#define R_DRAM_TIMING__rh__WIDTH 2
122#define R_DRAM_TIMING__w__BITNR 7
123#define R_DRAM_TIMING__w__WIDTH 1
124#define R_DRAM_TIMING__w__norm 0
125#define R_DRAM_TIMING__w__ext 1
126#define R_DRAM_TIMING__c__BITNR 6
127#define R_DRAM_TIMING__c__WIDTH 1
128#define R_DRAM_TIMING__c__norm 0
129#define R_DRAM_TIMING__c__ext 1
130#define R_DRAM_TIMING__cz__BITNR 4
131#define R_DRAM_TIMING__cz__WIDTH 2
132#define R_DRAM_TIMING__cp__BITNR 2
133#define R_DRAM_TIMING__cp__WIDTH 2
134#define R_DRAM_TIMING__cw__BITNR 0
135#define R_DRAM_TIMING__cw__WIDTH 2
136
137#define R_SDRAM_TIMING (IO_TYPECAST_UDWORD 0xb0000008)
138#define R_SDRAM_TIMING__sdram__BITNR 31
139#define R_SDRAM_TIMING__sdram__WIDTH 1
140#define R_SDRAM_TIMING__sdram__enable 1
141#define R_SDRAM_TIMING__sdram__disable 0
142#define R_SDRAM_TIMING__mrs_data__BITNR 16
143#define R_SDRAM_TIMING__mrs_data__WIDTH 15
144#define R_SDRAM_TIMING__ref__BITNR 14
145#define R_SDRAM_TIMING__ref__WIDTH 2
146#define R_SDRAM_TIMING__ref__e52us 0
147#define R_SDRAM_TIMING__ref__e13us 1
148#define R_SDRAM_TIMING__ref__e6500ns 2
149#define R_SDRAM_TIMING__ref__disable 3
150#define R_SDRAM_TIMING__ddr__BITNR 13
151#define R_SDRAM_TIMING__ddr__WIDTH 1
152#define R_SDRAM_TIMING__ddr__on 1
153#define R_SDRAM_TIMING__ddr__off 0
154#define R_SDRAM_TIMING__clk100__BITNR 12
155#define R_SDRAM_TIMING__clk100__WIDTH 1
156#define R_SDRAM_TIMING__clk100__on 1
157#define R_SDRAM_TIMING__clk100__off 0
158#define R_SDRAM_TIMING__ps__BITNR 11
159#define R_SDRAM_TIMING__ps__WIDTH 1
160#define R_SDRAM_TIMING__ps__on 1
161#define R_SDRAM_TIMING__ps__off 0
162#define R_SDRAM_TIMING__cmd__BITNR 9
163#define R_SDRAM_TIMING__cmd__WIDTH 2
164#define R_SDRAM_TIMING__cmd__pre 3
165#define R_SDRAM_TIMING__cmd__ref 2
166#define R_SDRAM_TIMING__cmd__mrs 1
167#define R_SDRAM_TIMING__cmd__nop 0
168#define R_SDRAM_TIMING__pde__BITNR 8
169#define R_SDRAM_TIMING__pde__WIDTH 1
170#define R_SDRAM_TIMING__rc__BITNR 6
171#define R_SDRAM_TIMING__rc__WIDTH 2
172#define R_SDRAM_TIMING__rp__BITNR 4
173#define R_SDRAM_TIMING__rp__WIDTH 2
174#define R_SDRAM_TIMING__rcd__BITNR 2
175#define R_SDRAM_TIMING__rcd__WIDTH 2
176#define R_SDRAM_TIMING__cl__BITNR 0
177#define R_SDRAM_TIMING__cl__WIDTH 2
178
179#define R_DRAM_CONFIG (IO_TYPECAST_UDWORD 0xb000000c)
180#define R_DRAM_CONFIG__wmm1__BITNR 31
181#define R_DRAM_CONFIG__wmm1__WIDTH 1
182#define R_DRAM_CONFIG__wmm1__wmm 1
183#define R_DRAM_CONFIG__wmm1__norm 0
184#define R_DRAM_CONFIG__wmm0__BITNR 30
185#define R_DRAM_CONFIG__wmm0__WIDTH 1
186#define R_DRAM_CONFIG__wmm0__wmm 1
187#define R_DRAM_CONFIG__wmm0__norm 0
188#define R_DRAM_CONFIG__sh1__BITNR 27
189#define R_DRAM_CONFIG__sh1__WIDTH 3
190#define R_DRAM_CONFIG__sh0__BITNR 24
191#define R_DRAM_CONFIG__sh0__WIDTH 3
192#define R_DRAM_CONFIG__w__BITNR 23
193#define R_DRAM_CONFIG__w__WIDTH 1
194#define R_DRAM_CONFIG__w__bw16 0
195#define R_DRAM_CONFIG__w__bw32 1
196#define R_DRAM_CONFIG__c__BITNR 22
197#define R_DRAM_CONFIG__c__WIDTH 1
198#define R_DRAM_CONFIG__c__byte 0
199#define R_DRAM_CONFIG__c__bank 1
200#define R_DRAM_CONFIG__e__BITNR 21
201#define R_DRAM_CONFIG__e__WIDTH 1
202#define R_DRAM_CONFIG__e__fast 0
203#define R_DRAM_CONFIG__e__edo 1
204#define R_DRAM_CONFIG__group_sel__BITNR 16
205#define R_DRAM_CONFIG__group_sel__WIDTH 5
206#define R_DRAM_CONFIG__group_sel__grp0 0
207#define R_DRAM_CONFIG__group_sel__grp1 1
208#define R_DRAM_CONFIG__group_sel__bit9 9
209#define R_DRAM_CONFIG__group_sel__bit10 10
210#define R_DRAM_CONFIG__group_sel__bit11 11
211#define R_DRAM_CONFIG__group_sel__bit12 12
212#define R_DRAM_CONFIG__group_sel__bit13 13
213#define R_DRAM_CONFIG__group_sel__bit14 14
214#define R_DRAM_CONFIG__group_sel__bit15 15
215#define R_DRAM_CONFIG__group_sel__bit16 16
216#define R_DRAM_CONFIG__group_sel__bit17 17
217#define R_DRAM_CONFIG__group_sel__bit18 18
218#define R_DRAM_CONFIG__group_sel__bit19 19
219#define R_DRAM_CONFIG__group_sel__bit20 20
220#define R_DRAM_CONFIG__group_sel__bit21 21
221#define R_DRAM_CONFIG__group_sel__bit22 22
222#define R_DRAM_CONFIG__group_sel__bit23 23
223#define R_DRAM_CONFIG__group_sel__bit24 24
224#define R_DRAM_CONFIG__group_sel__bit25 25
225#define R_DRAM_CONFIG__group_sel__bit26 26
226#define R_DRAM_CONFIG__group_sel__bit27 27
227#define R_DRAM_CONFIG__group_sel__bit28 28
228#define R_DRAM_CONFIG__group_sel__bit29 29
229#define R_DRAM_CONFIG__ca1__BITNR 13
230#define R_DRAM_CONFIG__ca1__WIDTH 3
231#define R_DRAM_CONFIG__bank23sel__BITNR 8
232#define R_DRAM_CONFIG__bank23sel__WIDTH 5
233#define R_DRAM_CONFIG__bank23sel__bank0 0
234#define R_DRAM_CONFIG__bank23sel__bank1 1
235#define R_DRAM_CONFIG__bank23sel__bit9 9
236#define R_DRAM_CONFIG__bank23sel__bit10 10
237#define R_DRAM_CONFIG__bank23sel__bit11 11
238#define R_DRAM_CONFIG__bank23sel__bit12 12
239#define R_DRAM_CONFIG__bank23sel__bit13 13
240#define R_DRAM_CONFIG__bank23sel__bit14 14
241#define R_DRAM_CONFIG__bank23sel__bit15 15
242#define R_DRAM_CONFIG__bank23sel__bit16 16
243#define R_DRAM_CONFIG__bank23sel__bit17 17
244#define R_DRAM_CONFIG__bank23sel__bit18 18
245#define R_DRAM_CONFIG__bank23sel__bit19 19
246#define R_DRAM_CONFIG__bank23sel__bit20 20
247#define R_DRAM_CONFIG__bank23sel__bit21 21
248#define R_DRAM_CONFIG__bank23sel__bit22 22
249#define R_DRAM_CONFIG__bank23sel__bit23 23
250#define R_DRAM_CONFIG__bank23sel__bit24 24
251#define R_DRAM_CONFIG__bank23sel__bit25 25
252#define R_DRAM_CONFIG__bank23sel__bit26 26
253#define R_DRAM_CONFIG__bank23sel__bit27 27
254#define R_DRAM_CONFIG__bank23sel__bit28 28
255#define R_DRAM_CONFIG__bank23sel__bit29 29
256#define R_DRAM_CONFIG__ca0__BITNR 5
257#define R_DRAM_CONFIG__ca0__WIDTH 3
258#define R_DRAM_CONFIG__bank01sel__BITNR 0
259#define R_DRAM_CONFIG__bank01sel__WIDTH 5
260#define R_DRAM_CONFIG__bank01sel__bank0 0
261#define R_DRAM_CONFIG__bank01sel__bank1 1
262#define R_DRAM_CONFIG__bank01sel__bit9 9
263#define R_DRAM_CONFIG__bank01sel__bit10 10
264#define R_DRAM_CONFIG__bank01sel__bit11 11
265#define R_DRAM_CONFIG__bank01sel__bit12 12
266#define R_DRAM_CONFIG__bank01sel__bit13 13
267#define R_DRAM_CONFIG__bank01sel__bit14 14
268#define R_DRAM_CONFIG__bank01sel__bit15 15
269#define R_DRAM_CONFIG__bank01sel__bit16 16
270#define R_DRAM_CONFIG__bank01sel__bit17 17
271#define R_DRAM_CONFIG__bank01sel__bit18 18
272#define R_DRAM_CONFIG__bank01sel__bit19 19
273#define R_DRAM_CONFIG__bank01sel__bit20 20
274#define R_DRAM_CONFIG__bank01sel__bit21 21
275#define R_DRAM_CONFIG__bank01sel__bit22 22
276#define R_DRAM_CONFIG__bank01sel__bit23 23
277#define R_DRAM_CONFIG__bank01sel__bit24 24
278#define R_DRAM_CONFIG__bank01sel__bit25 25
279#define R_DRAM_CONFIG__bank01sel__bit26 26
280#define R_DRAM_CONFIG__bank01sel__bit27 27
281#define R_DRAM_CONFIG__bank01sel__bit28 28
282#define R_DRAM_CONFIG__bank01sel__bit29 29
283
284#define R_SDRAM_CONFIG (IO_TYPECAST_UDWORD 0xb000000c)
285#define R_SDRAM_CONFIG__wmm1__BITNR 31
286#define R_SDRAM_CONFIG__wmm1__WIDTH 1
287#define R_SDRAM_CONFIG__wmm1__wmm 1
288#define R_SDRAM_CONFIG__wmm1__norm 0
289#define R_SDRAM_CONFIG__wmm0__BITNR 30
290#define R_SDRAM_CONFIG__wmm0__WIDTH 1
291#define R_SDRAM_CONFIG__wmm0__wmm 1
292#define R_SDRAM_CONFIG__wmm0__norm 0
293#define R_SDRAM_CONFIG__sh1__BITNR 27
294#define R_SDRAM_CONFIG__sh1__WIDTH 3
295#define R_SDRAM_CONFIG__sh0__BITNR 24
296#define R_SDRAM_CONFIG__sh0__WIDTH 3
297#define R_SDRAM_CONFIG__w__BITNR 23
298#define R_SDRAM_CONFIG__w__WIDTH 1
299#define R_SDRAM_CONFIG__w__bw16 0
300#define R_SDRAM_CONFIG__w__bw32 1
301#define R_SDRAM_CONFIG__type1__BITNR 22
302#define R_SDRAM_CONFIG__type1__WIDTH 1
303#define R_SDRAM_CONFIG__type1__bank2 0
304#define R_SDRAM_CONFIG__type1__bank4 1
305#define R_SDRAM_CONFIG__type0__BITNR 21
306#define R_SDRAM_CONFIG__type0__WIDTH 1
307#define R_SDRAM_CONFIG__type0__bank2 0
308#define R_SDRAM_CONFIG__type0__bank4 1
309#define R_SDRAM_CONFIG__group_sel__BITNR 16
310#define R_SDRAM_CONFIG__group_sel__WIDTH 5
311#define R_SDRAM_CONFIG__group_sel__grp0 0
312#define R_SDRAM_CONFIG__group_sel__grp1 1
313#define R_SDRAM_CONFIG__group_sel__bit9 9
314#define R_SDRAM_CONFIG__group_sel__bit10 10
315#define R_SDRAM_CONFIG__group_sel__bit11 11
316#define R_SDRAM_CONFIG__group_sel__bit12 12
317#define R_SDRAM_CONFIG__group_sel__bit13 13
318#define R_SDRAM_CONFIG__group_sel__bit14 14
319#define R_SDRAM_CONFIG__group_sel__bit15 15
320#define R_SDRAM_CONFIG__group_sel__bit16 16
321#define R_SDRAM_CONFIG__group_sel__bit17 17
322#define R_SDRAM_CONFIG__group_sel__bit18 18
323#define R_SDRAM_CONFIG__group_sel__bit19 19
324#define R_SDRAM_CONFIG__group_sel__bit20 20
325#define R_SDRAM_CONFIG__group_sel__bit21 21
326#define R_SDRAM_CONFIG__group_sel__bit22 22
327#define R_SDRAM_CONFIG__group_sel__bit23 23
328#define R_SDRAM_CONFIG__group_sel__bit24 24
329#define R_SDRAM_CONFIG__group_sel__bit25 25
330#define R_SDRAM_CONFIG__group_sel__bit26 26
331#define R_SDRAM_CONFIG__group_sel__bit27 27
332#define R_SDRAM_CONFIG__group_sel__bit28 28
333#define R_SDRAM_CONFIG__group_sel__bit29 29
334#define R_SDRAM_CONFIG__ca1__BITNR 13
335#define R_SDRAM_CONFIG__ca1__WIDTH 3
336#define R_SDRAM_CONFIG__bank_sel1__BITNR 8
337#define R_SDRAM_CONFIG__bank_sel1__WIDTH 5
338#define R_SDRAM_CONFIG__bank_sel1__bit9 9
339#define R_SDRAM_CONFIG__bank_sel1__bit10 10
340#define R_SDRAM_CONFIG__bank_sel1__bit11 11
341#define R_SDRAM_CONFIG__bank_sel1__bit12 12
342#define R_SDRAM_CONFIG__bank_sel1__bit13 13
343#define R_SDRAM_CONFIG__bank_sel1__bit14 14
344#define R_SDRAM_CONFIG__bank_sel1__bit15 15
345#define R_SDRAM_CONFIG__bank_sel1__bit16 16
346#define R_SDRAM_CONFIG__bank_sel1__bit17 17
347#define R_SDRAM_CONFIG__bank_sel1__bit18 18
348#define R_SDRAM_CONFIG__bank_sel1__bit19 19
349#define R_SDRAM_CONFIG__bank_sel1__bit20 20
350#define R_SDRAM_CONFIG__bank_sel1__bit21 21
351#define R_SDRAM_CONFIG__bank_sel1__bit22 22
352#define R_SDRAM_CONFIG__bank_sel1__bit23 23
353#define R_SDRAM_CONFIG__bank_sel1__bit24 24
354#define R_SDRAM_CONFIG__bank_sel1__bit25 25
355#define R_SDRAM_CONFIG__bank_sel1__bit26 26
356#define R_SDRAM_CONFIG__bank_sel1__bit27 27
357#define R_SDRAM_CONFIG__bank_sel1__bit28 28
358#define R_SDRAM_CONFIG__bank_sel1__bit29 29
359#define R_SDRAM_CONFIG__ca0__BITNR 5
360#define R_SDRAM_CONFIG__ca0__WIDTH 3
361#define R_SDRAM_CONFIG__bank_sel0__BITNR 0
362#define R_SDRAM_CONFIG__bank_sel0__WIDTH 5
363#define R_SDRAM_CONFIG__bank_sel0__bit9 9
364#define R_SDRAM_CONFIG__bank_sel0__bit10 10
365#define R_SDRAM_CONFIG__bank_sel0__bit11 11
366#define R_SDRAM_CONFIG__bank_sel0__bit12 12
367#define R_SDRAM_CONFIG__bank_sel0__bit13 13
368#define R_SDRAM_CONFIG__bank_sel0__bit14 14
369#define R_SDRAM_CONFIG__bank_sel0__bit15 15
370#define R_SDRAM_CONFIG__bank_sel0__bit16 16
371#define R_SDRAM_CONFIG__bank_sel0__bit17 17
372#define R_SDRAM_CONFIG__bank_sel0__bit18 18
373#define R_SDRAM_CONFIG__bank_sel0__bit19 19
374#define R_SDRAM_CONFIG__bank_sel0__bit20 20
375#define R_SDRAM_CONFIG__bank_sel0__bit21 21
376#define R_SDRAM_CONFIG__bank_sel0__bit22 22
377#define R_SDRAM_CONFIG__bank_sel0__bit23 23
378#define R_SDRAM_CONFIG__bank_sel0__bit24 24
379#define R_SDRAM_CONFIG__bank_sel0__bit25 25
380#define R_SDRAM_CONFIG__bank_sel0__bit26 26
381#define R_SDRAM_CONFIG__bank_sel0__bit27 27
382#define R_SDRAM_CONFIG__bank_sel0__bit28 28
383#define R_SDRAM_CONFIG__bank_sel0__bit29 29
384
385/*
386!* External DMA registers
387!*/
388
389#define R_EXT_DMA_0_CMD (IO_TYPECAST_UDWORD 0xb0000010)
390#define R_EXT_DMA_0_CMD__cnt__BITNR 23
391#define R_EXT_DMA_0_CMD__cnt__WIDTH 1
392#define R_EXT_DMA_0_CMD__cnt__enable 1
393#define R_EXT_DMA_0_CMD__cnt__disable 0
394#define R_EXT_DMA_0_CMD__rqpol__BITNR 22
395#define R_EXT_DMA_0_CMD__rqpol__WIDTH 1
396#define R_EXT_DMA_0_CMD__rqpol__ahigh 0
397#define R_EXT_DMA_0_CMD__rqpol__alow 1
398#define R_EXT_DMA_0_CMD__apol__BITNR 21
399#define R_EXT_DMA_0_CMD__apol__WIDTH 1
400#define R_EXT_DMA_0_CMD__apol__ahigh 0
401#define R_EXT_DMA_0_CMD__apol__alow 1
402#define R_EXT_DMA_0_CMD__rq_ack__BITNR 20
403#define R_EXT_DMA_0_CMD__rq_ack__WIDTH 1
404#define R_EXT_DMA_0_CMD__rq_ack__burst 0
405#define R_EXT_DMA_0_CMD__rq_ack__handsh 1
406#define R_EXT_DMA_0_CMD__wid__BITNR 18
407#define R_EXT_DMA_0_CMD__wid__WIDTH 2
408#define R_EXT_DMA_0_CMD__wid__byte 0
409#define R_EXT_DMA_0_CMD__wid__word 1
410#define R_EXT_DMA_0_CMD__wid__dword 2
411#define R_EXT_DMA_0_CMD__dir__BITNR 17
412#define R_EXT_DMA_0_CMD__dir__WIDTH 1
413#define R_EXT_DMA_0_CMD__dir__input 0
414#define R_EXT_DMA_0_CMD__dir__output 1
415#define R_EXT_DMA_0_CMD__run__BITNR 16
416#define R_EXT_DMA_0_CMD__run__WIDTH 1
417#define R_EXT_DMA_0_CMD__run__start 1
418#define R_EXT_DMA_0_CMD__run__stop 0
419#define R_EXT_DMA_0_CMD__trf_count__BITNR 0
420#define R_EXT_DMA_0_CMD__trf_count__WIDTH 16
421
422#define R_EXT_DMA_0_STAT (IO_TYPECAST_RO_UDWORD 0xb0000010)
423#define R_EXT_DMA_0_STAT__run__BITNR 16
424#define R_EXT_DMA_0_STAT__run__WIDTH 1
425#define R_EXT_DMA_0_STAT__run__start 1
426#define R_EXT_DMA_0_STAT__run__stop 0
427#define R_EXT_DMA_0_STAT__trf_count__BITNR 0
428#define R_EXT_DMA_0_STAT__trf_count__WIDTH 16
429
430#define R_EXT_DMA_0_ADDR (IO_TYPECAST_UDWORD 0xb0000014)
431#define R_EXT_DMA_0_ADDR__ext0_addr__BITNR 2
432#define R_EXT_DMA_0_ADDR__ext0_addr__WIDTH 28
433
434#define R_EXT_DMA_1_CMD (IO_TYPECAST_UDWORD 0xb0000018)
435#define R_EXT_DMA_1_CMD__cnt__BITNR 23
436#define R_EXT_DMA_1_CMD__cnt__WIDTH 1
437#define R_EXT_DMA_1_CMD__cnt__enable 1
438#define R_EXT_DMA_1_CMD__cnt__disable 0
439#define R_EXT_DMA_1_CMD__rqpol__BITNR 22
440#define R_EXT_DMA_1_CMD__rqpol__WIDTH 1
441#define R_EXT_DMA_1_CMD__rqpol__ahigh 0
442#define R_EXT_DMA_1_CMD__rqpol__alow 1
443#define R_EXT_DMA_1_CMD__apol__BITNR 21
444#define R_EXT_DMA_1_CMD__apol__WIDTH 1
445#define R_EXT_DMA_1_CMD__apol__ahigh 0
446#define R_EXT_DMA_1_CMD__apol__alow 1
447#define R_EXT_DMA_1_CMD__rq_ack__BITNR 20
448#define R_EXT_DMA_1_CMD__rq_ack__WIDTH 1
449#define R_EXT_DMA_1_CMD__rq_ack__burst 0
450#define R_EXT_DMA_1_CMD__rq_ack__handsh 1
451#define R_EXT_DMA_1_CMD__wid__BITNR 18
452#define R_EXT_DMA_1_CMD__wid__WIDTH 2
453#define R_EXT_DMA_1_CMD__wid__byte 0
454#define R_EXT_DMA_1_CMD__wid__word 1
455#define R_EXT_DMA_1_CMD__wid__dword 2
456#define R_EXT_DMA_1_CMD__dir__BITNR 17
457#define R_EXT_DMA_1_CMD__dir__WIDTH 1
458#define R_EXT_DMA_1_CMD__dir__input 0
459#define R_EXT_DMA_1_CMD__dir__output 1
460#define R_EXT_DMA_1_CMD__run__BITNR 16
461#define R_EXT_DMA_1_CMD__run__WIDTH 1
462#define R_EXT_DMA_1_CMD__run__start 1
463#define R_EXT_DMA_1_CMD__run__stop 0
464#define R_EXT_DMA_1_CMD__trf_count__BITNR 0
465#define R_EXT_DMA_1_CMD__trf_count__WIDTH 16
466
467#define R_EXT_DMA_1_STAT (IO_TYPECAST_RO_UDWORD 0xb0000018)
468#define R_EXT_DMA_1_STAT__run__BITNR 16
469#define R_EXT_DMA_1_STAT__run__WIDTH 1
470#define R_EXT_DMA_1_STAT__run__start 1
471#define R_EXT_DMA_1_STAT__run__stop 0
472#define R_EXT_DMA_1_STAT__trf_count__BITNR 0
473#define R_EXT_DMA_1_STAT__trf_count__WIDTH 16
474
475#define R_EXT_DMA_1_ADDR (IO_TYPECAST_UDWORD 0xb000001c)
476#define R_EXT_DMA_1_ADDR__ext0_addr__BITNR 2
477#define R_EXT_DMA_1_ADDR__ext0_addr__WIDTH 28
478
479/*
480!* Timer registers
481!*/
482
483#define R_TIMER_CTRL (IO_TYPECAST_UDWORD 0xb0000020)
484#define R_TIMER_CTRL__timerdiv1__BITNR 24
485#define R_TIMER_CTRL__timerdiv1__WIDTH 8
486#define R_TIMER_CTRL__timerdiv0__BITNR 16
487#define R_TIMER_CTRL__timerdiv0__WIDTH 8
488#define R_TIMER_CTRL__presc_timer1__BITNR 15
489#define R_TIMER_CTRL__presc_timer1__WIDTH 1
490#define R_TIMER_CTRL__presc_timer1__normal 0
491#define R_TIMER_CTRL__presc_timer1__prescale 1
492#define R_TIMER_CTRL__i1__BITNR 14
493#define R_TIMER_CTRL__i1__WIDTH 1
494#define R_TIMER_CTRL__i1__clr 1
495#define R_TIMER_CTRL__i1__nop 0
496#define R_TIMER_CTRL__tm1__BITNR 12
497#define R_TIMER_CTRL__tm1__WIDTH 2
498#define R_TIMER_CTRL__tm1__stop_ld 0
499#define R_TIMER_CTRL__tm1__freeze 1
500#define R_TIMER_CTRL__tm1__run 2
501#define R_TIMER_CTRL__tm1__reserved 3
502#define R_TIMER_CTRL__clksel1__BITNR 8
503#define R_TIMER_CTRL__clksel1__WIDTH 4
504#define R_TIMER_CTRL__clksel1__c300Hz 0
505#define R_TIMER_CTRL__clksel1__c600Hz 1
506#define R_TIMER_CTRL__clksel1__c1200Hz 2
507#define R_TIMER_CTRL__clksel1__c2400Hz 3
508#define R_TIMER_CTRL__clksel1__c4800Hz 4
509#define R_TIMER_CTRL__clksel1__c9600Hz 5
510#define R_TIMER_CTRL__clksel1__c19k2Hz 6
511#define R_TIMER_CTRL__clksel1__c38k4Hz 7
512#define R_TIMER_CTRL__clksel1__c57k6Hz 8
513#define R_TIMER_CTRL__clksel1__c115k2Hz 9
514#define R_TIMER_CTRL__clksel1__c230k4Hz 10
515#define R_TIMER_CTRL__clksel1__c460k8Hz 11
516#define R_TIMER_CTRL__clksel1__c921k6Hz 12
517#define R_TIMER_CTRL__clksel1__c1843k2Hz 13
518#define R_TIMER_CTRL__clksel1__c6250kHz 14
519#define R_TIMER_CTRL__clksel1__cascade0 15
520#define R_TIMER_CTRL__presc_ext__BITNR 7
521#define R_TIMER_CTRL__presc_ext__WIDTH 1
522#define R_TIMER_CTRL__presc_ext__prescale 0
523#define R_TIMER_CTRL__presc_ext__external 1
524#define R_TIMER_CTRL__i0__BITNR 6
525#define R_TIMER_CTRL__i0__WIDTH 1
526#define R_TIMER_CTRL__i0__clr 1
527#define R_TIMER_CTRL__i0__nop 0
528#define R_TIMER_CTRL__tm0__BITNR 4
529#define R_TIMER_CTRL__tm0__WIDTH 2
530#define R_TIMER_CTRL__tm0__stop_ld 0
531#define R_TIMER_CTRL__tm0__freeze 1
532#define R_TIMER_CTRL__tm0__run 2
533#define R_TIMER_CTRL__tm0__reserved 3
534#define R_TIMER_CTRL__clksel0__BITNR 0
535#define R_TIMER_CTRL__clksel0__WIDTH 4
536#define R_TIMER_CTRL__clksel0__c300Hz 0
537#define R_TIMER_CTRL__clksel0__c600Hz 1
538#define R_TIMER_CTRL__clksel0__c1200Hz 2
539#define R_TIMER_CTRL__clksel0__c2400Hz 3
540#define R_TIMER_CTRL__clksel0__c4800Hz 4
541#define R_TIMER_CTRL__clksel0__c9600Hz 5
542#define R_TIMER_CTRL__clksel0__c19k2Hz 6
543#define R_TIMER_CTRL__clksel0__c38k4Hz 7
544#define R_TIMER_CTRL__clksel0__c57k6Hz 8
545#define R_TIMER_CTRL__clksel0__c115k2Hz 9
546#define R_TIMER_CTRL__clksel0__c230k4Hz 10
547#define R_TIMER_CTRL__clksel0__c460k8Hz 11
548#define R_TIMER_CTRL__clksel0__c921k6Hz 12
549#define R_TIMER_CTRL__clksel0__c1843k2Hz 13
550#define R_TIMER_CTRL__clksel0__c6250kHz 14
551#define R_TIMER_CTRL__clksel0__flexible 15
552
553#define R_TIMER_DATA (IO_TYPECAST_RO_UDWORD 0xb0000020)
554#define R_TIMER_DATA__timer1__BITNR 24
555#define R_TIMER_DATA__timer1__WIDTH 8
556#define R_TIMER_DATA__timer0__BITNR 16
557#define R_TIMER_DATA__timer0__WIDTH 8
558#define R_TIMER_DATA__clkdiv_high__BITNR 8
559#define R_TIMER_DATA__clkdiv_high__WIDTH 8
560#define R_TIMER_DATA__clkdiv_low__BITNR 0
561#define R_TIMER_DATA__clkdiv_low__WIDTH 8
562
563#define R_TIMER01_DATA (IO_TYPECAST_RO_UWORD 0xb0000022)
564#define R_TIMER01_DATA__count__BITNR 0
565#define R_TIMER01_DATA__count__WIDTH 16
566
567#define R_TIMER0_DATA (IO_TYPECAST_RO_BYTE 0xb0000022)
568#define R_TIMER0_DATA__count__BITNR 0
569#define R_TIMER0_DATA__count__WIDTH 8
570
571#define R_TIMER1_DATA (IO_TYPECAST_RO_BYTE 0xb0000023)
572#define R_TIMER1_DATA__count__BITNR 0
573#define R_TIMER1_DATA__count__WIDTH 8
574
575#define R_WATCHDOG (IO_TYPECAST_UDWORD 0xb0000024)
576#define R_WATCHDOG__key__BITNR 1
577#define R_WATCHDOG__key__WIDTH 3
578#define R_WATCHDOG__enable__BITNR 0
579#define R_WATCHDOG__enable__WIDTH 1
580#define R_WATCHDOG__enable__stop 0
581#define R_WATCHDOG__enable__start 1
582
583#define R_CLOCK_PRESCALE (IO_TYPECAST_UDWORD 0xb00000f0)
584#define R_CLOCK_PRESCALE__ser_presc__BITNR 16
585#define R_CLOCK_PRESCALE__ser_presc__WIDTH 16
586#define R_CLOCK_PRESCALE__tim_presc__BITNR 0
587#define R_CLOCK_PRESCALE__tim_presc__WIDTH 16
588
589#define R_SERIAL_PRESCALE (IO_TYPECAST_UWORD 0xb00000f2)
590#define R_SERIAL_PRESCALE__ser_presc__BITNR 0
591#define R_SERIAL_PRESCALE__ser_presc__WIDTH 16
592
593#define R_TIMER_PRESCALE (IO_TYPECAST_UWORD 0xb00000f0)
594#define R_TIMER_PRESCALE__tim_presc__BITNR 0
595#define R_TIMER_PRESCALE__tim_presc__WIDTH 16
596
597#define R_PRESCALE_STATUS (IO_TYPECAST_RO_UDWORD 0xb00000f0)
598#define R_PRESCALE_STATUS__ser_status__BITNR 16
599#define R_PRESCALE_STATUS__ser_status__WIDTH 16
600#define R_PRESCALE_STATUS__tim_status__BITNR 0
601#define R_PRESCALE_STATUS__tim_status__WIDTH 16
602
603#define R_SER_PRESC_STATUS (IO_TYPECAST_RO_UWORD 0xb00000f2)
604#define R_SER_PRESC_STATUS__ser_status__BITNR 0
605#define R_SER_PRESC_STATUS__ser_status__WIDTH 16
606
607#define R_TIM_PRESC_STATUS (IO_TYPECAST_RO_UWORD 0xb00000f0)
608#define R_TIM_PRESC_STATUS__tim_status__BITNR 0
609#define R_TIM_PRESC_STATUS__tim_status__WIDTH 16
610
611#define R_SYNC_SERIAL_PRESCALE (IO_TYPECAST_UDWORD 0xb00000f4)
612#define R_SYNC_SERIAL_PRESCALE__clk_sel_u3__BITNR 23
613#define R_SYNC_SERIAL_PRESCALE__clk_sel_u3__WIDTH 1
614#define R_SYNC_SERIAL_PRESCALE__clk_sel_u3__codec 0
615#define R_SYNC_SERIAL_PRESCALE__clk_sel_u3__baudrate 1
616#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u3__BITNR 22
617#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u3__WIDTH 1
618#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u3__external 0
619#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u3__internal 1
620#define R_SYNC_SERIAL_PRESCALE__clk_sel_u1__BITNR 21
621#define R_SYNC_SERIAL_PRESCALE__clk_sel_u1__WIDTH 1
622#define R_SYNC_SERIAL_PRESCALE__clk_sel_u1__codec 0
623#define R_SYNC_SERIAL_PRESCALE__clk_sel_u1__baudrate 1
624#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u1__BITNR 20
625#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u1__WIDTH 1
626#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u1__external 0
627#define R_SYNC_SERIAL_PRESCALE__word_stb_sel_u1__internal 1
628#define R_SYNC_SERIAL_PRESCALE__prescaler__BITNR 16
629#define R_SYNC_SERIAL_PRESCALE__prescaler__WIDTH 3
630#define R_SYNC_SERIAL_PRESCALE__prescaler__div1 0
631#define R_SYNC_SERIAL_PRESCALE__prescaler__div2 1
632#define R_SYNC_SERIAL_PRESCALE__prescaler__div4 2
633#define R_SYNC_SERIAL_PRESCALE__prescaler__div8 3
634#define R_SYNC_SERIAL_PRESCALE__prescaler__div16 4
635#define R_SYNC_SERIAL_PRESCALE__prescaler__div32 5
636#define R_SYNC_SERIAL_PRESCALE__prescaler__div64 6
637#define R_SYNC_SERIAL_PRESCALE__prescaler__div128 7
638#define R_SYNC_SERIAL_PRESCALE__warp_mode__BITNR 15
639#define R_SYNC_SERIAL_PRESCALE__warp_mode__WIDTH 1
640#define R_SYNC_SERIAL_PRESCALE__warp_mode__normal 0
641#define R_SYNC_SERIAL_PRESCALE__warp_mode__enabled 1
642#define R_SYNC_SERIAL_PRESCALE__frame_rate__BITNR 11
643#define R_SYNC_SERIAL_PRESCALE__frame_rate__WIDTH 4
644#define R_SYNC_SERIAL_PRESCALE__word_rate__BITNR 0
645#define R_SYNC_SERIAL_PRESCALE__word_rate__WIDTH 10
646
647/*
648!* Shared RAM interface registers
649!*/
650
651#define R_SHARED_RAM_CONFIG (IO_TYPECAST_UDWORD 0xb0000040)
652#define R_SHARED_RAM_CONFIG__width__BITNR 3
653#define R_SHARED_RAM_CONFIG__width__WIDTH 1
654#define R_SHARED_RAM_CONFIG__width__byte 0
655#define R_SHARED_RAM_CONFIG__width__word 1
656#define R_SHARED_RAM_CONFIG__enable__BITNR 2
657#define R_SHARED_RAM_CONFIG__enable__WIDTH 1
658#define R_SHARED_RAM_CONFIG__enable__yes 1
659#define R_SHARED_RAM_CONFIG__enable__no 0
660#define R_SHARED_RAM_CONFIG__pint__BITNR 1
661#define R_SHARED_RAM_CONFIG__pint__WIDTH 1
662#define R_SHARED_RAM_CONFIG__pint__int 1
663#define R_SHARED_RAM_CONFIG__pint__nop 0
664#define R_SHARED_RAM_CONFIG__clri__BITNR 0
665#define R_SHARED_RAM_CONFIG__clri__WIDTH 1
666#define R_SHARED_RAM_CONFIG__clri__clr 1
667#define R_SHARED_RAM_CONFIG__clri__nop 0
668
669#define R_SHARED_RAM_ADDR (IO_TYPECAST_UDWORD 0xb0000044)
670#define R_SHARED_RAM_ADDR__base_addr__BITNR 8
671#define R_SHARED_RAM_ADDR__base_addr__WIDTH 22
672
673/*
674!* General config registers
675!*/
676
677#define R_GEN_CONFIG (IO_TYPECAST_UDWORD 0xb000002c)
678#define R_GEN_CONFIG__par_w__BITNR 31
679#define R_GEN_CONFIG__par_w__WIDTH 1
680#define R_GEN_CONFIG__par_w__select 1
681#define R_GEN_CONFIG__par_w__disable 0
682#define R_GEN_CONFIG__usb2__BITNR 30
683#define R_GEN_CONFIG__usb2__WIDTH 1
684#define R_GEN_CONFIG__usb2__select 1
685#define R_GEN_CONFIG__usb2__disable 0
686#define R_GEN_CONFIG__usb1__BITNR 29
687#define R_GEN_CONFIG__usb1__WIDTH 1
688#define R_GEN_CONFIG__usb1__select 1
689#define R_GEN_CONFIG__usb1__disable 0
690#define R_GEN_CONFIG__g24dir__BITNR 27
691#define R_GEN_CONFIG__g24dir__WIDTH 1
692#define R_GEN_CONFIG__g24dir__in 0
693#define R_GEN_CONFIG__g24dir__out 1
694#define R_GEN_CONFIG__g16_23dir__BITNR 26
695#define R_GEN_CONFIG__g16_23dir__WIDTH 1
696#define R_GEN_CONFIG__g16_23dir__in 0
697#define R_GEN_CONFIG__g16_23dir__out 1
698#define R_GEN_CONFIG__g8_15dir__BITNR 25
699#define R_GEN_CONFIG__g8_15dir__WIDTH 1
700#define R_GEN_CONFIG__g8_15dir__in 0
701#define R_GEN_CONFIG__g8_15dir__out 1
702#define R_GEN_CONFIG__g0dir__BITNR 24
703#define R_GEN_CONFIG__g0dir__WIDTH 1
704#define R_GEN_CONFIG__g0dir__in 0
705#define R_GEN_CONFIG__g0dir__out 1
706#define R_GEN_CONFIG__dma9__BITNR 23
707#define R_GEN_CONFIG__dma9__WIDTH 1
708#define R_GEN_CONFIG__dma9__usb 0
709#define R_GEN_CONFIG__dma9__serial1 1
710#define R_GEN_CONFIG__dma8__BITNR 22
711#define R_GEN_CONFIG__dma8__WIDTH 1
712#define R_GEN_CONFIG__dma8__usb 0
713#define R_GEN_CONFIG__dma8__serial1 1
714#define R_GEN_CONFIG__dma7__BITNR 20
715#define R_GEN_CONFIG__dma7__WIDTH 2
716#define R_GEN_CONFIG__dma7__unused 0
717#define R_GEN_CONFIG__dma7__serial0 1
718#define R_GEN_CONFIG__dma7__extdma1 2
719#define R_GEN_CONFIG__dma7__intdma6 3
720#define R_GEN_CONFIG__dma6__BITNR 18
721#define R_GEN_CONFIG__dma6__WIDTH 2
722#define R_GEN_CONFIG__dma6__unused 0
723#define R_GEN_CONFIG__dma6__serial0 1
724#define R_GEN_CONFIG__dma6__extdma1 2
725#define R_GEN_CONFIG__dma6__intdma7 3
726#define R_GEN_CONFIG__dma5__BITNR 16
727#define R_GEN_CONFIG__dma5__WIDTH 2
728#define R_GEN_CONFIG__dma5__par1 0
729#define R_GEN_CONFIG__dma5__scsi1 1
730#define R_GEN_CONFIG__dma5__serial3 2
731#define R_GEN_CONFIG__dma5__extdma0 3
732#define R_GEN_CONFIG__dma4__BITNR 14
733#define R_GEN_CONFIG__dma4__WIDTH 2
734#define R_GEN_CONFIG__dma4__par1 0
735#define R_GEN_CONFIG__dma4__scsi1 1
736#define R_GEN_CONFIG__dma4__serial3 2
737#define R_GEN_CONFIG__dma4__extdma0 3
738#define R_GEN_CONFIG__dma3__BITNR 12
739#define R_GEN_CONFIG__dma3__WIDTH 2
740#define R_GEN_CONFIG__dma3__par0 0
741#define R_GEN_CONFIG__dma3__scsi0 1
742#define R_GEN_CONFIG__dma3__serial2 2
743#define R_GEN_CONFIG__dma3__ata 3
744#define R_GEN_CONFIG__dma2__BITNR 10
745#define R_GEN_CONFIG__dma2__WIDTH 2
746#define R_GEN_CONFIG__dma2__par0 0
747#define R_GEN_CONFIG__dma2__scsi0 1
748#define R_GEN_CONFIG__dma2__serial2 2
749#define R_GEN_CONFIG__dma2__ata 3
750#define R_GEN_CONFIG__mio_w__BITNR 9
751#define R_GEN_CONFIG__mio_w__WIDTH 1
752#define R_GEN_CONFIG__mio_w__select 1
753#define R_GEN_CONFIG__mio_w__disable 0
754#define R_GEN_CONFIG__ser3__BITNR 8
755#define R_GEN_CONFIG__ser3__WIDTH 1
756#define R_GEN_CONFIG__ser3__select 1
757#define R_GEN_CONFIG__ser3__disable 0
758#define R_GEN_CONFIG__par1__BITNR 7
759#define R_GEN_CONFIG__par1__WIDTH 1
760#define R_GEN_CONFIG__par1__select 1
761#define R_GEN_CONFIG__par1__disable 0
762#define R_GEN_CONFIG__scsi0w__BITNR 6
763#define R_GEN_CONFIG__scsi0w__WIDTH 1
764#define R_GEN_CONFIG__scsi0w__select 1
765#define R_GEN_CONFIG__scsi0w__disable 0
766#define R_GEN_CONFIG__scsi1__BITNR 5
767#define R_GEN_CONFIG__scsi1__WIDTH 1
768#define R_GEN_CONFIG__scsi1__select 1
769#define R_GEN_CONFIG__scsi1__disable 0
770#define R_GEN_CONFIG__mio__BITNR 4
771#define R_GEN_CONFIG__mio__WIDTH 1
772#define R_GEN_CONFIG__mio__select 1
773#define R_GEN_CONFIG__mio__disable 0
774#define R_GEN_CONFIG__ser2__BITNR 3
775#define R_GEN_CONFIG__ser2__WIDTH 1
776#define R_GEN_CONFIG__ser2__select 1
777#define R_GEN_CONFIG__ser2__disable 0
778#define R_GEN_CONFIG__par0__BITNR 2
779#define R_GEN_CONFIG__par0__WIDTH 1
780#define R_GEN_CONFIG__par0__select 1
781#define R_GEN_CONFIG__par0__disable 0
782#define R_GEN_CONFIG__ata__BITNR 1
783#define R_GEN_CONFIG__ata__WIDTH 1
784#define R_GEN_CONFIG__ata__select 1
785#define R_GEN_CONFIG__ata__disable 0
786#define R_GEN_CONFIG__scsi0__BITNR 0
787#define R_GEN_CONFIG__scsi0__WIDTH 1
788#define R_GEN_CONFIG__scsi0__select 1
789#define R_GEN_CONFIG__scsi0__disable 0
790
791#define R_GEN_CONFIG_II (IO_TYPECAST_UDWORD 0xb0000034)
792#define R_GEN_CONFIG_II__sermode3__BITNR 6
793#define R_GEN_CONFIG_II__sermode3__WIDTH 1
794#define R_GEN_CONFIG_II__sermode3__async 0
795#define R_GEN_CONFIG_II__sermode3__sync 1
796#define R_GEN_CONFIG_II__sermode1__BITNR 4
797#define R_GEN_CONFIG_II__sermode1__WIDTH 1
798#define R_GEN_CONFIG_II__sermode1__async 0
799#define R_GEN_CONFIG_II__sermode1__sync 1
800#define R_GEN_CONFIG_II__ext_clk__BITNR 2
801#define R_GEN_CONFIG_II__ext_clk__WIDTH 1
802#define R_GEN_CONFIG_II__ext_clk__select 1
803#define R_GEN_CONFIG_II__ext_clk__disable 0
804#define R_GEN_CONFIG_II__ser2__BITNR 1
805#define R_GEN_CONFIG_II__ser2__WIDTH 1
806#define R_GEN_CONFIG_II__ser2__select 1
807#define R_GEN_CONFIG_II__ser2__disable 0
808#define R_GEN_CONFIG_II__ser3__BITNR 0
809#define R_GEN_CONFIG_II__ser3__WIDTH 1
810#define R_GEN_CONFIG_II__ser3__select 1
811#define R_GEN_CONFIG_II__ser3__disable 0
812
813#define R_PORT_G_DATA (IO_TYPECAST_UDWORD 0xb0000028)
814#define R_PORT_G_DATA__data__BITNR 0
815#define R_PORT_G_DATA__data__WIDTH 32
816
817/*
818!* General port configuration registers
819!*/
820
821#define R_PORT_PA_SET (IO_TYPECAST_UDWORD 0xb0000030)
822#define R_PORT_PA_SET__dir7__BITNR 15
823#define R_PORT_PA_SET__dir7__WIDTH 1
824#define R_PORT_PA_SET__dir7__input 0
825#define R_PORT_PA_SET__dir7__output 1
826#define R_PORT_PA_SET__dir6__BITNR 14
827#define R_PORT_PA_SET__dir6__WIDTH 1
828#define R_PORT_PA_SET__dir6__input 0
829#define R_PORT_PA_SET__dir6__output 1
830#define R_PORT_PA_SET__dir5__BITNR 13
831#define R_PORT_PA_SET__dir5__WIDTH 1
832#define R_PORT_PA_SET__dir5__input 0
833#define R_PORT_PA_SET__dir5__output 1
834#define R_PORT_PA_SET__dir4__BITNR 12
835#define R_PORT_PA_SET__dir4__WIDTH 1
836#define R_PORT_PA_SET__dir4__input 0
837#define R_PORT_PA_SET__dir4__output 1
838#define R_PORT_PA_SET__dir3__BITNR 11
839#define R_PORT_PA_SET__dir3__WIDTH 1
840#define R_PORT_PA_SET__dir3__input 0
841#define R_PORT_PA_SET__dir3__output 1
842#define R_PORT_PA_SET__dir2__BITNR 10
843#define R_PORT_PA_SET__dir2__WIDTH 1
844#define R_PORT_PA_SET__dir2__input 0
845#define R_PORT_PA_SET__dir2__output 1
846#define R_PORT_PA_SET__dir1__BITNR 9
847#define R_PORT_PA_SET__dir1__WIDTH 1
848#define R_PORT_PA_SET__dir1__input 0
849#define R_PORT_PA_SET__dir1__output 1
850#define R_PORT_PA_SET__dir0__BITNR 8
851#define R_PORT_PA_SET__dir0__WIDTH 1
852#define R_PORT_PA_SET__dir0__input 0
853#define R_PORT_PA_SET__dir0__output 1
854#define R_PORT_PA_SET__data_out__BITNR 0
855#define R_PORT_PA_SET__data_out__WIDTH 8
856
857#define R_PORT_PA_DATA (IO_TYPECAST_BYTE 0xb0000030)
858#define R_PORT_PA_DATA__data_out__BITNR 0
859#define R_PORT_PA_DATA__data_out__WIDTH 8
860
861#define R_PORT_PA_DIR (IO_TYPECAST_BYTE 0xb0000031)
862#define R_PORT_PA_DIR__dir7__BITNR 7
863#define R_PORT_PA_DIR__dir7__WIDTH 1
864#define R_PORT_PA_DIR__dir7__input 0
865#define R_PORT_PA_DIR__dir7__output 1
866#define R_PORT_PA_DIR__dir6__BITNR 6
867#define R_PORT_PA_DIR__dir6__WIDTH 1
868#define R_PORT_PA_DIR__dir6__input 0
869#define R_PORT_PA_DIR__dir6__output 1
870#define R_PORT_PA_DIR__dir5__BITNR 5
871#define R_PORT_PA_DIR__dir5__WIDTH 1
872#define R_PORT_PA_DIR__dir5__input 0
873#define R_PORT_PA_DIR__dir5__output 1
874#define R_PORT_PA_DIR__dir4__BITNR 4
875#define R_PORT_PA_DIR__dir4__WIDTH 1
876#define R_PORT_PA_DIR__dir4__input 0
877#define R_PORT_PA_DIR__dir4__output 1
878#define R_PORT_PA_DIR__dir3__BITNR 3
879#define R_PORT_PA_DIR__dir3__WIDTH 1
880#define R_PORT_PA_DIR__dir3__input 0
881#define R_PORT_PA_DIR__dir3__output 1
882#define R_PORT_PA_DIR__dir2__BITNR 2
883#define R_PORT_PA_DIR__dir2__WIDTH 1
884#define R_PORT_PA_DIR__dir2__input 0
885#define R_PORT_PA_DIR__dir2__output 1
886#define R_PORT_PA_DIR__dir1__BITNR 1
887#define R_PORT_PA_DIR__dir1__WIDTH 1
888#define R_PORT_PA_DIR__dir1__input 0
889#define R_PORT_PA_DIR__dir1__output 1
890#define R_PORT_PA_DIR__dir0__BITNR 0
891#define R_PORT_PA_DIR__dir0__WIDTH 1
892#define R_PORT_PA_DIR__dir0__input 0
893#define R_PORT_PA_DIR__dir0__output 1
894
895#define R_PORT_PA_READ (IO_TYPECAST_RO_UDWORD 0xb0000030)
896#define R_PORT_PA_READ__data_in__BITNR 0
897#define R_PORT_PA_READ__data_in__WIDTH 8
898
899#define R_PORT_PB_SET (IO_TYPECAST_UDWORD 0xb0000038)
900#define R_PORT_PB_SET__syncser3__BITNR 29
901#define R_PORT_PB_SET__syncser3__WIDTH 1
902#define R_PORT_PB_SET__syncser3__port_cs 0
903#define R_PORT_PB_SET__syncser3__ss3extra 1
904#define R_PORT_PB_SET__syncser1__BITNR 28
905#define R_PORT_PB_SET__syncser1__WIDTH 1
906#define R_PORT_PB_SET__syncser1__port_cs 0
907#define R_PORT_PB_SET__syncser1__ss1extra 1
908#define R_PORT_PB_SET__i2c_en__BITNR 27
909#define R_PORT_PB_SET__i2c_en__WIDTH 1
910#define R_PORT_PB_SET__i2c_en__off 0
911#define R_PORT_PB_SET__i2c_en__on 1
912#define R_PORT_PB_SET__i2c_d__BITNR 26
913#define R_PORT_PB_SET__i2c_d__WIDTH 1
914#define R_PORT_PB_SET__i2c_clk__BITNR 25
915#define R_PORT_PB_SET__i2c_clk__WIDTH 1
916#define R_PORT_PB_SET__i2c_oe___BITNR 24
917#define R_PORT_PB_SET__i2c_oe___WIDTH 1
918#define R_PORT_PB_SET__i2c_oe___enable 0
919#define R_PORT_PB_SET__i2c_oe___disable 1
920#define R_PORT_PB_SET__cs7__BITNR 23
921#define R_PORT_PB_SET__cs7__WIDTH 1
922#define R_PORT_PB_SET__cs7__port 0
923#define R_PORT_PB_SET__cs7__cs 1
924#define R_PORT_PB_SET__cs6__BITNR 22
925#define R_PORT_PB_SET__cs6__WIDTH 1
926#define R_PORT_PB_SET__cs6__port 0
927#define R_PORT_PB_SET__cs6__cs 1
928#define R_PORT_PB_SET__cs5__BITNR 21
929#define R_PORT_PB_SET__cs5__WIDTH 1
930#define R_PORT_PB_SET__cs5__port 0
931#define R_PORT_PB_SET__cs5__cs 1
932#define R_PORT_PB_SET__cs4__BITNR 20
933#define R_PORT_PB_SET__cs4__WIDTH 1
934#define R_PORT_PB_SET__cs4__port 0
935#define R_PORT_PB_SET__cs4__cs 1
936#define R_PORT_PB_SET__cs3__BITNR 19
937#define R_PORT_PB_SET__cs3__WIDTH 1
938#define R_PORT_PB_SET__cs3__port 0
939#define R_PORT_PB_SET__cs3__cs 1
940#define R_PORT_PB_SET__cs2__BITNR 18
941#define R_PORT_PB_SET__cs2__WIDTH 1
942#define R_PORT_PB_SET__cs2__port 0
943#define R_PORT_PB_SET__cs2__cs 1
944#define R_PORT_PB_SET__scsi1__BITNR 17
945#define R_PORT_PB_SET__scsi1__WIDTH 1
946#define R_PORT_PB_SET__scsi1__port_cs 0
947#define R_PORT_PB_SET__scsi1__enph 1
948#define R_PORT_PB_SET__scsi0__BITNR 16
949#define R_PORT_PB_SET__scsi0__WIDTH 1
950#define R_PORT_PB_SET__scsi0__port_cs 0
951#define R_PORT_PB_SET__scsi0__enph 1
952#define R_PORT_PB_SET__dir7__BITNR 15
953#define R_PORT_PB_SET__dir7__WIDTH 1
954#define R_PORT_PB_SET__dir7__input 0
955#define R_PORT_PB_SET__dir7__output 1
956#define R_PORT_PB_SET__dir6__BITNR 14
957#define R_PORT_PB_SET__dir6__WIDTH 1
958#define R_PORT_PB_SET__dir6__input 0
959#define R_PORT_PB_SET__dir6__output 1
960#define R_PORT_PB_SET__dir5__BITNR 13
961#define R_PORT_PB_SET__dir5__WIDTH 1
962#define R_PORT_PB_SET__dir5__input 0
963#define R_PORT_PB_SET__dir5__output 1
964#define R_PORT_PB_SET__dir4__BITNR 12
965#define R_PORT_PB_SET__dir4__WIDTH 1
966#define R_PORT_PB_SET__dir4__input 0
967#define R_PORT_PB_SET__dir4__output 1
968#define R_PORT_PB_SET__dir3__BITNR 11
969#define R_PORT_PB_SET__dir3__WIDTH 1
970#define R_PORT_PB_SET__dir3__input 0
971#define R_PORT_PB_SET__dir3__output 1
972#define R_PORT_PB_SET__dir2__BITNR 10
973#define R_PORT_PB_SET__dir2__WIDTH 1
974#define R_PORT_PB_SET__dir2__input 0
975#define R_PORT_PB_SET__dir2__output 1
976#define R_PORT_PB_SET__dir1__BITNR 9
977#define R_PORT_PB_SET__dir1__WIDTH 1
978#define R_PORT_PB_SET__dir1__input 0
979#define R_PORT_PB_SET__dir1__output 1
980#define R_PORT_PB_SET__dir0__BITNR 8
981#define R_PORT_PB_SET__dir0__WIDTH 1
982#define R_PORT_PB_SET__dir0__input 0
983#define R_PORT_PB_SET__dir0__output 1
984#define R_PORT_PB_SET__data_out__BITNR 0
985#define R_PORT_PB_SET__data_out__WIDTH 8
986
987#define R_PORT_PB_DATA (IO_TYPECAST_BYTE 0xb0000038)
988#define R_PORT_PB_DATA__data_out__BITNR 0
989#define R_PORT_PB_DATA__data_out__WIDTH 8
990
991#define R_PORT_PB_DIR (IO_TYPECAST_BYTE 0xb0000039)
992#define R_PORT_PB_DIR__dir7__BITNR 7
993#define R_PORT_PB_DIR__dir7__WIDTH 1
994#define R_PORT_PB_DIR__dir7__input 0
995#define R_PORT_PB_DIR__dir7__output 1
996#define R_PORT_PB_DIR__dir6__BITNR 6
997#define R_PORT_PB_DIR__dir6__WIDTH 1
998#define R_PORT_PB_DIR__dir6__input 0
999#define R_PORT_PB_DIR__dir6__output 1
1000#define R_PORT_PB_DIR__dir5__BITNR 5
1001#define R_PORT_PB_DIR__dir5__WIDTH 1
1002#define R_PORT_PB_DIR__dir5__input 0
1003#define R_PORT_PB_DIR__dir5__output 1
1004#define R_PORT_PB_DIR__dir4__BITNR 4
1005#define R_PORT_PB_DIR__dir4__WIDTH 1
1006#define R_PORT_PB_DIR__dir4__input 0
1007#define R_PORT_PB_DIR__dir4__output 1
1008#define R_PORT_PB_DIR__dir3__BITNR 3
1009#define R_PORT_PB_DIR__dir3__WIDTH 1
1010#define R_PORT_PB_DIR__dir3__input 0
1011#define R_PORT_PB_DIR__dir3__output 1
1012#define R_PORT_PB_DIR__dir2__BITNR 2
1013#define R_PORT_PB_DIR__dir2__WIDTH 1
1014#define R_PORT_PB_DIR__dir2__input 0
1015#define R_PORT_PB_DIR__dir2__output 1
1016#define R_PORT_PB_DIR__dir1__BITNR 1
1017#define R_PORT_PB_DIR__dir1__WIDTH 1
1018#define R_PORT_PB_DIR__dir1__input 0
1019#define R_PORT_PB_DIR__dir1__output 1
1020#define R_PORT_PB_DIR__dir0__BITNR 0
1021#define R_PORT_PB_DIR__dir0__WIDTH 1
1022#define R_PORT_PB_DIR__dir0__input 0
1023#define R_PORT_PB_DIR__dir0__output 1
1024
1025#define R_PORT_PB_CONFIG (IO_TYPECAST_BYTE 0xb000003a)
1026#define R_PORT_PB_CONFIG__cs7__BITNR 7
1027#define R_PORT_PB_CONFIG__cs7__WIDTH 1
1028#define R_PORT_PB_CONFIG__cs7__port 0
1029#define R_PORT_PB_CONFIG__cs7__cs 1
1030#define R_PORT_PB_CONFIG__cs6__BITNR 6
1031#define R_PORT_PB_CONFIG__cs6__WIDTH 1
1032#define R_PORT_PB_CONFIG__cs6__port 0
1033#define R_PORT_PB_CONFIG__cs6__cs 1
1034#define R_PORT_PB_CONFIG__cs5__BITNR 5
1035#define R_PORT_PB_CONFIG__cs5__WIDTH 1
1036#define R_PORT_PB_CONFIG__cs5__port 0
1037#define R_PORT_PB_CONFIG__cs5__cs 1
1038#define R_PORT_PB_CONFIG__cs4__BITNR 4
1039#define R_PORT_PB_CONFIG__cs4__WIDTH 1
1040#define R_PORT_PB_CONFIG__cs4__port 0
1041#define R_PORT_PB_CONFIG__cs4__cs 1
1042#define R_PORT_PB_CONFIG__cs3__BITNR 3
1043#define R_PORT_PB_CONFIG__cs3__WIDTH 1
1044#define R_PORT_PB_CONFIG__cs3__port 0
1045#define R_PORT_PB_CONFIG__cs3__cs 1
1046#define R_PORT_PB_CONFIG__cs2__BITNR 2
1047#define R_PORT_PB_CONFIG__cs2__WIDTH 1
1048#define R_PORT_PB_CONFIG__cs2__port 0
1049#define R_PORT_PB_CONFIG__cs2__cs 1
1050#define R_PORT_PB_CONFIG__scsi1__BITNR 1
1051#define R_PORT_PB_CONFIG__scsi1__WIDTH 1
1052#define R_PORT_PB_CONFIG__scsi1__port_cs 0
1053#define R_PORT_PB_CONFIG__scsi1__enph 1
1054#define R_PORT_PB_CONFIG__scsi0__BITNR 0
1055#define R_PORT_PB_CONFIG__scsi0__WIDTH 1
1056#define R_PORT_PB_CONFIG__scsi0__port_cs 0
1057#define R_PORT_PB_CONFIG__scsi0__enph 1
1058
1059#define R_PORT_PB_I2C (IO_TYPECAST_BYTE 0xb000003b)
1060#define R_PORT_PB_I2C__syncser3__BITNR 5
1061#define R_PORT_PB_I2C__syncser3__WIDTH 1
1062#define R_PORT_PB_I2C__syncser3__port_cs 0
1063#define R_PORT_PB_I2C__syncser3__ss3extra 1
1064#define R_PORT_PB_I2C__syncser1__BITNR 4
1065#define R_PORT_PB_I2C__syncser1__WIDTH 1
1066#define R_PORT_PB_I2C__syncser1__port_cs 0
1067#define R_PORT_PB_I2C__syncser1__ss1extra 1
1068#define R_PORT_PB_I2C__i2c_en__BITNR 3
1069#define R_PORT_PB_I2C__i2c_en__WIDTH 1
1070#define R_PORT_PB_I2C__i2c_en__off 0
1071#define R_PORT_PB_I2C__i2c_en__on 1
1072#define R_PORT_PB_I2C__i2c_d__BITNR 2
1073#define R_PORT_PB_I2C__i2c_d__WIDTH 1
1074#define R_PORT_PB_I2C__i2c_clk__BITNR 1
1075#define R_PORT_PB_I2C__i2c_clk__WIDTH 1
1076#define R_PORT_PB_I2C__i2c_oe___BITNR 0
1077#define R_PORT_PB_I2C__i2c_oe___WIDTH 1
1078#define R_PORT_PB_I2C__i2c_oe___enable 0
1079#define R_PORT_PB_I2C__i2c_oe___disable 1
1080
1081#define R_PORT_PB_READ (IO_TYPECAST_RO_UDWORD 0xb0000038)
1082#define R_PORT_PB_READ__data_in__BITNR 0
1083#define R_PORT_PB_READ__data_in__WIDTH 8
1084
1085/*
1086!* Serial port registers
1087!*/
1088
1089#define R_SERIAL0_CTRL (IO_TYPECAST_UDWORD 0xb0000060)
1090#define R_SERIAL0_CTRL__tr_baud__BITNR 28
1091#define R_SERIAL0_CTRL__tr_baud__WIDTH 4
1092#define R_SERIAL0_CTRL__tr_baud__c300Hz 0
1093#define R_SERIAL0_CTRL__tr_baud__c600Hz 1
1094#define R_SERIAL0_CTRL__tr_baud__c1200Hz 2
1095#define R_SERIAL0_CTRL__tr_baud__c2400Hz 3
1096#define R_SERIAL0_CTRL__tr_baud__c4800Hz 4
1097#define R_SERIAL0_CTRL__tr_baud__c9600Hz 5
1098#define R_SERIAL0_CTRL__tr_baud__c19k2Hz 6
1099#define R_SERIAL0_CTRL__tr_baud__c38k4Hz 7
1100#define R_SERIAL0_CTRL__tr_baud__c57k6Hz 8
1101#define R_SERIAL0_CTRL__tr_baud__c115k2Hz 9
1102#define R_SERIAL0_CTRL__tr_baud__c230k4Hz 10
1103#define R_SERIAL0_CTRL__tr_baud__c460k8Hz 11
1104#define R_SERIAL0_CTRL__tr_baud__c921k6Hz 12
1105#define R_SERIAL0_CTRL__tr_baud__c1843k2Hz 13
1106#define R_SERIAL0_CTRL__tr_baud__c6250kHz 14
1107#define R_SERIAL0_CTRL__tr_baud__reserved 15
1108#define R_SERIAL0_CTRL__rec_baud__BITNR 24
1109#define R_SERIAL0_CTRL__rec_baud__WIDTH 4
1110#define R_SERIAL0_CTRL__rec_baud__c300Hz 0
1111#define R_SERIAL0_CTRL__rec_baud__c600Hz 1
1112#define R_SERIAL0_CTRL__rec_baud__c1200Hz 2
1113#define R_SERIAL0_CTRL__rec_baud__c2400Hz 3
1114#define R_SERIAL0_CTRL__rec_baud__c4800Hz 4
1115#define R_SERIAL0_CTRL__rec_baud__c9600Hz 5
1116#define R_SERIAL0_CTRL__rec_baud__c19k2Hz 6
1117#define R_SERIAL0_CTRL__rec_baud__c38k4Hz 7
1118#define R_SERIAL0_CTRL__rec_baud__c57k6Hz 8
1119#define R_SERIAL0_CTRL__rec_baud__c115k2Hz 9
1120#define R_SERIAL0_CTRL__rec_baud__c230k4Hz 10
1121#define R_SERIAL0_CTRL__rec_baud__c460k8Hz 11
1122#define R_SERIAL0_CTRL__rec_baud__c921k6Hz 12
1123#define R_SERIAL0_CTRL__rec_baud__c1843k2Hz 13
1124#define R_SERIAL0_CTRL__rec_baud__c6250kHz 14
1125#define R_SERIAL0_CTRL__rec_baud__reserved 15
1126#define R_SERIAL0_CTRL__dma_err__BITNR 23
1127#define R_SERIAL0_CTRL__dma_err__WIDTH 1
1128#define R_SERIAL0_CTRL__dma_err__stop 0
1129#define R_SERIAL0_CTRL__dma_err__ignore 1
1130#define R_SERIAL0_CTRL__rec_enable__BITNR 22
1131#define R_SERIAL0_CTRL__rec_enable__WIDTH 1
1132#define R_SERIAL0_CTRL__rec_enable__disable 0
1133#define R_SERIAL0_CTRL__rec_enable__enable 1
1134#define R_SERIAL0_CTRL__rts___BITNR 21
1135#define R_SERIAL0_CTRL__rts___WIDTH 1
1136#define R_SERIAL0_CTRL__rts___active 0
1137#define R_SERIAL0_CTRL__rts___inactive 1
1138#define R_SERIAL0_CTRL__sampling__BITNR 20
1139#define R_SERIAL0_CTRL__sampling__WIDTH 1
1140#define R_SERIAL0_CTRL__sampling__middle 0
1141#define R_SERIAL0_CTRL__sampling__majority 1
1142#define R_SERIAL0_CTRL__rec_stick_par__BITNR 19
1143#define R_SERIAL0_CTRL__rec_stick_par__WIDTH 1
1144#define R_SERIAL0_CTRL__rec_stick_par__normal 0
1145#define R_SERIAL0_CTRL__rec_stick_par__stick 1
1146#define R_SERIAL0_CTRL__rec_par__BITNR 18
1147#define R_SERIAL0_CTRL__rec_par__WIDTH 1
1148#define R_SERIAL0_CTRL__rec_par__even 0
1149#define R_SERIAL0_CTRL__rec_par__odd 1
1150#define R_SERIAL0_CTRL__rec_par_en__BITNR 17
1151#define R_SERIAL0_CTRL__rec_par_en__WIDTH 1
1152#define R_SERIAL0_CTRL__rec_par_en__disable 0
1153#define R_SERIAL0_CTRL__rec_par_en__enable 1
1154#define R_SERIAL0_CTRL__rec_bitnr__BITNR 16
1155#define R_SERIAL0_CTRL__rec_bitnr__WIDTH 1
1156#define R_SERIAL0_CTRL__rec_bitnr__rec_8bit 0
1157#define R_SERIAL0_CTRL__rec_bitnr__rec_7bit 1
1158#define R_SERIAL0_CTRL__txd__BITNR 15
1159#define R_SERIAL0_CTRL__txd__WIDTH 1
1160#define R_SERIAL0_CTRL__tr_enable__BITNR 14
1161#define R_SERIAL0_CTRL__tr_enable__WIDTH 1
1162#define R_SERIAL0_CTRL__tr_enable__disable 0
1163#define R_SERIAL0_CTRL__tr_enable__enable 1
1164#define R_SERIAL0_CTRL__auto_cts__BITNR 13
1165#define R_SERIAL0_CTRL__auto_cts__WIDTH 1
1166#define R_SERIAL0_CTRL__auto_cts__disabled 0
1167#define R_SERIAL0_CTRL__auto_cts__active 1
1168#define R_SERIAL0_CTRL__stop_bits__BITNR 12
1169#define R_SERIAL0_CTRL__stop_bits__WIDTH 1
1170#define R_SERIAL0_CTRL__stop_bits__one_bit 0
1171#define R_SERIAL0_CTRL__stop_bits__two_bits 1
1172#define R_SERIAL0_CTRL__tr_stick_par__BITNR 11
1173#define R_SERIAL0_CTRL__tr_stick_par__WIDTH 1
1174#define R_SERIAL0_CTRL__tr_stick_par__normal 0
1175#define R_SERIAL0_CTRL__tr_stick_par__stick 1
1176#define R_SERIAL0_CTRL__tr_par__BITNR 10
1177#define R_SERIAL0_CTRL__tr_par__WIDTH 1
1178#define R_SERIAL0_CTRL__tr_par__even 0
1179#define R_SERIAL0_CTRL__tr_par__odd 1
1180#define R_SERIAL0_CTRL__tr_par_en__BITNR 9
1181#define R_SERIAL0_CTRL__tr_par_en__WIDTH 1
1182#define R_SERIAL0_CTRL__tr_par_en__disable 0
1183#define R_SERIAL0_CTRL__tr_par_en__enable 1
1184#define R_SERIAL0_CTRL__tr_bitnr__BITNR 8
1185#define R_SERIAL0_CTRL__tr_bitnr__WIDTH 1
1186#define R_SERIAL0_CTRL__tr_bitnr__tr_8bit 0
1187#define R_SERIAL0_CTRL__tr_bitnr__tr_7bit 1
1188#define R_SERIAL0_CTRL__data_out__BITNR 0
1189#define R_SERIAL0_CTRL__data_out__WIDTH 8
1190
1191#define R_SERIAL0_BAUD (IO_TYPECAST_BYTE 0xb0000063)
1192#define R_SERIAL0_BAUD__tr_baud__BITNR 4
1193#define R_SERIAL0_BAUD__tr_baud__WIDTH 4
1194#define R_SERIAL0_BAUD__tr_baud__c300Hz 0
1195#define R_SERIAL0_BAUD__tr_baud__c600Hz 1
1196#define R_SERIAL0_BAUD__tr_baud__c1200Hz 2
1197#define R_SERIAL0_BAUD__tr_baud__c2400Hz 3
1198#define R_SERIAL0_BAUD__tr_baud__c4800Hz 4
1199#define R_SERIAL0_BAUD__tr_baud__c9600Hz 5
1200#define R_SERIAL0_BAUD__tr_baud__c19k2Hz 6
1201#define R_SERIAL0_BAUD__tr_baud__c38k4Hz 7
1202#define R_SERIAL0_BAUD__tr_baud__c57k6Hz 8
1203#define R_SERIAL0_BAUD__tr_baud__c115k2Hz 9
1204#define R_SERIAL0_BAUD__tr_baud__c230k4Hz 10
1205#define R_SERIAL0_BAUD__tr_baud__c460k8Hz 11
1206#define R_SERIAL0_BAUD__tr_baud__c921k6Hz 12
1207#define R_SERIAL0_BAUD__tr_baud__c1843k2Hz 13
1208#define R_SERIAL0_BAUD__tr_baud__c6250kHz 14
1209#define R_SERIAL0_BAUD__tr_baud__reserved 15
1210#define R_SERIAL0_BAUD__rec_baud__BITNR 0
1211#define R_SERIAL0_BAUD__rec_baud__WIDTH 4
1212#define R_SERIAL0_BAUD__rec_baud__c300Hz 0
1213#define R_SERIAL0_BAUD__rec_baud__c600Hz 1
1214#define R_SERIAL0_BAUD__rec_baud__c1200Hz 2
1215#define R_SERIAL0_BAUD__rec_baud__c2400Hz 3
1216#define R_SERIAL0_BAUD__rec_baud__c4800Hz 4
1217#define R_SERIAL0_BAUD__rec_baud__c9600Hz 5
1218#define R_SERIAL0_BAUD__rec_baud__c19k2Hz 6
1219#define R_SERIAL0_BAUD__rec_baud__c38k4Hz 7
1220#define R_SERIAL0_BAUD__rec_baud__c57k6Hz 8
1221#define R_SERIAL0_BAUD__rec_baud__c115k2Hz 9
1222#define R_SERIAL0_BAUD__rec_baud__c230k4Hz 10
1223#define R_SERIAL0_BAUD__rec_baud__c460k8Hz 11
1224#define R_SERIAL0_BAUD__rec_baud__c921k6Hz 12
1225#define R_SERIAL0_BAUD__rec_baud__c1843k2Hz 13
1226#define R_SERIAL0_BAUD__rec_baud__c6250kHz 14
1227#define R_SERIAL0_BAUD__rec_baud__reserved 15
1228
1229#define R_SERIAL0_REC_CTRL (IO_TYPECAST_BYTE 0xb0000062)
1230#define R_SERIAL0_REC_CTRL__dma_err__BITNR 7
1231#define R_SERIAL0_REC_CTRL__dma_err__WIDTH 1
1232#define R_SERIAL0_REC_CTRL__dma_err__stop 0
1233#define R_SERIAL0_REC_CTRL__dma_err__ignore 1
1234#define R_SERIAL0_REC_CTRL__rec_enable__BITNR 6
1235#define R_SERIAL0_REC_CTRL__rec_enable__WIDTH 1
1236#define R_SERIAL0_REC_CTRL__rec_enable__disable 0
1237#define R_SERIAL0_REC_CTRL__rec_enable__enable 1
1238#define R_SERIAL0_REC_CTRL__rts___BITNR 5
1239#define R_SERIAL0_REC_CTRL__rts___WIDTH 1
1240#define R_SERIAL0_REC_CTRL__rts___active 0
1241#define R_SERIAL0_REC_CTRL__rts___inactive 1
1242#define R_SERIAL0_REC_CTRL__sampling__BITNR 4
1243#define R_SERIAL0_REC_CTRL__sampling__WIDTH 1
1244#define R_SERIAL0_REC_CTRL__sampling__middle 0
1245#define R_SERIAL0_REC_CTRL__sampling__majority 1
1246#define R_SERIAL0_REC_CTRL__rec_stick_par__BITNR 3
1247#define R_SERIAL0_REC_CTRL__rec_stick_par__WIDTH 1
1248#define R_SERIAL0_REC_CTRL__rec_stick_par__normal 0
1249#define R_SERIAL0_REC_CTRL__rec_stick_par__stick 1
1250#define R_SERIAL0_REC_CTRL__rec_par__BITNR 2
1251#define R_SERIAL0_REC_CTRL__rec_par__WIDTH 1
1252#define R_SERIAL0_REC_CTRL__rec_par__even 0
1253#define R_SERIAL0_REC_CTRL__rec_par__odd 1
1254#define R_SERIAL0_REC_CTRL__rec_par_en__BITNR 1
1255#define R_SERIAL0_REC_CTRL__rec_par_en__WIDTH 1
1256#define R_SERIAL0_REC_CTRL__rec_par_en__disable 0
1257#define R_SERIAL0_REC_CTRL__rec_par_en__enable 1
1258#define R_SERIAL0_REC_CTRL__rec_bitnr__BITNR 0
1259#define R_SERIAL0_REC_CTRL__rec_bitnr__WIDTH 1
1260#define R_SERIAL0_REC_CTRL__rec_bitnr__rec_8bit 0
1261#define R_SERIAL0_REC_CTRL__rec_bitnr__rec_7bit 1
1262
1263#define R_SERIAL0_TR_CTRL (IO_TYPECAST_BYTE 0xb0000061)
1264#define R_SERIAL0_TR_CTRL__txd__BITNR 7
1265#define R_SERIAL0_TR_CTRL__txd__WIDTH 1
1266#define R_SERIAL0_TR_CTRL__tr_enable__BITNR 6
1267#define R_SERIAL0_TR_CTRL__tr_enable__WIDTH 1
1268#define R_SERIAL0_TR_CTRL__tr_enable__disable 0
1269#define R_SERIAL0_TR_CTRL__tr_enable__enable 1
1270#define R_SERIAL0_TR_CTRL__auto_cts__BITNR 5
1271#define R_SERIAL0_TR_CTRL__auto_cts__WIDTH 1
1272#define R_SERIAL0_TR_CTRL__auto_cts__disabled 0
1273#define R_SERIAL0_TR_CTRL__auto_cts__active 1
1274#define R_SERIAL0_TR_CTRL__stop_bits__BITNR 4
1275#define R_SERIAL0_TR_CTRL__stop_bits__WIDTH 1
1276#define R_SERIAL0_TR_CTRL__stop_bits__one_bit 0
1277#define R_SERIAL0_TR_CTRL__stop_bits__two_bits 1
1278#define R_SERIAL0_TR_CTRL__tr_stick_par__BITNR 3
1279#define R_SERIAL0_TR_CTRL__tr_stick_par__WIDTH 1
1280#define R_SERIAL0_TR_CTRL__tr_stick_par__normal 0
1281#define R_SERIAL0_TR_CTRL__tr_stick_par__stick 1
1282#define R_SERIAL0_TR_CTRL__tr_par__BITNR 2
1283#define R_SERIAL0_TR_CTRL__tr_par__WIDTH 1
1284#define R_SERIAL0_TR_CTRL__tr_par__even 0
1285#define R_SERIAL0_TR_CTRL__tr_par__odd 1
1286#define R_SERIAL0_TR_CTRL__tr_par_en__BITNR 1
1287#define R_SERIAL0_TR_CTRL__tr_par_en__WIDTH 1
1288#define R_SERIAL0_TR_CTRL__tr_par_en__disable 0
1289#define R_SERIAL0_TR_CTRL__tr_par_en__enable 1
1290#define R_SERIAL0_TR_CTRL__tr_bitnr__BITNR 0
1291#define R_SERIAL0_TR_CTRL__tr_bitnr__WIDTH 1
1292#define R_SERIAL0_TR_CTRL__tr_bitnr__tr_8bit 0
1293#define R_SERIAL0_TR_CTRL__tr_bitnr__tr_7bit 1
1294
1295#define R_SERIAL0_TR_DATA (IO_TYPECAST_BYTE 0xb0000060)
1296#define R_SERIAL0_TR_DATA__data_out__BITNR 0
1297#define R_SERIAL0_TR_DATA__data_out__WIDTH 8
1298
1299#define R_SERIAL0_READ (IO_TYPECAST_RO_UDWORD 0xb0000060)
1300#define R_SERIAL0_READ__xoff_detect__BITNR 15
1301#define R_SERIAL0_READ__xoff_detect__WIDTH 1
1302#define R_SERIAL0_READ__xoff_detect__no_xoff 0
1303#define R_SERIAL0_READ__xoff_detect__xoff 1
1304#define R_SERIAL0_READ__cts___BITNR 14
1305#define R_SERIAL0_READ__cts___WIDTH 1
1306#define R_SERIAL0_READ__cts___active 0
1307#define R_SERIAL0_READ__cts___inactive 1
1308#define R_SERIAL0_READ__tr_ready__BITNR 13
1309#define R_SERIAL0_READ__tr_ready__WIDTH 1
1310#define R_SERIAL0_READ__tr_ready__full 0
1311#define R_SERIAL0_READ__tr_ready__ready 1
1312#define R_SERIAL0_READ__rxd__BITNR 12
1313#define R_SERIAL0_READ__rxd__WIDTH 1
1314#define R_SERIAL0_READ__overrun__BITNR 11
1315#define R_SERIAL0_READ__overrun__WIDTH 1
1316#define R_SERIAL0_READ__overrun__no 0
1317#define R_SERIAL0_READ__overrun__yes 1
1318#define R_SERIAL0_READ__par_err__BITNR 10
1319#define R_SERIAL0_READ__par_err__WIDTH 1
1320#define R_SERIAL0_READ__par_err__no 0
1321#define R_SERIAL0_READ__par_err__yes 1
1322#define R_SERIAL0_READ__framing_err__BITNR 9
1323#define R_SERIAL0_READ__framing_err__WIDTH 1
1324#define R_SERIAL0_READ__framing_err__no 0
1325#define R_SERIAL0_READ__framing_err__yes 1
1326#define R_SERIAL0_READ__data_avail__BITNR 8
1327#define R_SERIAL0_READ__data_avail__WIDTH 1
1328#define R_SERIAL0_READ__data_avail__no 0
1329#define R_SERIAL0_READ__data_avail__yes 1
1330#define R_SERIAL0_READ__data_in__BITNR 0
1331#define R_SERIAL0_READ__data_in__WIDTH 8
1332
1333#define R_SERIAL0_STATUS (IO_TYPECAST_RO_BYTE 0xb0000061)
1334#define R_SERIAL0_STATUS__xoff_detect__BITNR 7
1335#define R_SERIAL0_STATUS__xoff_detect__WIDTH 1
1336#define R_SERIAL0_STATUS__xoff_detect__no_xoff 0
1337#define R_SERIAL0_STATUS__xoff_detect__xoff 1
1338#define R_SERIAL0_STATUS__cts___BITNR 6
1339#define R_SERIAL0_STATUS__cts___WIDTH 1
1340#define R_SERIAL0_STATUS__cts___active 0
1341#define R_SERIAL0_STATUS__cts___inactive 1
1342#define R_SERIAL0_STATUS__tr_ready__BITNR 5
1343#define R_SERIAL0_STATUS__tr_ready__WIDTH 1
1344#define R_SERIAL0_STATUS__tr_ready__full 0
1345#define R_SERIAL0_STATUS__tr_ready__ready 1
1346#define R_SERIAL0_STATUS__rxd__BITNR 4
1347#define R_SERIAL0_STATUS__rxd__WIDTH 1
1348#define R_SERIAL0_STATUS__overrun__BITNR 3
1349#define R_SERIAL0_STATUS__overrun__WIDTH 1
1350#define R_SERIAL0_STATUS__overrun__no 0
1351#define R_SERIAL0_STATUS__overrun__yes 1
1352#define R_SERIAL0_STATUS__par_err__BITNR 2
1353#define R_SERIAL0_STATUS__par_err__WIDTH 1
1354#define R_SERIAL0_STATUS__par_err__no 0
1355#define R_SERIAL0_STATUS__par_err__yes 1
1356#define R_SERIAL0_STATUS__framing_err__BITNR 1
1357#define R_SERIAL0_STATUS__framing_err__WIDTH 1
1358#define R_SERIAL0_STATUS__framing_err__no 0
1359#define R_SERIAL0_STATUS__framing_err__yes 1
1360#define R_SERIAL0_STATUS__data_avail__BITNR 0
1361#define R_SERIAL0_STATUS__data_avail__WIDTH 1
1362#define R_SERIAL0_STATUS__data_avail__no 0
1363#define R_SERIAL0_STATUS__data_avail__yes 1
1364
1365#define R_SERIAL0_REC_DATA (IO_TYPECAST_RO_BYTE 0xb0000060)
1366#define R_SERIAL0_REC_DATA__data_in__BITNR 0
1367#define R_SERIAL0_REC_DATA__data_in__WIDTH 8
1368
1369#define R_SERIAL0_XOFF (IO_TYPECAST_UDWORD 0xb0000064)
1370#define R_SERIAL0_XOFF__tx_stop__BITNR 9
1371#define R_SERIAL0_XOFF__tx_stop__WIDTH 1
1372#define R_SERIAL0_XOFF__tx_stop__enable 0
1373#define R_SERIAL0_XOFF__tx_stop__stop 1
1374#define R_SERIAL0_XOFF__auto_xoff__BITNR 8
1375#define R_SERIAL0_XOFF__auto_xoff__WIDTH 1
1376#define R_SERIAL0_XOFF__auto_xoff__disable 0
1377#define R_SERIAL0_XOFF__auto_xoff__enable 1
1378#define R_SERIAL0_XOFF__xoff_char__BITNR 0
1379#define R_SERIAL0_XOFF__xoff_char__WIDTH 8
1380
1381#define R_SERIAL1_CTRL (IO_TYPECAST_UDWORD 0xb0000068)
1382#define R_SERIAL1_CTRL__tr_baud__BITNR 28
1383#define R_SERIAL1_CTRL__tr_baud__WIDTH 4
1384#define R_SERIAL1_CTRL__tr_baud__c300Hz 0
1385#define R_SERIAL1_CTRL__tr_baud__c600Hz 1
1386#define R_SERIAL1_CTRL__tr_baud__c1200Hz 2
1387#define R_SERIAL1_CTRL__tr_baud__c2400Hz 3
1388#define R_SERIAL1_CTRL__tr_baud__c4800Hz 4
1389#define R_SERIAL1_CTRL__tr_baud__c9600Hz 5
1390#define R_SERIAL1_CTRL__tr_baud__c19k2Hz 6
1391#define R_SERIAL1_CTRL__tr_baud__c38k4Hz 7
1392#define R_SERIAL1_CTRL__tr_baud__c57k6Hz 8
1393#define R_SERIAL1_CTRL__tr_baud__c115k2Hz 9
1394#define R_SERIAL1_CTRL__tr_baud__c230k4Hz 10
1395#define R_SERIAL1_CTRL__tr_baud__c460k8Hz 11
1396#define R_SERIAL1_CTRL__tr_baud__c921k6Hz 12
1397#define R_SERIAL1_CTRL__tr_baud__c1843k2Hz 13
1398#define R_SERIAL1_CTRL__tr_baud__c6250kHz 14
1399#define R_SERIAL1_CTRL__tr_baud__reserved 15
1400#define R_SERIAL1_CTRL__rec_baud__BITNR 24
1401#define R_SERIAL1_CTRL__rec_baud__WIDTH 4
1402#define R_SERIAL1_CTRL__rec_baud__c300Hz 0
1403#define R_SERIAL1_CTRL__rec_baud__c600Hz 1
1404#define R_SERIAL1_CTRL__rec_baud__c1200Hz 2
1405#define R_SERIAL1_CTRL__rec_baud__c2400Hz 3
1406#define R_SERIAL1_CTRL__rec_baud__c4800Hz 4
1407#define R_SERIAL1_CTRL__rec_baud__c9600Hz 5
1408#define R_SERIAL1_CTRL__rec_baud__c19k2Hz 6
1409#define R_SERIAL1_CTRL__rec_baud__c38k4Hz 7
1410#define R_SERIAL1_CTRL__rec_baud__c57k6Hz 8
1411#define R_SERIAL1_CTRL__rec_baud__c115k2Hz 9
1412#define R_SERIAL1_CTRL__rec_baud__c230k4Hz 10
1413#define R_SERIAL1_CTRL__rec_baud__c460k8Hz 11
1414#define R_SERIAL1_CTRL__rec_baud__c921k6Hz 12
1415#define R_SERIAL1_CTRL__rec_baud__c1843k2Hz 13
1416#define R_SERIAL1_CTRL__rec_baud__c6250kHz 14
1417#define R_SERIAL1_CTRL__rec_baud__reserved 15
1418#define R_SERIAL1_CTRL__dma_err__BITNR 23
1419#define R_SERIAL1_CTRL__dma_err__WIDTH 1
1420#define R_SERIAL1_CTRL__dma_err__stop 0
1421#define R_SERIAL1_CTRL__dma_err__ignore 1
1422#define R_SERIAL1_CTRL__rec_enable__BITNR 22
1423#define R_SERIAL1_CTRL__rec_enable__WIDTH 1
1424#define R_SERIAL1_CTRL__rec_enable__disable 0
1425#define R_SERIAL1_CTRL__rec_enable__enable 1
1426#define R_SERIAL1_CTRL__rts___BITNR 21
1427#define R_SERIAL1_CTRL__rts___WIDTH 1
1428#define R_SERIAL1_CTRL__rts___active 0
1429#define R_SERIAL1_CTRL__rts___inactive 1
1430#define R_SERIAL1_CTRL__sampling__BITNR 20
1431#define R_SERIAL1_CTRL__sampling__WIDTH 1
1432#define R_SERIAL1_CTRL__sampling__middle 0
1433#define R_SERIAL1_CTRL__sampling__majority 1
1434#define R_SERIAL1_CTRL__rec_stick_par__BITNR 19
1435#define R_SERIAL1_CTRL__rec_stick_par__WIDTH 1
1436#define R_SERIAL1_CTRL__rec_stick_par__normal 0
1437#define R_SERIAL1_CTRL__rec_stick_par__stick 1
1438#define R_SERIAL1_CTRL__rec_par__BITNR 18
1439#define R_SERIAL1_CTRL__rec_par__WIDTH 1
1440#define R_SERIAL1_CTRL__rec_par__even 0
1441#define R_SERIAL1_CTRL__rec_par__odd 1
1442#define R_SERIAL1_CTRL__rec_par_en__BITNR 17
1443#define R_SERIAL1_CTRL__rec_par_en__WIDTH 1
1444#define R_SERIAL1_CTRL__rec_par_en__disable 0
1445#define R_SERIAL1_CTRL__rec_par_en__enable 1
1446#define R_SERIAL1_CTRL__rec_bitnr__BITNR 16
1447#define R_SERIAL1_CTRL__rec_bitnr__WIDTH 1
1448#define R_SERIAL1_CTRL__rec_bitnr__rec_8bit 0
1449#define R_SERIAL1_CTRL__rec_bitnr__rec_7bit 1
1450#define R_SERIAL1_CTRL__txd__BITNR 15
1451#define R_SERIAL1_CTRL__txd__WIDTH 1
1452#define R_SERIAL1_CTRL__tr_enable__BITNR 14
1453#define R_SERIAL1_CTRL__tr_enable__WIDTH 1
1454#define R_SERIAL1_CTRL__tr_enable__disable 0
1455#define R_SERIAL1_CTRL__tr_enable__enable 1
1456#define R_SERIAL1_CTRL__auto_cts__BITNR 13
1457#define R_SERIAL1_CTRL__auto_cts__WIDTH 1
1458#define R_SERIAL1_CTRL__auto_cts__disabled 0
1459#define R_SERIAL1_CTRL__auto_cts__active 1
1460#define R_SERIAL1_CTRL__stop_bits__BITNR 12
1461#define R_SERIAL1_CTRL__stop_bits__WIDTH 1
1462#define R_SERIAL1_CTRL__stop_bits__one_bit 0
1463#define R_SERIAL1_CTRL__stop_bits__two_bits 1
1464#define R_SERIAL1_CTRL__tr_stick_par__BITNR 11
1465#define R_SERIAL1_CTRL__tr_stick_par__WIDTH 1
1466#define R_SERIAL1_CTRL__tr_stick_par__normal 0
1467#define R_SERIAL1_CTRL__tr_stick_par__stick 1
1468#define R_SERIAL1_CTRL__tr_par__BITNR 10
1469#define R_SERIAL1_CTRL__tr_par__WIDTH 1
1470#define R_SERIAL1_CTRL__tr_par__even 0
1471#define R_SERIAL1_CTRL__tr_par__odd 1
1472#define R_SERIAL1_CTRL__tr_par_en__BITNR 9
1473#define R_SERIAL1_CTRL__tr_par_en__WIDTH 1
1474#define R_SERIAL1_CTRL__tr_par_en__disable 0
1475#define R_SERIAL1_CTRL__tr_par_en__enable 1
1476#define R_SERIAL1_CTRL__tr_bitnr__BITNR 8
1477#define R_SERIAL1_CTRL__tr_bitnr__WIDTH 1
1478#define R_SERIAL1_CTRL__tr_bitnr__tr_8bit 0
1479#define R_SERIAL1_CTRL__tr_bitnr__tr_7bit 1
1480#define R_SERIAL1_CTRL__data_out__BITNR 0
1481#define R_SERIAL1_CTRL__data_out__WIDTH 8
1482
1483#define R_SERIAL1_BAUD (IO_TYPECAST_BYTE 0xb000006b)
1484#define R_SERIAL1_BAUD__tr_baud__BITNR 4
1485#define R_SERIAL1_BAUD__tr_baud__WIDTH 4
1486#define R_SERIAL1_BAUD__tr_baud__c300Hz 0
1487#define R_SERIAL1_BAUD__tr_baud__c600Hz 1
1488#define R_SERIAL1_BAUD__tr_baud__c1200Hz 2
1489#define R_SERIAL1_BAUD__tr_baud__c2400Hz 3
1490#define R_SERIAL1_BAUD__tr_baud__c4800Hz 4
1491#define R_SERIAL1_BAUD__tr_baud__c9600Hz 5
1492#define R_SERIAL1_BAUD__tr_baud__c19k2Hz 6
1493#define R_SERIAL1_BAUD__tr_baud__c38k4Hz 7
1494#define R_SERIAL1_BAUD__tr_baud__c57k6Hz 8
1495#define R_SERIAL1_BAUD__tr_baud__c115k2Hz 9
1496#define R_SERIAL1_BAUD__tr_baud__c230k4Hz 10
1497#define R_SERIAL1_BAUD__tr_baud__c460k8Hz 11
1498#define R_SERIAL1_BAUD__tr_baud__c921k6Hz 12
1499#define R_SERIAL1_BAUD__tr_baud__c1843k2Hz 13
1500#define R_SERIAL1_BAUD__tr_baud__c6250kHz 14
1501#define R_SERIAL1_BAUD__tr_baud__reserved 15
1502#define R_SERIAL1_BAUD__rec_baud__BITNR 0
1503#define R_SERIAL1_BAUD__rec_baud__WIDTH 4
1504#define R_SERIAL1_BAUD__rec_baud__c300Hz 0
1505#define R_SERIAL1_BAUD__rec_baud__c600Hz 1
1506#define R_SERIAL1_BAUD__rec_baud__c1200Hz 2
1507#define R_SERIAL1_BAUD__rec_baud__c2400Hz 3
1508#define R_SERIAL1_BAUD__rec_baud__c4800Hz 4
1509#define R_SERIAL1_BAUD__rec_baud__c9600Hz 5
1510#define R_SERIAL1_BAUD__rec_baud__c19k2Hz 6
1511#define R_SERIAL1_BAUD__rec_baud__c38k4Hz 7
1512#define R_SERIAL1_BAUD__rec_baud__c57k6Hz 8
1513#define R_SERIAL1_BAUD__rec_baud__c115k2Hz 9
1514#define R_SERIAL1_BAUD__rec_baud__c230k4Hz 10
1515#define R_SERIAL1_BAUD__rec_baud__c460k8Hz 11
1516#define R_SERIAL1_BAUD__rec_baud__c921k6Hz 12
1517#define R_SERIAL1_BAUD__rec_baud__c1843k2Hz 13
1518#define R_SERIAL1_BAUD__rec_baud__c6250kHz 14
1519#define R_SERIAL1_BAUD__rec_baud__reserved 15
1520
1521#define R_SERIAL1_REC_CTRL (IO_TYPECAST_BYTE 0xb000006a)
1522#define R_SERIAL1_REC_CTRL__dma_err__BITNR 7
1523#define R_SERIAL1_REC_CTRL__dma_err__WIDTH 1
1524#define R_SERIAL1_REC_CTRL__dma_err__stop 0
1525#define R_SERIAL1_REC_CTRL__dma_err__ignore 1
1526#define R_SERIAL1_REC_CTRL__rec_enable__BITNR 6
1527#define R_SERIAL1_REC_CTRL__rec_enable__WIDTH 1
1528#define R_SERIAL1_REC_CTRL__rec_enable__disable 0
1529#define R_SERIAL1_REC_CTRL__rec_enable__enable 1
1530#define R_SERIAL1_REC_CTRL__rts___BITNR 5
1531#define R_SERIAL1_REC_CTRL__rts___WIDTH 1
1532#define R_SERIAL1_REC_CTRL__rts___active 0
1533#define R_SERIAL1_REC_CTRL__rts___inactive 1
1534#define R_SERIAL1_REC_CTRL__sampling__BITNR 4
1535#define R_SERIAL1_REC_CTRL__sampling__WIDTH 1
1536#define R_SERIAL1_REC_CTRL__sampling__middle 0
1537#define R_SERIAL1_REC_CTRL__sampling__majority 1
1538#define R_SERIAL1_REC_CTRL__rec_stick_par__BITNR 3
1539#define R_SERIAL1_REC_CTRL__rec_stick_par__WIDTH 1
1540#define R_SERIAL1_REC_CTRL__rec_stick_par__normal 0
1541#define R_SERIAL1_REC_CTRL__rec_stick_par__stick 1
1542#define R_SERIAL1_REC_CTRL__rec_par__BITNR 2
1543#define R_SERIAL1_REC_CTRL__rec_par__WIDTH 1
1544#define R_SERIAL1_REC_CTRL__rec_par__even 0
1545#define R_SERIAL1_REC_CTRL__rec_par__odd 1
1546#define R_SERIAL1_REC_CTRL__rec_par_en__BITNR 1
1547#define R_SERIAL1_REC_CTRL__rec_par_en__WIDTH 1
1548#define R_SERIAL1_REC_CTRL__rec_par_en__disable 0
1549#define R_SERIAL1_REC_CTRL__rec_par_en__enable 1
1550#define R_SERIAL1_REC_CTRL__rec_bitnr__BITNR 0
1551#define R_SERIAL1_REC_CTRL__rec_bitnr__WIDTH 1
1552#define R_SERIAL1_REC_CTRL__rec_bitnr__rec_8bit 0
1553#define R_SERIAL1_REC_CTRL__rec_bitnr__rec_7bit 1
1554
1555#define R_SERIAL1_TR_CTRL (IO_TYPECAST_BYTE 0xb0000069)
1556#define R_SERIAL1_TR_CTRL__txd__BITNR 7
1557#define R_SERIAL1_TR_CTRL__txd__WIDTH 1
1558#define R_SERIAL1_TR_CTRL__tr_enable__BITNR 6
1559#define R_SERIAL1_TR_CTRL__tr_enable__WIDTH 1
1560#define R_SERIAL1_TR_CTRL__tr_enable__disable 0
1561#define R_SERIAL1_TR_CTRL__tr_enable__enable 1
1562#define R_SERIAL1_TR_CTRL__auto_cts__BITNR 5
1563#define R_SERIAL1_TR_CTRL__auto_cts__WIDTH 1
1564#define R_SERIAL1_TR_CTRL__auto_cts__disabled 0
1565#define R_SERIAL1_TR_CTRL__auto_cts__active 1
1566#define R_SERIAL1_TR_CTRL__stop_bits__BITNR 4
1567#define R_SERIAL1_TR_CTRL__stop_bits__WIDTH 1
1568#define R_SERIAL1_TR_CTRL__stop_bits__one_bit 0
1569#define R_SERIAL1_TR_CTRL__stop_bits__two_bits 1
1570#define R_SERIAL1_TR_CTRL__tr_stick_par__BITNR 3
1571#define R_SERIAL1_TR_CTRL__tr_stick_par__WIDTH 1
1572#define R_SERIAL1_TR_CTRL__tr_stick_par__normal 0
1573#define R_SERIAL1_TR_CTRL__tr_stick_par__stick 1
1574#define R_SERIAL1_TR_CTRL__tr_par__BITNR 2
1575#define R_SERIAL1_TR_CTRL__tr_par__WIDTH 1
1576#define R_SERIAL1_TR_CTRL__tr_par__even 0
1577#define R_SERIAL1_TR_CTRL__tr_par__odd 1
1578#define R_SERIAL1_TR_CTRL__tr_par_en__BITNR 1
1579#define R_SERIAL1_TR_CTRL__tr_par_en__WIDTH 1
1580#define R_SERIAL1_TR_CTRL__tr_par_en__disable 0
1581#define R_SERIAL1_TR_CTRL__tr_par_en__enable 1
1582#define R_SERIAL1_TR_CTRL__tr_bitnr__BITNR 0
1583#define R_SERIAL1_TR_CTRL__tr_bitnr__WIDTH 1
1584#define R_SERIAL1_TR_CTRL__tr_bitnr__tr_8bit 0
1585#define R_SERIAL1_TR_CTRL__tr_bitnr__tr_7bit 1
1586
1587#define R_SERIAL1_TR_DATA (IO_TYPECAST_BYTE 0xb0000068)
1588#define R_SERIAL1_TR_DATA__data_out__BITNR 0
1589#define R_SERIAL1_TR_DATA__data_out__WIDTH 8
1590
1591#define R_SERIAL1_READ (IO_TYPECAST_RO_UDWORD 0xb0000068)
1592#define R_SERIAL1_READ__xoff_detect__BITNR 15
1593#define R_SERIAL1_READ__xoff_detect__WIDTH 1
1594#define R_SERIAL1_READ__xoff_detect__no_xoff 0
1595#define R_SERIAL1_READ__xoff_detect__xoff 1
1596#define R_SERIAL1_READ__cts___BITNR 14
1597#define R_SERIAL1_READ__cts___WIDTH 1
1598#define R_SERIAL1_READ__cts___active 0
1599#define R_SERIAL1_READ__cts___inactive 1
1600#define R_SERIAL1_READ__tr_ready__BITNR 13
1601#define R_SERIAL1_READ__tr_ready__WIDTH 1
1602#define R_SERIAL1_READ__tr_ready__full 0
1603#define R_SERIAL1_READ__tr_ready__ready 1
1604#define R_SERIAL1_READ__rxd__BITNR 12
1605#define R_SERIAL1_READ__rxd__WIDTH 1
1606#define R_SERIAL1_READ__overrun__BITNR 11
1607#define R_SERIAL1_READ__overrun__WIDTH 1
1608#define R_SERIAL1_READ__overrun__no 0
1609#define R_SERIAL1_READ__overrun__yes 1
1610#define R_SERIAL1_READ__par_err__BITNR 10
1611#define R_SERIAL1_READ__par_err__WIDTH 1
1612#define R_SERIAL1_READ__par_err__no 0
1613#define R_SERIAL1_READ__par_err__yes 1
1614#define R_SERIAL1_READ__framing_err__BITNR 9
1615#define R_SERIAL1_READ__framing_err__WIDTH 1
1616#define R_SERIAL1_READ__framing_err__no 0
1617#define R_SERIAL1_READ__framing_err__yes 1
1618#define R_SERIAL1_READ__data_avail__BITNR 8
1619#define R_SERIAL1_READ__data_avail__WIDTH 1
1620#define R_SERIAL1_READ__data_avail__no 0
1621#define R_SERIAL1_READ__data_avail__yes 1
1622#define R_SERIAL1_READ__data_in__BITNR 0
1623#define R_SERIAL1_READ__data_in__WIDTH 8
1624
1625#define R_SERIAL1_STATUS (IO_TYPECAST_RO_BYTE 0xb0000069)
1626#define R_SERIAL1_STATUS__xoff_detect__BITNR 7
1627#define R_SERIAL1_STATUS__xoff_detect__WIDTH 1
1628#define R_SERIAL1_STATUS__xoff_detect__no_xoff 0
1629#define R_SERIAL1_STATUS__xoff_detect__xoff 1
1630#define R_SERIAL1_STATUS__cts___BITNR 6
1631#define R_SERIAL1_STATUS__cts___WIDTH 1
1632#define R_SERIAL1_STATUS__cts___active 0
1633#define R_SERIAL1_STATUS__cts___inactive 1
1634#define R_SERIAL1_STATUS__tr_ready__BITNR 5
1635#define R_SERIAL1_STATUS__tr_ready__WIDTH 1
1636#define R_SERIAL1_STATUS__tr_ready__full 0
1637#define R_SERIAL1_STATUS__tr_ready__ready 1
1638#define R_SERIAL1_STATUS__rxd__BITNR 4
1639#define R_SERIAL1_STATUS__rxd__WIDTH 1
1640#define R_SERIAL1_STATUS__overrun__BITNR 3
1641#define R_SERIAL1_STATUS__overrun__WIDTH 1
1642#define R_SERIAL1_STATUS__overrun__no 0
1643#define R_SERIAL1_STATUS__overrun__yes 1
1644#define R_SERIAL1_STATUS__par_err__BITNR 2
1645#define R_SERIAL1_STATUS__par_err__WIDTH 1
1646#define R_SERIAL1_STATUS__par_err__no 0
1647#define R_SERIAL1_STATUS__par_err__yes 1
1648#define R_SERIAL1_STATUS__framing_err__BITNR 1
1649#define R_SERIAL1_STATUS__framing_err__WIDTH 1
1650#define R_SERIAL1_STATUS__framing_err__no 0
1651#define R_SERIAL1_STATUS__framing_err__yes 1
1652#define R_SERIAL1_STATUS__data_avail__BITNR 0
1653#define R_SERIAL1_STATUS__data_avail__WIDTH 1
1654#define R_SERIAL1_STATUS__data_avail__no 0
1655#define R_SERIAL1_STATUS__data_avail__yes 1
1656
1657#define R_SERIAL1_REC_DATA (IO_TYPECAST_RO_BYTE 0xb0000068)
1658#define R_SERIAL1_REC_DATA__data_in__BITNR 0
1659#define R_SERIAL1_REC_DATA__data_in__WIDTH 8
1660
1661#define R_SERIAL1_XOFF (IO_TYPECAST_UDWORD 0xb000006c)
1662#define R_SERIAL1_XOFF__tx_stop__BITNR 9
1663#define R_SERIAL1_XOFF__tx_stop__WIDTH 1
1664#define R_SERIAL1_XOFF__tx_stop__enable 0
1665#define R_SERIAL1_XOFF__tx_stop__stop 1
1666#define R_SERIAL1_XOFF__auto_xoff__BITNR 8
1667#define R_SERIAL1_XOFF__auto_xoff__WIDTH 1
1668#define R_SERIAL1_XOFF__auto_xoff__disable 0
1669#define R_SERIAL1_XOFF__auto_xoff__enable 1
1670#define R_SERIAL1_XOFF__xoff_char__BITNR 0
1671#define R_SERIAL1_XOFF__xoff_char__WIDTH 8
1672
1673#define R_SERIAL2_CTRL (IO_TYPECAST_UDWORD 0xb0000070)
1674#define R_SERIAL2_CTRL__tr_baud__BITNR 28
1675#define R_SERIAL2_CTRL__tr_baud__WIDTH 4
1676#define R_SERIAL2_CTRL__tr_baud__c300Hz 0
1677#define R_SERIAL2_CTRL__tr_baud__c600Hz 1
1678#define R_SERIAL2_CTRL__tr_baud__c1200Hz 2
1679#define R_SERIAL2_CTRL__tr_baud__c2400Hz 3
1680#define R_SERIAL2_CTRL__tr_baud__c4800Hz 4
1681#define R_SERIAL2_CTRL__tr_baud__c9600Hz 5
1682#define R_SERIAL2_CTRL__tr_baud__c19k2Hz 6
1683#define R_SERIAL2_CTRL__tr_baud__c38k4Hz 7
1684#define R_SERIAL2_CTRL__tr_baud__c57k6Hz 8
1685#define R_SERIAL2_CTRL__tr_baud__c115k2Hz 9
1686#define R_SERIAL2_CTRL__tr_baud__c230k4Hz 10
1687#define R_SERIAL2_CTRL__tr_baud__c460k8Hz 11
1688#define R_SERIAL2_CTRL__tr_baud__c921k6Hz 12
1689#define R_SERIAL2_CTRL__tr_baud__c1843k2Hz 13
1690#define R_SERIAL2_CTRL__tr_baud__c6250kHz 14
1691#define R_SERIAL2_CTRL__tr_baud__reserved 15
1692#define R_SERIAL2_CTRL__rec_baud__BITNR 24
1693#define R_SERIAL2_CTRL__rec_baud__WIDTH 4
1694#define R_SERIAL2_CTRL__rec_baud__c300Hz 0
1695#define R_SERIAL2_CTRL__rec_baud__c600Hz 1
1696#define R_SERIAL2_CTRL__rec_baud__c1200Hz 2
1697#define R_SERIAL2_CTRL__rec_baud__c2400Hz 3
1698#define R_SERIAL2_CTRL__rec_baud__c4800Hz 4
1699#define R_SERIAL2_CTRL__rec_baud__c9600Hz 5
1700#define R_SERIAL2_CTRL__rec_baud__c19k2Hz 6
1701#define R_SERIAL2_CTRL__rec_baud__c38k4Hz 7
1702#define R_SERIAL2_CTRL__rec_baud__c57k6Hz 8
1703#define R_SERIAL2_CTRL__rec_baud__c115k2Hz 9
1704#define R_SERIAL2_CTRL__rec_baud__c230k4Hz 10
1705#define R_SERIAL2_CTRL__rec_baud__c460k8Hz 11
1706#define R_SERIAL2_CTRL__rec_baud__c921k6Hz 12
1707#define R_SERIAL2_CTRL__rec_baud__c1843k2Hz 13
1708#define R_SERIAL2_CTRL__rec_baud__c6250kHz 14
1709#define R_SERIAL2_CTRL__rec_baud__reserved 15
1710#define R_SERIAL2_CTRL__dma_err__BITNR 23
1711#define R_SERIAL2_CTRL__dma_err__WIDTH 1
1712#define R_SERIAL2_CTRL__dma_err__stop 0
1713#define R_SERIAL2_CTRL__dma_err__ignore 1
1714#define R_SERIAL2_CTRL__rec_enable__BITNR 22
1715#define R_SERIAL2_CTRL__rec_enable__WIDTH 1
1716#define R_SERIAL2_CTRL__rec_enable__disable 0
1717#define R_SERIAL2_CTRL__rec_enable__enable 1
1718#define R_SERIAL2_CTRL__rts___BITNR 21
1719#define R_SERIAL2_CTRL__rts___WIDTH 1
1720#define R_SERIAL2_CTRL__rts___active 0
1721#define R_SERIAL2_CTRL__rts___inactive 1
1722#define R_SERIAL2_CTRL__sampling__BITNR 20
1723#define R_SERIAL2_CTRL__sampling__WIDTH 1
1724#define R_SERIAL2_CTRL__sampling__middle 0
1725#define R_SERIAL2_CTRL__sampling__majority 1
1726#define R_SERIAL2_CTRL__rec_stick_par__BITNR 19
1727#define R_SERIAL2_CTRL__rec_stick_par__WIDTH 1
1728#define R_SERIAL2_CTRL__rec_stick_par__normal 0
1729#define R_SERIAL2_CTRL__rec_stick_par__stick 1
1730#define R_SERIAL2_CTRL__rec_par__BITNR 18
1731#define R_SERIAL2_CTRL__rec_par__WIDTH 1
1732#define R_SERIAL2_CTRL__rec_par__even 0
1733#define R_SERIAL2_CTRL__rec_par__odd 1
1734#define R_SERIAL2_CTRL__rec_par_en__BITNR 17
1735#define R_SERIAL2_CTRL__rec_par_en__WIDTH 1
1736#define R_SERIAL2_CTRL__rec_par_en__disable 0
1737#define R_SERIAL2_CTRL__rec_par_en__enable 1
1738#define R_SERIAL2_CTRL__rec_bitnr__BITNR 16
1739#define R_SERIAL2_CTRL__rec_bitnr__WIDTH 1
1740#define R_SERIAL2_CTRL__rec_bitnr__rec_8bit 0
1741#define R_SERIAL2_CTRL__rec_bitnr__rec_7bit 1
1742#define R_SERIAL2_CTRL__txd__BITNR 15
1743#define R_SERIAL2_CTRL__txd__WIDTH 1
1744#define R_SERIAL2_CTRL__tr_enable__BITNR 14
1745#define R_SERIAL2_CTRL__tr_enable__WIDTH 1
1746#define R_SERIAL2_CTRL__tr_enable__disable 0
1747#define R_SERIAL2_CTRL__tr_enable__enable 1
1748#define R_SERIAL2_CTRL__auto_cts__BITNR 13
1749#define R_SERIAL2_CTRL__auto_cts__WIDTH 1
1750#define R_SERIAL2_CTRL__auto_cts__disabled 0
1751#define R_SERIAL2_CTRL__auto_cts__active 1
1752#define R_SERIAL2_CTRL__stop_bits__BITNR 12
1753#define R_SERIAL2_CTRL__stop_bits__WIDTH 1
1754#define R_SERIAL2_CTRL__stop_bits__one_bit 0
1755#define R_SERIAL2_CTRL__stop_bits__two_bits 1
1756#define R_SERIAL2_CTRL__tr_stick_par__BITNR 11
1757#define R_SERIAL2_CTRL__tr_stick_par__WIDTH 1
1758#define R_SERIAL2_CTRL__tr_stick_par__normal 0
1759#define R_SERIAL2_CTRL__tr_stick_par__stick 1
1760#define R_SERIAL2_CTRL__tr_par__BITNR 10
1761#define R_SERIAL2_CTRL__tr_par__WIDTH 1
1762#define R_SERIAL2_CTRL__tr_par__even 0
1763#define R_SERIAL2_CTRL__tr_par__odd 1
1764#define R_SERIAL2_CTRL__tr_par_en__BITNR 9
1765#define R_SERIAL2_CTRL__tr_par_en__WIDTH 1
1766#define R_SERIAL2_CTRL__tr_par_en__disable 0
1767#define R_SERIAL2_CTRL__tr_par_en__enable 1
1768#define R_SERIAL2_CTRL__tr_bitnr__BITNR 8
1769#define R_SERIAL2_CTRL__tr_bitnr__WIDTH 1
1770#define R_SERIAL2_CTRL__tr_bitnr__tr_8bit 0
1771#define R_SERIAL2_CTRL__tr_bitnr__tr_7bit 1
1772#define R_SERIAL2_CTRL__data_out__BITNR 0
1773#define R_SERIAL2_CTRL__data_out__WIDTH 8
1774
1775#define R_SERIAL2_BAUD (IO_TYPECAST_BYTE 0xb0000073)
1776#define R_SERIAL2_BAUD__tr_baud__BITNR 4
1777#define R_SERIAL2_BAUD__tr_baud__WIDTH 4
1778#define R_SERIAL2_BAUD__tr_baud__c300Hz 0
1779#define R_SERIAL2_BAUD__tr_baud__c600Hz 1
1780#define R_SERIAL2_BAUD__tr_baud__c1200Hz 2
1781#define R_SERIAL2_BAUD__tr_baud__c2400Hz 3
1782#define R_SERIAL2_BAUD__tr_baud__c4800Hz 4
1783#define R_SERIAL2_BAUD__tr_baud__c9600Hz 5
1784#define R_SERIAL2_BAUD__tr_baud__c19k2Hz 6
1785#define R_SERIAL2_BAUD__tr_baud__c38k4Hz 7
1786#define R_SERIAL2_BAUD__tr_baud__c57k6Hz 8
1787#define R_SERIAL2_BAUD__tr_baud__c115k2Hz 9
1788#define R_SERIAL2_BAUD__tr_baud__c230k4Hz 10
1789#define R_SERIAL2_BAUD__tr_baud__c460k8Hz 11
1790#define R_SERIAL2_BAUD__tr_baud__c921k6Hz 12
1791#define R_SERIAL2_BAUD__tr_baud__c1843k2Hz 13
1792#define R_SERIAL2_BAUD__tr_baud__c6250kHz 14
1793#define R_SERIAL2_BAUD__tr_baud__reserved 15
1794#define R_SERIAL2_BAUD__rec_baud__BITNR 0
1795#define R_SERIAL2_BAUD__rec_baud__WIDTH 4
1796#define R_SERIAL2_BAUD__rec_baud__c300Hz 0
1797#define R_SERIAL2_BAUD__rec_baud__c600Hz 1
1798#define R_SERIAL2_BAUD__rec_baud__c1200Hz 2
1799#define R_SERIAL2_BAUD__rec_baud__c2400Hz 3
1800#define R_SERIAL2_BAUD__rec_baud__c4800Hz 4
1801#define R_SERIAL2_BAUD__rec_baud__c9600Hz 5
1802#define R_SERIAL2_BAUD__rec_baud__c19k2Hz 6
1803#define R_SERIAL2_BAUD__rec_baud__c38k4Hz 7
1804#define R_SERIAL2_BAUD__rec_baud__c57k6Hz 8
1805#define R_SERIAL2_BAUD__rec_baud__c115k2Hz 9
1806#define R_SERIAL2_BAUD__rec_baud__c230k4Hz 10
1807#define R_SERIAL2_BAUD__rec_baud__c460k8Hz 11
1808#define R_SERIAL2_BAUD__rec_baud__c921k6Hz 12
1809#define R_SERIAL2_BAUD__rec_baud__c1843k2Hz 13
1810#define R_SERIAL2_BAUD__rec_baud__c6250kHz 14
1811#define R_SERIAL2_BAUD__rec_baud__reserved 15
1812
1813#define R_SERIAL2_REC_CTRL (IO_TYPECAST_BYTE 0xb0000072)
1814#define R_SERIAL2_REC_CTRL__dma_err__BITNR 7
1815#define R_SERIAL2_REC_CTRL__dma_err__WIDTH 1
1816#define R_SERIAL2_REC_CTRL__dma_err__stop 0
1817#define R_SERIAL2_REC_CTRL__dma_err__ignore 1
1818#define R_SERIAL2_REC_CTRL__rec_enable__BITNR 6
1819#define R_SERIAL2_REC_CTRL__rec_enable__WIDTH 1
1820#define R_SERIAL2_REC_CTRL__rec_enable__disable 0
1821#define R_SERIAL2_REC_CTRL__rec_enable__enable 1
1822#define R_SERIAL2_REC_CTRL__rts___BITNR 5
1823#define R_SERIAL2_REC_CTRL__rts___WIDTH 1
1824#define R_SERIAL2_REC_CTRL__rts___active 0
1825#define R_SERIAL2_REC_CTRL__rts___inactive 1
1826#define R_SERIAL2_REC_CTRL__sampling__BITNR 4
1827#define R_SERIAL2_REC_CTRL__sampling__WIDTH 1
1828#define R_SERIAL2_REC_CTRL__sampling__middle 0
1829#define R_SERIAL2_REC_CTRL__sampling__majority 1
1830#define R_SERIAL2_REC_CTRL__rec_stick_par__BITNR 3
1831#define R_SERIAL2_REC_CTRL__rec_stick_par__WIDTH 1
1832#define R_SERIAL2_REC_CTRL__rec_stick_par__normal 0
1833#define R_SERIAL2_REC_CTRL__rec_stick_par__stick 1
1834#define R_SERIAL2_REC_CTRL__rec_par__BITNR 2
1835#define R_SERIAL2_REC_CTRL__rec_par__WIDTH 1
1836#define R_SERIAL2_REC_CTRL__rec_par__even 0
1837#define R_SERIAL2_REC_CTRL__rec_par__odd 1
1838#define R_SERIAL2_REC_CTRL__rec_par_en__BITNR 1
1839#define R_SERIAL2_REC_CTRL__rec_par_en__WIDTH 1
1840#define R_SERIAL2_REC_CTRL__rec_par_en__disable 0
1841#define R_SERIAL2_REC_CTRL__rec_par_en__enable 1
1842#define R_SERIAL2_REC_CTRL__rec_bitnr__BITNR 0
1843#define R_SERIAL2_REC_CTRL__rec_bitnr__WIDTH 1
1844#define R_SERIAL2_REC_CTRL__rec_bitnr__rec_8bit 0
1845#define R_SERIAL2_REC_CTRL__rec_bitnr__rec_7bit 1
1846
1847#define R_SERIAL2_TR_CTRL (IO_TYPECAST_BYTE 0xb0000071)
1848#define R_SERIAL2_TR_CTRL__txd__BITNR 7
1849#define R_SERIAL2_TR_CTRL__txd__WIDTH 1
1850#define R_SERIAL2_TR_CTRL__tr_enable__BITNR 6
1851#define R_SERIAL2_TR_CTRL__tr_enable__WIDTH 1
1852#define R_SERIAL2_TR_CTRL__tr_enable__disable 0
1853#define R_SERIAL2_TR_CTRL__tr_enable__enable 1
1854#define R_SERIAL2_TR_CTRL__auto_cts__BITNR 5
1855#define R_SERIAL2_TR_CTRL__auto_cts__WIDTH 1
1856#define R_SERIAL2_TR_CTRL__auto_cts__disabled 0
1857#define R_SERIAL2_TR_CTRL__auto_cts__active 1
1858#define R_SERIAL2_TR_CTRL__stop_bits__BITNR 4
1859#define R_SERIAL2_TR_CTRL__stop_bits__WIDTH 1
1860#define R_SERIAL2_TR_CTRL__stop_bits__one_bit 0
1861#define R_SERIAL2_TR_CTRL__stop_bits__two_bits 1
1862#define R_SERIAL2_TR_CTRL__tr_stick_par__BITNR 3
1863#define R_SERIAL2_TR_CTRL__tr_stick_par__WIDTH 1
1864#define R_SERIAL2_TR_CTRL__tr_stick_par__normal 0
1865#define R_SERIAL2_TR_CTRL__tr_stick_par__stick 1
1866#define R_SERIAL2_TR_CTRL__tr_par__BITNR 2
1867#define R_SERIAL2_TR_CTRL__tr_par__WIDTH 1
1868#define R_SERIAL2_TR_CTRL__tr_par__even 0
1869#define R_SERIAL2_TR_CTRL__tr_par__odd 1
1870#define R_SERIAL2_TR_CTRL__tr_par_en__BITNR 1
1871#define R_SERIAL2_TR_CTRL__tr_par_en__WIDTH 1
1872#define R_SERIAL2_TR_CTRL__tr_par_en__disable 0
1873#define R_SERIAL2_TR_CTRL__tr_par_en__enable 1
1874#define R_SERIAL2_TR_CTRL__tr_bitnr__BITNR 0
1875#define R_SERIAL2_TR_CTRL__tr_bitnr__WIDTH 1
1876#define R_SERIAL2_TR_CTRL__tr_bitnr__tr_8bit 0
1877#define R_SERIAL2_TR_CTRL__tr_bitnr__tr_7bit 1
1878
1879#define R_SERIAL2_TR_DATA (IO_TYPECAST_BYTE 0xb0000070)
1880#define R_SERIAL2_TR_DATA__data_out__BITNR 0
1881#define R_SERIAL2_TR_DATA__data_out__WIDTH 8
1882
1883#define R_SERIAL2_READ (IO_TYPECAST_RO_UDWORD 0xb0000070)
1884#define R_SERIAL2_READ__xoff_detect__BITNR 15
1885#define R_SERIAL2_READ__xoff_detect__WIDTH 1
1886#define R_SERIAL2_READ__xoff_detect__no_xoff 0
1887#define R_SERIAL2_READ__xoff_detect__xoff 1
1888#define R_SERIAL2_READ__cts___BITNR 14
1889#define R_SERIAL2_READ__cts___WIDTH 1
1890#define R_SERIAL2_READ__cts___active 0
1891#define R_SERIAL2_READ__cts___inactive 1
1892#define R_SERIAL2_READ__tr_ready__BITNR 13
1893#define R_SERIAL2_READ__tr_ready__WIDTH 1
1894#define R_SERIAL2_READ__tr_ready__full 0
1895#define R_SERIAL2_READ__tr_ready__ready 1
1896#define R_SERIAL2_READ__rxd__BITNR 12
1897#define R_SERIAL2_READ__rxd__WIDTH 1
1898#define R_SERIAL2_READ__overrun__BITNR 11
1899#define R_SERIAL2_READ__overrun__WIDTH 1
1900#define R_SERIAL2_READ__overrun__no 0
1901#define R_SERIAL2_READ__overrun__yes 1
1902#define R_SERIAL2_READ__par_err__BITNR 10
1903#define R_SERIAL2_READ__par_err__WIDTH 1
1904#define R_SERIAL2_READ__par_err__no 0
1905#define R_SERIAL2_READ__par_err__yes 1
1906#define R_SERIAL2_READ__framing_err__BITNR 9
1907#define R_SERIAL2_READ__framing_err__WIDTH 1
1908#define R_SERIAL2_READ__framing_err__no 0
1909#define R_SERIAL2_READ__framing_err__yes 1
1910#define R_SERIAL2_READ__data_avail__BITNR 8
1911#define R_SERIAL2_READ__data_avail__WIDTH 1
1912#define R_SERIAL2_READ__data_avail__no 0
1913#define R_SERIAL2_READ__data_avail__yes 1
1914#define R_SERIAL2_READ__data_in__BITNR 0
1915#define R_SERIAL2_READ__data_in__WIDTH 8
1916
1917#define R_SERIAL2_STATUS (IO_TYPECAST_RO_BYTE 0xb0000071)
1918#define R_SERIAL2_STATUS__xoff_detect__BITNR 7
1919#define R_SERIAL2_STATUS__xoff_detect__WIDTH 1
1920#define R_SERIAL2_STATUS__xoff_detect__no_xoff 0
1921#define R_SERIAL2_STATUS__xoff_detect__xoff 1
1922#define R_SERIAL2_STATUS__cts___BITNR 6
1923#define R_SERIAL2_STATUS__cts___WIDTH 1
1924#define R_SERIAL2_STATUS__cts___active 0
1925#define R_SERIAL2_STATUS__cts___inactive 1
1926#define R_SERIAL2_STATUS__tr_ready__BITNR 5
1927#define R_SERIAL2_STATUS__tr_ready__WIDTH 1
1928#define R_SERIAL2_STATUS__tr_ready__full 0
1929#define R_SERIAL2_STATUS__tr_ready__ready 1
1930#define R_SERIAL2_STATUS__rxd__BITNR 4
1931#define R_SERIAL2_STATUS__rxd__WIDTH 1
1932#define R_SERIAL2_STATUS__overrun__BITNR 3
1933#define R_SERIAL2_STATUS__overrun__WIDTH 1
1934#define R_SERIAL2_STATUS__overrun__no 0
1935#define R_SERIAL2_STATUS__overrun__yes 1
1936#define R_SERIAL2_STATUS__par_err__BITNR 2
1937#define R_SERIAL2_STATUS__par_err__WIDTH 1
1938#define R_SERIAL2_STATUS__par_err__no 0
1939#define R_SERIAL2_STATUS__par_err__yes 1
1940#define R_SERIAL2_STATUS__framing_err__BITNR 1
1941#define R_SERIAL2_STATUS__framing_err__WIDTH 1
1942#define R_SERIAL2_STATUS__framing_err__no 0
1943#define R_SERIAL2_STATUS__framing_err__yes 1
1944#define R_SERIAL2_STATUS__data_avail__BITNR 0
1945#define R_SERIAL2_STATUS__data_avail__WIDTH 1
1946#define R_SERIAL2_STATUS__data_avail__no 0
1947#define R_SERIAL2_STATUS__data_avail__yes 1
1948
1949#define R_SERIAL2_REC_DATA (IO_TYPECAST_RO_BYTE 0xb0000070)
1950#define R_SERIAL2_REC_DATA__data_in__BITNR 0
1951#define R_SERIAL2_REC_DATA__data_in__WIDTH 8
1952
1953#define R_SERIAL2_XOFF (IO_TYPECAST_UDWORD 0xb0000074)
1954#define R_SERIAL2_XOFF__tx_stop__BITNR 9
1955#define R_SERIAL2_XOFF__tx_stop__WIDTH 1
1956#define R_SERIAL2_XOFF__tx_stop__enable 0
1957#define R_SERIAL2_XOFF__tx_stop__stop 1
1958#define R_SERIAL2_XOFF__auto_xoff__BITNR 8
1959#define R_SERIAL2_XOFF__auto_xoff__WIDTH 1
1960#define R_SERIAL2_XOFF__auto_xoff__disable 0
1961#define R_SERIAL2_XOFF__auto_xoff__enable 1
1962#define R_SERIAL2_XOFF__xoff_char__BITNR 0
1963#define R_SERIAL2_XOFF__xoff_char__WIDTH 8
1964
1965#define R_SERIAL3_CTRL (IO_TYPECAST_UDWORD 0xb0000078)
1966#define R_SERIAL3_CTRL__tr_baud__BITNR 28
1967#define R_SERIAL3_CTRL__tr_baud__WIDTH 4
1968#define R_SERIAL3_CTRL__tr_baud__c300Hz 0
1969#define R_SERIAL3_CTRL__tr_baud__c600Hz 1
1970#define R_SERIAL3_CTRL__tr_baud__c1200Hz 2
1971#define R_SERIAL3_CTRL__tr_baud__c2400Hz 3
1972#define R_SERIAL3_CTRL__tr_baud__c4800Hz 4
1973#define R_SERIAL3_CTRL__tr_baud__c9600Hz 5
1974#define R_SERIAL3_CTRL__tr_baud__c19k2Hz 6
1975#define R_SERIAL3_CTRL__tr_baud__c38k4Hz 7
1976#define R_SERIAL3_CTRL__tr_baud__c57k6Hz 8
1977#define R_SERIAL3_CTRL__tr_baud__c115k2Hz 9
1978#define R_SERIAL3_CTRL__tr_baud__c230k4Hz 10
1979#define R_SERIAL3_CTRL__tr_baud__c460k8Hz 11
1980#define R_SERIAL3_CTRL__tr_baud__c921k6Hz 12
1981#define R_SERIAL3_CTRL__tr_baud__c1843k2Hz 13
1982#define R_SERIAL3_CTRL__tr_baud__c6250kHz 14
1983#define R_SERIAL3_CTRL__tr_baud__reserved 15
1984#define R_SERIAL3_CTRL__rec_baud__BITNR 24
1985#define R_SERIAL3_CTRL__rec_baud__WIDTH 4
1986#define R_SERIAL3_CTRL__rec_baud__c300Hz 0
1987#define R_SERIAL3_CTRL__rec_baud__c600Hz 1
1988#define R_SERIAL3_CTRL__rec_baud__c1200Hz 2
1989#define R_SERIAL3_CTRL__rec_baud__c2400Hz 3
1990#define R_SERIAL3_CTRL__rec_baud__c4800Hz 4
1991#define R_SERIAL3_CTRL__rec_baud__c9600Hz 5
1992#define R_SERIAL3_CTRL__rec_baud__c19k2Hz 6
1993#define R_SERIAL3_CTRL__rec_baud__c38k4Hz 7
1994#define R_SERIAL3_CTRL__rec_baud__c57k6Hz 8
1995#define R_SERIAL3_CTRL__rec_baud__c115k2Hz 9
1996#define R_SERIAL3_CTRL__rec_baud__c230k4Hz 10
1997#define R_SERIAL3_CTRL__rec_baud__c460k8Hz 11
1998#define R_SERIAL3_CTRL__rec_baud__c921k6Hz 12
1999#define R_SERIAL3_CTRL__rec_baud__c1843k2Hz 13
2000#define R_SERIAL3_CTRL__rec_baud__c6250kHz 14
2001#define R_SERIAL3_CTRL__rec_baud__reserved 15
2002#define R_SERIAL3_CTRL__dma_err__BITNR 23
2003#define R_SERIAL3_CTRL__dma_err__WIDTH 1
2004#define R_SERIAL3_CTRL__dma_err__stop 0
2005#define R_SERIAL3_CTRL__dma_err__ignore 1
2006#define R_SERIAL3_CTRL__rec_enable__BITNR 22
2007#define R_SERIAL3_CTRL__rec_enable__WIDTH 1
2008#define R_SERIAL3_CTRL__rec_enable__disable 0
2009#define R_SERIAL3_CTRL__rec_enable__enable 1
2010#define R_SERIAL3_CTRL__rts___BITNR 21
2011#define R_SERIAL3_CTRL__rts___WIDTH 1
2012#define R_SERIAL3_CTRL__rts___active 0
2013#define R_SERIAL3_CTRL__rts___inactive 1
2014#define R_SERIAL3_CTRL__sampling__BITNR 20
2015#define R_SERIAL3_CTRL__sampling__WIDTH 1
2016#define R_SERIAL3_CTRL__sampling__middle 0
2017#define R_SERIAL3_CTRL__sampling__majority 1
2018#define R_SERIAL3_CTRL__rec_stick_par__BITNR 19
2019#define R_SERIAL3_CTRL__rec_stick_par__WIDTH 1
2020#define R_SERIAL3_CTRL__rec_stick_par__normal 0
2021#define R_SERIAL3_CTRL__rec_stick_par__stick 1
2022#define R_SERIAL3_CTRL__rec_par__BITNR 18
2023#define R_SERIAL3_CTRL__rec_par__WIDTH 1
2024#define R_SERIAL3_CTRL__rec_par__even 0
2025#define R_SERIAL3_CTRL__rec_par__odd 1
2026#define R_SERIAL3_CTRL__rec_par_en__BITNR 17
2027#define R_SERIAL3_CTRL__rec_par_en__WIDTH 1
2028#define R_SERIAL3_CTRL__rec_par_en__disable 0
2029#define R_SERIAL3_CTRL__rec_par_en__enable 1
2030#define R_SERIAL3_CTRL__rec_bitnr__BITNR 16
2031#define R_SERIAL3_CTRL__rec_bitnr__WIDTH 1
2032#define R_SERIAL3_CTRL__rec_bitnr__rec_8bit 0
2033#define R_SERIAL3_CTRL__rec_bitnr__rec_7bit 1
2034#define R_SERIAL3_CTRL__txd__BITNR 15
2035#define R_SERIAL3_CTRL__txd__WIDTH 1
2036#define R_SERIAL3_CTRL__tr_enable__BITNR 14
2037#define R_SERIAL3_CTRL__tr_enable__WIDTH 1
2038#define R_SERIAL3_CTRL__tr_enable__disable 0
2039#define R_SERIAL3_CTRL__tr_enable__enable 1
2040#define R_SERIAL3_CTRL__auto_cts__BITNR 13
2041#define R_SERIAL3_CTRL__auto_cts__WIDTH 1
2042#define R_SERIAL3_CTRL__auto_cts__disabled 0
2043#define R_SERIAL3_CTRL__auto_cts__active 1
2044#define R_SERIAL3_CTRL__stop_bits__BITNR 12
2045#define R_SERIAL3_CTRL__stop_bits__WIDTH 1
2046#define R_SERIAL3_CTRL__stop_bits__one_bit 0
2047#define R_SERIAL3_CTRL__stop_bits__two_bits 1
2048#define R_SERIAL3_CTRL__tr_stick_par__BITNR 11
2049#define R_SERIAL3_CTRL__tr_stick_par__WIDTH 1
2050#define R_SERIAL3_CTRL__tr_stick_par__normal 0
2051#define R_SERIAL3_CTRL__tr_stick_par__stick 1
2052#define R_SERIAL3_CTRL__tr_par__BITNR 10
2053#define R_SERIAL3_CTRL__tr_par__WIDTH 1
2054#define R_SERIAL3_CTRL__tr_par__even 0
2055#define R_SERIAL3_CTRL__tr_par__odd 1
2056#define R_SERIAL3_CTRL__tr_par_en__BITNR 9
2057#define R_SERIAL3_CTRL__tr_par_en__WIDTH 1
2058#define R_SERIAL3_CTRL__tr_par_en__disable 0
2059#define R_SERIAL3_CTRL__tr_par_en__enable 1
2060#define R_SERIAL3_CTRL__tr_bitnr__BITNR 8
2061#define R_SERIAL3_CTRL__tr_bitnr__WIDTH 1
2062#define R_SERIAL3_CTRL__tr_bitnr__tr_8bit 0
2063#define R_SERIAL3_CTRL__tr_bitnr__tr_7bit 1
2064#define R_SERIAL3_CTRL__data_out__BITNR 0
2065#define R_SERIAL3_CTRL__data_out__WIDTH 8
2066
2067#define R_SERIAL3_BAUD (IO_TYPECAST_BYTE 0xb000007b)
2068#define R_SERIAL3_BAUD__tr_baud__BITNR 4
2069#define R_SERIAL3_BAUD__tr_baud__WIDTH 4
2070#define R_SERIAL3_BAUD__tr_baud__c300Hz 0
2071#define R_SERIAL3_BAUD__tr_baud__c600Hz 1
2072#define R_SERIAL3_BAUD__tr_baud__c1200Hz 2
2073#define R_SERIAL3_BAUD__tr_baud__c2400Hz 3
2074#define R_SERIAL3_BAUD__tr_baud__c4800Hz 4
2075#define R_SERIAL3_BAUD__tr_baud__c9600Hz 5
2076#define R_SERIAL3_BAUD__tr_baud__c19k2Hz 6
2077#define R_SERIAL3_BAUD__tr_baud__c38k4Hz 7
2078#define R_SERIAL3_BAUD__tr_baud__c57k6Hz 8
2079#define R_SERIAL3_BAUD__tr_baud__c115k2Hz 9
2080#define R_SERIAL3_BAUD__tr_baud__c230k4Hz 10
2081#define R_SERIAL3_BAUD__tr_baud__c460k8Hz 11
2082#define R_SERIAL3_BAUD__tr_baud__c921k6Hz 12
2083#define R_SERIAL3_BAUD__tr_baud__c1843k2Hz 13
2084#define R_SERIAL3_BAUD__tr_baud__c6250kHz 14
2085#define R_SERIAL3_BAUD__tr_baud__reserved 15
2086#define R_SERIAL3_BAUD__rec_baud__BITNR 0
2087#define R_SERIAL3_BAUD__rec_baud__WIDTH 4
2088#define R_SERIAL3_BAUD__rec_baud__c300Hz 0
2089#define R_SERIAL3_BAUD__rec_baud__c600Hz 1
2090#define R_SERIAL3_BAUD__rec_baud__c1200Hz 2
2091#define R_SERIAL3_BAUD__rec_baud__c2400Hz 3
2092#define R_SERIAL3_BAUD__rec_baud__c4800Hz 4
2093#define R_SERIAL3_BAUD__rec_baud__c9600Hz 5
2094#define R_SERIAL3_BAUD__rec_baud__c19k2Hz 6
2095#define R_SERIAL3_BAUD__rec_baud__c38k4Hz 7
2096#define R_SERIAL3_BAUD__rec_baud__c57k6Hz 8
2097#define R_SERIAL3_BAUD__rec_baud__c115k2Hz 9
2098#define R_SERIAL3_BAUD__rec_baud__c230k4Hz 10
2099#define R_SERIAL3_BAUD__rec_baud__c460k8Hz 11
2100#define R_SERIAL3_BAUD__rec_baud__c921k6Hz 12
2101#define R_SERIAL3_BAUD__rec_baud__c1843k2Hz 13
2102#define R_SERIAL3_BAUD__rec_baud__c6250kHz 14
2103#define R_SERIAL3_BAUD__rec_baud__reserved 15
2104
2105#define R_SERIAL3_REC_CTRL (IO_TYPECAST_BYTE 0xb000007a)
2106#define R_SERIAL3_REC_CTRL__dma_err__BITNR 7
2107#define R_SERIAL3_REC_CTRL__dma_err__WIDTH 1
2108#define R_SERIAL3_REC_CTRL__dma_err__stop 0
2109#define R_SERIAL3_REC_CTRL__dma_err__ignore 1
2110#define R_SERIAL3_REC_CTRL__rec_enable__BITNR 6
2111#define R_SERIAL3_REC_CTRL__rec_enable__WIDTH 1
2112#define R_SERIAL3_REC_CTRL__rec_enable__disable 0
2113#define R_SERIAL3_REC_CTRL__rec_enable__enable 1
2114#define R_SERIAL3_REC_CTRL__rts___BITNR 5
2115#define R_SERIAL3_REC_CTRL__rts___WIDTH 1
2116#define R_SERIAL3_REC_CTRL__rts___active 0
2117#define R_SERIAL3_REC_CTRL__rts___inactive 1
2118#define R_SERIAL3_REC_CTRL__sampling__BITNR 4
2119#define R_SERIAL3_REC_CTRL__sampling__WIDTH 1
2120#define R_SERIAL3_REC_CTRL__sampling__middle 0
2121#define R_SERIAL3_REC_CTRL__sampling__majority 1
2122#define R_SERIAL3_REC_CTRL__rec_stick_par__BITNR 3
2123#define R_SERIAL3_REC_CTRL__rec_stick_par__WIDTH 1
2124#define R_SERIAL3_REC_CTRL__rec_stick_par__normal 0
2125#define R_SERIAL3_REC_CTRL__rec_stick_par__stick 1
2126#define R_SERIAL3_REC_CTRL__rec_par__BITNR 2
2127#define R_SERIAL3_REC_CTRL__rec_par__WIDTH 1
2128#define R_SERIAL3_REC_CTRL__rec_par__even 0
2129#define R_SERIAL3_REC_CTRL__rec_par__odd 1
2130#define R_SERIAL3_REC_CTRL__rec_par_en__BITNR 1
2131#define R_SERIAL3_REC_CTRL__rec_par_en__WIDTH 1
2132#define R_SERIAL3_REC_CTRL__rec_par_en__disable 0
2133#define R_SERIAL3_REC_CTRL__rec_par_en__enable 1
2134#define R_SERIAL3_REC_CTRL__rec_bitnr__BITNR 0
2135#define R_SERIAL3_REC_CTRL__rec_bitnr__WIDTH 1
2136#define R_SERIAL3_REC_CTRL__rec_bitnr__rec_8bit 0
2137#define R_SERIAL3_REC_CTRL__rec_bitnr__rec_7bit 1
2138
2139#define R_SERIAL3_TR_CTRL (IO_TYPECAST_BYTE 0xb0000079)
2140#define R_SERIAL3_TR_CTRL__txd__BITNR 7
2141#define R_SERIAL3_TR_CTRL__txd__WIDTH 1
2142#define R_SERIAL3_TR_CTRL__tr_enable__BITNR 6
2143#define R_SERIAL3_TR_CTRL__tr_enable__WIDTH 1
2144#define R_SERIAL3_TR_CTRL__tr_enable__disable 0
2145#define R_SERIAL3_TR_CTRL__tr_enable__enable 1
2146#define R_SERIAL3_TR_CTRL__auto_cts__BITNR 5
2147#define R_SERIAL3_TR_CTRL__auto_cts__WIDTH 1
2148#define R_SERIAL3_TR_CTRL__auto_cts__disabled 0
2149#define R_SERIAL3_TR_CTRL__auto_cts__active 1
2150#define R_SERIAL3_TR_CTRL__stop_bits__BITNR 4
2151#define R_SERIAL3_TR_CTRL__stop_bits__WIDTH 1
2152#define R_SERIAL3_TR_CTRL__stop_bits__one_bit 0
2153#define R_SERIAL3_TR_CTRL__stop_bits__two_bits 1
2154#define R_SERIAL3_TR_CTRL__tr_stick_par__BITNR 3
2155#define R_SERIAL3_TR_CTRL__tr_stick_par__WIDTH 1
2156#define R_SERIAL3_TR_CTRL__tr_stick_par__normal 0
2157#define R_SERIAL3_TR_CTRL__tr_stick_par__stick 1
2158#define R_SERIAL3_TR_CTRL__tr_par__BITNR 2
2159#define R_SERIAL3_TR_CTRL__tr_par__WIDTH 1
2160#define R_SERIAL3_TR_CTRL__tr_par__even 0
2161#define R_SERIAL3_TR_CTRL__tr_par__odd 1
2162#define R_SERIAL3_TR_CTRL__tr_par_en__BITNR 1
2163#define R_SERIAL3_TR_CTRL__tr_par_en__WIDTH 1
2164#define R_SERIAL3_TR_CTRL__tr_par_en__disable 0
2165#define R_SERIAL3_TR_CTRL__tr_par_en__enable 1
2166#define R_SERIAL3_TR_CTRL__tr_bitnr__BITNR 0
2167#define R_SERIAL3_TR_CTRL__tr_bitnr__WIDTH 1
2168#define R_SERIAL3_TR_CTRL__tr_bitnr__tr_8bit 0
2169#define R_SERIAL3_TR_CTRL__tr_bitnr__tr_7bit 1
2170
2171#define R_SERIAL3_TR_DATA (IO_TYPECAST_BYTE 0xb0000078)
2172#define R_SERIAL3_TR_DATA__data_out__BITNR 0
2173#define R_SERIAL3_TR_DATA__data_out__WIDTH 8
2174
2175#define R_SERIAL3_READ (IO_TYPECAST_RO_UDWORD 0xb0000078)
2176#define R_SERIAL3_READ__xoff_detect__BITNR 15
2177#define R_SERIAL3_READ__xoff_detect__WIDTH 1
2178#define R_SERIAL3_READ__xoff_detect__no_xoff 0
2179#define R_SERIAL3_READ__xoff_detect__xoff 1
2180#define R_SERIAL3_READ__cts___BITNR 14
2181#define R_SERIAL3_READ__cts___WIDTH 1
2182#define R_SERIAL3_READ__cts___active 0
2183#define R_SERIAL3_READ__cts___inactive 1
2184#define R_SERIAL3_READ__tr_ready__BITNR 13
2185#define R_SERIAL3_READ__tr_ready__WIDTH 1
2186#define R_SERIAL3_READ__tr_ready__full 0
2187#define R_SERIAL3_READ__tr_ready__ready 1
2188#define R_SERIAL3_READ__rxd__BITNR 12
2189#define R_SERIAL3_READ__rxd__WIDTH 1
2190#define R_SERIAL3_READ__overrun__BITNR 11
2191#define R_SERIAL3_READ__overrun__WIDTH 1
2192#define R_SERIAL3_READ__overrun__no 0
2193#define R_SERIAL3_READ__overrun__yes 1
2194#define R_SERIAL3_READ__par_err__BITNR 10
2195#define R_SERIAL3_READ__par_err__WIDTH 1
2196#define R_SERIAL3_READ__par_err__no 0
2197#define R_SERIAL3_READ__par_err__yes 1
2198#define R_SERIAL3_READ__framing_err__BITNR 9
2199#define R_SERIAL3_READ__framing_err__WIDTH 1
2200#define R_SERIAL3_READ__framing_err__no 0
2201#define R_SERIAL3_READ__framing_err__yes 1
2202#define R_SERIAL3_READ__data_avail__BITNR 8
2203#define R_SERIAL3_READ__data_avail__WIDTH 1
2204#define R_SERIAL3_READ__data_avail__no 0
2205#define R_SERIAL3_READ__data_avail__yes 1
2206#define R_SERIAL3_READ__data_in__BITNR 0
2207#define R_SERIAL3_READ__data_in__WIDTH 8
2208
2209#define R_SERIAL3_STATUS (IO_TYPECAST_RO_BYTE 0xb0000079)
2210#define R_SERIAL3_STATUS__xoff_detect__BITNR 7
2211#define R_SERIAL3_STATUS__xoff_detect__WIDTH 1
2212#define R_SERIAL3_STATUS__xoff_detect__no_xoff 0
2213#define R_SERIAL3_STATUS__xoff_detect__xoff 1
2214#define R_SERIAL3_STATUS__cts___BITNR 6
2215#define R_SERIAL3_STATUS__cts___WIDTH 1
2216#define R_SERIAL3_STATUS__cts___active 0
2217#define R_SERIAL3_STATUS__cts___inactive 1
2218#define R_SERIAL3_STATUS__tr_ready__BITNR 5
2219#define R_SERIAL3_STATUS__tr_ready__WIDTH 1
2220#define R_SERIAL3_STATUS__tr_ready__full 0
2221#define R_SERIAL3_STATUS__tr_ready__ready 1
2222#define R_SERIAL3_STATUS__rxd__BITNR 4
2223#define R_SERIAL3_STATUS__rxd__WIDTH 1
2224#define R_SERIAL3_STATUS__overrun__BITNR 3
2225#define R_SERIAL3_STATUS__overrun__WIDTH 1
2226#define R_SERIAL3_STATUS__overrun__no 0
2227#define R_SERIAL3_STATUS__overrun__yes 1
2228#define R_SERIAL3_STATUS__par_err__BITNR 2
2229#define R_SERIAL3_STATUS__par_err__WIDTH 1
2230#define R_SERIAL3_STATUS__par_err__no 0
2231#define R_SERIAL3_STATUS__par_err__yes 1
2232#define R_SERIAL3_STATUS__framing_err__BITNR 1
2233#define R_SERIAL3_STATUS__framing_err__WIDTH 1
2234#define R_SERIAL3_STATUS__framing_err__no 0
2235#define R_SERIAL3_STATUS__framing_err__yes 1
2236#define R_SERIAL3_STATUS__data_avail__BITNR 0
2237#define R_SERIAL3_STATUS__data_avail__WIDTH 1
2238#define R_SERIAL3_STATUS__data_avail__no 0
2239#define R_SERIAL3_STATUS__data_avail__yes 1
2240
2241#define R_SERIAL3_REC_DATA (IO_TYPECAST_RO_BYTE 0xb0000078)
2242#define R_SERIAL3_REC_DATA__data_in__BITNR 0
2243#define R_SERIAL3_REC_DATA__data_in__WIDTH 8
2244
2245#define R_SERIAL3_XOFF (IO_TYPECAST_UDWORD 0xb000007c)
2246#define R_SERIAL3_XOFF__tx_stop__BITNR 9
2247#define R_SERIAL3_XOFF__tx_stop__WIDTH 1
2248#define R_SERIAL3_XOFF__tx_stop__enable 0
2249#define R_SERIAL3_XOFF__tx_stop__stop 1
2250#define R_SERIAL3_XOFF__auto_xoff__BITNR 8
2251#define R_SERIAL3_XOFF__auto_xoff__WIDTH 1
2252#define R_SERIAL3_XOFF__auto_xoff__disable 0
2253#define R_SERIAL3_XOFF__auto_xoff__enable 1
2254#define R_SERIAL3_XOFF__xoff_char__BITNR 0
2255#define R_SERIAL3_XOFF__xoff_char__WIDTH 8
2256
2257#define R_ALT_SER_BAUDRATE (IO_TYPECAST_UDWORD 0xb000005c)
2258#define R_ALT_SER_BAUDRATE__ser3_tr__BITNR 28
2259#define R_ALT_SER_BAUDRATE__ser3_tr__WIDTH 2
2260#define R_ALT_SER_BAUDRATE__ser3_tr__normal 0
2261#define R_ALT_SER_BAUDRATE__ser3_tr__prescale 1
2262#define R_ALT_SER_BAUDRATE__ser3_tr__extern 2
2263#define R_ALT_SER_BAUDRATE__ser3_tr__timer 3
2264#define R_ALT_SER_BAUDRATE__ser3_rec__BITNR 24
2265#define R_ALT_SER_BAUDRATE__ser3_rec__WIDTH 2
2266#define R_ALT_SER_BAUDRATE__ser3_rec__normal 0
2267#define R_ALT_SER_BAUDRATE__ser3_rec__prescale 1
2268#define R_ALT_SER_BAUDRATE__ser3_rec__extern 2
2269#define R_ALT_SER_BAUDRATE__ser3_rec__timer 3
2270#define R_ALT_SER_BAUDRATE__ser2_tr__BITNR 20
2271#define R_ALT_SER_BAUDRATE__ser2_tr__WIDTH 2
2272#define R_ALT_SER_BAUDRATE__ser2_tr__normal 0
2273#define R_ALT_SER_BAUDRATE__ser2_tr__prescale 1
2274#define R_ALT_SER_BAUDRATE__ser2_tr__extern 2
2275#define R_ALT_SER_BAUDRATE__ser2_tr__timer 3
2276#define R_ALT_SER_BAUDRATE__ser2_rec__BITNR 16
2277#define R_ALT_SER_BAUDRATE__ser2_rec__WIDTH 2
2278#define R_ALT_SER_BAUDRATE__ser2_rec__normal 0
2279#define R_ALT_SER_BAUDRATE__ser2_rec__prescale 1
2280#define R_ALT_SER_BAUDRATE__ser2_rec__extern 2
2281#define R_ALT_SER_BAUDRATE__ser2_rec__timer 3
2282#define R_ALT_SER_BAUDRATE__ser1_tr__BITNR 12
2283#define R_ALT_SER_BAUDRATE__ser1_tr__WIDTH 2
2284#define R_ALT_SER_BAUDRATE__ser1_tr__normal 0
2285#define R_ALT_SER_BAUDRATE__ser1_tr__prescale 1
2286#define R_ALT_SER_BAUDRATE__ser1_tr__extern 2
2287#define R_ALT_SER_BAUDRATE__ser1_tr__timer 3
2288#define R_ALT_SER_BAUDRATE__ser1_rec__BITNR 8
2289#define R_ALT_SER_BAUDRATE__ser1_rec__WIDTH 2
2290#define R_ALT_SER_BAUDRATE__ser1_rec__normal 0
2291#define R_ALT_SER_BAUDRATE__ser1_rec__prescale 1
2292#define R_ALT_SER_BAUDRATE__ser1_rec__extern 2
2293#define R_ALT_SER_BAUDRATE__ser1_rec__timer 3
2294#define R_ALT_SER_BAUDRATE__ser0_tr__BITNR 4
2295#define R_ALT_SER_BAUDRATE__ser0_tr__WIDTH 2
2296#define R_ALT_SER_BAUDRATE__ser0_tr__normal 0
2297#define R_ALT_SER_BAUDRATE__ser0_tr__prescale 1
2298#define R_ALT_SER_BAUDRATE__ser0_tr__extern 2
2299#define R_ALT_SER_BAUDRATE__ser0_tr__timer 3
2300#define R_ALT_SER_BAUDRATE__ser0_rec__BITNR 0
2301#define R_ALT_SER_BAUDRATE__ser0_rec__WIDTH 2
2302#define R_ALT_SER_BAUDRATE__ser0_rec__normal 0
2303#define R_ALT_SER_BAUDRATE__ser0_rec__prescale 1
2304#define R_ALT_SER_BAUDRATE__ser0_rec__extern 2
2305#define R_ALT_SER_BAUDRATE__ser0_rec__timer 3
2306
2307/*
2308!* Network interface registers
2309!*/
2310
2311#define R_NETWORK_SA_0 (IO_TYPECAST_UDWORD 0xb0000080)
2312#define R_NETWORK_SA_0__ma0_low__BITNR 0
2313#define R_NETWORK_SA_0__ma0_low__WIDTH 32
2314
2315#define R_NETWORK_SA_1 (IO_TYPECAST_UDWORD 0xb0000084)
2316#define R_NETWORK_SA_1__ma1_low__BITNR 16
2317#define R_NETWORK_SA_1__ma1_low__WIDTH 16
2318#define R_NETWORK_SA_1__ma0_high__BITNR 0
2319#define R_NETWORK_SA_1__ma0_high__WIDTH 16
2320
2321#define R_NETWORK_SA_2 (IO_TYPECAST_UDWORD 0xb0000088)
2322#define R_NETWORK_SA_2__ma1_high__BITNR 0
2323#define R_NETWORK_SA_2__ma1_high__WIDTH 32
2324
2325#define R_NETWORK_GA_0 (IO_TYPECAST_UDWORD 0xb000008c)
2326#define R_NETWORK_GA_0__ga_low__BITNR 0
2327#define R_NETWORK_GA_0__ga_low__WIDTH 32
2328
2329#define R_NETWORK_GA_1 (IO_TYPECAST_UDWORD 0xb0000090)
2330#define R_NETWORK_GA_1__ga_high__BITNR 0
2331#define R_NETWORK_GA_1__ga_high__WIDTH 32
2332
2333#define R_NETWORK_REC_CONFIG (IO_TYPECAST_UDWORD 0xb0000094)
2334#define R_NETWORK_REC_CONFIG__max_size__BITNR 10
2335#define R_NETWORK_REC_CONFIG__max_size__WIDTH 1
2336#define R_NETWORK_REC_CONFIG__max_size__size1518 0
2337#define R_NETWORK_REC_CONFIG__max_size__size1522 1
2338#define R_NETWORK_REC_CONFIG__duplex__BITNR 9
2339#define R_NETWORK_REC_CONFIG__duplex__WIDTH 1
2340#define R_NETWORK_REC_CONFIG__duplex__full 1
2341#define R_NETWORK_REC_CONFIG__duplex__half 0
2342#define R_NETWORK_REC_CONFIG__bad_crc__BITNR 8
2343#define R_NETWORK_REC_CONFIG__bad_crc__WIDTH 1
2344#define R_NETWORK_REC_CONFIG__bad_crc__receive 1
2345#define R_NETWORK_REC_CONFIG__bad_crc__discard 0
2346#define R_NETWORK_REC_CONFIG__oversize__BITNR 7
2347#define R_NETWORK_REC_CONFIG__oversize__WIDTH 1
2348#define R_NETWORK_REC_CONFIG__oversize__receive 1
2349#define R_NETWORK_REC_CONFIG__oversize__discard 0
2350#define R_NETWORK_REC_CONFIG__undersize__BITNR 6
2351#define R_NETWORK_REC_CONFIG__undersize__WIDTH 1
2352#define R_NETWORK_REC_CONFIG__undersize__receive 1
2353#define R_NETWORK_REC_CONFIG__undersize__discard 0
2354#define R_NETWORK_REC_CONFIG__all_roots__BITNR 5
2355#define R_NETWORK_REC_CONFIG__all_roots__WIDTH 1
2356#define R_NETWORK_REC_CONFIG__all_roots__receive 1
2357#define R_NETWORK_REC_CONFIG__all_roots__discard 0
2358#define R_NETWORK_REC_CONFIG__tr_broadcast__BITNR 4
2359#define R_NETWORK_REC_CONFIG__tr_broadcast__WIDTH 1
2360#define R_NETWORK_REC_CONFIG__tr_broadcast__receive 1
2361#define R_NETWORK_REC_CONFIG__tr_broadcast__discard 0
2362#define R_NETWORK_REC_CONFIG__broadcast__BITNR 3
2363#define R_NETWORK_REC_CONFIG__broadcast__WIDTH 1
2364#define R_NETWORK_REC_CONFIG__broadcast__receive 1
2365#define R_NETWORK_REC_CONFIG__broadcast__discard 0
2366#define R_NETWORK_REC_CONFIG__individual__BITNR 2
2367#define R_NETWORK_REC_CONFIG__individual__WIDTH 1
2368#define R_NETWORK_REC_CONFIG__individual__receive 1
2369#define R_NETWORK_REC_CONFIG__individual__discard 0
2370#define R_NETWORK_REC_CONFIG__ma1__BITNR 1
2371#define R_NETWORK_REC_CONFIG__ma1__WIDTH 1
2372#define R_NETWORK_REC_CONFIG__ma1__enable 1
2373#define R_NETWORK_REC_CONFIG__ma1__disable 0
2374#define R_NETWORK_REC_CONFIG__ma0__BITNR 0
2375#define R_NETWORK_REC_CONFIG__ma0__WIDTH 1
2376#define R_NETWORK_REC_CONFIG__ma0__enable 1
2377#define R_NETWORK_REC_CONFIG__ma0__disable 0
2378
2379#define R_NETWORK_GEN_CONFIG (IO_TYPECAST_UDWORD 0xb0000098)
2380#define R_NETWORK_GEN_CONFIG__loopback__BITNR 5
2381#define R_NETWORK_GEN_CONFIG__loopback__WIDTH 1
2382#define R_NETWORK_GEN_CONFIG__loopback__on 1
2383#define R_NETWORK_GEN_CONFIG__loopback__off 0
2384#define R_NETWORK_GEN_CONFIG__frame__BITNR 4
2385#define R_NETWORK_GEN_CONFIG__frame__WIDTH 1
2386#define R_NETWORK_GEN_CONFIG__frame__tokenr 1
2387#define R_NETWORK_GEN_CONFIG__frame__ether 0
2388#define R_NETWORK_GEN_CONFIG__vg__BITNR 3
2389#define R_NETWORK_GEN_CONFIG__vg__WIDTH 1
2390#define R_NETWORK_GEN_CONFIG__vg__on 1
2391#define R_NETWORK_GEN_CONFIG__vg__off 0
2392#define R_NETWORK_GEN_CONFIG__phy__BITNR 1
2393#define R_NETWORK_GEN_CONFIG__phy__WIDTH 2
2394#define R_NETWORK_GEN_CONFIG__phy__sni 0
2395#define R_NETWORK_GEN_CONFIG__phy__mii_clk 1
2396#define R_NETWORK_GEN_CONFIG__phy__mii_err 2
2397#define R_NETWORK_GEN_CONFIG__phy__mii_req 3
2398#define R_NETWORK_GEN_CONFIG__enable__BITNR 0
2399#define R_NETWORK_GEN_CONFIG__enable__WIDTH 1
2400#define R_NETWORK_GEN_CONFIG__enable__on 1
2401#define R_NETWORK_GEN_CONFIG__enable__off 0
2402
2403#define R_NETWORK_TR_CTRL (IO_TYPECAST_UDWORD 0xb000009c)
2404#define R_NETWORK_TR_CTRL__clr_error__BITNR 8
2405#define R_NETWORK_TR_CTRL__clr_error__WIDTH 1
2406#define R_NETWORK_TR_CTRL__clr_error__clr 1
2407#define R_NETWORK_TR_CTRL__clr_error__nop 0
2408#define R_NETWORK_TR_CTRL__delay__BITNR 5
2409#define R_NETWORK_TR_CTRL__delay__WIDTH 1
2410#define R_NETWORK_TR_CTRL__delay__d2us 1
2411#define R_NETWORK_TR_CTRL__delay__none 0
2412#define R_NETWORK_TR_CTRL__cancel__BITNR 4
2413#define R_NETWORK_TR_CTRL__cancel__WIDTH 1
2414#define R_NETWORK_TR_CTRL__cancel__do 1
2415#define R_NETWORK_TR_CTRL__cancel__dont 0
2416#define R_NETWORK_TR_CTRL__cd__BITNR 3
2417#define R_NETWORK_TR_CTRL__cd__WIDTH 1
2418#define R_NETWORK_TR_CTRL__cd__enable 0
2419#define R_NETWORK_TR_CTRL__cd__disable 1
2420#define R_NETWORK_TR_CTRL__cd__ack_col 0
2421#define R_NETWORK_TR_CTRL__cd__ack_crs 1
2422#define R_NETWORK_TR_CTRL__retry__BITNR 2
2423#define R_NETWORK_TR_CTRL__retry__WIDTH 1
2424#define R_NETWORK_TR_CTRL__retry__enable 0
2425#define R_NETWORK_TR_CTRL__retry__disable 1
2426#define R_NETWORK_TR_CTRL__pad__BITNR 1
2427#define R_NETWORK_TR_CTRL__pad__WIDTH 1
2428#define R_NETWORK_TR_CTRL__pad__enable 1
2429#define R_NETWORK_TR_CTRL__pad__disable 0
2430#define R_NETWORK_TR_CTRL__crc__BITNR 0
2431#define R_NETWORK_TR_CTRL__crc__WIDTH 1
2432#define R_NETWORK_TR_CTRL__crc__enable 0
2433#define R_NETWORK_TR_CTRL__crc__disable 1
2434
2435#define R_NETWORK_MGM_CTRL (IO_TYPECAST_UDWORD 0xb00000a0)
2436#define R_NETWORK_MGM_CTRL__txd_pins__BITNR 4
2437#define R_NETWORK_MGM_CTRL__txd_pins__WIDTH 4
2438#define R_NETWORK_MGM_CTRL__txer_pin__BITNR 3
2439#define R_NETWORK_MGM_CTRL__txer_pin__WIDTH 1
2440#define R_NETWORK_MGM_CTRL__mdck__BITNR 2
2441#define R_NETWORK_MGM_CTRL__mdck__WIDTH 1
2442#define R_NETWORK_MGM_CTRL__mdoe__BITNR 1
2443#define R_NETWORK_MGM_CTRL__mdoe__WIDTH 1
2444#define R_NETWORK_MGM_CTRL__mdoe__enable 1
2445#define R_NETWORK_MGM_CTRL__mdoe__disable 0
2446#define R_NETWORK_MGM_CTRL__mdio__BITNR 0
2447#define R_NETWORK_MGM_CTRL__mdio__WIDTH 1
2448
2449#define R_NETWORK_STAT (IO_TYPECAST_RO_UDWORD 0xb00000a0)
2450#define R_NETWORK_STAT__rxd_pins__BITNR 4
2451#define R_NETWORK_STAT__rxd_pins__WIDTH 4
2452#define R_NETWORK_STAT__rxer__BITNR 3
2453#define R_NETWORK_STAT__rxer__WIDTH 1
2454#define R_NETWORK_STAT__underrun__BITNR 2
2455#define R_NETWORK_STAT__underrun__WIDTH 1
2456#define R_NETWORK_STAT__underrun__yes 1
2457#define R_NETWORK_STAT__underrun__no 0
2458#define R_NETWORK_STAT__exc_col__BITNR 1
2459#define R_NETWORK_STAT__exc_col__WIDTH 1
2460#define R_NETWORK_STAT__exc_col__yes 1
2461#define R_NETWORK_STAT__exc_col__no 0
2462#define R_NETWORK_STAT__mdio__BITNR 0
2463#define R_NETWORK_STAT__mdio__WIDTH 1
2464
2465#define R_REC_COUNTERS (IO_TYPECAST_RO_UDWORD 0xb00000a4)
2466#define R_REC_COUNTERS__congestion__BITNR 24
2467#define R_REC_COUNTERS__congestion__WIDTH 8
2468#define R_REC_COUNTERS__oversize__BITNR 16
2469#define R_REC_COUNTERS__oversize__WIDTH 8
2470#define R_REC_COUNTERS__alignment_error__BITNR 8
2471#define R_REC_COUNTERS__alignment_error__WIDTH 8
2472#define R_REC_COUNTERS__crc_error__BITNR 0
2473#define R_REC_COUNTERS__crc_error__WIDTH 8
2474
2475#define R_TR_COUNTERS (IO_TYPECAST_RO_UDWORD 0xb00000a8)
2476#define R_TR_COUNTERS__deferred__BITNR 24
2477#define R_TR_COUNTERS__deferred__WIDTH 8
2478#define R_TR_COUNTERS__late_col__BITNR 16
2479#define R_TR_COUNTERS__late_col__WIDTH 8
2480#define R_TR_COUNTERS__multiple_col__BITNR 8
2481#define R_TR_COUNTERS__multiple_col__WIDTH 8
2482#define R_TR_COUNTERS__single_col__BITNR 0
2483#define R_TR_COUNTERS__single_col__WIDTH 8
2484
2485#define R_PHY_COUNTERS (IO_TYPECAST_RO_UDWORD 0xb00000ac)
2486#define R_PHY_COUNTERS__sqe_test_error__BITNR 8
2487#define R_PHY_COUNTERS__sqe_test_error__WIDTH 8
2488#define R_PHY_COUNTERS__carrier_loss__BITNR 0
2489#define R_PHY_COUNTERS__carrier_loss__WIDTH 8
2490
2491/*
2492!* Parallel printer port registers
2493!*/
2494
2495#define R_PAR0_CTRL_DATA (IO_TYPECAST_UDWORD 0xb0000040)
2496#define R_PAR0_CTRL_DATA__peri_int__BITNR 24
2497#define R_PAR0_CTRL_DATA__peri_int__WIDTH 1
2498#define R_PAR0_CTRL_DATA__peri_int__ack 1
2499#define R_PAR0_CTRL_DATA__peri_int__nop 0
2500#define R_PAR0_CTRL_DATA__oe__BITNR 20
2501#define R_PAR0_CTRL_DATA__oe__WIDTH 1
2502#define R_PAR0_CTRL_DATA__oe__enable 1
2503#define R_PAR0_CTRL_DATA__oe__disable 0
2504#define R_PAR0_CTRL_DATA__seli__BITNR 19
2505#define R_PAR0_CTRL_DATA__seli__WIDTH 1
2506#define R_PAR0_CTRL_DATA__seli__active 1
2507#define R_PAR0_CTRL_DATA__seli__inactive 0
2508#define R_PAR0_CTRL_DATA__autofd__BITNR 18
2509#define R_PAR0_CTRL_DATA__autofd__WIDTH 1
2510#define R_PAR0_CTRL_DATA__autofd__active 1
2511#define R_PAR0_CTRL_DATA__autofd__inactive 0
2512#define R_PAR0_CTRL_DATA__strb__BITNR 17
2513#define R_PAR0_CTRL_DATA__strb__WIDTH 1
2514#define R_PAR0_CTRL_DATA__strb__active 1
2515#define R_PAR0_CTRL_DATA__strb__inactive 0
2516#define R_PAR0_CTRL_DATA__init__BITNR 16
2517#define R_PAR0_CTRL_DATA__init__WIDTH 1
2518#define R_PAR0_CTRL_DATA__init__active 1
2519#define R_PAR0_CTRL_DATA__init__inactive 0
2520#define R_PAR0_CTRL_DATA__ecp_cmd__BITNR 8
2521#define R_PAR0_CTRL_DATA__ecp_cmd__WIDTH 1
2522#define R_PAR0_CTRL_DATA__ecp_cmd__command 1
2523#define R_PAR0_CTRL_DATA__ecp_cmd__data 0
2524#define R_PAR0_CTRL_DATA__data__BITNR 0
2525#define R_PAR0_CTRL_DATA__data__WIDTH 8
2526
2527#define R_PAR0_CTRL (IO_TYPECAST_BYTE 0xb0000042)
2528#define R_PAR0_CTRL__ctrl__BITNR 0
2529#define R_PAR0_CTRL__ctrl__WIDTH 5
2530
2531#define R_PAR0_STATUS_DATA (IO_TYPECAST_RO_UDWORD 0xb0000040)
2532#define R_PAR0_STATUS_DATA__mode__BITNR 29
2533#define R_PAR0_STATUS_DATA__mode__WIDTH 3
2534#define R_PAR0_STATUS_DATA__mode__manual 0
2535#define R_PAR0_STATUS_DATA__mode__centronics 1
2536#define R_PAR0_STATUS_DATA__mode__fastbyte 2
2537#define R_PAR0_STATUS_DATA__mode__nibble 3
2538#define R_PAR0_STATUS_DATA__mode__byte 4
2539#define R_PAR0_STATUS_DATA__mode__ecp_fwd 5
2540#define R_PAR0_STATUS_DATA__mode__ecp_rev 6
2541#define R_PAR0_STATUS_DATA__mode__off 7
2542#define R_PAR0_STATUS_DATA__mode__epp_wr1 5
2543#define R_PAR0_STATUS_DATA__mode__epp_wr2 6
2544#define R_PAR0_STATUS_DATA__mode__epp_wr3 7
2545#define R_PAR0_STATUS_DATA__mode__epp_rd 0
2546#define R_PAR0_STATUS_DATA__perr__BITNR 28
2547#define R_PAR0_STATUS_DATA__perr__WIDTH 1
2548#define R_PAR0_STATUS_DATA__perr__active 1
2549#define R_PAR0_STATUS_DATA__perr__inactive 0
2550#define R_PAR0_STATUS_DATA__ack__BITNR 27
2551#define R_PAR0_STATUS_DATA__ack__WIDTH 1
2552#define R_PAR0_STATUS_DATA__ack__active 0
2553#define R_PAR0_STATUS_DATA__ack__inactive 1
2554#define R_PAR0_STATUS_DATA__busy__BITNR 26
2555#define R_PAR0_STATUS_DATA__busy__WIDTH 1
2556#define R_PAR0_STATUS_DATA__busy__active 1
2557#define R_PAR0_STATUS_DATA__busy__inactive 0
2558#define R_PAR0_STATUS_DATA__fault__BITNR 25
2559#define R_PAR0_STATUS_DATA__fault__WIDTH 1
2560#define R_PAR0_STATUS_DATA__fault__active 0
2561#define R_PAR0_STATUS_DATA__fault__inactive 1
2562#define R_PAR0_STATUS_DATA__sel__BITNR 24
2563#define R_PAR0_STATUS_DATA__sel__WIDTH 1
2564#define R_PAR0_STATUS_DATA__sel__active 1
2565#define R_PAR0_STATUS_DATA__sel__inactive 0
2566#define R_PAR0_STATUS_DATA__ext_mode__BITNR 23
2567#define R_PAR0_STATUS_DATA__ext_mode__WIDTH 1
2568#define R_PAR0_STATUS_DATA__ext_mode__enable 1
2569#define R_PAR0_STATUS_DATA__ext_mode__disable 0
2570#define R_PAR0_STATUS_DATA__ecp_16__BITNR 22
2571#define R_PAR0_STATUS_DATA__ecp_16__WIDTH 1
2572#define R_PAR0_STATUS_DATA__ecp_16__active 1
2573#define R_PAR0_STATUS_DATA__ecp_16__inactive 0
2574#define R_PAR0_STATUS_DATA__tr_rdy__BITNR 17
2575#define R_PAR0_STATUS_DATA__tr_rdy__WIDTH 1
2576#define R_PAR0_STATUS_DATA__tr_rdy__ready 1
2577#define R_PAR0_STATUS_DATA__tr_rdy__busy 0
2578#define R_PAR0_STATUS_DATA__dav__BITNR 16
2579#define R_PAR0_STATUS_DATA__dav__WIDTH 1
2580#define R_PAR0_STATUS_DATA__dav__data 1
2581#define R_PAR0_STATUS_DATA__dav__nodata 0
2582#define R_PAR0_STATUS_DATA__ecp_cmd__BITNR 8
2583#define R_PAR0_STATUS_DATA__ecp_cmd__WIDTH 1
2584#define R_PAR0_STATUS_DATA__ecp_cmd__command 1
2585#define R_PAR0_STATUS_DATA__ecp_cmd__data 0
2586#define R_PAR0_STATUS_DATA__data__BITNR 0
2587#define R_PAR0_STATUS_DATA__data__WIDTH 8
2588
2589#define R_PAR0_STATUS (IO_TYPECAST_RO_UWORD 0xb0000042)
2590#define R_PAR0_STATUS__mode__BITNR 13
2591#define R_PAR0_STATUS__mode__WIDTH 3
2592#define R_PAR0_STATUS__mode__manual 0
2593#define R_PAR0_STATUS__mode__centronics 1
2594#define R_PAR0_STATUS__mode__fastbyte 2
2595#define R_PAR0_STATUS__mode__nibble 3
2596#define R_PAR0_STATUS__mode__byte 4
2597#define R_PAR0_STATUS__mode__ecp_fwd 5
2598#define R_PAR0_STATUS__mode__ecp_rev 6
2599#define R_PAR0_STATUS__mode__off 7
2600#define R_PAR0_STATUS__mode__epp_wr1 5
2601#define R_PAR0_STATUS__mode__epp_wr2 6
2602#define R_PAR0_STATUS__mode__epp_wr3 7
2603#define R_PAR0_STATUS__mode__epp_rd 0
2604#define R_PAR0_STATUS__perr__BITNR 12
2605#define R_PAR0_STATUS__perr__WIDTH 1
2606#define R_PAR0_STATUS__perr__active 1
2607#define R_PAR0_STATUS__perr__inactive 0
2608#define R_PAR0_STATUS__ack__BITNR 11
2609#define R_PAR0_STATUS__ack__WIDTH 1
2610#define R_PAR0_STATUS__ack__active 0
2611#define R_PAR0_STATUS__ack__inactive 1
2612#define R_PAR0_STATUS__busy__BITNR 10
2613#define R_PAR0_STATUS__busy__WIDTH 1
2614#define R_PAR0_STATUS__busy__active 1
2615#define R_PAR0_STATUS__busy__inactive 0
2616#define R_PAR0_STATUS__fault__BITNR 9
2617#define R_PAR0_STATUS__fault__WIDTH 1
2618#define R_PAR0_STATUS__fault__active 0
2619#define R_PAR0_STATUS__fault__inactive 1
2620#define R_PAR0_STATUS__sel__BITNR 8
2621#define R_PAR0_STATUS__sel__WIDTH 1
2622#define R_PAR0_STATUS__sel__active 1
2623#define R_PAR0_STATUS__sel__inactive 0
2624#define R_PAR0_STATUS__ext_mode__BITNR 7
2625#define R_PAR0_STATUS__ext_mode__WIDTH 1
2626#define R_PAR0_STATUS__ext_mode__enable 1
2627#define R_PAR0_STATUS__ext_mode__disable 0
2628#define R_PAR0_STATUS__ecp_16__BITNR 6
2629#define R_PAR0_STATUS__ecp_16__WIDTH 1
2630#define R_PAR0_STATUS__ecp_16__active 1
2631#define R_PAR0_STATUS__ecp_16__inactive 0
2632#define R_PAR0_STATUS__tr_rdy__BITNR 1
2633#define R_PAR0_STATUS__tr_rdy__WIDTH 1
2634#define R_PAR0_STATUS__tr_rdy__ready 1
2635#define R_PAR0_STATUS__tr_rdy__busy 0
2636#define R_PAR0_STATUS__dav__BITNR 0
2637#define R_PAR0_STATUS__dav__WIDTH 1
2638#define R_PAR0_STATUS__dav__data 1
2639#define R_PAR0_STATUS__dav__nodata 0
2640
2641#define R_PAR_ECP16_DATA (IO_TYPECAST_UWORD 0xb0000040)
2642#define R_PAR_ECP16_DATA__data__BITNR 0
2643#define R_PAR_ECP16_DATA__data__WIDTH 16
2644
2645#define R_PAR0_CONFIG (IO_TYPECAST_UDWORD 0xb0000044)
2646#define R_PAR0_CONFIG__ioe__BITNR 25
2647#define R_PAR0_CONFIG__ioe__WIDTH 1
2648#define R_PAR0_CONFIG__ioe__inv 1
2649#define R_PAR0_CONFIG__ioe__noninv 0
2650#define R_PAR0_CONFIG__iseli__BITNR 24
2651#define R_PAR0_CONFIG__iseli__WIDTH 1
2652#define R_PAR0_CONFIG__iseli__inv 1
2653#define R_PAR0_CONFIG__iseli__noninv 0
2654#define R_PAR0_CONFIG__iautofd__BITNR 23
2655#define R_PAR0_CONFIG__iautofd__WIDTH 1
2656#define R_PAR0_CONFIG__iautofd__inv 1
2657#define R_PAR0_CONFIG__iautofd__noninv 0
2658#define R_PAR0_CONFIG__istrb__BITNR 22
2659#define R_PAR0_CONFIG__istrb__WIDTH 1
2660#define R_PAR0_CONFIG__istrb__inv 1
2661#define R_PAR0_CONFIG__istrb__noninv 0
2662#define R_PAR0_CONFIG__iinit__BITNR 21
2663#define R_PAR0_CONFIG__iinit__WIDTH 1
2664#define R_PAR0_CONFIG__iinit__inv 1
2665#define R_PAR0_CONFIG__iinit__noninv 0
2666#define R_PAR0_CONFIG__iperr__BITNR 20
2667#define R_PAR0_CONFIG__iperr__WIDTH 1
2668#define R_PAR0_CONFIG__iperr__inv 1
2669#define R_PAR0_CONFIG__iperr__noninv 0
2670#define R_PAR0_CONFIG__iack__BITNR 19
2671#define R_PAR0_CONFIG__iack__WIDTH 1
2672#define R_PAR0_CONFIG__iack__inv 1
2673#define R_PAR0_CONFIG__iack__noninv 0
2674#define R_PAR0_CONFIG__ibusy__BITNR 18
2675#define R_PAR0_CONFIG__ibusy__WIDTH 1
2676#define R_PAR0_CONFIG__ibusy__inv 1
2677#define R_PAR0_CONFIG__ibusy__noninv 0
2678#define R_PAR0_CONFIG__ifault__BITNR 17
2679#define R_PAR0_CONFIG__ifault__WIDTH 1
2680#define R_PAR0_CONFIG__ifault__inv 1
2681#define R_PAR0_CONFIG__ifault__noninv 0
2682#define R_PAR0_CONFIG__isel__BITNR 16
2683#define R_PAR0_CONFIG__isel__WIDTH 1
2684#define R_PAR0_CONFIG__isel__inv 1
2685#define R_PAR0_CONFIG__isel__noninv 0
2686#define R_PAR0_CONFIG__ext_mode__BITNR 11
2687#define R_PAR0_CONFIG__ext_mode__WIDTH 1
2688#define R_PAR0_CONFIG__ext_mode__enable 1
2689#define R_PAR0_CONFIG__ext_mode__disable 0
2690#define R_PAR0_CONFIG__wide__BITNR 10
2691#define R_PAR0_CONFIG__wide__WIDTH 1
2692#define R_PAR0_CONFIG__wide__enable 1
2693#define R_PAR0_CONFIG__wide__disable 0
2694#define R_PAR0_CONFIG__dma__BITNR 9
2695#define R_PAR0_CONFIG__dma__WIDTH 1
2696#define R_PAR0_CONFIG__dma__enable 1
2697#define R_PAR0_CONFIG__dma__disable 0
2698#define R_PAR0_CONFIG__rle_in__BITNR 8
2699#define R_PAR0_CONFIG__rle_in__WIDTH 1
2700#define R_PAR0_CONFIG__rle_in__enable 1
2701#define R_PAR0_CONFIG__rle_in__disable 0
2702#define R_PAR0_CONFIG__rle_out__BITNR 7
2703#define R_PAR0_CONFIG__rle_out__WIDTH 1
2704#define R_PAR0_CONFIG__rle_out__enable 1
2705#define R_PAR0_CONFIG__rle_out__disable 0
2706#define R_PAR0_CONFIG__enable__BITNR 6
2707#define R_PAR0_CONFIG__enable__WIDTH 1
2708#define R_PAR0_CONFIG__enable__on 1
2709#define R_PAR0_CONFIG__enable__reset 0
2710#define R_PAR0_CONFIG__force__BITNR 5
2711#define R_PAR0_CONFIG__force__WIDTH 1
2712#define R_PAR0_CONFIG__force__on 1
2713#define R_PAR0_CONFIG__force__off 0
2714#define R_PAR0_CONFIG__ign_ack__BITNR 4
2715#define R_PAR0_CONFIG__ign_ack__WIDTH 1
2716#define R_PAR0_CONFIG__ign_ack__ignore 1
2717#define R_PAR0_CONFIG__ign_ack__wait 0
2718#define R_PAR0_CONFIG__oe_ack__BITNR 3
2719#define R_PAR0_CONFIG__oe_ack__WIDTH 1
2720#define R_PAR0_CONFIG__oe_ack__wait_oe 1
2721#define R_PAR0_CONFIG__oe_ack__dont_wait 0
2722#define R_PAR0_CONFIG__oe_ack__epp_addr 1
2723#define R_PAR0_CONFIG__oe_ack__epp_data 0
2724#define R_PAR0_CONFIG__epp_addr_data__BITNR 3
2725#define R_PAR0_CONFIG__epp_addr_data__WIDTH 1
2726#define R_PAR0_CONFIG__epp_addr_data__wait_oe 1
2727#define R_PAR0_CONFIG__epp_addr_data__dont_wait 0
2728#define R_PAR0_CONFIG__epp_addr_data__epp_addr 1
2729#define R_PAR0_CONFIG__epp_addr_data__epp_data 0
2730#define R_PAR0_CONFIG__mode__BITNR 0
2731#define R_PAR0_CONFIG__mode__WIDTH 3
2732#define R_PAR0_CONFIG__mode__manual 0
2733#define R_PAR0_CONFIG__mode__centronics 1
2734#define R_PAR0_CONFIG__mode__fastbyte 2
2735#define R_PAR0_CONFIG__mode__nibble 3
2736#define R_PAR0_CONFIG__mode__byte 4
2737#define R_PAR0_CONFIG__mode__ecp_fwd 5
2738#define R_PAR0_CONFIG__mode__ecp_rev 6
2739#define R_PAR0_CONFIG__mode__off 7
2740#define R_PAR0_CONFIG__mode__epp_wr1 5
2741#define R_PAR0_CONFIG__mode__epp_wr2 6
2742#define R_PAR0_CONFIG__mode__epp_wr3 7
2743#define R_PAR0_CONFIG__mode__epp_rd 0
2744
2745#define R_PAR0_DELAY (IO_TYPECAST_UDWORD 0xb0000048)
2746#define R_PAR0_DELAY__fine_hold__BITNR 21
2747#define R_PAR0_DELAY__fine_hold__WIDTH 3
2748#define R_PAR0_DELAY__hold__BITNR 16
2749#define R_PAR0_DELAY__hold__WIDTH 5
2750#define R_PAR0_DELAY__fine_strb__BITNR 13
2751#define R_PAR0_DELAY__fine_strb__WIDTH 3
2752#define R_PAR0_DELAY__strobe__BITNR 8
2753#define R_PAR0_DELAY__strobe__WIDTH 5
2754#define R_PAR0_DELAY__fine_setup__BITNR 5
2755#define R_PAR0_DELAY__fine_setup__WIDTH 3
2756#define R_PAR0_DELAY__setup__BITNR 0
2757#define R_PAR0_DELAY__setup__WIDTH 5
2758
2759#define R_PAR1_CTRL_DATA (IO_TYPECAST_UDWORD 0xb0000050)
2760#define R_PAR1_CTRL_DATA__peri_int__BITNR 24
2761#define R_PAR1_CTRL_DATA__peri_int__WIDTH 1
2762#define R_PAR1_CTRL_DATA__peri_int__ack 1
2763#define R_PAR1_CTRL_DATA__peri_int__nop 0
2764#define R_PAR1_CTRL_DATA__oe__BITNR 20
2765#define R_PAR1_CTRL_DATA__oe__WIDTH 1
2766#define R_PAR1_CTRL_DATA__oe__enable 1
2767#define R_PAR1_CTRL_DATA__oe__disable 0
2768#define R_PAR1_CTRL_DATA__seli__BITNR 19
2769#define R_PAR1_CTRL_DATA__seli__WIDTH 1
2770#define R_PAR1_CTRL_DATA__seli__active 1
2771#define R_PAR1_CTRL_DATA__seli__inactive 0
2772#define R_PAR1_CTRL_DATA__autofd__BITNR 18
2773#define R_PAR1_CTRL_DATA__autofd__WIDTH 1
2774#define R_PAR1_CTRL_DATA__autofd__active 1
2775#define R_PAR1_CTRL_DATA__autofd__inactive 0
2776#define R_PAR1_CTRL_DATA__strb__BITNR 17
2777#define R_PAR1_CTRL_DATA__strb__WIDTH 1
2778#define R_PAR1_CTRL_DATA__strb__active 1
2779#define R_PAR1_CTRL_DATA__strb__inactive 0
2780#define R_PAR1_CTRL_DATA__init__BITNR 16
2781#define R_PAR1_CTRL_DATA__init__WIDTH 1
2782#define R_PAR1_CTRL_DATA__init__active 1
2783#define R_PAR1_CTRL_DATA__init__inactive 0
2784#define R_PAR1_CTRL_DATA__ecp_cmd__BITNR 8
2785#define R_PAR1_CTRL_DATA__ecp_cmd__WIDTH 1
2786#define R_PAR1_CTRL_DATA__ecp_cmd__command 1
2787#define R_PAR1_CTRL_DATA__ecp_cmd__data 0
2788#define R_PAR1_CTRL_DATA__data__BITNR 0
2789#define R_PAR1_CTRL_DATA__data__WIDTH 8
2790
2791#define R_PAR1_CTRL (IO_TYPECAST_BYTE 0xb0000052)
2792#define R_PAR1_CTRL__ctrl__BITNR 0
2793#define R_PAR1_CTRL__ctrl__WIDTH 5
2794
2795#define R_PAR1_STATUS_DATA (IO_TYPECAST_RO_UDWORD 0xb0000050)
2796#define R_PAR1_STATUS_DATA__mode__BITNR 29
2797#define R_PAR1_STATUS_DATA__mode__WIDTH 3
2798#define R_PAR1_STATUS_DATA__mode__manual 0
2799#define R_PAR1_STATUS_DATA__mode__centronics 1
2800#define R_PAR1_STATUS_DATA__mode__fastbyte 2
2801#define R_PAR1_STATUS_DATA__mode__nibble 3
2802#define R_PAR1_STATUS_DATA__mode__byte 4
2803#define R_PAR1_STATUS_DATA__mode__ecp_fwd 5
2804#define R_PAR1_STATUS_DATA__mode__ecp_rev 6
2805#define R_PAR1_STATUS_DATA__mode__off 7
2806#define R_PAR1_STATUS_DATA__mode__epp_wr1 5
2807#define R_PAR1_STATUS_DATA__mode__epp_wr2 6
2808#define R_PAR1_STATUS_DATA__mode__epp_wr3 7
2809#define R_PAR1_STATUS_DATA__mode__epp_rd 0
2810#define R_PAR1_STATUS_DATA__perr__BITNR 28
2811#define R_PAR1_STATUS_DATA__perr__WIDTH 1
2812#define R_PAR1_STATUS_DATA__perr__active 1
2813#define R_PAR1_STATUS_DATA__perr__inactive 0
2814#define R_PAR1_STATUS_DATA__ack__BITNR 27
2815#define R_PAR1_STATUS_DATA__ack__WIDTH 1
2816#define R_PAR1_STATUS_DATA__ack__active 0
2817#define R_PAR1_STATUS_DATA__ack__inactive 1
2818#define R_PAR1_STATUS_DATA__busy__BITNR 26
2819#define R_PAR1_STATUS_DATA__busy__WIDTH 1
2820#define R_PAR1_STATUS_DATA__busy__active 1
2821#define R_PAR1_STATUS_DATA__busy__inactive 0
2822#define R_PAR1_STATUS_DATA__fault__BITNR 25
2823#define R_PAR1_STATUS_DATA__fault__WIDTH 1
2824#define R_PAR1_STATUS_DATA__fault__active 0
2825#define R_PAR1_STATUS_DATA__fault__inactive 1
2826#define R_PAR1_STATUS_DATA__sel__BITNR 24
2827#define R_PAR1_STATUS_DATA__sel__WIDTH 1
2828#define R_PAR1_STATUS_DATA__sel__active 1
2829#define R_PAR1_STATUS_DATA__sel__inactive 0
2830#define R_PAR1_STATUS_DATA__ext_mode__BITNR 23
2831#define R_PAR1_STATUS_DATA__ext_mode__WIDTH 1
2832#define R_PAR1_STATUS_DATA__ext_mode__enable 1
2833#define R_PAR1_STATUS_DATA__ext_mode__disable 0
2834#define R_PAR1_STATUS_DATA__tr_rdy__BITNR 17
2835#define R_PAR1_STATUS_DATA__tr_rdy__WIDTH 1
2836#define R_PAR1_STATUS_DATA__tr_rdy__ready 1
2837#define R_PAR1_STATUS_DATA__tr_rdy__busy 0
2838#define R_PAR1_STATUS_DATA__dav__BITNR 16
2839#define R_PAR1_STATUS_DATA__dav__WIDTH 1
2840#define R_PAR1_STATUS_DATA__dav__data 1
2841#define R_PAR1_STATUS_DATA__dav__nodata 0
2842#define R_PAR1_STATUS_DATA__ecp_cmd__BITNR 8
2843#define R_PAR1_STATUS_DATA__ecp_cmd__WIDTH 1
2844#define R_PAR1_STATUS_DATA__ecp_cmd__command 1
2845#define R_PAR1_STATUS_DATA__ecp_cmd__data 0
2846#define R_PAR1_STATUS_DATA__data__BITNR 0
2847#define R_PAR1_STATUS_DATA__data__WIDTH 8
2848
2849#define R_PAR1_STATUS (IO_TYPECAST_RO_UWORD 0xb0000052)
2850#define R_PAR1_STATUS__mode__BITNR 13
2851#define R_PAR1_STATUS__mode__WIDTH 3
2852#define R_PAR1_STATUS__mode__manual 0
2853#define R_PAR1_STATUS__mode__centronics 1
2854#define R_PAR1_STATUS__mode__fastbyte 2
2855#define R_PAR1_STATUS__mode__nibble 3
2856#define R_PAR1_STATUS__mode__byte 4
2857#define R_PAR1_STATUS__mode__ecp_fwd 5
2858#define R_PAR1_STATUS__mode__ecp_rev 6
2859#define R_PAR1_STATUS__mode__off 7
2860#define R_PAR1_STATUS__mode__epp_wr1 5
2861#define R_PAR1_STATUS__mode__epp_wr2 6
2862#define R_PAR1_STATUS__mode__epp_wr3 7
2863#define R_PAR1_STATUS__mode__epp_rd 0
2864#define R_PAR1_STATUS__perr__BITNR 12
2865#define R_PAR1_STATUS__perr__WIDTH 1
2866#define R_PAR1_STATUS__perr__active 1
2867#define R_PAR1_STATUS__perr__inactive 0
2868#define R_PAR1_STATUS__ack__BITNR 11
2869#define R_PAR1_STATUS__ack__WIDTH 1
2870#define R_PAR1_STATUS__ack__active 0
2871#define R_PAR1_STATUS__ack__inactive 1
2872#define R_PAR1_STATUS__busy__BITNR 10
2873#define R_PAR1_STATUS__busy__WIDTH 1
2874#define R_PAR1_STATUS__busy__active 1
2875#define R_PAR1_STATUS__busy__inactive 0
2876#define R_PAR1_STATUS__fault__BITNR 9
2877#define R_PAR1_STATUS__fault__WIDTH 1
2878#define R_PAR1_STATUS__fault__active 0
2879#define R_PAR1_STATUS__fault__inactive 1
2880#define R_PAR1_STATUS__sel__BITNR 8
2881#define R_PAR1_STATUS__sel__WIDTH 1
2882#define R_PAR1_STATUS__sel__active 1
2883#define R_PAR1_STATUS__sel__inactive 0
2884#define R_PAR1_STATUS__ext_mode__BITNR 7
2885#define R_PAR1_STATUS__ext_mode__WIDTH 1
2886#define R_PAR1_STATUS__ext_mode__enable 1
2887#define R_PAR1_STATUS__ext_mode__disable 0
2888#define R_PAR1_STATUS__tr_rdy__BITNR 1
2889#define R_PAR1_STATUS__tr_rdy__WIDTH 1
2890#define R_PAR1_STATUS__tr_rdy__ready 1
2891#define R_PAR1_STATUS__tr_rdy__busy 0
2892#define R_PAR1_STATUS__dav__BITNR 0
2893#define R_PAR1_STATUS__dav__WIDTH 1
2894#define R_PAR1_STATUS__dav__data 1
2895#define R_PAR1_STATUS__dav__nodata 0
2896
2897#define R_PAR1_CONFIG (IO_TYPECAST_UDWORD 0xb0000054)
2898#define R_PAR1_CONFIG__ioe__BITNR 25
2899#define R_PAR1_CONFIG__ioe__WIDTH 1
2900#define R_PAR1_CONFIG__ioe__inv 1
2901#define R_PAR1_CONFIG__ioe__noninv 0
2902#define R_PAR1_CONFIG__iseli__BITNR 24
2903#define R_PAR1_CONFIG__iseli__WIDTH 1
2904#define R_PAR1_CONFIG__iseli__inv 1
2905#define R_PAR1_CONFIG__iseli__noninv 0
2906#define R_PAR1_CONFIG__iautofd__BITNR 23
2907#define R_PAR1_CONFIG__iautofd__WIDTH 1
2908#define R_PAR1_CONFIG__iautofd__inv 1
2909#define R_PAR1_CONFIG__iautofd__noninv 0
2910#define R_PAR1_CONFIG__istrb__BITNR 22
2911#define R_PAR1_CONFIG__istrb__WIDTH 1
2912#define R_PAR1_CONFIG__istrb__inv 1
2913#define R_PAR1_CONFIG__istrb__noninv 0
2914#define R_PAR1_CONFIG__iinit__BITNR 21
2915#define R_PAR1_CONFIG__iinit__WIDTH 1
2916#define R_PAR1_CONFIG__iinit__inv 1
2917#define R_PAR1_CONFIG__iinit__noninv 0
2918#define R_PAR1_CONFIG__iperr__BITNR 20
2919#define R_PAR1_CONFIG__iperr__WIDTH 1
2920#define R_PAR1_CONFIG__iperr__inv 1
2921#define R_PAR1_CONFIG__iperr__noninv 0
2922#define R_PAR1_CONFIG__iack__BITNR 19
2923#define R_PAR1_CONFIG__iack__WIDTH 1
2924#define R_PAR1_CONFIG__iack__inv 1
2925#define R_PAR1_CONFIG__iack__noninv 0
2926#define R_PAR1_CONFIG__ibusy__BITNR 18
2927#define R_PAR1_CONFIG__ibusy__WIDTH 1
2928#define R_PAR1_CONFIG__ibusy__inv 1
2929#define R_PAR1_CONFIG__ibusy__noninv 0
2930#define R_PAR1_CONFIG__ifault__BITNR 17
2931#define R_PAR1_CONFIG__ifault__WIDTH 1
2932#define R_PAR1_CONFIG__ifault__inv 1
2933#define R_PAR1_CONFIG__ifault__noninv 0
2934#define R_PAR1_CONFIG__isel__BITNR 16
2935#define R_PAR1_CONFIG__isel__WIDTH 1
2936#define R_PAR1_CONFIG__isel__inv 1
2937#define R_PAR1_CONFIG__isel__noninv 0
2938#define R_PAR1_CONFIG__ext_mode__BITNR 11
2939#define R_PAR1_CONFIG__ext_mode__WIDTH 1
2940#define R_PAR1_CONFIG__ext_mode__enable 1
2941#define R_PAR1_CONFIG__ext_mode__disable 0
2942#define R_PAR1_CONFIG__dma__BITNR 9
2943#define R_PAR1_CONFIG__dma__WIDTH 1
2944#define R_PAR1_CONFIG__dma__enable 1
2945#define R_PAR1_CONFIG__dma__disable 0
2946#define R_PAR1_CONFIG__rle_in__BITNR 8
2947#define R_PAR1_CONFIG__rle_in__WIDTH 1
2948#define R_PAR1_CONFIG__rle_in__enable 1
2949#define R_PAR1_CONFIG__rle_in__disable 0
2950#define R_PAR1_CONFIG__rle_out__BITNR 7
2951#define R_PAR1_CONFIG__rle_out__WIDTH 1
2952#define R_PAR1_CONFIG__rle_out__enable 1
2953#define R_PAR1_CONFIG__rle_out__disable 0
2954#define R_PAR1_CONFIG__enable__BITNR 6
2955#define R_PAR1_CONFIG__enable__WIDTH 1
2956#define R_PAR1_CONFIG__enable__on 1
2957#define R_PAR1_CONFIG__enable__reset 0
2958#define R_PAR1_CONFIG__force__BITNR 5
2959#define R_PAR1_CONFIG__force__WIDTH 1
2960#define R_PAR1_CONFIG__force__on 1
2961#define R_PAR1_CONFIG__force__off 0
2962#define R_PAR1_CONFIG__ign_ack__BITNR 4
2963#define R_PAR1_CONFIG__ign_ack__WIDTH 1
2964#define R_PAR1_CONFIG__ign_ack__ignore 1
2965#define R_PAR1_CONFIG__ign_ack__wait 0
2966#define R_PAR1_CONFIG__oe_ack__BITNR 3
2967#define R_PAR1_CONFIG__oe_ack__WIDTH 1
2968#define R_PAR1_CONFIG__oe_ack__wait_oe 1
2969#define R_PAR1_CONFIG__oe_ack__dont_wait 0
2970#define R_PAR1_CONFIG__oe_ack__epp_addr 1
2971#define R_PAR1_CONFIG__oe_ack__epp_data 0
2972#define R_PAR1_CONFIG__epp_addr_data__BITNR 3
2973#define R_PAR1_CONFIG__epp_addr_data__WIDTH 1
2974#define R_PAR1_CONFIG__epp_addr_data__wait_oe 1
2975#define R_PAR1_CONFIG__epp_addr_data__dont_wait 0
2976#define R_PAR1_CONFIG__epp_addr_data__epp_addr 1
2977#define R_PAR1_CONFIG__epp_addr_data__epp_data 0
2978#define R_PAR1_CONFIG__mode__BITNR 0
2979#define R_PAR1_CONFIG__mode__WIDTH 3
2980#define R_PAR1_CONFIG__mode__manual 0
2981#define R_PAR1_CONFIG__mode__centronics 1
2982#define R_PAR1_CONFIG__mode__fastbyte 2
2983#define R_PAR1_CONFIG__mode__nibble 3
2984#define R_PAR1_CONFIG__mode__byte 4
2985#define R_PAR1_CONFIG__mode__ecp_fwd 5
2986#define R_PAR1_CONFIG__mode__ecp_rev 6
2987#define R_PAR1_CONFIG__mode__off 7
2988#define R_PAR1_CONFIG__mode__epp_wr1 5
2989#define R_PAR1_CONFIG__mode__epp_wr2 6
2990#define R_PAR1_CONFIG__mode__epp_wr3 7
2991#define R_PAR1_CONFIG__mode__epp_rd 0
2992
2993#define R_PAR1_DELAY (IO_TYPECAST_UDWORD 0xb0000058)
2994#define R_PAR1_DELAY__fine_hold__BITNR 21
2995#define R_PAR1_DELAY__fine_hold__WIDTH 3
2996#define R_PAR1_DELAY__hold__BITNR 16
2997#define R_PAR1_DELAY__hold__WIDTH 5
2998#define R_PAR1_DELAY__fine_strb__BITNR 13
2999#define R_PAR1_DELAY__fine_strb__WIDTH 3
3000#define R_PAR1_DELAY__strobe__BITNR 8
3001#define R_PAR1_DELAY__strobe__WIDTH 5
3002#define R_PAR1_DELAY__fine_setup__BITNR 5
3003#define R_PAR1_DELAY__fine_setup__WIDTH 3
3004#define R_PAR1_DELAY__setup__BITNR 0
3005#define R_PAR1_DELAY__setup__WIDTH 5
3006
3007/*
3008!* ATA interface registers
3009!*/
3010
3011#define R_ATA_CTRL_DATA (IO_TYPECAST_UDWORD 0xb0000040)
3012#define R_ATA_CTRL_DATA__sel__BITNR 30
3013#define R_ATA_CTRL_DATA__sel__WIDTH 2
3014#define R_ATA_CTRL_DATA__cs1__BITNR 29
3015#define R_ATA_CTRL_DATA__cs1__WIDTH 1
3016#define R_ATA_CTRL_DATA__cs1__active 1
3017#define R_ATA_CTRL_DATA__cs1__inactive 0
3018#define R_ATA_CTRL_DATA__cs0__BITNR 28
3019#define R_ATA_CTRL_DATA__cs0__WIDTH 1
3020#define R_ATA_CTRL_DATA__cs0__active 1
3021#define R_ATA_CTRL_DATA__cs0__inactive 0
3022#define R_ATA_CTRL_DATA__addr__BITNR 25
3023#define R_ATA_CTRL_DATA__addr__WIDTH 3
3024#define R_ATA_CTRL_DATA__rw__BITNR 24
3025#define R_ATA_CTRL_DATA__rw__WIDTH 1
3026#define R_ATA_CTRL_DATA__rw__read 1
3027#define R_ATA_CTRL_DATA__rw__write 0
3028#define R_ATA_CTRL_DATA__src_dst__BITNR 23
3029#define R_ATA_CTRL_DATA__src_dst__WIDTH 1
3030#define R_ATA_CTRL_DATA__src_dst__dma 1
3031#define R_ATA_CTRL_DATA__src_dst__register 0
3032#define R_ATA_CTRL_DATA__handsh__BITNR 22
3033#define R_ATA_CTRL_DATA__handsh__WIDTH 1
3034#define R_ATA_CTRL_DATA__handsh__dma 1
3035#define R_ATA_CTRL_DATA__handsh__pio 0
3036#define R_ATA_CTRL_DATA__multi__BITNR 21
3037#define R_ATA_CTRL_DATA__multi__WIDTH 1
3038#define R_ATA_CTRL_DATA__multi__on 1
3039#define R_ATA_CTRL_DATA__multi__off 0
3040#define R_ATA_CTRL_DATA__dma_size__BITNR 20
3041#define R_ATA_CTRL_DATA__dma_size__WIDTH 1
3042#define R_ATA_CTRL_DATA__dma_size__byte 1
3043#define R_ATA_CTRL_DATA__dma_size__word 0
3044#define R_ATA_CTRL_DATA__data__BITNR 0
3045#define R_ATA_CTRL_DATA__data__WIDTH 16
3046
3047#define R_ATA_STATUS_DATA (IO_TYPECAST_RO_UDWORD 0xb0000040)
3048#define R_ATA_STATUS_DATA__busy__BITNR 18
3049#define R_ATA_STATUS_DATA__busy__WIDTH 1
3050#define R_ATA_STATUS_DATA__busy__yes 1
3051#define R_ATA_STATUS_DATA__busy__no 0
3052#define R_ATA_STATUS_DATA__tr_rdy__BITNR 17
3053#define R_ATA_STATUS_DATA__tr_rdy__WIDTH 1
3054#define R_ATA_STATUS_DATA__tr_rdy__ready 1
3055#define R_ATA_STATUS_DATA__tr_rdy__busy 0
3056#define R_ATA_STATUS_DATA__dav__BITNR 16
3057#define R_ATA_STATUS_DATA__dav__WIDTH 1
3058#define R_ATA_STATUS_DATA__dav__data 1
3059#define R_ATA_STATUS_DATA__dav__nodata 0
3060#define R_ATA_STATUS_DATA__data__BITNR 0
3061#define R_ATA_STATUS_DATA__data__WIDTH 16
3062
3063#define R_ATA_CONFIG (IO_TYPECAST_UDWORD 0xb0000044)
3064#define R_ATA_CONFIG__enable__BITNR 25
3065#define R_ATA_CONFIG__enable__WIDTH 1
3066#define R_ATA_CONFIG__enable__on 1
3067#define R_ATA_CONFIG__enable__off 0
3068#define R_ATA_CONFIG__dma_strobe__BITNR 20
3069#define R_ATA_CONFIG__dma_strobe__WIDTH 5
3070#define R_ATA_CONFIG__dma_hold__BITNR 15
3071#define R_ATA_CONFIG__dma_hold__WIDTH 5
3072#define R_ATA_CONFIG__pio_setup__BITNR 10
3073#define R_ATA_CONFIG__pio_setup__WIDTH 5
3074#define R_ATA_CONFIG__pio_strobe__BITNR 5
3075#define R_ATA_CONFIG__pio_strobe__WIDTH 5
3076#define R_ATA_CONFIG__pio_hold__BITNR 0
3077#define R_ATA_CONFIG__pio_hold__WIDTH 5
3078
3079#define R_ATA_TRANSFER_CNT (IO_TYPECAST_UDWORD 0xb0000048)
3080#define R_ATA_TRANSFER_CNT__count__BITNR 0
3081#define R_ATA_TRANSFER_CNT__count__WIDTH 17
3082
3083/*
3084!* SCSI registers
3085!*/
3086
3087#define R_SCSI0_CTRL (IO_TYPECAST_UDWORD 0xb0000044)
3088#define R_SCSI0_CTRL__id_type__BITNR 31
3089#define R_SCSI0_CTRL__id_type__WIDTH 1
3090#define R_SCSI0_CTRL__id_type__software 1
3091#define R_SCSI0_CTRL__id_type__hardware 0
3092#define R_SCSI0_CTRL__sel_timeout__BITNR 24
3093#define R_SCSI0_CTRL__sel_timeout__WIDTH 7
3094#define R_SCSI0_CTRL__synch_per__BITNR 16
3095#define R_SCSI0_CTRL__synch_per__WIDTH 8
3096#define R_SCSI0_CTRL__rst__BITNR 15
3097#define R_SCSI0_CTRL__rst__WIDTH 1
3098#define R_SCSI0_CTRL__rst__yes 1
3099#define R_SCSI0_CTRL__rst__no 0
3100#define R_SCSI0_CTRL__atn__BITNR 14
3101#define R_SCSI0_CTRL__atn__WIDTH 1
3102#define R_SCSI0_CTRL__atn__yes 1
3103#define R_SCSI0_CTRL__atn__no 0
3104#define R_SCSI0_CTRL__my_id__BITNR 9
3105#define R_SCSI0_CTRL__my_id__WIDTH 4
3106#define R_SCSI0_CTRL__target_id__BITNR 4
3107#define R_SCSI0_CTRL__target_id__WIDTH 4
3108#define R_SCSI0_CTRL__fast_20__BITNR 3
3109#define R_SCSI0_CTRL__fast_20__WIDTH 1
3110#define R_SCSI0_CTRL__fast_20__yes 1
3111#define R_SCSI0_CTRL__fast_20__no 0
3112#define R_SCSI0_CTRL__bus_width__BITNR 2
3113#define R_SCSI0_CTRL__bus_width__WIDTH 1
3114#define R_SCSI0_CTRL__bus_width__wide 1
3115#define R_SCSI0_CTRL__bus_width__narrow 0
3116#define R_SCSI0_CTRL__synch__BITNR 1
3117#define R_SCSI0_CTRL__synch__WIDTH 1
3118#define R_SCSI0_CTRL__synch__synch 1
3119#define R_SCSI0_CTRL__synch__asynch 0
3120#define R_SCSI0_CTRL__enable__BITNR 0
3121#define R_SCSI0_CTRL__enable__WIDTH 1
3122#define R_SCSI0_CTRL__enable__on 1
3123#define R_SCSI0_CTRL__enable__off 0
3124
3125#define R_SCSI0_CMD_DATA (IO_TYPECAST_UDWORD 0xb0000040)
3126#define R_SCSI0_CMD_DATA__parity_in__BITNR 26
3127#define R_SCSI0_CMD_DATA__parity_in__WIDTH 1
3128#define R_SCSI0_CMD_DATA__parity_in__on 0
3129#define R_SCSI0_CMD_DATA__parity_in__off 1
3130#define R_SCSI0_CMD_DATA__skip__BITNR 25
3131#define R_SCSI0_CMD_DATA__skip__WIDTH 1
3132#define R_SCSI0_CMD_DATA__skip__on 1
3133#define R_SCSI0_CMD_DATA__skip__off 0
3134#define R_SCSI0_CMD_DATA__clr_status__BITNR 24
3135#define R_SCSI0_CMD_DATA__clr_status__WIDTH 1
3136#define R_SCSI0_CMD_DATA__clr_status__yes 1
3137#define R_SCSI0_CMD_DATA__clr_status__nop 0
3138#define R_SCSI0_CMD_DATA__asynch_setup__BITNR 20
3139#define R_SCSI0_CMD_DATA__asynch_setup__WIDTH 4
3140#define R_SCSI0_CMD_DATA__command__BITNR 16
3141#define R_SCSI0_CMD_DATA__command__WIDTH 4
3142#define R_SCSI0_CMD_DATA__command__full_din_1 0
3143#define R_SCSI0_CMD_DATA__command__full_dout_1 1
3144#define R_SCSI0_CMD_DATA__command__full_stat_1 2
3145#define R_SCSI0_CMD_DATA__command__resel_din 3
3146#define R_SCSI0_CMD_DATA__command__resel_dout 4
3147#define R_SCSI0_CMD_DATA__command__resel_stat 5
3148#define R_SCSI0_CMD_DATA__command__arb_only 6
3149#define R_SCSI0_CMD_DATA__command__full_din_3 8
3150#define R_SCSI0_CMD_DATA__command__full_dout_3 9
3151#define R_SCSI0_CMD_DATA__command__full_stat_3 10
3152#define R_SCSI0_CMD_DATA__command__man_data_in 11
3153#define R_SCSI0_CMD_DATA__command__man_data_out 12
3154#define R_SCSI0_CMD_DATA__command__man_rat 13
3155#define R_SCSI0_CMD_DATA__data_out__BITNR 0
3156#define R_SCSI0_CMD_DATA__data_out__WIDTH 16
3157
3158#define R_SCSI0_DATA (IO_TYPECAST_UWORD 0xb0000040)
3159#define R_SCSI0_DATA__data_out__BITNR 0
3160#define R_SCSI0_DATA__data_out__WIDTH 16
3161
3162#define R_SCSI0_CMD (IO_TYPECAST_BYTE 0xb0000042)
3163#define R_SCSI0_CMD__asynch_setup__BITNR 4
3164#define R_SCSI0_CMD__asynch_setup__WIDTH 4
3165#define R_SCSI0_CMD__command__BITNR 0
3166#define R_SCSI0_CMD__command__WIDTH 4
3167#define R_SCSI0_CMD__command__full_din_1 0
3168#define R_SCSI0_CMD__command__full_dout_1 1
3169#define R_SCSI0_CMD__command__full_stat_1 2
3170#define R_SCSI0_CMD__command__resel_din 3
3171#define R_SCSI0_CMD__command__resel_dout 4
3172#define R_SCSI0_CMD__command__resel_stat 5
3173#define R_SCSI0_CMD__command__arb_only 6
3174#define R_SCSI0_CMD__command__full_din_3 8
3175#define R_SCSI0_CMD__command__full_dout_3 9
3176#define R_SCSI0_CMD__command__full_stat_3 10
3177#define R_SCSI0_CMD__command__man_data_in 11
3178#define R_SCSI0_CMD__command__man_data_out 12
3179#define R_SCSI0_CMD__command__man_rat 13
3180
3181#define R_SCSI0_STATUS_CTRL (IO_TYPECAST_BYTE 0xb0000043)
3182#define R_SCSI0_STATUS_CTRL__parity_in__BITNR 2
3183#define R_SCSI0_STATUS_CTRL__parity_in__WIDTH 1
3184#define R_SCSI0_STATUS_CTRL__parity_in__on 0
3185#define R_SCSI0_STATUS_CTRL__parity_in__off 1
3186#define R_SCSI0_STATUS_CTRL__skip__BITNR 1
3187#define R_SCSI0_STATUS_CTRL__skip__WIDTH 1
3188#define R_SCSI0_STATUS_CTRL__skip__on 1
3189#define R_SCSI0_STATUS_CTRL__skip__off 0
3190#define R_SCSI0_STATUS_CTRL__clr_status__BITNR 0
3191#define R_SCSI0_STATUS_CTRL__clr_status__WIDTH 1
3192#define R_SCSI0_STATUS_CTRL__clr_status__yes 1
3193#define R_SCSI0_STATUS_CTRL__clr_status__nop 0
3194
3195#define R_SCSI0_STATUS (IO_TYPECAST_RO_UDWORD 0xb0000048)
3196#define R_SCSI0_STATUS__tst_arb_won__BITNR 23
3197#define R_SCSI0_STATUS__tst_arb_won__WIDTH 1
3198#define R_SCSI0_STATUS__tst_resel__BITNR 22
3199#define R_SCSI0_STATUS__tst_resel__WIDTH 1
3200#define R_SCSI0_STATUS__parity_error__BITNR 21
3201#define R_SCSI0_STATUS__parity_error__WIDTH 1
3202#define R_SCSI0_STATUS__bus_reset__BITNR 20
3203#define R_SCSI0_STATUS__bus_reset__WIDTH 1
3204#define R_SCSI0_STATUS__bus_reset__yes 1
3205#define R_SCSI0_STATUS__bus_reset__no 0
3206#define R_SCSI0_STATUS__resel_target__BITNR 15
3207#define R_SCSI0_STATUS__resel_target__WIDTH 4
3208#define R_SCSI0_STATUS__resel__BITNR 14
3209#define R_SCSI0_STATUS__resel__WIDTH 1
3210#define R_SCSI0_STATUS__resel__yes 1
3211#define R_SCSI0_STATUS__resel__no 0
3212#define R_SCSI0_STATUS__curr_phase__BITNR 11
3213#define R_SCSI0_STATUS__curr_phase__WIDTH 3
3214#define R_SCSI0_STATUS__curr_phase__ph_undef 0
3215#define R_SCSI0_STATUS__curr_phase__ph_msg_in 7
3216#define R_SCSI0_STATUS__curr_phase__ph_msg_out 6
3217#define R_SCSI0_STATUS__curr_phase__ph_status 3
3218#define R_SCSI0_STATUS__curr_phase__ph_command 2
3219#define R_SCSI0_STATUS__curr_phase__ph_data_in 5
3220#define R_SCSI0_STATUS__curr_phase__ph_data_out 4
3221#define R_SCSI0_STATUS__curr_phase__ph_resel 1
3222#define R_SCSI0_STATUS__last_seq_step__BITNR 6
3223#define R_SCSI0_STATUS__last_seq_step__WIDTH 5
3224#define R_SCSI0_STATUS__last_seq_step__st_bus_free 24
3225#define R_SCSI0_STATUS__last_seq_step__st_arbitrate 8
3226#define R_SCSI0_STATUS__last_seq_step__st_resel_req 29
3227#define R_SCSI0_STATUS__last_seq_step__st_msg_1 2
3228#define R_SCSI0_STATUS__last_seq_step__st_manual 28
3229#define R_SCSI0_STATUS__last_seq_step__st_transf_cmd 30
3230#define R_SCSI0_STATUS__last_seq_step__st_msg_2 6
3231#define R_SCSI0_STATUS__last_seq_step__st_msg_3 22
3232#define R_SCSI0_STATUS__last_seq_step__st_answer 3
3233#define R_SCSI0_STATUS__last_seq_step__st_synch_din_perr 1
3234#define R_SCSI0_STATUS__last_seq_step__st_transfer_done 15
3235#define R_SCSI0_STATUS__last_seq_step__st_synch_dout 0
3236#define R_SCSI0_STATUS__last_seq_step__st_asynch_dout 25
3237#define R_SCSI0_STATUS__last_seq_step__st_synch_din 13
3238#define R_SCSI0_STATUS__last_seq_step__st_asynch_din 9
3239#define R_SCSI0_STATUS__last_seq_step__st_synch_dout_ack 4
3240#define R_SCSI0_STATUS__last_seq_step__st_synch_din_ack 12
3241#define R_SCSI0_STATUS__last_seq_step__st_synch_din_ack_perr 5
3242#define R_SCSI0_STATUS__last_seq_step__st_asynch_dout_end 11
3243#define R_SCSI0_STATUS__last_seq_step__st_iwr 27
3244#define R_SCSI0_STATUS__last_seq_step__st_wait_free_disc 21
3245#define R_SCSI0_STATUS__last_seq_step__st_sdp_disc 7
3246#define R_SCSI0_STATUS__last_seq_step__st_cc 31
3247#define R_SCSI0_STATUS__last_seq_step__st_iwr_good 14
3248#define R_SCSI0_STATUS__last_seq_step__st_iwr_cc 23
3249#define R_SCSI0_STATUS__last_seq_step__st_wait_free_iwr_cc 17
3250#define R_SCSI0_STATUS__last_seq_step__st_wait_free_cc 20
3251#define R_SCSI0_STATUS__last_seq_step__st_wait_free_sdp_disc 16
3252#define R_SCSI0_STATUS__last_seq_step__st_manual_req 10
3253#define R_SCSI0_STATUS__last_seq_step__st_manual_din_prot 18
3254#define R_SCSI0_STATUS__valid_status__BITNR 5
3255#define R_SCSI0_STATUS__valid_status__WIDTH 1
3256#define R_SCSI0_STATUS__valid_status__yes 1
3257#define R_SCSI0_STATUS__valid_status__no 0
3258#define R_SCSI0_STATUS__seq_status__BITNR 0
3259#define R_SCSI0_STATUS__seq_status__WIDTH 5
3260#define R_SCSI0_STATUS__seq_status__info_seq_complete 0
3261#define R_SCSI0_STATUS__seq_status__info_parity_error 1
3262#define R_SCSI0_STATUS__seq_status__info_unhandled_msg_in 2
3263#define R_SCSI0_STATUS__seq_status__info_unexp_ph_change 3
3264#define R_SCSI0_STATUS__seq_status__info_arb_lost 4
3265#define R_SCSI0_STATUS__seq_status__info_sel_timeout 5
3266#define R_SCSI0_STATUS__seq_status__info_unexp_bf 6
3267#define R_SCSI0_STATUS__seq_status__info_illegal_op 7
3268#define R_SCSI0_STATUS__seq_status__info_rec_recvd 8
3269#define R_SCSI0_STATUS__seq_status__info_reselected 9
3270#define R_SCSI0_STATUS__seq_status__info_unhandled_status 10
3271#define R_SCSI0_STATUS__seq_status__info_bus_reset 11
3272#define R_SCSI0_STATUS__seq_status__info_illegal_bf 12
3273#define R_SCSI0_STATUS__seq_status__info_bus_free 13
3274
3275#define R_SCSI0_DATA_IN (IO_TYPECAST_RO_UWORD 0xb0000040)
3276#define R_SCSI0_DATA_IN__data_in__BITNR 0
3277#define R_SCSI0_DATA_IN__data_in__WIDTH 16
3278
3279#define R_SCSI1_CTRL (IO_TYPECAST_UDWORD 0xb0000054)
3280#define R_SCSI1_CTRL__id_type__BITNR 31
3281#define R_SCSI1_CTRL__id_type__WIDTH 1
3282#define R_SCSI1_CTRL__id_type__software 1
3283#define R_SCSI1_CTRL__id_type__hardware 0
3284#define R_SCSI1_CTRL__sel_timeout__BITNR 24
3285#define R_SCSI1_CTRL__sel_timeout__WIDTH 7
3286#define R_SCSI1_CTRL__synch_per__BITNR 16
3287#define R_SCSI1_CTRL__synch_per__WIDTH 8
3288#define R_SCSI1_CTRL__rst__BITNR 15
3289#define R_SCSI1_CTRL__rst__WIDTH 1
3290#define R_SCSI1_CTRL__rst__yes 1
3291#define R_SCSI1_CTRL__rst__no 0
3292#define R_SCSI1_CTRL__atn__BITNR 14
3293#define R_SCSI1_CTRL__atn__WIDTH 1
3294#define R_SCSI1_CTRL__atn__yes 1
3295#define R_SCSI1_CTRL__atn__no 0
3296#define R_SCSI1_CTRL__my_id__BITNR 9
3297#define R_SCSI1_CTRL__my_id__WIDTH 4
3298#define R_SCSI1_CTRL__target_id__BITNR 4
3299#define R_SCSI1_CTRL__target_id__WIDTH 4
3300#define R_SCSI1_CTRL__fast_20__BITNR 3
3301#define R_SCSI1_CTRL__fast_20__WIDTH 1
3302#define R_SCSI1_CTRL__fast_20__yes 1
3303#define R_SCSI1_CTRL__fast_20__no 0
3304#define R_SCSI1_CTRL__bus_width__BITNR 2
3305#define R_SCSI1_CTRL__bus_width__WIDTH 1
3306#define R_SCSI1_CTRL__bus_width__wide 1
3307#define R_SCSI1_CTRL__bus_width__narrow 0
3308#define R_SCSI1_CTRL__synch__BITNR 1
3309#define R_SCSI1_CTRL__synch__WIDTH 1
3310#define R_SCSI1_CTRL__synch__synch 1
3311#define R_SCSI1_CTRL__synch__asynch 0
3312#define R_SCSI1_CTRL__enable__BITNR 0
3313#define R_SCSI1_CTRL__enable__WIDTH 1
3314#define R_SCSI1_CTRL__enable__on 1
3315#define R_SCSI1_CTRL__enable__off 0
3316
3317#define R_SCSI1_CMD_DATA (IO_TYPECAST_UDWORD 0xb0000050)
3318#define R_SCSI1_CMD_DATA__parity_in__BITNR 26
3319#define R_SCSI1_CMD_DATA__parity_in__WIDTH 1
3320#define R_SCSI1_CMD_DATA__parity_in__on 0
3321#define R_SCSI1_CMD_DATA__parity_in__off 1
3322#define R_SCSI1_CMD_DATA__skip__BITNR 25
3323#define R_SCSI1_CMD_DATA__skip__WIDTH 1
3324#define R_SCSI1_CMD_DATA__skip__on 1
3325#define R_SCSI1_CMD_DATA__skip__off 0
3326#define R_SCSI1_CMD_DATA__clr_status__BITNR 24
3327#define R_SCSI1_CMD_DATA__clr_status__WIDTH 1
3328#define R_SCSI1_CMD_DATA__clr_status__yes 1
3329#define R_SCSI1_CMD_DATA__clr_status__nop 0
3330#define R_SCSI1_CMD_DATA__asynch_setup__BITNR 20
3331#define R_SCSI1_CMD_DATA__asynch_setup__WIDTH 4
3332#define R_SCSI1_CMD_DATA__command__BITNR 16
3333#define R_SCSI1_CMD_DATA__command__WIDTH 4
3334#define R_SCSI1_CMD_DATA__command__full_din_1 0
3335#define R_SCSI1_CMD_DATA__command__full_dout_1 1
3336#define R_SCSI1_CMD_DATA__command__full_stat_1 2
3337#define R_SCSI1_CMD_DATA__command__resel_din 3
3338#define R_SCSI1_CMD_DATA__command__resel_dout 4
3339#define R_SCSI1_CMD_DATA__command__resel_stat 5
3340#define R_SCSI1_CMD_DATA__command__arb_only 6
3341#define R_SCSI1_CMD_DATA__command__full_din_3 8
3342#define R_SCSI1_CMD_DATA__command__full_dout_3 9
3343#define R_SCSI1_CMD_DATA__command__full_stat_3 10
3344#define R_SCSI1_CMD_DATA__command__man_data_in 11
3345#define R_SCSI1_CMD_DATA__command__man_data_out 12
3346#define R_SCSI1_CMD_DATA__command__man_rat 13
3347#define R_SCSI1_CMD_DATA__data_out__BITNR 0
3348#define R_SCSI1_CMD_DATA__data_out__WIDTH 16
3349
3350#define R_SCSI1_DATA (IO_TYPECAST_UWORD 0xb0000050)
3351#define R_SCSI1_DATA__data_out__BITNR 0
3352#define R_SCSI1_DATA__data_out__WIDTH 16
3353
3354#define R_SCSI1_CMD (IO_TYPECAST_BYTE 0xb0000052)
3355#define R_SCSI1_CMD__asynch_setup__BITNR 4
3356#define R_SCSI1_CMD__asynch_setup__WIDTH 4
3357#define R_SCSI1_CMD__command__BITNR 0
3358#define R_SCSI1_CMD__command__WIDTH 4
3359#define R_SCSI1_CMD__command__full_din_1 0
3360#define R_SCSI1_CMD__command__full_dout_1 1
3361#define R_SCSI1_CMD__command__full_stat_1 2
3362#define R_SCSI1_CMD__command__resel_din 3
3363#define R_SCSI1_CMD__command__resel_dout 4
3364#define R_SCSI1_CMD__command__resel_stat 5
3365#define R_SCSI1_CMD__command__arb_only 6
3366#define R_SCSI1_CMD__command__full_din_3 8
3367#define R_SCSI1_CMD__command__full_dout_3 9
3368#define R_SCSI1_CMD__command__full_stat_3 10
3369#define R_SCSI1_CMD__command__man_data_in 11
3370#define R_SCSI1_CMD__command__man_data_out 12
3371#define R_SCSI1_CMD__command__man_rat 13
3372
3373#define R_SCSI1_STATUS_CTRL (IO_TYPECAST_BYTE 0xb0000053)
3374#define R_SCSI1_STATUS_CTRL__parity_in__BITNR 2
3375#define R_SCSI1_STATUS_CTRL__parity_in__WIDTH 1
3376#define R_SCSI1_STATUS_CTRL__parity_in__on 0
3377#define R_SCSI1_STATUS_CTRL__parity_in__off 1
3378#define R_SCSI1_STATUS_CTRL__skip__BITNR 1
3379#define R_SCSI1_STATUS_CTRL__skip__WIDTH 1
3380#define R_SCSI1_STATUS_CTRL__skip__on 1
3381#define R_SCSI1_STATUS_CTRL__skip__off 0
3382#define R_SCSI1_STATUS_CTRL__clr_status__BITNR 0
3383#define R_SCSI1_STATUS_CTRL__clr_status__WIDTH 1
3384#define R_SCSI1_STATUS_CTRL__clr_status__yes 1
3385#define R_SCSI1_STATUS_CTRL__clr_status__nop 0
3386
3387#define R_SCSI1_STATUS (IO_TYPECAST_RO_UDWORD 0xb0000058)
3388#define R_SCSI1_STATUS__tst_arb_won__BITNR 23
3389#define R_SCSI1_STATUS__tst_arb_won__WIDTH 1
3390#define R_SCSI1_STATUS__tst_resel__BITNR 22
3391#define R_SCSI1_STATUS__tst_resel__WIDTH 1
3392#define R_SCSI1_STATUS__parity_error__BITNR 21
3393#define R_SCSI1_STATUS__parity_error__WIDTH 1
3394#define R_SCSI1_STATUS__bus_reset__BITNR 20
3395#define R_SCSI1_STATUS__bus_reset__WIDTH 1
3396#define R_SCSI1_STATUS__bus_reset__yes 1
3397#define R_SCSI1_STATUS__bus_reset__no 0
3398#define R_SCSI1_STATUS__resel_target__BITNR 15
3399#define R_SCSI1_STATUS__resel_target__WIDTH 4
3400#define R_SCSI1_STATUS__resel__BITNR 14
3401#define R_SCSI1_STATUS__resel__WIDTH 1
3402#define R_SCSI1_STATUS__resel__yes 1
3403#define R_SCSI1_STATUS__resel__no 0
3404#define R_SCSI1_STATUS__curr_phase__BITNR 11
3405#define R_SCSI1_STATUS__curr_phase__WIDTH 3
3406#define R_SCSI1_STATUS__curr_phase__ph_undef 0
3407#define R_SCSI1_STATUS__curr_phase__ph_msg_in 7
3408#define R_SCSI1_STATUS__curr_phase__ph_msg_out 6
3409#define R_SCSI1_STATUS__curr_phase__ph_status 3
3410#define R_SCSI1_STATUS__curr_phase__ph_command 2
3411#define R_SCSI1_STATUS__curr_phase__ph_data_in 5
3412#define R_SCSI1_STATUS__curr_phase__ph_data_out 4
3413#define R_SCSI1_STATUS__curr_phase__ph_resel 1
3414#define R_SCSI1_STATUS__last_seq_step__BITNR 6
3415#define R_SCSI1_STATUS__last_seq_step__WIDTH 5
3416#define R_SCSI1_STATUS__last_seq_step__st_bus_free 24
3417#define R_SCSI1_STATUS__last_seq_step__st_arbitrate 8
3418#define R_SCSI1_STATUS__last_seq_step__st_resel_req 29
3419#define R_SCSI1_STATUS__last_seq_step__st_msg_1 2
3420#define R_SCSI1_STATUS__last_seq_step__st_manual 28
3421#define R_SCSI1_STATUS__last_seq_step__st_transf_cmd 30
3422#define R_SCSI1_STATUS__last_seq_step__st_msg_2 6
3423#define R_SCSI1_STATUS__last_seq_step__st_msg_3 22
3424#define R_SCSI1_STATUS__last_seq_step__st_answer 3
3425#define R_SCSI1_STATUS__last_seq_step__st_synch_din_perr 1
3426#define R_SCSI1_STATUS__last_seq_step__st_transfer_done 15
3427#define R_SCSI1_STATUS__last_seq_step__st_synch_dout 0
3428#define R_SCSI1_STATUS__last_seq_step__st_asynch_dout 25
3429#define R_SCSI1_STATUS__last_seq_step__st_synch_din 13
3430#define R_SCSI1_STATUS__last_seq_step__st_asynch_din 9
3431#define R_SCSI1_STATUS__last_seq_step__st_synch_dout_ack 4
3432#define R_SCSI1_STATUS__last_seq_step__st_synch_din_ack 12
3433#define R_SCSI1_STATUS__last_seq_step__st_synch_din_ack_perr 5
3434#define R_SCSI1_STATUS__last_seq_step__st_asynch_dout_end 11
3435#define R_SCSI1_STATUS__last_seq_step__st_iwr 27
3436#define R_SCSI1_STATUS__last_seq_step__st_wait_free_disc 21
3437#define R_SCSI1_STATUS__last_seq_step__st_sdp_disc 7
3438#define R_SCSI1_STATUS__last_seq_step__st_cc 31
3439#define R_SCSI1_STATUS__last_seq_step__st_iwr_good 14
3440#define R_SCSI1_STATUS__last_seq_step__st_iwr_cc 23
3441#define R_SCSI1_STATUS__last_seq_step__st_wait_free_iwr_cc 17
3442#define R_SCSI1_STATUS__last_seq_step__st_wait_free_cc 20
3443#define R_SCSI1_STATUS__last_seq_step__st_wait_free_sdp_disc 16
3444#define R_SCSI1_STATUS__last_seq_step__st_manual_req 10
3445#define R_SCSI1_STATUS__last_seq_step__st_manual_din_prot 18
3446#define R_SCSI1_STATUS__valid_status__BITNR 5
3447#define R_SCSI1_STATUS__valid_status__WIDTH 1
3448#define R_SCSI1_STATUS__valid_status__yes 1
3449#define R_SCSI1_STATUS__valid_status__no 0
3450#define R_SCSI1_STATUS__seq_status__BITNR 0
3451#define R_SCSI1_STATUS__seq_status__WIDTH 5
3452#define R_SCSI1_STATUS__seq_status__info_seq_complete 0
3453#define R_SCSI1_STATUS__seq_status__info_parity_error 1
3454#define R_SCSI1_STATUS__seq_status__info_unhandled_msg_in 2
3455#define R_SCSI1_STATUS__seq_status__info_unexp_ph_change 3
3456#define R_SCSI1_STATUS__seq_status__info_arb_lost 4
3457#define R_SCSI1_STATUS__seq_status__info_sel_timeout 5
3458#define R_SCSI1_STATUS__seq_status__info_unexp_bf 6
3459#define R_SCSI1_STATUS__seq_status__info_illegal_op 7
3460#define R_SCSI1_STATUS__seq_status__info_rec_recvd 8
3461#define R_SCSI1_STATUS__seq_status__info_reselected 9
3462#define R_SCSI1_STATUS__seq_status__info_unhandled_status 10
3463#define R_SCSI1_STATUS__seq_status__info_bus_reset 11
3464#define R_SCSI1_STATUS__seq_status__info_illegal_bf 12
3465#define R_SCSI1_STATUS__seq_status__info_bus_free 13
3466
3467#define R_SCSI1_DATA_IN (IO_TYPECAST_RO_UWORD 0xb0000050)
3468#define R_SCSI1_DATA_IN__data_in__BITNR 0
3469#define R_SCSI1_DATA_IN__data_in__WIDTH 16
3470
3471/*
3472!* Interrupt mask and status registers
3473!*/
3474
3475#define R_IRQ_MASK0_RD (IO_TYPECAST_RO_UDWORD 0xb00000c0)
3476#define R_IRQ_MASK0_RD__nmi_pin__BITNR 31
3477#define R_IRQ_MASK0_RD__nmi_pin__WIDTH 1
3478#define R_IRQ_MASK0_RD__nmi_pin__active 1
3479#define R_IRQ_MASK0_RD__nmi_pin__inactive 0
3480#define R_IRQ_MASK0_RD__watchdog_nmi__BITNR 30
3481#define R_IRQ_MASK0_RD__watchdog_nmi__WIDTH 1
3482#define R_IRQ_MASK0_RD__watchdog_nmi__active 1
3483#define R_IRQ_MASK0_RD__watchdog_nmi__inactive 0
3484#define R_IRQ_MASK0_RD__sqe_test_error__BITNR 29
3485#define R_IRQ_MASK0_RD__sqe_test_error__WIDTH 1
3486#define R_IRQ_MASK0_RD__sqe_test_error__active 1
3487#define R_IRQ_MASK0_RD__sqe_test_error__inactive 0
3488#define R_IRQ_MASK0_RD__carrier_loss__BITNR 28
3489#define R_IRQ_MASK0_RD__carrier_loss__WIDTH 1
3490#define R_IRQ_MASK0_RD__carrier_loss__active 1
3491#define R_IRQ_MASK0_RD__carrier_loss__inactive 0
3492#define R_IRQ_MASK0_RD__deferred__BITNR 27
3493#define R_IRQ_MASK0_RD__deferred__WIDTH 1
3494#define R_IRQ_MASK0_RD__deferred__active 1
3495#define R_IRQ_MASK0_RD__deferred__inactive 0
3496#define R_IRQ_MASK0_RD__late_col__BITNR 26
3497#define R_IRQ_MASK0_RD__late_col__WIDTH 1
3498#define R_IRQ_MASK0_RD__late_col__active 1
3499#define R_IRQ_MASK0_RD__late_col__inactive 0
3500#define R_IRQ_MASK0_RD__multiple_col__BITNR 25
3501#define R_IRQ_MASK0_RD__multiple_col__WIDTH 1
3502#define R_IRQ_MASK0_RD__multiple_col__active 1
3503#define R_IRQ_MASK0_RD__multiple_col__inactive 0
3504#define R_IRQ_MASK0_RD__single_col__BITNR 24
3505#define R_IRQ_MASK0_RD__single_col__WIDTH 1
3506#define R_IRQ_MASK0_RD__single_col__active 1
3507#define R_IRQ_MASK0_RD__single_col__inactive 0
3508#define R_IRQ_MASK0_RD__congestion__BITNR 23
3509#define R_IRQ_MASK0_RD__congestion__WIDTH 1
3510#define R_IRQ_MASK0_RD__congestion__active 1
3511#define R_IRQ_MASK0_RD__congestion__inactive 0
3512#define R_IRQ_MASK0_RD__oversize__BITNR 22
3513#define R_IRQ_MASK0_RD__oversize__WIDTH 1
3514#define R_IRQ_MASK0_RD__oversize__active 1
3515#define R_IRQ_MASK0_RD__oversize__inactive 0
3516#define R_IRQ_MASK0_RD__alignment_error__BITNR 21
3517#define R_IRQ_MASK0_RD__alignment_error__WIDTH 1
3518#define R_IRQ_MASK0_RD__alignment_error__active 1
3519#define R_IRQ_MASK0_RD__alignment_error__inactive 0
3520#define R_IRQ_MASK0_RD__crc_error__BITNR 20
3521#define R_IRQ_MASK0_RD__crc_error__WIDTH 1
3522#define R_IRQ_MASK0_RD__crc_error__active 1
3523#define R_IRQ_MASK0_RD__crc_error__inactive 0
3524#define R_IRQ_MASK0_RD__overrun__BITNR 19
3525#define R_IRQ_MASK0_RD__overrun__WIDTH 1
3526#define R_IRQ_MASK0_RD__overrun__active 1
3527#define R_IRQ_MASK0_RD__overrun__inactive 0
3528#define R_IRQ_MASK0_RD__underrun__BITNR 18
3529#define R_IRQ_MASK0_RD__underrun__WIDTH 1
3530#define R_IRQ_MASK0_RD__underrun__active 1
3531#define R_IRQ_MASK0_RD__underrun__inactive 0
3532#define R_IRQ_MASK0_RD__excessive_col__BITNR 17
3533#define R_IRQ_MASK0_RD__excessive_col__WIDTH 1
3534#define R_IRQ_MASK0_RD__excessive_col__active 1
3535#define R_IRQ_MASK0_RD__excessive_col__inactive 0
3536#define R_IRQ_MASK0_RD__mdio__BITNR 16
3537#define R_IRQ_MASK0_RD__mdio__WIDTH 1
3538#define R_IRQ_MASK0_RD__mdio__active 1
3539#define R_IRQ_MASK0_RD__mdio__inactive 0
3540#define R_IRQ_MASK0_RD__ata_drq3__BITNR 15
3541#define R_IRQ_MASK0_RD__ata_drq3__WIDTH 1
3542#define R_IRQ_MASK0_RD__ata_drq3__active 1
3543#define R_IRQ_MASK0_RD__ata_drq3__inactive 0
3544#define R_IRQ_MASK0_RD__ata_drq2__BITNR 14
3545#define R_IRQ_MASK0_RD__ata_drq2__WIDTH 1
3546#define R_IRQ_MASK0_RD__ata_drq2__active 1
3547#define R_IRQ_MASK0_RD__ata_drq2__inactive 0
3548#define R_IRQ_MASK0_RD__ata_drq1__BITNR 13
3549#define R_IRQ_MASK0_RD__ata_drq1__WIDTH 1
3550#define R_IRQ_MASK0_RD__ata_drq1__active 1
3551#define R_IRQ_MASK0_RD__ata_drq1__inactive 0
3552#define R_IRQ_MASK0_RD__ata_drq0__BITNR 12
3553#define R_IRQ_MASK0_RD__ata_drq0__WIDTH 1
3554#define R_IRQ_MASK0_RD__ata_drq0__active 1
3555#define R_IRQ_MASK0_RD__ata_drq0__inactive 0
3556#define R_IRQ_MASK0_RD__par0_ecp_cmd__BITNR 11
3557#define R_IRQ_MASK0_RD__par0_ecp_cmd__WIDTH 1
3558#define R_IRQ_MASK0_RD__par0_ecp_cmd__active 1
3559#define R_IRQ_MASK0_RD__par0_ecp_cmd__inactive 0
3560#define R_IRQ_MASK0_RD__ata_irq3__BITNR 11
3561#define R_IRQ_MASK0_RD__ata_irq3__WIDTH 1
3562#define R_IRQ_MASK0_RD__ata_irq3__active 1
3563#define R_IRQ_MASK0_RD__ata_irq3__inactive 0
3564#define R_IRQ_MASK0_RD__par0_peri__BITNR 10
3565#define R_IRQ_MASK0_RD__par0_peri__WIDTH 1
3566#define R_IRQ_MASK0_RD__par0_peri__active 1
3567#define R_IRQ_MASK0_RD__par0_peri__inactive 0
3568#define R_IRQ_MASK0_RD__ata_irq2__BITNR 10
3569#define R_IRQ_MASK0_RD__ata_irq2__WIDTH 1
3570#define R_IRQ_MASK0_RD__ata_irq2__active 1
3571#define R_IRQ_MASK0_RD__ata_irq2__inactive 0
3572#define R_IRQ_MASK0_RD__par0_data__BITNR 9
3573#define R_IRQ_MASK0_RD__par0_data__WIDTH 1
3574#define R_IRQ_MASK0_RD__par0_data__active 1
3575#define R_IRQ_MASK0_RD__par0_data__inactive 0
3576#define R_IRQ_MASK0_RD__ata_irq1__BITNR 9
3577#define R_IRQ_MASK0_RD__ata_irq1__WIDTH 1
3578#define R_IRQ_MASK0_RD__ata_irq1__active 1
3579#define R_IRQ_MASK0_RD__ata_irq1__inactive 0
3580#define R_IRQ_MASK0_RD__par0_ready__BITNR 8
3581#define R_IRQ_MASK0_RD__par0_ready__WIDTH 1
3582#define R_IRQ_MASK0_RD__par0_ready__active 1
3583#define R_IRQ_MASK0_RD__par0_ready__inactive 0
3584#define R_IRQ_MASK0_RD__ata_irq0__BITNR 8
3585#define R_IRQ_MASK0_RD__ata_irq0__WIDTH 1
3586#define R_IRQ_MASK0_RD__ata_irq0__active 1
3587#define R_IRQ_MASK0_RD__ata_irq0__inactive 0
3588#define R_IRQ_MASK0_RD__mio__BITNR 8
3589#define R_IRQ_MASK0_RD__mio__WIDTH 1
3590#define R_IRQ_MASK0_RD__mio__active 1
3591#define R_IRQ_MASK0_RD__mio__inactive 0
3592#define R_IRQ_MASK0_RD__scsi0__BITNR 8
3593#define R_IRQ_MASK0_RD__scsi0__WIDTH 1
3594#define R_IRQ_MASK0_RD__scsi0__active 1
3595#define R_IRQ_MASK0_RD__scsi0__inactive 0
3596#define R_IRQ_MASK0_RD__ata_dmaend__BITNR 7
3597#define R_IRQ_MASK0_RD__ata_dmaend__WIDTH 1
3598#define R_IRQ_MASK0_RD__ata_dmaend__active 1
3599#define R_IRQ_MASK0_RD__ata_dmaend__inactive 0
3600#define R_IRQ_MASK0_RD__irq_ext_vector_nr__BITNR 5
3601#define R_IRQ_MASK0_RD__irq_ext_vector_nr__WIDTH 1
3602#define R_IRQ_MASK0_RD__irq_ext_vector_nr__active 1
3603#define R_IRQ_MASK0_RD__irq_ext_vector_nr__inactive 0
3604#define R_IRQ_MASK0_RD__irq_int_vector_nr__BITNR 4
3605#define R_IRQ_MASK0_RD__irq_int_vector_nr__WIDTH 1
3606#define R_IRQ_MASK0_RD__irq_int_vector_nr__active 1
3607#define R_IRQ_MASK0_RD__irq_int_vector_nr__inactive 0
3608#define R_IRQ_MASK0_RD__ext_dma1__BITNR 3
3609#define R_IRQ_MASK0_RD__ext_dma1__WIDTH 1
3610#define R_IRQ_MASK0_RD__ext_dma1__active 1
3611#define R_IRQ_MASK0_RD__ext_dma1__inactive 0
3612#define R_IRQ_MASK0_RD__ext_dma0__BITNR 2
3613#define R_IRQ_MASK0_RD__ext_dma0__WIDTH 1
3614#define R_IRQ_MASK0_RD__ext_dma0__active 1
3615#define R_IRQ_MASK0_RD__ext_dma0__inactive 0
3616#define R_IRQ_MASK0_RD__timer1__BITNR 1
3617#define R_IRQ_MASK0_RD__timer1__WIDTH 1
3618#define R_IRQ_MASK0_RD__timer1__active 1
3619#define R_IRQ_MASK0_RD__timer1__inactive 0
3620#define R_IRQ_MASK0_RD__timer0__BITNR 0
3621#define R_IRQ_MASK0_RD__timer0__WIDTH 1
3622#define R_IRQ_MASK0_RD__timer0__active 1
3623#define R_IRQ_MASK0_RD__timer0__inactive 0
3624
3625#define R_IRQ_MASK0_CLR (IO_TYPECAST_UDWORD 0xb00000c0)
3626#define R_IRQ_MASK0_CLR__nmi_pin__BITNR 31
3627#define R_IRQ_MASK0_CLR__nmi_pin__WIDTH 1
3628#define R_IRQ_MASK0_CLR__nmi_pin__clr 1
3629#define R_IRQ_MASK0_CLR__nmi_pin__nop 0
3630#define R_IRQ_MASK0_CLR__watchdog_nmi__BITNR 30
3631#define R_IRQ_MASK0_CLR__watchdog_nmi__WIDTH 1
3632#define R_IRQ_MASK0_CLR__watchdog_nmi__clr 1
3633#define R_IRQ_MASK0_CLR__watchdog_nmi__nop 0
3634#define R_IRQ_MASK0_CLR__sqe_test_error__BITNR 29
3635#define R_IRQ_MASK0_CLR__sqe_test_error__WIDTH 1
3636#define R_IRQ_MASK0_CLR__sqe_test_error__clr 1
3637#define R_IRQ_MASK0_CLR__sqe_test_error__nop 0
3638#define R_IRQ_MASK0_CLR__carrier_loss__BITNR 28
3639#define R_IRQ_MASK0_CLR__carrier_loss__WIDTH 1
3640#define R_IRQ_MASK0_CLR__carrier_loss__clr 1
3641#define R_IRQ_MASK0_CLR__carrier_loss__nop 0
3642#define R_IRQ_MASK0_CLR__deferred__BITNR 27
3643#define R_IRQ_MASK0_CLR__deferred__WIDTH 1
3644#define R_IRQ_MASK0_CLR__deferred__clr 1
3645#define R_IRQ_MASK0_CLR__deferred__nop 0
3646#define R_IRQ_MASK0_CLR__late_col__BITNR 26
3647#define R_IRQ_MASK0_CLR__late_col__WIDTH 1
3648#define R_IRQ_MASK0_CLR__late_col__clr 1
3649#define R_IRQ_MASK0_CLR__late_col__nop 0
3650#define R_IRQ_MASK0_CLR__multiple_col__BITNR 25
3651#define R_IRQ_MASK0_CLR__multiple_col__WIDTH 1
3652#define R_IRQ_MASK0_CLR__multiple_col__clr 1
3653#define R_IRQ_MASK0_CLR__multiple_col__nop 0
3654#define R_IRQ_MASK0_CLR__single_col__BITNR 24
3655#define R_IRQ_MASK0_CLR__single_col__WIDTH 1
3656#define R_IRQ_MASK0_CLR__single_col__clr 1
3657#define R_IRQ_MASK0_CLR__single_col__nop 0
3658#define R_IRQ_MASK0_CLR__congestion__BITNR 23
3659#define R_IRQ_MASK0_CLR__congestion__WIDTH 1
3660#define R_IRQ_MASK0_CLR__congestion__clr 1
3661#define R_IRQ_MASK0_CLR__congestion__nop 0
3662#define R_IRQ_MASK0_CLR__oversize__BITNR 22
3663#define R_IRQ_MASK0_CLR__oversize__WIDTH 1
3664#define R_IRQ_MASK0_CLR__oversize__clr 1
3665#define R_IRQ_MASK0_CLR__oversize__nop 0
3666#define R_IRQ_MASK0_CLR__alignment_error__BITNR 21
3667#define R_IRQ_MASK0_CLR__alignment_error__WIDTH 1
3668#define R_IRQ_MASK0_CLR__alignment_error__clr 1
3669#define R_IRQ_MASK0_CLR__alignment_error__nop 0
3670#define R_IRQ_MASK0_CLR__crc_error__BITNR 20
3671#define R_IRQ_MASK0_CLR__crc_error__WIDTH 1
3672#define R_IRQ_MASK0_CLR__crc_error__clr 1
3673#define R_IRQ_MASK0_CLR__crc_error__nop 0
3674#define R_IRQ_MASK0_CLR__overrun__BITNR 19
3675#define R_IRQ_MASK0_CLR__overrun__WIDTH 1
3676#define R_IRQ_MASK0_CLR__overrun__clr 1
3677#define R_IRQ_MASK0_CLR__overrun__nop 0
3678#define R_IRQ_MASK0_CLR__underrun__BITNR 18
3679#define R_IRQ_MASK0_CLR__underrun__WIDTH 1
3680#define R_IRQ_MASK0_CLR__underrun__clr 1
3681#define R_IRQ_MASK0_CLR__underrun__nop 0
3682#define R_IRQ_MASK0_CLR__excessive_col__BITNR 17
3683#define R_IRQ_MASK0_CLR__excessive_col__WIDTH 1
3684#define R_IRQ_MASK0_CLR__excessive_col__clr 1
3685#define R_IRQ_MASK0_CLR__excessive_col__nop 0
3686#define R_IRQ_MASK0_CLR__mdio__BITNR 16
3687#define R_IRQ_MASK0_CLR__mdio__WIDTH 1
3688#define R_IRQ_MASK0_CLR__mdio__clr 1
3689#define R_IRQ_MASK0_CLR__mdio__nop 0
3690#define R_IRQ_MASK0_CLR__ata_drq3__BITNR 15
3691#define R_IRQ_MASK0_CLR__ata_drq3__WIDTH 1
3692#define R_IRQ_MASK0_CLR__ata_drq3__clr 1
3693#define R_IRQ_MASK0_CLR__ata_drq3__nop 0
3694#define R_IRQ_MASK0_CLR__ata_drq2__BITNR 14
3695#define R_IRQ_MASK0_CLR__ata_drq2__WIDTH 1
3696#define R_IRQ_MASK0_CLR__ata_drq2__clr 1
3697#define R_IRQ_MASK0_CLR__ata_drq2__nop 0
3698#define R_IRQ_MASK0_CLR__ata_drq1__BITNR 13
3699#define R_IRQ_MASK0_CLR__ata_drq1__WIDTH 1
3700#define R_IRQ_MASK0_CLR__ata_drq1__clr 1
3701#define R_IRQ_MASK0_CLR__ata_drq1__nop 0
3702#define R_IRQ_MASK0_CLR__ata_drq0__BITNR 12
3703#define R_IRQ_MASK0_CLR__ata_drq0__WIDTH 1
3704#define R_IRQ_MASK0_CLR__ata_drq0__clr 1
3705#define R_IRQ_MASK0_CLR__ata_drq0__nop 0
3706#define R_IRQ_MASK0_CLR__par0_ecp_cmd__BITNR 11
3707#define R_IRQ_MASK0_CLR__par0_ecp_cmd__WIDTH 1
3708#define R_IRQ_MASK0_CLR__par0_ecp_cmd__clr 1
3709#define R_IRQ_MASK0_CLR__par0_ecp_cmd__nop 0
3710#define R_IRQ_MASK0_CLR__ata_irq3__BITNR 11
3711#define R_IRQ_MASK0_CLR__ata_irq3__WIDTH 1
3712#define R_IRQ_MASK0_CLR__ata_irq3__clr 1
3713#define R_IRQ_MASK0_CLR__ata_irq3__nop 0
3714#define R_IRQ_MASK0_CLR__par0_peri__BITNR 10
3715#define R_IRQ_MASK0_CLR__par0_peri__WIDTH 1
3716#define R_IRQ_MASK0_CLR__par0_peri__clr 1
3717#define R_IRQ_MASK0_CLR__par0_peri__nop 0
3718#define R_IRQ_MASK0_CLR__ata_irq2__BITNR 10
3719#define R_IRQ_MASK0_CLR__ata_irq2__WIDTH 1
3720#define R_IRQ_MASK0_CLR__ata_irq2__clr 1
3721#define R_IRQ_MASK0_CLR__ata_irq2__nop 0
3722#define R_IRQ_MASK0_CLR__par0_data__BITNR 9
3723#define R_IRQ_MASK0_CLR__par0_data__WIDTH 1
3724#define R_IRQ_MASK0_CLR__par0_data__clr 1
3725#define R_IRQ_MASK0_CLR__par0_data__nop 0
3726#define R_IRQ_MASK0_CLR__ata_irq1__BITNR 9
3727#define R_IRQ_MASK0_CLR__ata_irq1__WIDTH 1
3728#define R_IRQ_MASK0_CLR__ata_irq1__clr 1
3729#define R_IRQ_MASK0_CLR__ata_irq1__nop 0
3730#define R_IRQ_MASK0_CLR__par0_ready__BITNR 8
3731#define R_IRQ_MASK0_CLR__par0_ready__WIDTH 1
3732#define R_IRQ_MASK0_CLR__par0_ready__clr 1
3733#define R_IRQ_MASK0_CLR__par0_ready__nop 0
3734#define R_IRQ_MASK0_CLR__ata_irq0__BITNR 8
3735#define R_IRQ_MASK0_CLR__ata_irq0__WIDTH 1
3736#define R_IRQ_MASK0_CLR__ata_irq0__clr 1
3737#define R_IRQ_MASK0_CLR__ata_irq0__nop 0
3738#define R_IRQ_MASK0_CLR__mio__BITNR 8
3739#define R_IRQ_MASK0_CLR__mio__WIDTH 1
3740#define R_IRQ_MASK0_CLR__mio__clr 1
3741#define R_IRQ_MASK0_CLR__mio__nop 0
3742#define R_IRQ_MASK0_CLR__scsi0__BITNR 8
3743#define R_IRQ_MASK0_CLR__scsi0__WIDTH 1
3744#define R_IRQ_MASK0_CLR__scsi0__clr 1
3745#define R_IRQ_MASK0_CLR__scsi0__nop 0
3746#define R_IRQ_MASK0_CLR__ata_dmaend__BITNR 7
3747#define R_IRQ_MASK0_CLR__ata_dmaend__WIDTH 1
3748#define R_IRQ_MASK0_CLR__ata_dmaend__clr 1
3749#define R_IRQ_MASK0_CLR__ata_dmaend__nop 0
3750#define R_IRQ_MASK0_CLR__irq_ext_vector_nr__BITNR 5
3751#define R_IRQ_MASK0_CLR__irq_ext_vector_nr__WIDTH 1
3752#define R_IRQ_MASK0_CLR__irq_ext_vector_nr__clr 1
3753#define R_IRQ_MASK0_CLR__irq_ext_vector_nr__nop 0
3754#define R_IRQ_MASK0_CLR__irq_int_vector_nr__BITNR 4
3755#define R_IRQ_MASK0_CLR__irq_int_vector_nr__WIDTH 1
3756#define R_IRQ_MASK0_CLR__irq_int_vector_nr__clr 1
3757#define R_IRQ_MASK0_CLR__irq_int_vector_nr__nop 0
3758#define R_IRQ_MASK0_CLR__ext_dma1__BITNR 3
3759#define R_IRQ_MASK0_CLR__ext_dma1__WIDTH 1
3760#define R_IRQ_MASK0_CLR__ext_dma1__clr 1
3761#define R_IRQ_MASK0_CLR__ext_dma1__nop 0
3762#define R_IRQ_MASK0_CLR__ext_dma0__BITNR 2
3763#define R_IRQ_MASK0_CLR__ext_dma0__WIDTH 1
3764#define R_IRQ_MASK0_CLR__ext_dma0__clr 1
3765#define R_IRQ_MASK0_CLR__ext_dma0__nop 0
3766#define R_IRQ_MASK0_CLR__timer1__BITNR 1
3767#define R_IRQ_MASK0_CLR__timer1__WIDTH 1
3768#define R_IRQ_MASK0_CLR__timer1__clr 1
3769#define R_IRQ_MASK0_CLR__timer1__nop 0
3770#define R_IRQ_MASK0_CLR__timer0__BITNR 0
3771#define R_IRQ_MASK0_CLR__timer0__WIDTH 1
3772#define R_IRQ_MASK0_CLR__timer0__clr 1
3773#define R_IRQ_MASK0_CLR__timer0__nop 0
3774
3775#define R_IRQ_READ0 (IO_TYPECAST_RO_UDWORD 0xb00000c4)
3776#define R_IRQ_READ0__nmi_pin__BITNR 31
3777#define R_IRQ_READ0__nmi_pin__WIDTH 1
3778#define R_IRQ_READ0__nmi_pin__active 1
3779#define R_IRQ_READ0__nmi_pin__inactive 0
3780#define R_IRQ_READ0__watchdog_nmi__BITNR 30
3781#define R_IRQ_READ0__watchdog_nmi__WIDTH 1
3782#define R_IRQ_READ0__watchdog_nmi__active 1
3783#define R_IRQ_READ0__watchdog_nmi__inactive 0
3784#define R_IRQ_READ0__sqe_test_error__BITNR 29
3785#define R_IRQ_READ0__sqe_test_error__WIDTH 1
3786#define R_IRQ_READ0__sqe_test_error__active 1
3787#define R_IRQ_READ0__sqe_test_error__inactive 0
3788#define R_IRQ_READ0__carrier_loss__BITNR 28
3789#define R_IRQ_READ0__carrier_loss__WIDTH 1
3790#define R_IRQ_READ0__carrier_loss__active 1
3791#define R_IRQ_READ0__carrier_loss__inactive 0
3792#define R_IRQ_READ0__deferred__BITNR 27
3793#define R_IRQ_READ0__deferred__WIDTH 1
3794#define R_IRQ_READ0__deferred__active 1
3795#define R_IRQ_READ0__deferred__inactive 0
3796#define R_IRQ_READ0__late_col__BITNR 26
3797#define R_IRQ_READ0__late_col__WIDTH 1
3798#define R_IRQ_READ0__late_col__active 1
3799#define R_IRQ_READ0__late_col__inactive 0
3800#define R_IRQ_READ0__multiple_col__BITNR 25
3801#define R_IRQ_READ0__multiple_col__WIDTH 1
3802#define R_IRQ_READ0__multiple_col__active 1
3803#define R_IRQ_READ0__multiple_col__inactive 0
3804#define R_IRQ_READ0__single_col__BITNR 24
3805#define R_IRQ_READ0__single_col__WIDTH 1
3806#define R_IRQ_READ0__single_col__active 1
3807#define R_IRQ_READ0__single_col__inactive 0
3808#define R_IRQ_READ0__congestion__BITNR 23
3809#define R_IRQ_READ0__congestion__WIDTH 1
3810#define R_IRQ_READ0__congestion__active 1
3811#define R_IRQ_READ0__congestion__inactive 0
3812#define R_IRQ_READ0__oversize__BITNR 22
3813#define R_IRQ_READ0__oversize__WIDTH 1
3814#define R_IRQ_READ0__oversize__active 1
3815#define R_IRQ_READ0__oversize__inactive 0
3816#define R_IRQ_READ0__alignment_error__BITNR 21
3817#define R_IRQ_READ0__alignment_error__WIDTH 1
3818#define R_IRQ_READ0__alignment_error__active 1
3819#define R_IRQ_READ0__alignment_error__inactive 0
3820#define R_IRQ_READ0__crc_error__BITNR 20
3821#define R_IRQ_READ0__crc_error__WIDTH 1
3822#define R_IRQ_READ0__crc_error__active 1
3823#define R_IRQ_READ0__crc_error__inactive 0
3824#define R_IRQ_READ0__overrun__BITNR 19
3825#define R_IRQ_READ0__overrun__WIDTH 1
3826#define R_IRQ_READ0__overrun__active 1
3827#define R_IRQ_READ0__overrun__inactive 0
3828#define R_IRQ_READ0__underrun__BITNR 18
3829#define R_IRQ_READ0__underrun__WIDTH 1
3830#define R_IRQ_READ0__underrun__active 1
3831#define R_IRQ_READ0__underrun__inactive 0
3832#define R_IRQ_READ0__excessive_col__BITNR 17
3833#define R_IRQ_READ0__excessive_col__WIDTH 1
3834#define R_IRQ_READ0__excessive_col__active 1
3835#define R_IRQ_READ0__excessive_col__inactive 0
3836#define R_IRQ_READ0__mdio__BITNR 16
3837#define R_IRQ_READ0__mdio__WIDTH 1
3838#define R_IRQ_READ0__mdio__active 1
3839#define R_IRQ_READ0__mdio__inactive 0
3840#define R_IRQ_READ0__ata_drq3__BITNR 15
3841#define R_IRQ_READ0__ata_drq3__WIDTH 1
3842#define R_IRQ_READ0__ata_drq3__active 1
3843#define R_IRQ_READ0__ata_drq3__inactive 0
3844#define R_IRQ_READ0__ata_drq2__BITNR 14
3845#define R_IRQ_READ0__ata_drq2__WIDTH 1
3846#define R_IRQ_READ0__ata_drq2__active 1
3847#define R_IRQ_READ0__ata_drq2__inactive 0
3848#define R_IRQ_READ0__ata_drq1__BITNR 13
3849#define R_IRQ_READ0__ata_drq1__WIDTH 1
3850#define R_IRQ_READ0__ata_drq1__active 1
3851#define R_IRQ_READ0__ata_drq1__inactive 0
3852#define R_IRQ_READ0__ata_drq0__BITNR 12
3853#define R_IRQ_READ0__ata_drq0__WIDTH 1
3854#define R_IRQ_READ0__ata_drq0__active 1
3855#define R_IRQ_READ0__ata_drq0__inactive 0
3856#define R_IRQ_READ0__par0_ecp_cmd__BITNR 11
3857#define R_IRQ_READ0__par0_ecp_cmd__WIDTH 1
3858#define R_IRQ_READ0__par0_ecp_cmd__active 1
3859#define R_IRQ_READ0__par0_ecp_cmd__inactive 0
3860#define R_IRQ_READ0__ata_irq3__BITNR 11
3861#define R_IRQ_READ0__ata_irq3__WIDTH 1
3862#define R_IRQ_READ0__ata_irq3__active 1
3863#define R_IRQ_READ0__ata_irq3__inactive 0
3864#define R_IRQ_READ0__par0_peri__BITNR 10
3865#define R_IRQ_READ0__par0_peri__WIDTH 1
3866#define R_IRQ_READ0__par0_peri__active 1
3867#define R_IRQ_READ0__par0_peri__inactive 0
3868#define R_IRQ_READ0__ata_irq2__BITNR 10
3869#define R_IRQ_READ0__ata_irq2__WIDTH 1
3870#define R_IRQ_READ0__ata_irq2__active 1
3871#define R_IRQ_READ0__ata_irq2__inactive 0
3872#define R_IRQ_READ0__par0_data__BITNR 9
3873#define R_IRQ_READ0__par0_data__WIDTH 1
3874#define R_IRQ_READ0__par0_data__active 1
3875#define R_IRQ_READ0__par0_data__inactive 0
3876#define R_IRQ_READ0__ata_irq1__BITNR 9
3877#define R_IRQ_READ0__ata_irq1__WIDTH 1
3878#define R_IRQ_READ0__ata_irq1__active 1
3879#define R_IRQ_READ0__ata_irq1__inactive 0
3880#define R_IRQ_READ0__par0_ready__BITNR 8
3881#define R_IRQ_READ0__par0_ready__WIDTH 1
3882#define R_IRQ_READ0__par0_ready__active 1
3883#define R_IRQ_READ0__par0_ready__inactive 0
3884#define R_IRQ_READ0__ata_irq0__BITNR 8
3885#define R_IRQ_READ0__ata_irq0__WIDTH 1
3886#define R_IRQ_READ0__ata_irq0__active 1
3887#define R_IRQ_READ0__ata_irq0__inactive 0
3888#define R_IRQ_READ0__mio__BITNR 8
3889#define R_IRQ_READ0__mio__WIDTH 1
3890#define R_IRQ_READ0__mio__active 1
3891#define R_IRQ_READ0__mio__inactive 0
3892#define R_IRQ_READ0__scsi0__BITNR 8
3893#define R_IRQ_READ0__scsi0__WIDTH 1
3894#define R_IRQ_READ0__scsi0__active 1
3895#define R_IRQ_READ0__scsi0__inactive 0
3896#define R_IRQ_READ0__ata_dmaend__BITNR 7
3897#define R_IRQ_READ0__ata_dmaend__WIDTH 1
3898#define R_IRQ_READ0__ata_dmaend__active 1
3899#define R_IRQ_READ0__ata_dmaend__inactive 0
3900#define R_IRQ_READ0__irq_ext_vector_nr__BITNR 5
3901#define R_IRQ_READ0__irq_ext_vector_nr__WIDTH 1
3902#define R_IRQ_READ0__irq_ext_vector_nr__active 1
3903#define R_IRQ_READ0__irq_ext_vector_nr__inactive 0
3904#define R_IRQ_READ0__irq_int_vector_nr__BITNR 4
3905#define R_IRQ_READ0__irq_int_vector_nr__WIDTH 1
3906#define R_IRQ_READ0__irq_int_vector_nr__active 1
3907#define R_IRQ_READ0__irq_int_vector_nr__inactive 0
3908#define R_IRQ_READ0__ext_dma1__BITNR 3
3909#define R_IRQ_READ0__ext_dma1__WIDTH 1
3910#define R_IRQ_READ0__ext_dma1__active 1
3911#define R_IRQ_READ0__ext_dma1__inactive 0
3912#define R_IRQ_READ0__ext_dma0__BITNR 2
3913#define R_IRQ_READ0__ext_dma0__WIDTH 1
3914#define R_IRQ_READ0__ext_dma0__active 1
3915#define R_IRQ_READ0__ext_dma0__inactive 0
3916#define R_IRQ_READ0__timer1__BITNR 1
3917#define R_IRQ_READ0__timer1__WIDTH 1
3918#define R_IRQ_READ0__timer1__active 1
3919#define R_IRQ_READ0__timer1__inactive 0
3920#define R_IRQ_READ0__timer0__BITNR 0
3921#define R_IRQ_READ0__timer0__WIDTH 1
3922#define R_IRQ_READ0__timer0__active 1
3923#define R_IRQ_READ0__timer0__inactive 0
3924
3925#define R_IRQ_MASK0_SET (IO_TYPECAST_UDWORD 0xb00000c4)
3926#define R_IRQ_MASK0_SET__nmi_pin__BITNR 31
3927#define R_IRQ_MASK0_SET__nmi_pin__WIDTH 1
3928#define R_IRQ_MASK0_SET__nmi_pin__set 1
3929#define R_IRQ_MASK0_SET__nmi_pin__nop 0
3930#define R_IRQ_MASK0_SET__watchdog_nmi__BITNR 30
3931#define R_IRQ_MASK0_SET__watchdog_nmi__WIDTH 1
3932#define R_IRQ_MASK0_SET__watchdog_nmi__set 1
3933#define R_IRQ_MASK0_SET__watchdog_nmi__nop 0
3934#define R_IRQ_MASK0_SET__sqe_test_error__BITNR 29
3935#define R_IRQ_MASK0_SET__sqe_test_error__WIDTH 1
3936#define R_IRQ_MASK0_SET__sqe_test_error__set 1
3937#define R_IRQ_MASK0_SET__sqe_test_error__nop 0
3938#define R_IRQ_MASK0_SET__carrier_loss__BITNR 28
3939#define R_IRQ_MASK0_SET__carrier_loss__WIDTH 1
3940#define R_IRQ_MASK0_SET__carrier_loss__set 1
3941#define R_IRQ_MASK0_SET__carrier_loss__nop 0
3942#define R_IRQ_MASK0_SET__deferred__BITNR 27
3943#define R_IRQ_MASK0_SET__deferred__WIDTH 1
3944#define R_IRQ_MASK0_SET__deferred__set 1
3945#define R_IRQ_MASK0_SET__deferred__nop 0
3946#define R_IRQ_MASK0_SET__late_col__BITNR 26
3947#define R_IRQ_MASK0_SET__late_col__WIDTH 1
3948#define R_IRQ_MASK0_SET__late_col__set 1
3949#define R_IRQ_MASK0_SET__late_col__nop 0
3950#define R_IRQ_MASK0_SET__multiple_col__BITNR 25
3951#define R_IRQ_MASK0_SET__multiple_col__WIDTH 1
3952#define R_IRQ_MASK0_SET__multiple_col__set 1
3953#define R_IRQ_MASK0_SET__multiple_col__nop 0
3954#define R_IRQ_MASK0_SET__single_col__BITNR 24
3955#define R_IRQ_MASK0_SET__single_col__WIDTH 1
3956#define R_IRQ_MASK0_SET__single_col__set 1
3957#define R_IRQ_MASK0_SET__single_col__nop 0
3958#define R_IRQ_MASK0_SET__congestion__BITNR 23
3959#define R_IRQ_MASK0_SET__congestion__WIDTH 1
3960#define R_IRQ_MASK0_SET__congestion__set 1
3961#define R_IRQ_MASK0_SET__congestion__nop 0
3962#define R_IRQ_MASK0_SET__oversize__BITNR 22
3963#define R_IRQ_MASK0_SET__oversize__WIDTH 1
3964#define R_IRQ_MASK0_SET__oversize__set 1
3965#define R_IRQ_MASK0_SET__oversize__nop 0
3966#define R_IRQ_MASK0_SET__alignment_error__BITNR 21
3967#define R_IRQ_MASK0_SET__alignment_error__WIDTH 1
3968#define R_IRQ_MASK0_SET__alignment_error__set 1
3969#define R_IRQ_MASK0_SET__alignment_error__nop 0
3970#define R_IRQ_MASK0_SET__crc_error__BITNR 20
3971#define R_IRQ_MASK0_SET__crc_error__WIDTH 1
3972#define R_IRQ_MASK0_SET__crc_error__set 1
3973#define R_IRQ_MASK0_SET__crc_error__nop 0
3974#define R_IRQ_MASK0_SET__overrun__BITNR 19
3975#define R_IRQ_MASK0_SET__overrun__WIDTH 1
3976#define R_IRQ_MASK0_SET__overrun__set 1
3977#define R_IRQ_MASK0_SET__overrun__nop 0
3978#define R_IRQ_MASK0_SET__underrun__BITNR 18
3979#define R_IRQ_MASK0_SET__underrun__WIDTH 1
3980#define R_IRQ_MASK0_SET__underrun__set 1
3981#define R_IRQ_MASK0_SET__underrun__nop 0
3982#define R_IRQ_MASK0_SET__excessive_col__BITNR 17
3983#define R_IRQ_MASK0_SET__excessive_col__WIDTH 1
3984#define R_IRQ_MASK0_SET__excessive_col__set 1
3985#define R_IRQ_MASK0_SET__excessive_col__nop 0
3986#define R_IRQ_MASK0_SET__mdio__BITNR 16
3987#define R_IRQ_MASK0_SET__mdio__WIDTH 1
3988#define R_IRQ_MASK0_SET__mdio__set 1
3989#define R_IRQ_MASK0_SET__mdio__nop 0
3990#define R_IRQ_MASK0_SET__ata_drq3__BITNR 15
3991#define R_IRQ_MASK0_SET__ata_drq3__WIDTH 1
3992#define R_IRQ_MASK0_SET__ata_drq3__set 1
3993#define R_IRQ_MASK0_SET__ata_drq3__nop 0
3994#define R_IRQ_MASK0_SET__ata_drq2__BITNR 14
3995#define R_IRQ_MASK0_SET__ata_drq2__WIDTH 1
3996#define R_IRQ_MASK0_SET__ata_drq2__set 1
3997#define R_IRQ_MASK0_SET__ata_drq2__nop 0
3998#define R_IRQ_MASK0_SET__ata_drq1__BITNR 13
3999#define R_IRQ_MASK0_SET__ata_drq1__WIDTH 1
4000#define R_IRQ_MASK0_SET__ata_drq1__set 1
4001#define R_IRQ_MASK0_SET__ata_drq1__nop 0
4002#define R_IRQ_MASK0_SET__ata_drq0__BITNR 12
4003#define R_IRQ_MASK0_SET__ata_drq0__WIDTH 1
4004#define R_IRQ_MASK0_SET__ata_drq0__set 1
4005#define R_IRQ_MASK0_SET__ata_drq0__nop 0
4006#define R_IRQ_MASK0_SET__par0_ecp_cmd__BITNR 11
4007#define R_IRQ_MASK0_SET__par0_ecp_cmd__WIDTH 1
4008#define R_IRQ_MASK0_SET__par0_ecp_cmd__set 1
4009#define R_IRQ_MASK0_SET__par0_ecp_cmd__nop 0
4010#define R_IRQ_MASK0_SET__ata_irq3__BITNR 11
4011#define R_IRQ_MASK0_SET__ata_irq3__WIDTH 1
4012#define R_IRQ_MASK0_SET__ata_irq3__set 1
4013#define R_IRQ_MASK0_SET__ata_irq3__nop 0
4014#define R_IRQ_MASK0_SET__par0_peri__BITNR 10
4015#define R_IRQ_MASK0_SET__par0_peri__WIDTH 1
4016#define R_IRQ_MASK0_SET__par0_peri__set 1
4017#define R_IRQ_MASK0_SET__par0_peri__nop 0
4018#define R_IRQ_MASK0_SET__ata_irq2__BITNR 10
4019#define R_IRQ_MASK0_SET__ata_irq2__WIDTH 1
4020#define R_IRQ_MASK0_SET__ata_irq2__set 1
4021#define R_IRQ_MASK0_SET__ata_irq2__nop 0
4022#define R_IRQ_MASK0_SET__par0_data__BITNR 9
4023#define R_IRQ_MASK0_SET__par0_data__WIDTH 1
4024#define R_IRQ_MASK0_SET__par0_data__set 1
4025#define R_IRQ_MASK0_SET__par0_data__nop 0
4026#define R_IRQ_MASK0_SET__ata_irq1__BITNR 9
4027#define R_IRQ_MASK0_SET__ata_irq1__WIDTH 1
4028#define R_IRQ_MASK0_SET__ata_irq1__set 1
4029#define R_IRQ_MASK0_SET__ata_irq1__nop 0
4030#define R_IRQ_MASK0_SET__par0_ready__BITNR 8
4031#define R_IRQ_MASK0_SET__par0_ready__WIDTH 1
4032#define R_IRQ_MASK0_SET__par0_ready__set 1
4033#define R_IRQ_MASK0_SET__par0_ready__nop 0
4034#define R_IRQ_MASK0_SET__ata_irq0__BITNR 8
4035#define R_IRQ_MASK0_SET__ata_irq0__WIDTH 1
4036#define R_IRQ_MASK0_SET__ata_irq0__set 1
4037#define R_IRQ_MASK0_SET__ata_irq0__nop 0
4038#define R_IRQ_MASK0_SET__mio__BITNR 8
4039#define R_IRQ_MASK0_SET__mio__WIDTH 1
4040#define R_IRQ_MASK0_SET__mio__set 1
4041#define R_IRQ_MASK0_SET__mio__nop 0
4042#define R_IRQ_MASK0_SET__scsi0__BITNR 8
4043#define R_IRQ_MASK0_SET__scsi0__WIDTH 1
4044#define R_IRQ_MASK0_SET__scsi0__set 1
4045#define R_IRQ_MASK0_SET__scsi0__nop 0
4046#define R_IRQ_MASK0_SET__ata_dmaend__BITNR 7
4047#define R_IRQ_MASK0_SET__ata_dmaend__WIDTH 1
4048#define R_IRQ_MASK0_SET__ata_dmaend__set 1
4049#define R_IRQ_MASK0_SET__ata_dmaend__nop 0
4050#define R_IRQ_MASK0_SET__irq_ext_vector_nr__BITNR 5
4051#define R_IRQ_MASK0_SET__irq_ext_vector_nr__WIDTH 1
4052#define R_IRQ_MASK0_SET__irq_ext_vector_nr__set 1
4053#define R_IRQ_MASK0_SET__irq_ext_vector_nr__nop 0
4054#define R_IRQ_MASK0_SET__irq_int_vector_nr__BITNR 4
4055#define R_IRQ_MASK0_SET__irq_int_vector_nr__WIDTH 1
4056#define R_IRQ_MASK0_SET__irq_int_vector_nr__set 1
4057#define R_IRQ_MASK0_SET__irq_int_vector_nr__nop 0
4058#define R_IRQ_MASK0_SET__ext_dma1__BITNR 3
4059#define R_IRQ_MASK0_SET__ext_dma1__WIDTH 1
4060#define R_IRQ_MASK0_SET__ext_dma1__set 1
4061#define R_IRQ_MASK0_SET__ext_dma1__nop 0
4062#define R_IRQ_MASK0_SET__ext_dma0__BITNR 2
4063#define R_IRQ_MASK0_SET__ext_dma0__WIDTH 1
4064#define R_IRQ_MASK0_SET__ext_dma0__set 1
4065#define R_IRQ_MASK0_SET__ext_dma0__nop 0
4066#define R_IRQ_MASK0_SET__timer1__BITNR 1
4067#define R_IRQ_MASK0_SET__timer1__WIDTH 1
4068#define R_IRQ_MASK0_SET__timer1__set 1
4069#define R_IRQ_MASK0_SET__timer1__nop 0
4070#define R_IRQ_MASK0_SET__timer0__BITNR 0
4071#define R_IRQ_MASK0_SET__timer0__WIDTH 1
4072#define R_IRQ_MASK0_SET__timer0__set 1
4073#define R_IRQ_MASK0_SET__timer0__nop 0
4074
4075#define R_IRQ_MASK1_RD (IO_TYPECAST_RO_UDWORD 0xb00000c8)
4076#define R_IRQ_MASK1_RD__sw_int7__BITNR 31
4077#define R_IRQ_MASK1_RD__sw_int7__WIDTH 1
4078#define R_IRQ_MASK1_RD__sw_int7__active 1
4079#define R_IRQ_MASK1_RD__sw_int7__inactive 0
4080#define R_IRQ_MASK1_RD__sw_int6__BITNR 30
4081#define R_IRQ_MASK1_RD__sw_int6__WIDTH 1
4082#define R_IRQ_MASK1_RD__sw_int6__active 1
4083#define R_IRQ_MASK1_RD__sw_int6__inactive 0
4084#define R_IRQ_MASK1_RD__sw_int5__BITNR 29
4085#define R_IRQ_MASK1_RD__sw_int5__WIDTH 1
4086#define R_IRQ_MASK1_RD__sw_int5__active 1
4087#define R_IRQ_MASK1_RD__sw_int5__inactive 0
4088#define R_IRQ_MASK1_RD__sw_int4__BITNR 28
4089#define R_IRQ_MASK1_RD__sw_int4__WIDTH 1
4090#define R_IRQ_MASK1_RD__sw_int4__active 1
4091#define R_IRQ_MASK1_RD__sw_int4__inactive 0
4092#define R_IRQ_MASK1_RD__sw_int3__BITNR 27
4093#define R_IRQ_MASK1_RD__sw_int3__WIDTH 1
4094#define R_IRQ_MASK1_RD__sw_int3__active 1
4095#define R_IRQ_MASK1_RD__sw_int3__inactive 0
4096#define R_IRQ_MASK1_RD__sw_int2__BITNR 26
4097#define R_IRQ_MASK1_RD__sw_int2__WIDTH 1
4098#define R_IRQ_MASK1_RD__sw_int2__active 1
4099#define R_IRQ_MASK1_RD__sw_int2__inactive 0
4100#define R_IRQ_MASK1_RD__sw_int1__BITNR 25
4101#define R_IRQ_MASK1_RD__sw_int1__WIDTH 1
4102#define R_IRQ_MASK1_RD__sw_int1__active 1
4103#define R_IRQ_MASK1_RD__sw_int1__inactive 0
4104#define R_IRQ_MASK1_RD__sw_int0__BITNR 24
4105#define R_IRQ_MASK1_RD__sw_int0__WIDTH 1
4106#define R_IRQ_MASK1_RD__sw_int0__active 1
4107#define R_IRQ_MASK1_RD__sw_int0__inactive 0
4108#define R_IRQ_MASK1_RD__par1_ecp_cmd__BITNR 19
4109#define R_IRQ_MASK1_RD__par1_ecp_cmd__WIDTH 1
4110#define R_IRQ_MASK1_RD__par1_ecp_cmd__active 1
4111#define R_IRQ_MASK1_RD__par1_ecp_cmd__inactive 0
4112#define R_IRQ_MASK1_RD__par1_peri__BITNR 18
4113#define R_IRQ_MASK1_RD__par1_peri__WIDTH 1
4114#define R_IRQ_MASK1_RD__par1_peri__active 1
4115#define R_IRQ_MASK1_RD__par1_peri__inactive 0
4116#define R_IRQ_MASK1_RD__par1_data__BITNR 17
4117#define R_IRQ_MASK1_RD__par1_data__WIDTH 1
4118#define R_IRQ_MASK1_RD__par1_data__active 1
4119#define R_IRQ_MASK1_RD__par1_data__inactive 0
4120#define R_IRQ_MASK1_RD__par1_ready__BITNR 16
4121#define R_IRQ_MASK1_RD__par1_ready__WIDTH 1
4122#define R_IRQ_MASK1_RD__par1_ready__active 1
4123#define R_IRQ_MASK1_RD__par1_ready__inactive 0
4124#define R_IRQ_MASK1_RD__scsi1__BITNR 16
4125#define R_IRQ_MASK1_RD__scsi1__WIDTH 1
4126#define R_IRQ_MASK1_RD__scsi1__active 1
4127#define R_IRQ_MASK1_RD__scsi1__inactive 0
4128#define R_IRQ_MASK1_RD__ser3_ready__BITNR 15
4129#define R_IRQ_MASK1_RD__ser3_ready__WIDTH 1
4130#define R_IRQ_MASK1_RD__ser3_ready__active 1
4131#define R_IRQ_MASK1_RD__ser3_ready__inactive 0
4132#define R_IRQ_MASK1_RD__ser3_data__BITNR 14
4133#define R_IRQ_MASK1_RD__ser3_data__WIDTH 1
4134#define R_IRQ_MASK1_RD__ser3_data__active 1
4135#define R_IRQ_MASK1_RD__ser3_data__inactive 0
4136#define R_IRQ_MASK1_RD__ser2_ready__BITNR 13
4137#define R_IRQ_MASK1_RD__ser2_ready__WIDTH 1
4138#define R_IRQ_MASK1_RD__ser2_ready__active 1
4139#define R_IRQ_MASK1_RD__ser2_ready__inactive 0
4140#define R_IRQ_MASK1_RD__ser2_data__BITNR 12
4141#define R_IRQ_MASK1_RD__ser2_data__WIDTH 1
4142#define R_IRQ_MASK1_RD__ser2_data__active 1
4143#define R_IRQ_MASK1_RD__ser2_data__inactive 0
4144#define R_IRQ_MASK1_RD__ser1_ready__BITNR 11
4145#define R_IRQ_MASK1_RD__ser1_ready__WIDTH 1
4146#define R_IRQ_MASK1_RD__ser1_ready__active 1
4147#define R_IRQ_MASK1_RD__ser1_ready__inactive 0
4148#define R_IRQ_MASK1_RD__ser1_data__BITNR 10
4149#define R_IRQ_MASK1_RD__ser1_data__WIDTH 1
4150#define R_IRQ_MASK1_RD__ser1_data__active 1
4151#define R_IRQ_MASK1_RD__ser1_data__inactive 0
4152#define R_IRQ_MASK1_RD__ser0_ready__BITNR 9
4153#define R_IRQ_MASK1_RD__ser0_ready__WIDTH 1
4154#define R_IRQ_MASK1_RD__ser0_ready__active 1
4155#define R_IRQ_MASK1_RD__ser0_ready__inactive 0
4156#define R_IRQ_MASK1_RD__ser0_data__BITNR 8
4157#define R_IRQ_MASK1_RD__ser0_data__WIDTH 1
4158#define R_IRQ_MASK1_RD__ser0_data__active 1
4159#define R_IRQ_MASK1_RD__ser0_data__inactive 0
4160#define R_IRQ_MASK1_RD__pa7__BITNR 7
4161#define R_IRQ_MASK1_RD__pa7__WIDTH 1
4162#define R_IRQ_MASK1_RD__pa7__active 1
4163#define R_IRQ_MASK1_RD__pa7__inactive 0
4164#define R_IRQ_MASK1_RD__pa6__BITNR 6
4165#define R_IRQ_MASK1_RD__pa6__WIDTH 1
4166#define R_IRQ_MASK1_RD__pa6__active 1
4167#define R_IRQ_MASK1_RD__pa6__inactive 0
4168#define R_IRQ_MASK1_RD__pa5__BITNR 5
4169#define R_IRQ_MASK1_RD__pa5__WIDTH 1
4170#define R_IRQ_MASK1_RD__pa5__active 1
4171#define R_IRQ_MASK1_RD__pa5__inactive 0
4172#define R_IRQ_MASK1_RD__pa4__BITNR 4
4173#define R_IRQ_MASK1_RD__pa4__WIDTH 1
4174#define R_IRQ_MASK1_RD__pa4__active 1
4175#define R_IRQ_MASK1_RD__pa4__inactive 0
4176#define R_IRQ_MASK1_RD__pa3__BITNR 3
4177#define R_IRQ_MASK1_RD__pa3__WIDTH 1
4178#define R_IRQ_MASK1_RD__pa3__active 1
4179#define R_IRQ_MASK1_RD__pa3__inactive 0
4180#define R_IRQ_MASK1_RD__pa2__BITNR 2
4181#define R_IRQ_MASK1_RD__pa2__WIDTH 1
4182#define R_IRQ_MASK1_RD__pa2__active 1
4183#define R_IRQ_MASK1_RD__pa2__inactive 0
4184#define R_IRQ_MASK1_RD__pa1__BITNR 1
4185#define R_IRQ_MASK1_RD__pa1__WIDTH 1
4186#define R_IRQ_MASK1_RD__pa1__active 1
4187#define R_IRQ_MASK1_RD__pa1__inactive 0
4188#define R_IRQ_MASK1_RD__pa0__BITNR 0
4189#define R_IRQ_MASK1_RD__pa0__WIDTH 1
4190#define R_IRQ_MASK1_RD__pa0__active 1
4191#define R_IRQ_MASK1_RD__pa0__inactive 0
4192
4193#define R_IRQ_MASK1_CLR (IO_TYPECAST_UDWORD 0xb00000c8)
4194#define R_IRQ_MASK1_CLR__sw_int7__BITNR 31
4195#define R_IRQ_MASK1_CLR__sw_int7__WIDTH 1
4196#define R_IRQ_MASK1_CLR__sw_int7__clr 1
4197#define R_IRQ_MASK1_CLR__sw_int7__nop 0
4198#define R_IRQ_MASK1_CLR__sw_int6__BITNR 30
4199#define R_IRQ_MASK1_CLR__sw_int6__WIDTH 1
4200#define R_IRQ_MASK1_CLR__sw_int6__clr 1
4201#define R_IRQ_MASK1_CLR__sw_int6__nop 0
4202#define R_IRQ_MASK1_CLR__sw_int5__BITNR 29
4203#define R_IRQ_MASK1_CLR__sw_int5__WIDTH 1
4204#define R_IRQ_MASK1_CLR__sw_int5__clr 1
4205#define R_IRQ_MASK1_CLR__sw_int5__nop 0
4206#define R_IRQ_MASK1_CLR__sw_int4__BITNR 28
4207#define R_IRQ_MASK1_CLR__sw_int4__WIDTH 1
4208#define R_IRQ_MASK1_CLR__sw_int4__clr 1
4209#define R_IRQ_MASK1_CLR__sw_int4__nop 0
4210#define R_IRQ_MASK1_CLR__sw_int3__BITNR 27
4211#define R_IRQ_MASK1_CLR__sw_int3__WIDTH 1
4212#define R_IRQ_MASK1_CLR__sw_int3__clr 1
4213#define R_IRQ_MASK1_CLR__sw_int3__nop 0
4214#define R_IRQ_MASK1_CLR__sw_int2__BITNR 26
4215#define R_IRQ_MASK1_CLR__sw_int2__WIDTH 1
4216#define R_IRQ_MASK1_CLR__sw_int2__clr 1
4217#define R_IRQ_MASK1_CLR__sw_int2__nop 0
4218#define R_IRQ_MASK1_CLR__sw_int1__BITNR 25
4219#define R_IRQ_MASK1_CLR__sw_int1__WIDTH 1
4220#define R_IRQ_MASK1_CLR__sw_int1__clr 1
4221#define R_IRQ_MASK1_CLR__sw_int1__nop 0
4222#define R_IRQ_MASK1_CLR__sw_int0__BITNR 24
4223#define R_IRQ_MASK1_CLR__sw_int0__WIDTH 1
4224#define R_IRQ_MASK1_CLR__sw_int0__clr 1
4225#define R_IRQ_MASK1_CLR__sw_int0__nop 0
4226#define R_IRQ_MASK1_CLR__par1_ecp_cmd__BITNR 19
4227#define R_IRQ_MASK1_CLR__par1_ecp_cmd__WIDTH 1
4228#define R_IRQ_MASK1_CLR__par1_ecp_cmd__clr 1
4229#define R_IRQ_MASK1_CLR__par1_ecp_cmd__nop 0
4230#define R_IRQ_MASK1_CLR__par1_peri__BITNR 18
4231#define R_IRQ_MASK1_CLR__par1_peri__WIDTH 1
4232#define R_IRQ_MASK1_CLR__par1_peri__clr 1
4233#define R_IRQ_MASK1_CLR__par1_peri__nop 0
4234#define R_IRQ_MASK1_CLR__par1_data__BITNR 17
4235#define R_IRQ_MASK1_CLR__par1_data__WIDTH 1
4236#define R_IRQ_MASK1_CLR__par1_data__clr 1
4237#define R_IRQ_MASK1_CLR__par1_data__nop 0
4238#define R_IRQ_MASK1_CLR__par1_ready__BITNR 16
4239#define R_IRQ_MASK1_CLR__par1_ready__WIDTH 1
4240#define R_IRQ_MASK1_CLR__par1_ready__clr 1
4241#define R_IRQ_MASK1_CLR__par1_ready__nop 0
4242#define R_IRQ_MASK1_CLR__scsi1__BITNR 16
4243#define R_IRQ_MASK1_CLR__scsi1__WIDTH 1
4244#define R_IRQ_MASK1_CLR__scsi1__clr 1
4245#define R_IRQ_MASK1_CLR__scsi1__nop 0
4246#define R_IRQ_MASK1_CLR__ser3_ready__BITNR 15
4247#define R_IRQ_MASK1_CLR__ser3_ready__WIDTH 1
4248#define R_IRQ_MASK1_CLR__ser3_ready__clr 1
4249#define R_IRQ_MASK1_CLR__ser3_ready__nop 0
4250#define R_IRQ_MASK1_CLR__ser3_data__BITNR 14
4251#define R_IRQ_MASK1_CLR__ser3_data__WIDTH 1
4252#define R_IRQ_MASK1_CLR__ser3_data__clr 1
4253#define R_IRQ_MASK1_CLR__ser3_data__nop 0
4254#define R_IRQ_MASK1_CLR__ser2_ready__BITNR 13
4255#define R_IRQ_MASK1_CLR__ser2_ready__WIDTH 1
4256#define R_IRQ_MASK1_CLR__ser2_ready__clr 1
4257#define R_IRQ_MASK1_CLR__ser2_ready__nop 0
4258#define R_IRQ_MASK1_CLR__ser2_data__BITNR 12
4259#define R_IRQ_MASK1_CLR__ser2_data__WIDTH 1
4260#define R_IRQ_MASK1_CLR__ser2_data__clr 1
4261#define R_IRQ_MASK1_CLR__ser2_data__nop 0
4262#define R_IRQ_MASK1_CLR__ser1_ready__BITNR 11
4263#define R_IRQ_MASK1_CLR__ser1_ready__WIDTH 1
4264#define R_IRQ_MASK1_CLR__ser1_ready__clr 1
4265#define R_IRQ_MASK1_CLR__ser1_ready__nop 0
4266#define R_IRQ_MASK1_CLR__ser1_data__BITNR 10
4267#define R_IRQ_MASK1_CLR__ser1_data__WIDTH 1
4268#define R_IRQ_MASK1_CLR__ser1_data__clr 1
4269#define R_IRQ_MASK1_CLR__ser1_data__nop 0
4270#define R_IRQ_MASK1_CLR__ser0_ready__BITNR 9
4271#define R_IRQ_MASK1_CLR__ser0_ready__WIDTH 1
4272#define R_IRQ_MASK1_CLR__ser0_ready__clr 1
4273#define R_IRQ_MASK1_CLR__ser0_ready__nop 0
4274#define R_IRQ_MASK1_CLR__ser0_data__BITNR 8
4275#define R_IRQ_MASK1_CLR__ser0_data__WIDTH 1
4276#define R_IRQ_MASK1_CLR__ser0_data__clr 1
4277#define R_IRQ_MASK1_CLR__ser0_data__nop 0
4278#define R_IRQ_MASK1_CLR__pa7__BITNR 7
4279#define R_IRQ_MASK1_CLR__pa7__WIDTH 1
4280#define R_IRQ_MASK1_CLR__pa7__clr 1
4281#define R_IRQ_MASK1_CLR__pa7__nop 0
4282#define R_IRQ_MASK1_CLR__pa6__BITNR 6
4283#define R_IRQ_MASK1_CLR__pa6__WIDTH 1
4284#define R_IRQ_MASK1_CLR__pa6__clr 1
4285#define R_IRQ_MASK1_CLR__pa6__nop 0
4286#define R_IRQ_MASK1_CLR__pa5__BITNR 5
4287#define R_IRQ_MASK1_CLR__pa5__WIDTH 1
4288#define R_IRQ_MASK1_CLR__pa5__clr 1
4289#define R_IRQ_MASK1_CLR__pa5__nop 0
4290#define R_IRQ_MASK1_CLR__pa4__BITNR 4
4291#define R_IRQ_MASK1_CLR__pa4__WIDTH 1
4292#define R_IRQ_MASK1_CLR__pa4__clr 1
4293#define R_IRQ_MASK1_CLR__pa4__nop 0
4294#define R_IRQ_MASK1_CLR__pa3__BITNR 3
4295#define R_IRQ_MASK1_CLR__pa3__WIDTH 1
4296#define R_IRQ_MASK1_CLR__pa3__clr 1
4297#define R_IRQ_MASK1_CLR__pa3__nop 0
4298#define R_IRQ_MASK1_CLR__pa2__BITNR 2
4299#define R_IRQ_MASK1_CLR__pa2__WIDTH 1
4300#define R_IRQ_MASK1_CLR__pa2__clr 1
4301#define R_IRQ_MASK1_CLR__pa2__nop 0
4302#define R_IRQ_MASK1_CLR__pa1__BITNR 1
4303#define R_IRQ_MASK1_CLR__pa1__WIDTH 1
4304#define R_IRQ_MASK1_CLR__pa1__clr 1
4305#define R_IRQ_MASK1_CLR__pa1__nop 0
4306#define R_IRQ_MASK1_CLR__pa0__BITNR 0
4307#define R_IRQ_MASK1_CLR__pa0__WIDTH 1
4308#define R_IRQ_MASK1_CLR__pa0__clr 1
4309#define R_IRQ_MASK1_CLR__pa0__nop 0
4310
4311#define R_IRQ_READ1 (IO_TYPECAST_RO_UDWORD 0xb00000cc)
4312#define R_IRQ_READ1__sw_int7__BITNR 31
4313#define R_IRQ_READ1__sw_int7__WIDTH 1
4314#define R_IRQ_READ1__sw_int7__active 1
4315#define R_IRQ_READ1__sw_int7__inactive 0
4316#define R_IRQ_READ1__sw_int6__BITNR 30
4317#define R_IRQ_READ1__sw_int6__WIDTH 1
4318#define R_IRQ_READ1__sw_int6__active 1
4319#define R_IRQ_READ1__sw_int6__inactive 0
4320#define R_IRQ_READ1__sw_int5__BITNR 29
4321#define R_IRQ_READ1__sw_int5__WIDTH 1
4322#define R_IRQ_READ1__sw_int5__active 1
4323#define R_IRQ_READ1__sw_int5__inactive 0
4324#define R_IRQ_READ1__sw_int4__BITNR 28
4325#define R_IRQ_READ1__sw_int4__WIDTH 1
4326#define R_IRQ_READ1__sw_int4__active 1
4327#define R_IRQ_READ1__sw_int4__inactive 0
4328#define R_IRQ_READ1__sw_int3__BITNR 27
4329#define R_IRQ_READ1__sw_int3__WIDTH 1
4330#define R_IRQ_READ1__sw_int3__active 1
4331#define R_IRQ_READ1__sw_int3__inactive 0
4332#define R_IRQ_READ1__sw_int2__BITNR 26
4333#define R_IRQ_READ1__sw_int2__WIDTH 1
4334#define R_IRQ_READ1__sw_int2__active 1
4335#define R_IRQ_READ1__sw_int2__inactive 0
4336#define R_IRQ_READ1__sw_int1__BITNR 25
4337#define R_IRQ_READ1__sw_int1__WIDTH 1
4338#define R_IRQ_READ1__sw_int1__active 1
4339#define R_IRQ_READ1__sw_int1__inactive 0
4340#define R_IRQ_READ1__sw_int0__BITNR 24
4341#define R_IRQ_READ1__sw_int0__WIDTH 1
4342#define R_IRQ_READ1__sw_int0__active 1
4343#define R_IRQ_READ1__sw_int0__inactive 0
4344#define R_IRQ_READ1__par1_ecp_cmd__BITNR 19
4345#define R_IRQ_READ1__par1_ecp_cmd__WIDTH 1
4346#define R_IRQ_READ1__par1_ecp_cmd__active 1
4347#define R_IRQ_READ1__par1_ecp_cmd__inactive 0
4348#define R_IRQ_READ1__par1_peri__BITNR 18
4349#define R_IRQ_READ1__par1_peri__WIDTH 1
4350#define R_IRQ_READ1__par1_peri__active 1
4351#define R_IRQ_READ1__par1_peri__inactive 0
4352#define R_IRQ_READ1__par1_data__BITNR 17
4353#define R_IRQ_READ1__par1_data__WIDTH 1
4354#define R_IRQ_READ1__par1_data__active 1
4355#define R_IRQ_READ1__par1_data__inactive 0
4356#define R_IRQ_READ1__par1_ready__BITNR 16
4357#define R_IRQ_READ1__par1_ready__WIDTH 1
4358#define R_IRQ_READ1__par1_ready__active 1
4359#define R_IRQ_READ1__par1_ready__inactive 0
4360#define R_IRQ_READ1__scsi1__BITNR 16
4361#define R_IRQ_READ1__scsi1__WIDTH 1
4362#define R_IRQ_READ1__scsi1__active 1
4363#define R_IRQ_READ1__scsi1__inactive 0
4364#define R_IRQ_READ1__ser3_ready__BITNR 15
4365#define R_IRQ_READ1__ser3_ready__WIDTH 1
4366#define R_IRQ_READ1__ser3_ready__active 1
4367#define R_IRQ_READ1__ser3_ready__inactive 0
4368#define R_IRQ_READ1__ser3_data__BITNR 14
4369#define R_IRQ_READ1__ser3_data__WIDTH 1
4370#define R_IRQ_READ1__ser3_data__active 1
4371#define R_IRQ_READ1__ser3_data__inactive 0
4372#define R_IRQ_READ1__ser2_ready__BITNR 13
4373#define R_IRQ_READ1__ser2_ready__WIDTH 1
4374#define R_IRQ_READ1__ser2_ready__active 1
4375#define R_IRQ_READ1__ser2_ready__inactive 0
4376#define R_IRQ_READ1__ser2_data__BITNR 12
4377#define R_IRQ_READ1__ser2_data__WIDTH 1
4378#define R_IRQ_READ1__ser2_data__active 1
4379#define R_IRQ_READ1__ser2_data__inactive 0
4380#define R_IRQ_READ1__ser1_ready__BITNR 11
4381#define R_IRQ_READ1__ser1_ready__WIDTH 1
4382#define R_IRQ_READ1__ser1_ready__active 1
4383#define R_IRQ_READ1__ser1_ready__inactive 0
4384#define R_IRQ_READ1__ser1_data__BITNR 10
4385#define R_IRQ_READ1__ser1_data__WIDTH 1
4386#define R_IRQ_READ1__ser1_data__active 1
4387#define R_IRQ_READ1__ser1_data__inactive 0
4388#define R_IRQ_READ1__ser0_ready__BITNR 9
4389#define R_IRQ_READ1__ser0_ready__WIDTH 1
4390#define R_IRQ_READ1__ser0_ready__active 1
4391#define R_IRQ_READ1__ser0_ready__inactive 0
4392#define R_IRQ_READ1__ser0_data__BITNR 8
4393#define R_IRQ_READ1__ser0_data__WIDTH 1
4394#define R_IRQ_READ1__ser0_data__active 1
4395#define R_IRQ_READ1__ser0_data__inactive 0
4396#define R_IRQ_READ1__pa7__BITNR 7
4397#define R_IRQ_READ1__pa7__WIDTH 1
4398#define R_IRQ_READ1__pa7__active 1
4399#define R_IRQ_READ1__pa7__inactive 0
4400#define R_IRQ_READ1__pa6__BITNR 6
4401#define R_IRQ_READ1__pa6__WIDTH 1
4402#define R_IRQ_READ1__pa6__active 1
4403#define R_IRQ_READ1__pa6__inactive 0
4404#define R_IRQ_READ1__pa5__BITNR 5
4405#define R_IRQ_READ1__pa5__WIDTH 1
4406#define R_IRQ_READ1__pa5__active 1
4407#define R_IRQ_READ1__pa5__inactive 0
4408#define R_IRQ_READ1__pa4__BITNR 4
4409#define R_IRQ_READ1__pa4__WIDTH 1
4410#define R_IRQ_READ1__pa4__active 1
4411#define R_IRQ_READ1__pa4__inactive 0
4412#define R_IRQ_READ1__pa3__BITNR 3
4413#define R_IRQ_READ1__pa3__WIDTH 1
4414#define R_IRQ_READ1__pa3__active 1
4415#define R_IRQ_READ1__pa3__inactive 0
4416#define R_IRQ_READ1__pa2__BITNR 2
4417#define R_IRQ_READ1__pa2__WIDTH 1
4418#define R_IRQ_READ1__pa2__active 1
4419#define R_IRQ_READ1__pa2__inactive 0
4420#define R_IRQ_READ1__pa1__BITNR 1
4421#define R_IRQ_READ1__pa1__WIDTH 1
4422#define R_IRQ_READ1__pa1__active 1
4423#define R_IRQ_READ1__pa1__inactive 0
4424#define R_IRQ_READ1__pa0__BITNR 0
4425#define R_IRQ_READ1__pa0__WIDTH 1
4426#define R_IRQ_READ1__pa0__active 1
4427#define R_IRQ_READ1__pa0__inactive 0
4428
4429#define R_IRQ_MASK1_SET (IO_TYPECAST_UDWORD 0xb00000cc)
4430#define R_IRQ_MASK1_SET__sw_int7__BITNR 31
4431#define R_IRQ_MASK1_SET__sw_int7__WIDTH 1
4432#define R_IRQ_MASK1_SET__sw_int7__set 1
4433#define R_IRQ_MASK1_SET__sw_int7__nop 0
4434#define R_IRQ_MASK1_SET__sw_int6__BITNR 30
4435#define R_IRQ_MASK1_SET__sw_int6__WIDTH 1
4436#define R_IRQ_MASK1_SET__sw_int6__set 1
4437#define R_IRQ_MASK1_SET__sw_int6__nop 0
4438#define R_IRQ_MASK1_SET__sw_int5__BITNR 29
4439#define R_IRQ_MASK1_SET__sw_int5__WIDTH 1
4440#define R_IRQ_MASK1_SET__sw_int5__set 1
4441#define R_IRQ_MASK1_SET__sw_int5__nop 0
4442#define R_IRQ_MASK1_SET__sw_int4__BITNR 28
4443#define R_IRQ_MASK1_SET__sw_int4__WIDTH 1
4444#define R_IRQ_MASK1_SET__sw_int4__set 1
4445#define R_IRQ_MASK1_SET__sw_int4__nop 0
4446#define R_IRQ_MASK1_SET__sw_int3__BITNR 27
4447#define R_IRQ_MASK1_SET__sw_int3__WIDTH 1
4448#define R_IRQ_MASK1_SET__sw_int3__set 1
4449#define R_IRQ_MASK1_SET__sw_int3__nop 0
4450#define R_IRQ_MASK1_SET__sw_int2__BITNR 26
4451#define R_IRQ_MASK1_SET__sw_int2__WIDTH 1
4452#define R_IRQ_MASK1_SET__sw_int2__set 1
4453#define R_IRQ_MASK1_SET__sw_int2__nop 0
4454#define R_IRQ_MASK1_SET__sw_int1__BITNR 25
4455#define R_IRQ_MASK1_SET__sw_int1__WIDTH 1
4456#define R_IRQ_MASK1_SET__sw_int1__set 1
4457#define R_IRQ_MASK1_SET__sw_int1__nop 0
4458#define R_IRQ_MASK1_SET__sw_int0__BITNR 24
4459#define R_IRQ_MASK1_SET__sw_int0__WIDTH 1
4460#define R_IRQ_MASK1_SET__sw_int0__set 1
4461#define R_IRQ_MASK1_SET__sw_int0__nop 0
4462#define R_IRQ_MASK1_SET__par1_ecp_cmd__BITNR 19
4463#define R_IRQ_MASK1_SET__par1_ecp_cmd__WIDTH 1
4464#define R_IRQ_MASK1_SET__par1_ecp_cmd__set 1
4465#define R_IRQ_MASK1_SET__par1_ecp_cmd__nop 0
4466#define R_IRQ_MASK1_SET__par1_peri__BITNR 18
4467#define R_IRQ_MASK1_SET__par1_peri__WIDTH 1
4468#define R_IRQ_MASK1_SET__par1_peri__set 1
4469#define R_IRQ_MASK1_SET__par1_peri__nop 0
4470#define R_IRQ_MASK1_SET__par1_data__BITNR 17
4471#define R_IRQ_MASK1_SET__par1_data__WIDTH 1
4472#define R_IRQ_MASK1_SET__par1_data__set 1
4473#define R_IRQ_MASK1_SET__par1_data__nop 0
4474#define R_IRQ_MASK1_SET__par1_ready__BITNR 16
4475#define R_IRQ_MASK1_SET__par1_ready__WIDTH 1
4476#define R_IRQ_MASK1_SET__par1_ready__set 1
4477#define R_IRQ_MASK1_SET__par1_ready__nop 0
4478#define R_IRQ_MASK1_SET__scsi1__BITNR 16
4479#define R_IRQ_MASK1_SET__scsi1__WIDTH 1
4480#define R_IRQ_MASK1_SET__scsi1__set 1
4481#define R_IRQ_MASK1_SET__scsi1__nop 0
4482#define R_IRQ_MASK1_SET__ser3_ready__BITNR 15
4483#define R_IRQ_MASK1_SET__ser3_ready__WIDTH 1
4484#define R_IRQ_MASK1_SET__ser3_ready__set 1
4485#define R_IRQ_MASK1_SET__ser3_ready__nop 0
4486#define R_IRQ_MASK1_SET__ser3_data__BITNR 14
4487#define R_IRQ_MASK1_SET__ser3_data__WIDTH 1
4488#define R_IRQ_MASK1_SET__ser3_data__set 1
4489#define R_IRQ_MASK1_SET__ser3_data__nop 0
4490#define R_IRQ_MASK1_SET__ser2_ready__BITNR 13
4491#define R_IRQ_MASK1_SET__ser2_ready__WIDTH 1
4492#define R_IRQ_MASK1_SET__ser2_ready__set 1
4493#define R_IRQ_MASK1_SET__ser2_ready__nop 0
4494#define R_IRQ_MASK1_SET__ser2_data__BITNR 12
4495#define R_IRQ_MASK1_SET__ser2_data__WIDTH 1
4496#define R_IRQ_MASK1_SET__ser2_data__set 1
4497#define R_IRQ_MASK1_SET__ser2_data__nop 0
4498#define R_IRQ_MASK1_SET__ser1_ready__BITNR 11
4499#define R_IRQ_MASK1_SET__ser1_ready__WIDTH 1
4500#define R_IRQ_MASK1_SET__ser1_ready__set 1
4501#define R_IRQ_MASK1_SET__ser1_ready__nop 0
4502#define R_IRQ_MASK1_SET__ser1_data__BITNR 10
4503#define R_IRQ_MASK1_SET__ser1_data__WIDTH 1
4504#define R_IRQ_MASK1_SET__ser1_data__set 1
4505#define R_IRQ_MASK1_SET__ser1_data__nop 0
4506#define R_IRQ_MASK1_SET__ser0_ready__BITNR 9
4507#define R_IRQ_MASK1_SET__ser0_ready__WIDTH 1
4508#define R_IRQ_MASK1_SET__ser0_ready__set 1
4509#define R_IRQ_MASK1_SET__ser0_ready__nop 0
4510#define R_IRQ_MASK1_SET__ser0_data__BITNR 8
4511#define R_IRQ_MASK1_SET__ser0_data__WIDTH 1
4512#define R_IRQ_MASK1_SET__ser0_data__set 1
4513#define R_IRQ_MASK1_SET__ser0_data__nop 0
4514#define R_IRQ_MASK1_SET__pa7__BITNR 7
4515#define R_IRQ_MASK1_SET__pa7__WIDTH 1
4516#define R_IRQ_MASK1_SET__pa7__set 1
4517#define R_IRQ_MASK1_SET__pa7__nop 0
4518#define R_IRQ_MASK1_SET__pa6__BITNR 6
4519#define R_IRQ_MASK1_SET__pa6__WIDTH 1
4520#define R_IRQ_MASK1_SET__pa6__set 1
4521#define R_IRQ_MASK1_SET__pa6__nop 0
4522#define R_IRQ_MASK1_SET__pa5__BITNR 5
4523#define R_IRQ_MASK1_SET__pa5__WIDTH 1
4524#define R_IRQ_MASK1_SET__pa5__set 1
4525#define R_IRQ_MASK1_SET__pa5__nop 0
4526#define R_IRQ_MASK1_SET__pa4__BITNR 4
4527#define R_IRQ_MASK1_SET__pa4__WIDTH 1
4528#define R_IRQ_MASK1_SET__pa4__set 1
4529#define R_IRQ_MASK1_SET__pa4__nop 0
4530#define R_IRQ_MASK1_SET__pa3__BITNR 3
4531#define R_IRQ_MASK1_SET__pa3__WIDTH 1
4532#define R_IRQ_MASK1_SET__pa3__set 1
4533#define R_IRQ_MASK1_SET__pa3__nop 0
4534#define R_IRQ_MASK1_SET__pa2__BITNR 2
4535#define R_IRQ_MASK1_SET__pa2__WIDTH 1
4536#define R_IRQ_MASK1_SET__pa2__set 1
4537#define R_IRQ_MASK1_SET__pa2__nop 0
4538#define R_IRQ_MASK1_SET__pa1__BITNR 1
4539#define R_IRQ_MASK1_SET__pa1__WIDTH 1
4540#define R_IRQ_MASK1_SET__pa1__set 1
4541#define R_IRQ_MASK1_SET__pa1__nop 0
4542#define R_IRQ_MASK1_SET__pa0__BITNR 0
4543#define R_IRQ_MASK1_SET__pa0__WIDTH 1
4544#define R_IRQ_MASK1_SET__pa0__set 1
4545#define R_IRQ_MASK1_SET__pa0__nop 0
4546
4547#define R_IRQ_MASK2_RD (IO_TYPECAST_RO_UDWORD 0xb00000d0)
4548#define R_IRQ_MASK2_RD__dma8_sub3_descr__BITNR 23
4549#define R_IRQ_MASK2_RD__dma8_sub3_descr__WIDTH 1
4550#define R_IRQ_MASK2_RD__dma8_sub3_descr__active 1
4551#define R_IRQ_MASK2_RD__dma8_sub3_descr__inactive 0
4552#define R_IRQ_MASK2_RD__dma8_sub2_descr__BITNR 22
4553#define R_IRQ_MASK2_RD__dma8_sub2_descr__WIDTH 1
4554#define R_IRQ_MASK2_RD__dma8_sub2_descr__active 1
4555#define R_IRQ_MASK2_RD__dma8_sub2_descr__inactive 0
4556#define R_IRQ_MASK2_RD__dma8_sub1_descr__BITNR 21
4557#define R_IRQ_MASK2_RD__dma8_sub1_descr__WIDTH 1
4558#define R_IRQ_MASK2_RD__dma8_sub1_descr__active 1
4559#define R_IRQ_MASK2_RD__dma8_sub1_descr__inactive 0
4560#define R_IRQ_MASK2_RD__dma8_sub0_descr__BITNR 20
4561#define R_IRQ_MASK2_RD__dma8_sub0_descr__WIDTH 1
4562#define R_IRQ_MASK2_RD__dma8_sub0_descr__active 1
4563#define R_IRQ_MASK2_RD__dma8_sub0_descr__inactive 0
4564#define R_IRQ_MASK2_RD__dma9_eop__BITNR 19
4565#define R_IRQ_MASK2_RD__dma9_eop__WIDTH 1
4566#define R_IRQ_MASK2_RD__dma9_eop__active 1
4567#define R_IRQ_MASK2_RD__dma9_eop__inactive 0
4568#define R_IRQ_MASK2_RD__dma9_descr__BITNR 18
4569#define R_IRQ_MASK2_RD__dma9_descr__WIDTH 1
4570#define R_IRQ_MASK2_RD__dma9_descr__active 1
4571#define R_IRQ_MASK2_RD__dma9_descr__inactive 0
4572#define R_IRQ_MASK2_RD__dma8_eop__BITNR 17
4573#define R_IRQ_MASK2_RD__dma8_eop__WIDTH 1
4574#define R_IRQ_MASK2_RD__dma8_eop__active 1
4575#define R_IRQ_MASK2_RD__dma8_eop__inactive 0
4576#define R_IRQ_MASK2_RD__dma8_descr__BITNR 16
4577#define R_IRQ_MASK2_RD__dma8_descr__WIDTH 1
4578#define R_IRQ_MASK2_RD__dma8_descr__active 1
4579#define R_IRQ_MASK2_RD__dma8_descr__inactive 0
4580#define R_IRQ_MASK2_RD__dma7_eop__BITNR 15
4581#define R_IRQ_MASK2_RD__dma7_eop__WIDTH 1
4582#define R_IRQ_MASK2_RD__dma7_eop__active 1
4583#define R_IRQ_MASK2_RD__dma7_eop__inactive 0
4584#define R_IRQ_MASK2_RD__dma7_descr__BITNR 14
4585#define R_IRQ_MASK2_RD__dma7_descr__WIDTH 1
4586#define R_IRQ_MASK2_RD__dma7_descr__active 1
4587#define R_IRQ_MASK2_RD__dma7_descr__inactive 0
4588#define R_IRQ_MASK2_RD__dma6_eop__BITNR 13
4589#define R_IRQ_MASK2_RD__dma6_eop__WIDTH 1
4590#define R_IRQ_MASK2_RD__dma6_eop__active 1
4591#define R_IRQ_MASK2_RD__dma6_eop__inactive 0
4592#define R_IRQ_MASK2_RD__dma6_descr__BITNR 12
4593#define R_IRQ_MASK2_RD__dma6_descr__WIDTH 1
4594#define R_IRQ_MASK2_RD__dma6_descr__active 1
4595#define R_IRQ_MASK2_RD__dma6_descr__inactive 0
4596#define R_IRQ_MASK2_RD__dma5_eop__BITNR 11
4597#define R_IRQ_MASK2_RD__dma5_eop__WIDTH 1
4598#define R_IRQ_MASK2_RD__dma5_eop__active 1
4599#define R_IRQ_MASK2_RD__dma5_eop__inactive 0
4600#define R_IRQ_MASK2_RD__dma5_descr__BITNR 10
4601#define R_IRQ_MASK2_RD__dma5_descr__WIDTH 1
4602#define R_IRQ_MASK2_RD__dma5_descr__active 1
4603#define R_IRQ_MASK2_RD__dma5_descr__inactive 0
4604#define R_IRQ_MASK2_RD__dma4_eop__BITNR 9
4605#define R_IRQ_MASK2_RD__dma4_eop__WIDTH 1
4606#define R_IRQ_MASK2_RD__dma4_eop__active 1
4607#define R_IRQ_MASK2_RD__dma4_eop__inactive 0
4608#define R_IRQ_MASK2_RD__dma4_descr__BITNR 8
4609#define R_IRQ_MASK2_RD__dma4_descr__WIDTH 1
4610#define R_IRQ_MASK2_RD__dma4_descr__active 1
4611#define R_IRQ_MASK2_RD__dma4_descr__inactive 0
4612#define R_IRQ_MASK2_RD__dma3_eop__BITNR 7
4613#define R_IRQ_MASK2_RD__dma3_eop__WIDTH 1
4614#define R_IRQ_MASK2_RD__dma3_eop__active 1
4615#define R_IRQ_MASK2_RD__dma3_eop__inactive 0
4616#define R_IRQ_MASK2_RD__dma3_descr__BITNR 6
4617#define R_IRQ_MASK2_RD__dma3_descr__WIDTH 1
4618#define R_IRQ_MASK2_RD__dma3_descr__active 1
4619#define R_IRQ_MASK2_RD__dma3_descr__inactive 0
4620#define R_IRQ_MASK2_RD__dma2_eop__BITNR 5
4621#define R_IRQ_MASK2_RD__dma2_eop__WIDTH 1
4622#define R_IRQ_MASK2_RD__dma2_eop__active 1
4623#define R_IRQ_MASK2_RD__dma2_eop__inactive 0
4624#define R_IRQ_MASK2_RD__dma2_descr__BITNR 4
4625#define R_IRQ_MASK2_RD__dma2_descr__WIDTH 1
4626#define R_IRQ_MASK2_RD__dma2_descr__active 1
4627#define R_IRQ_MASK2_RD__dma2_descr__inactive 0
4628#define R_IRQ_MASK2_RD__dma1_eop__BITNR 3
4629#define R_IRQ_MASK2_RD__dma1_eop__WIDTH 1
4630#define R_IRQ_MASK2_RD__dma1_eop__active 1
4631#define R_IRQ_MASK2_RD__dma1_eop__inactive 0
4632#define R_IRQ_MASK2_RD__dma1_descr__BITNR 2
4633#define R_IRQ_MASK2_RD__dma1_descr__WIDTH 1
4634#define R_IRQ_MASK2_RD__dma1_descr__active 1
4635#define R_IRQ_MASK2_RD__dma1_descr__inactive 0
4636#define R_IRQ_MASK2_RD__dma0_eop__BITNR 1
4637#define R_IRQ_MASK2_RD__dma0_eop__WIDTH 1
4638#define R_IRQ_MASK2_RD__dma0_eop__active 1
4639#define R_IRQ_MASK2_RD__dma0_eop__inactive 0
4640#define R_IRQ_MASK2_RD__dma0_descr__BITNR 0
4641#define R_IRQ_MASK2_RD__dma0_descr__WIDTH 1
4642#define R_IRQ_MASK2_RD__dma0_descr__active 1
4643#define R_IRQ_MASK2_RD__dma0_descr__inactive 0
4644
4645#define R_IRQ_MASK2_CLR (IO_TYPECAST_UDWORD 0xb00000d0)
4646#define R_IRQ_MASK2_CLR__dma8_sub3_descr__BITNR 23
4647#define R_IRQ_MASK2_CLR__dma8_sub3_descr__WIDTH 1
4648#define R_IRQ_MASK2_CLR__dma8_sub3_descr__clr 1
4649#define R_IRQ_MASK2_CLR__dma8_sub3_descr__nop 0
4650#define R_IRQ_MASK2_CLR__dma8_sub2_descr__BITNR 22
4651#define R_IRQ_MASK2_CLR__dma8_sub2_descr__WIDTH 1
4652#define R_IRQ_MASK2_CLR__dma8_sub2_descr__clr 1
4653#define R_IRQ_MASK2_CLR__dma8_sub2_descr__nop 0
4654#define R_IRQ_MASK2_CLR__dma8_sub1_descr__BITNR 21
4655#define R_IRQ_MASK2_CLR__dma8_sub1_descr__WIDTH 1
4656#define R_IRQ_MASK2_CLR__dma8_sub1_descr__clr 1
4657#define R_IRQ_MASK2_CLR__dma8_sub1_descr__nop 0
4658#define R_IRQ_MASK2_CLR__dma8_sub0_descr__BITNR 20
4659#define R_IRQ_MASK2_CLR__dma8_sub0_descr__WIDTH 1
4660#define R_IRQ_MASK2_CLR__dma8_sub0_descr__clr 1
4661#define R_IRQ_MASK2_CLR__dma8_sub0_descr__nop 0
4662#define R_IRQ_MASK2_CLR__dma9_eop__BITNR 19
4663#define R_IRQ_MASK2_CLR__dma9_eop__WIDTH 1
4664#define R_IRQ_MASK2_CLR__dma9_eop__clr 1
4665#define R_IRQ_MASK2_CLR__dma9_eop__nop 0
4666#define R_IRQ_MASK2_CLR__dma9_descr__BITNR 18
4667#define R_IRQ_MASK2_CLR__dma9_descr__WIDTH 1
4668#define R_IRQ_MASK2_CLR__dma9_descr__clr 1
4669#define R_IRQ_MASK2_CLR__dma9_descr__nop 0
4670#define R_IRQ_MASK2_CLR__dma8_eop__BITNR 17
4671#define R_IRQ_MASK2_CLR__dma8_eop__WIDTH 1
4672#define R_IRQ_MASK2_CLR__dma8_eop__clr 1
4673#define R_IRQ_MASK2_CLR__dma8_eop__nop 0
4674#define R_IRQ_MASK2_CLR__dma8_descr__BITNR 16
4675#define R_IRQ_MASK2_CLR__dma8_descr__WIDTH 1
4676#define R_IRQ_MASK2_CLR__dma8_descr__clr 1
4677#define R_IRQ_MASK2_CLR__dma8_descr__nop 0
4678#define R_IRQ_MASK2_CLR__dma7_eop__BITNR 15
4679#define R_IRQ_MASK2_CLR__dma7_eop__WIDTH 1
4680#define R_IRQ_MASK2_CLR__dma7_eop__clr 1
4681#define R_IRQ_MASK2_CLR__dma7_eop__nop 0
4682#define R_IRQ_MASK2_CLR__dma7_descr__BITNR 14
4683#define R_IRQ_MASK2_CLR__dma7_descr__WIDTH 1
4684#define R_IRQ_MASK2_CLR__dma7_descr__clr 1
4685#define R_IRQ_MASK2_CLR__dma7_descr__nop 0
4686#define R_IRQ_MASK2_CLR__dma6_eop__BITNR 13
4687#define R_IRQ_MASK2_CLR__dma6_eop__WIDTH 1
4688#define R_IRQ_MASK2_CLR__dma6_eop__clr 1
4689#define R_IRQ_MASK2_CLR__dma6_eop__nop 0
4690#define R_IRQ_MASK2_CLR__dma6_descr__BITNR 12
4691#define R_IRQ_MASK2_CLR__dma6_descr__WIDTH 1
4692#define R_IRQ_MASK2_CLR__dma6_descr__clr 1
4693#define R_IRQ_MASK2_CLR__dma6_descr__nop 0
4694#define R_IRQ_MASK2_CLR__dma5_eop__BITNR 11
4695#define R_IRQ_MASK2_CLR__dma5_eop__WIDTH 1
4696#define R_IRQ_MASK2_CLR__dma5_eop__clr 1
4697#define R_IRQ_MASK2_CLR__dma5_eop__nop 0
4698#define R_IRQ_MASK2_CLR__dma5_descr__BITNR 10
4699#define R_IRQ_MASK2_CLR__dma5_descr__WIDTH 1
4700#define R_IRQ_MASK2_CLR__dma5_descr__clr 1
4701#define R_IRQ_MASK2_CLR__dma5_descr__nop 0
4702#define R_IRQ_MASK2_CLR__dma4_eop__BITNR 9
4703#define R_IRQ_MASK2_CLR__dma4_eop__WIDTH 1
4704#define R_IRQ_MASK2_CLR__dma4_eop__clr 1
4705#define R_IRQ_MASK2_CLR__dma4_eop__nop 0
4706#define R_IRQ_MASK2_CLR__dma4_descr__BITNR 8
4707#define R_IRQ_MASK2_CLR__dma4_descr__WIDTH 1
4708#define R_IRQ_MASK2_CLR__dma4_descr__clr 1
4709#define R_IRQ_MASK2_CLR__dma4_descr__nop 0
4710#define R_IRQ_MASK2_CLR__dma3_eop__BITNR 7
4711#define R_IRQ_MASK2_CLR__dma3_eop__WIDTH 1
4712#define R_IRQ_MASK2_CLR__dma3_eop__clr 1
4713#define R_IRQ_MASK2_CLR__dma3_eop__nop 0
4714#define R_IRQ_MASK2_CLR__dma3_descr__BITNR 6
4715#define R_IRQ_MASK2_CLR__dma3_descr__WIDTH 1
4716#define R_IRQ_MASK2_CLR__dma3_descr__clr 1
4717#define R_IRQ_MASK2_CLR__dma3_descr__nop 0
4718#define R_IRQ_MASK2_CLR__dma2_eop__BITNR 5
4719#define R_IRQ_MASK2_CLR__dma2_eop__WIDTH 1
4720#define R_IRQ_MASK2_CLR__dma2_eop__clr 1
4721#define R_IRQ_MASK2_CLR__dma2_eop__nop 0
4722#define R_IRQ_MASK2_CLR__dma2_descr__BITNR 4
4723#define R_IRQ_MASK2_CLR__dma2_descr__WIDTH 1
4724#define R_IRQ_MASK2_CLR__dma2_descr__clr 1
4725#define R_IRQ_MASK2_CLR__dma2_descr__nop 0
4726#define R_IRQ_MASK2_CLR__dma1_eop__BITNR 3
4727#define R_IRQ_MASK2_CLR__dma1_eop__WIDTH 1
4728#define R_IRQ_MASK2_CLR__dma1_eop__clr 1
4729#define R_IRQ_MASK2_CLR__dma1_eop__nop 0
4730#define R_IRQ_MASK2_CLR__dma1_descr__BITNR 2
4731#define R_IRQ_MASK2_CLR__dma1_descr__WIDTH 1
4732#define R_IRQ_MASK2_CLR__dma1_descr__clr 1
4733#define R_IRQ_MASK2_CLR__dma1_descr__nop 0
4734#define R_IRQ_MASK2_CLR__dma0_eop__BITNR 1
4735#define R_IRQ_MASK2_CLR__dma0_eop__WIDTH 1
4736#define R_IRQ_MASK2_CLR__dma0_eop__clr 1
4737#define R_IRQ_MASK2_CLR__dma0_eop__nop 0
4738#define R_IRQ_MASK2_CLR__dma0_descr__BITNR 0
4739#define R_IRQ_MASK2_CLR__dma0_descr__WIDTH 1
4740#define R_IRQ_MASK2_CLR__dma0_descr__clr 1
4741#define R_IRQ_MASK2_CLR__dma0_descr__nop 0
4742
4743#define R_IRQ_READ2 (IO_TYPECAST_RO_UDWORD 0xb00000d4)
4744#define R_IRQ_READ2__dma8_sub3_descr__BITNR 23
4745#define R_IRQ_READ2__dma8_sub3_descr__WIDTH 1
4746#define R_IRQ_READ2__dma8_sub3_descr__active 1
4747#define R_IRQ_READ2__dma8_sub3_descr__inactive 0
4748#define R_IRQ_READ2__dma8_sub2_descr__BITNR 22
4749#define R_IRQ_READ2__dma8_sub2_descr__WIDTH 1
4750#define R_IRQ_READ2__dma8_sub2_descr__active 1
4751#define R_IRQ_READ2__dma8_sub2_descr__inactive 0
4752#define R_IRQ_READ2__dma8_sub1_descr__BITNR 21
4753#define R_IRQ_READ2__dma8_sub1_descr__WIDTH 1
4754#define R_IRQ_READ2__dma8_sub1_descr__active 1
4755#define R_IRQ_READ2__dma8_sub1_descr__inactive 0
4756#define R_IRQ_READ2__dma8_sub0_descr__BITNR 20
4757#define R_IRQ_READ2__dma8_sub0_descr__WIDTH 1
4758#define R_IRQ_READ2__dma8_sub0_descr__active 1
4759#define R_IRQ_READ2__dma8_sub0_descr__inactive 0
4760#define R_IRQ_READ2__dma9_eop__BITNR 19
4761#define R_IRQ_READ2__dma9_eop__WIDTH 1
4762#define R_IRQ_READ2__dma9_eop__active 1
4763#define R_IRQ_READ2__dma9_eop__inactive 0
4764#define R_IRQ_READ2__dma9_descr__BITNR 18
4765#define R_IRQ_READ2__dma9_descr__WIDTH 1
4766#define R_IRQ_READ2__dma9_descr__active 1
4767#define R_IRQ_READ2__dma9_descr__inactive 0
4768#define R_IRQ_READ2__dma8_eop__BITNR 17
4769#define R_IRQ_READ2__dma8_eop__WIDTH 1
4770#define R_IRQ_READ2__dma8_eop__active 1
4771#define R_IRQ_READ2__dma8_eop__inactive 0
4772#define R_IRQ_READ2__dma8_descr__BITNR 16
4773#define R_IRQ_READ2__dma8_descr__WIDTH 1
4774#define R_IRQ_READ2__dma8_descr__active 1
4775#define R_IRQ_READ2__dma8_descr__inactive 0
4776#define R_IRQ_READ2__dma7_eop__BITNR 15
4777#define R_IRQ_READ2__dma7_eop__WIDTH 1
4778#define R_IRQ_READ2__dma7_eop__active 1
4779#define R_IRQ_READ2__dma7_eop__inactive 0
4780#define R_IRQ_READ2__dma7_descr__BITNR 14
4781#define R_IRQ_READ2__dma7_descr__WIDTH 1
4782#define R_IRQ_READ2__dma7_descr__active 1
4783#define R_IRQ_READ2__dma7_descr__inactive 0
4784#define R_IRQ_READ2__dma6_eop__BITNR 13
4785#define R_IRQ_READ2__dma6_eop__WIDTH 1
4786#define R_IRQ_READ2__dma6_eop__active 1
4787#define R_IRQ_READ2__dma6_eop__inactive 0
4788#define R_IRQ_READ2__dma6_descr__BITNR 12
4789#define R_IRQ_READ2__dma6_descr__WIDTH 1
4790#define R_IRQ_READ2__dma6_descr__active 1
4791#define R_IRQ_READ2__dma6_descr__inactive 0
4792#define R_IRQ_READ2__dma5_eop__BITNR 11
4793#define R_IRQ_READ2__dma5_eop__WIDTH 1
4794#define R_IRQ_READ2__dma5_eop__active 1
4795#define R_IRQ_READ2__dma5_eop__inactive 0
4796#define R_IRQ_READ2__dma5_descr__BITNR 10
4797#define R_IRQ_READ2__dma5_descr__WIDTH 1
4798#define R_IRQ_READ2__dma5_descr__active 1
4799#define R_IRQ_READ2__dma5_descr__inactive 0
4800#define R_IRQ_READ2__dma4_eop__BITNR 9
4801#define R_IRQ_READ2__dma4_eop__WIDTH 1
4802#define R_IRQ_READ2__dma4_eop__active 1
4803#define R_IRQ_READ2__dma4_eop__inactive 0
4804#define R_IRQ_READ2__dma4_descr__BITNR 8
4805#define R_IRQ_READ2__dma4_descr__WIDTH 1
4806#define R_IRQ_READ2__dma4_descr__active 1
4807#define R_IRQ_READ2__dma4_descr__inactive 0
4808#define R_IRQ_READ2__dma3_eop__BITNR 7
4809#define R_IRQ_READ2__dma3_eop__WIDTH 1
4810#define R_IRQ_READ2__dma3_eop__active 1
4811#define R_IRQ_READ2__dma3_eop__inactive 0
4812#define R_IRQ_READ2__dma3_descr__BITNR 6
4813#define R_IRQ_READ2__dma3_descr__WIDTH 1
4814#define R_IRQ_READ2__dma3_descr__active 1
4815#define R_IRQ_READ2__dma3_descr__inactive 0
4816#define R_IRQ_READ2__dma2_eop__BITNR 5
4817#define R_IRQ_READ2__dma2_eop__WIDTH 1
4818#define R_IRQ_READ2__dma2_eop__active 1
4819#define R_IRQ_READ2__dma2_eop__inactive 0
4820#define R_IRQ_READ2__dma2_descr__BITNR 4
4821#define R_IRQ_READ2__dma2_descr__WIDTH 1
4822#define R_IRQ_READ2__dma2_descr__active 1
4823#define R_IRQ_READ2__dma2_descr__inactive 0
4824#define R_IRQ_READ2__dma1_eop__BITNR 3
4825#define R_IRQ_READ2__dma1_eop__WIDTH 1
4826#define R_IRQ_READ2__dma1_eop__active 1
4827#define R_IRQ_READ2__dma1_eop__inactive 0
4828#define R_IRQ_READ2__dma1_descr__BITNR 2
4829#define R_IRQ_READ2__dma1_descr__WIDTH 1
4830#define R_IRQ_READ2__dma1_descr__active 1
4831#define R_IRQ_READ2__dma1_descr__inactive 0
4832#define R_IRQ_READ2__dma0_eop__BITNR 1
4833#define R_IRQ_READ2__dma0_eop__WIDTH 1
4834#define R_IRQ_READ2__dma0_eop__active 1
4835#define R_IRQ_READ2__dma0_eop__inactive 0
4836#define R_IRQ_READ2__dma0_descr__BITNR 0
4837#define R_IRQ_READ2__dma0_descr__WIDTH 1
4838#define R_IRQ_READ2__dma0_descr__active 1
4839#define R_IRQ_READ2__dma0_descr__inactive 0
4840
4841#define R_IRQ_MASK2_SET (IO_TYPECAST_UDWORD 0xb00000d4)
4842#define R_IRQ_MASK2_SET__dma8_sub3_descr__BITNR 23
4843#define R_IRQ_MASK2_SET__dma8_sub3_descr__WIDTH 1
4844#define R_IRQ_MASK2_SET__dma8_sub3_descr__set 1
4845#define R_IRQ_MASK2_SET__dma8_sub3_descr__nop 0
4846#define R_IRQ_MASK2_SET__dma8_sub2_descr__BITNR 22
4847#define R_IRQ_MASK2_SET__dma8_sub2_descr__WIDTH 1
4848#define R_IRQ_MASK2_SET__dma8_sub2_descr__set 1
4849#define R_IRQ_MASK2_SET__dma8_sub2_descr__nop 0
4850#define R_IRQ_MASK2_SET__dma8_sub1_descr__BITNR 21
4851#define R_IRQ_MASK2_SET__dma8_sub1_descr__WIDTH 1
4852#define R_IRQ_MASK2_SET__dma8_sub1_descr__set 1
4853#define R_IRQ_MASK2_SET__dma8_sub1_descr__nop 0
4854#define R_IRQ_MASK2_SET__dma8_sub0_descr__BITNR 20
4855#define R_IRQ_MASK2_SET__dma8_sub0_descr__WIDTH 1
4856#define R_IRQ_MASK2_SET__dma8_sub0_descr__set 1
4857#define R_IRQ_MASK2_SET__dma8_sub0_descr__nop 0
4858#define R_IRQ_MASK2_SET__dma9_eop__BITNR 19
4859#define R_IRQ_MASK2_SET__dma9_eop__WIDTH 1
4860#define R_IRQ_MASK2_SET__dma9_eop__set 1
4861#define R_IRQ_MASK2_SET__dma9_eop__nop 0
4862#define R_IRQ_MASK2_SET__dma9_descr__BITNR 18
4863#define R_IRQ_MASK2_SET__dma9_descr__WIDTH 1
4864#define R_IRQ_MASK2_SET__dma9_descr__set 1
4865#define R_IRQ_MASK2_SET__dma9_descr__nop 0
4866#define R_IRQ_MASK2_SET__dma8_eop__BITNR 17
4867#define R_IRQ_MASK2_SET__dma8_eop__WIDTH 1
4868#define R_IRQ_MASK2_SET__dma8_eop__set 1
4869#define R_IRQ_MASK2_SET__dma8_eop__nop 0
4870#define R_IRQ_MASK2_SET__dma8_descr__BITNR 16
4871#define R_IRQ_MASK2_SET__dma8_descr__WIDTH 1
4872#define R_IRQ_MASK2_SET__dma8_descr__set 1
4873#define R_IRQ_MASK2_SET__dma8_descr__nop 0
4874#define R_IRQ_MASK2_SET__dma7_eop__BITNR 15
4875#define R_IRQ_MASK2_SET__dma7_eop__WIDTH 1
4876#define R_IRQ_MASK2_SET__dma7_eop__set 1
4877#define R_IRQ_MASK2_SET__dma7_eop__nop 0
4878#define R_IRQ_MASK2_SET__dma7_descr__BITNR 14
4879#define R_IRQ_MASK2_SET__dma7_descr__WIDTH 1
4880#define R_IRQ_MASK2_SET__dma7_descr__set 1
4881#define R_IRQ_MASK2_SET__dma7_descr__nop 0
4882#define R_IRQ_MASK2_SET__dma6_eop__BITNR 13
4883#define R_IRQ_MASK2_SET__dma6_eop__WIDTH 1
4884#define R_IRQ_MASK2_SET__dma6_eop__set 1
4885#define R_IRQ_MASK2_SET__dma6_eop__nop 0
4886#define R_IRQ_MASK2_SET__dma6_descr__BITNR 12
4887#define R_IRQ_MASK2_SET__dma6_descr__WIDTH 1
4888#define R_IRQ_MASK2_SET__dma6_descr__set 1
4889#define R_IRQ_MASK2_SET__dma6_descr__nop 0
4890#define R_IRQ_MASK2_SET__dma5_eop__BITNR 11
4891#define R_IRQ_MASK2_SET__dma5_eop__WIDTH 1
4892#define R_IRQ_MASK2_SET__dma5_eop__set 1
4893#define R_IRQ_MASK2_SET__dma5_eop__nop 0
4894#define R_IRQ_MASK2_SET__dma5_descr__BITNR 10
4895#define R_IRQ_MASK2_SET__dma5_descr__WIDTH 1
4896#define R_IRQ_MASK2_SET__dma5_descr__set 1
4897#define R_IRQ_MASK2_SET__dma5_descr__nop 0
4898#define R_IRQ_MASK2_SET__dma4_eop__BITNR 9
4899#define R_IRQ_MASK2_SET__dma4_eop__WIDTH 1
4900#define R_IRQ_MASK2_SET__dma4_eop__set 1
4901#define R_IRQ_MASK2_SET__dma4_eop__nop 0
4902#define R_IRQ_MASK2_SET__dma4_descr__BITNR 8
4903#define R_IRQ_MASK2_SET__dma4_descr__WIDTH 1
4904#define R_IRQ_MASK2_SET__dma4_descr__set 1
4905#define R_IRQ_MASK2_SET__dma4_descr__nop 0
4906#define R_IRQ_MASK2_SET__dma3_eop__BITNR 7
4907#define R_IRQ_MASK2_SET__dma3_eop__WIDTH 1
4908#define R_IRQ_MASK2_SET__dma3_eop__set 1
4909#define R_IRQ_MASK2_SET__dma3_eop__nop 0
4910#define R_IRQ_MASK2_SET__dma3_descr__BITNR 6
4911#define R_IRQ_MASK2_SET__dma3_descr__WIDTH 1
4912#define R_IRQ_MASK2_SET__dma3_descr__set 1
4913#define R_IRQ_MASK2_SET__dma3_descr__nop 0
4914#define R_IRQ_MASK2_SET__dma2_eop__BITNR 5
4915#define R_IRQ_MASK2_SET__dma2_eop__WIDTH 1
4916#define R_IRQ_MASK2_SET__dma2_eop__set 1
4917#define R_IRQ_MASK2_SET__dma2_eop__nop 0
4918#define R_IRQ_MASK2_SET__dma2_descr__BITNR 4
4919#define R_IRQ_MASK2_SET__dma2_descr__WIDTH 1
4920#define R_IRQ_MASK2_SET__dma2_descr__set 1
4921#define R_IRQ_MASK2_SET__dma2_descr__nop 0
4922#define R_IRQ_MASK2_SET__dma1_eop__BITNR 3
4923#define R_IRQ_MASK2_SET__dma1_eop__WIDTH 1
4924#define R_IRQ_MASK2_SET__dma1_eop__set 1
4925#define R_IRQ_MASK2_SET__dma1_eop__nop 0
4926#define R_IRQ_MASK2_SET__dma1_descr__BITNR 2
4927#define R_IRQ_MASK2_SET__dma1_descr__WIDTH 1
4928#define R_IRQ_MASK2_SET__dma1_descr__set 1
4929#define R_IRQ_MASK2_SET__dma1_descr__nop 0
4930#define R_IRQ_MASK2_SET__dma0_eop__BITNR 1
4931#define R_IRQ_MASK2_SET__dma0_eop__WIDTH 1
4932#define R_IRQ_MASK2_SET__dma0_eop__set 1
4933#define R_IRQ_MASK2_SET__dma0_eop__nop 0
4934#define R_IRQ_MASK2_SET__dma0_descr__BITNR 0
4935#define R_IRQ_MASK2_SET__dma0_descr__WIDTH 1
4936#define R_IRQ_MASK2_SET__dma0_descr__set 1
4937#define R_IRQ_MASK2_SET__dma0_descr__nop 0
4938
4939#define R_VECT_MASK_RD (IO_TYPECAST_RO_UDWORD 0xb00000d8)
4940#define R_VECT_MASK_RD__usb__BITNR 31
4941#define R_VECT_MASK_RD__usb__WIDTH 1
4942#define R_VECT_MASK_RD__usb__active 1
4943#define R_VECT_MASK_RD__usb__inactive 0
4944#define R_VECT_MASK_RD__dma9__BITNR 25
4945#define R_VECT_MASK_RD__dma9__WIDTH 1
4946#define R_VECT_MASK_RD__dma9__active 1
4947#define R_VECT_MASK_RD__dma9__inactive 0
4948#define R_VECT_MASK_RD__dma8__BITNR 24
4949#define R_VECT_MASK_RD__dma8__WIDTH 1
4950#define R_VECT_MASK_RD__dma8__active 1
4951#define R_VECT_MASK_RD__dma8__inactive 0
4952#define R_VECT_MASK_RD__dma7__BITNR 23
4953#define R_VECT_MASK_RD__dma7__WIDTH 1
4954#define R_VECT_MASK_RD__dma7__active 1
4955#define R_VECT_MASK_RD__dma7__inactive 0
4956#define R_VECT_MASK_RD__dma6__BITNR 22
4957#define R_VECT_MASK_RD__dma6__WIDTH 1
4958#define R_VECT_MASK_RD__dma6__active 1
4959#define R_VECT_MASK_RD__dma6__inactive 0
4960#define R_VECT_MASK_RD__dma5__BITNR 21
4961#define R_VECT_MASK_RD__dma5__WIDTH 1
4962#define R_VECT_MASK_RD__dma5__active 1
4963#define R_VECT_MASK_RD__dma5__inactive 0
4964#define R_VECT_MASK_RD__dma4__BITNR 20
4965#define R_VECT_MASK_RD__dma4__WIDTH 1
4966#define R_VECT_MASK_RD__dma4__active 1
4967#define R_VECT_MASK_RD__dma4__inactive 0
4968#define R_VECT_MASK_RD__dma3__BITNR 19
4969#define R_VECT_MASK_RD__dma3__WIDTH 1
4970#define R_VECT_MASK_RD__dma3__active 1
4971#define R_VECT_MASK_RD__dma3__inactive 0
4972#define R_VECT_MASK_RD__dma2__BITNR 18
4973#define R_VECT_MASK_RD__dma2__WIDTH 1
4974#define R_VECT_MASK_RD__dma2__active 1
4975#define R_VECT_MASK_RD__dma2__inactive 0
4976#define R_VECT_MASK_RD__dma1__BITNR 17
4977#define R_VECT_MASK_RD__dma1__WIDTH 1
4978#define R_VECT_MASK_RD__dma1__active 1
4979#define R_VECT_MASK_RD__dma1__inactive 0
4980#define R_VECT_MASK_RD__dma0__BITNR 16
4981#define R_VECT_MASK_RD__dma0__WIDTH 1
4982#define R_VECT_MASK_RD__dma0__active 1
4983#define R_VECT_MASK_RD__dma0__inactive 0
4984#define R_VECT_MASK_RD__ext_dma1__BITNR 13
4985#define R_VECT_MASK_RD__ext_dma1__WIDTH 1
4986#define R_VECT_MASK_RD__ext_dma1__active 1
4987#define R_VECT_MASK_RD__ext_dma1__inactive 0
4988#define R_VECT_MASK_RD__ext_dma0__BITNR 12
4989#define R_VECT_MASK_RD__ext_dma0__WIDTH 1
4990#define R_VECT_MASK_RD__ext_dma0__active 1
4991#define R_VECT_MASK_RD__ext_dma0__inactive 0
4992#define R_VECT_MASK_RD__pa__BITNR 11
4993#define R_VECT_MASK_RD__pa__WIDTH 1
4994#define R_VECT_MASK_RD__pa__active 1
4995#define R_VECT_MASK_RD__pa__inactive 0
4996#define R_VECT_MASK_RD__irq_intnr__BITNR 10
4997#define R_VECT_MASK_RD__irq_intnr__WIDTH 1
4998#define R_VECT_MASK_RD__irq_intnr__active 1
4999#define R_VECT_MASK_RD__irq_intnr__inactive 0
5000#define R_VECT_MASK_RD__sw__BITNR 9
5001#define R_VECT_MASK_RD__sw__WIDTH 1
5002#define R_VECT_MASK_RD__sw__active 1
5003#define R_VECT_MASK_RD__sw__inactive 0
5004#define R_VECT_MASK_RD__serial__BITNR 8
5005#define R_VECT_MASK_RD__serial__WIDTH 1
5006#define R_VECT_MASK_RD__serial__active 1
5007#define R_VECT_MASK_RD__serial__inactive 0
5008#define R_VECT_MASK_RD__snmp__BITNR 7
5009#define R_VECT_MASK_RD__snmp__WIDTH 1
5010#define R_VECT_MASK_RD__snmp__active 1
5011#define R_VECT_MASK_RD__snmp__inactive 0
5012#define R_VECT_MASK_RD__network__BITNR 6
5013#define R_VECT_MASK_RD__network__WIDTH 1
5014#define R_VECT_MASK_RD__network__active 1
5015#define R_VECT_MASK_RD__network__inactive 0
5016#define R_VECT_MASK_RD__scsi1__BITNR 5
5017#define R_VECT_MASK_RD__scsi1__WIDTH 1
5018#define R_VECT_MASK_RD__scsi1__active 1
5019#define R_VECT_MASK_RD__scsi1__inactive 0
5020#define R_VECT_MASK_RD__par1__BITNR 5
5021#define R_VECT_MASK_RD__par1__WIDTH 1
5022#define R_VECT_MASK_RD__par1__active 1
5023#define R_VECT_MASK_RD__par1__inactive 0
5024#define R_VECT_MASK_RD__scsi0__BITNR 4
5025#define R_VECT_MASK_RD__scsi0__WIDTH 1
5026#define R_VECT_MASK_RD__scsi0__active 1
5027#define R_VECT_MASK_RD__scsi0__inactive 0
5028#define R_VECT_MASK_RD__par0__BITNR 4
5029#define R_VECT_MASK_RD__par0__WIDTH 1
5030#define R_VECT_MASK_RD__par0__active 1
5031#define R_VECT_MASK_RD__par0__inactive 0
5032#define R_VECT_MASK_RD__ata__BITNR 4
5033#define R_VECT_MASK_RD__ata__WIDTH 1
5034#define R_VECT_MASK_RD__ata__active 1
5035#define R_VECT_MASK_RD__ata__inactive 0
5036#define R_VECT_MASK_RD__mio__BITNR 4
5037#define R_VECT_MASK_RD__mio__WIDTH 1
5038#define R_VECT_MASK_RD__mio__active 1
5039#define R_VECT_MASK_RD__mio__inactive 0
5040#define R_VECT_MASK_RD__timer1__BITNR 3
5041#define R_VECT_MASK_RD__timer1__WIDTH 1
5042#define R_VECT_MASK_RD__timer1__active 1
5043#define R_VECT_MASK_RD__timer1__inactive 0
5044#define R_VECT_MASK_RD__timer0__BITNR 2
5045#define R_VECT_MASK_RD__timer0__WIDTH 1
5046#define R_VECT_MASK_RD__timer0__active 1
5047#define R_VECT_MASK_RD__timer0__inactive 0
5048#define R_VECT_MASK_RD__nmi__BITNR 1
5049#define R_VECT_MASK_RD__nmi__WIDTH 1
5050#define R_VECT_MASK_RD__nmi__active 1
5051#define R_VECT_MASK_RD__nmi__inactive 0
5052#define R_VECT_MASK_RD__some__BITNR 0
5053#define R_VECT_MASK_RD__some__WIDTH 1
5054#define R_VECT_MASK_RD__some__active 1
5055#define R_VECT_MASK_RD__some__inactive 0
5056
5057#define R_VECT_MASK_CLR (IO_TYPECAST_UDWORD 0xb00000d8)
5058#define R_VECT_MASK_CLR__usb__BITNR 31
5059#define R_VECT_MASK_CLR__usb__WIDTH 1
5060#define R_VECT_MASK_CLR__usb__clr 1
5061#define R_VECT_MASK_CLR__usb__nop 0
5062#define R_VECT_MASK_CLR__dma9__BITNR 25
5063#define R_VECT_MASK_CLR__dma9__WIDTH 1
5064#define R_VECT_MASK_CLR__dma9__clr 1
5065#define R_VECT_MASK_CLR__dma9__nop 0
5066#define R_VECT_MASK_CLR__dma8__BITNR 24
5067#define R_VECT_MASK_CLR__dma8__WIDTH 1
5068#define R_VECT_MASK_CLR__dma8__clr 1
5069#define R_VECT_MASK_CLR__dma8__nop 0
5070#define R_VECT_MASK_CLR__dma7__BITNR 23
5071#define R_VECT_MASK_CLR__dma7__WIDTH 1
5072#define R_VECT_MASK_CLR__dma7__clr 1
5073#define R_VECT_MASK_CLR__dma7__nop 0
5074#define R_VECT_MASK_CLR__dma6__BITNR 22
5075#define R_VECT_MASK_CLR__dma6__WIDTH 1
5076#define R_VECT_MASK_CLR__dma6__clr 1
5077#define R_VECT_MASK_CLR__dma6__nop 0
5078#define R_VECT_MASK_CLR__dma5__BITNR 21
5079#define R_VECT_MASK_CLR__dma5__WIDTH 1
5080#define R_VECT_MASK_CLR__dma5__clr 1
5081#define R_VECT_MASK_CLR__dma5__nop 0
5082#define R_VECT_MASK_CLR__dma4__BITNR 20
5083#define R_VECT_MASK_CLR__dma4__WIDTH 1
5084#define R_VECT_MASK_CLR__dma4__clr 1
5085#define R_VECT_MASK_CLR__dma4__nop 0
5086#define R_VECT_MASK_CLR__dma3__BITNR 19
5087#define R_VECT_MASK_CLR__dma3__WIDTH 1
5088#define R_VECT_MASK_CLR__dma3__clr 1
5089#define R_VECT_MASK_CLR__dma3__nop 0
5090#define R_VECT_MASK_CLR__dma2__BITNR 18
5091#define R_VECT_MASK_CLR__dma2__WIDTH 1
5092#define R_VECT_MASK_CLR__dma2__clr 1
5093#define R_VECT_MASK_CLR__dma2__nop 0
5094#define R_VECT_MASK_CLR__dma1__BITNR 17
5095#define R_VECT_MASK_CLR__dma1__WIDTH 1
5096#define R_VECT_MASK_CLR__dma1__clr 1
5097#define R_VECT_MASK_CLR__dma1__nop 0
5098#define R_VECT_MASK_CLR__dma0__BITNR 16
5099#define R_VECT_MASK_CLR__dma0__WIDTH 1
5100#define R_VECT_MASK_CLR__dma0__clr 1
5101#define R_VECT_MASK_CLR__dma0__nop 0
5102#define R_VECT_MASK_CLR__ext_dma1__BITNR 13
5103#define R_VECT_MASK_CLR__ext_dma1__WIDTH 1
5104#define R_VECT_MASK_CLR__ext_dma1__clr 1
5105#define R_VECT_MASK_CLR__ext_dma1__nop 0
5106#define R_VECT_MASK_CLR__ext_dma0__BITNR 12
5107#define R_VECT_MASK_CLR__ext_dma0__WIDTH 1
5108#define R_VECT_MASK_CLR__ext_dma0__clr 1
5109#define R_VECT_MASK_CLR__ext_dma0__nop 0
5110#define R_VECT_MASK_CLR__pa__BITNR 11
5111#define R_VECT_MASK_CLR__pa__WIDTH 1
5112#define R_VECT_MASK_CLR__pa__clr 1
5113#define R_VECT_MASK_CLR__pa__nop 0
5114#define R_VECT_MASK_CLR__irq_intnr__BITNR 10
5115#define R_VECT_MASK_CLR__irq_intnr__WIDTH 1
5116#define R_VECT_MASK_CLR__irq_intnr__clr 1
5117#define R_VECT_MASK_CLR__irq_intnr__nop 0
5118#define R_VECT_MASK_CLR__sw__BITNR 9
5119#define R_VECT_MASK_CLR__sw__WIDTH 1
5120#define R_VECT_MASK_CLR__sw__clr 1
5121#define R_VECT_MASK_CLR__sw__nop 0
5122#define R_VECT_MASK_CLR__serial__BITNR 8
5123#define R_VECT_MASK_CLR__serial__WIDTH 1
5124#define R_VECT_MASK_CLR__serial__clr 1
5125#define R_VECT_MASK_CLR__serial__nop 0
5126#define R_VECT_MASK_CLR__snmp__BITNR 7
5127#define R_VECT_MASK_CLR__snmp__WIDTH 1
5128#define R_VECT_MASK_CLR__snmp__clr 1
5129#define R_VECT_MASK_CLR__snmp__nop 0
5130#define R_VECT_MASK_CLR__network__BITNR 6
5131#define R_VECT_MASK_CLR__network__WIDTH 1
5132#define R_VECT_MASK_CLR__network__clr 1
5133#define R_VECT_MASK_CLR__network__nop 0
5134#define R_VECT_MASK_CLR__scsi1__BITNR 5
5135#define R_VECT_MASK_CLR__scsi1__WIDTH 1
5136#define R_VECT_MASK_CLR__scsi1__clr 1
5137#define R_VECT_MASK_CLR__scsi1__nop 0
5138#define R_VECT_MASK_CLR__par1__BITNR 5
5139#define R_VECT_MASK_CLR__par1__WIDTH 1
5140#define R_VECT_MASK_CLR__par1__clr 1
5141#define R_VECT_MASK_CLR__par1__nop 0
5142#define R_VECT_MASK_CLR__scsi0__BITNR 4
5143#define R_VECT_MASK_CLR__scsi0__WIDTH 1
5144#define R_VECT_MASK_CLR__scsi0__clr 1
5145#define R_VECT_MASK_CLR__scsi0__nop 0
5146#define R_VECT_MASK_CLR__par0__BITNR 4
5147#define R_VECT_MASK_CLR__par0__WIDTH 1
5148#define R_VECT_MASK_CLR__par0__clr 1
5149#define R_VECT_MASK_CLR__par0__nop 0
5150#define R_VECT_MASK_CLR__ata__BITNR 4
5151#define R_VECT_MASK_CLR__ata__WIDTH 1
5152#define R_VECT_MASK_CLR__ata__clr 1
5153#define R_VECT_MASK_CLR__ata__nop 0
5154#define R_VECT_MASK_CLR__mio__BITNR 4
5155#define R_VECT_MASK_CLR__mio__WIDTH 1
5156#define R_VECT_MASK_CLR__mio__clr 1
5157#define R_VECT_MASK_CLR__mio__nop 0
5158#define R_VECT_MASK_CLR__timer1__BITNR 3
5159#define R_VECT_MASK_CLR__timer1__WIDTH 1
5160#define R_VECT_MASK_CLR__timer1__clr 1
5161#define R_VECT_MASK_CLR__timer1__nop 0
5162#define R_VECT_MASK_CLR__timer0__BITNR 2
5163#define R_VECT_MASK_CLR__timer0__WIDTH 1
5164#define R_VECT_MASK_CLR__timer0__clr 1
5165#define R_VECT_MASK_CLR__timer0__nop 0
5166#define R_VECT_MASK_CLR__nmi__BITNR 1
5167#define R_VECT_MASK_CLR__nmi__WIDTH 1
5168#define R_VECT_MASK_CLR__nmi__clr 1
5169#define R_VECT_MASK_CLR__nmi__nop 0
5170#define R_VECT_MASK_CLR__some__BITNR 0
5171#define R_VECT_MASK_CLR__some__WIDTH 1
5172#define R_VECT_MASK_CLR__some__clr 1
5173#define R_VECT_MASK_CLR__some__nop 0
5174
5175#define R_VECT_READ (IO_TYPECAST_RO_UDWORD 0xb00000dc)
5176#define R_VECT_READ__usb__BITNR 31
5177#define R_VECT_READ__usb__WIDTH 1
5178#define R_VECT_READ__usb__active 1
5179#define R_VECT_READ__usb__inactive 0
5180#define R_VECT_READ__dma9__BITNR 25
5181#define R_VECT_READ__dma9__WIDTH 1
5182#define R_VECT_READ__dma9__active 1
5183#define R_VECT_READ__dma9__inactive 0
5184#define R_VECT_READ__dma8__BITNR 24
5185#define R_VECT_READ__dma8__WIDTH 1
5186#define R_VECT_READ__dma8__active 1
5187#define R_VECT_READ__dma8__inactive 0
5188#define R_VECT_READ__dma7__BITNR 23
5189#define R_VECT_READ__dma7__WIDTH 1
5190#define R_VECT_READ__dma7__active 1
5191#define R_VECT_READ__dma7__inactive 0
5192#define R_VECT_READ__dma6__BITNR 22
5193#define R_VECT_READ__dma6__WIDTH 1
5194#define R_VECT_READ__dma6__active 1
5195#define R_VECT_READ__dma6__inactive 0
5196#define R_VECT_READ__dma5__BITNR 21
5197#define R_VECT_READ__dma5__WIDTH 1
5198#define R_VECT_READ__dma5__active 1
5199#define R_VECT_READ__dma5__inactive 0
5200#define R_VECT_READ__dma4__BITNR 20
5201#define R_VECT_READ__dma4__WIDTH 1
5202#define R_VECT_READ__dma4__active 1
5203#define R_VECT_READ__dma4__inactive 0
5204#define R_VECT_READ__dma3__BITNR 19
5205#define R_VECT_READ__dma3__WIDTH 1
5206#define R_VECT_READ__dma3__active 1
5207#define R_VECT_READ__dma3__inactive 0
5208#define R_VECT_READ__dma2__BITNR 18
5209#define R_VECT_READ__dma2__WIDTH 1
5210#define R_VECT_READ__dma2__active 1
5211#define R_VECT_READ__dma2__inactive 0
5212#define R_VECT_READ__dma1__BITNR 17
5213#define R_VECT_READ__dma1__WIDTH 1
5214#define R_VECT_READ__dma1__active 1
5215#define R_VECT_READ__dma1__inactive 0
5216#define R_VECT_READ__dma0__BITNR 16
5217#define R_VECT_READ__dma0__WIDTH 1
5218#define R_VECT_READ__dma0__active 1
5219#define R_VECT_READ__dma0__inactive 0
5220#define R_VECT_READ__ext_dma1__BITNR 13
5221#define R_VECT_READ__ext_dma1__WIDTH 1
5222#define R_VECT_READ__ext_dma1__active 1
5223#define R_VECT_READ__ext_dma1__inactive 0
5224#define R_VECT_READ__ext_dma0__BITNR 12
5225#define R_VECT_READ__ext_dma0__WIDTH 1
5226#define R_VECT_READ__ext_dma0__active 1
5227#define R_VECT_READ__ext_dma0__inactive 0
5228#define R_VECT_READ__pa__BITNR 11
5229#define R_VECT_READ__pa__WIDTH 1
5230#define R_VECT_READ__pa__active 1
5231#define R_VECT_READ__pa__inactive 0
5232#define R_VECT_READ__irq_intnr__BITNR 10
5233#define R_VECT_READ__irq_intnr__WIDTH 1
5234#define R_VECT_READ__irq_intnr__active 1
5235#define R_VECT_READ__irq_intnr__inactive 0
5236#define R_VECT_READ__sw__BITNR 9
5237#define R_VECT_READ__sw__WIDTH 1
5238#define R_VECT_READ__sw__active 1
5239#define R_VECT_READ__sw__inactive 0
5240#define R_VECT_READ__serial__BITNR 8
5241#define R_VECT_READ__serial__WIDTH 1
5242#define R_VECT_READ__serial__active 1
5243#define R_VECT_READ__serial__inactive 0
5244#define R_VECT_READ__snmp__BITNR 7
5245#define R_VECT_READ__snmp__WIDTH 1
5246#define R_VECT_READ__snmp__active 1
5247#define R_VECT_READ__snmp__inactive 0
5248#define R_VECT_READ__network__BITNR 6
5249#define R_VECT_READ__network__WIDTH 1
5250#define R_VECT_READ__network__active 1
5251#define R_VECT_READ__network__inactive 0
5252#define R_VECT_READ__scsi1__BITNR 5
5253#define R_VECT_READ__scsi1__WIDTH 1
5254#define R_VECT_READ__scsi1__active 1
5255#define R_VECT_READ__scsi1__inactive 0
5256#define R_VECT_READ__par1__BITNR 5
5257#define R_VECT_READ__par1__WIDTH 1
5258#define R_VECT_READ__par1__active 1
5259#define R_VECT_READ__par1__inactive 0
5260#define R_VECT_READ__scsi0__BITNR 4
5261#define R_VECT_READ__scsi0__WIDTH 1
5262#define R_VECT_READ__scsi0__active 1
5263#define R_VECT_READ__scsi0__inactive 0
5264#define R_VECT_READ__par0__BITNR 4
5265#define R_VECT_READ__par0__WIDTH 1
5266#define R_VECT_READ__par0__active 1
5267#define R_VECT_READ__par0__inactive 0
5268#define R_VECT_READ__ata__BITNR 4
5269#define R_VECT_READ__ata__WIDTH 1
5270#define R_VECT_READ__ata__active 1
5271#define R_VECT_READ__ata__inactive 0
5272#define R_VECT_READ__mio__BITNR 4
5273#define R_VECT_READ__mio__WIDTH 1
5274#define R_VECT_READ__mio__active 1
5275#define R_VECT_READ__mio__inactive 0
5276#define R_VECT_READ__timer1__BITNR 3
5277#define R_VECT_READ__timer1__WIDTH 1
5278#define R_VECT_READ__timer1__active 1
5279#define R_VECT_READ__timer1__inactive 0
5280#define R_VECT_READ__timer0__BITNR 2
5281#define R_VECT_READ__timer0__WIDTH 1
5282#define R_VECT_READ__timer0__active 1
5283#define R_VECT_READ__timer0__inactive 0
5284#define R_VECT_READ__nmi__BITNR 1
5285#define R_VECT_READ__nmi__WIDTH 1
5286#define R_VECT_READ__nmi__active 1
5287#define R_VECT_READ__nmi__inactive 0
5288#define R_VECT_READ__some__BITNR 0
5289#define R_VECT_READ__some__WIDTH 1
5290#define R_VECT_READ__some__active 1
5291#define R_VECT_READ__some__inactive 0
5292
5293#define R_VECT_MASK_SET (IO_TYPECAST_UDWORD 0xb00000dc)
5294#define R_VECT_MASK_SET__usb__BITNR 31
5295#define R_VECT_MASK_SET__usb__WIDTH 1
5296#define R_VECT_MASK_SET__usb__set 1
5297#define R_VECT_MASK_SET__usb__nop 0
5298#define R_VECT_MASK_SET__dma9__BITNR 25
5299#define R_VECT_MASK_SET__dma9__WIDTH 1
5300#define R_VECT_MASK_SET__dma9__set 1
5301#define R_VECT_MASK_SET__dma9__nop 0
5302#define R_VECT_MASK_SET__dma8__BITNR 24
5303#define R_VECT_MASK_SET__dma8__WIDTH 1
5304#define R_VECT_MASK_SET__dma8__set 1
5305#define R_VECT_MASK_SET__dma8__nop 0
5306#define R_VECT_MASK_SET__dma7__BITNR 23
5307#define R_VECT_MASK_SET__dma7__WIDTH 1
5308#define R_VECT_MASK_SET__dma7__set 1
5309#define R_VECT_MASK_SET__dma7__nop 0
5310#define R_VECT_MASK_SET__dma6__BITNR 22
5311#define R_VECT_MASK_SET__dma6__WIDTH 1
5312#define R_VECT_MASK_SET__dma6__set 1
5313#define R_VECT_MASK_SET__dma6__nop 0
5314#define R_VECT_MASK_SET__dma5__BITNR 21
5315#define R_VECT_MASK_SET__dma5__WIDTH 1
5316#define R_VECT_MASK_SET__dma5__set 1
5317#define R_VECT_MASK_SET__dma5__nop 0
5318#define R_VECT_MASK_SET__dma4__BITNR 20
5319#define R_VECT_MASK_SET__dma4__WIDTH 1
5320#define R_VECT_MASK_SET__dma4__set 1
5321#define R_VECT_MASK_SET__dma4__nop 0
5322#define R_VECT_MASK_SET__dma3__BITNR 19
5323#define R_VECT_MASK_SET__dma3__WIDTH 1
5324#define R_VECT_MASK_SET__dma3__set 1
5325#define R_VECT_MASK_SET__dma3__nop 0
5326#define R_VECT_MASK_SET__dma2__BITNR 18
5327#define R_VECT_MASK_SET__dma2__WIDTH 1
5328#define R_VECT_MASK_SET__dma2__set 1
5329#define R_VECT_MASK_SET__dma2__nop 0
5330#define R_VECT_MASK_SET__dma1__BITNR 17
5331#define R_VECT_MASK_SET__dma1__WIDTH 1
5332#define R_VECT_MASK_SET__dma1__set 1
5333#define R_VECT_MASK_SET__dma1__nop 0
5334#define R_VECT_MASK_SET__dma0__BITNR 16
5335#define R_VECT_MASK_SET__dma0__WIDTH 1
5336#define R_VECT_MASK_SET__dma0__set 1
5337#define R_VECT_MASK_SET__dma0__nop 0
5338#define R_VECT_MASK_SET__ext_dma1__BITNR 13
5339#define R_VECT_MASK_SET__ext_dma1__WIDTH 1
5340#define R_VECT_MASK_SET__ext_dma1__set 1
5341#define R_VECT_MASK_SET__ext_dma1__nop 0
5342#define R_VECT_MASK_SET__ext_dma0__BITNR 12
5343#define R_VECT_MASK_SET__ext_dma0__WIDTH 1
5344#define R_VECT_MASK_SET__ext_dma0__set 1
5345#define R_VECT_MASK_SET__ext_dma0__nop 0
5346#define R_VECT_MASK_SET__pa__BITNR 11
5347#define R_VECT_MASK_SET__pa__WIDTH 1
5348#define R_VECT_MASK_SET__pa__set 1
5349#define R_VECT_MASK_SET__pa__nop 0
5350#define R_VECT_MASK_SET__irq_intnr__BITNR 10
5351#define R_VECT_MASK_SET__irq_intnr__WIDTH 1
5352#define R_VECT_MASK_SET__irq_intnr__set 1
5353#define R_VECT_MASK_SET__irq_intnr__nop 0
5354#define R_VECT_MASK_SET__sw__BITNR 9
5355#define R_VECT_MASK_SET__sw__WIDTH 1
5356#define R_VECT_MASK_SET__sw__set 1
5357#define R_VECT_MASK_SET__sw__nop 0
5358#define R_VECT_MASK_SET__serial__BITNR 8
5359#define R_VECT_MASK_SET__serial__WIDTH 1
5360#define R_VECT_MASK_SET__serial__set 1
5361#define R_VECT_MASK_SET__serial__nop 0
5362#define R_VECT_MASK_SET__snmp__BITNR 7
5363#define R_VECT_MASK_SET__snmp__WIDTH 1
5364#define R_VECT_MASK_SET__snmp__set 1
5365#define R_VECT_MASK_SET__snmp__nop 0
5366#define R_VECT_MASK_SET__network__BITNR 6
5367#define R_VECT_MASK_SET__network__WIDTH 1
5368#define R_VECT_MASK_SET__network__set 1
5369#define R_VECT_MASK_SET__network__nop 0
5370#define R_VECT_MASK_SET__scsi1__BITNR 5
5371#define R_VECT_MASK_SET__scsi1__WIDTH 1
5372#define R_VECT_MASK_SET__scsi1__set 1
5373#define R_VECT_MASK_SET__scsi1__nop 0
5374#define R_VECT_MASK_SET__par1__BITNR 5
5375#define R_VECT_MASK_SET__par1__WIDTH 1
5376#define R_VECT_MASK_SET__par1__set 1
5377#define R_VECT_MASK_SET__par1__nop 0
5378#define R_VECT_MASK_SET__scsi0__BITNR 4
5379#define R_VECT_MASK_SET__scsi0__WIDTH 1
5380#define R_VECT_MASK_SET__scsi0__set 1
5381#define R_VECT_MASK_SET__scsi0__nop 0
5382#define R_VECT_MASK_SET__par0__BITNR 4
5383#define R_VECT_MASK_SET__par0__WIDTH 1
5384#define R_VECT_MASK_SET__par0__set 1
5385#define R_VECT_MASK_SET__par0__nop 0
5386#define R_VECT_MASK_SET__ata__BITNR 4
5387#define R_VECT_MASK_SET__ata__WIDTH 1
5388#define R_VECT_MASK_SET__ata__set 1
5389#define R_VECT_MASK_SET__ata__nop 0
5390#define R_VECT_MASK_SET__mio__BITNR 4
5391#define R_VECT_MASK_SET__mio__WIDTH 1
5392#define R_VECT_MASK_SET__mio__set 1
5393#define R_VECT_MASK_SET__mio__nop 0
5394#define R_VECT_MASK_SET__timer1__BITNR 3
5395#define R_VECT_MASK_SET__timer1__WIDTH 1
5396#define R_VECT_MASK_SET__timer1__set 1
5397#define R_VECT_MASK_SET__timer1__nop 0
5398#define R_VECT_MASK_SET__timer0__BITNR 2
5399#define R_VECT_MASK_SET__timer0__WIDTH 1
5400#define R_VECT_MASK_SET__timer0__set 1
5401#define R_VECT_MASK_SET__timer0__nop 0
5402#define R_VECT_MASK_SET__nmi__BITNR 1
5403#define R_VECT_MASK_SET__nmi__WIDTH 1
5404#define R_VECT_MASK_SET__nmi__set 1
5405#define R_VECT_MASK_SET__nmi__nop 0
5406#define R_VECT_MASK_SET__some__BITNR 0
5407#define R_VECT_MASK_SET__some__WIDTH 1
5408#define R_VECT_MASK_SET__some__set 1
5409#define R_VECT_MASK_SET__some__nop 0
5410
5411/*
5412!* DMA registers
5413!*/
5414
5415#define R_SET_EOP (IO_TYPECAST_UDWORD 0xb000003c)
5416#define R_SET_EOP__ch9_eop__BITNR 3
5417#define R_SET_EOP__ch9_eop__WIDTH 1
5418#define R_SET_EOP__ch9_eop__set 1
5419#define R_SET_EOP__ch9_eop__nop 0
5420#define R_SET_EOP__ch7_eop__BITNR 2
5421#define R_SET_EOP__ch7_eop__WIDTH 1
5422#define R_SET_EOP__ch7_eop__set 1
5423#define R_SET_EOP__ch7_eop__nop 0
5424#define R_SET_EOP__ch5_eop__BITNR 1
5425#define R_SET_EOP__ch5_eop__WIDTH 1
5426#define R_SET_EOP__ch5_eop__set 1
5427#define R_SET_EOP__ch5_eop__nop 0
5428#define R_SET_EOP__ch3_eop__BITNR 0
5429#define R_SET_EOP__ch3_eop__WIDTH 1
5430#define R_SET_EOP__ch3_eop__set 1
5431#define R_SET_EOP__ch3_eop__nop 0
5432
5433#define R_DMA_CH0_HWSW (IO_TYPECAST_UDWORD 0xb0000100)
5434#define R_DMA_CH0_HWSW__hw__BITNR 16
5435#define R_DMA_CH0_HWSW__hw__WIDTH 16
5436#define R_DMA_CH0_HWSW__sw__BITNR 0
5437#define R_DMA_CH0_HWSW__sw__WIDTH 16
5438
5439#define R_DMA_CH0_DESCR (IO_TYPECAST_UDWORD 0xb000010c)
5440#define R_DMA_CH0_DESCR__descr__BITNR 0
5441#define R_DMA_CH0_DESCR__descr__WIDTH 32
5442
5443#define R_DMA_CH0_NEXT (IO_TYPECAST_UDWORD 0xb0000104)
5444#define R_DMA_CH0_NEXT__next__BITNR 0
5445#define R_DMA_CH0_NEXT__next__WIDTH 32
5446
5447#define R_DMA_CH0_BUF (IO_TYPECAST_UDWORD 0xb0000108)
5448#define R_DMA_CH0_BUF__buf__BITNR 0
5449#define R_DMA_CH0_BUF__buf__WIDTH 32
5450
5451#define R_DMA_CH0_FIRST (IO_TYPECAST_UDWORD 0xb00001a0)
5452#define R_DMA_CH0_FIRST__first__BITNR 0
5453#define R_DMA_CH0_FIRST__first__WIDTH 32
5454
5455#define R_DMA_CH0_CMD (IO_TYPECAST_BYTE 0xb00001d0)
5456#define R_DMA_CH0_CMD__cmd__BITNR 0
5457#define R_DMA_CH0_CMD__cmd__WIDTH 3
5458#define R_DMA_CH0_CMD__cmd__hold 0
5459#define R_DMA_CH0_CMD__cmd__start 1
5460#define R_DMA_CH0_CMD__cmd__restart 3
5461#define R_DMA_CH0_CMD__cmd__continue 3
5462#define R_DMA_CH0_CMD__cmd__reset 4
5463
5464#define R_DMA_CH0_CLR_INTR (IO_TYPECAST_BYTE 0xb00001d1)
5465#define R_DMA_CH0_CLR_INTR__clr_eop__BITNR 1
5466#define R_DMA_CH0_CLR_INTR__clr_eop__WIDTH 1
5467#define R_DMA_CH0_CLR_INTR__clr_eop__do 1
5468#define R_DMA_CH0_CLR_INTR__clr_eop__dont 0
5469#define R_DMA_CH0_CLR_INTR__clr_descr__BITNR 0
5470#define R_DMA_CH0_CLR_INTR__clr_descr__WIDTH 1
5471#define R_DMA_CH0_CLR_INTR__clr_descr__do 1
5472#define R_DMA_CH0_CLR_INTR__clr_descr__dont 0
5473
5474#define R_DMA_CH0_STATUS (IO_TYPECAST_RO_BYTE 0xb00001d2)
5475#define R_DMA_CH0_STATUS__avail__BITNR 0
5476#define R_DMA_CH0_STATUS__avail__WIDTH 7
5477
5478#define R_DMA_CH1_HWSW (IO_TYPECAST_UDWORD 0xb0000110)
5479#define R_DMA_CH1_HWSW__hw__BITNR 16
5480#define R_DMA_CH1_HWSW__hw__WIDTH 16
5481#define R_DMA_CH1_HWSW__sw__BITNR 0
5482#define R_DMA_CH1_HWSW__sw__WIDTH 16
5483
5484#define R_DMA_CH1_DESCR (IO_TYPECAST_UDWORD 0xb000011c)
5485#define R_DMA_CH1_DESCR__descr__BITNR 0
5486#define R_DMA_CH1_DESCR__descr__WIDTH 32
5487
5488#define R_DMA_CH1_NEXT (IO_TYPECAST_UDWORD 0xb0000114)
5489#define R_DMA_CH1_NEXT__next__BITNR 0
5490#define R_DMA_CH1_NEXT__next__WIDTH 32
5491
5492#define R_DMA_CH1_BUF (IO_TYPECAST_UDWORD 0xb0000118)
5493#define R_DMA_CH1_BUF__buf__BITNR 0
5494#define R_DMA_CH1_BUF__buf__WIDTH 32
5495
5496#define R_DMA_CH1_FIRST (IO_TYPECAST_UDWORD 0xb00001a4)
5497#define R_DMA_CH1_FIRST__first__BITNR 0
5498#define R_DMA_CH1_FIRST__first__WIDTH 32
5499
5500#define R_DMA_CH1_CMD (IO_TYPECAST_BYTE 0xb00001d4)
5501#define R_DMA_CH1_CMD__cmd__BITNR 0
5502#define R_DMA_CH1_CMD__cmd__WIDTH 3
5503#define R_DMA_CH1_CMD__cmd__hold 0
5504#define R_DMA_CH1_CMD__cmd__start 1
5505#define R_DMA_CH1_CMD__cmd__restart 3
5506#define R_DMA_CH1_CMD__cmd__continue 3
5507#define R_DMA_CH1_CMD__cmd__reset 4
5508
5509#define R_DMA_CH1_CLR_INTR (IO_TYPECAST_BYTE 0xb00001d5)
5510#define R_DMA_CH1_CLR_INTR__clr_eop__BITNR 1
5511#define R_DMA_CH1_CLR_INTR__clr_eop__WIDTH 1
5512#define R_DMA_CH1_CLR_INTR__clr_eop__do 1
5513#define R_DMA_CH1_CLR_INTR__clr_eop__dont 0
5514#define R_DMA_CH1_CLR_INTR__clr_descr__BITNR 0
5515#define R_DMA_CH1_CLR_INTR__clr_descr__WIDTH 1
5516#define R_DMA_CH1_CLR_INTR__clr_descr__do 1
5517#define R_DMA_CH1_CLR_INTR__clr_descr__dont 0
5518
5519#define R_DMA_CH1_STATUS (IO_TYPECAST_RO_BYTE 0xb00001d6)
5520#define R_DMA_CH1_STATUS__avail__BITNR 0
5521#define R_DMA_CH1_STATUS__avail__WIDTH 7
5522
5523#define R_DMA_CH2_HWSW (IO_TYPECAST_UDWORD 0xb0000120)
5524#define R_DMA_CH2_HWSW__hw__BITNR 16
5525#define R_DMA_CH2_HWSW__hw__WIDTH 16
5526#define R_DMA_CH2_HWSW__sw__BITNR 0
5527#define R_DMA_CH2_HWSW__sw__WIDTH 16
5528
5529#define R_DMA_CH2_DESCR (IO_TYPECAST_UDWORD 0xb000012c)
5530#define R_DMA_CH2_DESCR__descr__BITNR 0
5531#define R_DMA_CH2_DESCR__descr__WIDTH 32
5532
5533#define R_DMA_CH2_NEXT (IO_TYPECAST_UDWORD 0xb0000124)
5534#define R_DMA_CH2_NEXT__next__BITNR 0
5535#define R_DMA_CH2_NEXT__next__WIDTH 32
5536
5537#define R_DMA_CH2_BUF (IO_TYPECAST_UDWORD 0xb0000128)
5538#define R_DMA_CH2_BUF__buf__BITNR 0
5539#define R_DMA_CH2_BUF__buf__WIDTH 32
5540
5541#define R_DMA_CH2_FIRST (IO_TYPECAST_UDWORD 0xb00001a8)
5542#define R_DMA_CH2_FIRST__first__BITNR 0
5543#define R_DMA_CH2_FIRST__first__WIDTH 32
5544
5545#define R_DMA_CH2_CMD (IO_TYPECAST_BYTE 0xb00001d8)
5546#define R_DMA_CH2_CMD__cmd__BITNR 0
5547#define R_DMA_CH2_CMD__cmd__WIDTH 3
5548#define R_DMA_CH2_CMD__cmd__hold 0
5549#define R_DMA_CH2_CMD__cmd__start 1
5550#define R_DMA_CH2_CMD__cmd__restart 3
5551#define R_DMA_CH2_CMD__cmd__continue 3
5552#define R_DMA_CH2_CMD__cmd__reset 4
5553
5554#define R_DMA_CH2_CLR_INTR (IO_TYPECAST_BYTE 0xb00001d9)
5555#define R_DMA_CH2_CLR_INTR__clr_eop__BITNR 1
5556#define R_DMA_CH2_CLR_INTR__clr_eop__WIDTH 1
5557#define R_DMA_CH2_CLR_INTR__clr_eop__do 1
5558#define R_DMA_CH2_CLR_INTR__clr_eop__dont 0
5559#define R_DMA_CH2_CLR_INTR__clr_descr__BITNR 0
5560#define R_DMA_CH2_CLR_INTR__clr_descr__WIDTH 1
5561#define R_DMA_CH2_CLR_INTR__clr_descr__do 1
5562#define R_DMA_CH2_CLR_INTR__clr_descr__dont 0
5563
5564#define R_DMA_CH2_STATUS (IO_TYPECAST_RO_BYTE 0xb00001da)
5565#define R_DMA_CH2_STATUS__avail__BITNR 0
5566#define R_DMA_CH2_STATUS__avail__WIDTH 7
5567
5568#define R_DMA_CH3_HWSW (IO_TYPECAST_UDWORD 0xb0000130)
5569#define R_DMA_CH3_HWSW__hw__BITNR 16
5570#define R_DMA_CH3_HWSW__hw__WIDTH 16
5571#define R_DMA_CH3_HWSW__sw__BITNR 0
5572#define R_DMA_CH3_HWSW__sw__WIDTH 16
5573
5574#define R_DMA_CH3_DESCR (IO_TYPECAST_UDWORD 0xb000013c)
5575#define R_DMA_CH3_DESCR__descr__BITNR 0
5576#define R_DMA_CH3_DESCR__descr__WIDTH 32
5577
5578#define R_DMA_CH3_NEXT (IO_TYPECAST_UDWORD 0xb0000134)
5579#define R_DMA_CH3_NEXT__next__BITNR 0
5580#define R_DMA_CH3_NEXT__next__WIDTH 32
5581
5582#define R_DMA_CH3_BUF (IO_TYPECAST_UDWORD 0xb0000138)
5583#define R_DMA_CH3_BUF__buf__BITNR 0
5584#define R_DMA_CH3_BUF__buf__WIDTH 32
5585
5586#define R_DMA_CH3_FIRST (IO_TYPECAST_UDWORD 0xb00001ac)
5587#define R_DMA_CH3_FIRST__first__BITNR 0
5588#define R_DMA_CH3_FIRST__first__WIDTH 32
5589
5590#define R_DMA_CH3_CMD (IO_TYPECAST_BYTE 0xb00001dc)
5591#define R_DMA_CH3_CMD__cmd__BITNR 0
5592#define R_DMA_CH3_CMD__cmd__WIDTH 3
5593#define R_DMA_CH3_CMD__cmd__hold 0
5594#define R_DMA_CH3_CMD__cmd__start 1
5595#define R_DMA_CH3_CMD__cmd__restart 3
5596#define R_DMA_CH3_CMD__cmd__continue 3
5597#define R_DMA_CH3_CMD__cmd__reset 4
5598
5599#define R_DMA_CH3_CLR_INTR (IO_TYPECAST_BYTE 0xb00001dd)
5600#define R_DMA_CH3_CLR_INTR__clr_eop__BITNR 1
5601#define R_DMA_CH3_CLR_INTR__clr_eop__WIDTH 1
5602#define R_DMA_CH3_CLR_INTR__clr_eop__do 1
5603#define R_DMA_CH3_CLR_INTR__clr_eop__dont 0
5604#define R_DMA_CH3_CLR_INTR__clr_descr__BITNR 0
5605#define R_DMA_CH3_CLR_INTR__clr_descr__WIDTH 1
5606#define R_DMA_CH3_CLR_INTR__clr_descr__do 1
5607#define R_DMA_CH3_CLR_INTR__clr_descr__dont 0
5608
5609#define R_DMA_CH3_STATUS (IO_TYPECAST_RO_BYTE 0xb00001de)
5610#define R_DMA_CH3_STATUS__avail__BITNR 0
5611#define R_DMA_CH3_STATUS__avail__WIDTH 7
5612
5613#define R_DMA_CH4_HWSW (IO_TYPECAST_UDWORD 0xb0000140)
5614#define R_DMA_CH4_HWSW__hw__BITNR 16
5615#define R_DMA_CH4_HWSW__hw__WIDTH 16
5616#define R_DMA_CH4_HWSW__sw__BITNR 0
5617#define R_DMA_CH4_HWSW__sw__WIDTH 16
5618
5619#define R_DMA_CH4_DESCR (IO_TYPECAST_UDWORD 0xb000014c)
5620#define R_DMA_CH4_DESCR__descr__BITNR 0
5621#define R_DMA_CH4_DESCR__descr__WIDTH 32
5622
5623#define R_DMA_CH4_NEXT (IO_TYPECAST_UDWORD 0xb0000144)
5624#define R_DMA_CH4_NEXT__next__BITNR 0
5625#define R_DMA_CH4_NEXT__next__WIDTH 32
5626
5627#define R_DMA_CH4_BUF (IO_TYPECAST_UDWORD 0xb0000148)
5628#define R_DMA_CH4_BUF__buf__BITNR 0
5629#define R_DMA_CH4_BUF__buf__WIDTH 32
5630
5631#define R_DMA_CH4_FIRST (IO_TYPECAST_UDWORD 0xb00001b0)
5632#define R_DMA_CH4_FIRST__first__BITNR 0
5633#define R_DMA_CH4_FIRST__first__WIDTH 32
5634
5635#define R_DMA_CH4_CMD (IO_TYPECAST_BYTE 0xb00001e0)
5636#define R_DMA_CH4_CMD__cmd__BITNR 0
5637#define R_DMA_CH4_CMD__cmd__WIDTH 3
5638#define R_DMA_CH4_CMD__cmd__hold 0
5639#define R_DMA_CH4_CMD__cmd__start 1
5640#define R_DMA_CH4_CMD__cmd__restart 3
5641#define R_DMA_CH4_CMD__cmd__continue 3
5642#define R_DMA_CH4_CMD__cmd__reset 4
5643
5644#define R_DMA_CH4_CLR_INTR (IO_TYPECAST_BYTE 0xb00001e1)
5645#define R_DMA_CH4_CLR_INTR__clr_eop__BITNR 1
5646#define R_DMA_CH4_CLR_INTR__clr_eop__WIDTH 1
5647#define R_DMA_CH4_CLR_INTR__clr_eop__do 1
5648#define R_DMA_CH4_CLR_INTR__clr_eop__dont 0
5649#define R_DMA_CH4_CLR_INTR__clr_descr__BITNR 0
5650#define R_DMA_CH4_CLR_INTR__clr_descr__WIDTH 1
5651#define R_DMA_CH4_CLR_INTR__clr_descr__do 1
5652#define R_DMA_CH4_CLR_INTR__clr_descr__dont 0
5653
5654#define R_DMA_CH4_STATUS (IO_TYPECAST_RO_BYTE 0xb00001e2)
5655#define R_DMA_CH4_STATUS__avail__BITNR 0
5656#define R_DMA_CH4_STATUS__avail__WIDTH 7
5657
5658#define R_DMA_CH5_HWSW (IO_TYPECAST_UDWORD 0xb0000150)
5659#define R_DMA_CH5_HWSW__hw__BITNR 16
5660#define R_DMA_CH5_HWSW__hw__WIDTH 16
5661#define R_DMA_CH5_HWSW__sw__BITNR 0
5662#define R_DMA_CH5_HWSW__sw__WIDTH 16
5663
5664#define R_DMA_CH5_DESCR (IO_TYPECAST_UDWORD 0xb000015c)
5665#define R_DMA_CH5_DESCR__descr__BITNR 0
5666#define R_DMA_CH5_DESCR__descr__WIDTH 32
5667
5668#define R_DMA_CH5_NEXT (IO_TYPECAST_UDWORD 0xb0000154)
5669#define R_DMA_CH5_NEXT__next__BITNR 0
5670#define R_DMA_CH5_NEXT__next__WIDTH 32
5671
5672#define R_DMA_CH5_BUF (IO_TYPECAST_UDWORD 0xb0000158)
5673#define R_DMA_CH5_BUF__buf__BITNR 0
5674#define R_DMA_CH5_BUF__buf__WIDTH 32
5675
5676#define R_DMA_CH5_FIRST (IO_TYPECAST_UDWORD 0xb00001b4)
5677#define R_DMA_CH5_FIRST__first__BITNR 0
5678#define R_DMA_CH5_FIRST__first__WIDTH 32
5679
5680#define R_DMA_CH5_CMD (IO_TYPECAST_BYTE 0xb00001e4)
5681#define R_DMA_CH5_CMD__cmd__BITNR 0
5682#define R_DMA_CH5_CMD__cmd__WIDTH 3
5683#define R_DMA_CH5_CMD__cmd__hold 0
5684#define R_DMA_CH5_CMD__cmd__start 1
5685#define R_DMA_CH5_CMD__cmd__restart 3
5686#define R_DMA_CH5_CMD__cmd__continue 3
5687#define R_DMA_CH5_CMD__cmd__reset 4
5688
5689#define R_DMA_CH5_CLR_INTR (IO_TYPECAST_BYTE 0xb00001e5)
5690#define R_DMA_CH5_CLR_INTR__clr_eop__BITNR 1
5691#define R_DMA_CH5_CLR_INTR__clr_eop__WIDTH 1
5692#define R_DMA_CH5_CLR_INTR__clr_eop__do 1
5693#define R_DMA_CH5_CLR_INTR__clr_eop__dont 0
5694#define R_DMA_CH5_CLR_INTR__clr_descr__BITNR 0
5695#define R_DMA_CH5_CLR_INTR__clr_descr__WIDTH 1
5696#define R_DMA_CH5_CLR_INTR__clr_descr__do 1
5697#define R_DMA_CH5_CLR_INTR__clr_descr__dont 0
5698
5699#define R_DMA_CH5_STATUS (IO_TYPECAST_RO_BYTE 0xb00001e6)
5700#define R_DMA_CH5_STATUS__avail__BITNR 0
5701#define R_DMA_CH5_STATUS__avail__WIDTH 7
5702
5703#define R_DMA_CH6_HWSW (IO_TYPECAST_UDWORD 0xb0000160)
5704#define R_DMA_CH6_HWSW__hw__BITNR 16
5705#define R_DMA_CH6_HWSW__hw__WIDTH 16
5706#define R_DMA_CH6_HWSW__sw__BITNR 0
5707#define R_DMA_CH6_HWSW__sw__WIDTH 16
5708
5709#define R_DMA_CH6_DESCR (IO_TYPECAST_UDWORD 0xb000016c)
5710#define R_DMA_CH6_DESCR__descr__BITNR 0
5711#define R_DMA_CH6_DESCR__descr__WIDTH 32
5712
5713#define R_DMA_CH6_NEXT (IO_TYPECAST_UDWORD 0xb0000164)
5714#define R_DMA_CH6_NEXT__next__BITNR 0
5715#define R_DMA_CH6_NEXT__next__WIDTH 32
5716
5717#define R_DMA_CH6_BUF (IO_TYPECAST_UDWORD 0xb0000168)
5718#define R_DMA_CH6_BUF__buf__BITNR 0
5719#define R_DMA_CH6_BUF__buf__WIDTH 32
5720
5721#define R_DMA_CH6_FIRST (IO_TYPECAST_UDWORD 0xb00001b8)
5722#define R_DMA_CH6_FIRST__first__BITNR 0
5723#define R_DMA_CH6_FIRST__first__WIDTH 32
5724
5725#define R_DMA_CH6_CMD (IO_TYPECAST_BYTE 0xb00001e8)
5726#define R_DMA_CH6_CMD__cmd__BITNR 0
5727#define R_DMA_CH6_CMD__cmd__WIDTH 3
5728#define R_DMA_CH6_CMD__cmd__hold 0
5729#define R_DMA_CH6_CMD__cmd__start 1
5730#define R_DMA_CH6_CMD__cmd__restart 3
5731#define R_DMA_CH6_CMD__cmd__continue 3
5732#define R_DMA_CH6_CMD__cmd__reset 4
5733
5734#define R_DMA_CH6_CLR_INTR (IO_TYPECAST_BYTE 0xb00001e9)
5735#define R_DMA_CH6_CLR_INTR__clr_eop__BITNR 1
5736#define R_DMA_CH6_CLR_INTR__clr_eop__WIDTH 1
5737#define R_DMA_CH6_CLR_INTR__clr_eop__do 1
5738#define R_DMA_CH6_CLR_INTR__clr_eop__dont 0
5739#define R_DMA_CH6_CLR_INTR__clr_descr__BITNR 0
5740#define R_DMA_CH6_CLR_INTR__clr_descr__WIDTH 1
5741#define R_DMA_CH6_CLR_INTR__clr_descr__do 1
5742#define R_DMA_CH6_CLR_INTR__clr_descr__dont 0
5743
5744#define R_DMA_CH6_STATUS (IO_TYPECAST_RO_BYTE 0xb00001ea)
5745#define R_DMA_CH6_STATUS__avail__BITNR 0
5746#define R_DMA_CH6_STATUS__avail__WIDTH 7
5747
5748#define R_DMA_CH7_HWSW (IO_TYPECAST_UDWORD 0xb0000170)
5749#define R_DMA_CH7_HWSW__hw__BITNR 16
5750#define R_DMA_CH7_HWSW__hw__WIDTH 16
5751#define R_DMA_CH7_HWSW__sw__BITNR 0
5752#define R_DMA_CH7_HWSW__sw__WIDTH 16
5753
5754#define R_DMA_CH7_DESCR (IO_TYPECAST_UDWORD 0xb000017c)
5755#define R_DMA_CH7_DESCR__descr__BITNR 0
5756#define R_DMA_CH7_DESCR__descr__WIDTH 32
5757
5758#define R_DMA_CH7_NEXT (IO_TYPECAST_UDWORD 0xb0000174)
5759#define R_DMA_CH7_NEXT__next__BITNR 0
5760#define R_DMA_CH7_NEXT__next__WIDTH 32
5761
5762#define R_DMA_CH7_BUF (IO_TYPECAST_UDWORD 0xb0000178)
5763#define R_DMA_CH7_BUF__buf__BITNR 0
5764#define R_DMA_CH7_BUF__buf__WIDTH 32
5765
5766#define R_DMA_CH7_FIRST (IO_TYPECAST_UDWORD 0xb00001bc)
5767#define R_DMA_CH7_FIRST__first__BITNR 0
5768#define R_DMA_CH7_FIRST__first__WIDTH 32
5769
5770#define R_DMA_CH7_CMD (IO_TYPECAST_BYTE 0xb00001ec)
5771#define R_DMA_CH7_CMD__cmd__BITNR 0
5772#define R_DMA_CH7_CMD__cmd__WIDTH 3
5773#define R_DMA_CH7_CMD__cmd__hold 0
5774#define R_DMA_CH7_CMD__cmd__start 1
5775#define R_DMA_CH7_CMD__cmd__restart 3
5776#define R_DMA_CH7_CMD__cmd__continue 3
5777#define R_DMA_CH7_CMD__cmd__reset 4
5778
5779#define R_DMA_CH7_CLR_INTR (IO_TYPECAST_BYTE 0xb00001ed)
5780#define R_DMA_CH7_CLR_INTR__clr_eop__BITNR 1
5781#define R_DMA_CH7_CLR_INTR__clr_eop__WIDTH 1
5782#define R_DMA_CH7_CLR_INTR__clr_eop__do 1
5783#define R_DMA_CH7_CLR_INTR__clr_eop__dont 0
5784#define R_DMA_CH7_CLR_INTR__clr_descr__BITNR 0
5785#define R_DMA_CH7_CLR_INTR__clr_descr__WIDTH 1
5786#define R_DMA_CH7_CLR_INTR__clr_descr__do 1
5787#define R_DMA_CH7_CLR_INTR__clr_descr__dont 0
5788
5789#define R_DMA_CH7_STATUS (IO_TYPECAST_RO_BYTE 0xb00001ee)
5790#define R_DMA_CH7_STATUS__avail__BITNR 0
5791#define R_DMA_CH7_STATUS__avail__WIDTH 7
5792
5793#define R_DMA_CH8_HWSW (IO_TYPECAST_UDWORD 0xb0000180)
5794#define R_DMA_CH8_HWSW__hw__BITNR 16
5795#define R_DMA_CH8_HWSW__hw__WIDTH 16
5796#define R_DMA_CH8_HWSW__sw__BITNR 0
5797#define R_DMA_CH8_HWSW__sw__WIDTH 16
5798
5799#define R_DMA_CH8_DESCR (IO_TYPECAST_UDWORD 0xb000018c)
5800#define R_DMA_CH8_DESCR__descr__BITNR 0
5801#define R_DMA_CH8_DESCR__descr__WIDTH 32
5802
5803#define R_DMA_CH8_NEXT (IO_TYPECAST_UDWORD 0xb0000184)
5804#define R_DMA_CH8_NEXT__next__BITNR 0
5805#define R_DMA_CH8_NEXT__next__WIDTH 32
5806
5807#define R_DMA_CH8_BUF (IO_TYPECAST_UDWORD 0xb0000188)
5808#define R_DMA_CH8_BUF__buf__BITNR 0
5809#define R_DMA_CH8_BUF__buf__WIDTH 32
5810
5811#define R_DMA_CH8_FIRST (IO_TYPECAST_UDWORD 0xb00001c0)
5812#define R_DMA_CH8_FIRST__first__BITNR 0
5813#define R_DMA_CH8_FIRST__first__WIDTH 32
5814
5815#define R_DMA_CH8_CMD (IO_TYPECAST_BYTE 0xb00001f0)
5816#define R_DMA_CH8_CMD__cmd__BITNR 0
5817#define R_DMA_CH8_CMD__cmd__WIDTH 3
5818#define R_DMA_CH8_CMD__cmd__hold 0
5819#define R_DMA_CH8_CMD__cmd__start 1
5820#define R_DMA_CH8_CMD__cmd__restart 3
5821#define R_DMA_CH8_CMD__cmd__continue 3
5822#define R_DMA_CH8_CMD__cmd__reset 4
5823
5824#define R_DMA_CH8_CLR_INTR (IO_TYPECAST_BYTE 0xb00001f1)
5825#define R_DMA_CH8_CLR_INTR__clr_eop__BITNR 1
5826#define R_DMA_CH8_CLR_INTR__clr_eop__WIDTH 1
5827#define R_DMA_CH8_CLR_INTR__clr_eop__do 1
5828#define R_DMA_CH8_CLR_INTR__clr_eop__dont 0
5829#define R_DMA_CH8_CLR_INTR__clr_descr__BITNR 0
5830#define R_DMA_CH8_CLR_INTR__clr_descr__WIDTH 1
5831#define R_DMA_CH8_CLR_INTR__clr_descr__do 1
5832#define R_DMA_CH8_CLR_INTR__clr_descr__dont 0
5833
5834#define R_DMA_CH8_STATUS (IO_TYPECAST_RO_BYTE 0xb00001f2)
5835#define R_DMA_CH8_STATUS__avail__BITNR 0
5836#define R_DMA_CH8_STATUS__avail__WIDTH 7
5837
5838#define R_DMA_CH8_SUB (IO_TYPECAST_UDWORD 0xb000018c)
5839#define R_DMA_CH8_SUB__sub__BITNR 0
5840#define R_DMA_CH8_SUB__sub__WIDTH 32
5841
5842#define R_DMA_CH8_NEP (IO_TYPECAST_UDWORD 0xb00001c0)
5843#define R_DMA_CH8_NEP__nep__BITNR 0
5844#define R_DMA_CH8_NEP__nep__WIDTH 32
5845
5846#define R_DMA_CH8_SUB0_EP (IO_TYPECAST_UDWORD 0xb00001c8)
5847#define R_DMA_CH8_SUB0_EP__ep__BITNR 0
5848#define R_DMA_CH8_SUB0_EP__ep__WIDTH 32
5849
5850#define R_DMA_CH8_SUB0_CMD (IO_TYPECAST_BYTE 0xb00001d3)
5851#define R_DMA_CH8_SUB0_CMD__cmd__BITNR 0
5852#define R_DMA_CH8_SUB0_CMD__cmd__WIDTH 1
5853#define R_DMA_CH8_SUB0_CMD__cmd__stop 0
5854#define R_DMA_CH8_SUB0_CMD__cmd__start 1
5855
5856#define R_DMA_CH8_SUB0_CLR_INTR (IO_TYPECAST_BYTE 0xb00001e3)
5857#define R_DMA_CH8_SUB0_CLR_INTR__clr_descr__BITNR 0
5858#define R_DMA_CH8_SUB0_CLR_INTR__clr_descr__WIDTH 1
5859#define R_DMA_CH8_SUB0_CLR_INTR__clr_descr__dont 0
5860#define R_DMA_CH8_SUB0_CLR_INTR__clr_descr__do 1
5861
5862#define R_DMA_CH8_SUB1_EP (IO_TYPECAST_UDWORD 0xb00001cc)
5863#define R_DMA_CH8_SUB1_EP__ep__BITNR 0
5864#define R_DMA_CH8_SUB1_EP__ep__WIDTH 32
5865
5866#define R_DMA_CH8_SUB1_CMD (IO_TYPECAST_BYTE 0xb00001d7)
5867#define R_DMA_CH8_SUB1_CMD__cmd__BITNR 0
5868#define R_DMA_CH8_SUB1_CMD__cmd__WIDTH 1
5869#define R_DMA_CH8_SUB1_CMD__cmd__stop 0
5870#define R_DMA_CH8_SUB1_CMD__cmd__start 1
5871
5872#define R_DMA_CH8_SUB1_CLR_INTR (IO_TYPECAST_BYTE 0xb00001e7)
5873#define R_DMA_CH8_SUB1_CLR_INTR__clr_descr__BITNR 0
5874#define R_DMA_CH8_SUB1_CLR_INTR__clr_descr__WIDTH 1
5875#define R_DMA_CH8_SUB1_CLR_INTR__clr_descr__dont 0
5876#define R_DMA_CH8_SUB1_CLR_INTR__clr_descr__do 1
5877
5878#define R_DMA_CH8_SUB2_EP (IO_TYPECAST_UDWORD 0xb00001f8)
5879#define R_DMA_CH8_SUB2_EP__ep__BITNR 0
5880#define R_DMA_CH8_SUB2_EP__ep__WIDTH 32
5881
5882#define R_DMA_CH8_SUB2_CMD (IO_TYPECAST_BYTE 0xb00001db)
5883#define R_DMA_CH8_SUB2_CMD__cmd__BITNR 0
5884#define R_DMA_CH8_SUB2_CMD__cmd__WIDTH 1
5885#define R_DMA_CH8_SUB2_CMD__cmd__stop 0
5886#define R_DMA_CH8_SUB2_CMD__cmd__start 1
5887
5888#define R_DMA_CH8_SUB2_CLR_INTR (IO_TYPECAST_BYTE 0xb00001eb)
5889#define R_DMA_CH8_SUB2_CLR_INTR__clr_descr__BITNR 0
5890#define R_DMA_CH8_SUB2_CLR_INTR__clr_descr__WIDTH 1
5891#define R_DMA_CH8_SUB2_CLR_INTR__clr_descr__dont 0
5892#define R_DMA_CH8_SUB2_CLR_INTR__clr_descr__do 1
5893
5894#define R_DMA_CH8_SUB3_EP (IO_TYPECAST_UDWORD 0xb00001fc)
5895#define R_DMA_CH8_SUB3_EP__ep__BITNR 0
5896#define R_DMA_CH8_SUB3_EP__ep__WIDTH 32
5897
5898#define R_DMA_CH8_SUB3_CMD (IO_TYPECAST_BYTE 0xb00001df)
5899#define R_DMA_CH8_SUB3_CMD__cmd__BITNR 0
5900#define R_DMA_CH8_SUB3_CMD__cmd__WIDTH 1
5901#define R_DMA_CH8_SUB3_CMD__cmd__stop 0
5902#define R_DMA_CH8_SUB3_CMD__cmd__start 1
5903
5904#define R_DMA_CH8_SUB3_CLR_INTR (IO_TYPECAST_BYTE 0xb00001ef)
5905#define R_DMA_CH8_SUB3_CLR_INTR__clr_descr__BITNR 0
5906#define R_DMA_CH8_SUB3_CLR_INTR__clr_descr__WIDTH 1
5907#define R_DMA_CH8_SUB3_CLR_INTR__clr_descr__dont 0
5908#define R_DMA_CH8_SUB3_CLR_INTR__clr_descr__do 1
5909
5910#define R_DMA_CH9_HWSW (IO_TYPECAST_UDWORD 0xb0000190)
5911#define R_DMA_CH9_HWSW__hw__BITNR 16
5912#define R_DMA_CH9_HWSW__hw__WIDTH 16
5913#define R_DMA_CH9_HWSW__sw__BITNR 0
5914#define R_DMA_CH9_HWSW__sw__WIDTH 16
5915
5916#define R_DMA_CH9_DESCR (IO_TYPECAST_UDWORD 0xb000019c)
5917#define R_DMA_CH9_DESCR__descr__BITNR 0
5918#define R_DMA_CH9_DESCR__descr__WIDTH 32
5919
5920#define R_DMA_CH9_NEXT (IO_TYPECAST_UDWORD 0xb0000194)
5921#define R_DMA_CH9_NEXT__next__BITNR 0
5922#define R_DMA_CH9_NEXT__next__WIDTH 32
5923
5924#define R_DMA_CH9_BUF (IO_TYPECAST_UDWORD 0xb0000198)
5925#define R_DMA_CH9_BUF__buf__BITNR 0
5926#define R_DMA_CH9_BUF__buf__WIDTH 32
5927
5928#define R_DMA_CH9_FIRST (IO_TYPECAST_UDWORD 0xb00001c4)
5929#define R_DMA_CH9_FIRST__first__BITNR 0
5930#define R_DMA_CH9_FIRST__first__WIDTH 32
5931
5932#define R_DMA_CH9_CMD (IO_TYPECAST_BYTE 0xb00001f4)
5933#define R_DMA_CH9_CMD__cmd__BITNR 0
5934#define R_DMA_CH9_CMD__cmd__WIDTH 3
5935#define R_DMA_CH9_CMD__cmd__hold 0
5936#define R_DMA_CH9_CMD__cmd__start 1
5937#define R_DMA_CH9_CMD__cmd__restart 3
5938#define R_DMA_CH9_CMD__cmd__continue 3
5939#define R_DMA_CH9_CMD__cmd__reset 4
5940
5941#define R_DMA_CH9_CLR_INTR (IO_TYPECAST_BYTE 0xb00001f5)
5942#define R_DMA_CH9_CLR_INTR__clr_eop__BITNR 1
5943#define R_DMA_CH9_CLR_INTR__clr_eop__WIDTH 1
5944#define R_DMA_CH9_CLR_INTR__clr_eop__do 1
5945#define R_DMA_CH9_CLR_INTR__clr_eop__dont 0
5946#define R_DMA_CH9_CLR_INTR__clr_descr__BITNR 0
5947#define R_DMA_CH9_CLR_INTR__clr_descr__WIDTH 1
5948#define R_DMA_CH9_CLR_INTR__clr_descr__do 1
5949#define R_DMA_CH9_CLR_INTR__clr_descr__dont 0
5950
5951#define R_DMA_CH9_STATUS (IO_TYPECAST_RO_BYTE 0xb00001f6)
5952#define R_DMA_CH9_STATUS__avail__BITNR 0
5953#define R_DMA_CH9_STATUS__avail__WIDTH 7
5954
5955/*
5956!* Test mode registers
5957!*/
5958
5959#define R_TEST_MODE (IO_TYPECAST_UDWORD 0xb00000fc)
5960#define R_TEST_MODE__single_step__BITNR 19
5961#define R_TEST_MODE__single_step__WIDTH 1
5962#define R_TEST_MODE__single_step__on 1
5963#define R_TEST_MODE__single_step__off 0
5964#define R_TEST_MODE__step_wr__BITNR 18
5965#define R_TEST_MODE__step_wr__WIDTH 1
5966#define R_TEST_MODE__step_wr__on 1
5967#define R_TEST_MODE__step_wr__off 0
5968#define R_TEST_MODE__step_rd__BITNR 17
5969#define R_TEST_MODE__step_rd__WIDTH 1
5970#define R_TEST_MODE__step_rd__on 1
5971#define R_TEST_MODE__step_rd__off 0
5972#define R_TEST_MODE__step_fetch__BITNR 16
5973#define R_TEST_MODE__step_fetch__WIDTH 1
5974#define R_TEST_MODE__step_fetch__on 1
5975#define R_TEST_MODE__step_fetch__off 0
5976#define R_TEST_MODE__mmu_test__BITNR 12
5977#define R_TEST_MODE__mmu_test__WIDTH 1
5978#define R_TEST_MODE__mmu_test__on 1
5979#define R_TEST_MODE__mmu_test__off 0
5980#define R_TEST_MODE__usb_test__BITNR 11
5981#define R_TEST_MODE__usb_test__WIDTH 1
5982#define R_TEST_MODE__usb_test__on 1
5983#define R_TEST_MODE__usb_test__off 0
5984#define R_TEST_MODE__scsi_timer_test__BITNR 10
5985#define R_TEST_MODE__scsi_timer_test__WIDTH 1
5986#define R_TEST_MODE__scsi_timer_test__on 1
5987#define R_TEST_MODE__scsi_timer_test__off 0
5988#define R_TEST_MODE__backoff__BITNR 9
5989#define R_TEST_MODE__backoff__WIDTH 1
5990#define R_TEST_MODE__backoff__on 1
5991#define R_TEST_MODE__backoff__off 0
5992#define R_TEST_MODE__snmp_test__BITNR 8
5993#define R_TEST_MODE__snmp_test__WIDTH 1
5994#define R_TEST_MODE__snmp_test__on 1
5995#define R_TEST_MODE__snmp_test__off 0
5996#define R_TEST_MODE__snmp_inc__BITNR 7
5997#define R_TEST_MODE__snmp_inc__WIDTH 1
5998#define R_TEST_MODE__snmp_inc__do 1
5999#define R_TEST_MODE__snmp_inc__dont 0
6000#define R_TEST_MODE__ser_loop__BITNR 6
6001#define R_TEST_MODE__ser_loop__WIDTH 1
6002#define R_TEST_MODE__ser_loop__on 1
6003#define R_TEST_MODE__ser_loop__off 0
6004#define R_TEST_MODE__baudrate__BITNR 5
6005#define R_TEST_MODE__baudrate__WIDTH 1
6006#define R_TEST_MODE__baudrate__on 1
6007#define R_TEST_MODE__baudrate__off 0
6008#define R_TEST_MODE__timer__BITNR 3
6009#define R_TEST_MODE__timer__WIDTH 2
6010#define R_TEST_MODE__timer__off 0
6011#define R_TEST_MODE__timer__even 1
6012#define R_TEST_MODE__timer__odd 2
6013#define R_TEST_MODE__timer__all 3
6014#define R_TEST_MODE__cache_test__BITNR 2
6015#define R_TEST_MODE__cache_test__WIDTH 1
6016#define R_TEST_MODE__cache_test__normal 0
6017#define R_TEST_MODE__cache_test__test 1
6018#define R_TEST_MODE__tag_test__BITNR 1
6019#define R_TEST_MODE__tag_test__WIDTH 1
6020#define R_TEST_MODE__tag_test__normal 0
6021#define R_TEST_MODE__tag_test__test 1
6022#define R_TEST_MODE__cache_enable__BITNR 0
6023#define R_TEST_MODE__cache_enable__WIDTH 1
6024#define R_TEST_MODE__cache_enable__enable 1
6025#define R_TEST_MODE__cache_enable__disable 0
6026
6027#define R_SINGLE_STEP (IO_TYPECAST_BYTE 0xb00000fe)
6028#define R_SINGLE_STEP__single_step__BITNR 3
6029#define R_SINGLE_STEP__single_step__WIDTH 1
6030#define R_SINGLE_STEP__single_step__on 1
6031#define R_SINGLE_STEP__single_step__off 0
6032#define R_SINGLE_STEP__step_wr__BITNR 2
6033#define R_SINGLE_STEP__step_wr__WIDTH 1
6034#define R_SINGLE_STEP__step_wr__on 1
6035#define R_SINGLE_STEP__step_wr__off 0
6036#define R_SINGLE_STEP__step_rd__BITNR 1
6037#define R_SINGLE_STEP__step_rd__WIDTH 1
6038#define R_SINGLE_STEP__step_rd__on 1
6039#define R_SINGLE_STEP__step_rd__off 0
6040#define R_SINGLE_STEP__step_fetch__BITNR 0
6041#define R_SINGLE_STEP__step_fetch__WIDTH 1
6042#define R_SINGLE_STEP__step_fetch__on 1
6043#define R_SINGLE_STEP__step_fetch__off 0
6044
6045/*
6046!* USB interface control registers
6047!*/
6048
6049#define R_USB_REVISION (IO_TYPECAST_RO_BYTE 0xb0000200)
6050#define R_USB_REVISION__major__BITNR 4
6051#define R_USB_REVISION__major__WIDTH 4
6052#define R_USB_REVISION__minor__BITNR 0
6053#define R_USB_REVISION__minor__WIDTH 4
6054
6055#define R_USB_COMMAND (IO_TYPECAST_BYTE 0xb0000201)
6056#define R_USB_COMMAND__port_sel__BITNR 6
6057#define R_USB_COMMAND__port_sel__WIDTH 2
6058#define R_USB_COMMAND__port_sel__nop 0
6059#define R_USB_COMMAND__port_sel__port1 1
6060#define R_USB_COMMAND__port_sel__port2 2
6061#define R_USB_COMMAND__port_sel__both 3
6062#define R_USB_COMMAND__port_cmd__BITNR 4
6063#define R_USB_COMMAND__port_cmd__WIDTH 2
6064#define R_USB_COMMAND__port_cmd__reset 0
6065#define R_USB_COMMAND__port_cmd__disable 1
6066#define R_USB_COMMAND__port_cmd__suspend 2
6067#define R_USB_COMMAND__port_cmd__resume 3
6068#define R_USB_COMMAND__busy__BITNR 3
6069#define R_USB_COMMAND__busy__WIDTH 1
6070#define R_USB_COMMAND__busy__no 0
6071#define R_USB_COMMAND__busy__yes 1
6072#define R_USB_COMMAND__ctrl_cmd__BITNR 0
6073#define R_USB_COMMAND__ctrl_cmd__WIDTH 3
6074#define R_USB_COMMAND__ctrl_cmd__nop 0
6075#define R_USB_COMMAND__ctrl_cmd__reset 1
6076#define R_USB_COMMAND__ctrl_cmd__deconfig 2
6077#define R_USB_COMMAND__ctrl_cmd__host_config 3
6078#define R_USB_COMMAND__ctrl_cmd__dev_config 4
6079#define R_USB_COMMAND__ctrl_cmd__host_nop 5
6080#define R_USB_COMMAND__ctrl_cmd__host_run 6
6081#define R_USB_COMMAND__ctrl_cmd__host_stop 7
6082
6083#define R_USB_COMMAND_DEV (IO_TYPECAST_BYTE 0xb0000201)
6084#define R_USB_COMMAND_DEV__port_sel__BITNR 6
6085#define R_USB_COMMAND_DEV__port_sel__WIDTH 2
6086#define R_USB_COMMAND_DEV__port_sel__nop 0
6087#define R_USB_COMMAND_DEV__port_sel__dummy1 1
6088#define R_USB_COMMAND_DEV__port_sel__dummy2 2
6089#define R_USB_COMMAND_DEV__port_sel__any 3
6090#define R_USB_COMMAND_DEV__port_cmd__BITNR 4
6091#define R_USB_COMMAND_DEV__port_cmd__WIDTH 2
6092#define R_USB_COMMAND_DEV__port_cmd__active 0
6093#define R_USB_COMMAND_DEV__port_cmd__passive 1
6094#define R_USB_COMMAND_DEV__port_cmd__nop 2
6095#define R_USB_COMMAND_DEV__port_cmd__wakeup 3
6096#define R_USB_COMMAND_DEV__busy__BITNR 3
6097#define R_USB_COMMAND_DEV__busy__WIDTH 1
6098#define R_USB_COMMAND_DEV__busy__no 0
6099#define R_USB_COMMAND_DEV__busy__yes 1
6100#define R_USB_COMMAND_DEV__ctrl_cmd__BITNR 0
6101#define R_USB_COMMAND_DEV__ctrl_cmd__WIDTH 3
6102#define R_USB_COMMAND_DEV__ctrl_cmd__nop 0
6103#define R_USB_COMMAND_DEV__ctrl_cmd__reset 1
6104#define R_USB_COMMAND_DEV__ctrl_cmd__deconfig 2
6105#define R_USB_COMMAND_DEV__ctrl_cmd__host_config 3
6106#define R_USB_COMMAND_DEV__ctrl_cmd__dev_config 4
6107#define R_USB_COMMAND_DEV__ctrl_cmd__dev_active 5
6108#define R_USB_COMMAND_DEV__ctrl_cmd__dev_passive 6
6109#define R_USB_COMMAND_DEV__ctrl_cmd__dev_nop 7
6110
6111#define R_USB_STATUS (IO_TYPECAST_RO_BYTE 0xb0000202)
6112#define R_USB_STATUS__ourun__BITNR 5
6113#define R_USB_STATUS__ourun__WIDTH 1
6114#define R_USB_STATUS__ourun__no 0
6115#define R_USB_STATUS__ourun__yes 1
6116#define R_USB_STATUS__perror__BITNR 4
6117#define R_USB_STATUS__perror__WIDTH 1
6118#define R_USB_STATUS__perror__no 0
6119#define R_USB_STATUS__perror__yes 1
6120#define R_USB_STATUS__device_mode__BITNR 3
6121#define R_USB_STATUS__device_mode__WIDTH 1
6122#define R_USB_STATUS__device_mode__no 0
6123#define R_USB_STATUS__device_mode__yes 1
6124#define R_USB_STATUS__host_mode__BITNR 2
6125#define R_USB_STATUS__host_mode__WIDTH 1
6126#define R_USB_STATUS__host_mode__no 0
6127#define R_USB_STATUS__host_mode__yes 1
6128#define R_USB_STATUS__started__BITNR 1
6129#define R_USB_STATUS__started__WIDTH 1
6130#define R_USB_STATUS__started__no 0
6131#define R_USB_STATUS__started__yes 1
6132#define R_USB_STATUS__running__BITNR 0
6133#define R_USB_STATUS__running__WIDTH 1
6134#define R_USB_STATUS__running__no 0
6135#define R_USB_STATUS__running__yes 1
6136
6137#define R_USB_IRQ_MASK_SET (IO_TYPECAST_UWORD 0xb0000204)
6138#define R_USB_IRQ_MASK_SET__iso_eof__BITNR 13
6139#define R_USB_IRQ_MASK_SET__iso_eof__WIDTH 1
6140#define R_USB_IRQ_MASK_SET__iso_eof__nop 0
6141#define R_USB_IRQ_MASK_SET__iso_eof__set 1
6142#define R_USB_IRQ_MASK_SET__intr_eof__BITNR 12
6143#define R_USB_IRQ_MASK_SET__intr_eof__WIDTH 1
6144#define R_USB_IRQ_MASK_SET__intr_eof__nop 0
6145#define R_USB_IRQ_MASK_SET__intr_eof__set 1
6146#define R_USB_IRQ_MASK_SET__iso_eot__BITNR 11
6147#define R_USB_IRQ_MASK_SET__iso_eot__WIDTH 1
6148#define R_USB_IRQ_MASK_SET__iso_eot__nop 0
6149#define R_USB_IRQ_MASK_SET__iso_eot__set 1
6150#define R_USB_IRQ_MASK_SET__intr_eot__BITNR 10
6151#define R_USB_IRQ_MASK_SET__intr_eot__WIDTH 1
6152#define R_USB_IRQ_MASK_SET__intr_eot__nop 0
6153#define R_USB_IRQ_MASK_SET__intr_eot__set 1
6154#define R_USB_IRQ_MASK_SET__ctl_eot__BITNR 9
6155#define R_USB_IRQ_MASK_SET__ctl_eot__WIDTH 1
6156#define R_USB_IRQ_MASK_SET__ctl_eot__nop 0
6157#define R_USB_IRQ_MASK_SET__ctl_eot__set 1
6158#define R_USB_IRQ_MASK_SET__bulk_eot__BITNR 8
6159#define R_USB_IRQ_MASK_SET__bulk_eot__WIDTH 1
6160#define R_USB_IRQ_MASK_SET__bulk_eot__nop 0
6161#define R_USB_IRQ_MASK_SET__bulk_eot__set 1
6162#define R_USB_IRQ_MASK_SET__epid_attn__BITNR 3
6163#define R_USB_IRQ_MASK_SET__epid_attn__WIDTH 1
6164#define R_USB_IRQ_MASK_SET__epid_attn__nop 0
6165#define R_USB_IRQ_MASK_SET__epid_attn__set 1
6166#define R_USB_IRQ_MASK_SET__sof__BITNR 2
6167#define R_USB_IRQ_MASK_SET__sof__WIDTH 1
6168#define R_USB_IRQ_MASK_SET__sof__nop 0
6169#define R_USB_IRQ_MASK_SET__sof__set 1
6170#define R_USB_IRQ_MASK_SET__port_status__BITNR 1
6171#define R_USB_IRQ_MASK_SET__port_status__WIDTH 1
6172#define R_USB_IRQ_MASK_SET__port_status__nop 0
6173#define R_USB_IRQ_MASK_SET__port_status__set 1
6174#define R_USB_IRQ_MASK_SET__ctl_status__BITNR 0
6175#define R_USB_IRQ_MASK_SET__ctl_status__WIDTH 1
6176#define R_USB_IRQ_MASK_SET__ctl_status__nop 0
6177#define R_USB_IRQ_MASK_SET__ctl_status__set 1
6178
6179#define R_USB_IRQ_MASK_READ (IO_TYPECAST_RO_UWORD 0xb0000204)
6180#define R_USB_IRQ_MASK_READ__iso_eof__BITNR 13
6181#define R_USB_IRQ_MASK_READ__iso_eof__WIDTH 1
6182#define R_USB_IRQ_MASK_READ__iso_eof__no_pend 0
6183#define R_USB_IRQ_MASK_READ__iso_eof__pend 1
6184#define R_USB_IRQ_MASK_READ__intr_eof__BITNR 12
6185#define R_USB_IRQ_MASK_READ__intr_eof__WIDTH 1
6186#define R_USB_IRQ_MASK_READ__intr_eof__no_pend 0
6187#define R_USB_IRQ_MASK_READ__intr_eof__pend 1
6188#define R_USB_IRQ_MASK_READ__iso_eot__BITNR 11
6189#define R_USB_IRQ_MASK_READ__iso_eot__WIDTH 1
6190#define R_USB_IRQ_MASK_READ__iso_eot__no_pend 0
6191#define R_USB_IRQ_MASK_READ__iso_eot__pend 1
6192#define R_USB_IRQ_MASK_READ__intr_eot__BITNR 10
6193#define R_USB_IRQ_MASK_READ__intr_eot__WIDTH 1
6194#define R_USB_IRQ_MASK_READ__intr_eot__no_pend 0
6195#define R_USB_IRQ_MASK_READ__intr_eot__pend 1
6196#define R_USB_IRQ_MASK_READ__ctl_eot__BITNR 9
6197#define R_USB_IRQ_MASK_READ__ctl_eot__WIDTH 1
6198#define R_USB_IRQ_MASK_READ__ctl_eot__no_pend 0
6199#define R_USB_IRQ_MASK_READ__ctl_eot__pend 1
6200#define R_USB_IRQ_MASK_READ__bulk_eot__BITNR 8
6201#define R_USB_IRQ_MASK_READ__bulk_eot__WIDTH 1
6202#define R_USB_IRQ_MASK_READ__bulk_eot__no_pend 0
6203#define R_USB_IRQ_MASK_READ__bulk_eot__pend 1
6204#define R_USB_IRQ_MASK_READ__epid_attn__BITNR 3
6205#define R_USB_IRQ_MASK_READ__epid_attn__WIDTH 1
6206#define R_USB_IRQ_MASK_READ__epid_attn__no_pend 0
6207#define R_USB_IRQ_MASK_READ__epid_attn__pend 1
6208#define R_USB_IRQ_MASK_READ__sof__BITNR 2
6209#define R_USB_IRQ_MASK_READ__sof__WIDTH 1
6210#define R_USB_IRQ_MASK_READ__sof__no_pend 0
6211#define R_USB_IRQ_MASK_READ__sof__pend 1
6212#define R_USB_IRQ_MASK_READ__port_status__BITNR 1
6213#define R_USB_IRQ_MASK_READ__port_status__WIDTH 1
6214#define R_USB_IRQ_MASK_READ__port_status__no_pend 0
6215#define R_USB_IRQ_MASK_READ__port_status__pend 1
6216#define R_USB_IRQ_MASK_READ__ctl_status__BITNR 0
6217#define R_USB_IRQ_MASK_READ__ctl_status__WIDTH 1
6218#define R_USB_IRQ_MASK_READ__ctl_status__no_pend 0
6219#define R_USB_IRQ_MASK_READ__ctl_status__pend 1
6220
6221#define R_USB_IRQ_MASK_CLR (IO_TYPECAST_UWORD 0xb0000206)
6222#define R_USB_IRQ_MASK_CLR__iso_eof__BITNR 13
6223#define R_USB_IRQ_MASK_CLR__iso_eof__WIDTH 1
6224#define R_USB_IRQ_MASK_CLR__iso_eof__nop 0
6225#define R_USB_IRQ_MASK_CLR__iso_eof__clr 1
6226#define R_USB_IRQ_MASK_CLR__intr_eof__BITNR 12
6227#define R_USB_IRQ_MASK_CLR__intr_eof__WIDTH 1
6228#define R_USB_IRQ_MASK_CLR__intr_eof__nop 0
6229#define R_USB_IRQ_MASK_CLR__intr_eof__clr 1
6230#define R_USB_IRQ_MASK_CLR__iso_eot__BITNR 11
6231#define R_USB_IRQ_MASK_CLR__iso_eot__WIDTH 1
6232#define R_USB_IRQ_MASK_CLR__iso_eot__nop 0
6233#define R_USB_IRQ_MASK_CLR__iso_eot__clr 1
6234#define R_USB_IRQ_MASK_CLR__intr_eot__BITNR 10
6235#define R_USB_IRQ_MASK_CLR__intr_eot__WIDTH 1
6236#define R_USB_IRQ_MASK_CLR__intr_eot__nop 0
6237#define R_USB_IRQ_MASK_CLR__intr_eot__clr 1
6238#define R_USB_IRQ_MASK_CLR__ctl_eot__BITNR 9
6239#define R_USB_IRQ_MASK_CLR__ctl_eot__WIDTH 1
6240#define R_USB_IRQ_MASK_CLR__ctl_eot__nop 0
6241#define R_USB_IRQ_MASK_CLR__ctl_eot__clr 1
6242#define R_USB_IRQ_MASK_CLR__bulk_eot__BITNR 8
6243#define R_USB_IRQ_MASK_CLR__bulk_eot__WIDTH 1
6244#define R_USB_IRQ_MASK_CLR__bulk_eot__nop 0
6245#define R_USB_IRQ_MASK_CLR__bulk_eot__clr 1
6246#define R_USB_IRQ_MASK_CLR__epid_attn__BITNR 3
6247#define R_USB_IRQ_MASK_CLR__epid_attn__WIDTH 1
6248#define R_USB_IRQ_MASK_CLR__epid_attn__nop 0
6249#define R_USB_IRQ_MASK_CLR__epid_attn__clr 1
6250#define R_USB_IRQ_MASK_CLR__sof__BITNR 2
6251#define R_USB_IRQ_MASK_CLR__sof__WIDTH 1
6252#define R_USB_IRQ_MASK_CLR__sof__nop 0
6253#define R_USB_IRQ_MASK_CLR__sof__clr 1
6254#define R_USB_IRQ_MASK_CLR__port_status__BITNR 1
6255#define R_USB_IRQ_MASK_CLR__port_status__WIDTH 1
6256#define R_USB_IRQ_MASK_CLR__port_status__nop 0
6257#define R_USB_IRQ_MASK_CLR__port_status__clr 1
6258#define R_USB_IRQ_MASK_CLR__ctl_status__BITNR 0
6259#define R_USB_IRQ_MASK_CLR__ctl_status__WIDTH 1
6260#define R_USB_IRQ_MASK_CLR__ctl_status__nop 0
6261#define R_USB_IRQ_MASK_CLR__ctl_status__clr 1
6262
6263#define R_USB_IRQ_READ (IO_TYPECAST_RO_UWORD 0xb0000206)
6264#define R_USB_IRQ_READ__iso_eof__BITNR 13
6265#define R_USB_IRQ_READ__iso_eof__WIDTH 1
6266#define R_USB_IRQ_READ__iso_eof__no_pend 0
6267#define R_USB_IRQ_READ__iso_eof__pend 1
6268#define R_USB_IRQ_READ__intr_eof__BITNR 12
6269#define R_USB_IRQ_READ__intr_eof__WIDTH 1
6270#define R_USB_IRQ_READ__intr_eof__no_pend 0
6271#define R_USB_IRQ_READ__intr_eof__pend 1
6272#define R_USB_IRQ_READ__iso_eot__BITNR 11
6273#define R_USB_IRQ_READ__iso_eot__WIDTH 1
6274#define R_USB_IRQ_READ__iso_eot__no_pend 0
6275#define R_USB_IRQ_READ__iso_eot__pend 1
6276#define R_USB_IRQ_READ__intr_eot__BITNR 10
6277#define R_USB_IRQ_READ__intr_eot__WIDTH 1
6278#define R_USB_IRQ_READ__intr_eot__no_pend 0
6279#define R_USB_IRQ_READ__intr_eot__pend 1
6280#define R_USB_IRQ_READ__ctl_eot__BITNR 9
6281#define R_USB_IRQ_READ__ctl_eot__WIDTH 1
6282#define R_USB_IRQ_READ__ctl_eot__no_pend 0
6283#define R_USB_IRQ_READ__ctl_eot__pend 1
6284#define R_USB_IRQ_READ__bulk_eot__BITNR 8
6285#define R_USB_IRQ_READ__bulk_eot__WIDTH 1
6286#define R_USB_IRQ_READ__bulk_eot__no_pend 0
6287#define R_USB_IRQ_READ__bulk_eot__pend 1
6288#define R_USB_IRQ_READ__epid_attn__BITNR 3
6289#define R_USB_IRQ_READ__epid_attn__WIDTH 1
6290#define R_USB_IRQ_READ__epid_attn__no_pend 0
6291#define R_USB_IRQ_READ__epid_attn__pend 1
6292#define R_USB_IRQ_READ__sof__BITNR 2
6293#define R_USB_IRQ_READ__sof__WIDTH 1
6294#define R_USB_IRQ_READ__sof__no_pend 0
6295#define R_USB_IRQ_READ__sof__pend 1
6296#define R_USB_IRQ_READ__port_status__BITNR 1
6297#define R_USB_IRQ_READ__port_status__WIDTH 1
6298#define R_USB_IRQ_READ__port_status__no_pend 0
6299#define R_USB_IRQ_READ__port_status__pend 1
6300#define R_USB_IRQ_READ__ctl_status__BITNR 0
6301#define R_USB_IRQ_READ__ctl_status__WIDTH 1
6302#define R_USB_IRQ_READ__ctl_status__no_pend 0
6303#define R_USB_IRQ_READ__ctl_status__pend 1
6304
6305#define R_USB_IRQ_MASK_SET_DEV (IO_TYPECAST_UWORD 0xb0000204)
6306#define R_USB_IRQ_MASK_SET_DEV__out_eot__BITNR 12
6307#define R_USB_IRQ_MASK_SET_DEV__out_eot__WIDTH 1
6308#define R_USB_IRQ_MASK_SET_DEV__out_eot__nop 0
6309#define R_USB_IRQ_MASK_SET_DEV__out_eot__set 1
6310#define R_USB_IRQ_MASK_SET_DEV__ep3_in_eot__BITNR 11
6311#define R_USB_IRQ_MASK_SET_DEV__ep3_in_eot__WIDTH 1
6312#define R_USB_IRQ_MASK_SET_DEV__ep3_in_eot__nop 0
6313#define R_USB_IRQ_MASK_SET_DEV__ep3_in_eot__set 1
6314#define R_USB_IRQ_MASK_SET_DEV__ep2_in_eot__BITNR 10
6315#define R_USB_IRQ_MASK_SET_DEV__ep2_in_eot__WIDTH 1
6316#define R_USB_IRQ_MASK_SET_DEV__ep2_in_eot__nop 0
6317#define R_USB_IRQ_MASK_SET_DEV__ep2_in_eot__set 1
6318#define R_USB_IRQ_MASK_SET_DEV__ep1_in_eot__BITNR 9
6319#define R_USB_IRQ_MASK_SET_DEV__ep1_in_eot__WIDTH 1
6320#define R_USB_IRQ_MASK_SET_DEV__ep1_in_eot__nop 0
6321#define R_USB_IRQ_MASK_SET_DEV__ep1_in_eot__set 1
6322#define R_USB_IRQ_MASK_SET_DEV__ep0_in_eot__BITNR 8
6323#define R_USB_IRQ_MASK_SET_DEV__ep0_in_eot__WIDTH 1
6324#define R_USB_IRQ_MASK_SET_DEV__ep0_in_eot__nop 0
6325#define R_USB_IRQ_MASK_SET_DEV__ep0_in_eot__set 1
6326#define R_USB_IRQ_MASK_SET_DEV__epid_attn__BITNR 3
6327#define R_USB_IRQ_MASK_SET_DEV__epid_attn__WIDTH 1
6328#define R_USB_IRQ_MASK_SET_DEV__epid_attn__nop 0
6329#define R_USB_IRQ_MASK_SET_DEV__epid_attn__set 1
6330#define R_USB_IRQ_MASK_SET_DEV__sof__BITNR 2
6331#define R_USB_IRQ_MASK_SET_DEV__sof__WIDTH 1
6332#define R_USB_IRQ_MASK_SET_DEV__sof__nop 0
6333#define R_USB_IRQ_MASK_SET_DEV__sof__set 1
6334#define R_USB_IRQ_MASK_SET_DEV__port_status__BITNR 1
6335#define R_USB_IRQ_MASK_SET_DEV__port_status__WIDTH 1
6336#define R_USB_IRQ_MASK_SET_DEV__port_status__nop 0
6337#define R_USB_IRQ_MASK_SET_DEV__port_status__set 1
6338#define R_USB_IRQ_MASK_SET_DEV__ctl_status__BITNR 0
6339#define R_USB_IRQ_MASK_SET_DEV__ctl_status__WIDTH 1
6340#define R_USB_IRQ_MASK_SET_DEV__ctl_status__nop 0
6341#define R_USB_IRQ_MASK_SET_DEV__ctl_status__set 1
6342
6343#define R_USB_IRQ_MASK_READ_DEV (IO_TYPECAST_RO_UWORD 0xb0000204)
6344#define R_USB_IRQ_MASK_READ_DEV__out_eot__BITNR 12
6345#define R_USB_IRQ_MASK_READ_DEV__out_eot__WIDTH 1
6346#define R_USB_IRQ_MASK_READ_DEV__out_eot__no_pend 0
6347#define R_USB_IRQ_MASK_READ_DEV__out_eot__pend 1
6348#define R_USB_IRQ_MASK_READ_DEV__ep3_in_eot__BITNR 11
6349#define R_USB_IRQ_MASK_READ_DEV__ep3_in_eot__WIDTH 1
6350#define R_USB_IRQ_MASK_READ_DEV__ep3_in_eot__no_pend 0
6351#define R_USB_IRQ_MASK_READ_DEV__ep3_in_eot__pend 1
6352#define R_USB_IRQ_MASK_READ_DEV__ep2_in_eot__BITNR 10
6353#define R_USB_IRQ_MASK_READ_DEV__ep2_in_eot__WIDTH 1
6354#define R_USB_IRQ_MASK_READ_DEV__ep2_in_eot__no_pend 0
6355#define R_USB_IRQ_MASK_READ_DEV__ep2_in_eot__pend 1
6356#define R_USB_IRQ_MASK_READ_DEV__ep1_in_eot__BITNR 9
6357#define R_USB_IRQ_MASK_READ_DEV__ep1_in_eot__WIDTH 1
6358#define R_USB_IRQ_MASK_READ_DEV__ep1_in_eot__no_pend 0
6359#define R_USB_IRQ_MASK_READ_DEV__ep1_in_eot__pend 1
6360#define R_USB_IRQ_MASK_READ_DEV__ep0_in_eot__BITNR 8
6361#define R_USB_IRQ_MASK_READ_DEV__ep0_in_eot__WIDTH 1
6362#define R_USB_IRQ_MASK_READ_DEV__ep0_in_eot__no_pend 0
6363#define R_USB_IRQ_MASK_READ_DEV__ep0_in_eot__pend 1
6364#define R_USB_IRQ_MASK_READ_DEV__epid_attn__BITNR 3
6365#define R_USB_IRQ_MASK_READ_DEV__epid_attn__WIDTH 1
6366#define R_USB_IRQ_MASK_READ_DEV__epid_attn__no_pend 0
6367#define R_USB_IRQ_MASK_READ_DEV__epid_attn__pend 1
6368#define R_USB_IRQ_MASK_READ_DEV__sof__BITNR 2
6369#define R_USB_IRQ_MASK_READ_DEV__sof__WIDTH 1
6370#define R_USB_IRQ_MASK_READ_DEV__sof__no_pend 0
6371#define R_USB_IRQ_MASK_READ_DEV__sof__pend 1
6372#define R_USB_IRQ_MASK_READ_DEV__port_status__BITNR 1
6373#define R_USB_IRQ_MASK_READ_DEV__port_status__WIDTH 1
6374#define R_USB_IRQ_MASK_READ_DEV__port_status__no_pend 0
6375#define R_USB_IRQ_MASK_READ_DEV__port_status__pend 1
6376#define R_USB_IRQ_MASK_READ_DEV__ctl_status__BITNR 0
6377#define R_USB_IRQ_MASK_READ_DEV__ctl_status__WIDTH 1
6378#define R_USB_IRQ_MASK_READ_DEV__ctl_status__no_pend 0
6379#define R_USB_IRQ_MASK_READ_DEV__ctl_status__pend 1
6380
6381#define R_USB_IRQ_MASK_CLR_DEV (IO_TYPECAST_UWORD 0xb0000206)
6382#define R_USB_IRQ_MASK_CLR_DEV__out_eot__BITNR 12
6383#define R_USB_IRQ_MASK_CLR_DEV__out_eot__WIDTH 1
6384#define R_USB_IRQ_MASK_CLR_DEV__out_eot__nop 0
6385#define R_USB_IRQ_MASK_CLR_DEV__out_eot__clr 1
6386#define R_USB_IRQ_MASK_CLR_DEV__ep3_in_eot__BITNR 11
6387#define R_USB_IRQ_MASK_CLR_DEV__ep3_in_eot__WIDTH 1
6388#define R_USB_IRQ_MASK_CLR_DEV__ep3_in_eot__nop 0
6389#define R_USB_IRQ_MASK_CLR_DEV__ep3_in_eot__clr 1
6390#define R_USB_IRQ_MASK_CLR_DEV__ep2_in_eot__BITNR 10
6391#define R_USB_IRQ_MASK_CLR_DEV__ep2_in_eot__WIDTH 1
6392#define R_USB_IRQ_MASK_CLR_DEV__ep2_in_eot__nop 0
6393#define R_USB_IRQ_MASK_CLR_DEV__ep2_in_eot__clr 1
6394#define R_USB_IRQ_MASK_CLR_DEV__ep1_in_eot__BITNR 9
6395#define R_USB_IRQ_MASK_CLR_DEV__ep1_in_eot__WIDTH 1
6396#define R_USB_IRQ_MASK_CLR_DEV__ep1_in_eot__nop 0
6397#define R_USB_IRQ_MASK_CLR_DEV__ep1_in_eot__clr 1
6398#define R_USB_IRQ_MASK_CLR_DEV__ep0_in_eot__BITNR 8
6399#define R_USB_IRQ_MASK_CLR_DEV__ep0_in_eot__WIDTH 1
6400#define R_USB_IRQ_MASK_CLR_DEV__ep0_in_eot__nop 0
6401#define R_USB_IRQ_MASK_CLR_DEV__ep0_in_eot__clr 1
6402#define R_USB_IRQ_MASK_CLR_DEV__epid_attn__BITNR 3
6403#define R_USB_IRQ_MASK_CLR_DEV__epid_attn__WIDTH 1
6404#define R_USB_IRQ_MASK_CLR_DEV__epid_attn__nop 0
6405#define R_USB_IRQ_MASK_CLR_DEV__epid_attn__clr 1
6406#define R_USB_IRQ_MASK_CLR_DEV__sof__BITNR 2
6407#define R_USB_IRQ_MASK_CLR_DEV__sof__WIDTH 1
6408#define R_USB_IRQ_MASK_CLR_DEV__sof__nop 0
6409#define R_USB_IRQ_MASK_CLR_DEV__sof__clr 1
6410#define R_USB_IRQ_MASK_CLR_DEV__port_status__BITNR 1
6411#define R_USB_IRQ_MASK_CLR_DEV__port_status__WIDTH 1
6412#define R_USB_IRQ_MASK_CLR_DEV__port_status__nop 0
6413#define R_USB_IRQ_MASK_CLR_DEV__port_status__clr 1
6414#define R_USB_IRQ_MASK_CLR_DEV__ctl_status__BITNR 0
6415#define R_USB_IRQ_MASK_CLR_DEV__ctl_status__WIDTH 1
6416#define R_USB_IRQ_MASK_CLR_DEV__ctl_status__nop 0
6417#define R_USB_IRQ_MASK_CLR_DEV__ctl_status__clr 1
6418
6419#define R_USB_IRQ_READ_DEV (IO_TYPECAST_RO_UWORD 0xb0000206)
6420#define R_USB_IRQ_READ_DEV__out_eot__BITNR 12
6421#define R_USB_IRQ_READ_DEV__out_eot__WIDTH 1
6422#define R_USB_IRQ_READ_DEV__out_eot__no_pend 0
6423#define R_USB_IRQ_READ_DEV__out_eot__pend 1
6424#define R_USB_IRQ_READ_DEV__ep3_in_eot__BITNR 11
6425#define R_USB_IRQ_READ_DEV__ep3_in_eot__WIDTH 1
6426#define R_USB_IRQ_READ_DEV__ep3_in_eot__no_pend 0
6427#define R_USB_IRQ_READ_DEV__ep3_in_eot__pend 1
6428#define R_USB_IRQ_READ_DEV__ep2_in_eot__BITNR 10
6429#define R_USB_IRQ_READ_DEV__ep2_in_eot__WIDTH 1
6430#define R_USB_IRQ_READ_DEV__ep2_in_eot__no_pend 0
6431#define R_USB_IRQ_READ_DEV__ep2_in_eot__pend 1
6432#define R_USB_IRQ_READ_DEV__ep1_in_eot__BITNR 9
6433#define R_USB_IRQ_READ_DEV__ep1_in_eot__WIDTH 1
6434#define R_USB_IRQ_READ_DEV__ep1_in_eot__no_pend 0
6435#define R_USB_IRQ_READ_DEV__ep1_in_eot__pend 1
6436#define R_USB_IRQ_READ_DEV__ep0_in_eot__BITNR 8
6437#define R_USB_IRQ_READ_DEV__ep0_in_eot__WIDTH 1
6438#define R_USB_IRQ_READ_DEV__ep0_in_eot__no_pend 0
6439#define R_USB_IRQ_READ_DEV__ep0_in_eot__pend 1
6440#define R_USB_IRQ_READ_DEV__epid_attn__BITNR 3
6441#define R_USB_IRQ_READ_DEV__epid_attn__WIDTH 1
6442#define R_USB_IRQ_READ_DEV__epid_attn__no_pend 0
6443#define R_USB_IRQ_READ_DEV__epid_attn__pend 1
6444#define R_USB_IRQ_READ_DEV__sof__BITNR 2
6445#define R_USB_IRQ_READ_DEV__sof__WIDTH 1
6446#define R_USB_IRQ_READ_DEV__sof__no_pend 0
6447#define R_USB_IRQ_READ_DEV__sof__pend 1
6448#define R_USB_IRQ_READ_DEV__port_status__BITNR 1
6449#define R_USB_IRQ_READ_DEV__port_status__WIDTH 1
6450#define R_USB_IRQ_READ_DEV__port_status__no_pend 0
6451#define R_USB_IRQ_READ_DEV__port_status__pend 1
6452#define R_USB_IRQ_READ_DEV__ctl_status__BITNR 0
6453#define R_USB_IRQ_READ_DEV__ctl_status__WIDTH 1
6454#define R_USB_IRQ_READ_DEV__ctl_status__no_pend 0
6455#define R_USB_IRQ_READ_DEV__ctl_status__pend 1
6456
6457#define R_USB_FM_NUMBER (IO_TYPECAST_UDWORD 0xb000020c)
6458#define R_USB_FM_NUMBER__value__BITNR 0
6459#define R_USB_FM_NUMBER__value__WIDTH 32
6460
6461#define R_USB_FM_INTERVAL (IO_TYPECAST_UWORD 0xb0000210)
6462#define R_USB_FM_INTERVAL__fixed__BITNR 6
6463#define R_USB_FM_INTERVAL__fixed__WIDTH 8
6464#define R_USB_FM_INTERVAL__adj__BITNR 0
6465#define R_USB_FM_INTERVAL__adj__WIDTH 6
6466
6467#define R_USB_FM_REMAINING (IO_TYPECAST_RO_UWORD 0xb0000212)
6468#define R_USB_FM_REMAINING__value__BITNR 0
6469#define R_USB_FM_REMAINING__value__WIDTH 14
6470
6471#define R_USB_FM_PSTART (IO_TYPECAST_UWORD 0xb0000214)
6472#define R_USB_FM_PSTART__value__BITNR 0
6473#define R_USB_FM_PSTART__value__WIDTH 14
6474
6475#define R_USB_RH_STATUS (IO_TYPECAST_RO_BYTE 0xb0000203)
6476#define R_USB_RH_STATUS__babble2__BITNR 7
6477#define R_USB_RH_STATUS__babble2__WIDTH 1
6478#define R_USB_RH_STATUS__babble2__no 0
6479#define R_USB_RH_STATUS__babble2__yes 1
6480#define R_USB_RH_STATUS__babble1__BITNR 6
6481#define R_USB_RH_STATUS__babble1__WIDTH 1
6482#define R_USB_RH_STATUS__babble1__no 0
6483#define R_USB_RH_STATUS__babble1__yes 1
6484#define R_USB_RH_STATUS__bus1__BITNR 4
6485#define R_USB_RH_STATUS__bus1__WIDTH 2
6486#define R_USB_RH_STATUS__bus1__SE0 0
6487#define R_USB_RH_STATUS__bus1__Diff0 1
6488#define R_USB_RH_STATUS__bus1__Diff1 2
6489#define R_USB_RH_STATUS__bus1__SE1 3
6490#define R_USB_RH_STATUS__bus2__BITNR 2
6491#define R_USB_RH_STATUS__bus2__WIDTH 2
6492#define R_USB_RH_STATUS__bus2__SE0 0
6493#define R_USB_RH_STATUS__bus2__Diff0 1
6494#define R_USB_RH_STATUS__bus2__Diff1 2
6495#define R_USB_RH_STATUS__bus2__SE1 3
6496#define R_USB_RH_STATUS__nports__BITNR 0
6497#define R_USB_RH_STATUS__nports__WIDTH 2
6498
6499#define R_USB_RH_PORT_STATUS_1 (IO_TYPECAST_RO_UWORD 0xb0000218)
6500#define R_USB_RH_PORT_STATUS_1__speed__BITNR 9
6501#define R_USB_RH_PORT_STATUS_1__speed__WIDTH 1
6502#define R_USB_RH_PORT_STATUS_1__speed__full 0
6503#define R_USB_RH_PORT_STATUS_1__speed__low 1
6504#define R_USB_RH_PORT_STATUS_1__power__BITNR 8
6505#define R_USB_RH_PORT_STATUS_1__power__WIDTH 1
6506#define R_USB_RH_PORT_STATUS_1__reset__BITNR 4
6507#define R_USB_RH_PORT_STATUS_1__reset__WIDTH 1
6508#define R_USB_RH_PORT_STATUS_1__reset__no 0
6509#define R_USB_RH_PORT_STATUS_1__reset__yes 1
6510#define R_USB_RH_PORT_STATUS_1__overcurrent__BITNR 3
6511#define R_USB_RH_PORT_STATUS_1__overcurrent__WIDTH 1
6512#define R_USB_RH_PORT_STATUS_1__overcurrent__no 0
6513#define R_USB_RH_PORT_STATUS_1__overcurrent__yes 1
6514#define R_USB_RH_PORT_STATUS_1__suspended__BITNR 2
6515#define R_USB_RH_PORT_STATUS_1__suspended__WIDTH 1
6516#define R_USB_RH_PORT_STATUS_1__suspended__no 0
6517#define R_USB_RH_PORT_STATUS_1__suspended__yes 1
6518#define R_USB_RH_PORT_STATUS_1__enabled__BITNR 1
6519#define R_USB_RH_PORT_STATUS_1__enabled__WIDTH 1
6520#define R_USB_RH_PORT_STATUS_1__enabled__no 0
6521#define R_USB_RH_PORT_STATUS_1__enabled__yes 1
6522#define R_USB_RH_PORT_STATUS_1__connected__BITNR 0
6523#define R_USB_RH_PORT_STATUS_1__connected__WIDTH 1
6524#define R_USB_RH_PORT_STATUS_1__connected__no 0
6525#define R_USB_RH_PORT_STATUS_1__connected__yes 1
6526
6527#define R_USB_RH_PORT_STATUS_2 (IO_TYPECAST_RO_UWORD 0xb000021a)
6528#define R_USB_RH_PORT_STATUS_2__speed__BITNR 9
6529#define R_USB_RH_PORT_STATUS_2__speed__WIDTH 1
6530#define R_USB_RH_PORT_STATUS_2__speed__full 0
6531#define R_USB_RH_PORT_STATUS_2__speed__low 1
6532#define R_USB_RH_PORT_STATUS_2__power__BITNR 8
6533#define R_USB_RH_PORT_STATUS_2__power__WIDTH 1
6534#define R_USB_RH_PORT_STATUS_2__reset__BITNR 4
6535#define R_USB_RH_PORT_STATUS_2__reset__WIDTH 1
6536#define R_USB_RH_PORT_STATUS_2__reset__no 0
6537#define R_USB_RH_PORT_STATUS_2__reset__yes 1
6538#define R_USB_RH_PORT_STATUS_2__overcurrent__BITNR 3
6539#define R_USB_RH_PORT_STATUS_2__overcurrent__WIDTH 1
6540#define R_USB_RH_PORT_STATUS_2__overcurrent__no 0
6541#define R_USB_RH_PORT_STATUS_2__overcurrent__yes 1
6542#define R_USB_RH_PORT_STATUS_2__suspended__BITNR 2
6543#define R_USB_RH_PORT_STATUS_2__suspended__WIDTH 1
6544#define R_USB_RH_PORT_STATUS_2__suspended__no 0
6545#define R_USB_RH_PORT_STATUS_2__suspended__yes 1
6546#define R_USB_RH_PORT_STATUS_2__enabled__BITNR 1
6547#define R_USB_RH_PORT_STATUS_2__enabled__WIDTH 1
6548#define R_USB_RH_PORT_STATUS_2__enabled__no 0
6549#define R_USB_RH_PORT_STATUS_2__enabled__yes 1
6550#define R_USB_RH_PORT_STATUS_2__connected__BITNR 0
6551#define R_USB_RH_PORT_STATUS_2__connected__WIDTH 1
6552#define R_USB_RH_PORT_STATUS_2__connected__no 0
6553#define R_USB_RH_PORT_STATUS_2__connected__yes 1
6554
6555#define R_USB_EPT_INDEX (IO_TYPECAST_BYTE 0xb0000208)
6556#define R_USB_EPT_INDEX__value__BITNR 0
6557#define R_USB_EPT_INDEX__value__WIDTH 5
6558
6559#define R_USB_EPT_DATA (IO_TYPECAST_UDWORD 0xb000021c)
6560#define R_USB_EPT_DATA__valid__BITNR 31
6561#define R_USB_EPT_DATA__valid__WIDTH 1
6562#define R_USB_EPT_DATA__valid__no 0
6563#define R_USB_EPT_DATA__valid__yes 1
6564#define R_USB_EPT_DATA__hold__BITNR 30
6565#define R_USB_EPT_DATA__hold__WIDTH 1
6566#define R_USB_EPT_DATA__hold__no 0
6567#define R_USB_EPT_DATA__hold__yes 1
6568#define R_USB_EPT_DATA__error_count_in__BITNR 28
6569#define R_USB_EPT_DATA__error_count_in__WIDTH 2
6570#define R_USB_EPT_DATA__t_in__BITNR 27
6571#define R_USB_EPT_DATA__t_in__WIDTH 1
6572#define R_USB_EPT_DATA__low_speed__BITNR 26
6573#define R_USB_EPT_DATA__low_speed__WIDTH 1
6574#define R_USB_EPT_DATA__low_speed__no 0
6575#define R_USB_EPT_DATA__low_speed__yes 1
6576#define R_USB_EPT_DATA__port__BITNR 24
6577#define R_USB_EPT_DATA__port__WIDTH 2
6578#define R_USB_EPT_DATA__port__any 0
6579#define R_USB_EPT_DATA__port__p1 1
6580#define R_USB_EPT_DATA__port__p2 2
6581#define R_USB_EPT_DATA__port__undef 3
6582#define R_USB_EPT_DATA__error_code__BITNR 22
6583#define R_USB_EPT_DATA__error_code__WIDTH 2
6584#define R_USB_EPT_DATA__error_code__no_error 0
6585#define R_USB_EPT_DATA__error_code__stall 1
6586#define R_USB_EPT_DATA__error_code__bus_error 2
6587#define R_USB_EPT_DATA__error_code__buffer_error 3
6588#define R_USB_EPT_DATA__t_out__BITNR 21
6589#define R_USB_EPT_DATA__t_out__WIDTH 1
6590#define R_USB_EPT_DATA__error_count_out__BITNR 19
6591#define R_USB_EPT_DATA__error_count_out__WIDTH 2
6592#define R_USB_EPT_DATA__max_len__BITNR 11
6593#define R_USB_EPT_DATA__max_len__WIDTH 7
6594#define R_USB_EPT_DATA__ep__BITNR 7
6595#define R_USB_EPT_DATA__ep__WIDTH 4
6596#define R_USB_EPT_DATA__dev__BITNR 0
6597#define R_USB_EPT_DATA__dev__WIDTH 7
6598
6599#define R_USB_EPT_DATA_ISO (IO_TYPECAST_UDWORD 0xb000021c)
6600#define R_USB_EPT_DATA_ISO__valid__BITNR 31
6601#define R_USB_EPT_DATA_ISO__valid__WIDTH 1
6602#define R_USB_EPT_DATA_ISO__valid__no 0
6603#define R_USB_EPT_DATA_ISO__valid__yes 1
6604#define R_USB_EPT_DATA_ISO__port__BITNR 24
6605#define R_USB_EPT_DATA_ISO__port__WIDTH 2
6606#define R_USB_EPT_DATA_ISO__port__any 0
6607#define R_USB_EPT_DATA_ISO__port__p1 1
6608#define R_USB_EPT_DATA_ISO__port__p2 2
6609#define R_USB_EPT_DATA_ISO__port__undef 3
6610#define R_USB_EPT_DATA_ISO__error_code__BITNR 22
6611#define R_USB_EPT_DATA_ISO__error_code__WIDTH 2
6612#define R_USB_EPT_DATA_ISO__error_code__no_error 0
6613#define R_USB_EPT_DATA_ISO__error_code__stall 1
6614#define R_USB_EPT_DATA_ISO__error_code__bus_error 2
6615#define R_USB_EPT_DATA_ISO__error_code__TBD3 3
6616#define R_USB_EPT_DATA_ISO__max_len__BITNR 11
6617#define R_USB_EPT_DATA_ISO__max_len__WIDTH 10
6618#define R_USB_EPT_DATA_ISO__ep__BITNR 7
6619#define R_USB_EPT_DATA_ISO__ep__WIDTH 4
6620#define R_USB_EPT_DATA_ISO__dev__BITNR 0
6621#define R_USB_EPT_DATA_ISO__dev__WIDTH 7
6622
6623#define R_USB_EPT_DATA_DEV (IO_TYPECAST_UDWORD 0xb000021c)
6624#define R_USB_EPT_DATA_DEV__valid__BITNR 31
6625#define R_USB_EPT_DATA_DEV__valid__WIDTH 1
6626#define R_USB_EPT_DATA_DEV__valid__no 0
6627#define R_USB_EPT_DATA_DEV__valid__yes 1
6628#define R_USB_EPT_DATA_DEV__hold__BITNR 30
6629#define R_USB_EPT_DATA_DEV__hold__WIDTH 1
6630#define R_USB_EPT_DATA_DEV__hold__no 0
6631#define R_USB_EPT_DATA_DEV__hold__yes 1
6632#define R_USB_EPT_DATA_DEV__stall__BITNR 29
6633#define R_USB_EPT_DATA_DEV__stall__WIDTH 1
6634#define R_USB_EPT_DATA_DEV__stall__no 0
6635#define R_USB_EPT_DATA_DEV__stall__yes 1
6636#define R_USB_EPT_DATA_DEV__iso_resp__BITNR 28
6637#define R_USB_EPT_DATA_DEV__iso_resp__WIDTH 1
6638#define R_USB_EPT_DATA_DEV__iso_resp__quiet 0
6639#define R_USB_EPT_DATA_DEV__iso_resp__yes 1
6640#define R_USB_EPT_DATA_DEV__ctrl__BITNR 27
6641#define R_USB_EPT_DATA_DEV__ctrl__WIDTH 1
6642#define R_USB_EPT_DATA_DEV__ctrl__no 0
6643#define R_USB_EPT_DATA_DEV__ctrl__yes 1
6644#define R_USB_EPT_DATA_DEV__iso__BITNR 26
6645#define R_USB_EPT_DATA_DEV__iso__WIDTH 1
6646#define R_USB_EPT_DATA_DEV__iso__no 0
6647#define R_USB_EPT_DATA_DEV__iso__yes 1
6648#define R_USB_EPT_DATA_DEV__port__BITNR 24
6649#define R_USB_EPT_DATA_DEV__port__WIDTH 2
6650#define R_USB_EPT_DATA_DEV__control_phase__BITNR 22
6651#define R_USB_EPT_DATA_DEV__control_phase__WIDTH 1
6652#define R_USB_EPT_DATA_DEV__t__BITNR 21
6653#define R_USB_EPT_DATA_DEV__t__WIDTH 1
6654#define R_USB_EPT_DATA_DEV__max_len__BITNR 11
6655#define R_USB_EPT_DATA_DEV__max_len__WIDTH 10
6656#define R_USB_EPT_DATA_DEV__ep__BITNR 7
6657#define R_USB_EPT_DATA_DEV__ep__WIDTH 4
6658#define R_USB_EPT_DATA_DEV__dev__BITNR 0
6659#define R_USB_EPT_DATA_DEV__dev__WIDTH 7
6660
6661#define R_USB_SNMP_TERROR (IO_TYPECAST_UDWORD 0xb0000220)
6662#define R_USB_SNMP_TERROR__value__BITNR 0
6663#define R_USB_SNMP_TERROR__value__WIDTH 32
6664
6665#define R_USB_EPID_ATTN (IO_TYPECAST_RO_UDWORD 0xb0000224)
6666#define R_USB_EPID_ATTN__value__BITNR 0
6667#define R_USB_EPID_ATTN__value__WIDTH 32
6668
6669#define R_USB_PORT1_DISABLE (IO_TYPECAST_BYTE 0xb000006a)
6670#define R_USB_PORT1_DISABLE__disable__BITNR 0
6671#define R_USB_PORT1_DISABLE__disable__WIDTH 1
6672#define R_USB_PORT1_DISABLE__disable__yes 0
6673#define R_USB_PORT1_DISABLE__disable__no 1
6674
6675#define R_USB_PORT2_DISABLE (IO_TYPECAST_BYTE 0xb0000052)
6676#define R_USB_PORT2_DISABLE__disable__BITNR 0
6677#define R_USB_PORT2_DISABLE__disable__WIDTH 1
6678#define R_USB_PORT2_DISABLE__disable__yes 0
6679#define R_USB_PORT2_DISABLE__disable__no 1
6680
6681/*
6682!* MMU registers
6683!*/
6684
6685#define R_MMU_CONFIG (IO_TYPECAST_UDWORD 0xb0000240)
6686#define R_MMU_CONFIG__mmu_enable__BITNR 31
6687#define R_MMU_CONFIG__mmu_enable__WIDTH 1
6688#define R_MMU_CONFIG__mmu_enable__enable 1
6689#define R_MMU_CONFIG__mmu_enable__disable 0
6690#define R_MMU_CONFIG__inv_excp__BITNR 18
6691#define R_MMU_CONFIG__inv_excp__WIDTH 1
6692#define R_MMU_CONFIG__inv_excp__enable 1
6693#define R_MMU_CONFIG__inv_excp__disable 0
6694#define R_MMU_CONFIG__acc_excp__BITNR 17
6695#define R_MMU_CONFIG__acc_excp__WIDTH 1
6696#define R_MMU_CONFIG__acc_excp__enable 1
6697#define R_MMU_CONFIG__acc_excp__disable 0
6698#define R_MMU_CONFIG__we_excp__BITNR 16
6699#define R_MMU_CONFIG__we_excp__WIDTH 1
6700#define R_MMU_CONFIG__we_excp__enable 1
6701#define R_MMU_CONFIG__we_excp__disable 0
6702#define R_MMU_CONFIG__seg_f__BITNR 15
6703#define R_MMU_CONFIG__seg_f__WIDTH 1
6704#define R_MMU_CONFIG__seg_f__seg 1
6705#define R_MMU_CONFIG__seg_f__page 0
6706#define R_MMU_CONFIG__seg_e__BITNR 14
6707#define R_MMU_CONFIG__seg_e__WIDTH 1
6708#define R_MMU_CONFIG__seg_e__seg 1
6709#define R_MMU_CONFIG__seg_e__page 0
6710#define R_MMU_CONFIG__seg_d__BITNR 13
6711#define R_MMU_CONFIG__seg_d__WIDTH 1
6712#define R_MMU_CONFIG__seg_d__seg 1
6713#define R_MMU_CONFIG__seg_d__page 0
6714#define R_MMU_CONFIG__seg_c__BITNR 12
6715#define R_MMU_CONFIG__seg_c__WIDTH 1
6716#define R_MMU_CONFIG__seg_c__seg 1
6717#define R_MMU_CONFIG__seg_c__page 0
6718#define R_MMU_CONFIG__seg_b__BITNR 11
6719#define R_MMU_CONFIG__seg_b__WIDTH 1
6720#define R_MMU_CONFIG__seg_b__seg 1
6721#define R_MMU_CONFIG__seg_b__page 0
6722#define R_MMU_CONFIG__seg_a__BITNR 10
6723#define R_MMU_CONFIG__seg_a__WIDTH 1
6724#define R_MMU_CONFIG__seg_a__seg 1
6725#define R_MMU_CONFIG__seg_a__page 0
6726#define R_MMU_CONFIG__seg_9__BITNR 9
6727#define R_MMU_CONFIG__seg_9__WIDTH 1
6728#define R_MMU_CONFIG__seg_9__seg 1
6729#define R_MMU_CONFIG__seg_9__page 0
6730#define R_MMU_CONFIG__seg_8__BITNR 8
6731#define R_MMU_CONFIG__seg_8__WIDTH 1
6732#define R_MMU_CONFIG__seg_8__seg 1
6733#define R_MMU_CONFIG__seg_8__page 0
6734#define R_MMU_CONFIG__seg_7__BITNR 7
6735#define R_MMU_CONFIG__seg_7__WIDTH 1
6736#define R_MMU_CONFIG__seg_7__seg 1
6737#define R_MMU_CONFIG__seg_7__page 0
6738#define R_MMU_CONFIG__seg_6__BITNR 6
6739#define R_MMU_CONFIG__seg_6__WIDTH 1
6740#define R_MMU_CONFIG__seg_6__seg 1
6741#define R_MMU_CONFIG__seg_6__page 0
6742#define R_MMU_CONFIG__seg_5__BITNR 5
6743#define R_MMU_CONFIG__seg_5__WIDTH 1
6744#define R_MMU_CONFIG__seg_5__seg 1
6745#define R_MMU_CONFIG__seg_5__page 0
6746#define R_MMU_CONFIG__seg_4__BITNR 4
6747#define R_MMU_CONFIG__seg_4__WIDTH 1
6748#define R_MMU_CONFIG__seg_4__seg 1
6749#define R_MMU_CONFIG__seg_4__page 0
6750#define R_MMU_CONFIG__seg_3__BITNR 3
6751#define R_MMU_CONFIG__seg_3__WIDTH 1
6752#define R_MMU_CONFIG__seg_3__seg 1
6753#define R_MMU_CONFIG__seg_3__page 0
6754#define R_MMU_CONFIG__seg_2__BITNR 2
6755#define R_MMU_CONFIG__seg_2__WIDTH 1
6756#define R_MMU_CONFIG__seg_2__seg 1
6757#define R_MMU_CONFIG__seg_2__page 0
6758#define R_MMU_CONFIG__seg_1__BITNR 1
6759#define R_MMU_CONFIG__seg_1__WIDTH 1
6760#define R_MMU_CONFIG__seg_1__seg 1
6761#define R_MMU_CONFIG__seg_1__page 0
6762#define R_MMU_CONFIG__seg_0__BITNR 0
6763#define R_MMU_CONFIG__seg_0__WIDTH 1
6764#define R_MMU_CONFIG__seg_0__seg 1
6765#define R_MMU_CONFIG__seg_0__page 0
6766
6767#define R_MMU_KSEG (IO_TYPECAST_UWORD 0xb0000240)
6768#define R_MMU_KSEG__seg_f__BITNR 15
6769#define R_MMU_KSEG__seg_f__WIDTH 1
6770#define R_MMU_KSEG__seg_f__seg 1
6771#define R_MMU_KSEG__seg_f__page 0
6772#define R_MMU_KSEG__seg_e__BITNR 14
6773#define R_MMU_KSEG__seg_e__WIDTH 1
6774#define R_MMU_KSEG__seg_e__seg 1
6775#define R_MMU_KSEG__seg_e__page 0
6776#define R_MMU_KSEG__seg_d__BITNR 13
6777#define R_MMU_KSEG__seg_d__WIDTH 1
6778#define R_MMU_KSEG__seg_d__seg 1
6779#define R_MMU_KSEG__seg_d__page 0
6780#define R_MMU_KSEG__seg_c__BITNR 12
6781#define R_MMU_KSEG__seg_c__WIDTH 1
6782#define R_MMU_KSEG__seg_c__seg 1
6783#define R_MMU_KSEG__seg_c__page 0
6784#define R_MMU_KSEG__seg_b__BITNR 11
6785#define R_MMU_KSEG__seg_b__WIDTH 1
6786#define R_MMU_KSEG__seg_b__seg 1
6787#define R_MMU_KSEG__seg_b__page 0
6788#define R_MMU_KSEG__seg_a__BITNR 10
6789#define R_MMU_KSEG__seg_a__WIDTH 1
6790#define R_MMU_KSEG__seg_a__seg 1
6791#define R_MMU_KSEG__seg_a__page 0
6792#define R_MMU_KSEG__seg_9__BITNR 9
6793#define R_MMU_KSEG__seg_9__WIDTH 1
6794#define R_MMU_KSEG__seg_9__seg 1
6795#define R_MMU_KSEG__seg_9__page 0
6796#define R_MMU_KSEG__seg_8__BITNR 8
6797#define R_MMU_KSEG__seg_8__WIDTH 1
6798#define R_MMU_KSEG__seg_8__seg 1
6799#define R_MMU_KSEG__seg_8__page 0
6800#define R_MMU_KSEG__seg_7__BITNR 7
6801#define R_MMU_KSEG__seg_7__WIDTH 1
6802#define R_MMU_KSEG__seg_7__seg 1
6803#define R_MMU_KSEG__seg_7__page 0
6804#define R_MMU_KSEG__seg_6__BITNR 6
6805#define R_MMU_KSEG__seg_6__WIDTH 1
6806#define R_MMU_KSEG__seg_6__seg 1
6807#define R_MMU_KSEG__seg_6__page 0
6808#define R_MMU_KSEG__seg_5__BITNR 5
6809#define R_MMU_KSEG__seg_5__WIDTH 1
6810#define R_MMU_KSEG__seg_5__seg 1
6811#define R_MMU_KSEG__seg_5__page 0
6812#define R_MMU_KSEG__seg_4__BITNR 4
6813#define R_MMU_KSEG__seg_4__WIDTH 1
6814#define R_MMU_KSEG__seg_4__seg 1
6815#define R_MMU_KSEG__seg_4__page 0
6816#define R_MMU_KSEG__seg_3__BITNR 3
6817#define R_MMU_KSEG__seg_3__WIDTH 1
6818#define R_MMU_KSEG__seg_3__seg 1
6819#define R_MMU_KSEG__seg_3__page 0
6820#define R_MMU_KSEG__seg_2__BITNR 2
6821#define R_MMU_KSEG__seg_2__WIDTH 1
6822#define R_MMU_KSEG__seg_2__seg 1
6823#define R_MMU_KSEG__seg_2__page 0
6824#define R_MMU_KSEG__seg_1__BITNR 1
6825#define R_MMU_KSEG__seg_1__WIDTH 1
6826#define R_MMU_KSEG__seg_1__seg 1
6827#define R_MMU_KSEG__seg_1__page 0
6828#define R_MMU_KSEG__seg_0__BITNR 0
6829#define R_MMU_KSEG__seg_0__WIDTH 1
6830#define R_MMU_KSEG__seg_0__seg 1
6831#define R_MMU_KSEG__seg_0__page 0
6832
6833#define R_MMU_CTRL (IO_TYPECAST_BYTE 0xb0000242)
6834#define R_MMU_CTRL__inv_excp__BITNR 2
6835#define R_MMU_CTRL__inv_excp__WIDTH 1
6836#define R_MMU_CTRL__inv_excp__enable 1
6837#define R_MMU_CTRL__inv_excp__disable 0
6838#define R_MMU_CTRL__acc_excp__BITNR 1
6839#define R_MMU_CTRL__acc_excp__WIDTH 1
6840#define R_MMU_CTRL__acc_excp__enable 1
6841#define R_MMU_CTRL__acc_excp__disable 0
6842#define R_MMU_CTRL__we_excp__BITNR 0
6843#define R_MMU_CTRL__we_excp__WIDTH 1
6844#define R_MMU_CTRL__we_excp__enable 1
6845#define R_MMU_CTRL__we_excp__disable 0
6846
6847#define R_MMU_ENABLE (IO_TYPECAST_BYTE 0xb0000243)
6848#define R_MMU_ENABLE__mmu_enable__BITNR 7
6849#define R_MMU_ENABLE__mmu_enable__WIDTH 1
6850#define R_MMU_ENABLE__mmu_enable__enable 1
6851#define R_MMU_ENABLE__mmu_enable__disable 0
6852
6853#define R_MMU_KBASE_LO (IO_TYPECAST_UDWORD 0xb0000244)
6854#define R_MMU_KBASE_LO__base_7__BITNR 28
6855#define R_MMU_KBASE_LO__base_7__WIDTH 4
6856#define R_MMU_KBASE_LO__base_6__BITNR 24
6857#define R_MMU_KBASE_LO__base_6__WIDTH 4
6858#define R_MMU_KBASE_LO__base_5__BITNR 20
6859#define R_MMU_KBASE_LO__base_5__WIDTH 4
6860#define R_MMU_KBASE_LO__base_4__BITNR 16
6861#define R_MMU_KBASE_LO__base_4__WIDTH 4
6862#define R_MMU_KBASE_LO__base_3__BITNR 12
6863#define R_MMU_KBASE_LO__base_3__WIDTH 4
6864#define R_MMU_KBASE_LO__base_2__BITNR 8
6865#define R_MMU_KBASE_LO__base_2__WIDTH 4
6866#define R_MMU_KBASE_LO__base_1__BITNR 4
6867#define R_MMU_KBASE_LO__base_1__WIDTH 4
6868#define R_MMU_KBASE_LO__base_0__BITNR 0
6869#define R_MMU_KBASE_LO__base_0__WIDTH 4
6870
6871#define R_MMU_KBASE_HI (IO_TYPECAST_UDWORD 0xb0000248)
6872#define R_MMU_KBASE_HI__base_f__BITNR 28
6873#define R_MMU_KBASE_HI__base_f__WIDTH 4
6874#define R_MMU_KBASE_HI__base_e__BITNR 24
6875#define R_MMU_KBASE_HI__base_e__WIDTH 4
6876#define R_MMU_KBASE_HI__base_d__BITNR 20
6877#define R_MMU_KBASE_HI__base_d__WIDTH 4
6878#define R_MMU_KBASE_HI__base_c__BITNR 16
6879#define R_MMU_KBASE_HI__base_c__WIDTH 4
6880#define R_MMU_KBASE_HI__base_b__BITNR 12
6881#define R_MMU_KBASE_HI__base_b__WIDTH 4
6882#define R_MMU_KBASE_HI__base_a__BITNR 8
6883#define R_MMU_KBASE_HI__base_a__WIDTH 4
6884#define R_MMU_KBASE_HI__base_9__BITNR 4
6885#define R_MMU_KBASE_HI__base_9__WIDTH 4
6886#define R_MMU_KBASE_HI__base_8__BITNR 0
6887#define R_MMU_KBASE_HI__base_8__WIDTH 4
6888
6889#define R_MMU_CONTEXT (IO_TYPECAST_BYTE 0xb000024c)
6890#define R_MMU_CONTEXT__page_id__BITNR 0
6891#define R_MMU_CONTEXT__page_id__WIDTH 6
6892
6893#define R_MMU_CAUSE (IO_TYPECAST_RO_UDWORD 0xb0000250)
6894#define R_MMU_CAUSE__vpn__BITNR 13
6895#define R_MMU_CAUSE__vpn__WIDTH 19
6896#define R_MMU_CAUSE__miss_excp__BITNR 12
6897#define R_MMU_CAUSE__miss_excp__WIDTH 1
6898#define R_MMU_CAUSE__miss_excp__yes 1
6899#define R_MMU_CAUSE__miss_excp__no 0
6900#define R_MMU_CAUSE__inv_excp__BITNR 11
6901#define R_MMU_CAUSE__inv_excp__WIDTH 1
6902#define R_MMU_CAUSE__inv_excp__yes 1
6903#define R_MMU_CAUSE__inv_excp__no 0
6904#define R_MMU_CAUSE__acc_excp__BITNR 10
6905#define R_MMU_CAUSE__acc_excp__WIDTH 1
6906#define R_MMU_CAUSE__acc_excp__yes 1
6907#define R_MMU_CAUSE__acc_excp__no 0
6908#define R_MMU_CAUSE__we_excp__BITNR 9
6909#define R_MMU_CAUSE__we_excp__WIDTH 1
6910#define R_MMU_CAUSE__we_excp__yes 1
6911#define R_MMU_CAUSE__we_excp__no 0
6912#define R_MMU_CAUSE__wr_rd__BITNR 8
6913#define R_MMU_CAUSE__wr_rd__WIDTH 1
6914#define R_MMU_CAUSE__wr_rd__write 1
6915#define R_MMU_CAUSE__wr_rd__read 0
6916#define R_MMU_CAUSE__page_id__BITNR 0
6917#define R_MMU_CAUSE__page_id__WIDTH 6
6918
6919#define R_TLB_SELECT (IO_TYPECAST_BYTE 0xb0000254)
6920#define R_TLB_SELECT__index__BITNR 0
6921#define R_TLB_SELECT__index__WIDTH 6
6922
6923#define R_TLB_LO (IO_TYPECAST_UDWORD 0xb0000258)
6924#define R_TLB_LO__pfn__BITNR 13
6925#define R_TLB_LO__pfn__WIDTH 19
6926#define R_TLB_LO__global__BITNR 3
6927#define R_TLB_LO__global__WIDTH 1
6928#define R_TLB_LO__global__yes 1
6929#define R_TLB_LO__global__no 0
6930#define R_TLB_LO__valid__BITNR 2
6931#define R_TLB_LO__valid__WIDTH 1
6932#define R_TLB_LO__valid__yes 1
6933#define R_TLB_LO__valid__no 0
6934#define R_TLB_LO__kernel__BITNR 1
6935#define R_TLB_LO__kernel__WIDTH 1
6936#define R_TLB_LO__kernel__yes 1
6937#define R_TLB_LO__kernel__no 0
6938#define R_TLB_LO__we__BITNR 0
6939#define R_TLB_LO__we__WIDTH 1
6940#define R_TLB_LO__we__yes 1
6941#define R_TLB_LO__we__no 0
6942
6943#define R_TLB_HI (IO_TYPECAST_UDWORD 0xb000025c)
6944#define R_TLB_HI__vpn__BITNR 13
6945#define R_TLB_HI__vpn__WIDTH 19
6946#define R_TLB_HI__page_id__BITNR 0
6947#define R_TLB_HI__page_id__WIDTH 6
6948
6949/*
6950!* Syncrounous serial port registers
6951!*/
6952
6953#define R_SYNC_SERIAL1_REC_DATA (IO_TYPECAST_RO_UDWORD 0xb000006c)
6954#define R_SYNC_SERIAL1_REC_DATA__data_in__BITNR 0
6955#define R_SYNC_SERIAL1_REC_DATA__data_in__WIDTH 32
6956
6957#define R_SYNC_SERIAL1_REC_WORD (IO_TYPECAST_RO_UWORD 0xb000006c)
6958#define R_SYNC_SERIAL1_REC_WORD__data_in__BITNR 0
6959#define R_SYNC_SERIAL1_REC_WORD__data_in__WIDTH 16
6960
6961#define R_SYNC_SERIAL1_REC_BYTE (IO_TYPECAST_RO_BYTE 0xb000006c)
6962#define R_SYNC_SERIAL1_REC_BYTE__data_in__BITNR 0
6963#define R_SYNC_SERIAL1_REC_BYTE__data_in__WIDTH 8
6964
6965#define R_SYNC_SERIAL1_STATUS (IO_TYPECAST_RO_UDWORD 0xb0000068)
6966#define R_SYNC_SERIAL1_STATUS__rec_status__BITNR 15
6967#define R_SYNC_SERIAL1_STATUS__rec_status__WIDTH 1
6968#define R_SYNC_SERIAL1_STATUS__rec_status__running 0
6969#define R_SYNC_SERIAL1_STATUS__rec_status__idle 1
6970#define R_SYNC_SERIAL1_STATUS__tr_empty__BITNR 14
6971#define R_SYNC_SERIAL1_STATUS__tr_empty__WIDTH 1
6972#define R_SYNC_SERIAL1_STATUS__tr_empty__empty 1
6973#define R_SYNC_SERIAL1_STATUS__tr_empty__not_empty 0
6974#define R_SYNC_SERIAL1_STATUS__tr_ready__BITNR 13
6975#define R_SYNC_SERIAL1_STATUS__tr_ready__WIDTH 1
6976#define R_SYNC_SERIAL1_STATUS__tr_ready__full 0
6977#define R_SYNC_SERIAL1_STATUS__tr_ready__ready 1
6978#define R_SYNC_SERIAL1_STATUS__pin_1__BITNR 12
6979#define R_SYNC_SERIAL1_STATUS__pin_1__WIDTH 1
6980#define R_SYNC_SERIAL1_STATUS__pin_1__low 0
6981#define R_SYNC_SERIAL1_STATUS__pin_1__high 1
6982#define R_SYNC_SERIAL1_STATUS__pin_0__BITNR 11
6983#define R_SYNC_SERIAL1_STATUS__pin_0__WIDTH 1
6984#define R_SYNC_SERIAL1_STATUS__pin_0__low 0
6985#define R_SYNC_SERIAL1_STATUS__pin_0__high 1
6986#define R_SYNC_SERIAL1_STATUS__underflow__BITNR 10
6987#define R_SYNC_SERIAL1_STATUS__underflow__WIDTH 1
6988#define R_SYNC_SERIAL1_STATUS__underflow__no 0
6989#define R_SYNC_SERIAL1_STATUS__underflow__yes 1
6990#define R_SYNC_SERIAL1_STATUS__overrun__BITNR 9
6991#define R_SYNC_SERIAL1_STATUS__overrun__WIDTH 1
6992#define R_SYNC_SERIAL1_STATUS__overrun__no 0
6993#define R_SYNC_SERIAL1_STATUS__overrun__yes 1
6994#define R_SYNC_SERIAL1_STATUS__data_avail__BITNR 8
6995#define R_SYNC_SERIAL1_STATUS__data_avail__WIDTH 1
6996#define R_SYNC_SERIAL1_STATUS__data_avail__no 0
6997#define R_SYNC_SERIAL1_STATUS__data_avail__yes 1
6998#define R_SYNC_SERIAL1_STATUS__data__BITNR 0
6999#define R_SYNC_SERIAL1_STATUS__data__WIDTH 8
7000
7001#define R_SYNC_SERIAL1_TR_DATA (IO_TYPECAST_UDWORD 0xb000006c)
7002#define R_SYNC_SERIAL1_TR_DATA__data_out__BITNR 0
7003#define R_SYNC_SERIAL1_TR_DATA__data_out__WIDTH 32
7004
7005#define R_SYNC_SERIAL1_TR_WORD (IO_TYPECAST_UWORD 0xb000006c)
7006#define R_SYNC_SERIAL1_TR_WORD__data_out__BITNR 0
7007#define R_SYNC_SERIAL1_TR_WORD__data_out__WIDTH 16
7008
7009#define R_SYNC_SERIAL1_TR_BYTE (IO_TYPECAST_BYTE 0xb000006c)
7010#define R_SYNC_SERIAL1_TR_BYTE__data_out__BITNR 0
7011#define R_SYNC_SERIAL1_TR_BYTE__data_out__WIDTH 8
7012
7013#define R_SYNC_SERIAL1_CTRL (IO_TYPECAST_UDWORD 0xb0000068)
7014#define R_SYNC_SERIAL1_CTRL__tr_baud__BITNR 28
7015#define R_SYNC_SERIAL1_CTRL__tr_baud__WIDTH 4
7016#define R_SYNC_SERIAL1_CTRL__tr_baud__c150Hz 0
7017#define R_SYNC_SERIAL1_CTRL__tr_baud__c300Hz 1
7018#define R_SYNC_SERIAL1_CTRL__tr_baud__c600Hz 2
7019#define R_SYNC_SERIAL1_CTRL__tr_baud__c1200Hz 3
7020#define R_SYNC_SERIAL1_CTRL__tr_baud__c2400Hz 4
7021#define R_SYNC_SERIAL1_CTRL__tr_baud__c4800Hz 5
7022#define R_SYNC_SERIAL1_CTRL__tr_baud__c9600Hz 6
7023#define R_SYNC_SERIAL1_CTRL__tr_baud__c19k2Hz 7
7024#define R_SYNC_SERIAL1_CTRL__tr_baud__c28k8Hz 8
7025#define R_SYNC_SERIAL1_CTRL__tr_baud__c57k6Hz 9
7026#define R_SYNC_SERIAL1_CTRL__tr_baud__c115k2Hz 10
7027#define R_SYNC_SERIAL1_CTRL__tr_baud__c230k4Hz 11
7028#define R_SYNC_SERIAL1_CTRL__tr_baud__c460k8Hz 12
7029#define R_SYNC_SERIAL1_CTRL__tr_baud__c921k6Hz 13
7030#define R_SYNC_SERIAL1_CTRL__tr_baud__c3125kHz 14
7031#define R_SYNC_SERIAL1_CTRL__tr_baud__reserved 15
7032#define R_SYNC_SERIAL1_CTRL__dma_enable__BITNR 27
7033#define R_SYNC_SERIAL1_CTRL__dma_enable__WIDTH 1
7034#define R_SYNC_SERIAL1_CTRL__dma_enable__on 1
7035#define R_SYNC_SERIAL1_CTRL__dma_enable__off 0
7036#define R_SYNC_SERIAL1_CTRL__mode__BITNR 24
7037#define R_SYNC_SERIAL1_CTRL__mode__WIDTH 3
7038#define R_SYNC_SERIAL1_CTRL__mode__master_output 0
7039#define R_SYNC_SERIAL1_CTRL__mode__slave_output 1
7040#define R_SYNC_SERIAL1_CTRL__mode__master_input 2
7041#define R_SYNC_SERIAL1_CTRL__mode__slave_input 3
7042#define R_SYNC_SERIAL1_CTRL__mode__master_bidir 4
7043#define R_SYNC_SERIAL1_CTRL__mode__slave_bidir 5
7044#define R_SYNC_SERIAL1_CTRL__error__BITNR 23
7045#define R_SYNC_SERIAL1_CTRL__error__WIDTH 1
7046#define R_SYNC_SERIAL1_CTRL__error__normal 0
7047#define R_SYNC_SERIAL1_CTRL__error__ignore 1
7048#define R_SYNC_SERIAL1_CTRL__rec_enable__BITNR 22
7049#define R_SYNC_SERIAL1_CTRL__rec_enable__WIDTH 1
7050#define R_SYNC_SERIAL1_CTRL__rec_enable__disable 0
7051#define R_SYNC_SERIAL1_CTRL__rec_enable__enable 1
7052#define R_SYNC_SERIAL1_CTRL__f_synctype__BITNR 21
7053#define R_SYNC_SERIAL1_CTRL__f_synctype__WIDTH 1
7054#define R_SYNC_SERIAL1_CTRL__f_synctype__normal 0
7055#define R_SYNC_SERIAL1_CTRL__f_synctype__early 1
7056#define R_SYNC_SERIAL1_CTRL__f_syncsize__BITNR 19
7057#define R_SYNC_SERIAL1_CTRL__f_syncsize__WIDTH 2
7058#define R_SYNC_SERIAL1_CTRL__f_syncsize__bit 0
7059#define R_SYNC_SERIAL1_CTRL__f_syncsize__word 1
7060#define R_SYNC_SERIAL1_CTRL__f_syncsize__extended 2
7061#define R_SYNC_SERIAL1_CTRL__f_syncsize__reserved 3
7062#define R_SYNC_SERIAL1_CTRL__f_sync__BITNR 18
7063#define R_SYNC_SERIAL1_CTRL__f_sync__WIDTH 1
7064#define R_SYNC_SERIAL1_CTRL__f_sync__on 0
7065#define R_SYNC_SERIAL1_CTRL__f_sync__off 1
7066#define R_SYNC_SERIAL1_CTRL__clk_mode__BITNR 17
7067#define R_SYNC_SERIAL1_CTRL__clk_mode__WIDTH 1
7068#define R_SYNC_SERIAL1_CTRL__clk_mode__normal 0
7069#define R_SYNC_SERIAL1_CTRL__clk_mode__gated 1
7070#define R_SYNC_SERIAL1_CTRL__clk_halt__BITNR 16
7071#define R_SYNC_SERIAL1_CTRL__clk_halt__WIDTH 1
7072#define R_SYNC_SERIAL1_CTRL__clk_halt__running 0
7073#define R_SYNC_SERIAL1_CTRL__clk_halt__stopped 1
7074#define R_SYNC_SERIAL1_CTRL__bitorder__BITNR 15
7075#define R_SYNC_SERIAL1_CTRL__bitorder__WIDTH 1
7076#define R_SYNC_SERIAL1_CTRL__bitorder__lsb 0
7077#define R_SYNC_SERIAL1_CTRL__bitorder__msb 1
7078#define R_SYNC_SERIAL1_CTRL__tr_enable__BITNR 14
7079#define R_SYNC_SERIAL1_CTRL__tr_enable__WIDTH 1
7080#define R_SYNC_SERIAL1_CTRL__tr_enable__disable 0
7081#define R_SYNC_SERIAL1_CTRL__tr_enable__enable 1
7082#define R_SYNC_SERIAL1_CTRL__wordsize__BITNR 11
7083#define R_SYNC_SERIAL1_CTRL__wordsize__WIDTH 3
7084#define R_SYNC_SERIAL1_CTRL__wordsize__size8bit 0
7085#define R_SYNC_SERIAL1_CTRL__wordsize__size12bit 1
7086#define R_SYNC_SERIAL1_CTRL__wordsize__size16bit 2
7087#define R_SYNC_SERIAL1_CTRL__wordsize__size24bit 3
7088#define R_SYNC_SERIAL1_CTRL__wordsize__size32bit 4
7089#define R_SYNC_SERIAL1_CTRL__buf_empty__BITNR 10
7090#define R_SYNC_SERIAL1_CTRL__buf_empty__WIDTH 1
7091#define R_SYNC_SERIAL1_CTRL__buf_empty__lmt_8 0
7092#define R_SYNC_SERIAL1_CTRL__buf_empty__lmt_0 1
7093#define R_SYNC_SERIAL1_CTRL__buf_full__BITNR 9
7094#define R_SYNC_SERIAL1_CTRL__buf_full__WIDTH 1
7095#define R_SYNC_SERIAL1_CTRL__buf_full__lmt_32 0
7096#define R_SYNC_SERIAL1_CTRL__buf_full__lmt_8 1
7097#define R_SYNC_SERIAL1_CTRL__flow_ctrl__BITNR 8
7098#define R_SYNC_SERIAL1_CTRL__flow_ctrl__WIDTH 1
7099#define R_SYNC_SERIAL1_CTRL__flow_ctrl__disabled 0
7100#define R_SYNC_SERIAL1_CTRL__flow_ctrl__enabled 1
7101#define R_SYNC_SERIAL1_CTRL__clk_polarity__BITNR 6
7102#define R_SYNC_SERIAL1_CTRL__clk_polarity__WIDTH 1
7103#define R_SYNC_SERIAL1_CTRL__clk_polarity__pos 0
7104#define R_SYNC_SERIAL1_CTRL__clk_polarity__neg 1
7105#define R_SYNC_SERIAL1_CTRL__frame_polarity__BITNR 5
7106#define R_SYNC_SERIAL1_CTRL__frame_polarity__WIDTH 1
7107#define R_SYNC_SERIAL1_CTRL__frame_polarity__normal 0
7108#define R_SYNC_SERIAL1_CTRL__frame_polarity__inverted 1
7109#define R_SYNC_SERIAL1_CTRL__status_polarity__BITNR 4
7110#define R_SYNC_SERIAL1_CTRL__status_polarity__WIDTH 1
7111#define R_SYNC_SERIAL1_CTRL__status_polarity__normal 0
7112#define R_SYNC_SERIAL1_CTRL__status_polarity__inverted 1
7113#define R_SYNC_SERIAL1_CTRL__clk_driver__BITNR 3
7114#define R_SYNC_SERIAL1_CTRL__clk_driver__WIDTH 1
7115#define R_SYNC_SERIAL1_CTRL__clk_driver__normal 0
7116#define R_SYNC_SERIAL1_CTRL__clk_driver__inverted 1
7117#define R_SYNC_SERIAL1_CTRL__frame_driver__BITNR 2
7118#define R_SYNC_SERIAL1_CTRL__frame_driver__WIDTH 1
7119#define R_SYNC_SERIAL1_CTRL__frame_driver__normal 0
7120#define R_SYNC_SERIAL1_CTRL__frame_driver__inverted 1
7121#define R_SYNC_SERIAL1_CTRL__status_driver__BITNR 1
7122#define R_SYNC_SERIAL1_CTRL__status_driver__WIDTH 1
7123#define R_SYNC_SERIAL1_CTRL__status_driver__normal 0
7124#define R_SYNC_SERIAL1_CTRL__status_driver__inverted 1
7125#define R_SYNC_SERIAL1_CTRL__def_out0__BITNR 0
7126#define R_SYNC_SERIAL1_CTRL__def_out0__WIDTH 1
7127#define R_SYNC_SERIAL1_CTRL__def_out0__high 1
7128#define R_SYNC_SERIAL1_CTRL__def_out0__low 0
7129
7130#define R_SYNC_SERIAL3_REC_DATA (IO_TYPECAST_RO_UDWORD 0xb000007c)
7131#define R_SYNC_SERIAL3_REC_DATA__data_in__BITNR 0
7132#define R_SYNC_SERIAL3_REC_DATA__data_in__WIDTH 32
7133
7134#define R_SYNC_SERIAL3_REC_WORD (IO_TYPECAST_RO_UWORD 0xb000007c)
7135#define R_SYNC_SERIAL3_REC_WORD__data_in__BITNR 0
7136#define R_SYNC_SERIAL3_REC_WORD__data_in__WIDTH 16
7137
7138#define R_SYNC_SERIAL3_REC_BYTE (IO_TYPECAST_RO_BYTE 0xb000007c)
7139#define R_SYNC_SERIAL3_REC_BYTE__data_in__BITNR 0
7140#define R_SYNC_SERIAL3_REC_BYTE__data_in__WIDTH 8
7141
7142#define R_SYNC_SERIAL3_STATUS (IO_TYPECAST_RO_UDWORD 0xb0000078)
7143#define R_SYNC_SERIAL3_STATUS__rec_status__BITNR 15
7144#define R_SYNC_SERIAL3_STATUS__rec_status__WIDTH 1
7145#define R_SYNC_SERIAL3_STATUS__rec_status__running 0
7146#define R_SYNC_SERIAL3_STATUS__rec_status__idle 1
7147#define R_SYNC_SERIAL3_STATUS__tr_empty__BITNR 14
7148#define R_SYNC_SERIAL3_STATUS__tr_empty__WIDTH 1
7149#define R_SYNC_SERIAL3_STATUS__tr_empty__empty 1
7150#define R_SYNC_SERIAL3_STATUS__tr_empty__not_empty 0
7151#define R_SYNC_SERIAL3_STATUS__tr_ready__BITNR 13
7152#define R_SYNC_SERIAL3_STATUS__tr_ready__WIDTH 1
7153#define R_SYNC_SERIAL3_STATUS__tr_ready__full 0
7154#define R_SYNC_SERIAL3_STATUS__tr_ready__ready 1
7155#define R_SYNC_SERIAL3_STATUS__pin_1__BITNR 12
7156#define R_SYNC_SERIAL3_STATUS__pin_1__WIDTH 1
7157#define R_SYNC_SERIAL3_STATUS__pin_1__low 0
7158#define R_SYNC_SERIAL3_STATUS__pin_1__high 1
7159#define R_SYNC_SERIAL3_STATUS__pin_0__BITNR 11
7160#define R_SYNC_SERIAL3_STATUS__pin_0__WIDTH 1
7161#define R_SYNC_SERIAL3_STATUS__pin_0__low 0
7162#define R_SYNC_SERIAL3_STATUS__pin_0__high 1
7163#define R_SYNC_SERIAL3_STATUS__underflow__BITNR 10
7164#define R_SYNC_SERIAL3_STATUS__underflow__WIDTH 1
7165#define R_SYNC_SERIAL3_STATUS__underflow__no 0
7166#define R_SYNC_SERIAL3_STATUS__underflow__yes 1
7167#define R_SYNC_SERIAL3_STATUS__overrun__BITNR 9
7168#define R_SYNC_SERIAL3_STATUS__overrun__WIDTH 1
7169#define R_SYNC_SERIAL3_STATUS__overrun__no 0
7170#define R_SYNC_SERIAL3_STATUS__overrun__yes 1
7171#define R_SYNC_SERIAL3_STATUS__data_avail__BITNR 8
7172#define R_SYNC_SERIAL3_STATUS__data_avail__WIDTH 1
7173#define R_SYNC_SERIAL3_STATUS__data_avail__no 0
7174#define R_SYNC_SERIAL3_STATUS__data_avail__yes 1
7175#define R_SYNC_SERIAL3_STATUS__data__BITNR 0
7176#define R_SYNC_SERIAL3_STATUS__data__WIDTH 8
7177
7178#define R_SYNC_SERIAL3_TR_DATA (IO_TYPECAST_UDWORD 0xb000007c)
7179#define R_SYNC_SERIAL3_TR_DATA__data_out__BITNR 0
7180#define R_SYNC_SERIAL3_TR_DATA__data_out__WIDTH 32
7181
7182#define R_SYNC_SERIAL3_TR_WORD (IO_TYPECAST_UWORD 0xb000007c)
7183#define R_SYNC_SERIAL3_TR_WORD__data_out__BITNR 0
7184#define R_SYNC_SERIAL3_TR_WORD__data_out__WIDTH 16
7185
7186#define R_SYNC_SERIAL3_TR_BYTE (IO_TYPECAST_BYTE 0xb000007c)
7187#define R_SYNC_SERIAL3_TR_BYTE__data_out__BITNR 0
7188#define R_SYNC_SERIAL3_TR_BYTE__data_out__WIDTH 8
7189
7190#define R_SYNC_SERIAL3_CTRL (IO_TYPECAST_UDWORD 0xb0000078)
7191#define R_SYNC_SERIAL3_CTRL__tr_baud__BITNR 28
7192#define R_SYNC_SERIAL3_CTRL__tr_baud__WIDTH 4
7193#define R_SYNC_SERIAL3_CTRL__tr_baud__c150Hz 0
7194#define R_SYNC_SERIAL3_CTRL__tr_baud__c300Hz 1
7195#define R_SYNC_SERIAL3_CTRL__tr_baud__c600Hz 2
7196#define R_SYNC_SERIAL3_CTRL__tr_baud__c1200Hz 3
7197#define R_SYNC_SERIAL3_CTRL__tr_baud__c2400Hz 4
7198#define R_SYNC_SERIAL3_CTRL__tr_baud__c4800Hz 5
7199#define R_SYNC_SERIAL3_CTRL__tr_baud__c9600Hz 6
7200#define R_SYNC_SERIAL3_CTRL__tr_baud__c19k2Hz 7
7201#define R_SYNC_SERIAL3_CTRL__tr_baud__c28k8Hz 8
7202#define R_SYNC_SERIAL3_CTRL__tr_baud__c57k6Hz 9
7203#define R_SYNC_SERIAL3_CTRL__tr_baud__c115k2Hz 10
7204#define R_SYNC_SERIAL3_CTRL__tr_baud__c230k4Hz 11
7205#define R_SYNC_SERIAL3_CTRL__tr_baud__c460k8Hz 12
7206#define R_SYNC_SERIAL3_CTRL__tr_baud__c921k6Hz 13
7207#define R_SYNC_SERIAL3_CTRL__tr_baud__c3125kHz 14
7208#define R_SYNC_SERIAL3_CTRL__tr_baud__reserved 15
7209#define R_SYNC_SERIAL3_CTRL__dma_enable__BITNR 27
7210#define R_SYNC_SERIAL3_CTRL__dma_enable__WIDTH 1
7211#define R_SYNC_SERIAL3_CTRL__dma_enable__on 1
7212#define R_SYNC_SERIAL3_CTRL__dma_enable__off 0
7213#define R_SYNC_SERIAL3_CTRL__mode__BITNR 24
7214#define R_SYNC_SERIAL3_CTRL__mode__WIDTH 3
7215#define R_SYNC_SERIAL3_CTRL__mode__master_output 0
7216#define R_SYNC_SERIAL3_CTRL__mode__slave_output 1
7217#define R_SYNC_SERIAL3_CTRL__mode__master_input 2
7218#define R_SYNC_SERIAL3_CTRL__mode__slave_input 3
7219#define R_SYNC_SERIAL3_CTRL__mode__master_bidir 4
7220#define R_SYNC_SERIAL3_CTRL__mode__slave_bidir 5
7221#define R_SYNC_SERIAL3_CTRL__error__BITNR 23
7222#define R_SYNC_SERIAL3_CTRL__error__WIDTH 1
7223#define R_SYNC_SERIAL3_CTRL__error__normal 0
7224#define R_SYNC_SERIAL3_CTRL__error__ignore 1
7225#define R_SYNC_SERIAL3_CTRL__rec_enable__BITNR 22
7226#define R_SYNC_SERIAL3_CTRL__rec_enable__WIDTH 1
7227#define R_SYNC_SERIAL3_CTRL__rec_enable__disable 0
7228#define R_SYNC_SERIAL3_CTRL__rec_enable__enable 1
7229#define R_SYNC_SERIAL3_CTRL__f_synctype__BITNR 21
7230#define R_SYNC_SERIAL3_CTRL__f_synctype__WIDTH 1
7231#define R_SYNC_SERIAL3_CTRL__f_synctype__normal 0
7232#define R_SYNC_SERIAL3_CTRL__f_synctype__early 1
7233#define R_SYNC_SERIAL3_CTRL__f_syncsize__BITNR 19
7234#define R_SYNC_SERIAL3_CTRL__f_syncsize__WIDTH 2
7235#define R_SYNC_SERIAL3_CTRL__f_syncsize__bit 0
7236#define R_SYNC_SERIAL3_CTRL__f_syncsize__word 1
7237#define R_SYNC_SERIAL3_CTRL__f_syncsize__extended 2
7238#define R_SYNC_SERIAL3_CTRL__f_syncsize__reserved 3
7239#define R_SYNC_SERIAL3_CTRL__f_sync__BITNR 18
7240#define R_SYNC_SERIAL3_CTRL__f_sync__WIDTH 1
7241#define R_SYNC_SERIAL3_CTRL__f_sync__on 0
7242#define R_SYNC_SERIAL3_CTRL__f_sync__off 1
7243#define R_SYNC_SERIAL3_CTRL__clk_mode__BITNR 17
7244#define R_SYNC_SERIAL3_CTRL__clk_mode__WIDTH 1
7245#define R_SYNC_SERIAL3_CTRL__clk_mode__normal 0
7246#define R_SYNC_SERIAL3_CTRL__clk_mode__gated 1
7247#define R_SYNC_SERIAL3_CTRL__clk_halt__BITNR 16
7248#define R_SYNC_SERIAL3_CTRL__clk_halt__WIDTH 1
7249#define R_SYNC_SERIAL3_CTRL__clk_halt__running 0
7250#define R_SYNC_SERIAL3_CTRL__clk_halt__stopped 1
7251#define R_SYNC_SERIAL3_CTRL__bitorder__BITNR 15
7252#define R_SYNC_SERIAL3_CTRL__bitorder__WIDTH 1
7253#define R_SYNC_SERIAL3_CTRL__bitorder__lsb 0
7254#define R_SYNC_SERIAL3_CTRL__bitorder__msb 1
7255#define R_SYNC_SERIAL3_CTRL__tr_enable__BITNR 14
7256#define R_SYNC_SERIAL3_CTRL__tr_enable__WIDTH 1
7257#define R_SYNC_SERIAL3_CTRL__tr_enable__disable 0
7258#define R_SYNC_SERIAL3_CTRL__tr_enable__enable 1
7259#define R_SYNC_SERIAL3_CTRL__wordsize__BITNR 11
7260#define R_SYNC_SERIAL3_CTRL__wordsize__WIDTH 3
7261#define R_SYNC_SERIAL3_CTRL__wordsize__size8bit 0
7262#define R_SYNC_SERIAL3_CTRL__wordsize__size12bit 1
7263#define R_SYNC_SERIAL3_CTRL__wordsize__size16bit 2
7264#define R_SYNC_SERIAL3_CTRL__wordsize__size24bit 3
7265#define R_SYNC_SERIAL3_CTRL__wordsize__size32bit 4
7266#define R_SYNC_SERIAL3_CTRL__buf_empty__BITNR 10
7267#define R_SYNC_SERIAL3_CTRL__buf_empty__WIDTH 1
7268#define R_SYNC_SERIAL3_CTRL__buf_empty__lmt_8 0
7269#define R_SYNC_SERIAL3_CTRL__buf_empty__lmt_0 1
7270#define R_SYNC_SERIAL3_CTRL__buf_full__BITNR 9
7271#define R_SYNC_SERIAL3_CTRL__buf_full__WIDTH 1
7272#define R_SYNC_SERIAL3_CTRL__buf_full__lmt_32 0
7273#define R_SYNC_SERIAL3_CTRL__buf_full__lmt_8 1
7274#define R_SYNC_SERIAL3_CTRL__flow_ctrl__BITNR 8
7275#define R_SYNC_SERIAL3_CTRL__flow_ctrl__WIDTH 1
7276#define R_SYNC_SERIAL3_CTRL__flow_ctrl__disabled 0
7277#define R_SYNC_SERIAL3_CTRL__flow_ctrl__enabled 1
7278#define R_SYNC_SERIAL3_CTRL__clk_polarity__BITNR 6
7279#define R_SYNC_SERIAL3_CTRL__clk_polarity__WIDTH 1
7280#define R_SYNC_SERIAL3_CTRL__clk_polarity__pos 0
7281#define R_SYNC_SERIAL3_CTRL__clk_polarity__neg 1
7282#define R_SYNC_SERIAL3_CTRL__frame_polarity__BITNR 5
7283#define R_SYNC_SERIAL3_CTRL__frame_polarity__WIDTH 1
7284#define R_SYNC_SERIAL3_CTRL__frame_polarity__normal 0
7285#define R_SYNC_SERIAL3_CTRL__frame_polarity__inverted 1
7286#define R_SYNC_SERIAL3_CTRL__status_polarity__BITNR 4
7287#define R_SYNC_SERIAL3_CTRL__status_polarity__WIDTH 1
7288#define R_SYNC_SERIAL3_CTRL__status_polarity__normal 0
7289#define R_SYNC_SERIAL3_CTRL__status_polarity__inverted 1
7290#define R_SYNC_SERIAL3_CTRL__clk_driver__BITNR 3
7291#define R_SYNC_SERIAL3_CTRL__clk_driver__WIDTH 1
7292#define R_SYNC_SERIAL3_CTRL__clk_driver__normal 0
7293#define R_SYNC_SERIAL3_CTRL__clk_driver__inverted 1
7294#define R_SYNC_SERIAL3_CTRL__frame_driver__BITNR 2
7295#define R_SYNC_SERIAL3_CTRL__frame_driver__WIDTH 1
7296#define R_SYNC_SERIAL3_CTRL__frame_driver__normal 0
7297#define R_SYNC_SERIAL3_CTRL__frame_driver__inverted 1
7298#define R_SYNC_SERIAL3_CTRL__status_driver__BITNR 1
7299#define R_SYNC_SERIAL3_CTRL__status_driver__WIDTH 1
7300#define R_SYNC_SERIAL3_CTRL__status_driver__normal 0
7301#define R_SYNC_SERIAL3_CTRL__status_driver__inverted 1
7302#define R_SYNC_SERIAL3_CTRL__def_out0__BITNR 0
7303#define R_SYNC_SERIAL3_CTRL__def_out0__WIDTH 1
7304#define R_SYNC_SERIAL3_CTRL__def_out0__high 1
7305#define R_SYNC_SERIAL3_CTRL__def_out0__low 0
7306
diff --git a/include/asm-cris/arch-v10/sv_addr_ag.h b/include/asm-cris/arch-v10/sv_addr_ag.h
deleted file mode 100644
index e4a6b68b8982..000000000000
--- a/include/asm-cris/arch-v10/sv_addr_ag.h
+++ /dev/null
@@ -1,139 +0,0 @@
1/*!**************************************************************************
2*!
3*! MACROS:
4*! IO_MASK(reg,field)
5*! IO_STATE(reg,field,state)
6*! IO_EXTRACT(reg,field,val)
7*! IO_STATE_VALUE(reg,field,state)
8*! IO_BITNR(reg,field)
9*! IO_WIDTH(reg,field)
10*! IO_FIELD(reg,field,val)
11*! IO_RD(reg)
12*! All moderegister addresses and fields of these.
13*!
14*!**************************************************************************/
15
16#ifndef __sv_addr_ag_h__
17#define __sv_addr_ag_h__
18
19
20#define __test_sv_addr__ 0
21
22/*------------------------------------------------------------
23!* General macros to manipulate moderegisters.
24!*-----------------------------------------------------------*/
25
26/* IO_MASK returns a mask for a specified bitfield in a register.
27 Note that this macro doesn't work when field width is 32 bits. */
28#define IO_MASK(reg, field) IO_MASK_ (reg##_, field##_)
29#define IO_MASK_(reg_, field_) \
30 ( ( ( 1 << reg_##_##field_##_WIDTH ) - 1 ) << reg_##_##field_##_BITNR )
31
32/* IO_STATE returns a constant corresponding to a one of the symbolic
33 states that the bitfield can have. (Shifted to correct position) */
34#define IO_STATE(reg, field, state) IO_STATE_ (reg##_, field##_, _##state)
35#define IO_STATE_(reg_, field_, _state) \
36 ( reg_##_##field_##_state << reg_##_##field_##_BITNR )
37
38/* IO_EXTRACT returns the masked and shifted value corresponding to the
39 bitfield can have. */
40#define IO_EXTRACT(reg, field, val) IO_EXTRACT_ (reg##_, field##_, val)
41#define IO_EXTRACT_(reg_, field_, val) ( (( ( ( 1 << reg_##_##field_##_WIDTH ) \
42 - 1 ) << reg_##_##field_##_BITNR ) & (val)) >> reg_##_##field_##_BITNR )
43
44/* IO_STATE_VALUE returns a constant corresponding to a one of the symbolic
45 states that the bitfield can have. (Not shifted) */
46#define IO_STATE_VALUE(reg, field, state) \
47 IO_STATE_VALUE_ (reg##_, field##_, _##state)
48#define IO_STATE_VALUE_(reg_, field_, _state) ( reg_##_##field_##_state )
49
50/* IO_FIELD shifts the val parameter to be aligned with the bitfield
51 specified. */
52#define IO_FIELD(reg, field, val) IO_FIELD_ (reg##_, field##_, val)
53#define IO_FIELD_(reg_, field_, val) ((val) << reg_##_##field_##_BITNR)
54
55/* IO_BITNR returns the starting bitnumber of a bitfield. Bit 0 is
56 LSB and the returned bitnumber is LSB of the field. */
57#define IO_BITNR(reg, field) IO_BITNR_ (reg##_, field##_)
58#define IO_BITNR_(reg_, field_) (reg_##_##field_##_BITNR)
59
60/* IO_WIDTH returns the width, in bits, of a bitfield. */
61#define IO_WIDTH(reg, field) IO_WIDTH_ (reg##_, field##_)
62#define IO_WIDTH_(reg_, field_) (reg_##_##field_##_WIDTH)
63
64/*--- Obsolete. Kept for backw compatibility. ---*/
65/* Reads (or writes) a byte/uword/udword from the specified mode
66 register. */
67#define IO_RD(reg) (*(volatile u32*)(reg))
68#define IO_RD_B(reg) (*(volatile u8*)(reg))
69#define IO_RD_W(reg) (*(volatile u16*)(reg))
70#define IO_RD_D(reg) (*(volatile u32*)(reg))
71
72/*------------------------------------------------------------
73!* Start addresses of the different memory areas.
74!*-----------------------------------------------------------*/
75
76#define MEM_CSE0_START (0x00000000)
77#define MEM_CSE0_SIZE (0x04000000)
78#define MEM_CSE1_START (0x04000000)
79#define MEM_CSE1_SIZE (0x04000000)
80#define MEM_CSR0_START (0x08000000)
81#define MEM_CSR1_START (0x0c000000)
82#define MEM_CSP0_START (0x10000000)
83#define MEM_CSP1_START (0x14000000)
84#define MEM_CSP2_START (0x18000000)
85#define MEM_CSP3_START (0x1c000000)
86#define MEM_CSP4_START (0x20000000)
87#define MEM_CSP5_START (0x24000000)
88#define MEM_CSP6_START (0x28000000)
89#define MEM_CSP7_START (0x2c000000)
90#define MEM_DRAM_START (0x40000000)
91
92#define MEM_NON_CACHEABLE (0x80000000)
93
94/*------------------------------------------------------------
95!* Type casts used in mode register macros, making pointer
96!* dereferencing possible. Empty in assembler.
97!*-----------------------------------------------------------*/
98
99#ifndef __ASSEMBLER__
100# define IO_TYPECAST_UDWORD (volatile u32*)
101# define IO_TYPECAST_RO_UDWORD (const volatile u32*)
102# define IO_TYPECAST_UWORD (volatile u16*)
103# define IO_TYPECAST_RO_UWORD (const volatile u16*)
104# define IO_TYPECAST_BYTE (volatile u8*)
105# define IO_TYPECAST_RO_BYTE (const volatile u8*)
106#else
107# define IO_TYPECAST_UDWORD
108# define IO_TYPECAST_RO_UDWORD
109# define IO_TYPECAST_UWORD
110# define IO_TYPECAST_RO_UWORD
111# define IO_TYPECAST_BYTE
112# define IO_TYPECAST_RO_BYTE
113#endif
114
115/*------------------------------------------------------------*/
116
117#include "sv_addr.agh"
118
119#if __test_sv_addr__
120/* IO_MASK( R_BUS_CONFIG , CE ) */
121IO_MASK( R_WAITSTATES , SRAM_WS )
122IO_MASK( R_TEST , W32 )
123
124IO_STATE( R_BUS_CONFIG, CE, DISABLE )
125IO_STATE( R_BUS_CONFIG, CE, ENABLE )
126
127IO_STATE( R_DRAM_TIMING, REF, IVAL2 )
128
129IO_MASK( R_DRAM_TIMING, REF )
130
131IO_MASK( R_EXT_DMA_0_STAT, TFR_COUNT ) >> IO_BITNR( R_EXT_DMA_0_STAT, TFR_COUNT )
132
133IO_RD(R_EXT_DMA_0_STAT) & IO_MASK( R_EXT_DMA_0_STAT, S )
134 == IO_STATE( R_EXT_DMA_0_STAT, S, STARTED )
135#endif
136
137
138#endif /* ifndef __sv_addr_ag_h__ */
139
diff --git a/include/asm-cris/arch-v10/svinto.h b/include/asm-cris/arch-v10/svinto.h
deleted file mode 100644
index 0881a1af7cee..000000000000
--- a/include/asm-cris/arch-v10/svinto.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _ASM_CRIS_SVINTO_H
2#define _ASM_CRIS_SVINTO_H
3
4#include "sv_addr_ag.h"
5
6extern unsigned int genconfig_shadow; /* defined and set in head.S */
7
8/* dma stuff */
9
10enum { /* Available in: */
11 d_eol = (1 << 0), /* flags */
12 d_eop = (1 << 1), /* flags & status */
13 d_wait = (1 << 2), /* flags */
14 d_int = (1 << 3), /* flags */
15 d_txerr = (1 << 4), /* flags */
16 d_stop = (1 << 4), /* status */
17 d_ecp = (1 << 4), /* flags & status */
18 d_pri = (1 << 5), /* flags & status */
19 d_alignerr = (1 << 6), /* status */
20 d_crcerr = (1 << 7) /* status */
21};
22
23/* Do remember that DMA does not go through the MMU and needs
24 * a real physical address, not an address virtually mapped or
25 * paged. Therefore the buf/next ptrs below are unsigned long instead
26 * of void * to give a warning if you try to put a pointer directly
27 * to them instead of going through virt_to_phys/phys_to_virt.
28 */
29
30typedef struct etrax_dma_descr {
31 unsigned short sw_len; /* 0-1 */
32 unsigned short ctrl; /* 2-3 */
33 unsigned long next; /* 4-7 */
34 unsigned long buf; /* 8-11 */
35 unsigned short hw_len; /* 12-13 */
36 unsigned char status; /* 14 */
37 unsigned char fifo_len; /* 15 */
38} etrax_dma_descr;
39
40
41/* Use this for constant numbers only */
42#define RESET_DMA_NUM( n ) \
43 *R_DMA_CH##n##_CMD = IO_STATE( R_DMA_CH0_CMD, cmd, reset )
44
45/* Use this for constant numbers or symbols,
46 * having two macros makes it possible to use constant expressions.
47 */
48#define RESET_DMA( n ) RESET_DMA_NUM( n )
49
50
51/* Use this for constant numbers only */
52#define WAIT_DMA_NUM( n ) \
53 while( (*R_DMA_CH##n##_CMD & IO_MASK( R_DMA_CH0_CMD, cmd )) != \
54 IO_STATE( R_DMA_CH0_CMD, cmd, hold ) )
55
56/* Use this for constant numbers or symbols
57 * having two macros makes it possible to use constant expressions.
58 */
59#define WAIT_DMA( n ) WAIT_DMA_NUM( n )
60
61extern void prepare_rx_descriptor(struct etrax_dma_descr *desc);
62extern void flush_etrax_cache(void);
63
64#endif
diff --git a/include/asm-cris/arch-v10/system.h b/include/asm-cris/arch-v10/system.h
deleted file mode 100644
index 4a9cd36c9e16..000000000000
--- a/include/asm-cris/arch-v10/system.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef __ASM_CRIS_ARCH_SYSTEM_H
2#define __ASM_CRIS_ARCH_SYSTEM_H
3
4
5/* read the CPU version register */
6
7static inline unsigned long rdvr(void) {
8 unsigned char vr;
9 __asm__ volatile ("move $vr,%0" : "=rm" (vr));
10 return vr;
11}
12
13#define cris_machine_name "cris"
14
15/* read/write the user-mode stackpointer */
16
17static inline unsigned long rdusp(void) {
18 unsigned long usp;
19 __asm__ __volatile__("move $usp,%0" : "=rm" (usp));
20 return usp;
21}
22
23#define wrusp(usp) \
24 __asm__ __volatile__("move %0,$usp" : /* no outputs */ : "rm" (usp))
25
26/* read the current stackpointer */
27
28static inline unsigned long rdsp(void) {
29 unsigned long sp;
30 __asm__ __volatile__("move.d $sp,%0" : "=rm" (sp));
31 return sp;
32}
33
34static inline unsigned long _get_base(char * addr)
35{
36 return 0;
37}
38
39#define nop() __asm__ __volatile__ ("nop");
40
41#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
42#define tas(ptr) (xchg((ptr),1))
43
44struct __xchg_dummy { unsigned long a[100]; };
45#define __xg(x) ((struct __xchg_dummy *)(x))
46
47/* interrupt control.. */
48#define local_save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory");
49#define local_irq_restore(x) __asm__ __volatile__ ("move %0,$ccr" : : "rm" (x) : "memory");
50#define local_irq_disable() __asm__ __volatile__ ( "di" : : :"memory");
51#define local_irq_enable() __asm__ __volatile__ ( "ei" : : :"memory");
52
53#define irqs_disabled() \
54({ \
55 unsigned long flags; \
56 local_save_flags(flags); \
57 !(flags & (1<<5)); \
58})
59
60/* For spinlocks etc */
61#define local_irq_save(x) __asm__ __volatile__ ("move $ccr,%0\n\tdi" : "=rm" (x) : : "memory");
62
63#endif
diff --git a/include/asm-cris/arch-v10/thread_info.h b/include/asm-cris/arch-v10/thread_info.h
deleted file mode 100644
index 218f4152d3e5..000000000000
--- a/include/asm-cris/arch-v10/thread_info.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_ARCH_THREAD_INFO_H
2#define _ASM_ARCH_THREAD_INFO_H
3
4/* how to get the thread information struct from C */
5static inline struct thread_info *current_thread_info(void)
6{
7 struct thread_info *ti;
8 __asm__("and.d $sp,%0; ":"=r" (ti) : "0" (~8191UL));
9 return ti;
10}
11
12#endif
diff --git a/include/asm-cris/arch-v10/timex.h b/include/asm-cris/arch-v10/timex.h
deleted file mode 100644
index e48447d94faf..000000000000
--- a/include/asm-cris/arch-v10/timex.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * Use prescale timer at 25000 Hz instead of the baudrate timer at
3 * 19200 to get rid of the 64ppm to fast timer (and we get better
4 * resolution within a jiffie as well.
5 */
6#ifndef _ASM_CRIS_ARCH_TIMEX_H
7#define _ASM_CRIS_ARCH_TIMEX_H
8
9/* The prescaler clock runs at 25MHz, we divide it by 1000 in the prescaler */
10/* If you change anything here you must check time.c as well... */
11#define PRESCALE_FREQ 25000000
12#define PRESCALE_VALUE 1000
13#define CLOCK_TICK_RATE 25000 /* Underlying frequency of the HZ timer */
14/* The timer0 values gives 40us resolution (1/25000) but interrupts at HZ*/
15#define TIMER0_FREQ (CLOCK_TICK_RATE)
16#define TIMER0_CLKSEL flexible
17#define TIMER0_DIV (TIMER0_FREQ/(HZ))
18
19
20#define GET_JIFFIES_USEC() \
21 ( (TIMER0_DIV - *R_TIMER0_DATA) * (1000000/HZ)/TIMER0_DIV )
22
23unsigned long get_ns_in_jiffie(void);
24
25static inline unsigned long get_us_in_jiffie_highres(void)
26{
27 return get_ns_in_jiffie()/1000;
28}
29
30#endif
diff --git a/include/asm-cris/arch-v10/tlb.h b/include/asm-cris/arch-v10/tlb.h
deleted file mode 100644
index 31525bbe75c3..000000000000
--- a/include/asm-cris/arch-v10/tlb.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _CRIS_ARCH_TLB_H
2#define _CRIS_ARCH_TLB_H
3
4/* The TLB can host up to 64 different mm contexts at the same time.
5 * The last page_id is never running - it is used as an invalid page_id
6 * so we can make TLB entries that will never match.
7 */
8#define NUM_TLB_ENTRIES 64
9#define NUM_PAGEID 64
10#define INVALID_PAGEID 63
11#define NO_CONTEXT -1
12
13#endif
diff --git a/include/asm-cris/arch-v10/uaccess.h b/include/asm-cris/arch-v10/uaccess.h
deleted file mode 100644
index 65b02d9b605a..000000000000
--- a/include/asm-cris/arch-v10/uaccess.h
+++ /dev/null
@@ -1,660 +0,0 @@
1/*
2 * Authors: Bjorn Wesen (bjornw@axis.com)
3 * Hans-Peter Nilsson (hp@axis.com)
4 *
5 */
6#ifndef _CRIS_ARCH_UACCESS_H
7#define _CRIS_ARCH_UACCESS_H
8
9/*
10 * We don't tell gcc that we are accessing memory, but this is OK
11 * because we do not write to any memory gcc knows about, so there
12 * are no aliasing issues.
13 *
14 * Note that PC at a fault is the address *after* the faulting
15 * instruction.
16 */
17#define __put_user_asm(x, addr, err, op) \
18 __asm__ __volatile__( \
19 " "op" %1,[%2]\n" \
20 "2:\n" \
21 " .section .fixup,\"ax\"\n" \
22 "3: move.d %3,%0\n" \
23 " jump 2b\n" \
24 " .previous\n" \
25 " .section __ex_table,\"a\"\n" \
26 " .dword 2b,3b\n" \
27 " .previous\n" \
28 : "=r" (err) \
29 : "r" (x), "r" (addr), "g" (-EFAULT), "0" (err))
30
31#define __put_user_asm_64(x, addr, err) \
32 __asm__ __volatile__( \
33 " move.d %M1,[%2]\n" \
34 "2: move.d %H1,[%2+4]\n" \
35 "4:\n" \
36 " .section .fixup,\"ax\"\n" \
37 "3: move.d %3,%0\n" \
38 " jump 4b\n" \
39 " .previous\n" \
40 " .section __ex_table,\"a\"\n" \
41 " .dword 2b,3b\n" \
42 " .dword 4b,3b\n" \
43 " .previous\n" \
44 : "=r" (err) \
45 : "r" (x), "r" (addr), "g" (-EFAULT), "0" (err))
46
47/* See comment before __put_user_asm. */
48
49#define __get_user_asm(x, addr, err, op) \
50 __asm__ __volatile__( \
51 " "op" [%2],%1\n" \
52 "2:\n" \
53 " .section .fixup,\"ax\"\n" \
54 "3: move.d %3,%0\n" \
55 " moveq 0,%1\n" \
56 " jump 2b\n" \
57 " .previous\n" \
58 " .section __ex_table,\"a\"\n" \
59 " .dword 2b,3b\n" \
60 " .previous\n" \
61 : "=r" (err), "=r" (x) \
62 : "r" (addr), "g" (-EFAULT), "0" (err))
63
64#define __get_user_asm_64(x, addr, err) \
65 __asm__ __volatile__( \
66 " move.d [%2],%M1\n" \
67 "2: move.d [%2+4],%H1\n" \
68 "4:\n" \
69 " .section .fixup,\"ax\"\n" \
70 "3: move.d %3,%0\n" \
71 " moveq 0,%1\n" \
72 " jump 4b\n" \
73 " .previous\n" \
74 " .section __ex_table,\"a\"\n" \
75 " .dword 2b,3b\n" \
76 " .dword 4b,3b\n" \
77 " .previous\n" \
78 : "=r" (err), "=r" (x) \
79 : "r" (addr), "g" (-EFAULT), "0" (err))
80
81/*
82 * Copy a null terminated string from userspace.
83 *
84 * Must return:
85 * -EFAULT for an exception
86 * count if we hit the buffer limit
87 * bytes copied if we hit a null byte
88 * (without the null byte)
89 */
90static inline long
91__do_strncpy_from_user(char *dst, const char *src, long count)
92{
93 long res;
94
95 if (count == 0)
96 return 0;
97
98 /*
99 * Currently, in 2.4.0-test9, most ports use a simple byte-copy loop.
100 * So do we.
101 *
102 * This code is deduced from:
103 *
104 * char tmp2;
105 * long tmp1, tmp3
106 * tmp1 = count;
107 * while ((*dst++ = (tmp2 = *src++)) != 0
108 * && --tmp1)
109 * ;
110 *
111 * res = count - tmp1;
112 *
113 * with tweaks.
114 */
115
116 __asm__ __volatile__ (
117 " move.d %3,%0\n"
118 " move.b [%2+],$r9\n"
119 "1: beq 2f\n"
120 " move.b $r9,[%1+]\n"
121
122 " subq 1,%0\n"
123 " bne 1b\n"
124 " move.b [%2+],$r9\n"
125
126 "2: sub.d %3,%0\n"
127 " neg.d %0,%0\n"
128 "3:\n"
129 " .section .fixup,\"ax\"\n"
130 "4: move.d %7,%0\n"
131 " jump 3b\n"
132
133 /* There's one address for a fault at the first move, and
134 two possible PC values for a fault at the second move,
135 being a delay-slot filler. However, the branch-target
136 for the second move is the same as the first address.
137 Just so you don't get confused... */
138 " .previous\n"
139 " .section __ex_table,\"a\"\n"
140 " .dword 1b,4b\n"
141 " .dword 2b,4b\n"
142 " .previous"
143 : "=r" (res), "=r" (dst), "=r" (src), "=r" (count)
144 : "3" (count), "1" (dst), "2" (src), "g" (-EFAULT)
145 : "r9");
146
147 return res;
148}
149
150/* A few copy asms to build up the more complex ones from.
151
152 Note again, a post-increment is performed regardless of whether a bus
153 fault occurred in that instruction, and PC for a faulted insn is the
154 address *after* the insn. */
155
156#define __asm_copy_user_cont(to, from, ret, COPY, FIXUP, TENTRY) \
157 __asm__ __volatile__ ( \
158 COPY \
159 "1:\n" \
160 " .section .fixup,\"ax\"\n" \
161 FIXUP \
162 " jump 1b\n" \
163 " .previous\n" \
164 " .section __ex_table,\"a\"\n" \
165 TENTRY \
166 " .previous\n" \
167 : "=r" (to), "=r" (from), "=r" (ret) \
168 : "0" (to), "1" (from), "2" (ret) \
169 : "r9", "memory")
170
171#define __asm_copy_from_user_1(to, from, ret) \
172 __asm_copy_user_cont(to, from, ret, \
173 " move.b [%1+],$r9\n" \
174 "2: move.b $r9,[%0+]\n", \
175 "3: addq 1,%2\n" \
176 " clear.b [%0+]\n", \
177 " .dword 2b,3b\n")
178
179#define __asm_copy_from_user_2x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
180 __asm_copy_user_cont(to, from, ret, \
181 " move.w [%1+],$r9\n" \
182 "2: move.w $r9,[%0+]\n" COPY, \
183 "3: addq 2,%2\n" \
184 " clear.w [%0+]\n" FIXUP, \
185 " .dword 2b,3b\n" TENTRY)
186
187#define __asm_copy_from_user_2(to, from, ret) \
188 __asm_copy_from_user_2x_cont(to, from, ret, "", "", "")
189
190#define __asm_copy_from_user_3(to, from, ret) \
191 __asm_copy_from_user_2x_cont(to, from, ret, \
192 " move.b [%1+],$r9\n" \
193 "4: move.b $r9,[%0+]\n", \
194 "5: addq 1,%2\n" \
195 " clear.b [%0+]\n", \
196 " .dword 4b,5b\n")
197
198#define __asm_copy_from_user_4x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
199 __asm_copy_user_cont(to, from, ret, \
200 " move.d [%1+],$r9\n" \
201 "2: move.d $r9,[%0+]\n" COPY, \
202 "3: addq 4,%2\n" \
203 " clear.d [%0+]\n" FIXUP, \
204 " .dword 2b,3b\n" TENTRY)
205
206#define __asm_copy_from_user_4(to, from, ret) \
207 __asm_copy_from_user_4x_cont(to, from, ret, "", "", "")
208
209#define __asm_copy_from_user_5(to, from, ret) \
210 __asm_copy_from_user_4x_cont(to, from, ret, \
211 " move.b [%1+],$r9\n" \
212 "4: move.b $r9,[%0+]\n", \
213 "5: addq 1,%2\n" \
214 " clear.b [%0+]\n", \
215 " .dword 4b,5b\n")
216
217#define __asm_copy_from_user_6x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
218 __asm_copy_from_user_4x_cont(to, from, ret, \
219 " move.w [%1+],$r9\n" \
220 "4: move.w $r9,[%0+]\n" COPY, \
221 "5: addq 2,%2\n" \
222 " clear.w [%0+]\n" FIXUP, \
223 " .dword 4b,5b\n" TENTRY)
224
225#define __asm_copy_from_user_6(to, from, ret) \
226 __asm_copy_from_user_6x_cont(to, from, ret, "", "", "")
227
228#define __asm_copy_from_user_7(to, from, ret) \
229 __asm_copy_from_user_6x_cont(to, from, ret, \
230 " move.b [%1+],$r9\n" \
231 "6: move.b $r9,[%0+]\n", \
232 "7: addq 1,%2\n" \
233 " clear.b [%0+]\n", \
234 " .dword 6b,7b\n")
235
236#define __asm_copy_from_user_8x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
237 __asm_copy_from_user_4x_cont(to, from, ret, \
238 " move.d [%1+],$r9\n" \
239 "4: move.d $r9,[%0+]\n" COPY, \
240 "5: addq 4,%2\n" \
241 " clear.d [%0+]\n" FIXUP, \
242 " .dword 4b,5b\n" TENTRY)
243
244#define __asm_copy_from_user_8(to, from, ret) \
245 __asm_copy_from_user_8x_cont(to, from, ret, "", "", "")
246
247#define __asm_copy_from_user_9(to, from, ret) \
248 __asm_copy_from_user_8x_cont(to, from, ret, \
249 " move.b [%1+],$r9\n" \
250 "6: move.b $r9,[%0+]\n", \
251 "7: addq 1,%2\n" \
252 " clear.b [%0+]\n", \
253 " .dword 6b,7b\n")
254
255#define __asm_copy_from_user_10x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
256 __asm_copy_from_user_8x_cont(to, from, ret, \
257 " move.w [%1+],$r9\n" \
258 "6: move.w $r9,[%0+]\n" COPY, \
259 "7: addq 2,%2\n" \
260 " clear.w [%0+]\n" FIXUP, \
261 " .dword 6b,7b\n" TENTRY)
262
263#define __asm_copy_from_user_10(to, from, ret) \
264 __asm_copy_from_user_10x_cont(to, from, ret, "", "", "")
265
266#define __asm_copy_from_user_11(to, from, ret) \
267 __asm_copy_from_user_10x_cont(to, from, ret, \
268 " move.b [%1+],$r9\n" \
269 "8: move.b $r9,[%0+]\n", \
270 "9: addq 1,%2\n" \
271 " clear.b [%0+]\n", \
272 " .dword 8b,9b\n")
273
274#define __asm_copy_from_user_12x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
275 __asm_copy_from_user_8x_cont(to, from, ret, \
276 " move.d [%1+],$r9\n" \
277 "6: move.d $r9,[%0+]\n" COPY, \
278 "7: addq 4,%2\n" \
279 " clear.d [%0+]\n" FIXUP, \
280 " .dword 6b,7b\n" TENTRY)
281
282#define __asm_copy_from_user_12(to, from, ret) \
283 __asm_copy_from_user_12x_cont(to, from, ret, "", "", "")
284
285#define __asm_copy_from_user_13(to, from, ret) \
286 __asm_copy_from_user_12x_cont(to, from, ret, \
287 " move.b [%1+],$r9\n" \
288 "8: move.b $r9,[%0+]\n", \
289 "9: addq 1,%2\n" \
290 " clear.b [%0+]\n", \
291 " .dword 8b,9b\n")
292
293#define __asm_copy_from_user_14x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
294 __asm_copy_from_user_12x_cont(to, from, ret, \
295 " move.w [%1+],$r9\n" \
296 "8: move.w $r9,[%0+]\n" COPY, \
297 "9: addq 2,%2\n" \
298 " clear.w [%0+]\n" FIXUP, \
299 " .dword 8b,9b\n" TENTRY)
300
301#define __asm_copy_from_user_14(to, from, ret) \
302 __asm_copy_from_user_14x_cont(to, from, ret, "", "", "")
303
304#define __asm_copy_from_user_15(to, from, ret) \
305 __asm_copy_from_user_14x_cont(to, from, ret, \
306 " move.b [%1+],$r9\n" \
307 "10: move.b $r9,[%0+]\n", \
308 "11: addq 1,%2\n" \
309 " clear.b [%0+]\n", \
310 " .dword 10b,11b\n")
311
312#define __asm_copy_from_user_16x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
313 __asm_copy_from_user_12x_cont(to, from, ret, \
314 " move.d [%1+],$r9\n" \
315 "8: move.d $r9,[%0+]\n" COPY, \
316 "9: addq 4,%2\n" \
317 " clear.d [%0+]\n" FIXUP, \
318 " .dword 8b,9b\n" TENTRY)
319
320#define __asm_copy_from_user_16(to, from, ret) \
321 __asm_copy_from_user_16x_cont(to, from, ret, "", "", "")
322
323#define __asm_copy_from_user_20x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
324 __asm_copy_from_user_16x_cont(to, from, ret, \
325 " move.d [%1+],$r9\n" \
326 "10: move.d $r9,[%0+]\n" COPY, \
327 "11: addq 4,%2\n" \
328 " clear.d [%0+]\n" FIXUP, \
329 " .dword 10b,11b\n" TENTRY)
330
331#define __asm_copy_from_user_20(to, from, ret) \
332 __asm_copy_from_user_20x_cont(to, from, ret, "", "", "")
333
334#define __asm_copy_from_user_24x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
335 __asm_copy_from_user_20x_cont(to, from, ret, \
336 " move.d [%1+],$r9\n" \
337 "12: move.d $r9,[%0+]\n" COPY, \
338 "13: addq 4,%2\n" \
339 " clear.d [%0+]\n" FIXUP, \
340 " .dword 12b,13b\n" TENTRY)
341
342#define __asm_copy_from_user_24(to, from, ret) \
343 __asm_copy_from_user_24x_cont(to, from, ret, "", "", "")
344
345/* And now, the to-user ones. */
346
347#define __asm_copy_to_user_1(to, from, ret) \
348 __asm_copy_user_cont(to, from, ret, \
349 " move.b [%1+],$r9\n" \
350 " move.b $r9,[%0+]\n2:\n", \
351 "3: addq 1,%2\n", \
352 " .dword 2b,3b\n")
353
354#define __asm_copy_to_user_2x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
355 __asm_copy_user_cont(to, from, ret, \
356 " move.w [%1+],$r9\n" \
357 " move.w $r9,[%0+]\n2:\n" COPY, \
358 "3: addq 2,%2\n" FIXUP, \
359 " .dword 2b,3b\n" TENTRY)
360
361#define __asm_copy_to_user_2(to, from, ret) \
362 __asm_copy_to_user_2x_cont(to, from, ret, "", "", "")
363
364#define __asm_copy_to_user_3(to, from, ret) \
365 __asm_copy_to_user_2x_cont(to, from, ret, \
366 " move.b [%1+],$r9\n" \
367 " move.b $r9,[%0+]\n4:\n", \
368 "5: addq 1,%2\n", \
369 " .dword 4b,5b\n")
370
371#define __asm_copy_to_user_4x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
372 __asm_copy_user_cont(to, from, ret, \
373 " move.d [%1+],$r9\n" \
374 " move.d $r9,[%0+]\n2:\n" COPY, \
375 "3: addq 4,%2\n" FIXUP, \
376 " .dword 2b,3b\n" TENTRY)
377
378#define __asm_copy_to_user_4(to, from, ret) \
379 __asm_copy_to_user_4x_cont(to, from, ret, "", "", "")
380
381#define __asm_copy_to_user_5(to, from, ret) \
382 __asm_copy_to_user_4x_cont(to, from, ret, \
383 " move.b [%1+],$r9\n" \
384 " move.b $r9,[%0+]\n4:\n", \
385 "5: addq 1,%2\n", \
386 " .dword 4b,5b\n")
387
388#define __asm_copy_to_user_6x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
389 __asm_copy_to_user_4x_cont(to, from, ret, \
390 " move.w [%1+],$r9\n" \
391 " move.w $r9,[%0+]\n4:\n" COPY, \
392 "5: addq 2,%2\n" FIXUP, \
393 " .dword 4b,5b\n" TENTRY)
394
395#define __asm_copy_to_user_6(to, from, ret) \
396 __asm_copy_to_user_6x_cont(to, from, ret, "", "", "")
397
398#define __asm_copy_to_user_7(to, from, ret) \
399 __asm_copy_to_user_6x_cont(to, from, ret, \
400 " move.b [%1+],$r9\n" \
401 " move.b $r9,[%0+]\n6:\n", \
402 "7: addq 1,%2\n", \
403 " .dword 6b,7b\n")
404
405#define __asm_copy_to_user_8x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
406 __asm_copy_to_user_4x_cont(to, from, ret, \
407 " move.d [%1+],$r9\n" \
408 " move.d $r9,[%0+]\n4:\n" COPY, \
409 "5: addq 4,%2\n" FIXUP, \
410 " .dword 4b,5b\n" TENTRY)
411
412#define __asm_copy_to_user_8(to, from, ret) \
413 __asm_copy_to_user_8x_cont(to, from, ret, "", "", "")
414
415#define __asm_copy_to_user_9(to, from, ret) \
416 __asm_copy_to_user_8x_cont(to, from, ret, \
417 " move.b [%1+],$r9\n" \
418 " move.b $r9,[%0+]\n6:\n", \
419 "7: addq 1,%2\n", \
420 " .dword 6b,7b\n")
421
422#define __asm_copy_to_user_10x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
423 __asm_copy_to_user_8x_cont(to, from, ret, \
424 " move.w [%1+],$r9\n" \
425 " move.w $r9,[%0+]\n6:\n" COPY, \
426 "7: addq 2,%2\n" FIXUP, \
427 " .dword 6b,7b\n" TENTRY)
428
429#define __asm_copy_to_user_10(to, from, ret) \
430 __asm_copy_to_user_10x_cont(to, from, ret, "", "", "")
431
432#define __asm_copy_to_user_11(to, from, ret) \
433 __asm_copy_to_user_10x_cont(to, from, ret, \
434 " move.b [%1+],$r9\n" \
435 " move.b $r9,[%0+]\n8:\n", \
436 "9: addq 1,%2\n", \
437 " .dword 8b,9b\n")
438
439#define __asm_copy_to_user_12x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
440 __asm_copy_to_user_8x_cont(to, from, ret, \
441 " move.d [%1+],$r9\n" \
442 " move.d $r9,[%0+]\n6:\n" COPY, \
443 "7: addq 4,%2\n" FIXUP, \
444 " .dword 6b,7b\n" TENTRY)
445
446#define __asm_copy_to_user_12(to, from, ret) \
447 __asm_copy_to_user_12x_cont(to, from, ret, "", "", "")
448
449#define __asm_copy_to_user_13(to, from, ret) \
450 __asm_copy_to_user_12x_cont(to, from, ret, \
451 " move.b [%1+],$r9\n" \
452 " move.b $r9,[%0+]\n8:\n", \
453 "9: addq 1,%2\n", \
454 " .dword 8b,9b\n")
455
456#define __asm_copy_to_user_14x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
457 __asm_copy_to_user_12x_cont(to, from, ret, \
458 " move.w [%1+],$r9\n" \
459 " move.w $r9,[%0+]\n8:\n" COPY, \
460 "9: addq 2,%2\n" FIXUP, \
461 " .dword 8b,9b\n" TENTRY)
462
463#define __asm_copy_to_user_14(to, from, ret) \
464 __asm_copy_to_user_14x_cont(to, from, ret, "", "", "")
465
466#define __asm_copy_to_user_15(to, from, ret) \
467 __asm_copy_to_user_14x_cont(to, from, ret, \
468 " move.b [%1+],$r9\n" \
469 " move.b $r9,[%0+]\n10:\n", \
470 "11: addq 1,%2\n", \
471 " .dword 10b,11b\n")
472
473#define __asm_copy_to_user_16x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
474 __asm_copy_to_user_12x_cont(to, from, ret, \
475 " move.d [%1+],$r9\n" \
476 " move.d $r9,[%0+]\n8:\n" COPY, \
477 "9: addq 4,%2\n" FIXUP, \
478 " .dword 8b,9b\n" TENTRY)
479
480#define __asm_copy_to_user_16(to, from, ret) \
481 __asm_copy_to_user_16x_cont(to, from, ret, "", "", "")
482
483#define __asm_copy_to_user_20x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
484 __asm_copy_to_user_16x_cont(to, from, ret, \
485 " move.d [%1+],$r9\n" \
486 " move.d $r9,[%0+]\n10:\n" COPY, \
487 "11: addq 4,%2\n" FIXUP, \
488 " .dword 10b,11b\n" TENTRY)
489
490#define __asm_copy_to_user_20(to, from, ret) \
491 __asm_copy_to_user_20x_cont(to, from, ret, "", "", "")
492
493#define __asm_copy_to_user_24x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
494 __asm_copy_to_user_20x_cont(to, from, ret, \
495 " move.d [%1+],$r9\n" \
496 " move.d $r9,[%0+]\n12:\n" COPY, \
497 "13: addq 4,%2\n" FIXUP, \
498 " .dword 12b,13b\n" TENTRY)
499
500#define __asm_copy_to_user_24(to, from, ret) \
501 __asm_copy_to_user_24x_cont(to, from, ret, "", "", "")
502
503/* Define a few clearing asms with exception handlers. */
504
505/* This frame-asm is like the __asm_copy_user_cont one, but has one less
506 input. */
507
508#define __asm_clear(to, ret, CLEAR, FIXUP, TENTRY) \
509 __asm__ __volatile__ ( \
510 CLEAR \
511 "1:\n" \
512 " .section .fixup,\"ax\"\n" \
513 FIXUP \
514 " jump 1b\n" \
515 " .previous\n" \
516 " .section __ex_table,\"a\"\n" \
517 TENTRY \
518 " .previous" \
519 : "=r" (to), "=r" (ret) \
520 : "0" (to), "1" (ret) \
521 : "memory")
522
523#define __asm_clear_1(to, ret) \
524 __asm_clear(to, ret, \
525 " clear.b [%0+]\n2:\n", \
526 "3: addq 1,%1\n", \
527 " .dword 2b,3b\n")
528
529#define __asm_clear_2(to, ret) \
530 __asm_clear(to, ret, \
531 " clear.w [%0+]\n2:\n", \
532 "3: addq 2,%1\n", \
533 " .dword 2b,3b\n")
534
535#define __asm_clear_3(to, ret) \
536 __asm_clear(to, ret, \
537 " clear.w [%0+]\n" \
538 "2: clear.b [%0+]\n3:\n", \
539 "4: addq 2,%1\n" \
540 "5: addq 1,%1\n", \
541 " .dword 2b,4b\n" \
542 " .dword 3b,5b\n")
543
544#define __asm_clear_4x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
545 __asm_clear(to, ret, \
546 " clear.d [%0+]\n2:\n" CLEAR, \
547 "3: addq 4,%1\n" FIXUP, \
548 " .dword 2b,3b\n" TENTRY)
549
550#define __asm_clear_4(to, ret) \
551 __asm_clear_4x_cont(to, ret, "", "", "")
552
553#define __asm_clear_8x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
554 __asm_clear_4x_cont(to, ret, \
555 " clear.d [%0+]\n4:\n" CLEAR, \
556 "5: addq 4,%1\n" FIXUP, \
557 " .dword 4b,5b\n" TENTRY)
558
559#define __asm_clear_8(to, ret) \
560 __asm_clear_8x_cont(to, ret, "", "", "")
561
562#define __asm_clear_12x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
563 __asm_clear_8x_cont(to, ret, \
564 " clear.d [%0+]\n6:\n" CLEAR, \
565 "7: addq 4,%1\n" FIXUP, \
566 " .dword 6b,7b\n" TENTRY)
567
568#define __asm_clear_12(to, ret) \
569 __asm_clear_12x_cont(to, ret, "", "", "")
570
571#define __asm_clear_16x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
572 __asm_clear_12x_cont(to, ret, \
573 " clear.d [%0+]\n8:\n" CLEAR, \
574 "9: addq 4,%1\n" FIXUP, \
575 " .dword 8b,9b\n" TENTRY)
576
577#define __asm_clear_16(to, ret) \
578 __asm_clear_16x_cont(to, ret, "", "", "")
579
580#define __asm_clear_20x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
581 __asm_clear_16x_cont(to, ret, \
582 " clear.d [%0+]\n10:\n" CLEAR, \
583 "11: addq 4,%1\n" FIXUP, \
584 " .dword 10b,11b\n" TENTRY)
585
586#define __asm_clear_20(to, ret) \
587 __asm_clear_20x_cont(to, ret, "", "", "")
588
589#define __asm_clear_24x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
590 __asm_clear_20x_cont(to, ret, \
591 " clear.d [%0+]\n12:\n" CLEAR, \
592 "13: addq 4,%1\n" FIXUP, \
593 " .dword 12b,13b\n" TENTRY)
594
595#define __asm_clear_24(to, ret) \
596 __asm_clear_24x_cont(to, ret, "", "", "")
597
598/*
599 * Return the size of a string (including the ending 0)
600 *
601 * Return length of string in userspace including terminating 0
602 * or 0 for error. Return a value greater than N if too long.
603 */
604
605static inline long
606strnlen_user(const char *s, long n)
607{
608 long res, tmp1;
609
610 if (!access_ok(VERIFY_READ, s, 0))
611 return 0;
612
613 /*
614 * This code is deduced from:
615 *
616 * tmp1 = n;
617 * while (tmp1-- > 0 && *s++)
618 * ;
619 *
620 * res = n - tmp1;
621 *
622 * (with tweaks).
623 */
624
625 __asm__ __volatile__ (
626 " move.d %1,$r9\n"
627 "0:\n"
628 " ble 1f\n"
629 " subq 1,$r9\n"
630
631 " test.b [%0+]\n"
632 " bne 0b\n"
633 " test.d $r9\n"
634 "1:\n"
635 " move.d %1,%0\n"
636 " sub.d $r9,%0\n"
637 "2:\n"
638 " .section .fixup,\"ax\"\n"
639
640 "3: clear.d %0\n"
641 " jump 2b\n"
642
643 /* There's one address for a fault at the first move, and
644 two possible PC values for a fault at the second move,
645 being a delay-slot filler. However, the branch-target
646 for the second move is the same as the first address.
647 Just so you don't get confused... */
648 " .previous\n"
649 " .section __ex_table,\"a\"\n"
650 " .dword 0b,3b\n"
651 " .dword 1b,3b\n"
652 " .previous\n"
653 : "=r" (res), "=r" (tmp1)
654 : "0" (s), "1" (n)
655 : "r9");
656
657 return res;
658}
659
660#endif
diff --git a/include/asm-cris/arch-v10/unistd.h b/include/asm-cris/arch-v10/unistd.h
deleted file mode 100644
index d1a38b9e6264..000000000000
--- a/include/asm-cris/arch-v10/unistd.h
+++ /dev/null
@@ -1,148 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_UNISTD_H_
2#define _ASM_CRIS_ARCH_UNISTD_H_
3
4/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
5/*
6 * Don't remove the .ifnc tests; they are an insurance against
7 * any hard-to-spot gcc register allocation bugs.
8 */
9#define _syscall0(type,name) \
10type name(void) \
11{ \
12 register long __a __asm__ ("r10"); \
13 register long __n_ __asm__ ("r9") = (__NR_##name); \
14 __asm__ __volatile__ (".ifnc %0%1,$r10$r9\n\t" \
15 ".err\n\t" \
16 ".endif\n\t" \
17 "break 13" \
18 : "=r" (__a) \
19 : "r" (__n_)); \
20 if (__a >= 0) \
21 return (type) __a; \
22 errno = -__a; \
23 return (type) -1; \
24}
25
26#define _syscall1(type,name,type1,arg1) \
27type name(type1 arg1) \
28{ \
29 register long __a __asm__ ("r10") = (long) arg1; \
30 register long __n_ __asm__ ("r9") = (__NR_##name); \
31 __asm__ __volatile__ (".ifnc %0%1,$r10$r9\n\t" \
32 ".err\n\t" \
33 ".endif\n\t" \
34 "break 13" \
35 : "=r" (__a) \
36 : "r" (__n_), "0" (__a)); \
37 if (__a >= 0) \
38 return (type) __a; \
39 errno = -__a; \
40 return (type) -1; \
41}
42
43#define _syscall2(type,name,type1,arg1,type2,arg2) \
44type name(type1 arg1,type2 arg2) \
45{ \
46 register long __a __asm__ ("r10") = (long) arg1; \
47 register long __b __asm__ ("r11") = (long) arg2; \
48 register long __n_ __asm__ ("r9") = (__NR_##name); \
49 __asm__ __volatile__ (".ifnc %0%1%3,$r10$r9$r11\n\t" \
50 ".err\n\t" \
51 ".endif\n\t" \
52 "break 13" \
53 : "=r" (__a) \
54 : "r" (__n_), "0" (__a), "r" (__b)); \
55 if (__a >= 0) \
56 return (type) __a; \
57 errno = -__a; \
58 return (type) -1; \
59}
60
61#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
62type name(type1 arg1,type2 arg2,type3 arg3) \
63{ \
64 register long __a __asm__ ("r10") = (long) arg1; \
65 register long __b __asm__ ("r11") = (long) arg2; \
66 register long __c __asm__ ("r12") = (long) arg3; \
67 register long __n_ __asm__ ("r9") = (__NR_##name); \
68 __asm__ __volatile__ (".ifnc %0%1%3%4,$r10$r9$r11$r12\n\t" \
69 ".err\n\t" \
70 ".endif\n\t" \
71 "break 13" \
72 : "=r" (__a) \
73 : "r" (__n_), "0" (__a), "r" (__b), "r" (__c)); \
74 if (__a >= 0) \
75 return (type) __a; \
76 errno = -__a; \
77 return (type) -1; \
78}
79
80#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
81type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
82{ \
83 register long __a __asm__ ("r10") = (long) arg1; \
84 register long __b __asm__ ("r11") = (long) arg2; \
85 register long __c __asm__ ("r12") = (long) arg3; \
86 register long __d __asm__ ("r13") = (long) arg4; \
87 register long __n_ __asm__ ("r9") = (__NR_##name); \
88 __asm__ __volatile__ (".ifnc %0%1%3%4%5,$r10$r9$r11$r12$r13\n\t" \
89 ".err\n\t" \
90 ".endif\n\t" \
91 "break 13" \
92 : "=r" (__a) \
93 : "r" (__n_), "0" (__a), "r" (__b), \
94 "r" (__c), "r" (__d)); \
95 if (__a >= 0) \
96 return (type) __a; \
97 errno = -__a; \
98 return (type) -1; \
99}
100
101#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
102 type5,arg5) \
103type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
104{ \
105 register long __a __asm__ ("r10") = (long) arg1; \
106 register long __b __asm__ ("r11") = (long) arg2; \
107 register long __c __asm__ ("r12") = (long) arg3; \
108 register long __d __asm__ ("r13") = (long) arg4; \
109 register long __n_ __asm__ ("r9") = (__NR_##name); \
110 __asm__ __volatile__ (".ifnc %0%1%3%4%5,$r10$r9$r11$r12$r13\n\t" \
111 ".err\n\t" \
112 ".endif\n\t" \
113 "move %6,$mof\n\t" \
114 "break 13" \
115 : "=r" (__a) \
116 : "r" (__n_), "0" (__a), "r" (__b), \
117 "r" (__c), "r" (__d), "g" (arg5)); \
118 if (__a >= 0) \
119 return (type) __a; \
120 errno = -__a; \
121 return (type) -1; \
122}
123
124#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
125 type5,arg5,type6,arg6) \
126type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
127{ \
128 register long __a __asm__ ("r10") = (long) arg1; \
129 register long __b __asm__ ("r11") = (long) arg2; \
130 register long __c __asm__ ("r12") = (long) arg3; \
131 register long __d __asm__ ("r13") = (long) arg4; \
132 register long __n_ __asm__ ("r9") = (__NR_##name); \
133 __asm__ __volatile__ (".ifnc %0%1%3%4%5,$r10$r9$r11$r12$r13\n\t" \
134 ".err\n\t" \
135 ".endif\n\t" \
136 "move %6,$mof\n\tmove %7,$srp\n\t" \
137 "break 13" \
138 : "=r" (__a) \
139 : "r" (__n_), "0" (__a), "r" (__b), \
140 "r" (__c), "r" (__d), "g" (arg5), "g" (arg6)\
141 : "srp"); \
142 if (__a >= 0) \
143 return (type) __a; \
144 errno = -__a; \
145 return (type) -1; \
146}
147
148#endif
diff --git a/include/asm-cris/arch-v10/user.h b/include/asm-cris/arch-v10/user.h
deleted file mode 100644
index 9303ea77c915..000000000000
--- a/include/asm-cris/arch-v10/user.h
+++ /dev/null
@@ -1,46 +0,0 @@
1#ifndef __ASM_CRIS_ARCH_USER_H
2#define __ASM_CRIS_ARCH_USER_H
3
4/* User mode registers, used for core dumps. In order to keep ELF_NGREG
5 sensible we let all registers be 32 bits. The csr registers are included
6 for future use. */
7struct user_regs_struct {
8 unsigned long r0; /* General registers. */
9 unsigned long r1;
10 unsigned long r2;
11 unsigned long r3;
12 unsigned long r4;
13 unsigned long r5;
14 unsigned long r6;
15 unsigned long r7;
16 unsigned long r8;
17 unsigned long r9;
18 unsigned long r10;
19 unsigned long r11;
20 unsigned long r12;
21 unsigned long r13;
22 unsigned long sp; /* Stack pointer. */
23 unsigned long pc; /* Program counter. */
24 unsigned long p0; /* Constant zero (only 8 bits). */
25 unsigned long vr; /* Version register (only 8 bits). */
26 unsigned long p2; /* Reserved. */
27 unsigned long p3; /* Reserved. */
28 unsigned long p4; /* Constant zero (only 16 bits). */
29 unsigned long ccr; /* Condition code register (only 16 bits). */
30 unsigned long p6; /* Reserved. */
31 unsigned long mof; /* Multiply overflow register. */
32 unsigned long p8; /* Constant zero. */
33 unsigned long ibr; /* Not accessible. */
34 unsigned long irp; /* Not accessible. */
35 unsigned long srp; /* Subroutine return pointer. */
36 unsigned long bar; /* Not accessible. */
37 unsigned long dccr; /* Dword condition code register. */
38 unsigned long brp; /* Not accessible. */
39 unsigned long usp; /* User-mode stack pointer. Same as sp when
40 in user mode. */
41 unsigned long csrinstr; /* Internal status registers. */
42 unsigned long csraddr;
43 unsigned long csrdata;
44};
45
46#endif
diff --git a/include/asm-cris/arch-v32/Kbuild b/include/asm-cris/arch-v32/Kbuild
deleted file mode 100644
index 35f2fc4f993e..000000000000
--- a/include/asm-cris/arch-v32/Kbuild
+++ /dev/null
@@ -1,2 +0,0 @@
1header-y += user.h
2header-y += cryptocop.h
diff --git a/include/asm-cris/arch-v32/arbiter.h b/include/asm-cris/arch-v32/arbiter.h
deleted file mode 100644
index 081a911d7af1..000000000000
--- a/include/asm-cris/arch-v32/arbiter.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_ARBITER_H
2#define _ASM_CRIS_ARCH_ARBITER_H
3
4#define EXT_REGION 0
5#define INT_REGION 1
6
7typedef void (watch_callback)(void);
8
9enum
10{
11 arbiter_all_dmas = 0x3ff,
12 arbiter_cpu = 0xc00,
13 arbiter_all_clients = 0x3fff
14};
15
16enum
17{
18 arbiter_all_read = 0x55,
19 arbiter_all_write = 0xaa,
20 arbiter_all_accesses = 0xff
21};
22
23int crisv32_arbiter_allocate_bandwidth(int client, int region,
24 unsigned long bandwidth);
25int crisv32_arbiter_watch(unsigned long start, unsigned long size,
26 unsigned long clients, unsigned long accesses,
27 watch_callback* cb);
28int crisv32_arbiter_unwatch(int id);
29
30#endif
diff --git a/include/asm-cris/arch-v32/atomic.h b/include/asm-cris/arch-v32/atomic.h
deleted file mode 100644
index 852ceff8013f..000000000000
--- a/include/asm-cris/arch-v32/atomic.h
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifndef __ASM_CRIS_ARCH_ATOMIC__
2#define __ASM_CRIS_ARCH_ATOMIC__
3
4#include <linux/spinlock_types.h>
5
6extern void cris_spin_unlock(void *l, int val);
7extern void cris_spin_lock(void *l);
8extern int cris_spin_trylock(void* l);
9
10#ifndef CONFIG_SMP
11#define cris_atomic_save(addr, flags) local_irq_save(flags);
12#define cris_atomic_restore(addr, flags) local_irq_restore(flags);
13#else
14
15extern spinlock_t cris_atomic_locks[];
16#define LOCK_COUNT 128
17#define HASH_ADDR(a) (((int)a) & 127)
18
19#define cris_atomic_save(addr, flags) \
20 local_irq_save(flags); \
21 cris_spin_lock((void *)&cris_atomic_locks[HASH_ADDR(addr)].raw_lock.slock);
22
23#define cris_atomic_restore(addr, flags) \
24 { \
25 spinlock_t *lock = (void*)&cris_atomic_locks[HASH_ADDR(addr)]; \
26 __asm__ volatile ("move.d %1,%0" \
27 : "=m" (lock->raw_lock.slock) \
28 : "r" (1) \
29 : "memory"); \
30 local_irq_restore(flags); \
31 }
32
33#endif
34
35#endif
36
diff --git a/include/asm-cris/arch-v32/bitops.h b/include/asm-cris/arch-v32/bitops.h
deleted file mode 100644
index 147689d6b624..000000000000
--- a/include/asm-cris/arch-v32/bitops.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_BITOPS_H
2#define _ASM_CRIS_ARCH_BITOPS_H
3
4/*
5 * Helper functions for the core of the ff[sz] functions. They compute the
6 * number of leading zeroes of a bits-in-byte, byte-in-word and
7 * word-in-dword-swapped number. They differ in that the first function also
8 * inverts all bits in the input.
9 */
10
11static inline unsigned long
12cris_swapnwbrlz(unsigned long w)
13{
14 unsigned long res;
15
16 __asm__ __volatile__ ("swapnwbr %0\n\t"
17 "lz %0,%0"
18 : "=r" (res) : "0" (w));
19
20 return res;
21}
22
23static inline unsigned long
24cris_swapwbrlz(unsigned long w)
25{
26 unsigned long res;
27
28 __asm__ __volatile__ ("swapwbr %0\n\t"
29 "lz %0,%0"
30 : "=r" (res) : "0" (w));
31
32 return res;
33}
34
35/*
36 * Find First Zero in word. Undefined if no zero exist, so the caller should
37 * check against ~0 first.
38 */
39static inline unsigned long
40ffz(unsigned long w)
41{
42 return cris_swapnwbrlz(w);
43}
44
45/*
46 * Find First Set bit in word. Undefined if no 1 exist, so the caller
47 * should check against 0 first.
48 */
49static inline unsigned long
50__ffs(unsigned long w)
51{
52 return cris_swapnwbrlz(~w);
53}
54
55/*
56 * Find First Bit that is set.
57 */
58static inline unsigned long
59kernel_ffs(unsigned long w)
60{
61 return w ? cris_swapwbrlz (w) + 1 : 0;
62}
63
64#endif /* _ASM_CRIS_ARCH_BITOPS_H */
diff --git a/include/asm-cris/arch-v32/bug.h b/include/asm-cris/arch-v32/bug.h
deleted file mode 100644
index 0f211e135248..000000000000
--- a/include/asm-cris/arch-v32/bug.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __ASM_CRISv32_ARCH_BUG_H
2#define __ASM_CRISv32_ARCH_BUG_H
3
4#include <linux/stringify.h>
5
6#ifdef CONFIG_BUG
7#ifdef CONFIG_DEBUG_BUGVERBOSE
8/*
9 * The penalty for the in-band code path will be the size of break 14.
10 * All other stuff is done out-of-band with exception handlers.
11 */
12#define BUG() \
13 __asm__ __volatile__ ("0: break 14\n\t" \
14 ".section .fixup,\"ax\"\n" \
15 "1:\n\t" \
16 "move.d %0, $r10\n\t" \
17 "move.d %1, $r11\n\t" \
18 "jump do_BUG\n\t" \
19 "nop\n\t" \
20 ".previous\n\t" \
21 ".section __ex_table,\"a\"\n\t" \
22 ".dword 0b, 1b\n\t" \
23 ".previous\n\t" \
24 : : "ri" (__FILE__), "i" (__LINE__))
25#else
26#define BUG() __asm__ __volatile__ ("break 14\n\t")
27#endif
28
29#define HAVE_ARCH_BUG
30#endif
31
32#include <asm-generic/bug.h>
33#endif
diff --git a/include/asm-cris/arch-v32/byteorder.h b/include/asm-cris/arch-v32/byteorder.h
deleted file mode 100644
index 6ef8fb4a35f2..000000000000
--- a/include/asm-cris/arch-v32/byteorder.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_BYTEORDER_H
2#define _ASM_CRIS_ARCH_BYTEORDER_H
3
4#include <asm/types.h>
5
6static inline __const__ __u32
7___arch__swab32(__u32 x)
8{
9 __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x));
10 return (x);
11}
12
13static inline __const__ __u16
14___arch__swab16(__u16 x)
15{
16 __asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x));
17 return (x);
18}
19
20#endif /* _ASM_CRIS_ARCH_BYTEORDER_H */
diff --git a/include/asm-cris/arch-v32/cache.h b/include/asm-cris/arch-v32/cache.h
deleted file mode 100644
index b3d752dfe15b..000000000000
--- a/include/asm-cris/arch-v32/cache.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_CACHE_H
2#define _ASM_CRIS_ARCH_CACHE_H
3
4#include <asm/arch/hwregs/dma.h>
5
6/* A cache-line is 32 bytes. */
7#define L1_CACHE_BYTES 32
8#define L1_CACHE_SHIFT 5
9
10void flush_dma_list(dma_descr_data *descr);
11void flush_dma_descr(dma_descr_data *descr, int flush_buf);
12
13#define flush_dma_context(c) \
14 flush_dma_list(phys_to_virt((c)->saved_data));
15
16void cris_flush_cache_range(void *buf, unsigned long len);
17void cris_flush_cache(void);
18
19#endif /* _ASM_CRIS_ARCH_CACHE_H */
diff --git a/include/asm-cris/arch-v32/checksum.h b/include/asm-cris/arch-v32/checksum.h
deleted file mode 100644
index e5dcfce6e0dc..000000000000
--- a/include/asm-cris/arch-v32/checksum.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_CHECKSUM_H
2#define _ASM_CRIS_ARCH_CHECKSUM_H
3
4/*
5 * Check values used in TCP/UDP headers.
6 *
7 * The gain of doing this in assembler instead of C, is that C doesn't
8 * generate carry-additions for the 32-bit components of the
9 * checksum. Which means it would be necessary to split all those into
10 * 16-bit components and then add.
11 */
12static inline __wsum
13csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
14 unsigned short len, unsigned short proto, __wsum sum)
15{
16 __wsum res;
17
18 __asm__ __volatile__ ("add.d %2, %0\n\t"
19 "addc %3, %0\n\t"
20 "addc %4, %0\n\t"
21 "addc 0, %0\n\t"
22 : "=r" (res)
23 : "0" (sum), "r" (daddr), "r" (saddr), \
24 "r" ((len + proto) << 8));
25
26 return res;
27}
28
29#endif /* _ASM_CRIS_ARCH_CHECKSUM_H */
diff --git a/include/asm-cris/arch-v32/cryptocop.h b/include/asm-cris/arch-v32/cryptocop.h
deleted file mode 100644
index dfa1f66fb987..000000000000
--- a/include/asm-cris/arch-v32/cryptocop.h
+++ /dev/null
@@ -1,272 +0,0 @@
1/*
2 * The device /dev/cryptocop is accessible using this driver using
3 * CRYPTOCOP_MAJOR (254) and minor number 0.
4 */
5
6#ifndef CRYPTOCOP_H
7#define CRYPTOCOP_H
8
9#include <linux/uio.h>
10
11
12#define CRYPTOCOP_SESSION_ID_NONE (0)
13
14typedef unsigned long long int cryptocop_session_id;
15
16/* cryptocop ioctls */
17#define ETRAXCRYPTOCOP_IOCTYPE (250)
18
19#define CRYPTOCOP_IO_CREATE_SESSION _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 1, struct strcop_session_op)
20#define CRYPTOCOP_IO_CLOSE_SESSION _IOW(ETRAXCRYPTOCOP_IOCTYPE, 2, struct strcop_session_op)
21#define CRYPTOCOP_IO_PROCESS_OP _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 3, struct strcop_crypto_op)
22#define CRYPTOCOP_IO_MAXNR (3)
23
24typedef enum {
25 cryptocop_cipher_des = 0,
26 cryptocop_cipher_3des = 1,
27 cryptocop_cipher_aes = 2,
28 cryptocop_cipher_m2m = 3, /* mem2mem is essentially a NULL cipher with blocklength=1 */
29 cryptocop_cipher_none
30} cryptocop_cipher_type;
31
32typedef enum {
33 cryptocop_digest_sha1 = 0,
34 cryptocop_digest_md5 = 1,
35 cryptocop_digest_none
36} cryptocop_digest_type;
37
38typedef enum {
39 cryptocop_csum_le = 0,
40 cryptocop_csum_be = 1,
41 cryptocop_csum_none
42} cryptocop_csum_type;
43
44typedef enum {
45 cryptocop_cipher_mode_ecb = 0,
46 cryptocop_cipher_mode_cbc,
47 cryptocop_cipher_mode_none
48} cryptocop_cipher_mode;
49
50typedef enum {
51 cryptocop_3des_eee = 0,
52 cryptocop_3des_eed = 1,
53 cryptocop_3des_ede = 2,
54 cryptocop_3des_edd = 3,
55 cryptocop_3des_dee = 4,
56 cryptocop_3des_ded = 5,
57 cryptocop_3des_dde = 6,
58 cryptocop_3des_ddd = 7
59} cryptocop_3des_mode;
60
61/* Usermode accessible (ioctl) operations. */
62struct strcop_session_op{
63 cryptocop_session_id ses_id;
64
65 cryptocop_cipher_type cipher; /* AES, DES, 3DES, m2m, none */
66
67 cryptocop_cipher_mode cmode; /* ECB, CBC, none */
68 cryptocop_3des_mode des3_mode;
69
70 cryptocop_digest_type digest; /* MD5, SHA1, none */
71
72 cryptocop_csum_type csum; /* BE, LE, none */
73
74 unsigned char *key;
75 size_t keylen;
76};
77
78#define CRYPTOCOP_CSUM_LENGTH (2)
79#define CRYPTOCOP_MAX_DIGEST_LENGTH (20) /* SHA-1 20, MD5 16 */
80#define CRYPTOCOP_MAX_IV_LENGTH (16) /* (3)DES==8, AES == 16 */
81#define CRYPTOCOP_MAX_KEY_LENGTH (32)
82
83struct strcop_crypto_op{
84 cryptocop_session_id ses_id;
85
86 /* Indata. */
87 unsigned char *indata;
88 size_t inlen; /* Total indata length. */
89
90 /* Cipher configuration. */
91 unsigned char do_cipher:1;
92 unsigned char decrypt:1; /* 1 == decrypt, 0 == encrypt */
93 unsigned char cipher_explicit:1;
94 size_t cipher_start;
95 size_t cipher_len;
96 /* cipher_iv is used if do_cipher and cipher_explicit and the cipher
97 mode is CBC. The length is controlled by the type of cipher,
98 e.g. DES/3DES 8 octets and AES 16 octets. */
99 unsigned char cipher_iv[CRYPTOCOP_MAX_IV_LENGTH];
100 /* Outdata. */
101 unsigned char *cipher_outdata;
102 size_t cipher_outlen;
103
104 /* digest configuration. */
105 unsigned char do_digest:1;
106 size_t digest_start;
107 size_t digest_len;
108 /* Outdata. The actual length is determined by the type of the digest. */
109 unsigned char digest[CRYPTOCOP_MAX_DIGEST_LENGTH];
110
111 /* Checksum configuration. */
112 unsigned char do_csum:1;
113 size_t csum_start;
114 size_t csum_len;
115 /* Outdata. */
116 unsigned char csum[CRYPTOCOP_CSUM_LENGTH];
117};
118
119
120
121#ifdef __KERNEL__
122
123/********** The API to use from inside the kernel. ************/
124
125#include <asm/arch/hwregs/dma.h>
126
127typedef enum {
128 cryptocop_alg_csum = 0,
129 cryptocop_alg_mem2mem,
130 cryptocop_alg_md5,
131 cryptocop_alg_sha1,
132 cryptocop_alg_des,
133 cryptocop_alg_3des,
134 cryptocop_alg_aes,
135 cryptocop_no_alg,
136} cryptocop_algorithm;
137
138typedef u8 cryptocop_tfrm_id;
139
140
141struct cryptocop_operation;
142
143typedef void (cryptocop_callback)(struct cryptocop_operation*, void*);
144
145struct cryptocop_transform_init {
146 cryptocop_algorithm alg;
147 /* Keydata for ciphers. */
148 unsigned char key[CRYPTOCOP_MAX_KEY_LENGTH];
149 unsigned int keylen;
150 cryptocop_cipher_mode cipher_mode;
151 cryptocop_3des_mode tdes_mode;
152 cryptocop_csum_type csum_mode; /* cryptocop_csum_none is not allowed when alg==cryptocop_alg_csum */
153
154 cryptocop_tfrm_id tid; /* Locally unique in session; assigned by user, checked by driver. */
155 struct cryptocop_transform_init *next;
156};
157
158
159typedef enum {
160 cryptocop_source_dma = 0,
161 cryptocop_source_des,
162 cryptocop_source_3des,
163 cryptocop_source_aes,
164 cryptocop_source_md5,
165 cryptocop_source_sha1,
166 cryptocop_source_csum,
167 cryptocop_source_none,
168} cryptocop_source;
169
170
171struct cryptocop_desc_cfg {
172 cryptocop_tfrm_id tid;
173 cryptocop_source src;
174 unsigned int last:1; /* Last use of this transform in the operation. Will push outdata when encountered. */
175 struct cryptocop_desc_cfg *next;
176};
177
178struct cryptocop_desc {
179 size_t length;
180 struct cryptocop_desc_cfg *cfg;
181 struct cryptocop_desc *next;
182};
183
184
185/* Flags for cryptocop_tfrm_cfg */
186#define CRYPTOCOP_NO_FLAG (0x00)
187#define CRYPTOCOP_ENCRYPT (0x01)
188#define CRYPTOCOP_DECRYPT (0x02)
189#define CRYPTOCOP_EXPLICIT_IV (0x04)
190
191struct cryptocop_tfrm_cfg {
192 cryptocop_tfrm_id tid;
193
194 unsigned int flags; /* DECRYPT, ENCRYPT, EXPLICIT_IV */
195
196 /* CBC initialisation vector for cihers. */
197 u8 iv[CRYPTOCOP_MAX_IV_LENGTH];
198
199 /* The position in output where to write the transform output. The order
200 in which the driver writes the output is unspecified, hence if several
201 transforms write on the same positions in the output the result is
202 unspecified. */
203 size_t inject_ix;
204
205 struct cryptocop_tfrm_cfg *next;
206};
207
208
209
210struct cryptocop_dma_list_operation{
211 /* The consumer can provide DMA lists to send to the co-processor. 'use_dmalists' in
212 struct cryptocop_operation must be set for the driver to use them. outlist,
213 out_data_buf, inlist and in_data_buf must all be physical addresses since they will
214 be loaded to DMA . */
215 dma_descr_data *outlist; /* Out from memory to the co-processor. */
216 char *out_data_buf;
217 dma_descr_data *inlist; /* In from the co-processor to memory. */
218 char *in_data_buf;
219
220 cryptocop_3des_mode tdes_mode;
221 cryptocop_csum_type csum_mode;
222};
223
224
225struct cryptocop_tfrm_operation{
226 /* Operation configuration, if not 'use_dmalists' is set. */
227 struct cryptocop_tfrm_cfg *tfrm_cfg;
228 struct cryptocop_desc *desc;
229
230 struct iovec *indata;
231 size_t incount;
232 size_t inlen; /* Total inlength. */
233
234 struct iovec *outdata;
235 size_t outcount;
236 size_t outlen; /* Total outlength. */
237};
238
239
240struct cryptocop_operation {
241 cryptocop_callback *cb;
242 void *cb_data;
243
244 cryptocop_session_id sid;
245
246 /* The status of the operation when returned to consumer. */
247 int operation_status; /* 0, -EAGAIN */
248
249 /* Flags */
250 unsigned int use_dmalists:1; /* Use outlist and inlist instead of the desc/tfrm_cfg configuration. */
251 unsigned int in_interrupt:1; /* Set if inserting job from interrupt context. */
252 unsigned int fast_callback:1; /* Set if fast callback wanted, i.e. from interrupt context. */
253
254 union{
255 struct cryptocop_dma_list_operation list_op;
256 struct cryptocop_tfrm_operation tfrm_op;
257 };
258};
259
260
261int cryptocop_new_session(cryptocop_session_id *sid, struct cryptocop_transform_init *tinit, int alloc_flag);
262int cryptocop_free_session(cryptocop_session_id sid);
263
264int cryptocop_job_queue_insert_csum(struct cryptocop_operation *operation);
265
266int cryptocop_job_queue_insert_crypto(struct cryptocop_operation *operation);
267
268int cryptocop_job_queue_insert_user_job(struct cryptocop_operation *operation);
269
270#endif /* __KERNEL__ */
271
272#endif /* CRYPTOCOP_H */
diff --git a/include/asm-cris/arch-v32/delay.h b/include/asm-cris/arch-v32/delay.h
deleted file mode 100644
index e9fda03810a9..000000000000
--- a/include/asm-cris/arch-v32/delay.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_DELAY_H
2#define _ASM_CRIS_ARCH_DELAY_H
3
4extern void cris_delay10ns(u32 n10ns);
5#define udelay(u) cris_delay10ns((u)*100)
6#define ndelay(n) cris_delay10ns(((n)+9)/10)
7
8/*
9 * Not used anymore for udelay or ndelay. Referenced by
10 * e.g. init/calibrate.c. All other references are likely bugs;
11 * should be replaced by mdelay, udelay or ndelay.
12 */
13
14static inline void
15__delay(int loops)
16{
17 __asm__ __volatile__ (
18 "move.d %0, $r9\n\t"
19 "beq 2f\n\t"
20 "subq 1, $r9\n\t"
21 "1:\n\t"
22 "bne 1b\n\t"
23 "subq 1, $r9\n"
24 "2:"
25 : : "g" (loops) : "r9");
26}
27
28#endif /* _ASM_CRIS_ARCH_DELAY_H */
diff --git a/include/asm-cris/arch-v32/dma.h b/include/asm-cris/arch-v32/dma.h
deleted file mode 100644
index 3674081389fd..000000000000
--- a/include/asm-cris/arch-v32/dma.h
+++ /dev/null
@@ -1,79 +0,0 @@
1#ifndef _ASM_ARCH_CRIS_DMA_H
2#define _ASM_ARCH_CRIS_DMA_H
3
4/* Defines for using and allocating dma channels. */
5
6#define MAX_DMA_CHANNELS 10
7
8#define NETWORK_ETH0_TX_DMA_NBR 0 /* Ethernet 0 out. */
9#define NETWORK_ETH0 RX_DMA_NBR 1 /* Ethernet 0 in. */
10
11#define IO_PROC_DMA0_TX_DMA_NBR 2 /* IO processor DMA0 out. */
12#define IO_PROC_DMA0_RX_DMA_NBR 3 /* IO processor DMA0 in. */
13
14#define ATA_TX_DMA_NBR 2 /* ATA interface out. */
15#define ATA_RX_DMA_NBR 3 /* ATA interface in. */
16
17#define ASYNC_SER2_TX_DMA_NBR 2 /* Asynchronous serial port 2 out. */
18#define ASYNC_SER2_RX_DMA_NBR 3 /* Asynchronous serial port 2 in. */
19
20#define IO_PROC_DMA1_TX_DMA_NBR 4 /* IO processor DMA1 out. */
21#define IO_PROC_DMA1_RX_DMA_NBR 5 /* IO processor DMA1 in. */
22
23#define ASYNC_SER1_TX_DMA_NBR 4 /* Asynchronous serial port 1 out. */
24#define ASYNC_SER1_RX_DMA_NBR 5 /* Asynchronous serial port 1 in. */
25
26#define SYNC_SER0_TX_DMA_NBR 4 /* Synchronous serial port 0 out. */
27#define SYNC_SER0_RX_DMA_NBR 5 /* Synchronous serial port 0 in. */
28
29#define EXTDMA0_TX_DMA_NBR 6 /* External DMA 0 out. */
30#define EXTDMA1_RX_DMA_NBR 7 /* External DMA 1 in. */
31
32#define ASYNC_SER0_TX_DMA_NBR 6 /* Asynchronous serial port 0 out. */
33#define ASYNC_SER0_RX_DMA_NBR 7 /* Asynchronous serial port 0 in. */
34
35#define SYNC_SER1_TX_DMA_NBR 6 /* Synchronous serial port 1 out. */
36#define SYNC_SER1_RX_DMA_NBR 7 /* Synchronous serial port 1 in. */
37
38#define NETWORK_ETH1_TX_DMA_NBR 6 /* Ethernet 1 out. */
39#define NETWORK_ETH1_RX_DMA_NBR 7 /* Ethernet 1 in. */
40
41#define EXTDMA2_TX_DMA_NBR 8 /* External DMA 2 out. */
42#define EXTDMA3_RX_DMA_NBR 9 /* External DMA 3 in. */
43
44#define STRCOP_TX_DMA_NBR 8 /* Stream co-processor out. */
45#define STRCOP_RX_DMA_NBR 9 /* Stream co-processor in. */
46
47#define ASYNC_SER3_TX_DMA_NBR 8 /* Asynchronous serial port 3 out. */
48#define ASYNC_SER3_RX_DMA_NBR 9 /* Asynchronous serial port 3 in. */
49
50enum dma_owner
51{
52 dma_eth0,
53 dma_eth1,
54 dma_iop0,
55 dma_iop1,
56 dma_ser0,
57 dma_ser1,
58 dma_ser2,
59 dma_ser3,
60 dma_sser0,
61 dma_sser1,
62 dma_ata,
63 dma_strp,
64 dma_ext0,
65 dma_ext1,
66 dma_ext2,
67 dma_ext3
68};
69
70int crisv32_request_dma(unsigned int dmanr, const char * device_id,
71 unsigned options, unsigned bandwidth, enum dma_owner owner);
72void crisv32_free_dma(unsigned int dmanr);
73
74/* Masks used by crisv32_request_dma options: */
75#define DMA_VERBOSE_ON_ERROR 1
76#define DMA_PANIC_ON_ERROR (2|DMA_VERBOSE_ON_ERROR)
77#define DMA_INT_MEM 4
78
79#endif /* _ASM_ARCH_CRIS_DMA_H */
diff --git a/include/asm-cris/arch-v32/elf.h b/include/asm-cris/arch-v32/elf.h
deleted file mode 100644
index 1324e505a4d8..000000000000
--- a/include/asm-cris/arch-v32/elf.h
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifndef _ASM_CRIS_ELF_H
2#define _ASM_CRIS_ELF_H
3
4#define ELF_CORE_EFLAGS EF_CRIS_VARIANT_V32
5
6/*
7 * This is used to ensure we don't load something for the wrong architecture.
8 */
9#define elf_check_arch(x) \
10 ((x)->e_machine == EM_CRIS \
11 && ((((x)->e_flags & EF_CRIS_VARIANT_MASK) == EF_CRIS_VARIANT_V32 \
12 || (((x)->e_flags & EF_CRIS_VARIANT_MASK) == EF_CRIS_VARIANT_COMMON_V10_V32))))
13
14/* CRISv32 ELF register definitions. */
15
16#include <asm/ptrace.h>
17
18/* Explicitly zero out registers to increase determinism. */
19#define ELF_PLAT_INIT(_r, load_addr) do { \
20 (_r)->r13 = 0; (_r)->r12 = 0; (_r)->r11 = 0; (_r)->r10 = 0; \
21 (_r)->r9 = 0; (_r)->r8 = 0; (_r)->r7 = 0; (_r)->r6 = 0; \
22 (_r)->r5 = 0; (_r)->r4 = 0; (_r)->r3 = 0; (_r)->r2 = 0; \
23 (_r)->r1 = 0; (_r)->r0 = 0; (_r)->mof = 0; (_r)->srp = 0; \
24 (_r)->acr = 0; \
25} while (0)
26
27/*
28 * An executable for which elf_read_implies_exec() returns TRUE will
29 * have the READ_IMPLIES_EXEC personality flag set automatically.
30 */
31#define elf_read_implies_exec_binary(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
32
33/*
34 * This is basically a pt_regs with the additional definition
35 * of the stack pointer since it's needed in a core dump.
36 * pr_regs is a elf_gregset_t and should be filled according
37 * to the layout of user_regs_struct.
38 */
39#define ELF_CORE_COPY_REGS(pr_reg, regs) \
40 pr_reg[0] = regs->r0; \
41 pr_reg[1] = regs->r1; \
42 pr_reg[2] = regs->r2; \
43 pr_reg[3] = regs->r3; \
44 pr_reg[4] = regs->r4; \
45 pr_reg[5] = regs->r5; \
46 pr_reg[6] = regs->r6; \
47 pr_reg[7] = regs->r7; \
48 pr_reg[8] = regs->r8; \
49 pr_reg[9] = regs->r9; \
50 pr_reg[10] = regs->r10; \
51 pr_reg[11] = regs->r11; \
52 pr_reg[12] = regs->r12; \
53 pr_reg[13] = regs->r13; \
54 pr_reg[14] = rdusp(); /* SP */ \
55 pr_reg[15] = regs->acr; /* ACR */ \
56 pr_reg[16] = 0; /* BZ */ \
57 pr_reg[17] = rdvr(); /* VR */ \
58 pr_reg[18] = 0; /* PID */ \
59 pr_reg[19] = regs->srs; /* SRS */ \
60 pr_reg[20] = 0; /* WZ */ \
61 pr_reg[21] = regs->exs; /* EXS */ \
62 pr_reg[22] = regs->eda; /* EDA */ \
63 pr_reg[23] = regs->mof; /* MOF */ \
64 pr_reg[24] = 0; /* DZ */ \
65 pr_reg[25] = 0; /* EBP */ \
66 pr_reg[26] = regs->erp; /* ERP */ \
67 pr_reg[27] = regs->srp; /* SRP */ \
68 pr_reg[28] = 0; /* NRP */ \
69 pr_reg[29] = regs->ccs; /* CCS */ \
70 pr_reg[30] = rdusp(); /* USP */ \
71 pr_reg[31] = regs->spc; /* SPC */ \
72
73#endif /* _ASM_CRIS_ELF_H */
diff --git a/include/asm-cris/arch-v32/hwregs/Makefile b/include/asm-cris/arch-v32/hwregs/Makefile
deleted file mode 100644
index f9a05d2aa061..000000000000
--- a/include/asm-cris/arch-v32/hwregs/Makefile
+++ /dev/null
@@ -1,186 +0,0 @@
1# Makefile to generate or copy the latest register definitions
2# and related datastructures and helpermacros.
3# The offical place for these files is at:
4RELEASE ?= r1_alfa5
5OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/
6
7# which is updated on each new release.
8INCL_ASMFILES =
9INCL_FILES = ata_defs.h
10INCL_FILES += bif_core_defs.h
11INCL_ASMFILES += bif_core_defs_asm.h
12INCL_FILES += bif_slave_defs.h
13#INCL_FILES += bif_slave_ext_defs.h
14INCL_FILES += config_defs.h
15INCL_ASMFILES += config_defs_asm.h
16INCL_FILES += cpu_vect.h
17#INCL_FILES += cris_defs.h
18#INCL_FILES += cris_supp_reg.h # In handcrafted supp_reg.h
19INCL_FILES += dma.h
20INCL_FILES += dma_defs.h
21INCL_FILES += eth_defs.h
22INCL_FILES += extmem_defs.h
23INCL_FILES += gio_defs.h
24INCL_ASMFILES += gio_defs_asm.h
25INCL_FILES += intr_vect.h
26INCL_FILES += intr_vect_defs.h
27INCL_ASMFILES += intr_vect_defs_asm.h
28INCL_FILES += marb_bp_defs.h
29INCL_FILES += marb_defs.h
30INCL_ASMFILES += mmu_defs_asm.h
31#INCL_FILES += mmu_supp_reg.h # In handcrafted supp_reg.h
32#INCL_FILES += par_defs.h # No useful content
33INCL_FILES += pinmux_defs.h
34INCL_FILES += reg_map.h
35INCL_ASMFILES += reg_map_asm.h
36INCL_FILES += reg_rdwr.h
37INCL_FILES += ser_defs.h
38#INCL_FILES += spec_reg.h # In handcrafted supp_reg.h
39INCL_FILES += sser_defs.h
40INCL_FILES += strcop_defs.h
41#INCL_FILES += strcop.h # Where is this?
42INCL_FILES += strmux_defs.h
43#INCL_FILES += supp_reg.h # Handcrafted instead
44INCL_FILES += timer_defs.h
45
46REGDESC =
47REGDESC += $(BASEDIR)/io/ata/rtl/ata_regs.r
48REGDESC += $(BASEDIR)/io/bif/rtl/bif_core_regs.r
49REGDESC += $(BASEDIR)/io/bif/rtl/bif_slave_regs.r
50#REGDESC += $(BASEDIR)/io/bif/sw/bif_slave_ext_regs.r
51REGDESC += $(DESIGNDIR)/top/rtl/config_regs.r
52REGDESC += $(BASEDIR)/mod/dma_common/rtl/dma_regdes.r
53REGDESC += $(BASEDIR)/io/eth/rtl/eth_regs.r
54REGDESC += $(BASEDIR)/io/bif/mod/extmem/extmem_regs.r
55REGDESC += $(DESIGNDIR)/gio/rtl/gio_regs.r
56REGDESC += $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
57REGDESC += $(BASEDIR)/core/memarb/rtl/guinness/marb_top.r
58REGDESC += $(BASEDIR)/core/cpu/mmu/doc/mmu_regs.r
59#REGDESC += $(BASEDIR)/io/par_port/rtl/par_regs.r
60REGDESC += $(BASEDIR)/io/pinmux/rtl/guinness/pinmux_regs.r
61REGDESC += $(BASEDIR)/io/ser/rtl/ser_regs.r
62REGDESC += $(BASEDIR)/core/strcop/rtl/strcop_regs.r
63REGDESC += $(BASEDIR)/io/strmux/rtl/guinness/strmux_regs.r
64REGDESC += $(BASEDIR)/io/timer/rtl/timer_regs.r
65#REGDESC += $(BASEDIR)/io/usb/usb1_1/rtl/usb_regs.r
66
67
68BASEDIR = /n/asic/design
69DESIGNDIR = /n/asic/projects/guinness/design
70RDES2C = /n/asic/bin/rdes2c
71RDES2C = /n/asic/design/tools/rdesc/rdes2c
72RDES2INTR = /n/asic/design/tools/rdesc/rdes2intr
73RDES2TXT = /n/asic/design/tools/rdesc/rdes2txt
74
75## all - Just print help - you probably want to do 'make gen'
76all: help
77
78# Disable implicit rule that may generate deleted files from RCS/ directory.
79%.r:
80
81%.h:
82
83## help - This help
84help:
85 @grep '^## ' Makefile
86
87## gen - Generate include files
88gen: $(INCL_FILES) $(INCL_ASMFILES)
89
90ata_defs.h: $(BASEDIR)/io/ata/rtl/ata_regs.r
91 $(RDES2C) $<
92config_defs.h: $(DESIGNDIR)/top/rtl/config_regs.r
93 $(RDES2C) $<
94config_defs_asm.h: $(DESIGNDIR)/top/rtl/config_regs.r
95 $(RDES2C) -asm $<
96# Can't generate cpu_vect.h yet
97#cpu_vect.h: $(DESIGNDIR)/top/rtl/cpu_vect.r # ????
98# $(RDES2INTR) $<
99cpu_vect.h: $(OFFICIAL_INCDIR)cpu_vect.h
100 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
101dma_defs.h: $(BASEDIR)/core/dma/rtl/common/dma_regdes.r
102 $(RDES2C) $<
103$(BASEDIR)/core/dma/sw/dma.h:
104dma.h: $(BASEDIR)/core/dma/sw/dma.h
105 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
106eth_defs.h: $(BASEDIR)/io/eth/rtl/eth_regs.r
107 $(RDES2C) $<
108extmem_defs.h: $(BASEDIR)/io/bif/mod/extmem/extmem_regs.r
109 $(RDES2C) $<
110gio_defs.h: $(DESIGNDIR)/gio/rtl/gio_regs.r
111 $(RDES2C) $<
112intr_vect_defs.h: $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
113 $(RDES2C) $<
114intr_vect_defs_asm.h: $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
115 $(RDES2C) -asm $<
116# Can't generate intr_vect.h yet
117#intr_vect.h: $(BASEDIR)/core/cpu/intr_vect/rtl/guinness/ivmask.config.r
118# $(RDES2INTR) $<
119intr_vect.h: $(OFFICIAL_INCDIR)intr_vect.h
120 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
121mmu_defs_asm.h: $(BASEDIR)/core/cpu/mmu/doc/mmu_regs.r
122 $(RDES2C) -asm $<
123par_defs.h: $(BASEDIR)/io/par_port/rtl/par_regs.r
124 $(RDES2C) $<
125
126# From /n/asic/projects/guinness/design/
127reg_map.h: $(DESIGNDIR)/top/rtl/global.rmap $(DESIGNDIR)/top/mod/modreg.rmap
128 $(RDES2C) -base 0xb0000000 $^
129reg_map_asm.h: $(DESIGNDIR)/top/rtl/global.rmap $(DESIGNDIR)/top/mod/modreg.rmap
130 $(RDES2C) -base 0xb0000000 -asm -outfile $@ $^
131
132reg_rdwr.h: $(DESIGNDIR)/top/sw/include/reg_rdwr.h
133 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
134
135ser_defs.h: $(BASEDIR)/io/ser/rtl/ser_regs.r
136 $(RDES2C) $<
137strcop_defs.h: $(BASEDIR)/core/strcop/rtl/strcop_regs.r
138 $(RDES2C) $<
139strcop.h: $(BASEDIR)/core/strcop/rtl/strcop.h
140 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
141strmux_defs.h: $(BASEDIR)/io/strmux/rtl/guinness/strmux_regs.r
142 $(RDES2C) $<
143timer_defs.h: $(BASEDIR)/io/timer/rtl/timer_regs.r
144 $(RDES2C) $<
145usb_defs.h: $(BASEDIR)/io/usb/usb1_1/rtl/usb_regs.r
146 $(RDES2C) $<
147
148## copy - Copy files from official location
149copy:
150 @for HFILE in $(INCL_FILES); do \
151 echo " $$HFILE"; \
152 cat $(OFFICIAL_INCDIR)$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
153 done
154 @for HFILE in $(INCL_ASMFILES); do \
155 echo " $$HFILE"; \
156 cat $(OFFICIAL_INCDIR)asm/$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
157 done
158## ls_official - List official location
159ls_official:
160 (cd $(OFFICIAL_INCDIR); ls -l *.h )
161
162## diff_official - Diff current directory with official location
163diff_official:
164 diff . $(OFFICIAL_INCDIR)
165
166## doc - Generate .axw files from register description.
167doc: $(REGDESC)
168 for RDES in $^; do \
169 $(RDES2TXT) $$RDES; \
170 done
171
172.PHONY: axw
173## %.axw - Generate the specified .axw file (doesn't work for all files
174## due to inconsistent naming ir .r files.
175%.axw: axw
176 @for RDES in $(REGDESC); do \
177 if echo "$$RDES" | grep $* ; then \
178 $(RDES2TXT) $$RDES; \
179 fi \
180 done
181
182.PHONY: clean
183## clean - Remove .h files and .axw files.
184clean:
185 rm -rf $(INCL_FILES) *.axw
186
diff --git a/include/asm-cris/arch-v32/hwregs/asm/ata_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/ata_defs_asm.h
deleted file mode 100644
index 866191418f9c..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/ata_defs_asm.h
+++ /dev/null
@@ -1,222 +0,0 @@
1#ifndef __ata_defs_asm_h
2#define __ata_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/ata/rtl/ata_regs.r
7 * id: ata_regs.r,v 1.11 2005/02/09 08:27:36 kriskn Exp
8 * last modfied: Mon Apr 11 16:06:25 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/ata_defs_asm.h ../../inst/ata/rtl/ata_regs.r
11 * id: $Id: ata_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_ctrl0, scope ata, type rw */
57#define reg_ata_rw_ctrl0___pio_hold___lsb 0
58#define reg_ata_rw_ctrl0___pio_hold___width 6
59#define reg_ata_rw_ctrl0___pio_strb___lsb 6
60#define reg_ata_rw_ctrl0___pio_strb___width 6
61#define reg_ata_rw_ctrl0___pio_setup___lsb 12
62#define reg_ata_rw_ctrl0___pio_setup___width 6
63#define reg_ata_rw_ctrl0___dma_hold___lsb 18
64#define reg_ata_rw_ctrl0___dma_hold___width 6
65#define reg_ata_rw_ctrl0___dma_strb___lsb 24
66#define reg_ata_rw_ctrl0___dma_strb___width 6
67#define reg_ata_rw_ctrl0___rst___lsb 30
68#define reg_ata_rw_ctrl0___rst___width 1
69#define reg_ata_rw_ctrl0___rst___bit 30
70#define reg_ata_rw_ctrl0___en___lsb 31
71#define reg_ata_rw_ctrl0___en___width 1
72#define reg_ata_rw_ctrl0___en___bit 31
73#define reg_ata_rw_ctrl0_offset 12
74
75/* Register rw_ctrl1, scope ata, type rw */
76#define reg_ata_rw_ctrl1___udma_tcyc___lsb 0
77#define reg_ata_rw_ctrl1___udma_tcyc___width 4
78#define reg_ata_rw_ctrl1___udma_tdvs___lsb 4
79#define reg_ata_rw_ctrl1___udma_tdvs___width 4
80#define reg_ata_rw_ctrl1_offset 16
81
82/* Register rw_ctrl2, scope ata, type rw */
83#define reg_ata_rw_ctrl2___data___lsb 0
84#define reg_ata_rw_ctrl2___data___width 16
85#define reg_ata_rw_ctrl2___dma_size___lsb 19
86#define reg_ata_rw_ctrl2___dma_size___width 1
87#define reg_ata_rw_ctrl2___dma_size___bit 19
88#define reg_ata_rw_ctrl2___multi___lsb 20
89#define reg_ata_rw_ctrl2___multi___width 1
90#define reg_ata_rw_ctrl2___multi___bit 20
91#define reg_ata_rw_ctrl2___hsh___lsb 21
92#define reg_ata_rw_ctrl2___hsh___width 2
93#define reg_ata_rw_ctrl2___trf_mode___lsb 23
94#define reg_ata_rw_ctrl2___trf_mode___width 1
95#define reg_ata_rw_ctrl2___trf_mode___bit 23
96#define reg_ata_rw_ctrl2___rw___lsb 24
97#define reg_ata_rw_ctrl2___rw___width 1
98#define reg_ata_rw_ctrl2___rw___bit 24
99#define reg_ata_rw_ctrl2___addr___lsb 25
100#define reg_ata_rw_ctrl2___addr___width 3
101#define reg_ata_rw_ctrl2___cs0___lsb 28
102#define reg_ata_rw_ctrl2___cs0___width 1
103#define reg_ata_rw_ctrl2___cs0___bit 28
104#define reg_ata_rw_ctrl2___cs1___lsb 29
105#define reg_ata_rw_ctrl2___cs1___width 1
106#define reg_ata_rw_ctrl2___cs1___bit 29
107#define reg_ata_rw_ctrl2___sel___lsb 30
108#define reg_ata_rw_ctrl2___sel___width 2
109#define reg_ata_rw_ctrl2_offset 0
110
111/* Register rs_stat_data, scope ata, type rs */
112#define reg_ata_rs_stat_data___data___lsb 0
113#define reg_ata_rs_stat_data___data___width 16
114#define reg_ata_rs_stat_data___dav___lsb 16
115#define reg_ata_rs_stat_data___dav___width 1
116#define reg_ata_rs_stat_data___dav___bit 16
117#define reg_ata_rs_stat_data___busy___lsb 17
118#define reg_ata_rs_stat_data___busy___width 1
119#define reg_ata_rs_stat_data___busy___bit 17
120#define reg_ata_rs_stat_data_offset 4
121
122/* Register r_stat_data, scope ata, type r */
123#define reg_ata_r_stat_data___data___lsb 0
124#define reg_ata_r_stat_data___data___width 16
125#define reg_ata_r_stat_data___dav___lsb 16
126#define reg_ata_r_stat_data___dav___width 1
127#define reg_ata_r_stat_data___dav___bit 16
128#define reg_ata_r_stat_data___busy___lsb 17
129#define reg_ata_r_stat_data___busy___width 1
130#define reg_ata_r_stat_data___busy___bit 17
131#define reg_ata_r_stat_data_offset 8
132
133/* Register rw_trf_cnt, scope ata, type rw */
134#define reg_ata_rw_trf_cnt___cnt___lsb 0
135#define reg_ata_rw_trf_cnt___cnt___width 17
136#define reg_ata_rw_trf_cnt_offset 20
137
138/* Register r_stat_misc, scope ata, type r */
139#define reg_ata_r_stat_misc___crc___lsb 0
140#define reg_ata_r_stat_misc___crc___width 16
141#define reg_ata_r_stat_misc_offset 24
142
143/* Register rw_intr_mask, scope ata, type rw */
144#define reg_ata_rw_intr_mask___bus0___lsb 0
145#define reg_ata_rw_intr_mask___bus0___width 1
146#define reg_ata_rw_intr_mask___bus0___bit 0
147#define reg_ata_rw_intr_mask___bus1___lsb 1
148#define reg_ata_rw_intr_mask___bus1___width 1
149#define reg_ata_rw_intr_mask___bus1___bit 1
150#define reg_ata_rw_intr_mask___bus2___lsb 2
151#define reg_ata_rw_intr_mask___bus2___width 1
152#define reg_ata_rw_intr_mask___bus2___bit 2
153#define reg_ata_rw_intr_mask___bus3___lsb 3
154#define reg_ata_rw_intr_mask___bus3___width 1
155#define reg_ata_rw_intr_mask___bus3___bit 3
156#define reg_ata_rw_intr_mask_offset 28
157
158/* Register rw_ack_intr, scope ata, type rw */
159#define reg_ata_rw_ack_intr___bus0___lsb 0
160#define reg_ata_rw_ack_intr___bus0___width 1
161#define reg_ata_rw_ack_intr___bus0___bit 0
162#define reg_ata_rw_ack_intr___bus1___lsb 1
163#define reg_ata_rw_ack_intr___bus1___width 1
164#define reg_ata_rw_ack_intr___bus1___bit 1
165#define reg_ata_rw_ack_intr___bus2___lsb 2
166#define reg_ata_rw_ack_intr___bus2___width 1
167#define reg_ata_rw_ack_intr___bus2___bit 2
168#define reg_ata_rw_ack_intr___bus3___lsb 3
169#define reg_ata_rw_ack_intr___bus3___width 1
170#define reg_ata_rw_ack_intr___bus3___bit 3
171#define reg_ata_rw_ack_intr_offset 32
172
173/* Register r_intr, scope ata, type r */
174#define reg_ata_r_intr___bus0___lsb 0
175#define reg_ata_r_intr___bus0___width 1
176#define reg_ata_r_intr___bus0___bit 0
177#define reg_ata_r_intr___bus1___lsb 1
178#define reg_ata_r_intr___bus1___width 1
179#define reg_ata_r_intr___bus1___bit 1
180#define reg_ata_r_intr___bus2___lsb 2
181#define reg_ata_r_intr___bus2___width 1
182#define reg_ata_r_intr___bus2___bit 2
183#define reg_ata_r_intr___bus3___lsb 3
184#define reg_ata_r_intr___bus3___width 1
185#define reg_ata_r_intr___bus3___bit 3
186#define reg_ata_r_intr_offset 36
187
188/* Register r_masked_intr, scope ata, type r */
189#define reg_ata_r_masked_intr___bus0___lsb 0
190#define reg_ata_r_masked_intr___bus0___width 1
191#define reg_ata_r_masked_intr___bus0___bit 0
192#define reg_ata_r_masked_intr___bus1___lsb 1
193#define reg_ata_r_masked_intr___bus1___width 1
194#define reg_ata_r_masked_intr___bus1___bit 1
195#define reg_ata_r_masked_intr___bus2___lsb 2
196#define reg_ata_r_masked_intr___bus2___width 1
197#define reg_ata_r_masked_intr___bus2___bit 2
198#define reg_ata_r_masked_intr___bus3___lsb 3
199#define reg_ata_r_masked_intr___bus3___width 1
200#define reg_ata_r_masked_intr___bus3___bit 3
201#define reg_ata_r_masked_intr_offset 40
202
203
204/* Constants */
205#define regk_ata_active 0x00000001
206#define regk_ata_byte 0x00000001
207#define regk_ata_data 0x00000001
208#define regk_ata_dma 0x00000001
209#define regk_ata_inactive 0x00000000
210#define regk_ata_no 0x00000000
211#define regk_ata_nodata 0x00000000
212#define regk_ata_pio 0x00000000
213#define regk_ata_rd 0x00000001
214#define regk_ata_reg 0x00000000
215#define regk_ata_rw_ctrl0_default 0x00000000
216#define regk_ata_rw_ctrl2_default 0x00000000
217#define regk_ata_rw_intr_mask_default 0x00000000
218#define regk_ata_udma 0x00000002
219#define regk_ata_word 0x00000000
220#define regk_ata_wr 0x00000000
221#define regk_ata_yes 0x00000001
222#endif /* __ata_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/bif_core_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/bif_core_defs_asm.h
deleted file mode 100644
index c686cb335621..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/bif_core_defs_asm.h
+++ /dev/null
@@ -1,319 +0,0 @@
1#ifndef __bif_core_defs_asm_h
2#define __bif_core_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_core_regs.r
7 * id: bif_core_regs.r,v 1.17 2005/02/04 13:28:22 np Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/bif_core_defs_asm.h ../../inst/bif/rtl/bif_core_regs.r
11 * id: $Id: bif_core_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_grp1_cfg, scope bif_core, type rw */
57#define reg_bif_core_rw_grp1_cfg___lw___lsb 0
58#define reg_bif_core_rw_grp1_cfg___lw___width 6
59#define reg_bif_core_rw_grp1_cfg___ew___lsb 6
60#define reg_bif_core_rw_grp1_cfg___ew___width 3
61#define reg_bif_core_rw_grp1_cfg___zw___lsb 9
62#define reg_bif_core_rw_grp1_cfg___zw___width 3
63#define reg_bif_core_rw_grp1_cfg___aw___lsb 12
64#define reg_bif_core_rw_grp1_cfg___aw___width 2
65#define reg_bif_core_rw_grp1_cfg___dw___lsb 14
66#define reg_bif_core_rw_grp1_cfg___dw___width 2
67#define reg_bif_core_rw_grp1_cfg___ewb___lsb 16
68#define reg_bif_core_rw_grp1_cfg___ewb___width 2
69#define reg_bif_core_rw_grp1_cfg___bw___lsb 18
70#define reg_bif_core_rw_grp1_cfg___bw___width 1
71#define reg_bif_core_rw_grp1_cfg___bw___bit 18
72#define reg_bif_core_rw_grp1_cfg___wr_extend___lsb 19
73#define reg_bif_core_rw_grp1_cfg___wr_extend___width 1
74#define reg_bif_core_rw_grp1_cfg___wr_extend___bit 19
75#define reg_bif_core_rw_grp1_cfg___erc_en___lsb 20
76#define reg_bif_core_rw_grp1_cfg___erc_en___width 1
77#define reg_bif_core_rw_grp1_cfg___erc_en___bit 20
78#define reg_bif_core_rw_grp1_cfg___mode___lsb 21
79#define reg_bif_core_rw_grp1_cfg___mode___width 1
80#define reg_bif_core_rw_grp1_cfg___mode___bit 21
81#define reg_bif_core_rw_grp1_cfg_offset 0
82
83/* Register rw_grp2_cfg, scope bif_core, type rw */
84#define reg_bif_core_rw_grp2_cfg___lw___lsb 0
85#define reg_bif_core_rw_grp2_cfg___lw___width 6
86#define reg_bif_core_rw_grp2_cfg___ew___lsb 6
87#define reg_bif_core_rw_grp2_cfg___ew___width 3
88#define reg_bif_core_rw_grp2_cfg___zw___lsb 9
89#define reg_bif_core_rw_grp2_cfg___zw___width 3
90#define reg_bif_core_rw_grp2_cfg___aw___lsb 12
91#define reg_bif_core_rw_grp2_cfg___aw___width 2
92#define reg_bif_core_rw_grp2_cfg___dw___lsb 14
93#define reg_bif_core_rw_grp2_cfg___dw___width 2
94#define reg_bif_core_rw_grp2_cfg___ewb___lsb 16
95#define reg_bif_core_rw_grp2_cfg___ewb___width 2
96#define reg_bif_core_rw_grp2_cfg___bw___lsb 18
97#define reg_bif_core_rw_grp2_cfg___bw___width 1
98#define reg_bif_core_rw_grp2_cfg___bw___bit 18
99#define reg_bif_core_rw_grp2_cfg___wr_extend___lsb 19
100#define reg_bif_core_rw_grp2_cfg___wr_extend___width 1
101#define reg_bif_core_rw_grp2_cfg___wr_extend___bit 19
102#define reg_bif_core_rw_grp2_cfg___erc_en___lsb 20
103#define reg_bif_core_rw_grp2_cfg___erc_en___width 1
104#define reg_bif_core_rw_grp2_cfg___erc_en___bit 20
105#define reg_bif_core_rw_grp2_cfg___mode___lsb 21
106#define reg_bif_core_rw_grp2_cfg___mode___width 1
107#define reg_bif_core_rw_grp2_cfg___mode___bit 21
108#define reg_bif_core_rw_grp2_cfg_offset 4
109
110/* Register rw_grp3_cfg, scope bif_core, type rw */
111#define reg_bif_core_rw_grp3_cfg___lw___lsb 0
112#define reg_bif_core_rw_grp3_cfg___lw___width 6
113#define reg_bif_core_rw_grp3_cfg___ew___lsb 6
114#define reg_bif_core_rw_grp3_cfg___ew___width 3
115#define reg_bif_core_rw_grp3_cfg___zw___lsb 9
116#define reg_bif_core_rw_grp3_cfg___zw___width 3
117#define reg_bif_core_rw_grp3_cfg___aw___lsb 12
118#define reg_bif_core_rw_grp3_cfg___aw___width 2
119#define reg_bif_core_rw_grp3_cfg___dw___lsb 14
120#define reg_bif_core_rw_grp3_cfg___dw___width 2
121#define reg_bif_core_rw_grp3_cfg___ewb___lsb 16
122#define reg_bif_core_rw_grp3_cfg___ewb___width 2
123#define reg_bif_core_rw_grp3_cfg___bw___lsb 18
124#define reg_bif_core_rw_grp3_cfg___bw___width 1
125#define reg_bif_core_rw_grp3_cfg___bw___bit 18
126#define reg_bif_core_rw_grp3_cfg___wr_extend___lsb 19
127#define reg_bif_core_rw_grp3_cfg___wr_extend___width 1
128#define reg_bif_core_rw_grp3_cfg___wr_extend___bit 19
129#define reg_bif_core_rw_grp3_cfg___erc_en___lsb 20
130#define reg_bif_core_rw_grp3_cfg___erc_en___width 1
131#define reg_bif_core_rw_grp3_cfg___erc_en___bit 20
132#define reg_bif_core_rw_grp3_cfg___mode___lsb 21
133#define reg_bif_core_rw_grp3_cfg___mode___width 1
134#define reg_bif_core_rw_grp3_cfg___mode___bit 21
135#define reg_bif_core_rw_grp3_cfg___gated_csp0___lsb 24
136#define reg_bif_core_rw_grp3_cfg___gated_csp0___width 2
137#define reg_bif_core_rw_grp3_cfg___gated_csp1___lsb 26
138#define reg_bif_core_rw_grp3_cfg___gated_csp1___width 2
139#define reg_bif_core_rw_grp3_cfg___gated_csp2___lsb 28
140#define reg_bif_core_rw_grp3_cfg___gated_csp2___width 2
141#define reg_bif_core_rw_grp3_cfg___gated_csp3___lsb 30
142#define reg_bif_core_rw_grp3_cfg___gated_csp3___width 2
143#define reg_bif_core_rw_grp3_cfg_offset 8
144
145/* Register rw_grp4_cfg, scope bif_core, type rw */
146#define reg_bif_core_rw_grp4_cfg___lw___lsb 0
147#define reg_bif_core_rw_grp4_cfg___lw___width 6
148#define reg_bif_core_rw_grp4_cfg___ew___lsb 6
149#define reg_bif_core_rw_grp4_cfg___ew___width 3
150#define reg_bif_core_rw_grp4_cfg___zw___lsb 9
151#define reg_bif_core_rw_grp4_cfg___zw___width 3
152#define reg_bif_core_rw_grp4_cfg___aw___lsb 12
153#define reg_bif_core_rw_grp4_cfg___aw___width 2
154#define reg_bif_core_rw_grp4_cfg___dw___lsb 14
155#define reg_bif_core_rw_grp4_cfg___dw___width 2
156#define reg_bif_core_rw_grp4_cfg___ewb___lsb 16
157#define reg_bif_core_rw_grp4_cfg___ewb___width 2
158#define reg_bif_core_rw_grp4_cfg___bw___lsb 18
159#define reg_bif_core_rw_grp4_cfg___bw___width 1
160#define reg_bif_core_rw_grp4_cfg___bw___bit 18
161#define reg_bif_core_rw_grp4_cfg___wr_extend___lsb 19
162#define reg_bif_core_rw_grp4_cfg___wr_extend___width 1
163#define reg_bif_core_rw_grp4_cfg___wr_extend___bit 19
164#define reg_bif_core_rw_grp4_cfg___erc_en___lsb 20
165#define reg_bif_core_rw_grp4_cfg___erc_en___width 1
166#define reg_bif_core_rw_grp4_cfg___erc_en___bit 20
167#define reg_bif_core_rw_grp4_cfg___mode___lsb 21
168#define reg_bif_core_rw_grp4_cfg___mode___width 1
169#define reg_bif_core_rw_grp4_cfg___mode___bit 21
170#define reg_bif_core_rw_grp4_cfg___gated_csp4___lsb 26
171#define reg_bif_core_rw_grp4_cfg___gated_csp4___width 2
172#define reg_bif_core_rw_grp4_cfg___gated_csp5___lsb 28
173#define reg_bif_core_rw_grp4_cfg___gated_csp5___width 2
174#define reg_bif_core_rw_grp4_cfg___gated_csp6___lsb 30
175#define reg_bif_core_rw_grp4_cfg___gated_csp6___width 2
176#define reg_bif_core_rw_grp4_cfg_offset 12
177
178/* Register rw_sdram_cfg_grp0, scope bif_core, type rw */
179#define reg_bif_core_rw_sdram_cfg_grp0___bank_sel___lsb 0
180#define reg_bif_core_rw_sdram_cfg_grp0___bank_sel___width 5
181#define reg_bif_core_rw_sdram_cfg_grp0___ca___lsb 5
182#define reg_bif_core_rw_sdram_cfg_grp0___ca___width 3
183#define reg_bif_core_rw_sdram_cfg_grp0___type___lsb 8
184#define reg_bif_core_rw_sdram_cfg_grp0___type___width 1
185#define reg_bif_core_rw_sdram_cfg_grp0___type___bit 8
186#define reg_bif_core_rw_sdram_cfg_grp0___bw___lsb 9
187#define reg_bif_core_rw_sdram_cfg_grp0___bw___width 1
188#define reg_bif_core_rw_sdram_cfg_grp0___bw___bit 9
189#define reg_bif_core_rw_sdram_cfg_grp0___sh___lsb 10
190#define reg_bif_core_rw_sdram_cfg_grp0___sh___width 3
191#define reg_bif_core_rw_sdram_cfg_grp0___wmm___lsb 13
192#define reg_bif_core_rw_sdram_cfg_grp0___wmm___width 1
193#define reg_bif_core_rw_sdram_cfg_grp0___wmm___bit 13
194#define reg_bif_core_rw_sdram_cfg_grp0___sh16___lsb 14
195#define reg_bif_core_rw_sdram_cfg_grp0___sh16___width 1
196#define reg_bif_core_rw_sdram_cfg_grp0___sh16___bit 14
197#define reg_bif_core_rw_sdram_cfg_grp0___grp_sel___lsb 15
198#define reg_bif_core_rw_sdram_cfg_grp0___grp_sel___width 5
199#define reg_bif_core_rw_sdram_cfg_grp0_offset 16
200
201/* Register rw_sdram_cfg_grp1, scope bif_core, type rw */
202#define reg_bif_core_rw_sdram_cfg_grp1___bank_sel___lsb 0
203#define reg_bif_core_rw_sdram_cfg_grp1___bank_sel___width 5
204#define reg_bif_core_rw_sdram_cfg_grp1___ca___lsb 5
205#define reg_bif_core_rw_sdram_cfg_grp1___ca___width 3
206#define reg_bif_core_rw_sdram_cfg_grp1___type___lsb 8
207#define reg_bif_core_rw_sdram_cfg_grp1___type___width 1
208#define reg_bif_core_rw_sdram_cfg_grp1___type___bit 8
209#define reg_bif_core_rw_sdram_cfg_grp1___bw___lsb 9
210#define reg_bif_core_rw_sdram_cfg_grp1___bw___width 1
211#define reg_bif_core_rw_sdram_cfg_grp1___bw___bit 9
212#define reg_bif_core_rw_sdram_cfg_grp1___sh___lsb 10
213#define reg_bif_core_rw_sdram_cfg_grp1___sh___width 3
214#define reg_bif_core_rw_sdram_cfg_grp1___wmm___lsb 13
215#define reg_bif_core_rw_sdram_cfg_grp1___wmm___width 1
216#define reg_bif_core_rw_sdram_cfg_grp1___wmm___bit 13
217#define reg_bif_core_rw_sdram_cfg_grp1___sh16___lsb 14
218#define reg_bif_core_rw_sdram_cfg_grp1___sh16___width 1
219#define reg_bif_core_rw_sdram_cfg_grp1___sh16___bit 14
220#define reg_bif_core_rw_sdram_cfg_grp1_offset 20
221
222/* Register rw_sdram_timing, scope bif_core, type rw */
223#define reg_bif_core_rw_sdram_timing___cl___lsb 0
224#define reg_bif_core_rw_sdram_timing___cl___width 3
225#define reg_bif_core_rw_sdram_timing___rcd___lsb 3
226#define reg_bif_core_rw_sdram_timing___rcd___width 3
227#define reg_bif_core_rw_sdram_timing___rp___lsb 6
228#define reg_bif_core_rw_sdram_timing___rp___width 3
229#define reg_bif_core_rw_sdram_timing___rc___lsb 9
230#define reg_bif_core_rw_sdram_timing___rc___width 2
231#define reg_bif_core_rw_sdram_timing___dpl___lsb 11
232#define reg_bif_core_rw_sdram_timing___dpl___width 2
233#define reg_bif_core_rw_sdram_timing___pde___lsb 13
234#define reg_bif_core_rw_sdram_timing___pde___width 1
235#define reg_bif_core_rw_sdram_timing___pde___bit 13
236#define reg_bif_core_rw_sdram_timing___ref___lsb 14
237#define reg_bif_core_rw_sdram_timing___ref___width 2
238#define reg_bif_core_rw_sdram_timing___cpd___lsb 16
239#define reg_bif_core_rw_sdram_timing___cpd___width 1
240#define reg_bif_core_rw_sdram_timing___cpd___bit 16
241#define reg_bif_core_rw_sdram_timing___sdcke___lsb 17
242#define reg_bif_core_rw_sdram_timing___sdcke___width 1
243#define reg_bif_core_rw_sdram_timing___sdcke___bit 17
244#define reg_bif_core_rw_sdram_timing___sdclk___lsb 18
245#define reg_bif_core_rw_sdram_timing___sdclk___width 1
246#define reg_bif_core_rw_sdram_timing___sdclk___bit 18
247#define reg_bif_core_rw_sdram_timing_offset 24
248
249/* Register rw_sdram_cmd, scope bif_core, type rw */
250#define reg_bif_core_rw_sdram_cmd___cmd___lsb 0
251#define reg_bif_core_rw_sdram_cmd___cmd___width 3
252#define reg_bif_core_rw_sdram_cmd___mrs_data___lsb 3
253#define reg_bif_core_rw_sdram_cmd___mrs_data___width 15
254#define reg_bif_core_rw_sdram_cmd_offset 28
255
256/* Register rs_sdram_ref_stat, scope bif_core, type rs */
257#define reg_bif_core_rs_sdram_ref_stat___ok___lsb 0
258#define reg_bif_core_rs_sdram_ref_stat___ok___width 1
259#define reg_bif_core_rs_sdram_ref_stat___ok___bit 0
260#define reg_bif_core_rs_sdram_ref_stat_offset 32
261
262/* Register r_sdram_ref_stat, scope bif_core, type r */
263#define reg_bif_core_r_sdram_ref_stat___ok___lsb 0
264#define reg_bif_core_r_sdram_ref_stat___ok___width 1
265#define reg_bif_core_r_sdram_ref_stat___ok___bit 0
266#define reg_bif_core_r_sdram_ref_stat_offset 36
267
268
269/* Constants */
270#define regk_bif_core_bank2 0x00000000
271#define regk_bif_core_bank4 0x00000001
272#define regk_bif_core_bit10 0x0000000a
273#define regk_bif_core_bit11 0x0000000b
274#define regk_bif_core_bit12 0x0000000c
275#define regk_bif_core_bit13 0x0000000d
276#define regk_bif_core_bit14 0x0000000e
277#define regk_bif_core_bit15 0x0000000f
278#define regk_bif_core_bit16 0x00000010
279#define regk_bif_core_bit17 0x00000011
280#define regk_bif_core_bit18 0x00000012
281#define regk_bif_core_bit19 0x00000013
282#define regk_bif_core_bit20 0x00000014
283#define regk_bif_core_bit21 0x00000015
284#define regk_bif_core_bit22 0x00000016
285#define regk_bif_core_bit23 0x00000017
286#define regk_bif_core_bit24 0x00000018
287#define regk_bif_core_bit25 0x00000019
288#define regk_bif_core_bit26 0x0000001a
289#define regk_bif_core_bit27 0x0000001b
290#define regk_bif_core_bit28 0x0000001c
291#define regk_bif_core_bit29 0x0000001d
292#define regk_bif_core_bit9 0x00000009
293#define regk_bif_core_bw16 0x00000001
294#define regk_bif_core_bw32 0x00000000
295#define regk_bif_core_bwe 0x00000000
296#define regk_bif_core_cwe 0x00000001
297#define regk_bif_core_e15us 0x00000001
298#define regk_bif_core_e7800ns 0x00000002
299#define regk_bif_core_grp0 0x00000000
300#define regk_bif_core_grp1 0x00000001
301#define regk_bif_core_mrs 0x00000003
302#define regk_bif_core_no 0x00000000
303#define regk_bif_core_none 0x00000000
304#define regk_bif_core_nop 0x00000000
305#define regk_bif_core_off 0x00000000
306#define regk_bif_core_pre 0x00000002
307#define regk_bif_core_r_sdram_ref_stat_default 0x00000001
308#define regk_bif_core_rd 0x00000002
309#define regk_bif_core_ref 0x00000001
310#define regk_bif_core_rs_sdram_ref_stat_default 0x00000001
311#define regk_bif_core_rw_grp1_cfg_default 0x000006cf
312#define regk_bif_core_rw_grp2_cfg_default 0x000006cf
313#define regk_bif_core_rw_grp3_cfg_default 0x000006cf
314#define regk_bif_core_rw_grp4_cfg_default 0x000006cf
315#define regk_bif_core_rw_sdram_cfg_grp1_default 0x00000000
316#define regk_bif_core_slf 0x00000004
317#define regk_bif_core_wr 0x00000001
318#define regk_bif_core_yes 0x00000001
319#endif /* __bif_core_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/bif_dma_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/bif_dma_defs_asm.h
deleted file mode 100644
index 71532aa18168..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/bif_dma_defs_asm.h
+++ /dev/null
@@ -1,495 +0,0 @@
1#ifndef __bif_dma_defs_asm_h
2#define __bif_dma_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_dma_regs.r
7 * id: bif_dma_regs.r,v 1.6 2005/02/04 13:28:31 perz Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/bif_dma_defs_asm.h ../../inst/bif/rtl/bif_dma_regs.r
11 * id: $Id: bif_dma_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_ch0_ctrl, scope bif_dma, type rw */
57#define reg_bif_dma_rw_ch0_ctrl___bw___lsb 0
58#define reg_bif_dma_rw_ch0_ctrl___bw___width 2
59#define reg_bif_dma_rw_ch0_ctrl___burst_len___lsb 2
60#define reg_bif_dma_rw_ch0_ctrl___burst_len___width 1
61#define reg_bif_dma_rw_ch0_ctrl___burst_len___bit 2
62#define reg_bif_dma_rw_ch0_ctrl___cont___lsb 3
63#define reg_bif_dma_rw_ch0_ctrl___cont___width 1
64#define reg_bif_dma_rw_ch0_ctrl___cont___bit 3
65#define reg_bif_dma_rw_ch0_ctrl___end_pad___lsb 4
66#define reg_bif_dma_rw_ch0_ctrl___end_pad___width 1
67#define reg_bif_dma_rw_ch0_ctrl___end_pad___bit 4
68#define reg_bif_dma_rw_ch0_ctrl___cnt___lsb 5
69#define reg_bif_dma_rw_ch0_ctrl___cnt___width 1
70#define reg_bif_dma_rw_ch0_ctrl___cnt___bit 5
71#define reg_bif_dma_rw_ch0_ctrl___dreq_pin___lsb 6
72#define reg_bif_dma_rw_ch0_ctrl___dreq_pin___width 3
73#define reg_bif_dma_rw_ch0_ctrl___dreq_mode___lsb 9
74#define reg_bif_dma_rw_ch0_ctrl___dreq_mode___width 2
75#define reg_bif_dma_rw_ch0_ctrl___tc_in_pin___lsb 11
76#define reg_bif_dma_rw_ch0_ctrl___tc_in_pin___width 3
77#define reg_bif_dma_rw_ch0_ctrl___tc_in_mode___lsb 14
78#define reg_bif_dma_rw_ch0_ctrl___tc_in_mode___width 2
79#define reg_bif_dma_rw_ch0_ctrl___bus_mode___lsb 16
80#define reg_bif_dma_rw_ch0_ctrl___bus_mode___width 2
81#define reg_bif_dma_rw_ch0_ctrl___rate_en___lsb 18
82#define reg_bif_dma_rw_ch0_ctrl___rate_en___width 1
83#define reg_bif_dma_rw_ch0_ctrl___rate_en___bit 18
84#define reg_bif_dma_rw_ch0_ctrl___wr_all___lsb 19
85#define reg_bif_dma_rw_ch0_ctrl___wr_all___width 1
86#define reg_bif_dma_rw_ch0_ctrl___wr_all___bit 19
87#define reg_bif_dma_rw_ch0_ctrl_offset 0
88
89/* Register rw_ch0_addr, scope bif_dma, type rw */
90#define reg_bif_dma_rw_ch0_addr___addr___lsb 0
91#define reg_bif_dma_rw_ch0_addr___addr___width 32
92#define reg_bif_dma_rw_ch0_addr_offset 4
93
94/* Register rw_ch0_start, scope bif_dma, type rw */
95#define reg_bif_dma_rw_ch0_start___run___lsb 0
96#define reg_bif_dma_rw_ch0_start___run___width 1
97#define reg_bif_dma_rw_ch0_start___run___bit 0
98#define reg_bif_dma_rw_ch0_start_offset 8
99
100/* Register rw_ch0_cnt, scope bif_dma, type rw */
101#define reg_bif_dma_rw_ch0_cnt___start_cnt___lsb 0
102#define reg_bif_dma_rw_ch0_cnt___start_cnt___width 16
103#define reg_bif_dma_rw_ch0_cnt_offset 12
104
105/* Register r_ch0_stat, scope bif_dma, type r */
106#define reg_bif_dma_r_ch0_stat___cnt___lsb 0
107#define reg_bif_dma_r_ch0_stat___cnt___width 16
108#define reg_bif_dma_r_ch0_stat___run___lsb 31
109#define reg_bif_dma_r_ch0_stat___run___width 1
110#define reg_bif_dma_r_ch0_stat___run___bit 31
111#define reg_bif_dma_r_ch0_stat_offset 16
112
113/* Register rw_ch1_ctrl, scope bif_dma, type rw */
114#define reg_bif_dma_rw_ch1_ctrl___bw___lsb 0
115#define reg_bif_dma_rw_ch1_ctrl___bw___width 2
116#define reg_bif_dma_rw_ch1_ctrl___burst_len___lsb 2
117#define reg_bif_dma_rw_ch1_ctrl___burst_len___width 1
118#define reg_bif_dma_rw_ch1_ctrl___burst_len___bit 2
119#define reg_bif_dma_rw_ch1_ctrl___cont___lsb 3
120#define reg_bif_dma_rw_ch1_ctrl___cont___width 1
121#define reg_bif_dma_rw_ch1_ctrl___cont___bit 3
122#define reg_bif_dma_rw_ch1_ctrl___end_discard___lsb 4
123#define reg_bif_dma_rw_ch1_ctrl___end_discard___width 1
124#define reg_bif_dma_rw_ch1_ctrl___end_discard___bit 4
125#define reg_bif_dma_rw_ch1_ctrl___cnt___lsb 5
126#define reg_bif_dma_rw_ch1_ctrl___cnt___width 1
127#define reg_bif_dma_rw_ch1_ctrl___cnt___bit 5
128#define reg_bif_dma_rw_ch1_ctrl___dreq_pin___lsb 6
129#define reg_bif_dma_rw_ch1_ctrl___dreq_pin___width 3
130#define reg_bif_dma_rw_ch1_ctrl___dreq_mode___lsb 9
131#define reg_bif_dma_rw_ch1_ctrl___dreq_mode___width 2
132#define reg_bif_dma_rw_ch1_ctrl___tc_in_pin___lsb 11
133#define reg_bif_dma_rw_ch1_ctrl___tc_in_pin___width 3
134#define reg_bif_dma_rw_ch1_ctrl___tc_in_mode___lsb 14
135#define reg_bif_dma_rw_ch1_ctrl___tc_in_mode___width 2
136#define reg_bif_dma_rw_ch1_ctrl___bus_mode___lsb 16
137#define reg_bif_dma_rw_ch1_ctrl___bus_mode___width 2
138#define reg_bif_dma_rw_ch1_ctrl___rate_en___lsb 18
139#define reg_bif_dma_rw_ch1_ctrl___rate_en___width 1
140#define reg_bif_dma_rw_ch1_ctrl___rate_en___bit 18
141#define reg_bif_dma_rw_ch1_ctrl_offset 32
142
143/* Register rw_ch1_addr, scope bif_dma, type rw */
144#define reg_bif_dma_rw_ch1_addr___addr___lsb 0
145#define reg_bif_dma_rw_ch1_addr___addr___width 32
146#define reg_bif_dma_rw_ch1_addr_offset 36
147
148/* Register rw_ch1_start, scope bif_dma, type rw */
149#define reg_bif_dma_rw_ch1_start___run___lsb 0
150#define reg_bif_dma_rw_ch1_start___run___width 1
151#define reg_bif_dma_rw_ch1_start___run___bit 0
152#define reg_bif_dma_rw_ch1_start_offset 40
153
154/* Register rw_ch1_cnt, scope bif_dma, type rw */
155#define reg_bif_dma_rw_ch1_cnt___start_cnt___lsb 0
156#define reg_bif_dma_rw_ch1_cnt___start_cnt___width 16
157#define reg_bif_dma_rw_ch1_cnt_offset 44
158
159/* Register r_ch1_stat, scope bif_dma, type r */
160#define reg_bif_dma_r_ch1_stat___cnt___lsb 0
161#define reg_bif_dma_r_ch1_stat___cnt___width 16
162#define reg_bif_dma_r_ch1_stat___run___lsb 31
163#define reg_bif_dma_r_ch1_stat___run___width 1
164#define reg_bif_dma_r_ch1_stat___run___bit 31
165#define reg_bif_dma_r_ch1_stat_offset 48
166
167/* Register rw_ch2_ctrl, scope bif_dma, type rw */
168#define reg_bif_dma_rw_ch2_ctrl___bw___lsb 0
169#define reg_bif_dma_rw_ch2_ctrl___bw___width 2
170#define reg_bif_dma_rw_ch2_ctrl___burst_len___lsb 2
171#define reg_bif_dma_rw_ch2_ctrl___burst_len___width 1
172#define reg_bif_dma_rw_ch2_ctrl___burst_len___bit 2
173#define reg_bif_dma_rw_ch2_ctrl___cont___lsb 3
174#define reg_bif_dma_rw_ch2_ctrl___cont___width 1
175#define reg_bif_dma_rw_ch2_ctrl___cont___bit 3
176#define reg_bif_dma_rw_ch2_ctrl___end_pad___lsb 4
177#define reg_bif_dma_rw_ch2_ctrl___end_pad___width 1
178#define reg_bif_dma_rw_ch2_ctrl___end_pad___bit 4
179#define reg_bif_dma_rw_ch2_ctrl___cnt___lsb 5
180#define reg_bif_dma_rw_ch2_ctrl___cnt___width 1
181#define reg_bif_dma_rw_ch2_ctrl___cnt___bit 5
182#define reg_bif_dma_rw_ch2_ctrl___dreq_pin___lsb 6
183#define reg_bif_dma_rw_ch2_ctrl___dreq_pin___width 3
184#define reg_bif_dma_rw_ch2_ctrl___dreq_mode___lsb 9
185#define reg_bif_dma_rw_ch2_ctrl___dreq_mode___width 2
186#define reg_bif_dma_rw_ch2_ctrl___tc_in_pin___lsb 11
187#define reg_bif_dma_rw_ch2_ctrl___tc_in_pin___width 3
188#define reg_bif_dma_rw_ch2_ctrl___tc_in_mode___lsb 14
189#define reg_bif_dma_rw_ch2_ctrl___tc_in_mode___width 2
190#define reg_bif_dma_rw_ch2_ctrl___bus_mode___lsb 16
191#define reg_bif_dma_rw_ch2_ctrl___bus_mode___width 2
192#define reg_bif_dma_rw_ch2_ctrl___rate_en___lsb 18
193#define reg_bif_dma_rw_ch2_ctrl___rate_en___width 1
194#define reg_bif_dma_rw_ch2_ctrl___rate_en___bit 18
195#define reg_bif_dma_rw_ch2_ctrl___wr_all___lsb 19
196#define reg_bif_dma_rw_ch2_ctrl___wr_all___width 1
197#define reg_bif_dma_rw_ch2_ctrl___wr_all___bit 19
198#define reg_bif_dma_rw_ch2_ctrl_offset 64
199
200/* Register rw_ch2_addr, scope bif_dma, type rw */
201#define reg_bif_dma_rw_ch2_addr___addr___lsb 0
202#define reg_bif_dma_rw_ch2_addr___addr___width 32
203#define reg_bif_dma_rw_ch2_addr_offset 68
204
205/* Register rw_ch2_start, scope bif_dma, type rw */
206#define reg_bif_dma_rw_ch2_start___run___lsb 0
207#define reg_bif_dma_rw_ch2_start___run___width 1
208#define reg_bif_dma_rw_ch2_start___run___bit 0
209#define reg_bif_dma_rw_ch2_start_offset 72
210
211/* Register rw_ch2_cnt, scope bif_dma, type rw */
212#define reg_bif_dma_rw_ch2_cnt___start_cnt___lsb 0
213#define reg_bif_dma_rw_ch2_cnt___start_cnt___width 16
214#define reg_bif_dma_rw_ch2_cnt_offset 76
215
216/* Register r_ch2_stat, scope bif_dma, type r */
217#define reg_bif_dma_r_ch2_stat___cnt___lsb 0
218#define reg_bif_dma_r_ch2_stat___cnt___width 16
219#define reg_bif_dma_r_ch2_stat___run___lsb 31
220#define reg_bif_dma_r_ch2_stat___run___width 1
221#define reg_bif_dma_r_ch2_stat___run___bit 31
222#define reg_bif_dma_r_ch2_stat_offset 80
223
224/* Register rw_ch3_ctrl, scope bif_dma, type rw */
225#define reg_bif_dma_rw_ch3_ctrl___bw___lsb 0
226#define reg_bif_dma_rw_ch3_ctrl___bw___width 2
227#define reg_bif_dma_rw_ch3_ctrl___burst_len___lsb 2
228#define reg_bif_dma_rw_ch3_ctrl___burst_len___width 1
229#define reg_bif_dma_rw_ch3_ctrl___burst_len___bit 2
230#define reg_bif_dma_rw_ch3_ctrl___cont___lsb 3
231#define reg_bif_dma_rw_ch3_ctrl___cont___width 1
232#define reg_bif_dma_rw_ch3_ctrl___cont___bit 3
233#define reg_bif_dma_rw_ch3_ctrl___end_discard___lsb 4
234#define reg_bif_dma_rw_ch3_ctrl___end_discard___width 1
235#define reg_bif_dma_rw_ch3_ctrl___end_discard___bit 4
236#define reg_bif_dma_rw_ch3_ctrl___cnt___lsb 5
237#define reg_bif_dma_rw_ch3_ctrl___cnt___width 1
238#define reg_bif_dma_rw_ch3_ctrl___cnt___bit 5
239#define reg_bif_dma_rw_ch3_ctrl___dreq_pin___lsb 6
240#define reg_bif_dma_rw_ch3_ctrl___dreq_pin___width 3
241#define reg_bif_dma_rw_ch3_ctrl___dreq_mode___lsb 9
242#define reg_bif_dma_rw_ch3_ctrl___dreq_mode___width 2
243#define reg_bif_dma_rw_ch3_ctrl___tc_in_pin___lsb 11
244#define reg_bif_dma_rw_ch3_ctrl___tc_in_pin___width 3
245#define reg_bif_dma_rw_ch3_ctrl___tc_in_mode___lsb 14
246#define reg_bif_dma_rw_ch3_ctrl___tc_in_mode___width 2
247#define reg_bif_dma_rw_ch3_ctrl___bus_mode___lsb 16
248#define reg_bif_dma_rw_ch3_ctrl___bus_mode___width 2
249#define reg_bif_dma_rw_ch3_ctrl___rate_en___lsb 18
250#define reg_bif_dma_rw_ch3_ctrl___rate_en___width 1
251#define reg_bif_dma_rw_ch3_ctrl___rate_en___bit 18
252#define reg_bif_dma_rw_ch3_ctrl_offset 96
253
254/* Register rw_ch3_addr, scope bif_dma, type rw */
255#define reg_bif_dma_rw_ch3_addr___addr___lsb 0
256#define reg_bif_dma_rw_ch3_addr___addr___width 32
257#define reg_bif_dma_rw_ch3_addr_offset 100
258
259/* Register rw_ch3_start, scope bif_dma, type rw */
260#define reg_bif_dma_rw_ch3_start___run___lsb 0
261#define reg_bif_dma_rw_ch3_start___run___width 1
262#define reg_bif_dma_rw_ch3_start___run___bit 0
263#define reg_bif_dma_rw_ch3_start_offset 104
264
265/* Register rw_ch3_cnt, scope bif_dma, type rw */
266#define reg_bif_dma_rw_ch3_cnt___start_cnt___lsb 0
267#define reg_bif_dma_rw_ch3_cnt___start_cnt___width 16
268#define reg_bif_dma_rw_ch3_cnt_offset 108
269
270/* Register r_ch3_stat, scope bif_dma, type r */
271#define reg_bif_dma_r_ch3_stat___cnt___lsb 0
272#define reg_bif_dma_r_ch3_stat___cnt___width 16
273#define reg_bif_dma_r_ch3_stat___run___lsb 31
274#define reg_bif_dma_r_ch3_stat___run___width 1
275#define reg_bif_dma_r_ch3_stat___run___bit 31
276#define reg_bif_dma_r_ch3_stat_offset 112
277
278/* Register rw_intr_mask, scope bif_dma, type rw */
279#define reg_bif_dma_rw_intr_mask___ext_dma0___lsb 0
280#define reg_bif_dma_rw_intr_mask___ext_dma0___width 1
281#define reg_bif_dma_rw_intr_mask___ext_dma0___bit 0
282#define reg_bif_dma_rw_intr_mask___ext_dma1___lsb 1
283#define reg_bif_dma_rw_intr_mask___ext_dma1___width 1
284#define reg_bif_dma_rw_intr_mask___ext_dma1___bit 1
285#define reg_bif_dma_rw_intr_mask___ext_dma2___lsb 2
286#define reg_bif_dma_rw_intr_mask___ext_dma2___width 1
287#define reg_bif_dma_rw_intr_mask___ext_dma2___bit 2
288#define reg_bif_dma_rw_intr_mask___ext_dma3___lsb 3
289#define reg_bif_dma_rw_intr_mask___ext_dma3___width 1
290#define reg_bif_dma_rw_intr_mask___ext_dma3___bit 3
291#define reg_bif_dma_rw_intr_mask_offset 128
292
293/* Register rw_ack_intr, scope bif_dma, type rw */
294#define reg_bif_dma_rw_ack_intr___ext_dma0___lsb 0
295#define reg_bif_dma_rw_ack_intr___ext_dma0___width 1
296#define reg_bif_dma_rw_ack_intr___ext_dma0___bit 0
297#define reg_bif_dma_rw_ack_intr___ext_dma1___lsb 1
298#define reg_bif_dma_rw_ack_intr___ext_dma1___width 1
299#define reg_bif_dma_rw_ack_intr___ext_dma1___bit 1
300#define reg_bif_dma_rw_ack_intr___ext_dma2___lsb 2
301#define reg_bif_dma_rw_ack_intr___ext_dma2___width 1
302#define reg_bif_dma_rw_ack_intr___ext_dma2___bit 2
303#define reg_bif_dma_rw_ack_intr___ext_dma3___lsb 3
304#define reg_bif_dma_rw_ack_intr___ext_dma3___width 1
305#define reg_bif_dma_rw_ack_intr___ext_dma3___bit 3
306#define reg_bif_dma_rw_ack_intr_offset 132
307
308/* Register r_intr, scope bif_dma, type r */
309#define reg_bif_dma_r_intr___ext_dma0___lsb 0
310#define reg_bif_dma_r_intr___ext_dma0___width 1
311#define reg_bif_dma_r_intr___ext_dma0___bit 0
312#define reg_bif_dma_r_intr___ext_dma1___lsb 1
313#define reg_bif_dma_r_intr___ext_dma1___width 1
314#define reg_bif_dma_r_intr___ext_dma1___bit 1
315#define reg_bif_dma_r_intr___ext_dma2___lsb 2
316#define reg_bif_dma_r_intr___ext_dma2___width 1
317#define reg_bif_dma_r_intr___ext_dma2___bit 2
318#define reg_bif_dma_r_intr___ext_dma3___lsb 3
319#define reg_bif_dma_r_intr___ext_dma3___width 1
320#define reg_bif_dma_r_intr___ext_dma3___bit 3
321#define reg_bif_dma_r_intr_offset 136
322
323/* Register r_masked_intr, scope bif_dma, type r */
324#define reg_bif_dma_r_masked_intr___ext_dma0___lsb 0
325#define reg_bif_dma_r_masked_intr___ext_dma0___width 1
326#define reg_bif_dma_r_masked_intr___ext_dma0___bit 0
327#define reg_bif_dma_r_masked_intr___ext_dma1___lsb 1
328#define reg_bif_dma_r_masked_intr___ext_dma1___width 1
329#define reg_bif_dma_r_masked_intr___ext_dma1___bit 1
330#define reg_bif_dma_r_masked_intr___ext_dma2___lsb 2
331#define reg_bif_dma_r_masked_intr___ext_dma2___width 1
332#define reg_bif_dma_r_masked_intr___ext_dma2___bit 2
333#define reg_bif_dma_r_masked_intr___ext_dma3___lsb 3
334#define reg_bif_dma_r_masked_intr___ext_dma3___width 1
335#define reg_bif_dma_r_masked_intr___ext_dma3___bit 3
336#define reg_bif_dma_r_masked_intr_offset 140
337
338/* Register rw_pin0_cfg, scope bif_dma, type rw */
339#define reg_bif_dma_rw_pin0_cfg___master_ch___lsb 0
340#define reg_bif_dma_rw_pin0_cfg___master_ch___width 2
341#define reg_bif_dma_rw_pin0_cfg___master_mode___lsb 2
342#define reg_bif_dma_rw_pin0_cfg___master_mode___width 3
343#define reg_bif_dma_rw_pin0_cfg___slave_ch___lsb 5
344#define reg_bif_dma_rw_pin0_cfg___slave_ch___width 2
345#define reg_bif_dma_rw_pin0_cfg___slave_mode___lsb 7
346#define reg_bif_dma_rw_pin0_cfg___slave_mode___width 3
347#define reg_bif_dma_rw_pin0_cfg_offset 160
348
349/* Register rw_pin1_cfg, scope bif_dma, type rw */
350#define reg_bif_dma_rw_pin1_cfg___master_ch___lsb 0
351#define reg_bif_dma_rw_pin1_cfg___master_ch___width 2
352#define reg_bif_dma_rw_pin1_cfg___master_mode___lsb 2
353#define reg_bif_dma_rw_pin1_cfg___master_mode___width 3
354#define reg_bif_dma_rw_pin1_cfg___slave_ch___lsb 5
355#define reg_bif_dma_rw_pin1_cfg___slave_ch___width 2
356#define reg_bif_dma_rw_pin1_cfg___slave_mode___lsb 7
357#define reg_bif_dma_rw_pin1_cfg___slave_mode___width 3
358#define reg_bif_dma_rw_pin1_cfg_offset 164
359
360/* Register rw_pin2_cfg, scope bif_dma, type rw */
361#define reg_bif_dma_rw_pin2_cfg___master_ch___lsb 0
362#define reg_bif_dma_rw_pin2_cfg___master_ch___width 2
363#define reg_bif_dma_rw_pin2_cfg___master_mode___lsb 2
364#define reg_bif_dma_rw_pin2_cfg___master_mode___width 3
365#define reg_bif_dma_rw_pin2_cfg___slave_ch___lsb 5
366#define reg_bif_dma_rw_pin2_cfg___slave_ch___width 2
367#define reg_bif_dma_rw_pin2_cfg___slave_mode___lsb 7
368#define reg_bif_dma_rw_pin2_cfg___slave_mode___width 3
369#define reg_bif_dma_rw_pin2_cfg_offset 168
370
371/* Register rw_pin3_cfg, scope bif_dma, type rw */
372#define reg_bif_dma_rw_pin3_cfg___master_ch___lsb 0
373#define reg_bif_dma_rw_pin3_cfg___master_ch___width 2
374#define reg_bif_dma_rw_pin3_cfg___master_mode___lsb 2
375#define reg_bif_dma_rw_pin3_cfg___master_mode___width 3
376#define reg_bif_dma_rw_pin3_cfg___slave_ch___lsb 5
377#define reg_bif_dma_rw_pin3_cfg___slave_ch___width 2
378#define reg_bif_dma_rw_pin3_cfg___slave_mode___lsb 7
379#define reg_bif_dma_rw_pin3_cfg___slave_mode___width 3
380#define reg_bif_dma_rw_pin3_cfg_offset 172
381
382/* Register rw_pin4_cfg, scope bif_dma, type rw */
383#define reg_bif_dma_rw_pin4_cfg___master_ch___lsb 0
384#define reg_bif_dma_rw_pin4_cfg___master_ch___width 2
385#define reg_bif_dma_rw_pin4_cfg___master_mode___lsb 2
386#define reg_bif_dma_rw_pin4_cfg___master_mode___width 3
387#define reg_bif_dma_rw_pin4_cfg___slave_ch___lsb 5
388#define reg_bif_dma_rw_pin4_cfg___slave_ch___width 2
389#define reg_bif_dma_rw_pin4_cfg___slave_mode___lsb 7
390#define reg_bif_dma_rw_pin4_cfg___slave_mode___width 3
391#define reg_bif_dma_rw_pin4_cfg_offset 176
392
393/* Register rw_pin5_cfg, scope bif_dma, type rw */
394#define reg_bif_dma_rw_pin5_cfg___master_ch___lsb 0
395#define reg_bif_dma_rw_pin5_cfg___master_ch___width 2
396#define reg_bif_dma_rw_pin5_cfg___master_mode___lsb 2
397#define reg_bif_dma_rw_pin5_cfg___master_mode___width 3
398#define reg_bif_dma_rw_pin5_cfg___slave_ch___lsb 5
399#define reg_bif_dma_rw_pin5_cfg___slave_ch___width 2
400#define reg_bif_dma_rw_pin5_cfg___slave_mode___lsb 7
401#define reg_bif_dma_rw_pin5_cfg___slave_mode___width 3
402#define reg_bif_dma_rw_pin5_cfg_offset 180
403
404/* Register rw_pin6_cfg, scope bif_dma, type rw */
405#define reg_bif_dma_rw_pin6_cfg___master_ch___lsb 0
406#define reg_bif_dma_rw_pin6_cfg___master_ch___width 2
407#define reg_bif_dma_rw_pin6_cfg___master_mode___lsb 2
408#define reg_bif_dma_rw_pin6_cfg___master_mode___width 3
409#define reg_bif_dma_rw_pin6_cfg___slave_ch___lsb 5
410#define reg_bif_dma_rw_pin6_cfg___slave_ch___width 2
411#define reg_bif_dma_rw_pin6_cfg___slave_mode___lsb 7
412#define reg_bif_dma_rw_pin6_cfg___slave_mode___width 3
413#define reg_bif_dma_rw_pin6_cfg_offset 184
414
415/* Register rw_pin7_cfg, scope bif_dma, type rw */
416#define reg_bif_dma_rw_pin7_cfg___master_ch___lsb 0
417#define reg_bif_dma_rw_pin7_cfg___master_ch___width 2
418#define reg_bif_dma_rw_pin7_cfg___master_mode___lsb 2
419#define reg_bif_dma_rw_pin7_cfg___master_mode___width 3
420#define reg_bif_dma_rw_pin7_cfg___slave_ch___lsb 5
421#define reg_bif_dma_rw_pin7_cfg___slave_ch___width 2
422#define reg_bif_dma_rw_pin7_cfg___slave_mode___lsb 7
423#define reg_bif_dma_rw_pin7_cfg___slave_mode___width 3
424#define reg_bif_dma_rw_pin7_cfg_offset 188
425
426/* Register r_pin_stat, scope bif_dma, type r */
427#define reg_bif_dma_r_pin_stat___pin0___lsb 0
428#define reg_bif_dma_r_pin_stat___pin0___width 1
429#define reg_bif_dma_r_pin_stat___pin0___bit 0
430#define reg_bif_dma_r_pin_stat___pin1___lsb 1
431#define reg_bif_dma_r_pin_stat___pin1___width 1
432#define reg_bif_dma_r_pin_stat___pin1___bit 1
433#define reg_bif_dma_r_pin_stat___pin2___lsb 2
434#define reg_bif_dma_r_pin_stat___pin2___width 1
435#define reg_bif_dma_r_pin_stat___pin2___bit 2
436#define reg_bif_dma_r_pin_stat___pin3___lsb 3
437#define reg_bif_dma_r_pin_stat___pin3___width 1
438#define reg_bif_dma_r_pin_stat___pin3___bit 3
439#define reg_bif_dma_r_pin_stat___pin4___lsb 4
440#define reg_bif_dma_r_pin_stat___pin4___width 1
441#define reg_bif_dma_r_pin_stat___pin4___bit 4
442#define reg_bif_dma_r_pin_stat___pin5___lsb 5
443#define reg_bif_dma_r_pin_stat___pin5___width 1
444#define reg_bif_dma_r_pin_stat___pin5___bit 5
445#define reg_bif_dma_r_pin_stat___pin6___lsb 6
446#define reg_bif_dma_r_pin_stat___pin6___width 1
447#define reg_bif_dma_r_pin_stat___pin6___bit 6
448#define reg_bif_dma_r_pin_stat___pin7___lsb 7
449#define reg_bif_dma_r_pin_stat___pin7___width 1
450#define reg_bif_dma_r_pin_stat___pin7___bit 7
451#define reg_bif_dma_r_pin_stat_offset 192
452
453
454/* Constants */
455#define regk_bif_dma_as_master 0x00000001
456#define regk_bif_dma_as_slave 0x00000001
457#define regk_bif_dma_burst1 0x00000000
458#define regk_bif_dma_burst8 0x00000001
459#define regk_bif_dma_bw16 0x00000001
460#define regk_bif_dma_bw32 0x00000002
461#define regk_bif_dma_bw8 0x00000000
462#define regk_bif_dma_dack 0x00000006
463#define regk_bif_dma_dack_inv 0x00000007
464#define regk_bif_dma_force 0x00000001
465#define regk_bif_dma_hi 0x00000003
466#define regk_bif_dma_inv 0x00000003
467#define regk_bif_dma_lo 0x00000002
468#define regk_bif_dma_master 0x00000001
469#define regk_bif_dma_no 0x00000000
470#define regk_bif_dma_norm 0x00000002
471#define regk_bif_dma_off 0x00000000
472#define regk_bif_dma_rw_ch0_ctrl_default 0x00000000
473#define regk_bif_dma_rw_ch0_start_default 0x00000000
474#define regk_bif_dma_rw_ch1_ctrl_default 0x00000000
475#define regk_bif_dma_rw_ch1_start_default 0x00000000
476#define regk_bif_dma_rw_ch2_ctrl_default 0x00000000
477#define regk_bif_dma_rw_ch2_start_default 0x00000000
478#define regk_bif_dma_rw_ch3_ctrl_default 0x00000000
479#define regk_bif_dma_rw_ch3_start_default 0x00000000
480#define regk_bif_dma_rw_intr_mask_default 0x00000000
481#define regk_bif_dma_rw_pin0_cfg_default 0x00000000
482#define regk_bif_dma_rw_pin1_cfg_default 0x00000000
483#define regk_bif_dma_rw_pin2_cfg_default 0x00000000
484#define regk_bif_dma_rw_pin3_cfg_default 0x00000000
485#define regk_bif_dma_rw_pin4_cfg_default 0x00000000
486#define regk_bif_dma_rw_pin5_cfg_default 0x00000000
487#define regk_bif_dma_rw_pin6_cfg_default 0x00000000
488#define regk_bif_dma_rw_pin7_cfg_default 0x00000000
489#define regk_bif_dma_slave 0x00000002
490#define regk_bif_dma_sreq 0x00000006
491#define regk_bif_dma_sreq_inv 0x00000007
492#define regk_bif_dma_tc 0x00000004
493#define regk_bif_dma_tc_inv 0x00000005
494#define regk_bif_dma_yes 0x00000001
495#endif /* __bif_dma_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/bif_slave_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/bif_slave_defs_asm.h
deleted file mode 100644
index 031f33a365bb..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/bif_slave_defs_asm.h
+++ /dev/null
@@ -1,249 +0,0 @@
1#ifndef __bif_slave_defs_asm_h
2#define __bif_slave_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_slave_regs.r
7 * id: bif_slave_regs.r,v 1.5 2005/02/04 13:55:28 perz Exp
8 * last modfied: Mon Apr 11 16:06:34 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/bif_slave_defs_asm.h ../../inst/bif/rtl/bif_slave_regs.r
11 * id: $Id: bif_slave_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_slave_cfg, scope bif_slave, type rw */
57#define reg_bif_slave_rw_slave_cfg___slave_id___lsb 0
58#define reg_bif_slave_rw_slave_cfg___slave_id___width 3
59#define reg_bif_slave_rw_slave_cfg___use_slave_id___lsb 3
60#define reg_bif_slave_rw_slave_cfg___use_slave_id___width 1
61#define reg_bif_slave_rw_slave_cfg___use_slave_id___bit 3
62#define reg_bif_slave_rw_slave_cfg___boot_rdy___lsb 4
63#define reg_bif_slave_rw_slave_cfg___boot_rdy___width 1
64#define reg_bif_slave_rw_slave_cfg___boot_rdy___bit 4
65#define reg_bif_slave_rw_slave_cfg___loopback___lsb 5
66#define reg_bif_slave_rw_slave_cfg___loopback___width 1
67#define reg_bif_slave_rw_slave_cfg___loopback___bit 5
68#define reg_bif_slave_rw_slave_cfg___dis___lsb 6
69#define reg_bif_slave_rw_slave_cfg___dis___width 1
70#define reg_bif_slave_rw_slave_cfg___dis___bit 6
71#define reg_bif_slave_rw_slave_cfg_offset 0
72
73/* Register r_slave_mode, scope bif_slave, type r */
74#define reg_bif_slave_r_slave_mode___ch0_mode___lsb 0
75#define reg_bif_slave_r_slave_mode___ch0_mode___width 1
76#define reg_bif_slave_r_slave_mode___ch0_mode___bit 0
77#define reg_bif_slave_r_slave_mode___ch1_mode___lsb 1
78#define reg_bif_slave_r_slave_mode___ch1_mode___width 1
79#define reg_bif_slave_r_slave_mode___ch1_mode___bit 1
80#define reg_bif_slave_r_slave_mode___ch2_mode___lsb 2
81#define reg_bif_slave_r_slave_mode___ch2_mode___width 1
82#define reg_bif_slave_r_slave_mode___ch2_mode___bit 2
83#define reg_bif_slave_r_slave_mode___ch3_mode___lsb 3
84#define reg_bif_slave_r_slave_mode___ch3_mode___width 1
85#define reg_bif_slave_r_slave_mode___ch3_mode___bit 3
86#define reg_bif_slave_r_slave_mode_offset 4
87
88/* Register rw_ch0_cfg, scope bif_slave, type rw */
89#define reg_bif_slave_rw_ch0_cfg___rd_hold___lsb 0
90#define reg_bif_slave_rw_ch0_cfg___rd_hold___width 2
91#define reg_bif_slave_rw_ch0_cfg___access_mode___lsb 2
92#define reg_bif_slave_rw_ch0_cfg___access_mode___width 1
93#define reg_bif_slave_rw_ch0_cfg___access_mode___bit 2
94#define reg_bif_slave_rw_ch0_cfg___access_ctrl___lsb 3
95#define reg_bif_slave_rw_ch0_cfg___access_ctrl___width 1
96#define reg_bif_slave_rw_ch0_cfg___access_ctrl___bit 3
97#define reg_bif_slave_rw_ch0_cfg___data_cs___lsb 4
98#define reg_bif_slave_rw_ch0_cfg___data_cs___width 2
99#define reg_bif_slave_rw_ch0_cfg_offset 16
100
101/* Register rw_ch1_cfg, scope bif_slave, type rw */
102#define reg_bif_slave_rw_ch1_cfg___rd_hold___lsb 0
103#define reg_bif_slave_rw_ch1_cfg___rd_hold___width 2
104#define reg_bif_slave_rw_ch1_cfg___access_mode___lsb 2
105#define reg_bif_slave_rw_ch1_cfg___access_mode___width 1
106#define reg_bif_slave_rw_ch1_cfg___access_mode___bit 2
107#define reg_bif_slave_rw_ch1_cfg___access_ctrl___lsb 3
108#define reg_bif_slave_rw_ch1_cfg___access_ctrl___width 1
109#define reg_bif_slave_rw_ch1_cfg___access_ctrl___bit 3
110#define reg_bif_slave_rw_ch1_cfg___data_cs___lsb 4
111#define reg_bif_slave_rw_ch1_cfg___data_cs___width 2
112#define reg_bif_slave_rw_ch1_cfg_offset 20
113
114/* Register rw_ch2_cfg, scope bif_slave, type rw */
115#define reg_bif_slave_rw_ch2_cfg___rd_hold___lsb 0
116#define reg_bif_slave_rw_ch2_cfg___rd_hold___width 2
117#define reg_bif_slave_rw_ch2_cfg___access_mode___lsb 2
118#define reg_bif_slave_rw_ch2_cfg___access_mode___width 1
119#define reg_bif_slave_rw_ch2_cfg___access_mode___bit 2
120#define reg_bif_slave_rw_ch2_cfg___access_ctrl___lsb 3
121#define reg_bif_slave_rw_ch2_cfg___access_ctrl___width 1
122#define reg_bif_slave_rw_ch2_cfg___access_ctrl___bit 3
123#define reg_bif_slave_rw_ch2_cfg___data_cs___lsb 4
124#define reg_bif_slave_rw_ch2_cfg___data_cs___width 2
125#define reg_bif_slave_rw_ch2_cfg_offset 24
126
127/* Register rw_ch3_cfg, scope bif_slave, type rw */
128#define reg_bif_slave_rw_ch3_cfg___rd_hold___lsb 0
129#define reg_bif_slave_rw_ch3_cfg___rd_hold___width 2
130#define reg_bif_slave_rw_ch3_cfg___access_mode___lsb 2
131#define reg_bif_slave_rw_ch3_cfg___access_mode___width 1
132#define reg_bif_slave_rw_ch3_cfg___access_mode___bit 2
133#define reg_bif_slave_rw_ch3_cfg___access_ctrl___lsb 3
134#define reg_bif_slave_rw_ch3_cfg___access_ctrl___width 1
135#define reg_bif_slave_rw_ch3_cfg___access_ctrl___bit 3
136#define reg_bif_slave_rw_ch3_cfg___data_cs___lsb 4
137#define reg_bif_slave_rw_ch3_cfg___data_cs___width 2
138#define reg_bif_slave_rw_ch3_cfg_offset 28
139
140/* Register rw_arb_cfg, scope bif_slave, type rw */
141#define reg_bif_slave_rw_arb_cfg___brin_mode___lsb 0
142#define reg_bif_slave_rw_arb_cfg___brin_mode___width 1
143#define reg_bif_slave_rw_arb_cfg___brin_mode___bit 0
144#define reg_bif_slave_rw_arb_cfg___brout_mode___lsb 1
145#define reg_bif_slave_rw_arb_cfg___brout_mode___width 3
146#define reg_bif_slave_rw_arb_cfg___bg_mode___lsb 4
147#define reg_bif_slave_rw_arb_cfg___bg_mode___width 3
148#define reg_bif_slave_rw_arb_cfg___release___lsb 7
149#define reg_bif_slave_rw_arb_cfg___release___width 2
150#define reg_bif_slave_rw_arb_cfg___acquire___lsb 9
151#define reg_bif_slave_rw_arb_cfg___acquire___width 1
152#define reg_bif_slave_rw_arb_cfg___acquire___bit 9
153#define reg_bif_slave_rw_arb_cfg___settle_time___lsb 10
154#define reg_bif_slave_rw_arb_cfg___settle_time___width 2
155#define reg_bif_slave_rw_arb_cfg___dram_ctrl___lsb 12
156#define reg_bif_slave_rw_arb_cfg___dram_ctrl___width 1
157#define reg_bif_slave_rw_arb_cfg___dram_ctrl___bit 12
158#define reg_bif_slave_rw_arb_cfg_offset 32
159
160/* Register r_arb_stat, scope bif_slave, type r */
161#define reg_bif_slave_r_arb_stat___init_mode___lsb 0
162#define reg_bif_slave_r_arb_stat___init_mode___width 1
163#define reg_bif_slave_r_arb_stat___init_mode___bit 0
164#define reg_bif_slave_r_arb_stat___mode___lsb 1
165#define reg_bif_slave_r_arb_stat___mode___width 1
166#define reg_bif_slave_r_arb_stat___mode___bit 1
167#define reg_bif_slave_r_arb_stat___brin___lsb 2
168#define reg_bif_slave_r_arb_stat___brin___width 1
169#define reg_bif_slave_r_arb_stat___brin___bit 2
170#define reg_bif_slave_r_arb_stat___brout___lsb 3
171#define reg_bif_slave_r_arb_stat___brout___width 1
172#define reg_bif_slave_r_arb_stat___brout___bit 3
173#define reg_bif_slave_r_arb_stat___bg___lsb 4
174#define reg_bif_slave_r_arb_stat___bg___width 1
175#define reg_bif_slave_r_arb_stat___bg___bit 4
176#define reg_bif_slave_r_arb_stat_offset 36
177
178/* Register rw_intr_mask, scope bif_slave, type rw */
179#define reg_bif_slave_rw_intr_mask___bus_release___lsb 0
180#define reg_bif_slave_rw_intr_mask___bus_release___width 1
181#define reg_bif_slave_rw_intr_mask___bus_release___bit 0
182#define reg_bif_slave_rw_intr_mask___bus_acquire___lsb 1
183#define reg_bif_slave_rw_intr_mask___bus_acquire___width 1
184#define reg_bif_slave_rw_intr_mask___bus_acquire___bit 1
185#define reg_bif_slave_rw_intr_mask_offset 64
186
187/* Register rw_ack_intr, scope bif_slave, type rw */
188#define reg_bif_slave_rw_ack_intr___bus_release___lsb 0
189#define reg_bif_slave_rw_ack_intr___bus_release___width 1
190#define reg_bif_slave_rw_ack_intr___bus_release___bit 0
191#define reg_bif_slave_rw_ack_intr___bus_acquire___lsb 1
192#define reg_bif_slave_rw_ack_intr___bus_acquire___width 1
193#define reg_bif_slave_rw_ack_intr___bus_acquire___bit 1
194#define reg_bif_slave_rw_ack_intr_offset 68
195
196/* Register r_intr, scope bif_slave, type r */
197#define reg_bif_slave_r_intr___bus_release___lsb 0
198#define reg_bif_slave_r_intr___bus_release___width 1
199#define reg_bif_slave_r_intr___bus_release___bit 0
200#define reg_bif_slave_r_intr___bus_acquire___lsb 1
201#define reg_bif_slave_r_intr___bus_acquire___width 1
202#define reg_bif_slave_r_intr___bus_acquire___bit 1
203#define reg_bif_slave_r_intr_offset 72
204
205/* Register r_masked_intr, scope bif_slave, type r */
206#define reg_bif_slave_r_masked_intr___bus_release___lsb 0
207#define reg_bif_slave_r_masked_intr___bus_release___width 1
208#define reg_bif_slave_r_masked_intr___bus_release___bit 0
209#define reg_bif_slave_r_masked_intr___bus_acquire___lsb 1
210#define reg_bif_slave_r_masked_intr___bus_acquire___width 1
211#define reg_bif_slave_r_masked_intr___bus_acquire___bit 1
212#define reg_bif_slave_r_masked_intr_offset 76
213
214
215/* Constants */
216#define regk_bif_slave_active_hi 0x00000003
217#define regk_bif_slave_active_lo 0x00000002
218#define regk_bif_slave_addr 0x00000000
219#define regk_bif_slave_always 0x00000001
220#define regk_bif_slave_at_idle 0x00000002
221#define regk_bif_slave_burst_end 0x00000003
222#define regk_bif_slave_dma 0x00000001
223#define regk_bif_slave_hi 0x00000003
224#define regk_bif_slave_inv 0x00000001
225#define regk_bif_slave_lo 0x00000002
226#define regk_bif_slave_local 0x00000001
227#define regk_bif_slave_master 0x00000000
228#define regk_bif_slave_mode_reg 0x00000001
229#define regk_bif_slave_no 0x00000000
230#define regk_bif_slave_norm 0x00000000
231#define regk_bif_slave_on_access 0x00000000
232#define regk_bif_slave_rw_arb_cfg_default 0x00000000
233#define regk_bif_slave_rw_ch0_cfg_default 0x00000000
234#define regk_bif_slave_rw_ch1_cfg_default 0x00000000
235#define regk_bif_slave_rw_ch2_cfg_default 0x00000000
236#define regk_bif_slave_rw_ch3_cfg_default 0x00000000
237#define regk_bif_slave_rw_intr_mask_default 0x00000000
238#define regk_bif_slave_rw_slave_cfg_default 0x00000000
239#define regk_bif_slave_shared 0x00000000
240#define regk_bif_slave_slave 0x00000001
241#define regk_bif_slave_t0ns 0x00000003
242#define regk_bif_slave_t10ns 0x00000002
243#define regk_bif_slave_t20ns 0x00000003
244#define regk_bif_slave_t30ns 0x00000002
245#define regk_bif_slave_t40ns 0x00000001
246#define regk_bif_slave_t50ns 0x00000000
247#define regk_bif_slave_yes 0x00000001
248#define regk_bif_slave_z 0x00000004
249#endif /* __bif_slave_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/config_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/config_defs_asm.h
deleted file mode 100644
index e98476332e1f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/config_defs_asm.h
+++ /dev/null
@@ -1,131 +0,0 @@
1#ifndef __config_defs_asm_h
2#define __config_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../rtl/config_regs.r
7 * id: config_regs.r,v 1.23 2004/03/04 11:34:42 mikaeln Exp
8 * last modfied: Thu Mar 4 12:34:39 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/config_defs_asm.h ../../rtl/config_regs.r
11 * id: $Id: config_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register r_bootsel, scope config, type r */
57#define reg_config_r_bootsel___boot_mode___lsb 0
58#define reg_config_r_bootsel___boot_mode___width 3
59#define reg_config_r_bootsel___full_duplex___lsb 3
60#define reg_config_r_bootsel___full_duplex___width 1
61#define reg_config_r_bootsel___full_duplex___bit 3
62#define reg_config_r_bootsel___user___lsb 4
63#define reg_config_r_bootsel___user___width 1
64#define reg_config_r_bootsel___user___bit 4
65#define reg_config_r_bootsel___pll___lsb 5
66#define reg_config_r_bootsel___pll___width 1
67#define reg_config_r_bootsel___pll___bit 5
68#define reg_config_r_bootsel___flash_bw___lsb 6
69#define reg_config_r_bootsel___flash_bw___width 1
70#define reg_config_r_bootsel___flash_bw___bit 6
71#define reg_config_r_bootsel_offset 0
72
73/* Register rw_clk_ctrl, scope config, type rw */
74#define reg_config_rw_clk_ctrl___pll___lsb 0
75#define reg_config_rw_clk_ctrl___pll___width 1
76#define reg_config_rw_clk_ctrl___pll___bit 0
77#define reg_config_rw_clk_ctrl___cpu___lsb 1
78#define reg_config_rw_clk_ctrl___cpu___width 1
79#define reg_config_rw_clk_ctrl___cpu___bit 1
80#define reg_config_rw_clk_ctrl___iop___lsb 2
81#define reg_config_rw_clk_ctrl___iop___width 1
82#define reg_config_rw_clk_ctrl___iop___bit 2
83#define reg_config_rw_clk_ctrl___dma01_eth0___lsb 3
84#define reg_config_rw_clk_ctrl___dma01_eth0___width 1
85#define reg_config_rw_clk_ctrl___dma01_eth0___bit 3
86#define reg_config_rw_clk_ctrl___dma23___lsb 4
87#define reg_config_rw_clk_ctrl___dma23___width 1
88#define reg_config_rw_clk_ctrl___dma23___bit 4
89#define reg_config_rw_clk_ctrl___dma45___lsb 5
90#define reg_config_rw_clk_ctrl___dma45___width 1
91#define reg_config_rw_clk_ctrl___dma45___bit 5
92#define reg_config_rw_clk_ctrl___dma67___lsb 6
93#define reg_config_rw_clk_ctrl___dma67___width 1
94#define reg_config_rw_clk_ctrl___dma67___bit 6
95#define reg_config_rw_clk_ctrl___dma89_strcop___lsb 7
96#define reg_config_rw_clk_ctrl___dma89_strcop___width 1
97#define reg_config_rw_clk_ctrl___dma89_strcop___bit 7
98#define reg_config_rw_clk_ctrl___bif___lsb 8
99#define reg_config_rw_clk_ctrl___bif___width 1
100#define reg_config_rw_clk_ctrl___bif___bit 8
101#define reg_config_rw_clk_ctrl___fix_io___lsb 9
102#define reg_config_rw_clk_ctrl___fix_io___width 1
103#define reg_config_rw_clk_ctrl___fix_io___bit 9
104#define reg_config_rw_clk_ctrl_offset 4
105
106/* Register rw_pad_ctrl, scope config, type rw */
107#define reg_config_rw_pad_ctrl___usb_susp___lsb 0
108#define reg_config_rw_pad_ctrl___usb_susp___width 1
109#define reg_config_rw_pad_ctrl___usb_susp___bit 0
110#define reg_config_rw_pad_ctrl___phyrst_n___lsb 1
111#define reg_config_rw_pad_ctrl___phyrst_n___width 1
112#define reg_config_rw_pad_ctrl___phyrst_n___bit 1
113#define reg_config_rw_pad_ctrl_offset 8
114
115
116/* Constants */
117#define regk_config_bw16 0x00000000
118#define regk_config_bw32 0x00000001
119#define regk_config_master 0x00000005
120#define regk_config_nand 0x00000003
121#define regk_config_net_rx 0x00000001
122#define regk_config_net_tx_rx 0x00000002
123#define regk_config_no 0x00000000
124#define regk_config_none 0x00000007
125#define regk_config_nor 0x00000000
126#define regk_config_rw_clk_ctrl_default 0x00000002
127#define regk_config_rw_pad_ctrl_default 0x00000000
128#define regk_config_ser 0x00000004
129#define regk_config_slave 0x00000006
130#define regk_config_yes 0x00000001
131#endif /* __config_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/cpu_vect.h b/include/asm-cris/arch-v32/hwregs/asm/cpu_vect.h
deleted file mode 100644
index 8370aee8a14a..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/cpu_vect.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
2 from ../../inst/crisp/doc/cpu_vect.r
3version . */
4
5#ifndef _______INST_CRISP_DOC_CPU_VECT_R
6#define _______INST_CRISP_DOC_CPU_VECT_R
7#define NMI_INTR_VECT 0x00
8#define RESERVED_1_INTR_VECT 0x01
9#define RESERVED_2_INTR_VECT 0x02
10#define SINGLE_STEP_INTR_VECT 0x03
11#define INSTR_TLB_REFILL_INTR_VECT 0x04
12#define INSTR_TLB_INV_INTR_VECT 0x05
13#define INSTR_TLB_ACC_INTR_VECT 0x06
14#define TLB_EX_INTR_VECT 0x07
15#define DATA_TLB_REFILL_INTR_VECT 0x08
16#define DATA_TLB_INV_INTR_VECT 0x09
17#define DATA_TLB_ACC_INTR_VECT 0x0a
18#define DATA_TLB_WE_INTR_VECT 0x0b
19#define HW_BP_INTR_VECT 0x0c
20#define RESERVED_D_INTR_VECT 0x0d
21#define RESERVED_E_INTR_VECT 0x0e
22#define RESERVED_F_INTR_VECT 0x0f
23#define BREAK_0_INTR_VECT 0x10
24#define BREAK_1_INTR_VECT 0x11
25#define BREAK_2_INTR_VECT 0x12
26#define BREAK_3_INTR_VECT 0x13
27#define BREAK_4_INTR_VECT 0x14
28#define BREAK_5_INTR_VECT 0x15
29#define BREAK_6_INTR_VECT 0x16
30#define BREAK_7_INTR_VECT 0x17
31#define BREAK_8_INTR_VECT 0x18
32#define BREAK_9_INTR_VECT 0x19
33#define BREAK_10_INTR_VECT 0x1a
34#define BREAK_11_INTR_VECT 0x1b
35#define BREAK_12_INTR_VECT 0x1c
36#define BREAK_13_INTR_VECT 0x1d
37#define BREAK_14_INTR_VECT 0x1e
38#define BREAK_15_INTR_VECT 0x1f
39#define MULTIPLE_INTR_VECT 0x30
40
41#endif
diff --git a/include/asm-cris/arch-v32/hwregs/asm/cris_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/cris_defs_asm.h
deleted file mode 100644
index 7f768db272e2..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/cris_defs_asm.h
+++ /dev/null
@@ -1,114 +0,0 @@
1#ifndef __cris_defs_asm_h
2#define __cris_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/crisp/doc/cris.r
7 * id: cris.r,v 1.6 2004/05/05 07:41:12 perz Exp
8 * last modfied: Mon Apr 11 16:06:39 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/cris_defs_asm.h ../../inst/crisp/doc/cris.r
11 * id: $Id: cris_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_gc_cfg, scope cris, type rw */
57#define reg_cris_rw_gc_cfg___ic___lsb 0
58#define reg_cris_rw_gc_cfg___ic___width 1
59#define reg_cris_rw_gc_cfg___ic___bit 0
60#define reg_cris_rw_gc_cfg___dc___lsb 1
61#define reg_cris_rw_gc_cfg___dc___width 1
62#define reg_cris_rw_gc_cfg___dc___bit 1
63#define reg_cris_rw_gc_cfg___im___lsb 2
64#define reg_cris_rw_gc_cfg___im___width 1
65#define reg_cris_rw_gc_cfg___im___bit 2
66#define reg_cris_rw_gc_cfg___dm___lsb 3
67#define reg_cris_rw_gc_cfg___dm___width 1
68#define reg_cris_rw_gc_cfg___dm___bit 3
69#define reg_cris_rw_gc_cfg___gb___lsb 4
70#define reg_cris_rw_gc_cfg___gb___width 1
71#define reg_cris_rw_gc_cfg___gb___bit 4
72#define reg_cris_rw_gc_cfg___gk___lsb 5
73#define reg_cris_rw_gc_cfg___gk___width 1
74#define reg_cris_rw_gc_cfg___gk___bit 5
75#define reg_cris_rw_gc_cfg___gp___lsb 6
76#define reg_cris_rw_gc_cfg___gp___width 1
77#define reg_cris_rw_gc_cfg___gp___bit 6
78#define reg_cris_rw_gc_cfg_offset 0
79
80/* Register rw_gc_ccs, scope cris, type rw */
81#define reg_cris_rw_gc_ccs_offset 4
82
83/* Register rw_gc_srs, scope cris, type rw */
84#define reg_cris_rw_gc_srs___srs___lsb 0
85#define reg_cris_rw_gc_srs___srs___width 8
86#define reg_cris_rw_gc_srs_offset 8
87
88/* Register rw_gc_nrp, scope cris, type rw */
89#define reg_cris_rw_gc_nrp_offset 12
90
91/* Register rw_gc_exs, scope cris, type rw */
92#define reg_cris_rw_gc_exs_offset 16
93
94/* Register rw_gc_eda, scope cris, type rw */
95#define reg_cris_rw_gc_eda_offset 20
96
97/* Register rw_gc_r0, scope cris, type rw */
98#define reg_cris_rw_gc_r0_offset 32
99
100/* Register rw_gc_r1, scope cris, type rw */
101#define reg_cris_rw_gc_r1_offset 36
102
103/* Register rw_gc_r2, scope cris, type rw */
104#define reg_cris_rw_gc_r2_offset 40
105
106/* Register rw_gc_r3, scope cris, type rw */
107#define reg_cris_rw_gc_r3_offset 44
108
109
110/* Constants */
111#define regk_cris_no 0x00000000
112#define regk_cris_rw_gc_cfg_default 0x00000000
113#define regk_cris_yes 0x00000001
114#endif /* __cris_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/cris_supp_reg.h b/include/asm-cris/arch-v32/hwregs/asm/cris_supp_reg.h
deleted file mode 100644
index 7d3689a6f80d..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/cris_supp_reg.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#define RW_GC_CFG 0
2#define RW_GC_CCS 1
3#define RW_GC_SRS 2
4#define RW_GC_NRP 3
5#define RW_GC_EXS 4
6#define RW_GC_EDA 5
7#define RW_GC_R0 8
8#define RW_GC_R1 9
9#define RW_GC_R2 10
10#define RW_GC_R3 11
diff --git a/include/asm-cris/arch-v32/hwregs/asm/dma_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/dma_defs_asm.h
deleted file mode 100644
index 0cb71bc127ae..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/dma_defs_asm.h
+++ /dev/null
@@ -1,368 +0,0 @@
1#ifndef __dma_defs_asm_h
2#define __dma_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/dma/inst/dma_common/rtl/dma_regdes.r
7 * id: dma_regdes.r,v 1.39 2005/02/10 14:07:23 janb Exp
8 * last modfied: Mon Apr 11 16:06:51 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/dma_defs_asm.h ../../inst/dma/inst/dma_common/rtl/dma_regdes.r
11 * id: $Id: dma_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_data, scope dma, type rw */
57#define reg_dma_rw_data_offset 0
58
59/* Register rw_data_next, scope dma, type rw */
60#define reg_dma_rw_data_next_offset 4
61
62/* Register rw_data_buf, scope dma, type rw */
63#define reg_dma_rw_data_buf_offset 8
64
65/* Register rw_data_ctrl, scope dma, type rw */
66#define reg_dma_rw_data_ctrl___eol___lsb 0
67#define reg_dma_rw_data_ctrl___eol___width 1
68#define reg_dma_rw_data_ctrl___eol___bit 0
69#define reg_dma_rw_data_ctrl___out_eop___lsb 3
70#define reg_dma_rw_data_ctrl___out_eop___width 1
71#define reg_dma_rw_data_ctrl___out_eop___bit 3
72#define reg_dma_rw_data_ctrl___intr___lsb 4
73#define reg_dma_rw_data_ctrl___intr___width 1
74#define reg_dma_rw_data_ctrl___intr___bit 4
75#define reg_dma_rw_data_ctrl___wait___lsb 5
76#define reg_dma_rw_data_ctrl___wait___width 1
77#define reg_dma_rw_data_ctrl___wait___bit 5
78#define reg_dma_rw_data_ctrl_offset 12
79
80/* Register rw_data_stat, scope dma, type rw */
81#define reg_dma_rw_data_stat___in_eop___lsb 3
82#define reg_dma_rw_data_stat___in_eop___width 1
83#define reg_dma_rw_data_stat___in_eop___bit 3
84#define reg_dma_rw_data_stat_offset 16
85
86/* Register rw_data_md, scope dma, type rw */
87#define reg_dma_rw_data_md___md___lsb 0
88#define reg_dma_rw_data_md___md___width 16
89#define reg_dma_rw_data_md_offset 20
90
91/* Register rw_data_md_s, scope dma, type rw */
92#define reg_dma_rw_data_md_s___md_s___lsb 0
93#define reg_dma_rw_data_md_s___md_s___width 16
94#define reg_dma_rw_data_md_s_offset 24
95
96/* Register rw_data_after, scope dma, type rw */
97#define reg_dma_rw_data_after_offset 28
98
99/* Register rw_ctxt, scope dma, type rw */
100#define reg_dma_rw_ctxt_offset 32
101
102/* Register rw_ctxt_next, scope dma, type rw */
103#define reg_dma_rw_ctxt_next_offset 36
104
105/* Register rw_ctxt_ctrl, scope dma, type rw */
106#define reg_dma_rw_ctxt_ctrl___eol___lsb 0
107#define reg_dma_rw_ctxt_ctrl___eol___width 1
108#define reg_dma_rw_ctxt_ctrl___eol___bit 0
109#define reg_dma_rw_ctxt_ctrl___intr___lsb 4
110#define reg_dma_rw_ctxt_ctrl___intr___width 1
111#define reg_dma_rw_ctxt_ctrl___intr___bit 4
112#define reg_dma_rw_ctxt_ctrl___store_mode___lsb 6
113#define reg_dma_rw_ctxt_ctrl___store_mode___width 1
114#define reg_dma_rw_ctxt_ctrl___store_mode___bit 6
115#define reg_dma_rw_ctxt_ctrl___en___lsb 7
116#define reg_dma_rw_ctxt_ctrl___en___width 1
117#define reg_dma_rw_ctxt_ctrl___en___bit 7
118#define reg_dma_rw_ctxt_ctrl_offset 40
119
120/* Register rw_ctxt_stat, scope dma, type rw */
121#define reg_dma_rw_ctxt_stat___dis___lsb 7
122#define reg_dma_rw_ctxt_stat___dis___width 1
123#define reg_dma_rw_ctxt_stat___dis___bit 7
124#define reg_dma_rw_ctxt_stat_offset 44
125
126/* Register rw_ctxt_md0, scope dma, type rw */
127#define reg_dma_rw_ctxt_md0___md0___lsb 0
128#define reg_dma_rw_ctxt_md0___md0___width 16
129#define reg_dma_rw_ctxt_md0_offset 48
130
131/* Register rw_ctxt_md0_s, scope dma, type rw */
132#define reg_dma_rw_ctxt_md0_s___md0_s___lsb 0
133#define reg_dma_rw_ctxt_md0_s___md0_s___width 16
134#define reg_dma_rw_ctxt_md0_s_offset 52
135
136/* Register rw_ctxt_md1, scope dma, type rw */
137#define reg_dma_rw_ctxt_md1_offset 56
138
139/* Register rw_ctxt_md1_s, scope dma, type rw */
140#define reg_dma_rw_ctxt_md1_s_offset 60
141
142/* Register rw_ctxt_md2, scope dma, type rw */
143#define reg_dma_rw_ctxt_md2_offset 64
144
145/* Register rw_ctxt_md2_s, scope dma, type rw */
146#define reg_dma_rw_ctxt_md2_s_offset 68
147
148/* Register rw_ctxt_md3, scope dma, type rw */
149#define reg_dma_rw_ctxt_md3_offset 72
150
151/* Register rw_ctxt_md3_s, scope dma, type rw */
152#define reg_dma_rw_ctxt_md3_s_offset 76
153
154/* Register rw_ctxt_md4, scope dma, type rw */
155#define reg_dma_rw_ctxt_md4_offset 80
156
157/* Register rw_ctxt_md4_s, scope dma, type rw */
158#define reg_dma_rw_ctxt_md4_s_offset 84
159
160/* Register rw_saved_data, scope dma, type rw */
161#define reg_dma_rw_saved_data_offset 88
162
163/* Register rw_saved_data_buf, scope dma, type rw */
164#define reg_dma_rw_saved_data_buf_offset 92
165
166/* Register rw_group, scope dma, type rw */
167#define reg_dma_rw_group_offset 96
168
169/* Register rw_group_next, scope dma, type rw */
170#define reg_dma_rw_group_next_offset 100
171
172/* Register rw_group_ctrl, scope dma, type rw */
173#define reg_dma_rw_group_ctrl___eol___lsb 0
174#define reg_dma_rw_group_ctrl___eol___width 1
175#define reg_dma_rw_group_ctrl___eol___bit 0
176#define reg_dma_rw_group_ctrl___tol___lsb 1
177#define reg_dma_rw_group_ctrl___tol___width 1
178#define reg_dma_rw_group_ctrl___tol___bit 1
179#define reg_dma_rw_group_ctrl___bol___lsb 2
180#define reg_dma_rw_group_ctrl___bol___width 1
181#define reg_dma_rw_group_ctrl___bol___bit 2
182#define reg_dma_rw_group_ctrl___intr___lsb 4
183#define reg_dma_rw_group_ctrl___intr___width 1
184#define reg_dma_rw_group_ctrl___intr___bit 4
185#define reg_dma_rw_group_ctrl___en___lsb 7
186#define reg_dma_rw_group_ctrl___en___width 1
187#define reg_dma_rw_group_ctrl___en___bit 7
188#define reg_dma_rw_group_ctrl_offset 104
189
190/* Register rw_group_stat, scope dma, type rw */
191#define reg_dma_rw_group_stat___dis___lsb 7
192#define reg_dma_rw_group_stat___dis___width 1
193#define reg_dma_rw_group_stat___dis___bit 7
194#define reg_dma_rw_group_stat_offset 108
195
196/* Register rw_group_md, scope dma, type rw */
197#define reg_dma_rw_group_md___md___lsb 0
198#define reg_dma_rw_group_md___md___width 16
199#define reg_dma_rw_group_md_offset 112
200
201/* Register rw_group_md_s, scope dma, type rw */
202#define reg_dma_rw_group_md_s___md_s___lsb 0
203#define reg_dma_rw_group_md_s___md_s___width 16
204#define reg_dma_rw_group_md_s_offset 116
205
206/* Register rw_group_up, scope dma, type rw */
207#define reg_dma_rw_group_up_offset 120
208
209/* Register rw_group_down, scope dma, type rw */
210#define reg_dma_rw_group_down_offset 124
211
212/* Register rw_cmd, scope dma, type rw */
213#define reg_dma_rw_cmd___cont_data___lsb 0
214#define reg_dma_rw_cmd___cont_data___width 1
215#define reg_dma_rw_cmd___cont_data___bit 0
216#define reg_dma_rw_cmd_offset 128
217
218/* Register rw_cfg, scope dma, type rw */
219#define reg_dma_rw_cfg___en___lsb 0
220#define reg_dma_rw_cfg___en___width 1
221#define reg_dma_rw_cfg___en___bit 0
222#define reg_dma_rw_cfg___stop___lsb 1
223#define reg_dma_rw_cfg___stop___width 1
224#define reg_dma_rw_cfg___stop___bit 1
225#define reg_dma_rw_cfg_offset 132
226
227/* Register rw_stat, scope dma, type rw */
228#define reg_dma_rw_stat___mode___lsb 0
229#define reg_dma_rw_stat___mode___width 5
230#define reg_dma_rw_stat___list_state___lsb 5
231#define reg_dma_rw_stat___list_state___width 3
232#define reg_dma_rw_stat___stream_cmd_src___lsb 8
233#define reg_dma_rw_stat___stream_cmd_src___width 8
234#define reg_dma_rw_stat___buf___lsb 24
235#define reg_dma_rw_stat___buf___width 8
236#define reg_dma_rw_stat_offset 136
237
238/* Register rw_intr_mask, scope dma, type rw */
239#define reg_dma_rw_intr_mask___group___lsb 0
240#define reg_dma_rw_intr_mask___group___width 1
241#define reg_dma_rw_intr_mask___group___bit 0
242#define reg_dma_rw_intr_mask___ctxt___lsb 1
243#define reg_dma_rw_intr_mask___ctxt___width 1
244#define reg_dma_rw_intr_mask___ctxt___bit 1
245#define reg_dma_rw_intr_mask___data___lsb 2
246#define reg_dma_rw_intr_mask___data___width 1
247#define reg_dma_rw_intr_mask___data___bit 2
248#define reg_dma_rw_intr_mask___in_eop___lsb 3
249#define reg_dma_rw_intr_mask___in_eop___width 1
250#define reg_dma_rw_intr_mask___in_eop___bit 3
251#define reg_dma_rw_intr_mask___stream_cmd___lsb 4
252#define reg_dma_rw_intr_mask___stream_cmd___width 1
253#define reg_dma_rw_intr_mask___stream_cmd___bit 4
254#define reg_dma_rw_intr_mask_offset 140
255
256/* Register rw_ack_intr, scope dma, type rw */
257#define reg_dma_rw_ack_intr___group___lsb 0
258#define reg_dma_rw_ack_intr___group___width 1
259#define reg_dma_rw_ack_intr___group___bit 0
260#define reg_dma_rw_ack_intr___ctxt___lsb 1
261#define reg_dma_rw_ack_intr___ctxt___width 1
262#define reg_dma_rw_ack_intr___ctxt___bit 1
263#define reg_dma_rw_ack_intr___data___lsb 2
264#define reg_dma_rw_ack_intr___data___width 1
265#define reg_dma_rw_ack_intr___data___bit 2
266#define reg_dma_rw_ack_intr___in_eop___lsb 3
267#define reg_dma_rw_ack_intr___in_eop___width 1
268#define reg_dma_rw_ack_intr___in_eop___bit 3
269#define reg_dma_rw_ack_intr___stream_cmd___lsb 4
270#define reg_dma_rw_ack_intr___stream_cmd___width 1
271#define reg_dma_rw_ack_intr___stream_cmd___bit 4
272#define reg_dma_rw_ack_intr_offset 144
273
274/* Register r_intr, scope dma, type r */
275#define reg_dma_r_intr___group___lsb 0
276#define reg_dma_r_intr___group___width 1
277#define reg_dma_r_intr___group___bit 0
278#define reg_dma_r_intr___ctxt___lsb 1
279#define reg_dma_r_intr___ctxt___width 1
280#define reg_dma_r_intr___ctxt___bit 1
281#define reg_dma_r_intr___data___lsb 2
282#define reg_dma_r_intr___data___width 1
283#define reg_dma_r_intr___data___bit 2
284#define reg_dma_r_intr___in_eop___lsb 3
285#define reg_dma_r_intr___in_eop___width 1
286#define reg_dma_r_intr___in_eop___bit 3
287#define reg_dma_r_intr___stream_cmd___lsb 4
288#define reg_dma_r_intr___stream_cmd___width 1
289#define reg_dma_r_intr___stream_cmd___bit 4
290#define reg_dma_r_intr_offset 148
291
292/* Register r_masked_intr, scope dma, type r */
293#define reg_dma_r_masked_intr___group___lsb 0
294#define reg_dma_r_masked_intr___group___width 1
295#define reg_dma_r_masked_intr___group___bit 0
296#define reg_dma_r_masked_intr___ctxt___lsb 1
297#define reg_dma_r_masked_intr___ctxt___width 1
298#define reg_dma_r_masked_intr___ctxt___bit 1
299#define reg_dma_r_masked_intr___data___lsb 2
300#define reg_dma_r_masked_intr___data___width 1
301#define reg_dma_r_masked_intr___data___bit 2
302#define reg_dma_r_masked_intr___in_eop___lsb 3
303#define reg_dma_r_masked_intr___in_eop___width 1
304#define reg_dma_r_masked_intr___in_eop___bit 3
305#define reg_dma_r_masked_intr___stream_cmd___lsb 4
306#define reg_dma_r_masked_intr___stream_cmd___width 1
307#define reg_dma_r_masked_intr___stream_cmd___bit 4
308#define reg_dma_r_masked_intr_offset 152
309
310/* Register rw_stream_cmd, scope dma, type rw */
311#define reg_dma_rw_stream_cmd___cmd___lsb 0
312#define reg_dma_rw_stream_cmd___cmd___width 10
313#define reg_dma_rw_stream_cmd___n___lsb 16
314#define reg_dma_rw_stream_cmd___n___width 8
315#define reg_dma_rw_stream_cmd___busy___lsb 31
316#define reg_dma_rw_stream_cmd___busy___width 1
317#define reg_dma_rw_stream_cmd___busy___bit 31
318#define reg_dma_rw_stream_cmd_offset 156
319
320
321/* Constants */
322#define regk_dma_ack_pkt 0x00000100
323#define regk_dma_anytime 0x00000001
324#define regk_dma_array 0x00000008
325#define regk_dma_burst 0x00000020
326#define regk_dma_client 0x00000002
327#define regk_dma_copy_next 0x00000010
328#define regk_dma_copy_up 0x00000020
329#define regk_dma_data_at_eol 0x00000001
330#define regk_dma_dis_c 0x00000010
331#define regk_dma_dis_g 0x00000020
332#define regk_dma_idle 0x00000001
333#define regk_dma_intern 0x00000004
334#define regk_dma_load_c 0x00000200
335#define regk_dma_load_c_n 0x00000280
336#define regk_dma_load_c_next 0x00000240
337#define regk_dma_load_d 0x00000140
338#define regk_dma_load_g 0x00000300
339#define regk_dma_load_g_down 0x000003c0
340#define regk_dma_load_g_next 0x00000340
341#define regk_dma_load_g_up 0x00000380
342#define regk_dma_next_en 0x00000010
343#define regk_dma_next_pkt 0x00000010
344#define regk_dma_no 0x00000000
345#define regk_dma_only_at_wait 0x00000000
346#define regk_dma_restore 0x00000020
347#define regk_dma_rst 0x00000001
348#define regk_dma_running 0x00000004
349#define regk_dma_rw_cfg_default 0x00000000
350#define regk_dma_rw_cmd_default 0x00000000
351#define regk_dma_rw_intr_mask_default 0x00000000
352#define regk_dma_rw_stat_default 0x00000101
353#define regk_dma_rw_stream_cmd_default 0x00000000
354#define regk_dma_save_down 0x00000020
355#define regk_dma_save_up 0x00000020
356#define regk_dma_set_reg 0x00000050
357#define regk_dma_set_w_size1 0x00000190
358#define regk_dma_set_w_size2 0x000001a0
359#define regk_dma_set_w_size4 0x000001c0
360#define regk_dma_stopped 0x00000002
361#define regk_dma_store_c 0x00000002
362#define regk_dma_store_descr 0x00000000
363#define regk_dma_store_g 0x00000004
364#define regk_dma_store_md 0x00000001
365#define regk_dma_sw 0x00000008
366#define regk_dma_update_down 0x00000020
367#define regk_dma_yes 0x00000001
368#endif /* __dma_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/eth_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/eth_defs_asm.h
deleted file mode 100644
index c9f49864831b..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/eth_defs_asm.h
+++ /dev/null
@@ -1,498 +0,0 @@
1#ifndef __eth_defs_asm_h
2#define __eth_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/eth/rtl/eth_regs.r
7 * id: eth_regs.r,v 1.11 2005/02/09 10:48:38 kriskn Exp
8 * last modfied: Mon Apr 11 16:07:03 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/eth_defs_asm.h ../../inst/eth/rtl/eth_regs.r
11 * id: $Id: eth_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_ma0_lo, scope eth, type rw */
57#define reg_eth_rw_ma0_lo___addr___lsb 0
58#define reg_eth_rw_ma0_lo___addr___width 32
59#define reg_eth_rw_ma0_lo_offset 0
60
61/* Register rw_ma0_hi, scope eth, type rw */
62#define reg_eth_rw_ma0_hi___addr___lsb 0
63#define reg_eth_rw_ma0_hi___addr___width 16
64#define reg_eth_rw_ma0_hi_offset 4
65
66/* Register rw_ma1_lo, scope eth, type rw */
67#define reg_eth_rw_ma1_lo___addr___lsb 0
68#define reg_eth_rw_ma1_lo___addr___width 32
69#define reg_eth_rw_ma1_lo_offset 8
70
71/* Register rw_ma1_hi, scope eth, type rw */
72#define reg_eth_rw_ma1_hi___addr___lsb 0
73#define reg_eth_rw_ma1_hi___addr___width 16
74#define reg_eth_rw_ma1_hi_offset 12
75
76/* Register rw_ga_lo, scope eth, type rw */
77#define reg_eth_rw_ga_lo___table___lsb 0
78#define reg_eth_rw_ga_lo___table___width 32
79#define reg_eth_rw_ga_lo_offset 16
80
81/* Register rw_ga_hi, scope eth, type rw */
82#define reg_eth_rw_ga_hi___table___lsb 0
83#define reg_eth_rw_ga_hi___table___width 32
84#define reg_eth_rw_ga_hi_offset 20
85
86/* Register rw_gen_ctrl, scope eth, type rw */
87#define reg_eth_rw_gen_ctrl___en___lsb 0
88#define reg_eth_rw_gen_ctrl___en___width 1
89#define reg_eth_rw_gen_ctrl___en___bit 0
90#define reg_eth_rw_gen_ctrl___phy___lsb 1
91#define reg_eth_rw_gen_ctrl___phy___width 2
92#define reg_eth_rw_gen_ctrl___protocol___lsb 3
93#define reg_eth_rw_gen_ctrl___protocol___width 1
94#define reg_eth_rw_gen_ctrl___protocol___bit 3
95#define reg_eth_rw_gen_ctrl___loopback___lsb 4
96#define reg_eth_rw_gen_ctrl___loopback___width 1
97#define reg_eth_rw_gen_ctrl___loopback___bit 4
98#define reg_eth_rw_gen_ctrl___flow_ctrl_dis___lsb 5
99#define reg_eth_rw_gen_ctrl___flow_ctrl_dis___width 1
100#define reg_eth_rw_gen_ctrl___flow_ctrl_dis___bit 5
101#define reg_eth_rw_gen_ctrl_offset 24
102
103/* Register rw_rec_ctrl, scope eth, type rw */
104#define reg_eth_rw_rec_ctrl___ma0___lsb 0
105#define reg_eth_rw_rec_ctrl___ma0___width 1
106#define reg_eth_rw_rec_ctrl___ma0___bit 0
107#define reg_eth_rw_rec_ctrl___ma1___lsb 1
108#define reg_eth_rw_rec_ctrl___ma1___width 1
109#define reg_eth_rw_rec_ctrl___ma1___bit 1
110#define reg_eth_rw_rec_ctrl___individual___lsb 2
111#define reg_eth_rw_rec_ctrl___individual___width 1
112#define reg_eth_rw_rec_ctrl___individual___bit 2
113#define reg_eth_rw_rec_ctrl___broadcast___lsb 3
114#define reg_eth_rw_rec_ctrl___broadcast___width 1
115#define reg_eth_rw_rec_ctrl___broadcast___bit 3
116#define reg_eth_rw_rec_ctrl___undersize___lsb 4
117#define reg_eth_rw_rec_ctrl___undersize___width 1
118#define reg_eth_rw_rec_ctrl___undersize___bit 4
119#define reg_eth_rw_rec_ctrl___oversize___lsb 5
120#define reg_eth_rw_rec_ctrl___oversize___width 1
121#define reg_eth_rw_rec_ctrl___oversize___bit 5
122#define reg_eth_rw_rec_ctrl___bad_crc___lsb 6
123#define reg_eth_rw_rec_ctrl___bad_crc___width 1
124#define reg_eth_rw_rec_ctrl___bad_crc___bit 6
125#define reg_eth_rw_rec_ctrl___duplex___lsb 7
126#define reg_eth_rw_rec_ctrl___duplex___width 1
127#define reg_eth_rw_rec_ctrl___duplex___bit 7
128#define reg_eth_rw_rec_ctrl___max_size___lsb 8
129#define reg_eth_rw_rec_ctrl___max_size___width 1
130#define reg_eth_rw_rec_ctrl___max_size___bit 8
131#define reg_eth_rw_rec_ctrl_offset 28
132
133/* Register rw_tr_ctrl, scope eth, type rw */
134#define reg_eth_rw_tr_ctrl___crc___lsb 0
135#define reg_eth_rw_tr_ctrl___crc___width 1
136#define reg_eth_rw_tr_ctrl___crc___bit 0
137#define reg_eth_rw_tr_ctrl___pad___lsb 1
138#define reg_eth_rw_tr_ctrl___pad___width 1
139#define reg_eth_rw_tr_ctrl___pad___bit 1
140#define reg_eth_rw_tr_ctrl___retry___lsb 2
141#define reg_eth_rw_tr_ctrl___retry___width 1
142#define reg_eth_rw_tr_ctrl___retry___bit 2
143#define reg_eth_rw_tr_ctrl___ignore_col___lsb 3
144#define reg_eth_rw_tr_ctrl___ignore_col___width 1
145#define reg_eth_rw_tr_ctrl___ignore_col___bit 3
146#define reg_eth_rw_tr_ctrl___cancel___lsb 4
147#define reg_eth_rw_tr_ctrl___cancel___width 1
148#define reg_eth_rw_tr_ctrl___cancel___bit 4
149#define reg_eth_rw_tr_ctrl___hsh_delay___lsb 5
150#define reg_eth_rw_tr_ctrl___hsh_delay___width 1
151#define reg_eth_rw_tr_ctrl___hsh_delay___bit 5
152#define reg_eth_rw_tr_ctrl___ignore_crs___lsb 6
153#define reg_eth_rw_tr_ctrl___ignore_crs___width 1
154#define reg_eth_rw_tr_ctrl___ignore_crs___bit 6
155#define reg_eth_rw_tr_ctrl_offset 32
156
157/* Register rw_clr_err, scope eth, type rw */
158#define reg_eth_rw_clr_err___clr___lsb 0
159#define reg_eth_rw_clr_err___clr___width 1
160#define reg_eth_rw_clr_err___clr___bit 0
161#define reg_eth_rw_clr_err_offset 36
162
163/* Register rw_mgm_ctrl, scope eth, type rw */
164#define reg_eth_rw_mgm_ctrl___mdio___lsb 0
165#define reg_eth_rw_mgm_ctrl___mdio___width 1
166#define reg_eth_rw_mgm_ctrl___mdio___bit 0
167#define reg_eth_rw_mgm_ctrl___mdoe___lsb 1
168#define reg_eth_rw_mgm_ctrl___mdoe___width 1
169#define reg_eth_rw_mgm_ctrl___mdoe___bit 1
170#define reg_eth_rw_mgm_ctrl___mdc___lsb 2
171#define reg_eth_rw_mgm_ctrl___mdc___width 1
172#define reg_eth_rw_mgm_ctrl___mdc___bit 2
173#define reg_eth_rw_mgm_ctrl___phyclk___lsb 3
174#define reg_eth_rw_mgm_ctrl___phyclk___width 1
175#define reg_eth_rw_mgm_ctrl___phyclk___bit 3
176#define reg_eth_rw_mgm_ctrl___txdata___lsb 4
177#define reg_eth_rw_mgm_ctrl___txdata___width 4
178#define reg_eth_rw_mgm_ctrl___txen___lsb 8
179#define reg_eth_rw_mgm_ctrl___txen___width 1
180#define reg_eth_rw_mgm_ctrl___txen___bit 8
181#define reg_eth_rw_mgm_ctrl_offset 40
182
183/* Register r_stat, scope eth, type r */
184#define reg_eth_r_stat___mdio___lsb 0
185#define reg_eth_r_stat___mdio___width 1
186#define reg_eth_r_stat___mdio___bit 0
187#define reg_eth_r_stat___exc_col___lsb 1
188#define reg_eth_r_stat___exc_col___width 1
189#define reg_eth_r_stat___exc_col___bit 1
190#define reg_eth_r_stat___urun___lsb 2
191#define reg_eth_r_stat___urun___width 1
192#define reg_eth_r_stat___urun___bit 2
193#define reg_eth_r_stat___phyclk___lsb 3
194#define reg_eth_r_stat___phyclk___width 1
195#define reg_eth_r_stat___phyclk___bit 3
196#define reg_eth_r_stat___txdata___lsb 4
197#define reg_eth_r_stat___txdata___width 4
198#define reg_eth_r_stat___txen___lsb 8
199#define reg_eth_r_stat___txen___width 1
200#define reg_eth_r_stat___txen___bit 8
201#define reg_eth_r_stat___col___lsb 9
202#define reg_eth_r_stat___col___width 1
203#define reg_eth_r_stat___col___bit 9
204#define reg_eth_r_stat___crs___lsb 10
205#define reg_eth_r_stat___crs___width 1
206#define reg_eth_r_stat___crs___bit 10
207#define reg_eth_r_stat___txclk___lsb 11
208#define reg_eth_r_stat___txclk___width 1
209#define reg_eth_r_stat___txclk___bit 11
210#define reg_eth_r_stat___rxdata___lsb 12
211#define reg_eth_r_stat___rxdata___width 4
212#define reg_eth_r_stat___rxer___lsb 16
213#define reg_eth_r_stat___rxer___width 1
214#define reg_eth_r_stat___rxer___bit 16
215#define reg_eth_r_stat___rxdv___lsb 17
216#define reg_eth_r_stat___rxdv___width 1
217#define reg_eth_r_stat___rxdv___bit 17
218#define reg_eth_r_stat___rxclk___lsb 18
219#define reg_eth_r_stat___rxclk___width 1
220#define reg_eth_r_stat___rxclk___bit 18
221#define reg_eth_r_stat_offset 44
222
223/* Register rs_rec_cnt, scope eth, type rs */
224#define reg_eth_rs_rec_cnt___crc_err___lsb 0
225#define reg_eth_rs_rec_cnt___crc_err___width 8
226#define reg_eth_rs_rec_cnt___align_err___lsb 8
227#define reg_eth_rs_rec_cnt___align_err___width 8
228#define reg_eth_rs_rec_cnt___oversize___lsb 16
229#define reg_eth_rs_rec_cnt___oversize___width 8
230#define reg_eth_rs_rec_cnt___congestion___lsb 24
231#define reg_eth_rs_rec_cnt___congestion___width 8
232#define reg_eth_rs_rec_cnt_offset 48
233
234/* Register r_rec_cnt, scope eth, type r */
235#define reg_eth_r_rec_cnt___crc_err___lsb 0
236#define reg_eth_r_rec_cnt___crc_err___width 8
237#define reg_eth_r_rec_cnt___align_err___lsb 8
238#define reg_eth_r_rec_cnt___align_err___width 8
239#define reg_eth_r_rec_cnt___oversize___lsb 16
240#define reg_eth_r_rec_cnt___oversize___width 8
241#define reg_eth_r_rec_cnt___congestion___lsb 24
242#define reg_eth_r_rec_cnt___congestion___width 8
243#define reg_eth_r_rec_cnt_offset 52
244
245/* Register rs_tr_cnt, scope eth, type rs */
246#define reg_eth_rs_tr_cnt___single_col___lsb 0
247#define reg_eth_rs_tr_cnt___single_col___width 8
248#define reg_eth_rs_tr_cnt___mult_col___lsb 8
249#define reg_eth_rs_tr_cnt___mult_col___width 8
250#define reg_eth_rs_tr_cnt___late_col___lsb 16
251#define reg_eth_rs_tr_cnt___late_col___width 8
252#define reg_eth_rs_tr_cnt___deferred___lsb 24
253#define reg_eth_rs_tr_cnt___deferred___width 8
254#define reg_eth_rs_tr_cnt_offset 56
255
256/* Register r_tr_cnt, scope eth, type r */
257#define reg_eth_r_tr_cnt___single_col___lsb 0
258#define reg_eth_r_tr_cnt___single_col___width 8
259#define reg_eth_r_tr_cnt___mult_col___lsb 8
260#define reg_eth_r_tr_cnt___mult_col___width 8
261#define reg_eth_r_tr_cnt___late_col___lsb 16
262#define reg_eth_r_tr_cnt___late_col___width 8
263#define reg_eth_r_tr_cnt___deferred___lsb 24
264#define reg_eth_r_tr_cnt___deferred___width 8
265#define reg_eth_r_tr_cnt_offset 60
266
267/* Register rs_phy_cnt, scope eth, type rs */
268#define reg_eth_rs_phy_cnt___carrier_loss___lsb 0
269#define reg_eth_rs_phy_cnt___carrier_loss___width 8
270#define reg_eth_rs_phy_cnt___sqe_err___lsb 8
271#define reg_eth_rs_phy_cnt___sqe_err___width 8
272#define reg_eth_rs_phy_cnt_offset 64
273
274/* Register r_phy_cnt, scope eth, type r */
275#define reg_eth_r_phy_cnt___carrier_loss___lsb 0
276#define reg_eth_r_phy_cnt___carrier_loss___width 8
277#define reg_eth_r_phy_cnt___sqe_err___lsb 8
278#define reg_eth_r_phy_cnt___sqe_err___width 8
279#define reg_eth_r_phy_cnt_offset 68
280
281/* Register rw_test_ctrl, scope eth, type rw */
282#define reg_eth_rw_test_ctrl___snmp_inc___lsb 0
283#define reg_eth_rw_test_ctrl___snmp_inc___width 1
284#define reg_eth_rw_test_ctrl___snmp_inc___bit 0
285#define reg_eth_rw_test_ctrl___snmp___lsb 1
286#define reg_eth_rw_test_ctrl___snmp___width 1
287#define reg_eth_rw_test_ctrl___snmp___bit 1
288#define reg_eth_rw_test_ctrl___backoff___lsb 2
289#define reg_eth_rw_test_ctrl___backoff___width 1
290#define reg_eth_rw_test_ctrl___backoff___bit 2
291#define reg_eth_rw_test_ctrl_offset 72
292
293/* Register rw_intr_mask, scope eth, type rw */
294#define reg_eth_rw_intr_mask___crc___lsb 0
295#define reg_eth_rw_intr_mask___crc___width 1
296#define reg_eth_rw_intr_mask___crc___bit 0
297#define reg_eth_rw_intr_mask___align___lsb 1
298#define reg_eth_rw_intr_mask___align___width 1
299#define reg_eth_rw_intr_mask___align___bit 1
300#define reg_eth_rw_intr_mask___oversize___lsb 2
301#define reg_eth_rw_intr_mask___oversize___width 1
302#define reg_eth_rw_intr_mask___oversize___bit 2
303#define reg_eth_rw_intr_mask___congestion___lsb 3
304#define reg_eth_rw_intr_mask___congestion___width 1
305#define reg_eth_rw_intr_mask___congestion___bit 3
306#define reg_eth_rw_intr_mask___single_col___lsb 4
307#define reg_eth_rw_intr_mask___single_col___width 1
308#define reg_eth_rw_intr_mask___single_col___bit 4
309#define reg_eth_rw_intr_mask___mult_col___lsb 5
310#define reg_eth_rw_intr_mask___mult_col___width 1
311#define reg_eth_rw_intr_mask___mult_col___bit 5
312#define reg_eth_rw_intr_mask___late_col___lsb 6
313#define reg_eth_rw_intr_mask___late_col___width 1
314#define reg_eth_rw_intr_mask___late_col___bit 6
315#define reg_eth_rw_intr_mask___deferred___lsb 7
316#define reg_eth_rw_intr_mask___deferred___width 1
317#define reg_eth_rw_intr_mask___deferred___bit 7
318#define reg_eth_rw_intr_mask___carrier_loss___lsb 8
319#define reg_eth_rw_intr_mask___carrier_loss___width 1
320#define reg_eth_rw_intr_mask___carrier_loss___bit 8
321#define reg_eth_rw_intr_mask___sqe_test_err___lsb 9
322#define reg_eth_rw_intr_mask___sqe_test_err___width 1
323#define reg_eth_rw_intr_mask___sqe_test_err___bit 9
324#define reg_eth_rw_intr_mask___orun___lsb 10
325#define reg_eth_rw_intr_mask___orun___width 1
326#define reg_eth_rw_intr_mask___orun___bit 10
327#define reg_eth_rw_intr_mask___urun___lsb 11
328#define reg_eth_rw_intr_mask___urun___width 1
329#define reg_eth_rw_intr_mask___urun___bit 11
330#define reg_eth_rw_intr_mask___excessive_col___lsb 12
331#define reg_eth_rw_intr_mask___excessive_col___width 1
332#define reg_eth_rw_intr_mask___excessive_col___bit 12
333#define reg_eth_rw_intr_mask___mdio___lsb 13
334#define reg_eth_rw_intr_mask___mdio___width 1
335#define reg_eth_rw_intr_mask___mdio___bit 13
336#define reg_eth_rw_intr_mask_offset 76
337
338/* Register rw_ack_intr, scope eth, type rw */
339#define reg_eth_rw_ack_intr___crc___lsb 0
340#define reg_eth_rw_ack_intr___crc___width 1
341#define reg_eth_rw_ack_intr___crc___bit 0
342#define reg_eth_rw_ack_intr___align___lsb 1
343#define reg_eth_rw_ack_intr___align___width 1
344#define reg_eth_rw_ack_intr___align___bit 1
345#define reg_eth_rw_ack_intr___oversize___lsb 2
346#define reg_eth_rw_ack_intr___oversize___width 1
347#define reg_eth_rw_ack_intr___oversize___bit 2
348#define reg_eth_rw_ack_intr___congestion___lsb 3
349#define reg_eth_rw_ack_intr___congestion___width 1
350#define reg_eth_rw_ack_intr___congestion___bit 3
351#define reg_eth_rw_ack_intr___single_col___lsb 4
352#define reg_eth_rw_ack_intr___single_col___width 1
353#define reg_eth_rw_ack_intr___single_col___bit 4
354#define reg_eth_rw_ack_intr___mult_col___lsb 5
355#define reg_eth_rw_ack_intr___mult_col___width 1
356#define reg_eth_rw_ack_intr___mult_col___bit 5
357#define reg_eth_rw_ack_intr___late_col___lsb 6
358#define reg_eth_rw_ack_intr___late_col___width 1
359#define reg_eth_rw_ack_intr___late_col___bit 6
360#define reg_eth_rw_ack_intr___deferred___lsb 7
361#define reg_eth_rw_ack_intr___deferred___width 1
362#define reg_eth_rw_ack_intr___deferred___bit 7
363#define reg_eth_rw_ack_intr___carrier_loss___lsb 8
364#define reg_eth_rw_ack_intr___carrier_loss___width 1
365#define reg_eth_rw_ack_intr___carrier_loss___bit 8
366#define reg_eth_rw_ack_intr___sqe_test_err___lsb 9
367#define reg_eth_rw_ack_intr___sqe_test_err___width 1
368#define reg_eth_rw_ack_intr___sqe_test_err___bit 9
369#define reg_eth_rw_ack_intr___orun___lsb 10
370#define reg_eth_rw_ack_intr___orun___width 1
371#define reg_eth_rw_ack_intr___orun___bit 10
372#define reg_eth_rw_ack_intr___urun___lsb 11
373#define reg_eth_rw_ack_intr___urun___width 1
374#define reg_eth_rw_ack_intr___urun___bit 11
375#define reg_eth_rw_ack_intr___excessive_col___lsb 12
376#define reg_eth_rw_ack_intr___excessive_col___width 1
377#define reg_eth_rw_ack_intr___excessive_col___bit 12
378#define reg_eth_rw_ack_intr___mdio___lsb 13
379#define reg_eth_rw_ack_intr___mdio___width 1
380#define reg_eth_rw_ack_intr___mdio___bit 13
381#define reg_eth_rw_ack_intr_offset 80
382
383/* Register r_intr, scope eth, type r */
384#define reg_eth_r_intr___crc___lsb 0
385#define reg_eth_r_intr___crc___width 1
386#define reg_eth_r_intr___crc___bit 0
387#define reg_eth_r_intr___align___lsb 1
388#define reg_eth_r_intr___align___width 1
389#define reg_eth_r_intr___align___bit 1
390#define reg_eth_r_intr___oversize___lsb 2
391#define reg_eth_r_intr___oversize___width 1
392#define reg_eth_r_intr___oversize___bit 2
393#define reg_eth_r_intr___congestion___lsb 3
394#define reg_eth_r_intr___congestion___width 1
395#define reg_eth_r_intr___congestion___bit 3
396#define reg_eth_r_intr___single_col___lsb 4
397#define reg_eth_r_intr___single_col___width 1
398#define reg_eth_r_intr___single_col___bit 4
399#define reg_eth_r_intr___mult_col___lsb 5
400#define reg_eth_r_intr___mult_col___width 1
401#define reg_eth_r_intr___mult_col___bit 5
402#define reg_eth_r_intr___late_col___lsb 6
403#define reg_eth_r_intr___late_col___width 1
404#define reg_eth_r_intr___late_col___bit 6
405#define reg_eth_r_intr___deferred___lsb 7
406#define reg_eth_r_intr___deferred___width 1
407#define reg_eth_r_intr___deferred___bit 7
408#define reg_eth_r_intr___carrier_loss___lsb 8
409#define reg_eth_r_intr___carrier_loss___width 1
410#define reg_eth_r_intr___carrier_loss___bit 8
411#define reg_eth_r_intr___sqe_test_err___lsb 9
412#define reg_eth_r_intr___sqe_test_err___width 1
413#define reg_eth_r_intr___sqe_test_err___bit 9
414#define reg_eth_r_intr___orun___lsb 10
415#define reg_eth_r_intr___orun___width 1
416#define reg_eth_r_intr___orun___bit 10
417#define reg_eth_r_intr___urun___lsb 11
418#define reg_eth_r_intr___urun___width 1
419#define reg_eth_r_intr___urun___bit 11
420#define reg_eth_r_intr___excessive_col___lsb 12
421#define reg_eth_r_intr___excessive_col___width 1
422#define reg_eth_r_intr___excessive_col___bit 12
423#define reg_eth_r_intr___mdio___lsb 13
424#define reg_eth_r_intr___mdio___width 1
425#define reg_eth_r_intr___mdio___bit 13
426#define reg_eth_r_intr_offset 84
427
428/* Register r_masked_intr, scope eth, type r */
429#define reg_eth_r_masked_intr___crc___lsb 0
430#define reg_eth_r_masked_intr___crc___width 1
431#define reg_eth_r_masked_intr___crc___bit 0
432#define reg_eth_r_masked_intr___align___lsb 1
433#define reg_eth_r_masked_intr___align___width 1
434#define reg_eth_r_masked_intr___align___bit 1
435#define reg_eth_r_masked_intr___oversize___lsb 2
436#define reg_eth_r_masked_intr___oversize___width 1
437#define reg_eth_r_masked_intr___oversize___bit 2
438#define reg_eth_r_masked_intr___congestion___lsb 3
439#define reg_eth_r_masked_intr___congestion___width 1
440#define reg_eth_r_masked_intr___congestion___bit 3
441#define reg_eth_r_masked_intr___single_col___lsb 4
442#define reg_eth_r_masked_intr___single_col___width 1
443#define reg_eth_r_masked_intr___single_col___bit 4
444#define reg_eth_r_masked_intr___mult_col___lsb 5
445#define reg_eth_r_masked_intr___mult_col___width 1
446#define reg_eth_r_masked_intr___mult_col___bit 5
447#define reg_eth_r_masked_intr___late_col___lsb 6
448#define reg_eth_r_masked_intr___late_col___width 1
449#define reg_eth_r_masked_intr___late_col___bit 6
450#define reg_eth_r_masked_intr___deferred___lsb 7
451#define reg_eth_r_masked_intr___deferred___width 1
452#define reg_eth_r_masked_intr___deferred___bit 7
453#define reg_eth_r_masked_intr___carrier_loss___lsb 8
454#define reg_eth_r_masked_intr___carrier_loss___width 1
455#define reg_eth_r_masked_intr___carrier_loss___bit 8
456#define reg_eth_r_masked_intr___sqe_test_err___lsb 9
457#define reg_eth_r_masked_intr___sqe_test_err___width 1
458#define reg_eth_r_masked_intr___sqe_test_err___bit 9
459#define reg_eth_r_masked_intr___orun___lsb 10
460#define reg_eth_r_masked_intr___orun___width 1
461#define reg_eth_r_masked_intr___orun___bit 10
462#define reg_eth_r_masked_intr___urun___lsb 11
463#define reg_eth_r_masked_intr___urun___width 1
464#define reg_eth_r_masked_intr___urun___bit 11
465#define reg_eth_r_masked_intr___excessive_col___lsb 12
466#define reg_eth_r_masked_intr___excessive_col___width 1
467#define reg_eth_r_masked_intr___excessive_col___bit 12
468#define reg_eth_r_masked_intr___mdio___lsb 13
469#define reg_eth_r_masked_intr___mdio___width 1
470#define reg_eth_r_masked_intr___mdio___bit 13
471#define reg_eth_r_masked_intr_offset 88
472
473
474/* Constants */
475#define regk_eth_discard 0x00000000
476#define regk_eth_ether 0x00000000
477#define regk_eth_full 0x00000001
478#define regk_eth_half 0x00000000
479#define regk_eth_hsh 0x00000001
480#define regk_eth_mii 0x00000001
481#define regk_eth_mii_clk 0x00000000
482#define regk_eth_mii_rec 0x00000002
483#define regk_eth_no 0x00000000
484#define regk_eth_rec 0x00000001
485#define regk_eth_rw_ga_hi_default 0x00000000
486#define regk_eth_rw_ga_lo_default 0x00000000
487#define regk_eth_rw_gen_ctrl_default 0x00000000
488#define regk_eth_rw_intr_mask_default 0x00000000
489#define regk_eth_rw_ma0_hi_default 0x00000000
490#define regk_eth_rw_ma0_lo_default 0x00000000
491#define regk_eth_rw_ma1_hi_default 0x00000000
492#define regk_eth_rw_ma1_lo_default 0x00000000
493#define regk_eth_rw_mgm_ctrl_default 0x00000000
494#define regk_eth_rw_test_ctrl_default 0x00000000
495#define regk_eth_size1518 0x00000000
496#define regk_eth_size1522 0x00000001
497#define regk_eth_yes 0x00000001
498#endif /* __eth_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/gio_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/gio_defs_asm.h
deleted file mode 100644
index 35356bc08629..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/gio_defs_asm.h
+++ /dev/null
@@ -1,276 +0,0 @@
1#ifndef __gio_defs_asm_h
2#define __gio_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/gio/rtl/gio_regs.r
7 * id: gio_regs.r,v 1.5 2005/02/04 09:43:21 perz Exp
8 * last modfied: Mon Apr 11 16:07:47 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/gio_defs_asm.h ../../inst/gio/rtl/gio_regs.r
11 * id: $Id: gio_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_pa_dout, scope gio, type rw */
57#define reg_gio_rw_pa_dout___data___lsb 0
58#define reg_gio_rw_pa_dout___data___width 8
59#define reg_gio_rw_pa_dout_offset 0
60
61/* Register r_pa_din, scope gio, type r */
62#define reg_gio_r_pa_din___data___lsb 0
63#define reg_gio_r_pa_din___data___width 8
64#define reg_gio_r_pa_din_offset 4
65
66/* Register rw_pa_oe, scope gio, type rw */
67#define reg_gio_rw_pa_oe___oe___lsb 0
68#define reg_gio_rw_pa_oe___oe___width 8
69#define reg_gio_rw_pa_oe_offset 8
70
71/* Register rw_intr_cfg, scope gio, type rw */
72#define reg_gio_rw_intr_cfg___pa0___lsb 0
73#define reg_gio_rw_intr_cfg___pa0___width 3
74#define reg_gio_rw_intr_cfg___pa1___lsb 3
75#define reg_gio_rw_intr_cfg___pa1___width 3
76#define reg_gio_rw_intr_cfg___pa2___lsb 6
77#define reg_gio_rw_intr_cfg___pa2___width 3
78#define reg_gio_rw_intr_cfg___pa3___lsb 9
79#define reg_gio_rw_intr_cfg___pa3___width 3
80#define reg_gio_rw_intr_cfg___pa4___lsb 12
81#define reg_gio_rw_intr_cfg___pa4___width 3
82#define reg_gio_rw_intr_cfg___pa5___lsb 15
83#define reg_gio_rw_intr_cfg___pa5___width 3
84#define reg_gio_rw_intr_cfg___pa6___lsb 18
85#define reg_gio_rw_intr_cfg___pa6___width 3
86#define reg_gio_rw_intr_cfg___pa7___lsb 21
87#define reg_gio_rw_intr_cfg___pa7___width 3
88#define reg_gio_rw_intr_cfg_offset 12
89
90/* Register rw_intr_mask, scope gio, type rw */
91#define reg_gio_rw_intr_mask___pa0___lsb 0
92#define reg_gio_rw_intr_mask___pa0___width 1
93#define reg_gio_rw_intr_mask___pa0___bit 0
94#define reg_gio_rw_intr_mask___pa1___lsb 1
95#define reg_gio_rw_intr_mask___pa1___width 1
96#define reg_gio_rw_intr_mask___pa1___bit 1
97#define reg_gio_rw_intr_mask___pa2___lsb 2
98#define reg_gio_rw_intr_mask___pa2___width 1
99#define reg_gio_rw_intr_mask___pa2___bit 2
100#define reg_gio_rw_intr_mask___pa3___lsb 3
101#define reg_gio_rw_intr_mask___pa3___width 1
102#define reg_gio_rw_intr_mask___pa3___bit 3
103#define reg_gio_rw_intr_mask___pa4___lsb 4
104#define reg_gio_rw_intr_mask___pa4___width 1
105#define reg_gio_rw_intr_mask___pa4___bit 4
106#define reg_gio_rw_intr_mask___pa5___lsb 5
107#define reg_gio_rw_intr_mask___pa5___width 1
108#define reg_gio_rw_intr_mask___pa5___bit 5
109#define reg_gio_rw_intr_mask___pa6___lsb 6
110#define reg_gio_rw_intr_mask___pa6___width 1
111#define reg_gio_rw_intr_mask___pa6___bit 6
112#define reg_gio_rw_intr_mask___pa7___lsb 7
113#define reg_gio_rw_intr_mask___pa7___width 1
114#define reg_gio_rw_intr_mask___pa7___bit 7
115#define reg_gio_rw_intr_mask_offset 16
116
117/* Register rw_ack_intr, scope gio, type rw */
118#define reg_gio_rw_ack_intr___pa0___lsb 0
119#define reg_gio_rw_ack_intr___pa0___width 1
120#define reg_gio_rw_ack_intr___pa0___bit 0
121#define reg_gio_rw_ack_intr___pa1___lsb 1
122#define reg_gio_rw_ack_intr___pa1___width 1
123#define reg_gio_rw_ack_intr___pa1___bit 1
124#define reg_gio_rw_ack_intr___pa2___lsb 2
125#define reg_gio_rw_ack_intr___pa2___width 1
126#define reg_gio_rw_ack_intr___pa2___bit 2
127#define reg_gio_rw_ack_intr___pa3___lsb 3
128#define reg_gio_rw_ack_intr___pa3___width 1
129#define reg_gio_rw_ack_intr___pa3___bit 3
130#define reg_gio_rw_ack_intr___pa4___lsb 4
131#define reg_gio_rw_ack_intr___pa4___width 1
132#define reg_gio_rw_ack_intr___pa4___bit 4
133#define reg_gio_rw_ack_intr___pa5___lsb 5
134#define reg_gio_rw_ack_intr___pa5___width 1
135#define reg_gio_rw_ack_intr___pa5___bit 5
136#define reg_gio_rw_ack_intr___pa6___lsb 6
137#define reg_gio_rw_ack_intr___pa6___width 1
138#define reg_gio_rw_ack_intr___pa6___bit 6
139#define reg_gio_rw_ack_intr___pa7___lsb 7
140#define reg_gio_rw_ack_intr___pa7___width 1
141#define reg_gio_rw_ack_intr___pa7___bit 7
142#define reg_gio_rw_ack_intr_offset 20
143
144/* Register r_intr, scope gio, type r */
145#define reg_gio_r_intr___pa0___lsb 0
146#define reg_gio_r_intr___pa0___width 1
147#define reg_gio_r_intr___pa0___bit 0
148#define reg_gio_r_intr___pa1___lsb 1
149#define reg_gio_r_intr___pa1___width 1
150#define reg_gio_r_intr___pa1___bit 1
151#define reg_gio_r_intr___pa2___lsb 2
152#define reg_gio_r_intr___pa2___width 1
153#define reg_gio_r_intr___pa2___bit 2
154#define reg_gio_r_intr___pa3___lsb 3
155#define reg_gio_r_intr___pa3___width 1
156#define reg_gio_r_intr___pa3___bit 3
157#define reg_gio_r_intr___pa4___lsb 4
158#define reg_gio_r_intr___pa4___width 1
159#define reg_gio_r_intr___pa4___bit 4
160#define reg_gio_r_intr___pa5___lsb 5
161#define reg_gio_r_intr___pa5___width 1
162#define reg_gio_r_intr___pa5___bit 5
163#define reg_gio_r_intr___pa6___lsb 6
164#define reg_gio_r_intr___pa6___width 1
165#define reg_gio_r_intr___pa6___bit 6
166#define reg_gio_r_intr___pa7___lsb 7
167#define reg_gio_r_intr___pa7___width 1
168#define reg_gio_r_intr___pa7___bit 7
169#define reg_gio_r_intr_offset 24
170
171/* Register r_masked_intr, scope gio, type r */
172#define reg_gio_r_masked_intr___pa0___lsb 0
173#define reg_gio_r_masked_intr___pa0___width 1
174#define reg_gio_r_masked_intr___pa0___bit 0
175#define reg_gio_r_masked_intr___pa1___lsb 1
176#define reg_gio_r_masked_intr___pa1___width 1
177#define reg_gio_r_masked_intr___pa1___bit 1
178#define reg_gio_r_masked_intr___pa2___lsb 2
179#define reg_gio_r_masked_intr___pa2___width 1
180#define reg_gio_r_masked_intr___pa2___bit 2
181#define reg_gio_r_masked_intr___pa3___lsb 3
182#define reg_gio_r_masked_intr___pa3___width 1
183#define reg_gio_r_masked_intr___pa3___bit 3
184#define reg_gio_r_masked_intr___pa4___lsb 4
185#define reg_gio_r_masked_intr___pa4___width 1
186#define reg_gio_r_masked_intr___pa4___bit 4
187#define reg_gio_r_masked_intr___pa5___lsb 5
188#define reg_gio_r_masked_intr___pa5___width 1
189#define reg_gio_r_masked_intr___pa5___bit 5
190#define reg_gio_r_masked_intr___pa6___lsb 6
191#define reg_gio_r_masked_intr___pa6___width 1
192#define reg_gio_r_masked_intr___pa6___bit 6
193#define reg_gio_r_masked_intr___pa7___lsb 7
194#define reg_gio_r_masked_intr___pa7___width 1
195#define reg_gio_r_masked_intr___pa7___bit 7
196#define reg_gio_r_masked_intr_offset 28
197
198/* Register rw_pb_dout, scope gio, type rw */
199#define reg_gio_rw_pb_dout___data___lsb 0
200#define reg_gio_rw_pb_dout___data___width 18
201#define reg_gio_rw_pb_dout_offset 32
202
203/* Register r_pb_din, scope gio, type r */
204#define reg_gio_r_pb_din___data___lsb 0
205#define reg_gio_r_pb_din___data___width 18
206#define reg_gio_r_pb_din_offset 36
207
208/* Register rw_pb_oe, scope gio, type rw */
209#define reg_gio_rw_pb_oe___oe___lsb 0
210#define reg_gio_rw_pb_oe___oe___width 18
211#define reg_gio_rw_pb_oe_offset 40
212
213/* Register rw_pc_dout, scope gio, type rw */
214#define reg_gio_rw_pc_dout___data___lsb 0
215#define reg_gio_rw_pc_dout___data___width 18
216#define reg_gio_rw_pc_dout_offset 48
217
218/* Register r_pc_din, scope gio, type r */
219#define reg_gio_r_pc_din___data___lsb 0
220#define reg_gio_r_pc_din___data___width 18
221#define reg_gio_r_pc_din_offset 52
222
223/* Register rw_pc_oe, scope gio, type rw */
224#define reg_gio_rw_pc_oe___oe___lsb 0
225#define reg_gio_rw_pc_oe___oe___width 18
226#define reg_gio_rw_pc_oe_offset 56
227
228/* Register rw_pd_dout, scope gio, type rw */
229#define reg_gio_rw_pd_dout___data___lsb 0
230#define reg_gio_rw_pd_dout___data___width 18
231#define reg_gio_rw_pd_dout_offset 64
232
233/* Register r_pd_din, scope gio, type r */
234#define reg_gio_r_pd_din___data___lsb 0
235#define reg_gio_r_pd_din___data___width 18
236#define reg_gio_r_pd_din_offset 68
237
238/* Register rw_pd_oe, scope gio, type rw */
239#define reg_gio_rw_pd_oe___oe___lsb 0
240#define reg_gio_rw_pd_oe___oe___width 18
241#define reg_gio_rw_pd_oe_offset 72
242
243/* Register rw_pe_dout, scope gio, type rw */
244#define reg_gio_rw_pe_dout___data___lsb 0
245#define reg_gio_rw_pe_dout___data___width 18
246#define reg_gio_rw_pe_dout_offset 80
247
248/* Register r_pe_din, scope gio, type r */
249#define reg_gio_r_pe_din___data___lsb 0
250#define reg_gio_r_pe_din___data___width 18
251#define reg_gio_r_pe_din_offset 84
252
253/* Register rw_pe_oe, scope gio, type rw */
254#define reg_gio_rw_pe_oe___oe___lsb 0
255#define reg_gio_rw_pe_oe___oe___width 18
256#define reg_gio_rw_pe_oe_offset 88
257
258
259/* Constants */
260#define regk_gio_anyedge 0x00000007
261#define regk_gio_hi 0x00000001
262#define regk_gio_lo 0x00000002
263#define regk_gio_negedge 0x00000006
264#define regk_gio_no 0x00000000
265#define regk_gio_off 0x00000000
266#define regk_gio_posedge 0x00000005
267#define regk_gio_rw_intr_cfg_default 0x00000000
268#define regk_gio_rw_intr_mask_default 0x00000000
269#define regk_gio_rw_pa_oe_default 0x00000000
270#define regk_gio_rw_pb_oe_default 0x00000000
271#define regk_gio_rw_pc_oe_default 0x00000000
272#define regk_gio_rw_pd_oe_default 0x00000000
273#define regk_gio_rw_pe_oe_default 0x00000000
274#define regk_gio_set 0x00000003
275#define regk_gio_yes 0x00000001
276#endif /* __gio_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/intr_vect.h b/include/asm-cris/arch-v32/hwregs/asm/intr_vect.h
deleted file mode 100644
index c8315905c571..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/intr_vect.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
2 from ../../inst/intr_vect/rtl/guinness/ivmask.config.r
3version . */
4
5#ifndef _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R
6#define _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R
7#define MEMARB_INTR_VECT 0x31
8#define GEN_IO_INTR_VECT 0x32
9#define IOP0_INTR_VECT 0x33
10#define IOP1_INTR_VECT 0x34
11#define IOP2_INTR_VECT 0x35
12#define IOP3_INTR_VECT 0x36
13#define DMA0_INTR_VECT 0x37
14#define DMA1_INTR_VECT 0x38
15#define DMA2_INTR_VECT 0x39
16#define DMA3_INTR_VECT 0x3a
17#define DMA4_INTR_VECT 0x3b
18#define DMA5_INTR_VECT 0x3c
19#define DMA6_INTR_VECT 0x3d
20#define DMA7_INTR_VECT 0x3e
21#define DMA8_INTR_VECT 0x3f
22#define DMA9_INTR_VECT 0x40
23#define ATA_INTR_VECT 0x41
24#define SSER0_INTR_VECT 0x42
25#define SSER1_INTR_VECT 0x43
26#define SER0_INTR_VECT 0x44
27#define SER1_INTR_VECT 0x45
28#define SER2_INTR_VECT 0x46
29#define SER3_INTR_VECT 0x47
30#define P21_INTR_VECT 0x48
31#define ETH0_INTR_VECT 0x49
32#define ETH1_INTR_VECT 0x4a
33#define TIMER_INTR_VECT 0x4b
34#define BIF_ARB_INTR_VECT 0x4c
35#define BIF_DMA_INTR_VECT 0x4d
36#define EXT_INTR_VECT 0x4e
37
38#endif
diff --git a/include/asm-cris/arch-v32/hwregs/asm/intr_vect_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/intr_vect_defs_asm.h
deleted file mode 100644
index 6df2a433b02d..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/intr_vect_defs_asm.h
+++ /dev/null
@@ -1,355 +0,0 @@
1#ifndef __intr_vect_defs_asm_h
2#define __intr_vect_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/intr_vect/rtl/guinness/ivmask.config.r
7 * id: ivmask.config.r,v 1.4 2005/02/15 16:05:38 stefans Exp
8 * last modfied: Mon Apr 11 16:08:03 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/intr_vect_defs_asm.h ../../inst/intr_vect/rtl/guinness/ivmask.config.r
11 * id: $Id: intr_vect_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_mask, scope intr_vect, type rw */
57#define reg_intr_vect_rw_mask___memarb___lsb 0
58#define reg_intr_vect_rw_mask___memarb___width 1
59#define reg_intr_vect_rw_mask___memarb___bit 0
60#define reg_intr_vect_rw_mask___gen_io___lsb 1
61#define reg_intr_vect_rw_mask___gen_io___width 1
62#define reg_intr_vect_rw_mask___gen_io___bit 1
63#define reg_intr_vect_rw_mask___iop0___lsb 2
64#define reg_intr_vect_rw_mask___iop0___width 1
65#define reg_intr_vect_rw_mask___iop0___bit 2
66#define reg_intr_vect_rw_mask___iop1___lsb 3
67#define reg_intr_vect_rw_mask___iop1___width 1
68#define reg_intr_vect_rw_mask___iop1___bit 3
69#define reg_intr_vect_rw_mask___iop2___lsb 4
70#define reg_intr_vect_rw_mask___iop2___width 1
71#define reg_intr_vect_rw_mask___iop2___bit 4
72#define reg_intr_vect_rw_mask___iop3___lsb 5
73#define reg_intr_vect_rw_mask___iop3___width 1
74#define reg_intr_vect_rw_mask___iop3___bit 5
75#define reg_intr_vect_rw_mask___dma0___lsb 6
76#define reg_intr_vect_rw_mask___dma0___width 1
77#define reg_intr_vect_rw_mask___dma0___bit 6
78#define reg_intr_vect_rw_mask___dma1___lsb 7
79#define reg_intr_vect_rw_mask___dma1___width 1
80#define reg_intr_vect_rw_mask___dma1___bit 7
81#define reg_intr_vect_rw_mask___dma2___lsb 8
82#define reg_intr_vect_rw_mask___dma2___width 1
83#define reg_intr_vect_rw_mask___dma2___bit 8
84#define reg_intr_vect_rw_mask___dma3___lsb 9
85#define reg_intr_vect_rw_mask___dma3___width 1
86#define reg_intr_vect_rw_mask___dma3___bit 9
87#define reg_intr_vect_rw_mask___dma4___lsb 10
88#define reg_intr_vect_rw_mask___dma4___width 1
89#define reg_intr_vect_rw_mask___dma4___bit 10
90#define reg_intr_vect_rw_mask___dma5___lsb 11
91#define reg_intr_vect_rw_mask___dma5___width 1
92#define reg_intr_vect_rw_mask___dma5___bit 11
93#define reg_intr_vect_rw_mask___dma6___lsb 12
94#define reg_intr_vect_rw_mask___dma6___width 1
95#define reg_intr_vect_rw_mask___dma6___bit 12
96#define reg_intr_vect_rw_mask___dma7___lsb 13
97#define reg_intr_vect_rw_mask___dma7___width 1
98#define reg_intr_vect_rw_mask___dma7___bit 13
99#define reg_intr_vect_rw_mask___dma8___lsb 14
100#define reg_intr_vect_rw_mask___dma8___width 1
101#define reg_intr_vect_rw_mask___dma8___bit 14
102#define reg_intr_vect_rw_mask___dma9___lsb 15
103#define reg_intr_vect_rw_mask___dma9___width 1
104#define reg_intr_vect_rw_mask___dma9___bit 15
105#define reg_intr_vect_rw_mask___ata___lsb 16
106#define reg_intr_vect_rw_mask___ata___width 1
107#define reg_intr_vect_rw_mask___ata___bit 16
108#define reg_intr_vect_rw_mask___sser0___lsb 17
109#define reg_intr_vect_rw_mask___sser0___width 1
110#define reg_intr_vect_rw_mask___sser0___bit 17
111#define reg_intr_vect_rw_mask___sser1___lsb 18
112#define reg_intr_vect_rw_mask___sser1___width 1
113#define reg_intr_vect_rw_mask___sser1___bit 18
114#define reg_intr_vect_rw_mask___ser0___lsb 19
115#define reg_intr_vect_rw_mask___ser0___width 1
116#define reg_intr_vect_rw_mask___ser0___bit 19
117#define reg_intr_vect_rw_mask___ser1___lsb 20
118#define reg_intr_vect_rw_mask___ser1___width 1
119#define reg_intr_vect_rw_mask___ser1___bit 20
120#define reg_intr_vect_rw_mask___ser2___lsb 21
121#define reg_intr_vect_rw_mask___ser2___width 1
122#define reg_intr_vect_rw_mask___ser2___bit 21
123#define reg_intr_vect_rw_mask___ser3___lsb 22
124#define reg_intr_vect_rw_mask___ser3___width 1
125#define reg_intr_vect_rw_mask___ser3___bit 22
126#define reg_intr_vect_rw_mask___p21___lsb 23
127#define reg_intr_vect_rw_mask___p21___width 1
128#define reg_intr_vect_rw_mask___p21___bit 23
129#define reg_intr_vect_rw_mask___eth0___lsb 24
130#define reg_intr_vect_rw_mask___eth0___width 1
131#define reg_intr_vect_rw_mask___eth0___bit 24
132#define reg_intr_vect_rw_mask___eth1___lsb 25
133#define reg_intr_vect_rw_mask___eth1___width 1
134#define reg_intr_vect_rw_mask___eth1___bit 25
135#define reg_intr_vect_rw_mask___timer___lsb 26
136#define reg_intr_vect_rw_mask___timer___width 1
137#define reg_intr_vect_rw_mask___timer___bit 26
138#define reg_intr_vect_rw_mask___bif_arb___lsb 27
139#define reg_intr_vect_rw_mask___bif_arb___width 1
140#define reg_intr_vect_rw_mask___bif_arb___bit 27
141#define reg_intr_vect_rw_mask___bif_dma___lsb 28
142#define reg_intr_vect_rw_mask___bif_dma___width 1
143#define reg_intr_vect_rw_mask___bif_dma___bit 28
144#define reg_intr_vect_rw_mask___ext___lsb 29
145#define reg_intr_vect_rw_mask___ext___width 1
146#define reg_intr_vect_rw_mask___ext___bit 29
147#define reg_intr_vect_rw_mask_offset 0
148
149/* Register r_vect, scope intr_vect, type r */
150#define reg_intr_vect_r_vect___memarb___lsb 0
151#define reg_intr_vect_r_vect___memarb___width 1
152#define reg_intr_vect_r_vect___memarb___bit 0
153#define reg_intr_vect_r_vect___gen_io___lsb 1
154#define reg_intr_vect_r_vect___gen_io___width 1
155#define reg_intr_vect_r_vect___gen_io___bit 1
156#define reg_intr_vect_r_vect___iop0___lsb 2
157#define reg_intr_vect_r_vect___iop0___width 1
158#define reg_intr_vect_r_vect___iop0___bit 2
159#define reg_intr_vect_r_vect___iop1___lsb 3
160#define reg_intr_vect_r_vect___iop1___width 1
161#define reg_intr_vect_r_vect___iop1___bit 3
162#define reg_intr_vect_r_vect___iop2___lsb 4
163#define reg_intr_vect_r_vect___iop2___width 1
164#define reg_intr_vect_r_vect___iop2___bit 4
165#define reg_intr_vect_r_vect___iop3___lsb 5
166#define reg_intr_vect_r_vect___iop3___width 1
167#define reg_intr_vect_r_vect___iop3___bit 5
168#define reg_intr_vect_r_vect___dma0___lsb 6
169#define reg_intr_vect_r_vect___dma0___width 1
170#define reg_intr_vect_r_vect___dma0___bit 6
171#define reg_intr_vect_r_vect___dma1___lsb 7
172#define reg_intr_vect_r_vect___dma1___width 1
173#define reg_intr_vect_r_vect___dma1___bit 7
174#define reg_intr_vect_r_vect___dma2___lsb 8
175#define reg_intr_vect_r_vect___dma2___width 1
176#define reg_intr_vect_r_vect___dma2___bit 8
177#define reg_intr_vect_r_vect___dma3___lsb 9
178#define reg_intr_vect_r_vect___dma3___width 1
179#define reg_intr_vect_r_vect___dma3___bit 9
180#define reg_intr_vect_r_vect___dma4___lsb 10
181#define reg_intr_vect_r_vect___dma4___width 1
182#define reg_intr_vect_r_vect___dma4___bit 10
183#define reg_intr_vect_r_vect___dma5___lsb 11
184#define reg_intr_vect_r_vect___dma5___width 1
185#define reg_intr_vect_r_vect___dma5___bit 11
186#define reg_intr_vect_r_vect___dma6___lsb 12
187#define reg_intr_vect_r_vect___dma6___width 1
188#define reg_intr_vect_r_vect___dma6___bit 12
189#define reg_intr_vect_r_vect___dma7___lsb 13
190#define reg_intr_vect_r_vect___dma7___width 1
191#define reg_intr_vect_r_vect___dma7___bit 13
192#define reg_intr_vect_r_vect___dma8___lsb 14
193#define reg_intr_vect_r_vect___dma8___width 1
194#define reg_intr_vect_r_vect___dma8___bit 14
195#define reg_intr_vect_r_vect___dma9___lsb 15
196#define reg_intr_vect_r_vect___dma9___width 1
197#define reg_intr_vect_r_vect___dma9___bit 15
198#define reg_intr_vect_r_vect___ata___lsb 16
199#define reg_intr_vect_r_vect___ata___width 1
200#define reg_intr_vect_r_vect___ata___bit 16
201#define reg_intr_vect_r_vect___sser0___lsb 17
202#define reg_intr_vect_r_vect___sser0___width 1
203#define reg_intr_vect_r_vect___sser0___bit 17
204#define reg_intr_vect_r_vect___sser1___lsb 18
205#define reg_intr_vect_r_vect___sser1___width 1
206#define reg_intr_vect_r_vect___sser1___bit 18
207#define reg_intr_vect_r_vect___ser0___lsb 19
208#define reg_intr_vect_r_vect___ser0___width 1
209#define reg_intr_vect_r_vect___ser0___bit 19
210#define reg_intr_vect_r_vect___ser1___lsb 20
211#define reg_intr_vect_r_vect___ser1___width 1
212#define reg_intr_vect_r_vect___ser1___bit 20
213#define reg_intr_vect_r_vect___ser2___lsb 21
214#define reg_intr_vect_r_vect___ser2___width 1
215#define reg_intr_vect_r_vect___ser2___bit 21
216#define reg_intr_vect_r_vect___ser3___lsb 22
217#define reg_intr_vect_r_vect___ser3___width 1
218#define reg_intr_vect_r_vect___ser3___bit 22
219#define reg_intr_vect_r_vect___p21___lsb 23
220#define reg_intr_vect_r_vect___p21___width 1
221#define reg_intr_vect_r_vect___p21___bit 23
222#define reg_intr_vect_r_vect___eth0___lsb 24
223#define reg_intr_vect_r_vect___eth0___width 1
224#define reg_intr_vect_r_vect___eth0___bit 24
225#define reg_intr_vect_r_vect___eth1___lsb 25
226#define reg_intr_vect_r_vect___eth1___width 1
227#define reg_intr_vect_r_vect___eth1___bit 25
228#define reg_intr_vect_r_vect___timer___lsb 26
229#define reg_intr_vect_r_vect___timer___width 1
230#define reg_intr_vect_r_vect___timer___bit 26
231#define reg_intr_vect_r_vect___bif_arb___lsb 27
232#define reg_intr_vect_r_vect___bif_arb___width 1
233#define reg_intr_vect_r_vect___bif_arb___bit 27
234#define reg_intr_vect_r_vect___bif_dma___lsb 28
235#define reg_intr_vect_r_vect___bif_dma___width 1
236#define reg_intr_vect_r_vect___bif_dma___bit 28
237#define reg_intr_vect_r_vect___ext___lsb 29
238#define reg_intr_vect_r_vect___ext___width 1
239#define reg_intr_vect_r_vect___ext___bit 29
240#define reg_intr_vect_r_vect_offset 4
241
242/* Register r_masked_vect, scope intr_vect, type r */
243#define reg_intr_vect_r_masked_vect___memarb___lsb 0
244#define reg_intr_vect_r_masked_vect___memarb___width 1
245#define reg_intr_vect_r_masked_vect___memarb___bit 0
246#define reg_intr_vect_r_masked_vect___gen_io___lsb 1
247#define reg_intr_vect_r_masked_vect___gen_io___width 1
248#define reg_intr_vect_r_masked_vect___gen_io___bit 1
249#define reg_intr_vect_r_masked_vect___iop0___lsb 2
250#define reg_intr_vect_r_masked_vect___iop0___width 1
251#define reg_intr_vect_r_masked_vect___iop0___bit 2
252#define reg_intr_vect_r_masked_vect___iop1___lsb 3
253#define reg_intr_vect_r_masked_vect___iop1___width 1
254#define reg_intr_vect_r_masked_vect___iop1___bit 3
255#define reg_intr_vect_r_masked_vect___iop2___lsb 4
256#define reg_intr_vect_r_masked_vect___iop2___width 1
257#define reg_intr_vect_r_masked_vect___iop2___bit 4
258#define reg_intr_vect_r_masked_vect___iop3___lsb 5
259#define reg_intr_vect_r_masked_vect___iop3___width 1
260#define reg_intr_vect_r_masked_vect___iop3___bit 5
261#define reg_intr_vect_r_masked_vect___dma0___lsb 6
262#define reg_intr_vect_r_masked_vect___dma0___width 1
263#define reg_intr_vect_r_masked_vect___dma0___bit 6
264#define reg_intr_vect_r_masked_vect___dma1___lsb 7
265#define reg_intr_vect_r_masked_vect___dma1___width 1
266#define reg_intr_vect_r_masked_vect___dma1___bit 7
267#define reg_intr_vect_r_masked_vect___dma2___lsb 8
268#define reg_intr_vect_r_masked_vect___dma2___width 1
269#define reg_intr_vect_r_masked_vect___dma2___bit 8
270#define reg_intr_vect_r_masked_vect___dma3___lsb 9
271#define reg_intr_vect_r_masked_vect___dma3___width 1
272#define reg_intr_vect_r_masked_vect___dma3___bit 9
273#define reg_intr_vect_r_masked_vect___dma4___lsb 10
274#define reg_intr_vect_r_masked_vect___dma4___width 1
275#define reg_intr_vect_r_masked_vect___dma4___bit 10
276#define reg_intr_vect_r_masked_vect___dma5___lsb 11
277#define reg_intr_vect_r_masked_vect___dma5___width 1
278#define reg_intr_vect_r_masked_vect___dma5___bit 11
279#define reg_intr_vect_r_masked_vect___dma6___lsb 12
280#define reg_intr_vect_r_masked_vect___dma6___width 1
281#define reg_intr_vect_r_masked_vect___dma6___bit 12
282#define reg_intr_vect_r_masked_vect___dma7___lsb 13
283#define reg_intr_vect_r_masked_vect___dma7___width 1
284#define reg_intr_vect_r_masked_vect___dma7___bit 13
285#define reg_intr_vect_r_masked_vect___dma8___lsb 14
286#define reg_intr_vect_r_masked_vect___dma8___width 1
287#define reg_intr_vect_r_masked_vect___dma8___bit 14
288#define reg_intr_vect_r_masked_vect___dma9___lsb 15
289#define reg_intr_vect_r_masked_vect___dma9___width 1
290#define reg_intr_vect_r_masked_vect___dma9___bit 15
291#define reg_intr_vect_r_masked_vect___ata___lsb 16
292#define reg_intr_vect_r_masked_vect___ata___width 1
293#define reg_intr_vect_r_masked_vect___ata___bit 16
294#define reg_intr_vect_r_masked_vect___sser0___lsb 17
295#define reg_intr_vect_r_masked_vect___sser0___width 1
296#define reg_intr_vect_r_masked_vect___sser0___bit 17
297#define reg_intr_vect_r_masked_vect___sser1___lsb 18
298#define reg_intr_vect_r_masked_vect___sser1___width 1
299#define reg_intr_vect_r_masked_vect___sser1___bit 18
300#define reg_intr_vect_r_masked_vect___ser0___lsb 19
301#define reg_intr_vect_r_masked_vect___ser0___width 1
302#define reg_intr_vect_r_masked_vect___ser0___bit 19
303#define reg_intr_vect_r_masked_vect___ser1___lsb 20
304#define reg_intr_vect_r_masked_vect___ser1___width 1
305#define reg_intr_vect_r_masked_vect___ser1___bit 20
306#define reg_intr_vect_r_masked_vect___ser2___lsb 21
307#define reg_intr_vect_r_masked_vect___ser2___width 1
308#define reg_intr_vect_r_masked_vect___ser2___bit 21
309#define reg_intr_vect_r_masked_vect___ser3___lsb 22
310#define reg_intr_vect_r_masked_vect___ser3___width 1
311#define reg_intr_vect_r_masked_vect___ser3___bit 22
312#define reg_intr_vect_r_masked_vect___p21___lsb 23
313#define reg_intr_vect_r_masked_vect___p21___width 1
314#define reg_intr_vect_r_masked_vect___p21___bit 23
315#define reg_intr_vect_r_masked_vect___eth0___lsb 24
316#define reg_intr_vect_r_masked_vect___eth0___width 1
317#define reg_intr_vect_r_masked_vect___eth0___bit 24
318#define reg_intr_vect_r_masked_vect___eth1___lsb 25
319#define reg_intr_vect_r_masked_vect___eth1___width 1
320#define reg_intr_vect_r_masked_vect___eth1___bit 25
321#define reg_intr_vect_r_masked_vect___timer___lsb 26
322#define reg_intr_vect_r_masked_vect___timer___width 1
323#define reg_intr_vect_r_masked_vect___timer___bit 26
324#define reg_intr_vect_r_masked_vect___bif_arb___lsb 27
325#define reg_intr_vect_r_masked_vect___bif_arb___width 1
326#define reg_intr_vect_r_masked_vect___bif_arb___bit 27
327#define reg_intr_vect_r_masked_vect___bif_dma___lsb 28
328#define reg_intr_vect_r_masked_vect___bif_dma___width 1
329#define reg_intr_vect_r_masked_vect___bif_dma___bit 28
330#define reg_intr_vect_r_masked_vect___ext___lsb 29
331#define reg_intr_vect_r_masked_vect___ext___width 1
332#define reg_intr_vect_r_masked_vect___ext___bit 29
333#define reg_intr_vect_r_masked_vect_offset 8
334
335/* Register r_nmi, scope intr_vect, type r */
336#define reg_intr_vect_r_nmi___ext___lsb 0
337#define reg_intr_vect_r_nmi___ext___width 1
338#define reg_intr_vect_r_nmi___ext___bit 0
339#define reg_intr_vect_r_nmi___watchdog___lsb 1
340#define reg_intr_vect_r_nmi___watchdog___width 1
341#define reg_intr_vect_r_nmi___watchdog___bit 1
342#define reg_intr_vect_r_nmi_offset 12
343
344/* Register r_guru, scope intr_vect, type r */
345#define reg_intr_vect_r_guru___jtag___lsb 0
346#define reg_intr_vect_r_guru___jtag___width 1
347#define reg_intr_vect_r_guru___jtag___bit 0
348#define reg_intr_vect_r_guru_offset 16
349
350
351/* Constants */
352#define regk_intr_vect_off 0x00000000
353#define regk_intr_vect_on 0x00000001
354#define regk_intr_vect_rw_mask_default 0x00000000
355#endif /* __intr_vect_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/irq_nmi_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/irq_nmi_defs_asm.h
deleted file mode 100644
index 0c8084054840..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/irq_nmi_defs_asm.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef __irq_nmi_defs_asm_h
2#define __irq_nmi_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../mod/irq_nmi.r
7 * id: <not found>
8 * last modfied: Thu Jan 22 09:22:43 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/irq_nmi_defs_asm.h ../../mod/irq_nmi.r
11 * id: $Id: irq_nmi_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cmd, scope irq_nmi, type rw */
57#define reg_irq_nmi_rw_cmd___delay___lsb 0
58#define reg_irq_nmi_rw_cmd___delay___width 16
59#define reg_irq_nmi_rw_cmd___op___lsb 16
60#define reg_irq_nmi_rw_cmd___op___width 2
61#define reg_irq_nmi_rw_cmd_offset 0
62
63
64/* Constants */
65#define regk_irq_nmi_ack_irq 0x00000002
66#define regk_irq_nmi_ack_nmi 0x00000003
67#define regk_irq_nmi_irq 0x00000000
68#define regk_irq_nmi_nmi 0x00000001
69#endif /* __irq_nmi_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/marb_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/marb_defs_asm.h
deleted file mode 100644
index 45400eb8d389..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/marb_defs_asm.h
+++ /dev/null
@@ -1,579 +0,0 @@
1#ifndef __marb_defs_asm_h
2#define __marb_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/memarb/rtl/guinness/marb_top.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:12:16 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/marb_defs_asm.h ../../inst/memarb/rtl/guinness/marb_top.r
11 * id: $Id: marb_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56#define STRIDE_marb_rw_int_slots 4
57/* Register rw_int_slots, scope marb, type rw */
58#define reg_marb_rw_int_slots___owner___lsb 0
59#define reg_marb_rw_int_slots___owner___width 4
60#define reg_marb_rw_int_slots_offset 0
61
62#define STRIDE_marb_rw_ext_slots 4
63/* Register rw_ext_slots, scope marb, type rw */
64#define reg_marb_rw_ext_slots___owner___lsb 0
65#define reg_marb_rw_ext_slots___owner___width 4
66#define reg_marb_rw_ext_slots_offset 256
67
68#define STRIDE_marb_rw_regs_slots 4
69/* Register rw_regs_slots, scope marb, type rw */
70#define reg_marb_rw_regs_slots___owner___lsb 0
71#define reg_marb_rw_regs_slots___owner___width 4
72#define reg_marb_rw_regs_slots_offset 512
73
74/* Register rw_intr_mask, scope marb, type rw */
75#define reg_marb_rw_intr_mask___bp0___lsb 0
76#define reg_marb_rw_intr_mask___bp0___width 1
77#define reg_marb_rw_intr_mask___bp0___bit 0
78#define reg_marb_rw_intr_mask___bp1___lsb 1
79#define reg_marb_rw_intr_mask___bp1___width 1
80#define reg_marb_rw_intr_mask___bp1___bit 1
81#define reg_marb_rw_intr_mask___bp2___lsb 2
82#define reg_marb_rw_intr_mask___bp2___width 1
83#define reg_marb_rw_intr_mask___bp2___bit 2
84#define reg_marb_rw_intr_mask___bp3___lsb 3
85#define reg_marb_rw_intr_mask___bp3___width 1
86#define reg_marb_rw_intr_mask___bp3___bit 3
87#define reg_marb_rw_intr_mask_offset 528
88
89/* Register rw_ack_intr, scope marb, type rw */
90#define reg_marb_rw_ack_intr___bp0___lsb 0
91#define reg_marb_rw_ack_intr___bp0___width 1
92#define reg_marb_rw_ack_intr___bp0___bit 0
93#define reg_marb_rw_ack_intr___bp1___lsb 1
94#define reg_marb_rw_ack_intr___bp1___width 1
95#define reg_marb_rw_ack_intr___bp1___bit 1
96#define reg_marb_rw_ack_intr___bp2___lsb 2
97#define reg_marb_rw_ack_intr___bp2___width 1
98#define reg_marb_rw_ack_intr___bp2___bit 2
99#define reg_marb_rw_ack_intr___bp3___lsb 3
100#define reg_marb_rw_ack_intr___bp3___width 1
101#define reg_marb_rw_ack_intr___bp3___bit 3
102#define reg_marb_rw_ack_intr_offset 532
103
104/* Register r_intr, scope marb, type r */
105#define reg_marb_r_intr___bp0___lsb 0
106#define reg_marb_r_intr___bp0___width 1
107#define reg_marb_r_intr___bp0___bit 0
108#define reg_marb_r_intr___bp1___lsb 1
109#define reg_marb_r_intr___bp1___width 1
110#define reg_marb_r_intr___bp1___bit 1
111#define reg_marb_r_intr___bp2___lsb 2
112#define reg_marb_r_intr___bp2___width 1
113#define reg_marb_r_intr___bp2___bit 2
114#define reg_marb_r_intr___bp3___lsb 3
115#define reg_marb_r_intr___bp3___width 1
116#define reg_marb_r_intr___bp3___bit 3
117#define reg_marb_r_intr_offset 536
118
119/* Register r_masked_intr, scope marb, type r */
120#define reg_marb_r_masked_intr___bp0___lsb 0
121#define reg_marb_r_masked_intr___bp0___width 1
122#define reg_marb_r_masked_intr___bp0___bit 0
123#define reg_marb_r_masked_intr___bp1___lsb 1
124#define reg_marb_r_masked_intr___bp1___width 1
125#define reg_marb_r_masked_intr___bp1___bit 1
126#define reg_marb_r_masked_intr___bp2___lsb 2
127#define reg_marb_r_masked_intr___bp2___width 1
128#define reg_marb_r_masked_intr___bp2___bit 2
129#define reg_marb_r_masked_intr___bp3___lsb 3
130#define reg_marb_r_masked_intr___bp3___width 1
131#define reg_marb_r_masked_intr___bp3___bit 3
132#define reg_marb_r_masked_intr_offset 540
133
134/* Register rw_stop_mask, scope marb, type rw */
135#define reg_marb_rw_stop_mask___dma0___lsb 0
136#define reg_marb_rw_stop_mask___dma0___width 1
137#define reg_marb_rw_stop_mask___dma0___bit 0
138#define reg_marb_rw_stop_mask___dma1___lsb 1
139#define reg_marb_rw_stop_mask___dma1___width 1
140#define reg_marb_rw_stop_mask___dma1___bit 1
141#define reg_marb_rw_stop_mask___dma2___lsb 2
142#define reg_marb_rw_stop_mask___dma2___width 1
143#define reg_marb_rw_stop_mask___dma2___bit 2
144#define reg_marb_rw_stop_mask___dma3___lsb 3
145#define reg_marb_rw_stop_mask___dma3___width 1
146#define reg_marb_rw_stop_mask___dma3___bit 3
147#define reg_marb_rw_stop_mask___dma4___lsb 4
148#define reg_marb_rw_stop_mask___dma4___width 1
149#define reg_marb_rw_stop_mask___dma4___bit 4
150#define reg_marb_rw_stop_mask___dma5___lsb 5
151#define reg_marb_rw_stop_mask___dma5___width 1
152#define reg_marb_rw_stop_mask___dma5___bit 5
153#define reg_marb_rw_stop_mask___dma6___lsb 6
154#define reg_marb_rw_stop_mask___dma6___width 1
155#define reg_marb_rw_stop_mask___dma6___bit 6
156#define reg_marb_rw_stop_mask___dma7___lsb 7
157#define reg_marb_rw_stop_mask___dma7___width 1
158#define reg_marb_rw_stop_mask___dma7___bit 7
159#define reg_marb_rw_stop_mask___dma8___lsb 8
160#define reg_marb_rw_stop_mask___dma8___width 1
161#define reg_marb_rw_stop_mask___dma8___bit 8
162#define reg_marb_rw_stop_mask___dma9___lsb 9
163#define reg_marb_rw_stop_mask___dma9___width 1
164#define reg_marb_rw_stop_mask___dma9___bit 9
165#define reg_marb_rw_stop_mask___cpui___lsb 10
166#define reg_marb_rw_stop_mask___cpui___width 1
167#define reg_marb_rw_stop_mask___cpui___bit 10
168#define reg_marb_rw_stop_mask___cpud___lsb 11
169#define reg_marb_rw_stop_mask___cpud___width 1
170#define reg_marb_rw_stop_mask___cpud___bit 11
171#define reg_marb_rw_stop_mask___iop___lsb 12
172#define reg_marb_rw_stop_mask___iop___width 1
173#define reg_marb_rw_stop_mask___iop___bit 12
174#define reg_marb_rw_stop_mask___slave___lsb 13
175#define reg_marb_rw_stop_mask___slave___width 1
176#define reg_marb_rw_stop_mask___slave___bit 13
177#define reg_marb_rw_stop_mask_offset 544
178
179/* Register r_stopped, scope marb, type r */
180#define reg_marb_r_stopped___dma0___lsb 0
181#define reg_marb_r_stopped___dma0___width 1
182#define reg_marb_r_stopped___dma0___bit 0
183#define reg_marb_r_stopped___dma1___lsb 1
184#define reg_marb_r_stopped___dma1___width 1
185#define reg_marb_r_stopped___dma1___bit 1
186#define reg_marb_r_stopped___dma2___lsb 2
187#define reg_marb_r_stopped___dma2___width 1
188#define reg_marb_r_stopped___dma2___bit 2
189#define reg_marb_r_stopped___dma3___lsb 3
190#define reg_marb_r_stopped___dma3___width 1
191#define reg_marb_r_stopped___dma3___bit 3
192#define reg_marb_r_stopped___dma4___lsb 4
193#define reg_marb_r_stopped___dma4___width 1
194#define reg_marb_r_stopped___dma4___bit 4
195#define reg_marb_r_stopped___dma5___lsb 5
196#define reg_marb_r_stopped___dma5___width 1
197#define reg_marb_r_stopped___dma5___bit 5
198#define reg_marb_r_stopped___dma6___lsb 6
199#define reg_marb_r_stopped___dma6___width 1
200#define reg_marb_r_stopped___dma6___bit 6
201#define reg_marb_r_stopped___dma7___lsb 7
202#define reg_marb_r_stopped___dma7___width 1
203#define reg_marb_r_stopped___dma7___bit 7
204#define reg_marb_r_stopped___dma8___lsb 8
205#define reg_marb_r_stopped___dma8___width 1
206#define reg_marb_r_stopped___dma8___bit 8
207#define reg_marb_r_stopped___dma9___lsb 9
208#define reg_marb_r_stopped___dma9___width 1
209#define reg_marb_r_stopped___dma9___bit 9
210#define reg_marb_r_stopped___cpui___lsb 10
211#define reg_marb_r_stopped___cpui___width 1
212#define reg_marb_r_stopped___cpui___bit 10
213#define reg_marb_r_stopped___cpud___lsb 11
214#define reg_marb_r_stopped___cpud___width 1
215#define reg_marb_r_stopped___cpud___bit 11
216#define reg_marb_r_stopped___iop___lsb 12
217#define reg_marb_r_stopped___iop___width 1
218#define reg_marb_r_stopped___iop___bit 12
219#define reg_marb_r_stopped___slave___lsb 13
220#define reg_marb_r_stopped___slave___width 1
221#define reg_marb_r_stopped___slave___bit 13
222#define reg_marb_r_stopped_offset 548
223
224/* Register rw_no_snoop, scope marb, type rw */
225#define reg_marb_rw_no_snoop___dma0___lsb 0
226#define reg_marb_rw_no_snoop___dma0___width 1
227#define reg_marb_rw_no_snoop___dma0___bit 0
228#define reg_marb_rw_no_snoop___dma1___lsb 1
229#define reg_marb_rw_no_snoop___dma1___width 1
230#define reg_marb_rw_no_snoop___dma1___bit 1
231#define reg_marb_rw_no_snoop___dma2___lsb 2
232#define reg_marb_rw_no_snoop___dma2___width 1
233#define reg_marb_rw_no_snoop___dma2___bit 2
234#define reg_marb_rw_no_snoop___dma3___lsb 3
235#define reg_marb_rw_no_snoop___dma3___width 1
236#define reg_marb_rw_no_snoop___dma3___bit 3
237#define reg_marb_rw_no_snoop___dma4___lsb 4
238#define reg_marb_rw_no_snoop___dma4___width 1
239#define reg_marb_rw_no_snoop___dma4___bit 4
240#define reg_marb_rw_no_snoop___dma5___lsb 5
241#define reg_marb_rw_no_snoop___dma5___width 1
242#define reg_marb_rw_no_snoop___dma5___bit 5
243#define reg_marb_rw_no_snoop___dma6___lsb 6
244#define reg_marb_rw_no_snoop___dma6___width 1
245#define reg_marb_rw_no_snoop___dma6___bit 6
246#define reg_marb_rw_no_snoop___dma7___lsb 7
247#define reg_marb_rw_no_snoop___dma7___width 1
248#define reg_marb_rw_no_snoop___dma7___bit 7
249#define reg_marb_rw_no_snoop___dma8___lsb 8
250#define reg_marb_rw_no_snoop___dma8___width 1
251#define reg_marb_rw_no_snoop___dma8___bit 8
252#define reg_marb_rw_no_snoop___dma9___lsb 9
253#define reg_marb_rw_no_snoop___dma9___width 1
254#define reg_marb_rw_no_snoop___dma9___bit 9
255#define reg_marb_rw_no_snoop___cpui___lsb 10
256#define reg_marb_rw_no_snoop___cpui___width 1
257#define reg_marb_rw_no_snoop___cpui___bit 10
258#define reg_marb_rw_no_snoop___cpud___lsb 11
259#define reg_marb_rw_no_snoop___cpud___width 1
260#define reg_marb_rw_no_snoop___cpud___bit 11
261#define reg_marb_rw_no_snoop___iop___lsb 12
262#define reg_marb_rw_no_snoop___iop___width 1
263#define reg_marb_rw_no_snoop___iop___bit 12
264#define reg_marb_rw_no_snoop___slave___lsb 13
265#define reg_marb_rw_no_snoop___slave___width 1
266#define reg_marb_rw_no_snoop___slave___bit 13
267#define reg_marb_rw_no_snoop_offset 832
268
269/* Register rw_no_snoop_rq, scope marb, type rw */
270#define reg_marb_rw_no_snoop_rq___cpui___lsb 10
271#define reg_marb_rw_no_snoop_rq___cpui___width 1
272#define reg_marb_rw_no_snoop_rq___cpui___bit 10
273#define reg_marb_rw_no_snoop_rq___cpud___lsb 11
274#define reg_marb_rw_no_snoop_rq___cpud___width 1
275#define reg_marb_rw_no_snoop_rq___cpud___bit 11
276#define reg_marb_rw_no_snoop_rq_offset 836
277
278
279/* Constants */
280#define regk_marb_cpud 0x0000000b
281#define regk_marb_cpui 0x0000000a
282#define regk_marb_dma0 0x00000000
283#define regk_marb_dma1 0x00000001
284#define regk_marb_dma2 0x00000002
285#define regk_marb_dma3 0x00000003
286#define regk_marb_dma4 0x00000004
287#define regk_marb_dma5 0x00000005
288#define regk_marb_dma6 0x00000006
289#define regk_marb_dma7 0x00000007
290#define regk_marb_dma8 0x00000008
291#define regk_marb_dma9 0x00000009
292#define regk_marb_iop 0x0000000c
293#define regk_marb_no 0x00000000
294#define regk_marb_r_stopped_default 0x00000000
295#define regk_marb_rw_ext_slots_default 0x00000000
296#define regk_marb_rw_ext_slots_size 0x00000040
297#define regk_marb_rw_int_slots_default 0x00000000
298#define regk_marb_rw_int_slots_size 0x00000040
299#define regk_marb_rw_intr_mask_default 0x00000000
300#define regk_marb_rw_no_snoop_default 0x00000000
301#define regk_marb_rw_no_snoop_rq_default 0x00000000
302#define regk_marb_rw_regs_slots_default 0x00000000
303#define regk_marb_rw_regs_slots_size 0x00000004
304#define regk_marb_rw_stop_mask_default 0x00000000
305#define regk_marb_slave 0x0000000d
306#define regk_marb_yes 0x00000001
307#endif /* __marb_defs_asm_h */
308#ifndef __marb_bp_defs_asm_h
309#define __marb_bp_defs_asm_h
310
311/*
312 * This file is autogenerated from
313 * file: ../../inst/memarb/rtl/guinness/marb_top.r
314 * id: <not found>
315 * last modfied: Mon Apr 11 16:12:16 2005
316 *
317 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/marb_defs_asm.h ../../inst/memarb/rtl/guinness/marb_top.r
318 * id: $Id: marb_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
319 * Any changes here will be lost.
320 *
321 * -*- buffer-read-only: t -*-
322 */
323
324#ifndef REG_FIELD
325#define REG_FIELD( scope, reg, field, value ) \
326 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
327#define REG_FIELD_X_( value, shift ) ((value) << shift)
328#endif
329
330#ifndef REG_STATE
331#define REG_STATE( scope, reg, field, symbolic_value ) \
332 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
333#define REG_STATE_X_( k, shift ) (k << shift)
334#endif
335
336#ifndef REG_MASK
337#define REG_MASK( scope, reg, field ) \
338 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
339#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
340#endif
341
342#ifndef REG_LSB
343#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
344#endif
345
346#ifndef REG_BIT
347#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
348#endif
349
350#ifndef REG_ADDR
351#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
352#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
353#endif
354
355#ifndef REG_ADDR_VECT
356#define REG_ADDR_VECT( scope, inst, reg, index ) \
357 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
358 STRIDE_##scope##_##reg )
359#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
360 ((inst) + offs + (index) * stride)
361#endif
362
363/* Register rw_first_addr, scope marb_bp, type rw */
364#define reg_marb_bp_rw_first_addr_offset 0
365
366/* Register rw_last_addr, scope marb_bp, type rw */
367#define reg_marb_bp_rw_last_addr_offset 4
368
369/* Register rw_op, scope marb_bp, type rw */
370#define reg_marb_bp_rw_op___rd___lsb 0
371#define reg_marb_bp_rw_op___rd___width 1
372#define reg_marb_bp_rw_op___rd___bit 0
373#define reg_marb_bp_rw_op___wr___lsb 1
374#define reg_marb_bp_rw_op___wr___width 1
375#define reg_marb_bp_rw_op___wr___bit 1
376#define reg_marb_bp_rw_op___rd_excl___lsb 2
377#define reg_marb_bp_rw_op___rd_excl___width 1
378#define reg_marb_bp_rw_op___rd_excl___bit 2
379#define reg_marb_bp_rw_op___pri_wr___lsb 3
380#define reg_marb_bp_rw_op___pri_wr___width 1
381#define reg_marb_bp_rw_op___pri_wr___bit 3
382#define reg_marb_bp_rw_op___us_rd___lsb 4
383#define reg_marb_bp_rw_op___us_rd___width 1
384#define reg_marb_bp_rw_op___us_rd___bit 4
385#define reg_marb_bp_rw_op___us_wr___lsb 5
386#define reg_marb_bp_rw_op___us_wr___width 1
387#define reg_marb_bp_rw_op___us_wr___bit 5
388#define reg_marb_bp_rw_op___us_rd_excl___lsb 6
389#define reg_marb_bp_rw_op___us_rd_excl___width 1
390#define reg_marb_bp_rw_op___us_rd_excl___bit 6
391#define reg_marb_bp_rw_op___us_pri_wr___lsb 7
392#define reg_marb_bp_rw_op___us_pri_wr___width 1
393#define reg_marb_bp_rw_op___us_pri_wr___bit 7
394#define reg_marb_bp_rw_op_offset 8
395
396/* Register rw_clients, scope marb_bp, type rw */
397#define reg_marb_bp_rw_clients___dma0___lsb 0
398#define reg_marb_bp_rw_clients___dma0___width 1
399#define reg_marb_bp_rw_clients___dma0___bit 0
400#define reg_marb_bp_rw_clients___dma1___lsb 1
401#define reg_marb_bp_rw_clients___dma1___width 1
402#define reg_marb_bp_rw_clients___dma1___bit 1
403#define reg_marb_bp_rw_clients___dma2___lsb 2
404#define reg_marb_bp_rw_clients___dma2___width 1
405#define reg_marb_bp_rw_clients___dma2___bit 2
406#define reg_marb_bp_rw_clients___dma3___lsb 3
407#define reg_marb_bp_rw_clients___dma3___width 1
408#define reg_marb_bp_rw_clients___dma3___bit 3
409#define reg_marb_bp_rw_clients___dma4___lsb 4
410#define reg_marb_bp_rw_clients___dma4___width 1
411#define reg_marb_bp_rw_clients___dma4___bit 4
412#define reg_marb_bp_rw_clients___dma5___lsb 5
413#define reg_marb_bp_rw_clients___dma5___width 1
414#define reg_marb_bp_rw_clients___dma5___bit 5
415#define reg_marb_bp_rw_clients___dma6___lsb 6
416#define reg_marb_bp_rw_clients___dma6___width 1
417#define reg_marb_bp_rw_clients___dma6___bit 6
418#define reg_marb_bp_rw_clients___dma7___lsb 7
419#define reg_marb_bp_rw_clients___dma7___width 1
420#define reg_marb_bp_rw_clients___dma7___bit 7
421#define reg_marb_bp_rw_clients___dma8___lsb 8
422#define reg_marb_bp_rw_clients___dma8___width 1
423#define reg_marb_bp_rw_clients___dma8___bit 8
424#define reg_marb_bp_rw_clients___dma9___lsb 9
425#define reg_marb_bp_rw_clients___dma9___width 1
426#define reg_marb_bp_rw_clients___dma9___bit 9
427#define reg_marb_bp_rw_clients___cpui___lsb 10
428#define reg_marb_bp_rw_clients___cpui___width 1
429#define reg_marb_bp_rw_clients___cpui___bit 10
430#define reg_marb_bp_rw_clients___cpud___lsb 11
431#define reg_marb_bp_rw_clients___cpud___width 1
432#define reg_marb_bp_rw_clients___cpud___bit 11
433#define reg_marb_bp_rw_clients___iop___lsb 12
434#define reg_marb_bp_rw_clients___iop___width 1
435#define reg_marb_bp_rw_clients___iop___bit 12
436#define reg_marb_bp_rw_clients___slave___lsb 13
437#define reg_marb_bp_rw_clients___slave___width 1
438#define reg_marb_bp_rw_clients___slave___bit 13
439#define reg_marb_bp_rw_clients_offset 12
440
441/* Register rw_options, scope marb_bp, type rw */
442#define reg_marb_bp_rw_options___wrap___lsb 0
443#define reg_marb_bp_rw_options___wrap___width 1
444#define reg_marb_bp_rw_options___wrap___bit 0
445#define reg_marb_bp_rw_options_offset 16
446
447/* Register r_brk_addr, scope marb_bp, type r */
448#define reg_marb_bp_r_brk_addr_offset 20
449
450/* Register r_brk_op, scope marb_bp, type r */
451#define reg_marb_bp_r_brk_op___rd___lsb 0
452#define reg_marb_bp_r_brk_op___rd___width 1
453#define reg_marb_bp_r_brk_op___rd___bit 0
454#define reg_marb_bp_r_brk_op___wr___lsb 1
455#define reg_marb_bp_r_brk_op___wr___width 1
456#define reg_marb_bp_r_brk_op___wr___bit 1
457#define reg_marb_bp_r_brk_op___rd_excl___lsb 2
458#define reg_marb_bp_r_brk_op___rd_excl___width 1
459#define reg_marb_bp_r_brk_op___rd_excl___bit 2
460#define reg_marb_bp_r_brk_op___pri_wr___lsb 3
461#define reg_marb_bp_r_brk_op___pri_wr___width 1
462#define reg_marb_bp_r_brk_op___pri_wr___bit 3
463#define reg_marb_bp_r_brk_op___us_rd___lsb 4
464#define reg_marb_bp_r_brk_op___us_rd___width 1
465#define reg_marb_bp_r_brk_op___us_rd___bit 4
466#define reg_marb_bp_r_brk_op___us_wr___lsb 5
467#define reg_marb_bp_r_brk_op___us_wr___width 1
468#define reg_marb_bp_r_brk_op___us_wr___bit 5
469#define reg_marb_bp_r_brk_op___us_rd_excl___lsb 6
470#define reg_marb_bp_r_brk_op___us_rd_excl___width 1
471#define reg_marb_bp_r_brk_op___us_rd_excl___bit 6
472#define reg_marb_bp_r_brk_op___us_pri_wr___lsb 7
473#define reg_marb_bp_r_brk_op___us_pri_wr___width 1
474#define reg_marb_bp_r_brk_op___us_pri_wr___bit 7
475#define reg_marb_bp_r_brk_op_offset 24
476
477/* Register r_brk_clients, scope marb_bp, type r */
478#define reg_marb_bp_r_brk_clients___dma0___lsb 0
479#define reg_marb_bp_r_brk_clients___dma0___width 1
480#define reg_marb_bp_r_brk_clients___dma0___bit 0
481#define reg_marb_bp_r_brk_clients___dma1___lsb 1
482#define reg_marb_bp_r_brk_clients___dma1___width 1
483#define reg_marb_bp_r_brk_clients___dma1___bit 1
484#define reg_marb_bp_r_brk_clients___dma2___lsb 2
485#define reg_marb_bp_r_brk_clients___dma2___width 1
486#define reg_marb_bp_r_brk_clients___dma2___bit 2
487#define reg_marb_bp_r_brk_clients___dma3___lsb 3
488#define reg_marb_bp_r_brk_clients___dma3___width 1
489#define reg_marb_bp_r_brk_clients___dma3___bit 3
490#define reg_marb_bp_r_brk_clients___dma4___lsb 4
491#define reg_marb_bp_r_brk_clients___dma4___width 1
492#define reg_marb_bp_r_brk_clients___dma4___bit 4
493#define reg_marb_bp_r_brk_clients___dma5___lsb 5
494#define reg_marb_bp_r_brk_clients___dma5___width 1
495#define reg_marb_bp_r_brk_clients___dma5___bit 5
496#define reg_marb_bp_r_brk_clients___dma6___lsb 6
497#define reg_marb_bp_r_brk_clients___dma6___width 1
498#define reg_marb_bp_r_brk_clients___dma6___bit 6
499#define reg_marb_bp_r_brk_clients___dma7___lsb 7
500#define reg_marb_bp_r_brk_clients___dma7___width 1
501#define reg_marb_bp_r_brk_clients___dma7___bit 7
502#define reg_marb_bp_r_brk_clients___dma8___lsb 8
503#define reg_marb_bp_r_brk_clients___dma8___width 1
504#define reg_marb_bp_r_brk_clients___dma8___bit 8
505#define reg_marb_bp_r_brk_clients___dma9___lsb 9
506#define reg_marb_bp_r_brk_clients___dma9___width 1
507#define reg_marb_bp_r_brk_clients___dma9___bit 9
508#define reg_marb_bp_r_brk_clients___cpui___lsb 10
509#define reg_marb_bp_r_brk_clients___cpui___width 1
510#define reg_marb_bp_r_brk_clients___cpui___bit 10
511#define reg_marb_bp_r_brk_clients___cpud___lsb 11
512#define reg_marb_bp_r_brk_clients___cpud___width 1
513#define reg_marb_bp_r_brk_clients___cpud___bit 11
514#define reg_marb_bp_r_brk_clients___iop___lsb 12
515#define reg_marb_bp_r_brk_clients___iop___width 1
516#define reg_marb_bp_r_brk_clients___iop___bit 12
517#define reg_marb_bp_r_brk_clients___slave___lsb 13
518#define reg_marb_bp_r_brk_clients___slave___width 1
519#define reg_marb_bp_r_brk_clients___slave___bit 13
520#define reg_marb_bp_r_brk_clients_offset 28
521
522/* Register r_brk_first_client, scope marb_bp, type r */
523#define reg_marb_bp_r_brk_first_client___dma0___lsb 0
524#define reg_marb_bp_r_brk_first_client___dma0___width 1
525#define reg_marb_bp_r_brk_first_client___dma0___bit 0
526#define reg_marb_bp_r_brk_first_client___dma1___lsb 1
527#define reg_marb_bp_r_brk_first_client___dma1___width 1
528#define reg_marb_bp_r_brk_first_client___dma1___bit 1
529#define reg_marb_bp_r_brk_first_client___dma2___lsb 2
530#define reg_marb_bp_r_brk_first_client___dma2___width 1
531#define reg_marb_bp_r_brk_first_client___dma2___bit 2
532#define reg_marb_bp_r_brk_first_client___dma3___lsb 3
533#define reg_marb_bp_r_brk_first_client___dma3___width 1
534#define reg_marb_bp_r_brk_first_client___dma3___bit 3
535#define reg_marb_bp_r_brk_first_client___dma4___lsb 4
536#define reg_marb_bp_r_brk_first_client___dma4___width 1
537#define reg_marb_bp_r_brk_first_client___dma4___bit 4
538#define reg_marb_bp_r_brk_first_client___dma5___lsb 5
539#define reg_marb_bp_r_brk_first_client___dma5___width 1
540#define reg_marb_bp_r_brk_first_client___dma5___bit 5
541#define reg_marb_bp_r_brk_first_client___dma6___lsb 6
542#define reg_marb_bp_r_brk_first_client___dma6___width 1
543#define reg_marb_bp_r_brk_first_client___dma6___bit 6
544#define reg_marb_bp_r_brk_first_client___dma7___lsb 7
545#define reg_marb_bp_r_brk_first_client___dma7___width 1
546#define reg_marb_bp_r_brk_first_client___dma7___bit 7
547#define reg_marb_bp_r_brk_first_client___dma8___lsb 8
548#define reg_marb_bp_r_brk_first_client___dma8___width 1
549#define reg_marb_bp_r_brk_first_client___dma8___bit 8
550#define reg_marb_bp_r_brk_first_client___dma9___lsb 9
551#define reg_marb_bp_r_brk_first_client___dma9___width 1
552#define reg_marb_bp_r_brk_first_client___dma9___bit 9
553#define reg_marb_bp_r_brk_first_client___cpui___lsb 10
554#define reg_marb_bp_r_brk_first_client___cpui___width 1
555#define reg_marb_bp_r_brk_first_client___cpui___bit 10
556#define reg_marb_bp_r_brk_first_client___cpud___lsb 11
557#define reg_marb_bp_r_brk_first_client___cpud___width 1
558#define reg_marb_bp_r_brk_first_client___cpud___bit 11
559#define reg_marb_bp_r_brk_first_client___iop___lsb 12
560#define reg_marb_bp_r_brk_first_client___iop___width 1
561#define reg_marb_bp_r_brk_first_client___iop___bit 12
562#define reg_marb_bp_r_brk_first_client___slave___lsb 13
563#define reg_marb_bp_r_brk_first_client___slave___width 1
564#define reg_marb_bp_r_brk_first_client___slave___bit 13
565#define reg_marb_bp_r_brk_first_client_offset 32
566
567/* Register r_brk_size, scope marb_bp, type r */
568#define reg_marb_bp_r_brk_size_offset 36
569
570/* Register rw_ack, scope marb_bp, type rw */
571#define reg_marb_bp_rw_ack_offset 40
572
573
574/* Constants */
575#define regk_marb_bp_no 0x00000000
576#define regk_marb_bp_rw_op_default 0x00000000
577#define regk_marb_bp_rw_options_default 0x00000000
578#define regk_marb_bp_yes 0x00000001
579#endif /* __marb_bp_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/mmu_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/mmu_defs_asm.h
deleted file mode 100644
index 505b7a16d878..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/mmu_defs_asm.h
+++ /dev/null
@@ -1,212 +0,0 @@
1#ifndef __mmu_defs_asm_h
2#define __mmu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/mmu/doc/mmu_regs.r
7 * id: mmu_regs.r,v 1.12 2004/05/06 13:48:45 mikaeln Exp
8 * last modfied: Mon Apr 11 17:03:20 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/mmu_defs_asm.h ../../inst/mmu/doc/mmu_regs.r
11 * id: $Id: mmu_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_mm_cfg, scope mmu, type rw */
57#define reg_mmu_rw_mm_cfg___seg_0___lsb 0
58#define reg_mmu_rw_mm_cfg___seg_0___width 1
59#define reg_mmu_rw_mm_cfg___seg_0___bit 0
60#define reg_mmu_rw_mm_cfg___seg_1___lsb 1
61#define reg_mmu_rw_mm_cfg___seg_1___width 1
62#define reg_mmu_rw_mm_cfg___seg_1___bit 1
63#define reg_mmu_rw_mm_cfg___seg_2___lsb 2
64#define reg_mmu_rw_mm_cfg___seg_2___width 1
65#define reg_mmu_rw_mm_cfg___seg_2___bit 2
66#define reg_mmu_rw_mm_cfg___seg_3___lsb 3
67#define reg_mmu_rw_mm_cfg___seg_3___width 1
68#define reg_mmu_rw_mm_cfg___seg_3___bit 3
69#define reg_mmu_rw_mm_cfg___seg_4___lsb 4
70#define reg_mmu_rw_mm_cfg___seg_4___width 1
71#define reg_mmu_rw_mm_cfg___seg_4___bit 4
72#define reg_mmu_rw_mm_cfg___seg_5___lsb 5
73#define reg_mmu_rw_mm_cfg___seg_5___width 1
74#define reg_mmu_rw_mm_cfg___seg_5___bit 5
75#define reg_mmu_rw_mm_cfg___seg_6___lsb 6
76#define reg_mmu_rw_mm_cfg___seg_6___width 1
77#define reg_mmu_rw_mm_cfg___seg_6___bit 6
78#define reg_mmu_rw_mm_cfg___seg_7___lsb 7
79#define reg_mmu_rw_mm_cfg___seg_7___width 1
80#define reg_mmu_rw_mm_cfg___seg_7___bit 7
81#define reg_mmu_rw_mm_cfg___seg_8___lsb 8
82#define reg_mmu_rw_mm_cfg___seg_8___width 1
83#define reg_mmu_rw_mm_cfg___seg_8___bit 8
84#define reg_mmu_rw_mm_cfg___seg_9___lsb 9
85#define reg_mmu_rw_mm_cfg___seg_9___width 1
86#define reg_mmu_rw_mm_cfg___seg_9___bit 9
87#define reg_mmu_rw_mm_cfg___seg_a___lsb 10
88#define reg_mmu_rw_mm_cfg___seg_a___width 1
89#define reg_mmu_rw_mm_cfg___seg_a___bit 10
90#define reg_mmu_rw_mm_cfg___seg_b___lsb 11
91#define reg_mmu_rw_mm_cfg___seg_b___width 1
92#define reg_mmu_rw_mm_cfg___seg_b___bit 11
93#define reg_mmu_rw_mm_cfg___seg_c___lsb 12
94#define reg_mmu_rw_mm_cfg___seg_c___width 1
95#define reg_mmu_rw_mm_cfg___seg_c___bit 12
96#define reg_mmu_rw_mm_cfg___seg_d___lsb 13
97#define reg_mmu_rw_mm_cfg___seg_d___width 1
98#define reg_mmu_rw_mm_cfg___seg_d___bit 13
99#define reg_mmu_rw_mm_cfg___seg_e___lsb 14
100#define reg_mmu_rw_mm_cfg___seg_e___width 1
101#define reg_mmu_rw_mm_cfg___seg_e___bit 14
102#define reg_mmu_rw_mm_cfg___seg_f___lsb 15
103#define reg_mmu_rw_mm_cfg___seg_f___width 1
104#define reg_mmu_rw_mm_cfg___seg_f___bit 15
105#define reg_mmu_rw_mm_cfg___inv___lsb 16
106#define reg_mmu_rw_mm_cfg___inv___width 1
107#define reg_mmu_rw_mm_cfg___inv___bit 16
108#define reg_mmu_rw_mm_cfg___ex___lsb 17
109#define reg_mmu_rw_mm_cfg___ex___width 1
110#define reg_mmu_rw_mm_cfg___ex___bit 17
111#define reg_mmu_rw_mm_cfg___acc___lsb 18
112#define reg_mmu_rw_mm_cfg___acc___width 1
113#define reg_mmu_rw_mm_cfg___acc___bit 18
114#define reg_mmu_rw_mm_cfg___we___lsb 19
115#define reg_mmu_rw_mm_cfg___we___width 1
116#define reg_mmu_rw_mm_cfg___we___bit 19
117#define reg_mmu_rw_mm_cfg_offset 0
118
119/* Register rw_mm_kbase_lo, scope mmu, type rw */
120#define reg_mmu_rw_mm_kbase_lo___base_0___lsb 0
121#define reg_mmu_rw_mm_kbase_lo___base_0___width 4
122#define reg_mmu_rw_mm_kbase_lo___base_1___lsb 4
123#define reg_mmu_rw_mm_kbase_lo___base_1___width 4
124#define reg_mmu_rw_mm_kbase_lo___base_2___lsb 8
125#define reg_mmu_rw_mm_kbase_lo___base_2___width 4
126#define reg_mmu_rw_mm_kbase_lo___base_3___lsb 12
127#define reg_mmu_rw_mm_kbase_lo___base_3___width 4
128#define reg_mmu_rw_mm_kbase_lo___base_4___lsb 16
129#define reg_mmu_rw_mm_kbase_lo___base_4___width 4
130#define reg_mmu_rw_mm_kbase_lo___base_5___lsb 20
131#define reg_mmu_rw_mm_kbase_lo___base_5___width 4
132#define reg_mmu_rw_mm_kbase_lo___base_6___lsb 24
133#define reg_mmu_rw_mm_kbase_lo___base_6___width 4
134#define reg_mmu_rw_mm_kbase_lo___base_7___lsb 28
135#define reg_mmu_rw_mm_kbase_lo___base_7___width 4
136#define reg_mmu_rw_mm_kbase_lo_offset 4
137
138/* Register rw_mm_kbase_hi, scope mmu, type rw */
139#define reg_mmu_rw_mm_kbase_hi___base_8___lsb 0
140#define reg_mmu_rw_mm_kbase_hi___base_8___width 4
141#define reg_mmu_rw_mm_kbase_hi___base_9___lsb 4
142#define reg_mmu_rw_mm_kbase_hi___base_9___width 4
143#define reg_mmu_rw_mm_kbase_hi___base_a___lsb 8
144#define reg_mmu_rw_mm_kbase_hi___base_a___width 4
145#define reg_mmu_rw_mm_kbase_hi___base_b___lsb 12
146#define reg_mmu_rw_mm_kbase_hi___base_b___width 4
147#define reg_mmu_rw_mm_kbase_hi___base_c___lsb 16
148#define reg_mmu_rw_mm_kbase_hi___base_c___width 4
149#define reg_mmu_rw_mm_kbase_hi___base_d___lsb 20
150#define reg_mmu_rw_mm_kbase_hi___base_d___width 4
151#define reg_mmu_rw_mm_kbase_hi___base_e___lsb 24
152#define reg_mmu_rw_mm_kbase_hi___base_e___width 4
153#define reg_mmu_rw_mm_kbase_hi___base_f___lsb 28
154#define reg_mmu_rw_mm_kbase_hi___base_f___width 4
155#define reg_mmu_rw_mm_kbase_hi_offset 8
156
157/* Register r_mm_cause, scope mmu, type r */
158#define reg_mmu_r_mm_cause___pid___lsb 0
159#define reg_mmu_r_mm_cause___pid___width 8
160#define reg_mmu_r_mm_cause___op___lsb 8
161#define reg_mmu_r_mm_cause___op___width 2
162#define reg_mmu_r_mm_cause___vpn___lsb 13
163#define reg_mmu_r_mm_cause___vpn___width 19
164#define reg_mmu_r_mm_cause_offset 12
165
166/* Register rw_mm_tlb_sel, scope mmu, type rw */
167#define reg_mmu_rw_mm_tlb_sel___idx___lsb 0
168#define reg_mmu_rw_mm_tlb_sel___idx___width 4
169#define reg_mmu_rw_mm_tlb_sel___set___lsb 4
170#define reg_mmu_rw_mm_tlb_sel___set___width 2
171#define reg_mmu_rw_mm_tlb_sel_offset 16
172
173/* Register rw_mm_tlb_lo, scope mmu, type rw */
174#define reg_mmu_rw_mm_tlb_lo___x___lsb 0
175#define reg_mmu_rw_mm_tlb_lo___x___width 1
176#define reg_mmu_rw_mm_tlb_lo___x___bit 0
177#define reg_mmu_rw_mm_tlb_lo___w___lsb 1
178#define reg_mmu_rw_mm_tlb_lo___w___width 1
179#define reg_mmu_rw_mm_tlb_lo___w___bit 1
180#define reg_mmu_rw_mm_tlb_lo___k___lsb 2
181#define reg_mmu_rw_mm_tlb_lo___k___width 1
182#define reg_mmu_rw_mm_tlb_lo___k___bit 2
183#define reg_mmu_rw_mm_tlb_lo___v___lsb 3
184#define reg_mmu_rw_mm_tlb_lo___v___width 1
185#define reg_mmu_rw_mm_tlb_lo___v___bit 3
186#define reg_mmu_rw_mm_tlb_lo___g___lsb 4
187#define reg_mmu_rw_mm_tlb_lo___g___width 1
188#define reg_mmu_rw_mm_tlb_lo___g___bit 4
189#define reg_mmu_rw_mm_tlb_lo___pfn___lsb 13
190#define reg_mmu_rw_mm_tlb_lo___pfn___width 19
191#define reg_mmu_rw_mm_tlb_lo_offset 20
192
193/* Register rw_mm_tlb_hi, scope mmu, type rw */
194#define reg_mmu_rw_mm_tlb_hi___pid___lsb 0
195#define reg_mmu_rw_mm_tlb_hi___pid___width 8
196#define reg_mmu_rw_mm_tlb_hi___vpn___lsb 13
197#define reg_mmu_rw_mm_tlb_hi___vpn___width 19
198#define reg_mmu_rw_mm_tlb_hi_offset 24
199
200
201/* Constants */
202#define regk_mmu_execute 0x00000000
203#define regk_mmu_flush 0x00000003
204#define regk_mmu_linear 0x00000001
205#define regk_mmu_no 0x00000000
206#define regk_mmu_off 0x00000000
207#define regk_mmu_on 0x00000001
208#define regk_mmu_page 0x00000000
209#define regk_mmu_read 0x00000001
210#define regk_mmu_write 0x00000002
211#define regk_mmu_yes 0x00000001
212#endif /* __mmu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/mmu_supp_reg.h b/include/asm-cris/arch-v32/hwregs/asm/mmu_supp_reg.h
deleted file mode 100644
index 339500bf3bc0..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/mmu_supp_reg.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#define RW_MM_CFG 0
2#define RW_MM_KBASE_LO 1
3#define RW_MM_KBASE_HI 2
4#define R_MM_CAUSE 3
5#define RW_MM_TLB_SEL 4
6#define RW_MM_TLB_LO 5
7#define RW_MM_TLB_HI 6
diff --git a/include/asm-cris/arch-v32/hwregs/asm/pinmux_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/pinmux_defs_asm.h
deleted file mode 100644
index 13c725e4c774..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/pinmux_defs_asm.h
+++ /dev/null
@@ -1,632 +0,0 @@
1#ifndef __pinmux_defs_asm_h
2#define __pinmux_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/pinmux/rtl/guinness/pinmux_regs.r
7 * id: pinmux_regs.r,v 1.40 2005/02/09 16:22:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:11 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/pinmux_defs_asm.h ../../inst/pinmux/rtl/guinness/pinmux_regs.r
11 * id: $Id: pinmux_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_pa, scope pinmux, type rw */
57#define reg_pinmux_rw_pa___pa0___lsb 0
58#define reg_pinmux_rw_pa___pa0___width 1
59#define reg_pinmux_rw_pa___pa0___bit 0
60#define reg_pinmux_rw_pa___pa1___lsb 1
61#define reg_pinmux_rw_pa___pa1___width 1
62#define reg_pinmux_rw_pa___pa1___bit 1
63#define reg_pinmux_rw_pa___pa2___lsb 2
64#define reg_pinmux_rw_pa___pa2___width 1
65#define reg_pinmux_rw_pa___pa2___bit 2
66#define reg_pinmux_rw_pa___pa3___lsb 3
67#define reg_pinmux_rw_pa___pa3___width 1
68#define reg_pinmux_rw_pa___pa3___bit 3
69#define reg_pinmux_rw_pa___pa4___lsb 4
70#define reg_pinmux_rw_pa___pa4___width 1
71#define reg_pinmux_rw_pa___pa4___bit 4
72#define reg_pinmux_rw_pa___pa5___lsb 5
73#define reg_pinmux_rw_pa___pa5___width 1
74#define reg_pinmux_rw_pa___pa5___bit 5
75#define reg_pinmux_rw_pa___pa6___lsb 6
76#define reg_pinmux_rw_pa___pa6___width 1
77#define reg_pinmux_rw_pa___pa6___bit 6
78#define reg_pinmux_rw_pa___pa7___lsb 7
79#define reg_pinmux_rw_pa___pa7___width 1
80#define reg_pinmux_rw_pa___pa7___bit 7
81#define reg_pinmux_rw_pa___csp2_n___lsb 8
82#define reg_pinmux_rw_pa___csp2_n___width 1
83#define reg_pinmux_rw_pa___csp2_n___bit 8
84#define reg_pinmux_rw_pa___csp3_n___lsb 9
85#define reg_pinmux_rw_pa___csp3_n___width 1
86#define reg_pinmux_rw_pa___csp3_n___bit 9
87#define reg_pinmux_rw_pa___csp5_n___lsb 10
88#define reg_pinmux_rw_pa___csp5_n___width 1
89#define reg_pinmux_rw_pa___csp5_n___bit 10
90#define reg_pinmux_rw_pa___csp6_n___lsb 11
91#define reg_pinmux_rw_pa___csp6_n___width 1
92#define reg_pinmux_rw_pa___csp6_n___bit 11
93#define reg_pinmux_rw_pa___hsh4___lsb 12
94#define reg_pinmux_rw_pa___hsh4___width 1
95#define reg_pinmux_rw_pa___hsh4___bit 12
96#define reg_pinmux_rw_pa___hsh5___lsb 13
97#define reg_pinmux_rw_pa___hsh5___width 1
98#define reg_pinmux_rw_pa___hsh5___bit 13
99#define reg_pinmux_rw_pa___hsh6___lsb 14
100#define reg_pinmux_rw_pa___hsh6___width 1
101#define reg_pinmux_rw_pa___hsh6___bit 14
102#define reg_pinmux_rw_pa___hsh7___lsb 15
103#define reg_pinmux_rw_pa___hsh7___width 1
104#define reg_pinmux_rw_pa___hsh7___bit 15
105#define reg_pinmux_rw_pa_offset 0
106
107/* Register rw_hwprot, scope pinmux, type rw */
108#define reg_pinmux_rw_hwprot___ser1___lsb 0
109#define reg_pinmux_rw_hwprot___ser1___width 1
110#define reg_pinmux_rw_hwprot___ser1___bit 0
111#define reg_pinmux_rw_hwprot___ser2___lsb 1
112#define reg_pinmux_rw_hwprot___ser2___width 1
113#define reg_pinmux_rw_hwprot___ser2___bit 1
114#define reg_pinmux_rw_hwprot___ser3___lsb 2
115#define reg_pinmux_rw_hwprot___ser3___width 1
116#define reg_pinmux_rw_hwprot___ser3___bit 2
117#define reg_pinmux_rw_hwprot___sser0___lsb 3
118#define reg_pinmux_rw_hwprot___sser0___width 1
119#define reg_pinmux_rw_hwprot___sser0___bit 3
120#define reg_pinmux_rw_hwprot___sser1___lsb 4
121#define reg_pinmux_rw_hwprot___sser1___width 1
122#define reg_pinmux_rw_hwprot___sser1___bit 4
123#define reg_pinmux_rw_hwprot___ata0___lsb 5
124#define reg_pinmux_rw_hwprot___ata0___width 1
125#define reg_pinmux_rw_hwprot___ata0___bit 5
126#define reg_pinmux_rw_hwprot___ata1___lsb 6
127#define reg_pinmux_rw_hwprot___ata1___width 1
128#define reg_pinmux_rw_hwprot___ata1___bit 6
129#define reg_pinmux_rw_hwprot___ata2___lsb 7
130#define reg_pinmux_rw_hwprot___ata2___width 1
131#define reg_pinmux_rw_hwprot___ata2___bit 7
132#define reg_pinmux_rw_hwprot___ata3___lsb 8
133#define reg_pinmux_rw_hwprot___ata3___width 1
134#define reg_pinmux_rw_hwprot___ata3___bit 8
135#define reg_pinmux_rw_hwprot___ata___lsb 9
136#define reg_pinmux_rw_hwprot___ata___width 1
137#define reg_pinmux_rw_hwprot___ata___bit 9
138#define reg_pinmux_rw_hwprot___eth1___lsb 10
139#define reg_pinmux_rw_hwprot___eth1___width 1
140#define reg_pinmux_rw_hwprot___eth1___bit 10
141#define reg_pinmux_rw_hwprot___eth1_mgm___lsb 11
142#define reg_pinmux_rw_hwprot___eth1_mgm___width 1
143#define reg_pinmux_rw_hwprot___eth1_mgm___bit 11
144#define reg_pinmux_rw_hwprot___timer___lsb 12
145#define reg_pinmux_rw_hwprot___timer___width 1
146#define reg_pinmux_rw_hwprot___timer___bit 12
147#define reg_pinmux_rw_hwprot___p21___lsb 13
148#define reg_pinmux_rw_hwprot___p21___width 1
149#define reg_pinmux_rw_hwprot___p21___bit 13
150#define reg_pinmux_rw_hwprot_offset 4
151
152/* Register rw_pb_gio, scope pinmux, type rw */
153#define reg_pinmux_rw_pb_gio___pb0___lsb 0
154#define reg_pinmux_rw_pb_gio___pb0___width 1
155#define reg_pinmux_rw_pb_gio___pb0___bit 0
156#define reg_pinmux_rw_pb_gio___pb1___lsb 1
157#define reg_pinmux_rw_pb_gio___pb1___width 1
158#define reg_pinmux_rw_pb_gio___pb1___bit 1
159#define reg_pinmux_rw_pb_gio___pb2___lsb 2
160#define reg_pinmux_rw_pb_gio___pb2___width 1
161#define reg_pinmux_rw_pb_gio___pb2___bit 2
162#define reg_pinmux_rw_pb_gio___pb3___lsb 3
163#define reg_pinmux_rw_pb_gio___pb3___width 1
164#define reg_pinmux_rw_pb_gio___pb3___bit 3
165#define reg_pinmux_rw_pb_gio___pb4___lsb 4
166#define reg_pinmux_rw_pb_gio___pb4___width 1
167#define reg_pinmux_rw_pb_gio___pb4___bit 4
168#define reg_pinmux_rw_pb_gio___pb5___lsb 5
169#define reg_pinmux_rw_pb_gio___pb5___width 1
170#define reg_pinmux_rw_pb_gio___pb5___bit 5
171#define reg_pinmux_rw_pb_gio___pb6___lsb 6
172#define reg_pinmux_rw_pb_gio___pb6___width 1
173#define reg_pinmux_rw_pb_gio___pb6___bit 6
174#define reg_pinmux_rw_pb_gio___pb7___lsb 7
175#define reg_pinmux_rw_pb_gio___pb7___width 1
176#define reg_pinmux_rw_pb_gio___pb7___bit 7
177#define reg_pinmux_rw_pb_gio___pb8___lsb 8
178#define reg_pinmux_rw_pb_gio___pb8___width 1
179#define reg_pinmux_rw_pb_gio___pb8___bit 8
180#define reg_pinmux_rw_pb_gio___pb9___lsb 9
181#define reg_pinmux_rw_pb_gio___pb9___width 1
182#define reg_pinmux_rw_pb_gio___pb9___bit 9
183#define reg_pinmux_rw_pb_gio___pb10___lsb 10
184#define reg_pinmux_rw_pb_gio___pb10___width 1
185#define reg_pinmux_rw_pb_gio___pb10___bit 10
186#define reg_pinmux_rw_pb_gio___pb11___lsb 11
187#define reg_pinmux_rw_pb_gio___pb11___width 1
188#define reg_pinmux_rw_pb_gio___pb11___bit 11
189#define reg_pinmux_rw_pb_gio___pb12___lsb 12
190#define reg_pinmux_rw_pb_gio___pb12___width 1
191#define reg_pinmux_rw_pb_gio___pb12___bit 12
192#define reg_pinmux_rw_pb_gio___pb13___lsb 13
193#define reg_pinmux_rw_pb_gio___pb13___width 1
194#define reg_pinmux_rw_pb_gio___pb13___bit 13
195#define reg_pinmux_rw_pb_gio___pb14___lsb 14
196#define reg_pinmux_rw_pb_gio___pb14___width 1
197#define reg_pinmux_rw_pb_gio___pb14___bit 14
198#define reg_pinmux_rw_pb_gio___pb15___lsb 15
199#define reg_pinmux_rw_pb_gio___pb15___width 1
200#define reg_pinmux_rw_pb_gio___pb15___bit 15
201#define reg_pinmux_rw_pb_gio___pb16___lsb 16
202#define reg_pinmux_rw_pb_gio___pb16___width 1
203#define reg_pinmux_rw_pb_gio___pb16___bit 16
204#define reg_pinmux_rw_pb_gio___pb17___lsb 17
205#define reg_pinmux_rw_pb_gio___pb17___width 1
206#define reg_pinmux_rw_pb_gio___pb17___bit 17
207#define reg_pinmux_rw_pb_gio_offset 8
208
209/* Register rw_pb_iop, scope pinmux, type rw */
210#define reg_pinmux_rw_pb_iop___pb0___lsb 0
211#define reg_pinmux_rw_pb_iop___pb0___width 1
212#define reg_pinmux_rw_pb_iop___pb0___bit 0
213#define reg_pinmux_rw_pb_iop___pb1___lsb 1
214#define reg_pinmux_rw_pb_iop___pb1___width 1
215#define reg_pinmux_rw_pb_iop___pb1___bit 1
216#define reg_pinmux_rw_pb_iop___pb2___lsb 2
217#define reg_pinmux_rw_pb_iop___pb2___width 1
218#define reg_pinmux_rw_pb_iop___pb2___bit 2
219#define reg_pinmux_rw_pb_iop___pb3___lsb 3
220#define reg_pinmux_rw_pb_iop___pb3___width 1
221#define reg_pinmux_rw_pb_iop___pb3___bit 3
222#define reg_pinmux_rw_pb_iop___pb4___lsb 4
223#define reg_pinmux_rw_pb_iop___pb4___width 1
224#define reg_pinmux_rw_pb_iop___pb4___bit 4
225#define reg_pinmux_rw_pb_iop___pb5___lsb 5
226#define reg_pinmux_rw_pb_iop___pb5___width 1
227#define reg_pinmux_rw_pb_iop___pb5___bit 5
228#define reg_pinmux_rw_pb_iop___pb6___lsb 6
229#define reg_pinmux_rw_pb_iop___pb6___width 1
230#define reg_pinmux_rw_pb_iop___pb6___bit 6
231#define reg_pinmux_rw_pb_iop___pb7___lsb 7
232#define reg_pinmux_rw_pb_iop___pb7___width 1
233#define reg_pinmux_rw_pb_iop___pb7___bit 7
234#define reg_pinmux_rw_pb_iop___pb8___lsb 8
235#define reg_pinmux_rw_pb_iop___pb8___width 1
236#define reg_pinmux_rw_pb_iop___pb8___bit 8
237#define reg_pinmux_rw_pb_iop___pb9___lsb 9
238#define reg_pinmux_rw_pb_iop___pb9___width 1
239#define reg_pinmux_rw_pb_iop___pb9___bit 9
240#define reg_pinmux_rw_pb_iop___pb10___lsb 10
241#define reg_pinmux_rw_pb_iop___pb10___width 1
242#define reg_pinmux_rw_pb_iop___pb10___bit 10
243#define reg_pinmux_rw_pb_iop___pb11___lsb 11
244#define reg_pinmux_rw_pb_iop___pb11___width 1
245#define reg_pinmux_rw_pb_iop___pb11___bit 11
246#define reg_pinmux_rw_pb_iop___pb12___lsb 12
247#define reg_pinmux_rw_pb_iop___pb12___width 1
248#define reg_pinmux_rw_pb_iop___pb12___bit 12
249#define reg_pinmux_rw_pb_iop___pb13___lsb 13
250#define reg_pinmux_rw_pb_iop___pb13___width 1
251#define reg_pinmux_rw_pb_iop___pb13___bit 13
252#define reg_pinmux_rw_pb_iop___pb14___lsb 14
253#define reg_pinmux_rw_pb_iop___pb14___width 1
254#define reg_pinmux_rw_pb_iop___pb14___bit 14
255#define reg_pinmux_rw_pb_iop___pb15___lsb 15
256#define reg_pinmux_rw_pb_iop___pb15___width 1
257#define reg_pinmux_rw_pb_iop___pb15___bit 15
258#define reg_pinmux_rw_pb_iop___pb16___lsb 16
259#define reg_pinmux_rw_pb_iop___pb16___width 1
260#define reg_pinmux_rw_pb_iop___pb16___bit 16
261#define reg_pinmux_rw_pb_iop___pb17___lsb 17
262#define reg_pinmux_rw_pb_iop___pb17___width 1
263#define reg_pinmux_rw_pb_iop___pb17___bit 17
264#define reg_pinmux_rw_pb_iop_offset 12
265
266/* Register rw_pc_gio, scope pinmux, type rw */
267#define reg_pinmux_rw_pc_gio___pc0___lsb 0
268#define reg_pinmux_rw_pc_gio___pc0___width 1
269#define reg_pinmux_rw_pc_gio___pc0___bit 0
270#define reg_pinmux_rw_pc_gio___pc1___lsb 1
271#define reg_pinmux_rw_pc_gio___pc1___width 1
272#define reg_pinmux_rw_pc_gio___pc1___bit 1
273#define reg_pinmux_rw_pc_gio___pc2___lsb 2
274#define reg_pinmux_rw_pc_gio___pc2___width 1
275#define reg_pinmux_rw_pc_gio___pc2___bit 2
276#define reg_pinmux_rw_pc_gio___pc3___lsb 3
277#define reg_pinmux_rw_pc_gio___pc3___width 1
278#define reg_pinmux_rw_pc_gio___pc3___bit 3
279#define reg_pinmux_rw_pc_gio___pc4___lsb 4
280#define reg_pinmux_rw_pc_gio___pc4___width 1
281#define reg_pinmux_rw_pc_gio___pc4___bit 4
282#define reg_pinmux_rw_pc_gio___pc5___lsb 5
283#define reg_pinmux_rw_pc_gio___pc5___width 1
284#define reg_pinmux_rw_pc_gio___pc5___bit 5
285#define reg_pinmux_rw_pc_gio___pc6___lsb 6
286#define reg_pinmux_rw_pc_gio___pc6___width 1
287#define reg_pinmux_rw_pc_gio___pc6___bit 6
288#define reg_pinmux_rw_pc_gio___pc7___lsb 7
289#define reg_pinmux_rw_pc_gio___pc7___width 1
290#define reg_pinmux_rw_pc_gio___pc7___bit 7
291#define reg_pinmux_rw_pc_gio___pc8___lsb 8
292#define reg_pinmux_rw_pc_gio___pc8___width 1
293#define reg_pinmux_rw_pc_gio___pc8___bit 8
294#define reg_pinmux_rw_pc_gio___pc9___lsb 9
295#define reg_pinmux_rw_pc_gio___pc9___width 1
296#define reg_pinmux_rw_pc_gio___pc9___bit 9
297#define reg_pinmux_rw_pc_gio___pc10___lsb 10
298#define reg_pinmux_rw_pc_gio___pc10___width 1
299#define reg_pinmux_rw_pc_gio___pc10___bit 10
300#define reg_pinmux_rw_pc_gio___pc11___lsb 11
301#define reg_pinmux_rw_pc_gio___pc11___width 1
302#define reg_pinmux_rw_pc_gio___pc11___bit 11
303#define reg_pinmux_rw_pc_gio___pc12___lsb 12
304#define reg_pinmux_rw_pc_gio___pc12___width 1
305#define reg_pinmux_rw_pc_gio___pc12___bit 12
306#define reg_pinmux_rw_pc_gio___pc13___lsb 13
307#define reg_pinmux_rw_pc_gio___pc13___width 1
308#define reg_pinmux_rw_pc_gio___pc13___bit 13
309#define reg_pinmux_rw_pc_gio___pc14___lsb 14
310#define reg_pinmux_rw_pc_gio___pc14___width 1
311#define reg_pinmux_rw_pc_gio___pc14___bit 14
312#define reg_pinmux_rw_pc_gio___pc15___lsb 15
313#define reg_pinmux_rw_pc_gio___pc15___width 1
314#define reg_pinmux_rw_pc_gio___pc15___bit 15
315#define reg_pinmux_rw_pc_gio___pc16___lsb 16
316#define reg_pinmux_rw_pc_gio___pc16___width 1
317#define reg_pinmux_rw_pc_gio___pc16___bit 16
318#define reg_pinmux_rw_pc_gio___pc17___lsb 17
319#define reg_pinmux_rw_pc_gio___pc17___width 1
320#define reg_pinmux_rw_pc_gio___pc17___bit 17
321#define reg_pinmux_rw_pc_gio_offset 16
322
323/* Register rw_pc_iop, scope pinmux, type rw */
324#define reg_pinmux_rw_pc_iop___pc0___lsb 0
325#define reg_pinmux_rw_pc_iop___pc0___width 1
326#define reg_pinmux_rw_pc_iop___pc0___bit 0
327#define reg_pinmux_rw_pc_iop___pc1___lsb 1
328#define reg_pinmux_rw_pc_iop___pc1___width 1
329#define reg_pinmux_rw_pc_iop___pc1___bit 1
330#define reg_pinmux_rw_pc_iop___pc2___lsb 2
331#define reg_pinmux_rw_pc_iop___pc2___width 1
332#define reg_pinmux_rw_pc_iop___pc2___bit 2
333#define reg_pinmux_rw_pc_iop___pc3___lsb 3
334#define reg_pinmux_rw_pc_iop___pc3___width 1
335#define reg_pinmux_rw_pc_iop___pc3___bit 3
336#define reg_pinmux_rw_pc_iop___pc4___lsb 4
337#define reg_pinmux_rw_pc_iop___pc4___width 1
338#define reg_pinmux_rw_pc_iop___pc4___bit 4
339#define reg_pinmux_rw_pc_iop___pc5___lsb 5
340#define reg_pinmux_rw_pc_iop___pc5___width 1
341#define reg_pinmux_rw_pc_iop___pc5___bit 5
342#define reg_pinmux_rw_pc_iop___pc6___lsb 6
343#define reg_pinmux_rw_pc_iop___pc6___width 1
344#define reg_pinmux_rw_pc_iop___pc6___bit 6
345#define reg_pinmux_rw_pc_iop___pc7___lsb 7
346#define reg_pinmux_rw_pc_iop___pc7___width 1
347#define reg_pinmux_rw_pc_iop___pc7___bit 7
348#define reg_pinmux_rw_pc_iop___pc8___lsb 8
349#define reg_pinmux_rw_pc_iop___pc8___width 1
350#define reg_pinmux_rw_pc_iop___pc8___bit 8
351#define reg_pinmux_rw_pc_iop___pc9___lsb 9
352#define reg_pinmux_rw_pc_iop___pc9___width 1
353#define reg_pinmux_rw_pc_iop___pc9___bit 9
354#define reg_pinmux_rw_pc_iop___pc10___lsb 10
355#define reg_pinmux_rw_pc_iop___pc10___width 1
356#define reg_pinmux_rw_pc_iop___pc10___bit 10
357#define reg_pinmux_rw_pc_iop___pc11___lsb 11
358#define reg_pinmux_rw_pc_iop___pc11___width 1
359#define reg_pinmux_rw_pc_iop___pc11___bit 11
360#define reg_pinmux_rw_pc_iop___pc12___lsb 12
361#define reg_pinmux_rw_pc_iop___pc12___width 1
362#define reg_pinmux_rw_pc_iop___pc12___bit 12
363#define reg_pinmux_rw_pc_iop___pc13___lsb 13
364#define reg_pinmux_rw_pc_iop___pc13___width 1
365#define reg_pinmux_rw_pc_iop___pc13___bit 13
366#define reg_pinmux_rw_pc_iop___pc14___lsb 14
367#define reg_pinmux_rw_pc_iop___pc14___width 1
368#define reg_pinmux_rw_pc_iop___pc14___bit 14
369#define reg_pinmux_rw_pc_iop___pc15___lsb 15
370#define reg_pinmux_rw_pc_iop___pc15___width 1
371#define reg_pinmux_rw_pc_iop___pc15___bit 15
372#define reg_pinmux_rw_pc_iop___pc16___lsb 16
373#define reg_pinmux_rw_pc_iop___pc16___width 1
374#define reg_pinmux_rw_pc_iop___pc16___bit 16
375#define reg_pinmux_rw_pc_iop___pc17___lsb 17
376#define reg_pinmux_rw_pc_iop___pc17___width 1
377#define reg_pinmux_rw_pc_iop___pc17___bit 17
378#define reg_pinmux_rw_pc_iop_offset 20
379
380/* Register rw_pd_gio, scope pinmux, type rw */
381#define reg_pinmux_rw_pd_gio___pd0___lsb 0
382#define reg_pinmux_rw_pd_gio___pd0___width 1
383#define reg_pinmux_rw_pd_gio___pd0___bit 0
384#define reg_pinmux_rw_pd_gio___pd1___lsb 1
385#define reg_pinmux_rw_pd_gio___pd1___width 1
386#define reg_pinmux_rw_pd_gio___pd1___bit 1
387#define reg_pinmux_rw_pd_gio___pd2___lsb 2
388#define reg_pinmux_rw_pd_gio___pd2___width 1
389#define reg_pinmux_rw_pd_gio___pd2___bit 2
390#define reg_pinmux_rw_pd_gio___pd3___lsb 3
391#define reg_pinmux_rw_pd_gio___pd3___width 1
392#define reg_pinmux_rw_pd_gio___pd3___bit 3
393#define reg_pinmux_rw_pd_gio___pd4___lsb 4
394#define reg_pinmux_rw_pd_gio___pd4___width 1
395#define reg_pinmux_rw_pd_gio___pd4___bit 4
396#define reg_pinmux_rw_pd_gio___pd5___lsb 5
397#define reg_pinmux_rw_pd_gio___pd5___width 1
398#define reg_pinmux_rw_pd_gio___pd5___bit 5
399#define reg_pinmux_rw_pd_gio___pd6___lsb 6
400#define reg_pinmux_rw_pd_gio___pd6___width 1
401#define reg_pinmux_rw_pd_gio___pd6___bit 6
402#define reg_pinmux_rw_pd_gio___pd7___lsb 7
403#define reg_pinmux_rw_pd_gio___pd7___width 1
404#define reg_pinmux_rw_pd_gio___pd7___bit 7
405#define reg_pinmux_rw_pd_gio___pd8___lsb 8
406#define reg_pinmux_rw_pd_gio___pd8___width 1
407#define reg_pinmux_rw_pd_gio___pd8___bit 8
408#define reg_pinmux_rw_pd_gio___pd9___lsb 9
409#define reg_pinmux_rw_pd_gio___pd9___width 1
410#define reg_pinmux_rw_pd_gio___pd9___bit 9
411#define reg_pinmux_rw_pd_gio___pd10___lsb 10
412#define reg_pinmux_rw_pd_gio___pd10___width 1
413#define reg_pinmux_rw_pd_gio___pd10___bit 10
414#define reg_pinmux_rw_pd_gio___pd11___lsb 11
415#define reg_pinmux_rw_pd_gio___pd11___width 1
416#define reg_pinmux_rw_pd_gio___pd11___bit 11
417#define reg_pinmux_rw_pd_gio___pd12___lsb 12
418#define reg_pinmux_rw_pd_gio___pd12___width 1
419#define reg_pinmux_rw_pd_gio___pd12___bit 12
420#define reg_pinmux_rw_pd_gio___pd13___lsb 13
421#define reg_pinmux_rw_pd_gio___pd13___width 1
422#define reg_pinmux_rw_pd_gio___pd13___bit 13
423#define reg_pinmux_rw_pd_gio___pd14___lsb 14
424#define reg_pinmux_rw_pd_gio___pd14___width 1
425#define reg_pinmux_rw_pd_gio___pd14___bit 14
426#define reg_pinmux_rw_pd_gio___pd15___lsb 15
427#define reg_pinmux_rw_pd_gio___pd15___width 1
428#define reg_pinmux_rw_pd_gio___pd15___bit 15
429#define reg_pinmux_rw_pd_gio___pd16___lsb 16
430#define reg_pinmux_rw_pd_gio___pd16___width 1
431#define reg_pinmux_rw_pd_gio___pd16___bit 16
432#define reg_pinmux_rw_pd_gio___pd17___lsb 17
433#define reg_pinmux_rw_pd_gio___pd17___width 1
434#define reg_pinmux_rw_pd_gio___pd17___bit 17
435#define reg_pinmux_rw_pd_gio_offset 24
436
437/* Register rw_pd_iop, scope pinmux, type rw */
438#define reg_pinmux_rw_pd_iop___pd0___lsb 0
439#define reg_pinmux_rw_pd_iop___pd0___width 1
440#define reg_pinmux_rw_pd_iop___pd0___bit 0
441#define reg_pinmux_rw_pd_iop___pd1___lsb 1
442#define reg_pinmux_rw_pd_iop___pd1___width 1
443#define reg_pinmux_rw_pd_iop___pd1___bit 1
444#define reg_pinmux_rw_pd_iop___pd2___lsb 2
445#define reg_pinmux_rw_pd_iop___pd2___width 1
446#define reg_pinmux_rw_pd_iop___pd2___bit 2
447#define reg_pinmux_rw_pd_iop___pd3___lsb 3
448#define reg_pinmux_rw_pd_iop___pd3___width 1
449#define reg_pinmux_rw_pd_iop___pd3___bit 3
450#define reg_pinmux_rw_pd_iop___pd4___lsb 4
451#define reg_pinmux_rw_pd_iop___pd4___width 1
452#define reg_pinmux_rw_pd_iop___pd4___bit 4
453#define reg_pinmux_rw_pd_iop___pd5___lsb 5
454#define reg_pinmux_rw_pd_iop___pd5___width 1
455#define reg_pinmux_rw_pd_iop___pd5___bit 5
456#define reg_pinmux_rw_pd_iop___pd6___lsb 6
457#define reg_pinmux_rw_pd_iop___pd6___width 1
458#define reg_pinmux_rw_pd_iop___pd6___bit 6
459#define reg_pinmux_rw_pd_iop___pd7___lsb 7
460#define reg_pinmux_rw_pd_iop___pd7___width 1
461#define reg_pinmux_rw_pd_iop___pd7___bit 7
462#define reg_pinmux_rw_pd_iop___pd8___lsb 8
463#define reg_pinmux_rw_pd_iop___pd8___width 1
464#define reg_pinmux_rw_pd_iop___pd8___bit 8
465#define reg_pinmux_rw_pd_iop___pd9___lsb 9
466#define reg_pinmux_rw_pd_iop___pd9___width 1
467#define reg_pinmux_rw_pd_iop___pd9___bit 9
468#define reg_pinmux_rw_pd_iop___pd10___lsb 10
469#define reg_pinmux_rw_pd_iop___pd10___width 1
470#define reg_pinmux_rw_pd_iop___pd10___bit 10
471#define reg_pinmux_rw_pd_iop___pd11___lsb 11
472#define reg_pinmux_rw_pd_iop___pd11___width 1
473#define reg_pinmux_rw_pd_iop___pd11___bit 11
474#define reg_pinmux_rw_pd_iop___pd12___lsb 12
475#define reg_pinmux_rw_pd_iop___pd12___width 1
476#define reg_pinmux_rw_pd_iop___pd12___bit 12
477#define reg_pinmux_rw_pd_iop___pd13___lsb 13
478#define reg_pinmux_rw_pd_iop___pd13___width 1
479#define reg_pinmux_rw_pd_iop___pd13___bit 13
480#define reg_pinmux_rw_pd_iop___pd14___lsb 14
481#define reg_pinmux_rw_pd_iop___pd14___width 1
482#define reg_pinmux_rw_pd_iop___pd14___bit 14
483#define reg_pinmux_rw_pd_iop___pd15___lsb 15
484#define reg_pinmux_rw_pd_iop___pd15___width 1
485#define reg_pinmux_rw_pd_iop___pd15___bit 15
486#define reg_pinmux_rw_pd_iop___pd16___lsb 16
487#define reg_pinmux_rw_pd_iop___pd16___width 1
488#define reg_pinmux_rw_pd_iop___pd16___bit 16
489#define reg_pinmux_rw_pd_iop___pd17___lsb 17
490#define reg_pinmux_rw_pd_iop___pd17___width 1
491#define reg_pinmux_rw_pd_iop___pd17___bit 17
492#define reg_pinmux_rw_pd_iop_offset 28
493
494/* Register rw_pe_gio, scope pinmux, type rw */
495#define reg_pinmux_rw_pe_gio___pe0___lsb 0
496#define reg_pinmux_rw_pe_gio___pe0___width 1
497#define reg_pinmux_rw_pe_gio___pe0___bit 0
498#define reg_pinmux_rw_pe_gio___pe1___lsb 1
499#define reg_pinmux_rw_pe_gio___pe1___width 1
500#define reg_pinmux_rw_pe_gio___pe1___bit 1
501#define reg_pinmux_rw_pe_gio___pe2___lsb 2
502#define reg_pinmux_rw_pe_gio___pe2___width 1
503#define reg_pinmux_rw_pe_gio___pe2___bit 2
504#define reg_pinmux_rw_pe_gio___pe3___lsb 3
505#define reg_pinmux_rw_pe_gio___pe3___width 1
506#define reg_pinmux_rw_pe_gio___pe3___bit 3
507#define reg_pinmux_rw_pe_gio___pe4___lsb 4
508#define reg_pinmux_rw_pe_gio___pe4___width 1
509#define reg_pinmux_rw_pe_gio___pe4___bit 4
510#define reg_pinmux_rw_pe_gio___pe5___lsb 5
511#define reg_pinmux_rw_pe_gio___pe5___width 1
512#define reg_pinmux_rw_pe_gio___pe5___bit 5
513#define reg_pinmux_rw_pe_gio___pe6___lsb 6
514#define reg_pinmux_rw_pe_gio___pe6___width 1
515#define reg_pinmux_rw_pe_gio___pe6___bit 6
516#define reg_pinmux_rw_pe_gio___pe7___lsb 7
517#define reg_pinmux_rw_pe_gio___pe7___width 1
518#define reg_pinmux_rw_pe_gio___pe7___bit 7
519#define reg_pinmux_rw_pe_gio___pe8___lsb 8
520#define reg_pinmux_rw_pe_gio___pe8___width 1
521#define reg_pinmux_rw_pe_gio___pe8___bit 8
522#define reg_pinmux_rw_pe_gio___pe9___lsb 9
523#define reg_pinmux_rw_pe_gio___pe9___width 1
524#define reg_pinmux_rw_pe_gio___pe9___bit 9
525#define reg_pinmux_rw_pe_gio___pe10___lsb 10
526#define reg_pinmux_rw_pe_gio___pe10___width 1
527#define reg_pinmux_rw_pe_gio___pe10___bit 10
528#define reg_pinmux_rw_pe_gio___pe11___lsb 11
529#define reg_pinmux_rw_pe_gio___pe11___width 1
530#define reg_pinmux_rw_pe_gio___pe11___bit 11
531#define reg_pinmux_rw_pe_gio___pe12___lsb 12
532#define reg_pinmux_rw_pe_gio___pe12___width 1
533#define reg_pinmux_rw_pe_gio___pe12___bit 12
534#define reg_pinmux_rw_pe_gio___pe13___lsb 13
535#define reg_pinmux_rw_pe_gio___pe13___width 1
536#define reg_pinmux_rw_pe_gio___pe13___bit 13
537#define reg_pinmux_rw_pe_gio___pe14___lsb 14
538#define reg_pinmux_rw_pe_gio___pe14___width 1
539#define reg_pinmux_rw_pe_gio___pe14___bit 14
540#define reg_pinmux_rw_pe_gio___pe15___lsb 15
541#define reg_pinmux_rw_pe_gio___pe15___width 1
542#define reg_pinmux_rw_pe_gio___pe15___bit 15
543#define reg_pinmux_rw_pe_gio___pe16___lsb 16
544#define reg_pinmux_rw_pe_gio___pe16___width 1
545#define reg_pinmux_rw_pe_gio___pe16___bit 16
546#define reg_pinmux_rw_pe_gio___pe17___lsb 17
547#define reg_pinmux_rw_pe_gio___pe17___width 1
548#define reg_pinmux_rw_pe_gio___pe17___bit 17
549#define reg_pinmux_rw_pe_gio_offset 32
550
551/* Register rw_pe_iop, scope pinmux, type rw */
552#define reg_pinmux_rw_pe_iop___pe0___lsb 0
553#define reg_pinmux_rw_pe_iop___pe0___width 1
554#define reg_pinmux_rw_pe_iop___pe0___bit 0
555#define reg_pinmux_rw_pe_iop___pe1___lsb 1
556#define reg_pinmux_rw_pe_iop___pe1___width 1
557#define reg_pinmux_rw_pe_iop___pe1___bit 1
558#define reg_pinmux_rw_pe_iop___pe2___lsb 2
559#define reg_pinmux_rw_pe_iop___pe2___width 1
560#define reg_pinmux_rw_pe_iop___pe2___bit 2
561#define reg_pinmux_rw_pe_iop___pe3___lsb 3
562#define reg_pinmux_rw_pe_iop___pe3___width 1
563#define reg_pinmux_rw_pe_iop___pe3___bit 3
564#define reg_pinmux_rw_pe_iop___pe4___lsb 4
565#define reg_pinmux_rw_pe_iop___pe4___width 1
566#define reg_pinmux_rw_pe_iop___pe4___bit 4
567#define reg_pinmux_rw_pe_iop___pe5___lsb 5
568#define reg_pinmux_rw_pe_iop___pe5___width 1
569#define reg_pinmux_rw_pe_iop___pe5___bit 5
570#define reg_pinmux_rw_pe_iop___pe6___lsb 6
571#define reg_pinmux_rw_pe_iop___pe6___width 1
572#define reg_pinmux_rw_pe_iop___pe6___bit 6
573#define reg_pinmux_rw_pe_iop___pe7___lsb 7
574#define reg_pinmux_rw_pe_iop___pe7___width 1
575#define reg_pinmux_rw_pe_iop___pe7___bit 7
576#define reg_pinmux_rw_pe_iop___pe8___lsb 8
577#define reg_pinmux_rw_pe_iop___pe8___width 1
578#define reg_pinmux_rw_pe_iop___pe8___bit 8
579#define reg_pinmux_rw_pe_iop___pe9___lsb 9
580#define reg_pinmux_rw_pe_iop___pe9___width 1
581#define reg_pinmux_rw_pe_iop___pe9___bit 9
582#define reg_pinmux_rw_pe_iop___pe10___lsb 10
583#define reg_pinmux_rw_pe_iop___pe10___width 1
584#define reg_pinmux_rw_pe_iop___pe10___bit 10
585#define reg_pinmux_rw_pe_iop___pe11___lsb 11
586#define reg_pinmux_rw_pe_iop___pe11___width 1
587#define reg_pinmux_rw_pe_iop___pe11___bit 11
588#define reg_pinmux_rw_pe_iop___pe12___lsb 12
589#define reg_pinmux_rw_pe_iop___pe12___width 1
590#define reg_pinmux_rw_pe_iop___pe12___bit 12
591#define reg_pinmux_rw_pe_iop___pe13___lsb 13
592#define reg_pinmux_rw_pe_iop___pe13___width 1
593#define reg_pinmux_rw_pe_iop___pe13___bit 13
594#define reg_pinmux_rw_pe_iop___pe14___lsb 14
595#define reg_pinmux_rw_pe_iop___pe14___width 1
596#define reg_pinmux_rw_pe_iop___pe14___bit 14
597#define reg_pinmux_rw_pe_iop___pe15___lsb 15
598#define reg_pinmux_rw_pe_iop___pe15___width 1
599#define reg_pinmux_rw_pe_iop___pe15___bit 15
600#define reg_pinmux_rw_pe_iop___pe16___lsb 16
601#define reg_pinmux_rw_pe_iop___pe16___width 1
602#define reg_pinmux_rw_pe_iop___pe16___bit 16
603#define reg_pinmux_rw_pe_iop___pe17___lsb 17
604#define reg_pinmux_rw_pe_iop___pe17___width 1
605#define reg_pinmux_rw_pe_iop___pe17___bit 17
606#define reg_pinmux_rw_pe_iop_offset 36
607
608/* Register rw_usb_phy, scope pinmux, type rw */
609#define reg_pinmux_rw_usb_phy___en_usb0___lsb 0
610#define reg_pinmux_rw_usb_phy___en_usb0___width 1
611#define reg_pinmux_rw_usb_phy___en_usb0___bit 0
612#define reg_pinmux_rw_usb_phy___en_usb1___lsb 1
613#define reg_pinmux_rw_usb_phy___en_usb1___width 1
614#define reg_pinmux_rw_usb_phy___en_usb1___bit 1
615#define reg_pinmux_rw_usb_phy_offset 40
616
617
618/* Constants */
619#define regk_pinmux_no 0x00000000
620#define regk_pinmux_rw_hwprot_default 0x00000000
621#define regk_pinmux_rw_pa_default 0x00000000
622#define regk_pinmux_rw_pb_gio_default 0x00000000
623#define regk_pinmux_rw_pb_iop_default 0x00000000
624#define regk_pinmux_rw_pc_gio_default 0x00000000
625#define regk_pinmux_rw_pc_iop_default 0x00000000
626#define regk_pinmux_rw_pd_gio_default 0x00000000
627#define regk_pinmux_rw_pd_iop_default 0x00000000
628#define regk_pinmux_rw_pe_gio_default 0x00000000
629#define regk_pinmux_rw_pe_iop_default 0x00000000
630#define regk_pinmux_rw_usb_phy_default 0x00000000
631#define regk_pinmux_yes 0x00000001
632#endif /* __pinmux_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/reg_map_asm.h b/include/asm-cris/arch-v32/hwregs/asm/reg_map_asm.h
deleted file mode 100644
index 76959b70cd2c..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/reg_map_asm.h
+++ /dev/null
@@ -1,96 +0,0 @@
1#ifndef __reg_map_h
2#define __reg_map_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../mod/fakereg.rmap
7 * id: fakereg.rmap,v 1.3 2004/02/11 19:53:22 ronny Exp
8 * last modified: Wed Feb 11 20:53:25 2004
9 * file: ../../rtl/global.rmap
10 * id: global.rmap,v 1.3 2003/08/18 15:08:23 mikaeln Exp
11 * last modified: Mon Aug 18 17:08:23 2003
12 * file: ../../mod/modreg.rmap
13 * id: modreg.rmap,v 1.31 2004/02/20 15:40:04 stefans Exp
14 * last modified: Fri Feb 20 16:40:04 2004
15 *
16 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/reg_map_asm.h -base 0xb0000000 ../../rtl/global.rmap ../../mod/modreg.rmap ../../inst/memarb/rtl/guinness/marb_top.r ../../mod/fakereg.rmap
17 * id: $Id: reg_map_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
18 * Any changes here will be lost.
19 *
20 * -*- buffer-read-only: t -*-
21 */
22#define regi_artpec_mod 0xb7044000
23#define regi_ata 0xb0032000
24#define regi_ata_mod 0xb7006000
25#define regi_barber 0xb701a000
26#define regi_bif_core 0xb0014000
27#define regi_bif_dma 0xb0016000
28#define regi_bif_slave 0xb0018000
29#define regi_bif_slave_ext 0xac000000
30#define regi_bus_master 0xb703c000
31#define regi_config 0xb003c000
32#define regi_dma0 0xb0000000
33#define regi_dma1 0xb0002000
34#define regi_dma2 0xb0004000
35#define regi_dma3 0xb0006000
36#define regi_dma4 0xb0008000
37#define regi_dma5 0xb000a000
38#define regi_dma6 0xb000c000
39#define regi_dma7 0xb000e000
40#define regi_dma8 0xb0010000
41#define regi_dma9 0xb0012000
42#define regi_eth0 0xb0034000
43#define regi_eth1 0xb0036000
44#define regi_eth_mod 0xb7004000
45#define regi_eth_mod1 0xb701c000
46#define regi_eth_strmod 0xb7008000
47#define regi_eth_strmod1 0xb7032000
48#define regi_ext_dma 0xb703a000
49#define regi_ext_mem 0xb7046000
50#define regi_gen_io 0xb7016000
51#define regi_gio 0xb001a000
52#define regi_hook 0xb7000000
53#define regi_iop 0xb0020000
54#define regi_irq 0xb001c000
55#define regi_irq_nmi 0xb701e000
56#define regi_marb 0xb003e000
57#define regi_marb_bp0 0xb003e240
58#define regi_marb_bp1 0xb003e280
59#define regi_marb_bp2 0xb003e2c0
60#define regi_marb_bp3 0xb003e300
61#define regi_nand_mod 0xb7014000
62#define regi_p21 0xb002e000
63#define regi_p21_mod 0xb7042000
64#define regi_pci_mod 0xb7010000
65#define regi_pin_test 0xb7018000
66#define regi_pinmux 0xb0038000
67#define regi_sdram_chk 0xb703e000
68#define regi_sdram_mod 0xb7012000
69#define regi_ser0 0xb0026000
70#define regi_ser1 0xb0028000
71#define regi_ser2 0xb002a000
72#define regi_ser3 0xb002c000
73#define regi_ser_mod0 0xb7020000
74#define regi_ser_mod1 0xb7022000
75#define regi_ser_mod2 0xb7024000
76#define regi_ser_mod3 0xb7026000
77#define regi_smif_stat 0xb700e000
78#define regi_sser0 0xb0022000
79#define regi_sser1 0xb0024000
80#define regi_sser_mod0 0xb700a000
81#define regi_sser_mod1 0xb700c000
82#define regi_strcop 0xb0030000
83#define regi_strmux 0xb003a000
84#define regi_strmux_tst 0xb7040000
85#define regi_tap 0xb7002000
86#define regi_timer 0xb001e000
87#define regi_timer_mod 0xb7034000
88#define regi_trace 0xb0040000
89#define regi_usb0 0xb7028000
90#define regi_usb1 0xb702a000
91#define regi_usb2 0xb702c000
92#define regi_usb3 0xb702e000
93#define regi_usb_dev 0xb7030000
94#define regi_utmi_mod0 0xb7036000
95#define regi_utmi_mod1 0xb7038000
96#endif /* __reg_map_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/rt_trace_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/rt_trace_defs_asm.h
deleted file mode 100644
index 10246f49fb28..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/rt_trace_defs_asm.h
+++ /dev/null
@@ -1,142 +0,0 @@
1#ifndef __rt_trace_defs_asm_h
2#define __rt_trace_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/rt_trace/rtl/rt_regs.r
7 * id: rt_regs.r,v 1.18 2005/02/08 15:45:00 stefans Exp
8 * last modfied: Mon Apr 11 16:09:14 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/rt_trace_defs_asm.h ../../inst/rt_trace/rtl/rt_regs.r
11 * id: $Id: rt_trace_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope rt_trace, type rw */
57#define reg_rt_trace_rw_cfg___en___lsb 0
58#define reg_rt_trace_rw_cfg___en___width 1
59#define reg_rt_trace_rw_cfg___en___bit 0
60#define reg_rt_trace_rw_cfg___mode___lsb 1
61#define reg_rt_trace_rw_cfg___mode___width 1
62#define reg_rt_trace_rw_cfg___mode___bit 1
63#define reg_rt_trace_rw_cfg___owner___lsb 2
64#define reg_rt_trace_rw_cfg___owner___width 1
65#define reg_rt_trace_rw_cfg___owner___bit 2
66#define reg_rt_trace_rw_cfg___wp___lsb 3
67#define reg_rt_trace_rw_cfg___wp___width 1
68#define reg_rt_trace_rw_cfg___wp___bit 3
69#define reg_rt_trace_rw_cfg___stall___lsb 4
70#define reg_rt_trace_rw_cfg___stall___width 1
71#define reg_rt_trace_rw_cfg___stall___bit 4
72#define reg_rt_trace_rw_cfg___wp_start___lsb 8
73#define reg_rt_trace_rw_cfg___wp_start___width 7
74#define reg_rt_trace_rw_cfg___wp_stop___lsb 16
75#define reg_rt_trace_rw_cfg___wp_stop___width 7
76#define reg_rt_trace_rw_cfg_offset 0
77
78/* Register rw_tap_ctrl, scope rt_trace, type rw */
79#define reg_rt_trace_rw_tap_ctrl___ack_data___lsb 0
80#define reg_rt_trace_rw_tap_ctrl___ack_data___width 1
81#define reg_rt_trace_rw_tap_ctrl___ack_data___bit 0
82#define reg_rt_trace_rw_tap_ctrl___ack_guru___lsb 1
83#define reg_rt_trace_rw_tap_ctrl___ack_guru___width 1
84#define reg_rt_trace_rw_tap_ctrl___ack_guru___bit 1
85#define reg_rt_trace_rw_tap_ctrl_offset 4
86
87/* Register r_tap_stat, scope rt_trace, type r */
88#define reg_rt_trace_r_tap_stat___dav___lsb 0
89#define reg_rt_trace_r_tap_stat___dav___width 1
90#define reg_rt_trace_r_tap_stat___dav___bit 0
91#define reg_rt_trace_r_tap_stat___empty___lsb 1
92#define reg_rt_trace_r_tap_stat___empty___width 1
93#define reg_rt_trace_r_tap_stat___empty___bit 1
94#define reg_rt_trace_r_tap_stat_offset 8
95
96/* Register rw_tap_data, scope rt_trace, type rw */
97#define reg_rt_trace_rw_tap_data_offset 12
98
99/* Register rw_tap_hdata, scope rt_trace, type rw */
100#define reg_rt_trace_rw_tap_hdata___op___lsb 0
101#define reg_rt_trace_rw_tap_hdata___op___width 4
102#define reg_rt_trace_rw_tap_hdata___sub_op___lsb 4
103#define reg_rt_trace_rw_tap_hdata___sub_op___width 4
104#define reg_rt_trace_rw_tap_hdata_offset 16
105
106/* Register r_redir, scope rt_trace, type r */
107#define reg_rt_trace_r_redir_offset 20
108
109
110/* Constants */
111#define regk_rt_trace_brk 0x0000000c
112#define regk_rt_trace_dbg 0x00000003
113#define regk_rt_trace_dbgdi 0x00000004
114#define regk_rt_trace_dbgdo 0x00000005
115#define regk_rt_trace_gmode 0x00000000
116#define regk_rt_trace_no 0x00000000
117#define regk_rt_trace_nop 0x00000000
118#define regk_rt_trace_normal 0x00000000
119#define regk_rt_trace_rdmem 0x00000007
120#define regk_rt_trace_rdmemb 0x00000009
121#define regk_rt_trace_rdpreg 0x00000002
122#define regk_rt_trace_rdreg 0x00000001
123#define regk_rt_trace_rdsreg 0x00000003
124#define regk_rt_trace_redir 0x00000006
125#define regk_rt_trace_ret 0x0000000b
126#define regk_rt_trace_rw_cfg_default 0x00000000
127#define regk_rt_trace_trcfg 0x00000001
128#define regk_rt_trace_wp 0x00000001
129#define regk_rt_trace_wp0 0x00000001
130#define regk_rt_trace_wp1 0x00000002
131#define regk_rt_trace_wp2 0x00000004
132#define regk_rt_trace_wp3 0x00000008
133#define regk_rt_trace_wp4 0x00000010
134#define regk_rt_trace_wp5 0x00000020
135#define regk_rt_trace_wp6 0x00000040
136#define regk_rt_trace_wrmem 0x00000008
137#define regk_rt_trace_wrmemb 0x0000000a
138#define regk_rt_trace_wrpreg 0x00000005
139#define regk_rt_trace_wrreg 0x00000004
140#define regk_rt_trace_wrsreg 0x00000006
141#define regk_rt_trace_yes 0x00000001
142#endif /* __rt_trace_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/ser_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/ser_defs_asm.h
deleted file mode 100644
index 4a2808bdf390..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/ser_defs_asm.h
+++ /dev/null
@@ -1,359 +0,0 @@
1#ifndef __ser_defs_asm_h
2#define __ser_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/ser/rtl/ser_regs.r
7 * id: ser_regs.r,v 1.23 2005/02/08 13:58:35 perz Exp
8 * last modfied: Mon Apr 11 16:09:21 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/ser_defs_asm.h ../../inst/ser/rtl/ser_regs.r
11 * id: $Id: ser_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_tr_ctrl, scope ser, type rw */
57#define reg_ser_rw_tr_ctrl___base_freq___lsb 0
58#define reg_ser_rw_tr_ctrl___base_freq___width 3
59#define reg_ser_rw_tr_ctrl___en___lsb 3
60#define reg_ser_rw_tr_ctrl___en___width 1
61#define reg_ser_rw_tr_ctrl___en___bit 3
62#define reg_ser_rw_tr_ctrl___par___lsb 4
63#define reg_ser_rw_tr_ctrl___par___width 2
64#define reg_ser_rw_tr_ctrl___par_en___lsb 6
65#define reg_ser_rw_tr_ctrl___par_en___width 1
66#define reg_ser_rw_tr_ctrl___par_en___bit 6
67#define reg_ser_rw_tr_ctrl___data_bits___lsb 7
68#define reg_ser_rw_tr_ctrl___data_bits___width 1
69#define reg_ser_rw_tr_ctrl___data_bits___bit 7
70#define reg_ser_rw_tr_ctrl___stop_bits___lsb 8
71#define reg_ser_rw_tr_ctrl___stop_bits___width 1
72#define reg_ser_rw_tr_ctrl___stop_bits___bit 8
73#define reg_ser_rw_tr_ctrl___stop___lsb 9
74#define reg_ser_rw_tr_ctrl___stop___width 1
75#define reg_ser_rw_tr_ctrl___stop___bit 9
76#define reg_ser_rw_tr_ctrl___rts_delay___lsb 10
77#define reg_ser_rw_tr_ctrl___rts_delay___width 3
78#define reg_ser_rw_tr_ctrl___rts_setup___lsb 13
79#define reg_ser_rw_tr_ctrl___rts_setup___width 1
80#define reg_ser_rw_tr_ctrl___rts_setup___bit 13
81#define reg_ser_rw_tr_ctrl___auto_rts___lsb 14
82#define reg_ser_rw_tr_ctrl___auto_rts___width 1
83#define reg_ser_rw_tr_ctrl___auto_rts___bit 14
84#define reg_ser_rw_tr_ctrl___txd___lsb 15
85#define reg_ser_rw_tr_ctrl___txd___width 1
86#define reg_ser_rw_tr_ctrl___txd___bit 15
87#define reg_ser_rw_tr_ctrl___auto_cts___lsb 16
88#define reg_ser_rw_tr_ctrl___auto_cts___width 1
89#define reg_ser_rw_tr_ctrl___auto_cts___bit 16
90#define reg_ser_rw_tr_ctrl_offset 0
91
92/* Register rw_tr_dma_en, scope ser, type rw */
93#define reg_ser_rw_tr_dma_en___en___lsb 0
94#define reg_ser_rw_tr_dma_en___en___width 1
95#define reg_ser_rw_tr_dma_en___en___bit 0
96#define reg_ser_rw_tr_dma_en_offset 4
97
98/* Register rw_rec_ctrl, scope ser, type rw */
99#define reg_ser_rw_rec_ctrl___base_freq___lsb 0
100#define reg_ser_rw_rec_ctrl___base_freq___width 3
101#define reg_ser_rw_rec_ctrl___en___lsb 3
102#define reg_ser_rw_rec_ctrl___en___width 1
103#define reg_ser_rw_rec_ctrl___en___bit 3
104#define reg_ser_rw_rec_ctrl___par___lsb 4
105#define reg_ser_rw_rec_ctrl___par___width 2
106#define reg_ser_rw_rec_ctrl___par_en___lsb 6
107#define reg_ser_rw_rec_ctrl___par_en___width 1
108#define reg_ser_rw_rec_ctrl___par_en___bit 6
109#define reg_ser_rw_rec_ctrl___data_bits___lsb 7
110#define reg_ser_rw_rec_ctrl___data_bits___width 1
111#define reg_ser_rw_rec_ctrl___data_bits___bit 7
112#define reg_ser_rw_rec_ctrl___dma_mode___lsb 8
113#define reg_ser_rw_rec_ctrl___dma_mode___width 1
114#define reg_ser_rw_rec_ctrl___dma_mode___bit 8
115#define reg_ser_rw_rec_ctrl___dma_err___lsb 9
116#define reg_ser_rw_rec_ctrl___dma_err___width 1
117#define reg_ser_rw_rec_ctrl___dma_err___bit 9
118#define reg_ser_rw_rec_ctrl___sampling___lsb 10
119#define reg_ser_rw_rec_ctrl___sampling___width 1
120#define reg_ser_rw_rec_ctrl___sampling___bit 10
121#define reg_ser_rw_rec_ctrl___timeout___lsb 11
122#define reg_ser_rw_rec_ctrl___timeout___width 3
123#define reg_ser_rw_rec_ctrl___auto_eop___lsb 14
124#define reg_ser_rw_rec_ctrl___auto_eop___width 1
125#define reg_ser_rw_rec_ctrl___auto_eop___bit 14
126#define reg_ser_rw_rec_ctrl___half_duplex___lsb 15
127#define reg_ser_rw_rec_ctrl___half_duplex___width 1
128#define reg_ser_rw_rec_ctrl___half_duplex___bit 15
129#define reg_ser_rw_rec_ctrl___rts_n___lsb 16
130#define reg_ser_rw_rec_ctrl___rts_n___width 1
131#define reg_ser_rw_rec_ctrl___rts_n___bit 16
132#define reg_ser_rw_rec_ctrl___loopback___lsb 17
133#define reg_ser_rw_rec_ctrl___loopback___width 1
134#define reg_ser_rw_rec_ctrl___loopback___bit 17
135#define reg_ser_rw_rec_ctrl_offset 8
136
137/* Register rw_tr_baud_div, scope ser, type rw */
138#define reg_ser_rw_tr_baud_div___div___lsb 0
139#define reg_ser_rw_tr_baud_div___div___width 16
140#define reg_ser_rw_tr_baud_div_offset 12
141
142/* Register rw_rec_baud_div, scope ser, type rw */
143#define reg_ser_rw_rec_baud_div___div___lsb 0
144#define reg_ser_rw_rec_baud_div___div___width 16
145#define reg_ser_rw_rec_baud_div_offset 16
146
147/* Register rw_xoff, scope ser, type rw */
148#define reg_ser_rw_xoff___chr___lsb 0
149#define reg_ser_rw_xoff___chr___width 8
150#define reg_ser_rw_xoff___automatic___lsb 8
151#define reg_ser_rw_xoff___automatic___width 1
152#define reg_ser_rw_xoff___automatic___bit 8
153#define reg_ser_rw_xoff_offset 20
154
155/* Register rw_xoff_clr, scope ser, type rw */
156#define reg_ser_rw_xoff_clr___clr___lsb 0
157#define reg_ser_rw_xoff_clr___clr___width 1
158#define reg_ser_rw_xoff_clr___clr___bit 0
159#define reg_ser_rw_xoff_clr_offset 24
160
161/* Register rw_dout, scope ser, type rw */
162#define reg_ser_rw_dout___data___lsb 0
163#define reg_ser_rw_dout___data___width 8
164#define reg_ser_rw_dout_offset 28
165
166/* Register rs_stat_din, scope ser, type rs */
167#define reg_ser_rs_stat_din___data___lsb 0
168#define reg_ser_rs_stat_din___data___width 8
169#define reg_ser_rs_stat_din___dav___lsb 16
170#define reg_ser_rs_stat_din___dav___width 1
171#define reg_ser_rs_stat_din___dav___bit 16
172#define reg_ser_rs_stat_din___framing_err___lsb 17
173#define reg_ser_rs_stat_din___framing_err___width 1
174#define reg_ser_rs_stat_din___framing_err___bit 17
175#define reg_ser_rs_stat_din___par_err___lsb 18
176#define reg_ser_rs_stat_din___par_err___width 1
177#define reg_ser_rs_stat_din___par_err___bit 18
178#define reg_ser_rs_stat_din___orun___lsb 19
179#define reg_ser_rs_stat_din___orun___width 1
180#define reg_ser_rs_stat_din___orun___bit 19
181#define reg_ser_rs_stat_din___rec_err___lsb 20
182#define reg_ser_rs_stat_din___rec_err___width 1
183#define reg_ser_rs_stat_din___rec_err___bit 20
184#define reg_ser_rs_stat_din___rxd___lsb 21
185#define reg_ser_rs_stat_din___rxd___width 1
186#define reg_ser_rs_stat_din___rxd___bit 21
187#define reg_ser_rs_stat_din___tr_idle___lsb 22
188#define reg_ser_rs_stat_din___tr_idle___width 1
189#define reg_ser_rs_stat_din___tr_idle___bit 22
190#define reg_ser_rs_stat_din___tr_empty___lsb 23
191#define reg_ser_rs_stat_din___tr_empty___width 1
192#define reg_ser_rs_stat_din___tr_empty___bit 23
193#define reg_ser_rs_stat_din___tr_rdy___lsb 24
194#define reg_ser_rs_stat_din___tr_rdy___width 1
195#define reg_ser_rs_stat_din___tr_rdy___bit 24
196#define reg_ser_rs_stat_din___cts_n___lsb 25
197#define reg_ser_rs_stat_din___cts_n___width 1
198#define reg_ser_rs_stat_din___cts_n___bit 25
199#define reg_ser_rs_stat_din___xoff_detect___lsb 26
200#define reg_ser_rs_stat_din___xoff_detect___width 1
201#define reg_ser_rs_stat_din___xoff_detect___bit 26
202#define reg_ser_rs_stat_din___rts_n___lsb 27
203#define reg_ser_rs_stat_din___rts_n___width 1
204#define reg_ser_rs_stat_din___rts_n___bit 27
205#define reg_ser_rs_stat_din___txd___lsb 28
206#define reg_ser_rs_stat_din___txd___width 1
207#define reg_ser_rs_stat_din___txd___bit 28
208#define reg_ser_rs_stat_din_offset 32
209
210/* Register r_stat_din, scope ser, type r */
211#define reg_ser_r_stat_din___data___lsb 0
212#define reg_ser_r_stat_din___data___width 8
213#define reg_ser_r_stat_din___dav___lsb 16
214#define reg_ser_r_stat_din___dav___width 1
215#define reg_ser_r_stat_din___dav___bit 16
216#define reg_ser_r_stat_din___framing_err___lsb 17
217#define reg_ser_r_stat_din___framing_err___width 1
218#define reg_ser_r_stat_din___framing_err___bit 17
219#define reg_ser_r_stat_din___par_err___lsb 18
220#define reg_ser_r_stat_din___par_err___width 1
221#define reg_ser_r_stat_din___par_err___bit 18
222#define reg_ser_r_stat_din___orun___lsb 19
223#define reg_ser_r_stat_din___orun___width 1
224#define reg_ser_r_stat_din___orun___bit 19
225#define reg_ser_r_stat_din___rec_err___lsb 20
226#define reg_ser_r_stat_din___rec_err___width 1
227#define reg_ser_r_stat_din___rec_err___bit 20
228#define reg_ser_r_stat_din___rxd___lsb 21
229#define reg_ser_r_stat_din___rxd___width 1
230#define reg_ser_r_stat_din___rxd___bit 21
231#define reg_ser_r_stat_din___tr_idle___lsb 22
232#define reg_ser_r_stat_din___tr_idle___width 1
233#define reg_ser_r_stat_din___tr_idle___bit 22
234#define reg_ser_r_stat_din___tr_empty___lsb 23
235#define reg_ser_r_stat_din___tr_empty___width 1
236#define reg_ser_r_stat_din___tr_empty___bit 23
237#define reg_ser_r_stat_din___tr_rdy___lsb 24
238#define reg_ser_r_stat_din___tr_rdy___width 1
239#define reg_ser_r_stat_din___tr_rdy___bit 24
240#define reg_ser_r_stat_din___cts_n___lsb 25
241#define reg_ser_r_stat_din___cts_n___width 1
242#define reg_ser_r_stat_din___cts_n___bit 25
243#define reg_ser_r_stat_din___xoff_detect___lsb 26
244#define reg_ser_r_stat_din___xoff_detect___width 1
245#define reg_ser_r_stat_din___xoff_detect___bit 26
246#define reg_ser_r_stat_din___rts_n___lsb 27
247#define reg_ser_r_stat_din___rts_n___width 1
248#define reg_ser_r_stat_din___rts_n___bit 27
249#define reg_ser_r_stat_din___txd___lsb 28
250#define reg_ser_r_stat_din___txd___width 1
251#define reg_ser_r_stat_din___txd___bit 28
252#define reg_ser_r_stat_din_offset 36
253
254/* Register rw_rec_eop, scope ser, type rw */
255#define reg_ser_rw_rec_eop___set___lsb 0
256#define reg_ser_rw_rec_eop___set___width 1
257#define reg_ser_rw_rec_eop___set___bit 0
258#define reg_ser_rw_rec_eop_offset 40
259
260/* Register rw_intr_mask, scope ser, type rw */
261#define reg_ser_rw_intr_mask___tr_rdy___lsb 0
262#define reg_ser_rw_intr_mask___tr_rdy___width 1
263#define reg_ser_rw_intr_mask___tr_rdy___bit 0
264#define reg_ser_rw_intr_mask___tr_empty___lsb 1
265#define reg_ser_rw_intr_mask___tr_empty___width 1
266#define reg_ser_rw_intr_mask___tr_empty___bit 1
267#define reg_ser_rw_intr_mask___tr_idle___lsb 2
268#define reg_ser_rw_intr_mask___tr_idle___width 1
269#define reg_ser_rw_intr_mask___tr_idle___bit 2
270#define reg_ser_rw_intr_mask___dav___lsb 3
271#define reg_ser_rw_intr_mask___dav___width 1
272#define reg_ser_rw_intr_mask___dav___bit 3
273#define reg_ser_rw_intr_mask_offset 44
274
275/* Register rw_ack_intr, scope ser, type rw */
276#define reg_ser_rw_ack_intr___tr_rdy___lsb 0
277#define reg_ser_rw_ack_intr___tr_rdy___width 1
278#define reg_ser_rw_ack_intr___tr_rdy___bit 0
279#define reg_ser_rw_ack_intr___tr_empty___lsb 1
280#define reg_ser_rw_ack_intr___tr_empty___width 1
281#define reg_ser_rw_ack_intr___tr_empty___bit 1
282#define reg_ser_rw_ack_intr___tr_idle___lsb 2
283#define reg_ser_rw_ack_intr___tr_idle___width 1
284#define reg_ser_rw_ack_intr___tr_idle___bit 2
285#define reg_ser_rw_ack_intr___dav___lsb 3
286#define reg_ser_rw_ack_intr___dav___width 1
287#define reg_ser_rw_ack_intr___dav___bit 3
288#define reg_ser_rw_ack_intr_offset 48
289
290/* Register r_intr, scope ser, type r */
291#define reg_ser_r_intr___tr_rdy___lsb 0
292#define reg_ser_r_intr___tr_rdy___width 1
293#define reg_ser_r_intr___tr_rdy___bit 0
294#define reg_ser_r_intr___tr_empty___lsb 1
295#define reg_ser_r_intr___tr_empty___width 1
296#define reg_ser_r_intr___tr_empty___bit 1
297#define reg_ser_r_intr___tr_idle___lsb 2
298#define reg_ser_r_intr___tr_idle___width 1
299#define reg_ser_r_intr___tr_idle___bit 2
300#define reg_ser_r_intr___dav___lsb 3
301#define reg_ser_r_intr___dav___width 1
302#define reg_ser_r_intr___dav___bit 3
303#define reg_ser_r_intr_offset 52
304
305/* Register r_masked_intr, scope ser, type r */
306#define reg_ser_r_masked_intr___tr_rdy___lsb 0
307#define reg_ser_r_masked_intr___tr_rdy___width 1
308#define reg_ser_r_masked_intr___tr_rdy___bit 0
309#define reg_ser_r_masked_intr___tr_empty___lsb 1
310#define reg_ser_r_masked_intr___tr_empty___width 1
311#define reg_ser_r_masked_intr___tr_empty___bit 1
312#define reg_ser_r_masked_intr___tr_idle___lsb 2
313#define reg_ser_r_masked_intr___tr_idle___width 1
314#define reg_ser_r_masked_intr___tr_idle___bit 2
315#define reg_ser_r_masked_intr___dav___lsb 3
316#define reg_ser_r_masked_intr___dav___width 1
317#define reg_ser_r_masked_intr___dav___bit 3
318#define reg_ser_r_masked_intr_offset 56
319
320
321/* Constants */
322#define regk_ser_active 0x00000000
323#define regk_ser_bits1 0x00000000
324#define regk_ser_bits2 0x00000001
325#define regk_ser_bits7 0x00000001
326#define regk_ser_bits8 0x00000000
327#define regk_ser_del0_5 0x00000000
328#define regk_ser_del1 0x00000001
329#define regk_ser_del1_5 0x00000002
330#define regk_ser_del2 0x00000003
331#define regk_ser_del2_5 0x00000004
332#define regk_ser_del3 0x00000005
333#define regk_ser_del3_5 0x00000006
334#define regk_ser_del4 0x00000007
335#define regk_ser_even 0x00000000
336#define regk_ser_ext 0x00000001
337#define regk_ser_f100 0x00000007
338#define regk_ser_f29_493 0x00000004
339#define regk_ser_f32 0x00000005
340#define regk_ser_f32_768 0x00000006
341#define regk_ser_ignore 0x00000001
342#define regk_ser_inactive 0x00000001
343#define regk_ser_majority 0x00000001
344#define regk_ser_mark 0x00000002
345#define regk_ser_middle 0x00000000
346#define regk_ser_no 0x00000000
347#define regk_ser_odd 0x00000001
348#define regk_ser_off 0x00000000
349#define regk_ser_rw_intr_mask_default 0x00000000
350#define regk_ser_rw_rec_baud_div_default 0x00000000
351#define regk_ser_rw_rec_ctrl_default 0x00010000
352#define regk_ser_rw_tr_baud_div_default 0x00000000
353#define regk_ser_rw_tr_ctrl_default 0x00008000
354#define regk_ser_rw_tr_dma_en_default 0x00000000
355#define regk_ser_rw_xoff_default 0x00000000
356#define regk_ser_space 0x00000003
357#define regk_ser_stop 0x00000000
358#define regk_ser_yes 0x00000001
359#endif /* __ser_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/sser_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/sser_defs_asm.h
deleted file mode 100644
index 27d4d91b3abd..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/sser_defs_asm.h
+++ /dev/null
@@ -1,462 +0,0 @@
1#ifndef __sser_defs_asm_h
2#define __sser_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/syncser/rtl/sser_regs.r
7 * id: sser_regs.r,v 1.24 2005/02/11 14:27:36 gunnard Exp
8 * last modfied: Mon Apr 11 16:09:48 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/sser_defs_asm.h ../../inst/syncser/rtl/sser_regs.r
11 * id: $Id: sser_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope sser, type rw */
57#define reg_sser_rw_cfg___clk_div___lsb 0
58#define reg_sser_rw_cfg___clk_div___width 16
59#define reg_sser_rw_cfg___base_freq___lsb 16
60#define reg_sser_rw_cfg___base_freq___width 3
61#define reg_sser_rw_cfg___gate_clk___lsb 19
62#define reg_sser_rw_cfg___gate_clk___width 1
63#define reg_sser_rw_cfg___gate_clk___bit 19
64#define reg_sser_rw_cfg___clkgate_ctrl___lsb 20
65#define reg_sser_rw_cfg___clkgate_ctrl___width 1
66#define reg_sser_rw_cfg___clkgate_ctrl___bit 20
67#define reg_sser_rw_cfg___clkgate_in___lsb 21
68#define reg_sser_rw_cfg___clkgate_in___width 1
69#define reg_sser_rw_cfg___clkgate_in___bit 21
70#define reg_sser_rw_cfg___clk_dir___lsb 22
71#define reg_sser_rw_cfg___clk_dir___width 1
72#define reg_sser_rw_cfg___clk_dir___bit 22
73#define reg_sser_rw_cfg___clk_od_mode___lsb 23
74#define reg_sser_rw_cfg___clk_od_mode___width 1
75#define reg_sser_rw_cfg___clk_od_mode___bit 23
76#define reg_sser_rw_cfg___out_clk_pol___lsb 24
77#define reg_sser_rw_cfg___out_clk_pol___width 1
78#define reg_sser_rw_cfg___out_clk_pol___bit 24
79#define reg_sser_rw_cfg___out_clk_src___lsb 25
80#define reg_sser_rw_cfg___out_clk_src___width 2
81#define reg_sser_rw_cfg___clk_in_sel___lsb 27
82#define reg_sser_rw_cfg___clk_in_sel___width 1
83#define reg_sser_rw_cfg___clk_in_sel___bit 27
84#define reg_sser_rw_cfg___hold_pol___lsb 28
85#define reg_sser_rw_cfg___hold_pol___width 1
86#define reg_sser_rw_cfg___hold_pol___bit 28
87#define reg_sser_rw_cfg___prepare___lsb 29
88#define reg_sser_rw_cfg___prepare___width 1
89#define reg_sser_rw_cfg___prepare___bit 29
90#define reg_sser_rw_cfg___en___lsb 30
91#define reg_sser_rw_cfg___en___width 1
92#define reg_sser_rw_cfg___en___bit 30
93#define reg_sser_rw_cfg_offset 0
94
95/* Register rw_frm_cfg, scope sser, type rw */
96#define reg_sser_rw_frm_cfg___wordrate___lsb 0
97#define reg_sser_rw_frm_cfg___wordrate___width 10
98#define reg_sser_rw_frm_cfg___rec_delay___lsb 10
99#define reg_sser_rw_frm_cfg___rec_delay___width 3
100#define reg_sser_rw_frm_cfg___tr_delay___lsb 13
101#define reg_sser_rw_frm_cfg___tr_delay___width 3
102#define reg_sser_rw_frm_cfg___early_wend___lsb 16
103#define reg_sser_rw_frm_cfg___early_wend___width 1
104#define reg_sser_rw_frm_cfg___early_wend___bit 16
105#define reg_sser_rw_frm_cfg___level___lsb 17
106#define reg_sser_rw_frm_cfg___level___width 2
107#define reg_sser_rw_frm_cfg___type___lsb 19
108#define reg_sser_rw_frm_cfg___type___width 1
109#define reg_sser_rw_frm_cfg___type___bit 19
110#define reg_sser_rw_frm_cfg___clk_pol___lsb 20
111#define reg_sser_rw_frm_cfg___clk_pol___width 1
112#define reg_sser_rw_frm_cfg___clk_pol___bit 20
113#define reg_sser_rw_frm_cfg___fr_in_rxclk___lsb 21
114#define reg_sser_rw_frm_cfg___fr_in_rxclk___width 1
115#define reg_sser_rw_frm_cfg___fr_in_rxclk___bit 21
116#define reg_sser_rw_frm_cfg___clk_src___lsb 22
117#define reg_sser_rw_frm_cfg___clk_src___width 1
118#define reg_sser_rw_frm_cfg___clk_src___bit 22
119#define reg_sser_rw_frm_cfg___out_off___lsb 23
120#define reg_sser_rw_frm_cfg___out_off___width 1
121#define reg_sser_rw_frm_cfg___out_off___bit 23
122#define reg_sser_rw_frm_cfg___out_on___lsb 24
123#define reg_sser_rw_frm_cfg___out_on___width 1
124#define reg_sser_rw_frm_cfg___out_on___bit 24
125#define reg_sser_rw_frm_cfg___frame_pin_dir___lsb 25
126#define reg_sser_rw_frm_cfg___frame_pin_dir___width 1
127#define reg_sser_rw_frm_cfg___frame_pin_dir___bit 25
128#define reg_sser_rw_frm_cfg___frame_pin_use___lsb 26
129#define reg_sser_rw_frm_cfg___frame_pin_use___width 2
130#define reg_sser_rw_frm_cfg___status_pin_dir___lsb 28
131#define reg_sser_rw_frm_cfg___status_pin_dir___width 1
132#define reg_sser_rw_frm_cfg___status_pin_dir___bit 28
133#define reg_sser_rw_frm_cfg___status_pin_use___lsb 29
134#define reg_sser_rw_frm_cfg___status_pin_use___width 2
135#define reg_sser_rw_frm_cfg_offset 4
136
137/* Register rw_tr_cfg, scope sser, type rw */
138#define reg_sser_rw_tr_cfg___tr_en___lsb 0
139#define reg_sser_rw_tr_cfg___tr_en___width 1
140#define reg_sser_rw_tr_cfg___tr_en___bit 0
141#define reg_sser_rw_tr_cfg___stop___lsb 1
142#define reg_sser_rw_tr_cfg___stop___width 1
143#define reg_sser_rw_tr_cfg___stop___bit 1
144#define reg_sser_rw_tr_cfg___urun_stop___lsb 2
145#define reg_sser_rw_tr_cfg___urun_stop___width 1
146#define reg_sser_rw_tr_cfg___urun_stop___bit 2
147#define reg_sser_rw_tr_cfg___eop_stop___lsb 3
148#define reg_sser_rw_tr_cfg___eop_stop___width 1
149#define reg_sser_rw_tr_cfg___eop_stop___bit 3
150#define reg_sser_rw_tr_cfg___sample_size___lsb 4
151#define reg_sser_rw_tr_cfg___sample_size___width 6
152#define reg_sser_rw_tr_cfg___sh_dir___lsb 10
153#define reg_sser_rw_tr_cfg___sh_dir___width 1
154#define reg_sser_rw_tr_cfg___sh_dir___bit 10
155#define reg_sser_rw_tr_cfg___clk_pol___lsb 11
156#define reg_sser_rw_tr_cfg___clk_pol___width 1
157#define reg_sser_rw_tr_cfg___clk_pol___bit 11
158#define reg_sser_rw_tr_cfg___clk_src___lsb 12
159#define reg_sser_rw_tr_cfg___clk_src___width 1
160#define reg_sser_rw_tr_cfg___clk_src___bit 12
161#define reg_sser_rw_tr_cfg___use_dma___lsb 13
162#define reg_sser_rw_tr_cfg___use_dma___width 1
163#define reg_sser_rw_tr_cfg___use_dma___bit 13
164#define reg_sser_rw_tr_cfg___mode___lsb 14
165#define reg_sser_rw_tr_cfg___mode___width 2
166#define reg_sser_rw_tr_cfg___frm_src___lsb 16
167#define reg_sser_rw_tr_cfg___frm_src___width 1
168#define reg_sser_rw_tr_cfg___frm_src___bit 16
169#define reg_sser_rw_tr_cfg___use60958___lsb 17
170#define reg_sser_rw_tr_cfg___use60958___width 1
171#define reg_sser_rw_tr_cfg___use60958___bit 17
172#define reg_sser_rw_tr_cfg___iec60958_ckdiv___lsb 18
173#define reg_sser_rw_tr_cfg___iec60958_ckdiv___width 2
174#define reg_sser_rw_tr_cfg___rate_ctrl___lsb 20
175#define reg_sser_rw_tr_cfg___rate_ctrl___width 1
176#define reg_sser_rw_tr_cfg___rate_ctrl___bit 20
177#define reg_sser_rw_tr_cfg___use_md___lsb 21
178#define reg_sser_rw_tr_cfg___use_md___width 1
179#define reg_sser_rw_tr_cfg___use_md___bit 21
180#define reg_sser_rw_tr_cfg___dual_i2s___lsb 22
181#define reg_sser_rw_tr_cfg___dual_i2s___width 1
182#define reg_sser_rw_tr_cfg___dual_i2s___bit 22
183#define reg_sser_rw_tr_cfg___data_pin_use___lsb 23
184#define reg_sser_rw_tr_cfg___data_pin_use___width 2
185#define reg_sser_rw_tr_cfg___od_mode___lsb 25
186#define reg_sser_rw_tr_cfg___od_mode___width 1
187#define reg_sser_rw_tr_cfg___od_mode___bit 25
188#define reg_sser_rw_tr_cfg___bulk_wspace___lsb 26
189#define reg_sser_rw_tr_cfg___bulk_wspace___width 2
190#define reg_sser_rw_tr_cfg_offset 8
191
192/* Register rw_rec_cfg, scope sser, type rw */
193#define reg_sser_rw_rec_cfg___rec_en___lsb 0
194#define reg_sser_rw_rec_cfg___rec_en___width 1
195#define reg_sser_rw_rec_cfg___rec_en___bit 0
196#define reg_sser_rw_rec_cfg___force_eop___lsb 1
197#define reg_sser_rw_rec_cfg___force_eop___width 1
198#define reg_sser_rw_rec_cfg___force_eop___bit 1
199#define reg_sser_rw_rec_cfg___stop___lsb 2
200#define reg_sser_rw_rec_cfg___stop___width 1
201#define reg_sser_rw_rec_cfg___stop___bit 2
202#define reg_sser_rw_rec_cfg___orun_stop___lsb 3
203#define reg_sser_rw_rec_cfg___orun_stop___width 1
204#define reg_sser_rw_rec_cfg___orun_stop___bit 3
205#define reg_sser_rw_rec_cfg___eop_stop___lsb 4
206#define reg_sser_rw_rec_cfg___eop_stop___width 1
207#define reg_sser_rw_rec_cfg___eop_stop___bit 4
208#define reg_sser_rw_rec_cfg___sample_size___lsb 5
209#define reg_sser_rw_rec_cfg___sample_size___width 6
210#define reg_sser_rw_rec_cfg___sh_dir___lsb 11
211#define reg_sser_rw_rec_cfg___sh_dir___width 1
212#define reg_sser_rw_rec_cfg___sh_dir___bit 11
213#define reg_sser_rw_rec_cfg___clk_pol___lsb 12
214#define reg_sser_rw_rec_cfg___clk_pol___width 1
215#define reg_sser_rw_rec_cfg___clk_pol___bit 12
216#define reg_sser_rw_rec_cfg___clk_src___lsb 13
217#define reg_sser_rw_rec_cfg___clk_src___width 1
218#define reg_sser_rw_rec_cfg___clk_src___bit 13
219#define reg_sser_rw_rec_cfg___use_dma___lsb 14
220#define reg_sser_rw_rec_cfg___use_dma___width 1
221#define reg_sser_rw_rec_cfg___use_dma___bit 14
222#define reg_sser_rw_rec_cfg___mode___lsb 15
223#define reg_sser_rw_rec_cfg___mode___width 2
224#define reg_sser_rw_rec_cfg___frm_src___lsb 17
225#define reg_sser_rw_rec_cfg___frm_src___width 2
226#define reg_sser_rw_rec_cfg___use60958___lsb 19
227#define reg_sser_rw_rec_cfg___use60958___width 1
228#define reg_sser_rw_rec_cfg___use60958___bit 19
229#define reg_sser_rw_rec_cfg___iec60958_ui_len___lsb 20
230#define reg_sser_rw_rec_cfg___iec60958_ui_len___width 5
231#define reg_sser_rw_rec_cfg___slave2_en___lsb 25
232#define reg_sser_rw_rec_cfg___slave2_en___width 1
233#define reg_sser_rw_rec_cfg___slave2_en___bit 25
234#define reg_sser_rw_rec_cfg___slave3_en___lsb 26
235#define reg_sser_rw_rec_cfg___slave3_en___width 1
236#define reg_sser_rw_rec_cfg___slave3_en___bit 26
237#define reg_sser_rw_rec_cfg___fifo_thr___lsb 27
238#define reg_sser_rw_rec_cfg___fifo_thr___width 2
239#define reg_sser_rw_rec_cfg_offset 12
240
241/* Register rw_tr_data, scope sser, type rw */
242#define reg_sser_rw_tr_data___data___lsb 0
243#define reg_sser_rw_tr_data___data___width 16
244#define reg_sser_rw_tr_data___md___lsb 16
245#define reg_sser_rw_tr_data___md___width 1
246#define reg_sser_rw_tr_data___md___bit 16
247#define reg_sser_rw_tr_data_offset 16
248
249/* Register r_rec_data, scope sser, type r */
250#define reg_sser_r_rec_data___data___lsb 0
251#define reg_sser_r_rec_data___data___width 16
252#define reg_sser_r_rec_data___md___lsb 16
253#define reg_sser_r_rec_data___md___width 1
254#define reg_sser_r_rec_data___md___bit 16
255#define reg_sser_r_rec_data___ext_clk___lsb 17
256#define reg_sser_r_rec_data___ext_clk___width 1
257#define reg_sser_r_rec_data___ext_clk___bit 17
258#define reg_sser_r_rec_data___status_in___lsb 18
259#define reg_sser_r_rec_data___status_in___width 1
260#define reg_sser_r_rec_data___status_in___bit 18
261#define reg_sser_r_rec_data___frame_in___lsb 19
262#define reg_sser_r_rec_data___frame_in___width 1
263#define reg_sser_r_rec_data___frame_in___bit 19
264#define reg_sser_r_rec_data___din___lsb 20
265#define reg_sser_r_rec_data___din___width 1
266#define reg_sser_r_rec_data___din___bit 20
267#define reg_sser_r_rec_data___data_in___lsb 21
268#define reg_sser_r_rec_data___data_in___width 1
269#define reg_sser_r_rec_data___data_in___bit 21
270#define reg_sser_r_rec_data___clk_in___lsb 22
271#define reg_sser_r_rec_data___clk_in___width 1
272#define reg_sser_r_rec_data___clk_in___bit 22
273#define reg_sser_r_rec_data_offset 20
274
275/* Register rw_extra, scope sser, type rw */
276#define reg_sser_rw_extra___clkoff_cycles___lsb 0
277#define reg_sser_rw_extra___clkoff_cycles___width 20
278#define reg_sser_rw_extra___clkoff_en___lsb 20
279#define reg_sser_rw_extra___clkoff_en___width 1
280#define reg_sser_rw_extra___clkoff_en___bit 20
281#define reg_sser_rw_extra___clkon_en___lsb 21
282#define reg_sser_rw_extra___clkon_en___width 1
283#define reg_sser_rw_extra___clkon_en___bit 21
284#define reg_sser_rw_extra___dout_delay___lsb 22
285#define reg_sser_rw_extra___dout_delay___width 5
286#define reg_sser_rw_extra_offset 24
287
288/* Register rw_intr_mask, scope sser, type rw */
289#define reg_sser_rw_intr_mask___trdy___lsb 0
290#define reg_sser_rw_intr_mask___trdy___width 1
291#define reg_sser_rw_intr_mask___trdy___bit 0
292#define reg_sser_rw_intr_mask___rdav___lsb 1
293#define reg_sser_rw_intr_mask___rdav___width 1
294#define reg_sser_rw_intr_mask___rdav___bit 1
295#define reg_sser_rw_intr_mask___tidle___lsb 2
296#define reg_sser_rw_intr_mask___tidle___width 1
297#define reg_sser_rw_intr_mask___tidle___bit 2
298#define reg_sser_rw_intr_mask___rstop___lsb 3
299#define reg_sser_rw_intr_mask___rstop___width 1
300#define reg_sser_rw_intr_mask___rstop___bit 3
301#define reg_sser_rw_intr_mask___urun___lsb 4
302#define reg_sser_rw_intr_mask___urun___width 1
303#define reg_sser_rw_intr_mask___urun___bit 4
304#define reg_sser_rw_intr_mask___orun___lsb 5
305#define reg_sser_rw_intr_mask___orun___width 1
306#define reg_sser_rw_intr_mask___orun___bit 5
307#define reg_sser_rw_intr_mask___md_rec___lsb 6
308#define reg_sser_rw_intr_mask___md_rec___width 1
309#define reg_sser_rw_intr_mask___md_rec___bit 6
310#define reg_sser_rw_intr_mask___md_sent___lsb 7
311#define reg_sser_rw_intr_mask___md_sent___width 1
312#define reg_sser_rw_intr_mask___md_sent___bit 7
313#define reg_sser_rw_intr_mask___r958err___lsb 8
314#define reg_sser_rw_intr_mask___r958err___width 1
315#define reg_sser_rw_intr_mask___r958err___bit 8
316#define reg_sser_rw_intr_mask_offset 28
317
318/* Register rw_ack_intr, scope sser, type rw */
319#define reg_sser_rw_ack_intr___trdy___lsb 0
320#define reg_sser_rw_ack_intr___trdy___width 1
321#define reg_sser_rw_ack_intr___trdy___bit 0
322#define reg_sser_rw_ack_intr___rdav___lsb 1
323#define reg_sser_rw_ack_intr___rdav___width 1
324#define reg_sser_rw_ack_intr___rdav___bit 1
325#define reg_sser_rw_ack_intr___tidle___lsb 2
326#define reg_sser_rw_ack_intr___tidle___width 1
327#define reg_sser_rw_ack_intr___tidle___bit 2
328#define reg_sser_rw_ack_intr___rstop___lsb 3
329#define reg_sser_rw_ack_intr___rstop___width 1
330#define reg_sser_rw_ack_intr___rstop___bit 3
331#define reg_sser_rw_ack_intr___urun___lsb 4
332#define reg_sser_rw_ack_intr___urun___width 1
333#define reg_sser_rw_ack_intr___urun___bit 4
334#define reg_sser_rw_ack_intr___orun___lsb 5
335#define reg_sser_rw_ack_intr___orun___width 1
336#define reg_sser_rw_ack_intr___orun___bit 5
337#define reg_sser_rw_ack_intr___md_rec___lsb 6
338#define reg_sser_rw_ack_intr___md_rec___width 1
339#define reg_sser_rw_ack_intr___md_rec___bit 6
340#define reg_sser_rw_ack_intr___md_sent___lsb 7
341#define reg_sser_rw_ack_intr___md_sent___width 1
342#define reg_sser_rw_ack_intr___md_sent___bit 7
343#define reg_sser_rw_ack_intr___r958err___lsb 8
344#define reg_sser_rw_ack_intr___r958err___width 1
345#define reg_sser_rw_ack_intr___r958err___bit 8
346#define reg_sser_rw_ack_intr_offset 32
347
348/* Register r_intr, scope sser, type r */
349#define reg_sser_r_intr___trdy___lsb 0
350#define reg_sser_r_intr___trdy___width 1
351#define reg_sser_r_intr___trdy___bit 0
352#define reg_sser_r_intr___rdav___lsb 1
353#define reg_sser_r_intr___rdav___width 1
354#define reg_sser_r_intr___rdav___bit 1
355#define reg_sser_r_intr___tidle___lsb 2
356#define reg_sser_r_intr___tidle___width 1
357#define reg_sser_r_intr___tidle___bit 2
358#define reg_sser_r_intr___rstop___lsb 3
359#define reg_sser_r_intr___rstop___width 1
360#define reg_sser_r_intr___rstop___bit 3
361#define reg_sser_r_intr___urun___lsb 4
362#define reg_sser_r_intr___urun___width 1
363#define reg_sser_r_intr___urun___bit 4
364#define reg_sser_r_intr___orun___lsb 5
365#define reg_sser_r_intr___orun___width 1
366#define reg_sser_r_intr___orun___bit 5
367#define reg_sser_r_intr___md_rec___lsb 6
368#define reg_sser_r_intr___md_rec___width 1
369#define reg_sser_r_intr___md_rec___bit 6
370#define reg_sser_r_intr___md_sent___lsb 7
371#define reg_sser_r_intr___md_sent___width 1
372#define reg_sser_r_intr___md_sent___bit 7
373#define reg_sser_r_intr___r958err___lsb 8
374#define reg_sser_r_intr___r958err___width 1
375#define reg_sser_r_intr___r958err___bit 8
376#define reg_sser_r_intr_offset 36
377
378/* Register r_masked_intr, scope sser, type r */
379#define reg_sser_r_masked_intr___trdy___lsb 0
380#define reg_sser_r_masked_intr___trdy___width 1
381#define reg_sser_r_masked_intr___trdy___bit 0
382#define reg_sser_r_masked_intr___rdav___lsb 1
383#define reg_sser_r_masked_intr___rdav___width 1
384#define reg_sser_r_masked_intr___rdav___bit 1
385#define reg_sser_r_masked_intr___tidle___lsb 2
386#define reg_sser_r_masked_intr___tidle___width 1
387#define reg_sser_r_masked_intr___tidle___bit 2
388#define reg_sser_r_masked_intr___rstop___lsb 3
389#define reg_sser_r_masked_intr___rstop___width 1
390#define reg_sser_r_masked_intr___rstop___bit 3
391#define reg_sser_r_masked_intr___urun___lsb 4
392#define reg_sser_r_masked_intr___urun___width 1
393#define reg_sser_r_masked_intr___urun___bit 4
394#define reg_sser_r_masked_intr___orun___lsb 5
395#define reg_sser_r_masked_intr___orun___width 1
396#define reg_sser_r_masked_intr___orun___bit 5
397#define reg_sser_r_masked_intr___md_rec___lsb 6
398#define reg_sser_r_masked_intr___md_rec___width 1
399#define reg_sser_r_masked_intr___md_rec___bit 6
400#define reg_sser_r_masked_intr___md_sent___lsb 7
401#define reg_sser_r_masked_intr___md_sent___width 1
402#define reg_sser_r_masked_intr___md_sent___bit 7
403#define reg_sser_r_masked_intr___r958err___lsb 8
404#define reg_sser_r_masked_intr___r958err___width 1
405#define reg_sser_r_masked_intr___r958err___bit 8
406#define reg_sser_r_masked_intr_offset 40
407
408
409/* Constants */
410#define regk_sser_both 0x00000002
411#define regk_sser_bulk 0x00000001
412#define regk_sser_clk100 0x00000000
413#define regk_sser_clk_in 0x00000000
414#define regk_sser_const0 0x00000003
415#define regk_sser_dout 0x00000002
416#define regk_sser_edge 0x00000000
417#define regk_sser_ext 0x00000001
418#define regk_sser_ext_clk 0x00000001
419#define regk_sser_f100 0x00000000
420#define regk_sser_f29_493 0x00000004
421#define regk_sser_f32 0x00000005
422#define regk_sser_f32_768 0x00000006
423#define regk_sser_frm 0x00000003
424#define regk_sser_gio0 0x00000000
425#define regk_sser_gio1 0x00000001
426#define regk_sser_hispeed 0x00000001
427#define regk_sser_hold 0x00000002
428#define regk_sser_in 0x00000000
429#define regk_sser_inf 0x00000003
430#define regk_sser_intern 0x00000000
431#define regk_sser_intern_clk 0x00000001
432#define regk_sser_intern_tb 0x00000000
433#define regk_sser_iso 0x00000000
434#define regk_sser_level 0x00000001
435#define regk_sser_lospeed 0x00000000
436#define regk_sser_lsbfirst 0x00000000
437#define regk_sser_msbfirst 0x00000001
438#define regk_sser_neg 0x00000001
439#define regk_sser_neg_lo 0x00000000
440#define regk_sser_no 0x00000000
441#define regk_sser_no_clk 0x00000007
442#define regk_sser_nojitter 0x00000002
443#define regk_sser_out 0x00000001
444#define regk_sser_pos 0x00000000
445#define regk_sser_pos_hi 0x00000001
446#define regk_sser_rec 0x00000000
447#define regk_sser_rw_cfg_default 0x00000000
448#define regk_sser_rw_extra_default 0x00000000
449#define regk_sser_rw_frm_cfg_default 0x00000000
450#define regk_sser_rw_intr_mask_default 0x00000000
451#define regk_sser_rw_rec_cfg_default 0x00000000
452#define regk_sser_rw_tr_cfg_default 0x01800000
453#define regk_sser_rw_tr_data_default 0x00000000
454#define regk_sser_thr16 0x00000001
455#define regk_sser_thr32 0x00000002
456#define regk_sser_thr8 0x00000000
457#define regk_sser_tr 0x00000001
458#define regk_sser_ts_out 0x00000003
459#define regk_sser_tx_bulk 0x00000002
460#define regk_sser_wiresave 0x00000002
461#define regk_sser_yes 0x00000001
462#endif /* __sser_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/strcop_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/strcop_defs_asm.h
deleted file mode 100644
index 55083e6aec93..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/strcop_defs_asm.h
+++ /dev/null
@@ -1,84 +0,0 @@
1#ifndef __strcop_defs_asm_h
2#define __strcop_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/strcop/rtl/strcop_regs.r
7 * id: strcop_regs.r,v 1.5 2003/10/15 12:09:45 kriskn Exp
8 * last modfied: Mon Apr 11 16:09:38 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/strcop_defs_asm.h ../../inst/strcop/rtl/strcop_regs.r
11 * id: $Id: strcop_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope strcop, type rw */
57#define reg_strcop_rw_cfg___td3___lsb 0
58#define reg_strcop_rw_cfg___td3___width 1
59#define reg_strcop_rw_cfg___td3___bit 0
60#define reg_strcop_rw_cfg___td2___lsb 1
61#define reg_strcop_rw_cfg___td2___width 1
62#define reg_strcop_rw_cfg___td2___bit 1
63#define reg_strcop_rw_cfg___td1___lsb 2
64#define reg_strcop_rw_cfg___td1___width 1
65#define reg_strcop_rw_cfg___td1___bit 2
66#define reg_strcop_rw_cfg___ipend___lsb 3
67#define reg_strcop_rw_cfg___ipend___width 1
68#define reg_strcop_rw_cfg___ipend___bit 3
69#define reg_strcop_rw_cfg___ignore_sync___lsb 4
70#define reg_strcop_rw_cfg___ignore_sync___width 1
71#define reg_strcop_rw_cfg___ignore_sync___bit 4
72#define reg_strcop_rw_cfg___en___lsb 5
73#define reg_strcop_rw_cfg___en___width 1
74#define reg_strcop_rw_cfg___en___bit 5
75#define reg_strcop_rw_cfg_offset 0
76
77
78/* Constants */
79#define regk_strcop_big 0x00000001
80#define regk_strcop_d 0x00000001
81#define regk_strcop_e 0x00000000
82#define regk_strcop_little 0x00000000
83#define regk_strcop_rw_cfg_default 0x00000002
84#endif /* __strcop_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/strmux_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/strmux_defs_asm.h
deleted file mode 100644
index 69b299920f71..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/strmux_defs_asm.h
+++ /dev/null
@@ -1,100 +0,0 @@
1#ifndef __strmux_defs_asm_h
2#define __strmux_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/strmux/rtl/guinness/strmux_regs.r
7 * id: strmux_regs.r,v 1.10 2005/02/10 10:10:46 perz Exp
8 * last modfied: Mon Apr 11 16:09:43 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/strmux_defs_asm.h ../../inst/strmux/rtl/guinness/strmux_regs.r
11 * id: $Id: strmux_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope strmux, type rw */
57#define reg_strmux_rw_cfg___dma0___lsb 0
58#define reg_strmux_rw_cfg___dma0___width 3
59#define reg_strmux_rw_cfg___dma1___lsb 3
60#define reg_strmux_rw_cfg___dma1___width 3
61#define reg_strmux_rw_cfg___dma2___lsb 6
62#define reg_strmux_rw_cfg___dma2___width 3
63#define reg_strmux_rw_cfg___dma3___lsb 9
64#define reg_strmux_rw_cfg___dma3___width 3
65#define reg_strmux_rw_cfg___dma4___lsb 12
66#define reg_strmux_rw_cfg___dma4___width 3
67#define reg_strmux_rw_cfg___dma5___lsb 15
68#define reg_strmux_rw_cfg___dma5___width 3
69#define reg_strmux_rw_cfg___dma6___lsb 18
70#define reg_strmux_rw_cfg___dma6___width 3
71#define reg_strmux_rw_cfg___dma7___lsb 21
72#define reg_strmux_rw_cfg___dma7___width 3
73#define reg_strmux_rw_cfg___dma8___lsb 24
74#define reg_strmux_rw_cfg___dma8___width 3
75#define reg_strmux_rw_cfg___dma9___lsb 27
76#define reg_strmux_rw_cfg___dma9___width 3
77#define reg_strmux_rw_cfg_offset 0
78
79
80/* Constants */
81#define regk_strmux_ata 0x00000003
82#define regk_strmux_eth0 0x00000001
83#define regk_strmux_eth1 0x00000004
84#define regk_strmux_ext0 0x00000001
85#define regk_strmux_ext1 0x00000001
86#define regk_strmux_ext2 0x00000001
87#define regk_strmux_ext3 0x00000001
88#define regk_strmux_iop0 0x00000002
89#define regk_strmux_iop1 0x00000001
90#define regk_strmux_off 0x00000000
91#define regk_strmux_p21 0x00000004
92#define regk_strmux_rw_cfg_default 0x00000000
93#define regk_strmux_ser0 0x00000002
94#define regk_strmux_ser1 0x00000002
95#define regk_strmux_ser2 0x00000004
96#define regk_strmux_ser3 0x00000003
97#define regk_strmux_sser0 0x00000003
98#define regk_strmux_sser1 0x00000003
99#define regk_strmux_strcop 0x00000002
100#endif /* __strmux_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/asm/timer_defs_asm.h b/include/asm-cris/arch-v32/hwregs/asm/timer_defs_asm.h
deleted file mode 100644
index 43146021fc16..000000000000
--- a/include/asm-cris/arch-v32/hwregs/asm/timer_defs_asm.h
+++ /dev/null
@@ -1,229 +0,0 @@
1#ifndef __timer_defs_asm_h
2#define __timer_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/timer/rtl/timer_regs.r
7 * id: timer_regs.r,v 1.7 2003/03/11 11:16:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:53 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/timer_defs_asm.h ../../inst/timer/rtl/timer_regs.r
11 * id: $Id: timer_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_tmr0_div, scope timer, type rw */
57#define reg_timer_rw_tmr0_div_offset 0
58
59/* Register r_tmr0_data, scope timer, type r */
60#define reg_timer_r_tmr0_data_offset 4
61
62/* Register rw_tmr0_ctrl, scope timer, type rw */
63#define reg_timer_rw_tmr0_ctrl___op___lsb 0
64#define reg_timer_rw_tmr0_ctrl___op___width 2
65#define reg_timer_rw_tmr0_ctrl___freq___lsb 2
66#define reg_timer_rw_tmr0_ctrl___freq___width 3
67#define reg_timer_rw_tmr0_ctrl_offset 8
68
69/* Register rw_tmr1_div, scope timer, type rw */
70#define reg_timer_rw_tmr1_div_offset 16
71
72/* Register r_tmr1_data, scope timer, type r */
73#define reg_timer_r_tmr1_data_offset 20
74
75/* Register rw_tmr1_ctrl, scope timer, type rw */
76#define reg_timer_rw_tmr1_ctrl___op___lsb 0
77#define reg_timer_rw_tmr1_ctrl___op___width 2
78#define reg_timer_rw_tmr1_ctrl___freq___lsb 2
79#define reg_timer_rw_tmr1_ctrl___freq___width 3
80#define reg_timer_rw_tmr1_ctrl_offset 24
81
82/* Register rs_cnt_data, scope timer, type rs */
83#define reg_timer_rs_cnt_data___tmr___lsb 0
84#define reg_timer_rs_cnt_data___tmr___width 24
85#define reg_timer_rs_cnt_data___cnt___lsb 24
86#define reg_timer_rs_cnt_data___cnt___width 8
87#define reg_timer_rs_cnt_data_offset 32
88
89/* Register r_cnt_data, scope timer, type r */
90#define reg_timer_r_cnt_data___tmr___lsb 0
91#define reg_timer_r_cnt_data___tmr___width 24
92#define reg_timer_r_cnt_data___cnt___lsb 24
93#define reg_timer_r_cnt_data___cnt___width 8
94#define reg_timer_r_cnt_data_offset 36
95
96/* Register rw_cnt_cfg, scope timer, type rw */
97#define reg_timer_rw_cnt_cfg___clk___lsb 0
98#define reg_timer_rw_cnt_cfg___clk___width 2
99#define reg_timer_rw_cnt_cfg_offset 40
100
101/* Register rw_trig, scope timer, type rw */
102#define reg_timer_rw_trig_offset 48
103
104/* Register rw_trig_cfg, scope timer, type rw */
105#define reg_timer_rw_trig_cfg___tmr___lsb 0
106#define reg_timer_rw_trig_cfg___tmr___width 2
107#define reg_timer_rw_trig_cfg_offset 52
108
109/* Register r_time, scope timer, type r */
110#define reg_timer_r_time_offset 56
111
112/* Register rw_out, scope timer, type rw */
113#define reg_timer_rw_out___tmr___lsb 0
114#define reg_timer_rw_out___tmr___width 2
115#define reg_timer_rw_out_offset 60
116
117/* Register rw_wd_ctrl, scope timer, type rw */
118#define reg_timer_rw_wd_ctrl___cnt___lsb 0
119#define reg_timer_rw_wd_ctrl___cnt___width 8
120#define reg_timer_rw_wd_ctrl___cmd___lsb 8
121#define reg_timer_rw_wd_ctrl___cmd___width 1
122#define reg_timer_rw_wd_ctrl___cmd___bit 8
123#define reg_timer_rw_wd_ctrl___key___lsb 9
124#define reg_timer_rw_wd_ctrl___key___width 7
125#define reg_timer_rw_wd_ctrl_offset 64
126
127/* Register r_wd_stat, scope timer, type r */
128#define reg_timer_r_wd_stat___cnt___lsb 0
129#define reg_timer_r_wd_stat___cnt___width 8
130#define reg_timer_r_wd_stat___cmd___lsb 8
131#define reg_timer_r_wd_stat___cmd___width 1
132#define reg_timer_r_wd_stat___cmd___bit 8
133#define reg_timer_r_wd_stat_offset 68
134
135/* Register rw_intr_mask, scope timer, type rw */
136#define reg_timer_rw_intr_mask___tmr0___lsb 0
137#define reg_timer_rw_intr_mask___tmr0___width 1
138#define reg_timer_rw_intr_mask___tmr0___bit 0
139#define reg_timer_rw_intr_mask___tmr1___lsb 1
140#define reg_timer_rw_intr_mask___tmr1___width 1
141#define reg_timer_rw_intr_mask___tmr1___bit 1
142#define reg_timer_rw_intr_mask___cnt___lsb 2
143#define reg_timer_rw_intr_mask___cnt___width 1
144#define reg_timer_rw_intr_mask___cnt___bit 2
145#define reg_timer_rw_intr_mask___trig___lsb 3
146#define reg_timer_rw_intr_mask___trig___width 1
147#define reg_timer_rw_intr_mask___trig___bit 3
148#define reg_timer_rw_intr_mask_offset 72
149
150/* Register rw_ack_intr, scope timer, type rw */
151#define reg_timer_rw_ack_intr___tmr0___lsb 0
152#define reg_timer_rw_ack_intr___tmr0___width 1
153#define reg_timer_rw_ack_intr___tmr0___bit 0
154#define reg_timer_rw_ack_intr___tmr1___lsb 1
155#define reg_timer_rw_ack_intr___tmr1___width 1
156#define reg_timer_rw_ack_intr___tmr1___bit 1
157#define reg_timer_rw_ack_intr___cnt___lsb 2
158#define reg_timer_rw_ack_intr___cnt___width 1
159#define reg_timer_rw_ack_intr___cnt___bit 2
160#define reg_timer_rw_ack_intr___trig___lsb 3
161#define reg_timer_rw_ack_intr___trig___width 1
162#define reg_timer_rw_ack_intr___trig___bit 3
163#define reg_timer_rw_ack_intr_offset 76
164
165/* Register r_intr, scope timer, type r */
166#define reg_timer_r_intr___tmr0___lsb 0
167#define reg_timer_r_intr___tmr0___width 1
168#define reg_timer_r_intr___tmr0___bit 0
169#define reg_timer_r_intr___tmr1___lsb 1
170#define reg_timer_r_intr___tmr1___width 1
171#define reg_timer_r_intr___tmr1___bit 1
172#define reg_timer_r_intr___cnt___lsb 2
173#define reg_timer_r_intr___cnt___width 1
174#define reg_timer_r_intr___cnt___bit 2
175#define reg_timer_r_intr___trig___lsb 3
176#define reg_timer_r_intr___trig___width 1
177#define reg_timer_r_intr___trig___bit 3
178#define reg_timer_r_intr_offset 80
179
180/* Register r_masked_intr, scope timer, type r */
181#define reg_timer_r_masked_intr___tmr0___lsb 0
182#define reg_timer_r_masked_intr___tmr0___width 1
183#define reg_timer_r_masked_intr___tmr0___bit 0
184#define reg_timer_r_masked_intr___tmr1___lsb 1
185#define reg_timer_r_masked_intr___tmr1___width 1
186#define reg_timer_r_masked_intr___tmr1___bit 1
187#define reg_timer_r_masked_intr___cnt___lsb 2
188#define reg_timer_r_masked_intr___cnt___width 1
189#define reg_timer_r_masked_intr___cnt___bit 2
190#define reg_timer_r_masked_intr___trig___lsb 3
191#define reg_timer_r_masked_intr___trig___width 1
192#define reg_timer_r_masked_intr___trig___bit 3
193#define reg_timer_r_masked_intr_offset 84
194
195/* Register rw_test, scope timer, type rw */
196#define reg_timer_rw_test___dis___lsb 0
197#define reg_timer_rw_test___dis___width 1
198#define reg_timer_rw_test___dis___bit 0
199#define reg_timer_rw_test___en___lsb 1
200#define reg_timer_rw_test___en___width 1
201#define reg_timer_rw_test___en___bit 1
202#define reg_timer_rw_test_offset 88
203
204
205/* Constants */
206#define regk_timer_ext 0x00000001
207#define regk_timer_f100 0x00000007
208#define regk_timer_f29_493 0x00000004
209#define regk_timer_f32 0x00000005
210#define regk_timer_f32_768 0x00000006
211#define regk_timer_hold 0x00000001
212#define regk_timer_ld 0x00000000
213#define regk_timer_no 0x00000000
214#define regk_timer_off 0x00000000
215#define regk_timer_run 0x00000002
216#define regk_timer_rw_cnt_cfg_default 0x00000000
217#define regk_timer_rw_intr_mask_default 0x00000000
218#define regk_timer_rw_out_default 0x00000000
219#define regk_timer_rw_test_default 0x00000000
220#define regk_timer_rw_tmr0_ctrl_default 0x00000000
221#define regk_timer_rw_tmr1_ctrl_default 0x00000000
222#define regk_timer_rw_trig_cfg_default 0x00000000
223#define regk_timer_start 0x00000001
224#define regk_timer_stop 0x00000000
225#define regk_timer_time 0x00000001
226#define regk_timer_tmr0 0x00000002
227#define regk_timer_tmr1 0x00000003
228#define regk_timer_yes 0x00000001
229#endif /* __timer_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/ata_defs.h b/include/asm-cris/arch-v32/hwregs/ata_defs.h
deleted file mode 100644
index 43b6643ff0d3..000000000000
--- a/include/asm-cris/arch-v32/hwregs/ata_defs.h
+++ /dev/null
@@ -1,222 +0,0 @@
1#ifndef __ata_defs_h
2#define __ata_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/ata/rtl/ata_regs.r
7 * id: ata_regs.r,v 1.11 2005/02/09 08:27:36 kriskn Exp
8 * last modfied: Mon Apr 11 16:06:25 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile ata_defs.h ../../inst/ata/rtl/ata_regs.r
11 * id: $Id: ata_defs.h,v 1.7 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope ata */
86
87/* Register rw_ctrl0, scope ata, type rw */
88typedef struct {
89 unsigned int pio_hold : 6;
90 unsigned int pio_strb : 6;
91 unsigned int pio_setup : 6;
92 unsigned int dma_hold : 6;
93 unsigned int dma_strb : 6;
94 unsigned int rst : 1;
95 unsigned int en : 1;
96} reg_ata_rw_ctrl0;
97#define REG_RD_ADDR_ata_rw_ctrl0 12
98#define REG_WR_ADDR_ata_rw_ctrl0 12
99
100/* Register rw_ctrl1, scope ata, type rw */
101typedef struct {
102 unsigned int udma_tcyc : 4;
103 unsigned int udma_tdvs : 4;
104 unsigned int dummy1 : 24;
105} reg_ata_rw_ctrl1;
106#define REG_RD_ADDR_ata_rw_ctrl1 16
107#define REG_WR_ADDR_ata_rw_ctrl1 16
108
109/* Register rw_ctrl2, scope ata, type rw */
110typedef struct {
111 unsigned int data : 16;
112 unsigned int dummy1 : 3;
113 unsigned int dma_size : 1;
114 unsigned int multi : 1;
115 unsigned int hsh : 2;
116 unsigned int trf_mode : 1;
117 unsigned int rw : 1;
118 unsigned int addr : 3;
119 unsigned int cs0 : 1;
120 unsigned int cs1 : 1;
121 unsigned int sel : 2;
122} reg_ata_rw_ctrl2;
123#define REG_RD_ADDR_ata_rw_ctrl2 0
124#define REG_WR_ADDR_ata_rw_ctrl2 0
125
126/* Register rs_stat_data, scope ata, type rs */
127typedef struct {
128 unsigned int data : 16;
129 unsigned int dav : 1;
130 unsigned int busy : 1;
131 unsigned int dummy1 : 14;
132} reg_ata_rs_stat_data;
133#define REG_RD_ADDR_ata_rs_stat_data 4
134
135/* Register r_stat_data, scope ata, type r */
136typedef struct {
137 unsigned int data : 16;
138 unsigned int dav : 1;
139 unsigned int busy : 1;
140 unsigned int dummy1 : 14;
141} reg_ata_r_stat_data;
142#define REG_RD_ADDR_ata_r_stat_data 8
143
144/* Register rw_trf_cnt, scope ata, type rw */
145typedef struct {
146 unsigned int cnt : 17;
147 unsigned int dummy1 : 15;
148} reg_ata_rw_trf_cnt;
149#define REG_RD_ADDR_ata_rw_trf_cnt 20
150#define REG_WR_ADDR_ata_rw_trf_cnt 20
151
152/* Register r_stat_misc, scope ata, type r */
153typedef struct {
154 unsigned int crc : 16;
155 unsigned int dummy1 : 16;
156} reg_ata_r_stat_misc;
157#define REG_RD_ADDR_ata_r_stat_misc 24
158
159/* Register rw_intr_mask, scope ata, type rw */
160typedef struct {
161 unsigned int bus0 : 1;
162 unsigned int bus1 : 1;
163 unsigned int bus2 : 1;
164 unsigned int bus3 : 1;
165 unsigned int dummy1 : 28;
166} reg_ata_rw_intr_mask;
167#define REG_RD_ADDR_ata_rw_intr_mask 28
168#define REG_WR_ADDR_ata_rw_intr_mask 28
169
170/* Register rw_ack_intr, scope ata, type rw */
171typedef struct {
172 unsigned int bus0 : 1;
173 unsigned int bus1 : 1;
174 unsigned int bus2 : 1;
175 unsigned int bus3 : 1;
176 unsigned int dummy1 : 28;
177} reg_ata_rw_ack_intr;
178#define REG_RD_ADDR_ata_rw_ack_intr 32
179#define REG_WR_ADDR_ata_rw_ack_intr 32
180
181/* Register r_intr, scope ata, type r */
182typedef struct {
183 unsigned int bus0 : 1;
184 unsigned int bus1 : 1;
185 unsigned int bus2 : 1;
186 unsigned int bus3 : 1;
187 unsigned int dummy1 : 28;
188} reg_ata_r_intr;
189#define REG_RD_ADDR_ata_r_intr 36
190
191/* Register r_masked_intr, scope ata, type r */
192typedef struct {
193 unsigned int bus0 : 1;
194 unsigned int bus1 : 1;
195 unsigned int bus2 : 1;
196 unsigned int bus3 : 1;
197 unsigned int dummy1 : 28;
198} reg_ata_r_masked_intr;
199#define REG_RD_ADDR_ata_r_masked_intr 40
200
201
202/* Constants */
203enum {
204 regk_ata_active = 0x00000001,
205 regk_ata_byte = 0x00000001,
206 regk_ata_data = 0x00000001,
207 regk_ata_dma = 0x00000001,
208 regk_ata_inactive = 0x00000000,
209 regk_ata_no = 0x00000000,
210 regk_ata_nodata = 0x00000000,
211 regk_ata_pio = 0x00000000,
212 regk_ata_rd = 0x00000001,
213 regk_ata_reg = 0x00000000,
214 regk_ata_rw_ctrl0_default = 0x00000000,
215 regk_ata_rw_ctrl2_default = 0x00000000,
216 regk_ata_rw_intr_mask_default = 0x00000000,
217 regk_ata_udma = 0x00000002,
218 regk_ata_word = 0x00000000,
219 regk_ata_wr = 0x00000000,
220 regk_ata_yes = 0x00000001
221};
222#endif /* __ata_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/bif_core_defs.h b/include/asm-cris/arch-v32/hwregs/bif_core_defs.h
deleted file mode 100644
index a56608b50359..000000000000
--- a/include/asm-cris/arch-v32/hwregs/bif_core_defs.h
+++ /dev/null
@@ -1,284 +0,0 @@
1#ifndef __bif_core_defs_h
2#define __bif_core_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_core_regs.r
7 * id: bif_core_regs.r,v 1.17 2005/02/04 13:28:22 np Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_core_defs.h ../../inst/bif/rtl/bif_core_regs.r
11 * id: $Id: bif_core_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope bif_core */
86
87/* Register rw_grp1_cfg, scope bif_core, type rw */
88typedef struct {
89 unsigned int lw : 6;
90 unsigned int ew : 3;
91 unsigned int zw : 3;
92 unsigned int aw : 2;
93 unsigned int dw : 2;
94 unsigned int ewb : 2;
95 unsigned int bw : 1;
96 unsigned int wr_extend : 1;
97 unsigned int erc_en : 1;
98 unsigned int mode : 1;
99 unsigned int dummy1 : 10;
100} reg_bif_core_rw_grp1_cfg;
101#define REG_RD_ADDR_bif_core_rw_grp1_cfg 0
102#define REG_WR_ADDR_bif_core_rw_grp1_cfg 0
103
104/* Register rw_grp2_cfg, scope bif_core, type rw */
105typedef struct {
106 unsigned int lw : 6;
107 unsigned int ew : 3;
108 unsigned int zw : 3;
109 unsigned int aw : 2;
110 unsigned int dw : 2;
111 unsigned int ewb : 2;
112 unsigned int bw : 1;
113 unsigned int wr_extend : 1;
114 unsigned int erc_en : 1;
115 unsigned int mode : 1;
116 unsigned int dummy1 : 10;
117} reg_bif_core_rw_grp2_cfg;
118#define REG_RD_ADDR_bif_core_rw_grp2_cfg 4
119#define REG_WR_ADDR_bif_core_rw_grp2_cfg 4
120
121/* Register rw_grp3_cfg, scope bif_core, type rw */
122typedef struct {
123 unsigned int lw : 6;
124 unsigned int ew : 3;
125 unsigned int zw : 3;
126 unsigned int aw : 2;
127 unsigned int dw : 2;
128 unsigned int ewb : 2;
129 unsigned int bw : 1;
130 unsigned int wr_extend : 1;
131 unsigned int erc_en : 1;
132 unsigned int mode : 1;
133 unsigned int dummy1 : 2;
134 unsigned int gated_csp0 : 2;
135 unsigned int gated_csp1 : 2;
136 unsigned int gated_csp2 : 2;
137 unsigned int gated_csp3 : 2;
138} reg_bif_core_rw_grp3_cfg;
139#define REG_RD_ADDR_bif_core_rw_grp3_cfg 8
140#define REG_WR_ADDR_bif_core_rw_grp3_cfg 8
141
142/* Register rw_grp4_cfg, scope bif_core, type rw */
143typedef struct {
144 unsigned int lw : 6;
145 unsigned int ew : 3;
146 unsigned int zw : 3;
147 unsigned int aw : 2;
148 unsigned int dw : 2;
149 unsigned int ewb : 2;
150 unsigned int bw : 1;
151 unsigned int wr_extend : 1;
152 unsigned int erc_en : 1;
153 unsigned int mode : 1;
154 unsigned int dummy1 : 4;
155 unsigned int gated_csp4 : 2;
156 unsigned int gated_csp5 : 2;
157 unsigned int gated_csp6 : 2;
158} reg_bif_core_rw_grp4_cfg;
159#define REG_RD_ADDR_bif_core_rw_grp4_cfg 12
160#define REG_WR_ADDR_bif_core_rw_grp4_cfg 12
161
162/* Register rw_sdram_cfg_grp0, scope bif_core, type rw */
163typedef struct {
164 unsigned int bank_sel : 5;
165 unsigned int ca : 3;
166 unsigned int type : 1;
167 unsigned int bw : 1;
168 unsigned int sh : 3;
169 unsigned int wmm : 1;
170 unsigned int sh16 : 1;
171 unsigned int grp_sel : 5;
172 unsigned int dummy1 : 12;
173} reg_bif_core_rw_sdram_cfg_grp0;
174#define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp0 16
175#define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp0 16
176
177/* Register rw_sdram_cfg_grp1, scope bif_core, type rw */
178typedef struct {
179 unsigned int bank_sel : 5;
180 unsigned int ca : 3;
181 unsigned int type : 1;
182 unsigned int bw : 1;
183 unsigned int sh : 3;
184 unsigned int wmm : 1;
185 unsigned int sh16 : 1;
186 unsigned int dummy1 : 17;
187} reg_bif_core_rw_sdram_cfg_grp1;
188#define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp1 20
189#define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp1 20
190
191/* Register rw_sdram_timing, scope bif_core, type rw */
192typedef struct {
193 unsigned int cl : 3;
194 unsigned int rcd : 3;
195 unsigned int rp : 3;
196 unsigned int rc : 2;
197 unsigned int dpl : 2;
198 unsigned int pde : 1;
199 unsigned int ref : 2;
200 unsigned int cpd : 1;
201 unsigned int sdcke : 1;
202 unsigned int sdclk : 1;
203 unsigned int dummy1 : 13;
204} reg_bif_core_rw_sdram_timing;
205#define REG_RD_ADDR_bif_core_rw_sdram_timing 24
206#define REG_WR_ADDR_bif_core_rw_sdram_timing 24
207
208/* Register rw_sdram_cmd, scope bif_core, type rw */
209typedef struct {
210 unsigned int cmd : 3;
211 unsigned int mrs_data : 15;
212 unsigned int dummy1 : 14;
213} reg_bif_core_rw_sdram_cmd;
214#define REG_RD_ADDR_bif_core_rw_sdram_cmd 28
215#define REG_WR_ADDR_bif_core_rw_sdram_cmd 28
216
217/* Register rs_sdram_ref_stat, scope bif_core, type rs */
218typedef struct {
219 unsigned int ok : 1;
220 unsigned int dummy1 : 31;
221} reg_bif_core_rs_sdram_ref_stat;
222#define REG_RD_ADDR_bif_core_rs_sdram_ref_stat 32
223
224/* Register r_sdram_ref_stat, scope bif_core, type r */
225typedef struct {
226 unsigned int ok : 1;
227 unsigned int dummy1 : 31;
228} reg_bif_core_r_sdram_ref_stat;
229#define REG_RD_ADDR_bif_core_r_sdram_ref_stat 36
230
231
232/* Constants */
233enum {
234 regk_bif_core_bank2 = 0x00000000,
235 regk_bif_core_bank4 = 0x00000001,
236 regk_bif_core_bit10 = 0x0000000a,
237 regk_bif_core_bit11 = 0x0000000b,
238 regk_bif_core_bit12 = 0x0000000c,
239 regk_bif_core_bit13 = 0x0000000d,
240 regk_bif_core_bit14 = 0x0000000e,
241 regk_bif_core_bit15 = 0x0000000f,
242 regk_bif_core_bit16 = 0x00000010,
243 regk_bif_core_bit17 = 0x00000011,
244 regk_bif_core_bit18 = 0x00000012,
245 regk_bif_core_bit19 = 0x00000013,
246 regk_bif_core_bit20 = 0x00000014,
247 regk_bif_core_bit21 = 0x00000015,
248 regk_bif_core_bit22 = 0x00000016,
249 regk_bif_core_bit23 = 0x00000017,
250 regk_bif_core_bit24 = 0x00000018,
251 regk_bif_core_bit25 = 0x00000019,
252 regk_bif_core_bit26 = 0x0000001a,
253 regk_bif_core_bit27 = 0x0000001b,
254 regk_bif_core_bit28 = 0x0000001c,
255 regk_bif_core_bit29 = 0x0000001d,
256 regk_bif_core_bit9 = 0x00000009,
257 regk_bif_core_bw16 = 0x00000001,
258 regk_bif_core_bw32 = 0x00000000,
259 regk_bif_core_bwe = 0x00000000,
260 regk_bif_core_cwe = 0x00000001,
261 regk_bif_core_e15us = 0x00000001,
262 regk_bif_core_e7800ns = 0x00000002,
263 regk_bif_core_grp0 = 0x00000000,
264 regk_bif_core_grp1 = 0x00000001,
265 regk_bif_core_mrs = 0x00000003,
266 regk_bif_core_no = 0x00000000,
267 regk_bif_core_none = 0x00000000,
268 regk_bif_core_nop = 0x00000000,
269 regk_bif_core_off = 0x00000000,
270 regk_bif_core_pre = 0x00000002,
271 regk_bif_core_r_sdram_ref_stat_default = 0x00000001,
272 regk_bif_core_rd = 0x00000002,
273 regk_bif_core_ref = 0x00000001,
274 regk_bif_core_rs_sdram_ref_stat_default = 0x00000001,
275 regk_bif_core_rw_grp1_cfg_default = 0x000006cf,
276 regk_bif_core_rw_grp2_cfg_default = 0x000006cf,
277 regk_bif_core_rw_grp3_cfg_default = 0x000006cf,
278 regk_bif_core_rw_grp4_cfg_default = 0x000006cf,
279 regk_bif_core_rw_sdram_cfg_grp1_default = 0x00000000,
280 regk_bif_core_slf = 0x00000004,
281 regk_bif_core_wr = 0x00000001,
282 regk_bif_core_yes = 0x00000001
283};
284#endif /* __bif_core_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/bif_dma_defs.h b/include/asm-cris/arch-v32/hwregs/bif_dma_defs.h
deleted file mode 100644
index b931c1aab679..000000000000
--- a/include/asm-cris/arch-v32/hwregs/bif_dma_defs.h
+++ /dev/null
@@ -1,473 +0,0 @@
1#ifndef __bif_dma_defs_h
2#define __bif_dma_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_dma_regs.r
7 * id: bif_dma_regs.r,v 1.6 2005/02/04 13:28:31 perz Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_dma_defs.h ../../inst/bif/rtl/bif_dma_regs.r
11 * id: $Id: bif_dma_defs.h,v 1.2 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope bif_dma */
86
87/* Register rw_ch0_ctrl, scope bif_dma, type rw */
88typedef struct {
89 unsigned int bw : 2;
90 unsigned int burst_len : 1;
91 unsigned int cont : 1;
92 unsigned int end_pad : 1;
93 unsigned int cnt : 1;
94 unsigned int dreq_pin : 3;
95 unsigned int dreq_mode : 2;
96 unsigned int tc_in_pin : 3;
97 unsigned int tc_in_mode : 2;
98 unsigned int bus_mode : 2;
99 unsigned int rate_en : 1;
100 unsigned int wr_all : 1;
101 unsigned int dummy1 : 12;
102} reg_bif_dma_rw_ch0_ctrl;
103#define REG_RD_ADDR_bif_dma_rw_ch0_ctrl 0
104#define REG_WR_ADDR_bif_dma_rw_ch0_ctrl 0
105
106/* Register rw_ch0_addr, scope bif_dma, type rw */
107typedef struct {
108 unsigned int addr : 32;
109} reg_bif_dma_rw_ch0_addr;
110#define REG_RD_ADDR_bif_dma_rw_ch0_addr 4
111#define REG_WR_ADDR_bif_dma_rw_ch0_addr 4
112
113/* Register rw_ch0_start, scope bif_dma, type rw */
114typedef struct {
115 unsigned int run : 1;
116 unsigned int dummy1 : 31;
117} reg_bif_dma_rw_ch0_start;
118#define REG_RD_ADDR_bif_dma_rw_ch0_start 8
119#define REG_WR_ADDR_bif_dma_rw_ch0_start 8
120
121/* Register rw_ch0_cnt, scope bif_dma, type rw */
122typedef struct {
123 unsigned int start_cnt : 16;
124 unsigned int dummy1 : 16;
125} reg_bif_dma_rw_ch0_cnt;
126#define REG_RD_ADDR_bif_dma_rw_ch0_cnt 12
127#define REG_WR_ADDR_bif_dma_rw_ch0_cnt 12
128
129/* Register r_ch0_stat, scope bif_dma, type r */
130typedef struct {
131 unsigned int cnt : 16;
132 unsigned int dummy1 : 15;
133 unsigned int run : 1;
134} reg_bif_dma_r_ch0_stat;
135#define REG_RD_ADDR_bif_dma_r_ch0_stat 16
136
137/* Register rw_ch1_ctrl, scope bif_dma, type rw */
138typedef struct {
139 unsigned int bw : 2;
140 unsigned int burst_len : 1;
141 unsigned int cont : 1;
142 unsigned int end_discard : 1;
143 unsigned int cnt : 1;
144 unsigned int dreq_pin : 3;
145 unsigned int dreq_mode : 2;
146 unsigned int tc_in_pin : 3;
147 unsigned int tc_in_mode : 2;
148 unsigned int bus_mode : 2;
149 unsigned int rate_en : 1;
150 unsigned int dummy1 : 13;
151} reg_bif_dma_rw_ch1_ctrl;
152#define REG_RD_ADDR_bif_dma_rw_ch1_ctrl 32
153#define REG_WR_ADDR_bif_dma_rw_ch1_ctrl 32
154
155/* Register rw_ch1_addr, scope bif_dma, type rw */
156typedef struct {
157 unsigned int addr : 32;
158} reg_bif_dma_rw_ch1_addr;
159#define REG_RD_ADDR_bif_dma_rw_ch1_addr 36
160#define REG_WR_ADDR_bif_dma_rw_ch1_addr 36
161
162/* Register rw_ch1_start, scope bif_dma, type rw */
163typedef struct {
164 unsigned int run : 1;
165 unsigned int dummy1 : 31;
166} reg_bif_dma_rw_ch1_start;
167#define REG_RD_ADDR_bif_dma_rw_ch1_start 40
168#define REG_WR_ADDR_bif_dma_rw_ch1_start 40
169
170/* Register rw_ch1_cnt, scope bif_dma, type rw */
171typedef struct {
172 unsigned int start_cnt : 16;
173 unsigned int dummy1 : 16;
174} reg_bif_dma_rw_ch1_cnt;
175#define REG_RD_ADDR_bif_dma_rw_ch1_cnt 44
176#define REG_WR_ADDR_bif_dma_rw_ch1_cnt 44
177
178/* Register r_ch1_stat, scope bif_dma, type r */
179typedef struct {
180 unsigned int cnt : 16;
181 unsigned int dummy1 : 15;
182 unsigned int run : 1;
183} reg_bif_dma_r_ch1_stat;
184#define REG_RD_ADDR_bif_dma_r_ch1_stat 48
185
186/* Register rw_ch2_ctrl, scope bif_dma, type rw */
187typedef struct {
188 unsigned int bw : 2;
189 unsigned int burst_len : 1;
190 unsigned int cont : 1;
191 unsigned int end_pad : 1;
192 unsigned int cnt : 1;
193 unsigned int dreq_pin : 3;
194 unsigned int dreq_mode : 2;
195 unsigned int tc_in_pin : 3;
196 unsigned int tc_in_mode : 2;
197 unsigned int bus_mode : 2;
198 unsigned int rate_en : 1;
199 unsigned int wr_all : 1;
200 unsigned int dummy1 : 12;
201} reg_bif_dma_rw_ch2_ctrl;
202#define REG_RD_ADDR_bif_dma_rw_ch2_ctrl 64
203#define REG_WR_ADDR_bif_dma_rw_ch2_ctrl 64
204
205/* Register rw_ch2_addr, scope bif_dma, type rw */
206typedef struct {
207 unsigned int addr : 32;
208} reg_bif_dma_rw_ch2_addr;
209#define REG_RD_ADDR_bif_dma_rw_ch2_addr 68
210#define REG_WR_ADDR_bif_dma_rw_ch2_addr 68
211
212/* Register rw_ch2_start, scope bif_dma, type rw */
213typedef struct {
214 unsigned int run : 1;
215 unsigned int dummy1 : 31;
216} reg_bif_dma_rw_ch2_start;
217#define REG_RD_ADDR_bif_dma_rw_ch2_start 72
218#define REG_WR_ADDR_bif_dma_rw_ch2_start 72
219
220/* Register rw_ch2_cnt, scope bif_dma, type rw */
221typedef struct {
222 unsigned int start_cnt : 16;
223 unsigned int dummy1 : 16;
224} reg_bif_dma_rw_ch2_cnt;
225#define REG_RD_ADDR_bif_dma_rw_ch2_cnt 76
226#define REG_WR_ADDR_bif_dma_rw_ch2_cnt 76
227
228/* Register r_ch2_stat, scope bif_dma, type r */
229typedef struct {
230 unsigned int cnt : 16;
231 unsigned int dummy1 : 15;
232 unsigned int run : 1;
233} reg_bif_dma_r_ch2_stat;
234#define REG_RD_ADDR_bif_dma_r_ch2_stat 80
235
236/* Register rw_ch3_ctrl, scope bif_dma, type rw */
237typedef struct {
238 unsigned int bw : 2;
239 unsigned int burst_len : 1;
240 unsigned int cont : 1;
241 unsigned int end_discard : 1;
242 unsigned int cnt : 1;
243 unsigned int dreq_pin : 3;
244 unsigned int dreq_mode : 2;
245 unsigned int tc_in_pin : 3;
246 unsigned int tc_in_mode : 2;
247 unsigned int bus_mode : 2;
248 unsigned int rate_en : 1;
249 unsigned int dummy1 : 13;
250} reg_bif_dma_rw_ch3_ctrl;
251#define REG_RD_ADDR_bif_dma_rw_ch3_ctrl 96
252#define REG_WR_ADDR_bif_dma_rw_ch3_ctrl 96
253
254/* Register rw_ch3_addr, scope bif_dma, type rw */
255typedef struct {
256 unsigned int addr : 32;
257} reg_bif_dma_rw_ch3_addr;
258#define REG_RD_ADDR_bif_dma_rw_ch3_addr 100
259#define REG_WR_ADDR_bif_dma_rw_ch3_addr 100
260
261/* Register rw_ch3_start, scope bif_dma, type rw */
262typedef struct {
263 unsigned int run : 1;
264 unsigned int dummy1 : 31;
265} reg_bif_dma_rw_ch3_start;
266#define REG_RD_ADDR_bif_dma_rw_ch3_start 104
267#define REG_WR_ADDR_bif_dma_rw_ch3_start 104
268
269/* Register rw_ch3_cnt, scope bif_dma, type rw */
270typedef struct {
271 unsigned int start_cnt : 16;
272 unsigned int dummy1 : 16;
273} reg_bif_dma_rw_ch3_cnt;
274#define REG_RD_ADDR_bif_dma_rw_ch3_cnt 108
275#define REG_WR_ADDR_bif_dma_rw_ch3_cnt 108
276
277/* Register r_ch3_stat, scope bif_dma, type r */
278typedef struct {
279 unsigned int cnt : 16;
280 unsigned int dummy1 : 15;
281 unsigned int run : 1;
282} reg_bif_dma_r_ch3_stat;
283#define REG_RD_ADDR_bif_dma_r_ch3_stat 112
284
285/* Register rw_intr_mask, scope bif_dma, type rw */
286typedef struct {
287 unsigned int ext_dma0 : 1;
288 unsigned int ext_dma1 : 1;
289 unsigned int ext_dma2 : 1;
290 unsigned int ext_dma3 : 1;
291 unsigned int dummy1 : 28;
292} reg_bif_dma_rw_intr_mask;
293#define REG_RD_ADDR_bif_dma_rw_intr_mask 128
294#define REG_WR_ADDR_bif_dma_rw_intr_mask 128
295
296/* Register rw_ack_intr, scope bif_dma, type rw */
297typedef struct {
298 unsigned int ext_dma0 : 1;
299 unsigned int ext_dma1 : 1;
300 unsigned int ext_dma2 : 1;
301 unsigned int ext_dma3 : 1;
302 unsigned int dummy1 : 28;
303} reg_bif_dma_rw_ack_intr;
304#define REG_RD_ADDR_bif_dma_rw_ack_intr 132
305#define REG_WR_ADDR_bif_dma_rw_ack_intr 132
306
307/* Register r_intr, scope bif_dma, type r */
308typedef struct {
309 unsigned int ext_dma0 : 1;
310 unsigned int ext_dma1 : 1;
311 unsigned int ext_dma2 : 1;
312 unsigned int ext_dma3 : 1;
313 unsigned int dummy1 : 28;
314} reg_bif_dma_r_intr;
315#define REG_RD_ADDR_bif_dma_r_intr 136
316
317/* Register r_masked_intr, scope bif_dma, type r */
318typedef struct {
319 unsigned int ext_dma0 : 1;
320 unsigned int ext_dma1 : 1;
321 unsigned int ext_dma2 : 1;
322 unsigned int ext_dma3 : 1;
323 unsigned int dummy1 : 28;
324} reg_bif_dma_r_masked_intr;
325#define REG_RD_ADDR_bif_dma_r_masked_intr 140
326
327/* Register rw_pin0_cfg, scope bif_dma, type rw */
328typedef struct {
329 unsigned int master_ch : 2;
330 unsigned int master_mode : 3;
331 unsigned int slave_ch : 2;
332 unsigned int slave_mode : 3;
333 unsigned int dummy1 : 22;
334} reg_bif_dma_rw_pin0_cfg;
335#define REG_RD_ADDR_bif_dma_rw_pin0_cfg 160
336#define REG_WR_ADDR_bif_dma_rw_pin0_cfg 160
337
338/* Register rw_pin1_cfg, scope bif_dma, type rw */
339typedef struct {
340 unsigned int master_ch : 2;
341 unsigned int master_mode : 3;
342 unsigned int slave_ch : 2;
343 unsigned int slave_mode : 3;
344 unsigned int dummy1 : 22;
345} reg_bif_dma_rw_pin1_cfg;
346#define REG_RD_ADDR_bif_dma_rw_pin1_cfg 164
347#define REG_WR_ADDR_bif_dma_rw_pin1_cfg 164
348
349/* Register rw_pin2_cfg, scope bif_dma, type rw */
350typedef struct {
351 unsigned int master_ch : 2;
352 unsigned int master_mode : 3;
353 unsigned int slave_ch : 2;
354 unsigned int slave_mode : 3;
355 unsigned int dummy1 : 22;
356} reg_bif_dma_rw_pin2_cfg;
357#define REG_RD_ADDR_bif_dma_rw_pin2_cfg 168
358#define REG_WR_ADDR_bif_dma_rw_pin2_cfg 168
359
360/* Register rw_pin3_cfg, scope bif_dma, type rw */
361typedef struct {
362 unsigned int master_ch : 2;
363 unsigned int master_mode : 3;
364 unsigned int slave_ch : 2;
365 unsigned int slave_mode : 3;
366 unsigned int dummy1 : 22;
367} reg_bif_dma_rw_pin3_cfg;
368#define REG_RD_ADDR_bif_dma_rw_pin3_cfg 172
369#define REG_WR_ADDR_bif_dma_rw_pin3_cfg 172
370
371/* Register rw_pin4_cfg, scope bif_dma, type rw */
372typedef struct {
373 unsigned int master_ch : 2;
374 unsigned int master_mode : 3;
375 unsigned int slave_ch : 2;
376 unsigned int slave_mode : 3;
377 unsigned int dummy1 : 22;
378} reg_bif_dma_rw_pin4_cfg;
379#define REG_RD_ADDR_bif_dma_rw_pin4_cfg 176
380#define REG_WR_ADDR_bif_dma_rw_pin4_cfg 176
381
382/* Register rw_pin5_cfg, scope bif_dma, type rw */
383typedef struct {
384 unsigned int master_ch : 2;
385 unsigned int master_mode : 3;
386 unsigned int slave_ch : 2;
387 unsigned int slave_mode : 3;
388 unsigned int dummy1 : 22;
389} reg_bif_dma_rw_pin5_cfg;
390#define REG_RD_ADDR_bif_dma_rw_pin5_cfg 180
391#define REG_WR_ADDR_bif_dma_rw_pin5_cfg 180
392
393/* Register rw_pin6_cfg, scope bif_dma, type rw */
394typedef struct {
395 unsigned int master_ch : 2;
396 unsigned int master_mode : 3;
397 unsigned int slave_ch : 2;
398 unsigned int slave_mode : 3;
399 unsigned int dummy1 : 22;
400} reg_bif_dma_rw_pin6_cfg;
401#define REG_RD_ADDR_bif_dma_rw_pin6_cfg 184
402#define REG_WR_ADDR_bif_dma_rw_pin6_cfg 184
403
404/* Register rw_pin7_cfg, scope bif_dma, type rw */
405typedef struct {
406 unsigned int master_ch : 2;
407 unsigned int master_mode : 3;
408 unsigned int slave_ch : 2;
409 unsigned int slave_mode : 3;
410 unsigned int dummy1 : 22;
411} reg_bif_dma_rw_pin7_cfg;
412#define REG_RD_ADDR_bif_dma_rw_pin7_cfg 188
413#define REG_WR_ADDR_bif_dma_rw_pin7_cfg 188
414
415/* Register r_pin_stat, scope bif_dma, type r */
416typedef struct {
417 unsigned int pin0 : 1;
418 unsigned int pin1 : 1;
419 unsigned int pin2 : 1;
420 unsigned int pin3 : 1;
421 unsigned int pin4 : 1;
422 unsigned int pin5 : 1;
423 unsigned int pin6 : 1;
424 unsigned int pin7 : 1;
425 unsigned int dummy1 : 24;
426} reg_bif_dma_r_pin_stat;
427#define REG_RD_ADDR_bif_dma_r_pin_stat 192
428
429
430/* Constants */
431enum {
432 regk_bif_dma_as_master = 0x00000001,
433 regk_bif_dma_as_slave = 0x00000001,
434 regk_bif_dma_burst1 = 0x00000000,
435 regk_bif_dma_burst8 = 0x00000001,
436 regk_bif_dma_bw16 = 0x00000001,
437 regk_bif_dma_bw32 = 0x00000002,
438 regk_bif_dma_bw8 = 0x00000000,
439 regk_bif_dma_dack = 0x00000006,
440 regk_bif_dma_dack_inv = 0x00000007,
441 regk_bif_dma_force = 0x00000001,
442 regk_bif_dma_hi = 0x00000003,
443 regk_bif_dma_inv = 0x00000003,
444 regk_bif_dma_lo = 0x00000002,
445 regk_bif_dma_master = 0x00000001,
446 regk_bif_dma_no = 0x00000000,
447 regk_bif_dma_norm = 0x00000002,
448 regk_bif_dma_off = 0x00000000,
449 regk_bif_dma_rw_ch0_ctrl_default = 0x00000000,
450 regk_bif_dma_rw_ch0_start_default = 0x00000000,
451 regk_bif_dma_rw_ch1_ctrl_default = 0x00000000,
452 regk_bif_dma_rw_ch1_start_default = 0x00000000,
453 regk_bif_dma_rw_ch2_ctrl_default = 0x00000000,
454 regk_bif_dma_rw_ch2_start_default = 0x00000000,
455 regk_bif_dma_rw_ch3_ctrl_default = 0x00000000,
456 regk_bif_dma_rw_ch3_start_default = 0x00000000,
457 regk_bif_dma_rw_intr_mask_default = 0x00000000,
458 regk_bif_dma_rw_pin0_cfg_default = 0x00000000,
459 regk_bif_dma_rw_pin1_cfg_default = 0x00000000,
460 regk_bif_dma_rw_pin2_cfg_default = 0x00000000,
461 regk_bif_dma_rw_pin3_cfg_default = 0x00000000,
462 regk_bif_dma_rw_pin4_cfg_default = 0x00000000,
463 regk_bif_dma_rw_pin5_cfg_default = 0x00000000,
464 regk_bif_dma_rw_pin6_cfg_default = 0x00000000,
465 regk_bif_dma_rw_pin7_cfg_default = 0x00000000,
466 regk_bif_dma_slave = 0x00000002,
467 regk_bif_dma_sreq = 0x00000006,
468 regk_bif_dma_sreq_inv = 0x00000007,
469 regk_bif_dma_tc = 0x00000004,
470 regk_bif_dma_tc_inv = 0x00000005,
471 regk_bif_dma_yes = 0x00000001
472};
473#endif /* __bif_dma_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/bif_slave_defs.h b/include/asm-cris/arch-v32/hwregs/bif_slave_defs.h
deleted file mode 100644
index d18fc3c9f569..000000000000
--- a/include/asm-cris/arch-v32/hwregs/bif_slave_defs.h
+++ /dev/null
@@ -1,249 +0,0 @@
1#ifndef __bif_slave_defs_h
2#define __bif_slave_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_slave_regs.r
7 * id: bif_slave_regs.r,v 1.5 2005/02/04 13:55:28 perz Exp
8 * last modfied: Mon Apr 11 16:06:34 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_slave_defs.h ../../inst/bif/rtl/bif_slave_regs.r
11 * id: $Id: bif_slave_defs.h,v 1.2 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope bif_slave */
86
87/* Register rw_slave_cfg, scope bif_slave, type rw */
88typedef struct {
89 unsigned int slave_id : 3;
90 unsigned int use_slave_id : 1;
91 unsigned int boot_rdy : 1;
92 unsigned int loopback : 1;
93 unsigned int dis : 1;
94 unsigned int dummy1 : 25;
95} reg_bif_slave_rw_slave_cfg;
96#define REG_RD_ADDR_bif_slave_rw_slave_cfg 0
97#define REG_WR_ADDR_bif_slave_rw_slave_cfg 0
98
99/* Register r_slave_mode, scope bif_slave, type r */
100typedef struct {
101 unsigned int ch0_mode : 1;
102 unsigned int ch1_mode : 1;
103 unsigned int ch2_mode : 1;
104 unsigned int ch3_mode : 1;
105 unsigned int dummy1 : 28;
106} reg_bif_slave_r_slave_mode;
107#define REG_RD_ADDR_bif_slave_r_slave_mode 4
108
109/* Register rw_ch0_cfg, scope bif_slave, type rw */
110typedef struct {
111 unsigned int rd_hold : 2;
112 unsigned int access_mode : 1;
113 unsigned int access_ctrl : 1;
114 unsigned int data_cs : 2;
115 unsigned int dummy1 : 26;
116} reg_bif_slave_rw_ch0_cfg;
117#define REG_RD_ADDR_bif_slave_rw_ch0_cfg 16
118#define REG_WR_ADDR_bif_slave_rw_ch0_cfg 16
119
120/* Register rw_ch1_cfg, scope bif_slave, type rw */
121typedef struct {
122 unsigned int rd_hold : 2;
123 unsigned int access_mode : 1;
124 unsigned int access_ctrl : 1;
125 unsigned int data_cs : 2;
126 unsigned int dummy1 : 26;
127} reg_bif_slave_rw_ch1_cfg;
128#define REG_RD_ADDR_bif_slave_rw_ch1_cfg 20
129#define REG_WR_ADDR_bif_slave_rw_ch1_cfg 20
130
131/* Register rw_ch2_cfg, scope bif_slave, type rw */
132typedef struct {
133 unsigned int rd_hold : 2;
134 unsigned int access_mode : 1;
135 unsigned int access_ctrl : 1;
136 unsigned int data_cs : 2;
137 unsigned int dummy1 : 26;
138} reg_bif_slave_rw_ch2_cfg;
139#define REG_RD_ADDR_bif_slave_rw_ch2_cfg 24
140#define REG_WR_ADDR_bif_slave_rw_ch2_cfg 24
141
142/* Register rw_ch3_cfg, scope bif_slave, type rw */
143typedef struct {
144 unsigned int rd_hold : 2;
145 unsigned int access_mode : 1;
146 unsigned int access_ctrl : 1;
147 unsigned int data_cs : 2;
148 unsigned int dummy1 : 26;
149} reg_bif_slave_rw_ch3_cfg;
150#define REG_RD_ADDR_bif_slave_rw_ch3_cfg 28
151#define REG_WR_ADDR_bif_slave_rw_ch3_cfg 28
152
153/* Register rw_arb_cfg, scope bif_slave, type rw */
154typedef struct {
155 unsigned int brin_mode : 1;
156 unsigned int brout_mode : 3;
157 unsigned int bg_mode : 3;
158 unsigned int release : 2;
159 unsigned int acquire : 1;
160 unsigned int settle_time : 2;
161 unsigned int dram_ctrl : 1;
162 unsigned int dummy1 : 19;
163} reg_bif_slave_rw_arb_cfg;
164#define REG_RD_ADDR_bif_slave_rw_arb_cfg 32
165#define REG_WR_ADDR_bif_slave_rw_arb_cfg 32
166
167/* Register r_arb_stat, scope bif_slave, type r */
168typedef struct {
169 unsigned int init_mode : 1;
170 unsigned int mode : 1;
171 unsigned int brin : 1;
172 unsigned int brout : 1;
173 unsigned int bg : 1;
174 unsigned int dummy1 : 27;
175} reg_bif_slave_r_arb_stat;
176#define REG_RD_ADDR_bif_slave_r_arb_stat 36
177
178/* Register rw_intr_mask, scope bif_slave, type rw */
179typedef struct {
180 unsigned int bus_release : 1;
181 unsigned int bus_acquire : 1;
182 unsigned int dummy1 : 30;
183} reg_bif_slave_rw_intr_mask;
184#define REG_RD_ADDR_bif_slave_rw_intr_mask 64
185#define REG_WR_ADDR_bif_slave_rw_intr_mask 64
186
187/* Register rw_ack_intr, scope bif_slave, type rw */
188typedef struct {
189 unsigned int bus_release : 1;
190 unsigned int bus_acquire : 1;
191 unsigned int dummy1 : 30;
192} reg_bif_slave_rw_ack_intr;
193#define REG_RD_ADDR_bif_slave_rw_ack_intr 68
194#define REG_WR_ADDR_bif_slave_rw_ack_intr 68
195
196/* Register r_intr, scope bif_slave, type r */
197typedef struct {
198 unsigned int bus_release : 1;
199 unsigned int bus_acquire : 1;
200 unsigned int dummy1 : 30;
201} reg_bif_slave_r_intr;
202#define REG_RD_ADDR_bif_slave_r_intr 72
203
204/* Register r_masked_intr, scope bif_slave, type r */
205typedef struct {
206 unsigned int bus_release : 1;
207 unsigned int bus_acquire : 1;
208 unsigned int dummy1 : 30;
209} reg_bif_slave_r_masked_intr;
210#define REG_RD_ADDR_bif_slave_r_masked_intr 76
211
212
213/* Constants */
214enum {
215 regk_bif_slave_active_hi = 0x00000003,
216 regk_bif_slave_active_lo = 0x00000002,
217 regk_bif_slave_addr = 0x00000000,
218 regk_bif_slave_always = 0x00000001,
219 regk_bif_slave_at_idle = 0x00000002,
220 regk_bif_slave_burst_end = 0x00000003,
221 regk_bif_slave_dma = 0x00000001,
222 regk_bif_slave_hi = 0x00000003,
223 regk_bif_slave_inv = 0x00000001,
224 regk_bif_slave_lo = 0x00000002,
225 regk_bif_slave_local = 0x00000001,
226 regk_bif_slave_master = 0x00000000,
227 regk_bif_slave_mode_reg = 0x00000001,
228 regk_bif_slave_no = 0x00000000,
229 regk_bif_slave_norm = 0x00000000,
230 regk_bif_slave_on_access = 0x00000000,
231 regk_bif_slave_rw_arb_cfg_default = 0x00000000,
232 regk_bif_slave_rw_ch0_cfg_default = 0x00000000,
233 regk_bif_slave_rw_ch1_cfg_default = 0x00000000,
234 regk_bif_slave_rw_ch2_cfg_default = 0x00000000,
235 regk_bif_slave_rw_ch3_cfg_default = 0x00000000,
236 regk_bif_slave_rw_intr_mask_default = 0x00000000,
237 regk_bif_slave_rw_slave_cfg_default = 0x00000000,
238 regk_bif_slave_shared = 0x00000000,
239 regk_bif_slave_slave = 0x00000001,
240 regk_bif_slave_t0ns = 0x00000003,
241 regk_bif_slave_t10ns = 0x00000002,
242 regk_bif_slave_t20ns = 0x00000003,
243 regk_bif_slave_t30ns = 0x00000002,
244 regk_bif_slave_t40ns = 0x00000001,
245 regk_bif_slave_t50ns = 0x00000000,
246 regk_bif_slave_yes = 0x00000001,
247 regk_bif_slave_z = 0x00000004
248};
249#endif /* __bif_slave_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/config_defs.h b/include/asm-cris/arch-v32/hwregs/config_defs.h
deleted file mode 100644
index 45457a4e3817..000000000000
--- a/include/asm-cris/arch-v32/hwregs/config_defs.h
+++ /dev/null
@@ -1,142 +0,0 @@
1#ifndef __config_defs_h
2#define __config_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../rtl/config_regs.r
7 * id: config_regs.r,v 1.23 2004/03/04 11:34:42 mikaeln Exp
8 * last modfied: Thu Mar 4 12:34:39 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile config_defs.h ../../rtl/config_regs.r
11 * id: $Id: config_defs.h,v 1.6 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope config */
86
87/* Register r_bootsel, scope config, type r */
88typedef struct {
89 unsigned int boot_mode : 3;
90 unsigned int full_duplex : 1;
91 unsigned int user : 1;
92 unsigned int pll : 1;
93 unsigned int flash_bw : 1;
94 unsigned int dummy1 : 25;
95} reg_config_r_bootsel;
96#define REG_RD_ADDR_config_r_bootsel 0
97
98/* Register rw_clk_ctrl, scope config, type rw */
99typedef struct {
100 unsigned int pll : 1;
101 unsigned int cpu : 1;
102 unsigned int iop : 1;
103 unsigned int dma01_eth0 : 1;
104 unsigned int dma23 : 1;
105 unsigned int dma45 : 1;
106 unsigned int dma67 : 1;
107 unsigned int dma89_strcop : 1;
108 unsigned int bif : 1;
109 unsigned int fix_io : 1;
110 unsigned int dummy1 : 22;
111} reg_config_rw_clk_ctrl;
112#define REG_RD_ADDR_config_rw_clk_ctrl 4
113#define REG_WR_ADDR_config_rw_clk_ctrl 4
114
115/* Register rw_pad_ctrl, scope config, type rw */
116typedef struct {
117 unsigned int usb_susp : 1;
118 unsigned int phyrst_n : 1;
119 unsigned int dummy1 : 30;
120} reg_config_rw_pad_ctrl;
121#define REG_RD_ADDR_config_rw_pad_ctrl 8
122#define REG_WR_ADDR_config_rw_pad_ctrl 8
123
124
125/* Constants */
126enum {
127 regk_config_bw16 = 0x00000000,
128 regk_config_bw32 = 0x00000001,
129 regk_config_master = 0x00000005,
130 regk_config_nand = 0x00000003,
131 regk_config_net_rx = 0x00000001,
132 regk_config_net_tx_rx = 0x00000002,
133 regk_config_no = 0x00000000,
134 regk_config_none = 0x00000007,
135 regk_config_nor = 0x00000000,
136 regk_config_rw_clk_ctrl_default = 0x00000002,
137 regk_config_rw_pad_ctrl_default = 0x00000000,
138 regk_config_ser = 0x00000004,
139 regk_config_slave = 0x00000006,
140 regk_config_yes = 0x00000001
141};
142#endif /* __config_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/cpu_vect.h b/include/asm-cris/arch-v32/hwregs/cpu_vect.h
deleted file mode 100644
index 8370aee8a14a..000000000000
--- a/include/asm-cris/arch-v32/hwregs/cpu_vect.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
2 from ../../inst/crisp/doc/cpu_vect.r
3version . */
4
5#ifndef _______INST_CRISP_DOC_CPU_VECT_R
6#define _______INST_CRISP_DOC_CPU_VECT_R
7#define NMI_INTR_VECT 0x00
8#define RESERVED_1_INTR_VECT 0x01
9#define RESERVED_2_INTR_VECT 0x02
10#define SINGLE_STEP_INTR_VECT 0x03
11#define INSTR_TLB_REFILL_INTR_VECT 0x04
12#define INSTR_TLB_INV_INTR_VECT 0x05
13#define INSTR_TLB_ACC_INTR_VECT 0x06
14#define TLB_EX_INTR_VECT 0x07
15#define DATA_TLB_REFILL_INTR_VECT 0x08
16#define DATA_TLB_INV_INTR_VECT 0x09
17#define DATA_TLB_ACC_INTR_VECT 0x0a
18#define DATA_TLB_WE_INTR_VECT 0x0b
19#define HW_BP_INTR_VECT 0x0c
20#define RESERVED_D_INTR_VECT 0x0d
21#define RESERVED_E_INTR_VECT 0x0e
22#define RESERVED_F_INTR_VECT 0x0f
23#define BREAK_0_INTR_VECT 0x10
24#define BREAK_1_INTR_VECT 0x11
25#define BREAK_2_INTR_VECT 0x12
26#define BREAK_3_INTR_VECT 0x13
27#define BREAK_4_INTR_VECT 0x14
28#define BREAK_5_INTR_VECT 0x15
29#define BREAK_6_INTR_VECT 0x16
30#define BREAK_7_INTR_VECT 0x17
31#define BREAK_8_INTR_VECT 0x18
32#define BREAK_9_INTR_VECT 0x19
33#define BREAK_10_INTR_VECT 0x1a
34#define BREAK_11_INTR_VECT 0x1b
35#define BREAK_12_INTR_VECT 0x1c
36#define BREAK_13_INTR_VECT 0x1d
37#define BREAK_14_INTR_VECT 0x1e
38#define BREAK_15_INTR_VECT 0x1f
39#define MULTIPLE_INTR_VECT 0x30
40
41#endif
diff --git a/include/asm-cris/arch-v32/hwregs/dma.h b/include/asm-cris/arch-v32/hwregs/dma.h
deleted file mode 100644
index 3ce322b5c731..000000000000
--- a/include/asm-cris/arch-v32/hwregs/dma.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * DMA C definitions and help macros
3 *
4 */
5
6#ifndef dma_h
7#define dma_h
8
9/* registers */ /* Really needed, since both are listed in sw.list? */
10#include "dma_defs.h"
11
12
13/* descriptors */
14
15// ------------------------------------------------------------ dma_descr_group
16typedef struct dma_descr_group {
17 struct dma_descr_group *next;
18 unsigned eol : 1;
19 unsigned tol : 1;
20 unsigned bol : 1;
21 unsigned : 1;
22 unsigned intr : 1;
23 unsigned : 2;
24 unsigned en : 1;
25 unsigned : 7;
26 unsigned dis : 1;
27 unsigned md : 16;
28 struct dma_descr_group *up;
29 union {
30 struct dma_descr_context *context;
31 struct dma_descr_group *group;
32 } down;
33} dma_descr_group;
34
35// ---------------------------------------------------------- dma_descr_context
36typedef struct dma_descr_context {
37 struct dma_descr_context *next;
38 unsigned eol : 1;
39 unsigned : 3;
40 unsigned intr : 1;
41 unsigned : 1;
42 unsigned store_mode : 1;
43 unsigned en : 1;
44 unsigned : 7;
45 unsigned dis : 1;
46 unsigned md0 : 16;
47 unsigned md1;
48 unsigned md2;
49 unsigned md3;
50 unsigned md4;
51 struct dma_descr_data *saved_data;
52 char *saved_data_buf;
53} dma_descr_context;
54
55// ------------------------------------------------------------- dma_descr_data
56typedef struct dma_descr_data {
57 struct dma_descr_data *next;
58 char *buf;
59 unsigned eol : 1;
60 unsigned : 2;
61 unsigned out_eop : 1;
62 unsigned intr : 1;
63 unsigned wait : 1;
64 unsigned : 2;
65 unsigned : 3;
66 unsigned in_eop : 1;
67 unsigned : 4;
68 unsigned md : 16;
69 char *after;
70} dma_descr_data;
71
72// --------------------------------------------------------------------- macros
73
74// enable DMA channel
75#define DMA_ENABLE( inst ) \
76 do { reg_dma_rw_cfg e = REG_RD( dma, inst, rw_cfg );\
77 e.en = regk_dma_yes; \
78 REG_WR( dma, inst, rw_cfg, e); } while( 0 )
79
80// reset DMA channel
81#define DMA_RESET( inst ) \
82 do { reg_dma_rw_cfg r = REG_RD( dma, inst, rw_cfg );\
83 r.en = regk_dma_no; \
84 REG_WR( dma, inst, rw_cfg, r); } while( 0 )
85
86// stop DMA channel
87#define DMA_STOP( inst ) \
88 do { reg_dma_rw_cfg s = REG_RD( dma, inst, rw_cfg );\
89 s.stop = regk_dma_yes; \
90 REG_WR( dma, inst, rw_cfg, s); } while( 0 )
91
92// continue DMA channel operation
93#define DMA_CONTINUE( inst ) \
94 do { reg_dma_rw_cfg c = REG_RD( dma, inst, rw_cfg );\
95 c.stop = regk_dma_no; \
96 REG_WR( dma, inst, rw_cfg, c); } while( 0 )
97
98// give stream command
99#define DMA_WR_CMD( inst, cmd_par ) \
100 do { reg_dma_rw_stream_cmd __x = {0}; \
101 do { __x = REG_RD(dma, inst, rw_stream_cmd); } while (__x.busy); \
102 __x.cmd = (cmd_par); \
103 REG_WR(dma, inst, rw_stream_cmd, __x); \
104 } while (0)
105
106// load: g,c,d:burst
107#define DMA_START_GROUP( inst, group_descr ) \
108 do { REG_WR_INT( dma, inst, rw_group, (int) group_descr ); \
109 DMA_WR_CMD( inst, regk_dma_load_g ); \
110 DMA_WR_CMD( inst, regk_dma_load_c ); \
111 DMA_WR_CMD( inst, regk_dma_load_d | regk_dma_burst ); \
112 } while( 0 )
113
114// load: c,d:burst
115#define DMA_START_CONTEXT( inst, ctx_descr ) \
116 do { REG_WR_INT( dma, inst, rw_group_down, (int) ctx_descr ); \
117 DMA_WR_CMD( inst, regk_dma_load_c ); \
118 DMA_WR_CMD( inst, regk_dma_load_d | regk_dma_burst ); \
119 } while( 0 )
120
121// if the DMA is at the end of the data list, the last data descr is reloaded
122#define DMA_CONTINUE_DATA( inst ) \
123do { reg_dma_rw_cmd c = {0}; \
124 c.cont_data = regk_dma_yes;\
125 REG_WR( dma, inst, rw_cmd, c ); } while( 0 )
126
127#endif
diff --git a/include/asm-cris/arch-v32/hwregs/dma_defs.h b/include/asm-cris/arch-v32/hwregs/dma_defs.h
deleted file mode 100644
index 48ac8cef7ebe..000000000000
--- a/include/asm-cris/arch-v32/hwregs/dma_defs.h
+++ /dev/null
@@ -1,436 +0,0 @@
1#ifndef __dma_defs_h
2#define __dma_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/dma/inst/dma_common/rtl/dma_regdes.r
7 * id: dma_regdes.r,v 1.39 2005/02/10 14:07:23 janb Exp
8 * last modfied: Mon Apr 11 16:06:51 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile dma_defs.h ../../inst/dma/inst/dma_common/rtl/dma_regdes.r
11 * id: $Id: dma_defs.h,v 1.7 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope dma */
86
87/* Register rw_data, scope dma, type rw */
88typedef unsigned int reg_dma_rw_data;
89#define REG_RD_ADDR_dma_rw_data 0
90#define REG_WR_ADDR_dma_rw_data 0
91
92/* Register rw_data_next, scope dma, type rw */
93typedef unsigned int reg_dma_rw_data_next;
94#define REG_RD_ADDR_dma_rw_data_next 4
95#define REG_WR_ADDR_dma_rw_data_next 4
96
97/* Register rw_data_buf, scope dma, type rw */
98typedef unsigned int reg_dma_rw_data_buf;
99#define REG_RD_ADDR_dma_rw_data_buf 8
100#define REG_WR_ADDR_dma_rw_data_buf 8
101
102/* Register rw_data_ctrl, scope dma, type rw */
103typedef struct {
104 unsigned int eol : 1;
105 unsigned int dummy1 : 2;
106 unsigned int out_eop : 1;
107 unsigned int intr : 1;
108 unsigned int wait : 1;
109 unsigned int dummy2 : 26;
110} reg_dma_rw_data_ctrl;
111#define REG_RD_ADDR_dma_rw_data_ctrl 12
112#define REG_WR_ADDR_dma_rw_data_ctrl 12
113
114/* Register rw_data_stat, scope dma, type rw */
115typedef struct {
116 unsigned int dummy1 : 3;
117 unsigned int in_eop : 1;
118 unsigned int dummy2 : 28;
119} reg_dma_rw_data_stat;
120#define REG_RD_ADDR_dma_rw_data_stat 16
121#define REG_WR_ADDR_dma_rw_data_stat 16
122
123/* Register rw_data_md, scope dma, type rw */
124typedef struct {
125 unsigned int md : 16;
126 unsigned int dummy1 : 16;
127} reg_dma_rw_data_md;
128#define REG_RD_ADDR_dma_rw_data_md 20
129#define REG_WR_ADDR_dma_rw_data_md 20
130
131/* Register rw_data_md_s, scope dma, type rw */
132typedef struct {
133 unsigned int md_s : 16;
134 unsigned int dummy1 : 16;
135} reg_dma_rw_data_md_s;
136#define REG_RD_ADDR_dma_rw_data_md_s 24
137#define REG_WR_ADDR_dma_rw_data_md_s 24
138
139/* Register rw_data_after, scope dma, type rw */
140typedef unsigned int reg_dma_rw_data_after;
141#define REG_RD_ADDR_dma_rw_data_after 28
142#define REG_WR_ADDR_dma_rw_data_after 28
143
144/* Register rw_ctxt, scope dma, type rw */
145typedef unsigned int reg_dma_rw_ctxt;
146#define REG_RD_ADDR_dma_rw_ctxt 32
147#define REG_WR_ADDR_dma_rw_ctxt 32
148
149/* Register rw_ctxt_next, scope dma, type rw */
150typedef unsigned int reg_dma_rw_ctxt_next;
151#define REG_RD_ADDR_dma_rw_ctxt_next 36
152#define REG_WR_ADDR_dma_rw_ctxt_next 36
153
154/* Register rw_ctxt_ctrl, scope dma, type rw */
155typedef struct {
156 unsigned int eol : 1;
157 unsigned int dummy1 : 3;
158 unsigned int intr : 1;
159 unsigned int dummy2 : 1;
160 unsigned int store_mode : 1;
161 unsigned int en : 1;
162 unsigned int dummy3 : 24;
163} reg_dma_rw_ctxt_ctrl;
164#define REG_RD_ADDR_dma_rw_ctxt_ctrl 40
165#define REG_WR_ADDR_dma_rw_ctxt_ctrl 40
166
167/* Register rw_ctxt_stat, scope dma, type rw */
168typedef struct {
169 unsigned int dummy1 : 7;
170 unsigned int dis : 1;
171 unsigned int dummy2 : 24;
172} reg_dma_rw_ctxt_stat;
173#define REG_RD_ADDR_dma_rw_ctxt_stat 44
174#define REG_WR_ADDR_dma_rw_ctxt_stat 44
175
176/* Register rw_ctxt_md0, scope dma, type rw */
177typedef struct {
178 unsigned int md0 : 16;
179 unsigned int dummy1 : 16;
180} reg_dma_rw_ctxt_md0;
181#define REG_RD_ADDR_dma_rw_ctxt_md0 48
182#define REG_WR_ADDR_dma_rw_ctxt_md0 48
183
184/* Register rw_ctxt_md0_s, scope dma, type rw */
185typedef struct {
186 unsigned int md0_s : 16;
187 unsigned int dummy1 : 16;
188} reg_dma_rw_ctxt_md0_s;
189#define REG_RD_ADDR_dma_rw_ctxt_md0_s 52
190#define REG_WR_ADDR_dma_rw_ctxt_md0_s 52
191
192/* Register rw_ctxt_md1, scope dma, type rw */
193typedef unsigned int reg_dma_rw_ctxt_md1;
194#define REG_RD_ADDR_dma_rw_ctxt_md1 56
195#define REG_WR_ADDR_dma_rw_ctxt_md1 56
196
197/* Register rw_ctxt_md1_s, scope dma, type rw */
198typedef unsigned int reg_dma_rw_ctxt_md1_s;
199#define REG_RD_ADDR_dma_rw_ctxt_md1_s 60
200#define REG_WR_ADDR_dma_rw_ctxt_md1_s 60
201
202/* Register rw_ctxt_md2, scope dma, type rw */
203typedef unsigned int reg_dma_rw_ctxt_md2;
204#define REG_RD_ADDR_dma_rw_ctxt_md2 64
205#define REG_WR_ADDR_dma_rw_ctxt_md2 64
206
207/* Register rw_ctxt_md2_s, scope dma, type rw */
208typedef unsigned int reg_dma_rw_ctxt_md2_s;
209#define REG_RD_ADDR_dma_rw_ctxt_md2_s 68
210#define REG_WR_ADDR_dma_rw_ctxt_md2_s 68
211
212/* Register rw_ctxt_md3, scope dma, type rw */
213typedef unsigned int reg_dma_rw_ctxt_md3;
214#define REG_RD_ADDR_dma_rw_ctxt_md3 72
215#define REG_WR_ADDR_dma_rw_ctxt_md3 72
216
217/* Register rw_ctxt_md3_s, scope dma, type rw */
218typedef unsigned int reg_dma_rw_ctxt_md3_s;
219#define REG_RD_ADDR_dma_rw_ctxt_md3_s 76
220#define REG_WR_ADDR_dma_rw_ctxt_md3_s 76
221
222/* Register rw_ctxt_md4, scope dma, type rw */
223typedef unsigned int reg_dma_rw_ctxt_md4;
224#define REG_RD_ADDR_dma_rw_ctxt_md4 80
225#define REG_WR_ADDR_dma_rw_ctxt_md4 80
226
227/* Register rw_ctxt_md4_s, scope dma, type rw */
228typedef unsigned int reg_dma_rw_ctxt_md4_s;
229#define REG_RD_ADDR_dma_rw_ctxt_md4_s 84
230#define REG_WR_ADDR_dma_rw_ctxt_md4_s 84
231
232/* Register rw_saved_data, scope dma, type rw */
233typedef unsigned int reg_dma_rw_saved_data;
234#define REG_RD_ADDR_dma_rw_saved_data 88
235#define REG_WR_ADDR_dma_rw_saved_data 88
236
237/* Register rw_saved_data_buf, scope dma, type rw */
238typedef unsigned int reg_dma_rw_saved_data_buf;
239#define REG_RD_ADDR_dma_rw_saved_data_buf 92
240#define REG_WR_ADDR_dma_rw_saved_data_buf 92
241
242/* Register rw_group, scope dma, type rw */
243typedef unsigned int reg_dma_rw_group;
244#define REG_RD_ADDR_dma_rw_group 96
245#define REG_WR_ADDR_dma_rw_group 96
246
247/* Register rw_group_next, scope dma, type rw */
248typedef unsigned int reg_dma_rw_group_next;
249#define REG_RD_ADDR_dma_rw_group_next 100
250#define REG_WR_ADDR_dma_rw_group_next 100
251
252/* Register rw_group_ctrl, scope dma, type rw */
253typedef struct {
254 unsigned int eol : 1;
255 unsigned int tol : 1;
256 unsigned int bol : 1;
257 unsigned int dummy1 : 1;
258 unsigned int intr : 1;
259 unsigned int dummy2 : 2;
260 unsigned int en : 1;
261 unsigned int dummy3 : 24;
262} reg_dma_rw_group_ctrl;
263#define REG_RD_ADDR_dma_rw_group_ctrl 104
264#define REG_WR_ADDR_dma_rw_group_ctrl 104
265
266/* Register rw_group_stat, scope dma, type rw */
267typedef struct {
268 unsigned int dummy1 : 7;
269 unsigned int dis : 1;
270 unsigned int dummy2 : 24;
271} reg_dma_rw_group_stat;
272#define REG_RD_ADDR_dma_rw_group_stat 108
273#define REG_WR_ADDR_dma_rw_group_stat 108
274
275/* Register rw_group_md, scope dma, type rw */
276typedef struct {
277 unsigned int md : 16;
278 unsigned int dummy1 : 16;
279} reg_dma_rw_group_md;
280#define REG_RD_ADDR_dma_rw_group_md 112
281#define REG_WR_ADDR_dma_rw_group_md 112
282
283/* Register rw_group_md_s, scope dma, type rw */
284typedef struct {
285 unsigned int md_s : 16;
286 unsigned int dummy1 : 16;
287} reg_dma_rw_group_md_s;
288#define REG_RD_ADDR_dma_rw_group_md_s 116
289#define REG_WR_ADDR_dma_rw_group_md_s 116
290
291/* Register rw_group_up, scope dma, type rw */
292typedef unsigned int reg_dma_rw_group_up;
293#define REG_RD_ADDR_dma_rw_group_up 120
294#define REG_WR_ADDR_dma_rw_group_up 120
295
296/* Register rw_group_down, scope dma, type rw */
297typedef unsigned int reg_dma_rw_group_down;
298#define REG_RD_ADDR_dma_rw_group_down 124
299#define REG_WR_ADDR_dma_rw_group_down 124
300
301/* Register rw_cmd, scope dma, type rw */
302typedef struct {
303 unsigned int cont_data : 1;
304 unsigned int dummy1 : 31;
305} reg_dma_rw_cmd;
306#define REG_RD_ADDR_dma_rw_cmd 128
307#define REG_WR_ADDR_dma_rw_cmd 128
308
309/* Register rw_cfg, scope dma, type rw */
310typedef struct {
311 unsigned int en : 1;
312 unsigned int stop : 1;
313 unsigned int dummy1 : 30;
314} reg_dma_rw_cfg;
315#define REG_RD_ADDR_dma_rw_cfg 132
316#define REG_WR_ADDR_dma_rw_cfg 132
317
318/* Register rw_stat, scope dma, type rw */
319typedef struct {
320 unsigned int mode : 5;
321 unsigned int list_state : 3;
322 unsigned int stream_cmd_src : 8;
323 unsigned int dummy1 : 8;
324 unsigned int buf : 8;
325} reg_dma_rw_stat;
326#define REG_RD_ADDR_dma_rw_stat 136
327#define REG_WR_ADDR_dma_rw_stat 136
328
329/* Register rw_intr_mask, scope dma, type rw */
330typedef struct {
331 unsigned int group : 1;
332 unsigned int ctxt : 1;
333 unsigned int data : 1;
334 unsigned int in_eop : 1;
335 unsigned int stream_cmd : 1;
336 unsigned int dummy1 : 27;
337} reg_dma_rw_intr_mask;
338#define REG_RD_ADDR_dma_rw_intr_mask 140
339#define REG_WR_ADDR_dma_rw_intr_mask 140
340
341/* Register rw_ack_intr, scope dma, type rw */
342typedef struct {
343 unsigned int group : 1;
344 unsigned int ctxt : 1;
345 unsigned int data : 1;
346 unsigned int in_eop : 1;
347 unsigned int stream_cmd : 1;
348 unsigned int dummy1 : 27;
349} reg_dma_rw_ack_intr;
350#define REG_RD_ADDR_dma_rw_ack_intr 144
351#define REG_WR_ADDR_dma_rw_ack_intr 144
352
353/* Register r_intr, scope dma, type r */
354typedef struct {
355 unsigned int group : 1;
356 unsigned int ctxt : 1;
357 unsigned int data : 1;
358 unsigned int in_eop : 1;
359 unsigned int stream_cmd : 1;
360 unsigned int dummy1 : 27;
361} reg_dma_r_intr;
362#define REG_RD_ADDR_dma_r_intr 148
363
364/* Register r_masked_intr, scope dma, type r */
365typedef struct {
366 unsigned int group : 1;
367 unsigned int ctxt : 1;
368 unsigned int data : 1;
369 unsigned int in_eop : 1;
370 unsigned int stream_cmd : 1;
371 unsigned int dummy1 : 27;
372} reg_dma_r_masked_intr;
373#define REG_RD_ADDR_dma_r_masked_intr 152
374
375/* Register rw_stream_cmd, scope dma, type rw */
376typedef struct {
377 unsigned int cmd : 10;
378 unsigned int dummy1 : 6;
379 unsigned int n : 8;
380 unsigned int dummy2 : 7;
381 unsigned int busy : 1;
382} reg_dma_rw_stream_cmd;
383#define REG_RD_ADDR_dma_rw_stream_cmd 156
384#define REG_WR_ADDR_dma_rw_stream_cmd 156
385
386
387/* Constants */
388enum {
389 regk_dma_ack_pkt = 0x00000100,
390 regk_dma_anytime = 0x00000001,
391 regk_dma_array = 0x00000008,
392 regk_dma_burst = 0x00000020,
393 regk_dma_client = 0x00000002,
394 regk_dma_copy_next = 0x00000010,
395 regk_dma_copy_up = 0x00000020,
396 regk_dma_data_at_eol = 0x00000001,
397 regk_dma_dis_c = 0x00000010,
398 regk_dma_dis_g = 0x00000020,
399 regk_dma_idle = 0x00000001,
400 regk_dma_intern = 0x00000004,
401 regk_dma_load_c = 0x00000200,
402 regk_dma_load_c_n = 0x00000280,
403 regk_dma_load_c_next = 0x00000240,
404 regk_dma_load_d = 0x00000140,
405 regk_dma_load_g = 0x00000300,
406 regk_dma_load_g_down = 0x000003c0,
407 regk_dma_load_g_next = 0x00000340,
408 regk_dma_load_g_up = 0x00000380,
409 regk_dma_next_en = 0x00000010,
410 regk_dma_next_pkt = 0x00000010,
411 regk_dma_no = 0x00000000,
412 regk_dma_only_at_wait = 0x00000000,
413 regk_dma_restore = 0x00000020,
414 regk_dma_rst = 0x00000001,
415 regk_dma_running = 0x00000004,
416 regk_dma_rw_cfg_default = 0x00000000,
417 regk_dma_rw_cmd_default = 0x00000000,
418 regk_dma_rw_intr_mask_default = 0x00000000,
419 regk_dma_rw_stat_default = 0x00000101,
420 regk_dma_rw_stream_cmd_default = 0x00000000,
421 regk_dma_save_down = 0x00000020,
422 regk_dma_save_up = 0x00000020,
423 regk_dma_set_reg = 0x00000050,
424 regk_dma_set_w_size1 = 0x00000190,
425 regk_dma_set_w_size2 = 0x000001a0,
426 regk_dma_set_w_size4 = 0x000001c0,
427 regk_dma_stopped = 0x00000002,
428 regk_dma_store_c = 0x00000002,
429 regk_dma_store_descr = 0x00000000,
430 regk_dma_store_g = 0x00000004,
431 regk_dma_store_md = 0x00000001,
432 regk_dma_sw = 0x00000008,
433 regk_dma_update_down = 0x00000020,
434 regk_dma_yes = 0x00000001
435};
436#endif /* __dma_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/eth_defs.h b/include/asm-cris/arch-v32/hwregs/eth_defs.h
deleted file mode 100644
index 90fe8a28894f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/eth_defs.h
+++ /dev/null
@@ -1,378 +0,0 @@
1#ifndef __eth_defs_h
2#define __eth_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: eth.r
7 * id: eth_regs.r,v 1.16 2005/05/20 15:41:22 perz Exp
8 * last modfied: Mon Jan 9 06:06:41 2006
9 *
10 * by /n/asic/design/tools/rdesc/rdes2c eth.r
11 * id: $Id: eth_defs.h,v 1.7 2006/01/26 13:45:30 karljope Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope eth */
86
87/* Register rw_ma0_lo, scope eth, type rw */
88typedef struct {
89 unsigned int addr : 32;
90} reg_eth_rw_ma0_lo;
91#define REG_RD_ADDR_eth_rw_ma0_lo 0
92#define REG_WR_ADDR_eth_rw_ma0_lo 0
93
94/* Register rw_ma0_hi, scope eth, type rw */
95typedef struct {
96 unsigned int addr : 16;
97 unsigned int dummy1 : 16;
98} reg_eth_rw_ma0_hi;
99#define REG_RD_ADDR_eth_rw_ma0_hi 4
100#define REG_WR_ADDR_eth_rw_ma0_hi 4
101
102/* Register rw_ma1_lo, scope eth, type rw */
103typedef struct {
104 unsigned int addr : 32;
105} reg_eth_rw_ma1_lo;
106#define REG_RD_ADDR_eth_rw_ma1_lo 8
107#define REG_WR_ADDR_eth_rw_ma1_lo 8
108
109/* Register rw_ma1_hi, scope eth, type rw */
110typedef struct {
111 unsigned int addr : 16;
112 unsigned int dummy1 : 16;
113} reg_eth_rw_ma1_hi;
114#define REG_RD_ADDR_eth_rw_ma1_hi 12
115#define REG_WR_ADDR_eth_rw_ma1_hi 12
116
117/* Register rw_ga_lo, scope eth, type rw */
118typedef struct {
119 unsigned int tbl : 32;
120} reg_eth_rw_ga_lo;
121#define REG_RD_ADDR_eth_rw_ga_lo 16
122#define REG_WR_ADDR_eth_rw_ga_lo 16
123
124/* Register rw_ga_hi, scope eth, type rw */
125typedef struct {
126 unsigned int tbl : 32;
127} reg_eth_rw_ga_hi;
128#define REG_RD_ADDR_eth_rw_ga_hi 20
129#define REG_WR_ADDR_eth_rw_ga_hi 20
130
131/* Register rw_gen_ctrl, scope eth, type rw */
132typedef struct {
133 unsigned int en : 1;
134 unsigned int phy : 2;
135 unsigned int protocol : 1;
136 unsigned int loopback : 1;
137 unsigned int flow_ctrl : 1;
138 unsigned int gtxclk_out : 1;
139 unsigned int phyrst_n : 1;
140 unsigned int dummy1 : 24;
141} reg_eth_rw_gen_ctrl;
142#define REG_RD_ADDR_eth_rw_gen_ctrl 24
143#define REG_WR_ADDR_eth_rw_gen_ctrl 24
144
145/* Register rw_rec_ctrl, scope eth, type rw */
146typedef struct {
147 unsigned int ma0 : 1;
148 unsigned int ma1 : 1;
149 unsigned int individual : 1;
150 unsigned int broadcast : 1;
151 unsigned int undersize : 1;
152 unsigned int oversize : 1;
153 unsigned int bad_crc : 1;
154 unsigned int duplex : 1;
155 unsigned int max_size : 16;
156 unsigned int dummy1 : 8;
157} reg_eth_rw_rec_ctrl;
158#define REG_RD_ADDR_eth_rw_rec_ctrl 28
159#define REG_WR_ADDR_eth_rw_rec_ctrl 28
160
161/* Register rw_tr_ctrl, scope eth, type rw */
162typedef struct {
163 unsigned int crc : 1;
164 unsigned int pad : 1;
165 unsigned int retry : 1;
166 unsigned int ignore_col : 1;
167 unsigned int cancel : 1;
168 unsigned int hsh_delay : 1;
169 unsigned int ignore_crs : 1;
170 unsigned int carrier_ext : 1;
171 unsigned int dummy1 : 24;
172} reg_eth_rw_tr_ctrl;
173#define REG_RD_ADDR_eth_rw_tr_ctrl 32
174#define REG_WR_ADDR_eth_rw_tr_ctrl 32
175
176/* Register rw_clr_err, scope eth, type rw */
177typedef struct {
178 unsigned int clr : 1;
179 unsigned int dummy1 : 31;
180} reg_eth_rw_clr_err;
181#define REG_RD_ADDR_eth_rw_clr_err 36
182#define REG_WR_ADDR_eth_rw_clr_err 36
183
184/* Register rw_mgm_ctrl, scope eth, type rw */
185typedef struct {
186 unsigned int mdio : 1;
187 unsigned int mdoe : 1;
188 unsigned int mdc : 1;
189 unsigned int dummy1 : 29;
190} reg_eth_rw_mgm_ctrl;
191#define REG_RD_ADDR_eth_rw_mgm_ctrl 40
192#define REG_WR_ADDR_eth_rw_mgm_ctrl 40
193
194/* Register r_stat, scope eth, type r */
195typedef struct {
196 unsigned int mdio : 1;
197 unsigned int exc_col : 1;
198 unsigned int urun : 1;
199 unsigned int clk_125 : 1;
200 unsigned int dummy1 : 28;
201} reg_eth_r_stat;
202#define REG_RD_ADDR_eth_r_stat 44
203
204/* Register rs_rec_cnt, scope eth, type rs */
205typedef struct {
206 unsigned int crc_err : 8;
207 unsigned int align_err : 8;
208 unsigned int oversize : 8;
209 unsigned int congestion : 8;
210} reg_eth_rs_rec_cnt;
211#define REG_RD_ADDR_eth_rs_rec_cnt 48
212
213/* Register r_rec_cnt, scope eth, type r */
214typedef struct {
215 unsigned int crc_err : 8;
216 unsigned int align_err : 8;
217 unsigned int oversize : 8;
218 unsigned int congestion : 8;
219} reg_eth_r_rec_cnt;
220#define REG_RD_ADDR_eth_r_rec_cnt 52
221
222/* Register rs_tr_cnt, scope eth, type rs */
223typedef struct {
224 unsigned int single_col : 8;
225 unsigned int mult_col : 8;
226 unsigned int late_col : 8;
227 unsigned int deferred : 8;
228} reg_eth_rs_tr_cnt;
229#define REG_RD_ADDR_eth_rs_tr_cnt 56
230
231/* Register r_tr_cnt, scope eth, type r */
232typedef struct {
233 unsigned int single_col : 8;
234 unsigned int mult_col : 8;
235 unsigned int late_col : 8;
236 unsigned int deferred : 8;
237} reg_eth_r_tr_cnt;
238#define REG_RD_ADDR_eth_r_tr_cnt 60
239
240/* Register rs_phy_cnt, scope eth, type rs */
241typedef struct {
242 unsigned int carrier_loss : 8;
243 unsigned int sqe_err : 8;
244 unsigned int dummy1 : 16;
245} reg_eth_rs_phy_cnt;
246#define REG_RD_ADDR_eth_rs_phy_cnt 64
247
248/* Register r_phy_cnt, scope eth, type r */
249typedef struct {
250 unsigned int carrier_loss : 8;
251 unsigned int sqe_err : 8;
252 unsigned int dummy1 : 16;
253} reg_eth_r_phy_cnt;
254#define REG_RD_ADDR_eth_r_phy_cnt 68
255
256/* Register rw_test_ctrl, scope eth, type rw */
257typedef struct {
258 unsigned int snmp_inc : 1;
259 unsigned int snmp : 1;
260 unsigned int backoff : 1;
261 unsigned int dummy1 : 29;
262} reg_eth_rw_test_ctrl;
263#define REG_RD_ADDR_eth_rw_test_ctrl 72
264#define REG_WR_ADDR_eth_rw_test_ctrl 72
265
266/* Register rw_intr_mask, scope eth, type rw */
267typedef struct {
268 unsigned int crc : 1;
269 unsigned int align : 1;
270 unsigned int oversize : 1;
271 unsigned int congestion : 1;
272 unsigned int single_col : 1;
273 unsigned int mult_col : 1;
274 unsigned int late_col : 1;
275 unsigned int deferred : 1;
276 unsigned int carrier_loss : 1;
277 unsigned int sqe_test_err : 1;
278 unsigned int orun : 1;
279 unsigned int urun : 1;
280 unsigned int exc_col : 1;
281 unsigned int mdio : 1;
282 unsigned int dummy1 : 18;
283} reg_eth_rw_intr_mask;
284#define REG_RD_ADDR_eth_rw_intr_mask 76
285#define REG_WR_ADDR_eth_rw_intr_mask 76
286
287/* Register rw_ack_intr, scope eth, type rw */
288typedef struct {
289 unsigned int crc : 1;
290 unsigned int align : 1;
291 unsigned int oversize : 1;
292 unsigned int congestion : 1;
293 unsigned int single_col : 1;
294 unsigned int mult_col : 1;
295 unsigned int late_col : 1;
296 unsigned int deferred : 1;
297 unsigned int carrier_loss : 1;
298 unsigned int sqe_test_err : 1;
299 unsigned int orun : 1;
300 unsigned int urun : 1;
301 unsigned int exc_col : 1;
302 unsigned int mdio : 1;
303 unsigned int dummy1 : 18;
304} reg_eth_rw_ack_intr;
305#define REG_RD_ADDR_eth_rw_ack_intr 80
306#define REG_WR_ADDR_eth_rw_ack_intr 80
307
308/* Register r_intr, scope eth, type r */
309typedef struct {
310 unsigned int crc : 1;
311 unsigned int align : 1;
312 unsigned int oversize : 1;
313 unsigned int congestion : 1;
314 unsigned int single_col : 1;
315 unsigned int mult_col : 1;
316 unsigned int late_col : 1;
317 unsigned int deferred : 1;
318 unsigned int carrier_loss : 1;
319 unsigned int sqe_test_err : 1;
320 unsigned int orun : 1;
321 unsigned int urun : 1;
322 unsigned int exc_col : 1;
323 unsigned int mdio : 1;
324 unsigned int dummy1 : 18;
325} reg_eth_r_intr;
326#define REG_RD_ADDR_eth_r_intr 84
327
328/* Register r_masked_intr, scope eth, type r */
329typedef struct {
330 unsigned int crc : 1;
331 unsigned int align : 1;
332 unsigned int oversize : 1;
333 unsigned int congestion : 1;
334 unsigned int single_col : 1;
335 unsigned int mult_col : 1;
336 unsigned int late_col : 1;
337 unsigned int deferred : 1;
338 unsigned int carrier_loss : 1;
339 unsigned int sqe_test_err : 1;
340 unsigned int orun : 1;
341 unsigned int urun : 1;
342 unsigned int exc_col : 1;
343 unsigned int mdio : 1;
344 unsigned int dummy1 : 18;
345} reg_eth_r_masked_intr;
346#define REG_RD_ADDR_eth_r_masked_intr 88
347
348
349/* Constants */
350enum {
351 regk_eth_discard = 0x00000000,
352 regk_eth_ether = 0x00000000,
353 regk_eth_full = 0x00000001,
354 regk_eth_gmii = 0x00000003,
355 regk_eth_gtxclk = 0x00000001,
356 regk_eth_half = 0x00000000,
357 regk_eth_hsh = 0x00000001,
358 regk_eth_mii = 0x00000001,
359 regk_eth_mii_arec = 0x00000002,
360 regk_eth_mii_clk = 0x00000000,
361 regk_eth_no = 0x00000000,
362 regk_eth_phyrst = 0x00000000,
363 regk_eth_rec = 0x00000001,
364 regk_eth_rw_ga_hi_default = 0x00000000,
365 regk_eth_rw_ga_lo_default = 0x00000000,
366 regk_eth_rw_gen_ctrl_default = 0x00000000,
367 regk_eth_rw_intr_mask_default = 0x00000000,
368 regk_eth_rw_ma0_hi_default = 0x00000000,
369 regk_eth_rw_ma0_lo_default = 0x00000000,
370 regk_eth_rw_ma1_hi_default = 0x00000000,
371 regk_eth_rw_ma1_lo_default = 0x00000000,
372 regk_eth_rw_mgm_ctrl_default = 0x00000000,
373 regk_eth_rw_test_ctrl_default = 0x00000000,
374 regk_eth_size1518 = 0x000005ee,
375 regk_eth_size1522 = 0x000005f2,
376 regk_eth_yes = 0x00000001
377};
378#endif /* __eth_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/extmem_defs.h b/include/asm-cris/arch-v32/hwregs/extmem_defs.h
deleted file mode 100644
index c47b5ca48ece..000000000000
--- a/include/asm-cris/arch-v32/hwregs/extmem_defs.h
+++ /dev/null
@@ -1,369 +0,0 @@
1#ifndef __extmem_defs_h
2#define __extmem_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/ext_mem/mod/extmem_regs.r
7 * id: extmem_regs.r,v 1.1 2004/02/16 13:29:30 np Exp
8 * last modfied: Tue Mar 30 22:26:21 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile extmem_defs.h ../../inst/ext_mem/mod/extmem_regs.r
11 * id: $Id: extmem_defs.h,v 1.5 2004/06/04 07:15:33 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope extmem */
86
87/* Register rw_cse0_cfg, scope extmem, type rw */
88typedef struct {
89 unsigned int lw : 6;
90 unsigned int ew : 3;
91 unsigned int zw : 3;
92 unsigned int aw : 2;
93 unsigned int dw : 2;
94 unsigned int ewb : 2;
95 unsigned int bw : 1;
96 unsigned int mode : 1;
97 unsigned int erc_en : 1;
98 unsigned int dummy1 : 6;
99 unsigned int size : 3;
100 unsigned int log : 1;
101 unsigned int en : 1;
102} reg_extmem_rw_cse0_cfg;
103#define REG_RD_ADDR_extmem_rw_cse0_cfg 0
104#define REG_WR_ADDR_extmem_rw_cse0_cfg 0
105
106/* Register rw_cse1_cfg, scope extmem, type rw */
107typedef struct {
108 unsigned int lw : 6;
109 unsigned int ew : 3;
110 unsigned int zw : 3;
111 unsigned int aw : 2;
112 unsigned int dw : 2;
113 unsigned int ewb : 2;
114 unsigned int bw : 1;
115 unsigned int mode : 1;
116 unsigned int erc_en : 1;
117 unsigned int dummy1 : 6;
118 unsigned int size : 3;
119 unsigned int log : 1;
120 unsigned int en : 1;
121} reg_extmem_rw_cse1_cfg;
122#define REG_RD_ADDR_extmem_rw_cse1_cfg 4
123#define REG_WR_ADDR_extmem_rw_cse1_cfg 4
124
125/* Register rw_csr0_cfg, scope extmem, type rw */
126typedef struct {
127 unsigned int lw : 6;
128 unsigned int ew : 3;
129 unsigned int zw : 3;
130 unsigned int aw : 2;
131 unsigned int dw : 2;
132 unsigned int ewb : 2;
133 unsigned int bw : 1;
134 unsigned int mode : 1;
135 unsigned int erc_en : 1;
136 unsigned int dummy1 : 6;
137 unsigned int size : 3;
138 unsigned int log : 1;
139 unsigned int en : 1;
140} reg_extmem_rw_csr0_cfg;
141#define REG_RD_ADDR_extmem_rw_csr0_cfg 8
142#define REG_WR_ADDR_extmem_rw_csr0_cfg 8
143
144/* Register rw_csr1_cfg, scope extmem, type rw */
145typedef struct {
146 unsigned int lw : 6;
147 unsigned int ew : 3;
148 unsigned int zw : 3;
149 unsigned int aw : 2;
150 unsigned int dw : 2;
151 unsigned int ewb : 2;
152 unsigned int bw : 1;
153 unsigned int mode : 1;
154 unsigned int erc_en : 1;
155 unsigned int dummy1 : 6;
156 unsigned int size : 3;
157 unsigned int log : 1;
158 unsigned int en : 1;
159} reg_extmem_rw_csr1_cfg;
160#define REG_RD_ADDR_extmem_rw_csr1_cfg 12
161#define REG_WR_ADDR_extmem_rw_csr1_cfg 12
162
163/* Register rw_csp0_cfg, scope extmem, type rw */
164typedef struct {
165 unsigned int lw : 6;
166 unsigned int ew : 3;
167 unsigned int zw : 3;
168 unsigned int aw : 2;
169 unsigned int dw : 2;
170 unsigned int ewb : 2;
171 unsigned int bw : 1;
172 unsigned int mode : 1;
173 unsigned int erc_en : 1;
174 unsigned int dummy1 : 6;
175 unsigned int size : 3;
176 unsigned int log : 1;
177 unsigned int en : 1;
178} reg_extmem_rw_csp0_cfg;
179#define REG_RD_ADDR_extmem_rw_csp0_cfg 16
180#define REG_WR_ADDR_extmem_rw_csp0_cfg 16
181
182/* Register rw_csp1_cfg, scope extmem, type rw */
183typedef struct {
184 unsigned int lw : 6;
185 unsigned int ew : 3;
186 unsigned int zw : 3;
187 unsigned int aw : 2;
188 unsigned int dw : 2;
189 unsigned int ewb : 2;
190 unsigned int bw : 1;
191 unsigned int mode : 1;
192 unsigned int erc_en : 1;
193 unsigned int dummy1 : 6;
194 unsigned int size : 3;
195 unsigned int log : 1;
196 unsigned int en : 1;
197} reg_extmem_rw_csp1_cfg;
198#define REG_RD_ADDR_extmem_rw_csp1_cfg 20
199#define REG_WR_ADDR_extmem_rw_csp1_cfg 20
200
201/* Register rw_csp2_cfg, scope extmem, type rw */
202typedef struct {
203 unsigned int lw : 6;
204 unsigned int ew : 3;
205 unsigned int zw : 3;
206 unsigned int aw : 2;
207 unsigned int dw : 2;
208 unsigned int ewb : 2;
209 unsigned int bw : 1;
210 unsigned int mode : 1;
211 unsigned int erc_en : 1;
212 unsigned int dummy1 : 6;
213 unsigned int size : 3;
214 unsigned int log : 1;
215 unsigned int en : 1;
216} reg_extmem_rw_csp2_cfg;
217#define REG_RD_ADDR_extmem_rw_csp2_cfg 24
218#define REG_WR_ADDR_extmem_rw_csp2_cfg 24
219
220/* Register rw_csp3_cfg, scope extmem, type rw */
221typedef struct {
222 unsigned int lw : 6;
223 unsigned int ew : 3;
224 unsigned int zw : 3;
225 unsigned int aw : 2;
226 unsigned int dw : 2;
227 unsigned int ewb : 2;
228 unsigned int bw : 1;
229 unsigned int mode : 1;
230 unsigned int erc_en : 1;
231 unsigned int dummy1 : 6;
232 unsigned int size : 3;
233 unsigned int log : 1;
234 unsigned int en : 1;
235} reg_extmem_rw_csp3_cfg;
236#define REG_RD_ADDR_extmem_rw_csp3_cfg 28
237#define REG_WR_ADDR_extmem_rw_csp3_cfg 28
238
239/* Register rw_csp4_cfg, scope extmem, type rw */
240typedef struct {
241 unsigned int lw : 6;
242 unsigned int ew : 3;
243 unsigned int zw : 3;
244 unsigned int aw : 2;
245 unsigned int dw : 2;
246 unsigned int ewb : 2;
247 unsigned int bw : 1;
248 unsigned int mode : 1;
249 unsigned int erc_en : 1;
250 unsigned int dummy1 : 6;
251 unsigned int size : 3;
252 unsigned int log : 1;
253 unsigned int en : 1;
254} reg_extmem_rw_csp4_cfg;
255#define REG_RD_ADDR_extmem_rw_csp4_cfg 32
256#define REG_WR_ADDR_extmem_rw_csp4_cfg 32
257
258/* Register rw_csp5_cfg, scope extmem, type rw */
259typedef struct {
260 unsigned int lw : 6;
261 unsigned int ew : 3;
262 unsigned int zw : 3;
263 unsigned int aw : 2;
264 unsigned int dw : 2;
265 unsigned int ewb : 2;
266 unsigned int bw : 1;
267 unsigned int mode : 1;
268 unsigned int erc_en : 1;
269 unsigned int dummy1 : 6;
270 unsigned int size : 3;
271 unsigned int log : 1;
272 unsigned int en : 1;
273} reg_extmem_rw_csp5_cfg;
274#define REG_RD_ADDR_extmem_rw_csp5_cfg 36
275#define REG_WR_ADDR_extmem_rw_csp5_cfg 36
276
277/* Register rw_csp6_cfg, scope extmem, type rw */
278typedef struct {
279 unsigned int lw : 6;
280 unsigned int ew : 3;
281 unsigned int zw : 3;
282 unsigned int aw : 2;
283 unsigned int dw : 2;
284 unsigned int ewb : 2;
285 unsigned int bw : 1;
286 unsigned int mode : 1;
287 unsigned int erc_en : 1;
288 unsigned int dummy1 : 6;
289 unsigned int size : 3;
290 unsigned int log : 1;
291 unsigned int en : 1;
292} reg_extmem_rw_csp6_cfg;
293#define REG_RD_ADDR_extmem_rw_csp6_cfg 40
294#define REG_WR_ADDR_extmem_rw_csp6_cfg 40
295
296/* Register rw_css_cfg, scope extmem, type rw */
297typedef struct {
298 unsigned int lw : 6;
299 unsigned int ew : 3;
300 unsigned int zw : 3;
301 unsigned int aw : 2;
302 unsigned int dw : 2;
303 unsigned int ewb : 2;
304 unsigned int bw : 1;
305 unsigned int mode : 1;
306 unsigned int erc_en : 1;
307 unsigned int dummy1 : 6;
308 unsigned int size : 3;
309 unsigned int log : 1;
310 unsigned int en : 1;
311} reg_extmem_rw_css_cfg;
312#define REG_RD_ADDR_extmem_rw_css_cfg 44
313#define REG_WR_ADDR_extmem_rw_css_cfg 44
314
315/* Register rw_status_handle, scope extmem, type rw */
316typedef struct {
317 unsigned int h : 32;
318} reg_extmem_rw_status_handle;
319#define REG_RD_ADDR_extmem_rw_status_handle 48
320#define REG_WR_ADDR_extmem_rw_status_handle 48
321
322/* Register rw_wait_pin, scope extmem, type rw */
323typedef struct {
324 unsigned int val : 16;
325 unsigned int dummy1 : 15;
326 unsigned int start : 1;
327} reg_extmem_rw_wait_pin;
328#define REG_RD_ADDR_extmem_rw_wait_pin 52
329#define REG_WR_ADDR_extmem_rw_wait_pin 52
330
331/* Register rw_gated_csp, scope extmem, type rw */
332typedef struct {
333 unsigned int dummy1 : 31;
334 unsigned int en : 1;
335} reg_extmem_rw_gated_csp;
336#define REG_RD_ADDR_extmem_rw_gated_csp 56
337#define REG_WR_ADDR_extmem_rw_gated_csp 56
338
339
340/* Constants */
341enum {
342 regk_extmem_b16 = 0x00000001,
343 regk_extmem_b32 = 0x00000000,
344 regk_extmem_bwe = 0x00000000,
345 regk_extmem_cwe = 0x00000001,
346 regk_extmem_no = 0x00000000,
347 regk_extmem_rw_cse0_cfg_default = 0x000006cf,
348 regk_extmem_rw_cse1_cfg_default = 0x000006cf,
349 regk_extmem_rw_csp0_cfg_default = 0x000006cf,
350 regk_extmem_rw_csp1_cfg_default = 0x000006cf,
351 regk_extmem_rw_csp2_cfg_default = 0x000006cf,
352 regk_extmem_rw_csp3_cfg_default = 0x000006cf,
353 regk_extmem_rw_csp4_cfg_default = 0x000006cf,
354 regk_extmem_rw_csp5_cfg_default = 0x000006cf,
355 regk_extmem_rw_csp6_cfg_default = 0x000006cf,
356 regk_extmem_rw_csr0_cfg_default = 0x000006cf,
357 regk_extmem_rw_csr1_cfg_default = 0x000006cf,
358 regk_extmem_rw_css_cfg_default = 0x000006cf,
359 regk_extmem_s128KB = 0x00000000,
360 regk_extmem_s16MB = 0x00000005,
361 regk_extmem_s1MB = 0x00000001,
362 regk_extmem_s2MB = 0x00000002,
363 regk_extmem_s32MB = 0x00000006,
364 regk_extmem_s4MB = 0x00000003,
365 regk_extmem_s64MB = 0x00000007,
366 regk_extmem_s8MB = 0x00000004,
367 regk_extmem_yes = 0x00000001
368};
369#endif /* __extmem_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/gio_defs.h b/include/asm-cris/arch-v32/hwregs/gio_defs.h
deleted file mode 100644
index 3e9a0b25366f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/gio_defs.h
+++ /dev/null
@@ -1,295 +0,0 @@
1#ifndef __gio_defs_h
2#define __gio_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/gio/rtl/gio_regs.r
7 * id: gio_regs.r,v 1.5 2005/02/04 09:43:21 perz Exp
8 * last modfied: Mon Apr 11 16:07:47 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile gio_defs.h ../../inst/gio/rtl/gio_regs.r
11 * id: $Id: gio_defs.h,v 1.6 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope gio */
86
87/* Register rw_pa_dout, scope gio, type rw */
88typedef struct {
89 unsigned int data : 8;
90 unsigned int dummy1 : 24;
91} reg_gio_rw_pa_dout;
92#define REG_RD_ADDR_gio_rw_pa_dout 0
93#define REG_WR_ADDR_gio_rw_pa_dout 0
94
95/* Register r_pa_din, scope gio, type r */
96typedef struct {
97 unsigned int data : 8;
98 unsigned int dummy1 : 24;
99} reg_gio_r_pa_din;
100#define REG_RD_ADDR_gio_r_pa_din 4
101
102/* Register rw_pa_oe, scope gio, type rw */
103typedef struct {
104 unsigned int oe : 8;
105 unsigned int dummy1 : 24;
106} reg_gio_rw_pa_oe;
107#define REG_RD_ADDR_gio_rw_pa_oe 8
108#define REG_WR_ADDR_gio_rw_pa_oe 8
109
110/* Register rw_intr_cfg, scope gio, type rw */
111typedef struct {
112 unsigned int pa0 : 3;
113 unsigned int pa1 : 3;
114 unsigned int pa2 : 3;
115 unsigned int pa3 : 3;
116 unsigned int pa4 : 3;
117 unsigned int pa5 : 3;
118 unsigned int pa6 : 3;
119 unsigned int pa7 : 3;
120 unsigned int dummy1 : 8;
121} reg_gio_rw_intr_cfg;
122#define REG_RD_ADDR_gio_rw_intr_cfg 12
123#define REG_WR_ADDR_gio_rw_intr_cfg 12
124
125/* Register rw_intr_mask, scope gio, type rw */
126typedef struct {
127 unsigned int pa0 : 1;
128 unsigned int pa1 : 1;
129 unsigned int pa2 : 1;
130 unsigned int pa3 : 1;
131 unsigned int pa4 : 1;
132 unsigned int pa5 : 1;
133 unsigned int pa6 : 1;
134 unsigned int pa7 : 1;
135 unsigned int dummy1 : 24;
136} reg_gio_rw_intr_mask;
137#define REG_RD_ADDR_gio_rw_intr_mask 16
138#define REG_WR_ADDR_gio_rw_intr_mask 16
139
140/* Register rw_ack_intr, scope gio, type rw */
141typedef struct {
142 unsigned int pa0 : 1;
143 unsigned int pa1 : 1;
144 unsigned int pa2 : 1;
145 unsigned int pa3 : 1;
146 unsigned int pa4 : 1;
147 unsigned int pa5 : 1;
148 unsigned int pa6 : 1;
149 unsigned int pa7 : 1;
150 unsigned int dummy1 : 24;
151} reg_gio_rw_ack_intr;
152#define REG_RD_ADDR_gio_rw_ack_intr 20
153#define REG_WR_ADDR_gio_rw_ack_intr 20
154
155/* Register r_intr, scope gio, type r */
156typedef struct {
157 unsigned int pa0 : 1;
158 unsigned int pa1 : 1;
159 unsigned int pa2 : 1;
160 unsigned int pa3 : 1;
161 unsigned int pa4 : 1;
162 unsigned int pa5 : 1;
163 unsigned int pa6 : 1;
164 unsigned int pa7 : 1;
165 unsigned int dummy1 : 24;
166} reg_gio_r_intr;
167#define REG_RD_ADDR_gio_r_intr 24
168
169/* Register r_masked_intr, scope gio, type r */
170typedef struct {
171 unsigned int pa0 : 1;
172 unsigned int pa1 : 1;
173 unsigned int pa2 : 1;
174 unsigned int pa3 : 1;
175 unsigned int pa4 : 1;
176 unsigned int pa5 : 1;
177 unsigned int pa6 : 1;
178 unsigned int pa7 : 1;
179 unsigned int dummy1 : 24;
180} reg_gio_r_masked_intr;
181#define REG_RD_ADDR_gio_r_masked_intr 28
182
183/* Register rw_pb_dout, scope gio, type rw */
184typedef struct {
185 unsigned int data : 18;
186 unsigned int dummy1 : 14;
187} reg_gio_rw_pb_dout;
188#define REG_RD_ADDR_gio_rw_pb_dout 32
189#define REG_WR_ADDR_gio_rw_pb_dout 32
190
191/* Register r_pb_din, scope gio, type r */
192typedef struct {
193 unsigned int data : 18;
194 unsigned int dummy1 : 14;
195} reg_gio_r_pb_din;
196#define REG_RD_ADDR_gio_r_pb_din 36
197
198/* Register rw_pb_oe, scope gio, type rw */
199typedef struct {
200 unsigned int oe : 18;
201 unsigned int dummy1 : 14;
202} reg_gio_rw_pb_oe;
203#define REG_RD_ADDR_gio_rw_pb_oe 40
204#define REG_WR_ADDR_gio_rw_pb_oe 40
205
206/* Register rw_pc_dout, scope gio, type rw */
207typedef struct {
208 unsigned int data : 18;
209 unsigned int dummy1 : 14;
210} reg_gio_rw_pc_dout;
211#define REG_RD_ADDR_gio_rw_pc_dout 48
212#define REG_WR_ADDR_gio_rw_pc_dout 48
213
214/* Register r_pc_din, scope gio, type r */
215typedef struct {
216 unsigned int data : 18;
217 unsigned int dummy1 : 14;
218} reg_gio_r_pc_din;
219#define REG_RD_ADDR_gio_r_pc_din 52
220
221/* Register rw_pc_oe, scope gio, type rw */
222typedef struct {
223 unsigned int oe : 18;
224 unsigned int dummy1 : 14;
225} reg_gio_rw_pc_oe;
226#define REG_RD_ADDR_gio_rw_pc_oe 56
227#define REG_WR_ADDR_gio_rw_pc_oe 56
228
229/* Register rw_pd_dout, scope gio, type rw */
230typedef struct {
231 unsigned int data : 18;
232 unsigned int dummy1 : 14;
233} reg_gio_rw_pd_dout;
234#define REG_RD_ADDR_gio_rw_pd_dout 64
235#define REG_WR_ADDR_gio_rw_pd_dout 64
236
237/* Register r_pd_din, scope gio, type r */
238typedef struct {
239 unsigned int data : 18;
240 unsigned int dummy1 : 14;
241} reg_gio_r_pd_din;
242#define REG_RD_ADDR_gio_r_pd_din 68
243
244/* Register rw_pd_oe, scope gio, type rw */
245typedef struct {
246 unsigned int oe : 18;
247 unsigned int dummy1 : 14;
248} reg_gio_rw_pd_oe;
249#define REG_RD_ADDR_gio_rw_pd_oe 72
250#define REG_WR_ADDR_gio_rw_pd_oe 72
251
252/* Register rw_pe_dout, scope gio, type rw */
253typedef struct {
254 unsigned int data : 18;
255 unsigned int dummy1 : 14;
256} reg_gio_rw_pe_dout;
257#define REG_RD_ADDR_gio_rw_pe_dout 80
258#define REG_WR_ADDR_gio_rw_pe_dout 80
259
260/* Register r_pe_din, scope gio, type r */
261typedef struct {
262 unsigned int data : 18;
263 unsigned int dummy1 : 14;
264} reg_gio_r_pe_din;
265#define REG_RD_ADDR_gio_r_pe_din 84
266
267/* Register rw_pe_oe, scope gio, type rw */
268typedef struct {
269 unsigned int oe : 18;
270 unsigned int dummy1 : 14;
271} reg_gio_rw_pe_oe;
272#define REG_RD_ADDR_gio_rw_pe_oe 88
273#define REG_WR_ADDR_gio_rw_pe_oe 88
274
275
276/* Constants */
277enum {
278 regk_gio_anyedge = 0x00000007,
279 regk_gio_hi = 0x00000001,
280 regk_gio_lo = 0x00000002,
281 regk_gio_negedge = 0x00000006,
282 regk_gio_no = 0x00000000,
283 regk_gio_off = 0x00000000,
284 regk_gio_posedge = 0x00000005,
285 regk_gio_rw_intr_cfg_default = 0x00000000,
286 regk_gio_rw_intr_mask_default = 0x00000000,
287 regk_gio_rw_pa_oe_default = 0x00000000,
288 regk_gio_rw_pb_oe_default = 0x00000000,
289 regk_gio_rw_pc_oe_default = 0x00000000,
290 regk_gio_rw_pd_oe_default = 0x00000000,
291 regk_gio_rw_pe_oe_default = 0x00000000,
292 regk_gio_set = 0x00000003,
293 regk_gio_yes = 0x00000001
294};
295#endif /* __gio_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/intr_vect.h b/include/asm-cris/arch-v32/hwregs/intr_vect.h
deleted file mode 100644
index 5c1b28fb205d..000000000000
--- a/include/asm-cris/arch-v32/hwregs/intr_vect.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
2 from ../../inst/intr_vect/rtl/guinness/ivmask.config.r
3version . */
4
5#ifndef _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R
6#define _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R
7#define MEMARB_INTR_VECT 0x31
8#define GEN_IO_INTR_VECT 0x32
9#define IOP0_INTR_VECT 0x33
10#define IOP1_INTR_VECT 0x34
11#define IOP2_INTR_VECT 0x35
12#define IOP3_INTR_VECT 0x36
13#define DMA0_INTR_VECT 0x37
14#define DMA1_INTR_VECT 0x38
15#define DMA2_INTR_VECT 0x39
16#define DMA3_INTR_VECT 0x3a
17#define DMA4_INTR_VECT 0x3b
18#define DMA5_INTR_VECT 0x3c
19#define DMA6_INTR_VECT 0x3d
20#define DMA7_INTR_VECT 0x3e
21#define DMA8_INTR_VECT 0x3f
22#define DMA9_INTR_VECT 0x40
23#define ATA_INTR_VECT 0x41
24#define SSER0_INTR_VECT 0x42
25#define SSER1_INTR_VECT 0x43
26#define SER0_INTR_VECT 0x44
27#define SER1_INTR_VECT 0x45
28#define SER2_INTR_VECT 0x46
29#define SER3_INTR_VECT 0x47
30#define P21_INTR_VECT 0x48
31#define ETH0_INTR_VECT 0x49
32#define ETH1_INTR_VECT 0x4a
33#define TIMER_INTR_VECT 0x4b
34#define BIF_ARB_INTR_VECT 0x4c
35#define BIF_DMA_INTR_VECT 0x4d
36#define EXT_INTR_VECT 0x4e
37#define IPI_INTR_VECT 0x4f
38
39#endif
diff --git a/include/asm-cris/arch-v32/hwregs/iop/Makefile b/include/asm-cris/arch-v32/hwregs/iop/Makefile
deleted file mode 100644
index a90056a095e3..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/Makefile
+++ /dev/null
@@ -1,146 +0,0 @@
1# $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $
2# Makefile to generate or copy the latest register definitions
3# and related datastructures and helpermacros.
4# The offical place for these files is probably at:
5RELEASE ?= r1_alfa5
6IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/
7
8IOPROCDIR = /n/asic/design/io/io_proc/rtl
9
10IOPROCINCL_FILES =
11IOPROCINCL_FILES2=
12IOPROCINCL_FILES += iop_crc_par_defs.h
13IOPROCINCL_FILES += iop_dmc_in_defs.h
14IOPROCINCL_FILES += iop_dmc_out_defs.h
15IOPROCINCL_FILES += iop_fifo_in_defs.h
16IOPROCINCL_FILES += iop_fifo_in_xtra_defs.h
17IOPROCINCL_FILES += iop_fifo_out_defs.h
18IOPROCINCL_FILES += iop_fifo_out_xtra_defs.h
19IOPROCINCL_FILES += iop_mpu_defs.h
20IOPROCINCL_FILES2+= iop_mpu_macros.h
21IOPROCINCL_FILES2+= iop_reg_space.h
22IOPROCINCL_FILES += iop_sap_in_defs.h
23IOPROCINCL_FILES += iop_sap_out_defs.h
24IOPROCINCL_FILES += iop_scrc_in_defs.h
25IOPROCINCL_FILES += iop_scrc_out_defs.h
26IOPROCINCL_FILES += iop_spu_defs.h
27# in guiness/
28IOPROCINCL_FILES += iop_sw_cfg_defs.h
29IOPROCINCL_FILES += iop_sw_cpu_defs.h
30IOPROCINCL_FILES += iop_sw_mpu_defs.h
31IOPROCINCL_FILES += iop_sw_spu_defs.h
32#
33IOPROCINCL_FILES += iop_timer_grp_defs.h
34IOPROCINCL_FILES += iop_trigger_grp_defs.h
35# in guiness/
36IOPROCINCL_FILES += iop_version_defs.h
37
38IOPROCASMINCL_FILES = $(patsubst %_defs.h,%_defs_asm.h,$(IOPROCINCL_FILES))
39IOPROCASMINCL_FILES+= iop_reg_space_asm.h
40
41
42IOPROCREGDESC =
43IOPROCREGDESC += $(IOPROCDIR)/iop_crc_par.r
44#IOPROCREGDESC += $(IOPROCDIR)/iop_crc_ser.r
45IOPROCREGDESC += $(IOPROCDIR)/iop_dmc_in.r
46IOPROCREGDESC += $(IOPROCDIR)/iop_dmc_out.r
47IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_in.r
48IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_in_xtra.r
49IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_out.r
50IOPROCREGDESC += $(IOPROCDIR)/iop_fifo_out_xtra.r
51IOPROCREGDESC += $(IOPROCDIR)/iop_mpu.r
52IOPROCREGDESC += $(IOPROCDIR)/iop_sap_in.r
53IOPROCREGDESC += $(IOPROCDIR)/iop_sap_out.r
54IOPROCREGDESC += $(IOPROCDIR)/iop_scrc_in.r
55IOPROCREGDESC += $(IOPROCDIR)/iop_scrc_out.r
56IOPROCREGDESC += $(IOPROCDIR)/iop_spu.r
57IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_cfg.r
58IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_cpu.r
59IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_mpu.r
60IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_sw_spu.r
61IOPROCREGDESC += $(IOPROCDIR)/iop_timer_grp.r
62IOPROCREGDESC += $(IOPROCDIR)/iop_trigger_grp.r
63IOPROCREGDESC += $(IOPROCDIR)/guinness/iop_version.r
64
65
66RDES2C = /n/asic/bin/rdes2c
67RDES2C = /n/asic/design/tools/rdesc/rdes2c
68RDES2INTR = /n/asic/design/tools/rdesc/rdes2intr
69RDES2TXT = /n/asic/design/tools/rdesc/rdes2txt
70
71## all - Just print help - you probably want to do 'make gen'
72all: help
73
74## help - This help
75help:
76 @grep '^## ' Makefile
77
78## gen - Generate include files
79gen: $(IOPROCINCL_FILES) $(IOPROCINCL_FILES2) $(IOPROCASMINCL_FILES)
80 echo "INCL: $(IOPROCINCL_FILES)"
81 echo "INCL2: $(IOPROCINCL_FILES2)"
82 echo "ASMINCL: $(IOPROCASMINCL_FILES)"
83
84# From the official location...
85iop_reg_space.h: $(IOPOFFICIAL_INCDIR)/iop_reg_space.h
86 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
87iop_mpu_macros.h: $(IOPOFFICIAL_INCDIR)/iop_mpu_macros.h
88 cat $< | sed -e 's/\$$Id\:/id\:/g' >$@
89
90## copy - Copy files from official location
91copy:
92 @echo "## Copying and fixing iop files ##"
93 @for HFILE in $(IOPROCINCL_FILES); do \
94 echo " $$HFILE"; \
95 cat $(IOPOFFICIAL_INCDIR)$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
96 done
97 @for HFILE in $(IOPROCINCL_FILES2); do \
98 echo " $$HFILE"; \
99 cat $(IOPOFFICIAL_INCDIR)$$HFILE | sed -e 's/\$$Id\:/id\:/g' > $$HFILE; \
100 done
101 @echo "## Copying and fixing iop asm files ##"
102 @for HFILE in $(IOPROCASMINCL_FILES); do \
103 echo " $$HFILE"; \
104 cat $(IOPOFFICIAL_INCDIR)asm/$$HFILE | sed -e 's/\$$Id\:/id\:/g' > asm/$$HFILE; \
105 done
106
107# I/O processor files:
108## iop - Generate I/O processor include files
109iop: $(IOPROCINCL_FILES) $(IOPROCINCL_FILES2) $(IOPROCASMINCL_FILES)
110iop_sw_%_defs.h: $(IOPROCDIR)/guinness/iop_sw_%.r
111 $(RDES2C) $<
112iop_version_defs.h: $(IOPROCDIR)/guinness/iop_version.r
113 $(RDES2C) $<
114%_defs.h: $(IOPROCDIR)/%.r
115 $(RDES2C) $<
116%_defs_asm.h: $(IOPROCDIR)/%.r
117 $(RDES2C) -asm $<
118iop_version_defs_asm.h: $(IOPROCDIR)/guinness/iop_version.r
119 $(RDES2C) -asm $<
120
121## doc - Generate .axw files from register description.
122doc: $(IOPROCREGDESC)
123 for RDES in $^; do \
124 $(RDES2TXT) $$RDES; \
125 done
126
127.PHONY: axw
128## %.axw - Generate the specified .axw file (doesn't work for all files
129## due to inconsistent naming of .r files.
130%.axw: axw
131 @for RDES in $(IOPROCREGDESC); do \
132 if echo "$$RDES" | grep $* ; then \
133 $(RDES2TXT) $$RDES; \
134 fi \
135 done
136
137.PHONY: clean
138## clean - Remove .h files and .axw files.
139clean:
140 rm -rf $(IOPROCINCL_FILES) *.axw
141
142.PHONY: cleandoc
143## cleandoc - Remove .axw files.
144cleandoc:
145 rm -rf *.axw
146
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_crc_par_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_crc_par_defs_asm.h
deleted file mode 100644
index a4b58000c164..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_crc_par_defs_asm.h
+++ /dev/null
@@ -1,171 +0,0 @@
1#ifndef __iop_crc_par_defs_asm_h
2#define __iop_crc_par_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_crc_par.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_crc_par_defs_asm.h ../../inst/io_proc/rtl/iop_crc_par.r
11 * id: $Id: iop_crc_par_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_crc_par, type rw */
57#define reg_iop_crc_par_rw_cfg___mode___lsb 0
58#define reg_iop_crc_par_rw_cfg___mode___width 1
59#define reg_iop_crc_par_rw_cfg___mode___bit 0
60#define reg_iop_crc_par_rw_cfg___crc_out___lsb 1
61#define reg_iop_crc_par_rw_cfg___crc_out___width 1
62#define reg_iop_crc_par_rw_cfg___crc_out___bit 1
63#define reg_iop_crc_par_rw_cfg___rev_out___lsb 2
64#define reg_iop_crc_par_rw_cfg___rev_out___width 1
65#define reg_iop_crc_par_rw_cfg___rev_out___bit 2
66#define reg_iop_crc_par_rw_cfg___inv_out___lsb 3
67#define reg_iop_crc_par_rw_cfg___inv_out___width 1
68#define reg_iop_crc_par_rw_cfg___inv_out___bit 3
69#define reg_iop_crc_par_rw_cfg___trig___lsb 4
70#define reg_iop_crc_par_rw_cfg___trig___width 2
71#define reg_iop_crc_par_rw_cfg___poly___lsb 6
72#define reg_iop_crc_par_rw_cfg___poly___width 3
73#define reg_iop_crc_par_rw_cfg_offset 0
74
75/* Register rw_init_crc, scope iop_crc_par, type rw */
76#define reg_iop_crc_par_rw_init_crc_offset 4
77
78/* Register rw_correct_crc, scope iop_crc_par, type rw */
79#define reg_iop_crc_par_rw_correct_crc_offset 8
80
81/* Register rw_ctrl, scope iop_crc_par, type rw */
82#define reg_iop_crc_par_rw_ctrl___en___lsb 0
83#define reg_iop_crc_par_rw_ctrl___en___width 1
84#define reg_iop_crc_par_rw_ctrl___en___bit 0
85#define reg_iop_crc_par_rw_ctrl_offset 12
86
87/* Register rw_set_last, scope iop_crc_par, type rw */
88#define reg_iop_crc_par_rw_set_last___tr_dif___lsb 0
89#define reg_iop_crc_par_rw_set_last___tr_dif___width 1
90#define reg_iop_crc_par_rw_set_last___tr_dif___bit 0
91#define reg_iop_crc_par_rw_set_last_offset 16
92
93/* Register rw_wr1byte, scope iop_crc_par, type rw */
94#define reg_iop_crc_par_rw_wr1byte___data___lsb 0
95#define reg_iop_crc_par_rw_wr1byte___data___width 8
96#define reg_iop_crc_par_rw_wr1byte_offset 20
97
98/* Register rw_wr2byte, scope iop_crc_par, type rw */
99#define reg_iop_crc_par_rw_wr2byte___data___lsb 0
100#define reg_iop_crc_par_rw_wr2byte___data___width 16
101#define reg_iop_crc_par_rw_wr2byte_offset 24
102
103/* Register rw_wr3byte, scope iop_crc_par, type rw */
104#define reg_iop_crc_par_rw_wr3byte___data___lsb 0
105#define reg_iop_crc_par_rw_wr3byte___data___width 24
106#define reg_iop_crc_par_rw_wr3byte_offset 28
107
108/* Register rw_wr4byte, scope iop_crc_par, type rw */
109#define reg_iop_crc_par_rw_wr4byte___data___lsb 0
110#define reg_iop_crc_par_rw_wr4byte___data___width 32
111#define reg_iop_crc_par_rw_wr4byte_offset 32
112
113/* Register rw_wr1byte_last, scope iop_crc_par, type rw */
114#define reg_iop_crc_par_rw_wr1byte_last___data___lsb 0
115#define reg_iop_crc_par_rw_wr1byte_last___data___width 8
116#define reg_iop_crc_par_rw_wr1byte_last_offset 36
117
118/* Register rw_wr2byte_last, scope iop_crc_par, type rw */
119#define reg_iop_crc_par_rw_wr2byte_last___data___lsb 0
120#define reg_iop_crc_par_rw_wr2byte_last___data___width 16
121#define reg_iop_crc_par_rw_wr2byte_last_offset 40
122
123/* Register rw_wr3byte_last, scope iop_crc_par, type rw */
124#define reg_iop_crc_par_rw_wr3byte_last___data___lsb 0
125#define reg_iop_crc_par_rw_wr3byte_last___data___width 24
126#define reg_iop_crc_par_rw_wr3byte_last_offset 44
127
128/* Register rw_wr4byte_last, scope iop_crc_par, type rw */
129#define reg_iop_crc_par_rw_wr4byte_last___data___lsb 0
130#define reg_iop_crc_par_rw_wr4byte_last___data___width 32
131#define reg_iop_crc_par_rw_wr4byte_last_offset 48
132
133/* Register r_stat, scope iop_crc_par, type r */
134#define reg_iop_crc_par_r_stat___err___lsb 0
135#define reg_iop_crc_par_r_stat___err___width 1
136#define reg_iop_crc_par_r_stat___err___bit 0
137#define reg_iop_crc_par_r_stat___busy___lsb 1
138#define reg_iop_crc_par_r_stat___busy___width 1
139#define reg_iop_crc_par_r_stat___busy___bit 1
140#define reg_iop_crc_par_r_stat_offset 52
141
142/* Register r_sh_reg, scope iop_crc_par, type r */
143#define reg_iop_crc_par_r_sh_reg_offset 56
144
145/* Register r_crc, scope iop_crc_par, type r */
146#define reg_iop_crc_par_r_crc_offset 60
147
148/* Register rw_strb_rec_dif_in, scope iop_crc_par, type rw */
149#define reg_iop_crc_par_rw_strb_rec_dif_in___last___lsb 0
150#define reg_iop_crc_par_rw_strb_rec_dif_in___last___width 2
151#define reg_iop_crc_par_rw_strb_rec_dif_in_offset 64
152
153
154/* Constants */
155#define regk_iop_crc_par_calc 0x00000001
156#define regk_iop_crc_par_ccitt 0x00000002
157#define regk_iop_crc_par_check 0x00000000
158#define regk_iop_crc_par_crc16 0x00000001
159#define regk_iop_crc_par_crc32 0x00000000
160#define regk_iop_crc_par_crc5 0x00000003
161#define regk_iop_crc_par_crc5_11 0x00000004
162#define regk_iop_crc_par_dif_in 0x00000002
163#define regk_iop_crc_par_hi 0x00000000
164#define regk_iop_crc_par_neg 0x00000002
165#define regk_iop_crc_par_no 0x00000000
166#define regk_iop_crc_par_pos 0x00000001
167#define regk_iop_crc_par_pos_neg 0x00000003
168#define regk_iop_crc_par_rw_cfg_default 0x00000000
169#define regk_iop_crc_par_rw_ctrl_default 0x00000000
170#define regk_iop_crc_par_yes 0x00000001
171#endif /* __iop_crc_par_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_in_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_in_defs_asm.h
deleted file mode 100644
index e7d539feccb1..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_in_defs_asm.h
+++ /dev/null
@@ -1,321 +0,0 @@
1#ifndef __iop_dmc_in_defs_asm_h
2#define __iop_dmc_in_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_dmc_in.r
7 * id: iop_dmc_in.r,v 1.26 2005/02/16 09:14:17 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_dmc_in_defs_asm.h ../../inst/io_proc/rtl/iop_dmc_in.r
11 * id: $Id: iop_dmc_in_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_dmc_in, type rw */
57#define reg_iop_dmc_in_rw_cfg___sth_intr___lsb 0
58#define reg_iop_dmc_in_rw_cfg___sth_intr___width 3
59#define reg_iop_dmc_in_rw_cfg___last_dis_dif___lsb 3
60#define reg_iop_dmc_in_rw_cfg___last_dis_dif___width 1
61#define reg_iop_dmc_in_rw_cfg___last_dis_dif___bit 3
62#define reg_iop_dmc_in_rw_cfg_offset 0
63
64/* Register rw_ctrl, scope iop_dmc_in, type rw */
65#define reg_iop_dmc_in_rw_ctrl___dif_en___lsb 0
66#define reg_iop_dmc_in_rw_ctrl___dif_en___width 1
67#define reg_iop_dmc_in_rw_ctrl___dif_en___bit 0
68#define reg_iop_dmc_in_rw_ctrl___dif_dis___lsb 1
69#define reg_iop_dmc_in_rw_ctrl___dif_dis___width 1
70#define reg_iop_dmc_in_rw_ctrl___dif_dis___bit 1
71#define reg_iop_dmc_in_rw_ctrl___stream_clr___lsb 2
72#define reg_iop_dmc_in_rw_ctrl___stream_clr___width 1
73#define reg_iop_dmc_in_rw_ctrl___stream_clr___bit 2
74#define reg_iop_dmc_in_rw_ctrl_offset 4
75
76/* Register r_stat, scope iop_dmc_in, type r */
77#define reg_iop_dmc_in_r_stat___dif_en___lsb 0
78#define reg_iop_dmc_in_r_stat___dif_en___width 1
79#define reg_iop_dmc_in_r_stat___dif_en___bit 0
80#define reg_iop_dmc_in_r_stat_offset 8
81
82/* Register rw_stream_cmd, scope iop_dmc_in, type rw */
83#define reg_iop_dmc_in_rw_stream_cmd___cmd___lsb 0
84#define reg_iop_dmc_in_rw_stream_cmd___cmd___width 10
85#define reg_iop_dmc_in_rw_stream_cmd___n___lsb 16
86#define reg_iop_dmc_in_rw_stream_cmd___n___width 8
87#define reg_iop_dmc_in_rw_stream_cmd_offset 12
88
89/* Register rw_stream_wr_data, scope iop_dmc_in, type rw */
90#define reg_iop_dmc_in_rw_stream_wr_data_offset 16
91
92/* Register rw_stream_wr_data_last, scope iop_dmc_in, type rw */
93#define reg_iop_dmc_in_rw_stream_wr_data_last_offset 20
94
95/* Register rw_stream_ctrl, scope iop_dmc_in, type rw */
96#define reg_iop_dmc_in_rw_stream_ctrl___eop___lsb 0
97#define reg_iop_dmc_in_rw_stream_ctrl___eop___width 1
98#define reg_iop_dmc_in_rw_stream_ctrl___eop___bit 0
99#define reg_iop_dmc_in_rw_stream_ctrl___wait___lsb 1
100#define reg_iop_dmc_in_rw_stream_ctrl___wait___width 1
101#define reg_iop_dmc_in_rw_stream_ctrl___wait___bit 1
102#define reg_iop_dmc_in_rw_stream_ctrl___keep_md___lsb 2
103#define reg_iop_dmc_in_rw_stream_ctrl___keep_md___width 1
104#define reg_iop_dmc_in_rw_stream_ctrl___keep_md___bit 2
105#define reg_iop_dmc_in_rw_stream_ctrl___size___lsb 3
106#define reg_iop_dmc_in_rw_stream_ctrl___size___width 3
107#define reg_iop_dmc_in_rw_stream_ctrl_offset 24
108
109/* Register r_stream_stat, scope iop_dmc_in, type r */
110#define reg_iop_dmc_in_r_stream_stat___sth___lsb 0
111#define reg_iop_dmc_in_r_stream_stat___sth___width 7
112#define reg_iop_dmc_in_r_stream_stat___full___lsb 16
113#define reg_iop_dmc_in_r_stream_stat___full___width 1
114#define reg_iop_dmc_in_r_stream_stat___full___bit 16
115#define reg_iop_dmc_in_r_stream_stat___last_pkt___lsb 17
116#define reg_iop_dmc_in_r_stream_stat___last_pkt___width 1
117#define reg_iop_dmc_in_r_stream_stat___last_pkt___bit 17
118#define reg_iop_dmc_in_r_stream_stat___data_md_valid___lsb 18
119#define reg_iop_dmc_in_r_stream_stat___data_md_valid___width 1
120#define reg_iop_dmc_in_r_stream_stat___data_md_valid___bit 18
121#define reg_iop_dmc_in_r_stream_stat___ctxt_md_valid___lsb 19
122#define reg_iop_dmc_in_r_stream_stat___ctxt_md_valid___width 1
123#define reg_iop_dmc_in_r_stream_stat___ctxt_md_valid___bit 19
124#define reg_iop_dmc_in_r_stream_stat___group_md_valid___lsb 20
125#define reg_iop_dmc_in_r_stream_stat___group_md_valid___width 1
126#define reg_iop_dmc_in_r_stream_stat___group_md_valid___bit 20
127#define reg_iop_dmc_in_r_stream_stat___stream_busy___lsb 21
128#define reg_iop_dmc_in_r_stream_stat___stream_busy___width 1
129#define reg_iop_dmc_in_r_stream_stat___stream_busy___bit 21
130#define reg_iop_dmc_in_r_stream_stat___cmd_rdy___lsb 22
131#define reg_iop_dmc_in_r_stream_stat___cmd_rdy___width 1
132#define reg_iop_dmc_in_r_stream_stat___cmd_rdy___bit 22
133#define reg_iop_dmc_in_r_stream_stat_offset 28
134
135/* Register r_data_descr, scope iop_dmc_in, type r */
136#define reg_iop_dmc_in_r_data_descr___ctrl___lsb 0
137#define reg_iop_dmc_in_r_data_descr___ctrl___width 8
138#define reg_iop_dmc_in_r_data_descr___stat___lsb 8
139#define reg_iop_dmc_in_r_data_descr___stat___width 8
140#define reg_iop_dmc_in_r_data_descr___md___lsb 16
141#define reg_iop_dmc_in_r_data_descr___md___width 16
142#define reg_iop_dmc_in_r_data_descr_offset 32
143
144/* Register r_ctxt_descr, scope iop_dmc_in, type r */
145#define reg_iop_dmc_in_r_ctxt_descr___ctrl___lsb 0
146#define reg_iop_dmc_in_r_ctxt_descr___ctrl___width 8
147#define reg_iop_dmc_in_r_ctxt_descr___stat___lsb 8
148#define reg_iop_dmc_in_r_ctxt_descr___stat___width 8
149#define reg_iop_dmc_in_r_ctxt_descr___md0___lsb 16
150#define reg_iop_dmc_in_r_ctxt_descr___md0___width 16
151#define reg_iop_dmc_in_r_ctxt_descr_offset 36
152
153/* Register r_ctxt_descr_md1, scope iop_dmc_in, type r */
154#define reg_iop_dmc_in_r_ctxt_descr_md1_offset 40
155
156/* Register r_ctxt_descr_md2, scope iop_dmc_in, type r */
157#define reg_iop_dmc_in_r_ctxt_descr_md2_offset 44
158
159/* Register r_group_descr, scope iop_dmc_in, type r */
160#define reg_iop_dmc_in_r_group_descr___ctrl___lsb 0
161#define reg_iop_dmc_in_r_group_descr___ctrl___width 8
162#define reg_iop_dmc_in_r_group_descr___stat___lsb 8
163#define reg_iop_dmc_in_r_group_descr___stat___width 8
164#define reg_iop_dmc_in_r_group_descr___md___lsb 16
165#define reg_iop_dmc_in_r_group_descr___md___width 16
166#define reg_iop_dmc_in_r_group_descr_offset 56
167
168/* Register rw_data_descr, scope iop_dmc_in, type rw */
169#define reg_iop_dmc_in_rw_data_descr___md___lsb 16
170#define reg_iop_dmc_in_rw_data_descr___md___width 16
171#define reg_iop_dmc_in_rw_data_descr_offset 60
172
173/* Register rw_ctxt_descr, scope iop_dmc_in, type rw */
174#define reg_iop_dmc_in_rw_ctxt_descr___md0___lsb 16
175#define reg_iop_dmc_in_rw_ctxt_descr___md0___width 16
176#define reg_iop_dmc_in_rw_ctxt_descr_offset 64
177
178/* Register rw_ctxt_descr_md1, scope iop_dmc_in, type rw */
179#define reg_iop_dmc_in_rw_ctxt_descr_md1_offset 68
180
181/* Register rw_ctxt_descr_md2, scope iop_dmc_in, type rw */
182#define reg_iop_dmc_in_rw_ctxt_descr_md2_offset 72
183
184/* Register rw_group_descr, scope iop_dmc_in, type rw */
185#define reg_iop_dmc_in_rw_group_descr___md___lsb 16
186#define reg_iop_dmc_in_rw_group_descr___md___width 16
187#define reg_iop_dmc_in_rw_group_descr_offset 84
188
189/* Register rw_intr_mask, scope iop_dmc_in, type rw */
190#define reg_iop_dmc_in_rw_intr_mask___data_md___lsb 0
191#define reg_iop_dmc_in_rw_intr_mask___data_md___width 1
192#define reg_iop_dmc_in_rw_intr_mask___data_md___bit 0
193#define reg_iop_dmc_in_rw_intr_mask___ctxt_md___lsb 1
194#define reg_iop_dmc_in_rw_intr_mask___ctxt_md___width 1
195#define reg_iop_dmc_in_rw_intr_mask___ctxt_md___bit 1
196#define reg_iop_dmc_in_rw_intr_mask___group_md___lsb 2
197#define reg_iop_dmc_in_rw_intr_mask___group_md___width 1
198#define reg_iop_dmc_in_rw_intr_mask___group_md___bit 2
199#define reg_iop_dmc_in_rw_intr_mask___cmd_rdy___lsb 3
200#define reg_iop_dmc_in_rw_intr_mask___cmd_rdy___width 1
201#define reg_iop_dmc_in_rw_intr_mask___cmd_rdy___bit 3
202#define reg_iop_dmc_in_rw_intr_mask___sth___lsb 4
203#define reg_iop_dmc_in_rw_intr_mask___sth___width 1
204#define reg_iop_dmc_in_rw_intr_mask___sth___bit 4
205#define reg_iop_dmc_in_rw_intr_mask___full___lsb 5
206#define reg_iop_dmc_in_rw_intr_mask___full___width 1
207#define reg_iop_dmc_in_rw_intr_mask___full___bit 5
208#define reg_iop_dmc_in_rw_intr_mask_offset 88
209
210/* Register rw_ack_intr, scope iop_dmc_in, type rw */
211#define reg_iop_dmc_in_rw_ack_intr___data_md___lsb 0
212#define reg_iop_dmc_in_rw_ack_intr___data_md___width 1
213#define reg_iop_dmc_in_rw_ack_intr___data_md___bit 0
214#define reg_iop_dmc_in_rw_ack_intr___ctxt_md___lsb 1
215#define reg_iop_dmc_in_rw_ack_intr___ctxt_md___width 1
216#define reg_iop_dmc_in_rw_ack_intr___ctxt_md___bit 1
217#define reg_iop_dmc_in_rw_ack_intr___group_md___lsb 2
218#define reg_iop_dmc_in_rw_ack_intr___group_md___width 1
219#define reg_iop_dmc_in_rw_ack_intr___group_md___bit 2
220#define reg_iop_dmc_in_rw_ack_intr___cmd_rdy___lsb 3
221#define reg_iop_dmc_in_rw_ack_intr___cmd_rdy___width 1
222#define reg_iop_dmc_in_rw_ack_intr___cmd_rdy___bit 3
223#define reg_iop_dmc_in_rw_ack_intr___sth___lsb 4
224#define reg_iop_dmc_in_rw_ack_intr___sth___width 1
225#define reg_iop_dmc_in_rw_ack_intr___sth___bit 4
226#define reg_iop_dmc_in_rw_ack_intr___full___lsb 5
227#define reg_iop_dmc_in_rw_ack_intr___full___width 1
228#define reg_iop_dmc_in_rw_ack_intr___full___bit 5
229#define reg_iop_dmc_in_rw_ack_intr_offset 92
230
231/* Register r_intr, scope iop_dmc_in, type r */
232#define reg_iop_dmc_in_r_intr___data_md___lsb 0
233#define reg_iop_dmc_in_r_intr___data_md___width 1
234#define reg_iop_dmc_in_r_intr___data_md___bit 0
235#define reg_iop_dmc_in_r_intr___ctxt_md___lsb 1
236#define reg_iop_dmc_in_r_intr___ctxt_md___width 1
237#define reg_iop_dmc_in_r_intr___ctxt_md___bit 1
238#define reg_iop_dmc_in_r_intr___group_md___lsb 2
239#define reg_iop_dmc_in_r_intr___group_md___width 1
240#define reg_iop_dmc_in_r_intr___group_md___bit 2
241#define reg_iop_dmc_in_r_intr___cmd_rdy___lsb 3
242#define reg_iop_dmc_in_r_intr___cmd_rdy___width 1
243#define reg_iop_dmc_in_r_intr___cmd_rdy___bit 3
244#define reg_iop_dmc_in_r_intr___sth___lsb 4
245#define reg_iop_dmc_in_r_intr___sth___width 1
246#define reg_iop_dmc_in_r_intr___sth___bit 4
247#define reg_iop_dmc_in_r_intr___full___lsb 5
248#define reg_iop_dmc_in_r_intr___full___width 1
249#define reg_iop_dmc_in_r_intr___full___bit 5
250#define reg_iop_dmc_in_r_intr_offset 96
251
252/* Register r_masked_intr, scope iop_dmc_in, type r */
253#define reg_iop_dmc_in_r_masked_intr___data_md___lsb 0
254#define reg_iop_dmc_in_r_masked_intr___data_md___width 1
255#define reg_iop_dmc_in_r_masked_intr___data_md___bit 0
256#define reg_iop_dmc_in_r_masked_intr___ctxt_md___lsb 1
257#define reg_iop_dmc_in_r_masked_intr___ctxt_md___width 1
258#define reg_iop_dmc_in_r_masked_intr___ctxt_md___bit 1
259#define reg_iop_dmc_in_r_masked_intr___group_md___lsb 2
260#define reg_iop_dmc_in_r_masked_intr___group_md___width 1
261#define reg_iop_dmc_in_r_masked_intr___group_md___bit 2
262#define reg_iop_dmc_in_r_masked_intr___cmd_rdy___lsb 3
263#define reg_iop_dmc_in_r_masked_intr___cmd_rdy___width 1
264#define reg_iop_dmc_in_r_masked_intr___cmd_rdy___bit 3
265#define reg_iop_dmc_in_r_masked_intr___sth___lsb 4
266#define reg_iop_dmc_in_r_masked_intr___sth___width 1
267#define reg_iop_dmc_in_r_masked_intr___sth___bit 4
268#define reg_iop_dmc_in_r_masked_intr___full___lsb 5
269#define reg_iop_dmc_in_r_masked_intr___full___width 1
270#define reg_iop_dmc_in_r_masked_intr___full___bit 5
271#define reg_iop_dmc_in_r_masked_intr_offset 100
272
273
274/* Constants */
275#define regk_iop_dmc_in_ack_pkt 0x00000100
276#define regk_iop_dmc_in_array 0x00000008
277#define regk_iop_dmc_in_burst 0x00000020
278#define regk_iop_dmc_in_copy_next 0x00000010
279#define regk_iop_dmc_in_copy_up 0x00000020
280#define regk_iop_dmc_in_dis_c 0x00000010
281#define regk_iop_dmc_in_dis_g 0x00000020
282#define regk_iop_dmc_in_lim1 0x00000000
283#define regk_iop_dmc_in_lim16 0x00000004
284#define regk_iop_dmc_in_lim2 0x00000001
285#define regk_iop_dmc_in_lim32 0x00000005
286#define regk_iop_dmc_in_lim4 0x00000002
287#define regk_iop_dmc_in_lim64 0x00000006
288#define regk_iop_dmc_in_lim8 0x00000003
289#define regk_iop_dmc_in_load_c 0x00000200
290#define regk_iop_dmc_in_load_c_n 0x00000280
291#define regk_iop_dmc_in_load_c_next 0x00000240
292#define regk_iop_dmc_in_load_d 0x00000140
293#define regk_iop_dmc_in_load_g 0x00000300
294#define regk_iop_dmc_in_load_g_down 0x000003c0
295#define regk_iop_dmc_in_load_g_next 0x00000340
296#define regk_iop_dmc_in_load_g_up 0x00000380
297#define regk_iop_dmc_in_next_en 0x00000010
298#define regk_iop_dmc_in_next_pkt 0x00000010
299#define regk_iop_dmc_in_no 0x00000000
300#define regk_iop_dmc_in_restore 0x00000020
301#define regk_iop_dmc_in_rw_cfg_default 0x00000000
302#define regk_iop_dmc_in_rw_ctxt_descr_default 0x00000000
303#define regk_iop_dmc_in_rw_ctxt_descr_md1_default 0x00000000
304#define regk_iop_dmc_in_rw_ctxt_descr_md2_default 0x00000000
305#define regk_iop_dmc_in_rw_data_descr_default 0x00000000
306#define regk_iop_dmc_in_rw_group_descr_default 0x00000000
307#define regk_iop_dmc_in_rw_intr_mask_default 0x00000000
308#define regk_iop_dmc_in_rw_stream_ctrl_default 0x00000000
309#define regk_iop_dmc_in_save_down 0x00000020
310#define regk_iop_dmc_in_save_up 0x00000020
311#define regk_iop_dmc_in_set_reg 0x00000050
312#define regk_iop_dmc_in_set_w_size1 0x00000190
313#define regk_iop_dmc_in_set_w_size2 0x000001a0
314#define regk_iop_dmc_in_set_w_size4 0x000001c0
315#define regk_iop_dmc_in_store_c 0x00000002
316#define regk_iop_dmc_in_store_descr 0x00000000
317#define regk_iop_dmc_in_store_g 0x00000004
318#define regk_iop_dmc_in_store_md 0x00000001
319#define regk_iop_dmc_in_update_down 0x00000020
320#define regk_iop_dmc_in_yes 0x00000001
321#endif /* __iop_dmc_in_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_out_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_out_defs_asm.h
deleted file mode 100644
index 9fe1a8054371..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_out_defs_asm.h
+++ /dev/null
@@ -1,349 +0,0 @@
1#ifndef __iop_dmc_out_defs_asm_h
2#define __iop_dmc_out_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_dmc_out.r
7 * id: iop_dmc_out.r,v 1.30 2005/02/16 09:14:11 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_dmc_out_defs_asm.h ../../inst/io_proc/rtl/iop_dmc_out.r
11 * id: $Id: iop_dmc_out_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_dmc_out, type rw */
57#define reg_iop_dmc_out_rw_cfg___trf_lim___lsb 0
58#define reg_iop_dmc_out_rw_cfg___trf_lim___width 16
59#define reg_iop_dmc_out_rw_cfg___last_at_trf_lim___lsb 16
60#define reg_iop_dmc_out_rw_cfg___last_at_trf_lim___width 1
61#define reg_iop_dmc_out_rw_cfg___last_at_trf_lim___bit 16
62#define reg_iop_dmc_out_rw_cfg___dth_intr___lsb 17
63#define reg_iop_dmc_out_rw_cfg___dth_intr___width 3
64#define reg_iop_dmc_out_rw_cfg_offset 0
65
66/* Register rw_ctrl, scope iop_dmc_out, type rw */
67#define reg_iop_dmc_out_rw_ctrl___dif_en___lsb 0
68#define reg_iop_dmc_out_rw_ctrl___dif_en___width 1
69#define reg_iop_dmc_out_rw_ctrl___dif_en___bit 0
70#define reg_iop_dmc_out_rw_ctrl___dif_dis___lsb 1
71#define reg_iop_dmc_out_rw_ctrl___dif_dis___width 1
72#define reg_iop_dmc_out_rw_ctrl___dif_dis___bit 1
73#define reg_iop_dmc_out_rw_ctrl_offset 4
74
75/* Register r_stat, scope iop_dmc_out, type r */
76#define reg_iop_dmc_out_r_stat___dif_en___lsb 0
77#define reg_iop_dmc_out_r_stat___dif_en___width 1
78#define reg_iop_dmc_out_r_stat___dif_en___bit 0
79#define reg_iop_dmc_out_r_stat_offset 8
80
81/* Register rw_stream_cmd, scope iop_dmc_out, type rw */
82#define reg_iop_dmc_out_rw_stream_cmd___cmd___lsb 0
83#define reg_iop_dmc_out_rw_stream_cmd___cmd___width 10
84#define reg_iop_dmc_out_rw_stream_cmd___n___lsb 16
85#define reg_iop_dmc_out_rw_stream_cmd___n___width 8
86#define reg_iop_dmc_out_rw_stream_cmd_offset 12
87
88/* Register rs_stream_data, scope iop_dmc_out, type rs */
89#define reg_iop_dmc_out_rs_stream_data_offset 16
90
91/* Register r_stream_data, scope iop_dmc_out, type r */
92#define reg_iop_dmc_out_r_stream_data_offset 20
93
94/* Register r_stream_stat, scope iop_dmc_out, type r */
95#define reg_iop_dmc_out_r_stream_stat___dth___lsb 0
96#define reg_iop_dmc_out_r_stream_stat___dth___width 7
97#define reg_iop_dmc_out_r_stream_stat___dv___lsb 16
98#define reg_iop_dmc_out_r_stream_stat___dv___width 1
99#define reg_iop_dmc_out_r_stream_stat___dv___bit 16
100#define reg_iop_dmc_out_r_stream_stat___all_avail___lsb 17
101#define reg_iop_dmc_out_r_stream_stat___all_avail___width 1
102#define reg_iop_dmc_out_r_stream_stat___all_avail___bit 17
103#define reg_iop_dmc_out_r_stream_stat___last___lsb 18
104#define reg_iop_dmc_out_r_stream_stat___last___width 1
105#define reg_iop_dmc_out_r_stream_stat___last___bit 18
106#define reg_iop_dmc_out_r_stream_stat___size___lsb 19
107#define reg_iop_dmc_out_r_stream_stat___size___width 3
108#define reg_iop_dmc_out_r_stream_stat___data_md_valid___lsb 22
109#define reg_iop_dmc_out_r_stream_stat___data_md_valid___width 1
110#define reg_iop_dmc_out_r_stream_stat___data_md_valid___bit 22
111#define reg_iop_dmc_out_r_stream_stat___ctxt_md_valid___lsb 23
112#define reg_iop_dmc_out_r_stream_stat___ctxt_md_valid___width 1
113#define reg_iop_dmc_out_r_stream_stat___ctxt_md_valid___bit 23
114#define reg_iop_dmc_out_r_stream_stat___group_md_valid___lsb 24
115#define reg_iop_dmc_out_r_stream_stat___group_md_valid___width 1
116#define reg_iop_dmc_out_r_stream_stat___group_md_valid___bit 24
117#define reg_iop_dmc_out_r_stream_stat___stream_busy___lsb 25
118#define reg_iop_dmc_out_r_stream_stat___stream_busy___width 1
119#define reg_iop_dmc_out_r_stream_stat___stream_busy___bit 25
120#define reg_iop_dmc_out_r_stream_stat___cmd_rdy___lsb 26
121#define reg_iop_dmc_out_r_stream_stat___cmd_rdy___width 1
122#define reg_iop_dmc_out_r_stream_stat___cmd_rdy___bit 26
123#define reg_iop_dmc_out_r_stream_stat___cmd_rq___lsb 27
124#define reg_iop_dmc_out_r_stream_stat___cmd_rq___width 1
125#define reg_iop_dmc_out_r_stream_stat___cmd_rq___bit 27
126#define reg_iop_dmc_out_r_stream_stat_offset 24
127
128/* Register r_data_descr, scope iop_dmc_out, type r */
129#define reg_iop_dmc_out_r_data_descr___ctrl___lsb 0
130#define reg_iop_dmc_out_r_data_descr___ctrl___width 8
131#define reg_iop_dmc_out_r_data_descr___stat___lsb 8
132#define reg_iop_dmc_out_r_data_descr___stat___width 8
133#define reg_iop_dmc_out_r_data_descr___md___lsb 16
134#define reg_iop_dmc_out_r_data_descr___md___width 16
135#define reg_iop_dmc_out_r_data_descr_offset 28
136
137/* Register r_ctxt_descr, scope iop_dmc_out, type r */
138#define reg_iop_dmc_out_r_ctxt_descr___ctrl___lsb 0
139#define reg_iop_dmc_out_r_ctxt_descr___ctrl___width 8
140#define reg_iop_dmc_out_r_ctxt_descr___stat___lsb 8
141#define reg_iop_dmc_out_r_ctxt_descr___stat___width 8
142#define reg_iop_dmc_out_r_ctxt_descr___md0___lsb 16
143#define reg_iop_dmc_out_r_ctxt_descr___md0___width 16
144#define reg_iop_dmc_out_r_ctxt_descr_offset 32
145
146/* Register r_ctxt_descr_md1, scope iop_dmc_out, type r */
147#define reg_iop_dmc_out_r_ctxt_descr_md1_offset 36
148
149/* Register r_ctxt_descr_md2, scope iop_dmc_out, type r */
150#define reg_iop_dmc_out_r_ctxt_descr_md2_offset 40
151
152/* Register r_group_descr, scope iop_dmc_out, type r */
153#define reg_iop_dmc_out_r_group_descr___ctrl___lsb 0
154#define reg_iop_dmc_out_r_group_descr___ctrl___width 8
155#define reg_iop_dmc_out_r_group_descr___stat___lsb 8
156#define reg_iop_dmc_out_r_group_descr___stat___width 8
157#define reg_iop_dmc_out_r_group_descr___md___lsb 16
158#define reg_iop_dmc_out_r_group_descr___md___width 16
159#define reg_iop_dmc_out_r_group_descr_offset 52
160
161/* Register rw_data_descr, scope iop_dmc_out, type rw */
162#define reg_iop_dmc_out_rw_data_descr___md___lsb 16
163#define reg_iop_dmc_out_rw_data_descr___md___width 16
164#define reg_iop_dmc_out_rw_data_descr_offset 56
165
166/* Register rw_ctxt_descr, scope iop_dmc_out, type rw */
167#define reg_iop_dmc_out_rw_ctxt_descr___md0___lsb 16
168#define reg_iop_dmc_out_rw_ctxt_descr___md0___width 16
169#define reg_iop_dmc_out_rw_ctxt_descr_offset 60
170
171/* Register rw_ctxt_descr_md1, scope iop_dmc_out, type rw */
172#define reg_iop_dmc_out_rw_ctxt_descr_md1_offset 64
173
174/* Register rw_ctxt_descr_md2, scope iop_dmc_out, type rw */
175#define reg_iop_dmc_out_rw_ctxt_descr_md2_offset 68
176
177/* Register rw_group_descr, scope iop_dmc_out, type rw */
178#define reg_iop_dmc_out_rw_group_descr___md___lsb 16
179#define reg_iop_dmc_out_rw_group_descr___md___width 16
180#define reg_iop_dmc_out_rw_group_descr_offset 80
181
182/* Register rw_intr_mask, scope iop_dmc_out, type rw */
183#define reg_iop_dmc_out_rw_intr_mask___data_md___lsb 0
184#define reg_iop_dmc_out_rw_intr_mask___data_md___width 1
185#define reg_iop_dmc_out_rw_intr_mask___data_md___bit 0
186#define reg_iop_dmc_out_rw_intr_mask___ctxt_md___lsb 1
187#define reg_iop_dmc_out_rw_intr_mask___ctxt_md___width 1
188#define reg_iop_dmc_out_rw_intr_mask___ctxt_md___bit 1
189#define reg_iop_dmc_out_rw_intr_mask___group_md___lsb 2
190#define reg_iop_dmc_out_rw_intr_mask___group_md___width 1
191#define reg_iop_dmc_out_rw_intr_mask___group_md___bit 2
192#define reg_iop_dmc_out_rw_intr_mask___cmd_rdy___lsb 3
193#define reg_iop_dmc_out_rw_intr_mask___cmd_rdy___width 1
194#define reg_iop_dmc_out_rw_intr_mask___cmd_rdy___bit 3
195#define reg_iop_dmc_out_rw_intr_mask___dth___lsb 4
196#define reg_iop_dmc_out_rw_intr_mask___dth___width 1
197#define reg_iop_dmc_out_rw_intr_mask___dth___bit 4
198#define reg_iop_dmc_out_rw_intr_mask___dv___lsb 5
199#define reg_iop_dmc_out_rw_intr_mask___dv___width 1
200#define reg_iop_dmc_out_rw_intr_mask___dv___bit 5
201#define reg_iop_dmc_out_rw_intr_mask___last_data___lsb 6
202#define reg_iop_dmc_out_rw_intr_mask___last_data___width 1
203#define reg_iop_dmc_out_rw_intr_mask___last_data___bit 6
204#define reg_iop_dmc_out_rw_intr_mask___trf_lim___lsb 7
205#define reg_iop_dmc_out_rw_intr_mask___trf_lim___width 1
206#define reg_iop_dmc_out_rw_intr_mask___trf_lim___bit 7
207#define reg_iop_dmc_out_rw_intr_mask___cmd_rq___lsb 8
208#define reg_iop_dmc_out_rw_intr_mask___cmd_rq___width 1
209#define reg_iop_dmc_out_rw_intr_mask___cmd_rq___bit 8
210#define reg_iop_dmc_out_rw_intr_mask_offset 84
211
212/* Register rw_ack_intr, scope iop_dmc_out, type rw */
213#define reg_iop_dmc_out_rw_ack_intr___data_md___lsb 0
214#define reg_iop_dmc_out_rw_ack_intr___data_md___width 1
215#define reg_iop_dmc_out_rw_ack_intr___data_md___bit 0
216#define reg_iop_dmc_out_rw_ack_intr___ctxt_md___lsb 1
217#define reg_iop_dmc_out_rw_ack_intr___ctxt_md___width 1
218#define reg_iop_dmc_out_rw_ack_intr___ctxt_md___bit 1
219#define reg_iop_dmc_out_rw_ack_intr___group_md___lsb 2
220#define reg_iop_dmc_out_rw_ack_intr___group_md___width 1
221#define reg_iop_dmc_out_rw_ack_intr___group_md___bit 2
222#define reg_iop_dmc_out_rw_ack_intr___cmd_rdy___lsb 3
223#define reg_iop_dmc_out_rw_ack_intr___cmd_rdy___width 1
224#define reg_iop_dmc_out_rw_ack_intr___cmd_rdy___bit 3
225#define reg_iop_dmc_out_rw_ack_intr___dth___lsb 4
226#define reg_iop_dmc_out_rw_ack_intr___dth___width 1
227#define reg_iop_dmc_out_rw_ack_intr___dth___bit 4
228#define reg_iop_dmc_out_rw_ack_intr___dv___lsb 5
229#define reg_iop_dmc_out_rw_ack_intr___dv___width 1
230#define reg_iop_dmc_out_rw_ack_intr___dv___bit 5
231#define reg_iop_dmc_out_rw_ack_intr___last_data___lsb 6
232#define reg_iop_dmc_out_rw_ack_intr___last_data___width 1
233#define reg_iop_dmc_out_rw_ack_intr___last_data___bit 6
234#define reg_iop_dmc_out_rw_ack_intr___trf_lim___lsb 7
235#define reg_iop_dmc_out_rw_ack_intr___trf_lim___width 1
236#define reg_iop_dmc_out_rw_ack_intr___trf_lim___bit 7
237#define reg_iop_dmc_out_rw_ack_intr___cmd_rq___lsb 8
238#define reg_iop_dmc_out_rw_ack_intr___cmd_rq___width 1
239#define reg_iop_dmc_out_rw_ack_intr___cmd_rq___bit 8
240#define reg_iop_dmc_out_rw_ack_intr_offset 88
241
242/* Register r_intr, scope iop_dmc_out, type r */
243#define reg_iop_dmc_out_r_intr___data_md___lsb 0
244#define reg_iop_dmc_out_r_intr___data_md___width 1
245#define reg_iop_dmc_out_r_intr___data_md___bit 0
246#define reg_iop_dmc_out_r_intr___ctxt_md___lsb 1
247#define reg_iop_dmc_out_r_intr___ctxt_md___width 1
248#define reg_iop_dmc_out_r_intr___ctxt_md___bit 1
249#define reg_iop_dmc_out_r_intr___group_md___lsb 2
250#define reg_iop_dmc_out_r_intr___group_md___width 1
251#define reg_iop_dmc_out_r_intr___group_md___bit 2
252#define reg_iop_dmc_out_r_intr___cmd_rdy___lsb 3
253#define reg_iop_dmc_out_r_intr___cmd_rdy___width 1
254#define reg_iop_dmc_out_r_intr___cmd_rdy___bit 3
255#define reg_iop_dmc_out_r_intr___dth___lsb 4
256#define reg_iop_dmc_out_r_intr___dth___width 1
257#define reg_iop_dmc_out_r_intr___dth___bit 4
258#define reg_iop_dmc_out_r_intr___dv___lsb 5
259#define reg_iop_dmc_out_r_intr___dv___width 1
260#define reg_iop_dmc_out_r_intr___dv___bit 5
261#define reg_iop_dmc_out_r_intr___last_data___lsb 6
262#define reg_iop_dmc_out_r_intr___last_data___width 1
263#define reg_iop_dmc_out_r_intr___last_data___bit 6
264#define reg_iop_dmc_out_r_intr___trf_lim___lsb 7
265#define reg_iop_dmc_out_r_intr___trf_lim___width 1
266#define reg_iop_dmc_out_r_intr___trf_lim___bit 7
267#define reg_iop_dmc_out_r_intr___cmd_rq___lsb 8
268#define reg_iop_dmc_out_r_intr___cmd_rq___width 1
269#define reg_iop_dmc_out_r_intr___cmd_rq___bit 8
270#define reg_iop_dmc_out_r_intr_offset 92
271
272/* Register r_masked_intr, scope iop_dmc_out, type r */
273#define reg_iop_dmc_out_r_masked_intr___data_md___lsb 0
274#define reg_iop_dmc_out_r_masked_intr___data_md___width 1
275#define reg_iop_dmc_out_r_masked_intr___data_md___bit 0
276#define reg_iop_dmc_out_r_masked_intr___ctxt_md___lsb 1
277#define reg_iop_dmc_out_r_masked_intr___ctxt_md___width 1
278#define reg_iop_dmc_out_r_masked_intr___ctxt_md___bit 1
279#define reg_iop_dmc_out_r_masked_intr___group_md___lsb 2
280#define reg_iop_dmc_out_r_masked_intr___group_md___width 1
281#define reg_iop_dmc_out_r_masked_intr___group_md___bit 2
282#define reg_iop_dmc_out_r_masked_intr___cmd_rdy___lsb 3
283#define reg_iop_dmc_out_r_masked_intr___cmd_rdy___width 1
284#define reg_iop_dmc_out_r_masked_intr___cmd_rdy___bit 3
285#define reg_iop_dmc_out_r_masked_intr___dth___lsb 4
286#define reg_iop_dmc_out_r_masked_intr___dth___width 1
287#define reg_iop_dmc_out_r_masked_intr___dth___bit 4
288#define reg_iop_dmc_out_r_masked_intr___dv___lsb 5
289#define reg_iop_dmc_out_r_masked_intr___dv___width 1
290#define reg_iop_dmc_out_r_masked_intr___dv___bit 5
291#define reg_iop_dmc_out_r_masked_intr___last_data___lsb 6
292#define reg_iop_dmc_out_r_masked_intr___last_data___width 1
293#define reg_iop_dmc_out_r_masked_intr___last_data___bit 6
294#define reg_iop_dmc_out_r_masked_intr___trf_lim___lsb 7
295#define reg_iop_dmc_out_r_masked_intr___trf_lim___width 1
296#define reg_iop_dmc_out_r_masked_intr___trf_lim___bit 7
297#define reg_iop_dmc_out_r_masked_intr___cmd_rq___lsb 8
298#define reg_iop_dmc_out_r_masked_intr___cmd_rq___width 1
299#define reg_iop_dmc_out_r_masked_intr___cmd_rq___bit 8
300#define reg_iop_dmc_out_r_masked_intr_offset 96
301
302
303/* Constants */
304#define regk_iop_dmc_out_ack_pkt 0x00000100
305#define regk_iop_dmc_out_array 0x00000008
306#define regk_iop_dmc_out_burst 0x00000020
307#define regk_iop_dmc_out_copy_next 0x00000010
308#define regk_iop_dmc_out_copy_up 0x00000020
309#define regk_iop_dmc_out_dis_c 0x00000010
310#define regk_iop_dmc_out_dis_g 0x00000020
311#define regk_iop_dmc_out_lim1 0x00000000
312#define regk_iop_dmc_out_lim16 0x00000004
313#define regk_iop_dmc_out_lim2 0x00000001
314#define regk_iop_dmc_out_lim32 0x00000005
315#define regk_iop_dmc_out_lim4 0x00000002
316#define regk_iop_dmc_out_lim64 0x00000006
317#define regk_iop_dmc_out_lim8 0x00000003
318#define regk_iop_dmc_out_load_c 0x00000200
319#define regk_iop_dmc_out_load_c_n 0x00000280
320#define regk_iop_dmc_out_load_c_next 0x00000240
321#define regk_iop_dmc_out_load_d 0x00000140
322#define regk_iop_dmc_out_load_g 0x00000300
323#define regk_iop_dmc_out_load_g_down 0x000003c0
324#define regk_iop_dmc_out_load_g_next 0x00000340
325#define regk_iop_dmc_out_load_g_up 0x00000380
326#define regk_iop_dmc_out_next_en 0x00000010
327#define regk_iop_dmc_out_next_pkt 0x00000010
328#define regk_iop_dmc_out_no 0x00000000
329#define regk_iop_dmc_out_restore 0x00000020
330#define regk_iop_dmc_out_rw_cfg_default 0x00000000
331#define regk_iop_dmc_out_rw_ctxt_descr_default 0x00000000
332#define regk_iop_dmc_out_rw_ctxt_descr_md1_default 0x00000000
333#define regk_iop_dmc_out_rw_ctxt_descr_md2_default 0x00000000
334#define regk_iop_dmc_out_rw_data_descr_default 0x00000000
335#define regk_iop_dmc_out_rw_group_descr_default 0x00000000
336#define regk_iop_dmc_out_rw_intr_mask_default 0x00000000
337#define regk_iop_dmc_out_save_down 0x00000020
338#define regk_iop_dmc_out_save_up 0x00000020
339#define regk_iop_dmc_out_set_reg 0x00000050
340#define regk_iop_dmc_out_set_w_size1 0x00000190
341#define regk_iop_dmc_out_set_w_size2 0x000001a0
342#define regk_iop_dmc_out_set_w_size4 0x000001c0
343#define regk_iop_dmc_out_store_c 0x00000002
344#define regk_iop_dmc_out_store_descr 0x00000000
345#define regk_iop_dmc_out_store_g 0x00000004
346#define regk_iop_dmc_out_store_md 0x00000001
347#define regk_iop_dmc_out_update_down 0x00000020
348#define regk_iop_dmc_out_yes 0x00000001
349#endif /* __iop_dmc_out_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_defs_asm.h
deleted file mode 100644
index 974dee082f9f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_defs_asm.h
+++ /dev/null
@@ -1,234 +0,0 @@
1#ifndef __iop_fifo_in_defs_asm_h
2#define __iop_fifo_in_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_in.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:07 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_fifo_in_defs_asm.h ../../inst/io_proc/rtl/iop_fifo_in.r
11 * id: $Id: iop_fifo_in_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_fifo_in, type rw */
57#define reg_iop_fifo_in_rw_cfg___avail_lim___lsb 0
58#define reg_iop_fifo_in_rw_cfg___avail_lim___width 3
59#define reg_iop_fifo_in_rw_cfg___byte_order___lsb 3
60#define reg_iop_fifo_in_rw_cfg___byte_order___width 2
61#define reg_iop_fifo_in_rw_cfg___trig___lsb 5
62#define reg_iop_fifo_in_rw_cfg___trig___width 2
63#define reg_iop_fifo_in_rw_cfg___last_dis_dif_in___lsb 7
64#define reg_iop_fifo_in_rw_cfg___last_dis_dif_in___width 1
65#define reg_iop_fifo_in_rw_cfg___last_dis_dif_in___bit 7
66#define reg_iop_fifo_in_rw_cfg___mode___lsb 8
67#define reg_iop_fifo_in_rw_cfg___mode___width 2
68#define reg_iop_fifo_in_rw_cfg_offset 0
69
70/* Register rw_ctrl, scope iop_fifo_in, type rw */
71#define reg_iop_fifo_in_rw_ctrl___dif_in_en___lsb 0
72#define reg_iop_fifo_in_rw_ctrl___dif_in_en___width 1
73#define reg_iop_fifo_in_rw_ctrl___dif_in_en___bit 0
74#define reg_iop_fifo_in_rw_ctrl___dif_out_en___lsb 1
75#define reg_iop_fifo_in_rw_ctrl___dif_out_en___width 1
76#define reg_iop_fifo_in_rw_ctrl___dif_out_en___bit 1
77#define reg_iop_fifo_in_rw_ctrl_offset 4
78
79/* Register r_stat, scope iop_fifo_in, type r */
80#define reg_iop_fifo_in_r_stat___avail_bytes___lsb 0
81#define reg_iop_fifo_in_r_stat___avail_bytes___width 4
82#define reg_iop_fifo_in_r_stat___last___lsb 4
83#define reg_iop_fifo_in_r_stat___last___width 8
84#define reg_iop_fifo_in_r_stat___dif_in_en___lsb 12
85#define reg_iop_fifo_in_r_stat___dif_in_en___width 1
86#define reg_iop_fifo_in_r_stat___dif_in_en___bit 12
87#define reg_iop_fifo_in_r_stat___dif_out_en___lsb 13
88#define reg_iop_fifo_in_r_stat___dif_out_en___width 1
89#define reg_iop_fifo_in_r_stat___dif_out_en___bit 13
90#define reg_iop_fifo_in_r_stat_offset 8
91
92/* Register rs_rd1byte, scope iop_fifo_in, type rs */
93#define reg_iop_fifo_in_rs_rd1byte___data___lsb 0
94#define reg_iop_fifo_in_rs_rd1byte___data___width 8
95#define reg_iop_fifo_in_rs_rd1byte_offset 12
96
97/* Register r_rd1byte, scope iop_fifo_in, type r */
98#define reg_iop_fifo_in_r_rd1byte___data___lsb 0
99#define reg_iop_fifo_in_r_rd1byte___data___width 8
100#define reg_iop_fifo_in_r_rd1byte_offset 16
101
102/* Register rs_rd2byte, scope iop_fifo_in, type rs */
103#define reg_iop_fifo_in_rs_rd2byte___data___lsb 0
104#define reg_iop_fifo_in_rs_rd2byte___data___width 16
105#define reg_iop_fifo_in_rs_rd2byte_offset 20
106
107/* Register r_rd2byte, scope iop_fifo_in, type r */
108#define reg_iop_fifo_in_r_rd2byte___data___lsb 0
109#define reg_iop_fifo_in_r_rd2byte___data___width 16
110#define reg_iop_fifo_in_r_rd2byte_offset 24
111
112/* Register rs_rd3byte, scope iop_fifo_in, type rs */
113#define reg_iop_fifo_in_rs_rd3byte___data___lsb 0
114#define reg_iop_fifo_in_rs_rd3byte___data___width 24
115#define reg_iop_fifo_in_rs_rd3byte_offset 28
116
117/* Register r_rd3byte, scope iop_fifo_in, type r */
118#define reg_iop_fifo_in_r_rd3byte___data___lsb 0
119#define reg_iop_fifo_in_r_rd3byte___data___width 24
120#define reg_iop_fifo_in_r_rd3byte_offset 32
121
122/* Register rs_rd4byte, scope iop_fifo_in, type rs */
123#define reg_iop_fifo_in_rs_rd4byte___data___lsb 0
124#define reg_iop_fifo_in_rs_rd4byte___data___width 32
125#define reg_iop_fifo_in_rs_rd4byte_offset 36
126
127/* Register r_rd4byte, scope iop_fifo_in, type r */
128#define reg_iop_fifo_in_r_rd4byte___data___lsb 0
129#define reg_iop_fifo_in_r_rd4byte___data___width 32
130#define reg_iop_fifo_in_r_rd4byte_offset 40
131
132/* Register rw_set_last, scope iop_fifo_in, type rw */
133#define reg_iop_fifo_in_rw_set_last_offset 44
134
135/* Register rw_strb_dif_in, scope iop_fifo_in, type rw */
136#define reg_iop_fifo_in_rw_strb_dif_in___last___lsb 0
137#define reg_iop_fifo_in_rw_strb_dif_in___last___width 2
138#define reg_iop_fifo_in_rw_strb_dif_in_offset 48
139
140/* Register rw_intr_mask, scope iop_fifo_in, type rw */
141#define reg_iop_fifo_in_rw_intr_mask___urun___lsb 0
142#define reg_iop_fifo_in_rw_intr_mask___urun___width 1
143#define reg_iop_fifo_in_rw_intr_mask___urun___bit 0
144#define reg_iop_fifo_in_rw_intr_mask___last_data___lsb 1
145#define reg_iop_fifo_in_rw_intr_mask___last_data___width 1
146#define reg_iop_fifo_in_rw_intr_mask___last_data___bit 1
147#define reg_iop_fifo_in_rw_intr_mask___dav___lsb 2
148#define reg_iop_fifo_in_rw_intr_mask___dav___width 1
149#define reg_iop_fifo_in_rw_intr_mask___dav___bit 2
150#define reg_iop_fifo_in_rw_intr_mask___avail___lsb 3
151#define reg_iop_fifo_in_rw_intr_mask___avail___width 1
152#define reg_iop_fifo_in_rw_intr_mask___avail___bit 3
153#define reg_iop_fifo_in_rw_intr_mask___orun___lsb 4
154#define reg_iop_fifo_in_rw_intr_mask___orun___width 1
155#define reg_iop_fifo_in_rw_intr_mask___orun___bit 4
156#define reg_iop_fifo_in_rw_intr_mask_offset 52
157
158/* Register rw_ack_intr, scope iop_fifo_in, type rw */
159#define reg_iop_fifo_in_rw_ack_intr___urun___lsb 0
160#define reg_iop_fifo_in_rw_ack_intr___urun___width 1
161#define reg_iop_fifo_in_rw_ack_intr___urun___bit 0
162#define reg_iop_fifo_in_rw_ack_intr___last_data___lsb 1
163#define reg_iop_fifo_in_rw_ack_intr___last_data___width 1
164#define reg_iop_fifo_in_rw_ack_intr___last_data___bit 1
165#define reg_iop_fifo_in_rw_ack_intr___dav___lsb 2
166#define reg_iop_fifo_in_rw_ack_intr___dav___width 1
167#define reg_iop_fifo_in_rw_ack_intr___dav___bit 2
168#define reg_iop_fifo_in_rw_ack_intr___avail___lsb 3
169#define reg_iop_fifo_in_rw_ack_intr___avail___width 1
170#define reg_iop_fifo_in_rw_ack_intr___avail___bit 3
171#define reg_iop_fifo_in_rw_ack_intr___orun___lsb 4
172#define reg_iop_fifo_in_rw_ack_intr___orun___width 1
173#define reg_iop_fifo_in_rw_ack_intr___orun___bit 4
174#define reg_iop_fifo_in_rw_ack_intr_offset 56
175
176/* Register r_intr, scope iop_fifo_in, type r */
177#define reg_iop_fifo_in_r_intr___urun___lsb 0
178#define reg_iop_fifo_in_r_intr___urun___width 1
179#define reg_iop_fifo_in_r_intr___urun___bit 0
180#define reg_iop_fifo_in_r_intr___last_data___lsb 1
181#define reg_iop_fifo_in_r_intr___last_data___width 1
182#define reg_iop_fifo_in_r_intr___last_data___bit 1
183#define reg_iop_fifo_in_r_intr___dav___lsb 2
184#define reg_iop_fifo_in_r_intr___dav___width 1
185#define reg_iop_fifo_in_r_intr___dav___bit 2
186#define reg_iop_fifo_in_r_intr___avail___lsb 3
187#define reg_iop_fifo_in_r_intr___avail___width 1
188#define reg_iop_fifo_in_r_intr___avail___bit 3
189#define reg_iop_fifo_in_r_intr___orun___lsb 4
190#define reg_iop_fifo_in_r_intr___orun___width 1
191#define reg_iop_fifo_in_r_intr___orun___bit 4
192#define reg_iop_fifo_in_r_intr_offset 60
193
194/* Register r_masked_intr, scope iop_fifo_in, type r */
195#define reg_iop_fifo_in_r_masked_intr___urun___lsb 0
196#define reg_iop_fifo_in_r_masked_intr___urun___width 1
197#define reg_iop_fifo_in_r_masked_intr___urun___bit 0
198#define reg_iop_fifo_in_r_masked_intr___last_data___lsb 1
199#define reg_iop_fifo_in_r_masked_intr___last_data___width 1
200#define reg_iop_fifo_in_r_masked_intr___last_data___bit 1
201#define reg_iop_fifo_in_r_masked_intr___dav___lsb 2
202#define reg_iop_fifo_in_r_masked_intr___dav___width 1
203#define reg_iop_fifo_in_r_masked_intr___dav___bit 2
204#define reg_iop_fifo_in_r_masked_intr___avail___lsb 3
205#define reg_iop_fifo_in_r_masked_intr___avail___width 1
206#define reg_iop_fifo_in_r_masked_intr___avail___bit 3
207#define reg_iop_fifo_in_r_masked_intr___orun___lsb 4
208#define reg_iop_fifo_in_r_masked_intr___orun___width 1
209#define reg_iop_fifo_in_r_masked_intr___orun___bit 4
210#define reg_iop_fifo_in_r_masked_intr_offset 64
211
212
213/* Constants */
214#define regk_iop_fifo_in_dif_in 0x00000002
215#define regk_iop_fifo_in_hi 0x00000000
216#define regk_iop_fifo_in_neg 0x00000002
217#define regk_iop_fifo_in_no 0x00000000
218#define regk_iop_fifo_in_order16 0x00000001
219#define regk_iop_fifo_in_order24 0x00000002
220#define regk_iop_fifo_in_order32 0x00000003
221#define regk_iop_fifo_in_order8 0x00000000
222#define regk_iop_fifo_in_pos 0x00000001
223#define regk_iop_fifo_in_pos_neg 0x00000003
224#define regk_iop_fifo_in_rw_cfg_default 0x00000024
225#define regk_iop_fifo_in_rw_ctrl_default 0x00000000
226#define regk_iop_fifo_in_rw_intr_mask_default 0x00000000
227#define regk_iop_fifo_in_rw_set_last_default 0x00000000
228#define regk_iop_fifo_in_rw_strb_dif_in_default 0x00000000
229#define regk_iop_fifo_in_size16 0x00000002
230#define regk_iop_fifo_in_size24 0x00000001
231#define regk_iop_fifo_in_size32 0x00000000
232#define regk_iop_fifo_in_size8 0x00000003
233#define regk_iop_fifo_in_yes 0x00000001
234#endif /* __iop_fifo_in_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h
deleted file mode 100644
index e00fab0c9335..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h
+++ /dev/null
@@ -1,155 +0,0 @@
1#ifndef __iop_fifo_in_extra_defs_asm_h
2#define __iop_fifo_in_extra_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_in_extra.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:08 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_fifo_in_extra_defs_asm.h ../../inst/io_proc/rtl/iop_fifo_in_extra.r
11 * id: $Id: iop_fifo_in_extra_defs_asm.h,v 1.1 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_wr_data, scope iop_fifo_in_extra, type rw */
57#define reg_iop_fifo_in_extra_rw_wr_data_offset 0
58
59/* Register r_stat, scope iop_fifo_in_extra, type r */
60#define reg_iop_fifo_in_extra_r_stat___avail_bytes___lsb 0
61#define reg_iop_fifo_in_extra_r_stat___avail_bytes___width 4
62#define reg_iop_fifo_in_extra_r_stat___last___lsb 4
63#define reg_iop_fifo_in_extra_r_stat___last___width 8
64#define reg_iop_fifo_in_extra_r_stat___dif_in_en___lsb 12
65#define reg_iop_fifo_in_extra_r_stat___dif_in_en___width 1
66#define reg_iop_fifo_in_extra_r_stat___dif_in_en___bit 12
67#define reg_iop_fifo_in_extra_r_stat___dif_out_en___lsb 13
68#define reg_iop_fifo_in_extra_r_stat___dif_out_en___width 1
69#define reg_iop_fifo_in_extra_r_stat___dif_out_en___bit 13
70#define reg_iop_fifo_in_extra_r_stat_offset 4
71
72/* Register rw_strb_dif_in, scope iop_fifo_in_extra, type rw */
73#define reg_iop_fifo_in_extra_rw_strb_dif_in___last___lsb 0
74#define reg_iop_fifo_in_extra_rw_strb_dif_in___last___width 2
75#define reg_iop_fifo_in_extra_rw_strb_dif_in_offset 8
76
77/* Register rw_intr_mask, scope iop_fifo_in_extra, type rw */
78#define reg_iop_fifo_in_extra_rw_intr_mask___urun___lsb 0
79#define reg_iop_fifo_in_extra_rw_intr_mask___urun___width 1
80#define reg_iop_fifo_in_extra_rw_intr_mask___urun___bit 0
81#define reg_iop_fifo_in_extra_rw_intr_mask___last_data___lsb 1
82#define reg_iop_fifo_in_extra_rw_intr_mask___last_data___width 1
83#define reg_iop_fifo_in_extra_rw_intr_mask___last_data___bit 1
84#define reg_iop_fifo_in_extra_rw_intr_mask___dav___lsb 2
85#define reg_iop_fifo_in_extra_rw_intr_mask___dav___width 1
86#define reg_iop_fifo_in_extra_rw_intr_mask___dav___bit 2
87#define reg_iop_fifo_in_extra_rw_intr_mask___avail___lsb 3
88#define reg_iop_fifo_in_extra_rw_intr_mask___avail___width 1
89#define reg_iop_fifo_in_extra_rw_intr_mask___avail___bit 3
90#define reg_iop_fifo_in_extra_rw_intr_mask___orun___lsb 4
91#define reg_iop_fifo_in_extra_rw_intr_mask___orun___width 1
92#define reg_iop_fifo_in_extra_rw_intr_mask___orun___bit 4
93#define reg_iop_fifo_in_extra_rw_intr_mask_offset 12
94
95/* Register rw_ack_intr, scope iop_fifo_in_extra, type rw */
96#define reg_iop_fifo_in_extra_rw_ack_intr___urun___lsb 0
97#define reg_iop_fifo_in_extra_rw_ack_intr___urun___width 1
98#define reg_iop_fifo_in_extra_rw_ack_intr___urun___bit 0
99#define reg_iop_fifo_in_extra_rw_ack_intr___last_data___lsb 1
100#define reg_iop_fifo_in_extra_rw_ack_intr___last_data___width 1
101#define reg_iop_fifo_in_extra_rw_ack_intr___last_data___bit 1
102#define reg_iop_fifo_in_extra_rw_ack_intr___dav___lsb 2
103#define reg_iop_fifo_in_extra_rw_ack_intr___dav___width 1
104#define reg_iop_fifo_in_extra_rw_ack_intr___dav___bit 2
105#define reg_iop_fifo_in_extra_rw_ack_intr___avail___lsb 3
106#define reg_iop_fifo_in_extra_rw_ack_intr___avail___width 1
107#define reg_iop_fifo_in_extra_rw_ack_intr___avail___bit 3
108#define reg_iop_fifo_in_extra_rw_ack_intr___orun___lsb 4
109#define reg_iop_fifo_in_extra_rw_ack_intr___orun___width 1
110#define reg_iop_fifo_in_extra_rw_ack_intr___orun___bit 4
111#define reg_iop_fifo_in_extra_rw_ack_intr_offset 16
112
113/* Register r_intr, scope iop_fifo_in_extra, type r */
114#define reg_iop_fifo_in_extra_r_intr___urun___lsb 0
115#define reg_iop_fifo_in_extra_r_intr___urun___width 1
116#define reg_iop_fifo_in_extra_r_intr___urun___bit 0
117#define reg_iop_fifo_in_extra_r_intr___last_data___lsb 1
118#define reg_iop_fifo_in_extra_r_intr___last_data___width 1
119#define reg_iop_fifo_in_extra_r_intr___last_data___bit 1
120#define reg_iop_fifo_in_extra_r_intr___dav___lsb 2
121#define reg_iop_fifo_in_extra_r_intr___dav___width 1
122#define reg_iop_fifo_in_extra_r_intr___dav___bit 2
123#define reg_iop_fifo_in_extra_r_intr___avail___lsb 3
124#define reg_iop_fifo_in_extra_r_intr___avail___width 1
125#define reg_iop_fifo_in_extra_r_intr___avail___bit 3
126#define reg_iop_fifo_in_extra_r_intr___orun___lsb 4
127#define reg_iop_fifo_in_extra_r_intr___orun___width 1
128#define reg_iop_fifo_in_extra_r_intr___orun___bit 4
129#define reg_iop_fifo_in_extra_r_intr_offset 20
130
131/* Register r_masked_intr, scope iop_fifo_in_extra, type r */
132#define reg_iop_fifo_in_extra_r_masked_intr___urun___lsb 0
133#define reg_iop_fifo_in_extra_r_masked_intr___urun___width 1
134#define reg_iop_fifo_in_extra_r_masked_intr___urun___bit 0
135#define reg_iop_fifo_in_extra_r_masked_intr___last_data___lsb 1
136#define reg_iop_fifo_in_extra_r_masked_intr___last_data___width 1
137#define reg_iop_fifo_in_extra_r_masked_intr___last_data___bit 1
138#define reg_iop_fifo_in_extra_r_masked_intr___dav___lsb 2
139#define reg_iop_fifo_in_extra_r_masked_intr___dav___width 1
140#define reg_iop_fifo_in_extra_r_masked_intr___dav___bit 2
141#define reg_iop_fifo_in_extra_r_masked_intr___avail___lsb 3
142#define reg_iop_fifo_in_extra_r_masked_intr___avail___width 1
143#define reg_iop_fifo_in_extra_r_masked_intr___avail___bit 3
144#define reg_iop_fifo_in_extra_r_masked_intr___orun___lsb 4
145#define reg_iop_fifo_in_extra_r_masked_intr___orun___width 1
146#define reg_iop_fifo_in_extra_r_masked_intr___orun___bit 4
147#define reg_iop_fifo_in_extra_r_masked_intr_offset 24
148
149
150/* Constants */
151#define regk_iop_fifo_in_extra_fifo_in 0x00000002
152#define regk_iop_fifo_in_extra_no 0x00000000
153#define regk_iop_fifo_in_extra_rw_intr_mask_default 0x00000000
154#define regk_iop_fifo_in_extra_yes 0x00000001
155#endif /* __iop_fifo_in_extra_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_defs_asm.h
deleted file mode 100644
index 9ec5f4a826df..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_defs_asm.h
+++ /dev/null
@@ -1,254 +0,0 @@
1#ifndef __iop_fifo_out_defs_asm_h
2#define __iop_fifo_out_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_out.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:09 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_fifo_out_defs_asm.h ../../inst/io_proc/rtl/iop_fifo_out.r
11 * id: $Id: iop_fifo_out_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_fifo_out, type rw */
57#define reg_iop_fifo_out_rw_cfg___free_lim___lsb 0
58#define reg_iop_fifo_out_rw_cfg___free_lim___width 3
59#define reg_iop_fifo_out_rw_cfg___byte_order___lsb 3
60#define reg_iop_fifo_out_rw_cfg___byte_order___width 2
61#define reg_iop_fifo_out_rw_cfg___trig___lsb 5
62#define reg_iop_fifo_out_rw_cfg___trig___width 2
63#define reg_iop_fifo_out_rw_cfg___last_dis_dif_in___lsb 7
64#define reg_iop_fifo_out_rw_cfg___last_dis_dif_in___width 1
65#define reg_iop_fifo_out_rw_cfg___last_dis_dif_in___bit 7
66#define reg_iop_fifo_out_rw_cfg___mode___lsb 8
67#define reg_iop_fifo_out_rw_cfg___mode___width 2
68#define reg_iop_fifo_out_rw_cfg___delay_out_last___lsb 10
69#define reg_iop_fifo_out_rw_cfg___delay_out_last___width 1
70#define reg_iop_fifo_out_rw_cfg___delay_out_last___bit 10
71#define reg_iop_fifo_out_rw_cfg___last_dis_dif_out___lsb 11
72#define reg_iop_fifo_out_rw_cfg___last_dis_dif_out___width 1
73#define reg_iop_fifo_out_rw_cfg___last_dis_dif_out___bit 11
74#define reg_iop_fifo_out_rw_cfg_offset 0
75
76/* Register rw_ctrl, scope iop_fifo_out, type rw */
77#define reg_iop_fifo_out_rw_ctrl___dif_in_en___lsb 0
78#define reg_iop_fifo_out_rw_ctrl___dif_in_en___width 1
79#define reg_iop_fifo_out_rw_ctrl___dif_in_en___bit 0
80#define reg_iop_fifo_out_rw_ctrl___dif_out_en___lsb 1
81#define reg_iop_fifo_out_rw_ctrl___dif_out_en___width 1
82#define reg_iop_fifo_out_rw_ctrl___dif_out_en___bit 1
83#define reg_iop_fifo_out_rw_ctrl_offset 4
84
85/* Register r_stat, scope iop_fifo_out, type r */
86#define reg_iop_fifo_out_r_stat___avail_bytes___lsb 0
87#define reg_iop_fifo_out_r_stat___avail_bytes___width 4
88#define reg_iop_fifo_out_r_stat___last___lsb 4
89#define reg_iop_fifo_out_r_stat___last___width 8
90#define reg_iop_fifo_out_r_stat___dif_in_en___lsb 12
91#define reg_iop_fifo_out_r_stat___dif_in_en___width 1
92#define reg_iop_fifo_out_r_stat___dif_in_en___bit 12
93#define reg_iop_fifo_out_r_stat___dif_out_en___lsb 13
94#define reg_iop_fifo_out_r_stat___dif_out_en___width 1
95#define reg_iop_fifo_out_r_stat___dif_out_en___bit 13
96#define reg_iop_fifo_out_r_stat___zero_data_last___lsb 14
97#define reg_iop_fifo_out_r_stat___zero_data_last___width 1
98#define reg_iop_fifo_out_r_stat___zero_data_last___bit 14
99#define reg_iop_fifo_out_r_stat_offset 8
100
101/* Register rw_wr1byte, scope iop_fifo_out, type rw */
102#define reg_iop_fifo_out_rw_wr1byte___data___lsb 0
103#define reg_iop_fifo_out_rw_wr1byte___data___width 8
104#define reg_iop_fifo_out_rw_wr1byte_offset 12
105
106/* Register rw_wr2byte, scope iop_fifo_out, type rw */
107#define reg_iop_fifo_out_rw_wr2byte___data___lsb 0
108#define reg_iop_fifo_out_rw_wr2byte___data___width 16
109#define reg_iop_fifo_out_rw_wr2byte_offset 16
110
111/* Register rw_wr3byte, scope iop_fifo_out, type rw */
112#define reg_iop_fifo_out_rw_wr3byte___data___lsb 0
113#define reg_iop_fifo_out_rw_wr3byte___data___width 24
114#define reg_iop_fifo_out_rw_wr3byte_offset 20
115
116/* Register rw_wr4byte, scope iop_fifo_out, type rw */
117#define reg_iop_fifo_out_rw_wr4byte___data___lsb 0
118#define reg_iop_fifo_out_rw_wr4byte___data___width 32
119#define reg_iop_fifo_out_rw_wr4byte_offset 24
120
121/* Register rw_wr1byte_last, scope iop_fifo_out, type rw */
122#define reg_iop_fifo_out_rw_wr1byte_last___data___lsb 0
123#define reg_iop_fifo_out_rw_wr1byte_last___data___width 8
124#define reg_iop_fifo_out_rw_wr1byte_last_offset 28
125
126/* Register rw_wr2byte_last, scope iop_fifo_out, type rw */
127#define reg_iop_fifo_out_rw_wr2byte_last___data___lsb 0
128#define reg_iop_fifo_out_rw_wr2byte_last___data___width 16
129#define reg_iop_fifo_out_rw_wr2byte_last_offset 32
130
131/* Register rw_wr3byte_last, scope iop_fifo_out, type rw */
132#define reg_iop_fifo_out_rw_wr3byte_last___data___lsb 0
133#define reg_iop_fifo_out_rw_wr3byte_last___data___width 24
134#define reg_iop_fifo_out_rw_wr3byte_last_offset 36
135
136/* Register rw_wr4byte_last, scope iop_fifo_out, type rw */
137#define reg_iop_fifo_out_rw_wr4byte_last___data___lsb 0
138#define reg_iop_fifo_out_rw_wr4byte_last___data___width 32
139#define reg_iop_fifo_out_rw_wr4byte_last_offset 40
140
141/* Register rw_set_last, scope iop_fifo_out, type rw */
142#define reg_iop_fifo_out_rw_set_last_offset 44
143
144/* Register rs_rd_data, scope iop_fifo_out, type rs */
145#define reg_iop_fifo_out_rs_rd_data_offset 48
146
147/* Register r_rd_data, scope iop_fifo_out, type r */
148#define reg_iop_fifo_out_r_rd_data_offset 52
149
150/* Register rw_strb_dif_out, scope iop_fifo_out, type rw */
151#define reg_iop_fifo_out_rw_strb_dif_out_offset 56
152
153/* Register rw_intr_mask, scope iop_fifo_out, type rw */
154#define reg_iop_fifo_out_rw_intr_mask___urun___lsb 0
155#define reg_iop_fifo_out_rw_intr_mask___urun___width 1
156#define reg_iop_fifo_out_rw_intr_mask___urun___bit 0
157#define reg_iop_fifo_out_rw_intr_mask___last_data___lsb 1
158#define reg_iop_fifo_out_rw_intr_mask___last_data___width 1
159#define reg_iop_fifo_out_rw_intr_mask___last_data___bit 1
160#define reg_iop_fifo_out_rw_intr_mask___dav___lsb 2
161#define reg_iop_fifo_out_rw_intr_mask___dav___width 1
162#define reg_iop_fifo_out_rw_intr_mask___dav___bit 2
163#define reg_iop_fifo_out_rw_intr_mask___free___lsb 3
164#define reg_iop_fifo_out_rw_intr_mask___free___width 1
165#define reg_iop_fifo_out_rw_intr_mask___free___bit 3
166#define reg_iop_fifo_out_rw_intr_mask___orun___lsb 4
167#define reg_iop_fifo_out_rw_intr_mask___orun___width 1
168#define reg_iop_fifo_out_rw_intr_mask___orun___bit 4
169#define reg_iop_fifo_out_rw_intr_mask_offset 60
170
171/* Register rw_ack_intr, scope iop_fifo_out, type rw */
172#define reg_iop_fifo_out_rw_ack_intr___urun___lsb 0
173#define reg_iop_fifo_out_rw_ack_intr___urun___width 1
174#define reg_iop_fifo_out_rw_ack_intr___urun___bit 0
175#define reg_iop_fifo_out_rw_ack_intr___last_data___lsb 1
176#define reg_iop_fifo_out_rw_ack_intr___last_data___width 1
177#define reg_iop_fifo_out_rw_ack_intr___last_data___bit 1
178#define reg_iop_fifo_out_rw_ack_intr___dav___lsb 2
179#define reg_iop_fifo_out_rw_ack_intr___dav___width 1
180#define reg_iop_fifo_out_rw_ack_intr___dav___bit 2
181#define reg_iop_fifo_out_rw_ack_intr___free___lsb 3
182#define reg_iop_fifo_out_rw_ack_intr___free___width 1
183#define reg_iop_fifo_out_rw_ack_intr___free___bit 3
184#define reg_iop_fifo_out_rw_ack_intr___orun___lsb 4
185#define reg_iop_fifo_out_rw_ack_intr___orun___width 1
186#define reg_iop_fifo_out_rw_ack_intr___orun___bit 4
187#define reg_iop_fifo_out_rw_ack_intr_offset 64
188
189/* Register r_intr, scope iop_fifo_out, type r */
190#define reg_iop_fifo_out_r_intr___urun___lsb 0
191#define reg_iop_fifo_out_r_intr___urun___width 1
192#define reg_iop_fifo_out_r_intr___urun___bit 0
193#define reg_iop_fifo_out_r_intr___last_data___lsb 1
194#define reg_iop_fifo_out_r_intr___last_data___width 1
195#define reg_iop_fifo_out_r_intr___last_data___bit 1
196#define reg_iop_fifo_out_r_intr___dav___lsb 2
197#define reg_iop_fifo_out_r_intr___dav___width 1
198#define reg_iop_fifo_out_r_intr___dav___bit 2
199#define reg_iop_fifo_out_r_intr___free___lsb 3
200#define reg_iop_fifo_out_r_intr___free___width 1
201#define reg_iop_fifo_out_r_intr___free___bit 3
202#define reg_iop_fifo_out_r_intr___orun___lsb 4
203#define reg_iop_fifo_out_r_intr___orun___width 1
204#define reg_iop_fifo_out_r_intr___orun___bit 4
205#define reg_iop_fifo_out_r_intr_offset 68
206
207/* Register r_masked_intr, scope iop_fifo_out, type r */
208#define reg_iop_fifo_out_r_masked_intr___urun___lsb 0
209#define reg_iop_fifo_out_r_masked_intr___urun___width 1
210#define reg_iop_fifo_out_r_masked_intr___urun___bit 0
211#define reg_iop_fifo_out_r_masked_intr___last_data___lsb 1
212#define reg_iop_fifo_out_r_masked_intr___last_data___width 1
213#define reg_iop_fifo_out_r_masked_intr___last_data___bit 1
214#define reg_iop_fifo_out_r_masked_intr___dav___lsb 2
215#define reg_iop_fifo_out_r_masked_intr___dav___width 1
216#define reg_iop_fifo_out_r_masked_intr___dav___bit 2
217#define reg_iop_fifo_out_r_masked_intr___free___lsb 3
218#define reg_iop_fifo_out_r_masked_intr___free___width 1
219#define reg_iop_fifo_out_r_masked_intr___free___bit 3
220#define reg_iop_fifo_out_r_masked_intr___orun___lsb 4
221#define reg_iop_fifo_out_r_masked_intr___orun___width 1
222#define reg_iop_fifo_out_r_masked_intr___orun___bit 4
223#define reg_iop_fifo_out_r_masked_intr_offset 72
224
225
226/* Constants */
227#define regk_iop_fifo_out_hi 0x00000000
228#define regk_iop_fifo_out_neg 0x00000002
229#define regk_iop_fifo_out_no 0x00000000
230#define regk_iop_fifo_out_order16 0x00000001
231#define regk_iop_fifo_out_order24 0x00000002
232#define regk_iop_fifo_out_order32 0x00000003
233#define regk_iop_fifo_out_order8 0x00000000
234#define regk_iop_fifo_out_pos 0x00000001
235#define regk_iop_fifo_out_pos_neg 0x00000003
236#define regk_iop_fifo_out_rw_cfg_default 0x00000024
237#define regk_iop_fifo_out_rw_ctrl_default 0x00000000
238#define regk_iop_fifo_out_rw_intr_mask_default 0x00000000
239#define regk_iop_fifo_out_rw_set_last_default 0x00000000
240#define regk_iop_fifo_out_rw_strb_dif_out_default 0x00000000
241#define regk_iop_fifo_out_rw_wr1byte_default 0x00000000
242#define regk_iop_fifo_out_rw_wr1byte_last_default 0x00000000
243#define regk_iop_fifo_out_rw_wr2byte_default 0x00000000
244#define regk_iop_fifo_out_rw_wr2byte_last_default 0x00000000
245#define regk_iop_fifo_out_rw_wr3byte_default 0x00000000
246#define regk_iop_fifo_out_rw_wr3byte_last_default 0x00000000
247#define regk_iop_fifo_out_rw_wr4byte_default 0x00000000
248#define regk_iop_fifo_out_rw_wr4byte_last_default 0x00000000
249#define regk_iop_fifo_out_size16 0x00000002
250#define regk_iop_fifo_out_size24 0x00000001
251#define regk_iop_fifo_out_size32 0x00000000
252#define regk_iop_fifo_out_size8 0x00000003
253#define regk_iop_fifo_out_yes 0x00000001
254#endif /* __iop_fifo_out_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h
deleted file mode 100644
index 0f84a50cf77c..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h
+++ /dev/null
@@ -1,158 +0,0 @@
1#ifndef __iop_fifo_out_extra_defs_asm_h
2#define __iop_fifo_out_extra_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_out_extra.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:10 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_fifo_out_extra_defs_asm.h ../../inst/io_proc/rtl/iop_fifo_out_extra.r
11 * id: $Id: iop_fifo_out_extra_defs_asm.h,v 1.1 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rs_rd_data, scope iop_fifo_out_extra, type rs */
57#define reg_iop_fifo_out_extra_rs_rd_data_offset 0
58
59/* Register r_rd_data, scope iop_fifo_out_extra, type r */
60#define reg_iop_fifo_out_extra_r_rd_data_offset 4
61
62/* Register r_stat, scope iop_fifo_out_extra, type r */
63#define reg_iop_fifo_out_extra_r_stat___avail_bytes___lsb 0
64#define reg_iop_fifo_out_extra_r_stat___avail_bytes___width 4
65#define reg_iop_fifo_out_extra_r_stat___last___lsb 4
66#define reg_iop_fifo_out_extra_r_stat___last___width 8
67#define reg_iop_fifo_out_extra_r_stat___dif_in_en___lsb 12
68#define reg_iop_fifo_out_extra_r_stat___dif_in_en___width 1
69#define reg_iop_fifo_out_extra_r_stat___dif_in_en___bit 12
70#define reg_iop_fifo_out_extra_r_stat___dif_out_en___lsb 13
71#define reg_iop_fifo_out_extra_r_stat___dif_out_en___width 1
72#define reg_iop_fifo_out_extra_r_stat___dif_out_en___bit 13
73#define reg_iop_fifo_out_extra_r_stat___zero_data_last___lsb 14
74#define reg_iop_fifo_out_extra_r_stat___zero_data_last___width 1
75#define reg_iop_fifo_out_extra_r_stat___zero_data_last___bit 14
76#define reg_iop_fifo_out_extra_r_stat_offset 8
77
78/* Register rw_strb_dif_out, scope iop_fifo_out_extra, type rw */
79#define reg_iop_fifo_out_extra_rw_strb_dif_out_offset 12
80
81/* Register rw_intr_mask, scope iop_fifo_out_extra, type rw */
82#define reg_iop_fifo_out_extra_rw_intr_mask___urun___lsb 0
83#define reg_iop_fifo_out_extra_rw_intr_mask___urun___width 1
84#define reg_iop_fifo_out_extra_rw_intr_mask___urun___bit 0
85#define reg_iop_fifo_out_extra_rw_intr_mask___last_data___lsb 1
86#define reg_iop_fifo_out_extra_rw_intr_mask___last_data___width 1
87#define reg_iop_fifo_out_extra_rw_intr_mask___last_data___bit 1
88#define reg_iop_fifo_out_extra_rw_intr_mask___dav___lsb 2
89#define reg_iop_fifo_out_extra_rw_intr_mask___dav___width 1
90#define reg_iop_fifo_out_extra_rw_intr_mask___dav___bit 2
91#define reg_iop_fifo_out_extra_rw_intr_mask___free___lsb 3
92#define reg_iop_fifo_out_extra_rw_intr_mask___free___width 1
93#define reg_iop_fifo_out_extra_rw_intr_mask___free___bit 3
94#define reg_iop_fifo_out_extra_rw_intr_mask___orun___lsb 4
95#define reg_iop_fifo_out_extra_rw_intr_mask___orun___width 1
96#define reg_iop_fifo_out_extra_rw_intr_mask___orun___bit 4
97#define reg_iop_fifo_out_extra_rw_intr_mask_offset 16
98
99/* Register rw_ack_intr, scope iop_fifo_out_extra, type rw */
100#define reg_iop_fifo_out_extra_rw_ack_intr___urun___lsb 0
101#define reg_iop_fifo_out_extra_rw_ack_intr___urun___width 1
102#define reg_iop_fifo_out_extra_rw_ack_intr___urun___bit 0
103#define reg_iop_fifo_out_extra_rw_ack_intr___last_data___lsb 1
104#define reg_iop_fifo_out_extra_rw_ack_intr___last_data___width 1
105#define reg_iop_fifo_out_extra_rw_ack_intr___last_data___bit 1
106#define reg_iop_fifo_out_extra_rw_ack_intr___dav___lsb 2
107#define reg_iop_fifo_out_extra_rw_ack_intr___dav___width 1
108#define reg_iop_fifo_out_extra_rw_ack_intr___dav___bit 2
109#define reg_iop_fifo_out_extra_rw_ack_intr___free___lsb 3
110#define reg_iop_fifo_out_extra_rw_ack_intr___free___width 1
111#define reg_iop_fifo_out_extra_rw_ack_intr___free___bit 3
112#define reg_iop_fifo_out_extra_rw_ack_intr___orun___lsb 4
113#define reg_iop_fifo_out_extra_rw_ack_intr___orun___width 1
114#define reg_iop_fifo_out_extra_rw_ack_intr___orun___bit 4
115#define reg_iop_fifo_out_extra_rw_ack_intr_offset 20
116
117/* Register r_intr, scope iop_fifo_out_extra, type r */
118#define reg_iop_fifo_out_extra_r_intr___urun___lsb 0
119#define reg_iop_fifo_out_extra_r_intr___urun___width 1
120#define reg_iop_fifo_out_extra_r_intr___urun___bit 0
121#define reg_iop_fifo_out_extra_r_intr___last_data___lsb 1
122#define reg_iop_fifo_out_extra_r_intr___last_data___width 1
123#define reg_iop_fifo_out_extra_r_intr___last_data___bit 1
124#define reg_iop_fifo_out_extra_r_intr___dav___lsb 2
125#define reg_iop_fifo_out_extra_r_intr___dav___width 1
126#define reg_iop_fifo_out_extra_r_intr___dav___bit 2
127#define reg_iop_fifo_out_extra_r_intr___free___lsb 3
128#define reg_iop_fifo_out_extra_r_intr___free___width 1
129#define reg_iop_fifo_out_extra_r_intr___free___bit 3
130#define reg_iop_fifo_out_extra_r_intr___orun___lsb 4
131#define reg_iop_fifo_out_extra_r_intr___orun___width 1
132#define reg_iop_fifo_out_extra_r_intr___orun___bit 4
133#define reg_iop_fifo_out_extra_r_intr_offset 24
134
135/* Register r_masked_intr, scope iop_fifo_out_extra, type r */
136#define reg_iop_fifo_out_extra_r_masked_intr___urun___lsb 0
137#define reg_iop_fifo_out_extra_r_masked_intr___urun___width 1
138#define reg_iop_fifo_out_extra_r_masked_intr___urun___bit 0
139#define reg_iop_fifo_out_extra_r_masked_intr___last_data___lsb 1
140#define reg_iop_fifo_out_extra_r_masked_intr___last_data___width 1
141#define reg_iop_fifo_out_extra_r_masked_intr___last_data___bit 1
142#define reg_iop_fifo_out_extra_r_masked_intr___dav___lsb 2
143#define reg_iop_fifo_out_extra_r_masked_intr___dav___width 1
144#define reg_iop_fifo_out_extra_r_masked_intr___dav___bit 2
145#define reg_iop_fifo_out_extra_r_masked_intr___free___lsb 3
146#define reg_iop_fifo_out_extra_r_masked_intr___free___width 1
147#define reg_iop_fifo_out_extra_r_masked_intr___free___bit 3
148#define reg_iop_fifo_out_extra_r_masked_intr___orun___lsb 4
149#define reg_iop_fifo_out_extra_r_masked_intr___orun___width 1
150#define reg_iop_fifo_out_extra_r_masked_intr___orun___bit 4
151#define reg_iop_fifo_out_extra_r_masked_intr_offset 28
152
153
154/* Constants */
155#define regk_iop_fifo_out_extra_no 0x00000000
156#define regk_iop_fifo_out_extra_rw_intr_mask_default 0x00000000
157#define regk_iop_fifo_out_extra_yes 0x00000001
158#endif /* __iop_fifo_out_extra_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_mpu_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_mpu_defs_asm.h
deleted file mode 100644
index 80490c82cc29..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_mpu_defs_asm.h
+++ /dev/null
@@ -1,177 +0,0 @@
1#ifndef __iop_mpu_defs_asm_h
2#define __iop_mpu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_mpu.r
7 * id: iop_mpu.r,v 1.30 2005/02/17 08:12:33 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_mpu_defs_asm.h ../../inst/io_proc/rtl/iop_mpu.r
11 * id: $Id: iop_mpu_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56#define STRIDE_iop_mpu_rw_r 4
57/* Register rw_r, scope iop_mpu, type rw */
58#define reg_iop_mpu_rw_r_offset 0
59
60/* Register rw_ctrl, scope iop_mpu, type rw */
61#define reg_iop_mpu_rw_ctrl___en___lsb 0
62#define reg_iop_mpu_rw_ctrl___en___width 1
63#define reg_iop_mpu_rw_ctrl___en___bit 0
64#define reg_iop_mpu_rw_ctrl_offset 128
65
66/* Register r_pc, scope iop_mpu, type r */
67#define reg_iop_mpu_r_pc___addr___lsb 0
68#define reg_iop_mpu_r_pc___addr___width 12
69#define reg_iop_mpu_r_pc_offset 132
70
71/* Register r_stat, scope iop_mpu, type r */
72#define reg_iop_mpu_r_stat___instr_reg_busy___lsb 0
73#define reg_iop_mpu_r_stat___instr_reg_busy___width 1
74#define reg_iop_mpu_r_stat___instr_reg_busy___bit 0
75#define reg_iop_mpu_r_stat___intr_busy___lsb 1
76#define reg_iop_mpu_r_stat___intr_busy___width 1
77#define reg_iop_mpu_r_stat___intr_busy___bit 1
78#define reg_iop_mpu_r_stat___intr_vect___lsb 2
79#define reg_iop_mpu_r_stat___intr_vect___width 16
80#define reg_iop_mpu_r_stat_offset 136
81
82/* Register rw_instr, scope iop_mpu, type rw */
83#define reg_iop_mpu_rw_instr_offset 140
84
85/* Register rw_immediate, scope iop_mpu, type rw */
86#define reg_iop_mpu_rw_immediate_offset 144
87
88/* Register r_trace, scope iop_mpu, type r */
89#define reg_iop_mpu_r_trace___intr_vect___lsb 0
90#define reg_iop_mpu_r_trace___intr_vect___width 16
91#define reg_iop_mpu_r_trace___pc___lsb 16
92#define reg_iop_mpu_r_trace___pc___width 12
93#define reg_iop_mpu_r_trace___en___lsb 28
94#define reg_iop_mpu_r_trace___en___width 1
95#define reg_iop_mpu_r_trace___en___bit 28
96#define reg_iop_mpu_r_trace___instr_reg_busy___lsb 29
97#define reg_iop_mpu_r_trace___instr_reg_busy___width 1
98#define reg_iop_mpu_r_trace___instr_reg_busy___bit 29
99#define reg_iop_mpu_r_trace___intr_busy___lsb 30
100#define reg_iop_mpu_r_trace___intr_busy___width 1
101#define reg_iop_mpu_r_trace___intr_busy___bit 30
102#define reg_iop_mpu_r_trace_offset 148
103
104/* Register r_wr_stat, scope iop_mpu, type r */
105#define reg_iop_mpu_r_wr_stat___r0___lsb 0
106#define reg_iop_mpu_r_wr_stat___r0___width 1
107#define reg_iop_mpu_r_wr_stat___r0___bit 0
108#define reg_iop_mpu_r_wr_stat___r1___lsb 1
109#define reg_iop_mpu_r_wr_stat___r1___width 1
110#define reg_iop_mpu_r_wr_stat___r1___bit 1
111#define reg_iop_mpu_r_wr_stat___r2___lsb 2
112#define reg_iop_mpu_r_wr_stat___r2___width 1
113#define reg_iop_mpu_r_wr_stat___r2___bit 2
114#define reg_iop_mpu_r_wr_stat___r3___lsb 3
115#define reg_iop_mpu_r_wr_stat___r3___width 1
116#define reg_iop_mpu_r_wr_stat___r3___bit 3
117#define reg_iop_mpu_r_wr_stat___r4___lsb 4
118#define reg_iop_mpu_r_wr_stat___r4___width 1
119#define reg_iop_mpu_r_wr_stat___r4___bit 4
120#define reg_iop_mpu_r_wr_stat___r5___lsb 5
121#define reg_iop_mpu_r_wr_stat___r5___width 1
122#define reg_iop_mpu_r_wr_stat___r5___bit 5
123#define reg_iop_mpu_r_wr_stat___r6___lsb 6
124#define reg_iop_mpu_r_wr_stat___r6___width 1
125#define reg_iop_mpu_r_wr_stat___r6___bit 6
126#define reg_iop_mpu_r_wr_stat___r7___lsb 7
127#define reg_iop_mpu_r_wr_stat___r7___width 1
128#define reg_iop_mpu_r_wr_stat___r7___bit 7
129#define reg_iop_mpu_r_wr_stat___r8___lsb 8
130#define reg_iop_mpu_r_wr_stat___r8___width 1
131#define reg_iop_mpu_r_wr_stat___r8___bit 8
132#define reg_iop_mpu_r_wr_stat___r9___lsb 9
133#define reg_iop_mpu_r_wr_stat___r9___width 1
134#define reg_iop_mpu_r_wr_stat___r9___bit 9
135#define reg_iop_mpu_r_wr_stat___r10___lsb 10
136#define reg_iop_mpu_r_wr_stat___r10___width 1
137#define reg_iop_mpu_r_wr_stat___r10___bit 10
138#define reg_iop_mpu_r_wr_stat___r11___lsb 11
139#define reg_iop_mpu_r_wr_stat___r11___width 1
140#define reg_iop_mpu_r_wr_stat___r11___bit 11
141#define reg_iop_mpu_r_wr_stat___r12___lsb 12
142#define reg_iop_mpu_r_wr_stat___r12___width 1
143#define reg_iop_mpu_r_wr_stat___r12___bit 12
144#define reg_iop_mpu_r_wr_stat___r13___lsb 13
145#define reg_iop_mpu_r_wr_stat___r13___width 1
146#define reg_iop_mpu_r_wr_stat___r13___bit 13
147#define reg_iop_mpu_r_wr_stat___r14___lsb 14
148#define reg_iop_mpu_r_wr_stat___r14___width 1
149#define reg_iop_mpu_r_wr_stat___r14___bit 14
150#define reg_iop_mpu_r_wr_stat___r15___lsb 15
151#define reg_iop_mpu_r_wr_stat___r15___width 1
152#define reg_iop_mpu_r_wr_stat___r15___bit 15
153#define reg_iop_mpu_r_wr_stat_offset 152
154
155#define STRIDE_iop_mpu_rw_thread 4
156/* Register rw_thread, scope iop_mpu, type rw */
157#define reg_iop_mpu_rw_thread___addr___lsb 0
158#define reg_iop_mpu_rw_thread___addr___width 12
159#define reg_iop_mpu_rw_thread_offset 156
160
161#define STRIDE_iop_mpu_rw_intr 4
162/* Register rw_intr, scope iop_mpu, type rw */
163#define reg_iop_mpu_rw_intr___addr___lsb 0
164#define reg_iop_mpu_rw_intr___addr___width 12
165#define reg_iop_mpu_rw_intr_offset 196
166
167
168/* Constants */
169#define regk_iop_mpu_no 0x00000000
170#define regk_iop_mpu_r_pc_default 0x00000000
171#define regk_iop_mpu_rw_ctrl_default 0x00000000
172#define regk_iop_mpu_rw_intr_size 0x00000010
173#define regk_iop_mpu_rw_r_size 0x00000010
174#define regk_iop_mpu_rw_thread_default 0x00000000
175#define regk_iop_mpu_rw_thread_size 0x00000004
176#define regk_iop_mpu_yes 0x00000001
177#endif /* __iop_mpu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_reg_space_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_reg_space_asm.h
deleted file mode 100644
index a20b8857b4d0..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_reg_space_asm.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/* Autogenerated Changes here will be lost!
2 * generated by ../gen_sw.pl Mon Apr 11 16:10:18 2005 iop_sw.cfg
3 */
4#define iop_version 0
5#define iop_fifo_in0_extra 64
6#define iop_fifo_in1_extra 128
7#define iop_fifo_out0_extra 192
8#define iop_fifo_out1_extra 256
9#define iop_trigger_grp0 320
10#define iop_trigger_grp1 384
11#define iop_trigger_grp2 448
12#define iop_trigger_grp3 512
13#define iop_trigger_grp4 576
14#define iop_trigger_grp5 640
15#define iop_trigger_grp6 704
16#define iop_trigger_grp7 768
17#define iop_crc_par0 896
18#define iop_crc_par1 1024
19#define iop_dmc_in0 1152
20#define iop_dmc_in1 1280
21#define iop_dmc_out0 1408
22#define iop_dmc_out1 1536
23#define iop_fifo_in0 1664
24#define iop_fifo_in1 1792
25#define iop_fifo_out0 1920
26#define iop_fifo_out1 2048
27#define iop_scrc_in0 2176
28#define iop_scrc_in1 2304
29#define iop_scrc_out0 2432
30#define iop_scrc_out1 2560
31#define iop_timer_grp0 2688
32#define iop_timer_grp1 2816
33#define iop_timer_grp2 2944
34#define iop_timer_grp3 3072
35#define iop_sap_in 3328
36#define iop_sap_out 3584
37#define iop_spu0 3840
38#define iop_spu1 4096
39#define iop_sw_cfg 4352
40#define iop_sw_cpu 4608
41#define iop_sw_mpu 4864
42#define iop_sw_spu0 5120
43#define iop_sw_spu1 5376
44#define iop_mpu 5632
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_in_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_in_defs_asm.h
deleted file mode 100644
index a4a10ff300b3..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_in_defs_asm.h
+++ /dev/null
@@ -1,182 +0,0 @@
1#ifndef __iop_sap_in_defs_asm_h
2#define __iop_sap_in_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_sap_in.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_sap_in_defs_asm.h ../../inst/io_proc/rtl/iop_sap_in.r
11 * id: $Id: iop_sap_in_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_bus0_sync, scope iop_sap_in, type rw */
57#define reg_iop_sap_in_rw_bus0_sync___byte0_sel___lsb 0
58#define reg_iop_sap_in_rw_bus0_sync___byte0_sel___width 2
59#define reg_iop_sap_in_rw_bus0_sync___byte0_ext_src___lsb 2
60#define reg_iop_sap_in_rw_bus0_sync___byte0_ext_src___width 3
61#define reg_iop_sap_in_rw_bus0_sync___byte0_edge___lsb 5
62#define reg_iop_sap_in_rw_bus0_sync___byte0_edge___width 2
63#define reg_iop_sap_in_rw_bus0_sync___byte0_delay___lsb 7
64#define reg_iop_sap_in_rw_bus0_sync___byte0_delay___width 1
65#define reg_iop_sap_in_rw_bus0_sync___byte0_delay___bit 7
66#define reg_iop_sap_in_rw_bus0_sync___byte1_sel___lsb 8
67#define reg_iop_sap_in_rw_bus0_sync___byte1_sel___width 2
68#define reg_iop_sap_in_rw_bus0_sync___byte1_ext_src___lsb 10
69#define reg_iop_sap_in_rw_bus0_sync___byte1_ext_src___width 3
70#define reg_iop_sap_in_rw_bus0_sync___byte1_edge___lsb 13
71#define reg_iop_sap_in_rw_bus0_sync___byte1_edge___width 2
72#define reg_iop_sap_in_rw_bus0_sync___byte1_delay___lsb 15
73#define reg_iop_sap_in_rw_bus0_sync___byte1_delay___width 1
74#define reg_iop_sap_in_rw_bus0_sync___byte1_delay___bit 15
75#define reg_iop_sap_in_rw_bus0_sync___byte2_sel___lsb 16
76#define reg_iop_sap_in_rw_bus0_sync___byte2_sel___width 2
77#define reg_iop_sap_in_rw_bus0_sync___byte2_ext_src___lsb 18
78#define reg_iop_sap_in_rw_bus0_sync___byte2_ext_src___width 3
79#define reg_iop_sap_in_rw_bus0_sync___byte2_edge___lsb 21
80#define reg_iop_sap_in_rw_bus0_sync___byte2_edge___width 2
81#define reg_iop_sap_in_rw_bus0_sync___byte2_delay___lsb 23
82#define reg_iop_sap_in_rw_bus0_sync___byte2_delay___width 1
83#define reg_iop_sap_in_rw_bus0_sync___byte2_delay___bit 23
84#define reg_iop_sap_in_rw_bus0_sync___byte3_sel___lsb 24
85#define reg_iop_sap_in_rw_bus0_sync___byte3_sel___width 2
86#define reg_iop_sap_in_rw_bus0_sync___byte3_ext_src___lsb 26
87#define reg_iop_sap_in_rw_bus0_sync___byte3_ext_src___width 3
88#define reg_iop_sap_in_rw_bus0_sync___byte3_edge___lsb 29
89#define reg_iop_sap_in_rw_bus0_sync___byte3_edge___width 2
90#define reg_iop_sap_in_rw_bus0_sync___byte3_delay___lsb 31
91#define reg_iop_sap_in_rw_bus0_sync___byte3_delay___width 1
92#define reg_iop_sap_in_rw_bus0_sync___byte3_delay___bit 31
93#define reg_iop_sap_in_rw_bus0_sync_offset 0
94
95/* Register rw_bus1_sync, scope iop_sap_in, type rw */
96#define reg_iop_sap_in_rw_bus1_sync___byte0_sel___lsb 0
97#define reg_iop_sap_in_rw_bus1_sync___byte0_sel___width 2
98#define reg_iop_sap_in_rw_bus1_sync___byte0_ext_src___lsb 2
99#define reg_iop_sap_in_rw_bus1_sync___byte0_ext_src___width 3
100#define reg_iop_sap_in_rw_bus1_sync___byte0_edge___lsb 5
101#define reg_iop_sap_in_rw_bus1_sync___byte0_edge___width 2
102#define reg_iop_sap_in_rw_bus1_sync___byte0_delay___lsb 7
103#define reg_iop_sap_in_rw_bus1_sync___byte0_delay___width 1
104#define reg_iop_sap_in_rw_bus1_sync___byte0_delay___bit 7
105#define reg_iop_sap_in_rw_bus1_sync___byte1_sel___lsb 8
106#define reg_iop_sap_in_rw_bus1_sync___byte1_sel___width 2
107#define reg_iop_sap_in_rw_bus1_sync___byte1_ext_src___lsb 10
108#define reg_iop_sap_in_rw_bus1_sync___byte1_ext_src___width 3
109#define reg_iop_sap_in_rw_bus1_sync___byte1_edge___lsb 13
110#define reg_iop_sap_in_rw_bus1_sync___byte1_edge___width 2
111#define reg_iop_sap_in_rw_bus1_sync___byte1_delay___lsb 15
112#define reg_iop_sap_in_rw_bus1_sync___byte1_delay___width 1
113#define reg_iop_sap_in_rw_bus1_sync___byte1_delay___bit 15
114#define reg_iop_sap_in_rw_bus1_sync___byte2_sel___lsb 16
115#define reg_iop_sap_in_rw_bus1_sync___byte2_sel___width 2
116#define reg_iop_sap_in_rw_bus1_sync___byte2_ext_src___lsb 18
117#define reg_iop_sap_in_rw_bus1_sync___byte2_ext_src___width 3
118#define reg_iop_sap_in_rw_bus1_sync___byte2_edge___lsb 21
119#define reg_iop_sap_in_rw_bus1_sync___byte2_edge___width 2
120#define reg_iop_sap_in_rw_bus1_sync___byte2_delay___lsb 23
121#define reg_iop_sap_in_rw_bus1_sync___byte2_delay___width 1
122#define reg_iop_sap_in_rw_bus1_sync___byte2_delay___bit 23
123#define reg_iop_sap_in_rw_bus1_sync___byte3_sel___lsb 24
124#define reg_iop_sap_in_rw_bus1_sync___byte3_sel___width 2
125#define reg_iop_sap_in_rw_bus1_sync___byte3_ext_src___lsb 26
126#define reg_iop_sap_in_rw_bus1_sync___byte3_ext_src___width 3
127#define reg_iop_sap_in_rw_bus1_sync___byte3_edge___lsb 29
128#define reg_iop_sap_in_rw_bus1_sync___byte3_edge___width 2
129#define reg_iop_sap_in_rw_bus1_sync___byte3_delay___lsb 31
130#define reg_iop_sap_in_rw_bus1_sync___byte3_delay___width 1
131#define reg_iop_sap_in_rw_bus1_sync___byte3_delay___bit 31
132#define reg_iop_sap_in_rw_bus1_sync_offset 4
133
134#define STRIDE_iop_sap_in_rw_gio 4
135/* Register rw_gio, scope iop_sap_in, type rw */
136#define reg_iop_sap_in_rw_gio___sync_sel___lsb 0
137#define reg_iop_sap_in_rw_gio___sync_sel___width 2
138#define reg_iop_sap_in_rw_gio___sync_ext_src___lsb 2
139#define reg_iop_sap_in_rw_gio___sync_ext_src___width 3
140#define reg_iop_sap_in_rw_gio___sync_edge___lsb 5
141#define reg_iop_sap_in_rw_gio___sync_edge___width 2
142#define reg_iop_sap_in_rw_gio___delay___lsb 7
143#define reg_iop_sap_in_rw_gio___delay___width 1
144#define reg_iop_sap_in_rw_gio___delay___bit 7
145#define reg_iop_sap_in_rw_gio___logic___lsb 8
146#define reg_iop_sap_in_rw_gio___logic___width 2
147#define reg_iop_sap_in_rw_gio_offset 8
148
149
150/* Constants */
151#define regk_iop_sap_in_and 0x00000002
152#define regk_iop_sap_in_ext_clk200 0x00000003
153#define regk_iop_sap_in_gio1 0x00000000
154#define regk_iop_sap_in_gio13 0x00000005
155#define regk_iop_sap_in_gio18 0x00000003
156#define regk_iop_sap_in_gio19 0x00000004
157#define regk_iop_sap_in_gio21 0x00000006
158#define regk_iop_sap_in_gio23 0x00000005
159#define regk_iop_sap_in_gio29 0x00000007
160#define regk_iop_sap_in_gio5 0x00000004
161#define regk_iop_sap_in_gio6 0x00000001
162#define regk_iop_sap_in_gio7 0x00000002
163#define regk_iop_sap_in_inv 0x00000001
164#define regk_iop_sap_in_neg 0x00000002
165#define regk_iop_sap_in_no 0x00000000
166#define regk_iop_sap_in_no_del_ext_clk200 0x00000001
167#define regk_iop_sap_in_none 0x00000000
168#define regk_iop_sap_in_or 0x00000003
169#define regk_iop_sap_in_pos 0x00000001
170#define regk_iop_sap_in_pos_neg 0x00000003
171#define regk_iop_sap_in_rw_bus0_sync_default 0x02020202
172#define regk_iop_sap_in_rw_bus1_sync_default 0x02020202
173#define regk_iop_sap_in_rw_gio_default 0x00000002
174#define regk_iop_sap_in_rw_gio_size 0x00000020
175#define regk_iop_sap_in_timer_grp0_tmr3 0x00000006
176#define regk_iop_sap_in_timer_grp1_tmr3 0x00000004
177#define regk_iop_sap_in_timer_grp2_tmr3 0x00000005
178#define regk_iop_sap_in_timer_grp3_tmr3 0x00000007
179#define regk_iop_sap_in_tmr_clk200 0x00000000
180#define regk_iop_sap_in_two_clk200 0x00000002
181#define regk_iop_sap_in_yes 0x00000001
182#endif /* __iop_sap_in_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_out_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_out_defs_asm.h
deleted file mode 100644
index 0ec727f92a25..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_out_defs_asm.h
+++ /dev/null
@@ -1,346 +0,0 @@
1#ifndef __iop_sap_out_defs_asm_h
2#define __iop_sap_out_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_sap_out.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_sap_out_defs_asm.h ../../inst/io_proc/rtl/iop_sap_out.r
11 * id: $Id: iop_sap_out_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_gen_gated, scope iop_sap_out, type rw */
57#define reg_iop_sap_out_rw_gen_gated___clk0_src___lsb 0
58#define reg_iop_sap_out_rw_gen_gated___clk0_src___width 2
59#define reg_iop_sap_out_rw_gen_gated___clk0_gate_src___lsb 2
60#define reg_iop_sap_out_rw_gen_gated___clk0_gate_src___width 2
61#define reg_iop_sap_out_rw_gen_gated___clk0_force_src___lsb 4
62#define reg_iop_sap_out_rw_gen_gated___clk0_force_src___width 3
63#define reg_iop_sap_out_rw_gen_gated___clk1_src___lsb 7
64#define reg_iop_sap_out_rw_gen_gated___clk1_src___width 2
65#define reg_iop_sap_out_rw_gen_gated___clk1_gate_src___lsb 9
66#define reg_iop_sap_out_rw_gen_gated___clk1_gate_src___width 2
67#define reg_iop_sap_out_rw_gen_gated___clk1_force_src___lsb 11
68#define reg_iop_sap_out_rw_gen_gated___clk1_force_src___width 3
69#define reg_iop_sap_out_rw_gen_gated___clk2_src___lsb 14
70#define reg_iop_sap_out_rw_gen_gated___clk2_src___width 2
71#define reg_iop_sap_out_rw_gen_gated___clk2_gate_src___lsb 16
72#define reg_iop_sap_out_rw_gen_gated___clk2_gate_src___width 2
73#define reg_iop_sap_out_rw_gen_gated___clk2_force_src___lsb 18
74#define reg_iop_sap_out_rw_gen_gated___clk2_force_src___width 3
75#define reg_iop_sap_out_rw_gen_gated___clk3_src___lsb 21
76#define reg_iop_sap_out_rw_gen_gated___clk3_src___width 2
77#define reg_iop_sap_out_rw_gen_gated___clk3_gate_src___lsb 23
78#define reg_iop_sap_out_rw_gen_gated___clk3_gate_src___width 2
79#define reg_iop_sap_out_rw_gen_gated___clk3_force_src___lsb 25
80#define reg_iop_sap_out_rw_gen_gated___clk3_force_src___width 3
81#define reg_iop_sap_out_rw_gen_gated_offset 0
82
83/* Register rw_bus0, scope iop_sap_out, type rw */
84#define reg_iop_sap_out_rw_bus0___byte0_clk_sel___lsb 0
85#define reg_iop_sap_out_rw_bus0___byte0_clk_sel___width 3
86#define reg_iop_sap_out_rw_bus0___byte0_gated_clk___lsb 3
87#define reg_iop_sap_out_rw_bus0___byte0_gated_clk___width 2
88#define reg_iop_sap_out_rw_bus0___byte0_clk_inv___lsb 5
89#define reg_iop_sap_out_rw_bus0___byte0_clk_inv___width 1
90#define reg_iop_sap_out_rw_bus0___byte0_clk_inv___bit 5
91#define reg_iop_sap_out_rw_bus0___byte1_clk_sel___lsb 6
92#define reg_iop_sap_out_rw_bus0___byte1_clk_sel___width 3
93#define reg_iop_sap_out_rw_bus0___byte1_gated_clk___lsb 9
94#define reg_iop_sap_out_rw_bus0___byte1_gated_clk___width 2
95#define reg_iop_sap_out_rw_bus0___byte1_clk_inv___lsb 11
96#define reg_iop_sap_out_rw_bus0___byte1_clk_inv___width 1
97#define reg_iop_sap_out_rw_bus0___byte1_clk_inv___bit 11
98#define reg_iop_sap_out_rw_bus0___byte2_clk_sel___lsb 12
99#define reg_iop_sap_out_rw_bus0___byte2_clk_sel___width 3
100#define reg_iop_sap_out_rw_bus0___byte2_gated_clk___lsb 15
101#define reg_iop_sap_out_rw_bus0___byte2_gated_clk___width 2
102#define reg_iop_sap_out_rw_bus0___byte2_clk_inv___lsb 17
103#define reg_iop_sap_out_rw_bus0___byte2_clk_inv___width 1
104#define reg_iop_sap_out_rw_bus0___byte2_clk_inv___bit 17
105#define reg_iop_sap_out_rw_bus0___byte3_clk_sel___lsb 18
106#define reg_iop_sap_out_rw_bus0___byte3_clk_sel___width 3
107#define reg_iop_sap_out_rw_bus0___byte3_gated_clk___lsb 21
108#define reg_iop_sap_out_rw_bus0___byte3_gated_clk___width 2
109#define reg_iop_sap_out_rw_bus0___byte3_clk_inv___lsb 23
110#define reg_iop_sap_out_rw_bus0___byte3_clk_inv___width 1
111#define reg_iop_sap_out_rw_bus0___byte3_clk_inv___bit 23
112#define reg_iop_sap_out_rw_bus0_offset 4
113
114/* Register rw_bus1, scope iop_sap_out, type rw */
115#define reg_iop_sap_out_rw_bus1___byte0_clk_sel___lsb 0
116#define reg_iop_sap_out_rw_bus1___byte0_clk_sel___width 3
117#define reg_iop_sap_out_rw_bus1___byte0_gated_clk___lsb 3
118#define reg_iop_sap_out_rw_bus1___byte0_gated_clk___width 2
119#define reg_iop_sap_out_rw_bus1___byte0_clk_inv___lsb 5
120#define reg_iop_sap_out_rw_bus1___byte0_clk_inv___width 1
121#define reg_iop_sap_out_rw_bus1___byte0_clk_inv___bit 5
122#define reg_iop_sap_out_rw_bus1___byte1_clk_sel___lsb 6
123#define reg_iop_sap_out_rw_bus1___byte1_clk_sel___width 3
124#define reg_iop_sap_out_rw_bus1___byte1_gated_clk___lsb 9
125#define reg_iop_sap_out_rw_bus1___byte1_gated_clk___width 2
126#define reg_iop_sap_out_rw_bus1___byte1_clk_inv___lsb 11
127#define reg_iop_sap_out_rw_bus1___byte1_clk_inv___width 1
128#define reg_iop_sap_out_rw_bus1___byte1_clk_inv___bit 11
129#define reg_iop_sap_out_rw_bus1___byte2_clk_sel___lsb 12
130#define reg_iop_sap_out_rw_bus1___byte2_clk_sel___width 3
131#define reg_iop_sap_out_rw_bus1___byte2_gated_clk___lsb 15
132#define reg_iop_sap_out_rw_bus1___byte2_gated_clk___width 2
133#define reg_iop_sap_out_rw_bus1___byte2_clk_inv___lsb 17
134#define reg_iop_sap_out_rw_bus1___byte2_clk_inv___width 1
135#define reg_iop_sap_out_rw_bus1___byte2_clk_inv___bit 17
136#define reg_iop_sap_out_rw_bus1___byte3_clk_sel___lsb 18
137#define reg_iop_sap_out_rw_bus1___byte3_clk_sel___width 3
138#define reg_iop_sap_out_rw_bus1___byte3_gated_clk___lsb 21
139#define reg_iop_sap_out_rw_bus1___byte3_gated_clk___width 2
140#define reg_iop_sap_out_rw_bus1___byte3_clk_inv___lsb 23
141#define reg_iop_sap_out_rw_bus1___byte3_clk_inv___width 1
142#define reg_iop_sap_out_rw_bus1___byte3_clk_inv___bit 23
143#define reg_iop_sap_out_rw_bus1_offset 8
144
145/* Register rw_bus0_lo_oe, scope iop_sap_out, type rw */
146#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_sel___lsb 0
147#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_sel___width 3
148#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_ext___lsb 3
149#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_ext___width 3
150#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_gated_clk___lsb 6
151#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_gated_clk___width 2
152#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_inv___lsb 8
153#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_inv___width 1
154#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_clk_inv___bit 8
155#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_logic___lsb 9
156#define reg_iop_sap_out_rw_bus0_lo_oe___byte0_logic___width 2
157#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_sel___lsb 11
158#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_sel___width 3
159#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_ext___lsb 14
160#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_ext___width 3
161#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_gated_clk___lsb 17
162#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_gated_clk___width 2
163#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_inv___lsb 19
164#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_inv___width 1
165#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_clk_inv___bit 19
166#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_logic___lsb 20
167#define reg_iop_sap_out_rw_bus0_lo_oe___byte1_logic___width 2
168#define reg_iop_sap_out_rw_bus0_lo_oe_offset 12
169
170/* Register rw_bus0_hi_oe, scope iop_sap_out, type rw */
171#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_sel___lsb 0
172#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_sel___width 3
173#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_ext___lsb 3
174#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_ext___width 3
175#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_gated_clk___lsb 6
176#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_gated_clk___width 2
177#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_inv___lsb 8
178#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_inv___width 1
179#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_clk_inv___bit 8
180#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_logic___lsb 9
181#define reg_iop_sap_out_rw_bus0_hi_oe___byte2_logic___width 2
182#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_sel___lsb 11
183#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_sel___width 3
184#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_ext___lsb 14
185#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_ext___width 3
186#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_gated_clk___lsb 17
187#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_gated_clk___width 2
188#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_inv___lsb 19
189#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_inv___width 1
190#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_clk_inv___bit 19
191#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_logic___lsb 20
192#define reg_iop_sap_out_rw_bus0_hi_oe___byte3_logic___width 2
193#define reg_iop_sap_out_rw_bus0_hi_oe_offset 16
194
195/* Register rw_bus1_lo_oe, scope iop_sap_out, type rw */
196#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_sel___lsb 0
197#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_sel___width 3
198#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_ext___lsb 3
199#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_ext___width 3
200#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_gated_clk___lsb 6
201#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_gated_clk___width 2
202#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_inv___lsb 8
203#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_inv___width 1
204#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_clk_inv___bit 8
205#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_logic___lsb 9
206#define reg_iop_sap_out_rw_bus1_lo_oe___byte0_logic___width 2
207#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_sel___lsb 11
208#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_sel___width 3
209#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_ext___lsb 14
210#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_ext___width 3
211#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_gated_clk___lsb 17
212#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_gated_clk___width 2
213#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_inv___lsb 19
214#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_inv___width 1
215#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_clk_inv___bit 19
216#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_logic___lsb 20
217#define reg_iop_sap_out_rw_bus1_lo_oe___byte1_logic___width 2
218#define reg_iop_sap_out_rw_bus1_lo_oe_offset 20
219
220/* Register rw_bus1_hi_oe, scope iop_sap_out, type rw */
221#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_sel___lsb 0
222#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_sel___width 3
223#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_ext___lsb 3
224#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_ext___width 3
225#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_gated_clk___lsb 6
226#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_gated_clk___width 2
227#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_inv___lsb 8
228#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_inv___width 1
229#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_clk_inv___bit 8
230#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_logic___lsb 9
231#define reg_iop_sap_out_rw_bus1_hi_oe___byte2_logic___width 2
232#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_sel___lsb 11
233#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_sel___width 3
234#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_ext___lsb 14
235#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_ext___width 3
236#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_gated_clk___lsb 17
237#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_gated_clk___width 2
238#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_inv___lsb 19
239#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_inv___width 1
240#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_clk_inv___bit 19
241#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_logic___lsb 20
242#define reg_iop_sap_out_rw_bus1_hi_oe___byte3_logic___width 2
243#define reg_iop_sap_out_rw_bus1_hi_oe_offset 24
244
245#define STRIDE_iop_sap_out_rw_gio 4
246/* Register rw_gio, scope iop_sap_out, type rw */
247#define reg_iop_sap_out_rw_gio___out_clk_sel___lsb 0
248#define reg_iop_sap_out_rw_gio___out_clk_sel___width 3
249#define reg_iop_sap_out_rw_gio___out_clk_ext___lsb 3
250#define reg_iop_sap_out_rw_gio___out_clk_ext___width 4
251#define reg_iop_sap_out_rw_gio___out_gated_clk___lsb 7
252#define reg_iop_sap_out_rw_gio___out_gated_clk___width 2
253#define reg_iop_sap_out_rw_gio___out_clk_inv___lsb 9
254#define reg_iop_sap_out_rw_gio___out_clk_inv___width 1
255#define reg_iop_sap_out_rw_gio___out_clk_inv___bit 9
256#define reg_iop_sap_out_rw_gio___out_logic___lsb 10
257#define reg_iop_sap_out_rw_gio___out_logic___width 1
258#define reg_iop_sap_out_rw_gio___out_logic___bit 10
259#define reg_iop_sap_out_rw_gio___oe_clk_sel___lsb 11
260#define reg_iop_sap_out_rw_gio___oe_clk_sel___width 3
261#define reg_iop_sap_out_rw_gio___oe_clk_ext___lsb 14
262#define reg_iop_sap_out_rw_gio___oe_clk_ext___width 3
263#define reg_iop_sap_out_rw_gio___oe_gated_clk___lsb 17
264#define reg_iop_sap_out_rw_gio___oe_gated_clk___width 2
265#define reg_iop_sap_out_rw_gio___oe_clk_inv___lsb 19
266#define reg_iop_sap_out_rw_gio___oe_clk_inv___width 1
267#define reg_iop_sap_out_rw_gio___oe_clk_inv___bit 19
268#define reg_iop_sap_out_rw_gio___oe_logic___lsb 20
269#define reg_iop_sap_out_rw_gio___oe_logic___width 2
270#define reg_iop_sap_out_rw_gio_offset 28
271
272
273/* Constants */
274#define regk_iop_sap_out_and 0x00000002
275#define regk_iop_sap_out_clk0 0x00000000
276#define regk_iop_sap_out_clk1 0x00000001
277#define regk_iop_sap_out_clk12 0x00000002
278#define regk_iop_sap_out_clk2 0x00000002
279#define regk_iop_sap_out_clk200 0x00000001
280#define regk_iop_sap_out_clk3 0x00000003
281#define regk_iop_sap_out_ext 0x00000003
282#define regk_iop_sap_out_gated 0x00000004
283#define regk_iop_sap_out_gio1 0x00000000
284#define regk_iop_sap_out_gio13 0x00000002
285#define regk_iop_sap_out_gio13_clk 0x0000000c
286#define regk_iop_sap_out_gio15 0x00000001
287#define regk_iop_sap_out_gio18 0x00000003
288#define regk_iop_sap_out_gio18_clk 0x0000000d
289#define regk_iop_sap_out_gio1_clk 0x00000008
290#define regk_iop_sap_out_gio21_clk 0x0000000e
291#define regk_iop_sap_out_gio23 0x00000002
292#define regk_iop_sap_out_gio29_clk 0x0000000f
293#define regk_iop_sap_out_gio31 0x00000003
294#define regk_iop_sap_out_gio5 0x00000001
295#define regk_iop_sap_out_gio5_clk 0x00000009
296#define regk_iop_sap_out_gio6_clk 0x0000000a
297#define regk_iop_sap_out_gio7 0x00000000
298#define regk_iop_sap_out_gio7_clk 0x0000000b
299#define regk_iop_sap_out_gio_in13 0x00000001
300#define regk_iop_sap_out_gio_in21 0x00000002
301#define regk_iop_sap_out_gio_in29 0x00000003
302#define regk_iop_sap_out_gio_in5 0x00000000
303#define regk_iop_sap_out_inv 0x00000001
304#define regk_iop_sap_out_nand 0x00000003
305#define regk_iop_sap_out_no 0x00000000
306#define regk_iop_sap_out_none 0x00000000
307#define regk_iop_sap_out_rw_bus0_default 0x00000000
308#define regk_iop_sap_out_rw_bus0_hi_oe_default 0x00000000
309#define regk_iop_sap_out_rw_bus0_lo_oe_default 0x00000000
310#define regk_iop_sap_out_rw_bus1_default 0x00000000
311#define regk_iop_sap_out_rw_bus1_hi_oe_default 0x00000000
312#define regk_iop_sap_out_rw_bus1_lo_oe_default 0x00000000
313#define regk_iop_sap_out_rw_gen_gated_default 0x00000000
314#define regk_iop_sap_out_rw_gio_default 0x00000000
315#define regk_iop_sap_out_rw_gio_size 0x00000020
316#define regk_iop_sap_out_spu0_gio0 0x00000002
317#define regk_iop_sap_out_spu0_gio1 0x00000003
318#define regk_iop_sap_out_spu0_gio12 0x00000004
319#define regk_iop_sap_out_spu0_gio13 0x00000004
320#define regk_iop_sap_out_spu0_gio14 0x00000004
321#define regk_iop_sap_out_spu0_gio15 0x00000004
322#define regk_iop_sap_out_spu0_gio2 0x00000002
323#define regk_iop_sap_out_spu0_gio3 0x00000003
324#define regk_iop_sap_out_spu0_gio4 0x00000002
325#define regk_iop_sap_out_spu0_gio5 0x00000003
326#define regk_iop_sap_out_spu0_gio6 0x00000002
327#define regk_iop_sap_out_spu0_gio7 0x00000003
328#define regk_iop_sap_out_spu1_gio0 0x00000005
329#define regk_iop_sap_out_spu1_gio1 0x00000006
330#define regk_iop_sap_out_spu1_gio12 0x00000007
331#define regk_iop_sap_out_spu1_gio13 0x00000007
332#define regk_iop_sap_out_spu1_gio14 0x00000007
333#define regk_iop_sap_out_spu1_gio15 0x00000007
334#define regk_iop_sap_out_spu1_gio2 0x00000005
335#define regk_iop_sap_out_spu1_gio3 0x00000006
336#define regk_iop_sap_out_spu1_gio4 0x00000005
337#define regk_iop_sap_out_spu1_gio5 0x00000006
338#define regk_iop_sap_out_spu1_gio6 0x00000005
339#define regk_iop_sap_out_spu1_gio7 0x00000006
340#define regk_iop_sap_out_timer_grp0_tmr2 0x00000004
341#define regk_iop_sap_out_timer_grp1_tmr2 0x00000005
342#define regk_iop_sap_out_timer_grp2_tmr2 0x00000006
343#define regk_iop_sap_out_timer_grp3_tmr2 0x00000007
344#define regk_iop_sap_out_tmr 0x00000005
345#define regk_iop_sap_out_yes 0x00000001
346#endif /* __iop_sap_out_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_in_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_in_defs_asm.h
deleted file mode 100644
index 2cf5721597fc..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_in_defs_asm.h
+++ /dev/null
@@ -1,111 +0,0 @@
1#ifndef __iop_scrc_in_defs_asm_h
2#define __iop_scrc_in_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_scrc_in.r
7 * id: iop_scrc_in.r,v 1.10 2005/02/16 09:13:58 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_scrc_in_defs_asm.h ../../inst/io_proc/rtl/iop_scrc_in.r
11 * id: $Id: iop_scrc_in_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_scrc_in, type rw */
57#define reg_iop_scrc_in_rw_cfg___trig___lsb 0
58#define reg_iop_scrc_in_rw_cfg___trig___width 2
59#define reg_iop_scrc_in_rw_cfg_offset 0
60
61/* Register rw_ctrl, scope iop_scrc_in, type rw */
62#define reg_iop_scrc_in_rw_ctrl___dif_in_en___lsb 0
63#define reg_iop_scrc_in_rw_ctrl___dif_in_en___width 1
64#define reg_iop_scrc_in_rw_ctrl___dif_in_en___bit 0
65#define reg_iop_scrc_in_rw_ctrl_offset 4
66
67/* Register r_stat, scope iop_scrc_in, type r */
68#define reg_iop_scrc_in_r_stat___err___lsb 0
69#define reg_iop_scrc_in_r_stat___err___width 1
70#define reg_iop_scrc_in_r_stat___err___bit 0
71#define reg_iop_scrc_in_r_stat_offset 8
72
73/* Register rw_init_crc, scope iop_scrc_in, type rw */
74#define reg_iop_scrc_in_rw_init_crc_offset 12
75
76/* Register rs_computed_crc, scope iop_scrc_in, type rs */
77#define reg_iop_scrc_in_rs_computed_crc_offset 16
78
79/* Register r_computed_crc, scope iop_scrc_in, type r */
80#define reg_iop_scrc_in_r_computed_crc_offset 20
81
82/* Register rw_crc, scope iop_scrc_in, type rw */
83#define reg_iop_scrc_in_rw_crc_offset 24
84
85/* Register rw_correct_crc, scope iop_scrc_in, type rw */
86#define reg_iop_scrc_in_rw_correct_crc_offset 28
87
88/* Register rw_wr1bit, scope iop_scrc_in, type rw */
89#define reg_iop_scrc_in_rw_wr1bit___data___lsb 0
90#define reg_iop_scrc_in_rw_wr1bit___data___width 2
91#define reg_iop_scrc_in_rw_wr1bit___last___lsb 2
92#define reg_iop_scrc_in_rw_wr1bit___last___width 2
93#define reg_iop_scrc_in_rw_wr1bit_offset 32
94
95
96/* Constants */
97#define regk_iop_scrc_in_dif_in 0x00000002
98#define regk_iop_scrc_in_hi 0x00000000
99#define regk_iop_scrc_in_neg 0x00000002
100#define regk_iop_scrc_in_no 0x00000000
101#define regk_iop_scrc_in_pos 0x00000001
102#define regk_iop_scrc_in_pos_neg 0x00000003
103#define regk_iop_scrc_in_r_computed_crc_default 0x00000000
104#define regk_iop_scrc_in_rs_computed_crc_default 0x00000000
105#define regk_iop_scrc_in_rw_cfg_default 0x00000000
106#define regk_iop_scrc_in_rw_ctrl_default 0x00000000
107#define regk_iop_scrc_in_rw_init_crc_default 0x00000000
108#define regk_iop_scrc_in_set0 0x00000000
109#define regk_iop_scrc_in_set1 0x00000001
110#define regk_iop_scrc_in_yes 0x00000001
111#endif /* __iop_scrc_in_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_out_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_out_defs_asm.h
deleted file mode 100644
index 640a25725f20..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_out_defs_asm.h
+++ /dev/null
@@ -1,105 +0,0 @@
1#ifndef __iop_scrc_out_defs_asm_h
2#define __iop_scrc_out_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_scrc_out.r
7 * id: iop_scrc_out.r,v 1.11 2005/02/16 09:13:38 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_scrc_out_defs_asm.h ../../inst/io_proc/rtl/iop_scrc_out.r
11 * id: $Id: iop_scrc_out_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_scrc_out, type rw */
57#define reg_iop_scrc_out_rw_cfg___trig___lsb 0
58#define reg_iop_scrc_out_rw_cfg___trig___width 2
59#define reg_iop_scrc_out_rw_cfg___inv_crc___lsb 2
60#define reg_iop_scrc_out_rw_cfg___inv_crc___width 1
61#define reg_iop_scrc_out_rw_cfg___inv_crc___bit 2
62#define reg_iop_scrc_out_rw_cfg_offset 0
63
64/* Register rw_ctrl, scope iop_scrc_out, type rw */
65#define reg_iop_scrc_out_rw_ctrl___strb_src___lsb 0
66#define reg_iop_scrc_out_rw_ctrl___strb_src___width 1
67#define reg_iop_scrc_out_rw_ctrl___strb_src___bit 0
68#define reg_iop_scrc_out_rw_ctrl___out_src___lsb 1
69#define reg_iop_scrc_out_rw_ctrl___out_src___width 1
70#define reg_iop_scrc_out_rw_ctrl___out_src___bit 1
71#define reg_iop_scrc_out_rw_ctrl_offset 4
72
73/* Register rw_init_crc, scope iop_scrc_out, type rw */
74#define reg_iop_scrc_out_rw_init_crc_offset 8
75
76/* Register rw_crc, scope iop_scrc_out, type rw */
77#define reg_iop_scrc_out_rw_crc_offset 12
78
79/* Register rw_data, scope iop_scrc_out, type rw */
80#define reg_iop_scrc_out_rw_data___val___lsb 0
81#define reg_iop_scrc_out_rw_data___val___width 1
82#define reg_iop_scrc_out_rw_data___val___bit 0
83#define reg_iop_scrc_out_rw_data_offset 16
84
85/* Register r_computed_crc, scope iop_scrc_out, type r */
86#define reg_iop_scrc_out_r_computed_crc_offset 20
87
88
89/* Constants */
90#define regk_iop_scrc_out_crc 0x00000001
91#define regk_iop_scrc_out_data 0x00000000
92#define regk_iop_scrc_out_dif 0x00000001
93#define regk_iop_scrc_out_hi 0x00000000
94#define regk_iop_scrc_out_neg 0x00000002
95#define regk_iop_scrc_out_no 0x00000000
96#define regk_iop_scrc_out_pos 0x00000001
97#define regk_iop_scrc_out_pos_neg 0x00000003
98#define regk_iop_scrc_out_reg 0x00000000
99#define regk_iop_scrc_out_rw_cfg_default 0x00000000
100#define regk_iop_scrc_out_rw_crc_default 0x00000000
101#define regk_iop_scrc_out_rw_ctrl_default 0x00000000
102#define regk_iop_scrc_out_rw_data_default 0x00000000
103#define regk_iop_scrc_out_rw_init_crc_default 0x00000000
104#define regk_iop_scrc_out_yes 0x00000001
105#endif /* __iop_scrc_out_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_spu_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_spu_defs_asm.h
deleted file mode 100644
index bb402c1aa761..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_spu_defs_asm.h
+++ /dev/null
@@ -1,573 +0,0 @@
1#ifndef __iop_spu_defs_asm_h
2#define __iop_spu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_spu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_spu_defs_asm.h ../../inst/io_proc/rtl/iop_spu.r
11 * id: $Id: iop_spu_defs_asm.h,v 1.5 2005/04/24 18:31:06 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56#define STRIDE_iop_spu_rw_r 4
57/* Register rw_r, scope iop_spu, type rw */
58#define reg_iop_spu_rw_r_offset 0
59
60/* Register rw_seq_pc, scope iop_spu, type rw */
61#define reg_iop_spu_rw_seq_pc___addr___lsb 0
62#define reg_iop_spu_rw_seq_pc___addr___width 12
63#define reg_iop_spu_rw_seq_pc_offset 64
64
65/* Register rw_fsm_pc, scope iop_spu, type rw */
66#define reg_iop_spu_rw_fsm_pc___addr___lsb 0
67#define reg_iop_spu_rw_fsm_pc___addr___width 12
68#define reg_iop_spu_rw_fsm_pc_offset 68
69
70/* Register rw_ctrl, scope iop_spu, type rw */
71#define reg_iop_spu_rw_ctrl___fsm___lsb 0
72#define reg_iop_spu_rw_ctrl___fsm___width 1
73#define reg_iop_spu_rw_ctrl___fsm___bit 0
74#define reg_iop_spu_rw_ctrl___en___lsb 1
75#define reg_iop_spu_rw_ctrl___en___width 1
76#define reg_iop_spu_rw_ctrl___en___bit 1
77#define reg_iop_spu_rw_ctrl_offset 72
78
79/* Register rw_fsm_inputs3_0, scope iop_spu, type rw */
80#define reg_iop_spu_rw_fsm_inputs3_0___val0___lsb 0
81#define reg_iop_spu_rw_fsm_inputs3_0___val0___width 5
82#define reg_iop_spu_rw_fsm_inputs3_0___src0___lsb 5
83#define reg_iop_spu_rw_fsm_inputs3_0___src0___width 3
84#define reg_iop_spu_rw_fsm_inputs3_0___val1___lsb 8
85#define reg_iop_spu_rw_fsm_inputs3_0___val1___width 5
86#define reg_iop_spu_rw_fsm_inputs3_0___src1___lsb 13
87#define reg_iop_spu_rw_fsm_inputs3_0___src1___width 3
88#define reg_iop_spu_rw_fsm_inputs3_0___val2___lsb 16
89#define reg_iop_spu_rw_fsm_inputs3_0___val2___width 5
90#define reg_iop_spu_rw_fsm_inputs3_0___src2___lsb 21
91#define reg_iop_spu_rw_fsm_inputs3_0___src2___width 3
92#define reg_iop_spu_rw_fsm_inputs3_0___val3___lsb 24
93#define reg_iop_spu_rw_fsm_inputs3_0___val3___width 5
94#define reg_iop_spu_rw_fsm_inputs3_0___src3___lsb 29
95#define reg_iop_spu_rw_fsm_inputs3_0___src3___width 3
96#define reg_iop_spu_rw_fsm_inputs3_0_offset 76
97
98/* Register rw_fsm_inputs7_4, scope iop_spu, type rw */
99#define reg_iop_spu_rw_fsm_inputs7_4___val4___lsb 0
100#define reg_iop_spu_rw_fsm_inputs7_4___val4___width 5
101#define reg_iop_spu_rw_fsm_inputs7_4___src4___lsb 5
102#define reg_iop_spu_rw_fsm_inputs7_4___src4___width 3
103#define reg_iop_spu_rw_fsm_inputs7_4___val5___lsb 8
104#define reg_iop_spu_rw_fsm_inputs7_4___val5___width 5
105#define reg_iop_spu_rw_fsm_inputs7_4___src5___lsb 13
106#define reg_iop_spu_rw_fsm_inputs7_4___src5___width 3
107#define reg_iop_spu_rw_fsm_inputs7_4___val6___lsb 16
108#define reg_iop_spu_rw_fsm_inputs7_4___val6___width 5
109#define reg_iop_spu_rw_fsm_inputs7_4___src6___lsb 21
110#define reg_iop_spu_rw_fsm_inputs7_4___src6___width 3
111#define reg_iop_spu_rw_fsm_inputs7_4___val7___lsb 24
112#define reg_iop_spu_rw_fsm_inputs7_4___val7___width 5
113#define reg_iop_spu_rw_fsm_inputs7_4___src7___lsb 29
114#define reg_iop_spu_rw_fsm_inputs7_4___src7___width 3
115#define reg_iop_spu_rw_fsm_inputs7_4_offset 80
116
117/* Register rw_gio_out, scope iop_spu, type rw */
118#define reg_iop_spu_rw_gio_out_offset 84
119
120/* Register rw_bus0_out, scope iop_spu, type rw */
121#define reg_iop_spu_rw_bus0_out_offset 88
122
123/* Register rw_bus1_out, scope iop_spu, type rw */
124#define reg_iop_spu_rw_bus1_out_offset 92
125
126/* Register r_gio_in, scope iop_spu, type r */
127#define reg_iop_spu_r_gio_in_offset 96
128
129/* Register r_bus0_in, scope iop_spu, type r */
130#define reg_iop_spu_r_bus0_in_offset 100
131
132/* Register r_bus1_in, scope iop_spu, type r */
133#define reg_iop_spu_r_bus1_in_offset 104
134
135/* Register rw_gio_out_set, scope iop_spu, type rw */
136#define reg_iop_spu_rw_gio_out_set_offset 108
137
138/* Register rw_gio_out_clr, scope iop_spu, type rw */
139#define reg_iop_spu_rw_gio_out_clr_offset 112
140
141/* Register rs_wr_stat, scope iop_spu, type rs */
142#define reg_iop_spu_rs_wr_stat___r0___lsb 0
143#define reg_iop_spu_rs_wr_stat___r0___width 1
144#define reg_iop_spu_rs_wr_stat___r0___bit 0
145#define reg_iop_spu_rs_wr_stat___r1___lsb 1
146#define reg_iop_spu_rs_wr_stat___r1___width 1
147#define reg_iop_spu_rs_wr_stat___r1___bit 1
148#define reg_iop_spu_rs_wr_stat___r2___lsb 2
149#define reg_iop_spu_rs_wr_stat___r2___width 1
150#define reg_iop_spu_rs_wr_stat___r2___bit 2
151#define reg_iop_spu_rs_wr_stat___r3___lsb 3
152#define reg_iop_spu_rs_wr_stat___r3___width 1
153#define reg_iop_spu_rs_wr_stat___r3___bit 3
154#define reg_iop_spu_rs_wr_stat___r4___lsb 4
155#define reg_iop_spu_rs_wr_stat___r4___width 1
156#define reg_iop_spu_rs_wr_stat___r4___bit 4
157#define reg_iop_spu_rs_wr_stat___r5___lsb 5
158#define reg_iop_spu_rs_wr_stat___r5___width 1
159#define reg_iop_spu_rs_wr_stat___r5___bit 5
160#define reg_iop_spu_rs_wr_stat___r6___lsb 6
161#define reg_iop_spu_rs_wr_stat___r6___width 1
162#define reg_iop_spu_rs_wr_stat___r6___bit 6
163#define reg_iop_spu_rs_wr_stat___r7___lsb 7
164#define reg_iop_spu_rs_wr_stat___r7___width 1
165#define reg_iop_spu_rs_wr_stat___r7___bit 7
166#define reg_iop_spu_rs_wr_stat___r8___lsb 8
167#define reg_iop_spu_rs_wr_stat___r8___width 1
168#define reg_iop_spu_rs_wr_stat___r8___bit 8
169#define reg_iop_spu_rs_wr_stat___r9___lsb 9
170#define reg_iop_spu_rs_wr_stat___r9___width 1
171#define reg_iop_spu_rs_wr_stat___r9___bit 9
172#define reg_iop_spu_rs_wr_stat___r10___lsb 10
173#define reg_iop_spu_rs_wr_stat___r10___width 1
174#define reg_iop_spu_rs_wr_stat___r10___bit 10
175#define reg_iop_spu_rs_wr_stat___r11___lsb 11
176#define reg_iop_spu_rs_wr_stat___r11___width 1
177#define reg_iop_spu_rs_wr_stat___r11___bit 11
178#define reg_iop_spu_rs_wr_stat___r12___lsb 12
179#define reg_iop_spu_rs_wr_stat___r12___width 1
180#define reg_iop_spu_rs_wr_stat___r12___bit 12
181#define reg_iop_spu_rs_wr_stat___r13___lsb 13
182#define reg_iop_spu_rs_wr_stat___r13___width 1
183#define reg_iop_spu_rs_wr_stat___r13___bit 13
184#define reg_iop_spu_rs_wr_stat___r14___lsb 14
185#define reg_iop_spu_rs_wr_stat___r14___width 1
186#define reg_iop_spu_rs_wr_stat___r14___bit 14
187#define reg_iop_spu_rs_wr_stat___r15___lsb 15
188#define reg_iop_spu_rs_wr_stat___r15___width 1
189#define reg_iop_spu_rs_wr_stat___r15___bit 15
190#define reg_iop_spu_rs_wr_stat_offset 116
191
192/* Register r_wr_stat, scope iop_spu, type r */
193#define reg_iop_spu_r_wr_stat___r0___lsb 0
194#define reg_iop_spu_r_wr_stat___r0___width 1
195#define reg_iop_spu_r_wr_stat___r0___bit 0
196#define reg_iop_spu_r_wr_stat___r1___lsb 1
197#define reg_iop_spu_r_wr_stat___r1___width 1
198#define reg_iop_spu_r_wr_stat___r1___bit 1
199#define reg_iop_spu_r_wr_stat___r2___lsb 2
200#define reg_iop_spu_r_wr_stat___r2___width 1
201#define reg_iop_spu_r_wr_stat___r2___bit 2
202#define reg_iop_spu_r_wr_stat___r3___lsb 3
203#define reg_iop_spu_r_wr_stat___r3___width 1
204#define reg_iop_spu_r_wr_stat___r3___bit 3
205#define reg_iop_spu_r_wr_stat___r4___lsb 4
206#define reg_iop_spu_r_wr_stat___r4___width 1
207#define reg_iop_spu_r_wr_stat___r4___bit 4
208#define reg_iop_spu_r_wr_stat___r5___lsb 5
209#define reg_iop_spu_r_wr_stat___r5___width 1
210#define reg_iop_spu_r_wr_stat___r5___bit 5
211#define reg_iop_spu_r_wr_stat___r6___lsb 6
212#define reg_iop_spu_r_wr_stat___r6___width 1
213#define reg_iop_spu_r_wr_stat___r6___bit 6
214#define reg_iop_spu_r_wr_stat___r7___lsb 7
215#define reg_iop_spu_r_wr_stat___r7___width 1
216#define reg_iop_spu_r_wr_stat___r7___bit 7
217#define reg_iop_spu_r_wr_stat___r8___lsb 8
218#define reg_iop_spu_r_wr_stat___r8___width 1
219#define reg_iop_spu_r_wr_stat___r8___bit 8
220#define reg_iop_spu_r_wr_stat___r9___lsb 9
221#define reg_iop_spu_r_wr_stat___r9___width 1
222#define reg_iop_spu_r_wr_stat___r9___bit 9
223#define reg_iop_spu_r_wr_stat___r10___lsb 10
224#define reg_iop_spu_r_wr_stat___r10___width 1
225#define reg_iop_spu_r_wr_stat___r10___bit 10
226#define reg_iop_spu_r_wr_stat___r11___lsb 11
227#define reg_iop_spu_r_wr_stat___r11___width 1
228#define reg_iop_spu_r_wr_stat___r11___bit 11
229#define reg_iop_spu_r_wr_stat___r12___lsb 12
230#define reg_iop_spu_r_wr_stat___r12___width 1
231#define reg_iop_spu_r_wr_stat___r12___bit 12
232#define reg_iop_spu_r_wr_stat___r13___lsb 13
233#define reg_iop_spu_r_wr_stat___r13___width 1
234#define reg_iop_spu_r_wr_stat___r13___bit 13
235#define reg_iop_spu_r_wr_stat___r14___lsb 14
236#define reg_iop_spu_r_wr_stat___r14___width 1
237#define reg_iop_spu_r_wr_stat___r14___bit 14
238#define reg_iop_spu_r_wr_stat___r15___lsb 15
239#define reg_iop_spu_r_wr_stat___r15___width 1
240#define reg_iop_spu_r_wr_stat___r15___bit 15
241#define reg_iop_spu_r_wr_stat_offset 120
242
243/* Register r_reg_indexed_by_bus0_in, scope iop_spu, type r */
244#define reg_iop_spu_r_reg_indexed_by_bus0_in_offset 124
245
246/* Register r_stat_in, scope iop_spu, type r */
247#define reg_iop_spu_r_stat_in___timer_grp_lo___lsb 0
248#define reg_iop_spu_r_stat_in___timer_grp_lo___width 4
249#define reg_iop_spu_r_stat_in___fifo_out_last___lsb 4
250#define reg_iop_spu_r_stat_in___fifo_out_last___width 1
251#define reg_iop_spu_r_stat_in___fifo_out_last___bit 4
252#define reg_iop_spu_r_stat_in___fifo_out_rdy___lsb 5
253#define reg_iop_spu_r_stat_in___fifo_out_rdy___width 1
254#define reg_iop_spu_r_stat_in___fifo_out_rdy___bit 5
255#define reg_iop_spu_r_stat_in___fifo_out_all___lsb 6
256#define reg_iop_spu_r_stat_in___fifo_out_all___width 1
257#define reg_iop_spu_r_stat_in___fifo_out_all___bit 6
258#define reg_iop_spu_r_stat_in___fifo_in_rdy___lsb 7
259#define reg_iop_spu_r_stat_in___fifo_in_rdy___width 1
260#define reg_iop_spu_r_stat_in___fifo_in_rdy___bit 7
261#define reg_iop_spu_r_stat_in___dmc_out_all___lsb 8
262#define reg_iop_spu_r_stat_in___dmc_out_all___width 1
263#define reg_iop_spu_r_stat_in___dmc_out_all___bit 8
264#define reg_iop_spu_r_stat_in___dmc_out_dth___lsb 9
265#define reg_iop_spu_r_stat_in___dmc_out_dth___width 1
266#define reg_iop_spu_r_stat_in___dmc_out_dth___bit 9
267#define reg_iop_spu_r_stat_in___dmc_out_eop___lsb 10
268#define reg_iop_spu_r_stat_in___dmc_out_eop___width 1
269#define reg_iop_spu_r_stat_in___dmc_out_eop___bit 10
270#define reg_iop_spu_r_stat_in___dmc_out_dv___lsb 11
271#define reg_iop_spu_r_stat_in___dmc_out_dv___width 1
272#define reg_iop_spu_r_stat_in___dmc_out_dv___bit 11
273#define reg_iop_spu_r_stat_in___dmc_out_last___lsb 12
274#define reg_iop_spu_r_stat_in___dmc_out_last___width 1
275#define reg_iop_spu_r_stat_in___dmc_out_last___bit 12
276#define reg_iop_spu_r_stat_in___dmc_out_cmd_rq___lsb 13
277#define reg_iop_spu_r_stat_in___dmc_out_cmd_rq___width 1
278#define reg_iop_spu_r_stat_in___dmc_out_cmd_rq___bit 13
279#define reg_iop_spu_r_stat_in___dmc_out_cmd_rdy___lsb 14
280#define reg_iop_spu_r_stat_in___dmc_out_cmd_rdy___width 1
281#define reg_iop_spu_r_stat_in___dmc_out_cmd_rdy___bit 14
282#define reg_iop_spu_r_stat_in___pcrc_correct___lsb 15
283#define reg_iop_spu_r_stat_in___pcrc_correct___width 1
284#define reg_iop_spu_r_stat_in___pcrc_correct___bit 15
285#define reg_iop_spu_r_stat_in___timer_grp_hi___lsb 16
286#define reg_iop_spu_r_stat_in___timer_grp_hi___width 4
287#define reg_iop_spu_r_stat_in___dmc_in_sth___lsb 20
288#define reg_iop_spu_r_stat_in___dmc_in_sth___width 1
289#define reg_iop_spu_r_stat_in___dmc_in_sth___bit 20
290#define reg_iop_spu_r_stat_in___dmc_in_full___lsb 21
291#define reg_iop_spu_r_stat_in___dmc_in_full___width 1
292#define reg_iop_spu_r_stat_in___dmc_in_full___bit 21
293#define reg_iop_spu_r_stat_in___dmc_in_cmd_rdy___lsb 22
294#define reg_iop_spu_r_stat_in___dmc_in_cmd_rdy___width 1
295#define reg_iop_spu_r_stat_in___dmc_in_cmd_rdy___bit 22
296#define reg_iop_spu_r_stat_in___spu_gio_out___lsb 23
297#define reg_iop_spu_r_stat_in___spu_gio_out___width 4
298#define reg_iop_spu_r_stat_in___sync_clk12___lsb 27
299#define reg_iop_spu_r_stat_in___sync_clk12___width 1
300#define reg_iop_spu_r_stat_in___sync_clk12___bit 27
301#define reg_iop_spu_r_stat_in___scrc_out_data___lsb 28
302#define reg_iop_spu_r_stat_in___scrc_out_data___width 1
303#define reg_iop_spu_r_stat_in___scrc_out_data___bit 28
304#define reg_iop_spu_r_stat_in___scrc_in_err___lsb 29
305#define reg_iop_spu_r_stat_in___scrc_in_err___width 1
306#define reg_iop_spu_r_stat_in___scrc_in_err___bit 29
307#define reg_iop_spu_r_stat_in___mc_busy___lsb 30
308#define reg_iop_spu_r_stat_in___mc_busy___width 1
309#define reg_iop_spu_r_stat_in___mc_busy___bit 30
310#define reg_iop_spu_r_stat_in___mc_owned___lsb 31
311#define reg_iop_spu_r_stat_in___mc_owned___width 1
312#define reg_iop_spu_r_stat_in___mc_owned___bit 31
313#define reg_iop_spu_r_stat_in_offset 128
314
315/* Register r_trigger_in, scope iop_spu, type r */
316#define reg_iop_spu_r_trigger_in_offset 132
317
318/* Register r_special_stat, scope iop_spu, type r */
319#define reg_iop_spu_r_special_stat___c_flag___lsb 0
320#define reg_iop_spu_r_special_stat___c_flag___width 1
321#define reg_iop_spu_r_special_stat___c_flag___bit 0
322#define reg_iop_spu_r_special_stat___v_flag___lsb 1
323#define reg_iop_spu_r_special_stat___v_flag___width 1
324#define reg_iop_spu_r_special_stat___v_flag___bit 1
325#define reg_iop_spu_r_special_stat___z_flag___lsb 2
326#define reg_iop_spu_r_special_stat___z_flag___width 1
327#define reg_iop_spu_r_special_stat___z_flag___bit 2
328#define reg_iop_spu_r_special_stat___n_flag___lsb 3
329#define reg_iop_spu_r_special_stat___n_flag___width 1
330#define reg_iop_spu_r_special_stat___n_flag___bit 3
331#define reg_iop_spu_r_special_stat___xor_bus0_r2_0___lsb 4
332#define reg_iop_spu_r_special_stat___xor_bus0_r2_0___width 1
333#define reg_iop_spu_r_special_stat___xor_bus0_r2_0___bit 4
334#define reg_iop_spu_r_special_stat___xor_bus1_r3_0___lsb 5
335#define reg_iop_spu_r_special_stat___xor_bus1_r3_0___width 1
336#define reg_iop_spu_r_special_stat___xor_bus1_r3_0___bit 5
337#define reg_iop_spu_r_special_stat___xor_bus0m_r2_0___lsb 6
338#define reg_iop_spu_r_special_stat___xor_bus0m_r2_0___width 1
339#define reg_iop_spu_r_special_stat___xor_bus0m_r2_0___bit 6
340#define reg_iop_spu_r_special_stat___xor_bus1m_r3_0___lsb 7
341#define reg_iop_spu_r_special_stat___xor_bus1m_r3_0___width 1
342#define reg_iop_spu_r_special_stat___xor_bus1m_r3_0___bit 7
343#define reg_iop_spu_r_special_stat___fsm_in0___lsb 8
344#define reg_iop_spu_r_special_stat___fsm_in0___width 1
345#define reg_iop_spu_r_special_stat___fsm_in0___bit 8
346#define reg_iop_spu_r_special_stat___fsm_in1___lsb 9
347#define reg_iop_spu_r_special_stat___fsm_in1___width 1
348#define reg_iop_spu_r_special_stat___fsm_in1___bit 9
349#define reg_iop_spu_r_special_stat___fsm_in2___lsb 10
350#define reg_iop_spu_r_special_stat___fsm_in2___width 1
351#define reg_iop_spu_r_special_stat___fsm_in2___bit 10
352#define reg_iop_spu_r_special_stat___fsm_in3___lsb 11
353#define reg_iop_spu_r_special_stat___fsm_in3___width 1
354#define reg_iop_spu_r_special_stat___fsm_in3___bit 11
355#define reg_iop_spu_r_special_stat___fsm_in4___lsb 12
356#define reg_iop_spu_r_special_stat___fsm_in4___width 1
357#define reg_iop_spu_r_special_stat___fsm_in4___bit 12
358#define reg_iop_spu_r_special_stat___fsm_in5___lsb 13
359#define reg_iop_spu_r_special_stat___fsm_in5___width 1
360#define reg_iop_spu_r_special_stat___fsm_in5___bit 13
361#define reg_iop_spu_r_special_stat___fsm_in6___lsb 14
362#define reg_iop_spu_r_special_stat___fsm_in6___width 1
363#define reg_iop_spu_r_special_stat___fsm_in6___bit 14
364#define reg_iop_spu_r_special_stat___fsm_in7___lsb 15
365#define reg_iop_spu_r_special_stat___fsm_in7___width 1
366#define reg_iop_spu_r_special_stat___fsm_in7___bit 15
367#define reg_iop_spu_r_special_stat___event0___lsb 16
368#define reg_iop_spu_r_special_stat___event0___width 1
369#define reg_iop_spu_r_special_stat___event0___bit 16
370#define reg_iop_spu_r_special_stat___event1___lsb 17
371#define reg_iop_spu_r_special_stat___event1___width 1
372#define reg_iop_spu_r_special_stat___event1___bit 17
373#define reg_iop_spu_r_special_stat___event2___lsb 18
374#define reg_iop_spu_r_special_stat___event2___width 1
375#define reg_iop_spu_r_special_stat___event2___bit 18
376#define reg_iop_spu_r_special_stat___event3___lsb 19
377#define reg_iop_spu_r_special_stat___event3___width 1
378#define reg_iop_spu_r_special_stat___event3___bit 19
379#define reg_iop_spu_r_special_stat_offset 136
380
381/* Register rw_reg_access, scope iop_spu, type rw */
382#define reg_iop_spu_rw_reg_access___addr___lsb 0
383#define reg_iop_spu_rw_reg_access___addr___width 13
384#define reg_iop_spu_rw_reg_access___imm_hi___lsb 16
385#define reg_iop_spu_rw_reg_access___imm_hi___width 16
386#define reg_iop_spu_rw_reg_access_offset 140
387
388#define STRIDE_iop_spu_rw_event_cfg 4
389/* Register rw_event_cfg, scope iop_spu, type rw */
390#define reg_iop_spu_rw_event_cfg___addr___lsb 0
391#define reg_iop_spu_rw_event_cfg___addr___width 12
392#define reg_iop_spu_rw_event_cfg___src___lsb 12
393#define reg_iop_spu_rw_event_cfg___src___width 2
394#define reg_iop_spu_rw_event_cfg___eq_en___lsb 14
395#define reg_iop_spu_rw_event_cfg___eq_en___width 1
396#define reg_iop_spu_rw_event_cfg___eq_en___bit 14
397#define reg_iop_spu_rw_event_cfg___eq_inv___lsb 15
398#define reg_iop_spu_rw_event_cfg___eq_inv___width 1
399#define reg_iop_spu_rw_event_cfg___eq_inv___bit 15
400#define reg_iop_spu_rw_event_cfg___gt_en___lsb 16
401#define reg_iop_spu_rw_event_cfg___gt_en___width 1
402#define reg_iop_spu_rw_event_cfg___gt_en___bit 16
403#define reg_iop_spu_rw_event_cfg___gt_inv___lsb 17
404#define reg_iop_spu_rw_event_cfg___gt_inv___width 1
405#define reg_iop_spu_rw_event_cfg___gt_inv___bit 17
406#define reg_iop_spu_rw_event_cfg_offset 144
407
408#define STRIDE_iop_spu_rw_event_mask 4
409/* Register rw_event_mask, scope iop_spu, type rw */
410#define reg_iop_spu_rw_event_mask_offset 160
411
412#define STRIDE_iop_spu_rw_event_val 4
413/* Register rw_event_val, scope iop_spu, type rw */
414#define reg_iop_spu_rw_event_val_offset 176
415
416/* Register rw_event_ret, scope iop_spu, type rw */
417#define reg_iop_spu_rw_event_ret___addr___lsb 0
418#define reg_iop_spu_rw_event_ret___addr___width 12
419#define reg_iop_spu_rw_event_ret_offset 192
420
421/* Register r_trace, scope iop_spu, type r */
422#define reg_iop_spu_r_trace___fsm___lsb 0
423#define reg_iop_spu_r_trace___fsm___width 1
424#define reg_iop_spu_r_trace___fsm___bit 0
425#define reg_iop_spu_r_trace___en___lsb 1
426#define reg_iop_spu_r_trace___en___width 1
427#define reg_iop_spu_r_trace___en___bit 1
428#define reg_iop_spu_r_trace___c_flag___lsb 2
429#define reg_iop_spu_r_trace___c_flag___width 1
430#define reg_iop_spu_r_trace___c_flag___bit 2
431#define reg_iop_spu_r_trace___v_flag___lsb 3
432#define reg_iop_spu_r_trace___v_flag___width 1
433#define reg_iop_spu_r_trace___v_flag___bit 3
434#define reg_iop_spu_r_trace___z_flag___lsb 4
435#define reg_iop_spu_r_trace___z_flag___width 1
436#define reg_iop_spu_r_trace___z_flag___bit 4
437#define reg_iop_spu_r_trace___n_flag___lsb 5
438#define reg_iop_spu_r_trace___n_flag___width 1
439#define reg_iop_spu_r_trace___n_flag___bit 5
440#define reg_iop_spu_r_trace___seq_addr___lsb 6
441#define reg_iop_spu_r_trace___seq_addr___width 12
442#define reg_iop_spu_r_trace___fsm_addr___lsb 20
443#define reg_iop_spu_r_trace___fsm_addr___width 12
444#define reg_iop_spu_r_trace_offset 196
445
446/* Register r_fsm_trace, scope iop_spu, type r */
447#define reg_iop_spu_r_fsm_trace___fsm___lsb 0
448#define reg_iop_spu_r_fsm_trace___fsm___width 1
449#define reg_iop_spu_r_fsm_trace___fsm___bit 0
450#define reg_iop_spu_r_fsm_trace___en___lsb 1
451#define reg_iop_spu_r_fsm_trace___en___width 1
452#define reg_iop_spu_r_fsm_trace___en___bit 1
453#define reg_iop_spu_r_fsm_trace___tmr_done___lsb 2
454#define reg_iop_spu_r_fsm_trace___tmr_done___width 1
455#define reg_iop_spu_r_fsm_trace___tmr_done___bit 2
456#define reg_iop_spu_r_fsm_trace___inp0___lsb 3
457#define reg_iop_spu_r_fsm_trace___inp0___width 1
458#define reg_iop_spu_r_fsm_trace___inp0___bit 3
459#define reg_iop_spu_r_fsm_trace___inp1___lsb 4
460#define reg_iop_spu_r_fsm_trace___inp1___width 1
461#define reg_iop_spu_r_fsm_trace___inp1___bit 4
462#define reg_iop_spu_r_fsm_trace___inp2___lsb 5
463#define reg_iop_spu_r_fsm_trace___inp2___width 1
464#define reg_iop_spu_r_fsm_trace___inp2___bit 5
465#define reg_iop_spu_r_fsm_trace___inp3___lsb 6
466#define reg_iop_spu_r_fsm_trace___inp3___width 1
467#define reg_iop_spu_r_fsm_trace___inp3___bit 6
468#define reg_iop_spu_r_fsm_trace___event0___lsb 7
469#define reg_iop_spu_r_fsm_trace___event0___width 1
470#define reg_iop_spu_r_fsm_trace___event0___bit 7
471#define reg_iop_spu_r_fsm_trace___event1___lsb 8
472#define reg_iop_spu_r_fsm_trace___event1___width 1
473#define reg_iop_spu_r_fsm_trace___event1___bit 8
474#define reg_iop_spu_r_fsm_trace___event2___lsb 9
475#define reg_iop_spu_r_fsm_trace___event2___width 1
476#define reg_iop_spu_r_fsm_trace___event2___bit 9
477#define reg_iop_spu_r_fsm_trace___event3___lsb 10
478#define reg_iop_spu_r_fsm_trace___event3___width 1
479#define reg_iop_spu_r_fsm_trace___event3___bit 10
480#define reg_iop_spu_r_fsm_trace___gio_out___lsb 11
481#define reg_iop_spu_r_fsm_trace___gio_out___width 8
482#define reg_iop_spu_r_fsm_trace___fsm_addr___lsb 20
483#define reg_iop_spu_r_fsm_trace___fsm_addr___width 12
484#define reg_iop_spu_r_fsm_trace_offset 200
485
486#define STRIDE_iop_spu_rw_brp 4
487/* Register rw_brp, scope iop_spu, type rw */
488#define reg_iop_spu_rw_brp___addr___lsb 0
489#define reg_iop_spu_rw_brp___addr___width 12
490#define reg_iop_spu_rw_brp___fsm___lsb 12
491#define reg_iop_spu_rw_brp___fsm___width 1
492#define reg_iop_spu_rw_brp___fsm___bit 12
493#define reg_iop_spu_rw_brp___en___lsb 13
494#define reg_iop_spu_rw_brp___en___width 1
495#define reg_iop_spu_rw_brp___en___bit 13
496#define reg_iop_spu_rw_brp_offset 204
497
498
499/* Constants */
500#define regk_iop_spu_attn_hi 0x00000005
501#define regk_iop_spu_attn_lo 0x00000005
502#define regk_iop_spu_attn_r0 0x00000000
503#define regk_iop_spu_attn_r1 0x00000001
504#define regk_iop_spu_attn_r10 0x00000002
505#define regk_iop_spu_attn_r11 0x00000003
506#define regk_iop_spu_attn_r12 0x00000004
507#define regk_iop_spu_attn_r13 0x00000005
508#define regk_iop_spu_attn_r14 0x00000006
509#define regk_iop_spu_attn_r15 0x00000007
510#define regk_iop_spu_attn_r2 0x00000002
511#define regk_iop_spu_attn_r3 0x00000003
512#define regk_iop_spu_attn_r4 0x00000004
513#define regk_iop_spu_attn_r5 0x00000005
514#define regk_iop_spu_attn_r6 0x00000006
515#define regk_iop_spu_attn_r7 0x00000007
516#define regk_iop_spu_attn_r8 0x00000000
517#define regk_iop_spu_attn_r9 0x00000001
518#define regk_iop_spu_c 0x00000000
519#define regk_iop_spu_flag 0x00000002
520#define regk_iop_spu_gio_in 0x00000000
521#define regk_iop_spu_gio_out 0x00000005
522#define regk_iop_spu_gio_out0 0x00000008
523#define regk_iop_spu_gio_out1 0x00000009
524#define regk_iop_spu_gio_out2 0x0000000a
525#define regk_iop_spu_gio_out3 0x0000000b
526#define regk_iop_spu_gio_out4 0x0000000c
527#define regk_iop_spu_gio_out5 0x0000000d
528#define regk_iop_spu_gio_out6 0x0000000e
529#define regk_iop_spu_gio_out7 0x0000000f
530#define regk_iop_spu_n 0x00000003
531#define regk_iop_spu_no 0x00000000
532#define regk_iop_spu_r0 0x00000008
533#define regk_iop_spu_r1 0x00000009
534#define regk_iop_spu_r10 0x0000000a
535#define regk_iop_spu_r11 0x0000000b
536#define regk_iop_spu_r12 0x0000000c
537#define regk_iop_spu_r13 0x0000000d
538#define regk_iop_spu_r14 0x0000000e
539#define regk_iop_spu_r15 0x0000000f
540#define regk_iop_spu_r2 0x0000000a
541#define regk_iop_spu_r3 0x0000000b
542#define regk_iop_spu_r4 0x0000000c
543#define regk_iop_spu_r5 0x0000000d
544#define regk_iop_spu_r6 0x0000000e
545#define regk_iop_spu_r7 0x0000000f
546#define regk_iop_spu_r8 0x00000008
547#define regk_iop_spu_r9 0x00000009
548#define regk_iop_spu_reg_hi 0x00000002
549#define regk_iop_spu_reg_lo 0x00000002
550#define regk_iop_spu_rw_brp_default 0x00000000
551#define regk_iop_spu_rw_brp_size 0x00000004
552#define regk_iop_spu_rw_ctrl_default 0x00000000
553#define regk_iop_spu_rw_event_cfg_size 0x00000004
554#define regk_iop_spu_rw_event_mask_size 0x00000004
555#define regk_iop_spu_rw_event_val_size 0x00000004
556#define regk_iop_spu_rw_gio_out_default 0x00000000
557#define regk_iop_spu_rw_r_size 0x00000010
558#define regk_iop_spu_rw_reg_access_default 0x00000000
559#define regk_iop_spu_stat_in 0x00000002
560#define regk_iop_spu_statin_hi 0x00000004
561#define regk_iop_spu_statin_lo 0x00000004
562#define regk_iop_spu_trig 0x00000003
563#define regk_iop_spu_trigger 0x00000006
564#define regk_iop_spu_v 0x00000001
565#define regk_iop_spu_wsts_gioout_spec 0x00000001
566#define regk_iop_spu_xor 0x00000003
567#define regk_iop_spu_xor_bus0_r2_0 0x00000000
568#define regk_iop_spu_xor_bus0m_r2_0 0x00000002
569#define regk_iop_spu_xor_bus1_r3_0 0x00000001
570#define regk_iop_spu_xor_bus1m_r3_0 0x00000003
571#define regk_iop_spu_yes 0x00000001
572#define regk_iop_spu_z 0x00000002
573#endif /* __iop_spu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cfg_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
deleted file mode 100644
index 3be60f9b024c..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
+++ /dev/null
@@ -1,1052 +0,0 @@
1#ifndef __iop_sw_cfg_defs_asm_h
2#define __iop_sw_cfg_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_cfg.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_sw_cfg_defs_asm.h ../../inst/io_proc/rtl/guinness/iop_sw_cfg.r
11 * id: $Id: iop_sw_cfg_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_crc_par0_owner, scope iop_sw_cfg, type rw */
57#define reg_iop_sw_cfg_rw_crc_par0_owner___cfg___lsb 0
58#define reg_iop_sw_cfg_rw_crc_par0_owner___cfg___width 2
59#define reg_iop_sw_cfg_rw_crc_par0_owner_offset 0
60
61/* Register rw_crc_par1_owner, scope iop_sw_cfg, type rw */
62#define reg_iop_sw_cfg_rw_crc_par1_owner___cfg___lsb 0
63#define reg_iop_sw_cfg_rw_crc_par1_owner___cfg___width 2
64#define reg_iop_sw_cfg_rw_crc_par1_owner_offset 4
65
66/* Register rw_dmc_in0_owner, scope iop_sw_cfg, type rw */
67#define reg_iop_sw_cfg_rw_dmc_in0_owner___cfg___lsb 0
68#define reg_iop_sw_cfg_rw_dmc_in0_owner___cfg___width 2
69#define reg_iop_sw_cfg_rw_dmc_in0_owner_offset 8
70
71/* Register rw_dmc_in1_owner, scope iop_sw_cfg, type rw */
72#define reg_iop_sw_cfg_rw_dmc_in1_owner___cfg___lsb 0
73#define reg_iop_sw_cfg_rw_dmc_in1_owner___cfg___width 2
74#define reg_iop_sw_cfg_rw_dmc_in1_owner_offset 12
75
76/* Register rw_dmc_out0_owner, scope iop_sw_cfg, type rw */
77#define reg_iop_sw_cfg_rw_dmc_out0_owner___cfg___lsb 0
78#define reg_iop_sw_cfg_rw_dmc_out0_owner___cfg___width 2
79#define reg_iop_sw_cfg_rw_dmc_out0_owner_offset 16
80
81/* Register rw_dmc_out1_owner, scope iop_sw_cfg, type rw */
82#define reg_iop_sw_cfg_rw_dmc_out1_owner___cfg___lsb 0
83#define reg_iop_sw_cfg_rw_dmc_out1_owner___cfg___width 2
84#define reg_iop_sw_cfg_rw_dmc_out1_owner_offset 20
85
86/* Register rw_fifo_in0_owner, scope iop_sw_cfg, type rw */
87#define reg_iop_sw_cfg_rw_fifo_in0_owner___cfg___lsb 0
88#define reg_iop_sw_cfg_rw_fifo_in0_owner___cfg___width 2
89#define reg_iop_sw_cfg_rw_fifo_in0_owner_offset 24
90
91/* Register rw_fifo_in0_extra_owner, scope iop_sw_cfg, type rw */
92#define reg_iop_sw_cfg_rw_fifo_in0_extra_owner___cfg___lsb 0
93#define reg_iop_sw_cfg_rw_fifo_in0_extra_owner___cfg___width 2
94#define reg_iop_sw_cfg_rw_fifo_in0_extra_owner_offset 28
95
96/* Register rw_fifo_in1_owner, scope iop_sw_cfg, type rw */
97#define reg_iop_sw_cfg_rw_fifo_in1_owner___cfg___lsb 0
98#define reg_iop_sw_cfg_rw_fifo_in1_owner___cfg___width 2
99#define reg_iop_sw_cfg_rw_fifo_in1_owner_offset 32
100
101/* Register rw_fifo_in1_extra_owner, scope iop_sw_cfg, type rw */
102#define reg_iop_sw_cfg_rw_fifo_in1_extra_owner___cfg___lsb 0
103#define reg_iop_sw_cfg_rw_fifo_in1_extra_owner___cfg___width 2
104#define reg_iop_sw_cfg_rw_fifo_in1_extra_owner_offset 36
105
106/* Register rw_fifo_out0_owner, scope iop_sw_cfg, type rw */
107#define reg_iop_sw_cfg_rw_fifo_out0_owner___cfg___lsb 0
108#define reg_iop_sw_cfg_rw_fifo_out0_owner___cfg___width 2
109#define reg_iop_sw_cfg_rw_fifo_out0_owner_offset 40
110
111/* Register rw_fifo_out0_extra_owner, scope iop_sw_cfg, type rw */
112#define reg_iop_sw_cfg_rw_fifo_out0_extra_owner___cfg___lsb 0
113#define reg_iop_sw_cfg_rw_fifo_out0_extra_owner___cfg___width 2
114#define reg_iop_sw_cfg_rw_fifo_out0_extra_owner_offset 44
115
116/* Register rw_fifo_out1_owner, scope iop_sw_cfg, type rw */
117#define reg_iop_sw_cfg_rw_fifo_out1_owner___cfg___lsb 0
118#define reg_iop_sw_cfg_rw_fifo_out1_owner___cfg___width 2
119#define reg_iop_sw_cfg_rw_fifo_out1_owner_offset 48
120
121/* Register rw_fifo_out1_extra_owner, scope iop_sw_cfg, type rw */
122#define reg_iop_sw_cfg_rw_fifo_out1_extra_owner___cfg___lsb 0
123#define reg_iop_sw_cfg_rw_fifo_out1_extra_owner___cfg___width 2
124#define reg_iop_sw_cfg_rw_fifo_out1_extra_owner_offset 52
125
126/* Register rw_sap_in_owner, scope iop_sw_cfg, type rw */
127#define reg_iop_sw_cfg_rw_sap_in_owner___cfg___lsb 0
128#define reg_iop_sw_cfg_rw_sap_in_owner___cfg___width 2
129#define reg_iop_sw_cfg_rw_sap_in_owner_offset 56
130
131/* Register rw_sap_out_owner, scope iop_sw_cfg, type rw */
132#define reg_iop_sw_cfg_rw_sap_out_owner___cfg___lsb 0
133#define reg_iop_sw_cfg_rw_sap_out_owner___cfg___width 2
134#define reg_iop_sw_cfg_rw_sap_out_owner_offset 60
135
136/* Register rw_scrc_in0_owner, scope iop_sw_cfg, type rw */
137#define reg_iop_sw_cfg_rw_scrc_in0_owner___cfg___lsb 0
138#define reg_iop_sw_cfg_rw_scrc_in0_owner___cfg___width 2
139#define reg_iop_sw_cfg_rw_scrc_in0_owner_offset 64
140
141/* Register rw_scrc_in1_owner, scope iop_sw_cfg, type rw */
142#define reg_iop_sw_cfg_rw_scrc_in1_owner___cfg___lsb 0
143#define reg_iop_sw_cfg_rw_scrc_in1_owner___cfg___width 2
144#define reg_iop_sw_cfg_rw_scrc_in1_owner_offset 68
145
146/* Register rw_scrc_out0_owner, scope iop_sw_cfg, type rw */
147#define reg_iop_sw_cfg_rw_scrc_out0_owner___cfg___lsb 0
148#define reg_iop_sw_cfg_rw_scrc_out0_owner___cfg___width 2
149#define reg_iop_sw_cfg_rw_scrc_out0_owner_offset 72
150
151/* Register rw_scrc_out1_owner, scope iop_sw_cfg, type rw */
152#define reg_iop_sw_cfg_rw_scrc_out1_owner___cfg___lsb 0
153#define reg_iop_sw_cfg_rw_scrc_out1_owner___cfg___width 2
154#define reg_iop_sw_cfg_rw_scrc_out1_owner_offset 76
155
156/* Register rw_spu0_owner, scope iop_sw_cfg, type rw */
157#define reg_iop_sw_cfg_rw_spu0_owner___cfg___lsb 0
158#define reg_iop_sw_cfg_rw_spu0_owner___cfg___width 2
159#define reg_iop_sw_cfg_rw_spu0_owner_offset 80
160
161/* Register rw_spu1_owner, scope iop_sw_cfg, type rw */
162#define reg_iop_sw_cfg_rw_spu1_owner___cfg___lsb 0
163#define reg_iop_sw_cfg_rw_spu1_owner___cfg___width 2
164#define reg_iop_sw_cfg_rw_spu1_owner_offset 84
165
166/* Register rw_timer_grp0_owner, scope iop_sw_cfg, type rw */
167#define reg_iop_sw_cfg_rw_timer_grp0_owner___cfg___lsb 0
168#define reg_iop_sw_cfg_rw_timer_grp0_owner___cfg___width 2
169#define reg_iop_sw_cfg_rw_timer_grp0_owner_offset 88
170
171/* Register rw_timer_grp1_owner, scope iop_sw_cfg, type rw */
172#define reg_iop_sw_cfg_rw_timer_grp1_owner___cfg___lsb 0
173#define reg_iop_sw_cfg_rw_timer_grp1_owner___cfg___width 2
174#define reg_iop_sw_cfg_rw_timer_grp1_owner_offset 92
175
176/* Register rw_timer_grp2_owner, scope iop_sw_cfg, type rw */
177#define reg_iop_sw_cfg_rw_timer_grp2_owner___cfg___lsb 0
178#define reg_iop_sw_cfg_rw_timer_grp2_owner___cfg___width 2
179#define reg_iop_sw_cfg_rw_timer_grp2_owner_offset 96
180
181/* Register rw_timer_grp3_owner, scope iop_sw_cfg, type rw */
182#define reg_iop_sw_cfg_rw_timer_grp3_owner___cfg___lsb 0
183#define reg_iop_sw_cfg_rw_timer_grp3_owner___cfg___width 2
184#define reg_iop_sw_cfg_rw_timer_grp3_owner_offset 100
185
186/* Register rw_trigger_grp0_owner, scope iop_sw_cfg, type rw */
187#define reg_iop_sw_cfg_rw_trigger_grp0_owner___cfg___lsb 0
188#define reg_iop_sw_cfg_rw_trigger_grp0_owner___cfg___width 2
189#define reg_iop_sw_cfg_rw_trigger_grp0_owner_offset 104
190
191/* Register rw_trigger_grp1_owner, scope iop_sw_cfg, type rw */
192#define reg_iop_sw_cfg_rw_trigger_grp1_owner___cfg___lsb 0
193#define reg_iop_sw_cfg_rw_trigger_grp1_owner___cfg___width 2
194#define reg_iop_sw_cfg_rw_trigger_grp1_owner_offset 108
195
196/* Register rw_trigger_grp2_owner, scope iop_sw_cfg, type rw */
197#define reg_iop_sw_cfg_rw_trigger_grp2_owner___cfg___lsb 0
198#define reg_iop_sw_cfg_rw_trigger_grp2_owner___cfg___width 2
199#define reg_iop_sw_cfg_rw_trigger_grp2_owner_offset 112
200
201/* Register rw_trigger_grp3_owner, scope iop_sw_cfg, type rw */
202#define reg_iop_sw_cfg_rw_trigger_grp3_owner___cfg___lsb 0
203#define reg_iop_sw_cfg_rw_trigger_grp3_owner___cfg___width 2
204#define reg_iop_sw_cfg_rw_trigger_grp3_owner_offset 116
205
206/* Register rw_trigger_grp4_owner, scope iop_sw_cfg, type rw */
207#define reg_iop_sw_cfg_rw_trigger_grp4_owner___cfg___lsb 0
208#define reg_iop_sw_cfg_rw_trigger_grp4_owner___cfg___width 2
209#define reg_iop_sw_cfg_rw_trigger_grp4_owner_offset 120
210
211/* Register rw_trigger_grp5_owner, scope iop_sw_cfg, type rw */
212#define reg_iop_sw_cfg_rw_trigger_grp5_owner___cfg___lsb 0
213#define reg_iop_sw_cfg_rw_trigger_grp5_owner___cfg___width 2
214#define reg_iop_sw_cfg_rw_trigger_grp5_owner_offset 124
215
216/* Register rw_trigger_grp6_owner, scope iop_sw_cfg, type rw */
217#define reg_iop_sw_cfg_rw_trigger_grp6_owner___cfg___lsb 0
218#define reg_iop_sw_cfg_rw_trigger_grp6_owner___cfg___width 2
219#define reg_iop_sw_cfg_rw_trigger_grp6_owner_offset 128
220
221/* Register rw_trigger_grp7_owner, scope iop_sw_cfg, type rw */
222#define reg_iop_sw_cfg_rw_trigger_grp7_owner___cfg___lsb 0
223#define reg_iop_sw_cfg_rw_trigger_grp7_owner___cfg___width 2
224#define reg_iop_sw_cfg_rw_trigger_grp7_owner_offset 132
225
226/* Register rw_bus0_mask, scope iop_sw_cfg, type rw */
227#define reg_iop_sw_cfg_rw_bus0_mask___byte0___lsb 0
228#define reg_iop_sw_cfg_rw_bus0_mask___byte0___width 8
229#define reg_iop_sw_cfg_rw_bus0_mask___byte1___lsb 8
230#define reg_iop_sw_cfg_rw_bus0_mask___byte1___width 8
231#define reg_iop_sw_cfg_rw_bus0_mask___byte2___lsb 16
232#define reg_iop_sw_cfg_rw_bus0_mask___byte2___width 8
233#define reg_iop_sw_cfg_rw_bus0_mask___byte3___lsb 24
234#define reg_iop_sw_cfg_rw_bus0_mask___byte3___width 8
235#define reg_iop_sw_cfg_rw_bus0_mask_offset 136
236
237/* Register rw_bus0_oe_mask, scope iop_sw_cfg, type rw */
238#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte0___lsb 0
239#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte0___width 1
240#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte0___bit 0
241#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte1___lsb 1
242#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte1___width 1
243#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte1___bit 1
244#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte2___lsb 2
245#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte2___width 1
246#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte2___bit 2
247#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte3___lsb 3
248#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte3___width 1
249#define reg_iop_sw_cfg_rw_bus0_oe_mask___byte3___bit 3
250#define reg_iop_sw_cfg_rw_bus0_oe_mask_offset 140
251
252/* Register rw_bus1_mask, scope iop_sw_cfg, type rw */
253#define reg_iop_sw_cfg_rw_bus1_mask___byte0___lsb 0
254#define reg_iop_sw_cfg_rw_bus1_mask___byte0___width 8
255#define reg_iop_sw_cfg_rw_bus1_mask___byte1___lsb 8
256#define reg_iop_sw_cfg_rw_bus1_mask___byte1___width 8
257#define reg_iop_sw_cfg_rw_bus1_mask___byte2___lsb 16
258#define reg_iop_sw_cfg_rw_bus1_mask___byte2___width 8
259#define reg_iop_sw_cfg_rw_bus1_mask___byte3___lsb 24
260#define reg_iop_sw_cfg_rw_bus1_mask___byte3___width 8
261#define reg_iop_sw_cfg_rw_bus1_mask_offset 144
262
263/* Register rw_bus1_oe_mask, scope iop_sw_cfg, type rw */
264#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte0___lsb 0
265#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte0___width 1
266#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte0___bit 0
267#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte1___lsb 1
268#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte1___width 1
269#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte1___bit 1
270#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte2___lsb 2
271#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte2___width 1
272#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte2___bit 2
273#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte3___lsb 3
274#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte3___width 1
275#define reg_iop_sw_cfg_rw_bus1_oe_mask___byte3___bit 3
276#define reg_iop_sw_cfg_rw_bus1_oe_mask_offset 148
277
278/* Register rw_gio_mask, scope iop_sw_cfg, type rw */
279#define reg_iop_sw_cfg_rw_gio_mask___val___lsb 0
280#define reg_iop_sw_cfg_rw_gio_mask___val___width 32
281#define reg_iop_sw_cfg_rw_gio_mask_offset 152
282
283/* Register rw_gio_oe_mask, scope iop_sw_cfg, type rw */
284#define reg_iop_sw_cfg_rw_gio_oe_mask___val___lsb 0
285#define reg_iop_sw_cfg_rw_gio_oe_mask___val___width 32
286#define reg_iop_sw_cfg_rw_gio_oe_mask_offset 156
287
288/* Register rw_pinmapping, scope iop_sw_cfg, type rw */
289#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte0___lsb 0
290#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte0___width 2
291#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte1___lsb 2
292#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte1___width 2
293#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte2___lsb 4
294#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte2___width 2
295#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte3___lsb 6
296#define reg_iop_sw_cfg_rw_pinmapping___bus0_byte3___width 2
297#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte0___lsb 8
298#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte0___width 2
299#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte1___lsb 10
300#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte1___width 2
301#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte2___lsb 12
302#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte2___width 2
303#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte3___lsb 14
304#define reg_iop_sw_cfg_rw_pinmapping___bus1_byte3___width 2
305#define reg_iop_sw_cfg_rw_pinmapping___gio3_0___lsb 16
306#define reg_iop_sw_cfg_rw_pinmapping___gio3_0___width 2
307#define reg_iop_sw_cfg_rw_pinmapping___gio7_4___lsb 18
308#define reg_iop_sw_cfg_rw_pinmapping___gio7_4___width 2
309#define reg_iop_sw_cfg_rw_pinmapping___gio11_8___lsb 20
310#define reg_iop_sw_cfg_rw_pinmapping___gio11_8___width 2
311#define reg_iop_sw_cfg_rw_pinmapping___gio15_12___lsb 22
312#define reg_iop_sw_cfg_rw_pinmapping___gio15_12___width 2
313#define reg_iop_sw_cfg_rw_pinmapping___gio19_16___lsb 24
314#define reg_iop_sw_cfg_rw_pinmapping___gio19_16___width 2
315#define reg_iop_sw_cfg_rw_pinmapping___gio23_20___lsb 26
316#define reg_iop_sw_cfg_rw_pinmapping___gio23_20___width 2
317#define reg_iop_sw_cfg_rw_pinmapping___gio27_24___lsb 28
318#define reg_iop_sw_cfg_rw_pinmapping___gio27_24___width 2
319#define reg_iop_sw_cfg_rw_pinmapping___gio31_28___lsb 30
320#define reg_iop_sw_cfg_rw_pinmapping___gio31_28___width 2
321#define reg_iop_sw_cfg_rw_pinmapping_offset 160
322
323/* Register rw_bus_out_cfg, scope iop_sw_cfg, type rw */
324#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_lo___lsb 0
325#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_lo___width 3
326#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_hi___lsb 3
327#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_hi___width 3
328#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_lo_oe___lsb 6
329#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_lo_oe___width 3
330#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_hi_oe___lsb 9
331#define reg_iop_sw_cfg_rw_bus_out_cfg___bus0_hi_oe___width 3
332#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_lo___lsb 12
333#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_lo___width 3
334#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_hi___lsb 15
335#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_hi___width 3
336#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_lo_oe___lsb 18
337#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_lo_oe___width 3
338#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_hi_oe___lsb 21
339#define reg_iop_sw_cfg_rw_bus_out_cfg___bus1_hi_oe___width 3
340#define reg_iop_sw_cfg_rw_bus_out_cfg_offset 164
341
342/* Register rw_gio_out_grp0_cfg, scope iop_sw_cfg, type rw */
343#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0___lsb 0
344#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0___width 4
345#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0_oe___lsb 4
346#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0_oe___width 2
347#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1___lsb 6
348#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1___width 4
349#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1_oe___lsb 10
350#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1_oe___width 2
351#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2___lsb 12
352#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2___width 4
353#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2_oe___lsb 16
354#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2_oe___width 2
355#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3___lsb 18
356#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3___width 4
357#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3_oe___lsb 22
358#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3_oe___width 2
359#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg_offset 168
360
361/* Register rw_gio_out_grp1_cfg, scope iop_sw_cfg, type rw */
362#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4___lsb 0
363#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4___width 4
364#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4_oe___lsb 4
365#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4_oe___width 2
366#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5___lsb 6
367#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5___width 4
368#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5_oe___lsb 10
369#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5_oe___width 2
370#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6___lsb 12
371#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6___width 4
372#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6_oe___lsb 16
373#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6_oe___width 2
374#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7___lsb 18
375#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7___width 4
376#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7_oe___lsb 22
377#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7_oe___width 2
378#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg_offset 172
379
380/* Register rw_gio_out_grp2_cfg, scope iop_sw_cfg, type rw */
381#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8___lsb 0
382#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8___width 4
383#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8_oe___lsb 4
384#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8_oe___width 2
385#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9___lsb 6
386#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9___width 4
387#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9_oe___lsb 10
388#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9_oe___width 2
389#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10___lsb 12
390#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10___width 4
391#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10_oe___lsb 16
392#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10_oe___width 2
393#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11___lsb 18
394#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11___width 4
395#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11_oe___lsb 22
396#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11_oe___width 2
397#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg_offset 176
398
399/* Register rw_gio_out_grp3_cfg, scope iop_sw_cfg, type rw */
400#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12___lsb 0
401#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12___width 4
402#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12_oe___lsb 4
403#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12_oe___width 2
404#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13___lsb 6
405#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13___width 4
406#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13_oe___lsb 10
407#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13_oe___width 2
408#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14___lsb 12
409#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14___width 4
410#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14_oe___lsb 16
411#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14_oe___width 2
412#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15___lsb 18
413#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15___width 4
414#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15_oe___lsb 22
415#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15_oe___width 2
416#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg_offset 180
417
418/* Register rw_gio_out_grp4_cfg, scope iop_sw_cfg, type rw */
419#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16___lsb 0
420#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16___width 4
421#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16_oe___lsb 4
422#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16_oe___width 2
423#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17___lsb 6
424#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17___width 4
425#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17_oe___lsb 10
426#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17_oe___width 2
427#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18___lsb 12
428#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18___width 4
429#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18_oe___lsb 16
430#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18_oe___width 2
431#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19___lsb 18
432#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19___width 4
433#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19_oe___lsb 22
434#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19_oe___width 2
435#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg_offset 184
436
437/* Register rw_gio_out_grp5_cfg, scope iop_sw_cfg, type rw */
438#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20___lsb 0
439#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20___width 4
440#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20_oe___lsb 4
441#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20_oe___width 2
442#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21___lsb 6
443#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21___width 4
444#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21_oe___lsb 10
445#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21_oe___width 2
446#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22___lsb 12
447#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22___width 4
448#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22_oe___lsb 16
449#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22_oe___width 2
450#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23___lsb 18
451#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23___width 4
452#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23_oe___lsb 22
453#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23_oe___width 2
454#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg_offset 188
455
456/* Register rw_gio_out_grp6_cfg, scope iop_sw_cfg, type rw */
457#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24___lsb 0
458#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24___width 4
459#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24_oe___lsb 4
460#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24_oe___width 2
461#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25___lsb 6
462#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25___width 4
463#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25_oe___lsb 10
464#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25_oe___width 2
465#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26___lsb 12
466#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26___width 4
467#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26_oe___lsb 16
468#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26_oe___width 2
469#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27___lsb 18
470#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27___width 4
471#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27_oe___lsb 22
472#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27_oe___width 2
473#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg_offset 192
474
475/* Register rw_gio_out_grp7_cfg, scope iop_sw_cfg, type rw */
476#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28___lsb 0
477#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28___width 4
478#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28_oe___lsb 4
479#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28_oe___width 2
480#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29___lsb 6
481#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29___width 4
482#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29_oe___lsb 10
483#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29_oe___width 2
484#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30___lsb 12
485#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30___width 4
486#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30_oe___lsb 16
487#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30_oe___width 2
488#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31___lsb 18
489#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31___width 4
490#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31_oe___lsb 22
491#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31_oe___width 2
492#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg_offset 196
493
494/* Register rw_spu0_cfg, scope iop_sw_cfg, type rw */
495#define reg_iop_sw_cfg_rw_spu0_cfg___bus0_in___lsb 0
496#define reg_iop_sw_cfg_rw_spu0_cfg___bus0_in___width 2
497#define reg_iop_sw_cfg_rw_spu0_cfg___bus1_in___lsb 2
498#define reg_iop_sw_cfg_rw_spu0_cfg___bus1_in___width 2
499#define reg_iop_sw_cfg_rw_spu0_cfg_offset 200
500
501/* Register rw_spu1_cfg, scope iop_sw_cfg, type rw */
502#define reg_iop_sw_cfg_rw_spu1_cfg___bus0_in___lsb 0
503#define reg_iop_sw_cfg_rw_spu1_cfg___bus0_in___width 2
504#define reg_iop_sw_cfg_rw_spu1_cfg___bus1_in___lsb 2
505#define reg_iop_sw_cfg_rw_spu1_cfg___bus1_in___width 2
506#define reg_iop_sw_cfg_rw_spu1_cfg_offset 204
507
508/* Register rw_timer_grp0_cfg, scope iop_sw_cfg, type rw */
509#define reg_iop_sw_cfg_rw_timer_grp0_cfg___ext_clk___lsb 0
510#define reg_iop_sw_cfg_rw_timer_grp0_cfg___ext_clk___width 3
511#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_en___lsb 3
512#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_en___width 1
513#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_en___bit 3
514#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_en___lsb 4
515#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_en___width 1
516#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_en___bit 4
517#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_en___lsb 5
518#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_en___width 1
519#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_en___bit 5
520#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_en___lsb 6
521#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_en___width 1
522#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_en___bit 6
523#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_dis___lsb 7
524#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_dis___width 1
525#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_dis___bit 7
526#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_dis___lsb 8
527#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_dis___width 1
528#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_dis___bit 8
529#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_dis___lsb 9
530#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_dis___width 1
531#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_dis___bit 9
532#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_dis___lsb 10
533#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_dis___width 1
534#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_dis___bit 10
535#define reg_iop_sw_cfg_rw_timer_grp0_cfg_offset 208
536
537/* Register rw_timer_grp1_cfg, scope iop_sw_cfg, type rw */
538#define reg_iop_sw_cfg_rw_timer_grp1_cfg___ext_clk___lsb 0
539#define reg_iop_sw_cfg_rw_timer_grp1_cfg___ext_clk___width 3
540#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_en___lsb 3
541#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_en___width 1
542#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_en___bit 3
543#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_en___lsb 4
544#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_en___width 1
545#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_en___bit 4
546#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_en___lsb 5
547#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_en___width 1
548#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_en___bit 5
549#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_en___lsb 6
550#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_en___width 1
551#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_en___bit 6
552#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_dis___lsb 7
553#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_dis___width 1
554#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_dis___bit 7
555#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_dis___lsb 8
556#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_dis___width 1
557#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_dis___bit 8
558#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_dis___lsb 9
559#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_dis___width 1
560#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_dis___bit 9
561#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_dis___lsb 10
562#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_dis___width 1
563#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_dis___bit 10
564#define reg_iop_sw_cfg_rw_timer_grp1_cfg_offset 212
565
566/* Register rw_timer_grp2_cfg, scope iop_sw_cfg, type rw */
567#define reg_iop_sw_cfg_rw_timer_grp2_cfg___ext_clk___lsb 0
568#define reg_iop_sw_cfg_rw_timer_grp2_cfg___ext_clk___width 3
569#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr0_en___lsb 3
570#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr0_en___width 1
571#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr0_en___bit 3
572#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr1_en___lsb 4
573#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr1_en___width 1
574#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr1_en___bit 4
575#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr2_en___lsb 5
576#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr2_en___width 1
577#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr2_en___bit 5
578#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr3_en___lsb 6
579#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr3_en___width 1
580#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr3_en___bit 6
581#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr0_dis___lsb 7
582#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr0_dis___width 1
583#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr0_dis___bit 7
584#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr1_dis___lsb 8
585#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr1_dis___width 1
586#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr1_dis___bit 8
587#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr2_dis___lsb 9
588#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr2_dis___width 1
589#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr2_dis___bit 9
590#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr3_dis___lsb 10
591#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr3_dis___width 1
592#define reg_iop_sw_cfg_rw_timer_grp2_cfg___tmr3_dis___bit 10
593#define reg_iop_sw_cfg_rw_timer_grp2_cfg_offset 216
594
595/* Register rw_timer_grp3_cfg, scope iop_sw_cfg, type rw */
596#define reg_iop_sw_cfg_rw_timer_grp3_cfg___ext_clk___lsb 0
597#define reg_iop_sw_cfg_rw_timer_grp3_cfg___ext_clk___width 3
598#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr0_en___lsb 3
599#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr0_en___width 1
600#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr0_en___bit 3
601#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr1_en___lsb 4
602#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr1_en___width 1
603#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr1_en___bit 4
604#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr2_en___lsb 5
605#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr2_en___width 1
606#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr2_en___bit 5
607#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr3_en___lsb 6
608#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr3_en___width 1
609#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr3_en___bit 6
610#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr0_dis___lsb 7
611#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr0_dis___width 1
612#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr0_dis___bit 7
613#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr1_dis___lsb 8
614#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr1_dis___width 1
615#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr1_dis___bit 8
616#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr2_dis___lsb 9
617#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr2_dis___width 1
618#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr2_dis___bit 9
619#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr3_dis___lsb 10
620#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr3_dis___width 1
621#define reg_iop_sw_cfg_rw_timer_grp3_cfg___tmr3_dis___bit 10
622#define reg_iop_sw_cfg_rw_timer_grp3_cfg_offset 220
623
624/* Register rw_trigger_grps_cfg, scope iop_sw_cfg, type rw */
625#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_dis___lsb 0
626#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_dis___width 1
627#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_dis___bit 0
628#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_en___lsb 1
629#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_en___width 1
630#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_en___bit 1
631#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_dis___lsb 2
632#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_dis___width 1
633#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_dis___bit 2
634#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_en___lsb 3
635#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_en___width 1
636#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_en___bit 3
637#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_dis___lsb 4
638#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_dis___width 1
639#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_dis___bit 4
640#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_en___lsb 5
641#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_en___width 1
642#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_en___bit 5
643#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_dis___lsb 6
644#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_dis___width 1
645#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_dis___bit 6
646#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_en___lsb 7
647#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_en___width 1
648#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_en___bit 7
649#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_dis___lsb 8
650#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_dis___width 1
651#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_dis___bit 8
652#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_en___lsb 9
653#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_en___width 1
654#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_en___bit 9
655#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_dis___lsb 10
656#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_dis___width 1
657#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_dis___bit 10
658#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_en___lsb 11
659#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_en___width 1
660#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_en___bit 11
661#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_dis___lsb 12
662#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_dis___width 1
663#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_dis___bit 12
664#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_en___lsb 13
665#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_en___width 1
666#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_en___bit 13
667#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_dis___lsb 14
668#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_dis___width 1
669#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_dis___bit 14
670#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_en___lsb 15
671#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_en___width 1
672#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_en___bit 15
673#define reg_iop_sw_cfg_rw_trigger_grps_cfg_offset 224
674
675/* Register rw_pdp0_cfg, scope iop_sw_cfg, type rw */
676#define reg_iop_sw_cfg_rw_pdp0_cfg___dmc0_usr___lsb 0
677#define reg_iop_sw_cfg_rw_pdp0_cfg___dmc0_usr___width 1
678#define reg_iop_sw_cfg_rw_pdp0_cfg___dmc0_usr___bit 0
679#define reg_iop_sw_cfg_rw_pdp0_cfg___out_strb___lsb 1
680#define reg_iop_sw_cfg_rw_pdp0_cfg___out_strb___width 5
681#define reg_iop_sw_cfg_rw_pdp0_cfg___in_src___lsb 6
682#define reg_iop_sw_cfg_rw_pdp0_cfg___in_src___width 3
683#define reg_iop_sw_cfg_rw_pdp0_cfg___in_size___lsb 9
684#define reg_iop_sw_cfg_rw_pdp0_cfg___in_size___width 3
685#define reg_iop_sw_cfg_rw_pdp0_cfg___in_last___lsb 12
686#define reg_iop_sw_cfg_rw_pdp0_cfg___in_last___width 2
687#define reg_iop_sw_cfg_rw_pdp0_cfg___in_strb___lsb 14
688#define reg_iop_sw_cfg_rw_pdp0_cfg___in_strb___width 4
689#define reg_iop_sw_cfg_rw_pdp0_cfg___out_src___lsb 18
690#define reg_iop_sw_cfg_rw_pdp0_cfg___out_src___width 1
691#define reg_iop_sw_cfg_rw_pdp0_cfg___out_src___bit 18
692#define reg_iop_sw_cfg_rw_pdp0_cfg_offset 228
693
694/* Register rw_pdp1_cfg, scope iop_sw_cfg, type rw */
695#define reg_iop_sw_cfg_rw_pdp1_cfg___dmc1_usr___lsb 0
696#define reg_iop_sw_cfg_rw_pdp1_cfg___dmc1_usr___width 1
697#define reg_iop_sw_cfg_rw_pdp1_cfg___dmc1_usr___bit 0
698#define reg_iop_sw_cfg_rw_pdp1_cfg___out_strb___lsb 1
699#define reg_iop_sw_cfg_rw_pdp1_cfg___out_strb___width 5
700#define reg_iop_sw_cfg_rw_pdp1_cfg___in_src___lsb 6
701#define reg_iop_sw_cfg_rw_pdp1_cfg___in_src___width 3
702#define reg_iop_sw_cfg_rw_pdp1_cfg___in_size___lsb 9
703#define reg_iop_sw_cfg_rw_pdp1_cfg___in_size___width 3
704#define reg_iop_sw_cfg_rw_pdp1_cfg___in_last___lsb 12
705#define reg_iop_sw_cfg_rw_pdp1_cfg___in_last___width 2
706#define reg_iop_sw_cfg_rw_pdp1_cfg___in_strb___lsb 14
707#define reg_iop_sw_cfg_rw_pdp1_cfg___in_strb___width 4
708#define reg_iop_sw_cfg_rw_pdp1_cfg___out_src___lsb 18
709#define reg_iop_sw_cfg_rw_pdp1_cfg___out_src___width 1
710#define reg_iop_sw_cfg_rw_pdp1_cfg___out_src___bit 18
711#define reg_iop_sw_cfg_rw_pdp1_cfg_offset 232
712
713/* Register rw_sdp_cfg, scope iop_sw_cfg, type rw */
714#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_out0_strb___lsb 0
715#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_out0_strb___width 3
716#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_out1_strb___lsb 3
717#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_out1_strb___width 3
718#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in0_data___lsb 6
719#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in0_data___width 3
720#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in0_last___lsb 9
721#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in0_last___width 2
722#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in0_strb___lsb 11
723#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in0_strb___width 3
724#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in1_data___lsb 14
725#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in1_data___width 3
726#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in1_last___lsb 17
727#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in1_last___width 2
728#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in1_strb___lsb 19
729#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in1_strb___width 3
730#define reg_iop_sw_cfg_rw_sdp_cfg_offset 236
731
732
733/* Constants */
734#define regk_iop_sw_cfg_a 0x00000001
735#define regk_iop_sw_cfg_b 0x00000002
736#define regk_iop_sw_cfg_bus0 0x00000000
737#define regk_iop_sw_cfg_bus0_rot16 0x00000004
738#define regk_iop_sw_cfg_bus0_rot24 0x00000006
739#define regk_iop_sw_cfg_bus0_rot8 0x00000002
740#define regk_iop_sw_cfg_bus1 0x00000001
741#define regk_iop_sw_cfg_bus1_rot16 0x00000005
742#define regk_iop_sw_cfg_bus1_rot24 0x00000007
743#define regk_iop_sw_cfg_bus1_rot8 0x00000003
744#define regk_iop_sw_cfg_clk12 0x00000000
745#define regk_iop_sw_cfg_cpu 0x00000000
746#define regk_iop_sw_cfg_dmc0 0x00000000
747#define regk_iop_sw_cfg_dmc1 0x00000001
748#define regk_iop_sw_cfg_gated_clk0 0x00000010
749#define regk_iop_sw_cfg_gated_clk1 0x00000011
750#define regk_iop_sw_cfg_gated_clk2 0x00000012
751#define regk_iop_sw_cfg_gated_clk3 0x00000013
752#define regk_iop_sw_cfg_gio0 0x00000004
753#define regk_iop_sw_cfg_gio1 0x00000001
754#define regk_iop_sw_cfg_gio2 0x00000005
755#define regk_iop_sw_cfg_gio3 0x00000002
756#define regk_iop_sw_cfg_gio4 0x00000006
757#define regk_iop_sw_cfg_gio5 0x00000003
758#define regk_iop_sw_cfg_gio6 0x00000007
759#define regk_iop_sw_cfg_gio7 0x00000004
760#define regk_iop_sw_cfg_gio_in0 0x00000000
761#define regk_iop_sw_cfg_gio_in1 0x00000001
762#define regk_iop_sw_cfg_gio_in10 0x00000002
763#define regk_iop_sw_cfg_gio_in11 0x00000003
764#define regk_iop_sw_cfg_gio_in14 0x00000004
765#define regk_iop_sw_cfg_gio_in15 0x00000005
766#define regk_iop_sw_cfg_gio_in18 0x00000002
767#define regk_iop_sw_cfg_gio_in19 0x00000003
768#define regk_iop_sw_cfg_gio_in20 0x00000004
769#define regk_iop_sw_cfg_gio_in21 0x00000005
770#define regk_iop_sw_cfg_gio_in26 0x00000006
771#define regk_iop_sw_cfg_gio_in27 0x00000007
772#define regk_iop_sw_cfg_gio_in28 0x00000006
773#define regk_iop_sw_cfg_gio_in29 0x00000007
774#define regk_iop_sw_cfg_gio_in4 0x00000000
775#define regk_iop_sw_cfg_gio_in5 0x00000001
776#define regk_iop_sw_cfg_last_timer_grp0_tmr2 0x00000001
777#define regk_iop_sw_cfg_last_timer_grp1_tmr2 0x00000001
778#define regk_iop_sw_cfg_last_timer_grp2_tmr2 0x00000002
779#define regk_iop_sw_cfg_last_timer_grp2_tmr3 0x00000003
780#define regk_iop_sw_cfg_last_timer_grp3_tmr2 0x00000002
781#define regk_iop_sw_cfg_last_timer_grp3_tmr3 0x00000003
782#define regk_iop_sw_cfg_mpu 0x00000001
783#define regk_iop_sw_cfg_none 0x00000000
784#define regk_iop_sw_cfg_par0 0x00000000
785#define regk_iop_sw_cfg_par1 0x00000001
786#define regk_iop_sw_cfg_pdp_out0 0x00000002
787#define regk_iop_sw_cfg_pdp_out0_hi 0x00000001
788#define regk_iop_sw_cfg_pdp_out0_hi_rot8 0x00000005
789#define regk_iop_sw_cfg_pdp_out0_lo 0x00000000
790#define regk_iop_sw_cfg_pdp_out0_lo_rot8 0x00000004
791#define regk_iop_sw_cfg_pdp_out1 0x00000003
792#define regk_iop_sw_cfg_pdp_out1_hi 0x00000003
793#define regk_iop_sw_cfg_pdp_out1_hi_rot8 0x00000005
794#define regk_iop_sw_cfg_pdp_out1_lo 0x00000002
795#define regk_iop_sw_cfg_pdp_out1_lo_rot8 0x00000004
796#define regk_iop_sw_cfg_rw_bus0_mask_default 0x00000000
797#define regk_iop_sw_cfg_rw_bus0_oe_mask_default 0x00000000
798#define regk_iop_sw_cfg_rw_bus1_mask_default 0x00000000
799#define regk_iop_sw_cfg_rw_bus1_oe_mask_default 0x00000000
800#define regk_iop_sw_cfg_rw_bus_out_cfg_default 0x00000000
801#define regk_iop_sw_cfg_rw_crc_par0_owner_default 0x00000000
802#define regk_iop_sw_cfg_rw_crc_par1_owner_default 0x00000000
803#define regk_iop_sw_cfg_rw_dmc_in0_owner_default 0x00000000
804#define regk_iop_sw_cfg_rw_dmc_in1_owner_default 0x00000000
805#define regk_iop_sw_cfg_rw_dmc_out0_owner_default 0x00000000
806#define regk_iop_sw_cfg_rw_dmc_out1_owner_default 0x00000000
807#define regk_iop_sw_cfg_rw_fifo_in0_extra_owner_default 0x00000000
808#define regk_iop_sw_cfg_rw_fifo_in0_owner_default 0x00000000
809#define regk_iop_sw_cfg_rw_fifo_in1_extra_owner_default 0x00000000
810#define regk_iop_sw_cfg_rw_fifo_in1_owner_default 0x00000000
811#define regk_iop_sw_cfg_rw_fifo_out0_extra_owner_default 0x00000000
812#define regk_iop_sw_cfg_rw_fifo_out0_owner_default 0x00000000
813#define regk_iop_sw_cfg_rw_fifo_out1_extra_owner_default 0x00000000
814#define regk_iop_sw_cfg_rw_fifo_out1_owner_default 0x00000000
815#define regk_iop_sw_cfg_rw_gio_mask_default 0x00000000
816#define regk_iop_sw_cfg_rw_gio_oe_mask_default 0x00000000
817#define regk_iop_sw_cfg_rw_gio_out_grp0_cfg_default 0x00000000
818#define regk_iop_sw_cfg_rw_gio_out_grp1_cfg_default 0x00000000
819#define regk_iop_sw_cfg_rw_gio_out_grp2_cfg_default 0x00000000
820#define regk_iop_sw_cfg_rw_gio_out_grp3_cfg_default 0x00000000
821#define regk_iop_sw_cfg_rw_gio_out_grp4_cfg_default 0x00000000
822#define regk_iop_sw_cfg_rw_gio_out_grp5_cfg_default 0x00000000
823#define regk_iop_sw_cfg_rw_gio_out_grp6_cfg_default 0x00000000
824#define regk_iop_sw_cfg_rw_gio_out_grp7_cfg_default 0x00000000
825#define regk_iop_sw_cfg_rw_pdp0_cfg_default 0x00000000
826#define regk_iop_sw_cfg_rw_pdp1_cfg_default 0x00000000
827#define regk_iop_sw_cfg_rw_pinmapping_default 0x55555555
828#define regk_iop_sw_cfg_rw_sap_in_owner_default 0x00000000
829#define regk_iop_sw_cfg_rw_sap_out_owner_default 0x00000000
830#define regk_iop_sw_cfg_rw_scrc_in0_owner_default 0x00000000
831#define regk_iop_sw_cfg_rw_scrc_in1_owner_default 0x00000000
832#define regk_iop_sw_cfg_rw_scrc_out0_owner_default 0x00000000
833#define regk_iop_sw_cfg_rw_scrc_out1_owner_default 0x00000000
834#define regk_iop_sw_cfg_rw_sdp_cfg_default 0x00000000
835#define regk_iop_sw_cfg_rw_spu0_cfg_default 0x00000000
836#define regk_iop_sw_cfg_rw_spu0_owner_default 0x00000000
837#define regk_iop_sw_cfg_rw_spu1_cfg_default 0x00000000
838#define regk_iop_sw_cfg_rw_spu1_owner_default 0x00000000
839#define regk_iop_sw_cfg_rw_timer_grp0_cfg_default 0x00000000
840#define regk_iop_sw_cfg_rw_timer_grp0_owner_default 0x00000000
841#define regk_iop_sw_cfg_rw_timer_grp1_cfg_default 0x00000000
842#define regk_iop_sw_cfg_rw_timer_grp1_owner_default 0x00000000
843#define regk_iop_sw_cfg_rw_timer_grp2_cfg_default 0x00000000
844#define regk_iop_sw_cfg_rw_timer_grp2_owner_default 0x00000000
845#define regk_iop_sw_cfg_rw_timer_grp3_cfg_default 0x00000000
846#define regk_iop_sw_cfg_rw_timer_grp3_owner_default 0x00000000
847#define regk_iop_sw_cfg_rw_trigger_grp0_owner_default 0x00000000
848#define regk_iop_sw_cfg_rw_trigger_grp1_owner_default 0x00000000
849#define regk_iop_sw_cfg_rw_trigger_grp2_owner_default 0x00000000
850#define regk_iop_sw_cfg_rw_trigger_grp3_owner_default 0x00000000
851#define regk_iop_sw_cfg_rw_trigger_grp4_owner_default 0x00000000
852#define regk_iop_sw_cfg_rw_trigger_grp5_owner_default 0x00000000
853#define regk_iop_sw_cfg_rw_trigger_grp6_owner_default 0x00000000
854#define regk_iop_sw_cfg_rw_trigger_grp7_owner_default 0x00000000
855#define regk_iop_sw_cfg_rw_trigger_grps_cfg_default 0x00000000
856#define regk_iop_sw_cfg_sdp_out0 0x00000008
857#define regk_iop_sw_cfg_sdp_out1 0x00000009
858#define regk_iop_sw_cfg_size16 0x00000002
859#define regk_iop_sw_cfg_size24 0x00000003
860#define regk_iop_sw_cfg_size32 0x00000004
861#define regk_iop_sw_cfg_size8 0x00000001
862#define regk_iop_sw_cfg_spu0 0x00000002
863#define regk_iop_sw_cfg_spu0_bus_out0_hi 0x00000006
864#define regk_iop_sw_cfg_spu0_bus_out0_lo 0x00000006
865#define regk_iop_sw_cfg_spu0_bus_out1_hi 0x00000007
866#define regk_iop_sw_cfg_spu0_bus_out1_lo 0x00000007
867#define regk_iop_sw_cfg_spu0_g0 0x0000000e
868#define regk_iop_sw_cfg_spu0_g1 0x0000000e
869#define regk_iop_sw_cfg_spu0_g2 0x0000000e
870#define regk_iop_sw_cfg_spu0_g3 0x0000000e
871#define regk_iop_sw_cfg_spu0_g4 0x0000000e
872#define regk_iop_sw_cfg_spu0_g5 0x0000000e
873#define regk_iop_sw_cfg_spu0_g6 0x0000000e
874#define regk_iop_sw_cfg_spu0_g7 0x0000000e
875#define regk_iop_sw_cfg_spu0_gio0 0x00000000
876#define regk_iop_sw_cfg_spu0_gio1 0x00000001
877#define regk_iop_sw_cfg_spu0_gio2 0x00000000
878#define regk_iop_sw_cfg_spu0_gio5 0x00000005
879#define regk_iop_sw_cfg_spu0_gio6 0x00000006
880#define regk_iop_sw_cfg_spu0_gio7 0x00000007
881#define regk_iop_sw_cfg_spu0_gio_out0 0x00000008
882#define regk_iop_sw_cfg_spu0_gio_out1 0x00000009
883#define regk_iop_sw_cfg_spu0_gio_out2 0x0000000a
884#define regk_iop_sw_cfg_spu0_gio_out3 0x0000000b
885#define regk_iop_sw_cfg_spu0_gio_out4 0x0000000c
886#define regk_iop_sw_cfg_spu0_gio_out5 0x0000000d
887#define regk_iop_sw_cfg_spu0_gio_out6 0x0000000e
888#define regk_iop_sw_cfg_spu0_gio_out7 0x0000000f
889#define regk_iop_sw_cfg_spu0_gioout0 0x00000000
890#define regk_iop_sw_cfg_spu0_gioout1 0x00000000
891#define regk_iop_sw_cfg_spu0_gioout10 0x0000000e
892#define regk_iop_sw_cfg_spu0_gioout11 0x0000000e
893#define regk_iop_sw_cfg_spu0_gioout12 0x0000000e
894#define regk_iop_sw_cfg_spu0_gioout13 0x0000000e
895#define regk_iop_sw_cfg_spu0_gioout14 0x0000000e
896#define regk_iop_sw_cfg_spu0_gioout15 0x0000000e
897#define regk_iop_sw_cfg_spu0_gioout16 0x0000000e
898#define regk_iop_sw_cfg_spu0_gioout17 0x0000000e
899#define regk_iop_sw_cfg_spu0_gioout18 0x0000000e
900#define regk_iop_sw_cfg_spu0_gioout19 0x0000000e
901#define regk_iop_sw_cfg_spu0_gioout2 0x00000002
902#define regk_iop_sw_cfg_spu0_gioout20 0x0000000e
903#define regk_iop_sw_cfg_spu0_gioout21 0x0000000e
904#define regk_iop_sw_cfg_spu0_gioout22 0x0000000e
905#define regk_iop_sw_cfg_spu0_gioout23 0x0000000e
906#define regk_iop_sw_cfg_spu0_gioout24 0x0000000e
907#define regk_iop_sw_cfg_spu0_gioout25 0x0000000e
908#define regk_iop_sw_cfg_spu0_gioout26 0x0000000e
909#define regk_iop_sw_cfg_spu0_gioout27 0x0000000e
910#define regk_iop_sw_cfg_spu0_gioout28 0x0000000e
911#define regk_iop_sw_cfg_spu0_gioout29 0x0000000e
912#define regk_iop_sw_cfg_spu0_gioout3 0x00000002
913#define regk_iop_sw_cfg_spu0_gioout30 0x0000000e
914#define regk_iop_sw_cfg_spu0_gioout31 0x0000000e
915#define regk_iop_sw_cfg_spu0_gioout4 0x00000004
916#define regk_iop_sw_cfg_spu0_gioout5 0x00000004
917#define regk_iop_sw_cfg_spu0_gioout6 0x00000006
918#define regk_iop_sw_cfg_spu0_gioout7 0x00000006
919#define regk_iop_sw_cfg_spu0_gioout8 0x0000000e
920#define regk_iop_sw_cfg_spu0_gioout9 0x0000000e
921#define regk_iop_sw_cfg_spu1 0x00000003
922#define regk_iop_sw_cfg_spu1_bus_out0_hi 0x00000006
923#define regk_iop_sw_cfg_spu1_bus_out0_lo 0x00000006
924#define regk_iop_sw_cfg_spu1_bus_out1_hi 0x00000007
925#define regk_iop_sw_cfg_spu1_bus_out1_lo 0x00000007
926#define regk_iop_sw_cfg_spu1_g0 0x0000000f
927#define regk_iop_sw_cfg_spu1_g1 0x0000000f
928#define regk_iop_sw_cfg_spu1_g2 0x0000000f
929#define regk_iop_sw_cfg_spu1_g3 0x0000000f
930#define regk_iop_sw_cfg_spu1_g4 0x0000000f
931#define regk_iop_sw_cfg_spu1_g5 0x0000000f
932#define regk_iop_sw_cfg_spu1_g6 0x0000000f
933#define regk_iop_sw_cfg_spu1_g7 0x0000000f
934#define regk_iop_sw_cfg_spu1_gio0 0x00000002
935#define regk_iop_sw_cfg_spu1_gio1 0x00000003
936#define regk_iop_sw_cfg_spu1_gio2 0x00000002
937#define regk_iop_sw_cfg_spu1_gio5 0x00000005
938#define regk_iop_sw_cfg_spu1_gio6 0x00000006
939#define regk_iop_sw_cfg_spu1_gio7 0x00000007
940#define regk_iop_sw_cfg_spu1_gio_out0 0x00000008
941#define regk_iop_sw_cfg_spu1_gio_out1 0x00000009
942#define regk_iop_sw_cfg_spu1_gio_out2 0x0000000a
943#define regk_iop_sw_cfg_spu1_gio_out3 0x0000000b
944#define regk_iop_sw_cfg_spu1_gio_out4 0x0000000c
945#define regk_iop_sw_cfg_spu1_gio_out5 0x0000000d
946#define regk_iop_sw_cfg_spu1_gio_out6 0x0000000e
947#define regk_iop_sw_cfg_spu1_gio_out7 0x0000000f
948#define regk_iop_sw_cfg_spu1_gioout0 0x00000001
949#define regk_iop_sw_cfg_spu1_gioout1 0x00000001
950#define regk_iop_sw_cfg_spu1_gioout10 0x0000000f
951#define regk_iop_sw_cfg_spu1_gioout11 0x0000000f
952#define regk_iop_sw_cfg_spu1_gioout12 0x0000000f
953#define regk_iop_sw_cfg_spu1_gioout13 0x0000000f
954#define regk_iop_sw_cfg_spu1_gioout14 0x0000000f
955#define regk_iop_sw_cfg_spu1_gioout15 0x0000000f
956#define regk_iop_sw_cfg_spu1_gioout16 0x0000000f
957#define regk_iop_sw_cfg_spu1_gioout17 0x0000000f
958#define regk_iop_sw_cfg_spu1_gioout18 0x0000000f
959#define regk_iop_sw_cfg_spu1_gioout19 0x0000000f
960#define regk_iop_sw_cfg_spu1_gioout2 0x00000003
961#define regk_iop_sw_cfg_spu1_gioout20 0x0000000f
962#define regk_iop_sw_cfg_spu1_gioout21 0x0000000f
963#define regk_iop_sw_cfg_spu1_gioout22 0x0000000f
964#define regk_iop_sw_cfg_spu1_gioout23 0x0000000f
965#define regk_iop_sw_cfg_spu1_gioout24 0x0000000f
966#define regk_iop_sw_cfg_spu1_gioout25 0x0000000f
967#define regk_iop_sw_cfg_spu1_gioout26 0x0000000f
968#define regk_iop_sw_cfg_spu1_gioout27 0x0000000f
969#define regk_iop_sw_cfg_spu1_gioout28 0x0000000f
970#define regk_iop_sw_cfg_spu1_gioout29 0x0000000f
971#define regk_iop_sw_cfg_spu1_gioout3 0x00000003
972#define regk_iop_sw_cfg_spu1_gioout30 0x0000000f
973#define regk_iop_sw_cfg_spu1_gioout31 0x0000000f
974#define regk_iop_sw_cfg_spu1_gioout4 0x00000005
975#define regk_iop_sw_cfg_spu1_gioout5 0x00000005
976#define regk_iop_sw_cfg_spu1_gioout6 0x00000007
977#define regk_iop_sw_cfg_spu1_gioout7 0x00000007
978#define regk_iop_sw_cfg_spu1_gioout8 0x0000000f
979#define regk_iop_sw_cfg_spu1_gioout9 0x0000000f
980#define regk_iop_sw_cfg_strb_timer_grp0_tmr0 0x00000001
981#define regk_iop_sw_cfg_strb_timer_grp0_tmr1 0x00000002
982#define regk_iop_sw_cfg_strb_timer_grp1_tmr0 0x00000001
983#define regk_iop_sw_cfg_strb_timer_grp1_tmr1 0x00000002
984#define regk_iop_sw_cfg_strb_timer_grp2_tmr0 0x00000003
985#define regk_iop_sw_cfg_strb_timer_grp2_tmr1 0x00000002
986#define regk_iop_sw_cfg_strb_timer_grp3_tmr0 0x00000003
987#define regk_iop_sw_cfg_strb_timer_grp3_tmr1 0x00000002
988#define regk_iop_sw_cfg_timer_grp0 0x00000000
989#define regk_iop_sw_cfg_timer_grp0_rot 0x00000001
990#define regk_iop_sw_cfg_timer_grp0_strb0 0x0000000a
991#define regk_iop_sw_cfg_timer_grp0_strb1 0x0000000a
992#define regk_iop_sw_cfg_timer_grp0_strb2 0x0000000a
993#define regk_iop_sw_cfg_timer_grp0_strb3 0x0000000a
994#define regk_iop_sw_cfg_timer_grp0_tmr0 0x00000004
995#define regk_iop_sw_cfg_timer_grp0_tmr1 0x00000004
996#define regk_iop_sw_cfg_timer_grp1 0x00000000
997#define regk_iop_sw_cfg_timer_grp1_rot 0x00000001
998#define regk_iop_sw_cfg_timer_grp1_strb0 0x0000000b
999#define regk_iop_sw_cfg_timer_grp1_strb1 0x0000000b
1000#define regk_iop_sw_cfg_timer_grp1_strb2 0x0000000b
1001#define regk_iop_sw_cfg_timer_grp1_strb3 0x0000000b
1002#define regk_iop_sw_cfg_timer_grp1_tmr0 0x00000005
1003#define regk_iop_sw_cfg_timer_grp1_tmr1 0x00000005
1004#define regk_iop_sw_cfg_timer_grp2 0x00000000
1005#define regk_iop_sw_cfg_timer_grp2_rot 0x00000001
1006#define regk_iop_sw_cfg_timer_grp2_strb0 0x0000000c
1007#define regk_iop_sw_cfg_timer_grp2_strb1 0x0000000c
1008#define regk_iop_sw_cfg_timer_grp2_strb2 0x0000000c
1009#define regk_iop_sw_cfg_timer_grp2_strb3 0x0000000c
1010#define regk_iop_sw_cfg_timer_grp2_tmr0 0x00000006
1011#define regk_iop_sw_cfg_timer_grp2_tmr1 0x00000006
1012#define regk_iop_sw_cfg_timer_grp3 0x00000000
1013#define regk_iop_sw_cfg_timer_grp3_rot 0x00000001
1014#define regk_iop_sw_cfg_timer_grp3_strb0 0x0000000d
1015#define regk_iop_sw_cfg_timer_grp3_strb1 0x0000000d
1016#define regk_iop_sw_cfg_timer_grp3_strb2 0x0000000d
1017#define regk_iop_sw_cfg_timer_grp3_strb3 0x0000000d
1018#define regk_iop_sw_cfg_timer_grp3_tmr0 0x00000007
1019#define regk_iop_sw_cfg_timer_grp3_tmr1 0x00000007
1020#define regk_iop_sw_cfg_trig0_0 0x00000000
1021#define regk_iop_sw_cfg_trig0_1 0x00000000
1022#define regk_iop_sw_cfg_trig0_2 0x00000000
1023#define regk_iop_sw_cfg_trig0_3 0x00000000
1024#define regk_iop_sw_cfg_trig1_0 0x00000000
1025#define regk_iop_sw_cfg_trig1_1 0x00000000
1026#define regk_iop_sw_cfg_trig1_2 0x00000000
1027#define regk_iop_sw_cfg_trig1_3 0x00000000
1028#define regk_iop_sw_cfg_trig2_0 0x00000000
1029#define regk_iop_sw_cfg_trig2_1 0x00000000
1030#define regk_iop_sw_cfg_trig2_2 0x00000000
1031#define regk_iop_sw_cfg_trig2_3 0x00000000
1032#define regk_iop_sw_cfg_trig3_0 0x00000000
1033#define regk_iop_sw_cfg_trig3_1 0x00000000
1034#define regk_iop_sw_cfg_trig3_2 0x00000000
1035#define regk_iop_sw_cfg_trig3_3 0x00000000
1036#define regk_iop_sw_cfg_trig4_0 0x00000001
1037#define regk_iop_sw_cfg_trig4_1 0x00000001
1038#define regk_iop_sw_cfg_trig4_2 0x00000001
1039#define regk_iop_sw_cfg_trig4_3 0x00000001
1040#define regk_iop_sw_cfg_trig5_0 0x00000001
1041#define regk_iop_sw_cfg_trig5_1 0x00000001
1042#define regk_iop_sw_cfg_trig5_2 0x00000001
1043#define regk_iop_sw_cfg_trig5_3 0x00000001
1044#define regk_iop_sw_cfg_trig6_0 0x00000001
1045#define regk_iop_sw_cfg_trig6_1 0x00000001
1046#define regk_iop_sw_cfg_trig6_2 0x00000001
1047#define regk_iop_sw_cfg_trig6_3 0x00000001
1048#define regk_iop_sw_cfg_trig7_0 0x00000001
1049#define regk_iop_sw_cfg_trig7_1 0x00000001
1050#define regk_iop_sw_cfg_trig7_2 0x00000001
1051#define regk_iop_sw_cfg_trig7_3 0x00000001
1052#endif /* __iop_sw_cfg_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cpu_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
deleted file mode 100644
index db347bcba025..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
+++ /dev/null
@@ -1,1758 +0,0 @@
1#ifndef __iop_sw_cpu_defs_asm_h
2#define __iop_sw_cpu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_cpu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_sw_cpu_defs_asm.h ../../inst/io_proc/rtl/guinness/iop_sw_cpu.r
11 * id: $Id: iop_sw_cpu_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_mc_ctrl, scope iop_sw_cpu, type rw */
57#define reg_iop_sw_cpu_rw_mc_ctrl___keep_owner___lsb 0
58#define reg_iop_sw_cpu_rw_mc_ctrl___keep_owner___width 1
59#define reg_iop_sw_cpu_rw_mc_ctrl___keep_owner___bit 0
60#define reg_iop_sw_cpu_rw_mc_ctrl___cmd___lsb 1
61#define reg_iop_sw_cpu_rw_mc_ctrl___cmd___width 2
62#define reg_iop_sw_cpu_rw_mc_ctrl___size___lsb 3
63#define reg_iop_sw_cpu_rw_mc_ctrl___size___width 3
64#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu0_mem___lsb 6
65#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu0_mem___width 1
66#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu0_mem___bit 6
67#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu1_mem___lsb 7
68#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu1_mem___width 1
69#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu1_mem___bit 7
70#define reg_iop_sw_cpu_rw_mc_ctrl_offset 0
71
72/* Register rw_mc_data, scope iop_sw_cpu, type rw */
73#define reg_iop_sw_cpu_rw_mc_data___val___lsb 0
74#define reg_iop_sw_cpu_rw_mc_data___val___width 32
75#define reg_iop_sw_cpu_rw_mc_data_offset 4
76
77/* Register rw_mc_addr, scope iop_sw_cpu, type rw */
78#define reg_iop_sw_cpu_rw_mc_addr_offset 8
79
80/* Register rs_mc_data, scope iop_sw_cpu, type rs */
81#define reg_iop_sw_cpu_rs_mc_data_offset 12
82
83/* Register r_mc_data, scope iop_sw_cpu, type r */
84#define reg_iop_sw_cpu_r_mc_data_offset 16
85
86/* Register r_mc_stat, scope iop_sw_cpu, type r */
87#define reg_iop_sw_cpu_r_mc_stat___busy_cpu___lsb 0
88#define reg_iop_sw_cpu_r_mc_stat___busy_cpu___width 1
89#define reg_iop_sw_cpu_r_mc_stat___busy_cpu___bit 0
90#define reg_iop_sw_cpu_r_mc_stat___busy_mpu___lsb 1
91#define reg_iop_sw_cpu_r_mc_stat___busy_mpu___width 1
92#define reg_iop_sw_cpu_r_mc_stat___busy_mpu___bit 1
93#define reg_iop_sw_cpu_r_mc_stat___busy_spu0___lsb 2
94#define reg_iop_sw_cpu_r_mc_stat___busy_spu0___width 1
95#define reg_iop_sw_cpu_r_mc_stat___busy_spu0___bit 2
96#define reg_iop_sw_cpu_r_mc_stat___busy_spu1___lsb 3
97#define reg_iop_sw_cpu_r_mc_stat___busy_spu1___width 1
98#define reg_iop_sw_cpu_r_mc_stat___busy_spu1___bit 3
99#define reg_iop_sw_cpu_r_mc_stat___owned_by_cpu___lsb 4
100#define reg_iop_sw_cpu_r_mc_stat___owned_by_cpu___width 1
101#define reg_iop_sw_cpu_r_mc_stat___owned_by_cpu___bit 4
102#define reg_iop_sw_cpu_r_mc_stat___owned_by_mpu___lsb 5
103#define reg_iop_sw_cpu_r_mc_stat___owned_by_mpu___width 1
104#define reg_iop_sw_cpu_r_mc_stat___owned_by_mpu___bit 5
105#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu0___lsb 6
106#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu0___width 1
107#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu0___bit 6
108#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu1___lsb 7
109#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu1___width 1
110#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu1___bit 7
111#define reg_iop_sw_cpu_r_mc_stat_offset 20
112
113/* Register rw_bus0_clr_mask, scope iop_sw_cpu, type rw */
114#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte0___lsb 0
115#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte0___width 8
116#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte1___lsb 8
117#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte1___width 8
118#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte2___lsb 16
119#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte2___width 8
120#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte3___lsb 24
121#define reg_iop_sw_cpu_rw_bus0_clr_mask___byte3___width 8
122#define reg_iop_sw_cpu_rw_bus0_clr_mask_offset 24
123
124/* Register rw_bus0_set_mask, scope iop_sw_cpu, type rw */
125#define reg_iop_sw_cpu_rw_bus0_set_mask___byte0___lsb 0
126#define reg_iop_sw_cpu_rw_bus0_set_mask___byte0___width 8
127#define reg_iop_sw_cpu_rw_bus0_set_mask___byte1___lsb 8
128#define reg_iop_sw_cpu_rw_bus0_set_mask___byte1___width 8
129#define reg_iop_sw_cpu_rw_bus0_set_mask___byte2___lsb 16
130#define reg_iop_sw_cpu_rw_bus0_set_mask___byte2___width 8
131#define reg_iop_sw_cpu_rw_bus0_set_mask___byte3___lsb 24
132#define reg_iop_sw_cpu_rw_bus0_set_mask___byte3___width 8
133#define reg_iop_sw_cpu_rw_bus0_set_mask_offset 28
134
135/* Register rw_bus0_oe_clr_mask, scope iop_sw_cpu, type rw */
136#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte0___lsb 0
137#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte0___width 1
138#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte0___bit 0
139#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte1___lsb 1
140#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte1___width 1
141#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte1___bit 1
142#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte2___lsb 2
143#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte2___width 1
144#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte2___bit 2
145#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte3___lsb 3
146#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte3___width 1
147#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask___byte3___bit 3
148#define reg_iop_sw_cpu_rw_bus0_oe_clr_mask_offset 32
149
150/* Register rw_bus0_oe_set_mask, scope iop_sw_cpu, type rw */
151#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte0___lsb 0
152#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte0___width 1
153#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte0___bit 0
154#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte1___lsb 1
155#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte1___width 1
156#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte1___bit 1
157#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte2___lsb 2
158#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte2___width 1
159#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte2___bit 2
160#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte3___lsb 3
161#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte3___width 1
162#define reg_iop_sw_cpu_rw_bus0_oe_set_mask___byte3___bit 3
163#define reg_iop_sw_cpu_rw_bus0_oe_set_mask_offset 36
164
165/* Register r_bus0_in, scope iop_sw_cpu, type r */
166#define reg_iop_sw_cpu_r_bus0_in_offset 40
167
168/* Register rw_bus1_clr_mask, scope iop_sw_cpu, type rw */
169#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte0___lsb 0
170#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte0___width 8
171#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte1___lsb 8
172#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte1___width 8
173#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte2___lsb 16
174#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte2___width 8
175#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte3___lsb 24
176#define reg_iop_sw_cpu_rw_bus1_clr_mask___byte3___width 8
177#define reg_iop_sw_cpu_rw_bus1_clr_mask_offset 44
178
179/* Register rw_bus1_set_mask, scope iop_sw_cpu, type rw */
180#define reg_iop_sw_cpu_rw_bus1_set_mask___byte0___lsb 0
181#define reg_iop_sw_cpu_rw_bus1_set_mask___byte0___width 8
182#define reg_iop_sw_cpu_rw_bus1_set_mask___byte1___lsb 8
183#define reg_iop_sw_cpu_rw_bus1_set_mask___byte1___width 8
184#define reg_iop_sw_cpu_rw_bus1_set_mask___byte2___lsb 16
185#define reg_iop_sw_cpu_rw_bus1_set_mask___byte2___width 8
186#define reg_iop_sw_cpu_rw_bus1_set_mask___byte3___lsb 24
187#define reg_iop_sw_cpu_rw_bus1_set_mask___byte3___width 8
188#define reg_iop_sw_cpu_rw_bus1_set_mask_offset 48
189
190/* Register rw_bus1_oe_clr_mask, scope iop_sw_cpu, type rw */
191#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte0___lsb 0
192#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte0___width 1
193#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte0___bit 0
194#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte1___lsb 1
195#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte1___width 1
196#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte1___bit 1
197#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte2___lsb 2
198#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte2___width 1
199#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte2___bit 2
200#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte3___lsb 3
201#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte3___width 1
202#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask___byte3___bit 3
203#define reg_iop_sw_cpu_rw_bus1_oe_clr_mask_offset 52
204
205/* Register rw_bus1_oe_set_mask, scope iop_sw_cpu, type rw */
206#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte0___lsb 0
207#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte0___width 1
208#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte0___bit 0
209#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte1___lsb 1
210#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte1___width 1
211#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte1___bit 1
212#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte2___lsb 2
213#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte2___width 1
214#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte2___bit 2
215#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte3___lsb 3
216#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte3___width 1
217#define reg_iop_sw_cpu_rw_bus1_oe_set_mask___byte3___bit 3
218#define reg_iop_sw_cpu_rw_bus1_oe_set_mask_offset 56
219
220/* Register r_bus1_in, scope iop_sw_cpu, type r */
221#define reg_iop_sw_cpu_r_bus1_in_offset 60
222
223/* Register rw_gio_clr_mask, scope iop_sw_cpu, type rw */
224#define reg_iop_sw_cpu_rw_gio_clr_mask___val___lsb 0
225#define reg_iop_sw_cpu_rw_gio_clr_mask___val___width 32
226#define reg_iop_sw_cpu_rw_gio_clr_mask_offset 64
227
228/* Register rw_gio_set_mask, scope iop_sw_cpu, type rw */
229#define reg_iop_sw_cpu_rw_gio_set_mask___val___lsb 0
230#define reg_iop_sw_cpu_rw_gio_set_mask___val___width 32
231#define reg_iop_sw_cpu_rw_gio_set_mask_offset 68
232
233/* Register rw_gio_oe_clr_mask, scope iop_sw_cpu, type rw */
234#define reg_iop_sw_cpu_rw_gio_oe_clr_mask___val___lsb 0
235#define reg_iop_sw_cpu_rw_gio_oe_clr_mask___val___width 32
236#define reg_iop_sw_cpu_rw_gio_oe_clr_mask_offset 72
237
238/* Register rw_gio_oe_set_mask, scope iop_sw_cpu, type rw */
239#define reg_iop_sw_cpu_rw_gio_oe_set_mask___val___lsb 0
240#define reg_iop_sw_cpu_rw_gio_oe_set_mask___val___width 32
241#define reg_iop_sw_cpu_rw_gio_oe_set_mask_offset 76
242
243/* Register r_gio_in, scope iop_sw_cpu, type r */
244#define reg_iop_sw_cpu_r_gio_in_offset 80
245
246/* Register rw_intr0_mask, scope iop_sw_cpu, type rw */
247#define reg_iop_sw_cpu_rw_intr0_mask___mpu_0___lsb 0
248#define reg_iop_sw_cpu_rw_intr0_mask___mpu_0___width 1
249#define reg_iop_sw_cpu_rw_intr0_mask___mpu_0___bit 0
250#define reg_iop_sw_cpu_rw_intr0_mask___mpu_1___lsb 1
251#define reg_iop_sw_cpu_rw_intr0_mask___mpu_1___width 1
252#define reg_iop_sw_cpu_rw_intr0_mask___mpu_1___bit 1
253#define reg_iop_sw_cpu_rw_intr0_mask___mpu_2___lsb 2
254#define reg_iop_sw_cpu_rw_intr0_mask___mpu_2___width 1
255#define reg_iop_sw_cpu_rw_intr0_mask___mpu_2___bit 2
256#define reg_iop_sw_cpu_rw_intr0_mask___mpu_3___lsb 3
257#define reg_iop_sw_cpu_rw_intr0_mask___mpu_3___width 1
258#define reg_iop_sw_cpu_rw_intr0_mask___mpu_3___bit 3
259#define reg_iop_sw_cpu_rw_intr0_mask___mpu_4___lsb 4
260#define reg_iop_sw_cpu_rw_intr0_mask___mpu_4___width 1
261#define reg_iop_sw_cpu_rw_intr0_mask___mpu_4___bit 4
262#define reg_iop_sw_cpu_rw_intr0_mask___mpu_5___lsb 5
263#define reg_iop_sw_cpu_rw_intr0_mask___mpu_5___width 1
264#define reg_iop_sw_cpu_rw_intr0_mask___mpu_5___bit 5
265#define reg_iop_sw_cpu_rw_intr0_mask___mpu_6___lsb 6
266#define reg_iop_sw_cpu_rw_intr0_mask___mpu_6___width 1
267#define reg_iop_sw_cpu_rw_intr0_mask___mpu_6___bit 6
268#define reg_iop_sw_cpu_rw_intr0_mask___mpu_7___lsb 7
269#define reg_iop_sw_cpu_rw_intr0_mask___mpu_7___width 1
270#define reg_iop_sw_cpu_rw_intr0_mask___mpu_7___bit 7
271#define reg_iop_sw_cpu_rw_intr0_mask___mpu_8___lsb 8
272#define reg_iop_sw_cpu_rw_intr0_mask___mpu_8___width 1
273#define reg_iop_sw_cpu_rw_intr0_mask___mpu_8___bit 8
274#define reg_iop_sw_cpu_rw_intr0_mask___mpu_9___lsb 9
275#define reg_iop_sw_cpu_rw_intr0_mask___mpu_9___width 1
276#define reg_iop_sw_cpu_rw_intr0_mask___mpu_9___bit 9
277#define reg_iop_sw_cpu_rw_intr0_mask___mpu_10___lsb 10
278#define reg_iop_sw_cpu_rw_intr0_mask___mpu_10___width 1
279#define reg_iop_sw_cpu_rw_intr0_mask___mpu_10___bit 10
280#define reg_iop_sw_cpu_rw_intr0_mask___mpu_11___lsb 11
281#define reg_iop_sw_cpu_rw_intr0_mask___mpu_11___width 1
282#define reg_iop_sw_cpu_rw_intr0_mask___mpu_11___bit 11
283#define reg_iop_sw_cpu_rw_intr0_mask___mpu_12___lsb 12
284#define reg_iop_sw_cpu_rw_intr0_mask___mpu_12___width 1
285#define reg_iop_sw_cpu_rw_intr0_mask___mpu_12___bit 12
286#define reg_iop_sw_cpu_rw_intr0_mask___mpu_13___lsb 13
287#define reg_iop_sw_cpu_rw_intr0_mask___mpu_13___width 1
288#define reg_iop_sw_cpu_rw_intr0_mask___mpu_13___bit 13
289#define reg_iop_sw_cpu_rw_intr0_mask___mpu_14___lsb 14
290#define reg_iop_sw_cpu_rw_intr0_mask___mpu_14___width 1
291#define reg_iop_sw_cpu_rw_intr0_mask___mpu_14___bit 14
292#define reg_iop_sw_cpu_rw_intr0_mask___mpu_15___lsb 15
293#define reg_iop_sw_cpu_rw_intr0_mask___mpu_15___width 1
294#define reg_iop_sw_cpu_rw_intr0_mask___mpu_15___bit 15
295#define reg_iop_sw_cpu_rw_intr0_mask___spu0_0___lsb 16
296#define reg_iop_sw_cpu_rw_intr0_mask___spu0_0___width 1
297#define reg_iop_sw_cpu_rw_intr0_mask___spu0_0___bit 16
298#define reg_iop_sw_cpu_rw_intr0_mask___spu0_1___lsb 17
299#define reg_iop_sw_cpu_rw_intr0_mask___spu0_1___width 1
300#define reg_iop_sw_cpu_rw_intr0_mask___spu0_1___bit 17
301#define reg_iop_sw_cpu_rw_intr0_mask___spu0_2___lsb 18
302#define reg_iop_sw_cpu_rw_intr0_mask___spu0_2___width 1
303#define reg_iop_sw_cpu_rw_intr0_mask___spu0_2___bit 18
304#define reg_iop_sw_cpu_rw_intr0_mask___spu0_3___lsb 19
305#define reg_iop_sw_cpu_rw_intr0_mask___spu0_3___width 1
306#define reg_iop_sw_cpu_rw_intr0_mask___spu0_3___bit 19
307#define reg_iop_sw_cpu_rw_intr0_mask___spu0_4___lsb 20
308#define reg_iop_sw_cpu_rw_intr0_mask___spu0_4___width 1
309#define reg_iop_sw_cpu_rw_intr0_mask___spu0_4___bit 20
310#define reg_iop_sw_cpu_rw_intr0_mask___spu0_5___lsb 21
311#define reg_iop_sw_cpu_rw_intr0_mask___spu0_5___width 1
312#define reg_iop_sw_cpu_rw_intr0_mask___spu0_5___bit 21
313#define reg_iop_sw_cpu_rw_intr0_mask___spu0_6___lsb 22
314#define reg_iop_sw_cpu_rw_intr0_mask___spu0_6___width 1
315#define reg_iop_sw_cpu_rw_intr0_mask___spu0_6___bit 22
316#define reg_iop_sw_cpu_rw_intr0_mask___spu0_7___lsb 23
317#define reg_iop_sw_cpu_rw_intr0_mask___spu0_7___width 1
318#define reg_iop_sw_cpu_rw_intr0_mask___spu0_7___bit 23
319#define reg_iop_sw_cpu_rw_intr0_mask___spu1_8___lsb 24
320#define reg_iop_sw_cpu_rw_intr0_mask___spu1_8___width 1
321#define reg_iop_sw_cpu_rw_intr0_mask___spu1_8___bit 24
322#define reg_iop_sw_cpu_rw_intr0_mask___spu1_9___lsb 25
323#define reg_iop_sw_cpu_rw_intr0_mask___spu1_9___width 1
324#define reg_iop_sw_cpu_rw_intr0_mask___spu1_9___bit 25
325#define reg_iop_sw_cpu_rw_intr0_mask___spu1_10___lsb 26
326#define reg_iop_sw_cpu_rw_intr0_mask___spu1_10___width 1
327#define reg_iop_sw_cpu_rw_intr0_mask___spu1_10___bit 26
328#define reg_iop_sw_cpu_rw_intr0_mask___spu1_11___lsb 27
329#define reg_iop_sw_cpu_rw_intr0_mask___spu1_11___width 1
330#define reg_iop_sw_cpu_rw_intr0_mask___spu1_11___bit 27
331#define reg_iop_sw_cpu_rw_intr0_mask___spu1_12___lsb 28
332#define reg_iop_sw_cpu_rw_intr0_mask___spu1_12___width 1
333#define reg_iop_sw_cpu_rw_intr0_mask___spu1_12___bit 28
334#define reg_iop_sw_cpu_rw_intr0_mask___spu1_13___lsb 29
335#define reg_iop_sw_cpu_rw_intr0_mask___spu1_13___width 1
336#define reg_iop_sw_cpu_rw_intr0_mask___spu1_13___bit 29
337#define reg_iop_sw_cpu_rw_intr0_mask___spu1_14___lsb 30
338#define reg_iop_sw_cpu_rw_intr0_mask___spu1_14___width 1
339#define reg_iop_sw_cpu_rw_intr0_mask___spu1_14___bit 30
340#define reg_iop_sw_cpu_rw_intr0_mask___spu1_15___lsb 31
341#define reg_iop_sw_cpu_rw_intr0_mask___spu1_15___width 1
342#define reg_iop_sw_cpu_rw_intr0_mask___spu1_15___bit 31
343#define reg_iop_sw_cpu_rw_intr0_mask_offset 84
344
345/* Register rw_ack_intr0, scope iop_sw_cpu, type rw */
346#define reg_iop_sw_cpu_rw_ack_intr0___mpu_0___lsb 0
347#define reg_iop_sw_cpu_rw_ack_intr0___mpu_0___width 1
348#define reg_iop_sw_cpu_rw_ack_intr0___mpu_0___bit 0
349#define reg_iop_sw_cpu_rw_ack_intr0___mpu_1___lsb 1
350#define reg_iop_sw_cpu_rw_ack_intr0___mpu_1___width 1
351#define reg_iop_sw_cpu_rw_ack_intr0___mpu_1___bit 1
352#define reg_iop_sw_cpu_rw_ack_intr0___mpu_2___lsb 2
353#define reg_iop_sw_cpu_rw_ack_intr0___mpu_2___width 1
354#define reg_iop_sw_cpu_rw_ack_intr0___mpu_2___bit 2
355#define reg_iop_sw_cpu_rw_ack_intr0___mpu_3___lsb 3
356#define reg_iop_sw_cpu_rw_ack_intr0___mpu_3___width 1
357#define reg_iop_sw_cpu_rw_ack_intr0___mpu_3___bit 3
358#define reg_iop_sw_cpu_rw_ack_intr0___mpu_4___lsb 4
359#define reg_iop_sw_cpu_rw_ack_intr0___mpu_4___width 1
360#define reg_iop_sw_cpu_rw_ack_intr0___mpu_4___bit 4
361#define reg_iop_sw_cpu_rw_ack_intr0___mpu_5___lsb 5
362#define reg_iop_sw_cpu_rw_ack_intr0___mpu_5___width 1
363#define reg_iop_sw_cpu_rw_ack_intr0___mpu_5___bit 5
364#define reg_iop_sw_cpu_rw_ack_intr0___mpu_6___lsb 6
365#define reg_iop_sw_cpu_rw_ack_intr0___mpu_6___width 1
366#define reg_iop_sw_cpu_rw_ack_intr0___mpu_6___bit 6
367#define reg_iop_sw_cpu_rw_ack_intr0___mpu_7___lsb 7
368#define reg_iop_sw_cpu_rw_ack_intr0___mpu_7___width 1
369#define reg_iop_sw_cpu_rw_ack_intr0___mpu_7___bit 7
370#define reg_iop_sw_cpu_rw_ack_intr0___mpu_8___lsb 8
371#define reg_iop_sw_cpu_rw_ack_intr0___mpu_8___width 1
372#define reg_iop_sw_cpu_rw_ack_intr0___mpu_8___bit 8
373#define reg_iop_sw_cpu_rw_ack_intr0___mpu_9___lsb 9
374#define reg_iop_sw_cpu_rw_ack_intr0___mpu_9___width 1
375#define reg_iop_sw_cpu_rw_ack_intr0___mpu_9___bit 9
376#define reg_iop_sw_cpu_rw_ack_intr0___mpu_10___lsb 10
377#define reg_iop_sw_cpu_rw_ack_intr0___mpu_10___width 1
378#define reg_iop_sw_cpu_rw_ack_intr0___mpu_10___bit 10
379#define reg_iop_sw_cpu_rw_ack_intr0___mpu_11___lsb 11
380#define reg_iop_sw_cpu_rw_ack_intr0___mpu_11___width 1
381#define reg_iop_sw_cpu_rw_ack_intr0___mpu_11___bit 11
382#define reg_iop_sw_cpu_rw_ack_intr0___mpu_12___lsb 12
383#define reg_iop_sw_cpu_rw_ack_intr0___mpu_12___width 1
384#define reg_iop_sw_cpu_rw_ack_intr0___mpu_12___bit 12
385#define reg_iop_sw_cpu_rw_ack_intr0___mpu_13___lsb 13
386#define reg_iop_sw_cpu_rw_ack_intr0___mpu_13___width 1
387#define reg_iop_sw_cpu_rw_ack_intr0___mpu_13___bit 13
388#define reg_iop_sw_cpu_rw_ack_intr0___mpu_14___lsb 14
389#define reg_iop_sw_cpu_rw_ack_intr0___mpu_14___width 1
390#define reg_iop_sw_cpu_rw_ack_intr0___mpu_14___bit 14
391#define reg_iop_sw_cpu_rw_ack_intr0___mpu_15___lsb 15
392#define reg_iop_sw_cpu_rw_ack_intr0___mpu_15___width 1
393#define reg_iop_sw_cpu_rw_ack_intr0___mpu_15___bit 15
394#define reg_iop_sw_cpu_rw_ack_intr0___spu0_0___lsb 16
395#define reg_iop_sw_cpu_rw_ack_intr0___spu0_0___width 1
396#define reg_iop_sw_cpu_rw_ack_intr0___spu0_0___bit 16
397#define reg_iop_sw_cpu_rw_ack_intr0___spu0_1___lsb 17
398#define reg_iop_sw_cpu_rw_ack_intr0___spu0_1___width 1
399#define reg_iop_sw_cpu_rw_ack_intr0___spu0_1___bit 17
400#define reg_iop_sw_cpu_rw_ack_intr0___spu0_2___lsb 18
401#define reg_iop_sw_cpu_rw_ack_intr0___spu0_2___width 1
402#define reg_iop_sw_cpu_rw_ack_intr0___spu0_2___bit 18
403#define reg_iop_sw_cpu_rw_ack_intr0___spu0_3___lsb 19
404#define reg_iop_sw_cpu_rw_ack_intr0___spu0_3___width 1
405#define reg_iop_sw_cpu_rw_ack_intr0___spu0_3___bit 19
406#define reg_iop_sw_cpu_rw_ack_intr0___spu0_4___lsb 20
407#define reg_iop_sw_cpu_rw_ack_intr0___spu0_4___width 1
408#define reg_iop_sw_cpu_rw_ack_intr0___spu0_4___bit 20
409#define reg_iop_sw_cpu_rw_ack_intr0___spu0_5___lsb 21
410#define reg_iop_sw_cpu_rw_ack_intr0___spu0_5___width 1
411#define reg_iop_sw_cpu_rw_ack_intr0___spu0_5___bit 21
412#define reg_iop_sw_cpu_rw_ack_intr0___spu0_6___lsb 22
413#define reg_iop_sw_cpu_rw_ack_intr0___spu0_6___width 1
414#define reg_iop_sw_cpu_rw_ack_intr0___spu0_6___bit 22
415#define reg_iop_sw_cpu_rw_ack_intr0___spu0_7___lsb 23
416#define reg_iop_sw_cpu_rw_ack_intr0___spu0_7___width 1
417#define reg_iop_sw_cpu_rw_ack_intr0___spu0_7___bit 23
418#define reg_iop_sw_cpu_rw_ack_intr0___spu1_8___lsb 24
419#define reg_iop_sw_cpu_rw_ack_intr0___spu1_8___width 1
420#define reg_iop_sw_cpu_rw_ack_intr0___spu1_8___bit 24
421#define reg_iop_sw_cpu_rw_ack_intr0___spu1_9___lsb 25
422#define reg_iop_sw_cpu_rw_ack_intr0___spu1_9___width 1
423#define reg_iop_sw_cpu_rw_ack_intr0___spu1_9___bit 25
424#define reg_iop_sw_cpu_rw_ack_intr0___spu1_10___lsb 26
425#define reg_iop_sw_cpu_rw_ack_intr0___spu1_10___width 1
426#define reg_iop_sw_cpu_rw_ack_intr0___spu1_10___bit 26
427#define reg_iop_sw_cpu_rw_ack_intr0___spu1_11___lsb 27
428#define reg_iop_sw_cpu_rw_ack_intr0___spu1_11___width 1
429#define reg_iop_sw_cpu_rw_ack_intr0___spu1_11___bit 27
430#define reg_iop_sw_cpu_rw_ack_intr0___spu1_12___lsb 28
431#define reg_iop_sw_cpu_rw_ack_intr0___spu1_12___width 1
432#define reg_iop_sw_cpu_rw_ack_intr0___spu1_12___bit 28
433#define reg_iop_sw_cpu_rw_ack_intr0___spu1_13___lsb 29
434#define reg_iop_sw_cpu_rw_ack_intr0___spu1_13___width 1
435#define reg_iop_sw_cpu_rw_ack_intr0___spu1_13___bit 29
436#define reg_iop_sw_cpu_rw_ack_intr0___spu1_14___lsb 30
437#define reg_iop_sw_cpu_rw_ack_intr0___spu1_14___width 1
438#define reg_iop_sw_cpu_rw_ack_intr0___spu1_14___bit 30
439#define reg_iop_sw_cpu_rw_ack_intr0___spu1_15___lsb 31
440#define reg_iop_sw_cpu_rw_ack_intr0___spu1_15___width 1
441#define reg_iop_sw_cpu_rw_ack_intr0___spu1_15___bit 31
442#define reg_iop_sw_cpu_rw_ack_intr0_offset 88
443
444/* Register r_intr0, scope iop_sw_cpu, type r */
445#define reg_iop_sw_cpu_r_intr0___mpu_0___lsb 0
446#define reg_iop_sw_cpu_r_intr0___mpu_0___width 1
447#define reg_iop_sw_cpu_r_intr0___mpu_0___bit 0
448#define reg_iop_sw_cpu_r_intr0___mpu_1___lsb 1
449#define reg_iop_sw_cpu_r_intr0___mpu_1___width 1
450#define reg_iop_sw_cpu_r_intr0___mpu_1___bit 1
451#define reg_iop_sw_cpu_r_intr0___mpu_2___lsb 2
452#define reg_iop_sw_cpu_r_intr0___mpu_2___width 1
453#define reg_iop_sw_cpu_r_intr0___mpu_2___bit 2
454#define reg_iop_sw_cpu_r_intr0___mpu_3___lsb 3
455#define reg_iop_sw_cpu_r_intr0___mpu_3___width 1
456#define reg_iop_sw_cpu_r_intr0___mpu_3___bit 3
457#define reg_iop_sw_cpu_r_intr0___mpu_4___lsb 4
458#define reg_iop_sw_cpu_r_intr0___mpu_4___width 1
459#define reg_iop_sw_cpu_r_intr0___mpu_4___bit 4
460#define reg_iop_sw_cpu_r_intr0___mpu_5___lsb 5
461#define reg_iop_sw_cpu_r_intr0___mpu_5___width 1
462#define reg_iop_sw_cpu_r_intr0___mpu_5___bit 5
463#define reg_iop_sw_cpu_r_intr0___mpu_6___lsb 6
464#define reg_iop_sw_cpu_r_intr0___mpu_6___width 1
465#define reg_iop_sw_cpu_r_intr0___mpu_6___bit 6
466#define reg_iop_sw_cpu_r_intr0___mpu_7___lsb 7
467#define reg_iop_sw_cpu_r_intr0___mpu_7___width 1
468#define reg_iop_sw_cpu_r_intr0___mpu_7___bit 7
469#define reg_iop_sw_cpu_r_intr0___mpu_8___lsb 8
470#define reg_iop_sw_cpu_r_intr0___mpu_8___width 1
471#define reg_iop_sw_cpu_r_intr0___mpu_8___bit 8
472#define reg_iop_sw_cpu_r_intr0___mpu_9___lsb 9
473#define reg_iop_sw_cpu_r_intr0___mpu_9___width 1
474#define reg_iop_sw_cpu_r_intr0___mpu_9___bit 9
475#define reg_iop_sw_cpu_r_intr0___mpu_10___lsb 10
476#define reg_iop_sw_cpu_r_intr0___mpu_10___width 1
477#define reg_iop_sw_cpu_r_intr0___mpu_10___bit 10
478#define reg_iop_sw_cpu_r_intr0___mpu_11___lsb 11
479#define reg_iop_sw_cpu_r_intr0___mpu_11___width 1
480#define reg_iop_sw_cpu_r_intr0___mpu_11___bit 11
481#define reg_iop_sw_cpu_r_intr0___mpu_12___lsb 12
482#define reg_iop_sw_cpu_r_intr0___mpu_12___width 1
483#define reg_iop_sw_cpu_r_intr0___mpu_12___bit 12
484#define reg_iop_sw_cpu_r_intr0___mpu_13___lsb 13
485#define reg_iop_sw_cpu_r_intr0___mpu_13___width 1
486#define reg_iop_sw_cpu_r_intr0___mpu_13___bit 13
487#define reg_iop_sw_cpu_r_intr0___mpu_14___lsb 14
488#define reg_iop_sw_cpu_r_intr0___mpu_14___width 1
489#define reg_iop_sw_cpu_r_intr0___mpu_14___bit 14
490#define reg_iop_sw_cpu_r_intr0___mpu_15___lsb 15
491#define reg_iop_sw_cpu_r_intr0___mpu_15___width 1
492#define reg_iop_sw_cpu_r_intr0___mpu_15___bit 15
493#define reg_iop_sw_cpu_r_intr0___spu0_0___lsb 16
494#define reg_iop_sw_cpu_r_intr0___spu0_0___width 1
495#define reg_iop_sw_cpu_r_intr0___spu0_0___bit 16
496#define reg_iop_sw_cpu_r_intr0___spu0_1___lsb 17
497#define reg_iop_sw_cpu_r_intr0___spu0_1___width 1
498#define reg_iop_sw_cpu_r_intr0___spu0_1___bit 17
499#define reg_iop_sw_cpu_r_intr0___spu0_2___lsb 18
500#define reg_iop_sw_cpu_r_intr0___spu0_2___width 1
501#define reg_iop_sw_cpu_r_intr0___spu0_2___bit 18
502#define reg_iop_sw_cpu_r_intr0___spu0_3___lsb 19
503#define reg_iop_sw_cpu_r_intr0___spu0_3___width 1
504#define reg_iop_sw_cpu_r_intr0___spu0_3___bit 19
505#define reg_iop_sw_cpu_r_intr0___spu0_4___lsb 20
506#define reg_iop_sw_cpu_r_intr0___spu0_4___width 1
507#define reg_iop_sw_cpu_r_intr0___spu0_4___bit 20
508#define reg_iop_sw_cpu_r_intr0___spu0_5___lsb 21
509#define reg_iop_sw_cpu_r_intr0___spu0_5___width 1
510#define reg_iop_sw_cpu_r_intr0___spu0_5___bit 21
511#define reg_iop_sw_cpu_r_intr0___spu0_6___lsb 22
512#define reg_iop_sw_cpu_r_intr0___spu0_6___width 1
513#define reg_iop_sw_cpu_r_intr0___spu0_6___bit 22
514#define reg_iop_sw_cpu_r_intr0___spu0_7___lsb 23
515#define reg_iop_sw_cpu_r_intr0___spu0_7___width 1
516#define reg_iop_sw_cpu_r_intr0___spu0_7___bit 23
517#define reg_iop_sw_cpu_r_intr0___spu1_8___lsb 24
518#define reg_iop_sw_cpu_r_intr0___spu1_8___width 1
519#define reg_iop_sw_cpu_r_intr0___spu1_8___bit 24
520#define reg_iop_sw_cpu_r_intr0___spu1_9___lsb 25
521#define reg_iop_sw_cpu_r_intr0___spu1_9___width 1
522#define reg_iop_sw_cpu_r_intr0___spu1_9___bit 25
523#define reg_iop_sw_cpu_r_intr0___spu1_10___lsb 26
524#define reg_iop_sw_cpu_r_intr0___spu1_10___width 1
525#define reg_iop_sw_cpu_r_intr0___spu1_10___bit 26
526#define reg_iop_sw_cpu_r_intr0___spu1_11___lsb 27
527#define reg_iop_sw_cpu_r_intr0___spu1_11___width 1
528#define reg_iop_sw_cpu_r_intr0___spu1_11___bit 27
529#define reg_iop_sw_cpu_r_intr0___spu1_12___lsb 28
530#define reg_iop_sw_cpu_r_intr0___spu1_12___width 1
531#define reg_iop_sw_cpu_r_intr0___spu1_12___bit 28
532#define reg_iop_sw_cpu_r_intr0___spu1_13___lsb 29
533#define reg_iop_sw_cpu_r_intr0___spu1_13___width 1
534#define reg_iop_sw_cpu_r_intr0___spu1_13___bit 29
535#define reg_iop_sw_cpu_r_intr0___spu1_14___lsb 30
536#define reg_iop_sw_cpu_r_intr0___spu1_14___width 1
537#define reg_iop_sw_cpu_r_intr0___spu1_14___bit 30
538#define reg_iop_sw_cpu_r_intr0___spu1_15___lsb 31
539#define reg_iop_sw_cpu_r_intr0___spu1_15___width 1
540#define reg_iop_sw_cpu_r_intr0___spu1_15___bit 31
541#define reg_iop_sw_cpu_r_intr0_offset 92
542
543/* Register r_masked_intr0, scope iop_sw_cpu, type r */
544#define reg_iop_sw_cpu_r_masked_intr0___mpu_0___lsb 0
545#define reg_iop_sw_cpu_r_masked_intr0___mpu_0___width 1
546#define reg_iop_sw_cpu_r_masked_intr0___mpu_0___bit 0
547#define reg_iop_sw_cpu_r_masked_intr0___mpu_1___lsb 1
548#define reg_iop_sw_cpu_r_masked_intr0___mpu_1___width 1
549#define reg_iop_sw_cpu_r_masked_intr0___mpu_1___bit 1
550#define reg_iop_sw_cpu_r_masked_intr0___mpu_2___lsb 2
551#define reg_iop_sw_cpu_r_masked_intr0___mpu_2___width 1
552#define reg_iop_sw_cpu_r_masked_intr0___mpu_2___bit 2
553#define reg_iop_sw_cpu_r_masked_intr0___mpu_3___lsb 3
554#define reg_iop_sw_cpu_r_masked_intr0___mpu_3___width 1
555#define reg_iop_sw_cpu_r_masked_intr0___mpu_3___bit 3
556#define reg_iop_sw_cpu_r_masked_intr0___mpu_4___lsb 4
557#define reg_iop_sw_cpu_r_masked_intr0___mpu_4___width 1
558#define reg_iop_sw_cpu_r_masked_intr0___mpu_4___bit 4
559#define reg_iop_sw_cpu_r_masked_intr0___mpu_5___lsb 5
560#define reg_iop_sw_cpu_r_masked_intr0___mpu_5___width 1
561#define reg_iop_sw_cpu_r_masked_intr0___mpu_5___bit 5
562#define reg_iop_sw_cpu_r_masked_intr0___mpu_6___lsb 6
563#define reg_iop_sw_cpu_r_masked_intr0___mpu_6___width 1
564#define reg_iop_sw_cpu_r_masked_intr0___mpu_6___bit 6
565#define reg_iop_sw_cpu_r_masked_intr0___mpu_7___lsb 7
566#define reg_iop_sw_cpu_r_masked_intr0___mpu_7___width 1
567#define reg_iop_sw_cpu_r_masked_intr0___mpu_7___bit 7
568#define reg_iop_sw_cpu_r_masked_intr0___mpu_8___lsb 8
569#define reg_iop_sw_cpu_r_masked_intr0___mpu_8___width 1
570#define reg_iop_sw_cpu_r_masked_intr0___mpu_8___bit 8
571#define reg_iop_sw_cpu_r_masked_intr0___mpu_9___lsb 9
572#define reg_iop_sw_cpu_r_masked_intr0___mpu_9___width 1
573#define reg_iop_sw_cpu_r_masked_intr0___mpu_9___bit 9
574#define reg_iop_sw_cpu_r_masked_intr0___mpu_10___lsb 10
575#define reg_iop_sw_cpu_r_masked_intr0___mpu_10___width 1
576#define reg_iop_sw_cpu_r_masked_intr0___mpu_10___bit 10
577#define reg_iop_sw_cpu_r_masked_intr0___mpu_11___lsb 11
578#define reg_iop_sw_cpu_r_masked_intr0___mpu_11___width 1
579#define reg_iop_sw_cpu_r_masked_intr0___mpu_11___bit 11
580#define reg_iop_sw_cpu_r_masked_intr0___mpu_12___lsb 12
581#define reg_iop_sw_cpu_r_masked_intr0___mpu_12___width 1
582#define reg_iop_sw_cpu_r_masked_intr0___mpu_12___bit 12
583#define reg_iop_sw_cpu_r_masked_intr0___mpu_13___lsb 13
584#define reg_iop_sw_cpu_r_masked_intr0___mpu_13___width 1
585#define reg_iop_sw_cpu_r_masked_intr0___mpu_13___bit 13
586#define reg_iop_sw_cpu_r_masked_intr0___mpu_14___lsb 14
587#define reg_iop_sw_cpu_r_masked_intr0___mpu_14___width 1
588#define reg_iop_sw_cpu_r_masked_intr0___mpu_14___bit 14
589#define reg_iop_sw_cpu_r_masked_intr0___mpu_15___lsb 15
590#define reg_iop_sw_cpu_r_masked_intr0___mpu_15___width 1
591#define reg_iop_sw_cpu_r_masked_intr0___mpu_15___bit 15
592#define reg_iop_sw_cpu_r_masked_intr0___spu0_0___lsb 16
593#define reg_iop_sw_cpu_r_masked_intr0___spu0_0___width 1
594#define reg_iop_sw_cpu_r_masked_intr0___spu0_0___bit 16
595#define reg_iop_sw_cpu_r_masked_intr0___spu0_1___lsb 17
596#define reg_iop_sw_cpu_r_masked_intr0___spu0_1___width 1
597#define reg_iop_sw_cpu_r_masked_intr0___spu0_1___bit 17
598#define reg_iop_sw_cpu_r_masked_intr0___spu0_2___lsb 18
599#define reg_iop_sw_cpu_r_masked_intr0___spu0_2___width 1
600#define reg_iop_sw_cpu_r_masked_intr0___spu0_2___bit 18
601#define reg_iop_sw_cpu_r_masked_intr0___spu0_3___lsb 19
602#define reg_iop_sw_cpu_r_masked_intr0___spu0_3___width 1
603#define reg_iop_sw_cpu_r_masked_intr0___spu0_3___bit 19
604#define reg_iop_sw_cpu_r_masked_intr0___spu0_4___lsb 20
605#define reg_iop_sw_cpu_r_masked_intr0___spu0_4___width 1
606#define reg_iop_sw_cpu_r_masked_intr0___spu0_4___bit 20
607#define reg_iop_sw_cpu_r_masked_intr0___spu0_5___lsb 21
608#define reg_iop_sw_cpu_r_masked_intr0___spu0_5___width 1
609#define reg_iop_sw_cpu_r_masked_intr0___spu0_5___bit 21
610#define reg_iop_sw_cpu_r_masked_intr0___spu0_6___lsb 22
611#define reg_iop_sw_cpu_r_masked_intr0___spu0_6___width 1
612#define reg_iop_sw_cpu_r_masked_intr0___spu0_6___bit 22
613#define reg_iop_sw_cpu_r_masked_intr0___spu0_7___lsb 23
614#define reg_iop_sw_cpu_r_masked_intr0___spu0_7___width 1
615#define reg_iop_sw_cpu_r_masked_intr0___spu0_7___bit 23
616#define reg_iop_sw_cpu_r_masked_intr0___spu1_8___lsb 24
617#define reg_iop_sw_cpu_r_masked_intr0___spu1_8___width 1
618#define reg_iop_sw_cpu_r_masked_intr0___spu1_8___bit 24
619#define reg_iop_sw_cpu_r_masked_intr0___spu1_9___lsb 25
620#define reg_iop_sw_cpu_r_masked_intr0___spu1_9___width 1
621#define reg_iop_sw_cpu_r_masked_intr0___spu1_9___bit 25
622#define reg_iop_sw_cpu_r_masked_intr0___spu1_10___lsb 26
623#define reg_iop_sw_cpu_r_masked_intr0___spu1_10___width 1
624#define reg_iop_sw_cpu_r_masked_intr0___spu1_10___bit 26
625#define reg_iop_sw_cpu_r_masked_intr0___spu1_11___lsb 27
626#define reg_iop_sw_cpu_r_masked_intr0___spu1_11___width 1
627#define reg_iop_sw_cpu_r_masked_intr0___spu1_11___bit 27
628#define reg_iop_sw_cpu_r_masked_intr0___spu1_12___lsb 28
629#define reg_iop_sw_cpu_r_masked_intr0___spu1_12___width 1
630#define reg_iop_sw_cpu_r_masked_intr0___spu1_12___bit 28
631#define reg_iop_sw_cpu_r_masked_intr0___spu1_13___lsb 29
632#define reg_iop_sw_cpu_r_masked_intr0___spu1_13___width 1
633#define reg_iop_sw_cpu_r_masked_intr0___spu1_13___bit 29
634#define reg_iop_sw_cpu_r_masked_intr0___spu1_14___lsb 30
635#define reg_iop_sw_cpu_r_masked_intr0___spu1_14___width 1
636#define reg_iop_sw_cpu_r_masked_intr0___spu1_14___bit 30
637#define reg_iop_sw_cpu_r_masked_intr0___spu1_15___lsb 31
638#define reg_iop_sw_cpu_r_masked_intr0___spu1_15___width 1
639#define reg_iop_sw_cpu_r_masked_intr0___spu1_15___bit 31
640#define reg_iop_sw_cpu_r_masked_intr0_offset 96
641
642/* Register rw_intr1_mask, scope iop_sw_cpu, type rw */
643#define reg_iop_sw_cpu_rw_intr1_mask___mpu_16___lsb 0
644#define reg_iop_sw_cpu_rw_intr1_mask___mpu_16___width 1
645#define reg_iop_sw_cpu_rw_intr1_mask___mpu_16___bit 0
646#define reg_iop_sw_cpu_rw_intr1_mask___mpu_17___lsb 1
647#define reg_iop_sw_cpu_rw_intr1_mask___mpu_17___width 1
648#define reg_iop_sw_cpu_rw_intr1_mask___mpu_17___bit 1
649#define reg_iop_sw_cpu_rw_intr1_mask___mpu_18___lsb 2
650#define reg_iop_sw_cpu_rw_intr1_mask___mpu_18___width 1
651#define reg_iop_sw_cpu_rw_intr1_mask___mpu_18___bit 2
652#define reg_iop_sw_cpu_rw_intr1_mask___mpu_19___lsb 3
653#define reg_iop_sw_cpu_rw_intr1_mask___mpu_19___width 1
654#define reg_iop_sw_cpu_rw_intr1_mask___mpu_19___bit 3
655#define reg_iop_sw_cpu_rw_intr1_mask___mpu_20___lsb 4
656#define reg_iop_sw_cpu_rw_intr1_mask___mpu_20___width 1
657#define reg_iop_sw_cpu_rw_intr1_mask___mpu_20___bit 4
658#define reg_iop_sw_cpu_rw_intr1_mask___mpu_21___lsb 5
659#define reg_iop_sw_cpu_rw_intr1_mask___mpu_21___width 1
660#define reg_iop_sw_cpu_rw_intr1_mask___mpu_21___bit 5
661#define reg_iop_sw_cpu_rw_intr1_mask___mpu_22___lsb 6
662#define reg_iop_sw_cpu_rw_intr1_mask___mpu_22___width 1
663#define reg_iop_sw_cpu_rw_intr1_mask___mpu_22___bit 6
664#define reg_iop_sw_cpu_rw_intr1_mask___mpu_23___lsb 7
665#define reg_iop_sw_cpu_rw_intr1_mask___mpu_23___width 1
666#define reg_iop_sw_cpu_rw_intr1_mask___mpu_23___bit 7
667#define reg_iop_sw_cpu_rw_intr1_mask___mpu_24___lsb 8
668#define reg_iop_sw_cpu_rw_intr1_mask___mpu_24___width 1
669#define reg_iop_sw_cpu_rw_intr1_mask___mpu_24___bit 8
670#define reg_iop_sw_cpu_rw_intr1_mask___mpu_25___lsb 9
671#define reg_iop_sw_cpu_rw_intr1_mask___mpu_25___width 1
672#define reg_iop_sw_cpu_rw_intr1_mask___mpu_25___bit 9
673#define reg_iop_sw_cpu_rw_intr1_mask___mpu_26___lsb 10
674#define reg_iop_sw_cpu_rw_intr1_mask___mpu_26___width 1
675#define reg_iop_sw_cpu_rw_intr1_mask___mpu_26___bit 10
676#define reg_iop_sw_cpu_rw_intr1_mask___mpu_27___lsb 11
677#define reg_iop_sw_cpu_rw_intr1_mask___mpu_27___width 1
678#define reg_iop_sw_cpu_rw_intr1_mask___mpu_27___bit 11
679#define reg_iop_sw_cpu_rw_intr1_mask___mpu_28___lsb 12
680#define reg_iop_sw_cpu_rw_intr1_mask___mpu_28___width 1
681#define reg_iop_sw_cpu_rw_intr1_mask___mpu_28___bit 12
682#define reg_iop_sw_cpu_rw_intr1_mask___mpu_29___lsb 13
683#define reg_iop_sw_cpu_rw_intr1_mask___mpu_29___width 1
684#define reg_iop_sw_cpu_rw_intr1_mask___mpu_29___bit 13
685#define reg_iop_sw_cpu_rw_intr1_mask___mpu_30___lsb 14
686#define reg_iop_sw_cpu_rw_intr1_mask___mpu_30___width 1
687#define reg_iop_sw_cpu_rw_intr1_mask___mpu_30___bit 14
688#define reg_iop_sw_cpu_rw_intr1_mask___mpu_31___lsb 15
689#define reg_iop_sw_cpu_rw_intr1_mask___mpu_31___width 1
690#define reg_iop_sw_cpu_rw_intr1_mask___mpu_31___bit 15
691#define reg_iop_sw_cpu_rw_intr1_mask___spu0_8___lsb 16
692#define reg_iop_sw_cpu_rw_intr1_mask___spu0_8___width 1
693#define reg_iop_sw_cpu_rw_intr1_mask___spu0_8___bit 16
694#define reg_iop_sw_cpu_rw_intr1_mask___spu0_9___lsb 17
695#define reg_iop_sw_cpu_rw_intr1_mask___spu0_9___width 1
696#define reg_iop_sw_cpu_rw_intr1_mask___spu0_9___bit 17
697#define reg_iop_sw_cpu_rw_intr1_mask___spu0_10___lsb 18
698#define reg_iop_sw_cpu_rw_intr1_mask___spu0_10___width 1
699#define reg_iop_sw_cpu_rw_intr1_mask___spu0_10___bit 18
700#define reg_iop_sw_cpu_rw_intr1_mask___spu0_11___lsb 19
701#define reg_iop_sw_cpu_rw_intr1_mask___spu0_11___width 1
702#define reg_iop_sw_cpu_rw_intr1_mask___spu0_11___bit 19
703#define reg_iop_sw_cpu_rw_intr1_mask___spu0_12___lsb 20
704#define reg_iop_sw_cpu_rw_intr1_mask___spu0_12___width 1
705#define reg_iop_sw_cpu_rw_intr1_mask___spu0_12___bit 20
706#define reg_iop_sw_cpu_rw_intr1_mask___spu0_13___lsb 21
707#define reg_iop_sw_cpu_rw_intr1_mask___spu0_13___width 1
708#define reg_iop_sw_cpu_rw_intr1_mask___spu0_13___bit 21
709#define reg_iop_sw_cpu_rw_intr1_mask___spu0_14___lsb 22
710#define reg_iop_sw_cpu_rw_intr1_mask___spu0_14___width 1
711#define reg_iop_sw_cpu_rw_intr1_mask___spu0_14___bit 22
712#define reg_iop_sw_cpu_rw_intr1_mask___spu0_15___lsb 23
713#define reg_iop_sw_cpu_rw_intr1_mask___spu0_15___width 1
714#define reg_iop_sw_cpu_rw_intr1_mask___spu0_15___bit 23
715#define reg_iop_sw_cpu_rw_intr1_mask___spu1_0___lsb 24
716#define reg_iop_sw_cpu_rw_intr1_mask___spu1_0___width 1
717#define reg_iop_sw_cpu_rw_intr1_mask___spu1_0___bit 24
718#define reg_iop_sw_cpu_rw_intr1_mask___spu1_1___lsb 25
719#define reg_iop_sw_cpu_rw_intr1_mask___spu1_1___width 1
720#define reg_iop_sw_cpu_rw_intr1_mask___spu1_1___bit 25
721#define reg_iop_sw_cpu_rw_intr1_mask___spu1_2___lsb 26
722#define reg_iop_sw_cpu_rw_intr1_mask___spu1_2___width 1
723#define reg_iop_sw_cpu_rw_intr1_mask___spu1_2___bit 26
724#define reg_iop_sw_cpu_rw_intr1_mask___spu1_3___lsb 27
725#define reg_iop_sw_cpu_rw_intr1_mask___spu1_3___width 1
726#define reg_iop_sw_cpu_rw_intr1_mask___spu1_3___bit 27
727#define reg_iop_sw_cpu_rw_intr1_mask___spu1_4___lsb 28
728#define reg_iop_sw_cpu_rw_intr1_mask___spu1_4___width 1
729#define reg_iop_sw_cpu_rw_intr1_mask___spu1_4___bit 28
730#define reg_iop_sw_cpu_rw_intr1_mask___spu1_5___lsb 29
731#define reg_iop_sw_cpu_rw_intr1_mask___spu1_5___width 1
732#define reg_iop_sw_cpu_rw_intr1_mask___spu1_5___bit 29
733#define reg_iop_sw_cpu_rw_intr1_mask___spu1_6___lsb 30
734#define reg_iop_sw_cpu_rw_intr1_mask___spu1_6___width 1
735#define reg_iop_sw_cpu_rw_intr1_mask___spu1_6___bit 30
736#define reg_iop_sw_cpu_rw_intr1_mask___spu1_7___lsb 31
737#define reg_iop_sw_cpu_rw_intr1_mask___spu1_7___width 1
738#define reg_iop_sw_cpu_rw_intr1_mask___spu1_7___bit 31
739#define reg_iop_sw_cpu_rw_intr1_mask_offset 100
740
741/* Register rw_ack_intr1, scope iop_sw_cpu, type rw */
742#define reg_iop_sw_cpu_rw_ack_intr1___mpu_16___lsb 0
743#define reg_iop_sw_cpu_rw_ack_intr1___mpu_16___width 1
744#define reg_iop_sw_cpu_rw_ack_intr1___mpu_16___bit 0
745#define reg_iop_sw_cpu_rw_ack_intr1___mpu_17___lsb 1
746#define reg_iop_sw_cpu_rw_ack_intr1___mpu_17___width 1
747#define reg_iop_sw_cpu_rw_ack_intr1___mpu_17___bit 1
748#define reg_iop_sw_cpu_rw_ack_intr1___mpu_18___lsb 2
749#define reg_iop_sw_cpu_rw_ack_intr1___mpu_18___width 1
750#define reg_iop_sw_cpu_rw_ack_intr1___mpu_18___bit 2
751#define reg_iop_sw_cpu_rw_ack_intr1___mpu_19___lsb 3
752#define reg_iop_sw_cpu_rw_ack_intr1___mpu_19___width 1
753#define reg_iop_sw_cpu_rw_ack_intr1___mpu_19___bit 3
754#define reg_iop_sw_cpu_rw_ack_intr1___mpu_20___lsb 4
755#define reg_iop_sw_cpu_rw_ack_intr1___mpu_20___width 1
756#define reg_iop_sw_cpu_rw_ack_intr1___mpu_20___bit 4
757#define reg_iop_sw_cpu_rw_ack_intr1___mpu_21___lsb 5
758#define reg_iop_sw_cpu_rw_ack_intr1___mpu_21___width 1
759#define reg_iop_sw_cpu_rw_ack_intr1___mpu_21___bit 5
760#define reg_iop_sw_cpu_rw_ack_intr1___mpu_22___lsb 6
761#define reg_iop_sw_cpu_rw_ack_intr1___mpu_22___width 1
762#define reg_iop_sw_cpu_rw_ack_intr1___mpu_22___bit 6
763#define reg_iop_sw_cpu_rw_ack_intr1___mpu_23___lsb 7
764#define reg_iop_sw_cpu_rw_ack_intr1___mpu_23___width 1
765#define reg_iop_sw_cpu_rw_ack_intr1___mpu_23___bit 7
766#define reg_iop_sw_cpu_rw_ack_intr1___mpu_24___lsb 8
767#define reg_iop_sw_cpu_rw_ack_intr1___mpu_24___width 1
768#define reg_iop_sw_cpu_rw_ack_intr1___mpu_24___bit 8
769#define reg_iop_sw_cpu_rw_ack_intr1___mpu_25___lsb 9
770#define reg_iop_sw_cpu_rw_ack_intr1___mpu_25___width 1
771#define reg_iop_sw_cpu_rw_ack_intr1___mpu_25___bit 9
772#define reg_iop_sw_cpu_rw_ack_intr1___mpu_26___lsb 10
773#define reg_iop_sw_cpu_rw_ack_intr1___mpu_26___width 1
774#define reg_iop_sw_cpu_rw_ack_intr1___mpu_26___bit 10
775#define reg_iop_sw_cpu_rw_ack_intr1___mpu_27___lsb 11
776#define reg_iop_sw_cpu_rw_ack_intr1___mpu_27___width 1
777#define reg_iop_sw_cpu_rw_ack_intr1___mpu_27___bit 11
778#define reg_iop_sw_cpu_rw_ack_intr1___mpu_28___lsb 12
779#define reg_iop_sw_cpu_rw_ack_intr1___mpu_28___width 1
780#define reg_iop_sw_cpu_rw_ack_intr1___mpu_28___bit 12
781#define reg_iop_sw_cpu_rw_ack_intr1___mpu_29___lsb 13
782#define reg_iop_sw_cpu_rw_ack_intr1___mpu_29___width 1
783#define reg_iop_sw_cpu_rw_ack_intr1___mpu_29___bit 13
784#define reg_iop_sw_cpu_rw_ack_intr1___mpu_30___lsb 14
785#define reg_iop_sw_cpu_rw_ack_intr1___mpu_30___width 1
786#define reg_iop_sw_cpu_rw_ack_intr1___mpu_30___bit 14
787#define reg_iop_sw_cpu_rw_ack_intr1___mpu_31___lsb 15
788#define reg_iop_sw_cpu_rw_ack_intr1___mpu_31___width 1
789#define reg_iop_sw_cpu_rw_ack_intr1___mpu_31___bit 15
790#define reg_iop_sw_cpu_rw_ack_intr1___spu0_8___lsb 16
791#define reg_iop_sw_cpu_rw_ack_intr1___spu0_8___width 1
792#define reg_iop_sw_cpu_rw_ack_intr1___spu0_8___bit 16
793#define reg_iop_sw_cpu_rw_ack_intr1___spu0_9___lsb 17
794#define reg_iop_sw_cpu_rw_ack_intr1___spu0_9___width 1
795#define reg_iop_sw_cpu_rw_ack_intr1___spu0_9___bit 17
796#define reg_iop_sw_cpu_rw_ack_intr1___spu0_10___lsb 18
797#define reg_iop_sw_cpu_rw_ack_intr1___spu0_10___width 1
798#define reg_iop_sw_cpu_rw_ack_intr1___spu0_10___bit 18
799#define reg_iop_sw_cpu_rw_ack_intr1___spu0_11___lsb 19
800#define reg_iop_sw_cpu_rw_ack_intr1___spu0_11___width 1
801#define reg_iop_sw_cpu_rw_ack_intr1___spu0_11___bit 19
802#define reg_iop_sw_cpu_rw_ack_intr1___spu0_12___lsb 20
803#define reg_iop_sw_cpu_rw_ack_intr1___spu0_12___width 1
804#define reg_iop_sw_cpu_rw_ack_intr1___spu0_12___bit 20
805#define reg_iop_sw_cpu_rw_ack_intr1___spu0_13___lsb 21
806#define reg_iop_sw_cpu_rw_ack_intr1___spu0_13___width 1
807#define reg_iop_sw_cpu_rw_ack_intr1___spu0_13___bit 21
808#define reg_iop_sw_cpu_rw_ack_intr1___spu0_14___lsb 22
809#define reg_iop_sw_cpu_rw_ack_intr1___spu0_14___width 1
810#define reg_iop_sw_cpu_rw_ack_intr1___spu0_14___bit 22
811#define reg_iop_sw_cpu_rw_ack_intr1___spu0_15___lsb 23
812#define reg_iop_sw_cpu_rw_ack_intr1___spu0_15___width 1
813#define reg_iop_sw_cpu_rw_ack_intr1___spu0_15___bit 23
814#define reg_iop_sw_cpu_rw_ack_intr1___spu1_0___lsb 24
815#define reg_iop_sw_cpu_rw_ack_intr1___spu1_0___width 1
816#define reg_iop_sw_cpu_rw_ack_intr1___spu1_0___bit 24
817#define reg_iop_sw_cpu_rw_ack_intr1___spu1_1___lsb 25
818#define reg_iop_sw_cpu_rw_ack_intr1___spu1_1___width 1
819#define reg_iop_sw_cpu_rw_ack_intr1___spu1_1___bit 25
820#define reg_iop_sw_cpu_rw_ack_intr1___spu1_2___lsb 26
821#define reg_iop_sw_cpu_rw_ack_intr1___spu1_2___width 1
822#define reg_iop_sw_cpu_rw_ack_intr1___spu1_2___bit 26
823#define reg_iop_sw_cpu_rw_ack_intr1___spu1_3___lsb 27
824#define reg_iop_sw_cpu_rw_ack_intr1___spu1_3___width 1
825#define reg_iop_sw_cpu_rw_ack_intr1___spu1_3___bit 27
826#define reg_iop_sw_cpu_rw_ack_intr1___spu1_4___lsb 28
827#define reg_iop_sw_cpu_rw_ack_intr1___spu1_4___width 1
828#define reg_iop_sw_cpu_rw_ack_intr1___spu1_4___bit 28
829#define reg_iop_sw_cpu_rw_ack_intr1___spu1_5___lsb 29
830#define reg_iop_sw_cpu_rw_ack_intr1___spu1_5___width 1
831#define reg_iop_sw_cpu_rw_ack_intr1___spu1_5___bit 29
832#define reg_iop_sw_cpu_rw_ack_intr1___spu1_6___lsb 30
833#define reg_iop_sw_cpu_rw_ack_intr1___spu1_6___width 1
834#define reg_iop_sw_cpu_rw_ack_intr1___spu1_6___bit 30
835#define reg_iop_sw_cpu_rw_ack_intr1___spu1_7___lsb 31
836#define reg_iop_sw_cpu_rw_ack_intr1___spu1_7___width 1
837#define reg_iop_sw_cpu_rw_ack_intr1___spu1_7___bit 31
838#define reg_iop_sw_cpu_rw_ack_intr1_offset 104
839
840/* Register r_intr1, scope iop_sw_cpu, type r */
841#define reg_iop_sw_cpu_r_intr1___mpu_16___lsb 0
842#define reg_iop_sw_cpu_r_intr1___mpu_16___width 1
843#define reg_iop_sw_cpu_r_intr1___mpu_16___bit 0
844#define reg_iop_sw_cpu_r_intr1___mpu_17___lsb 1
845#define reg_iop_sw_cpu_r_intr1___mpu_17___width 1
846#define reg_iop_sw_cpu_r_intr1___mpu_17___bit 1
847#define reg_iop_sw_cpu_r_intr1___mpu_18___lsb 2
848#define reg_iop_sw_cpu_r_intr1___mpu_18___width 1
849#define reg_iop_sw_cpu_r_intr1___mpu_18___bit 2
850#define reg_iop_sw_cpu_r_intr1___mpu_19___lsb 3
851#define reg_iop_sw_cpu_r_intr1___mpu_19___width 1
852#define reg_iop_sw_cpu_r_intr1___mpu_19___bit 3
853#define reg_iop_sw_cpu_r_intr1___mpu_20___lsb 4
854#define reg_iop_sw_cpu_r_intr1___mpu_20___width 1
855#define reg_iop_sw_cpu_r_intr1___mpu_20___bit 4
856#define reg_iop_sw_cpu_r_intr1___mpu_21___lsb 5
857#define reg_iop_sw_cpu_r_intr1___mpu_21___width 1
858#define reg_iop_sw_cpu_r_intr1___mpu_21___bit 5
859#define reg_iop_sw_cpu_r_intr1___mpu_22___lsb 6
860#define reg_iop_sw_cpu_r_intr1___mpu_22___width 1
861#define reg_iop_sw_cpu_r_intr1___mpu_22___bit 6
862#define reg_iop_sw_cpu_r_intr1___mpu_23___lsb 7
863#define reg_iop_sw_cpu_r_intr1___mpu_23___width 1
864#define reg_iop_sw_cpu_r_intr1___mpu_23___bit 7
865#define reg_iop_sw_cpu_r_intr1___mpu_24___lsb 8
866#define reg_iop_sw_cpu_r_intr1___mpu_24___width 1
867#define reg_iop_sw_cpu_r_intr1___mpu_24___bit 8
868#define reg_iop_sw_cpu_r_intr1___mpu_25___lsb 9
869#define reg_iop_sw_cpu_r_intr1___mpu_25___width 1
870#define reg_iop_sw_cpu_r_intr1___mpu_25___bit 9
871#define reg_iop_sw_cpu_r_intr1___mpu_26___lsb 10
872#define reg_iop_sw_cpu_r_intr1___mpu_26___width 1
873#define reg_iop_sw_cpu_r_intr1___mpu_26___bit 10
874#define reg_iop_sw_cpu_r_intr1___mpu_27___lsb 11
875#define reg_iop_sw_cpu_r_intr1___mpu_27___width 1
876#define reg_iop_sw_cpu_r_intr1___mpu_27___bit 11
877#define reg_iop_sw_cpu_r_intr1___mpu_28___lsb 12
878#define reg_iop_sw_cpu_r_intr1___mpu_28___width 1
879#define reg_iop_sw_cpu_r_intr1___mpu_28___bit 12
880#define reg_iop_sw_cpu_r_intr1___mpu_29___lsb 13
881#define reg_iop_sw_cpu_r_intr1___mpu_29___width 1
882#define reg_iop_sw_cpu_r_intr1___mpu_29___bit 13
883#define reg_iop_sw_cpu_r_intr1___mpu_30___lsb 14
884#define reg_iop_sw_cpu_r_intr1___mpu_30___width 1
885#define reg_iop_sw_cpu_r_intr1___mpu_30___bit 14
886#define reg_iop_sw_cpu_r_intr1___mpu_31___lsb 15
887#define reg_iop_sw_cpu_r_intr1___mpu_31___width 1
888#define reg_iop_sw_cpu_r_intr1___mpu_31___bit 15
889#define reg_iop_sw_cpu_r_intr1___spu0_8___lsb 16
890#define reg_iop_sw_cpu_r_intr1___spu0_8___width 1
891#define reg_iop_sw_cpu_r_intr1___spu0_8___bit 16
892#define reg_iop_sw_cpu_r_intr1___spu0_9___lsb 17
893#define reg_iop_sw_cpu_r_intr1___spu0_9___width 1
894#define reg_iop_sw_cpu_r_intr1___spu0_9___bit 17
895#define reg_iop_sw_cpu_r_intr1___spu0_10___lsb 18
896#define reg_iop_sw_cpu_r_intr1___spu0_10___width 1
897#define reg_iop_sw_cpu_r_intr1___spu0_10___bit 18
898#define reg_iop_sw_cpu_r_intr1___spu0_11___lsb 19
899#define reg_iop_sw_cpu_r_intr1___spu0_11___width 1
900#define reg_iop_sw_cpu_r_intr1___spu0_11___bit 19
901#define reg_iop_sw_cpu_r_intr1___spu0_12___lsb 20
902#define reg_iop_sw_cpu_r_intr1___spu0_12___width 1
903#define reg_iop_sw_cpu_r_intr1___spu0_12___bit 20
904#define reg_iop_sw_cpu_r_intr1___spu0_13___lsb 21
905#define reg_iop_sw_cpu_r_intr1___spu0_13___width 1
906#define reg_iop_sw_cpu_r_intr1___spu0_13___bit 21
907#define reg_iop_sw_cpu_r_intr1___spu0_14___lsb 22
908#define reg_iop_sw_cpu_r_intr1___spu0_14___width 1
909#define reg_iop_sw_cpu_r_intr1___spu0_14___bit 22
910#define reg_iop_sw_cpu_r_intr1___spu0_15___lsb 23
911#define reg_iop_sw_cpu_r_intr1___spu0_15___width 1
912#define reg_iop_sw_cpu_r_intr1___spu0_15___bit 23
913#define reg_iop_sw_cpu_r_intr1___spu1_0___lsb 24
914#define reg_iop_sw_cpu_r_intr1___spu1_0___width 1
915#define reg_iop_sw_cpu_r_intr1___spu1_0___bit 24
916#define reg_iop_sw_cpu_r_intr1___spu1_1___lsb 25
917#define reg_iop_sw_cpu_r_intr1___spu1_1___width 1
918#define reg_iop_sw_cpu_r_intr1___spu1_1___bit 25
919#define reg_iop_sw_cpu_r_intr1___spu1_2___lsb 26
920#define reg_iop_sw_cpu_r_intr1___spu1_2___width 1
921#define reg_iop_sw_cpu_r_intr1___spu1_2___bit 26
922#define reg_iop_sw_cpu_r_intr1___spu1_3___lsb 27
923#define reg_iop_sw_cpu_r_intr1___spu1_3___width 1
924#define reg_iop_sw_cpu_r_intr1___spu1_3___bit 27
925#define reg_iop_sw_cpu_r_intr1___spu1_4___lsb 28
926#define reg_iop_sw_cpu_r_intr1___spu1_4___width 1
927#define reg_iop_sw_cpu_r_intr1___spu1_4___bit 28
928#define reg_iop_sw_cpu_r_intr1___spu1_5___lsb 29
929#define reg_iop_sw_cpu_r_intr1___spu1_5___width 1
930#define reg_iop_sw_cpu_r_intr1___spu1_5___bit 29
931#define reg_iop_sw_cpu_r_intr1___spu1_6___lsb 30
932#define reg_iop_sw_cpu_r_intr1___spu1_6___width 1
933#define reg_iop_sw_cpu_r_intr1___spu1_6___bit 30
934#define reg_iop_sw_cpu_r_intr1___spu1_7___lsb 31
935#define reg_iop_sw_cpu_r_intr1___spu1_7___width 1
936#define reg_iop_sw_cpu_r_intr1___spu1_7___bit 31
937#define reg_iop_sw_cpu_r_intr1_offset 108
938
939/* Register r_masked_intr1, scope iop_sw_cpu, type r */
940#define reg_iop_sw_cpu_r_masked_intr1___mpu_16___lsb 0
941#define reg_iop_sw_cpu_r_masked_intr1___mpu_16___width 1
942#define reg_iop_sw_cpu_r_masked_intr1___mpu_16___bit 0
943#define reg_iop_sw_cpu_r_masked_intr1___mpu_17___lsb 1
944#define reg_iop_sw_cpu_r_masked_intr1___mpu_17___width 1
945#define reg_iop_sw_cpu_r_masked_intr1___mpu_17___bit 1
946#define reg_iop_sw_cpu_r_masked_intr1___mpu_18___lsb 2
947#define reg_iop_sw_cpu_r_masked_intr1___mpu_18___width 1
948#define reg_iop_sw_cpu_r_masked_intr1___mpu_18___bit 2
949#define reg_iop_sw_cpu_r_masked_intr1___mpu_19___lsb 3
950#define reg_iop_sw_cpu_r_masked_intr1___mpu_19___width 1
951#define reg_iop_sw_cpu_r_masked_intr1___mpu_19___bit 3
952#define reg_iop_sw_cpu_r_masked_intr1___mpu_20___lsb 4
953#define reg_iop_sw_cpu_r_masked_intr1___mpu_20___width 1
954#define reg_iop_sw_cpu_r_masked_intr1___mpu_20___bit 4
955#define reg_iop_sw_cpu_r_masked_intr1___mpu_21___lsb 5
956#define reg_iop_sw_cpu_r_masked_intr1___mpu_21___width 1
957#define reg_iop_sw_cpu_r_masked_intr1___mpu_21___bit 5
958#define reg_iop_sw_cpu_r_masked_intr1___mpu_22___lsb 6
959#define reg_iop_sw_cpu_r_masked_intr1___mpu_22___width 1
960#define reg_iop_sw_cpu_r_masked_intr1___mpu_22___bit 6
961#define reg_iop_sw_cpu_r_masked_intr1___mpu_23___lsb 7
962#define reg_iop_sw_cpu_r_masked_intr1___mpu_23___width 1
963#define reg_iop_sw_cpu_r_masked_intr1___mpu_23___bit 7
964#define reg_iop_sw_cpu_r_masked_intr1___mpu_24___lsb 8
965#define reg_iop_sw_cpu_r_masked_intr1___mpu_24___width 1
966#define reg_iop_sw_cpu_r_masked_intr1___mpu_24___bit 8
967#define reg_iop_sw_cpu_r_masked_intr1___mpu_25___lsb 9
968#define reg_iop_sw_cpu_r_masked_intr1___mpu_25___width 1
969#define reg_iop_sw_cpu_r_masked_intr1___mpu_25___bit 9
970#define reg_iop_sw_cpu_r_masked_intr1___mpu_26___lsb 10
971#define reg_iop_sw_cpu_r_masked_intr1___mpu_26___width 1
972#define reg_iop_sw_cpu_r_masked_intr1___mpu_26___bit 10
973#define reg_iop_sw_cpu_r_masked_intr1___mpu_27___lsb 11
974#define reg_iop_sw_cpu_r_masked_intr1___mpu_27___width 1
975#define reg_iop_sw_cpu_r_masked_intr1___mpu_27___bit 11
976#define reg_iop_sw_cpu_r_masked_intr1___mpu_28___lsb 12
977#define reg_iop_sw_cpu_r_masked_intr1___mpu_28___width 1
978#define reg_iop_sw_cpu_r_masked_intr1___mpu_28___bit 12
979#define reg_iop_sw_cpu_r_masked_intr1___mpu_29___lsb 13
980#define reg_iop_sw_cpu_r_masked_intr1___mpu_29___width 1
981#define reg_iop_sw_cpu_r_masked_intr1___mpu_29___bit 13
982#define reg_iop_sw_cpu_r_masked_intr1___mpu_30___lsb 14
983#define reg_iop_sw_cpu_r_masked_intr1___mpu_30___width 1
984#define reg_iop_sw_cpu_r_masked_intr1___mpu_30___bit 14
985#define reg_iop_sw_cpu_r_masked_intr1___mpu_31___lsb 15
986#define reg_iop_sw_cpu_r_masked_intr1___mpu_31___width 1
987#define reg_iop_sw_cpu_r_masked_intr1___mpu_31___bit 15
988#define reg_iop_sw_cpu_r_masked_intr1___spu0_8___lsb 16
989#define reg_iop_sw_cpu_r_masked_intr1___spu0_8___width 1
990#define reg_iop_sw_cpu_r_masked_intr1___spu0_8___bit 16
991#define reg_iop_sw_cpu_r_masked_intr1___spu0_9___lsb 17
992#define reg_iop_sw_cpu_r_masked_intr1___spu0_9___width 1
993#define reg_iop_sw_cpu_r_masked_intr1___spu0_9___bit 17
994#define reg_iop_sw_cpu_r_masked_intr1___spu0_10___lsb 18
995#define reg_iop_sw_cpu_r_masked_intr1___spu0_10___width 1
996#define reg_iop_sw_cpu_r_masked_intr1___spu0_10___bit 18
997#define reg_iop_sw_cpu_r_masked_intr1___spu0_11___lsb 19
998#define reg_iop_sw_cpu_r_masked_intr1___spu0_11___width 1
999#define reg_iop_sw_cpu_r_masked_intr1___spu0_11___bit 19
1000#define reg_iop_sw_cpu_r_masked_intr1___spu0_12___lsb 20
1001#define reg_iop_sw_cpu_r_masked_intr1___spu0_12___width 1
1002#define reg_iop_sw_cpu_r_masked_intr1___spu0_12___bit 20
1003#define reg_iop_sw_cpu_r_masked_intr1___spu0_13___lsb 21
1004#define reg_iop_sw_cpu_r_masked_intr1___spu0_13___width 1
1005#define reg_iop_sw_cpu_r_masked_intr1___spu0_13___bit 21
1006#define reg_iop_sw_cpu_r_masked_intr1___spu0_14___lsb 22
1007#define reg_iop_sw_cpu_r_masked_intr1___spu0_14___width 1
1008#define reg_iop_sw_cpu_r_masked_intr1___spu0_14___bit 22
1009#define reg_iop_sw_cpu_r_masked_intr1___spu0_15___lsb 23
1010#define reg_iop_sw_cpu_r_masked_intr1___spu0_15___width 1
1011#define reg_iop_sw_cpu_r_masked_intr1___spu0_15___bit 23
1012#define reg_iop_sw_cpu_r_masked_intr1___spu1_0___lsb 24
1013#define reg_iop_sw_cpu_r_masked_intr1___spu1_0___width 1
1014#define reg_iop_sw_cpu_r_masked_intr1___spu1_0___bit 24
1015#define reg_iop_sw_cpu_r_masked_intr1___spu1_1___lsb 25
1016#define reg_iop_sw_cpu_r_masked_intr1___spu1_1___width 1
1017#define reg_iop_sw_cpu_r_masked_intr1___spu1_1___bit 25
1018#define reg_iop_sw_cpu_r_masked_intr1___spu1_2___lsb 26
1019#define reg_iop_sw_cpu_r_masked_intr1___spu1_2___width 1
1020#define reg_iop_sw_cpu_r_masked_intr1___spu1_2___bit 26
1021#define reg_iop_sw_cpu_r_masked_intr1___spu1_3___lsb 27
1022#define reg_iop_sw_cpu_r_masked_intr1___spu1_3___width 1
1023#define reg_iop_sw_cpu_r_masked_intr1___spu1_3___bit 27
1024#define reg_iop_sw_cpu_r_masked_intr1___spu1_4___lsb 28
1025#define reg_iop_sw_cpu_r_masked_intr1___spu1_4___width 1
1026#define reg_iop_sw_cpu_r_masked_intr1___spu1_4___bit 28
1027#define reg_iop_sw_cpu_r_masked_intr1___spu1_5___lsb 29
1028#define reg_iop_sw_cpu_r_masked_intr1___spu1_5___width 1
1029#define reg_iop_sw_cpu_r_masked_intr1___spu1_5___bit 29
1030#define reg_iop_sw_cpu_r_masked_intr1___spu1_6___lsb 30
1031#define reg_iop_sw_cpu_r_masked_intr1___spu1_6___width 1
1032#define reg_iop_sw_cpu_r_masked_intr1___spu1_6___bit 30
1033#define reg_iop_sw_cpu_r_masked_intr1___spu1_7___lsb 31
1034#define reg_iop_sw_cpu_r_masked_intr1___spu1_7___width 1
1035#define reg_iop_sw_cpu_r_masked_intr1___spu1_7___bit 31
1036#define reg_iop_sw_cpu_r_masked_intr1_offset 112
1037
1038/* Register rw_intr2_mask, scope iop_sw_cpu, type rw */
1039#define reg_iop_sw_cpu_rw_intr2_mask___mpu_0___lsb 0
1040#define reg_iop_sw_cpu_rw_intr2_mask___mpu_0___width 1
1041#define reg_iop_sw_cpu_rw_intr2_mask___mpu_0___bit 0
1042#define reg_iop_sw_cpu_rw_intr2_mask___mpu_1___lsb 1
1043#define reg_iop_sw_cpu_rw_intr2_mask___mpu_1___width 1
1044#define reg_iop_sw_cpu_rw_intr2_mask___mpu_1___bit 1
1045#define reg_iop_sw_cpu_rw_intr2_mask___mpu_2___lsb 2
1046#define reg_iop_sw_cpu_rw_intr2_mask___mpu_2___width 1
1047#define reg_iop_sw_cpu_rw_intr2_mask___mpu_2___bit 2
1048#define reg_iop_sw_cpu_rw_intr2_mask___mpu_3___lsb 3
1049#define reg_iop_sw_cpu_rw_intr2_mask___mpu_3___width 1
1050#define reg_iop_sw_cpu_rw_intr2_mask___mpu_3___bit 3
1051#define reg_iop_sw_cpu_rw_intr2_mask___mpu_4___lsb 4
1052#define reg_iop_sw_cpu_rw_intr2_mask___mpu_4___width 1
1053#define reg_iop_sw_cpu_rw_intr2_mask___mpu_4___bit 4
1054#define reg_iop_sw_cpu_rw_intr2_mask___mpu_5___lsb 5
1055#define reg_iop_sw_cpu_rw_intr2_mask___mpu_5___width 1
1056#define reg_iop_sw_cpu_rw_intr2_mask___mpu_5___bit 5
1057#define reg_iop_sw_cpu_rw_intr2_mask___mpu_6___lsb 6
1058#define reg_iop_sw_cpu_rw_intr2_mask___mpu_6___width 1
1059#define reg_iop_sw_cpu_rw_intr2_mask___mpu_6___bit 6
1060#define reg_iop_sw_cpu_rw_intr2_mask___mpu_7___lsb 7
1061#define reg_iop_sw_cpu_rw_intr2_mask___mpu_7___width 1
1062#define reg_iop_sw_cpu_rw_intr2_mask___mpu_7___bit 7
1063#define reg_iop_sw_cpu_rw_intr2_mask___spu0_0___lsb 8
1064#define reg_iop_sw_cpu_rw_intr2_mask___spu0_0___width 1
1065#define reg_iop_sw_cpu_rw_intr2_mask___spu0_0___bit 8
1066#define reg_iop_sw_cpu_rw_intr2_mask___spu0_1___lsb 9
1067#define reg_iop_sw_cpu_rw_intr2_mask___spu0_1___width 1
1068#define reg_iop_sw_cpu_rw_intr2_mask___spu0_1___bit 9
1069#define reg_iop_sw_cpu_rw_intr2_mask___spu0_2___lsb 10
1070#define reg_iop_sw_cpu_rw_intr2_mask___spu0_2___width 1
1071#define reg_iop_sw_cpu_rw_intr2_mask___spu0_2___bit 10
1072#define reg_iop_sw_cpu_rw_intr2_mask___spu0_3___lsb 11
1073#define reg_iop_sw_cpu_rw_intr2_mask___spu0_3___width 1
1074#define reg_iop_sw_cpu_rw_intr2_mask___spu0_3___bit 11
1075#define reg_iop_sw_cpu_rw_intr2_mask___spu0_4___lsb 12
1076#define reg_iop_sw_cpu_rw_intr2_mask___spu0_4___width 1
1077#define reg_iop_sw_cpu_rw_intr2_mask___spu0_4___bit 12
1078#define reg_iop_sw_cpu_rw_intr2_mask___spu0_5___lsb 13
1079#define reg_iop_sw_cpu_rw_intr2_mask___spu0_5___width 1
1080#define reg_iop_sw_cpu_rw_intr2_mask___spu0_5___bit 13
1081#define reg_iop_sw_cpu_rw_intr2_mask___spu0_6___lsb 14
1082#define reg_iop_sw_cpu_rw_intr2_mask___spu0_6___width 1
1083#define reg_iop_sw_cpu_rw_intr2_mask___spu0_6___bit 14
1084#define reg_iop_sw_cpu_rw_intr2_mask___spu0_7___lsb 15
1085#define reg_iop_sw_cpu_rw_intr2_mask___spu0_7___width 1
1086#define reg_iop_sw_cpu_rw_intr2_mask___spu0_7___bit 15
1087#define reg_iop_sw_cpu_rw_intr2_mask___dmc_in0___lsb 16
1088#define reg_iop_sw_cpu_rw_intr2_mask___dmc_in0___width 1
1089#define reg_iop_sw_cpu_rw_intr2_mask___dmc_in0___bit 16
1090#define reg_iop_sw_cpu_rw_intr2_mask___dmc_out0___lsb 17
1091#define reg_iop_sw_cpu_rw_intr2_mask___dmc_out0___width 1
1092#define reg_iop_sw_cpu_rw_intr2_mask___dmc_out0___bit 17
1093#define reg_iop_sw_cpu_rw_intr2_mask___fifo_in0___lsb 18
1094#define reg_iop_sw_cpu_rw_intr2_mask___fifo_in0___width 1
1095#define reg_iop_sw_cpu_rw_intr2_mask___fifo_in0___bit 18
1096#define reg_iop_sw_cpu_rw_intr2_mask___fifo_out0___lsb 19
1097#define reg_iop_sw_cpu_rw_intr2_mask___fifo_out0___width 1
1098#define reg_iop_sw_cpu_rw_intr2_mask___fifo_out0___bit 19
1099#define reg_iop_sw_cpu_rw_intr2_mask___fifo_in0_extra___lsb 20
1100#define reg_iop_sw_cpu_rw_intr2_mask___fifo_in0_extra___width 1
1101#define reg_iop_sw_cpu_rw_intr2_mask___fifo_in0_extra___bit 20
1102#define reg_iop_sw_cpu_rw_intr2_mask___fifo_out0_extra___lsb 21
1103#define reg_iop_sw_cpu_rw_intr2_mask___fifo_out0_extra___width 1
1104#define reg_iop_sw_cpu_rw_intr2_mask___fifo_out0_extra___bit 21
1105#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp0___lsb 22
1106#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp0___width 1
1107#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp0___bit 22
1108#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp1___lsb 23
1109#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp1___width 1
1110#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp1___bit 23
1111#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp2___lsb 24
1112#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp2___width 1
1113#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp2___bit 24
1114#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp3___lsb 25
1115#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp3___width 1
1116#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp3___bit 25
1117#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp4___lsb 26
1118#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp4___width 1
1119#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp4___bit 26
1120#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp5___lsb 27
1121#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp5___width 1
1122#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp5___bit 27
1123#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp6___lsb 28
1124#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp6___width 1
1125#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp6___bit 28
1126#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp7___lsb 29
1127#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp7___width 1
1128#define reg_iop_sw_cpu_rw_intr2_mask___trigger_grp7___bit 29
1129#define reg_iop_sw_cpu_rw_intr2_mask___timer_grp0___lsb 30
1130#define reg_iop_sw_cpu_rw_intr2_mask___timer_grp0___width 1
1131#define reg_iop_sw_cpu_rw_intr2_mask___timer_grp0___bit 30
1132#define reg_iop_sw_cpu_rw_intr2_mask___timer_grp1___lsb 31
1133#define reg_iop_sw_cpu_rw_intr2_mask___timer_grp1___width 1
1134#define reg_iop_sw_cpu_rw_intr2_mask___timer_grp1___bit 31
1135#define reg_iop_sw_cpu_rw_intr2_mask_offset 116
1136
1137/* Register rw_ack_intr2, scope iop_sw_cpu, type rw */
1138#define reg_iop_sw_cpu_rw_ack_intr2___mpu_0___lsb 0
1139#define reg_iop_sw_cpu_rw_ack_intr2___mpu_0___width 1
1140#define reg_iop_sw_cpu_rw_ack_intr2___mpu_0___bit 0
1141#define reg_iop_sw_cpu_rw_ack_intr2___mpu_1___lsb 1
1142#define reg_iop_sw_cpu_rw_ack_intr2___mpu_1___width 1
1143#define reg_iop_sw_cpu_rw_ack_intr2___mpu_1___bit 1
1144#define reg_iop_sw_cpu_rw_ack_intr2___mpu_2___lsb 2
1145#define reg_iop_sw_cpu_rw_ack_intr2___mpu_2___width 1
1146#define reg_iop_sw_cpu_rw_ack_intr2___mpu_2___bit 2
1147#define reg_iop_sw_cpu_rw_ack_intr2___mpu_3___lsb 3
1148#define reg_iop_sw_cpu_rw_ack_intr2___mpu_3___width 1
1149#define reg_iop_sw_cpu_rw_ack_intr2___mpu_3___bit 3
1150#define reg_iop_sw_cpu_rw_ack_intr2___mpu_4___lsb 4
1151#define reg_iop_sw_cpu_rw_ack_intr2___mpu_4___width 1
1152#define reg_iop_sw_cpu_rw_ack_intr2___mpu_4___bit 4
1153#define reg_iop_sw_cpu_rw_ack_intr2___mpu_5___lsb 5
1154#define reg_iop_sw_cpu_rw_ack_intr2___mpu_5___width 1
1155#define reg_iop_sw_cpu_rw_ack_intr2___mpu_5___bit 5
1156#define reg_iop_sw_cpu_rw_ack_intr2___mpu_6___lsb 6
1157#define reg_iop_sw_cpu_rw_ack_intr2___mpu_6___width 1
1158#define reg_iop_sw_cpu_rw_ack_intr2___mpu_6___bit 6
1159#define reg_iop_sw_cpu_rw_ack_intr2___mpu_7___lsb 7
1160#define reg_iop_sw_cpu_rw_ack_intr2___mpu_7___width 1
1161#define reg_iop_sw_cpu_rw_ack_intr2___mpu_7___bit 7
1162#define reg_iop_sw_cpu_rw_ack_intr2___spu0_0___lsb 8
1163#define reg_iop_sw_cpu_rw_ack_intr2___spu0_0___width 1
1164#define reg_iop_sw_cpu_rw_ack_intr2___spu0_0___bit 8
1165#define reg_iop_sw_cpu_rw_ack_intr2___spu0_1___lsb 9
1166#define reg_iop_sw_cpu_rw_ack_intr2___spu0_1___width 1
1167#define reg_iop_sw_cpu_rw_ack_intr2___spu0_1___bit 9
1168#define reg_iop_sw_cpu_rw_ack_intr2___spu0_2___lsb 10
1169#define reg_iop_sw_cpu_rw_ack_intr2___spu0_2___width 1
1170#define reg_iop_sw_cpu_rw_ack_intr2___spu0_2___bit 10
1171#define reg_iop_sw_cpu_rw_ack_intr2___spu0_3___lsb 11
1172#define reg_iop_sw_cpu_rw_ack_intr2___spu0_3___width 1
1173#define reg_iop_sw_cpu_rw_ack_intr2___spu0_3___bit 11
1174#define reg_iop_sw_cpu_rw_ack_intr2___spu0_4___lsb 12
1175#define reg_iop_sw_cpu_rw_ack_intr2___spu0_4___width 1
1176#define reg_iop_sw_cpu_rw_ack_intr2___spu0_4___bit 12
1177#define reg_iop_sw_cpu_rw_ack_intr2___spu0_5___lsb 13
1178#define reg_iop_sw_cpu_rw_ack_intr2___spu0_5___width 1
1179#define reg_iop_sw_cpu_rw_ack_intr2___spu0_5___bit 13
1180#define reg_iop_sw_cpu_rw_ack_intr2___spu0_6___lsb 14
1181#define reg_iop_sw_cpu_rw_ack_intr2___spu0_6___width 1
1182#define reg_iop_sw_cpu_rw_ack_intr2___spu0_6___bit 14
1183#define reg_iop_sw_cpu_rw_ack_intr2___spu0_7___lsb 15
1184#define reg_iop_sw_cpu_rw_ack_intr2___spu0_7___width 1
1185#define reg_iop_sw_cpu_rw_ack_intr2___spu0_7___bit 15
1186#define reg_iop_sw_cpu_rw_ack_intr2_offset 120
1187
1188/* Register r_intr2, scope iop_sw_cpu, type r */
1189#define reg_iop_sw_cpu_r_intr2___mpu_0___lsb 0
1190#define reg_iop_sw_cpu_r_intr2___mpu_0___width 1
1191#define reg_iop_sw_cpu_r_intr2___mpu_0___bit 0
1192#define reg_iop_sw_cpu_r_intr2___mpu_1___lsb 1
1193#define reg_iop_sw_cpu_r_intr2___mpu_1___width 1
1194#define reg_iop_sw_cpu_r_intr2___mpu_1___bit 1
1195#define reg_iop_sw_cpu_r_intr2___mpu_2___lsb 2
1196#define reg_iop_sw_cpu_r_intr2___mpu_2___width 1
1197#define reg_iop_sw_cpu_r_intr2___mpu_2___bit 2
1198#define reg_iop_sw_cpu_r_intr2___mpu_3___lsb 3
1199#define reg_iop_sw_cpu_r_intr2___mpu_3___width 1
1200#define reg_iop_sw_cpu_r_intr2___mpu_3___bit 3
1201#define reg_iop_sw_cpu_r_intr2___mpu_4___lsb 4
1202#define reg_iop_sw_cpu_r_intr2___mpu_4___width 1
1203#define reg_iop_sw_cpu_r_intr2___mpu_4___bit 4
1204#define reg_iop_sw_cpu_r_intr2___mpu_5___lsb 5
1205#define reg_iop_sw_cpu_r_intr2___mpu_5___width 1
1206#define reg_iop_sw_cpu_r_intr2___mpu_5___bit 5
1207#define reg_iop_sw_cpu_r_intr2___mpu_6___lsb 6
1208#define reg_iop_sw_cpu_r_intr2___mpu_6___width 1
1209#define reg_iop_sw_cpu_r_intr2___mpu_6___bit 6
1210#define reg_iop_sw_cpu_r_intr2___mpu_7___lsb 7
1211#define reg_iop_sw_cpu_r_intr2___mpu_7___width 1
1212#define reg_iop_sw_cpu_r_intr2___mpu_7___bit 7
1213#define reg_iop_sw_cpu_r_intr2___spu0_0___lsb 8
1214#define reg_iop_sw_cpu_r_intr2___spu0_0___width 1
1215#define reg_iop_sw_cpu_r_intr2___spu0_0___bit 8
1216#define reg_iop_sw_cpu_r_intr2___spu0_1___lsb 9
1217#define reg_iop_sw_cpu_r_intr2___spu0_1___width 1
1218#define reg_iop_sw_cpu_r_intr2___spu0_1___bit 9
1219#define reg_iop_sw_cpu_r_intr2___spu0_2___lsb 10
1220#define reg_iop_sw_cpu_r_intr2___spu0_2___width 1
1221#define reg_iop_sw_cpu_r_intr2___spu0_2___bit 10
1222#define reg_iop_sw_cpu_r_intr2___spu0_3___lsb 11
1223#define reg_iop_sw_cpu_r_intr2___spu0_3___width 1
1224#define reg_iop_sw_cpu_r_intr2___spu0_3___bit 11
1225#define reg_iop_sw_cpu_r_intr2___spu0_4___lsb 12
1226#define reg_iop_sw_cpu_r_intr2___spu0_4___width 1
1227#define reg_iop_sw_cpu_r_intr2___spu0_4___bit 12
1228#define reg_iop_sw_cpu_r_intr2___spu0_5___lsb 13
1229#define reg_iop_sw_cpu_r_intr2___spu0_5___width 1
1230#define reg_iop_sw_cpu_r_intr2___spu0_5___bit 13
1231#define reg_iop_sw_cpu_r_intr2___spu0_6___lsb 14
1232#define reg_iop_sw_cpu_r_intr2___spu0_6___width 1
1233#define reg_iop_sw_cpu_r_intr2___spu0_6___bit 14
1234#define reg_iop_sw_cpu_r_intr2___spu0_7___lsb 15
1235#define reg_iop_sw_cpu_r_intr2___spu0_7___width 1
1236#define reg_iop_sw_cpu_r_intr2___spu0_7___bit 15
1237#define reg_iop_sw_cpu_r_intr2___dmc_in0___lsb 16
1238#define reg_iop_sw_cpu_r_intr2___dmc_in0___width 1
1239#define reg_iop_sw_cpu_r_intr2___dmc_in0___bit 16
1240#define reg_iop_sw_cpu_r_intr2___dmc_out0___lsb 17
1241#define reg_iop_sw_cpu_r_intr2___dmc_out0___width 1
1242#define reg_iop_sw_cpu_r_intr2___dmc_out0___bit 17
1243#define reg_iop_sw_cpu_r_intr2___fifo_in0___lsb 18
1244#define reg_iop_sw_cpu_r_intr2___fifo_in0___width 1
1245#define reg_iop_sw_cpu_r_intr2___fifo_in0___bit 18
1246#define reg_iop_sw_cpu_r_intr2___fifo_out0___lsb 19
1247#define reg_iop_sw_cpu_r_intr2___fifo_out0___width 1
1248#define reg_iop_sw_cpu_r_intr2___fifo_out0___bit 19
1249#define reg_iop_sw_cpu_r_intr2___fifo_in0_extra___lsb 20
1250#define reg_iop_sw_cpu_r_intr2___fifo_in0_extra___width 1
1251#define reg_iop_sw_cpu_r_intr2___fifo_in0_extra___bit 20
1252#define reg_iop_sw_cpu_r_intr2___fifo_out0_extra___lsb 21
1253#define reg_iop_sw_cpu_r_intr2___fifo_out0_extra___width 1
1254#define reg_iop_sw_cpu_r_intr2___fifo_out0_extra___bit 21
1255#define reg_iop_sw_cpu_r_intr2___trigger_grp0___lsb 22
1256#define reg_iop_sw_cpu_r_intr2___trigger_grp0___width 1
1257#define reg_iop_sw_cpu_r_intr2___trigger_grp0___bit 22
1258#define reg_iop_sw_cpu_r_intr2___trigger_grp1___lsb 23
1259#define reg_iop_sw_cpu_r_intr2___trigger_grp1___width 1
1260#define reg_iop_sw_cpu_r_intr2___trigger_grp1___bit 23
1261#define reg_iop_sw_cpu_r_intr2___trigger_grp2___lsb 24
1262#define reg_iop_sw_cpu_r_intr2___trigger_grp2___width 1
1263#define reg_iop_sw_cpu_r_intr2___trigger_grp2___bit 24
1264#define reg_iop_sw_cpu_r_intr2___trigger_grp3___lsb 25
1265#define reg_iop_sw_cpu_r_intr2___trigger_grp3___width 1
1266#define reg_iop_sw_cpu_r_intr2___trigger_grp3___bit 25
1267#define reg_iop_sw_cpu_r_intr2___trigger_grp4___lsb 26
1268#define reg_iop_sw_cpu_r_intr2___trigger_grp4___width 1
1269#define reg_iop_sw_cpu_r_intr2___trigger_grp4___bit 26
1270#define reg_iop_sw_cpu_r_intr2___trigger_grp5___lsb 27
1271#define reg_iop_sw_cpu_r_intr2___trigger_grp5___width 1
1272#define reg_iop_sw_cpu_r_intr2___trigger_grp5___bit 27
1273#define reg_iop_sw_cpu_r_intr2___trigger_grp6___lsb 28
1274#define reg_iop_sw_cpu_r_intr2___trigger_grp6___width 1
1275#define reg_iop_sw_cpu_r_intr2___trigger_grp6___bit 28
1276#define reg_iop_sw_cpu_r_intr2___trigger_grp7___lsb 29
1277#define reg_iop_sw_cpu_r_intr2___trigger_grp7___width 1
1278#define reg_iop_sw_cpu_r_intr2___trigger_grp7___bit 29
1279#define reg_iop_sw_cpu_r_intr2___timer_grp0___lsb 30
1280#define reg_iop_sw_cpu_r_intr2___timer_grp0___width 1
1281#define reg_iop_sw_cpu_r_intr2___timer_grp0___bit 30
1282#define reg_iop_sw_cpu_r_intr2___timer_grp1___lsb 31
1283#define reg_iop_sw_cpu_r_intr2___timer_grp1___width 1
1284#define reg_iop_sw_cpu_r_intr2___timer_grp1___bit 31
1285#define reg_iop_sw_cpu_r_intr2_offset 124
1286
1287/* Register r_masked_intr2, scope iop_sw_cpu, type r */
1288#define reg_iop_sw_cpu_r_masked_intr2___mpu_0___lsb 0
1289#define reg_iop_sw_cpu_r_masked_intr2___mpu_0___width 1
1290#define reg_iop_sw_cpu_r_masked_intr2___mpu_0___bit 0
1291#define reg_iop_sw_cpu_r_masked_intr2___mpu_1___lsb 1
1292#define reg_iop_sw_cpu_r_masked_intr2___mpu_1___width 1
1293#define reg_iop_sw_cpu_r_masked_intr2___mpu_1___bit 1
1294#define reg_iop_sw_cpu_r_masked_intr2___mpu_2___lsb 2
1295#define reg_iop_sw_cpu_r_masked_intr2___mpu_2___width 1
1296#define reg_iop_sw_cpu_r_masked_intr2___mpu_2___bit 2
1297#define reg_iop_sw_cpu_r_masked_intr2___mpu_3___lsb 3
1298#define reg_iop_sw_cpu_r_masked_intr2___mpu_3___width 1
1299#define reg_iop_sw_cpu_r_masked_intr2___mpu_3___bit 3
1300#define reg_iop_sw_cpu_r_masked_intr2___mpu_4___lsb 4
1301#define reg_iop_sw_cpu_r_masked_intr2___mpu_4___width 1
1302#define reg_iop_sw_cpu_r_masked_intr2___mpu_4___bit 4
1303#define reg_iop_sw_cpu_r_masked_intr2___mpu_5___lsb 5
1304#define reg_iop_sw_cpu_r_masked_intr2___mpu_5___width 1
1305#define reg_iop_sw_cpu_r_masked_intr2___mpu_5___bit 5
1306#define reg_iop_sw_cpu_r_masked_intr2___mpu_6___lsb 6
1307#define reg_iop_sw_cpu_r_masked_intr2___mpu_6___width 1
1308#define reg_iop_sw_cpu_r_masked_intr2___mpu_6___bit 6
1309#define reg_iop_sw_cpu_r_masked_intr2___mpu_7___lsb 7
1310#define reg_iop_sw_cpu_r_masked_intr2___mpu_7___width 1
1311#define reg_iop_sw_cpu_r_masked_intr2___mpu_7___bit 7
1312#define reg_iop_sw_cpu_r_masked_intr2___spu0_0___lsb 8
1313#define reg_iop_sw_cpu_r_masked_intr2___spu0_0___width 1
1314#define reg_iop_sw_cpu_r_masked_intr2___spu0_0___bit 8
1315#define reg_iop_sw_cpu_r_masked_intr2___spu0_1___lsb 9
1316#define reg_iop_sw_cpu_r_masked_intr2___spu0_1___width 1
1317#define reg_iop_sw_cpu_r_masked_intr2___spu0_1___bit 9
1318#define reg_iop_sw_cpu_r_masked_intr2___spu0_2___lsb 10
1319#define reg_iop_sw_cpu_r_masked_intr2___spu0_2___width 1
1320#define reg_iop_sw_cpu_r_masked_intr2___spu0_2___bit 10
1321#define reg_iop_sw_cpu_r_masked_intr2___spu0_3___lsb 11
1322#define reg_iop_sw_cpu_r_masked_intr2___spu0_3___width 1
1323#define reg_iop_sw_cpu_r_masked_intr2___spu0_3___bit 11
1324#define reg_iop_sw_cpu_r_masked_intr2___spu0_4___lsb 12
1325#define reg_iop_sw_cpu_r_masked_intr2___spu0_4___width 1
1326#define reg_iop_sw_cpu_r_masked_intr2___spu0_4___bit 12
1327#define reg_iop_sw_cpu_r_masked_intr2___spu0_5___lsb 13
1328#define reg_iop_sw_cpu_r_masked_intr2___spu0_5___width 1
1329#define reg_iop_sw_cpu_r_masked_intr2___spu0_5___bit 13
1330#define reg_iop_sw_cpu_r_masked_intr2___spu0_6___lsb 14
1331#define reg_iop_sw_cpu_r_masked_intr2___spu0_6___width 1
1332#define reg_iop_sw_cpu_r_masked_intr2___spu0_6___bit 14
1333#define reg_iop_sw_cpu_r_masked_intr2___spu0_7___lsb 15
1334#define reg_iop_sw_cpu_r_masked_intr2___spu0_7___width 1
1335#define reg_iop_sw_cpu_r_masked_intr2___spu0_7___bit 15
1336#define reg_iop_sw_cpu_r_masked_intr2___dmc_in0___lsb 16
1337#define reg_iop_sw_cpu_r_masked_intr2___dmc_in0___width 1
1338#define reg_iop_sw_cpu_r_masked_intr2___dmc_in0___bit 16
1339#define reg_iop_sw_cpu_r_masked_intr2___dmc_out0___lsb 17
1340#define reg_iop_sw_cpu_r_masked_intr2___dmc_out0___width 1
1341#define reg_iop_sw_cpu_r_masked_intr2___dmc_out0___bit 17
1342#define reg_iop_sw_cpu_r_masked_intr2___fifo_in0___lsb 18
1343#define reg_iop_sw_cpu_r_masked_intr2___fifo_in0___width 1
1344#define reg_iop_sw_cpu_r_masked_intr2___fifo_in0___bit 18
1345#define reg_iop_sw_cpu_r_masked_intr2___fifo_out0___lsb 19
1346#define reg_iop_sw_cpu_r_masked_intr2___fifo_out0___width 1
1347#define reg_iop_sw_cpu_r_masked_intr2___fifo_out0___bit 19
1348#define reg_iop_sw_cpu_r_masked_intr2___fifo_in0_extra___lsb 20
1349#define reg_iop_sw_cpu_r_masked_intr2___fifo_in0_extra___width 1
1350#define reg_iop_sw_cpu_r_masked_intr2___fifo_in0_extra___bit 20
1351#define reg_iop_sw_cpu_r_masked_intr2___fifo_out0_extra___lsb 21
1352#define reg_iop_sw_cpu_r_masked_intr2___fifo_out0_extra___width 1
1353#define reg_iop_sw_cpu_r_masked_intr2___fifo_out0_extra___bit 21
1354#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp0___lsb 22
1355#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp0___width 1
1356#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp0___bit 22
1357#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp1___lsb 23
1358#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp1___width 1
1359#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp1___bit 23
1360#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp2___lsb 24
1361#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp2___width 1
1362#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp2___bit 24
1363#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp3___lsb 25
1364#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp3___width 1
1365#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp3___bit 25
1366#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp4___lsb 26
1367#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp4___width 1
1368#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp4___bit 26
1369#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp5___lsb 27
1370#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp5___width 1
1371#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp5___bit 27
1372#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp6___lsb 28
1373#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp6___width 1
1374#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp6___bit 28
1375#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp7___lsb 29
1376#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp7___width 1
1377#define reg_iop_sw_cpu_r_masked_intr2___trigger_grp7___bit 29
1378#define reg_iop_sw_cpu_r_masked_intr2___timer_grp0___lsb 30
1379#define reg_iop_sw_cpu_r_masked_intr2___timer_grp0___width 1
1380#define reg_iop_sw_cpu_r_masked_intr2___timer_grp0___bit 30
1381#define reg_iop_sw_cpu_r_masked_intr2___timer_grp1___lsb 31
1382#define reg_iop_sw_cpu_r_masked_intr2___timer_grp1___width 1
1383#define reg_iop_sw_cpu_r_masked_intr2___timer_grp1___bit 31
1384#define reg_iop_sw_cpu_r_masked_intr2_offset 128
1385
1386/* Register rw_intr3_mask, scope iop_sw_cpu, type rw */
1387#define reg_iop_sw_cpu_rw_intr3_mask___mpu_16___lsb 0
1388#define reg_iop_sw_cpu_rw_intr3_mask___mpu_16___width 1
1389#define reg_iop_sw_cpu_rw_intr3_mask___mpu_16___bit 0
1390#define reg_iop_sw_cpu_rw_intr3_mask___mpu_17___lsb 1
1391#define reg_iop_sw_cpu_rw_intr3_mask___mpu_17___width 1
1392#define reg_iop_sw_cpu_rw_intr3_mask___mpu_17___bit 1
1393#define reg_iop_sw_cpu_rw_intr3_mask___mpu_18___lsb 2
1394#define reg_iop_sw_cpu_rw_intr3_mask___mpu_18___width 1
1395#define reg_iop_sw_cpu_rw_intr3_mask___mpu_18___bit 2
1396#define reg_iop_sw_cpu_rw_intr3_mask___mpu_19___lsb 3
1397#define reg_iop_sw_cpu_rw_intr3_mask___mpu_19___width 1
1398#define reg_iop_sw_cpu_rw_intr3_mask___mpu_19___bit 3
1399#define reg_iop_sw_cpu_rw_intr3_mask___mpu_20___lsb 4
1400#define reg_iop_sw_cpu_rw_intr3_mask___mpu_20___width 1
1401#define reg_iop_sw_cpu_rw_intr3_mask___mpu_20___bit 4
1402#define reg_iop_sw_cpu_rw_intr3_mask___mpu_21___lsb 5
1403#define reg_iop_sw_cpu_rw_intr3_mask___mpu_21___width 1
1404#define reg_iop_sw_cpu_rw_intr3_mask___mpu_21___bit 5
1405#define reg_iop_sw_cpu_rw_intr3_mask___mpu_22___lsb 6
1406#define reg_iop_sw_cpu_rw_intr3_mask___mpu_22___width 1
1407#define reg_iop_sw_cpu_rw_intr3_mask___mpu_22___bit 6
1408#define reg_iop_sw_cpu_rw_intr3_mask___mpu_23___lsb 7
1409#define reg_iop_sw_cpu_rw_intr3_mask___mpu_23___width 1
1410#define reg_iop_sw_cpu_rw_intr3_mask___mpu_23___bit 7
1411#define reg_iop_sw_cpu_rw_intr3_mask___spu1_0___lsb 8
1412#define reg_iop_sw_cpu_rw_intr3_mask___spu1_0___width 1
1413#define reg_iop_sw_cpu_rw_intr3_mask___spu1_0___bit 8
1414#define reg_iop_sw_cpu_rw_intr3_mask___spu1_1___lsb 9
1415#define reg_iop_sw_cpu_rw_intr3_mask___spu1_1___width 1
1416#define reg_iop_sw_cpu_rw_intr3_mask___spu1_1___bit 9
1417#define reg_iop_sw_cpu_rw_intr3_mask___spu1_2___lsb 10
1418#define reg_iop_sw_cpu_rw_intr3_mask___spu1_2___width 1
1419#define reg_iop_sw_cpu_rw_intr3_mask___spu1_2___bit 10
1420#define reg_iop_sw_cpu_rw_intr3_mask___spu1_3___lsb 11
1421#define reg_iop_sw_cpu_rw_intr3_mask___spu1_3___width 1
1422#define reg_iop_sw_cpu_rw_intr3_mask___spu1_3___bit 11
1423#define reg_iop_sw_cpu_rw_intr3_mask___spu1_4___lsb 12
1424#define reg_iop_sw_cpu_rw_intr3_mask___spu1_4___width 1
1425#define reg_iop_sw_cpu_rw_intr3_mask___spu1_4___bit 12
1426#define reg_iop_sw_cpu_rw_intr3_mask___spu1_5___lsb 13
1427#define reg_iop_sw_cpu_rw_intr3_mask___spu1_5___width 1
1428#define reg_iop_sw_cpu_rw_intr3_mask___spu1_5___bit 13
1429#define reg_iop_sw_cpu_rw_intr3_mask___spu1_6___lsb 14
1430#define reg_iop_sw_cpu_rw_intr3_mask___spu1_6___width 1
1431#define reg_iop_sw_cpu_rw_intr3_mask___spu1_6___bit 14
1432#define reg_iop_sw_cpu_rw_intr3_mask___spu1_7___lsb 15
1433#define reg_iop_sw_cpu_rw_intr3_mask___spu1_7___width 1
1434#define reg_iop_sw_cpu_rw_intr3_mask___spu1_7___bit 15
1435#define reg_iop_sw_cpu_rw_intr3_mask___dmc_in1___lsb 16
1436#define reg_iop_sw_cpu_rw_intr3_mask___dmc_in1___width 1
1437#define reg_iop_sw_cpu_rw_intr3_mask___dmc_in1___bit 16
1438#define reg_iop_sw_cpu_rw_intr3_mask___dmc_out1___lsb 17
1439#define reg_iop_sw_cpu_rw_intr3_mask___dmc_out1___width 1
1440#define reg_iop_sw_cpu_rw_intr3_mask___dmc_out1___bit 17
1441#define reg_iop_sw_cpu_rw_intr3_mask___fifo_in1___lsb 18
1442#define reg_iop_sw_cpu_rw_intr3_mask___fifo_in1___width 1
1443#define reg_iop_sw_cpu_rw_intr3_mask___fifo_in1___bit 18
1444#define reg_iop_sw_cpu_rw_intr3_mask___fifo_out1___lsb 19
1445#define reg_iop_sw_cpu_rw_intr3_mask___fifo_out1___width 1
1446#define reg_iop_sw_cpu_rw_intr3_mask___fifo_out1___bit 19
1447#define reg_iop_sw_cpu_rw_intr3_mask___fifo_in1_extra___lsb 20
1448#define reg_iop_sw_cpu_rw_intr3_mask___fifo_in1_extra___width 1
1449#define reg_iop_sw_cpu_rw_intr3_mask___fifo_in1_extra___bit 20
1450#define reg_iop_sw_cpu_rw_intr3_mask___fifo_out1_extra___lsb 21
1451#define reg_iop_sw_cpu_rw_intr3_mask___fifo_out1_extra___width 1
1452#define reg_iop_sw_cpu_rw_intr3_mask___fifo_out1_extra___bit 21
1453#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp0___lsb 22
1454#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp0___width 1
1455#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp0___bit 22
1456#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp1___lsb 23
1457#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp1___width 1
1458#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp1___bit 23
1459#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp2___lsb 24
1460#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp2___width 1
1461#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp2___bit 24
1462#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp3___lsb 25
1463#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp3___width 1
1464#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp3___bit 25
1465#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp4___lsb 26
1466#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp4___width 1
1467#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp4___bit 26
1468#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp5___lsb 27
1469#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp5___width 1
1470#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp5___bit 27
1471#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp6___lsb 28
1472#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp6___width 1
1473#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp6___bit 28
1474#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp7___lsb 29
1475#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp7___width 1
1476#define reg_iop_sw_cpu_rw_intr3_mask___trigger_grp7___bit 29
1477#define reg_iop_sw_cpu_rw_intr3_mask___timer_grp2___lsb 30
1478#define reg_iop_sw_cpu_rw_intr3_mask___timer_grp2___width 1
1479#define reg_iop_sw_cpu_rw_intr3_mask___timer_grp2___bit 30
1480#define reg_iop_sw_cpu_rw_intr3_mask___timer_grp3___lsb 31
1481#define reg_iop_sw_cpu_rw_intr3_mask___timer_grp3___width 1
1482#define reg_iop_sw_cpu_rw_intr3_mask___timer_grp3___bit 31
1483#define reg_iop_sw_cpu_rw_intr3_mask_offset 132
1484
1485/* Register rw_ack_intr3, scope iop_sw_cpu, type rw */
1486#define reg_iop_sw_cpu_rw_ack_intr3___mpu_16___lsb 0
1487#define reg_iop_sw_cpu_rw_ack_intr3___mpu_16___width 1
1488#define reg_iop_sw_cpu_rw_ack_intr3___mpu_16___bit 0
1489#define reg_iop_sw_cpu_rw_ack_intr3___mpu_17___lsb 1
1490#define reg_iop_sw_cpu_rw_ack_intr3___mpu_17___width 1
1491#define reg_iop_sw_cpu_rw_ack_intr3___mpu_17___bit 1
1492#define reg_iop_sw_cpu_rw_ack_intr3___mpu_18___lsb 2
1493#define reg_iop_sw_cpu_rw_ack_intr3___mpu_18___width 1
1494#define reg_iop_sw_cpu_rw_ack_intr3___mpu_18___bit 2
1495#define reg_iop_sw_cpu_rw_ack_intr3___mpu_19___lsb 3
1496#define reg_iop_sw_cpu_rw_ack_intr3___mpu_19___width 1
1497#define reg_iop_sw_cpu_rw_ack_intr3___mpu_19___bit 3
1498#define reg_iop_sw_cpu_rw_ack_intr3___mpu_20___lsb 4
1499#define reg_iop_sw_cpu_rw_ack_intr3___mpu_20___width 1
1500#define reg_iop_sw_cpu_rw_ack_intr3___mpu_20___bit 4
1501#define reg_iop_sw_cpu_rw_ack_intr3___mpu_21___lsb 5
1502#define reg_iop_sw_cpu_rw_ack_intr3___mpu_21___width 1
1503#define reg_iop_sw_cpu_rw_ack_intr3___mpu_21___bit 5
1504#define reg_iop_sw_cpu_rw_ack_intr3___mpu_22___lsb 6
1505#define reg_iop_sw_cpu_rw_ack_intr3___mpu_22___width 1
1506#define reg_iop_sw_cpu_rw_ack_intr3___mpu_22___bit 6
1507#define reg_iop_sw_cpu_rw_ack_intr3___mpu_23___lsb 7
1508#define reg_iop_sw_cpu_rw_ack_intr3___mpu_23___width 1
1509#define reg_iop_sw_cpu_rw_ack_intr3___mpu_23___bit 7
1510#define reg_iop_sw_cpu_rw_ack_intr3___spu1_0___lsb 8
1511#define reg_iop_sw_cpu_rw_ack_intr3___spu1_0___width 1
1512#define reg_iop_sw_cpu_rw_ack_intr3___spu1_0___bit 8
1513#define reg_iop_sw_cpu_rw_ack_intr3___spu1_1___lsb 9
1514#define reg_iop_sw_cpu_rw_ack_intr3___spu1_1___width 1
1515#define reg_iop_sw_cpu_rw_ack_intr3___spu1_1___bit 9
1516#define reg_iop_sw_cpu_rw_ack_intr3___spu1_2___lsb 10
1517#define reg_iop_sw_cpu_rw_ack_intr3___spu1_2___width 1
1518#define reg_iop_sw_cpu_rw_ack_intr3___spu1_2___bit 10
1519#define reg_iop_sw_cpu_rw_ack_intr3___spu1_3___lsb 11
1520#define reg_iop_sw_cpu_rw_ack_intr3___spu1_3___width 1
1521#define reg_iop_sw_cpu_rw_ack_intr3___spu1_3___bit 11
1522#define reg_iop_sw_cpu_rw_ack_intr3___spu1_4___lsb 12
1523#define reg_iop_sw_cpu_rw_ack_intr3___spu1_4___width 1
1524#define reg_iop_sw_cpu_rw_ack_intr3___spu1_4___bit 12
1525#define reg_iop_sw_cpu_rw_ack_intr3___spu1_5___lsb 13
1526#define reg_iop_sw_cpu_rw_ack_intr3___spu1_5___width 1
1527#define reg_iop_sw_cpu_rw_ack_intr3___spu1_5___bit 13
1528#define reg_iop_sw_cpu_rw_ack_intr3___spu1_6___lsb 14
1529#define reg_iop_sw_cpu_rw_ack_intr3___spu1_6___width 1
1530#define reg_iop_sw_cpu_rw_ack_intr3___spu1_6___bit 14
1531#define reg_iop_sw_cpu_rw_ack_intr3___spu1_7___lsb 15
1532#define reg_iop_sw_cpu_rw_ack_intr3___spu1_7___width 1
1533#define reg_iop_sw_cpu_rw_ack_intr3___spu1_7___bit 15
1534#define reg_iop_sw_cpu_rw_ack_intr3_offset 136
1535
1536/* Register r_intr3, scope iop_sw_cpu, type r */
1537#define reg_iop_sw_cpu_r_intr3___mpu_16___lsb 0
1538#define reg_iop_sw_cpu_r_intr3___mpu_16___width 1
1539#define reg_iop_sw_cpu_r_intr3___mpu_16___bit 0
1540#define reg_iop_sw_cpu_r_intr3___mpu_17___lsb 1
1541#define reg_iop_sw_cpu_r_intr3___mpu_17___width 1
1542#define reg_iop_sw_cpu_r_intr3___mpu_17___bit 1
1543#define reg_iop_sw_cpu_r_intr3___mpu_18___lsb 2
1544#define reg_iop_sw_cpu_r_intr3___mpu_18___width 1
1545#define reg_iop_sw_cpu_r_intr3___mpu_18___bit 2
1546#define reg_iop_sw_cpu_r_intr3___mpu_19___lsb 3
1547#define reg_iop_sw_cpu_r_intr3___mpu_19___width 1
1548#define reg_iop_sw_cpu_r_intr3___mpu_19___bit 3
1549#define reg_iop_sw_cpu_r_intr3___mpu_20___lsb 4
1550#define reg_iop_sw_cpu_r_intr3___mpu_20___width 1
1551#define reg_iop_sw_cpu_r_intr3___mpu_20___bit 4
1552#define reg_iop_sw_cpu_r_intr3___mpu_21___lsb 5
1553#define reg_iop_sw_cpu_r_intr3___mpu_21___width 1
1554#define reg_iop_sw_cpu_r_intr3___mpu_21___bit 5
1555#define reg_iop_sw_cpu_r_intr3___mpu_22___lsb 6
1556#define reg_iop_sw_cpu_r_intr3___mpu_22___width 1
1557#define reg_iop_sw_cpu_r_intr3___mpu_22___bit 6
1558#define reg_iop_sw_cpu_r_intr3___mpu_23___lsb 7
1559#define reg_iop_sw_cpu_r_intr3___mpu_23___width 1
1560#define reg_iop_sw_cpu_r_intr3___mpu_23___bit 7
1561#define reg_iop_sw_cpu_r_intr3___spu1_0___lsb 8
1562#define reg_iop_sw_cpu_r_intr3___spu1_0___width 1
1563#define reg_iop_sw_cpu_r_intr3___spu1_0___bit 8
1564#define reg_iop_sw_cpu_r_intr3___spu1_1___lsb 9
1565#define reg_iop_sw_cpu_r_intr3___spu1_1___width 1
1566#define reg_iop_sw_cpu_r_intr3___spu1_1___bit 9
1567#define reg_iop_sw_cpu_r_intr3___spu1_2___lsb 10
1568#define reg_iop_sw_cpu_r_intr3___spu1_2___width 1
1569#define reg_iop_sw_cpu_r_intr3___spu1_2___bit 10
1570#define reg_iop_sw_cpu_r_intr3___spu1_3___lsb 11
1571#define reg_iop_sw_cpu_r_intr3___spu1_3___width 1
1572#define reg_iop_sw_cpu_r_intr3___spu1_3___bit 11
1573#define reg_iop_sw_cpu_r_intr3___spu1_4___lsb 12
1574#define reg_iop_sw_cpu_r_intr3___spu1_4___width 1
1575#define reg_iop_sw_cpu_r_intr3___spu1_4___bit 12
1576#define reg_iop_sw_cpu_r_intr3___spu1_5___lsb 13
1577#define reg_iop_sw_cpu_r_intr3___spu1_5___width 1
1578#define reg_iop_sw_cpu_r_intr3___spu1_5___bit 13
1579#define reg_iop_sw_cpu_r_intr3___spu1_6___lsb 14
1580#define reg_iop_sw_cpu_r_intr3___spu1_6___width 1
1581#define reg_iop_sw_cpu_r_intr3___spu1_6___bit 14
1582#define reg_iop_sw_cpu_r_intr3___spu1_7___lsb 15
1583#define reg_iop_sw_cpu_r_intr3___spu1_7___width 1
1584#define reg_iop_sw_cpu_r_intr3___spu1_7___bit 15
1585#define reg_iop_sw_cpu_r_intr3___dmc_in1___lsb 16
1586#define reg_iop_sw_cpu_r_intr3___dmc_in1___width 1
1587#define reg_iop_sw_cpu_r_intr3___dmc_in1___bit 16
1588#define reg_iop_sw_cpu_r_intr3___dmc_out1___lsb 17
1589#define reg_iop_sw_cpu_r_intr3___dmc_out1___width 1
1590#define reg_iop_sw_cpu_r_intr3___dmc_out1___bit 17
1591#define reg_iop_sw_cpu_r_intr3___fifo_in1___lsb 18
1592#define reg_iop_sw_cpu_r_intr3___fifo_in1___width 1
1593#define reg_iop_sw_cpu_r_intr3___fifo_in1___bit 18
1594#define reg_iop_sw_cpu_r_intr3___fifo_out1___lsb 19
1595#define reg_iop_sw_cpu_r_intr3___fifo_out1___width 1
1596#define reg_iop_sw_cpu_r_intr3___fifo_out1___bit 19
1597#define reg_iop_sw_cpu_r_intr3___fifo_in1_extra___lsb 20
1598#define reg_iop_sw_cpu_r_intr3___fifo_in1_extra___width 1
1599#define reg_iop_sw_cpu_r_intr3___fifo_in1_extra___bit 20
1600#define reg_iop_sw_cpu_r_intr3___fifo_out1_extra___lsb 21
1601#define reg_iop_sw_cpu_r_intr3___fifo_out1_extra___width 1
1602#define reg_iop_sw_cpu_r_intr3___fifo_out1_extra___bit 21
1603#define reg_iop_sw_cpu_r_intr3___trigger_grp0___lsb 22
1604#define reg_iop_sw_cpu_r_intr3___trigger_grp0___width 1
1605#define reg_iop_sw_cpu_r_intr3___trigger_grp0___bit 22
1606#define reg_iop_sw_cpu_r_intr3___trigger_grp1___lsb 23
1607#define reg_iop_sw_cpu_r_intr3___trigger_grp1___width 1
1608#define reg_iop_sw_cpu_r_intr3___trigger_grp1___bit 23
1609#define reg_iop_sw_cpu_r_intr3___trigger_grp2___lsb 24
1610#define reg_iop_sw_cpu_r_intr3___trigger_grp2___width 1
1611#define reg_iop_sw_cpu_r_intr3___trigger_grp2___bit 24
1612#define reg_iop_sw_cpu_r_intr3___trigger_grp3___lsb 25
1613#define reg_iop_sw_cpu_r_intr3___trigger_grp3___width 1
1614#define reg_iop_sw_cpu_r_intr3___trigger_grp3___bit 25
1615#define reg_iop_sw_cpu_r_intr3___trigger_grp4___lsb 26
1616#define reg_iop_sw_cpu_r_intr3___trigger_grp4___width 1
1617#define reg_iop_sw_cpu_r_intr3___trigger_grp4___bit 26
1618#define reg_iop_sw_cpu_r_intr3___trigger_grp5___lsb 27
1619#define reg_iop_sw_cpu_r_intr3___trigger_grp5___width 1
1620#define reg_iop_sw_cpu_r_intr3___trigger_grp5___bit 27
1621#define reg_iop_sw_cpu_r_intr3___trigger_grp6___lsb 28
1622#define reg_iop_sw_cpu_r_intr3___trigger_grp6___width 1
1623#define reg_iop_sw_cpu_r_intr3___trigger_grp6___bit 28
1624#define reg_iop_sw_cpu_r_intr3___trigger_grp7___lsb 29
1625#define reg_iop_sw_cpu_r_intr3___trigger_grp7___width 1
1626#define reg_iop_sw_cpu_r_intr3___trigger_grp7___bit 29
1627#define reg_iop_sw_cpu_r_intr3___timer_grp2___lsb 30
1628#define reg_iop_sw_cpu_r_intr3___timer_grp2___width 1
1629#define reg_iop_sw_cpu_r_intr3___timer_grp2___bit 30
1630#define reg_iop_sw_cpu_r_intr3___timer_grp3___lsb 31
1631#define reg_iop_sw_cpu_r_intr3___timer_grp3___width 1
1632#define reg_iop_sw_cpu_r_intr3___timer_grp3___bit 31
1633#define reg_iop_sw_cpu_r_intr3_offset 140
1634
1635/* Register r_masked_intr3, scope iop_sw_cpu, type r */
1636#define reg_iop_sw_cpu_r_masked_intr3___mpu_16___lsb 0
1637#define reg_iop_sw_cpu_r_masked_intr3___mpu_16___width 1
1638#define reg_iop_sw_cpu_r_masked_intr3___mpu_16___bit 0
1639#define reg_iop_sw_cpu_r_masked_intr3___mpu_17___lsb 1
1640#define reg_iop_sw_cpu_r_masked_intr3___mpu_17___width 1
1641#define reg_iop_sw_cpu_r_masked_intr3___mpu_17___bit 1
1642#define reg_iop_sw_cpu_r_masked_intr3___mpu_18___lsb 2
1643#define reg_iop_sw_cpu_r_masked_intr3___mpu_18___width 1
1644#define reg_iop_sw_cpu_r_masked_intr3___mpu_18___bit 2
1645#define reg_iop_sw_cpu_r_masked_intr3___mpu_19___lsb 3
1646#define reg_iop_sw_cpu_r_masked_intr3___mpu_19___width 1
1647#define reg_iop_sw_cpu_r_masked_intr3___mpu_19___bit 3
1648#define reg_iop_sw_cpu_r_masked_intr3___mpu_20___lsb 4
1649#define reg_iop_sw_cpu_r_masked_intr3___mpu_20___width 1
1650#define reg_iop_sw_cpu_r_masked_intr3___mpu_20___bit 4
1651#define reg_iop_sw_cpu_r_masked_intr3___mpu_21___lsb 5
1652#define reg_iop_sw_cpu_r_masked_intr3___mpu_21___width 1
1653#define reg_iop_sw_cpu_r_masked_intr3___mpu_21___bit 5
1654#define reg_iop_sw_cpu_r_masked_intr3___mpu_22___lsb 6
1655#define reg_iop_sw_cpu_r_masked_intr3___mpu_22___width 1
1656#define reg_iop_sw_cpu_r_masked_intr3___mpu_22___bit 6
1657#define reg_iop_sw_cpu_r_masked_intr3___mpu_23___lsb 7
1658#define reg_iop_sw_cpu_r_masked_intr3___mpu_23___width 1
1659#define reg_iop_sw_cpu_r_masked_intr3___mpu_23___bit 7
1660#define reg_iop_sw_cpu_r_masked_intr3___spu1_0___lsb 8
1661#define reg_iop_sw_cpu_r_masked_intr3___spu1_0___width 1
1662#define reg_iop_sw_cpu_r_masked_intr3___spu1_0___bit 8
1663#define reg_iop_sw_cpu_r_masked_intr3___spu1_1___lsb 9
1664#define reg_iop_sw_cpu_r_masked_intr3___spu1_1___width 1
1665#define reg_iop_sw_cpu_r_masked_intr3___spu1_1___bit 9
1666#define reg_iop_sw_cpu_r_masked_intr3___spu1_2___lsb 10
1667#define reg_iop_sw_cpu_r_masked_intr3___spu1_2___width 1
1668#define reg_iop_sw_cpu_r_masked_intr3___spu1_2___bit 10
1669#define reg_iop_sw_cpu_r_masked_intr3___spu1_3___lsb 11
1670#define reg_iop_sw_cpu_r_masked_intr3___spu1_3___width 1
1671#define reg_iop_sw_cpu_r_masked_intr3___spu1_3___bit 11
1672#define reg_iop_sw_cpu_r_masked_intr3___spu1_4___lsb 12
1673#define reg_iop_sw_cpu_r_masked_intr3___spu1_4___width 1
1674#define reg_iop_sw_cpu_r_masked_intr3___spu1_4___bit 12
1675#define reg_iop_sw_cpu_r_masked_intr3___spu1_5___lsb 13
1676#define reg_iop_sw_cpu_r_masked_intr3___spu1_5___width 1
1677#define reg_iop_sw_cpu_r_masked_intr3___spu1_5___bit 13
1678#define reg_iop_sw_cpu_r_masked_intr3___spu1_6___lsb 14
1679#define reg_iop_sw_cpu_r_masked_intr3___spu1_6___width 1
1680#define reg_iop_sw_cpu_r_masked_intr3___spu1_6___bit 14
1681#define reg_iop_sw_cpu_r_masked_intr3___spu1_7___lsb 15
1682#define reg_iop_sw_cpu_r_masked_intr3___spu1_7___width 1
1683#define reg_iop_sw_cpu_r_masked_intr3___spu1_7___bit 15
1684#define reg_iop_sw_cpu_r_masked_intr3___dmc_in1___lsb 16
1685#define reg_iop_sw_cpu_r_masked_intr3___dmc_in1___width 1
1686#define reg_iop_sw_cpu_r_masked_intr3___dmc_in1___bit 16
1687#define reg_iop_sw_cpu_r_masked_intr3___dmc_out1___lsb 17
1688#define reg_iop_sw_cpu_r_masked_intr3___dmc_out1___width 1
1689#define reg_iop_sw_cpu_r_masked_intr3___dmc_out1___bit 17
1690#define reg_iop_sw_cpu_r_masked_intr3___fifo_in1___lsb 18
1691#define reg_iop_sw_cpu_r_masked_intr3___fifo_in1___width 1
1692#define reg_iop_sw_cpu_r_masked_intr3___fifo_in1___bit 18
1693#define reg_iop_sw_cpu_r_masked_intr3___fifo_out1___lsb 19
1694#define reg_iop_sw_cpu_r_masked_intr3___fifo_out1___width 1
1695#define reg_iop_sw_cpu_r_masked_intr3___fifo_out1___bit 19
1696#define reg_iop_sw_cpu_r_masked_intr3___fifo_in1_extra___lsb 20
1697#define reg_iop_sw_cpu_r_masked_intr3___fifo_in1_extra___width 1
1698#define reg_iop_sw_cpu_r_masked_intr3___fifo_in1_extra___bit 20
1699#define reg_iop_sw_cpu_r_masked_intr3___fifo_out1_extra___lsb 21
1700#define reg_iop_sw_cpu_r_masked_intr3___fifo_out1_extra___width 1
1701#define reg_iop_sw_cpu_r_masked_intr3___fifo_out1_extra___bit 21
1702#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp0___lsb 22
1703#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp0___width 1
1704#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp0___bit 22
1705#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp1___lsb 23
1706#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp1___width 1
1707#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp1___bit 23
1708#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp2___lsb 24
1709#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp2___width 1
1710#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp2___bit 24
1711#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp3___lsb 25
1712#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp3___width 1
1713#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp3___bit 25
1714#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp4___lsb 26
1715#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp4___width 1
1716#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp4___bit 26
1717#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp5___lsb 27
1718#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp5___width 1
1719#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp5___bit 27
1720#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp6___lsb 28
1721#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp6___width 1
1722#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp6___bit 28
1723#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp7___lsb 29
1724#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp7___width 1
1725#define reg_iop_sw_cpu_r_masked_intr3___trigger_grp7___bit 29
1726#define reg_iop_sw_cpu_r_masked_intr3___timer_grp2___lsb 30
1727#define reg_iop_sw_cpu_r_masked_intr3___timer_grp2___width 1
1728#define reg_iop_sw_cpu_r_masked_intr3___timer_grp2___bit 30
1729#define reg_iop_sw_cpu_r_masked_intr3___timer_grp3___lsb 31
1730#define reg_iop_sw_cpu_r_masked_intr3___timer_grp3___width 1
1731#define reg_iop_sw_cpu_r_masked_intr3___timer_grp3___bit 31
1732#define reg_iop_sw_cpu_r_masked_intr3_offset 144
1733
1734
1735/* Constants */
1736#define regk_iop_sw_cpu_copy 0x00000000
1737#define regk_iop_sw_cpu_no 0x00000000
1738#define regk_iop_sw_cpu_rd 0x00000002
1739#define regk_iop_sw_cpu_reg_copy 0x00000001
1740#define regk_iop_sw_cpu_rw_bus0_clr_mask_default 0x00000000
1741#define regk_iop_sw_cpu_rw_bus0_oe_clr_mask_default 0x00000000
1742#define regk_iop_sw_cpu_rw_bus0_oe_set_mask_default 0x00000000
1743#define regk_iop_sw_cpu_rw_bus0_set_mask_default 0x00000000
1744#define regk_iop_sw_cpu_rw_bus1_clr_mask_default 0x00000000
1745#define regk_iop_sw_cpu_rw_bus1_oe_clr_mask_default 0x00000000
1746#define regk_iop_sw_cpu_rw_bus1_oe_set_mask_default 0x00000000
1747#define regk_iop_sw_cpu_rw_bus1_set_mask_default 0x00000000
1748#define regk_iop_sw_cpu_rw_gio_clr_mask_default 0x00000000
1749#define regk_iop_sw_cpu_rw_gio_oe_clr_mask_default 0x00000000
1750#define regk_iop_sw_cpu_rw_gio_oe_set_mask_default 0x00000000
1751#define regk_iop_sw_cpu_rw_gio_set_mask_default 0x00000000
1752#define regk_iop_sw_cpu_rw_intr0_mask_default 0x00000000
1753#define regk_iop_sw_cpu_rw_intr1_mask_default 0x00000000
1754#define regk_iop_sw_cpu_rw_intr2_mask_default 0x00000000
1755#define regk_iop_sw_cpu_rw_intr3_mask_default 0x00000000
1756#define regk_iop_sw_cpu_wr 0x00000003
1757#define regk_iop_sw_cpu_yes 0x00000001
1758#endif /* __iop_sw_cpu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_mpu_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
deleted file mode 100644
index ee7dc0435b59..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
+++ /dev/null
@@ -1,1776 +0,0 @@
1#ifndef __iop_sw_mpu_defs_asm_h
2#define __iop_sw_mpu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_mpu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_sw_mpu_defs_asm.h ../../inst/io_proc/rtl/guinness/iop_sw_mpu.r
11 * id: $Id: iop_sw_mpu_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_sw_cfg_owner, scope iop_sw_mpu, type rw */
57#define reg_iop_sw_mpu_rw_sw_cfg_owner___cfg___lsb 0
58#define reg_iop_sw_mpu_rw_sw_cfg_owner___cfg___width 2
59#define reg_iop_sw_mpu_rw_sw_cfg_owner_offset 0
60
61/* Register rw_mc_ctrl, scope iop_sw_mpu, type rw */
62#define reg_iop_sw_mpu_rw_mc_ctrl___keep_owner___lsb 0
63#define reg_iop_sw_mpu_rw_mc_ctrl___keep_owner___width 1
64#define reg_iop_sw_mpu_rw_mc_ctrl___keep_owner___bit 0
65#define reg_iop_sw_mpu_rw_mc_ctrl___cmd___lsb 1
66#define reg_iop_sw_mpu_rw_mc_ctrl___cmd___width 2
67#define reg_iop_sw_mpu_rw_mc_ctrl___size___lsb 3
68#define reg_iop_sw_mpu_rw_mc_ctrl___size___width 3
69#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu0_mem___lsb 6
70#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu0_mem___width 1
71#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu0_mem___bit 6
72#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu1_mem___lsb 7
73#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu1_mem___width 1
74#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu1_mem___bit 7
75#define reg_iop_sw_mpu_rw_mc_ctrl_offset 4
76
77/* Register rw_mc_data, scope iop_sw_mpu, type rw */
78#define reg_iop_sw_mpu_rw_mc_data___val___lsb 0
79#define reg_iop_sw_mpu_rw_mc_data___val___width 32
80#define reg_iop_sw_mpu_rw_mc_data_offset 8
81
82/* Register rw_mc_addr, scope iop_sw_mpu, type rw */
83#define reg_iop_sw_mpu_rw_mc_addr_offset 12
84
85/* Register rs_mc_data, scope iop_sw_mpu, type rs */
86#define reg_iop_sw_mpu_rs_mc_data_offset 16
87
88/* Register r_mc_data, scope iop_sw_mpu, type r */
89#define reg_iop_sw_mpu_r_mc_data_offset 20
90
91/* Register r_mc_stat, scope iop_sw_mpu, type r */
92#define reg_iop_sw_mpu_r_mc_stat___busy_cpu___lsb 0
93#define reg_iop_sw_mpu_r_mc_stat___busy_cpu___width 1
94#define reg_iop_sw_mpu_r_mc_stat___busy_cpu___bit 0
95#define reg_iop_sw_mpu_r_mc_stat___busy_mpu___lsb 1
96#define reg_iop_sw_mpu_r_mc_stat___busy_mpu___width 1
97#define reg_iop_sw_mpu_r_mc_stat___busy_mpu___bit 1
98#define reg_iop_sw_mpu_r_mc_stat___busy_spu0___lsb 2
99#define reg_iop_sw_mpu_r_mc_stat___busy_spu0___width 1
100#define reg_iop_sw_mpu_r_mc_stat___busy_spu0___bit 2
101#define reg_iop_sw_mpu_r_mc_stat___busy_spu1___lsb 3
102#define reg_iop_sw_mpu_r_mc_stat___busy_spu1___width 1
103#define reg_iop_sw_mpu_r_mc_stat___busy_spu1___bit 3
104#define reg_iop_sw_mpu_r_mc_stat___owned_by_cpu___lsb 4
105#define reg_iop_sw_mpu_r_mc_stat___owned_by_cpu___width 1
106#define reg_iop_sw_mpu_r_mc_stat___owned_by_cpu___bit 4
107#define reg_iop_sw_mpu_r_mc_stat___owned_by_mpu___lsb 5
108#define reg_iop_sw_mpu_r_mc_stat___owned_by_mpu___width 1
109#define reg_iop_sw_mpu_r_mc_stat___owned_by_mpu___bit 5
110#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu0___lsb 6
111#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu0___width 1
112#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu0___bit 6
113#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu1___lsb 7
114#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu1___width 1
115#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu1___bit 7
116#define reg_iop_sw_mpu_r_mc_stat_offset 24
117
118/* Register rw_bus0_clr_mask, scope iop_sw_mpu, type rw */
119#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte0___lsb 0
120#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte0___width 8
121#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte1___lsb 8
122#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte1___width 8
123#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte2___lsb 16
124#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte2___width 8
125#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte3___lsb 24
126#define reg_iop_sw_mpu_rw_bus0_clr_mask___byte3___width 8
127#define reg_iop_sw_mpu_rw_bus0_clr_mask_offset 28
128
129/* Register rw_bus0_set_mask, scope iop_sw_mpu, type rw */
130#define reg_iop_sw_mpu_rw_bus0_set_mask___byte0___lsb 0
131#define reg_iop_sw_mpu_rw_bus0_set_mask___byte0___width 8
132#define reg_iop_sw_mpu_rw_bus0_set_mask___byte1___lsb 8
133#define reg_iop_sw_mpu_rw_bus0_set_mask___byte1___width 8
134#define reg_iop_sw_mpu_rw_bus0_set_mask___byte2___lsb 16
135#define reg_iop_sw_mpu_rw_bus0_set_mask___byte2___width 8
136#define reg_iop_sw_mpu_rw_bus0_set_mask___byte3___lsb 24
137#define reg_iop_sw_mpu_rw_bus0_set_mask___byte3___width 8
138#define reg_iop_sw_mpu_rw_bus0_set_mask_offset 32
139
140/* Register rw_bus0_oe_clr_mask, scope iop_sw_mpu, type rw */
141#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte0___lsb 0
142#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte0___width 1
143#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte0___bit 0
144#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte1___lsb 1
145#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte1___width 1
146#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte1___bit 1
147#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte2___lsb 2
148#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte2___width 1
149#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte2___bit 2
150#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte3___lsb 3
151#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte3___width 1
152#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask___byte3___bit 3
153#define reg_iop_sw_mpu_rw_bus0_oe_clr_mask_offset 36
154
155/* Register rw_bus0_oe_set_mask, scope iop_sw_mpu, type rw */
156#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte0___lsb 0
157#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte0___width 1
158#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte0___bit 0
159#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte1___lsb 1
160#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte1___width 1
161#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte1___bit 1
162#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte2___lsb 2
163#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte2___width 1
164#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte2___bit 2
165#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte3___lsb 3
166#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte3___width 1
167#define reg_iop_sw_mpu_rw_bus0_oe_set_mask___byte3___bit 3
168#define reg_iop_sw_mpu_rw_bus0_oe_set_mask_offset 40
169
170/* Register r_bus0_in, scope iop_sw_mpu, type r */
171#define reg_iop_sw_mpu_r_bus0_in_offset 44
172
173/* Register rw_bus1_clr_mask, scope iop_sw_mpu, type rw */
174#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte0___lsb 0
175#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte0___width 8
176#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte1___lsb 8
177#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte1___width 8
178#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte2___lsb 16
179#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte2___width 8
180#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte3___lsb 24
181#define reg_iop_sw_mpu_rw_bus1_clr_mask___byte3___width 8
182#define reg_iop_sw_mpu_rw_bus1_clr_mask_offset 48
183
184/* Register rw_bus1_set_mask, scope iop_sw_mpu, type rw */
185#define reg_iop_sw_mpu_rw_bus1_set_mask___byte0___lsb 0
186#define reg_iop_sw_mpu_rw_bus1_set_mask___byte0___width 8
187#define reg_iop_sw_mpu_rw_bus1_set_mask___byte1___lsb 8
188#define reg_iop_sw_mpu_rw_bus1_set_mask___byte1___width 8
189#define reg_iop_sw_mpu_rw_bus1_set_mask___byte2___lsb 16
190#define reg_iop_sw_mpu_rw_bus1_set_mask___byte2___width 8
191#define reg_iop_sw_mpu_rw_bus1_set_mask___byte3___lsb 24
192#define reg_iop_sw_mpu_rw_bus1_set_mask___byte3___width 8
193#define reg_iop_sw_mpu_rw_bus1_set_mask_offset 52
194
195/* Register rw_bus1_oe_clr_mask, scope iop_sw_mpu, type rw */
196#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte0___lsb 0
197#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte0___width 1
198#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte0___bit 0
199#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte1___lsb 1
200#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte1___width 1
201#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte1___bit 1
202#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte2___lsb 2
203#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte2___width 1
204#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte2___bit 2
205#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte3___lsb 3
206#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte3___width 1
207#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask___byte3___bit 3
208#define reg_iop_sw_mpu_rw_bus1_oe_clr_mask_offset 56
209
210/* Register rw_bus1_oe_set_mask, scope iop_sw_mpu, type rw */
211#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte0___lsb 0
212#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte0___width 1
213#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte0___bit 0
214#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte1___lsb 1
215#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte1___width 1
216#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte1___bit 1
217#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte2___lsb 2
218#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte2___width 1
219#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte2___bit 2
220#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte3___lsb 3
221#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte3___width 1
222#define reg_iop_sw_mpu_rw_bus1_oe_set_mask___byte3___bit 3
223#define reg_iop_sw_mpu_rw_bus1_oe_set_mask_offset 60
224
225/* Register r_bus1_in, scope iop_sw_mpu, type r */
226#define reg_iop_sw_mpu_r_bus1_in_offset 64
227
228/* Register rw_gio_clr_mask, scope iop_sw_mpu, type rw */
229#define reg_iop_sw_mpu_rw_gio_clr_mask___val___lsb 0
230#define reg_iop_sw_mpu_rw_gio_clr_mask___val___width 32
231#define reg_iop_sw_mpu_rw_gio_clr_mask_offset 68
232
233/* Register rw_gio_set_mask, scope iop_sw_mpu, type rw */
234#define reg_iop_sw_mpu_rw_gio_set_mask___val___lsb 0
235#define reg_iop_sw_mpu_rw_gio_set_mask___val___width 32
236#define reg_iop_sw_mpu_rw_gio_set_mask_offset 72
237
238/* Register rw_gio_oe_clr_mask, scope iop_sw_mpu, type rw */
239#define reg_iop_sw_mpu_rw_gio_oe_clr_mask___val___lsb 0
240#define reg_iop_sw_mpu_rw_gio_oe_clr_mask___val___width 32
241#define reg_iop_sw_mpu_rw_gio_oe_clr_mask_offset 76
242
243/* Register rw_gio_oe_set_mask, scope iop_sw_mpu, type rw */
244#define reg_iop_sw_mpu_rw_gio_oe_set_mask___val___lsb 0
245#define reg_iop_sw_mpu_rw_gio_oe_set_mask___val___width 32
246#define reg_iop_sw_mpu_rw_gio_oe_set_mask_offset 80
247
248/* Register r_gio_in, scope iop_sw_mpu, type r */
249#define reg_iop_sw_mpu_r_gio_in_offset 84
250
251/* Register rw_cpu_intr, scope iop_sw_mpu, type rw */
252#define reg_iop_sw_mpu_rw_cpu_intr___intr0___lsb 0
253#define reg_iop_sw_mpu_rw_cpu_intr___intr0___width 1
254#define reg_iop_sw_mpu_rw_cpu_intr___intr0___bit 0
255#define reg_iop_sw_mpu_rw_cpu_intr___intr1___lsb 1
256#define reg_iop_sw_mpu_rw_cpu_intr___intr1___width 1
257#define reg_iop_sw_mpu_rw_cpu_intr___intr1___bit 1
258#define reg_iop_sw_mpu_rw_cpu_intr___intr2___lsb 2
259#define reg_iop_sw_mpu_rw_cpu_intr___intr2___width 1
260#define reg_iop_sw_mpu_rw_cpu_intr___intr2___bit 2
261#define reg_iop_sw_mpu_rw_cpu_intr___intr3___lsb 3
262#define reg_iop_sw_mpu_rw_cpu_intr___intr3___width 1
263#define reg_iop_sw_mpu_rw_cpu_intr___intr3___bit 3
264#define reg_iop_sw_mpu_rw_cpu_intr___intr4___lsb 4
265#define reg_iop_sw_mpu_rw_cpu_intr___intr4___width 1
266#define reg_iop_sw_mpu_rw_cpu_intr___intr4___bit 4
267#define reg_iop_sw_mpu_rw_cpu_intr___intr5___lsb 5
268#define reg_iop_sw_mpu_rw_cpu_intr___intr5___width 1
269#define reg_iop_sw_mpu_rw_cpu_intr___intr5___bit 5
270#define reg_iop_sw_mpu_rw_cpu_intr___intr6___lsb 6
271#define reg_iop_sw_mpu_rw_cpu_intr___intr6___width 1
272#define reg_iop_sw_mpu_rw_cpu_intr___intr6___bit 6
273#define reg_iop_sw_mpu_rw_cpu_intr___intr7___lsb 7
274#define reg_iop_sw_mpu_rw_cpu_intr___intr7___width 1
275#define reg_iop_sw_mpu_rw_cpu_intr___intr7___bit 7
276#define reg_iop_sw_mpu_rw_cpu_intr___intr8___lsb 8
277#define reg_iop_sw_mpu_rw_cpu_intr___intr8___width 1
278#define reg_iop_sw_mpu_rw_cpu_intr___intr8___bit 8
279#define reg_iop_sw_mpu_rw_cpu_intr___intr9___lsb 9
280#define reg_iop_sw_mpu_rw_cpu_intr___intr9___width 1
281#define reg_iop_sw_mpu_rw_cpu_intr___intr9___bit 9
282#define reg_iop_sw_mpu_rw_cpu_intr___intr10___lsb 10
283#define reg_iop_sw_mpu_rw_cpu_intr___intr10___width 1
284#define reg_iop_sw_mpu_rw_cpu_intr___intr10___bit 10
285#define reg_iop_sw_mpu_rw_cpu_intr___intr11___lsb 11
286#define reg_iop_sw_mpu_rw_cpu_intr___intr11___width 1
287#define reg_iop_sw_mpu_rw_cpu_intr___intr11___bit 11
288#define reg_iop_sw_mpu_rw_cpu_intr___intr12___lsb 12
289#define reg_iop_sw_mpu_rw_cpu_intr___intr12___width 1
290#define reg_iop_sw_mpu_rw_cpu_intr___intr12___bit 12
291#define reg_iop_sw_mpu_rw_cpu_intr___intr13___lsb 13
292#define reg_iop_sw_mpu_rw_cpu_intr___intr13___width 1
293#define reg_iop_sw_mpu_rw_cpu_intr___intr13___bit 13
294#define reg_iop_sw_mpu_rw_cpu_intr___intr14___lsb 14
295#define reg_iop_sw_mpu_rw_cpu_intr___intr14___width 1
296#define reg_iop_sw_mpu_rw_cpu_intr___intr14___bit 14
297#define reg_iop_sw_mpu_rw_cpu_intr___intr15___lsb 15
298#define reg_iop_sw_mpu_rw_cpu_intr___intr15___width 1
299#define reg_iop_sw_mpu_rw_cpu_intr___intr15___bit 15
300#define reg_iop_sw_mpu_rw_cpu_intr___intr16___lsb 16
301#define reg_iop_sw_mpu_rw_cpu_intr___intr16___width 1
302#define reg_iop_sw_mpu_rw_cpu_intr___intr16___bit 16
303#define reg_iop_sw_mpu_rw_cpu_intr___intr17___lsb 17
304#define reg_iop_sw_mpu_rw_cpu_intr___intr17___width 1
305#define reg_iop_sw_mpu_rw_cpu_intr___intr17___bit 17
306#define reg_iop_sw_mpu_rw_cpu_intr___intr18___lsb 18
307#define reg_iop_sw_mpu_rw_cpu_intr___intr18___width 1
308#define reg_iop_sw_mpu_rw_cpu_intr___intr18___bit 18
309#define reg_iop_sw_mpu_rw_cpu_intr___intr19___lsb 19
310#define reg_iop_sw_mpu_rw_cpu_intr___intr19___width 1
311#define reg_iop_sw_mpu_rw_cpu_intr___intr19___bit 19
312#define reg_iop_sw_mpu_rw_cpu_intr___intr20___lsb 20
313#define reg_iop_sw_mpu_rw_cpu_intr___intr20___width 1
314#define reg_iop_sw_mpu_rw_cpu_intr___intr20___bit 20
315#define reg_iop_sw_mpu_rw_cpu_intr___intr21___lsb 21
316#define reg_iop_sw_mpu_rw_cpu_intr___intr21___width 1
317#define reg_iop_sw_mpu_rw_cpu_intr___intr21___bit 21
318#define reg_iop_sw_mpu_rw_cpu_intr___intr22___lsb 22
319#define reg_iop_sw_mpu_rw_cpu_intr___intr22___width 1
320#define reg_iop_sw_mpu_rw_cpu_intr___intr22___bit 22
321#define reg_iop_sw_mpu_rw_cpu_intr___intr23___lsb 23
322#define reg_iop_sw_mpu_rw_cpu_intr___intr23___width 1
323#define reg_iop_sw_mpu_rw_cpu_intr___intr23___bit 23
324#define reg_iop_sw_mpu_rw_cpu_intr___intr24___lsb 24
325#define reg_iop_sw_mpu_rw_cpu_intr___intr24___width 1
326#define reg_iop_sw_mpu_rw_cpu_intr___intr24___bit 24
327#define reg_iop_sw_mpu_rw_cpu_intr___intr25___lsb 25
328#define reg_iop_sw_mpu_rw_cpu_intr___intr25___width 1
329#define reg_iop_sw_mpu_rw_cpu_intr___intr25___bit 25
330#define reg_iop_sw_mpu_rw_cpu_intr___intr26___lsb 26
331#define reg_iop_sw_mpu_rw_cpu_intr___intr26___width 1
332#define reg_iop_sw_mpu_rw_cpu_intr___intr26___bit 26
333#define reg_iop_sw_mpu_rw_cpu_intr___intr27___lsb 27
334#define reg_iop_sw_mpu_rw_cpu_intr___intr27___width 1
335#define reg_iop_sw_mpu_rw_cpu_intr___intr27___bit 27
336#define reg_iop_sw_mpu_rw_cpu_intr___intr28___lsb 28
337#define reg_iop_sw_mpu_rw_cpu_intr___intr28___width 1
338#define reg_iop_sw_mpu_rw_cpu_intr___intr28___bit 28
339#define reg_iop_sw_mpu_rw_cpu_intr___intr29___lsb 29
340#define reg_iop_sw_mpu_rw_cpu_intr___intr29___width 1
341#define reg_iop_sw_mpu_rw_cpu_intr___intr29___bit 29
342#define reg_iop_sw_mpu_rw_cpu_intr___intr30___lsb 30
343#define reg_iop_sw_mpu_rw_cpu_intr___intr30___width 1
344#define reg_iop_sw_mpu_rw_cpu_intr___intr30___bit 30
345#define reg_iop_sw_mpu_rw_cpu_intr___intr31___lsb 31
346#define reg_iop_sw_mpu_rw_cpu_intr___intr31___width 1
347#define reg_iop_sw_mpu_rw_cpu_intr___intr31___bit 31
348#define reg_iop_sw_mpu_rw_cpu_intr_offset 88
349
350/* Register r_cpu_intr, scope iop_sw_mpu, type r */
351#define reg_iop_sw_mpu_r_cpu_intr___intr0___lsb 0
352#define reg_iop_sw_mpu_r_cpu_intr___intr0___width 1
353#define reg_iop_sw_mpu_r_cpu_intr___intr0___bit 0
354#define reg_iop_sw_mpu_r_cpu_intr___intr1___lsb 1
355#define reg_iop_sw_mpu_r_cpu_intr___intr1___width 1
356#define reg_iop_sw_mpu_r_cpu_intr___intr1___bit 1
357#define reg_iop_sw_mpu_r_cpu_intr___intr2___lsb 2
358#define reg_iop_sw_mpu_r_cpu_intr___intr2___width 1
359#define reg_iop_sw_mpu_r_cpu_intr___intr2___bit 2
360#define reg_iop_sw_mpu_r_cpu_intr___intr3___lsb 3
361#define reg_iop_sw_mpu_r_cpu_intr___intr3___width 1
362#define reg_iop_sw_mpu_r_cpu_intr___intr3___bit 3
363#define reg_iop_sw_mpu_r_cpu_intr___intr4___lsb 4
364#define reg_iop_sw_mpu_r_cpu_intr___intr4___width 1
365#define reg_iop_sw_mpu_r_cpu_intr___intr4___bit 4
366#define reg_iop_sw_mpu_r_cpu_intr___intr5___lsb 5
367#define reg_iop_sw_mpu_r_cpu_intr___intr5___width 1
368#define reg_iop_sw_mpu_r_cpu_intr___intr5___bit 5
369#define reg_iop_sw_mpu_r_cpu_intr___intr6___lsb 6
370#define reg_iop_sw_mpu_r_cpu_intr___intr6___width 1
371#define reg_iop_sw_mpu_r_cpu_intr___intr6___bit 6
372#define reg_iop_sw_mpu_r_cpu_intr___intr7___lsb 7
373#define reg_iop_sw_mpu_r_cpu_intr___intr7___width 1
374#define reg_iop_sw_mpu_r_cpu_intr___intr7___bit 7
375#define reg_iop_sw_mpu_r_cpu_intr___intr8___lsb 8
376#define reg_iop_sw_mpu_r_cpu_intr___intr8___width 1
377#define reg_iop_sw_mpu_r_cpu_intr___intr8___bit 8
378#define reg_iop_sw_mpu_r_cpu_intr___intr9___lsb 9
379#define reg_iop_sw_mpu_r_cpu_intr___intr9___width 1
380#define reg_iop_sw_mpu_r_cpu_intr___intr9___bit 9
381#define reg_iop_sw_mpu_r_cpu_intr___intr10___lsb 10
382#define reg_iop_sw_mpu_r_cpu_intr___intr10___width 1
383#define reg_iop_sw_mpu_r_cpu_intr___intr10___bit 10
384#define reg_iop_sw_mpu_r_cpu_intr___intr11___lsb 11
385#define reg_iop_sw_mpu_r_cpu_intr___intr11___width 1
386#define reg_iop_sw_mpu_r_cpu_intr___intr11___bit 11
387#define reg_iop_sw_mpu_r_cpu_intr___intr12___lsb 12
388#define reg_iop_sw_mpu_r_cpu_intr___intr12___width 1
389#define reg_iop_sw_mpu_r_cpu_intr___intr12___bit 12
390#define reg_iop_sw_mpu_r_cpu_intr___intr13___lsb 13
391#define reg_iop_sw_mpu_r_cpu_intr___intr13___width 1
392#define reg_iop_sw_mpu_r_cpu_intr___intr13___bit 13
393#define reg_iop_sw_mpu_r_cpu_intr___intr14___lsb 14
394#define reg_iop_sw_mpu_r_cpu_intr___intr14___width 1
395#define reg_iop_sw_mpu_r_cpu_intr___intr14___bit 14
396#define reg_iop_sw_mpu_r_cpu_intr___intr15___lsb 15
397#define reg_iop_sw_mpu_r_cpu_intr___intr15___width 1
398#define reg_iop_sw_mpu_r_cpu_intr___intr15___bit 15
399#define reg_iop_sw_mpu_r_cpu_intr___intr16___lsb 16
400#define reg_iop_sw_mpu_r_cpu_intr___intr16___width 1
401#define reg_iop_sw_mpu_r_cpu_intr___intr16___bit 16
402#define reg_iop_sw_mpu_r_cpu_intr___intr17___lsb 17
403#define reg_iop_sw_mpu_r_cpu_intr___intr17___width 1
404#define reg_iop_sw_mpu_r_cpu_intr___intr17___bit 17
405#define reg_iop_sw_mpu_r_cpu_intr___intr18___lsb 18
406#define reg_iop_sw_mpu_r_cpu_intr___intr18___width 1
407#define reg_iop_sw_mpu_r_cpu_intr___intr18___bit 18
408#define reg_iop_sw_mpu_r_cpu_intr___intr19___lsb 19
409#define reg_iop_sw_mpu_r_cpu_intr___intr19___width 1
410#define reg_iop_sw_mpu_r_cpu_intr___intr19___bit 19
411#define reg_iop_sw_mpu_r_cpu_intr___intr20___lsb 20
412#define reg_iop_sw_mpu_r_cpu_intr___intr20___width 1
413#define reg_iop_sw_mpu_r_cpu_intr___intr20___bit 20
414#define reg_iop_sw_mpu_r_cpu_intr___intr21___lsb 21
415#define reg_iop_sw_mpu_r_cpu_intr___intr21___width 1
416#define reg_iop_sw_mpu_r_cpu_intr___intr21___bit 21
417#define reg_iop_sw_mpu_r_cpu_intr___intr22___lsb 22
418#define reg_iop_sw_mpu_r_cpu_intr___intr22___width 1
419#define reg_iop_sw_mpu_r_cpu_intr___intr22___bit 22
420#define reg_iop_sw_mpu_r_cpu_intr___intr23___lsb 23
421#define reg_iop_sw_mpu_r_cpu_intr___intr23___width 1
422#define reg_iop_sw_mpu_r_cpu_intr___intr23___bit 23
423#define reg_iop_sw_mpu_r_cpu_intr___intr24___lsb 24
424#define reg_iop_sw_mpu_r_cpu_intr___intr24___width 1
425#define reg_iop_sw_mpu_r_cpu_intr___intr24___bit 24
426#define reg_iop_sw_mpu_r_cpu_intr___intr25___lsb 25
427#define reg_iop_sw_mpu_r_cpu_intr___intr25___width 1
428#define reg_iop_sw_mpu_r_cpu_intr___intr25___bit 25
429#define reg_iop_sw_mpu_r_cpu_intr___intr26___lsb 26
430#define reg_iop_sw_mpu_r_cpu_intr___intr26___width 1
431#define reg_iop_sw_mpu_r_cpu_intr___intr26___bit 26
432#define reg_iop_sw_mpu_r_cpu_intr___intr27___lsb 27
433#define reg_iop_sw_mpu_r_cpu_intr___intr27___width 1
434#define reg_iop_sw_mpu_r_cpu_intr___intr27___bit 27
435#define reg_iop_sw_mpu_r_cpu_intr___intr28___lsb 28
436#define reg_iop_sw_mpu_r_cpu_intr___intr28___width 1
437#define reg_iop_sw_mpu_r_cpu_intr___intr28___bit 28
438#define reg_iop_sw_mpu_r_cpu_intr___intr29___lsb 29
439#define reg_iop_sw_mpu_r_cpu_intr___intr29___width 1
440#define reg_iop_sw_mpu_r_cpu_intr___intr29___bit 29
441#define reg_iop_sw_mpu_r_cpu_intr___intr30___lsb 30
442#define reg_iop_sw_mpu_r_cpu_intr___intr30___width 1
443#define reg_iop_sw_mpu_r_cpu_intr___intr30___bit 30
444#define reg_iop_sw_mpu_r_cpu_intr___intr31___lsb 31
445#define reg_iop_sw_mpu_r_cpu_intr___intr31___width 1
446#define reg_iop_sw_mpu_r_cpu_intr___intr31___bit 31
447#define reg_iop_sw_mpu_r_cpu_intr_offset 92
448
449/* Register rw_intr_grp0_mask, scope iop_sw_mpu, type rw */
450#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr0___lsb 0
451#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr0___width 1
452#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr0___bit 0
453#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr0___lsb 1
454#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr0___width 1
455#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr0___bit 1
456#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp0___lsb 2
457#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp0___width 1
458#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp0___bit 2
459#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp4___lsb 3
460#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp4___width 1
461#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp4___bit 3
462#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp0___lsb 4
463#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp0___width 1
464#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp0___bit 4
465#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out0___lsb 5
466#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out0___width 1
467#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out0___bit 5
468#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out0_extra___lsb 6
469#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out0_extra___width 1
470#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out0_extra___bit 6
471#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out0___lsb 7
472#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out0___width 1
473#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out0___bit 7
474#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr1___lsb 8
475#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr1___width 1
476#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr1___bit 8
477#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr1___lsb 9
478#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr1___width 1
479#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr1___bit 9
480#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp1___lsb 10
481#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp1___width 1
482#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp1___bit 10
483#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp5___lsb 11
484#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp5___width 1
485#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp5___bit 11
486#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp1___lsb 12
487#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp1___width 1
488#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp1___bit 12
489#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in0___lsb 13
490#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in0___width 1
491#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in0___bit 13
492#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in0_extra___lsb 14
493#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in0_extra___width 1
494#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in0_extra___bit 14
495#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in0___lsb 15
496#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in0___width 1
497#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in0___bit 15
498#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr2___lsb 16
499#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr2___width 1
500#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr2___bit 16
501#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr2___lsb 17
502#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr2___width 1
503#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr2___bit 17
504#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp2___lsb 18
505#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp2___width 1
506#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp2___bit 18
507#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp6___lsb 19
508#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp6___width 1
509#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp6___bit 19
510#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp2___lsb 20
511#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp2___width 1
512#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp2___bit 20
513#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out1___lsb 21
514#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out1___width 1
515#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out1___bit 21
516#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out1_extra___lsb 22
517#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out1_extra___width 1
518#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out1_extra___bit 22
519#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out1___lsb 23
520#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out1___width 1
521#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out1___bit 23
522#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr3___lsb 24
523#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr3___width 1
524#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu0_intr3___bit 24
525#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr3___lsb 25
526#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr3___width 1
527#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu1_intr3___bit 25
528#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp3___lsb 26
529#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp3___width 1
530#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp3___bit 26
531#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp7___lsb 27
532#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp7___width 1
533#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp7___bit 27
534#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp3___lsb 28
535#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp3___width 1
536#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp3___bit 28
537#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in1___lsb 29
538#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in1___width 1
539#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in1___bit 29
540#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in1_extra___lsb 30
541#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in1_extra___width 1
542#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in1_extra___bit 30
543#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in1___lsb 31
544#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in1___width 1
545#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in1___bit 31
546#define reg_iop_sw_mpu_rw_intr_grp0_mask_offset 96
547
548/* Register rw_ack_intr_grp0, scope iop_sw_mpu, type rw */
549#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr0___lsb 0
550#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr0___width 1
551#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr0___bit 0
552#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr0___lsb 1
553#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr0___width 1
554#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr0___bit 1
555#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr1___lsb 8
556#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr1___width 1
557#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr1___bit 8
558#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr1___lsb 9
559#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr1___width 1
560#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr1___bit 9
561#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr2___lsb 16
562#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr2___width 1
563#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr2___bit 16
564#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr2___lsb 17
565#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr2___width 1
566#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr2___bit 17
567#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr3___lsb 24
568#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr3___width 1
569#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu0_intr3___bit 24
570#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr3___lsb 25
571#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr3___width 1
572#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu1_intr3___bit 25
573#define reg_iop_sw_mpu_rw_ack_intr_grp0_offset 100
574
575/* Register r_intr_grp0, scope iop_sw_mpu, type r */
576#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr0___lsb 0
577#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr0___width 1
578#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr0___bit 0
579#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr0___lsb 1
580#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr0___width 1
581#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr0___bit 1
582#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp0___lsb 2
583#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp0___width 1
584#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp0___bit 2
585#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp4___lsb 3
586#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp4___width 1
587#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp4___bit 3
588#define reg_iop_sw_mpu_r_intr_grp0___timer_grp0___lsb 4
589#define reg_iop_sw_mpu_r_intr_grp0___timer_grp0___width 1
590#define reg_iop_sw_mpu_r_intr_grp0___timer_grp0___bit 4
591#define reg_iop_sw_mpu_r_intr_grp0___fifo_out0___lsb 5
592#define reg_iop_sw_mpu_r_intr_grp0___fifo_out0___width 1
593#define reg_iop_sw_mpu_r_intr_grp0___fifo_out0___bit 5
594#define reg_iop_sw_mpu_r_intr_grp0___fifo_out0_extra___lsb 6
595#define reg_iop_sw_mpu_r_intr_grp0___fifo_out0_extra___width 1
596#define reg_iop_sw_mpu_r_intr_grp0___fifo_out0_extra___bit 6
597#define reg_iop_sw_mpu_r_intr_grp0___dmc_out0___lsb 7
598#define reg_iop_sw_mpu_r_intr_grp0___dmc_out0___width 1
599#define reg_iop_sw_mpu_r_intr_grp0___dmc_out0___bit 7
600#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr1___lsb 8
601#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr1___width 1
602#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr1___bit 8
603#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr1___lsb 9
604#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr1___width 1
605#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr1___bit 9
606#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp1___lsb 10
607#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp1___width 1
608#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp1___bit 10
609#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp5___lsb 11
610#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp5___width 1
611#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp5___bit 11
612#define reg_iop_sw_mpu_r_intr_grp0___timer_grp1___lsb 12
613#define reg_iop_sw_mpu_r_intr_grp0___timer_grp1___width 1
614#define reg_iop_sw_mpu_r_intr_grp0___timer_grp1___bit 12
615#define reg_iop_sw_mpu_r_intr_grp0___fifo_in0___lsb 13
616#define reg_iop_sw_mpu_r_intr_grp0___fifo_in0___width 1
617#define reg_iop_sw_mpu_r_intr_grp0___fifo_in0___bit 13
618#define reg_iop_sw_mpu_r_intr_grp0___fifo_in0_extra___lsb 14
619#define reg_iop_sw_mpu_r_intr_grp0___fifo_in0_extra___width 1
620#define reg_iop_sw_mpu_r_intr_grp0___fifo_in0_extra___bit 14
621#define reg_iop_sw_mpu_r_intr_grp0___dmc_in0___lsb 15
622#define reg_iop_sw_mpu_r_intr_grp0___dmc_in0___width 1
623#define reg_iop_sw_mpu_r_intr_grp0___dmc_in0___bit 15
624#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr2___lsb 16
625#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr2___width 1
626#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr2___bit 16
627#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr2___lsb 17
628#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr2___width 1
629#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr2___bit 17
630#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp2___lsb 18
631#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp2___width 1
632#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp2___bit 18
633#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp6___lsb 19
634#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp6___width 1
635#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp6___bit 19
636#define reg_iop_sw_mpu_r_intr_grp0___timer_grp2___lsb 20
637#define reg_iop_sw_mpu_r_intr_grp0___timer_grp2___width 1
638#define reg_iop_sw_mpu_r_intr_grp0___timer_grp2___bit 20
639#define reg_iop_sw_mpu_r_intr_grp0___fifo_out1___lsb 21
640#define reg_iop_sw_mpu_r_intr_grp0___fifo_out1___width 1
641#define reg_iop_sw_mpu_r_intr_grp0___fifo_out1___bit 21
642#define reg_iop_sw_mpu_r_intr_grp0___fifo_out1_extra___lsb 22
643#define reg_iop_sw_mpu_r_intr_grp0___fifo_out1_extra___width 1
644#define reg_iop_sw_mpu_r_intr_grp0___fifo_out1_extra___bit 22
645#define reg_iop_sw_mpu_r_intr_grp0___dmc_out1___lsb 23
646#define reg_iop_sw_mpu_r_intr_grp0___dmc_out1___width 1
647#define reg_iop_sw_mpu_r_intr_grp0___dmc_out1___bit 23
648#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr3___lsb 24
649#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr3___width 1
650#define reg_iop_sw_mpu_r_intr_grp0___spu0_intr3___bit 24
651#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr3___lsb 25
652#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr3___width 1
653#define reg_iop_sw_mpu_r_intr_grp0___spu1_intr3___bit 25
654#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp3___lsb 26
655#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp3___width 1
656#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp3___bit 26
657#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp7___lsb 27
658#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp7___width 1
659#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp7___bit 27
660#define reg_iop_sw_mpu_r_intr_grp0___timer_grp3___lsb 28
661#define reg_iop_sw_mpu_r_intr_grp0___timer_grp3___width 1
662#define reg_iop_sw_mpu_r_intr_grp0___timer_grp3___bit 28
663#define reg_iop_sw_mpu_r_intr_grp0___fifo_in1___lsb 29
664#define reg_iop_sw_mpu_r_intr_grp0___fifo_in1___width 1
665#define reg_iop_sw_mpu_r_intr_grp0___fifo_in1___bit 29
666#define reg_iop_sw_mpu_r_intr_grp0___fifo_in1_extra___lsb 30
667#define reg_iop_sw_mpu_r_intr_grp0___fifo_in1_extra___width 1
668#define reg_iop_sw_mpu_r_intr_grp0___fifo_in1_extra___bit 30
669#define reg_iop_sw_mpu_r_intr_grp0___dmc_in1___lsb 31
670#define reg_iop_sw_mpu_r_intr_grp0___dmc_in1___width 1
671#define reg_iop_sw_mpu_r_intr_grp0___dmc_in1___bit 31
672#define reg_iop_sw_mpu_r_intr_grp0_offset 104
673
674/* Register r_masked_intr_grp0, scope iop_sw_mpu, type r */
675#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr0___lsb 0
676#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr0___width 1
677#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr0___bit 0
678#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr0___lsb 1
679#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr0___width 1
680#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr0___bit 1
681#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp0___lsb 2
682#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp0___width 1
683#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp0___bit 2
684#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp4___lsb 3
685#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp4___width 1
686#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp4___bit 3
687#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp0___lsb 4
688#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp0___width 1
689#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp0___bit 4
690#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out0___lsb 5
691#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out0___width 1
692#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out0___bit 5
693#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out0_extra___lsb 6
694#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out0_extra___width 1
695#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out0_extra___bit 6
696#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out0___lsb 7
697#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out0___width 1
698#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out0___bit 7
699#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr1___lsb 8
700#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr1___width 1
701#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr1___bit 8
702#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr1___lsb 9
703#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr1___width 1
704#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr1___bit 9
705#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp1___lsb 10
706#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp1___width 1
707#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp1___bit 10
708#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp5___lsb 11
709#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp5___width 1
710#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp5___bit 11
711#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp1___lsb 12
712#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp1___width 1
713#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp1___bit 12
714#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in0___lsb 13
715#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in0___width 1
716#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in0___bit 13
717#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in0_extra___lsb 14
718#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in0_extra___width 1
719#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in0_extra___bit 14
720#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in0___lsb 15
721#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in0___width 1
722#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in0___bit 15
723#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr2___lsb 16
724#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr2___width 1
725#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr2___bit 16
726#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr2___lsb 17
727#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr2___width 1
728#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr2___bit 17
729#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp2___lsb 18
730#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp2___width 1
731#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp2___bit 18
732#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp6___lsb 19
733#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp6___width 1
734#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp6___bit 19
735#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp2___lsb 20
736#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp2___width 1
737#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp2___bit 20
738#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out1___lsb 21
739#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out1___width 1
740#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out1___bit 21
741#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out1_extra___lsb 22
742#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out1_extra___width 1
743#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out1_extra___bit 22
744#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out1___lsb 23
745#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out1___width 1
746#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out1___bit 23
747#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr3___lsb 24
748#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr3___width 1
749#define reg_iop_sw_mpu_r_masked_intr_grp0___spu0_intr3___bit 24
750#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr3___lsb 25
751#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr3___width 1
752#define reg_iop_sw_mpu_r_masked_intr_grp0___spu1_intr3___bit 25
753#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp3___lsb 26
754#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp3___width 1
755#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp3___bit 26
756#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp7___lsb 27
757#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp7___width 1
758#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp7___bit 27
759#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp3___lsb 28
760#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp3___width 1
761#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp3___bit 28
762#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in1___lsb 29
763#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in1___width 1
764#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in1___bit 29
765#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in1_extra___lsb 30
766#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in1_extra___width 1
767#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in1_extra___bit 30
768#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in1___lsb 31
769#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in1___width 1
770#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in1___bit 31
771#define reg_iop_sw_mpu_r_masked_intr_grp0_offset 108
772
773/* Register rw_intr_grp1_mask, scope iop_sw_mpu, type rw */
774#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr4___lsb 0
775#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr4___width 1
776#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr4___bit 0
777#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr4___lsb 1
778#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr4___width 1
779#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr4___bit 1
780#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp0___lsb 2
781#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp0___width 1
782#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp0___bit 2
783#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp5___lsb 3
784#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp5___width 1
785#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp5___bit 3
786#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp0___lsb 4
787#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp0___width 1
788#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp0___bit 4
789#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in0___lsb 5
790#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in0___width 1
791#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in0___bit 5
792#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in0_extra___lsb 6
793#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in0_extra___width 1
794#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in0_extra___bit 6
795#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out0___lsb 7
796#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out0___width 1
797#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out0___bit 7
798#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr5___lsb 8
799#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr5___width 1
800#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr5___bit 8
801#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr5___lsb 9
802#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr5___width 1
803#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr5___bit 9
804#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp1___lsb 10
805#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp1___width 1
806#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp1___bit 10
807#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp6___lsb 11
808#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp6___width 1
809#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp6___bit 11
810#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp1___lsb 12
811#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp1___width 1
812#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp1___bit 12
813#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out1___lsb 13
814#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out1___width 1
815#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out1___bit 13
816#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out0_extra___lsb 14
817#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out0_extra___width 1
818#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out0_extra___bit 14
819#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in0___lsb 15
820#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in0___width 1
821#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in0___bit 15
822#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr6___lsb 16
823#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr6___width 1
824#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr6___bit 16
825#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr6___lsb 17
826#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr6___width 1
827#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr6___bit 17
828#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp2___lsb 18
829#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp2___width 1
830#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp2___bit 18
831#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp7___lsb 19
832#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp7___width 1
833#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp7___bit 19
834#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp2___lsb 20
835#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp2___width 1
836#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp2___bit 20
837#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in1___lsb 21
838#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in1___width 1
839#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in1___bit 21
840#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in1_extra___lsb 22
841#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in1_extra___width 1
842#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in1_extra___bit 22
843#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out1___lsb 23
844#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out1___width 1
845#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out1___bit 23
846#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr7___lsb 24
847#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr7___width 1
848#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu0_intr7___bit 24
849#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr7___lsb 25
850#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr7___width 1
851#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu1_intr7___bit 25
852#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp3___lsb 26
853#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp3___width 1
854#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp3___bit 26
855#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp4___lsb 27
856#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp4___width 1
857#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp4___bit 27
858#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp3___lsb 28
859#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp3___width 1
860#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp3___bit 28
861#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out0___lsb 29
862#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out0___width 1
863#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out0___bit 29
864#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out1_extra___lsb 30
865#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out1_extra___width 1
866#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out1_extra___bit 30
867#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in1___lsb 31
868#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in1___width 1
869#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in1___bit 31
870#define reg_iop_sw_mpu_rw_intr_grp1_mask_offset 112
871
872/* Register rw_ack_intr_grp1, scope iop_sw_mpu, type rw */
873#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr4___lsb 0
874#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr4___width 1
875#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr4___bit 0
876#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr4___lsb 1
877#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr4___width 1
878#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr4___bit 1
879#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr5___lsb 8
880#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr5___width 1
881#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr5___bit 8
882#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr5___lsb 9
883#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr5___width 1
884#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr5___bit 9
885#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr6___lsb 16
886#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr6___width 1
887#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr6___bit 16
888#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr6___lsb 17
889#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr6___width 1
890#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr6___bit 17
891#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr7___lsb 24
892#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr7___width 1
893#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu0_intr7___bit 24
894#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr7___lsb 25
895#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr7___width 1
896#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu1_intr7___bit 25
897#define reg_iop_sw_mpu_rw_ack_intr_grp1_offset 116
898
899/* Register r_intr_grp1, scope iop_sw_mpu, type r */
900#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr4___lsb 0
901#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr4___width 1
902#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr4___bit 0
903#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr4___lsb 1
904#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr4___width 1
905#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr4___bit 1
906#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp0___lsb 2
907#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp0___width 1
908#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp0___bit 2
909#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp5___lsb 3
910#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp5___width 1
911#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp5___bit 3
912#define reg_iop_sw_mpu_r_intr_grp1___timer_grp0___lsb 4
913#define reg_iop_sw_mpu_r_intr_grp1___timer_grp0___width 1
914#define reg_iop_sw_mpu_r_intr_grp1___timer_grp0___bit 4
915#define reg_iop_sw_mpu_r_intr_grp1___fifo_in0___lsb 5
916#define reg_iop_sw_mpu_r_intr_grp1___fifo_in0___width 1
917#define reg_iop_sw_mpu_r_intr_grp1___fifo_in0___bit 5
918#define reg_iop_sw_mpu_r_intr_grp1___fifo_in0_extra___lsb 6
919#define reg_iop_sw_mpu_r_intr_grp1___fifo_in0_extra___width 1
920#define reg_iop_sw_mpu_r_intr_grp1___fifo_in0_extra___bit 6
921#define reg_iop_sw_mpu_r_intr_grp1___dmc_out0___lsb 7
922#define reg_iop_sw_mpu_r_intr_grp1___dmc_out0___width 1
923#define reg_iop_sw_mpu_r_intr_grp1___dmc_out0___bit 7
924#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr5___lsb 8
925#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr5___width 1
926#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr5___bit 8
927#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr5___lsb 9
928#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr5___width 1
929#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr5___bit 9
930#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp1___lsb 10
931#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp1___width 1
932#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp1___bit 10
933#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp6___lsb 11
934#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp6___width 1
935#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp6___bit 11
936#define reg_iop_sw_mpu_r_intr_grp1___timer_grp1___lsb 12
937#define reg_iop_sw_mpu_r_intr_grp1___timer_grp1___width 1
938#define reg_iop_sw_mpu_r_intr_grp1___timer_grp1___bit 12
939#define reg_iop_sw_mpu_r_intr_grp1___fifo_out1___lsb 13
940#define reg_iop_sw_mpu_r_intr_grp1___fifo_out1___width 1
941#define reg_iop_sw_mpu_r_intr_grp1___fifo_out1___bit 13
942#define reg_iop_sw_mpu_r_intr_grp1___fifo_out0_extra___lsb 14
943#define reg_iop_sw_mpu_r_intr_grp1___fifo_out0_extra___width 1
944#define reg_iop_sw_mpu_r_intr_grp1___fifo_out0_extra___bit 14
945#define reg_iop_sw_mpu_r_intr_grp1___dmc_in0___lsb 15
946#define reg_iop_sw_mpu_r_intr_grp1___dmc_in0___width 1
947#define reg_iop_sw_mpu_r_intr_grp1___dmc_in0___bit 15
948#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr6___lsb 16
949#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr6___width 1
950#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr6___bit 16
951#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr6___lsb 17
952#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr6___width 1
953#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr6___bit 17
954#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp2___lsb 18
955#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp2___width 1
956#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp2___bit 18
957#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp7___lsb 19
958#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp7___width 1
959#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp7___bit 19
960#define reg_iop_sw_mpu_r_intr_grp1___timer_grp2___lsb 20
961#define reg_iop_sw_mpu_r_intr_grp1___timer_grp2___width 1
962#define reg_iop_sw_mpu_r_intr_grp1___timer_grp2___bit 20
963#define reg_iop_sw_mpu_r_intr_grp1___fifo_in1___lsb 21
964#define reg_iop_sw_mpu_r_intr_grp1___fifo_in1___width 1
965#define reg_iop_sw_mpu_r_intr_grp1___fifo_in1___bit 21
966#define reg_iop_sw_mpu_r_intr_grp1___fifo_in1_extra___lsb 22
967#define reg_iop_sw_mpu_r_intr_grp1___fifo_in1_extra___width 1
968#define reg_iop_sw_mpu_r_intr_grp1___fifo_in1_extra___bit 22
969#define reg_iop_sw_mpu_r_intr_grp1___dmc_out1___lsb 23
970#define reg_iop_sw_mpu_r_intr_grp1___dmc_out1___width 1
971#define reg_iop_sw_mpu_r_intr_grp1___dmc_out1___bit 23
972#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr7___lsb 24
973#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr7___width 1
974#define reg_iop_sw_mpu_r_intr_grp1___spu0_intr7___bit 24
975#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr7___lsb 25
976#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr7___width 1
977#define reg_iop_sw_mpu_r_intr_grp1___spu1_intr7___bit 25
978#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp3___lsb 26
979#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp3___width 1
980#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp3___bit 26
981#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp4___lsb 27
982#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp4___width 1
983#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp4___bit 27
984#define reg_iop_sw_mpu_r_intr_grp1___timer_grp3___lsb 28
985#define reg_iop_sw_mpu_r_intr_grp1___timer_grp3___width 1
986#define reg_iop_sw_mpu_r_intr_grp1___timer_grp3___bit 28
987#define reg_iop_sw_mpu_r_intr_grp1___fifo_out0___lsb 29
988#define reg_iop_sw_mpu_r_intr_grp1___fifo_out0___width 1
989#define reg_iop_sw_mpu_r_intr_grp1___fifo_out0___bit 29
990#define reg_iop_sw_mpu_r_intr_grp1___fifo_out1_extra___lsb 30
991#define reg_iop_sw_mpu_r_intr_grp1___fifo_out1_extra___width 1
992#define reg_iop_sw_mpu_r_intr_grp1___fifo_out1_extra___bit 30
993#define reg_iop_sw_mpu_r_intr_grp1___dmc_in1___lsb 31
994#define reg_iop_sw_mpu_r_intr_grp1___dmc_in1___width 1
995#define reg_iop_sw_mpu_r_intr_grp1___dmc_in1___bit 31
996#define reg_iop_sw_mpu_r_intr_grp1_offset 120
997
998/* Register r_masked_intr_grp1, scope iop_sw_mpu, type r */
999#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr4___lsb 0
1000#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr4___width 1
1001#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr4___bit 0
1002#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr4___lsb 1
1003#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr4___width 1
1004#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr4___bit 1
1005#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp0___lsb 2
1006#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp0___width 1
1007#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp0___bit 2
1008#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp5___lsb 3
1009#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp5___width 1
1010#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp5___bit 3
1011#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp0___lsb 4
1012#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp0___width 1
1013#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp0___bit 4
1014#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in0___lsb 5
1015#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in0___width 1
1016#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in0___bit 5
1017#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in0_extra___lsb 6
1018#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in0_extra___width 1
1019#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in0_extra___bit 6
1020#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out0___lsb 7
1021#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out0___width 1
1022#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out0___bit 7
1023#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr5___lsb 8
1024#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr5___width 1
1025#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr5___bit 8
1026#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr5___lsb 9
1027#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr5___width 1
1028#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr5___bit 9
1029#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp1___lsb 10
1030#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp1___width 1
1031#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp1___bit 10
1032#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp6___lsb 11
1033#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp6___width 1
1034#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp6___bit 11
1035#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp1___lsb 12
1036#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp1___width 1
1037#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp1___bit 12
1038#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out1___lsb 13
1039#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out1___width 1
1040#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out1___bit 13
1041#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out0_extra___lsb 14
1042#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out0_extra___width 1
1043#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out0_extra___bit 14
1044#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in0___lsb 15
1045#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in0___width 1
1046#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in0___bit 15
1047#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr6___lsb 16
1048#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr6___width 1
1049#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr6___bit 16
1050#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr6___lsb 17
1051#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr6___width 1
1052#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr6___bit 17
1053#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp2___lsb 18
1054#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp2___width 1
1055#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp2___bit 18
1056#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp7___lsb 19
1057#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp7___width 1
1058#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp7___bit 19
1059#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp2___lsb 20
1060#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp2___width 1
1061#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp2___bit 20
1062#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in1___lsb 21
1063#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in1___width 1
1064#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in1___bit 21
1065#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in1_extra___lsb 22
1066#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in1_extra___width 1
1067#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in1_extra___bit 22
1068#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out1___lsb 23
1069#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out1___width 1
1070#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out1___bit 23
1071#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr7___lsb 24
1072#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr7___width 1
1073#define reg_iop_sw_mpu_r_masked_intr_grp1___spu0_intr7___bit 24
1074#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr7___lsb 25
1075#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr7___width 1
1076#define reg_iop_sw_mpu_r_masked_intr_grp1___spu1_intr7___bit 25
1077#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp3___lsb 26
1078#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp3___width 1
1079#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp3___bit 26
1080#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp4___lsb 27
1081#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp4___width 1
1082#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp4___bit 27
1083#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp3___lsb 28
1084#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp3___width 1
1085#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp3___bit 28
1086#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out0___lsb 29
1087#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out0___width 1
1088#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out0___bit 29
1089#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out1_extra___lsb 30
1090#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out1_extra___width 1
1091#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out1_extra___bit 30
1092#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in1___lsb 31
1093#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in1___width 1
1094#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in1___bit 31
1095#define reg_iop_sw_mpu_r_masked_intr_grp1_offset 124
1096
1097/* Register rw_intr_grp2_mask, scope iop_sw_mpu, type rw */
1098#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr8___lsb 0
1099#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr8___width 1
1100#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr8___bit 0
1101#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr8___lsb 1
1102#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr8___width 1
1103#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr8___bit 1
1104#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp0___lsb 2
1105#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp0___width 1
1106#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp0___bit 2
1107#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp6___lsb 3
1108#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp6___width 1
1109#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp6___bit 3
1110#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp0___lsb 4
1111#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp0___width 1
1112#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp0___bit 4
1113#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out1___lsb 5
1114#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out1___width 1
1115#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out1___bit 5
1116#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out1_extra___lsb 6
1117#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out1_extra___width 1
1118#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out1_extra___bit 6
1119#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out0___lsb 7
1120#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out0___width 1
1121#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out0___bit 7
1122#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr9___lsb 8
1123#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr9___width 1
1124#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr9___bit 8
1125#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr9___lsb 9
1126#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr9___width 1
1127#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr9___bit 9
1128#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp1___lsb 10
1129#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp1___width 1
1130#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp1___bit 10
1131#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp7___lsb 11
1132#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp7___width 1
1133#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp7___bit 11
1134#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp1___lsb 12
1135#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp1___width 1
1136#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp1___bit 12
1137#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in1___lsb 13
1138#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in1___width 1
1139#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in1___bit 13
1140#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in1_extra___lsb 14
1141#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in1_extra___width 1
1142#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in1_extra___bit 14
1143#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in0___lsb 15
1144#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in0___width 1
1145#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in0___bit 15
1146#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr10___lsb 16
1147#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr10___width 1
1148#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr10___bit 16
1149#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr10___lsb 17
1150#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr10___width 1
1151#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr10___bit 17
1152#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp2___lsb 18
1153#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp2___width 1
1154#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp2___bit 18
1155#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp4___lsb 19
1156#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp4___width 1
1157#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp4___bit 19
1158#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp2___lsb 20
1159#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp2___width 1
1160#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp2___bit 20
1161#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out0___lsb 21
1162#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out0___width 1
1163#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out0___bit 21
1164#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out0_extra___lsb 22
1165#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out0_extra___width 1
1166#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out0_extra___bit 22
1167#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out1___lsb 23
1168#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out1___width 1
1169#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out1___bit 23
1170#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr11___lsb 24
1171#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr11___width 1
1172#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu0_intr11___bit 24
1173#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr11___lsb 25
1174#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr11___width 1
1175#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu1_intr11___bit 25
1176#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp3___lsb 26
1177#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp3___width 1
1178#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp3___bit 26
1179#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp5___lsb 27
1180#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp5___width 1
1181#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp5___bit 27
1182#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp3___lsb 28
1183#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp3___width 1
1184#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp3___bit 28
1185#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in0___lsb 29
1186#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in0___width 1
1187#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in0___bit 29
1188#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in0_extra___lsb 30
1189#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in0_extra___width 1
1190#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in0_extra___bit 30
1191#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in1___lsb 31
1192#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in1___width 1
1193#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in1___bit 31
1194#define reg_iop_sw_mpu_rw_intr_grp2_mask_offset 128
1195
1196/* Register rw_ack_intr_grp2, scope iop_sw_mpu, type rw */
1197#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr8___lsb 0
1198#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr8___width 1
1199#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr8___bit 0
1200#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr8___lsb 1
1201#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr8___width 1
1202#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr8___bit 1
1203#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr9___lsb 8
1204#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr9___width 1
1205#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr9___bit 8
1206#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr9___lsb 9
1207#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr9___width 1
1208#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr9___bit 9
1209#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr10___lsb 16
1210#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr10___width 1
1211#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr10___bit 16
1212#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr10___lsb 17
1213#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr10___width 1
1214#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr10___bit 17
1215#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr11___lsb 24
1216#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr11___width 1
1217#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu0_intr11___bit 24
1218#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr11___lsb 25
1219#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr11___width 1
1220#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu1_intr11___bit 25
1221#define reg_iop_sw_mpu_rw_ack_intr_grp2_offset 132
1222
1223/* Register r_intr_grp2, scope iop_sw_mpu, type r */
1224#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr8___lsb 0
1225#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr8___width 1
1226#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr8___bit 0
1227#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr8___lsb 1
1228#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr8___width 1
1229#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr8___bit 1
1230#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp0___lsb 2
1231#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp0___width 1
1232#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp0___bit 2
1233#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp6___lsb 3
1234#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp6___width 1
1235#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp6___bit 3
1236#define reg_iop_sw_mpu_r_intr_grp2___timer_grp0___lsb 4
1237#define reg_iop_sw_mpu_r_intr_grp2___timer_grp0___width 1
1238#define reg_iop_sw_mpu_r_intr_grp2___timer_grp0___bit 4
1239#define reg_iop_sw_mpu_r_intr_grp2___fifo_out1___lsb 5
1240#define reg_iop_sw_mpu_r_intr_grp2___fifo_out1___width 1
1241#define reg_iop_sw_mpu_r_intr_grp2___fifo_out1___bit 5
1242#define reg_iop_sw_mpu_r_intr_grp2___fifo_out1_extra___lsb 6
1243#define reg_iop_sw_mpu_r_intr_grp2___fifo_out1_extra___width 1
1244#define reg_iop_sw_mpu_r_intr_grp2___fifo_out1_extra___bit 6
1245#define reg_iop_sw_mpu_r_intr_grp2___dmc_out0___lsb 7
1246#define reg_iop_sw_mpu_r_intr_grp2___dmc_out0___width 1
1247#define reg_iop_sw_mpu_r_intr_grp2___dmc_out0___bit 7
1248#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr9___lsb 8
1249#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr9___width 1
1250#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr9___bit 8
1251#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr9___lsb 9
1252#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr9___width 1
1253#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr9___bit 9
1254#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp1___lsb 10
1255#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp1___width 1
1256#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp1___bit 10
1257#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp7___lsb 11
1258#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp7___width 1
1259#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp7___bit 11
1260#define reg_iop_sw_mpu_r_intr_grp2___timer_grp1___lsb 12
1261#define reg_iop_sw_mpu_r_intr_grp2___timer_grp1___width 1
1262#define reg_iop_sw_mpu_r_intr_grp2___timer_grp1___bit 12
1263#define reg_iop_sw_mpu_r_intr_grp2___fifo_in1___lsb 13
1264#define reg_iop_sw_mpu_r_intr_grp2___fifo_in1___width 1
1265#define reg_iop_sw_mpu_r_intr_grp2___fifo_in1___bit 13
1266#define reg_iop_sw_mpu_r_intr_grp2___fifo_in1_extra___lsb 14
1267#define reg_iop_sw_mpu_r_intr_grp2___fifo_in1_extra___width 1
1268#define reg_iop_sw_mpu_r_intr_grp2___fifo_in1_extra___bit 14
1269#define reg_iop_sw_mpu_r_intr_grp2___dmc_in0___lsb 15
1270#define reg_iop_sw_mpu_r_intr_grp2___dmc_in0___width 1
1271#define reg_iop_sw_mpu_r_intr_grp2___dmc_in0___bit 15
1272#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr10___lsb 16
1273#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr10___width 1
1274#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr10___bit 16
1275#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr10___lsb 17
1276#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr10___width 1
1277#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr10___bit 17
1278#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp2___lsb 18
1279#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp2___width 1
1280#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp2___bit 18
1281#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp4___lsb 19
1282#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp4___width 1
1283#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp4___bit 19
1284#define reg_iop_sw_mpu_r_intr_grp2___timer_grp2___lsb 20
1285#define reg_iop_sw_mpu_r_intr_grp2___timer_grp2___width 1
1286#define reg_iop_sw_mpu_r_intr_grp2___timer_grp2___bit 20
1287#define reg_iop_sw_mpu_r_intr_grp2___fifo_out0___lsb 21
1288#define reg_iop_sw_mpu_r_intr_grp2___fifo_out0___width 1
1289#define reg_iop_sw_mpu_r_intr_grp2___fifo_out0___bit 21
1290#define reg_iop_sw_mpu_r_intr_grp2___fifo_out0_extra___lsb 22
1291#define reg_iop_sw_mpu_r_intr_grp2___fifo_out0_extra___width 1
1292#define reg_iop_sw_mpu_r_intr_grp2___fifo_out0_extra___bit 22
1293#define reg_iop_sw_mpu_r_intr_grp2___dmc_out1___lsb 23
1294#define reg_iop_sw_mpu_r_intr_grp2___dmc_out1___width 1
1295#define reg_iop_sw_mpu_r_intr_grp2___dmc_out1___bit 23
1296#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr11___lsb 24
1297#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr11___width 1
1298#define reg_iop_sw_mpu_r_intr_grp2___spu0_intr11___bit 24
1299#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr11___lsb 25
1300#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr11___width 1
1301#define reg_iop_sw_mpu_r_intr_grp2___spu1_intr11___bit 25
1302#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp3___lsb 26
1303#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp3___width 1
1304#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp3___bit 26
1305#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp5___lsb 27
1306#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp5___width 1
1307#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp5___bit 27
1308#define reg_iop_sw_mpu_r_intr_grp2___timer_grp3___lsb 28
1309#define reg_iop_sw_mpu_r_intr_grp2___timer_grp3___width 1
1310#define reg_iop_sw_mpu_r_intr_grp2___timer_grp3___bit 28
1311#define reg_iop_sw_mpu_r_intr_grp2___fifo_in0___lsb 29
1312#define reg_iop_sw_mpu_r_intr_grp2___fifo_in0___width 1
1313#define reg_iop_sw_mpu_r_intr_grp2___fifo_in0___bit 29
1314#define reg_iop_sw_mpu_r_intr_grp2___fifo_in0_extra___lsb 30
1315#define reg_iop_sw_mpu_r_intr_grp2___fifo_in0_extra___width 1
1316#define reg_iop_sw_mpu_r_intr_grp2___fifo_in0_extra___bit 30
1317#define reg_iop_sw_mpu_r_intr_grp2___dmc_in1___lsb 31
1318#define reg_iop_sw_mpu_r_intr_grp2___dmc_in1___width 1
1319#define reg_iop_sw_mpu_r_intr_grp2___dmc_in1___bit 31
1320#define reg_iop_sw_mpu_r_intr_grp2_offset 136
1321
1322/* Register r_masked_intr_grp2, scope iop_sw_mpu, type r */
1323#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr8___lsb 0
1324#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr8___width 1
1325#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr8___bit 0
1326#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr8___lsb 1
1327#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr8___width 1
1328#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr8___bit 1
1329#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp0___lsb 2
1330#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp0___width 1
1331#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp0___bit 2
1332#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp6___lsb 3
1333#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp6___width 1
1334#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp6___bit 3
1335#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp0___lsb 4
1336#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp0___width 1
1337#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp0___bit 4
1338#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out1___lsb 5
1339#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out1___width 1
1340#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out1___bit 5
1341#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out1_extra___lsb 6
1342#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out1_extra___width 1
1343#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out1_extra___bit 6
1344#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out0___lsb 7
1345#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out0___width 1
1346#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out0___bit 7
1347#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr9___lsb 8
1348#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr9___width 1
1349#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr9___bit 8
1350#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr9___lsb 9
1351#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr9___width 1
1352#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr9___bit 9
1353#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp1___lsb 10
1354#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp1___width 1
1355#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp1___bit 10
1356#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp7___lsb 11
1357#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp7___width 1
1358#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp7___bit 11
1359#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp1___lsb 12
1360#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp1___width 1
1361#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp1___bit 12
1362#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in1___lsb 13
1363#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in1___width 1
1364#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in1___bit 13
1365#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in1_extra___lsb 14
1366#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in1_extra___width 1
1367#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in1_extra___bit 14
1368#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in0___lsb 15
1369#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in0___width 1
1370#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in0___bit 15
1371#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr10___lsb 16
1372#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr10___width 1
1373#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr10___bit 16
1374#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr10___lsb 17
1375#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr10___width 1
1376#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr10___bit 17
1377#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp2___lsb 18
1378#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp2___width 1
1379#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp2___bit 18
1380#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp4___lsb 19
1381#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp4___width 1
1382#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp4___bit 19
1383#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp2___lsb 20
1384#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp2___width 1
1385#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp2___bit 20
1386#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out0___lsb 21
1387#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out0___width 1
1388#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out0___bit 21
1389#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out0_extra___lsb 22
1390#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out0_extra___width 1
1391#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out0_extra___bit 22
1392#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out1___lsb 23
1393#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out1___width 1
1394#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out1___bit 23
1395#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr11___lsb 24
1396#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr11___width 1
1397#define reg_iop_sw_mpu_r_masked_intr_grp2___spu0_intr11___bit 24
1398#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr11___lsb 25
1399#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr11___width 1
1400#define reg_iop_sw_mpu_r_masked_intr_grp2___spu1_intr11___bit 25
1401#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp3___lsb 26
1402#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp3___width 1
1403#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp3___bit 26
1404#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp5___lsb 27
1405#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp5___width 1
1406#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp5___bit 27
1407#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp3___lsb 28
1408#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp3___width 1
1409#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp3___bit 28
1410#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in0___lsb 29
1411#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in0___width 1
1412#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in0___bit 29
1413#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in0_extra___lsb 30
1414#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in0_extra___width 1
1415#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in0_extra___bit 30
1416#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in1___lsb 31
1417#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in1___width 1
1418#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in1___bit 31
1419#define reg_iop_sw_mpu_r_masked_intr_grp2_offset 140
1420
1421/* Register rw_intr_grp3_mask, scope iop_sw_mpu, type rw */
1422#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr12___lsb 0
1423#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr12___width 1
1424#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr12___bit 0
1425#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr12___lsb 1
1426#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr12___width 1
1427#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr12___bit 1
1428#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp0___lsb 2
1429#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp0___width 1
1430#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp0___bit 2
1431#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp7___lsb 3
1432#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp7___width 1
1433#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp7___bit 3
1434#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp0___lsb 4
1435#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp0___width 1
1436#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp0___bit 4
1437#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in1___lsb 5
1438#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in1___width 1
1439#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in1___bit 5
1440#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in1_extra___lsb 6
1441#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in1_extra___width 1
1442#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in1_extra___bit 6
1443#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out0___lsb 7
1444#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out0___width 1
1445#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out0___bit 7
1446#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr13___lsb 8
1447#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr13___width 1
1448#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr13___bit 8
1449#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr13___lsb 9
1450#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr13___width 1
1451#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr13___bit 9
1452#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp1___lsb 10
1453#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp1___width 1
1454#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp1___bit 10
1455#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp4___lsb 11
1456#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp4___width 1
1457#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp4___bit 11
1458#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp1___lsb 12
1459#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp1___width 1
1460#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp1___bit 12
1461#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out0___lsb 13
1462#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out0___width 1
1463#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out0___bit 13
1464#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out0_extra___lsb 14
1465#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out0_extra___width 1
1466#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out0_extra___bit 14
1467#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in0___lsb 15
1468#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in0___width 1
1469#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in0___bit 15
1470#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr14___lsb 16
1471#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr14___width 1
1472#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr14___bit 16
1473#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr14___lsb 17
1474#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr14___width 1
1475#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr14___bit 17
1476#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp2___lsb 18
1477#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp2___width 1
1478#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp2___bit 18
1479#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp5___lsb 19
1480#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp5___width 1
1481#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp5___bit 19
1482#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp2___lsb 20
1483#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp2___width 1
1484#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp2___bit 20
1485#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in0___lsb 21
1486#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in0___width 1
1487#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in0___bit 21
1488#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in0_extra___lsb 22
1489#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in0_extra___width 1
1490#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in0_extra___bit 22
1491#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out1___lsb 23
1492#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out1___width 1
1493#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out1___bit 23
1494#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr15___lsb 24
1495#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr15___width 1
1496#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu0_intr15___bit 24
1497#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr15___lsb 25
1498#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr15___width 1
1499#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu1_intr15___bit 25
1500#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp3___lsb 26
1501#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp3___width 1
1502#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp3___bit 26
1503#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp6___lsb 27
1504#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp6___width 1
1505#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp6___bit 27
1506#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp3___lsb 28
1507#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp3___width 1
1508#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp3___bit 28
1509#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out1___lsb 29
1510#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out1___width 1
1511#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out1___bit 29
1512#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out1_extra___lsb 30
1513#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out1_extra___width 1
1514#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out1_extra___bit 30
1515#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in1___lsb 31
1516#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in1___width 1
1517#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in1___bit 31
1518#define reg_iop_sw_mpu_rw_intr_grp3_mask_offset 144
1519
1520/* Register rw_ack_intr_grp3, scope iop_sw_mpu, type rw */
1521#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr12___lsb 0
1522#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr12___width 1
1523#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr12___bit 0
1524#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr12___lsb 1
1525#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr12___width 1
1526#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr12___bit 1
1527#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr13___lsb 8
1528#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr13___width 1
1529#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr13___bit 8
1530#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr13___lsb 9
1531#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr13___width 1
1532#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr13___bit 9
1533#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr14___lsb 16
1534#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr14___width 1
1535#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr14___bit 16
1536#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr14___lsb 17
1537#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr14___width 1
1538#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr14___bit 17
1539#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr15___lsb 24
1540#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr15___width 1
1541#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu0_intr15___bit 24
1542#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr15___lsb 25
1543#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr15___width 1
1544#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu1_intr15___bit 25
1545#define reg_iop_sw_mpu_rw_ack_intr_grp3_offset 148
1546
1547/* Register r_intr_grp3, scope iop_sw_mpu, type r */
1548#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr12___lsb 0
1549#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr12___width 1
1550#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr12___bit 0
1551#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr12___lsb 1
1552#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr12___width 1
1553#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr12___bit 1
1554#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp0___lsb 2
1555#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp0___width 1
1556#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp0___bit 2
1557#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp7___lsb 3
1558#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp7___width 1
1559#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp7___bit 3
1560#define reg_iop_sw_mpu_r_intr_grp3___timer_grp0___lsb 4
1561#define reg_iop_sw_mpu_r_intr_grp3___timer_grp0___width 1
1562#define reg_iop_sw_mpu_r_intr_grp3___timer_grp0___bit 4
1563#define reg_iop_sw_mpu_r_intr_grp3___fifo_in1___lsb 5
1564#define reg_iop_sw_mpu_r_intr_grp3___fifo_in1___width 1
1565#define reg_iop_sw_mpu_r_intr_grp3___fifo_in1___bit 5
1566#define reg_iop_sw_mpu_r_intr_grp3___fifo_in1_extra___lsb 6
1567#define reg_iop_sw_mpu_r_intr_grp3___fifo_in1_extra___width 1
1568#define reg_iop_sw_mpu_r_intr_grp3___fifo_in1_extra___bit 6
1569#define reg_iop_sw_mpu_r_intr_grp3___dmc_out0___lsb 7
1570#define reg_iop_sw_mpu_r_intr_grp3___dmc_out0___width 1
1571#define reg_iop_sw_mpu_r_intr_grp3___dmc_out0___bit 7
1572#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr13___lsb 8
1573#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr13___width 1
1574#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr13___bit 8
1575#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr13___lsb 9
1576#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr13___width 1
1577#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr13___bit 9
1578#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp1___lsb 10
1579#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp1___width 1
1580#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp1___bit 10
1581#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp4___lsb 11
1582#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp4___width 1
1583#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp4___bit 11
1584#define reg_iop_sw_mpu_r_intr_grp3___timer_grp1___lsb 12
1585#define reg_iop_sw_mpu_r_intr_grp3___timer_grp1___width 1
1586#define reg_iop_sw_mpu_r_intr_grp3___timer_grp1___bit 12
1587#define reg_iop_sw_mpu_r_intr_grp3___fifo_out0___lsb 13
1588#define reg_iop_sw_mpu_r_intr_grp3___fifo_out0___width 1
1589#define reg_iop_sw_mpu_r_intr_grp3___fifo_out0___bit 13
1590#define reg_iop_sw_mpu_r_intr_grp3___fifo_out0_extra___lsb 14
1591#define reg_iop_sw_mpu_r_intr_grp3___fifo_out0_extra___width 1
1592#define reg_iop_sw_mpu_r_intr_grp3___fifo_out0_extra___bit 14
1593#define reg_iop_sw_mpu_r_intr_grp3___dmc_in0___lsb 15
1594#define reg_iop_sw_mpu_r_intr_grp3___dmc_in0___width 1
1595#define reg_iop_sw_mpu_r_intr_grp3___dmc_in0___bit 15
1596#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr14___lsb 16
1597#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr14___width 1
1598#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr14___bit 16
1599#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr14___lsb 17
1600#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr14___width 1
1601#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr14___bit 17
1602#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp2___lsb 18
1603#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp2___width 1
1604#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp2___bit 18
1605#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp5___lsb 19
1606#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp5___width 1
1607#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp5___bit 19
1608#define reg_iop_sw_mpu_r_intr_grp3___timer_grp2___lsb 20
1609#define reg_iop_sw_mpu_r_intr_grp3___timer_grp2___width 1
1610#define reg_iop_sw_mpu_r_intr_grp3___timer_grp2___bit 20
1611#define reg_iop_sw_mpu_r_intr_grp3___fifo_in0___lsb 21
1612#define reg_iop_sw_mpu_r_intr_grp3___fifo_in0___width 1
1613#define reg_iop_sw_mpu_r_intr_grp3___fifo_in0___bit 21
1614#define reg_iop_sw_mpu_r_intr_grp3___fifo_in0_extra___lsb 22
1615#define reg_iop_sw_mpu_r_intr_grp3___fifo_in0_extra___width 1
1616#define reg_iop_sw_mpu_r_intr_grp3___fifo_in0_extra___bit 22
1617#define reg_iop_sw_mpu_r_intr_grp3___dmc_out1___lsb 23
1618#define reg_iop_sw_mpu_r_intr_grp3___dmc_out1___width 1
1619#define reg_iop_sw_mpu_r_intr_grp3___dmc_out1___bit 23
1620#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr15___lsb 24
1621#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr15___width 1
1622#define reg_iop_sw_mpu_r_intr_grp3___spu0_intr15___bit 24
1623#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr15___lsb 25
1624#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr15___width 1
1625#define reg_iop_sw_mpu_r_intr_grp3___spu1_intr15___bit 25
1626#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp3___lsb 26
1627#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp3___width 1
1628#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp3___bit 26
1629#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp6___lsb 27
1630#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp6___width 1
1631#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp6___bit 27
1632#define reg_iop_sw_mpu_r_intr_grp3___timer_grp3___lsb 28
1633#define reg_iop_sw_mpu_r_intr_grp3___timer_grp3___width 1
1634#define reg_iop_sw_mpu_r_intr_grp3___timer_grp3___bit 28
1635#define reg_iop_sw_mpu_r_intr_grp3___fifo_out1___lsb 29
1636#define reg_iop_sw_mpu_r_intr_grp3___fifo_out1___width 1
1637#define reg_iop_sw_mpu_r_intr_grp3___fifo_out1___bit 29
1638#define reg_iop_sw_mpu_r_intr_grp3___fifo_out1_extra___lsb 30
1639#define reg_iop_sw_mpu_r_intr_grp3___fifo_out1_extra___width 1
1640#define reg_iop_sw_mpu_r_intr_grp3___fifo_out1_extra___bit 30
1641#define reg_iop_sw_mpu_r_intr_grp3___dmc_in1___lsb 31
1642#define reg_iop_sw_mpu_r_intr_grp3___dmc_in1___width 1
1643#define reg_iop_sw_mpu_r_intr_grp3___dmc_in1___bit 31
1644#define reg_iop_sw_mpu_r_intr_grp3_offset 152
1645
1646/* Register r_masked_intr_grp3, scope iop_sw_mpu, type r */
1647#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr12___lsb 0
1648#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr12___width 1
1649#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr12___bit 0
1650#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr12___lsb 1
1651#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr12___width 1
1652#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr12___bit 1
1653#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp0___lsb 2
1654#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp0___width 1
1655#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp0___bit 2
1656#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp7___lsb 3
1657#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp7___width 1
1658#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp7___bit 3
1659#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp0___lsb 4
1660#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp0___width 1
1661#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp0___bit 4
1662#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in1___lsb 5
1663#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in1___width 1
1664#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in1___bit 5
1665#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in1_extra___lsb 6
1666#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in1_extra___width 1
1667#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in1_extra___bit 6
1668#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out0___lsb 7
1669#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out0___width 1
1670#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out0___bit 7
1671#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr13___lsb 8
1672#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr13___width 1
1673#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr13___bit 8
1674#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr13___lsb 9
1675#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr13___width 1
1676#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr13___bit 9
1677#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp1___lsb 10
1678#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp1___width 1
1679#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp1___bit 10
1680#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp4___lsb 11
1681#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp4___width 1
1682#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp4___bit 11
1683#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp1___lsb 12
1684#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp1___width 1
1685#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp1___bit 12
1686#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out0___lsb 13
1687#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out0___width 1
1688#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out0___bit 13
1689#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out0_extra___lsb 14
1690#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out0_extra___width 1
1691#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out0_extra___bit 14
1692#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in0___lsb 15
1693#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in0___width 1
1694#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in0___bit 15
1695#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr14___lsb 16
1696#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr14___width 1
1697#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr14___bit 16
1698#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr14___lsb 17
1699#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr14___width 1
1700#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr14___bit 17
1701#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp2___lsb 18
1702#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp2___width 1
1703#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp2___bit 18
1704#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp5___lsb 19
1705#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp5___width 1
1706#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp5___bit 19
1707#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp2___lsb 20
1708#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp2___width 1
1709#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp2___bit 20
1710#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in0___lsb 21
1711#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in0___width 1
1712#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in0___bit 21
1713#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in0_extra___lsb 22
1714#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in0_extra___width 1
1715#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in0_extra___bit 22
1716#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out1___lsb 23
1717#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out1___width 1
1718#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out1___bit 23
1719#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr15___lsb 24
1720#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr15___width 1
1721#define reg_iop_sw_mpu_r_masked_intr_grp3___spu0_intr15___bit 24
1722#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr15___lsb 25
1723#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr15___width 1
1724#define reg_iop_sw_mpu_r_masked_intr_grp3___spu1_intr15___bit 25
1725#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp3___lsb 26
1726#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp3___width 1
1727#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp3___bit 26
1728#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp6___lsb 27
1729#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp6___width 1
1730#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp6___bit 27
1731#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp3___lsb 28
1732#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp3___width 1
1733#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp3___bit 28
1734#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out1___lsb 29
1735#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out1___width 1
1736#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out1___bit 29
1737#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out1_extra___lsb 30
1738#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out1_extra___width 1
1739#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out1_extra___bit 30
1740#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in1___lsb 31
1741#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in1___width 1
1742#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in1___bit 31
1743#define reg_iop_sw_mpu_r_masked_intr_grp3_offset 156
1744
1745
1746/* Constants */
1747#define regk_iop_sw_mpu_copy 0x00000000
1748#define regk_iop_sw_mpu_cpu 0x00000000
1749#define regk_iop_sw_mpu_mpu 0x00000001
1750#define regk_iop_sw_mpu_no 0x00000000
1751#define regk_iop_sw_mpu_nop 0x00000000
1752#define regk_iop_sw_mpu_rd 0x00000002
1753#define regk_iop_sw_mpu_reg_copy 0x00000001
1754#define regk_iop_sw_mpu_rw_bus0_clr_mask_default 0x00000000
1755#define regk_iop_sw_mpu_rw_bus0_oe_clr_mask_default 0x00000000
1756#define regk_iop_sw_mpu_rw_bus0_oe_set_mask_default 0x00000000
1757#define regk_iop_sw_mpu_rw_bus0_set_mask_default 0x00000000
1758#define regk_iop_sw_mpu_rw_bus1_clr_mask_default 0x00000000
1759#define regk_iop_sw_mpu_rw_bus1_oe_clr_mask_default 0x00000000
1760#define regk_iop_sw_mpu_rw_bus1_oe_set_mask_default 0x00000000
1761#define regk_iop_sw_mpu_rw_bus1_set_mask_default 0x00000000
1762#define regk_iop_sw_mpu_rw_gio_clr_mask_default 0x00000000
1763#define regk_iop_sw_mpu_rw_gio_oe_clr_mask_default 0x00000000
1764#define regk_iop_sw_mpu_rw_gio_oe_set_mask_default 0x00000000
1765#define regk_iop_sw_mpu_rw_gio_set_mask_default 0x00000000
1766#define regk_iop_sw_mpu_rw_intr_grp0_mask_default 0x00000000
1767#define regk_iop_sw_mpu_rw_intr_grp1_mask_default 0x00000000
1768#define regk_iop_sw_mpu_rw_intr_grp2_mask_default 0x00000000
1769#define regk_iop_sw_mpu_rw_intr_grp3_mask_default 0x00000000
1770#define regk_iop_sw_mpu_rw_sw_cfg_owner_default 0x00000000
1771#define regk_iop_sw_mpu_set 0x00000001
1772#define regk_iop_sw_mpu_spu0 0x00000002
1773#define regk_iop_sw_mpu_spu1 0x00000003
1774#define regk_iop_sw_mpu_wr 0x00000003
1775#define regk_iop_sw_mpu_yes 0x00000001
1776#endif /* __iop_sw_mpu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_spu_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_spu_defs_asm.h
deleted file mode 100644
index 0929f144cfa1..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_spu_defs_asm.h
+++ /dev/null
@@ -1,691 +0,0 @@
1#ifndef __iop_sw_spu_defs_asm_h
2#define __iop_sw_spu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_spu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_sw_spu_defs_asm.h ../../inst/io_proc/rtl/guinness/iop_sw_spu.r
11 * id: $Id: iop_sw_spu_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_mc_ctrl, scope iop_sw_spu, type rw */
57#define reg_iop_sw_spu_rw_mc_ctrl___keep_owner___lsb 0
58#define reg_iop_sw_spu_rw_mc_ctrl___keep_owner___width 1
59#define reg_iop_sw_spu_rw_mc_ctrl___keep_owner___bit 0
60#define reg_iop_sw_spu_rw_mc_ctrl___cmd___lsb 1
61#define reg_iop_sw_spu_rw_mc_ctrl___cmd___width 2
62#define reg_iop_sw_spu_rw_mc_ctrl___size___lsb 3
63#define reg_iop_sw_spu_rw_mc_ctrl___size___width 3
64#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu0_mem___lsb 6
65#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu0_mem___width 1
66#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu0_mem___bit 6
67#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu1_mem___lsb 7
68#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu1_mem___width 1
69#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu1_mem___bit 7
70#define reg_iop_sw_spu_rw_mc_ctrl_offset 0
71
72/* Register rw_mc_data, scope iop_sw_spu, type rw */
73#define reg_iop_sw_spu_rw_mc_data___val___lsb 0
74#define reg_iop_sw_spu_rw_mc_data___val___width 32
75#define reg_iop_sw_spu_rw_mc_data_offset 4
76
77/* Register rw_mc_addr, scope iop_sw_spu, type rw */
78#define reg_iop_sw_spu_rw_mc_addr_offset 8
79
80/* Register rs_mc_data, scope iop_sw_spu, type rs */
81#define reg_iop_sw_spu_rs_mc_data_offset 12
82
83/* Register r_mc_data, scope iop_sw_spu, type r */
84#define reg_iop_sw_spu_r_mc_data_offset 16
85
86/* Register r_mc_stat, scope iop_sw_spu, type r */
87#define reg_iop_sw_spu_r_mc_stat___busy_cpu___lsb 0
88#define reg_iop_sw_spu_r_mc_stat___busy_cpu___width 1
89#define reg_iop_sw_spu_r_mc_stat___busy_cpu___bit 0
90#define reg_iop_sw_spu_r_mc_stat___busy_mpu___lsb 1
91#define reg_iop_sw_spu_r_mc_stat___busy_mpu___width 1
92#define reg_iop_sw_spu_r_mc_stat___busy_mpu___bit 1
93#define reg_iop_sw_spu_r_mc_stat___busy_spu0___lsb 2
94#define reg_iop_sw_spu_r_mc_stat___busy_spu0___width 1
95#define reg_iop_sw_spu_r_mc_stat___busy_spu0___bit 2
96#define reg_iop_sw_spu_r_mc_stat___busy_spu1___lsb 3
97#define reg_iop_sw_spu_r_mc_stat___busy_spu1___width 1
98#define reg_iop_sw_spu_r_mc_stat___busy_spu1___bit 3
99#define reg_iop_sw_spu_r_mc_stat___owned_by_cpu___lsb 4
100#define reg_iop_sw_spu_r_mc_stat___owned_by_cpu___width 1
101#define reg_iop_sw_spu_r_mc_stat___owned_by_cpu___bit 4
102#define reg_iop_sw_spu_r_mc_stat___owned_by_mpu___lsb 5
103#define reg_iop_sw_spu_r_mc_stat___owned_by_mpu___width 1
104#define reg_iop_sw_spu_r_mc_stat___owned_by_mpu___bit 5
105#define reg_iop_sw_spu_r_mc_stat___owned_by_spu0___lsb 6
106#define reg_iop_sw_spu_r_mc_stat___owned_by_spu0___width 1
107#define reg_iop_sw_spu_r_mc_stat___owned_by_spu0___bit 6
108#define reg_iop_sw_spu_r_mc_stat___owned_by_spu1___lsb 7
109#define reg_iop_sw_spu_r_mc_stat___owned_by_spu1___width 1
110#define reg_iop_sw_spu_r_mc_stat___owned_by_spu1___bit 7
111#define reg_iop_sw_spu_r_mc_stat_offset 20
112
113/* Register rw_bus0_clr_mask, scope iop_sw_spu, type rw */
114#define reg_iop_sw_spu_rw_bus0_clr_mask___byte0___lsb 0
115#define reg_iop_sw_spu_rw_bus0_clr_mask___byte0___width 8
116#define reg_iop_sw_spu_rw_bus0_clr_mask___byte1___lsb 8
117#define reg_iop_sw_spu_rw_bus0_clr_mask___byte1___width 8
118#define reg_iop_sw_spu_rw_bus0_clr_mask___byte2___lsb 16
119#define reg_iop_sw_spu_rw_bus0_clr_mask___byte2___width 8
120#define reg_iop_sw_spu_rw_bus0_clr_mask___byte3___lsb 24
121#define reg_iop_sw_spu_rw_bus0_clr_mask___byte3___width 8
122#define reg_iop_sw_spu_rw_bus0_clr_mask_offset 24
123
124/* Register rw_bus0_set_mask, scope iop_sw_spu, type rw */
125#define reg_iop_sw_spu_rw_bus0_set_mask___byte0___lsb 0
126#define reg_iop_sw_spu_rw_bus0_set_mask___byte0___width 8
127#define reg_iop_sw_spu_rw_bus0_set_mask___byte1___lsb 8
128#define reg_iop_sw_spu_rw_bus0_set_mask___byte1___width 8
129#define reg_iop_sw_spu_rw_bus0_set_mask___byte2___lsb 16
130#define reg_iop_sw_spu_rw_bus0_set_mask___byte2___width 8
131#define reg_iop_sw_spu_rw_bus0_set_mask___byte3___lsb 24
132#define reg_iop_sw_spu_rw_bus0_set_mask___byte3___width 8
133#define reg_iop_sw_spu_rw_bus0_set_mask_offset 28
134
135/* Register rw_bus0_oe_clr_mask, scope iop_sw_spu, type rw */
136#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte0___lsb 0
137#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte0___width 1
138#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte0___bit 0
139#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte1___lsb 1
140#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte1___width 1
141#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte1___bit 1
142#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte2___lsb 2
143#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte2___width 1
144#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte2___bit 2
145#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte3___lsb 3
146#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte3___width 1
147#define reg_iop_sw_spu_rw_bus0_oe_clr_mask___byte3___bit 3
148#define reg_iop_sw_spu_rw_bus0_oe_clr_mask_offset 32
149
150/* Register rw_bus0_oe_set_mask, scope iop_sw_spu, type rw */
151#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte0___lsb 0
152#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte0___width 1
153#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte0___bit 0
154#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte1___lsb 1
155#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte1___width 1
156#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte1___bit 1
157#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte2___lsb 2
158#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte2___width 1
159#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte2___bit 2
160#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte3___lsb 3
161#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte3___width 1
162#define reg_iop_sw_spu_rw_bus0_oe_set_mask___byte3___bit 3
163#define reg_iop_sw_spu_rw_bus0_oe_set_mask_offset 36
164
165/* Register r_bus0_in, scope iop_sw_spu, type r */
166#define reg_iop_sw_spu_r_bus0_in_offset 40
167
168/* Register rw_bus1_clr_mask, scope iop_sw_spu, type rw */
169#define reg_iop_sw_spu_rw_bus1_clr_mask___byte0___lsb 0
170#define reg_iop_sw_spu_rw_bus1_clr_mask___byte0___width 8
171#define reg_iop_sw_spu_rw_bus1_clr_mask___byte1___lsb 8
172#define reg_iop_sw_spu_rw_bus1_clr_mask___byte1___width 8
173#define reg_iop_sw_spu_rw_bus1_clr_mask___byte2___lsb 16
174#define reg_iop_sw_spu_rw_bus1_clr_mask___byte2___width 8
175#define reg_iop_sw_spu_rw_bus1_clr_mask___byte3___lsb 24
176#define reg_iop_sw_spu_rw_bus1_clr_mask___byte3___width 8
177#define reg_iop_sw_spu_rw_bus1_clr_mask_offset 44
178
179/* Register rw_bus1_set_mask, scope iop_sw_spu, type rw */
180#define reg_iop_sw_spu_rw_bus1_set_mask___byte0___lsb 0
181#define reg_iop_sw_spu_rw_bus1_set_mask___byte0___width 8
182#define reg_iop_sw_spu_rw_bus1_set_mask___byte1___lsb 8
183#define reg_iop_sw_spu_rw_bus1_set_mask___byte1___width 8
184#define reg_iop_sw_spu_rw_bus1_set_mask___byte2___lsb 16
185#define reg_iop_sw_spu_rw_bus1_set_mask___byte2___width 8
186#define reg_iop_sw_spu_rw_bus1_set_mask___byte3___lsb 24
187#define reg_iop_sw_spu_rw_bus1_set_mask___byte3___width 8
188#define reg_iop_sw_spu_rw_bus1_set_mask_offset 48
189
190/* Register rw_bus1_oe_clr_mask, scope iop_sw_spu, type rw */
191#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte0___lsb 0
192#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte0___width 1
193#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte0___bit 0
194#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte1___lsb 1
195#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte1___width 1
196#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte1___bit 1
197#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte2___lsb 2
198#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte2___width 1
199#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte2___bit 2
200#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte3___lsb 3
201#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte3___width 1
202#define reg_iop_sw_spu_rw_bus1_oe_clr_mask___byte3___bit 3
203#define reg_iop_sw_spu_rw_bus1_oe_clr_mask_offset 52
204
205/* Register rw_bus1_oe_set_mask, scope iop_sw_spu, type rw */
206#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte0___lsb 0
207#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte0___width 1
208#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte0___bit 0
209#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte1___lsb 1
210#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte1___width 1
211#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte1___bit 1
212#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte2___lsb 2
213#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte2___width 1
214#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte2___bit 2
215#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte3___lsb 3
216#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte3___width 1
217#define reg_iop_sw_spu_rw_bus1_oe_set_mask___byte3___bit 3
218#define reg_iop_sw_spu_rw_bus1_oe_set_mask_offset 56
219
220/* Register r_bus1_in, scope iop_sw_spu, type r */
221#define reg_iop_sw_spu_r_bus1_in_offset 60
222
223/* Register rw_gio_clr_mask, scope iop_sw_spu, type rw */
224#define reg_iop_sw_spu_rw_gio_clr_mask___val___lsb 0
225#define reg_iop_sw_spu_rw_gio_clr_mask___val___width 32
226#define reg_iop_sw_spu_rw_gio_clr_mask_offset 64
227
228/* Register rw_gio_set_mask, scope iop_sw_spu, type rw */
229#define reg_iop_sw_spu_rw_gio_set_mask___val___lsb 0
230#define reg_iop_sw_spu_rw_gio_set_mask___val___width 32
231#define reg_iop_sw_spu_rw_gio_set_mask_offset 68
232
233/* Register rw_gio_oe_clr_mask, scope iop_sw_spu, type rw */
234#define reg_iop_sw_spu_rw_gio_oe_clr_mask___val___lsb 0
235#define reg_iop_sw_spu_rw_gio_oe_clr_mask___val___width 32
236#define reg_iop_sw_spu_rw_gio_oe_clr_mask_offset 72
237
238/* Register rw_gio_oe_set_mask, scope iop_sw_spu, type rw */
239#define reg_iop_sw_spu_rw_gio_oe_set_mask___val___lsb 0
240#define reg_iop_sw_spu_rw_gio_oe_set_mask___val___width 32
241#define reg_iop_sw_spu_rw_gio_oe_set_mask_offset 76
242
243/* Register r_gio_in, scope iop_sw_spu, type r */
244#define reg_iop_sw_spu_r_gio_in_offset 80
245
246/* Register rw_bus0_clr_mask_lo, scope iop_sw_spu, type rw */
247#define reg_iop_sw_spu_rw_bus0_clr_mask_lo___byte0___lsb 0
248#define reg_iop_sw_spu_rw_bus0_clr_mask_lo___byte0___width 8
249#define reg_iop_sw_spu_rw_bus0_clr_mask_lo___byte1___lsb 8
250#define reg_iop_sw_spu_rw_bus0_clr_mask_lo___byte1___width 8
251#define reg_iop_sw_spu_rw_bus0_clr_mask_lo_offset 84
252
253/* Register rw_bus0_clr_mask_hi, scope iop_sw_spu, type rw */
254#define reg_iop_sw_spu_rw_bus0_clr_mask_hi___byte2___lsb 0
255#define reg_iop_sw_spu_rw_bus0_clr_mask_hi___byte2___width 8
256#define reg_iop_sw_spu_rw_bus0_clr_mask_hi___byte3___lsb 8
257#define reg_iop_sw_spu_rw_bus0_clr_mask_hi___byte3___width 8
258#define reg_iop_sw_spu_rw_bus0_clr_mask_hi_offset 88
259
260/* Register rw_bus0_set_mask_lo, scope iop_sw_spu, type rw */
261#define reg_iop_sw_spu_rw_bus0_set_mask_lo___byte0___lsb 0
262#define reg_iop_sw_spu_rw_bus0_set_mask_lo___byte0___width 8
263#define reg_iop_sw_spu_rw_bus0_set_mask_lo___byte1___lsb 8
264#define reg_iop_sw_spu_rw_bus0_set_mask_lo___byte1___width 8
265#define reg_iop_sw_spu_rw_bus0_set_mask_lo_offset 92
266
267/* Register rw_bus0_set_mask_hi, scope iop_sw_spu, type rw */
268#define reg_iop_sw_spu_rw_bus0_set_mask_hi___byte2___lsb 0
269#define reg_iop_sw_spu_rw_bus0_set_mask_hi___byte2___width 8
270#define reg_iop_sw_spu_rw_bus0_set_mask_hi___byte3___lsb 8
271#define reg_iop_sw_spu_rw_bus0_set_mask_hi___byte3___width 8
272#define reg_iop_sw_spu_rw_bus0_set_mask_hi_offset 96
273
274/* Register rw_bus1_clr_mask_lo, scope iop_sw_spu, type rw */
275#define reg_iop_sw_spu_rw_bus1_clr_mask_lo___byte0___lsb 0
276#define reg_iop_sw_spu_rw_bus1_clr_mask_lo___byte0___width 8
277#define reg_iop_sw_spu_rw_bus1_clr_mask_lo___byte1___lsb 8
278#define reg_iop_sw_spu_rw_bus1_clr_mask_lo___byte1___width 8
279#define reg_iop_sw_spu_rw_bus1_clr_mask_lo_offset 100
280
281/* Register rw_bus1_clr_mask_hi, scope iop_sw_spu, type rw */
282#define reg_iop_sw_spu_rw_bus1_clr_mask_hi___byte2___lsb 0
283#define reg_iop_sw_spu_rw_bus1_clr_mask_hi___byte2___width 8
284#define reg_iop_sw_spu_rw_bus1_clr_mask_hi___byte3___lsb 8
285#define reg_iop_sw_spu_rw_bus1_clr_mask_hi___byte3___width 8
286#define reg_iop_sw_spu_rw_bus1_clr_mask_hi_offset 104
287
288/* Register rw_bus1_set_mask_lo, scope iop_sw_spu, type rw */
289#define reg_iop_sw_spu_rw_bus1_set_mask_lo___byte0___lsb 0
290#define reg_iop_sw_spu_rw_bus1_set_mask_lo___byte0___width 8
291#define reg_iop_sw_spu_rw_bus1_set_mask_lo___byte1___lsb 8
292#define reg_iop_sw_spu_rw_bus1_set_mask_lo___byte1___width 8
293#define reg_iop_sw_spu_rw_bus1_set_mask_lo_offset 108
294
295/* Register rw_bus1_set_mask_hi, scope iop_sw_spu, type rw */
296#define reg_iop_sw_spu_rw_bus1_set_mask_hi___byte2___lsb 0
297#define reg_iop_sw_spu_rw_bus1_set_mask_hi___byte2___width 8
298#define reg_iop_sw_spu_rw_bus1_set_mask_hi___byte3___lsb 8
299#define reg_iop_sw_spu_rw_bus1_set_mask_hi___byte3___width 8
300#define reg_iop_sw_spu_rw_bus1_set_mask_hi_offset 112
301
302/* Register rw_gio_clr_mask_lo, scope iop_sw_spu, type rw */
303#define reg_iop_sw_spu_rw_gio_clr_mask_lo___val___lsb 0
304#define reg_iop_sw_spu_rw_gio_clr_mask_lo___val___width 16
305#define reg_iop_sw_spu_rw_gio_clr_mask_lo_offset 116
306
307/* Register rw_gio_clr_mask_hi, scope iop_sw_spu, type rw */
308#define reg_iop_sw_spu_rw_gio_clr_mask_hi___val___lsb 0
309#define reg_iop_sw_spu_rw_gio_clr_mask_hi___val___width 16
310#define reg_iop_sw_spu_rw_gio_clr_mask_hi_offset 120
311
312/* Register rw_gio_set_mask_lo, scope iop_sw_spu, type rw */
313#define reg_iop_sw_spu_rw_gio_set_mask_lo___val___lsb 0
314#define reg_iop_sw_spu_rw_gio_set_mask_lo___val___width 16
315#define reg_iop_sw_spu_rw_gio_set_mask_lo_offset 124
316
317/* Register rw_gio_set_mask_hi, scope iop_sw_spu, type rw */
318#define reg_iop_sw_spu_rw_gio_set_mask_hi___val___lsb 0
319#define reg_iop_sw_spu_rw_gio_set_mask_hi___val___width 16
320#define reg_iop_sw_spu_rw_gio_set_mask_hi_offset 128
321
322/* Register rw_gio_oe_clr_mask_lo, scope iop_sw_spu, type rw */
323#define reg_iop_sw_spu_rw_gio_oe_clr_mask_lo___val___lsb 0
324#define reg_iop_sw_spu_rw_gio_oe_clr_mask_lo___val___width 16
325#define reg_iop_sw_spu_rw_gio_oe_clr_mask_lo_offset 132
326
327/* Register rw_gio_oe_clr_mask_hi, scope iop_sw_spu, type rw */
328#define reg_iop_sw_spu_rw_gio_oe_clr_mask_hi___val___lsb 0
329#define reg_iop_sw_spu_rw_gio_oe_clr_mask_hi___val___width 16
330#define reg_iop_sw_spu_rw_gio_oe_clr_mask_hi_offset 136
331
332/* Register rw_gio_oe_set_mask_lo, scope iop_sw_spu, type rw */
333#define reg_iop_sw_spu_rw_gio_oe_set_mask_lo___val___lsb 0
334#define reg_iop_sw_spu_rw_gio_oe_set_mask_lo___val___width 16
335#define reg_iop_sw_spu_rw_gio_oe_set_mask_lo_offset 140
336
337/* Register rw_gio_oe_set_mask_hi, scope iop_sw_spu, type rw */
338#define reg_iop_sw_spu_rw_gio_oe_set_mask_hi___val___lsb 0
339#define reg_iop_sw_spu_rw_gio_oe_set_mask_hi___val___width 16
340#define reg_iop_sw_spu_rw_gio_oe_set_mask_hi_offset 144
341
342/* Register rw_cpu_intr, scope iop_sw_spu, type rw */
343#define reg_iop_sw_spu_rw_cpu_intr___intr0___lsb 0
344#define reg_iop_sw_spu_rw_cpu_intr___intr0___width 1
345#define reg_iop_sw_spu_rw_cpu_intr___intr0___bit 0
346#define reg_iop_sw_spu_rw_cpu_intr___intr1___lsb 1
347#define reg_iop_sw_spu_rw_cpu_intr___intr1___width 1
348#define reg_iop_sw_spu_rw_cpu_intr___intr1___bit 1
349#define reg_iop_sw_spu_rw_cpu_intr___intr2___lsb 2
350#define reg_iop_sw_spu_rw_cpu_intr___intr2___width 1
351#define reg_iop_sw_spu_rw_cpu_intr___intr2___bit 2
352#define reg_iop_sw_spu_rw_cpu_intr___intr3___lsb 3
353#define reg_iop_sw_spu_rw_cpu_intr___intr3___width 1
354#define reg_iop_sw_spu_rw_cpu_intr___intr3___bit 3
355#define reg_iop_sw_spu_rw_cpu_intr___intr4___lsb 4
356#define reg_iop_sw_spu_rw_cpu_intr___intr4___width 1
357#define reg_iop_sw_spu_rw_cpu_intr___intr4___bit 4
358#define reg_iop_sw_spu_rw_cpu_intr___intr5___lsb 5
359#define reg_iop_sw_spu_rw_cpu_intr___intr5___width 1
360#define reg_iop_sw_spu_rw_cpu_intr___intr5___bit 5
361#define reg_iop_sw_spu_rw_cpu_intr___intr6___lsb 6
362#define reg_iop_sw_spu_rw_cpu_intr___intr6___width 1
363#define reg_iop_sw_spu_rw_cpu_intr___intr6___bit 6
364#define reg_iop_sw_spu_rw_cpu_intr___intr7___lsb 7
365#define reg_iop_sw_spu_rw_cpu_intr___intr7___width 1
366#define reg_iop_sw_spu_rw_cpu_intr___intr7___bit 7
367#define reg_iop_sw_spu_rw_cpu_intr___intr8___lsb 8
368#define reg_iop_sw_spu_rw_cpu_intr___intr8___width 1
369#define reg_iop_sw_spu_rw_cpu_intr___intr8___bit 8
370#define reg_iop_sw_spu_rw_cpu_intr___intr9___lsb 9
371#define reg_iop_sw_spu_rw_cpu_intr___intr9___width 1
372#define reg_iop_sw_spu_rw_cpu_intr___intr9___bit 9
373#define reg_iop_sw_spu_rw_cpu_intr___intr10___lsb 10
374#define reg_iop_sw_spu_rw_cpu_intr___intr10___width 1
375#define reg_iop_sw_spu_rw_cpu_intr___intr10___bit 10
376#define reg_iop_sw_spu_rw_cpu_intr___intr11___lsb 11
377#define reg_iop_sw_spu_rw_cpu_intr___intr11___width 1
378#define reg_iop_sw_spu_rw_cpu_intr___intr11___bit 11
379#define reg_iop_sw_spu_rw_cpu_intr___intr12___lsb 12
380#define reg_iop_sw_spu_rw_cpu_intr___intr12___width 1
381#define reg_iop_sw_spu_rw_cpu_intr___intr12___bit 12
382#define reg_iop_sw_spu_rw_cpu_intr___intr13___lsb 13
383#define reg_iop_sw_spu_rw_cpu_intr___intr13___width 1
384#define reg_iop_sw_spu_rw_cpu_intr___intr13___bit 13
385#define reg_iop_sw_spu_rw_cpu_intr___intr14___lsb 14
386#define reg_iop_sw_spu_rw_cpu_intr___intr14___width 1
387#define reg_iop_sw_spu_rw_cpu_intr___intr14___bit 14
388#define reg_iop_sw_spu_rw_cpu_intr___intr15___lsb 15
389#define reg_iop_sw_spu_rw_cpu_intr___intr15___width 1
390#define reg_iop_sw_spu_rw_cpu_intr___intr15___bit 15
391#define reg_iop_sw_spu_rw_cpu_intr_offset 148
392
393/* Register r_cpu_intr, scope iop_sw_spu, type r */
394#define reg_iop_sw_spu_r_cpu_intr___intr0___lsb 0
395#define reg_iop_sw_spu_r_cpu_intr___intr0___width 1
396#define reg_iop_sw_spu_r_cpu_intr___intr0___bit 0
397#define reg_iop_sw_spu_r_cpu_intr___intr1___lsb 1
398#define reg_iop_sw_spu_r_cpu_intr___intr1___width 1
399#define reg_iop_sw_spu_r_cpu_intr___intr1___bit 1
400#define reg_iop_sw_spu_r_cpu_intr___intr2___lsb 2
401#define reg_iop_sw_spu_r_cpu_intr___intr2___width 1
402#define reg_iop_sw_spu_r_cpu_intr___intr2___bit 2
403#define reg_iop_sw_spu_r_cpu_intr___intr3___lsb 3
404#define reg_iop_sw_spu_r_cpu_intr___intr3___width 1
405#define reg_iop_sw_spu_r_cpu_intr___intr3___bit 3
406#define reg_iop_sw_spu_r_cpu_intr___intr4___lsb 4
407#define reg_iop_sw_spu_r_cpu_intr___intr4___width 1
408#define reg_iop_sw_spu_r_cpu_intr___intr4___bit 4
409#define reg_iop_sw_spu_r_cpu_intr___intr5___lsb 5
410#define reg_iop_sw_spu_r_cpu_intr___intr5___width 1
411#define reg_iop_sw_spu_r_cpu_intr___intr5___bit 5
412#define reg_iop_sw_spu_r_cpu_intr___intr6___lsb 6
413#define reg_iop_sw_spu_r_cpu_intr___intr6___width 1
414#define reg_iop_sw_spu_r_cpu_intr___intr6___bit 6
415#define reg_iop_sw_spu_r_cpu_intr___intr7___lsb 7
416#define reg_iop_sw_spu_r_cpu_intr___intr7___width 1
417#define reg_iop_sw_spu_r_cpu_intr___intr7___bit 7
418#define reg_iop_sw_spu_r_cpu_intr___intr8___lsb 8
419#define reg_iop_sw_spu_r_cpu_intr___intr8___width 1
420#define reg_iop_sw_spu_r_cpu_intr___intr8___bit 8
421#define reg_iop_sw_spu_r_cpu_intr___intr9___lsb 9
422#define reg_iop_sw_spu_r_cpu_intr___intr9___width 1
423#define reg_iop_sw_spu_r_cpu_intr___intr9___bit 9
424#define reg_iop_sw_spu_r_cpu_intr___intr10___lsb 10
425#define reg_iop_sw_spu_r_cpu_intr___intr10___width 1
426#define reg_iop_sw_spu_r_cpu_intr___intr10___bit 10
427#define reg_iop_sw_spu_r_cpu_intr___intr11___lsb 11
428#define reg_iop_sw_spu_r_cpu_intr___intr11___width 1
429#define reg_iop_sw_spu_r_cpu_intr___intr11___bit 11
430#define reg_iop_sw_spu_r_cpu_intr___intr12___lsb 12
431#define reg_iop_sw_spu_r_cpu_intr___intr12___width 1
432#define reg_iop_sw_spu_r_cpu_intr___intr12___bit 12
433#define reg_iop_sw_spu_r_cpu_intr___intr13___lsb 13
434#define reg_iop_sw_spu_r_cpu_intr___intr13___width 1
435#define reg_iop_sw_spu_r_cpu_intr___intr13___bit 13
436#define reg_iop_sw_spu_r_cpu_intr___intr14___lsb 14
437#define reg_iop_sw_spu_r_cpu_intr___intr14___width 1
438#define reg_iop_sw_spu_r_cpu_intr___intr14___bit 14
439#define reg_iop_sw_spu_r_cpu_intr___intr15___lsb 15
440#define reg_iop_sw_spu_r_cpu_intr___intr15___width 1
441#define reg_iop_sw_spu_r_cpu_intr___intr15___bit 15
442#define reg_iop_sw_spu_r_cpu_intr_offset 152
443
444/* Register r_hw_intr, scope iop_sw_spu, type r */
445#define reg_iop_sw_spu_r_hw_intr___trigger_grp0___lsb 0
446#define reg_iop_sw_spu_r_hw_intr___trigger_grp0___width 1
447#define reg_iop_sw_spu_r_hw_intr___trigger_grp0___bit 0
448#define reg_iop_sw_spu_r_hw_intr___trigger_grp1___lsb 1
449#define reg_iop_sw_spu_r_hw_intr___trigger_grp1___width 1
450#define reg_iop_sw_spu_r_hw_intr___trigger_grp1___bit 1
451#define reg_iop_sw_spu_r_hw_intr___trigger_grp2___lsb 2
452#define reg_iop_sw_spu_r_hw_intr___trigger_grp2___width 1
453#define reg_iop_sw_spu_r_hw_intr___trigger_grp2___bit 2
454#define reg_iop_sw_spu_r_hw_intr___trigger_grp3___lsb 3
455#define reg_iop_sw_spu_r_hw_intr___trigger_grp3___width 1
456#define reg_iop_sw_spu_r_hw_intr___trigger_grp3___bit 3
457#define reg_iop_sw_spu_r_hw_intr___trigger_grp4___lsb 4
458#define reg_iop_sw_spu_r_hw_intr___trigger_grp4___width 1
459#define reg_iop_sw_spu_r_hw_intr___trigger_grp4___bit 4
460#define reg_iop_sw_spu_r_hw_intr___trigger_grp5___lsb 5
461#define reg_iop_sw_spu_r_hw_intr___trigger_grp5___width 1
462#define reg_iop_sw_spu_r_hw_intr___trigger_grp5___bit 5
463#define reg_iop_sw_spu_r_hw_intr___trigger_grp6___lsb 6
464#define reg_iop_sw_spu_r_hw_intr___trigger_grp6___width 1
465#define reg_iop_sw_spu_r_hw_intr___trigger_grp6___bit 6
466#define reg_iop_sw_spu_r_hw_intr___trigger_grp7___lsb 7
467#define reg_iop_sw_spu_r_hw_intr___trigger_grp7___width 1
468#define reg_iop_sw_spu_r_hw_intr___trigger_grp7___bit 7
469#define reg_iop_sw_spu_r_hw_intr___timer_grp0___lsb 8
470#define reg_iop_sw_spu_r_hw_intr___timer_grp0___width 1
471#define reg_iop_sw_spu_r_hw_intr___timer_grp0___bit 8
472#define reg_iop_sw_spu_r_hw_intr___timer_grp1___lsb 9
473#define reg_iop_sw_spu_r_hw_intr___timer_grp1___width 1
474#define reg_iop_sw_spu_r_hw_intr___timer_grp1___bit 9
475#define reg_iop_sw_spu_r_hw_intr___timer_grp2___lsb 10
476#define reg_iop_sw_spu_r_hw_intr___timer_grp2___width 1
477#define reg_iop_sw_spu_r_hw_intr___timer_grp2___bit 10
478#define reg_iop_sw_spu_r_hw_intr___timer_grp3___lsb 11
479#define reg_iop_sw_spu_r_hw_intr___timer_grp3___width 1
480#define reg_iop_sw_spu_r_hw_intr___timer_grp3___bit 11
481#define reg_iop_sw_spu_r_hw_intr___fifo_out0___lsb 12
482#define reg_iop_sw_spu_r_hw_intr___fifo_out0___width 1
483#define reg_iop_sw_spu_r_hw_intr___fifo_out0___bit 12
484#define reg_iop_sw_spu_r_hw_intr___fifo_out0_extra___lsb 13
485#define reg_iop_sw_spu_r_hw_intr___fifo_out0_extra___width 1
486#define reg_iop_sw_spu_r_hw_intr___fifo_out0_extra___bit 13
487#define reg_iop_sw_spu_r_hw_intr___fifo_in0___lsb 14
488#define reg_iop_sw_spu_r_hw_intr___fifo_in0___width 1
489#define reg_iop_sw_spu_r_hw_intr___fifo_in0___bit 14
490#define reg_iop_sw_spu_r_hw_intr___fifo_in0_extra___lsb 15
491#define reg_iop_sw_spu_r_hw_intr___fifo_in0_extra___width 1
492#define reg_iop_sw_spu_r_hw_intr___fifo_in0_extra___bit 15
493#define reg_iop_sw_spu_r_hw_intr___fifo_out1___lsb 16
494#define reg_iop_sw_spu_r_hw_intr___fifo_out1___width 1
495#define reg_iop_sw_spu_r_hw_intr___fifo_out1___bit 16
496#define reg_iop_sw_spu_r_hw_intr___fifo_out1_extra___lsb 17
497#define reg_iop_sw_spu_r_hw_intr___fifo_out1_extra___width 1
498#define reg_iop_sw_spu_r_hw_intr___fifo_out1_extra___bit 17
499#define reg_iop_sw_spu_r_hw_intr___fifo_in1___lsb 18
500#define reg_iop_sw_spu_r_hw_intr___fifo_in1___width 1
501#define reg_iop_sw_spu_r_hw_intr___fifo_in1___bit 18
502#define reg_iop_sw_spu_r_hw_intr___fifo_in1_extra___lsb 19
503#define reg_iop_sw_spu_r_hw_intr___fifo_in1_extra___width 1
504#define reg_iop_sw_spu_r_hw_intr___fifo_in1_extra___bit 19
505#define reg_iop_sw_spu_r_hw_intr___dmc_out0___lsb 20
506#define reg_iop_sw_spu_r_hw_intr___dmc_out0___width 1
507#define reg_iop_sw_spu_r_hw_intr___dmc_out0___bit 20
508#define reg_iop_sw_spu_r_hw_intr___dmc_in0___lsb 21
509#define reg_iop_sw_spu_r_hw_intr___dmc_in0___width 1
510#define reg_iop_sw_spu_r_hw_intr___dmc_in0___bit 21
511#define reg_iop_sw_spu_r_hw_intr___dmc_out1___lsb 22
512#define reg_iop_sw_spu_r_hw_intr___dmc_out1___width 1
513#define reg_iop_sw_spu_r_hw_intr___dmc_out1___bit 22
514#define reg_iop_sw_spu_r_hw_intr___dmc_in1___lsb 23
515#define reg_iop_sw_spu_r_hw_intr___dmc_in1___width 1
516#define reg_iop_sw_spu_r_hw_intr___dmc_in1___bit 23
517#define reg_iop_sw_spu_r_hw_intr_offset 156
518
519/* Register rw_mpu_intr, scope iop_sw_spu, type rw */
520#define reg_iop_sw_spu_rw_mpu_intr___intr0___lsb 0
521#define reg_iop_sw_spu_rw_mpu_intr___intr0___width 1
522#define reg_iop_sw_spu_rw_mpu_intr___intr0___bit 0
523#define reg_iop_sw_spu_rw_mpu_intr___intr1___lsb 1
524#define reg_iop_sw_spu_rw_mpu_intr___intr1___width 1
525#define reg_iop_sw_spu_rw_mpu_intr___intr1___bit 1
526#define reg_iop_sw_spu_rw_mpu_intr___intr2___lsb 2
527#define reg_iop_sw_spu_rw_mpu_intr___intr2___width 1
528#define reg_iop_sw_spu_rw_mpu_intr___intr2___bit 2
529#define reg_iop_sw_spu_rw_mpu_intr___intr3___lsb 3
530#define reg_iop_sw_spu_rw_mpu_intr___intr3___width 1
531#define reg_iop_sw_spu_rw_mpu_intr___intr3___bit 3
532#define reg_iop_sw_spu_rw_mpu_intr___intr4___lsb 4
533#define reg_iop_sw_spu_rw_mpu_intr___intr4___width 1
534#define reg_iop_sw_spu_rw_mpu_intr___intr4___bit 4
535#define reg_iop_sw_spu_rw_mpu_intr___intr5___lsb 5
536#define reg_iop_sw_spu_rw_mpu_intr___intr5___width 1
537#define reg_iop_sw_spu_rw_mpu_intr___intr5___bit 5
538#define reg_iop_sw_spu_rw_mpu_intr___intr6___lsb 6
539#define reg_iop_sw_spu_rw_mpu_intr___intr6___width 1
540#define reg_iop_sw_spu_rw_mpu_intr___intr6___bit 6
541#define reg_iop_sw_spu_rw_mpu_intr___intr7___lsb 7
542#define reg_iop_sw_spu_rw_mpu_intr___intr7___width 1
543#define reg_iop_sw_spu_rw_mpu_intr___intr7___bit 7
544#define reg_iop_sw_spu_rw_mpu_intr___intr8___lsb 8
545#define reg_iop_sw_spu_rw_mpu_intr___intr8___width 1
546#define reg_iop_sw_spu_rw_mpu_intr___intr8___bit 8
547#define reg_iop_sw_spu_rw_mpu_intr___intr9___lsb 9
548#define reg_iop_sw_spu_rw_mpu_intr___intr9___width 1
549#define reg_iop_sw_spu_rw_mpu_intr___intr9___bit 9
550#define reg_iop_sw_spu_rw_mpu_intr___intr10___lsb 10
551#define reg_iop_sw_spu_rw_mpu_intr___intr10___width 1
552#define reg_iop_sw_spu_rw_mpu_intr___intr10___bit 10
553#define reg_iop_sw_spu_rw_mpu_intr___intr11___lsb 11
554#define reg_iop_sw_spu_rw_mpu_intr___intr11___width 1
555#define reg_iop_sw_spu_rw_mpu_intr___intr11___bit 11
556#define reg_iop_sw_spu_rw_mpu_intr___intr12___lsb 12
557#define reg_iop_sw_spu_rw_mpu_intr___intr12___width 1
558#define reg_iop_sw_spu_rw_mpu_intr___intr12___bit 12
559#define reg_iop_sw_spu_rw_mpu_intr___intr13___lsb 13
560#define reg_iop_sw_spu_rw_mpu_intr___intr13___width 1
561#define reg_iop_sw_spu_rw_mpu_intr___intr13___bit 13
562#define reg_iop_sw_spu_rw_mpu_intr___intr14___lsb 14
563#define reg_iop_sw_spu_rw_mpu_intr___intr14___width 1
564#define reg_iop_sw_spu_rw_mpu_intr___intr14___bit 14
565#define reg_iop_sw_spu_rw_mpu_intr___intr15___lsb 15
566#define reg_iop_sw_spu_rw_mpu_intr___intr15___width 1
567#define reg_iop_sw_spu_rw_mpu_intr___intr15___bit 15
568#define reg_iop_sw_spu_rw_mpu_intr_offset 160
569
570/* Register r_mpu_intr, scope iop_sw_spu, type r */
571#define reg_iop_sw_spu_r_mpu_intr___intr0___lsb 0
572#define reg_iop_sw_spu_r_mpu_intr___intr0___width 1
573#define reg_iop_sw_spu_r_mpu_intr___intr0___bit 0
574#define reg_iop_sw_spu_r_mpu_intr___intr1___lsb 1
575#define reg_iop_sw_spu_r_mpu_intr___intr1___width 1
576#define reg_iop_sw_spu_r_mpu_intr___intr1___bit 1
577#define reg_iop_sw_spu_r_mpu_intr___intr2___lsb 2
578#define reg_iop_sw_spu_r_mpu_intr___intr2___width 1
579#define reg_iop_sw_spu_r_mpu_intr___intr2___bit 2
580#define reg_iop_sw_spu_r_mpu_intr___intr3___lsb 3
581#define reg_iop_sw_spu_r_mpu_intr___intr3___width 1
582#define reg_iop_sw_spu_r_mpu_intr___intr3___bit 3
583#define reg_iop_sw_spu_r_mpu_intr___intr4___lsb 4
584#define reg_iop_sw_spu_r_mpu_intr___intr4___width 1
585#define reg_iop_sw_spu_r_mpu_intr___intr4___bit 4
586#define reg_iop_sw_spu_r_mpu_intr___intr5___lsb 5
587#define reg_iop_sw_spu_r_mpu_intr___intr5___width 1
588#define reg_iop_sw_spu_r_mpu_intr___intr5___bit 5
589#define reg_iop_sw_spu_r_mpu_intr___intr6___lsb 6
590#define reg_iop_sw_spu_r_mpu_intr___intr6___width 1
591#define reg_iop_sw_spu_r_mpu_intr___intr6___bit 6
592#define reg_iop_sw_spu_r_mpu_intr___intr7___lsb 7
593#define reg_iop_sw_spu_r_mpu_intr___intr7___width 1
594#define reg_iop_sw_spu_r_mpu_intr___intr7___bit 7
595#define reg_iop_sw_spu_r_mpu_intr___intr8___lsb 8
596#define reg_iop_sw_spu_r_mpu_intr___intr8___width 1
597#define reg_iop_sw_spu_r_mpu_intr___intr8___bit 8
598#define reg_iop_sw_spu_r_mpu_intr___intr9___lsb 9
599#define reg_iop_sw_spu_r_mpu_intr___intr9___width 1
600#define reg_iop_sw_spu_r_mpu_intr___intr9___bit 9
601#define reg_iop_sw_spu_r_mpu_intr___intr10___lsb 10
602#define reg_iop_sw_spu_r_mpu_intr___intr10___width 1
603#define reg_iop_sw_spu_r_mpu_intr___intr10___bit 10
604#define reg_iop_sw_spu_r_mpu_intr___intr11___lsb 11
605#define reg_iop_sw_spu_r_mpu_intr___intr11___width 1
606#define reg_iop_sw_spu_r_mpu_intr___intr11___bit 11
607#define reg_iop_sw_spu_r_mpu_intr___intr12___lsb 12
608#define reg_iop_sw_spu_r_mpu_intr___intr12___width 1
609#define reg_iop_sw_spu_r_mpu_intr___intr12___bit 12
610#define reg_iop_sw_spu_r_mpu_intr___intr13___lsb 13
611#define reg_iop_sw_spu_r_mpu_intr___intr13___width 1
612#define reg_iop_sw_spu_r_mpu_intr___intr13___bit 13
613#define reg_iop_sw_spu_r_mpu_intr___intr14___lsb 14
614#define reg_iop_sw_spu_r_mpu_intr___intr14___width 1
615#define reg_iop_sw_spu_r_mpu_intr___intr14___bit 14
616#define reg_iop_sw_spu_r_mpu_intr___intr15___lsb 15
617#define reg_iop_sw_spu_r_mpu_intr___intr15___width 1
618#define reg_iop_sw_spu_r_mpu_intr___intr15___bit 15
619#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr0___lsb 16
620#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr0___width 1
621#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr0___bit 16
622#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr1___lsb 17
623#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr1___width 1
624#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr1___bit 17
625#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr2___lsb 18
626#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr2___width 1
627#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr2___bit 18
628#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr3___lsb 19
629#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr3___width 1
630#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr3___bit 19
631#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr4___lsb 20
632#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr4___width 1
633#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr4___bit 20
634#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr5___lsb 21
635#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr5___width 1
636#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr5___bit 21
637#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr6___lsb 22
638#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr6___width 1
639#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr6___bit 22
640#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr7___lsb 23
641#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr7___width 1
642#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr7___bit 23
643#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr8___lsb 24
644#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr8___width 1
645#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr8___bit 24
646#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr9___lsb 25
647#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr9___width 1
648#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr9___bit 25
649#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr10___lsb 26
650#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr10___width 1
651#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr10___bit 26
652#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr11___lsb 27
653#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr11___width 1
654#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr11___bit 27
655#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr12___lsb 28
656#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr12___width 1
657#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr12___bit 28
658#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr13___lsb 29
659#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr13___width 1
660#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr13___bit 29
661#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr14___lsb 30
662#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr14___width 1
663#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr14___bit 30
664#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr15___lsb 31
665#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr15___width 1
666#define reg_iop_sw_spu_r_mpu_intr___other_spu_intr15___bit 31
667#define reg_iop_sw_spu_r_mpu_intr_offset 164
668
669
670/* Constants */
671#define regk_iop_sw_spu_copy 0x00000000
672#define regk_iop_sw_spu_no 0x00000000
673#define regk_iop_sw_spu_nop 0x00000000
674#define regk_iop_sw_spu_rd 0x00000002
675#define regk_iop_sw_spu_reg_copy 0x00000001
676#define regk_iop_sw_spu_rw_bus0_clr_mask_default 0x00000000
677#define regk_iop_sw_spu_rw_bus0_oe_clr_mask_default 0x00000000
678#define regk_iop_sw_spu_rw_bus0_oe_set_mask_default 0x00000000
679#define regk_iop_sw_spu_rw_bus0_set_mask_default 0x00000000
680#define regk_iop_sw_spu_rw_bus1_clr_mask_default 0x00000000
681#define regk_iop_sw_spu_rw_bus1_oe_clr_mask_default 0x00000000
682#define regk_iop_sw_spu_rw_bus1_oe_set_mask_default 0x00000000
683#define regk_iop_sw_spu_rw_bus1_set_mask_default 0x00000000
684#define regk_iop_sw_spu_rw_gio_clr_mask_default 0x00000000
685#define regk_iop_sw_spu_rw_gio_oe_clr_mask_default 0x00000000
686#define regk_iop_sw_spu_rw_gio_oe_set_mask_default 0x00000000
687#define regk_iop_sw_spu_rw_gio_set_mask_default 0x00000000
688#define regk_iop_sw_spu_set 0x00000001
689#define regk_iop_sw_spu_wr 0x00000003
690#define regk_iop_sw_spu_yes 0x00000001
691#endif /* __iop_sw_spu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_timer_grp_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_timer_grp_defs_asm.h
deleted file mode 100644
index 7129a9a4bedc..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_timer_grp_defs_asm.h
+++ /dev/null
@@ -1,237 +0,0 @@
1#ifndef __iop_timer_grp_defs_asm_h
2#define __iop_timer_grp_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_timer_grp.r
7 * id: iop_timer_grp.r,v 1.29 2005/02/16 09:13:27 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_timer_grp_defs_asm.h ../../inst/io_proc/rtl/iop_timer_grp.r
11 * id: $Id: iop_timer_grp_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_cfg, scope iop_timer_grp, type rw */
57#define reg_iop_timer_grp_rw_cfg___clk_src___lsb 0
58#define reg_iop_timer_grp_rw_cfg___clk_src___width 1
59#define reg_iop_timer_grp_rw_cfg___clk_src___bit 0
60#define reg_iop_timer_grp_rw_cfg___trig___lsb 1
61#define reg_iop_timer_grp_rw_cfg___trig___width 2
62#define reg_iop_timer_grp_rw_cfg___clk_gen_div___lsb 3
63#define reg_iop_timer_grp_rw_cfg___clk_gen_div___width 8
64#define reg_iop_timer_grp_rw_cfg___clk_div___lsb 11
65#define reg_iop_timer_grp_rw_cfg___clk_div___width 8
66#define reg_iop_timer_grp_rw_cfg_offset 0
67
68/* Register rw_half_period, scope iop_timer_grp, type rw */
69#define reg_iop_timer_grp_rw_half_period___quota_lo___lsb 0
70#define reg_iop_timer_grp_rw_half_period___quota_lo___width 15
71#define reg_iop_timer_grp_rw_half_period___quota_hi___lsb 15
72#define reg_iop_timer_grp_rw_half_period___quota_hi___width 15
73#define reg_iop_timer_grp_rw_half_period___quota_hi_sel___lsb 30
74#define reg_iop_timer_grp_rw_half_period___quota_hi_sel___width 1
75#define reg_iop_timer_grp_rw_half_period___quota_hi_sel___bit 30
76#define reg_iop_timer_grp_rw_half_period_offset 4
77
78/* Register rw_half_period_len, scope iop_timer_grp, type rw */
79#define reg_iop_timer_grp_rw_half_period_len_offset 8
80
81#define STRIDE_iop_timer_grp_rw_tmr_cfg 4
82/* Register rw_tmr_cfg, scope iop_timer_grp, type rw */
83#define reg_iop_timer_grp_rw_tmr_cfg___clk_src___lsb 0
84#define reg_iop_timer_grp_rw_tmr_cfg___clk_src___width 3
85#define reg_iop_timer_grp_rw_tmr_cfg___strb___lsb 3
86#define reg_iop_timer_grp_rw_tmr_cfg___strb___width 2
87#define reg_iop_timer_grp_rw_tmr_cfg___run_mode___lsb 5
88#define reg_iop_timer_grp_rw_tmr_cfg___run_mode___width 2
89#define reg_iop_timer_grp_rw_tmr_cfg___out_mode___lsb 7
90#define reg_iop_timer_grp_rw_tmr_cfg___out_mode___width 1
91#define reg_iop_timer_grp_rw_tmr_cfg___out_mode___bit 7
92#define reg_iop_timer_grp_rw_tmr_cfg___active_on_tmr___lsb 8
93#define reg_iop_timer_grp_rw_tmr_cfg___active_on_tmr___width 2
94#define reg_iop_timer_grp_rw_tmr_cfg___inv___lsb 10
95#define reg_iop_timer_grp_rw_tmr_cfg___inv___width 1
96#define reg_iop_timer_grp_rw_tmr_cfg___inv___bit 10
97#define reg_iop_timer_grp_rw_tmr_cfg___en_by_tmr___lsb 11
98#define reg_iop_timer_grp_rw_tmr_cfg___en_by_tmr___width 2
99#define reg_iop_timer_grp_rw_tmr_cfg___dis_by_tmr___lsb 13
100#define reg_iop_timer_grp_rw_tmr_cfg___dis_by_tmr___width 2
101#define reg_iop_timer_grp_rw_tmr_cfg___en_only_by_reg___lsb 15
102#define reg_iop_timer_grp_rw_tmr_cfg___en_only_by_reg___width 1
103#define reg_iop_timer_grp_rw_tmr_cfg___en_only_by_reg___bit 15
104#define reg_iop_timer_grp_rw_tmr_cfg___dis_only_by_reg___lsb 16
105#define reg_iop_timer_grp_rw_tmr_cfg___dis_only_by_reg___width 1
106#define reg_iop_timer_grp_rw_tmr_cfg___dis_only_by_reg___bit 16
107#define reg_iop_timer_grp_rw_tmr_cfg___rst_at_en_strb___lsb 17
108#define reg_iop_timer_grp_rw_tmr_cfg___rst_at_en_strb___width 1
109#define reg_iop_timer_grp_rw_tmr_cfg___rst_at_en_strb___bit 17
110#define reg_iop_timer_grp_rw_tmr_cfg_offset 12
111
112#define STRIDE_iop_timer_grp_rw_tmr_len 4
113/* Register rw_tmr_len, scope iop_timer_grp, type rw */
114#define reg_iop_timer_grp_rw_tmr_len___val___lsb 0
115#define reg_iop_timer_grp_rw_tmr_len___val___width 16
116#define reg_iop_timer_grp_rw_tmr_len_offset 44
117
118/* Register rw_cmd, scope iop_timer_grp, type rw */
119#define reg_iop_timer_grp_rw_cmd___rst___lsb 0
120#define reg_iop_timer_grp_rw_cmd___rst___width 4
121#define reg_iop_timer_grp_rw_cmd___en___lsb 4
122#define reg_iop_timer_grp_rw_cmd___en___width 4
123#define reg_iop_timer_grp_rw_cmd___dis___lsb 8
124#define reg_iop_timer_grp_rw_cmd___dis___width 4
125#define reg_iop_timer_grp_rw_cmd___strb___lsb 12
126#define reg_iop_timer_grp_rw_cmd___strb___width 4
127#define reg_iop_timer_grp_rw_cmd_offset 60
128
129/* Register r_clk_gen_cnt, scope iop_timer_grp, type r */
130#define reg_iop_timer_grp_r_clk_gen_cnt_offset 64
131
132#define STRIDE_iop_timer_grp_rs_tmr_cnt 8
133/* Register rs_tmr_cnt, scope iop_timer_grp, type rs */
134#define reg_iop_timer_grp_rs_tmr_cnt___val___lsb 0
135#define reg_iop_timer_grp_rs_tmr_cnt___val___width 16
136#define reg_iop_timer_grp_rs_tmr_cnt_offset 68
137
138#define STRIDE_iop_timer_grp_r_tmr_cnt 8
139/* Register r_tmr_cnt, scope iop_timer_grp, type r */
140#define reg_iop_timer_grp_r_tmr_cnt___val___lsb 0
141#define reg_iop_timer_grp_r_tmr_cnt___val___width 16
142#define reg_iop_timer_grp_r_tmr_cnt_offset 72
143
144/* Register rw_intr_mask, scope iop_timer_grp, type rw */
145#define reg_iop_timer_grp_rw_intr_mask___tmr0___lsb 0
146#define reg_iop_timer_grp_rw_intr_mask___tmr0___width 1
147#define reg_iop_timer_grp_rw_intr_mask___tmr0___bit 0
148#define reg_iop_timer_grp_rw_intr_mask___tmr1___lsb 1
149#define reg_iop_timer_grp_rw_intr_mask___tmr1___width 1
150#define reg_iop_timer_grp_rw_intr_mask___tmr1___bit 1
151#define reg_iop_timer_grp_rw_intr_mask___tmr2___lsb 2
152#define reg_iop_timer_grp_rw_intr_mask___tmr2___width 1
153#define reg_iop_timer_grp_rw_intr_mask___tmr2___bit 2
154#define reg_iop_timer_grp_rw_intr_mask___tmr3___lsb 3
155#define reg_iop_timer_grp_rw_intr_mask___tmr3___width 1
156#define reg_iop_timer_grp_rw_intr_mask___tmr3___bit 3
157#define reg_iop_timer_grp_rw_intr_mask_offset 100
158
159/* Register rw_ack_intr, scope iop_timer_grp, type rw */
160#define reg_iop_timer_grp_rw_ack_intr___tmr0___lsb 0
161#define reg_iop_timer_grp_rw_ack_intr___tmr0___width 1
162#define reg_iop_timer_grp_rw_ack_intr___tmr0___bit 0
163#define reg_iop_timer_grp_rw_ack_intr___tmr1___lsb 1
164#define reg_iop_timer_grp_rw_ack_intr___tmr1___width 1
165#define reg_iop_timer_grp_rw_ack_intr___tmr1___bit 1
166#define reg_iop_timer_grp_rw_ack_intr___tmr2___lsb 2
167#define reg_iop_timer_grp_rw_ack_intr___tmr2___width 1
168#define reg_iop_timer_grp_rw_ack_intr___tmr2___bit 2
169#define reg_iop_timer_grp_rw_ack_intr___tmr3___lsb 3
170#define reg_iop_timer_grp_rw_ack_intr___tmr3___width 1
171#define reg_iop_timer_grp_rw_ack_intr___tmr3___bit 3
172#define reg_iop_timer_grp_rw_ack_intr_offset 104
173
174/* Register r_intr, scope iop_timer_grp, type r */
175#define reg_iop_timer_grp_r_intr___tmr0___lsb 0
176#define reg_iop_timer_grp_r_intr___tmr0___width 1
177#define reg_iop_timer_grp_r_intr___tmr0___bit 0
178#define reg_iop_timer_grp_r_intr___tmr1___lsb 1
179#define reg_iop_timer_grp_r_intr___tmr1___width 1
180#define reg_iop_timer_grp_r_intr___tmr1___bit 1
181#define reg_iop_timer_grp_r_intr___tmr2___lsb 2
182#define reg_iop_timer_grp_r_intr___tmr2___width 1
183#define reg_iop_timer_grp_r_intr___tmr2___bit 2
184#define reg_iop_timer_grp_r_intr___tmr3___lsb 3
185#define reg_iop_timer_grp_r_intr___tmr3___width 1
186#define reg_iop_timer_grp_r_intr___tmr3___bit 3
187#define reg_iop_timer_grp_r_intr_offset 108
188
189/* Register r_masked_intr, scope iop_timer_grp, type r */
190#define reg_iop_timer_grp_r_masked_intr___tmr0___lsb 0
191#define reg_iop_timer_grp_r_masked_intr___tmr0___width 1
192#define reg_iop_timer_grp_r_masked_intr___tmr0___bit 0
193#define reg_iop_timer_grp_r_masked_intr___tmr1___lsb 1
194#define reg_iop_timer_grp_r_masked_intr___tmr1___width 1
195#define reg_iop_timer_grp_r_masked_intr___tmr1___bit 1
196#define reg_iop_timer_grp_r_masked_intr___tmr2___lsb 2
197#define reg_iop_timer_grp_r_masked_intr___tmr2___width 1
198#define reg_iop_timer_grp_r_masked_intr___tmr2___bit 2
199#define reg_iop_timer_grp_r_masked_intr___tmr3___lsb 3
200#define reg_iop_timer_grp_r_masked_intr___tmr3___width 1
201#define reg_iop_timer_grp_r_masked_intr___tmr3___bit 3
202#define reg_iop_timer_grp_r_masked_intr_offset 112
203
204
205/* Constants */
206#define regk_iop_timer_grp_clk200 0x00000000
207#define regk_iop_timer_grp_clk_gen 0x00000002
208#define regk_iop_timer_grp_complete 0x00000002
209#define regk_iop_timer_grp_div_clk200 0x00000001
210#define regk_iop_timer_grp_div_clk_gen 0x00000003
211#define regk_iop_timer_grp_ext 0x00000001
212#define regk_iop_timer_grp_hi 0x00000000
213#define regk_iop_timer_grp_long_period 0x00000001
214#define regk_iop_timer_grp_neg 0x00000002
215#define regk_iop_timer_grp_no 0x00000000
216#define regk_iop_timer_grp_once 0x00000003
217#define regk_iop_timer_grp_pause 0x00000001
218#define regk_iop_timer_grp_pos 0x00000001
219#define regk_iop_timer_grp_pos_neg 0x00000003
220#define regk_iop_timer_grp_pulse 0x00000000
221#define regk_iop_timer_grp_r_tmr_cnt_size 0x00000004
222#define regk_iop_timer_grp_rs_tmr_cnt_size 0x00000004
223#define regk_iop_timer_grp_rw_cfg_default 0x00000002
224#define regk_iop_timer_grp_rw_intr_mask_default 0x00000000
225#define regk_iop_timer_grp_rw_tmr_cfg_default0 0x00018000
226#define regk_iop_timer_grp_rw_tmr_cfg_default1 0x0001a900
227#define regk_iop_timer_grp_rw_tmr_cfg_default2 0x0001d200
228#define regk_iop_timer_grp_rw_tmr_cfg_default3 0x0001fb00
229#define regk_iop_timer_grp_rw_tmr_cfg_size 0x00000004
230#define regk_iop_timer_grp_rw_tmr_len_default 0x00000000
231#define regk_iop_timer_grp_rw_tmr_len_size 0x00000004
232#define regk_iop_timer_grp_short_period 0x00000000
233#define regk_iop_timer_grp_stop 0x00000000
234#define regk_iop_timer_grp_tmr 0x00000004
235#define regk_iop_timer_grp_toggle 0x00000001
236#define regk_iop_timer_grp_yes 0x00000001
237#endif /* __iop_timer_grp_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_trigger_grp_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_trigger_grp_defs_asm.h
deleted file mode 100644
index 1005d9db80dc..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_trigger_grp_defs_asm.h
+++ /dev/null
@@ -1,157 +0,0 @@
1#ifndef __iop_trigger_grp_defs_asm_h
2#define __iop_trigger_grp_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_trigger_grp.r
7 * id: iop_trigger_grp.r,v 0.20 2005/02/16 09:13:20 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_trigger_grp_defs_asm.h ../../inst/io_proc/rtl/iop_trigger_grp.r
11 * id: $Id: iop_trigger_grp_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56#define STRIDE_iop_trigger_grp_rw_cfg 4
57/* Register rw_cfg, scope iop_trigger_grp, type rw */
58#define reg_iop_trigger_grp_rw_cfg___action___lsb 0
59#define reg_iop_trigger_grp_rw_cfg___action___width 2
60#define reg_iop_trigger_grp_rw_cfg___once___lsb 2
61#define reg_iop_trigger_grp_rw_cfg___once___width 1
62#define reg_iop_trigger_grp_rw_cfg___once___bit 2
63#define reg_iop_trigger_grp_rw_cfg___trig___lsb 3
64#define reg_iop_trigger_grp_rw_cfg___trig___width 3
65#define reg_iop_trigger_grp_rw_cfg___en_only_by_reg___lsb 6
66#define reg_iop_trigger_grp_rw_cfg___en_only_by_reg___width 1
67#define reg_iop_trigger_grp_rw_cfg___en_only_by_reg___bit 6
68#define reg_iop_trigger_grp_rw_cfg___dis_only_by_reg___lsb 7
69#define reg_iop_trigger_grp_rw_cfg___dis_only_by_reg___width 1
70#define reg_iop_trigger_grp_rw_cfg___dis_only_by_reg___bit 7
71#define reg_iop_trigger_grp_rw_cfg_offset 0
72
73/* Register rw_cmd, scope iop_trigger_grp, type rw */
74#define reg_iop_trigger_grp_rw_cmd___dis___lsb 0
75#define reg_iop_trigger_grp_rw_cmd___dis___width 4
76#define reg_iop_trigger_grp_rw_cmd___en___lsb 4
77#define reg_iop_trigger_grp_rw_cmd___en___width 4
78#define reg_iop_trigger_grp_rw_cmd_offset 16
79
80/* Register rw_intr_mask, scope iop_trigger_grp, type rw */
81#define reg_iop_trigger_grp_rw_intr_mask___trig0___lsb 0
82#define reg_iop_trigger_grp_rw_intr_mask___trig0___width 1
83#define reg_iop_trigger_grp_rw_intr_mask___trig0___bit 0
84#define reg_iop_trigger_grp_rw_intr_mask___trig1___lsb 1
85#define reg_iop_trigger_grp_rw_intr_mask___trig1___width 1
86#define reg_iop_trigger_grp_rw_intr_mask___trig1___bit 1
87#define reg_iop_trigger_grp_rw_intr_mask___trig2___lsb 2
88#define reg_iop_trigger_grp_rw_intr_mask___trig2___width 1
89#define reg_iop_trigger_grp_rw_intr_mask___trig2___bit 2
90#define reg_iop_trigger_grp_rw_intr_mask___trig3___lsb 3
91#define reg_iop_trigger_grp_rw_intr_mask___trig3___width 1
92#define reg_iop_trigger_grp_rw_intr_mask___trig3___bit 3
93#define reg_iop_trigger_grp_rw_intr_mask_offset 20
94
95/* Register rw_ack_intr, scope iop_trigger_grp, type rw */
96#define reg_iop_trigger_grp_rw_ack_intr___trig0___lsb 0
97#define reg_iop_trigger_grp_rw_ack_intr___trig0___width 1
98#define reg_iop_trigger_grp_rw_ack_intr___trig0___bit 0
99#define reg_iop_trigger_grp_rw_ack_intr___trig1___lsb 1
100#define reg_iop_trigger_grp_rw_ack_intr___trig1___width 1
101#define reg_iop_trigger_grp_rw_ack_intr___trig1___bit 1
102#define reg_iop_trigger_grp_rw_ack_intr___trig2___lsb 2
103#define reg_iop_trigger_grp_rw_ack_intr___trig2___width 1
104#define reg_iop_trigger_grp_rw_ack_intr___trig2___bit 2
105#define reg_iop_trigger_grp_rw_ack_intr___trig3___lsb 3
106#define reg_iop_trigger_grp_rw_ack_intr___trig3___width 1
107#define reg_iop_trigger_grp_rw_ack_intr___trig3___bit 3
108#define reg_iop_trigger_grp_rw_ack_intr_offset 24
109
110/* Register r_intr, scope iop_trigger_grp, type r */
111#define reg_iop_trigger_grp_r_intr___trig0___lsb 0
112#define reg_iop_trigger_grp_r_intr___trig0___width 1
113#define reg_iop_trigger_grp_r_intr___trig0___bit 0
114#define reg_iop_trigger_grp_r_intr___trig1___lsb 1
115#define reg_iop_trigger_grp_r_intr___trig1___width 1
116#define reg_iop_trigger_grp_r_intr___trig1___bit 1
117#define reg_iop_trigger_grp_r_intr___trig2___lsb 2
118#define reg_iop_trigger_grp_r_intr___trig2___width 1
119#define reg_iop_trigger_grp_r_intr___trig2___bit 2
120#define reg_iop_trigger_grp_r_intr___trig3___lsb 3
121#define reg_iop_trigger_grp_r_intr___trig3___width 1
122#define reg_iop_trigger_grp_r_intr___trig3___bit 3
123#define reg_iop_trigger_grp_r_intr_offset 28
124
125/* Register r_masked_intr, scope iop_trigger_grp, type r */
126#define reg_iop_trigger_grp_r_masked_intr___trig0___lsb 0
127#define reg_iop_trigger_grp_r_masked_intr___trig0___width 1
128#define reg_iop_trigger_grp_r_masked_intr___trig0___bit 0
129#define reg_iop_trigger_grp_r_masked_intr___trig1___lsb 1
130#define reg_iop_trigger_grp_r_masked_intr___trig1___width 1
131#define reg_iop_trigger_grp_r_masked_intr___trig1___bit 1
132#define reg_iop_trigger_grp_r_masked_intr___trig2___lsb 2
133#define reg_iop_trigger_grp_r_masked_intr___trig2___width 1
134#define reg_iop_trigger_grp_r_masked_intr___trig2___bit 2
135#define reg_iop_trigger_grp_r_masked_intr___trig3___lsb 3
136#define reg_iop_trigger_grp_r_masked_intr___trig3___width 1
137#define reg_iop_trigger_grp_r_masked_intr___trig3___bit 3
138#define reg_iop_trigger_grp_r_masked_intr_offset 32
139
140
141/* Constants */
142#define regk_iop_trigger_grp_fall 0x00000002
143#define regk_iop_trigger_grp_fall_lo 0x00000006
144#define regk_iop_trigger_grp_no 0x00000000
145#define regk_iop_trigger_grp_off 0x00000000
146#define regk_iop_trigger_grp_pulse 0x00000000
147#define regk_iop_trigger_grp_rise 0x00000001
148#define regk_iop_trigger_grp_rise_fall 0x00000003
149#define regk_iop_trigger_grp_rise_fall_hi 0x00000007
150#define regk_iop_trigger_grp_rise_fall_lo 0x00000004
151#define regk_iop_trigger_grp_rise_hi 0x00000005
152#define regk_iop_trigger_grp_rw_cfg_default 0x000000c0
153#define regk_iop_trigger_grp_rw_cfg_size 0x00000004
154#define regk_iop_trigger_grp_rw_intr_mask_default 0x00000000
155#define regk_iop_trigger_grp_toggle 0x00000003
156#define regk_iop_trigger_grp_yes 0x00000001
157#endif /* __iop_trigger_grp_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_version_defs_asm.h b/include/asm-cris/arch-v32/hwregs/iop/asm/iop_version_defs_asm.h
deleted file mode 100644
index e13feb20a7e3..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/asm/iop_version_defs_asm.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef __iop_version_defs_asm_h
2#define __iop_version_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_version.r
7 * id: iop_version.r,v 1.3 2004/04/22 12:37:54 jonaso Exp
8 * last modfied: Mon Apr 11 16:08:44 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/iop_version_defs_asm.h ../../inst/io_proc/rtl/guinness/iop_version.r
11 * id: $Id: iop_version_defs_asm.h,v 1.5 2005/04/24 18:31:07 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register r_version, scope iop_version, type r */
57#define reg_iop_version_r_version___nr___lsb 0
58#define reg_iop_version_r_version___nr___width 8
59#define reg_iop_version_r_version_offset 0
60
61
62/* Constants */
63#define regk_iop_version_v1_0 0x00000001
64#endif /* __iop_version_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_crc_par_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_crc_par_defs.h
deleted file mode 100644
index 90e4785b6474..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_crc_par_defs.h
+++ /dev/null
@@ -1,232 +0,0 @@
1#ifndef __iop_crc_par_defs_h
2#define __iop_crc_par_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_crc_par.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_crc_par_defs.h ../../inst/io_proc/rtl/iop_crc_par.r
11 * id: $Id: iop_crc_par_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_crc_par */
86
87/* Register rw_cfg, scope iop_crc_par, type rw */
88typedef struct {
89 unsigned int mode : 1;
90 unsigned int crc_out : 1;
91 unsigned int rev_out : 1;
92 unsigned int inv_out : 1;
93 unsigned int trig : 2;
94 unsigned int poly : 3;
95 unsigned int dummy1 : 23;
96} reg_iop_crc_par_rw_cfg;
97#define REG_RD_ADDR_iop_crc_par_rw_cfg 0
98#define REG_WR_ADDR_iop_crc_par_rw_cfg 0
99
100/* Register rw_init_crc, scope iop_crc_par, type rw */
101typedef unsigned int reg_iop_crc_par_rw_init_crc;
102#define REG_RD_ADDR_iop_crc_par_rw_init_crc 4
103#define REG_WR_ADDR_iop_crc_par_rw_init_crc 4
104
105/* Register rw_correct_crc, scope iop_crc_par, type rw */
106typedef unsigned int reg_iop_crc_par_rw_correct_crc;
107#define REG_RD_ADDR_iop_crc_par_rw_correct_crc 8
108#define REG_WR_ADDR_iop_crc_par_rw_correct_crc 8
109
110/* Register rw_ctrl, scope iop_crc_par, type rw */
111typedef struct {
112 unsigned int en : 1;
113 unsigned int dummy1 : 31;
114} reg_iop_crc_par_rw_ctrl;
115#define REG_RD_ADDR_iop_crc_par_rw_ctrl 12
116#define REG_WR_ADDR_iop_crc_par_rw_ctrl 12
117
118/* Register rw_set_last, scope iop_crc_par, type rw */
119typedef struct {
120 unsigned int tr_dif : 1;
121 unsigned int dummy1 : 31;
122} reg_iop_crc_par_rw_set_last;
123#define REG_RD_ADDR_iop_crc_par_rw_set_last 16
124#define REG_WR_ADDR_iop_crc_par_rw_set_last 16
125
126/* Register rw_wr1byte, scope iop_crc_par, type rw */
127typedef struct {
128 unsigned int data : 8;
129 unsigned int dummy1 : 24;
130} reg_iop_crc_par_rw_wr1byte;
131#define REG_RD_ADDR_iop_crc_par_rw_wr1byte 20
132#define REG_WR_ADDR_iop_crc_par_rw_wr1byte 20
133
134/* Register rw_wr2byte, scope iop_crc_par, type rw */
135typedef struct {
136 unsigned int data : 16;
137 unsigned int dummy1 : 16;
138} reg_iop_crc_par_rw_wr2byte;
139#define REG_RD_ADDR_iop_crc_par_rw_wr2byte 24
140#define REG_WR_ADDR_iop_crc_par_rw_wr2byte 24
141
142/* Register rw_wr3byte, scope iop_crc_par, type rw */
143typedef struct {
144 unsigned int data : 24;
145 unsigned int dummy1 : 8;
146} reg_iop_crc_par_rw_wr3byte;
147#define REG_RD_ADDR_iop_crc_par_rw_wr3byte 28
148#define REG_WR_ADDR_iop_crc_par_rw_wr3byte 28
149
150/* Register rw_wr4byte, scope iop_crc_par, type rw */
151typedef struct {
152 unsigned int data : 32;
153} reg_iop_crc_par_rw_wr4byte;
154#define REG_RD_ADDR_iop_crc_par_rw_wr4byte 32
155#define REG_WR_ADDR_iop_crc_par_rw_wr4byte 32
156
157/* Register rw_wr1byte_last, scope iop_crc_par, type rw */
158typedef struct {
159 unsigned int data : 8;
160 unsigned int dummy1 : 24;
161} reg_iop_crc_par_rw_wr1byte_last;
162#define REG_RD_ADDR_iop_crc_par_rw_wr1byte_last 36
163#define REG_WR_ADDR_iop_crc_par_rw_wr1byte_last 36
164
165/* Register rw_wr2byte_last, scope iop_crc_par, type rw */
166typedef struct {
167 unsigned int data : 16;
168 unsigned int dummy1 : 16;
169} reg_iop_crc_par_rw_wr2byte_last;
170#define REG_RD_ADDR_iop_crc_par_rw_wr2byte_last 40
171#define REG_WR_ADDR_iop_crc_par_rw_wr2byte_last 40
172
173/* Register rw_wr3byte_last, scope iop_crc_par, type rw */
174typedef struct {
175 unsigned int data : 24;
176 unsigned int dummy1 : 8;
177} reg_iop_crc_par_rw_wr3byte_last;
178#define REG_RD_ADDR_iop_crc_par_rw_wr3byte_last 44
179#define REG_WR_ADDR_iop_crc_par_rw_wr3byte_last 44
180
181/* Register rw_wr4byte_last, scope iop_crc_par, type rw */
182typedef struct {
183 unsigned int data : 32;
184} reg_iop_crc_par_rw_wr4byte_last;
185#define REG_RD_ADDR_iop_crc_par_rw_wr4byte_last 48
186#define REG_WR_ADDR_iop_crc_par_rw_wr4byte_last 48
187
188/* Register r_stat, scope iop_crc_par, type r */
189typedef struct {
190 unsigned int err : 1;
191 unsigned int busy : 1;
192 unsigned int dummy1 : 30;
193} reg_iop_crc_par_r_stat;
194#define REG_RD_ADDR_iop_crc_par_r_stat 52
195
196/* Register r_sh_reg, scope iop_crc_par, type r */
197typedef unsigned int reg_iop_crc_par_r_sh_reg;
198#define REG_RD_ADDR_iop_crc_par_r_sh_reg 56
199
200/* Register r_crc, scope iop_crc_par, type r */
201typedef unsigned int reg_iop_crc_par_r_crc;
202#define REG_RD_ADDR_iop_crc_par_r_crc 60
203
204/* Register rw_strb_rec_dif_in, scope iop_crc_par, type rw */
205typedef struct {
206 unsigned int last : 2;
207 unsigned int dummy1 : 30;
208} reg_iop_crc_par_rw_strb_rec_dif_in;
209#define REG_RD_ADDR_iop_crc_par_rw_strb_rec_dif_in 64
210#define REG_WR_ADDR_iop_crc_par_rw_strb_rec_dif_in 64
211
212
213/* Constants */
214enum {
215 regk_iop_crc_par_calc = 0x00000001,
216 regk_iop_crc_par_ccitt = 0x00000002,
217 regk_iop_crc_par_check = 0x00000000,
218 regk_iop_crc_par_crc16 = 0x00000001,
219 regk_iop_crc_par_crc32 = 0x00000000,
220 regk_iop_crc_par_crc5 = 0x00000003,
221 regk_iop_crc_par_crc5_11 = 0x00000004,
222 regk_iop_crc_par_dif_in = 0x00000002,
223 regk_iop_crc_par_hi = 0x00000000,
224 regk_iop_crc_par_neg = 0x00000002,
225 regk_iop_crc_par_no = 0x00000000,
226 regk_iop_crc_par_pos = 0x00000001,
227 regk_iop_crc_par_pos_neg = 0x00000003,
228 regk_iop_crc_par_rw_cfg_default = 0x00000000,
229 regk_iop_crc_par_rw_ctrl_default = 0x00000000,
230 regk_iop_crc_par_yes = 0x00000001
231};
232#endif /* __iop_crc_par_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_dmc_in_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_dmc_in_defs.h
deleted file mode 100644
index 76aec6e37f3e..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_dmc_in_defs.h
+++ /dev/null
@@ -1,325 +0,0 @@
1#ifndef __iop_dmc_in_defs_h
2#define __iop_dmc_in_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_dmc_in.r
7 * id: iop_dmc_in.r,v 1.26 2005/02/16 09:14:17 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_dmc_in_defs.h ../../inst/io_proc/rtl/iop_dmc_in.r
11 * id: $Id: iop_dmc_in_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_dmc_in */
86
87/* Register rw_cfg, scope iop_dmc_in, type rw */
88typedef struct {
89 unsigned int sth_intr : 3;
90 unsigned int last_dis_dif : 1;
91 unsigned int dummy1 : 28;
92} reg_iop_dmc_in_rw_cfg;
93#define REG_RD_ADDR_iop_dmc_in_rw_cfg 0
94#define REG_WR_ADDR_iop_dmc_in_rw_cfg 0
95
96/* Register rw_ctrl, scope iop_dmc_in, type rw */
97typedef struct {
98 unsigned int dif_en : 1;
99 unsigned int dif_dis : 1;
100 unsigned int stream_clr : 1;
101 unsigned int dummy1 : 29;
102} reg_iop_dmc_in_rw_ctrl;
103#define REG_RD_ADDR_iop_dmc_in_rw_ctrl 4
104#define REG_WR_ADDR_iop_dmc_in_rw_ctrl 4
105
106/* Register r_stat, scope iop_dmc_in, type r */
107typedef struct {
108 unsigned int dif_en : 1;
109 unsigned int dummy1 : 31;
110} reg_iop_dmc_in_r_stat;
111#define REG_RD_ADDR_iop_dmc_in_r_stat 8
112
113/* Register rw_stream_cmd, scope iop_dmc_in, type rw */
114typedef struct {
115 unsigned int cmd : 10;
116 unsigned int dummy1 : 6;
117 unsigned int n : 8;
118 unsigned int dummy2 : 8;
119} reg_iop_dmc_in_rw_stream_cmd;
120#define REG_RD_ADDR_iop_dmc_in_rw_stream_cmd 12
121#define REG_WR_ADDR_iop_dmc_in_rw_stream_cmd 12
122
123/* Register rw_stream_wr_data, scope iop_dmc_in, type rw */
124typedef unsigned int reg_iop_dmc_in_rw_stream_wr_data;
125#define REG_RD_ADDR_iop_dmc_in_rw_stream_wr_data 16
126#define REG_WR_ADDR_iop_dmc_in_rw_stream_wr_data 16
127
128/* Register rw_stream_wr_data_last, scope iop_dmc_in, type rw */
129typedef unsigned int reg_iop_dmc_in_rw_stream_wr_data_last;
130#define REG_RD_ADDR_iop_dmc_in_rw_stream_wr_data_last 20
131#define REG_WR_ADDR_iop_dmc_in_rw_stream_wr_data_last 20
132
133/* Register rw_stream_ctrl, scope iop_dmc_in, type rw */
134typedef struct {
135 unsigned int eop : 1;
136 unsigned int wait : 1;
137 unsigned int keep_md : 1;
138 unsigned int size : 3;
139 unsigned int dummy1 : 26;
140} reg_iop_dmc_in_rw_stream_ctrl;
141#define REG_RD_ADDR_iop_dmc_in_rw_stream_ctrl 24
142#define REG_WR_ADDR_iop_dmc_in_rw_stream_ctrl 24
143
144/* Register r_stream_stat, scope iop_dmc_in, type r */
145typedef struct {
146 unsigned int sth : 7;
147 unsigned int dummy1 : 9;
148 unsigned int full : 1;
149 unsigned int last_pkt : 1;
150 unsigned int data_md_valid : 1;
151 unsigned int ctxt_md_valid : 1;
152 unsigned int group_md_valid : 1;
153 unsigned int stream_busy : 1;
154 unsigned int cmd_rdy : 1;
155 unsigned int dummy2 : 9;
156} reg_iop_dmc_in_r_stream_stat;
157#define REG_RD_ADDR_iop_dmc_in_r_stream_stat 28
158
159/* Register r_data_descr, scope iop_dmc_in, type r */
160typedef struct {
161 unsigned int ctrl : 8;
162 unsigned int stat : 8;
163 unsigned int md : 16;
164} reg_iop_dmc_in_r_data_descr;
165#define REG_RD_ADDR_iop_dmc_in_r_data_descr 32
166
167/* Register r_ctxt_descr, scope iop_dmc_in, type r */
168typedef struct {
169 unsigned int ctrl : 8;
170 unsigned int stat : 8;
171 unsigned int md0 : 16;
172} reg_iop_dmc_in_r_ctxt_descr;
173#define REG_RD_ADDR_iop_dmc_in_r_ctxt_descr 36
174
175/* Register r_ctxt_descr_md1, scope iop_dmc_in, type r */
176typedef unsigned int reg_iop_dmc_in_r_ctxt_descr_md1;
177#define REG_RD_ADDR_iop_dmc_in_r_ctxt_descr_md1 40
178
179/* Register r_ctxt_descr_md2, scope iop_dmc_in, type r */
180typedef unsigned int reg_iop_dmc_in_r_ctxt_descr_md2;
181#define REG_RD_ADDR_iop_dmc_in_r_ctxt_descr_md2 44
182
183/* Register r_group_descr, scope iop_dmc_in, type r */
184typedef struct {
185 unsigned int ctrl : 8;
186 unsigned int stat : 8;
187 unsigned int md : 16;
188} reg_iop_dmc_in_r_group_descr;
189#define REG_RD_ADDR_iop_dmc_in_r_group_descr 56
190
191/* Register rw_data_descr, scope iop_dmc_in, type rw */
192typedef struct {
193 unsigned int dummy1 : 16;
194 unsigned int md : 16;
195} reg_iop_dmc_in_rw_data_descr;
196#define REG_RD_ADDR_iop_dmc_in_rw_data_descr 60
197#define REG_WR_ADDR_iop_dmc_in_rw_data_descr 60
198
199/* Register rw_ctxt_descr, scope iop_dmc_in, type rw */
200typedef struct {
201 unsigned int dummy1 : 16;
202 unsigned int md0 : 16;
203} reg_iop_dmc_in_rw_ctxt_descr;
204#define REG_RD_ADDR_iop_dmc_in_rw_ctxt_descr 64
205#define REG_WR_ADDR_iop_dmc_in_rw_ctxt_descr 64
206
207/* Register rw_ctxt_descr_md1, scope iop_dmc_in, type rw */
208typedef unsigned int reg_iop_dmc_in_rw_ctxt_descr_md1;
209#define REG_RD_ADDR_iop_dmc_in_rw_ctxt_descr_md1 68
210#define REG_WR_ADDR_iop_dmc_in_rw_ctxt_descr_md1 68
211
212/* Register rw_ctxt_descr_md2, scope iop_dmc_in, type rw */
213typedef unsigned int reg_iop_dmc_in_rw_ctxt_descr_md2;
214#define REG_RD_ADDR_iop_dmc_in_rw_ctxt_descr_md2 72
215#define REG_WR_ADDR_iop_dmc_in_rw_ctxt_descr_md2 72
216
217/* Register rw_group_descr, scope iop_dmc_in, type rw */
218typedef struct {
219 unsigned int dummy1 : 16;
220 unsigned int md : 16;
221} reg_iop_dmc_in_rw_group_descr;
222#define REG_RD_ADDR_iop_dmc_in_rw_group_descr 84
223#define REG_WR_ADDR_iop_dmc_in_rw_group_descr 84
224
225/* Register rw_intr_mask, scope iop_dmc_in, type rw */
226typedef struct {
227 unsigned int data_md : 1;
228 unsigned int ctxt_md : 1;
229 unsigned int group_md : 1;
230 unsigned int cmd_rdy : 1;
231 unsigned int sth : 1;
232 unsigned int full : 1;
233 unsigned int dummy1 : 26;
234} reg_iop_dmc_in_rw_intr_mask;
235#define REG_RD_ADDR_iop_dmc_in_rw_intr_mask 88
236#define REG_WR_ADDR_iop_dmc_in_rw_intr_mask 88
237
238/* Register rw_ack_intr, scope iop_dmc_in, type rw */
239typedef struct {
240 unsigned int data_md : 1;
241 unsigned int ctxt_md : 1;
242 unsigned int group_md : 1;
243 unsigned int cmd_rdy : 1;
244 unsigned int sth : 1;
245 unsigned int full : 1;
246 unsigned int dummy1 : 26;
247} reg_iop_dmc_in_rw_ack_intr;
248#define REG_RD_ADDR_iop_dmc_in_rw_ack_intr 92
249#define REG_WR_ADDR_iop_dmc_in_rw_ack_intr 92
250
251/* Register r_intr, scope iop_dmc_in, type r */
252typedef struct {
253 unsigned int data_md : 1;
254 unsigned int ctxt_md : 1;
255 unsigned int group_md : 1;
256 unsigned int cmd_rdy : 1;
257 unsigned int sth : 1;
258 unsigned int full : 1;
259 unsigned int dummy1 : 26;
260} reg_iop_dmc_in_r_intr;
261#define REG_RD_ADDR_iop_dmc_in_r_intr 96
262
263/* Register r_masked_intr, scope iop_dmc_in, type r */
264typedef struct {
265 unsigned int data_md : 1;
266 unsigned int ctxt_md : 1;
267 unsigned int group_md : 1;
268 unsigned int cmd_rdy : 1;
269 unsigned int sth : 1;
270 unsigned int full : 1;
271 unsigned int dummy1 : 26;
272} reg_iop_dmc_in_r_masked_intr;
273#define REG_RD_ADDR_iop_dmc_in_r_masked_intr 100
274
275
276/* Constants */
277enum {
278 regk_iop_dmc_in_ack_pkt = 0x00000100,
279 regk_iop_dmc_in_array = 0x00000008,
280 regk_iop_dmc_in_burst = 0x00000020,
281 regk_iop_dmc_in_copy_next = 0x00000010,
282 regk_iop_dmc_in_copy_up = 0x00000020,
283 regk_iop_dmc_in_dis_c = 0x00000010,
284 regk_iop_dmc_in_dis_g = 0x00000020,
285 regk_iop_dmc_in_lim1 = 0x00000000,
286 regk_iop_dmc_in_lim16 = 0x00000004,
287 regk_iop_dmc_in_lim2 = 0x00000001,
288 regk_iop_dmc_in_lim32 = 0x00000005,
289 regk_iop_dmc_in_lim4 = 0x00000002,
290 regk_iop_dmc_in_lim64 = 0x00000006,
291 regk_iop_dmc_in_lim8 = 0x00000003,
292 regk_iop_dmc_in_load_c = 0x00000200,
293 regk_iop_dmc_in_load_c_n = 0x00000280,
294 regk_iop_dmc_in_load_c_next = 0x00000240,
295 regk_iop_dmc_in_load_d = 0x00000140,
296 regk_iop_dmc_in_load_g = 0x00000300,
297 regk_iop_dmc_in_load_g_down = 0x000003c0,
298 regk_iop_dmc_in_load_g_next = 0x00000340,
299 regk_iop_dmc_in_load_g_up = 0x00000380,
300 regk_iop_dmc_in_next_en = 0x00000010,
301 regk_iop_dmc_in_next_pkt = 0x00000010,
302 regk_iop_dmc_in_no = 0x00000000,
303 regk_iop_dmc_in_restore = 0x00000020,
304 regk_iop_dmc_in_rw_cfg_default = 0x00000000,
305 regk_iop_dmc_in_rw_ctxt_descr_default = 0x00000000,
306 regk_iop_dmc_in_rw_ctxt_descr_md1_default = 0x00000000,
307 regk_iop_dmc_in_rw_ctxt_descr_md2_default = 0x00000000,
308 regk_iop_dmc_in_rw_data_descr_default = 0x00000000,
309 regk_iop_dmc_in_rw_group_descr_default = 0x00000000,
310 regk_iop_dmc_in_rw_intr_mask_default = 0x00000000,
311 regk_iop_dmc_in_rw_stream_ctrl_default = 0x00000000,
312 regk_iop_dmc_in_save_down = 0x00000020,
313 regk_iop_dmc_in_save_up = 0x00000020,
314 regk_iop_dmc_in_set_reg = 0x00000050,
315 regk_iop_dmc_in_set_w_size1 = 0x00000190,
316 regk_iop_dmc_in_set_w_size2 = 0x000001a0,
317 regk_iop_dmc_in_set_w_size4 = 0x000001c0,
318 regk_iop_dmc_in_store_c = 0x00000002,
319 regk_iop_dmc_in_store_descr = 0x00000000,
320 regk_iop_dmc_in_store_g = 0x00000004,
321 regk_iop_dmc_in_store_md = 0x00000001,
322 regk_iop_dmc_in_update_down = 0x00000020,
323 regk_iop_dmc_in_yes = 0x00000001
324};
325#endif /* __iop_dmc_in_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_dmc_out_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_dmc_out_defs.h
deleted file mode 100644
index 938a0d4c4604..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_dmc_out_defs.h
+++ /dev/null
@@ -1,326 +0,0 @@
1#ifndef __iop_dmc_out_defs_h
2#define __iop_dmc_out_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_dmc_out.r
7 * id: iop_dmc_out.r,v 1.30 2005/02/16 09:14:11 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_dmc_out_defs.h ../../inst/io_proc/rtl/iop_dmc_out.r
11 * id: $Id: iop_dmc_out_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_dmc_out */
86
87/* Register rw_cfg, scope iop_dmc_out, type rw */
88typedef struct {
89 unsigned int trf_lim : 16;
90 unsigned int last_at_trf_lim : 1;
91 unsigned int dth_intr : 3;
92 unsigned int dummy1 : 12;
93} reg_iop_dmc_out_rw_cfg;
94#define REG_RD_ADDR_iop_dmc_out_rw_cfg 0
95#define REG_WR_ADDR_iop_dmc_out_rw_cfg 0
96
97/* Register rw_ctrl, scope iop_dmc_out, type rw */
98typedef struct {
99 unsigned int dif_en : 1;
100 unsigned int dif_dis : 1;
101 unsigned int dummy1 : 30;
102} reg_iop_dmc_out_rw_ctrl;
103#define REG_RD_ADDR_iop_dmc_out_rw_ctrl 4
104#define REG_WR_ADDR_iop_dmc_out_rw_ctrl 4
105
106/* Register r_stat, scope iop_dmc_out, type r */
107typedef struct {
108 unsigned int dif_en : 1;
109 unsigned int dummy1 : 31;
110} reg_iop_dmc_out_r_stat;
111#define REG_RD_ADDR_iop_dmc_out_r_stat 8
112
113/* Register rw_stream_cmd, scope iop_dmc_out, type rw */
114typedef struct {
115 unsigned int cmd : 10;
116 unsigned int dummy1 : 6;
117 unsigned int n : 8;
118 unsigned int dummy2 : 8;
119} reg_iop_dmc_out_rw_stream_cmd;
120#define REG_RD_ADDR_iop_dmc_out_rw_stream_cmd 12
121#define REG_WR_ADDR_iop_dmc_out_rw_stream_cmd 12
122
123/* Register rs_stream_data, scope iop_dmc_out, type rs */
124typedef unsigned int reg_iop_dmc_out_rs_stream_data;
125#define REG_RD_ADDR_iop_dmc_out_rs_stream_data 16
126
127/* Register r_stream_data, scope iop_dmc_out, type r */
128typedef unsigned int reg_iop_dmc_out_r_stream_data;
129#define REG_RD_ADDR_iop_dmc_out_r_stream_data 20
130
131/* Register r_stream_stat, scope iop_dmc_out, type r */
132typedef struct {
133 unsigned int dth : 7;
134 unsigned int dummy1 : 9;
135 unsigned int dv : 1;
136 unsigned int all_avail : 1;
137 unsigned int last : 1;
138 unsigned int size : 3;
139 unsigned int data_md_valid : 1;
140 unsigned int ctxt_md_valid : 1;
141 unsigned int group_md_valid : 1;
142 unsigned int stream_busy : 1;
143 unsigned int cmd_rdy : 1;
144 unsigned int cmd_rq : 1;
145 unsigned int dummy2 : 4;
146} reg_iop_dmc_out_r_stream_stat;
147#define REG_RD_ADDR_iop_dmc_out_r_stream_stat 24
148
149/* Register r_data_descr, scope iop_dmc_out, type r */
150typedef struct {
151 unsigned int ctrl : 8;
152 unsigned int stat : 8;
153 unsigned int md : 16;
154} reg_iop_dmc_out_r_data_descr;
155#define REG_RD_ADDR_iop_dmc_out_r_data_descr 28
156
157/* Register r_ctxt_descr, scope iop_dmc_out, type r */
158typedef struct {
159 unsigned int ctrl : 8;
160 unsigned int stat : 8;
161 unsigned int md0 : 16;
162} reg_iop_dmc_out_r_ctxt_descr;
163#define REG_RD_ADDR_iop_dmc_out_r_ctxt_descr 32
164
165/* Register r_ctxt_descr_md1, scope iop_dmc_out, type r */
166typedef unsigned int reg_iop_dmc_out_r_ctxt_descr_md1;
167#define REG_RD_ADDR_iop_dmc_out_r_ctxt_descr_md1 36
168
169/* Register r_ctxt_descr_md2, scope iop_dmc_out, type r */
170typedef unsigned int reg_iop_dmc_out_r_ctxt_descr_md2;
171#define REG_RD_ADDR_iop_dmc_out_r_ctxt_descr_md2 40
172
173/* Register r_group_descr, scope iop_dmc_out, type r */
174typedef struct {
175 unsigned int ctrl : 8;
176 unsigned int stat : 8;
177 unsigned int md : 16;
178} reg_iop_dmc_out_r_group_descr;
179#define REG_RD_ADDR_iop_dmc_out_r_group_descr 52
180
181/* Register rw_data_descr, scope iop_dmc_out, type rw */
182typedef struct {
183 unsigned int dummy1 : 16;
184 unsigned int md : 16;
185} reg_iop_dmc_out_rw_data_descr;
186#define REG_RD_ADDR_iop_dmc_out_rw_data_descr 56
187#define REG_WR_ADDR_iop_dmc_out_rw_data_descr 56
188
189/* Register rw_ctxt_descr, scope iop_dmc_out, type rw */
190typedef struct {
191 unsigned int dummy1 : 16;
192 unsigned int md0 : 16;
193} reg_iop_dmc_out_rw_ctxt_descr;
194#define REG_RD_ADDR_iop_dmc_out_rw_ctxt_descr 60
195#define REG_WR_ADDR_iop_dmc_out_rw_ctxt_descr 60
196
197/* Register rw_ctxt_descr_md1, scope iop_dmc_out, type rw */
198typedef unsigned int reg_iop_dmc_out_rw_ctxt_descr_md1;
199#define REG_RD_ADDR_iop_dmc_out_rw_ctxt_descr_md1 64
200#define REG_WR_ADDR_iop_dmc_out_rw_ctxt_descr_md1 64
201
202/* Register rw_ctxt_descr_md2, scope iop_dmc_out, type rw */
203typedef unsigned int reg_iop_dmc_out_rw_ctxt_descr_md2;
204#define REG_RD_ADDR_iop_dmc_out_rw_ctxt_descr_md2 68
205#define REG_WR_ADDR_iop_dmc_out_rw_ctxt_descr_md2 68
206
207/* Register rw_group_descr, scope iop_dmc_out, type rw */
208typedef struct {
209 unsigned int dummy1 : 16;
210 unsigned int md : 16;
211} reg_iop_dmc_out_rw_group_descr;
212#define REG_RD_ADDR_iop_dmc_out_rw_group_descr 80
213#define REG_WR_ADDR_iop_dmc_out_rw_group_descr 80
214
215/* Register rw_intr_mask, scope iop_dmc_out, type rw */
216typedef struct {
217 unsigned int data_md : 1;
218 unsigned int ctxt_md : 1;
219 unsigned int group_md : 1;
220 unsigned int cmd_rdy : 1;
221 unsigned int dth : 1;
222 unsigned int dv : 1;
223 unsigned int last_data : 1;
224 unsigned int trf_lim : 1;
225 unsigned int cmd_rq : 1;
226 unsigned int dummy1 : 23;
227} reg_iop_dmc_out_rw_intr_mask;
228#define REG_RD_ADDR_iop_dmc_out_rw_intr_mask 84
229#define REG_WR_ADDR_iop_dmc_out_rw_intr_mask 84
230
231/* Register rw_ack_intr, scope iop_dmc_out, type rw */
232typedef struct {
233 unsigned int data_md : 1;
234 unsigned int ctxt_md : 1;
235 unsigned int group_md : 1;
236 unsigned int cmd_rdy : 1;
237 unsigned int dth : 1;
238 unsigned int dv : 1;
239 unsigned int last_data : 1;
240 unsigned int trf_lim : 1;
241 unsigned int cmd_rq : 1;
242 unsigned int dummy1 : 23;
243} reg_iop_dmc_out_rw_ack_intr;
244#define REG_RD_ADDR_iop_dmc_out_rw_ack_intr 88
245#define REG_WR_ADDR_iop_dmc_out_rw_ack_intr 88
246
247/* Register r_intr, scope iop_dmc_out, type r */
248typedef struct {
249 unsigned int data_md : 1;
250 unsigned int ctxt_md : 1;
251 unsigned int group_md : 1;
252 unsigned int cmd_rdy : 1;
253 unsigned int dth : 1;
254 unsigned int dv : 1;
255 unsigned int last_data : 1;
256 unsigned int trf_lim : 1;
257 unsigned int cmd_rq : 1;
258 unsigned int dummy1 : 23;
259} reg_iop_dmc_out_r_intr;
260#define REG_RD_ADDR_iop_dmc_out_r_intr 92
261
262/* Register r_masked_intr, scope iop_dmc_out, type r */
263typedef struct {
264 unsigned int data_md : 1;
265 unsigned int ctxt_md : 1;
266 unsigned int group_md : 1;
267 unsigned int cmd_rdy : 1;
268 unsigned int dth : 1;
269 unsigned int dv : 1;
270 unsigned int last_data : 1;
271 unsigned int trf_lim : 1;
272 unsigned int cmd_rq : 1;
273 unsigned int dummy1 : 23;
274} reg_iop_dmc_out_r_masked_intr;
275#define REG_RD_ADDR_iop_dmc_out_r_masked_intr 96
276
277
278/* Constants */
279enum {
280 regk_iop_dmc_out_ack_pkt = 0x00000100,
281 regk_iop_dmc_out_array = 0x00000008,
282 regk_iop_dmc_out_burst = 0x00000020,
283 regk_iop_dmc_out_copy_next = 0x00000010,
284 regk_iop_dmc_out_copy_up = 0x00000020,
285 regk_iop_dmc_out_dis_c = 0x00000010,
286 regk_iop_dmc_out_dis_g = 0x00000020,
287 regk_iop_dmc_out_lim1 = 0x00000000,
288 regk_iop_dmc_out_lim16 = 0x00000004,
289 regk_iop_dmc_out_lim2 = 0x00000001,
290 regk_iop_dmc_out_lim32 = 0x00000005,
291 regk_iop_dmc_out_lim4 = 0x00000002,
292 regk_iop_dmc_out_lim64 = 0x00000006,
293 regk_iop_dmc_out_lim8 = 0x00000003,
294 regk_iop_dmc_out_load_c = 0x00000200,
295 regk_iop_dmc_out_load_c_n = 0x00000280,
296 regk_iop_dmc_out_load_c_next = 0x00000240,
297 regk_iop_dmc_out_load_d = 0x00000140,
298 regk_iop_dmc_out_load_g = 0x00000300,
299 regk_iop_dmc_out_load_g_down = 0x000003c0,
300 regk_iop_dmc_out_load_g_next = 0x00000340,
301 regk_iop_dmc_out_load_g_up = 0x00000380,
302 regk_iop_dmc_out_next_en = 0x00000010,
303 regk_iop_dmc_out_next_pkt = 0x00000010,
304 regk_iop_dmc_out_no = 0x00000000,
305 regk_iop_dmc_out_restore = 0x00000020,
306 regk_iop_dmc_out_rw_cfg_default = 0x00000000,
307 regk_iop_dmc_out_rw_ctxt_descr_default = 0x00000000,
308 regk_iop_dmc_out_rw_ctxt_descr_md1_default = 0x00000000,
309 regk_iop_dmc_out_rw_ctxt_descr_md2_default = 0x00000000,
310 regk_iop_dmc_out_rw_data_descr_default = 0x00000000,
311 regk_iop_dmc_out_rw_group_descr_default = 0x00000000,
312 regk_iop_dmc_out_rw_intr_mask_default = 0x00000000,
313 regk_iop_dmc_out_save_down = 0x00000020,
314 regk_iop_dmc_out_save_up = 0x00000020,
315 regk_iop_dmc_out_set_reg = 0x00000050,
316 regk_iop_dmc_out_set_w_size1 = 0x00000190,
317 regk_iop_dmc_out_set_w_size2 = 0x000001a0,
318 regk_iop_dmc_out_set_w_size4 = 0x000001c0,
319 regk_iop_dmc_out_store_c = 0x00000002,
320 regk_iop_dmc_out_store_descr = 0x00000000,
321 regk_iop_dmc_out_store_g = 0x00000004,
322 regk_iop_dmc_out_store_md = 0x00000001,
323 regk_iop_dmc_out_update_down = 0x00000020,
324 regk_iop_dmc_out_yes = 0x00000001
325};
326#endif /* __iop_dmc_out_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_defs.h
deleted file mode 100644
index e0c982b263fa..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_defs.h
+++ /dev/null
@@ -1,255 +0,0 @@
1#ifndef __iop_fifo_in_defs_h
2#define __iop_fifo_in_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_in.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:07 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_fifo_in_defs.h ../../inst/io_proc/rtl/iop_fifo_in.r
11 * id: $Id: iop_fifo_in_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_fifo_in */
86
87/* Register rw_cfg, scope iop_fifo_in, type rw */
88typedef struct {
89 unsigned int avail_lim : 3;
90 unsigned int byte_order : 2;
91 unsigned int trig : 2;
92 unsigned int last_dis_dif_in : 1;
93 unsigned int mode : 2;
94 unsigned int dummy1 : 22;
95} reg_iop_fifo_in_rw_cfg;
96#define REG_RD_ADDR_iop_fifo_in_rw_cfg 0
97#define REG_WR_ADDR_iop_fifo_in_rw_cfg 0
98
99/* Register rw_ctrl, scope iop_fifo_in, type rw */
100typedef struct {
101 unsigned int dif_in_en : 1;
102 unsigned int dif_out_en : 1;
103 unsigned int dummy1 : 30;
104} reg_iop_fifo_in_rw_ctrl;
105#define REG_RD_ADDR_iop_fifo_in_rw_ctrl 4
106#define REG_WR_ADDR_iop_fifo_in_rw_ctrl 4
107
108/* Register r_stat, scope iop_fifo_in, type r */
109typedef struct {
110 unsigned int avail_bytes : 4;
111 unsigned int last : 8;
112 unsigned int dif_in_en : 1;
113 unsigned int dif_out_en : 1;
114 unsigned int dummy1 : 18;
115} reg_iop_fifo_in_r_stat;
116#define REG_RD_ADDR_iop_fifo_in_r_stat 8
117
118/* Register rs_rd1byte, scope iop_fifo_in, type rs */
119typedef struct {
120 unsigned int data : 8;
121 unsigned int dummy1 : 24;
122} reg_iop_fifo_in_rs_rd1byte;
123#define REG_RD_ADDR_iop_fifo_in_rs_rd1byte 12
124
125/* Register r_rd1byte, scope iop_fifo_in, type r */
126typedef struct {
127 unsigned int data : 8;
128 unsigned int dummy1 : 24;
129} reg_iop_fifo_in_r_rd1byte;
130#define REG_RD_ADDR_iop_fifo_in_r_rd1byte 16
131
132/* Register rs_rd2byte, scope iop_fifo_in, type rs */
133typedef struct {
134 unsigned int data : 16;
135 unsigned int dummy1 : 16;
136} reg_iop_fifo_in_rs_rd2byte;
137#define REG_RD_ADDR_iop_fifo_in_rs_rd2byte 20
138
139/* Register r_rd2byte, scope iop_fifo_in, type r */
140typedef struct {
141 unsigned int data : 16;
142 unsigned int dummy1 : 16;
143} reg_iop_fifo_in_r_rd2byte;
144#define REG_RD_ADDR_iop_fifo_in_r_rd2byte 24
145
146/* Register rs_rd3byte, scope iop_fifo_in, type rs */
147typedef struct {
148 unsigned int data : 24;
149 unsigned int dummy1 : 8;
150} reg_iop_fifo_in_rs_rd3byte;
151#define REG_RD_ADDR_iop_fifo_in_rs_rd3byte 28
152
153/* Register r_rd3byte, scope iop_fifo_in, type r */
154typedef struct {
155 unsigned int data : 24;
156 unsigned int dummy1 : 8;
157} reg_iop_fifo_in_r_rd3byte;
158#define REG_RD_ADDR_iop_fifo_in_r_rd3byte 32
159
160/* Register rs_rd4byte, scope iop_fifo_in, type rs */
161typedef struct {
162 unsigned int data : 32;
163} reg_iop_fifo_in_rs_rd4byte;
164#define REG_RD_ADDR_iop_fifo_in_rs_rd4byte 36
165
166/* Register r_rd4byte, scope iop_fifo_in, type r */
167typedef struct {
168 unsigned int data : 32;
169} reg_iop_fifo_in_r_rd4byte;
170#define REG_RD_ADDR_iop_fifo_in_r_rd4byte 40
171
172/* Register rw_set_last, scope iop_fifo_in, type rw */
173typedef unsigned int reg_iop_fifo_in_rw_set_last;
174#define REG_RD_ADDR_iop_fifo_in_rw_set_last 44
175#define REG_WR_ADDR_iop_fifo_in_rw_set_last 44
176
177/* Register rw_strb_dif_in, scope iop_fifo_in, type rw */
178typedef struct {
179 unsigned int last : 2;
180 unsigned int dummy1 : 30;
181} reg_iop_fifo_in_rw_strb_dif_in;
182#define REG_RD_ADDR_iop_fifo_in_rw_strb_dif_in 48
183#define REG_WR_ADDR_iop_fifo_in_rw_strb_dif_in 48
184
185/* Register rw_intr_mask, scope iop_fifo_in, type rw */
186typedef struct {
187 unsigned int urun : 1;
188 unsigned int last_data : 1;
189 unsigned int dav : 1;
190 unsigned int avail : 1;
191 unsigned int orun : 1;
192 unsigned int dummy1 : 27;
193} reg_iop_fifo_in_rw_intr_mask;
194#define REG_RD_ADDR_iop_fifo_in_rw_intr_mask 52
195#define REG_WR_ADDR_iop_fifo_in_rw_intr_mask 52
196
197/* Register rw_ack_intr, scope iop_fifo_in, type rw */
198typedef struct {
199 unsigned int urun : 1;
200 unsigned int last_data : 1;
201 unsigned int dav : 1;
202 unsigned int avail : 1;
203 unsigned int orun : 1;
204 unsigned int dummy1 : 27;
205} reg_iop_fifo_in_rw_ack_intr;
206#define REG_RD_ADDR_iop_fifo_in_rw_ack_intr 56
207#define REG_WR_ADDR_iop_fifo_in_rw_ack_intr 56
208
209/* Register r_intr, scope iop_fifo_in, type r */
210typedef struct {
211 unsigned int urun : 1;
212 unsigned int last_data : 1;
213 unsigned int dav : 1;
214 unsigned int avail : 1;
215 unsigned int orun : 1;
216 unsigned int dummy1 : 27;
217} reg_iop_fifo_in_r_intr;
218#define REG_RD_ADDR_iop_fifo_in_r_intr 60
219
220/* Register r_masked_intr, scope iop_fifo_in, type r */
221typedef struct {
222 unsigned int urun : 1;
223 unsigned int last_data : 1;
224 unsigned int dav : 1;
225 unsigned int avail : 1;
226 unsigned int orun : 1;
227 unsigned int dummy1 : 27;
228} reg_iop_fifo_in_r_masked_intr;
229#define REG_RD_ADDR_iop_fifo_in_r_masked_intr 64
230
231
232/* Constants */
233enum {
234 regk_iop_fifo_in_dif_in = 0x00000002,
235 regk_iop_fifo_in_hi = 0x00000000,
236 regk_iop_fifo_in_neg = 0x00000002,
237 regk_iop_fifo_in_no = 0x00000000,
238 regk_iop_fifo_in_order16 = 0x00000001,
239 regk_iop_fifo_in_order24 = 0x00000002,
240 regk_iop_fifo_in_order32 = 0x00000003,
241 regk_iop_fifo_in_order8 = 0x00000000,
242 regk_iop_fifo_in_pos = 0x00000001,
243 regk_iop_fifo_in_pos_neg = 0x00000003,
244 regk_iop_fifo_in_rw_cfg_default = 0x00000024,
245 regk_iop_fifo_in_rw_ctrl_default = 0x00000000,
246 regk_iop_fifo_in_rw_intr_mask_default = 0x00000000,
247 regk_iop_fifo_in_rw_set_last_default = 0x00000000,
248 regk_iop_fifo_in_rw_strb_dif_in_default = 0x00000000,
249 regk_iop_fifo_in_size16 = 0x00000002,
250 regk_iop_fifo_in_size24 = 0x00000001,
251 regk_iop_fifo_in_size32 = 0x00000000,
252 regk_iop_fifo_in_size8 = 0x00000003,
253 regk_iop_fifo_in_yes = 0x00000001
254};
255#endif /* __iop_fifo_in_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_extra_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_extra_defs.h
deleted file mode 100644
index 798ac95870e9..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_extra_defs.h
+++ /dev/null
@@ -1,164 +0,0 @@
1#ifndef __iop_fifo_in_extra_defs_h
2#define __iop_fifo_in_extra_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_in_extra.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:08 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_fifo_in_extra_defs.h ../../inst/io_proc/rtl/iop_fifo_in_extra.r
11 * id: $Id: iop_fifo_in_extra_defs.h,v 1.1 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_fifo_in_extra */
86
87/* Register rw_wr_data, scope iop_fifo_in_extra, type rw */
88typedef unsigned int reg_iop_fifo_in_extra_rw_wr_data;
89#define REG_RD_ADDR_iop_fifo_in_extra_rw_wr_data 0
90#define REG_WR_ADDR_iop_fifo_in_extra_rw_wr_data 0
91
92/* Register r_stat, scope iop_fifo_in_extra, type r */
93typedef struct {
94 unsigned int avail_bytes : 4;
95 unsigned int last : 8;
96 unsigned int dif_in_en : 1;
97 unsigned int dif_out_en : 1;
98 unsigned int dummy1 : 18;
99} reg_iop_fifo_in_extra_r_stat;
100#define REG_RD_ADDR_iop_fifo_in_extra_r_stat 4
101
102/* Register rw_strb_dif_in, scope iop_fifo_in_extra, type rw */
103typedef struct {
104 unsigned int last : 2;
105 unsigned int dummy1 : 30;
106} reg_iop_fifo_in_extra_rw_strb_dif_in;
107#define REG_RD_ADDR_iop_fifo_in_extra_rw_strb_dif_in 8
108#define REG_WR_ADDR_iop_fifo_in_extra_rw_strb_dif_in 8
109
110/* Register rw_intr_mask, scope iop_fifo_in_extra, type rw */
111typedef struct {
112 unsigned int urun : 1;
113 unsigned int last_data : 1;
114 unsigned int dav : 1;
115 unsigned int avail : 1;
116 unsigned int orun : 1;
117 unsigned int dummy1 : 27;
118} reg_iop_fifo_in_extra_rw_intr_mask;
119#define REG_RD_ADDR_iop_fifo_in_extra_rw_intr_mask 12
120#define REG_WR_ADDR_iop_fifo_in_extra_rw_intr_mask 12
121
122/* Register rw_ack_intr, scope iop_fifo_in_extra, type rw */
123typedef struct {
124 unsigned int urun : 1;
125 unsigned int last_data : 1;
126 unsigned int dav : 1;
127 unsigned int avail : 1;
128 unsigned int orun : 1;
129 unsigned int dummy1 : 27;
130} reg_iop_fifo_in_extra_rw_ack_intr;
131#define REG_RD_ADDR_iop_fifo_in_extra_rw_ack_intr 16
132#define REG_WR_ADDR_iop_fifo_in_extra_rw_ack_intr 16
133
134/* Register r_intr, scope iop_fifo_in_extra, type r */
135typedef struct {
136 unsigned int urun : 1;
137 unsigned int last_data : 1;
138 unsigned int dav : 1;
139 unsigned int avail : 1;
140 unsigned int orun : 1;
141 unsigned int dummy1 : 27;
142} reg_iop_fifo_in_extra_r_intr;
143#define REG_RD_ADDR_iop_fifo_in_extra_r_intr 20
144
145/* Register r_masked_intr, scope iop_fifo_in_extra, type r */
146typedef struct {
147 unsigned int urun : 1;
148 unsigned int last_data : 1;
149 unsigned int dav : 1;
150 unsigned int avail : 1;
151 unsigned int orun : 1;
152 unsigned int dummy1 : 27;
153} reg_iop_fifo_in_extra_r_masked_intr;
154#define REG_RD_ADDR_iop_fifo_in_extra_r_masked_intr 24
155
156
157/* Constants */
158enum {
159 regk_iop_fifo_in_extra_fifo_in = 0x00000002,
160 regk_iop_fifo_in_extra_no = 0x00000000,
161 regk_iop_fifo_in_extra_rw_intr_mask_default = 0x00000000,
162 regk_iop_fifo_in_extra_yes = 0x00000001
163};
164#endif /* __iop_fifo_in_extra_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_defs.h
deleted file mode 100644
index 833e10f02526..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_defs.h
+++ /dev/null
@@ -1,278 +0,0 @@
1#ifndef __iop_fifo_out_defs_h
2#define __iop_fifo_out_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_out.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:09 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_fifo_out_defs.h ../../inst/io_proc/rtl/iop_fifo_out.r
11 * id: $Id: iop_fifo_out_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_fifo_out */
86
87/* Register rw_cfg, scope iop_fifo_out, type rw */
88typedef struct {
89 unsigned int free_lim : 3;
90 unsigned int byte_order : 2;
91 unsigned int trig : 2;
92 unsigned int last_dis_dif_in : 1;
93 unsigned int mode : 2;
94 unsigned int delay_out_last : 1;
95 unsigned int last_dis_dif_out : 1;
96 unsigned int dummy1 : 20;
97} reg_iop_fifo_out_rw_cfg;
98#define REG_RD_ADDR_iop_fifo_out_rw_cfg 0
99#define REG_WR_ADDR_iop_fifo_out_rw_cfg 0
100
101/* Register rw_ctrl, scope iop_fifo_out, type rw */
102typedef struct {
103 unsigned int dif_in_en : 1;
104 unsigned int dif_out_en : 1;
105 unsigned int dummy1 : 30;
106} reg_iop_fifo_out_rw_ctrl;
107#define REG_RD_ADDR_iop_fifo_out_rw_ctrl 4
108#define REG_WR_ADDR_iop_fifo_out_rw_ctrl 4
109
110/* Register r_stat, scope iop_fifo_out, type r */
111typedef struct {
112 unsigned int avail_bytes : 4;
113 unsigned int last : 8;
114 unsigned int dif_in_en : 1;
115 unsigned int dif_out_en : 1;
116 unsigned int zero_data_last : 1;
117 unsigned int dummy1 : 17;
118} reg_iop_fifo_out_r_stat;
119#define REG_RD_ADDR_iop_fifo_out_r_stat 8
120
121/* Register rw_wr1byte, scope iop_fifo_out, type rw */
122typedef struct {
123 unsigned int data : 8;
124 unsigned int dummy1 : 24;
125} reg_iop_fifo_out_rw_wr1byte;
126#define REG_RD_ADDR_iop_fifo_out_rw_wr1byte 12
127#define REG_WR_ADDR_iop_fifo_out_rw_wr1byte 12
128
129/* Register rw_wr2byte, scope iop_fifo_out, type rw */
130typedef struct {
131 unsigned int data : 16;
132 unsigned int dummy1 : 16;
133} reg_iop_fifo_out_rw_wr2byte;
134#define REG_RD_ADDR_iop_fifo_out_rw_wr2byte 16
135#define REG_WR_ADDR_iop_fifo_out_rw_wr2byte 16
136
137/* Register rw_wr3byte, scope iop_fifo_out, type rw */
138typedef struct {
139 unsigned int data : 24;
140 unsigned int dummy1 : 8;
141} reg_iop_fifo_out_rw_wr3byte;
142#define REG_RD_ADDR_iop_fifo_out_rw_wr3byte 20
143#define REG_WR_ADDR_iop_fifo_out_rw_wr3byte 20
144
145/* Register rw_wr4byte, scope iop_fifo_out, type rw */
146typedef struct {
147 unsigned int data : 32;
148} reg_iop_fifo_out_rw_wr4byte;
149#define REG_RD_ADDR_iop_fifo_out_rw_wr4byte 24
150#define REG_WR_ADDR_iop_fifo_out_rw_wr4byte 24
151
152/* Register rw_wr1byte_last, scope iop_fifo_out, type rw */
153typedef struct {
154 unsigned int data : 8;
155 unsigned int dummy1 : 24;
156} reg_iop_fifo_out_rw_wr1byte_last;
157#define REG_RD_ADDR_iop_fifo_out_rw_wr1byte_last 28
158#define REG_WR_ADDR_iop_fifo_out_rw_wr1byte_last 28
159
160/* Register rw_wr2byte_last, scope iop_fifo_out, type rw */
161typedef struct {
162 unsigned int data : 16;
163 unsigned int dummy1 : 16;
164} reg_iop_fifo_out_rw_wr2byte_last;
165#define REG_RD_ADDR_iop_fifo_out_rw_wr2byte_last 32
166#define REG_WR_ADDR_iop_fifo_out_rw_wr2byte_last 32
167
168/* Register rw_wr3byte_last, scope iop_fifo_out, type rw */
169typedef struct {
170 unsigned int data : 24;
171 unsigned int dummy1 : 8;
172} reg_iop_fifo_out_rw_wr3byte_last;
173#define REG_RD_ADDR_iop_fifo_out_rw_wr3byte_last 36
174#define REG_WR_ADDR_iop_fifo_out_rw_wr3byte_last 36
175
176/* Register rw_wr4byte_last, scope iop_fifo_out, type rw */
177typedef struct {
178 unsigned int data : 32;
179} reg_iop_fifo_out_rw_wr4byte_last;
180#define REG_RD_ADDR_iop_fifo_out_rw_wr4byte_last 40
181#define REG_WR_ADDR_iop_fifo_out_rw_wr4byte_last 40
182
183/* Register rw_set_last, scope iop_fifo_out, type rw */
184typedef unsigned int reg_iop_fifo_out_rw_set_last;
185#define REG_RD_ADDR_iop_fifo_out_rw_set_last 44
186#define REG_WR_ADDR_iop_fifo_out_rw_set_last 44
187
188/* Register rs_rd_data, scope iop_fifo_out, type rs */
189typedef unsigned int reg_iop_fifo_out_rs_rd_data;
190#define REG_RD_ADDR_iop_fifo_out_rs_rd_data 48
191
192/* Register r_rd_data, scope iop_fifo_out, type r */
193typedef unsigned int reg_iop_fifo_out_r_rd_data;
194#define REG_RD_ADDR_iop_fifo_out_r_rd_data 52
195
196/* Register rw_strb_dif_out, scope iop_fifo_out, type rw */
197typedef unsigned int reg_iop_fifo_out_rw_strb_dif_out;
198#define REG_RD_ADDR_iop_fifo_out_rw_strb_dif_out 56
199#define REG_WR_ADDR_iop_fifo_out_rw_strb_dif_out 56
200
201/* Register rw_intr_mask, scope iop_fifo_out, type rw */
202typedef struct {
203 unsigned int urun : 1;
204 unsigned int last_data : 1;
205 unsigned int dav : 1;
206 unsigned int free : 1;
207 unsigned int orun : 1;
208 unsigned int dummy1 : 27;
209} reg_iop_fifo_out_rw_intr_mask;
210#define REG_RD_ADDR_iop_fifo_out_rw_intr_mask 60
211#define REG_WR_ADDR_iop_fifo_out_rw_intr_mask 60
212
213/* Register rw_ack_intr, scope iop_fifo_out, type rw */
214typedef struct {
215 unsigned int urun : 1;
216 unsigned int last_data : 1;
217 unsigned int dav : 1;
218 unsigned int free : 1;
219 unsigned int orun : 1;
220 unsigned int dummy1 : 27;
221} reg_iop_fifo_out_rw_ack_intr;
222#define REG_RD_ADDR_iop_fifo_out_rw_ack_intr 64
223#define REG_WR_ADDR_iop_fifo_out_rw_ack_intr 64
224
225/* Register r_intr, scope iop_fifo_out, type r */
226typedef struct {
227 unsigned int urun : 1;
228 unsigned int last_data : 1;
229 unsigned int dav : 1;
230 unsigned int free : 1;
231 unsigned int orun : 1;
232 unsigned int dummy1 : 27;
233} reg_iop_fifo_out_r_intr;
234#define REG_RD_ADDR_iop_fifo_out_r_intr 68
235
236/* Register r_masked_intr, scope iop_fifo_out, type r */
237typedef struct {
238 unsigned int urun : 1;
239 unsigned int last_data : 1;
240 unsigned int dav : 1;
241 unsigned int free : 1;
242 unsigned int orun : 1;
243 unsigned int dummy1 : 27;
244} reg_iop_fifo_out_r_masked_intr;
245#define REG_RD_ADDR_iop_fifo_out_r_masked_intr 72
246
247
248/* Constants */
249enum {
250 regk_iop_fifo_out_hi = 0x00000000,
251 regk_iop_fifo_out_neg = 0x00000002,
252 regk_iop_fifo_out_no = 0x00000000,
253 regk_iop_fifo_out_order16 = 0x00000001,
254 regk_iop_fifo_out_order24 = 0x00000002,
255 regk_iop_fifo_out_order32 = 0x00000003,
256 regk_iop_fifo_out_order8 = 0x00000000,
257 regk_iop_fifo_out_pos = 0x00000001,
258 regk_iop_fifo_out_pos_neg = 0x00000003,
259 regk_iop_fifo_out_rw_cfg_default = 0x00000024,
260 regk_iop_fifo_out_rw_ctrl_default = 0x00000000,
261 regk_iop_fifo_out_rw_intr_mask_default = 0x00000000,
262 regk_iop_fifo_out_rw_set_last_default = 0x00000000,
263 regk_iop_fifo_out_rw_strb_dif_out_default = 0x00000000,
264 regk_iop_fifo_out_rw_wr1byte_default = 0x00000000,
265 regk_iop_fifo_out_rw_wr1byte_last_default = 0x00000000,
266 regk_iop_fifo_out_rw_wr2byte_default = 0x00000000,
267 regk_iop_fifo_out_rw_wr2byte_last_default = 0x00000000,
268 regk_iop_fifo_out_rw_wr3byte_default = 0x00000000,
269 regk_iop_fifo_out_rw_wr3byte_last_default = 0x00000000,
270 regk_iop_fifo_out_rw_wr4byte_default = 0x00000000,
271 regk_iop_fifo_out_rw_wr4byte_last_default = 0x00000000,
272 regk_iop_fifo_out_size16 = 0x00000002,
273 regk_iop_fifo_out_size24 = 0x00000001,
274 regk_iop_fifo_out_size32 = 0x00000000,
275 regk_iop_fifo_out_size8 = 0x00000003,
276 regk_iop_fifo_out_yes = 0x00000001
277};
278#endif /* __iop_fifo_out_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_extra_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_extra_defs.h
deleted file mode 100644
index 4a840aae84ee..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_extra_defs.h
+++ /dev/null
@@ -1,164 +0,0 @@
1#ifndef __iop_fifo_out_extra_defs_h
2#define __iop_fifo_out_extra_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_fifo_out_extra.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:10 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_fifo_out_extra_defs.h ../../inst/io_proc/rtl/iop_fifo_out_extra.r
11 * id: $Id: iop_fifo_out_extra_defs.h,v 1.1 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_fifo_out_extra */
86
87/* Register rs_rd_data, scope iop_fifo_out_extra, type rs */
88typedef unsigned int reg_iop_fifo_out_extra_rs_rd_data;
89#define REG_RD_ADDR_iop_fifo_out_extra_rs_rd_data 0
90
91/* Register r_rd_data, scope iop_fifo_out_extra, type r */
92typedef unsigned int reg_iop_fifo_out_extra_r_rd_data;
93#define REG_RD_ADDR_iop_fifo_out_extra_r_rd_data 4
94
95/* Register r_stat, scope iop_fifo_out_extra, type r */
96typedef struct {
97 unsigned int avail_bytes : 4;
98 unsigned int last : 8;
99 unsigned int dif_in_en : 1;
100 unsigned int dif_out_en : 1;
101 unsigned int zero_data_last : 1;
102 unsigned int dummy1 : 17;
103} reg_iop_fifo_out_extra_r_stat;
104#define REG_RD_ADDR_iop_fifo_out_extra_r_stat 8
105
106/* Register rw_strb_dif_out, scope iop_fifo_out_extra, type rw */
107typedef unsigned int reg_iop_fifo_out_extra_rw_strb_dif_out;
108#define REG_RD_ADDR_iop_fifo_out_extra_rw_strb_dif_out 12
109#define REG_WR_ADDR_iop_fifo_out_extra_rw_strb_dif_out 12
110
111/* Register rw_intr_mask, scope iop_fifo_out_extra, type rw */
112typedef struct {
113 unsigned int urun : 1;
114 unsigned int last_data : 1;
115 unsigned int dav : 1;
116 unsigned int free : 1;
117 unsigned int orun : 1;
118 unsigned int dummy1 : 27;
119} reg_iop_fifo_out_extra_rw_intr_mask;
120#define REG_RD_ADDR_iop_fifo_out_extra_rw_intr_mask 16
121#define REG_WR_ADDR_iop_fifo_out_extra_rw_intr_mask 16
122
123/* Register rw_ack_intr, scope iop_fifo_out_extra, type rw */
124typedef struct {
125 unsigned int urun : 1;
126 unsigned int last_data : 1;
127 unsigned int dav : 1;
128 unsigned int free : 1;
129 unsigned int orun : 1;
130 unsigned int dummy1 : 27;
131} reg_iop_fifo_out_extra_rw_ack_intr;
132#define REG_RD_ADDR_iop_fifo_out_extra_rw_ack_intr 20
133#define REG_WR_ADDR_iop_fifo_out_extra_rw_ack_intr 20
134
135/* Register r_intr, scope iop_fifo_out_extra, type r */
136typedef struct {
137 unsigned int urun : 1;
138 unsigned int last_data : 1;
139 unsigned int dav : 1;
140 unsigned int free : 1;
141 unsigned int orun : 1;
142 unsigned int dummy1 : 27;
143} reg_iop_fifo_out_extra_r_intr;
144#define REG_RD_ADDR_iop_fifo_out_extra_r_intr 24
145
146/* Register r_masked_intr, scope iop_fifo_out_extra, type r */
147typedef struct {
148 unsigned int urun : 1;
149 unsigned int last_data : 1;
150 unsigned int dav : 1;
151 unsigned int free : 1;
152 unsigned int orun : 1;
153 unsigned int dummy1 : 27;
154} reg_iop_fifo_out_extra_r_masked_intr;
155#define REG_RD_ADDR_iop_fifo_out_extra_r_masked_intr 28
156
157
158/* Constants */
159enum {
160 regk_iop_fifo_out_extra_no = 0x00000000,
161 regk_iop_fifo_out_extra_rw_intr_mask_default = 0x00000000,
162 regk_iop_fifo_out_extra_yes = 0x00000001
163};
164#endif /* __iop_fifo_out_extra_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_mpu_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_mpu_defs.h
deleted file mode 100644
index c2b0ba1be60f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_mpu_defs.h
+++ /dev/null
@@ -1,190 +0,0 @@
1#ifndef __iop_mpu_defs_h
2#define __iop_mpu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_mpu.r
7 * id: iop_mpu.r,v 1.30 2005/02/17 08:12:33 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_mpu_defs.h ../../inst/io_proc/rtl/iop_mpu.r
11 * id: $Id: iop_mpu_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_mpu */
86
87#define STRIDE_iop_mpu_rw_r 4
88/* Register rw_r, scope iop_mpu, type rw */
89typedef unsigned int reg_iop_mpu_rw_r;
90#define REG_RD_ADDR_iop_mpu_rw_r 0
91#define REG_WR_ADDR_iop_mpu_rw_r 0
92
93/* Register rw_ctrl, scope iop_mpu, type rw */
94typedef struct {
95 unsigned int en : 1;
96 unsigned int dummy1 : 31;
97} reg_iop_mpu_rw_ctrl;
98#define REG_RD_ADDR_iop_mpu_rw_ctrl 128
99#define REG_WR_ADDR_iop_mpu_rw_ctrl 128
100
101/* Register r_pc, scope iop_mpu, type r */
102typedef struct {
103 unsigned int addr : 12;
104 unsigned int dummy1 : 20;
105} reg_iop_mpu_r_pc;
106#define REG_RD_ADDR_iop_mpu_r_pc 132
107
108/* Register r_stat, scope iop_mpu, type r */
109typedef struct {
110 unsigned int instr_reg_busy : 1;
111 unsigned int intr_busy : 1;
112 unsigned int intr_vect : 16;
113 unsigned int dummy1 : 14;
114} reg_iop_mpu_r_stat;
115#define REG_RD_ADDR_iop_mpu_r_stat 136
116
117/* Register rw_instr, scope iop_mpu, type rw */
118typedef unsigned int reg_iop_mpu_rw_instr;
119#define REG_RD_ADDR_iop_mpu_rw_instr 140
120#define REG_WR_ADDR_iop_mpu_rw_instr 140
121
122/* Register rw_immediate, scope iop_mpu, type rw */
123typedef unsigned int reg_iop_mpu_rw_immediate;
124#define REG_RD_ADDR_iop_mpu_rw_immediate 144
125#define REG_WR_ADDR_iop_mpu_rw_immediate 144
126
127/* Register r_trace, scope iop_mpu, type r */
128typedef struct {
129 unsigned int intr_vect : 16;
130 unsigned int pc : 12;
131 unsigned int en : 1;
132 unsigned int instr_reg_busy : 1;
133 unsigned int intr_busy : 1;
134 unsigned int dummy1 : 1;
135} reg_iop_mpu_r_trace;
136#define REG_RD_ADDR_iop_mpu_r_trace 148
137
138/* Register r_wr_stat, scope iop_mpu, type r */
139typedef struct {
140 unsigned int r0 : 1;
141 unsigned int r1 : 1;
142 unsigned int r2 : 1;
143 unsigned int r3 : 1;
144 unsigned int r4 : 1;
145 unsigned int r5 : 1;
146 unsigned int r6 : 1;
147 unsigned int r7 : 1;
148 unsigned int r8 : 1;
149 unsigned int r9 : 1;
150 unsigned int r10 : 1;
151 unsigned int r11 : 1;
152 unsigned int r12 : 1;
153 unsigned int r13 : 1;
154 unsigned int r14 : 1;
155 unsigned int r15 : 1;
156 unsigned int dummy1 : 16;
157} reg_iop_mpu_r_wr_stat;
158#define REG_RD_ADDR_iop_mpu_r_wr_stat 152
159
160#define STRIDE_iop_mpu_rw_thread 4
161/* Register rw_thread, scope iop_mpu, type rw */
162typedef struct {
163 unsigned int addr : 12;
164 unsigned int dummy1 : 20;
165} reg_iop_mpu_rw_thread;
166#define REG_RD_ADDR_iop_mpu_rw_thread 156
167#define REG_WR_ADDR_iop_mpu_rw_thread 156
168
169#define STRIDE_iop_mpu_rw_intr 4
170/* Register rw_intr, scope iop_mpu, type rw */
171typedef struct {
172 unsigned int addr : 12;
173 unsigned int dummy1 : 20;
174} reg_iop_mpu_rw_intr;
175#define REG_RD_ADDR_iop_mpu_rw_intr 196
176#define REG_WR_ADDR_iop_mpu_rw_intr 196
177
178
179/* Constants */
180enum {
181 regk_iop_mpu_no = 0x00000000,
182 regk_iop_mpu_r_pc_default = 0x00000000,
183 regk_iop_mpu_rw_ctrl_default = 0x00000000,
184 regk_iop_mpu_rw_intr_size = 0x00000010,
185 regk_iop_mpu_rw_r_size = 0x00000010,
186 regk_iop_mpu_rw_thread_default = 0x00000000,
187 regk_iop_mpu_rw_thread_size = 0x00000004,
188 regk_iop_mpu_yes = 0x00000001
189};
190#endif /* __iop_mpu_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_mpu_macros.h b/include/asm-cris/arch-v32/hwregs/iop/iop_mpu_macros.h
deleted file mode 100644
index 2ec897ced166..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_mpu_macros.h
+++ /dev/null
@@ -1,764 +0,0 @@
1/* ************************************************************************* */
2/* This file is autogenerated by IOPASM Version 1.2 */
3/* DO NOT EDIT THIS FILE - All changes will be lost! */
4/* ************************************************************************* */
5
6
7
8#ifndef __IOP_MPU_MACROS_H__
9#define __IOP_MPU_MACROS_H__
10
11
12/* ************************************************************************* */
13/* REGISTER DEFINITIONS */
14/* ************************************************************************* */
15#define MPU_R0 (0x0)
16#define MPU_R1 (0x1)
17#define MPU_R2 (0x2)
18#define MPU_R3 (0x3)
19#define MPU_R4 (0x4)
20#define MPU_R5 (0x5)
21#define MPU_R6 (0x6)
22#define MPU_R7 (0x7)
23#define MPU_R8 (0x8)
24#define MPU_R9 (0x9)
25#define MPU_R10 (0xa)
26#define MPU_R11 (0xb)
27#define MPU_R12 (0xc)
28#define MPU_R13 (0xd)
29#define MPU_R14 (0xe)
30#define MPU_R15 (0xf)
31#define MPU_PC (0x2)
32#define MPU_WSTS (0x3)
33#define MPU_JADDR (0x4)
34#define MPU_IRP (0x5)
35#define MPU_SRP (0x6)
36#define MPU_T0 (0x8)
37#define MPU_T1 (0x9)
38#define MPU_T2 (0xa)
39#define MPU_T3 (0xb)
40#define MPU_I0 (0x10)
41#define MPU_I1 (0x11)
42#define MPU_I2 (0x12)
43#define MPU_I3 (0x13)
44#define MPU_I4 (0x14)
45#define MPU_I5 (0x15)
46#define MPU_I6 (0x16)
47#define MPU_I7 (0x17)
48#define MPU_I8 (0x18)
49#define MPU_I9 (0x19)
50#define MPU_I10 (0x1a)
51#define MPU_I11 (0x1b)
52#define MPU_I12 (0x1c)
53#define MPU_I13 (0x1d)
54#define MPU_I14 (0x1e)
55#define MPU_I15 (0x1f)
56#define MPU_P2 (0x2)
57#define MPU_P3 (0x3)
58#define MPU_P5 (0x5)
59#define MPU_P6 (0x6)
60#define MPU_P8 (0x8)
61#define MPU_P9 (0x9)
62#define MPU_P10 (0xa)
63#define MPU_P11 (0xb)
64#define MPU_P16 (0x10)
65#define MPU_P17 (0x12)
66#define MPU_P18 (0x12)
67#define MPU_P19 (0x13)
68#define MPU_P20 (0x14)
69#define MPU_P21 (0x15)
70#define MPU_P22 (0x16)
71#define MPU_P23 (0x17)
72#define MPU_P24 (0x18)
73#define MPU_P25 (0x19)
74#define MPU_P26 (0x1a)
75#define MPU_P27 (0x1b)
76#define MPU_P28 (0x1c)
77#define MPU_P29 (0x1d)
78#define MPU_P30 (0x1e)
79#define MPU_P31 (0x1f)
80#define MPU_P1 (0x1)
81#define MPU_REGA (0x1)
82
83
84
85/* ************************************************************************* */
86/* ADDRESS MACROS */
87/* ************************************************************************* */
88#define MK_DWORD_ADDR(ADDR) (ADDR >> 2)
89#define MK_BYTE_ADDR(ADDR) (ADDR)
90
91
92
93/* ************************************************************************* */
94/* INSTRUCTION MACROS */
95/* ************************************************************************* */
96#define MPU_ADD_RRR(S,N,D) (0x4000008C | ((S & ((1 << 5) - 1)) << 16)\
97 | ((N & ((1 << 5) - 1)) << 11)\
98 | ((D & ((1 << 5) - 1)) << 21))
99
100#define MPU_ADD_RRS(S,N,D) (0x4000048C | ((S & ((1 << 5) - 1)) << 16)\
101 | ((N & ((1 << 5) - 1)) << 11)\
102 | ((D & ((1 << 5) - 1)) << 21))
103
104#define MPU_ADD_RSR(S,N,D) (0x4000018C | ((S & ((1 << 5) - 1)) << 16)\
105 | ((N & ((1 << 5) - 1)) << 11)\
106 | ((D & ((1 << 5) - 1)) << 21))
107
108#define MPU_ADD_RSS(S,N,D) (0x4000058C | ((S & ((1 << 5) - 1)) << 16)\
109 | ((N & ((1 << 5) - 1)) << 11)\
110 | ((D & ((1 << 5) - 1)) << 21))
111
112#define MPU_ADD_SRR(S,N,D) (0x4000028C | ((S & ((1 << 5) - 1)) << 16)\
113 | ((N & ((1 << 5) - 1)) << 11)\
114 | ((D & ((1 << 5) - 1)) << 21))
115
116#define MPU_ADD_SRS(S,N,D) (0x4000068C | ((S & ((1 << 5) - 1)) << 16)\
117 | ((N & ((1 << 5) - 1)) << 11)\
118 | ((D & ((1 << 5) - 1)) << 21))
119
120#define MPU_ADD_SSR(S,N,D) (0x4000038C | ((S & ((1 << 5) - 1)) << 16)\
121 | ((N & ((1 << 5) - 1)) << 11)\
122 | ((D & ((1 << 5) - 1)) << 21))
123
124#define MPU_ADD_SSS(S,N,D) (0x4000078C | ((S & ((1 << 5) - 1)) << 16)\
125 | ((N & ((1 << 5) - 1)) << 11)\
126 | ((D & ((1 << 5) - 1)) << 21))
127
128#define MPU_ADDQ_RIR(S,N,D) (0x10000000 | ((S & ((1 << 5) - 1)) << 16)\
129 | ((N & ((1 << 16) - 1)) << 0)\
130 | ((D & ((1 << 5) - 1)) << 21))
131
132#define MPU_ADDQ_IRR(S,N,D) (0x10000000 | ((S & ((1 << 16) - 1)) << 0)\
133 | ((N & ((1 << 5) - 1)) << 16)\
134 | ((D & ((1 << 5) - 1)) << 21))
135
136#define MPU_ADDX_IRR_INSTR(S,N,D) (0xC000008C | ((N & ((1 << 5) - 1)) << 16)\
137 | ((D & ((1 << 5) - 1)) << 21))
138
139#define MPU_ADDX_IRR_IMM(S,N,D) (S & 0xFFFFFFFF)
140
141#define MPU_ADDX_RIR_INSTR(S,N,D) (0xC000008C | ((S & ((1 << 5) - 1)) << 16)\
142 | ((D & ((1 << 5) - 1)) << 21))
143
144#define MPU_ADDX_RIR_IMM(S,N,D) (N & 0xFFFFFFFF)
145
146#define MPU_ADDX_ISR_INSTR(S,N,D) (0xC000028C | ((N & ((1 << 5) - 1)) << 16)\
147 | ((D & ((1 << 5) - 1)) << 21))
148
149#define MPU_ADDX_ISR_IMM(S,N,D) (S & 0xFFFFFFFF)
150
151#define MPU_ADDX_SIR_INSTR(S,N,D) (0xC000028C | ((S & ((1 << 5) - 1)) << 16)\
152 | ((D & ((1 << 5) - 1)) << 21))
153
154#define MPU_ADDX_SIR_IMM(S,N,D) (N & 0xFFFFFFFF)
155
156#define MPU_ADDX_IRS_INSTR(S,N,D) (0xC000048C | ((N & ((1 << 5) - 1)) << 16)\
157 | ((D & ((1 << 5) - 1)) << 21))
158
159#define MPU_ADDX_IRS_IMM(S,N,D) (S & 0xFFFFFFFF)
160
161#define MPU_ADDX_RIS_INSTR(S,N,D) (0xC000048C | ((S & ((1 << 5) - 1)) << 16)\
162 | ((D & ((1 << 5) - 1)) << 21))
163
164#define MPU_ADDX_RIS_IMM(S,N,D) (N & 0xFFFFFFFF)
165
166#define MPU_ADDX_ISS_INSTR(S,N,D) (0xC000068C | ((N & ((1 << 5) - 1)) << 16)\
167 | ((D & ((1 << 5) - 1)) << 21))
168
169#define MPU_ADDX_ISS_IMM(S,N,D) (S & 0xFFFFFFFF)
170
171#define MPU_ADDX_SIS_INSTR(S,N,D) (0xC000068C | ((S & ((1 << 5) - 1)) << 16)\
172 | ((D & ((1 << 5) - 1)) << 21))
173
174#define MPU_ADDX_SIS_IMM(S,N,D) (N & 0xFFFFFFFF)
175
176#define MPU_AND_RRR(S,N,D) (0x4000008A | ((S & ((1 << 5) - 1)) << 16)\
177 | ((N & ((1 << 5) - 1)) << 11)\
178 | ((D & ((1 << 5) - 1)) << 21))
179
180#define MPU_AND_RRS(S,N,D) (0x4000048A | ((S & ((1 << 5) - 1)) << 16)\
181 | ((N & ((1 << 5) - 1)) << 11)\
182 | ((D & ((1 << 5) - 1)) << 21))
183
184#define MPU_AND_RSR(S,N,D) (0x4000018A | ((S & ((1 << 5) - 1)) << 16)\
185 | ((N & ((1 << 5) - 1)) << 11)\
186 | ((D & ((1 << 5) - 1)) << 21))
187
188#define MPU_AND_RSS(S,N,D) (0x4000058A | ((S & ((1 << 5) - 1)) << 16)\
189 | ((N & ((1 << 5) - 1)) << 11)\
190 | ((D & ((1 << 5) - 1)) << 21))
191
192#define MPU_AND_SRR(S,N,D) (0x4000028A | ((S & ((1 << 5) - 1)) << 16)\
193 | ((N & ((1 << 5) - 1)) << 11)\
194 | ((D & ((1 << 5) - 1)) << 21))
195
196#define MPU_AND_SRS(S,N,D) (0x4000068A | ((S & ((1 << 5) - 1)) << 16)\
197 | ((N & ((1 << 5) - 1)) << 11)\
198 | ((D & ((1 << 5) - 1)) << 21))
199
200#define MPU_AND_SSR(S,N,D) (0x4000038A | ((S & ((1 << 5) - 1)) << 16)\
201 | ((N & ((1 << 5) - 1)) << 11)\
202 | ((D & ((1 << 5) - 1)) << 21))
203
204#define MPU_AND_SSS(S,N,D) (0x4000078A | ((S & ((1 << 5) - 1)) << 16)\
205 | ((N & ((1 << 5) - 1)) << 11)\
206 | ((D & ((1 << 5) - 1)) << 21))
207
208#define MPU_ANDQ_RIR(S,N,D) (0x08000000 | ((S & ((1 << 5) - 1)) << 16)\
209 | ((N & ((1 << 16) - 1)) << 0)\
210 | ((D & ((1 << 5) - 1)) << 21))
211
212#define MPU_ANDQ_IRR(S,N,D) (0x08000000 | ((S & ((1 << 16) - 1)) << 0)\
213 | ((N & ((1 << 5) - 1)) << 16)\
214 | ((D & ((1 << 5) - 1)) << 21))
215
216#define MPU_ANDX_RIR_INSTR(S,N,D) (0xC000008A | ((S & ((1 << 5) - 1)) << 16)\
217 | ((D & ((1 << 5) - 1)) << 21))
218
219#define MPU_ANDX_RIR_IMM(S,N,D) (N & 0xFFFFFFFF)
220
221#define MPU_ANDX_IRR_INSTR(S,N,D) (0xC000008A | ((N & ((1 << 5) - 1)) << 16)\
222 | ((D & ((1 << 5) - 1)) << 21))
223
224#define MPU_ANDX_IRR_IMM(S,N,D) (S & 0xFFFFFFFF)
225
226#define MPU_ANDX_ISR_INSTR(S,N,D) (0xC000028A | ((N & ((1 << 5) - 1)) << 16)\
227 | ((D & ((1 << 5) - 1)) << 21))
228
229#define MPU_ANDX_ISR_IMM(S,N,D) (S & 0xFFFFFFFF)
230
231#define MPU_ANDX_SIR_INSTR(S,N,D) (0xC000028A | ((S & ((1 << 5) - 1)) << 16)\
232 | ((D & ((1 << 5) - 1)) << 21))
233
234#define MPU_ANDX_SIR_IMM(S,N,D) (N & 0xFFFFFFFF)
235
236#define MPU_ANDX_IRS_INSTR(S,N,D) (0xC000048A | ((N & ((1 << 5) - 1)) << 16)\
237 | ((D & ((1 << 5) - 1)) << 21))
238
239#define MPU_ANDX_IRS_IMM(S,N,D) (S & 0xFFFFFFFF)
240
241#define MPU_ANDX_ISS_INSTR(S,N,D) (0xC000068A | ((N & ((1 << 5) - 1)) << 16)\
242 | ((D & ((1 << 5) - 1)) << 21))
243
244#define MPU_ANDX_ISS_IMM(S,N,D) (S & 0xFFFFFFFF)
245
246#define MPU_ANDX_RIS_INSTR(S,N,D) (0xC000048A | ((S & ((1 << 5) - 1)) << 16)\
247 | ((D & ((1 << 5) - 1)) << 21))
248
249#define MPU_ANDX_RIS_IMM(S,N,D) (N & 0xFFFFFFFF)
250
251#define MPU_ANDX_SIS_INSTR(S,N,D) (0xC000068A | ((S & ((1 << 5) - 1)) << 16)\
252 | ((D & ((1 << 5) - 1)) << 21))
253
254#define MPU_ANDX_SIS_IMM(S,N,D) (N & 0xFFFFFFFF)
255
256#define MPU_BA_I(S) (0x60000000 | ((S & ((1 << 16) - 1)) << 0))
257
258#define MPU_BAR_R(S) (0x62000000 | ((S & ((1 << 5) - 1)) << 11))
259
260#define MPU_BAR_S(S) (0x63000000 | ((S & ((1 << 5) - 1)) << 11))
261
262#define MPU_BBC_RII(S,N,D) (0x78000000 | ((S & ((1 << 5) - 1)) << 16)\
263 | ((N & ((1 << 5) - 1)) << 21)\
264 | ((D & ((1 << 16) - 1)) << 0))
265
266#define MPU_BBS_RII(S,N,D) (0x7C000000 | ((S & ((1 << 5) - 1)) << 16)\
267 | ((N & ((1 << 5) - 1)) << 21)\
268 | ((D & ((1 << 16) - 1)) << 0))
269
270#define MPU_BNZ_RI(S,D) (0x74400000 | ((S & ((1 << 5) - 1)) << 16)\
271 | ((D & ((1 << 16) - 1)) << 0))
272
273#define MPU_BMI_RI(S,D) (0x7FE00000 | ((S & ((1 << 5) - 1)) << 16)\
274 | ((D & ((1 << 16) - 1)) << 0))
275
276#define MPU_BPL_RI(S,D) (0x7BE00000 | ((S & ((1 << 5) - 1)) << 16)\
277 | ((D & ((1 << 16) - 1)) << 0))
278
279#define MPU_BZ_RI(S,D) (0x74000000 | ((S & ((1 << 5) - 1)) << 16)\
280 | ((D & ((1 << 16) - 1)) << 0))
281
282#define MPU_DI() (0x40000001)
283
284#define MPU_EI() (0x40000003)
285
286#define MPU_HALT() (0x40000002)
287
288#define MPU_JIR_I(S) (0x60200000 | ((S & ((1 << 16) - 1)) << 0))
289
290#define MPU_JIR_R(S) (0x62200000 | ((S & ((1 << 5) - 1)) << 11))
291
292#define MPU_JIR_S(S) (0x63200000 | ((S & ((1 << 5) - 1)) << 11))
293
294#define MPU_JNT() (0x61000000)
295
296#define MPU_JSR_I(S) (0x60400000 | ((S & ((1 << 16) - 1)) << 0))
297
298#define MPU_JSR_R(S) (0x62400000 | ((S & ((1 << 5) - 1)) << 11))
299
300#define MPU_JSR_S(S) (0x63400000 | ((S & ((1 << 5) - 1)) << 11))
301
302#define MPU_LSL_RRR(S,N,D) (0x4000008E | ((S & ((1 << 5) - 1)) << 16)\
303 | ((N & ((1 << 5) - 1)) << 11)\
304 | ((D & ((1 << 5) - 1)) << 21))
305
306#define MPU_LSL_RRS(S,N,D) (0x4000048E | ((S & ((1 << 5) - 1)) << 16)\
307 | ((N & ((1 << 5) - 1)) << 11)\
308 | ((D & ((1 << 5) - 1)) << 21))
309
310#define MPU_LSL_RSR(S,N,D) (0x4000018E | ((S & ((1 << 5) - 1)) << 16)\
311 | ((N & ((1 << 5) - 1)) << 11)\
312 | ((D & ((1 << 5) - 1)) << 21))
313
314#define MPU_LSL_RSS(S,N,D) (0x4000058E | ((S & ((1 << 5) - 1)) << 16)\
315 | ((N & ((1 << 5) - 1)) << 11)\
316 | ((D & ((1 << 5) - 1)) << 21))
317
318#define MPU_LSL_SRR(S,N,D) (0x4000028E | ((S & ((1 << 5) - 1)) << 16)\
319 | ((N & ((1 << 5) - 1)) << 11)\
320 | ((D & ((1 << 5) - 1)) << 21))
321
322#define MPU_LSL_SRS(S,N,D) (0x4000068E | ((S & ((1 << 5) - 1)) << 16)\
323 | ((N & ((1 << 5) - 1)) << 11)\
324 | ((D & ((1 << 5) - 1)) << 21))
325
326#define MPU_LSL_SSR(S,N,D) (0x4000038E | ((S & ((1 << 5) - 1)) << 16)\
327 | ((N & ((1 << 5) - 1)) << 11)\
328 | ((D & ((1 << 5) - 1)) << 21))
329
330#define MPU_LSL_SSS(S,N,D) (0x4000078E | ((S & ((1 << 5) - 1)) << 16)\
331 | ((N & ((1 << 5) - 1)) << 11)\
332 | ((D & ((1 << 5) - 1)) << 21))
333
334#define MPU_LSLQ_RIR(S,N,D) (0x18000000 | ((S & ((1 << 5) - 1)) << 16)\
335 | ((N & ((1 << 16) - 1)) << 0)\
336 | ((D & ((1 << 5) - 1)) << 21))
337
338#define MPU_LSR_RRR(S,N,D) (0x4000008F | ((S & ((1 << 5) - 1)) << 16)\
339 | ((N & ((1 << 5) - 1)) << 11)\
340 | ((D & ((1 << 5) - 1)) << 21))
341
342#define MPU_LSR_RRS(S,N,D) (0x4000048F | ((S & ((1 << 5) - 1)) << 16)\
343 | ((N & ((1 << 5) - 1)) << 11)\
344 | ((D & ((1 << 5) - 1)) << 21))
345
346#define MPU_LSR_RSR(S,N,D) (0x4000018F | ((S & ((1 << 5) - 1)) << 16)\
347 | ((N & ((1 << 5) - 1)) << 11)\
348 | ((D & ((1 << 5) - 1)) << 21))
349
350#define MPU_LSR_RSS(S,N,D) (0x4000058F | ((S & ((1 << 5) - 1)) << 16)\
351 | ((N & ((1 << 5) - 1)) << 11)\
352 | ((D & ((1 << 5) - 1)) << 21))
353
354#define MPU_LSR_SRR(S,N,D) (0x4000028F | ((S & ((1 << 5) - 1)) << 16)\
355 | ((N & ((1 << 5) - 1)) << 11)\
356 | ((D & ((1 << 5) - 1)) << 21))
357
358#define MPU_LSR_SRS(S,N,D) (0x4000068F | ((S & ((1 << 5) - 1)) << 16)\
359 | ((N & ((1 << 5) - 1)) << 11)\
360 | ((D & ((1 << 5) - 1)) << 21))
361
362#define MPU_LSR_SSR(S,N,D) (0x4000038F | ((S & ((1 << 5) - 1)) << 16)\
363 | ((N & ((1 << 5) - 1)) << 11)\
364 | ((D & ((1 << 5) - 1)) << 21))
365
366#define MPU_LSR_SSS(S,N,D) (0x4000078F | ((S & ((1 << 5) - 1)) << 16)\
367 | ((N & ((1 << 5) - 1)) << 11)\
368 | ((D & ((1 << 5) - 1)) << 21))
369
370#define MPU_LSRQ_RIR(S,N,D) (0x1C000000 | ((S & ((1 << 5) - 1)) << 16)\
371 | ((N & ((1 << 16) - 1)) << 0)\
372 | ((D & ((1 << 5) - 1)) << 21))
373
374#define MPU_LW_IR(S,D) (0x64400000 | ((S & ((1 << 16) - 1)) << 0)\
375 | ((D & ((1 << 5) - 1)) << 16))
376
377#define MPU_LW_IS(S,D) (0x64600000 | ((S & ((1 << 16) - 1)) << 0)\
378 | ((D & ((1 << 5) - 1)) << 16))
379
380#define MPU_LW_RR(S,D) (0x66400000 | ((S & ((1 << 5) - 1)) << 11)\
381 | ((D & ((1 << 5) - 1)) << 16))
382
383#define MPU_LW_RS(S,D) (0x66600000 | ((S & ((1 << 5) - 1)) << 11)\
384 | ((D & ((1 << 5) - 1)) << 16))
385
386#define MPU_LW_SR(S,D) (0x67400000 | ((S & ((1 << 5) - 1)) << 11)\
387 | ((D & ((1 << 5) - 1)) << 16))
388
389#define MPU_LW_SS(S,D) (0x67600000 | ((S & ((1 << 5) - 1)) << 11)\
390 | ((D & ((1 << 5) - 1)) << 16))
391
392#define MPU_LW_RIR(S,N,D) (0x66400000 | ((S & ((1 << 5) - 1)) << 11)\
393 | ((N & ((1 << 8) - 1)) << 0)\
394 | ((D & ((1 << 5) - 1)) << 16))
395
396#define MPU_LW_RIS(S,N,D) (0x66600000 | ((S & ((1 << 5) - 1)) << 11)\
397 | ((N & ((1 << 8) - 1)) << 0)\
398 | ((D & ((1 << 5) - 1)) << 16))
399
400#define MPU_LW_SIR(S,N,D) (0x67400000 | ((S & ((1 << 5) - 1)) << 11)\
401 | ((N & ((1 << 8) - 1)) << 0)\
402 | ((D & ((1 << 5) - 1)) << 16))
403
404#define MPU_LW_SIS(S,N,D) (0x67600000 | ((S & ((1 << 5) - 1)) << 11)\
405 | ((N & ((1 << 8) - 1)) << 0)\
406 | ((D & ((1 << 5) - 1)) << 16))
407
408#define MPU_MOVE_RR(S,D) (0x40000081 | ((S & ((1 << 5) - 1)) << 11)\
409 | ((D & ((1 << 5) - 1)) << 21))
410
411#define MPU_MOVE_RS(S,D) (0x40000481 | ((S & ((1 << 5) - 1)) << 11)\
412 | ((D & ((1 << 5) - 1)) << 21))
413
414#define MPU_MOVE_SR(S,D) (0x40000181 | ((S & ((1 << 5) - 1)) << 11)\
415 | ((D & ((1 << 5) - 1)) << 21))
416
417#define MPU_MOVE_SS(S,D) (0x40000581 | ((S & ((1 << 5) - 1)) << 11)\
418 | ((D & ((1 << 5) - 1)) << 21))
419
420#define MPU_MOVEQ_IR(S,D) (0x24000000 | ((S & ((1 << 16) - 1)) << 0)\
421 | ((D & ((1 << 5) - 1)) << 21))
422
423#define MPU_MOVEQ_IS(S,D) (0x2C000000 | ((S & ((1 << 16) - 1)) << 0)\
424 | ((D & ((1 << 5) - 1)) << 21))
425
426#define MPU_MOVEX_IR_INSTR(S,D) (0xC0000081 | ((D & ((1 << 5) - 1)) << 21))
427
428#define MPU_MOVEX_IR_IMM(S,D) (S & 0xFFFFFFFF)
429
430#define MPU_MOVEX_IS_INSTR(S,D) (0xC0000481 | ((D & ((1 << 5) - 1)) << 21))
431
432#define MPU_MOVEX_IS_IMM(S,D) (S & 0xFFFFFFFF)
433
434#define MPU_NOP() (0x40000000)
435
436#define MPU_NOT_RR(S,D) (0x40100081 | ((S & ((1 << 5) - 1)) << 11)\
437 | ((D & ((1 << 5) - 1)) << 21))
438
439#define MPU_NOT_RS(S,D) (0x40100481 | ((S & ((1 << 5) - 1)) << 11)\
440 | ((D & ((1 << 5) - 1)) << 21))
441
442#define MPU_NOT_SR(S,D) (0x40100181 | ((S & ((1 << 5) - 1)) << 11)\
443 | ((D & ((1 << 5) - 1)) << 21))
444
445#define MPU_NOT_SS(S,D) (0x40100581 | ((S & ((1 << 5) - 1)) << 11)\
446 | ((D & ((1 << 5) - 1)) << 21))
447
448#define MPU_OR_RRR(S,N,D) (0x4000008B | ((S & ((1 << 5) - 1)) << 16)\
449 | ((N & ((1 << 5) - 1)) << 11)\
450 | ((D & ((1 << 5) - 1)) << 21))
451
452#define MPU_OR_RRS(S,N,D) (0x4000048B | ((S & ((1 << 5) - 1)) << 16)\
453 | ((N & ((1 << 5) - 1)) << 11)\
454 | ((D & ((1 << 5) - 1)) << 21))
455
456#define MPU_OR_RSR(S,N,D) (0x4000018B | ((S & ((1 << 5) - 1)) << 16)\
457 | ((N & ((1 << 5) - 1)) << 11)\
458 | ((D & ((1 << 5) - 1)) << 21))
459
460#define MPU_OR_RSS(S,N,D) (0x4000058B | ((S & ((1 << 5) - 1)) << 16)\
461 | ((N & ((1 << 5) - 1)) << 11)\
462 | ((D & ((1 << 5) - 1)) << 21))
463
464#define MPU_OR_SRR(S,N,D) (0x4000028B | ((S & ((1 << 5) - 1)) << 16)\
465 | ((N & ((1 << 5) - 1)) << 11)\
466 | ((D & ((1 << 5) - 1)) << 21))
467
468#define MPU_OR_SRS(S,N,D) (0x4000068B | ((S & ((1 << 5) - 1)) << 16)\
469 | ((N & ((1 << 5) - 1)) << 11)\
470 | ((D & ((1 << 5) - 1)) << 21))
471
472#define MPU_OR_SSR(S,N,D) (0x4000038B | ((S & ((1 << 5) - 1)) << 16)\
473 | ((N & ((1 << 5) - 1)) << 11)\
474 | ((D & ((1 << 5) - 1)) << 21))
475
476#define MPU_OR_SSS(S,N,D) (0x4000078B | ((S & ((1 << 5) - 1)) << 16)\
477 | ((N & ((1 << 5) - 1)) << 11)\
478 | ((D & ((1 << 5) - 1)) << 21))
479
480#define MPU_ORQ_RIR(S,N,D) (0x0C000000 | ((S & ((1 << 5) - 1)) << 16)\
481 | ((N & ((1 << 16) - 1)) << 0)\
482 | ((D & ((1 << 5) - 1)) << 21))
483
484#define MPU_ORQ_IRR(S,N,D) (0x0C000000 | ((S & ((1 << 16) - 1)) << 0)\
485 | ((N & ((1 << 5) - 1)) << 16)\
486 | ((D & ((1 << 5) - 1)) << 21))
487
488#define MPU_ORX_RIR_INSTR(S,N,D) (0xC000008B | ((S & ((1 << 5) - 1)) << 16)\
489 | ((D & ((1 << 5) - 1)) << 21))
490
491#define MPU_ORX_RIR_IMM(S,N,D) (N & 0xFFFFFFFF)
492
493#define MPU_ORX_IRR_INSTR(S,N,D) (0xC000008B | ((N & ((1 << 5) - 1)) << 16)\
494 | ((D & ((1 << 5) - 1)) << 21))
495
496#define MPU_ORX_IRR_IMM(S,N,D) (S & 0xFFFFFFFF)
497
498#define MPU_ORX_SIR_INSTR(S,N,D) (0xC000028B | ((S & ((1 << 5) - 1)) << 16)\
499 | ((D & ((1 << 5) - 1)) << 21))
500
501#define MPU_ORX_SIR_IMM(S,N,D) (N & 0xFFFFFFFF)
502
503#define MPU_ORX_ISR_INSTR(S,N,D) (0xC000028B | ((N & ((1 << 5) - 1)) << 16)\
504 | ((D & ((1 << 5) - 1)) << 21))
505
506#define MPU_ORX_ISR_IMM(S,N,D) (S & 0xFFFFFFFF)
507
508#define MPU_ORX_RIS_INSTR(S,N,D) (0xC000048B | ((S & ((1 << 5) - 1)) << 16)\
509 | ((D & ((1 << 5) - 1)) << 21))
510
511#define MPU_ORX_RIS_IMM(S,N,D) (N & 0xFFFFFFFF)
512
513#define MPU_ORX_IRS_INSTR(S,N,D) (0xC000048B | ((N & ((1 << 5) - 1)) << 16)\
514 | ((D & ((1 << 5) - 1)) << 21))
515
516#define MPU_ORX_IRS_IMM(S,N,D) (S & 0xFFFFFFFF)
517
518#define MPU_ORX_SIS_INSTR(S,N,D) (0xC000068B | ((S & ((1 << 5) - 1)) << 16)\
519 | ((D & ((1 << 5) - 1)) << 21))
520
521#define MPU_ORX_SIS_IMM(S,N,D) (N & 0xFFFFFFFF)
522
523#define MPU_ORX_ISS_INSTR(S,N,D) (0xC000068B | ((N & ((1 << 5) - 1)) << 16)\
524 | ((D & ((1 << 5) - 1)) << 21))
525
526#define MPU_ORX_ISS_IMM(S,N,D) (S & 0xFFFFFFFF)
527
528#define MPU_RET() (0x63003000)
529
530#define MPU_RETI() (0x63602800)
531
532#define MPU_RR_IR(S,D) (0x50000000 | ((S & ((1 << 11) - 1)) << 0)\
533 | ((D & ((1 << 5) - 1)) << 21))
534
535#define MPU_RR_SR(S,D) (0x50008000 | ((S & ((1 << 5) - 1)) << 16)\
536 | ((D & ((1 << 5) - 1)) << 21))
537
538#define MPU_RW_RI(S,D) (0x56000000 | ((S & ((1 << 5) - 1)) << 11)\
539 | ((D & ((1 << 11) - 1)) << 0))
540
541#define MPU_RW_RS(S,D) (0x57000000 | ((S & ((1 << 5) - 1)) << 11)\
542 | ((D & ((1 << 5) - 1)) << 16))
543
544#define MPU_RWQ_II(S,D) (0x58000000 | ((S & ((1 << 16) - 1)) << 11)\
545 | ((D & ((1 << 11) - 1)) << 0))
546
547#define MPU_RWQ_IS(S,D) (0x55000000 | ((S & ((1 << 16) - 1)) << 0)\
548 | ((D & ((1 << 5) - 1)) << 16))
549
550#define MPU_RWX_II_INSTR(S,D) (0xD4000000 | ((D & ((1 << 11) - 1)) << 0))
551
552#define MPU_RWX_II_IMM(S,D) (S & 0xFFFFFFFF)
553
554#define MPU_RWX_IS_INSTR(S,D) (0xD5000000 | ((D & ((1 << 5) - 1)) << 16))
555
556#define MPU_RWX_IS_IMM(S,D) (S & 0xFFFFFFFF)
557
558#define MPU_SUB_RRR(S,N,D) (0x4000008D | ((S & ((1 << 5) - 1)) << 16)\
559 | ((N & ((1 << 5) - 1)) << 11)\
560 | ((D & ((1 << 5) - 1)) << 21))
561
562#define MPU_SUB_RRS(S,N,D) (0x4000048D | ((S & ((1 << 5) - 1)) << 16)\
563 | ((N & ((1 << 5) - 1)) << 11)\
564 | ((D & ((1 << 5) - 1)) << 21))
565
566#define MPU_SUB_RSR(S,N,D) (0x4000018D | ((S & ((1 << 5) - 1)) << 16)\
567 | ((N & ((1 << 5) - 1)) << 11)\
568 | ((D & ((1 << 5) - 1)) << 21))
569
570#define MPU_SUB_RSS(S,N,D) (0x4000058D | ((S & ((1 << 5) - 1)) << 16)\
571 | ((N & ((1 << 5) - 1)) << 11)\
572 | ((D & ((1 << 5) - 1)) << 21))
573
574#define MPU_SUB_SRR(S,N,D) (0x4000028D | ((S & ((1 << 5) - 1)) << 16)\
575 | ((N & ((1 << 5) - 1)) << 11)\
576 | ((D & ((1 << 5) - 1)) << 21))
577
578#define MPU_SUB_SRS(S,N,D) (0x4000068D | ((S & ((1 << 5) - 1)) << 16)\
579 | ((N & ((1 << 5) - 1)) << 11)\
580 | ((D & ((1 << 5) - 1)) << 21))
581
582#define MPU_SUB_SSR(S,N,D) (0x4000038D | ((S & ((1 << 5) - 1)) << 16)\
583 | ((N & ((1 << 5) - 1)) << 11)\
584 | ((D & ((1 << 5) - 1)) << 21))
585
586#define MPU_SUB_SSS(S,N,D) (0x4000078D | ((S & ((1 << 5) - 1)) << 16)\
587 | ((N & ((1 << 5) - 1)) << 11)\
588 | ((D & ((1 << 5) - 1)) << 21))
589
590#define MPU_SUBQ_RIR(S,N,D) (0x14000000 | ((S & ((1 << 5) - 1)) << 16)\
591 | ((N & ((1 << 16) - 1)) << 0)\
592 | ((D & ((1 << 5) - 1)) << 21))
593
594#define MPU_SUBX_RIR_INSTR(S,N,D) (0xC000008D | ((S & ((1 << 5) - 1)) << 16)\
595 | ((D & ((1 << 5) - 1)) << 21))
596
597#define MPU_SUBX_RIR_IMM(S,N,D) (N & 0xFFFFFFFF)
598
599#define MPU_SUBX_SIR_INSTR(S,N,D) (0xC000028D | ((S & ((1 << 5) - 1)) << 16)\
600 | ((D & ((1 << 5) - 1)) << 21))
601
602#define MPU_SUBX_SIR_IMM(S,N,D) (N & 0xFFFFFFFF)
603
604#define MPU_SUBX_RIS_INSTR(S,N,D) (0xC000048D | ((S & ((1 << 5) - 1)) << 16)\
605 | ((D & ((1 << 5) - 1)) << 21))
606
607#define MPU_SUBX_RIS_IMM(S,N,D) (N & 0xFFFFFFFF)
608
609#define MPU_SUBX_SIS_INSTR(S,N,D) (0xC000068D | ((S & ((1 << 5) - 1)) << 16)\
610 | ((D & ((1 << 5) - 1)) << 21))
611
612#define MPU_SUBX_SIS_IMM(S,N,D) (N & 0xFFFFFFFF)
613
614#define MPU_SW_RI(S,D) (0x64000000 | ((S & ((1 << 5) - 1)) << 16)\
615 | ((D & ((1 << 16) - 1)) << 0))
616
617#define MPU_SW_SI(S,D) (0x64200000 | ((S & ((1 << 5) - 1)) << 16)\
618 | ((D & ((1 << 16) - 1)) << 0))
619
620#define MPU_SW_RR(S,D) (0x66000000 | ((S & ((1 << 5) - 1)) << 16)\
621 | ((D & ((1 << 5) - 1)) << 11))
622
623#define MPU_SW_SR(S,D) (0x66200000 | ((S & ((1 << 5) - 1)) << 16)\
624 | ((D & ((1 << 5) - 1)) << 11))
625
626#define MPU_SW_RS(S,D) (0x67000000 | ((S & ((1 << 5) - 1)) << 16)\
627 | ((D & ((1 << 5) - 1)) << 11))
628
629#define MPU_SW_SS(S,D) (0x67200000 | ((S & ((1 << 5) - 1)) << 16)\
630 | ((D & ((1 << 5) - 1)) << 11))
631
632#define MPU_SW_RIR(S,N,D) (0x66000000 | ((S & ((1 << 5) - 1)) << 16)\
633 | ((N & ((1 << 8) - 1)) << 0)\
634 | ((D & ((1 << 5) - 1)) << 11))
635
636#define MPU_SW_SIR(S,N,D) (0x66200000 | ((S & ((1 << 5) - 1)) << 16)\
637 | ((N & ((1 << 8) - 1)) << 0)\
638 | ((D & ((1 << 5) - 1)) << 11))
639
640#define MPU_SW_RIS(S,N,D) (0x67000000 | ((S & ((1 << 5) - 1)) << 16)\
641 | ((N & ((1 << 8) - 1)) << 0)\
642 | ((D & ((1 << 5) - 1)) << 11))
643
644#define MPU_SW_SIS(S,N,D) (0x67200000 | ((S & ((1 << 5) - 1)) << 16)\
645 | ((N & ((1 << 8) - 1)) << 0)\
646 | ((D & ((1 << 5) - 1)) << 11))
647
648#define MPU_SWX_II_INSTR(S,D) (0xE4000000 | ((D & ((1 << 16) - 1)) << 0))
649
650#define MPU_SWX_II_IMM(S,D) (S & 0xFFFFFFFF)
651
652#define MPU_SWX_IR_INSTR(S,D) (0xE6000000 | ((D & ((1 << 5) - 1)) << 11))
653
654#define MPU_SWX_IR_IMM(S,D) (S & 0xFFFFFFFF)
655
656#define MPU_SWX_IS_INSTR(S,D) (0xE7000000 | ((D & ((1 << 5) - 1)) << 11))
657
658#define MPU_SWX_IS_IMM(S,D) (S & 0xFFFFFFFF)
659
660#define MPU_SWX_IIR_INSTR(S,N,D) (0xE6000000 | ((N & ((1 << 8) - 1)) << 0)\
661 | ((D & ((1 << 5) - 1)) << 11))
662
663#define MPU_SWX_IIR_IMM(S,N,D) (S & 0xFFFFFFFF)
664
665#define MPU_SWX_IIS_INSTR(S,N,D) (0xE7000000 | ((N & ((1 << 8) - 1)) << 0)\
666 | ((D & ((1 << 5) - 1)) << 11))
667
668#define MPU_SWX_IIS_IMM(S,N,D) (S & 0xFFFFFFFF)
669
670#define MPU_XOR_RRR(S,N,D) (0x40000089 | ((S & ((1 << 5) - 1)) << 16)\
671 | ((N & ((1 << 5) - 1)) << 11)\
672 | ((D & ((1 << 5) - 1)) << 21))
673
674#define MPU_XOR_RRS(S,N,D) (0x40000489 | ((S & ((1 << 5) - 1)) << 16)\
675 | ((N & ((1 << 5) - 1)) << 11)\
676 | ((D & ((1 << 5) - 1)) << 21))
677
678#define MPU_XOR_RSR(S,N,D) (0x40000189 | ((S & ((1 << 5) - 1)) << 16)\
679 | ((N & ((1 << 5) - 1)) << 11)\
680 | ((D & ((1 << 5) - 1)) << 21))
681
682#define MPU_XOR_RSS(S,N,D) (0x40000589 | ((S & ((1 << 5) - 1)) << 16)\
683 | ((N & ((1 << 5) - 1)) << 11)\
684 | ((D & ((1 << 5) - 1)) << 21))
685
686#define MPU_XOR_SRR(S,N,D) (0x40000289 | ((S & ((1 << 5) - 1)) << 16)\
687 | ((N & ((1 << 5) - 1)) << 11)\
688 | ((D & ((1 << 5) - 1)) << 21))
689
690#define MPU_XOR_SRS(S,N,D) (0x40000689 | ((S & ((1 << 5) - 1)) << 16)\
691 | ((N & ((1 << 5) - 1)) << 11)\
692 | ((D & ((1 << 5) - 1)) << 21))
693
694#define MPU_XOR_SSR(S,N,D) (0x40000389 | ((S & ((1 << 5) - 1)) << 16)\
695 | ((N & ((1 << 5) - 1)) << 11)\
696 | ((D & ((1 << 5) - 1)) << 21))
697
698#define MPU_XOR_SSS(S,N,D) (0x40000789 | ((S & ((1 << 5) - 1)) << 16)\
699 | ((N & ((1 << 5) - 1)) << 11)\
700 | ((D & ((1 << 5) - 1)) << 21))
701
702#define MPU_XOR_RR(S,D) (0x40000088 | ((S & ((1 << 5) - 1)) << 11)\
703 | ((D & ((1 << 5) - 1)) << 21))
704
705#define MPU_XOR_RS(S,D) (0x40000488 | ((S & ((1 << 5) - 1)) << 11)\
706 | ((D & ((1 << 5) - 1)) << 21))
707
708#define MPU_XOR_SR(S,D) (0x40000188 | ((S & ((1 << 5) - 1)) << 11)\
709 | ((D & ((1 << 5) - 1)) << 21))
710
711#define MPU_XOR_SS(S,D) (0x40000588 | ((S & ((1 << 5) - 1)) << 11)\
712 | ((D & ((1 << 5) - 1)) << 21))
713
714#define MPU_XORQ_RIR(S,N,D) (0x04000000 | ((S & ((1 << 5) - 1)) << 16)\
715 | ((N & ((1 << 16) - 1)) << 0)\
716 | ((D & ((1 << 5) - 1)) << 21))
717
718#define MPU_XORQ_IRR(S,N,D) (0x04000000 | ((S & ((1 << 16) - 1)) << 0)\
719 | ((N & ((1 << 5) - 1)) << 16)\
720 | ((D & ((1 << 5) - 1)) << 21))
721
722#define MPU_XORX_RIR_INSTR(S,N,D) (0xC0000089 | ((S & ((1 << 5) - 1)) << 16)\
723 | ((D & ((1 << 5) - 1)) << 21))
724
725#define MPU_XORX_RIR_IMM(S,N,D) (N & 0xFFFFFFFF)
726
727#define MPU_XORX_IRR_INSTR(S,N,D) (0xC0000089 | ((N & ((1 << 5) - 1)) << 16)\
728 | ((D & ((1 << 5) - 1)) << 21))
729
730#define MPU_XORX_IRR_IMM(S,N,D) (S & 0xFFFFFFFF)
731
732#define MPU_XORX_SIR_INSTR(S,N,D) (0xC0000289 | ((S & ((1 << 5) - 1)) << 16)\
733 | ((D & ((1 << 5) - 1)) << 21))
734
735#define MPU_XORX_SIR_IMM(S,N,D) (N & 0xFFFFFFFF)
736
737#define MPU_XORX_ISR_INSTR(S,N,D) (0xC0000289 | ((N & ((1 << 5) - 1)) << 16)\
738 | ((D & ((1 << 5) - 1)) << 21))
739
740#define MPU_XORX_ISR_IMM(S,N,D) (S & 0xFFFFFFFF)
741
742#define MPU_XORX_RIS_INSTR(S,N,D) (0xC0000489 | ((S & ((1 << 5) - 1)) << 16)\
743 | ((D & ((1 << 5) - 1)) << 21))
744
745#define MPU_XORX_RIS_IMM(S,N,D) (N & 0xFFFFFFFF)
746
747#define MPU_XORX_IRS_INSTR(S,N,D) (0xC0000489 | ((N & ((1 << 5) - 1)) << 16)\
748 | ((D & ((1 << 5) - 1)) << 21))
749
750#define MPU_XORX_IRS_IMM(S,N,D) (S & 0xFFFFFFFF)
751
752#define MPU_XORX_SIS_INSTR(S,N,D) (0xC0000689 | ((S & ((1 << 5) - 1)) << 16)\
753 | ((D & ((1 << 5) - 1)) << 21))
754
755#define MPU_XORX_SIS_IMM(S,N,D) (N & 0xFFFFFFFF)
756
757#define MPU_XORX_ISS_INSTR(S,N,D) (0xC0000689 | ((N & ((1 << 5) - 1)) << 16)\
758 | ((D & ((1 << 5) - 1)) << 21))
759
760#define MPU_XORX_ISS_IMM(S,N,D) (S & 0xFFFFFFFF)
761
762
763#endif /* end of __IOP_MPU_MACROS_H__ */
764/* End of iop_mpu_macros.h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_reg_space.h b/include/asm-cris/arch-v32/hwregs/iop/iop_reg_space.h
deleted file mode 100644
index 756550f5d6cb..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_reg_space.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/* Autogenerated Changes here will be lost!
2 * generated by ../gen_sw.pl Mon Apr 11 16:10:18 2005 iop_sw.cfg
3 */
4#define regi_iop_version (regi_iop + 0)
5#define regi_iop_fifo_in0_extra (regi_iop + 64)
6#define regi_iop_fifo_in1_extra (regi_iop + 128)
7#define regi_iop_fifo_out0_extra (regi_iop + 192)
8#define regi_iop_fifo_out1_extra (regi_iop + 256)
9#define regi_iop_trigger_grp0 (regi_iop + 320)
10#define regi_iop_trigger_grp1 (regi_iop + 384)
11#define regi_iop_trigger_grp2 (regi_iop + 448)
12#define regi_iop_trigger_grp3 (regi_iop + 512)
13#define regi_iop_trigger_grp4 (regi_iop + 576)
14#define regi_iop_trigger_grp5 (regi_iop + 640)
15#define regi_iop_trigger_grp6 (regi_iop + 704)
16#define regi_iop_trigger_grp7 (regi_iop + 768)
17#define regi_iop_crc_par0 (regi_iop + 896)
18#define regi_iop_crc_par1 (regi_iop + 1024)
19#define regi_iop_dmc_in0 (regi_iop + 1152)
20#define regi_iop_dmc_in1 (regi_iop + 1280)
21#define regi_iop_dmc_out0 (regi_iop + 1408)
22#define regi_iop_dmc_out1 (regi_iop + 1536)
23#define regi_iop_fifo_in0 (regi_iop + 1664)
24#define regi_iop_fifo_in1 (regi_iop + 1792)
25#define regi_iop_fifo_out0 (regi_iop + 1920)
26#define regi_iop_fifo_out1 (regi_iop + 2048)
27#define regi_iop_scrc_in0 (regi_iop + 2176)
28#define regi_iop_scrc_in1 (regi_iop + 2304)
29#define regi_iop_scrc_out0 (regi_iop + 2432)
30#define regi_iop_scrc_out1 (regi_iop + 2560)
31#define regi_iop_timer_grp0 (regi_iop + 2688)
32#define regi_iop_timer_grp1 (regi_iop + 2816)
33#define regi_iop_timer_grp2 (regi_iop + 2944)
34#define regi_iop_timer_grp3 (regi_iop + 3072)
35#define regi_iop_sap_in (regi_iop + 3328)
36#define regi_iop_sap_out (regi_iop + 3584)
37#define regi_iop_spu0 (regi_iop + 3840)
38#define regi_iop_spu1 (regi_iop + 4096)
39#define regi_iop_sw_cfg (regi_iop + 4352)
40#define regi_iop_sw_cpu (regi_iop + 4608)
41#define regi_iop_sw_mpu (regi_iop + 4864)
42#define regi_iop_sw_spu0 (regi_iop + 5120)
43#define regi_iop_sw_spu1 (regi_iop + 5376)
44#define regi_iop_mpu (regi_iop + 5632)
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_sap_in_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_sap_in_defs.h
deleted file mode 100644
index 5548ac10074f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_sap_in_defs.h
+++ /dev/null
@@ -1,179 +0,0 @@
1#ifndef __iop_sap_in_defs_h
2#define __iop_sap_in_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_sap_in.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:45 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_sap_in_defs.h ../../inst/io_proc/rtl/iop_sap_in.r
11 * id: $Id: iop_sap_in_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_sap_in */
86
87/* Register rw_bus0_sync, scope iop_sap_in, type rw */
88typedef struct {
89 unsigned int byte0_sel : 2;
90 unsigned int byte0_ext_src : 3;
91 unsigned int byte0_edge : 2;
92 unsigned int byte0_delay : 1;
93 unsigned int byte1_sel : 2;
94 unsigned int byte1_ext_src : 3;
95 unsigned int byte1_edge : 2;
96 unsigned int byte1_delay : 1;
97 unsigned int byte2_sel : 2;
98 unsigned int byte2_ext_src : 3;
99 unsigned int byte2_edge : 2;
100 unsigned int byte2_delay : 1;
101 unsigned int byte3_sel : 2;
102 unsigned int byte3_ext_src : 3;
103 unsigned int byte3_edge : 2;
104 unsigned int byte3_delay : 1;
105} reg_iop_sap_in_rw_bus0_sync;
106#define REG_RD_ADDR_iop_sap_in_rw_bus0_sync 0
107#define REG_WR_ADDR_iop_sap_in_rw_bus0_sync 0
108
109/* Register rw_bus1_sync, scope iop_sap_in, type rw */
110typedef struct {
111 unsigned int byte0_sel : 2;
112 unsigned int byte0_ext_src : 3;
113 unsigned int byte0_edge : 2;
114 unsigned int byte0_delay : 1;
115 unsigned int byte1_sel : 2;
116 unsigned int byte1_ext_src : 3;
117 unsigned int byte1_edge : 2;
118 unsigned int byte1_delay : 1;
119 unsigned int byte2_sel : 2;
120 unsigned int byte2_ext_src : 3;
121 unsigned int byte2_edge : 2;
122 unsigned int byte2_delay : 1;
123 unsigned int byte3_sel : 2;
124 unsigned int byte3_ext_src : 3;
125 unsigned int byte3_edge : 2;
126 unsigned int byte3_delay : 1;
127} reg_iop_sap_in_rw_bus1_sync;
128#define REG_RD_ADDR_iop_sap_in_rw_bus1_sync 4
129#define REG_WR_ADDR_iop_sap_in_rw_bus1_sync 4
130
131#define STRIDE_iop_sap_in_rw_gio 4
132/* Register rw_gio, scope iop_sap_in, type rw */
133typedef struct {
134 unsigned int sync_sel : 2;
135 unsigned int sync_ext_src : 3;
136 unsigned int sync_edge : 2;
137 unsigned int delay : 1;
138 unsigned int logic : 2;
139 unsigned int dummy1 : 22;
140} reg_iop_sap_in_rw_gio;
141#define REG_RD_ADDR_iop_sap_in_rw_gio 8
142#define REG_WR_ADDR_iop_sap_in_rw_gio 8
143
144
145/* Constants */
146enum {
147 regk_iop_sap_in_and = 0x00000002,
148 regk_iop_sap_in_ext_clk200 = 0x00000003,
149 regk_iop_sap_in_gio1 = 0x00000000,
150 regk_iop_sap_in_gio13 = 0x00000005,
151 regk_iop_sap_in_gio18 = 0x00000003,
152 regk_iop_sap_in_gio19 = 0x00000004,
153 regk_iop_sap_in_gio21 = 0x00000006,
154 regk_iop_sap_in_gio23 = 0x00000005,
155 regk_iop_sap_in_gio29 = 0x00000007,
156 regk_iop_sap_in_gio5 = 0x00000004,
157 regk_iop_sap_in_gio6 = 0x00000001,
158 regk_iop_sap_in_gio7 = 0x00000002,
159 regk_iop_sap_in_inv = 0x00000001,
160 regk_iop_sap_in_neg = 0x00000002,
161 regk_iop_sap_in_no = 0x00000000,
162 regk_iop_sap_in_no_del_ext_clk200 = 0x00000001,
163 regk_iop_sap_in_none = 0x00000000,
164 regk_iop_sap_in_or = 0x00000003,
165 regk_iop_sap_in_pos = 0x00000001,
166 regk_iop_sap_in_pos_neg = 0x00000003,
167 regk_iop_sap_in_rw_bus0_sync_default = 0x02020202,
168 regk_iop_sap_in_rw_bus1_sync_default = 0x02020202,
169 regk_iop_sap_in_rw_gio_default = 0x00000002,
170 regk_iop_sap_in_rw_gio_size = 0x00000020,
171 regk_iop_sap_in_timer_grp0_tmr3 = 0x00000006,
172 regk_iop_sap_in_timer_grp1_tmr3 = 0x00000004,
173 regk_iop_sap_in_timer_grp2_tmr3 = 0x00000005,
174 regk_iop_sap_in_timer_grp3_tmr3 = 0x00000007,
175 regk_iop_sap_in_tmr_clk200 = 0x00000000,
176 regk_iop_sap_in_two_clk200 = 0x00000002,
177 regk_iop_sap_in_yes = 0x00000001
178};
179#endif /* __iop_sap_in_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_sap_out_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_sap_out_defs.h
deleted file mode 100644
index 273936996183..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_sap_out_defs.h
+++ /dev/null
@@ -1,306 +0,0 @@
1#ifndef __iop_sap_out_defs_h
2#define __iop_sap_out_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_sap_out.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_sap_out_defs.h ../../inst/io_proc/rtl/iop_sap_out.r
11 * id: $Id: iop_sap_out_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_sap_out */
86
87/* Register rw_gen_gated, scope iop_sap_out, type rw */
88typedef struct {
89 unsigned int clk0_src : 2;
90 unsigned int clk0_gate_src : 2;
91 unsigned int clk0_force_src : 3;
92 unsigned int clk1_src : 2;
93 unsigned int clk1_gate_src : 2;
94 unsigned int clk1_force_src : 3;
95 unsigned int clk2_src : 2;
96 unsigned int clk2_gate_src : 2;
97 unsigned int clk2_force_src : 3;
98 unsigned int clk3_src : 2;
99 unsigned int clk3_gate_src : 2;
100 unsigned int clk3_force_src : 3;
101 unsigned int dummy1 : 4;
102} reg_iop_sap_out_rw_gen_gated;
103#define REG_RD_ADDR_iop_sap_out_rw_gen_gated 0
104#define REG_WR_ADDR_iop_sap_out_rw_gen_gated 0
105
106/* Register rw_bus0, scope iop_sap_out, type rw */
107typedef struct {
108 unsigned int byte0_clk_sel : 3;
109 unsigned int byte0_gated_clk : 2;
110 unsigned int byte0_clk_inv : 1;
111 unsigned int byte1_clk_sel : 3;
112 unsigned int byte1_gated_clk : 2;
113 unsigned int byte1_clk_inv : 1;
114 unsigned int byte2_clk_sel : 3;
115 unsigned int byte2_gated_clk : 2;
116 unsigned int byte2_clk_inv : 1;
117 unsigned int byte3_clk_sel : 3;
118 unsigned int byte3_gated_clk : 2;
119 unsigned int byte3_clk_inv : 1;
120 unsigned int dummy1 : 8;
121} reg_iop_sap_out_rw_bus0;
122#define REG_RD_ADDR_iop_sap_out_rw_bus0 4
123#define REG_WR_ADDR_iop_sap_out_rw_bus0 4
124
125/* Register rw_bus1, scope iop_sap_out, type rw */
126typedef struct {
127 unsigned int byte0_clk_sel : 3;
128 unsigned int byte0_gated_clk : 2;
129 unsigned int byte0_clk_inv : 1;
130 unsigned int byte1_clk_sel : 3;
131 unsigned int byte1_gated_clk : 2;
132 unsigned int byte1_clk_inv : 1;
133 unsigned int byte2_clk_sel : 3;
134 unsigned int byte2_gated_clk : 2;
135 unsigned int byte2_clk_inv : 1;
136 unsigned int byte3_clk_sel : 3;
137 unsigned int byte3_gated_clk : 2;
138 unsigned int byte3_clk_inv : 1;
139 unsigned int dummy1 : 8;
140} reg_iop_sap_out_rw_bus1;
141#define REG_RD_ADDR_iop_sap_out_rw_bus1 8
142#define REG_WR_ADDR_iop_sap_out_rw_bus1 8
143
144/* Register rw_bus0_lo_oe, scope iop_sap_out, type rw */
145typedef struct {
146 unsigned int byte0_clk_sel : 3;
147 unsigned int byte0_clk_ext : 3;
148 unsigned int byte0_gated_clk : 2;
149 unsigned int byte0_clk_inv : 1;
150 unsigned int byte0_logic : 2;
151 unsigned int byte1_clk_sel : 3;
152 unsigned int byte1_clk_ext : 3;
153 unsigned int byte1_gated_clk : 2;
154 unsigned int byte1_clk_inv : 1;
155 unsigned int byte1_logic : 2;
156 unsigned int dummy1 : 10;
157} reg_iop_sap_out_rw_bus0_lo_oe;
158#define REG_RD_ADDR_iop_sap_out_rw_bus0_lo_oe 12
159#define REG_WR_ADDR_iop_sap_out_rw_bus0_lo_oe 12
160
161/* Register rw_bus0_hi_oe, scope iop_sap_out, type rw */
162typedef struct {
163 unsigned int byte2_clk_sel : 3;
164 unsigned int byte2_clk_ext : 3;
165 unsigned int byte2_gated_clk : 2;
166 unsigned int byte2_clk_inv : 1;
167 unsigned int byte2_logic : 2;
168 unsigned int byte3_clk_sel : 3;
169 unsigned int byte3_clk_ext : 3;
170 unsigned int byte3_gated_clk : 2;
171 unsigned int byte3_clk_inv : 1;
172 unsigned int byte3_logic : 2;
173 unsigned int dummy1 : 10;
174} reg_iop_sap_out_rw_bus0_hi_oe;
175#define REG_RD_ADDR_iop_sap_out_rw_bus0_hi_oe 16
176#define REG_WR_ADDR_iop_sap_out_rw_bus0_hi_oe 16
177
178/* Register rw_bus1_lo_oe, scope iop_sap_out, type rw */
179typedef struct {
180 unsigned int byte0_clk_sel : 3;
181 unsigned int byte0_clk_ext : 3;
182 unsigned int byte0_gated_clk : 2;
183 unsigned int byte0_clk_inv : 1;
184 unsigned int byte0_logic : 2;
185 unsigned int byte1_clk_sel : 3;
186 unsigned int byte1_clk_ext : 3;
187 unsigned int byte1_gated_clk : 2;
188 unsigned int byte1_clk_inv : 1;
189 unsigned int byte1_logic : 2;
190 unsigned int dummy1 : 10;
191} reg_iop_sap_out_rw_bus1_lo_oe;
192#define REG_RD_ADDR_iop_sap_out_rw_bus1_lo_oe 20
193#define REG_WR_ADDR_iop_sap_out_rw_bus1_lo_oe 20
194
195/* Register rw_bus1_hi_oe, scope iop_sap_out, type rw */
196typedef struct {
197 unsigned int byte2_clk_sel : 3;
198 unsigned int byte2_clk_ext : 3;
199 unsigned int byte2_gated_clk : 2;
200 unsigned int byte2_clk_inv : 1;
201 unsigned int byte2_logic : 2;
202 unsigned int byte3_clk_sel : 3;
203 unsigned int byte3_clk_ext : 3;
204 unsigned int byte3_gated_clk : 2;
205 unsigned int byte3_clk_inv : 1;
206 unsigned int byte3_logic : 2;
207 unsigned int dummy1 : 10;
208} reg_iop_sap_out_rw_bus1_hi_oe;
209#define REG_RD_ADDR_iop_sap_out_rw_bus1_hi_oe 24
210#define REG_WR_ADDR_iop_sap_out_rw_bus1_hi_oe 24
211
212#define STRIDE_iop_sap_out_rw_gio 4
213/* Register rw_gio, scope iop_sap_out, type rw */
214typedef struct {
215 unsigned int out_clk_sel : 3;
216 unsigned int out_clk_ext : 4;
217 unsigned int out_gated_clk : 2;
218 unsigned int out_clk_inv : 1;
219 unsigned int out_logic : 1;
220 unsigned int oe_clk_sel : 3;
221 unsigned int oe_clk_ext : 3;
222 unsigned int oe_gated_clk : 2;
223 unsigned int oe_clk_inv : 1;
224 unsigned int oe_logic : 2;
225 unsigned int dummy1 : 10;
226} reg_iop_sap_out_rw_gio;
227#define REG_RD_ADDR_iop_sap_out_rw_gio 28
228#define REG_WR_ADDR_iop_sap_out_rw_gio 28
229
230
231/* Constants */
232enum {
233 regk_iop_sap_out_and = 0x00000002,
234 regk_iop_sap_out_clk0 = 0x00000000,
235 regk_iop_sap_out_clk1 = 0x00000001,
236 regk_iop_sap_out_clk12 = 0x00000002,
237 regk_iop_sap_out_clk2 = 0x00000002,
238 regk_iop_sap_out_clk200 = 0x00000001,
239 regk_iop_sap_out_clk3 = 0x00000003,
240 regk_iop_sap_out_ext = 0x00000003,
241 regk_iop_sap_out_gated = 0x00000004,
242 regk_iop_sap_out_gio1 = 0x00000000,
243 regk_iop_sap_out_gio13 = 0x00000002,
244 regk_iop_sap_out_gio13_clk = 0x0000000c,
245 regk_iop_sap_out_gio15 = 0x00000001,
246 regk_iop_sap_out_gio18 = 0x00000003,
247 regk_iop_sap_out_gio18_clk = 0x0000000d,
248 regk_iop_sap_out_gio1_clk = 0x00000008,
249 regk_iop_sap_out_gio21_clk = 0x0000000e,
250 regk_iop_sap_out_gio23 = 0x00000002,
251 regk_iop_sap_out_gio29_clk = 0x0000000f,
252 regk_iop_sap_out_gio31 = 0x00000003,
253 regk_iop_sap_out_gio5 = 0x00000001,
254 regk_iop_sap_out_gio5_clk = 0x00000009,
255 regk_iop_sap_out_gio6_clk = 0x0000000a,
256 regk_iop_sap_out_gio7 = 0x00000000,
257 regk_iop_sap_out_gio7_clk = 0x0000000b,
258 regk_iop_sap_out_gio_in13 = 0x00000001,
259 regk_iop_sap_out_gio_in21 = 0x00000002,
260 regk_iop_sap_out_gio_in29 = 0x00000003,
261 regk_iop_sap_out_gio_in5 = 0x00000000,
262 regk_iop_sap_out_inv = 0x00000001,
263 regk_iop_sap_out_nand = 0x00000003,
264 regk_iop_sap_out_no = 0x00000000,
265 regk_iop_sap_out_none = 0x00000000,
266 regk_iop_sap_out_rw_bus0_default = 0x00000000,
267 regk_iop_sap_out_rw_bus0_hi_oe_default = 0x00000000,
268 regk_iop_sap_out_rw_bus0_lo_oe_default = 0x00000000,
269 regk_iop_sap_out_rw_bus1_default = 0x00000000,
270 regk_iop_sap_out_rw_bus1_hi_oe_default = 0x00000000,
271 regk_iop_sap_out_rw_bus1_lo_oe_default = 0x00000000,
272 regk_iop_sap_out_rw_gen_gated_default = 0x00000000,
273 regk_iop_sap_out_rw_gio_default = 0x00000000,
274 regk_iop_sap_out_rw_gio_size = 0x00000020,
275 regk_iop_sap_out_spu0_gio0 = 0x00000002,
276 regk_iop_sap_out_spu0_gio1 = 0x00000003,
277 regk_iop_sap_out_spu0_gio12 = 0x00000004,
278 regk_iop_sap_out_spu0_gio13 = 0x00000004,
279 regk_iop_sap_out_spu0_gio14 = 0x00000004,
280 regk_iop_sap_out_spu0_gio15 = 0x00000004,
281 regk_iop_sap_out_spu0_gio2 = 0x00000002,
282 regk_iop_sap_out_spu0_gio3 = 0x00000003,
283 regk_iop_sap_out_spu0_gio4 = 0x00000002,
284 regk_iop_sap_out_spu0_gio5 = 0x00000003,
285 regk_iop_sap_out_spu0_gio6 = 0x00000002,
286 regk_iop_sap_out_spu0_gio7 = 0x00000003,
287 regk_iop_sap_out_spu1_gio0 = 0x00000005,
288 regk_iop_sap_out_spu1_gio1 = 0x00000006,
289 regk_iop_sap_out_spu1_gio12 = 0x00000007,
290 regk_iop_sap_out_spu1_gio13 = 0x00000007,
291 regk_iop_sap_out_spu1_gio14 = 0x00000007,
292 regk_iop_sap_out_spu1_gio15 = 0x00000007,
293 regk_iop_sap_out_spu1_gio2 = 0x00000005,
294 regk_iop_sap_out_spu1_gio3 = 0x00000006,
295 regk_iop_sap_out_spu1_gio4 = 0x00000005,
296 regk_iop_sap_out_spu1_gio5 = 0x00000006,
297 regk_iop_sap_out_spu1_gio6 = 0x00000005,
298 regk_iop_sap_out_spu1_gio7 = 0x00000006,
299 regk_iop_sap_out_timer_grp0_tmr2 = 0x00000004,
300 regk_iop_sap_out_timer_grp1_tmr2 = 0x00000005,
301 regk_iop_sap_out_timer_grp2_tmr2 = 0x00000006,
302 regk_iop_sap_out_timer_grp3_tmr2 = 0x00000007,
303 regk_iop_sap_out_tmr = 0x00000005,
304 regk_iop_sap_out_yes = 0x00000001
305};
306#endif /* __iop_sap_out_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_scrc_in_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_scrc_in_defs.h
deleted file mode 100644
index 4f0a9a81e737..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_scrc_in_defs.h
+++ /dev/null
@@ -1,160 +0,0 @@
1#ifndef __iop_scrc_in_defs_h
2#define __iop_scrc_in_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_scrc_in.r
7 * id: iop_scrc_in.r,v 1.10 2005/02/16 09:13:58 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_scrc_in_defs.h ../../inst/io_proc/rtl/iop_scrc_in.r
11 * id: $Id: iop_scrc_in_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_scrc_in */
86
87/* Register rw_cfg, scope iop_scrc_in, type rw */
88typedef struct {
89 unsigned int trig : 2;
90 unsigned int dummy1 : 30;
91} reg_iop_scrc_in_rw_cfg;
92#define REG_RD_ADDR_iop_scrc_in_rw_cfg 0
93#define REG_WR_ADDR_iop_scrc_in_rw_cfg 0
94
95/* Register rw_ctrl, scope iop_scrc_in, type rw */
96typedef struct {
97 unsigned int dif_in_en : 1;
98 unsigned int dummy1 : 31;
99} reg_iop_scrc_in_rw_ctrl;
100#define REG_RD_ADDR_iop_scrc_in_rw_ctrl 4
101#define REG_WR_ADDR_iop_scrc_in_rw_ctrl 4
102
103/* Register r_stat, scope iop_scrc_in, type r */
104typedef struct {
105 unsigned int err : 1;
106 unsigned int dummy1 : 31;
107} reg_iop_scrc_in_r_stat;
108#define REG_RD_ADDR_iop_scrc_in_r_stat 8
109
110/* Register rw_init_crc, scope iop_scrc_in, type rw */
111typedef unsigned int reg_iop_scrc_in_rw_init_crc;
112#define REG_RD_ADDR_iop_scrc_in_rw_init_crc 12
113#define REG_WR_ADDR_iop_scrc_in_rw_init_crc 12
114
115/* Register rs_computed_crc, scope iop_scrc_in, type rs */
116typedef unsigned int reg_iop_scrc_in_rs_computed_crc;
117#define REG_RD_ADDR_iop_scrc_in_rs_computed_crc 16
118
119/* Register r_computed_crc, scope iop_scrc_in, type r */
120typedef unsigned int reg_iop_scrc_in_r_computed_crc;
121#define REG_RD_ADDR_iop_scrc_in_r_computed_crc 20
122
123/* Register rw_crc, scope iop_scrc_in, type rw */
124typedef unsigned int reg_iop_scrc_in_rw_crc;
125#define REG_RD_ADDR_iop_scrc_in_rw_crc 24
126#define REG_WR_ADDR_iop_scrc_in_rw_crc 24
127
128/* Register rw_correct_crc, scope iop_scrc_in, type rw */
129typedef unsigned int reg_iop_scrc_in_rw_correct_crc;
130#define REG_RD_ADDR_iop_scrc_in_rw_correct_crc 28
131#define REG_WR_ADDR_iop_scrc_in_rw_correct_crc 28
132
133/* Register rw_wr1bit, scope iop_scrc_in, type rw */
134typedef struct {
135 unsigned int data : 2;
136 unsigned int last : 2;
137 unsigned int dummy1 : 28;
138} reg_iop_scrc_in_rw_wr1bit;
139#define REG_RD_ADDR_iop_scrc_in_rw_wr1bit 32
140#define REG_WR_ADDR_iop_scrc_in_rw_wr1bit 32
141
142
143/* Constants */
144enum {
145 regk_iop_scrc_in_dif_in = 0x00000002,
146 regk_iop_scrc_in_hi = 0x00000000,
147 regk_iop_scrc_in_neg = 0x00000002,
148 regk_iop_scrc_in_no = 0x00000000,
149 regk_iop_scrc_in_pos = 0x00000001,
150 regk_iop_scrc_in_pos_neg = 0x00000003,
151 regk_iop_scrc_in_r_computed_crc_default = 0x00000000,
152 regk_iop_scrc_in_rs_computed_crc_default = 0x00000000,
153 regk_iop_scrc_in_rw_cfg_default = 0x00000000,
154 regk_iop_scrc_in_rw_ctrl_default = 0x00000000,
155 regk_iop_scrc_in_rw_init_crc_default = 0x00000000,
156 regk_iop_scrc_in_set0 = 0x00000000,
157 regk_iop_scrc_in_set1 = 0x00000001,
158 regk_iop_scrc_in_yes = 0x00000001
159};
160#endif /* __iop_scrc_in_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_scrc_out_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_scrc_out_defs.h
deleted file mode 100644
index fd1d6ea1d484..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_scrc_out_defs.h
+++ /dev/null
@@ -1,146 +0,0 @@
1#ifndef __iop_scrc_out_defs_h
2#define __iop_scrc_out_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_scrc_out.r
7 * id: iop_scrc_out.r,v 1.11 2005/02/16 09:13:38 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_scrc_out_defs.h ../../inst/io_proc/rtl/iop_scrc_out.r
11 * id: $Id: iop_scrc_out_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_scrc_out */
86
87/* Register rw_cfg, scope iop_scrc_out, type rw */
88typedef struct {
89 unsigned int trig : 2;
90 unsigned int inv_crc : 1;
91 unsigned int dummy1 : 29;
92} reg_iop_scrc_out_rw_cfg;
93#define REG_RD_ADDR_iop_scrc_out_rw_cfg 0
94#define REG_WR_ADDR_iop_scrc_out_rw_cfg 0
95
96/* Register rw_ctrl, scope iop_scrc_out, type rw */
97typedef struct {
98 unsigned int strb_src : 1;
99 unsigned int out_src : 1;
100 unsigned int dummy1 : 30;
101} reg_iop_scrc_out_rw_ctrl;
102#define REG_RD_ADDR_iop_scrc_out_rw_ctrl 4
103#define REG_WR_ADDR_iop_scrc_out_rw_ctrl 4
104
105/* Register rw_init_crc, scope iop_scrc_out, type rw */
106typedef unsigned int reg_iop_scrc_out_rw_init_crc;
107#define REG_RD_ADDR_iop_scrc_out_rw_init_crc 8
108#define REG_WR_ADDR_iop_scrc_out_rw_init_crc 8
109
110/* Register rw_crc, scope iop_scrc_out, type rw */
111typedef unsigned int reg_iop_scrc_out_rw_crc;
112#define REG_RD_ADDR_iop_scrc_out_rw_crc 12
113#define REG_WR_ADDR_iop_scrc_out_rw_crc 12
114
115/* Register rw_data, scope iop_scrc_out, type rw */
116typedef struct {
117 unsigned int val : 1;
118 unsigned int dummy1 : 31;
119} reg_iop_scrc_out_rw_data;
120#define REG_RD_ADDR_iop_scrc_out_rw_data 16
121#define REG_WR_ADDR_iop_scrc_out_rw_data 16
122
123/* Register r_computed_crc, scope iop_scrc_out, type r */
124typedef unsigned int reg_iop_scrc_out_r_computed_crc;
125#define REG_RD_ADDR_iop_scrc_out_r_computed_crc 20
126
127
128/* Constants */
129enum {
130 regk_iop_scrc_out_crc = 0x00000001,
131 regk_iop_scrc_out_data = 0x00000000,
132 regk_iop_scrc_out_dif = 0x00000001,
133 regk_iop_scrc_out_hi = 0x00000000,
134 regk_iop_scrc_out_neg = 0x00000002,
135 regk_iop_scrc_out_no = 0x00000000,
136 regk_iop_scrc_out_pos = 0x00000001,
137 regk_iop_scrc_out_pos_neg = 0x00000003,
138 regk_iop_scrc_out_reg = 0x00000000,
139 regk_iop_scrc_out_rw_cfg_default = 0x00000000,
140 regk_iop_scrc_out_rw_crc_default = 0x00000000,
141 regk_iop_scrc_out_rw_ctrl_default = 0x00000000,
142 regk_iop_scrc_out_rw_data_default = 0x00000000,
143 regk_iop_scrc_out_rw_init_crc_default = 0x00000000,
144 regk_iop_scrc_out_yes = 0x00000001
145};
146#endif /* __iop_scrc_out_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_spu_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_spu_defs.h
deleted file mode 100644
index 0fda26e2f06f..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_spu_defs.h
+++ /dev/null
@@ -1,453 +0,0 @@
1#ifndef __iop_spu_defs_h
2#define __iop_spu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_spu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_spu_defs.h ../../inst/io_proc/rtl/iop_spu.r
11 * id: $Id: iop_spu_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_spu */
86
87#define STRIDE_iop_spu_rw_r 4
88/* Register rw_r, scope iop_spu, type rw */
89typedef unsigned int reg_iop_spu_rw_r;
90#define REG_RD_ADDR_iop_spu_rw_r 0
91#define REG_WR_ADDR_iop_spu_rw_r 0
92
93/* Register rw_seq_pc, scope iop_spu, type rw */
94typedef struct {
95 unsigned int addr : 12;
96 unsigned int dummy1 : 20;
97} reg_iop_spu_rw_seq_pc;
98#define REG_RD_ADDR_iop_spu_rw_seq_pc 64
99#define REG_WR_ADDR_iop_spu_rw_seq_pc 64
100
101/* Register rw_fsm_pc, scope iop_spu, type rw */
102typedef struct {
103 unsigned int addr : 12;
104 unsigned int dummy1 : 20;
105} reg_iop_spu_rw_fsm_pc;
106#define REG_RD_ADDR_iop_spu_rw_fsm_pc 68
107#define REG_WR_ADDR_iop_spu_rw_fsm_pc 68
108
109/* Register rw_ctrl, scope iop_spu, type rw */
110typedef struct {
111 unsigned int fsm : 1;
112 unsigned int en : 1;
113 unsigned int dummy1 : 30;
114} reg_iop_spu_rw_ctrl;
115#define REG_RD_ADDR_iop_spu_rw_ctrl 72
116#define REG_WR_ADDR_iop_spu_rw_ctrl 72
117
118/* Register rw_fsm_inputs3_0, scope iop_spu, type rw */
119typedef struct {
120 unsigned int val0 : 5;
121 unsigned int src0 : 3;
122 unsigned int val1 : 5;
123 unsigned int src1 : 3;
124 unsigned int val2 : 5;
125 unsigned int src2 : 3;
126 unsigned int val3 : 5;
127 unsigned int src3 : 3;
128} reg_iop_spu_rw_fsm_inputs3_0;
129#define REG_RD_ADDR_iop_spu_rw_fsm_inputs3_0 76
130#define REG_WR_ADDR_iop_spu_rw_fsm_inputs3_0 76
131
132/* Register rw_fsm_inputs7_4, scope iop_spu, type rw */
133typedef struct {
134 unsigned int val4 : 5;
135 unsigned int src4 : 3;
136 unsigned int val5 : 5;
137 unsigned int src5 : 3;
138 unsigned int val6 : 5;
139 unsigned int src6 : 3;
140 unsigned int val7 : 5;
141 unsigned int src7 : 3;
142} reg_iop_spu_rw_fsm_inputs7_4;
143#define REG_RD_ADDR_iop_spu_rw_fsm_inputs7_4 80
144#define REG_WR_ADDR_iop_spu_rw_fsm_inputs7_4 80
145
146/* Register rw_gio_out, scope iop_spu, type rw */
147typedef unsigned int reg_iop_spu_rw_gio_out;
148#define REG_RD_ADDR_iop_spu_rw_gio_out 84
149#define REG_WR_ADDR_iop_spu_rw_gio_out 84
150
151/* Register rw_bus0_out, scope iop_spu, type rw */
152typedef unsigned int reg_iop_spu_rw_bus0_out;
153#define REG_RD_ADDR_iop_spu_rw_bus0_out 88
154#define REG_WR_ADDR_iop_spu_rw_bus0_out 88
155
156/* Register rw_bus1_out, scope iop_spu, type rw */
157typedef unsigned int reg_iop_spu_rw_bus1_out;
158#define REG_RD_ADDR_iop_spu_rw_bus1_out 92
159#define REG_WR_ADDR_iop_spu_rw_bus1_out 92
160
161/* Register r_gio_in, scope iop_spu, type r */
162typedef unsigned int reg_iop_spu_r_gio_in;
163#define REG_RD_ADDR_iop_spu_r_gio_in 96
164
165/* Register r_bus0_in, scope iop_spu, type r */
166typedef unsigned int reg_iop_spu_r_bus0_in;
167#define REG_RD_ADDR_iop_spu_r_bus0_in 100
168
169/* Register r_bus1_in, scope iop_spu, type r */
170typedef unsigned int reg_iop_spu_r_bus1_in;
171#define REG_RD_ADDR_iop_spu_r_bus1_in 104
172
173/* Register rw_gio_out_set, scope iop_spu, type rw */
174typedef unsigned int reg_iop_spu_rw_gio_out_set;
175#define REG_RD_ADDR_iop_spu_rw_gio_out_set 108
176#define REG_WR_ADDR_iop_spu_rw_gio_out_set 108
177
178/* Register rw_gio_out_clr, scope iop_spu, type rw */
179typedef unsigned int reg_iop_spu_rw_gio_out_clr;
180#define REG_RD_ADDR_iop_spu_rw_gio_out_clr 112
181#define REG_WR_ADDR_iop_spu_rw_gio_out_clr 112
182
183/* Register rs_wr_stat, scope iop_spu, type rs */
184typedef struct {
185 unsigned int r0 : 1;
186 unsigned int r1 : 1;
187 unsigned int r2 : 1;
188 unsigned int r3 : 1;
189 unsigned int r4 : 1;
190 unsigned int r5 : 1;
191 unsigned int r6 : 1;
192 unsigned int r7 : 1;
193 unsigned int r8 : 1;
194 unsigned int r9 : 1;
195 unsigned int r10 : 1;
196 unsigned int r11 : 1;
197 unsigned int r12 : 1;
198 unsigned int r13 : 1;
199 unsigned int r14 : 1;
200 unsigned int r15 : 1;
201 unsigned int dummy1 : 16;
202} reg_iop_spu_rs_wr_stat;
203#define REG_RD_ADDR_iop_spu_rs_wr_stat 116
204
205/* Register r_wr_stat, scope iop_spu, type r */
206typedef struct {
207 unsigned int r0 : 1;
208 unsigned int r1 : 1;
209 unsigned int r2 : 1;
210 unsigned int r3 : 1;
211 unsigned int r4 : 1;
212 unsigned int r5 : 1;
213 unsigned int r6 : 1;
214 unsigned int r7 : 1;
215 unsigned int r8 : 1;
216 unsigned int r9 : 1;
217 unsigned int r10 : 1;
218 unsigned int r11 : 1;
219 unsigned int r12 : 1;
220 unsigned int r13 : 1;
221 unsigned int r14 : 1;
222 unsigned int r15 : 1;
223 unsigned int dummy1 : 16;
224} reg_iop_spu_r_wr_stat;
225#define REG_RD_ADDR_iop_spu_r_wr_stat 120
226
227/* Register r_reg_indexed_by_bus0_in, scope iop_spu, type r */
228typedef unsigned int reg_iop_spu_r_reg_indexed_by_bus0_in;
229#define REG_RD_ADDR_iop_spu_r_reg_indexed_by_bus0_in 124
230
231/* Register r_stat_in, scope iop_spu, type r */
232typedef struct {
233 unsigned int timer_grp_lo : 4;
234 unsigned int fifo_out_last : 1;
235 unsigned int fifo_out_rdy : 1;
236 unsigned int fifo_out_all : 1;
237 unsigned int fifo_in_rdy : 1;
238 unsigned int dmc_out_all : 1;
239 unsigned int dmc_out_dth : 1;
240 unsigned int dmc_out_eop : 1;
241 unsigned int dmc_out_dv : 1;
242 unsigned int dmc_out_last : 1;
243 unsigned int dmc_out_cmd_rq : 1;
244 unsigned int dmc_out_cmd_rdy : 1;
245 unsigned int pcrc_correct : 1;
246 unsigned int timer_grp_hi : 4;
247 unsigned int dmc_in_sth : 1;
248 unsigned int dmc_in_full : 1;
249 unsigned int dmc_in_cmd_rdy : 1;
250 unsigned int spu_gio_out : 4;
251 unsigned int sync_clk12 : 1;
252 unsigned int scrc_out_data : 1;
253 unsigned int scrc_in_err : 1;
254 unsigned int mc_busy : 1;
255 unsigned int mc_owned : 1;
256} reg_iop_spu_r_stat_in;
257#define REG_RD_ADDR_iop_spu_r_stat_in 128
258
259/* Register r_trigger_in, scope iop_spu, type r */
260typedef unsigned int reg_iop_spu_r_trigger_in;
261#define REG_RD_ADDR_iop_spu_r_trigger_in 132
262
263/* Register r_special_stat, scope iop_spu, type r */
264typedef struct {
265 unsigned int c_flag : 1;
266 unsigned int v_flag : 1;
267 unsigned int z_flag : 1;
268 unsigned int n_flag : 1;
269 unsigned int xor_bus0_r2_0 : 1;
270 unsigned int xor_bus1_r3_0 : 1;
271 unsigned int xor_bus0m_r2_0 : 1;
272 unsigned int xor_bus1m_r3_0 : 1;
273 unsigned int fsm_in0 : 1;
274 unsigned int fsm_in1 : 1;
275 unsigned int fsm_in2 : 1;
276 unsigned int fsm_in3 : 1;
277 unsigned int fsm_in4 : 1;
278 unsigned int fsm_in5 : 1;
279 unsigned int fsm_in6 : 1;
280 unsigned int fsm_in7 : 1;
281 unsigned int event0 : 1;
282 unsigned int event1 : 1;
283 unsigned int event2 : 1;
284 unsigned int event3 : 1;
285 unsigned int dummy1 : 12;
286} reg_iop_spu_r_special_stat;
287#define REG_RD_ADDR_iop_spu_r_special_stat 136
288
289/* Register rw_reg_access, scope iop_spu, type rw */
290typedef struct {
291 unsigned int addr : 13;
292 unsigned int dummy1 : 3;
293 unsigned int imm_hi : 16;
294} reg_iop_spu_rw_reg_access;
295#define REG_RD_ADDR_iop_spu_rw_reg_access 140
296#define REG_WR_ADDR_iop_spu_rw_reg_access 140
297
298#define STRIDE_iop_spu_rw_event_cfg 4
299/* Register rw_event_cfg, scope iop_spu, type rw */
300typedef struct {
301 unsigned int addr : 12;
302 unsigned int src : 2;
303 unsigned int eq_en : 1;
304 unsigned int eq_inv : 1;
305 unsigned int gt_en : 1;
306 unsigned int gt_inv : 1;
307 unsigned int dummy1 : 14;
308} reg_iop_spu_rw_event_cfg;
309#define REG_RD_ADDR_iop_spu_rw_event_cfg 144
310#define REG_WR_ADDR_iop_spu_rw_event_cfg 144
311
312#define STRIDE_iop_spu_rw_event_mask 4
313/* Register rw_event_mask, scope iop_spu, type rw */
314typedef unsigned int reg_iop_spu_rw_event_mask;
315#define REG_RD_ADDR_iop_spu_rw_event_mask 160
316#define REG_WR_ADDR_iop_spu_rw_event_mask 160
317
318#define STRIDE_iop_spu_rw_event_val 4
319/* Register rw_event_val, scope iop_spu, type rw */
320typedef unsigned int reg_iop_spu_rw_event_val;
321#define REG_RD_ADDR_iop_spu_rw_event_val 176
322#define REG_WR_ADDR_iop_spu_rw_event_val 176
323
324/* Register rw_event_ret, scope iop_spu, type rw */
325typedef struct {
326 unsigned int addr : 12;
327 unsigned int dummy1 : 20;
328} reg_iop_spu_rw_event_ret;
329#define REG_RD_ADDR_iop_spu_rw_event_ret 192
330#define REG_WR_ADDR_iop_spu_rw_event_ret 192
331
332/* Register r_trace, scope iop_spu, type r */
333typedef struct {
334 unsigned int fsm : 1;
335 unsigned int en : 1;
336 unsigned int c_flag : 1;
337 unsigned int v_flag : 1;
338 unsigned int z_flag : 1;
339 unsigned int n_flag : 1;
340 unsigned int seq_addr : 12;
341 unsigned int dummy1 : 2;
342 unsigned int fsm_addr : 12;
343} reg_iop_spu_r_trace;
344#define REG_RD_ADDR_iop_spu_r_trace 196
345
346/* Register r_fsm_trace, scope iop_spu, type r */
347typedef struct {
348 unsigned int fsm : 1;
349 unsigned int en : 1;
350 unsigned int tmr_done : 1;
351 unsigned int inp0 : 1;
352 unsigned int inp1 : 1;
353 unsigned int inp2 : 1;
354 unsigned int inp3 : 1;
355 unsigned int event0 : 1;
356 unsigned int event1 : 1;
357 unsigned int event2 : 1;
358 unsigned int event3 : 1;
359 unsigned int gio_out : 8;
360 unsigned int dummy1 : 1;
361 unsigned int fsm_addr : 12;
362} reg_iop_spu_r_fsm_trace;
363#define REG_RD_ADDR_iop_spu_r_fsm_trace 200
364
365#define STRIDE_iop_spu_rw_brp 4
366/* Register rw_brp, scope iop_spu, type rw */
367typedef struct {
368 unsigned int addr : 12;
369 unsigned int fsm : 1;
370 unsigned int en : 1;
371 unsigned int dummy1 : 18;
372} reg_iop_spu_rw_brp;
373#define REG_RD_ADDR_iop_spu_rw_brp 204
374#define REG_WR_ADDR_iop_spu_rw_brp 204
375
376
377/* Constants */
378enum {
379 regk_iop_spu_attn_hi = 0x00000005,
380 regk_iop_spu_attn_lo = 0x00000005,
381 regk_iop_spu_attn_r0 = 0x00000000,
382 regk_iop_spu_attn_r1 = 0x00000001,
383 regk_iop_spu_attn_r10 = 0x00000002,
384 regk_iop_spu_attn_r11 = 0x00000003,
385 regk_iop_spu_attn_r12 = 0x00000004,
386 regk_iop_spu_attn_r13 = 0x00000005,
387 regk_iop_spu_attn_r14 = 0x00000006,
388 regk_iop_spu_attn_r15 = 0x00000007,
389 regk_iop_spu_attn_r2 = 0x00000002,
390 regk_iop_spu_attn_r3 = 0x00000003,
391 regk_iop_spu_attn_r4 = 0x00000004,
392 regk_iop_spu_attn_r5 = 0x00000005,
393 regk_iop_spu_attn_r6 = 0x00000006,
394 regk_iop_spu_attn_r7 = 0x00000007,
395 regk_iop_spu_attn_r8 = 0x00000000,
396 regk_iop_spu_attn_r9 = 0x00000001,
397 regk_iop_spu_c = 0x00000000,
398 regk_iop_spu_flag = 0x00000002,
399 regk_iop_spu_gio_in = 0x00000000,
400 regk_iop_spu_gio_out = 0x00000005,
401 regk_iop_spu_gio_out0 = 0x00000008,
402 regk_iop_spu_gio_out1 = 0x00000009,
403 regk_iop_spu_gio_out2 = 0x0000000a,
404 regk_iop_spu_gio_out3 = 0x0000000b,
405 regk_iop_spu_gio_out4 = 0x0000000c,
406 regk_iop_spu_gio_out5 = 0x0000000d,
407 regk_iop_spu_gio_out6 = 0x0000000e,
408 regk_iop_spu_gio_out7 = 0x0000000f,
409 regk_iop_spu_n = 0x00000003,
410 regk_iop_spu_no = 0x00000000,
411 regk_iop_spu_r0 = 0x00000008,
412 regk_iop_spu_r1 = 0x00000009,
413 regk_iop_spu_r10 = 0x0000000a,
414 regk_iop_spu_r11 = 0x0000000b,
415 regk_iop_spu_r12 = 0x0000000c,
416 regk_iop_spu_r13 = 0x0000000d,
417 regk_iop_spu_r14 = 0x0000000e,
418 regk_iop_spu_r15 = 0x0000000f,
419 regk_iop_spu_r2 = 0x0000000a,
420 regk_iop_spu_r3 = 0x0000000b,
421 regk_iop_spu_r4 = 0x0000000c,
422 regk_iop_spu_r5 = 0x0000000d,
423 regk_iop_spu_r6 = 0x0000000e,
424 regk_iop_spu_r7 = 0x0000000f,
425 regk_iop_spu_r8 = 0x00000008,
426 regk_iop_spu_r9 = 0x00000009,
427 regk_iop_spu_reg_hi = 0x00000002,
428 regk_iop_spu_reg_lo = 0x00000002,
429 regk_iop_spu_rw_brp_default = 0x00000000,
430 regk_iop_spu_rw_brp_size = 0x00000004,
431 regk_iop_spu_rw_ctrl_default = 0x00000000,
432 regk_iop_spu_rw_event_cfg_size = 0x00000004,
433 regk_iop_spu_rw_event_mask_size = 0x00000004,
434 regk_iop_spu_rw_event_val_size = 0x00000004,
435 regk_iop_spu_rw_gio_out_default = 0x00000000,
436 regk_iop_spu_rw_r_size = 0x00000010,
437 regk_iop_spu_rw_reg_access_default = 0x00000000,
438 regk_iop_spu_stat_in = 0x00000002,
439 regk_iop_spu_statin_hi = 0x00000004,
440 regk_iop_spu_statin_lo = 0x00000004,
441 regk_iop_spu_trig = 0x00000003,
442 regk_iop_spu_trigger = 0x00000006,
443 regk_iop_spu_v = 0x00000001,
444 regk_iop_spu_wsts_gioout_spec = 0x00000001,
445 regk_iop_spu_xor = 0x00000003,
446 regk_iop_spu_xor_bus0_r2_0 = 0x00000000,
447 regk_iop_spu_xor_bus0m_r2_0 = 0x00000002,
448 regk_iop_spu_xor_bus1_r3_0 = 0x00000001,
449 regk_iop_spu_xor_bus1m_r3_0 = 0x00000003,
450 regk_iop_spu_yes = 0x00000001,
451 regk_iop_spu_z = 0x00000002
452};
453#endif /* __iop_spu_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_cfg_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_sw_cfg_defs.h
deleted file mode 100644
index d7b6d75884d2..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_cfg_defs.h
+++ /dev/null
@@ -1,1042 +0,0 @@
1#ifndef __iop_sw_cfg_defs_h
2#define __iop_sw_cfg_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_cfg.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_sw_cfg_defs.h ../../inst/io_proc/rtl/guinness/iop_sw_cfg.r
11 * id: $Id: iop_sw_cfg_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_sw_cfg */
86
87/* Register rw_crc_par0_owner, scope iop_sw_cfg, type rw */
88typedef struct {
89 unsigned int cfg : 2;
90 unsigned int dummy1 : 30;
91} reg_iop_sw_cfg_rw_crc_par0_owner;
92#define REG_RD_ADDR_iop_sw_cfg_rw_crc_par0_owner 0
93#define REG_WR_ADDR_iop_sw_cfg_rw_crc_par0_owner 0
94
95/* Register rw_crc_par1_owner, scope iop_sw_cfg, type rw */
96typedef struct {
97 unsigned int cfg : 2;
98 unsigned int dummy1 : 30;
99} reg_iop_sw_cfg_rw_crc_par1_owner;
100#define REG_RD_ADDR_iop_sw_cfg_rw_crc_par1_owner 4
101#define REG_WR_ADDR_iop_sw_cfg_rw_crc_par1_owner 4
102
103/* Register rw_dmc_in0_owner, scope iop_sw_cfg, type rw */
104typedef struct {
105 unsigned int cfg : 2;
106 unsigned int dummy1 : 30;
107} reg_iop_sw_cfg_rw_dmc_in0_owner;
108#define REG_RD_ADDR_iop_sw_cfg_rw_dmc_in0_owner 8
109#define REG_WR_ADDR_iop_sw_cfg_rw_dmc_in0_owner 8
110
111/* Register rw_dmc_in1_owner, scope iop_sw_cfg, type rw */
112typedef struct {
113 unsigned int cfg : 2;
114 unsigned int dummy1 : 30;
115} reg_iop_sw_cfg_rw_dmc_in1_owner;
116#define REG_RD_ADDR_iop_sw_cfg_rw_dmc_in1_owner 12
117#define REG_WR_ADDR_iop_sw_cfg_rw_dmc_in1_owner 12
118
119/* Register rw_dmc_out0_owner, scope iop_sw_cfg, type rw */
120typedef struct {
121 unsigned int cfg : 2;
122 unsigned int dummy1 : 30;
123} reg_iop_sw_cfg_rw_dmc_out0_owner;
124#define REG_RD_ADDR_iop_sw_cfg_rw_dmc_out0_owner 16
125#define REG_WR_ADDR_iop_sw_cfg_rw_dmc_out0_owner 16
126
127/* Register rw_dmc_out1_owner, scope iop_sw_cfg, type rw */
128typedef struct {
129 unsigned int cfg : 2;
130 unsigned int dummy1 : 30;
131} reg_iop_sw_cfg_rw_dmc_out1_owner;
132#define REG_RD_ADDR_iop_sw_cfg_rw_dmc_out1_owner 20
133#define REG_WR_ADDR_iop_sw_cfg_rw_dmc_out1_owner 20
134
135/* Register rw_fifo_in0_owner, scope iop_sw_cfg, type rw */
136typedef struct {
137 unsigned int cfg : 2;
138 unsigned int dummy1 : 30;
139} reg_iop_sw_cfg_rw_fifo_in0_owner;
140#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in0_owner 24
141#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in0_owner 24
142
143/* Register rw_fifo_in0_extra_owner, scope iop_sw_cfg, type rw */
144typedef struct {
145 unsigned int cfg : 2;
146 unsigned int dummy1 : 30;
147} reg_iop_sw_cfg_rw_fifo_in0_extra_owner;
148#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in0_extra_owner 28
149#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in0_extra_owner 28
150
151/* Register rw_fifo_in1_owner, scope iop_sw_cfg, type rw */
152typedef struct {
153 unsigned int cfg : 2;
154 unsigned int dummy1 : 30;
155} reg_iop_sw_cfg_rw_fifo_in1_owner;
156#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in1_owner 32
157#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in1_owner 32
158
159/* Register rw_fifo_in1_extra_owner, scope iop_sw_cfg, type rw */
160typedef struct {
161 unsigned int cfg : 2;
162 unsigned int dummy1 : 30;
163} reg_iop_sw_cfg_rw_fifo_in1_extra_owner;
164#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in1_extra_owner 36
165#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in1_extra_owner 36
166
167/* Register rw_fifo_out0_owner, scope iop_sw_cfg, type rw */
168typedef struct {
169 unsigned int cfg : 2;
170 unsigned int dummy1 : 30;
171} reg_iop_sw_cfg_rw_fifo_out0_owner;
172#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out0_owner 40
173#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out0_owner 40
174
175/* Register rw_fifo_out0_extra_owner, scope iop_sw_cfg, type rw */
176typedef struct {
177 unsigned int cfg : 2;
178 unsigned int dummy1 : 30;
179} reg_iop_sw_cfg_rw_fifo_out0_extra_owner;
180#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out0_extra_owner 44
181#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out0_extra_owner 44
182
183/* Register rw_fifo_out1_owner, scope iop_sw_cfg, type rw */
184typedef struct {
185 unsigned int cfg : 2;
186 unsigned int dummy1 : 30;
187} reg_iop_sw_cfg_rw_fifo_out1_owner;
188#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out1_owner 48
189#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out1_owner 48
190
191/* Register rw_fifo_out1_extra_owner, scope iop_sw_cfg, type rw */
192typedef struct {
193 unsigned int cfg : 2;
194 unsigned int dummy1 : 30;
195} reg_iop_sw_cfg_rw_fifo_out1_extra_owner;
196#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out1_extra_owner 52
197#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out1_extra_owner 52
198
199/* Register rw_sap_in_owner, scope iop_sw_cfg, type rw */
200typedef struct {
201 unsigned int cfg : 2;
202 unsigned int dummy1 : 30;
203} reg_iop_sw_cfg_rw_sap_in_owner;
204#define REG_RD_ADDR_iop_sw_cfg_rw_sap_in_owner 56
205#define REG_WR_ADDR_iop_sw_cfg_rw_sap_in_owner 56
206
207/* Register rw_sap_out_owner, scope iop_sw_cfg, type rw */
208typedef struct {
209 unsigned int cfg : 2;
210 unsigned int dummy1 : 30;
211} reg_iop_sw_cfg_rw_sap_out_owner;
212#define REG_RD_ADDR_iop_sw_cfg_rw_sap_out_owner 60
213#define REG_WR_ADDR_iop_sw_cfg_rw_sap_out_owner 60
214
215/* Register rw_scrc_in0_owner, scope iop_sw_cfg, type rw */
216typedef struct {
217 unsigned int cfg : 2;
218 unsigned int dummy1 : 30;
219} reg_iop_sw_cfg_rw_scrc_in0_owner;
220#define REG_RD_ADDR_iop_sw_cfg_rw_scrc_in0_owner 64
221#define REG_WR_ADDR_iop_sw_cfg_rw_scrc_in0_owner 64
222
223/* Register rw_scrc_in1_owner, scope iop_sw_cfg, type rw */
224typedef struct {
225 unsigned int cfg : 2;
226 unsigned int dummy1 : 30;
227} reg_iop_sw_cfg_rw_scrc_in1_owner;
228#define REG_RD_ADDR_iop_sw_cfg_rw_scrc_in1_owner 68
229#define REG_WR_ADDR_iop_sw_cfg_rw_scrc_in1_owner 68
230
231/* Register rw_scrc_out0_owner, scope iop_sw_cfg, type rw */
232typedef struct {
233 unsigned int cfg : 2;
234 unsigned int dummy1 : 30;
235} reg_iop_sw_cfg_rw_scrc_out0_owner;
236#define REG_RD_ADDR_iop_sw_cfg_rw_scrc_out0_owner 72
237#define REG_WR_ADDR_iop_sw_cfg_rw_scrc_out0_owner 72
238
239/* Register rw_scrc_out1_owner, scope iop_sw_cfg, type rw */
240typedef struct {
241 unsigned int cfg : 2;
242 unsigned int dummy1 : 30;
243} reg_iop_sw_cfg_rw_scrc_out1_owner;
244#define REG_RD_ADDR_iop_sw_cfg_rw_scrc_out1_owner 76
245#define REG_WR_ADDR_iop_sw_cfg_rw_scrc_out1_owner 76
246
247/* Register rw_spu0_owner, scope iop_sw_cfg, type rw */
248typedef struct {
249 unsigned int cfg : 2;
250 unsigned int dummy1 : 30;
251} reg_iop_sw_cfg_rw_spu0_owner;
252#define REG_RD_ADDR_iop_sw_cfg_rw_spu0_owner 80
253#define REG_WR_ADDR_iop_sw_cfg_rw_spu0_owner 80
254
255/* Register rw_spu1_owner, scope iop_sw_cfg, type rw */
256typedef struct {
257 unsigned int cfg : 2;
258 unsigned int dummy1 : 30;
259} reg_iop_sw_cfg_rw_spu1_owner;
260#define REG_RD_ADDR_iop_sw_cfg_rw_spu1_owner 84
261#define REG_WR_ADDR_iop_sw_cfg_rw_spu1_owner 84
262
263/* Register rw_timer_grp0_owner, scope iop_sw_cfg, type rw */
264typedef struct {
265 unsigned int cfg : 2;
266 unsigned int dummy1 : 30;
267} reg_iop_sw_cfg_rw_timer_grp0_owner;
268#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_owner 88
269#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_owner 88
270
271/* Register rw_timer_grp1_owner, scope iop_sw_cfg, type rw */
272typedef struct {
273 unsigned int cfg : 2;
274 unsigned int dummy1 : 30;
275} reg_iop_sw_cfg_rw_timer_grp1_owner;
276#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_owner 92
277#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_owner 92
278
279/* Register rw_timer_grp2_owner, scope iop_sw_cfg, type rw */
280typedef struct {
281 unsigned int cfg : 2;
282 unsigned int dummy1 : 30;
283} reg_iop_sw_cfg_rw_timer_grp2_owner;
284#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp2_owner 96
285#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp2_owner 96
286
287/* Register rw_timer_grp3_owner, scope iop_sw_cfg, type rw */
288typedef struct {
289 unsigned int cfg : 2;
290 unsigned int dummy1 : 30;
291} reg_iop_sw_cfg_rw_timer_grp3_owner;
292#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp3_owner 100
293#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp3_owner 100
294
295/* Register rw_trigger_grp0_owner, scope iop_sw_cfg, type rw */
296typedef struct {
297 unsigned int cfg : 2;
298 unsigned int dummy1 : 30;
299} reg_iop_sw_cfg_rw_trigger_grp0_owner;
300#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 104
301#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 104
302
303/* Register rw_trigger_grp1_owner, scope iop_sw_cfg, type rw */
304typedef struct {
305 unsigned int cfg : 2;
306 unsigned int dummy1 : 30;
307} reg_iop_sw_cfg_rw_trigger_grp1_owner;
308#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 108
309#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 108
310
311/* Register rw_trigger_grp2_owner, scope iop_sw_cfg, type rw */
312typedef struct {
313 unsigned int cfg : 2;
314 unsigned int dummy1 : 30;
315} reg_iop_sw_cfg_rw_trigger_grp2_owner;
316#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 112
317#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 112
318
319/* Register rw_trigger_grp3_owner, scope iop_sw_cfg, type rw */
320typedef struct {
321 unsigned int cfg : 2;
322 unsigned int dummy1 : 30;
323} reg_iop_sw_cfg_rw_trigger_grp3_owner;
324#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 116
325#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 116
326
327/* Register rw_trigger_grp4_owner, scope iop_sw_cfg, type rw */
328typedef struct {
329 unsigned int cfg : 2;
330 unsigned int dummy1 : 30;
331} reg_iop_sw_cfg_rw_trigger_grp4_owner;
332#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 120
333#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 120
334
335/* Register rw_trigger_grp5_owner, scope iop_sw_cfg, type rw */
336typedef struct {
337 unsigned int cfg : 2;
338 unsigned int dummy1 : 30;
339} reg_iop_sw_cfg_rw_trigger_grp5_owner;
340#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 124
341#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 124
342
343/* Register rw_trigger_grp6_owner, scope iop_sw_cfg, type rw */
344typedef struct {
345 unsigned int cfg : 2;
346 unsigned int dummy1 : 30;
347} reg_iop_sw_cfg_rw_trigger_grp6_owner;
348#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 128
349#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 128
350
351/* Register rw_trigger_grp7_owner, scope iop_sw_cfg, type rw */
352typedef struct {
353 unsigned int cfg : 2;
354 unsigned int dummy1 : 30;
355} reg_iop_sw_cfg_rw_trigger_grp7_owner;
356#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 132
357#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 132
358
359/* Register rw_bus0_mask, scope iop_sw_cfg, type rw */
360typedef struct {
361 unsigned int byte0 : 8;
362 unsigned int byte1 : 8;
363 unsigned int byte2 : 8;
364 unsigned int byte3 : 8;
365} reg_iop_sw_cfg_rw_bus0_mask;
366#define REG_RD_ADDR_iop_sw_cfg_rw_bus0_mask 136
367#define REG_WR_ADDR_iop_sw_cfg_rw_bus0_mask 136
368
369/* Register rw_bus0_oe_mask, scope iop_sw_cfg, type rw */
370typedef struct {
371 unsigned int byte0 : 1;
372 unsigned int byte1 : 1;
373 unsigned int byte2 : 1;
374 unsigned int byte3 : 1;
375 unsigned int dummy1 : 28;
376} reg_iop_sw_cfg_rw_bus0_oe_mask;
377#define REG_RD_ADDR_iop_sw_cfg_rw_bus0_oe_mask 140
378#define REG_WR_ADDR_iop_sw_cfg_rw_bus0_oe_mask 140
379
380/* Register rw_bus1_mask, scope iop_sw_cfg, type rw */
381typedef struct {
382 unsigned int byte0 : 8;
383 unsigned int byte1 : 8;
384 unsigned int byte2 : 8;
385 unsigned int byte3 : 8;
386} reg_iop_sw_cfg_rw_bus1_mask;
387#define REG_RD_ADDR_iop_sw_cfg_rw_bus1_mask 144
388#define REG_WR_ADDR_iop_sw_cfg_rw_bus1_mask 144
389
390/* Register rw_bus1_oe_mask, scope iop_sw_cfg, type rw */
391typedef struct {
392 unsigned int byte0 : 1;
393 unsigned int byte1 : 1;
394 unsigned int byte2 : 1;
395 unsigned int byte3 : 1;
396 unsigned int dummy1 : 28;
397} reg_iop_sw_cfg_rw_bus1_oe_mask;
398#define REG_RD_ADDR_iop_sw_cfg_rw_bus1_oe_mask 148
399#define REG_WR_ADDR_iop_sw_cfg_rw_bus1_oe_mask 148
400
401/* Register rw_gio_mask, scope iop_sw_cfg, type rw */
402typedef struct {
403 unsigned int val : 32;
404} reg_iop_sw_cfg_rw_gio_mask;
405#define REG_RD_ADDR_iop_sw_cfg_rw_gio_mask 152
406#define REG_WR_ADDR_iop_sw_cfg_rw_gio_mask 152
407
408/* Register rw_gio_oe_mask, scope iop_sw_cfg, type rw */
409typedef struct {
410 unsigned int val : 32;
411} reg_iop_sw_cfg_rw_gio_oe_mask;
412#define REG_RD_ADDR_iop_sw_cfg_rw_gio_oe_mask 156
413#define REG_WR_ADDR_iop_sw_cfg_rw_gio_oe_mask 156
414
415/* Register rw_pinmapping, scope iop_sw_cfg, type rw */
416typedef struct {
417 unsigned int bus0_byte0 : 2;
418 unsigned int bus0_byte1 : 2;
419 unsigned int bus0_byte2 : 2;
420 unsigned int bus0_byte3 : 2;
421 unsigned int bus1_byte0 : 2;
422 unsigned int bus1_byte1 : 2;
423 unsigned int bus1_byte2 : 2;
424 unsigned int bus1_byte3 : 2;
425 unsigned int gio3_0 : 2;
426 unsigned int gio7_4 : 2;
427 unsigned int gio11_8 : 2;
428 unsigned int gio15_12 : 2;
429 unsigned int gio19_16 : 2;
430 unsigned int gio23_20 : 2;
431 unsigned int gio27_24 : 2;
432 unsigned int gio31_28 : 2;
433} reg_iop_sw_cfg_rw_pinmapping;
434#define REG_RD_ADDR_iop_sw_cfg_rw_pinmapping 160
435#define REG_WR_ADDR_iop_sw_cfg_rw_pinmapping 160
436
437/* Register rw_bus_out_cfg, scope iop_sw_cfg, type rw */
438typedef struct {
439 unsigned int bus0_lo : 3;
440 unsigned int bus0_hi : 3;
441 unsigned int bus0_lo_oe : 3;
442 unsigned int bus0_hi_oe : 3;
443 unsigned int bus1_lo : 3;
444 unsigned int bus1_hi : 3;
445 unsigned int bus1_lo_oe : 3;
446 unsigned int bus1_hi_oe : 3;
447 unsigned int dummy1 : 8;
448} reg_iop_sw_cfg_rw_bus_out_cfg;
449#define REG_RD_ADDR_iop_sw_cfg_rw_bus_out_cfg 164
450#define REG_WR_ADDR_iop_sw_cfg_rw_bus_out_cfg 164
451
452/* Register rw_gio_out_grp0_cfg, scope iop_sw_cfg, type rw */
453typedef struct {
454 unsigned int gio0 : 4;
455 unsigned int gio0_oe : 2;
456 unsigned int gio1 : 4;
457 unsigned int gio1_oe : 2;
458 unsigned int gio2 : 4;
459 unsigned int gio2_oe : 2;
460 unsigned int gio3 : 4;
461 unsigned int gio3_oe : 2;
462 unsigned int dummy1 : 8;
463} reg_iop_sw_cfg_rw_gio_out_grp0_cfg;
464#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 168
465#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 168
466
467/* Register rw_gio_out_grp1_cfg, scope iop_sw_cfg, type rw */
468typedef struct {
469 unsigned int gio4 : 4;
470 unsigned int gio4_oe : 2;
471 unsigned int gio5 : 4;
472 unsigned int gio5_oe : 2;
473 unsigned int gio6 : 4;
474 unsigned int gio6_oe : 2;
475 unsigned int gio7 : 4;
476 unsigned int gio7_oe : 2;
477 unsigned int dummy1 : 8;
478} reg_iop_sw_cfg_rw_gio_out_grp1_cfg;
479#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 172
480#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 172
481
482/* Register rw_gio_out_grp2_cfg, scope iop_sw_cfg, type rw */
483typedef struct {
484 unsigned int gio8 : 4;
485 unsigned int gio8_oe : 2;
486 unsigned int gio9 : 4;
487 unsigned int gio9_oe : 2;
488 unsigned int gio10 : 4;
489 unsigned int gio10_oe : 2;
490 unsigned int gio11 : 4;
491 unsigned int gio11_oe : 2;
492 unsigned int dummy1 : 8;
493} reg_iop_sw_cfg_rw_gio_out_grp2_cfg;
494#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 176
495#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 176
496
497/* Register rw_gio_out_grp3_cfg, scope iop_sw_cfg, type rw */
498typedef struct {
499 unsigned int gio12 : 4;
500 unsigned int gio12_oe : 2;
501 unsigned int gio13 : 4;
502 unsigned int gio13_oe : 2;
503 unsigned int gio14 : 4;
504 unsigned int gio14_oe : 2;
505 unsigned int gio15 : 4;
506 unsigned int gio15_oe : 2;
507 unsigned int dummy1 : 8;
508} reg_iop_sw_cfg_rw_gio_out_grp3_cfg;
509#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 180
510#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 180
511
512/* Register rw_gio_out_grp4_cfg, scope iop_sw_cfg, type rw */
513typedef struct {
514 unsigned int gio16 : 4;
515 unsigned int gio16_oe : 2;
516 unsigned int gio17 : 4;
517 unsigned int gio17_oe : 2;
518 unsigned int gio18 : 4;
519 unsigned int gio18_oe : 2;
520 unsigned int gio19 : 4;
521 unsigned int gio19_oe : 2;
522 unsigned int dummy1 : 8;
523} reg_iop_sw_cfg_rw_gio_out_grp4_cfg;
524#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 184
525#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 184
526
527/* Register rw_gio_out_grp5_cfg, scope iop_sw_cfg, type rw */
528typedef struct {
529 unsigned int gio20 : 4;
530 unsigned int gio20_oe : 2;
531 unsigned int gio21 : 4;
532 unsigned int gio21_oe : 2;
533 unsigned int gio22 : 4;
534 unsigned int gio22_oe : 2;
535 unsigned int gio23 : 4;
536 unsigned int gio23_oe : 2;
537 unsigned int dummy1 : 8;
538} reg_iop_sw_cfg_rw_gio_out_grp5_cfg;
539#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 188
540#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 188
541
542/* Register rw_gio_out_grp6_cfg, scope iop_sw_cfg, type rw */
543typedef struct {
544 unsigned int gio24 : 4;
545 unsigned int gio24_oe : 2;
546 unsigned int gio25 : 4;
547 unsigned int gio25_oe : 2;
548 unsigned int gio26 : 4;
549 unsigned int gio26_oe : 2;
550 unsigned int gio27 : 4;
551 unsigned int gio27_oe : 2;
552 unsigned int dummy1 : 8;
553} reg_iop_sw_cfg_rw_gio_out_grp6_cfg;
554#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 192
555#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 192
556
557/* Register rw_gio_out_grp7_cfg, scope iop_sw_cfg, type rw */
558typedef struct {
559 unsigned int gio28 : 4;
560 unsigned int gio28_oe : 2;
561 unsigned int gio29 : 4;
562 unsigned int gio29_oe : 2;
563 unsigned int gio30 : 4;
564 unsigned int gio30_oe : 2;
565 unsigned int gio31 : 4;
566 unsigned int gio31_oe : 2;
567 unsigned int dummy1 : 8;
568} reg_iop_sw_cfg_rw_gio_out_grp7_cfg;
569#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 196
570#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 196
571
572/* Register rw_spu0_cfg, scope iop_sw_cfg, type rw */
573typedef struct {
574 unsigned int bus0_in : 2;
575 unsigned int bus1_in : 2;
576 unsigned int dummy1 : 28;
577} reg_iop_sw_cfg_rw_spu0_cfg;
578#define REG_RD_ADDR_iop_sw_cfg_rw_spu0_cfg 200
579#define REG_WR_ADDR_iop_sw_cfg_rw_spu0_cfg 200
580
581/* Register rw_spu1_cfg, scope iop_sw_cfg, type rw */
582typedef struct {
583 unsigned int bus0_in : 2;
584 unsigned int bus1_in : 2;
585 unsigned int dummy1 : 28;
586} reg_iop_sw_cfg_rw_spu1_cfg;
587#define REG_RD_ADDR_iop_sw_cfg_rw_spu1_cfg 204
588#define REG_WR_ADDR_iop_sw_cfg_rw_spu1_cfg 204
589
590/* Register rw_timer_grp0_cfg, scope iop_sw_cfg, type rw */
591typedef struct {
592 unsigned int ext_clk : 3;
593 unsigned int tmr0_en : 1;
594 unsigned int tmr1_en : 1;
595 unsigned int tmr2_en : 1;
596 unsigned int tmr3_en : 1;
597 unsigned int tmr0_dis : 1;
598 unsigned int tmr1_dis : 1;
599 unsigned int tmr2_dis : 1;
600 unsigned int tmr3_dis : 1;
601 unsigned int dummy1 : 21;
602} reg_iop_sw_cfg_rw_timer_grp0_cfg;
603#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 208
604#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 208
605
606/* Register rw_timer_grp1_cfg, scope iop_sw_cfg, type rw */
607typedef struct {
608 unsigned int ext_clk : 3;
609 unsigned int tmr0_en : 1;
610 unsigned int tmr1_en : 1;
611 unsigned int tmr2_en : 1;
612 unsigned int tmr3_en : 1;
613 unsigned int tmr0_dis : 1;
614 unsigned int tmr1_dis : 1;
615 unsigned int tmr2_dis : 1;
616 unsigned int tmr3_dis : 1;
617 unsigned int dummy1 : 21;
618} reg_iop_sw_cfg_rw_timer_grp1_cfg;
619#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 212
620#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 212
621
622/* Register rw_timer_grp2_cfg, scope iop_sw_cfg, type rw */
623typedef struct {
624 unsigned int ext_clk : 3;
625 unsigned int tmr0_en : 1;
626 unsigned int tmr1_en : 1;
627 unsigned int tmr2_en : 1;
628 unsigned int tmr3_en : 1;
629 unsigned int tmr0_dis : 1;
630 unsigned int tmr1_dis : 1;
631 unsigned int tmr2_dis : 1;
632 unsigned int tmr3_dis : 1;
633 unsigned int dummy1 : 21;
634} reg_iop_sw_cfg_rw_timer_grp2_cfg;
635#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp2_cfg 216
636#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp2_cfg 216
637
638/* Register rw_timer_grp3_cfg, scope iop_sw_cfg, type rw */
639typedef struct {
640 unsigned int ext_clk : 3;
641 unsigned int tmr0_en : 1;
642 unsigned int tmr1_en : 1;
643 unsigned int tmr2_en : 1;
644 unsigned int tmr3_en : 1;
645 unsigned int tmr0_dis : 1;
646 unsigned int tmr1_dis : 1;
647 unsigned int tmr2_dis : 1;
648 unsigned int tmr3_dis : 1;
649 unsigned int dummy1 : 21;
650} reg_iop_sw_cfg_rw_timer_grp3_cfg;
651#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp3_cfg 220
652#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp3_cfg 220
653
654/* Register rw_trigger_grps_cfg, scope iop_sw_cfg, type rw */
655typedef struct {
656 unsigned int grp0_dis : 1;
657 unsigned int grp0_en : 1;
658 unsigned int grp1_dis : 1;
659 unsigned int grp1_en : 1;
660 unsigned int grp2_dis : 1;
661 unsigned int grp2_en : 1;
662 unsigned int grp3_dis : 1;
663 unsigned int grp3_en : 1;
664 unsigned int grp4_dis : 1;
665 unsigned int grp4_en : 1;
666 unsigned int grp5_dis : 1;
667 unsigned int grp5_en : 1;
668 unsigned int grp6_dis : 1;
669 unsigned int grp6_en : 1;
670 unsigned int grp7_dis : 1;
671 unsigned int grp7_en : 1;
672 unsigned int dummy1 : 16;
673} reg_iop_sw_cfg_rw_trigger_grps_cfg;
674#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 224
675#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 224
676
677/* Register rw_pdp0_cfg, scope iop_sw_cfg, type rw */
678typedef struct {
679 unsigned int dmc0_usr : 1;
680 unsigned int out_strb : 5;
681 unsigned int in_src : 3;
682 unsigned int in_size : 3;
683 unsigned int in_last : 2;
684 unsigned int in_strb : 4;
685 unsigned int out_src : 1;
686 unsigned int dummy1 : 13;
687} reg_iop_sw_cfg_rw_pdp0_cfg;
688#define REG_RD_ADDR_iop_sw_cfg_rw_pdp0_cfg 228
689#define REG_WR_ADDR_iop_sw_cfg_rw_pdp0_cfg 228
690
691/* Register rw_pdp1_cfg, scope iop_sw_cfg, type rw */
692typedef struct {
693 unsigned int dmc1_usr : 1;
694 unsigned int out_strb : 5;
695 unsigned int in_src : 3;
696 unsigned int in_size : 3;
697 unsigned int in_last : 2;
698 unsigned int in_strb : 4;
699 unsigned int out_src : 1;
700 unsigned int dummy1 : 13;
701} reg_iop_sw_cfg_rw_pdp1_cfg;
702#define REG_RD_ADDR_iop_sw_cfg_rw_pdp1_cfg 232
703#define REG_WR_ADDR_iop_sw_cfg_rw_pdp1_cfg 232
704
705/* Register rw_sdp_cfg, scope iop_sw_cfg, type rw */
706typedef struct {
707 unsigned int sdp_out0_strb : 3;
708 unsigned int sdp_out1_strb : 3;
709 unsigned int sdp_in0_data : 3;
710 unsigned int sdp_in0_last : 2;
711 unsigned int sdp_in0_strb : 3;
712 unsigned int sdp_in1_data : 3;
713 unsigned int sdp_in1_last : 2;
714 unsigned int sdp_in1_strb : 3;
715 unsigned int dummy1 : 10;
716} reg_iop_sw_cfg_rw_sdp_cfg;
717#define REG_RD_ADDR_iop_sw_cfg_rw_sdp_cfg 236
718#define REG_WR_ADDR_iop_sw_cfg_rw_sdp_cfg 236
719
720
721/* Constants */
722enum {
723 regk_iop_sw_cfg_a = 0x00000001,
724 regk_iop_sw_cfg_b = 0x00000002,
725 regk_iop_sw_cfg_bus0 = 0x00000000,
726 regk_iop_sw_cfg_bus0_rot16 = 0x00000004,
727 regk_iop_sw_cfg_bus0_rot24 = 0x00000006,
728 regk_iop_sw_cfg_bus0_rot8 = 0x00000002,
729 regk_iop_sw_cfg_bus1 = 0x00000001,
730 regk_iop_sw_cfg_bus1_rot16 = 0x00000005,
731 regk_iop_sw_cfg_bus1_rot24 = 0x00000007,
732 regk_iop_sw_cfg_bus1_rot8 = 0x00000003,
733 regk_iop_sw_cfg_clk12 = 0x00000000,
734 regk_iop_sw_cfg_cpu = 0x00000000,
735 regk_iop_sw_cfg_dmc0 = 0x00000000,
736 regk_iop_sw_cfg_dmc1 = 0x00000001,
737 regk_iop_sw_cfg_gated_clk0 = 0x00000010,
738 regk_iop_sw_cfg_gated_clk1 = 0x00000011,
739 regk_iop_sw_cfg_gated_clk2 = 0x00000012,
740 regk_iop_sw_cfg_gated_clk3 = 0x00000013,
741 regk_iop_sw_cfg_gio0 = 0x00000004,
742 regk_iop_sw_cfg_gio1 = 0x00000001,
743 regk_iop_sw_cfg_gio2 = 0x00000005,
744 regk_iop_sw_cfg_gio3 = 0x00000002,
745 regk_iop_sw_cfg_gio4 = 0x00000006,
746 regk_iop_sw_cfg_gio5 = 0x00000003,
747 regk_iop_sw_cfg_gio6 = 0x00000007,
748 regk_iop_sw_cfg_gio7 = 0x00000004,
749 regk_iop_sw_cfg_gio_in0 = 0x00000000,
750 regk_iop_sw_cfg_gio_in1 = 0x00000001,
751 regk_iop_sw_cfg_gio_in10 = 0x00000002,
752 regk_iop_sw_cfg_gio_in11 = 0x00000003,
753 regk_iop_sw_cfg_gio_in14 = 0x00000004,
754 regk_iop_sw_cfg_gio_in15 = 0x00000005,
755 regk_iop_sw_cfg_gio_in18 = 0x00000002,
756 regk_iop_sw_cfg_gio_in19 = 0x00000003,
757 regk_iop_sw_cfg_gio_in20 = 0x00000004,
758 regk_iop_sw_cfg_gio_in21 = 0x00000005,
759 regk_iop_sw_cfg_gio_in26 = 0x00000006,
760 regk_iop_sw_cfg_gio_in27 = 0x00000007,
761 regk_iop_sw_cfg_gio_in28 = 0x00000006,
762 regk_iop_sw_cfg_gio_in29 = 0x00000007,
763 regk_iop_sw_cfg_gio_in4 = 0x00000000,
764 regk_iop_sw_cfg_gio_in5 = 0x00000001,
765 regk_iop_sw_cfg_last_timer_grp0_tmr2 = 0x00000001,
766 regk_iop_sw_cfg_last_timer_grp1_tmr2 = 0x00000001,
767 regk_iop_sw_cfg_last_timer_grp2_tmr2 = 0x00000002,
768 regk_iop_sw_cfg_last_timer_grp2_tmr3 = 0x00000003,
769 regk_iop_sw_cfg_last_timer_grp3_tmr2 = 0x00000002,
770 regk_iop_sw_cfg_last_timer_grp3_tmr3 = 0x00000003,
771 regk_iop_sw_cfg_mpu = 0x00000001,
772 regk_iop_sw_cfg_none = 0x00000000,
773 regk_iop_sw_cfg_par0 = 0x00000000,
774 regk_iop_sw_cfg_par1 = 0x00000001,
775 regk_iop_sw_cfg_pdp_out0 = 0x00000002,
776 regk_iop_sw_cfg_pdp_out0_hi = 0x00000001,
777 regk_iop_sw_cfg_pdp_out0_hi_rot8 = 0x00000005,
778 regk_iop_sw_cfg_pdp_out0_lo = 0x00000000,
779 regk_iop_sw_cfg_pdp_out0_lo_rot8 = 0x00000004,
780 regk_iop_sw_cfg_pdp_out1 = 0x00000003,
781 regk_iop_sw_cfg_pdp_out1_hi = 0x00000003,
782 regk_iop_sw_cfg_pdp_out1_hi_rot8 = 0x00000005,
783 regk_iop_sw_cfg_pdp_out1_lo = 0x00000002,
784 regk_iop_sw_cfg_pdp_out1_lo_rot8 = 0x00000004,
785 regk_iop_sw_cfg_rw_bus0_mask_default = 0x00000000,
786 regk_iop_sw_cfg_rw_bus0_oe_mask_default = 0x00000000,
787 regk_iop_sw_cfg_rw_bus1_mask_default = 0x00000000,
788 regk_iop_sw_cfg_rw_bus1_oe_mask_default = 0x00000000,
789 regk_iop_sw_cfg_rw_bus_out_cfg_default = 0x00000000,
790 regk_iop_sw_cfg_rw_crc_par0_owner_default = 0x00000000,
791 regk_iop_sw_cfg_rw_crc_par1_owner_default = 0x00000000,
792 regk_iop_sw_cfg_rw_dmc_in0_owner_default = 0x00000000,
793 regk_iop_sw_cfg_rw_dmc_in1_owner_default = 0x00000000,
794 regk_iop_sw_cfg_rw_dmc_out0_owner_default = 0x00000000,
795 regk_iop_sw_cfg_rw_dmc_out1_owner_default = 0x00000000,
796 regk_iop_sw_cfg_rw_fifo_in0_extra_owner_default = 0x00000000,
797 regk_iop_sw_cfg_rw_fifo_in0_owner_default = 0x00000000,
798 regk_iop_sw_cfg_rw_fifo_in1_extra_owner_default = 0x00000000,
799 regk_iop_sw_cfg_rw_fifo_in1_owner_default = 0x00000000,
800 regk_iop_sw_cfg_rw_fifo_out0_extra_owner_default = 0x00000000,
801 regk_iop_sw_cfg_rw_fifo_out0_owner_default = 0x00000000,
802 regk_iop_sw_cfg_rw_fifo_out1_extra_owner_default = 0x00000000,
803 regk_iop_sw_cfg_rw_fifo_out1_owner_default = 0x00000000,
804 regk_iop_sw_cfg_rw_gio_mask_default = 0x00000000,
805 regk_iop_sw_cfg_rw_gio_oe_mask_default = 0x00000000,
806 regk_iop_sw_cfg_rw_gio_out_grp0_cfg_default = 0x00000000,
807 regk_iop_sw_cfg_rw_gio_out_grp1_cfg_default = 0x00000000,
808 regk_iop_sw_cfg_rw_gio_out_grp2_cfg_default = 0x00000000,
809 regk_iop_sw_cfg_rw_gio_out_grp3_cfg_default = 0x00000000,
810 regk_iop_sw_cfg_rw_gio_out_grp4_cfg_default = 0x00000000,
811 regk_iop_sw_cfg_rw_gio_out_grp5_cfg_default = 0x00000000,
812 regk_iop_sw_cfg_rw_gio_out_grp6_cfg_default = 0x00000000,
813 regk_iop_sw_cfg_rw_gio_out_grp7_cfg_default = 0x00000000,
814 regk_iop_sw_cfg_rw_pdp0_cfg_default = 0x00000000,
815 regk_iop_sw_cfg_rw_pdp1_cfg_default = 0x00000000,
816 regk_iop_sw_cfg_rw_pinmapping_default = 0x55555555,
817 regk_iop_sw_cfg_rw_sap_in_owner_default = 0x00000000,
818 regk_iop_sw_cfg_rw_sap_out_owner_default = 0x00000000,
819 regk_iop_sw_cfg_rw_scrc_in0_owner_default = 0x00000000,
820 regk_iop_sw_cfg_rw_scrc_in1_owner_default = 0x00000000,
821 regk_iop_sw_cfg_rw_scrc_out0_owner_default = 0x00000000,
822 regk_iop_sw_cfg_rw_scrc_out1_owner_default = 0x00000000,
823 regk_iop_sw_cfg_rw_sdp_cfg_default = 0x00000000,
824 regk_iop_sw_cfg_rw_spu0_cfg_default = 0x00000000,
825 regk_iop_sw_cfg_rw_spu0_owner_default = 0x00000000,
826 regk_iop_sw_cfg_rw_spu1_cfg_default = 0x00000000,
827 regk_iop_sw_cfg_rw_spu1_owner_default = 0x00000000,
828 regk_iop_sw_cfg_rw_timer_grp0_cfg_default = 0x00000000,
829 regk_iop_sw_cfg_rw_timer_grp0_owner_default = 0x00000000,
830 regk_iop_sw_cfg_rw_timer_grp1_cfg_default = 0x00000000,
831 regk_iop_sw_cfg_rw_timer_grp1_owner_default = 0x00000000,
832 regk_iop_sw_cfg_rw_timer_grp2_cfg_default = 0x00000000,
833 regk_iop_sw_cfg_rw_timer_grp2_owner_default = 0x00000000,
834 regk_iop_sw_cfg_rw_timer_grp3_cfg_default = 0x00000000,
835 regk_iop_sw_cfg_rw_timer_grp3_owner_default = 0x00000000,
836 regk_iop_sw_cfg_rw_trigger_grp0_owner_default = 0x00000000,
837 regk_iop_sw_cfg_rw_trigger_grp1_owner_default = 0x00000000,
838 regk_iop_sw_cfg_rw_trigger_grp2_owner_default = 0x00000000,
839 regk_iop_sw_cfg_rw_trigger_grp3_owner_default = 0x00000000,
840 regk_iop_sw_cfg_rw_trigger_grp4_owner_default = 0x00000000,
841 regk_iop_sw_cfg_rw_trigger_grp5_owner_default = 0x00000000,
842 regk_iop_sw_cfg_rw_trigger_grp6_owner_default = 0x00000000,
843 regk_iop_sw_cfg_rw_trigger_grp7_owner_default = 0x00000000,
844 regk_iop_sw_cfg_rw_trigger_grps_cfg_default = 0x00000000,
845 regk_iop_sw_cfg_sdp_out0 = 0x00000008,
846 regk_iop_sw_cfg_sdp_out1 = 0x00000009,
847 regk_iop_sw_cfg_size16 = 0x00000002,
848 regk_iop_sw_cfg_size24 = 0x00000003,
849 regk_iop_sw_cfg_size32 = 0x00000004,
850 regk_iop_sw_cfg_size8 = 0x00000001,
851 regk_iop_sw_cfg_spu0 = 0x00000002,
852 regk_iop_sw_cfg_spu0_bus_out0_hi = 0x00000006,
853 regk_iop_sw_cfg_spu0_bus_out0_lo = 0x00000006,
854 regk_iop_sw_cfg_spu0_bus_out1_hi = 0x00000007,
855 regk_iop_sw_cfg_spu0_bus_out1_lo = 0x00000007,
856 regk_iop_sw_cfg_spu0_g0 = 0x0000000e,
857 regk_iop_sw_cfg_spu0_g1 = 0x0000000e,
858 regk_iop_sw_cfg_spu0_g2 = 0x0000000e,
859 regk_iop_sw_cfg_spu0_g3 = 0x0000000e,
860 regk_iop_sw_cfg_spu0_g4 = 0x0000000e,
861 regk_iop_sw_cfg_spu0_g5 = 0x0000000e,
862 regk_iop_sw_cfg_spu0_g6 = 0x0000000e,
863 regk_iop_sw_cfg_spu0_g7 = 0x0000000e,
864 regk_iop_sw_cfg_spu0_gio0 = 0x00000000,
865 regk_iop_sw_cfg_spu0_gio1 = 0x00000001,
866 regk_iop_sw_cfg_spu0_gio2 = 0x00000000,
867 regk_iop_sw_cfg_spu0_gio5 = 0x00000005,
868 regk_iop_sw_cfg_spu0_gio6 = 0x00000006,
869 regk_iop_sw_cfg_spu0_gio7 = 0x00000007,
870 regk_iop_sw_cfg_spu0_gio_out0 = 0x00000008,
871 regk_iop_sw_cfg_spu0_gio_out1 = 0x00000009,
872 regk_iop_sw_cfg_spu0_gio_out2 = 0x0000000a,
873 regk_iop_sw_cfg_spu0_gio_out3 = 0x0000000b,
874 regk_iop_sw_cfg_spu0_gio_out4 = 0x0000000c,
875 regk_iop_sw_cfg_spu0_gio_out5 = 0x0000000d,
876 regk_iop_sw_cfg_spu0_gio_out6 = 0x0000000e,
877 regk_iop_sw_cfg_spu0_gio_out7 = 0x0000000f,
878 regk_iop_sw_cfg_spu0_gioout0 = 0x00000000,
879 regk_iop_sw_cfg_spu0_gioout1 = 0x00000000,
880 regk_iop_sw_cfg_spu0_gioout10 = 0x0000000e,
881 regk_iop_sw_cfg_spu0_gioout11 = 0x0000000e,
882 regk_iop_sw_cfg_spu0_gioout12 = 0x0000000e,
883 regk_iop_sw_cfg_spu0_gioout13 = 0x0000000e,
884 regk_iop_sw_cfg_spu0_gioout14 = 0x0000000e,
885 regk_iop_sw_cfg_spu0_gioout15 = 0x0000000e,
886 regk_iop_sw_cfg_spu0_gioout16 = 0x0000000e,
887 regk_iop_sw_cfg_spu0_gioout17 = 0x0000000e,
888 regk_iop_sw_cfg_spu0_gioout18 = 0x0000000e,
889 regk_iop_sw_cfg_spu0_gioout19 = 0x0000000e,
890 regk_iop_sw_cfg_spu0_gioout2 = 0x00000002,
891 regk_iop_sw_cfg_spu0_gioout20 = 0x0000000e,
892 regk_iop_sw_cfg_spu0_gioout21 = 0x0000000e,
893 regk_iop_sw_cfg_spu0_gioout22 = 0x0000000e,
894 regk_iop_sw_cfg_spu0_gioout23 = 0x0000000e,
895 regk_iop_sw_cfg_spu0_gioout24 = 0x0000000e,
896 regk_iop_sw_cfg_spu0_gioout25 = 0x0000000e,
897 regk_iop_sw_cfg_spu0_gioout26 = 0x0000000e,
898 regk_iop_sw_cfg_spu0_gioout27 = 0x0000000e,
899 regk_iop_sw_cfg_spu0_gioout28 = 0x0000000e,
900 regk_iop_sw_cfg_spu0_gioout29 = 0x0000000e,
901 regk_iop_sw_cfg_spu0_gioout3 = 0x00000002,
902 regk_iop_sw_cfg_spu0_gioout30 = 0x0000000e,
903 regk_iop_sw_cfg_spu0_gioout31 = 0x0000000e,
904 regk_iop_sw_cfg_spu0_gioout4 = 0x00000004,
905 regk_iop_sw_cfg_spu0_gioout5 = 0x00000004,
906 regk_iop_sw_cfg_spu0_gioout6 = 0x00000006,
907 regk_iop_sw_cfg_spu0_gioout7 = 0x00000006,
908 regk_iop_sw_cfg_spu0_gioout8 = 0x0000000e,
909 regk_iop_sw_cfg_spu0_gioout9 = 0x0000000e,
910 regk_iop_sw_cfg_spu1 = 0x00000003,
911 regk_iop_sw_cfg_spu1_bus_out0_hi = 0x00000006,
912 regk_iop_sw_cfg_spu1_bus_out0_lo = 0x00000006,
913 regk_iop_sw_cfg_spu1_bus_out1_hi = 0x00000007,
914 regk_iop_sw_cfg_spu1_bus_out1_lo = 0x00000007,
915 regk_iop_sw_cfg_spu1_g0 = 0x0000000f,
916 regk_iop_sw_cfg_spu1_g1 = 0x0000000f,
917 regk_iop_sw_cfg_spu1_g2 = 0x0000000f,
918 regk_iop_sw_cfg_spu1_g3 = 0x0000000f,
919 regk_iop_sw_cfg_spu1_g4 = 0x0000000f,
920 regk_iop_sw_cfg_spu1_g5 = 0x0000000f,
921 regk_iop_sw_cfg_spu1_g6 = 0x0000000f,
922 regk_iop_sw_cfg_spu1_g7 = 0x0000000f,
923 regk_iop_sw_cfg_spu1_gio0 = 0x00000002,
924 regk_iop_sw_cfg_spu1_gio1 = 0x00000003,
925 regk_iop_sw_cfg_spu1_gio2 = 0x00000002,
926 regk_iop_sw_cfg_spu1_gio5 = 0x00000005,
927 regk_iop_sw_cfg_spu1_gio6 = 0x00000006,
928 regk_iop_sw_cfg_spu1_gio7 = 0x00000007,
929 regk_iop_sw_cfg_spu1_gio_out0 = 0x00000008,
930 regk_iop_sw_cfg_spu1_gio_out1 = 0x00000009,
931 regk_iop_sw_cfg_spu1_gio_out2 = 0x0000000a,
932 regk_iop_sw_cfg_spu1_gio_out3 = 0x0000000b,
933 regk_iop_sw_cfg_spu1_gio_out4 = 0x0000000c,
934 regk_iop_sw_cfg_spu1_gio_out5 = 0x0000000d,
935 regk_iop_sw_cfg_spu1_gio_out6 = 0x0000000e,
936 regk_iop_sw_cfg_spu1_gio_out7 = 0x0000000f,
937 regk_iop_sw_cfg_spu1_gioout0 = 0x00000001,
938 regk_iop_sw_cfg_spu1_gioout1 = 0x00000001,
939 regk_iop_sw_cfg_spu1_gioout10 = 0x0000000f,
940 regk_iop_sw_cfg_spu1_gioout11 = 0x0000000f,
941 regk_iop_sw_cfg_spu1_gioout12 = 0x0000000f,
942 regk_iop_sw_cfg_spu1_gioout13 = 0x0000000f,
943 regk_iop_sw_cfg_spu1_gioout14 = 0x0000000f,
944 regk_iop_sw_cfg_spu1_gioout15 = 0x0000000f,
945 regk_iop_sw_cfg_spu1_gioout16 = 0x0000000f,
946 regk_iop_sw_cfg_spu1_gioout17 = 0x0000000f,
947 regk_iop_sw_cfg_spu1_gioout18 = 0x0000000f,
948 regk_iop_sw_cfg_spu1_gioout19 = 0x0000000f,
949 regk_iop_sw_cfg_spu1_gioout2 = 0x00000003,
950 regk_iop_sw_cfg_spu1_gioout20 = 0x0000000f,
951 regk_iop_sw_cfg_spu1_gioout21 = 0x0000000f,
952 regk_iop_sw_cfg_spu1_gioout22 = 0x0000000f,
953 regk_iop_sw_cfg_spu1_gioout23 = 0x0000000f,
954 regk_iop_sw_cfg_spu1_gioout24 = 0x0000000f,
955 regk_iop_sw_cfg_spu1_gioout25 = 0x0000000f,
956 regk_iop_sw_cfg_spu1_gioout26 = 0x0000000f,
957 regk_iop_sw_cfg_spu1_gioout27 = 0x0000000f,
958 regk_iop_sw_cfg_spu1_gioout28 = 0x0000000f,
959 regk_iop_sw_cfg_spu1_gioout29 = 0x0000000f,
960 regk_iop_sw_cfg_spu1_gioout3 = 0x00000003,
961 regk_iop_sw_cfg_spu1_gioout30 = 0x0000000f,
962 regk_iop_sw_cfg_spu1_gioout31 = 0x0000000f,
963 regk_iop_sw_cfg_spu1_gioout4 = 0x00000005,
964 regk_iop_sw_cfg_spu1_gioout5 = 0x00000005,
965 regk_iop_sw_cfg_spu1_gioout6 = 0x00000007,
966 regk_iop_sw_cfg_spu1_gioout7 = 0x00000007,
967 regk_iop_sw_cfg_spu1_gioout8 = 0x0000000f,
968 regk_iop_sw_cfg_spu1_gioout9 = 0x0000000f,
969 regk_iop_sw_cfg_strb_timer_grp0_tmr0 = 0x00000001,
970 regk_iop_sw_cfg_strb_timer_grp0_tmr1 = 0x00000002,
971 regk_iop_sw_cfg_strb_timer_grp1_tmr0 = 0x00000001,
972 regk_iop_sw_cfg_strb_timer_grp1_tmr1 = 0x00000002,
973 regk_iop_sw_cfg_strb_timer_grp2_tmr0 = 0x00000003,
974 regk_iop_sw_cfg_strb_timer_grp2_tmr1 = 0x00000002,
975 regk_iop_sw_cfg_strb_timer_grp3_tmr0 = 0x00000003,
976 regk_iop_sw_cfg_strb_timer_grp3_tmr1 = 0x00000002,
977 regk_iop_sw_cfg_timer_grp0 = 0x00000000,
978 regk_iop_sw_cfg_timer_grp0_rot = 0x00000001,
979 regk_iop_sw_cfg_timer_grp0_strb0 = 0x0000000a,
980 regk_iop_sw_cfg_timer_grp0_strb1 = 0x0000000a,
981 regk_iop_sw_cfg_timer_grp0_strb2 = 0x0000000a,
982 regk_iop_sw_cfg_timer_grp0_strb3 = 0x0000000a,
983 regk_iop_sw_cfg_timer_grp0_tmr0 = 0x00000004,
984 regk_iop_sw_cfg_timer_grp0_tmr1 = 0x00000004,
985 regk_iop_sw_cfg_timer_grp1 = 0x00000000,
986 regk_iop_sw_cfg_timer_grp1_rot = 0x00000001,
987 regk_iop_sw_cfg_timer_grp1_strb0 = 0x0000000b,
988 regk_iop_sw_cfg_timer_grp1_strb1 = 0x0000000b,
989 regk_iop_sw_cfg_timer_grp1_strb2 = 0x0000000b,
990 regk_iop_sw_cfg_timer_grp1_strb3 = 0x0000000b,
991 regk_iop_sw_cfg_timer_grp1_tmr0 = 0x00000005,
992 regk_iop_sw_cfg_timer_grp1_tmr1 = 0x00000005,
993 regk_iop_sw_cfg_timer_grp2 = 0x00000000,
994 regk_iop_sw_cfg_timer_grp2_rot = 0x00000001,
995 regk_iop_sw_cfg_timer_grp2_strb0 = 0x0000000c,
996 regk_iop_sw_cfg_timer_grp2_strb1 = 0x0000000c,
997 regk_iop_sw_cfg_timer_grp2_strb2 = 0x0000000c,
998 regk_iop_sw_cfg_timer_grp2_strb3 = 0x0000000c,
999 regk_iop_sw_cfg_timer_grp2_tmr0 = 0x00000006,
1000 regk_iop_sw_cfg_timer_grp2_tmr1 = 0x00000006,
1001 regk_iop_sw_cfg_timer_grp3 = 0x00000000,
1002 regk_iop_sw_cfg_timer_grp3_rot = 0x00000001,
1003 regk_iop_sw_cfg_timer_grp3_strb0 = 0x0000000d,
1004 regk_iop_sw_cfg_timer_grp3_strb1 = 0x0000000d,
1005 regk_iop_sw_cfg_timer_grp3_strb2 = 0x0000000d,
1006 regk_iop_sw_cfg_timer_grp3_strb3 = 0x0000000d,
1007 regk_iop_sw_cfg_timer_grp3_tmr0 = 0x00000007,
1008 regk_iop_sw_cfg_timer_grp3_tmr1 = 0x00000007,
1009 regk_iop_sw_cfg_trig0_0 = 0x00000000,
1010 regk_iop_sw_cfg_trig0_1 = 0x00000000,
1011 regk_iop_sw_cfg_trig0_2 = 0x00000000,
1012 regk_iop_sw_cfg_trig0_3 = 0x00000000,
1013 regk_iop_sw_cfg_trig1_0 = 0x00000000,
1014 regk_iop_sw_cfg_trig1_1 = 0x00000000,
1015 regk_iop_sw_cfg_trig1_2 = 0x00000000,
1016 regk_iop_sw_cfg_trig1_3 = 0x00000000,
1017 regk_iop_sw_cfg_trig2_0 = 0x00000000,
1018 regk_iop_sw_cfg_trig2_1 = 0x00000000,
1019 regk_iop_sw_cfg_trig2_2 = 0x00000000,
1020 regk_iop_sw_cfg_trig2_3 = 0x00000000,
1021 regk_iop_sw_cfg_trig3_0 = 0x00000000,
1022 regk_iop_sw_cfg_trig3_1 = 0x00000000,
1023 regk_iop_sw_cfg_trig3_2 = 0x00000000,
1024 regk_iop_sw_cfg_trig3_3 = 0x00000000,
1025 regk_iop_sw_cfg_trig4_0 = 0x00000001,
1026 regk_iop_sw_cfg_trig4_1 = 0x00000001,
1027 regk_iop_sw_cfg_trig4_2 = 0x00000001,
1028 regk_iop_sw_cfg_trig4_3 = 0x00000001,
1029 regk_iop_sw_cfg_trig5_0 = 0x00000001,
1030 regk_iop_sw_cfg_trig5_1 = 0x00000001,
1031 regk_iop_sw_cfg_trig5_2 = 0x00000001,
1032 regk_iop_sw_cfg_trig5_3 = 0x00000001,
1033 regk_iop_sw_cfg_trig6_0 = 0x00000001,
1034 regk_iop_sw_cfg_trig6_1 = 0x00000001,
1035 regk_iop_sw_cfg_trig6_2 = 0x00000001,
1036 regk_iop_sw_cfg_trig6_3 = 0x00000001,
1037 regk_iop_sw_cfg_trig7_0 = 0x00000001,
1038 regk_iop_sw_cfg_trig7_1 = 0x00000001,
1039 regk_iop_sw_cfg_trig7_2 = 0x00000001,
1040 regk_iop_sw_cfg_trig7_3 = 0x00000001
1041};
1042#endif /* __iop_sw_cfg_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_cpu_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_sw_cpu_defs.h
deleted file mode 100644
index 5fed844b19e2..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_cpu_defs.h
+++ /dev/null
@@ -1,853 +0,0 @@
1#ifndef __iop_sw_cpu_defs_h
2#define __iop_sw_cpu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_cpu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_sw_cpu_defs.h ../../inst/io_proc/rtl/guinness/iop_sw_cpu.r
11 * id: $Id: iop_sw_cpu_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_sw_cpu */
86
87/* Register rw_mc_ctrl, scope iop_sw_cpu, type rw */
88typedef struct {
89 unsigned int keep_owner : 1;
90 unsigned int cmd : 2;
91 unsigned int size : 3;
92 unsigned int wr_spu0_mem : 1;
93 unsigned int wr_spu1_mem : 1;
94 unsigned int dummy1 : 24;
95} reg_iop_sw_cpu_rw_mc_ctrl;
96#define REG_RD_ADDR_iop_sw_cpu_rw_mc_ctrl 0
97#define REG_WR_ADDR_iop_sw_cpu_rw_mc_ctrl 0
98
99/* Register rw_mc_data, scope iop_sw_cpu, type rw */
100typedef struct {
101 unsigned int val : 32;
102} reg_iop_sw_cpu_rw_mc_data;
103#define REG_RD_ADDR_iop_sw_cpu_rw_mc_data 4
104#define REG_WR_ADDR_iop_sw_cpu_rw_mc_data 4
105
106/* Register rw_mc_addr, scope iop_sw_cpu, type rw */
107typedef unsigned int reg_iop_sw_cpu_rw_mc_addr;
108#define REG_RD_ADDR_iop_sw_cpu_rw_mc_addr 8
109#define REG_WR_ADDR_iop_sw_cpu_rw_mc_addr 8
110
111/* Register rs_mc_data, scope iop_sw_cpu, type rs */
112typedef unsigned int reg_iop_sw_cpu_rs_mc_data;
113#define REG_RD_ADDR_iop_sw_cpu_rs_mc_data 12
114
115/* Register r_mc_data, scope iop_sw_cpu, type r */
116typedef unsigned int reg_iop_sw_cpu_r_mc_data;
117#define REG_RD_ADDR_iop_sw_cpu_r_mc_data 16
118
119/* Register r_mc_stat, scope iop_sw_cpu, type r */
120typedef struct {
121 unsigned int busy_cpu : 1;
122 unsigned int busy_mpu : 1;
123 unsigned int busy_spu0 : 1;
124 unsigned int busy_spu1 : 1;
125 unsigned int owned_by_cpu : 1;
126 unsigned int owned_by_mpu : 1;
127 unsigned int owned_by_spu0 : 1;
128 unsigned int owned_by_spu1 : 1;
129 unsigned int dummy1 : 24;
130} reg_iop_sw_cpu_r_mc_stat;
131#define REG_RD_ADDR_iop_sw_cpu_r_mc_stat 20
132
133/* Register rw_bus0_clr_mask, scope iop_sw_cpu, type rw */
134typedef struct {
135 unsigned int byte0 : 8;
136 unsigned int byte1 : 8;
137 unsigned int byte2 : 8;
138 unsigned int byte3 : 8;
139} reg_iop_sw_cpu_rw_bus0_clr_mask;
140#define REG_RD_ADDR_iop_sw_cpu_rw_bus0_clr_mask 24
141#define REG_WR_ADDR_iop_sw_cpu_rw_bus0_clr_mask 24
142
143/* Register rw_bus0_set_mask, scope iop_sw_cpu, type rw */
144typedef struct {
145 unsigned int byte0 : 8;
146 unsigned int byte1 : 8;
147 unsigned int byte2 : 8;
148 unsigned int byte3 : 8;
149} reg_iop_sw_cpu_rw_bus0_set_mask;
150#define REG_RD_ADDR_iop_sw_cpu_rw_bus0_set_mask 28
151#define REG_WR_ADDR_iop_sw_cpu_rw_bus0_set_mask 28
152
153/* Register rw_bus0_oe_clr_mask, scope iop_sw_cpu, type rw */
154typedef struct {
155 unsigned int byte0 : 1;
156 unsigned int byte1 : 1;
157 unsigned int byte2 : 1;
158 unsigned int byte3 : 1;
159 unsigned int dummy1 : 28;
160} reg_iop_sw_cpu_rw_bus0_oe_clr_mask;
161#define REG_RD_ADDR_iop_sw_cpu_rw_bus0_oe_clr_mask 32
162#define REG_WR_ADDR_iop_sw_cpu_rw_bus0_oe_clr_mask 32
163
164/* Register rw_bus0_oe_set_mask, scope iop_sw_cpu, type rw */
165typedef struct {
166 unsigned int byte0 : 1;
167 unsigned int byte1 : 1;
168 unsigned int byte2 : 1;
169 unsigned int byte3 : 1;
170 unsigned int dummy1 : 28;
171} reg_iop_sw_cpu_rw_bus0_oe_set_mask;
172#define REG_RD_ADDR_iop_sw_cpu_rw_bus0_oe_set_mask 36
173#define REG_WR_ADDR_iop_sw_cpu_rw_bus0_oe_set_mask 36
174
175/* Register r_bus0_in, scope iop_sw_cpu, type r */
176typedef unsigned int reg_iop_sw_cpu_r_bus0_in;
177#define REG_RD_ADDR_iop_sw_cpu_r_bus0_in 40
178
179/* Register rw_bus1_clr_mask, scope iop_sw_cpu, type rw */
180typedef struct {
181 unsigned int byte0 : 8;
182 unsigned int byte1 : 8;
183 unsigned int byte2 : 8;
184 unsigned int byte3 : 8;
185} reg_iop_sw_cpu_rw_bus1_clr_mask;
186#define REG_RD_ADDR_iop_sw_cpu_rw_bus1_clr_mask 44
187#define REG_WR_ADDR_iop_sw_cpu_rw_bus1_clr_mask 44
188
189/* Register rw_bus1_set_mask, scope iop_sw_cpu, type rw */
190typedef struct {
191 unsigned int byte0 : 8;
192 unsigned int byte1 : 8;
193 unsigned int byte2 : 8;
194 unsigned int byte3 : 8;
195} reg_iop_sw_cpu_rw_bus1_set_mask;
196#define REG_RD_ADDR_iop_sw_cpu_rw_bus1_set_mask 48
197#define REG_WR_ADDR_iop_sw_cpu_rw_bus1_set_mask 48
198
199/* Register rw_bus1_oe_clr_mask, scope iop_sw_cpu, type rw */
200typedef struct {
201 unsigned int byte0 : 1;
202 unsigned int byte1 : 1;
203 unsigned int byte2 : 1;
204 unsigned int byte3 : 1;
205 unsigned int dummy1 : 28;
206} reg_iop_sw_cpu_rw_bus1_oe_clr_mask;
207#define REG_RD_ADDR_iop_sw_cpu_rw_bus1_oe_clr_mask 52
208#define REG_WR_ADDR_iop_sw_cpu_rw_bus1_oe_clr_mask 52
209
210/* Register rw_bus1_oe_set_mask, scope iop_sw_cpu, type rw */
211typedef struct {
212 unsigned int byte0 : 1;
213 unsigned int byte1 : 1;
214 unsigned int byte2 : 1;
215 unsigned int byte3 : 1;
216 unsigned int dummy1 : 28;
217} reg_iop_sw_cpu_rw_bus1_oe_set_mask;
218#define REG_RD_ADDR_iop_sw_cpu_rw_bus1_oe_set_mask 56
219#define REG_WR_ADDR_iop_sw_cpu_rw_bus1_oe_set_mask 56
220
221/* Register r_bus1_in, scope iop_sw_cpu, type r */
222typedef unsigned int reg_iop_sw_cpu_r_bus1_in;
223#define REG_RD_ADDR_iop_sw_cpu_r_bus1_in 60
224
225/* Register rw_gio_clr_mask, scope iop_sw_cpu, type rw */
226typedef struct {
227 unsigned int val : 32;
228} reg_iop_sw_cpu_rw_gio_clr_mask;
229#define REG_RD_ADDR_iop_sw_cpu_rw_gio_clr_mask 64
230#define REG_WR_ADDR_iop_sw_cpu_rw_gio_clr_mask 64
231
232/* Register rw_gio_set_mask, scope iop_sw_cpu, type rw */
233typedef struct {
234 unsigned int val : 32;
235} reg_iop_sw_cpu_rw_gio_set_mask;
236#define REG_RD_ADDR_iop_sw_cpu_rw_gio_set_mask 68
237#define REG_WR_ADDR_iop_sw_cpu_rw_gio_set_mask 68
238
239/* Register rw_gio_oe_clr_mask, scope iop_sw_cpu, type rw */
240typedef struct {
241 unsigned int val : 32;
242} reg_iop_sw_cpu_rw_gio_oe_clr_mask;
243#define REG_RD_ADDR_iop_sw_cpu_rw_gio_oe_clr_mask 72
244#define REG_WR_ADDR_iop_sw_cpu_rw_gio_oe_clr_mask 72
245
246/* Register rw_gio_oe_set_mask, scope iop_sw_cpu, type rw */
247typedef struct {
248 unsigned int val : 32;
249} reg_iop_sw_cpu_rw_gio_oe_set_mask;
250#define REG_RD_ADDR_iop_sw_cpu_rw_gio_oe_set_mask 76
251#define REG_WR_ADDR_iop_sw_cpu_rw_gio_oe_set_mask 76
252
253/* Register r_gio_in, scope iop_sw_cpu, type r */
254typedef unsigned int reg_iop_sw_cpu_r_gio_in;
255#define REG_RD_ADDR_iop_sw_cpu_r_gio_in 80
256
257/* Register rw_intr0_mask, scope iop_sw_cpu, type rw */
258typedef struct {
259 unsigned int mpu_0 : 1;
260 unsigned int mpu_1 : 1;
261 unsigned int mpu_2 : 1;
262 unsigned int mpu_3 : 1;
263 unsigned int mpu_4 : 1;
264 unsigned int mpu_5 : 1;
265 unsigned int mpu_6 : 1;
266 unsigned int mpu_7 : 1;
267 unsigned int mpu_8 : 1;
268 unsigned int mpu_9 : 1;
269 unsigned int mpu_10 : 1;
270 unsigned int mpu_11 : 1;
271 unsigned int mpu_12 : 1;
272 unsigned int mpu_13 : 1;
273 unsigned int mpu_14 : 1;
274 unsigned int mpu_15 : 1;
275 unsigned int spu0_0 : 1;
276 unsigned int spu0_1 : 1;
277 unsigned int spu0_2 : 1;
278 unsigned int spu0_3 : 1;
279 unsigned int spu0_4 : 1;
280 unsigned int spu0_5 : 1;
281 unsigned int spu0_6 : 1;
282 unsigned int spu0_7 : 1;
283 unsigned int spu1_8 : 1;
284 unsigned int spu1_9 : 1;
285 unsigned int spu1_10 : 1;
286 unsigned int spu1_11 : 1;
287 unsigned int spu1_12 : 1;
288 unsigned int spu1_13 : 1;
289 unsigned int spu1_14 : 1;
290 unsigned int spu1_15 : 1;
291} reg_iop_sw_cpu_rw_intr0_mask;
292#define REG_RD_ADDR_iop_sw_cpu_rw_intr0_mask 84
293#define REG_WR_ADDR_iop_sw_cpu_rw_intr0_mask 84
294
295/* Register rw_ack_intr0, scope iop_sw_cpu, type rw */
296typedef struct {
297 unsigned int mpu_0 : 1;
298 unsigned int mpu_1 : 1;
299 unsigned int mpu_2 : 1;
300 unsigned int mpu_3 : 1;
301 unsigned int mpu_4 : 1;
302 unsigned int mpu_5 : 1;
303 unsigned int mpu_6 : 1;
304 unsigned int mpu_7 : 1;
305 unsigned int mpu_8 : 1;
306 unsigned int mpu_9 : 1;
307 unsigned int mpu_10 : 1;
308 unsigned int mpu_11 : 1;
309 unsigned int mpu_12 : 1;
310 unsigned int mpu_13 : 1;
311 unsigned int mpu_14 : 1;
312 unsigned int mpu_15 : 1;
313 unsigned int spu0_0 : 1;
314 unsigned int spu0_1 : 1;
315 unsigned int spu0_2 : 1;
316 unsigned int spu0_3 : 1;
317 unsigned int spu0_4 : 1;
318 unsigned int spu0_5 : 1;
319 unsigned int spu0_6 : 1;
320 unsigned int spu0_7 : 1;
321 unsigned int spu1_8 : 1;
322 unsigned int spu1_9 : 1;
323 unsigned int spu1_10 : 1;
324 unsigned int spu1_11 : 1;
325 unsigned int spu1_12 : 1;
326 unsigned int spu1_13 : 1;
327 unsigned int spu1_14 : 1;
328 unsigned int spu1_15 : 1;
329} reg_iop_sw_cpu_rw_ack_intr0;
330#define REG_RD_ADDR_iop_sw_cpu_rw_ack_intr0 88
331#define REG_WR_ADDR_iop_sw_cpu_rw_ack_intr0 88
332
333/* Register r_intr0, scope iop_sw_cpu, type r */
334typedef struct {
335 unsigned int mpu_0 : 1;
336 unsigned int mpu_1 : 1;
337 unsigned int mpu_2 : 1;
338 unsigned int mpu_3 : 1;
339 unsigned int mpu_4 : 1;
340 unsigned int mpu_5 : 1;
341 unsigned int mpu_6 : 1;
342 unsigned int mpu_7 : 1;
343 unsigned int mpu_8 : 1;
344 unsigned int mpu_9 : 1;
345 unsigned int mpu_10 : 1;
346 unsigned int mpu_11 : 1;
347 unsigned int mpu_12 : 1;
348 unsigned int mpu_13 : 1;
349 unsigned int mpu_14 : 1;
350 unsigned int mpu_15 : 1;
351 unsigned int spu0_0 : 1;
352 unsigned int spu0_1 : 1;
353 unsigned int spu0_2 : 1;
354 unsigned int spu0_3 : 1;
355 unsigned int spu0_4 : 1;
356 unsigned int spu0_5 : 1;
357 unsigned int spu0_6 : 1;
358 unsigned int spu0_7 : 1;
359 unsigned int spu1_8 : 1;
360 unsigned int spu1_9 : 1;
361 unsigned int spu1_10 : 1;
362 unsigned int spu1_11 : 1;
363 unsigned int spu1_12 : 1;
364 unsigned int spu1_13 : 1;
365 unsigned int spu1_14 : 1;
366 unsigned int spu1_15 : 1;
367} reg_iop_sw_cpu_r_intr0;
368#define REG_RD_ADDR_iop_sw_cpu_r_intr0 92
369
370/* Register r_masked_intr0, scope iop_sw_cpu, type r */
371typedef struct {
372 unsigned int mpu_0 : 1;
373 unsigned int mpu_1 : 1;
374 unsigned int mpu_2 : 1;
375 unsigned int mpu_3 : 1;
376 unsigned int mpu_4 : 1;
377 unsigned int mpu_5 : 1;
378 unsigned int mpu_6 : 1;
379 unsigned int mpu_7 : 1;
380 unsigned int mpu_8 : 1;
381 unsigned int mpu_9 : 1;
382 unsigned int mpu_10 : 1;
383 unsigned int mpu_11 : 1;
384 unsigned int mpu_12 : 1;
385 unsigned int mpu_13 : 1;
386 unsigned int mpu_14 : 1;
387 unsigned int mpu_15 : 1;
388 unsigned int spu0_0 : 1;
389 unsigned int spu0_1 : 1;
390 unsigned int spu0_2 : 1;
391 unsigned int spu0_3 : 1;
392 unsigned int spu0_4 : 1;
393 unsigned int spu0_5 : 1;
394 unsigned int spu0_6 : 1;
395 unsigned int spu0_7 : 1;
396 unsigned int spu1_8 : 1;
397 unsigned int spu1_9 : 1;
398 unsigned int spu1_10 : 1;
399 unsigned int spu1_11 : 1;
400 unsigned int spu1_12 : 1;
401 unsigned int spu1_13 : 1;
402 unsigned int spu1_14 : 1;
403 unsigned int spu1_15 : 1;
404} reg_iop_sw_cpu_r_masked_intr0;
405#define REG_RD_ADDR_iop_sw_cpu_r_masked_intr0 96
406
407/* Register rw_intr1_mask, scope iop_sw_cpu, type rw */
408typedef struct {
409 unsigned int mpu_16 : 1;
410 unsigned int mpu_17 : 1;
411 unsigned int mpu_18 : 1;
412 unsigned int mpu_19 : 1;
413 unsigned int mpu_20 : 1;
414 unsigned int mpu_21 : 1;
415 unsigned int mpu_22 : 1;
416 unsigned int mpu_23 : 1;
417 unsigned int mpu_24 : 1;
418 unsigned int mpu_25 : 1;
419 unsigned int mpu_26 : 1;
420 unsigned int mpu_27 : 1;
421 unsigned int mpu_28 : 1;
422 unsigned int mpu_29 : 1;
423 unsigned int mpu_30 : 1;
424 unsigned int mpu_31 : 1;
425 unsigned int spu0_8 : 1;
426 unsigned int spu0_9 : 1;
427 unsigned int spu0_10 : 1;
428 unsigned int spu0_11 : 1;
429 unsigned int spu0_12 : 1;
430 unsigned int spu0_13 : 1;
431 unsigned int spu0_14 : 1;
432 unsigned int spu0_15 : 1;
433 unsigned int spu1_0 : 1;
434 unsigned int spu1_1 : 1;
435 unsigned int spu1_2 : 1;
436 unsigned int spu1_3 : 1;
437 unsigned int spu1_4 : 1;
438 unsigned int spu1_5 : 1;
439 unsigned int spu1_6 : 1;
440 unsigned int spu1_7 : 1;
441} reg_iop_sw_cpu_rw_intr1_mask;
442#define REG_RD_ADDR_iop_sw_cpu_rw_intr1_mask 100
443#define REG_WR_ADDR_iop_sw_cpu_rw_intr1_mask 100
444
445/* Register rw_ack_intr1, scope iop_sw_cpu, type rw */
446typedef struct {
447 unsigned int mpu_16 : 1;
448 unsigned int mpu_17 : 1;
449 unsigned int mpu_18 : 1;
450 unsigned int mpu_19 : 1;
451 unsigned int mpu_20 : 1;
452 unsigned int mpu_21 : 1;
453 unsigned int mpu_22 : 1;
454 unsigned int mpu_23 : 1;
455 unsigned int mpu_24 : 1;
456 unsigned int mpu_25 : 1;
457 unsigned int mpu_26 : 1;
458 unsigned int mpu_27 : 1;
459 unsigned int mpu_28 : 1;
460 unsigned int mpu_29 : 1;
461 unsigned int mpu_30 : 1;
462 unsigned int mpu_31 : 1;
463 unsigned int spu0_8 : 1;
464 unsigned int spu0_9 : 1;
465 unsigned int spu0_10 : 1;
466 unsigned int spu0_11 : 1;
467 unsigned int spu0_12 : 1;
468 unsigned int spu0_13 : 1;
469 unsigned int spu0_14 : 1;
470 unsigned int spu0_15 : 1;
471 unsigned int spu1_0 : 1;
472 unsigned int spu1_1 : 1;
473 unsigned int spu1_2 : 1;
474 unsigned int spu1_3 : 1;
475 unsigned int spu1_4 : 1;
476 unsigned int spu1_5 : 1;
477 unsigned int spu1_6 : 1;
478 unsigned int spu1_7 : 1;
479} reg_iop_sw_cpu_rw_ack_intr1;
480#define REG_RD_ADDR_iop_sw_cpu_rw_ack_intr1 104
481#define REG_WR_ADDR_iop_sw_cpu_rw_ack_intr1 104
482
483/* Register r_intr1, scope iop_sw_cpu, type r */
484typedef struct {
485 unsigned int mpu_16 : 1;
486 unsigned int mpu_17 : 1;
487 unsigned int mpu_18 : 1;
488 unsigned int mpu_19 : 1;
489 unsigned int mpu_20 : 1;
490 unsigned int mpu_21 : 1;
491 unsigned int mpu_22 : 1;
492 unsigned int mpu_23 : 1;
493 unsigned int mpu_24 : 1;
494 unsigned int mpu_25 : 1;
495 unsigned int mpu_26 : 1;
496 unsigned int mpu_27 : 1;
497 unsigned int mpu_28 : 1;
498 unsigned int mpu_29 : 1;
499 unsigned int mpu_30 : 1;
500 unsigned int mpu_31 : 1;
501 unsigned int spu0_8 : 1;
502 unsigned int spu0_9 : 1;
503 unsigned int spu0_10 : 1;
504 unsigned int spu0_11 : 1;
505 unsigned int spu0_12 : 1;
506 unsigned int spu0_13 : 1;
507 unsigned int spu0_14 : 1;
508 unsigned int spu0_15 : 1;
509 unsigned int spu1_0 : 1;
510 unsigned int spu1_1 : 1;
511 unsigned int spu1_2 : 1;
512 unsigned int spu1_3 : 1;
513 unsigned int spu1_4 : 1;
514 unsigned int spu1_5 : 1;
515 unsigned int spu1_6 : 1;
516 unsigned int spu1_7 : 1;
517} reg_iop_sw_cpu_r_intr1;
518#define REG_RD_ADDR_iop_sw_cpu_r_intr1 108
519
520/* Register r_masked_intr1, scope iop_sw_cpu, type r */
521typedef struct {
522 unsigned int mpu_16 : 1;
523 unsigned int mpu_17 : 1;
524 unsigned int mpu_18 : 1;
525 unsigned int mpu_19 : 1;
526 unsigned int mpu_20 : 1;
527 unsigned int mpu_21 : 1;
528 unsigned int mpu_22 : 1;
529 unsigned int mpu_23 : 1;
530 unsigned int mpu_24 : 1;
531 unsigned int mpu_25 : 1;
532 unsigned int mpu_26 : 1;
533 unsigned int mpu_27 : 1;
534 unsigned int mpu_28 : 1;
535 unsigned int mpu_29 : 1;
536 unsigned int mpu_30 : 1;
537 unsigned int mpu_31 : 1;
538 unsigned int spu0_8 : 1;
539 unsigned int spu0_9 : 1;
540 unsigned int spu0_10 : 1;
541 unsigned int spu0_11 : 1;
542 unsigned int spu0_12 : 1;
543 unsigned int spu0_13 : 1;
544 unsigned int spu0_14 : 1;
545 unsigned int spu0_15 : 1;
546 unsigned int spu1_0 : 1;
547 unsigned int spu1_1 : 1;
548 unsigned int spu1_2 : 1;
549 unsigned int spu1_3 : 1;
550 unsigned int spu1_4 : 1;
551 unsigned int spu1_5 : 1;
552 unsigned int spu1_6 : 1;
553 unsigned int spu1_7 : 1;
554} reg_iop_sw_cpu_r_masked_intr1;
555#define REG_RD_ADDR_iop_sw_cpu_r_masked_intr1 112
556
557/* Register rw_intr2_mask, scope iop_sw_cpu, type rw */
558typedef struct {
559 unsigned int mpu_0 : 1;
560 unsigned int mpu_1 : 1;
561 unsigned int mpu_2 : 1;
562 unsigned int mpu_3 : 1;
563 unsigned int mpu_4 : 1;
564 unsigned int mpu_5 : 1;
565 unsigned int mpu_6 : 1;
566 unsigned int mpu_7 : 1;
567 unsigned int spu0_0 : 1;
568 unsigned int spu0_1 : 1;
569 unsigned int spu0_2 : 1;
570 unsigned int spu0_3 : 1;
571 unsigned int spu0_4 : 1;
572 unsigned int spu0_5 : 1;
573 unsigned int spu0_6 : 1;
574 unsigned int spu0_7 : 1;
575 unsigned int dmc_in0 : 1;
576 unsigned int dmc_out0 : 1;
577 unsigned int fifo_in0 : 1;
578 unsigned int fifo_out0 : 1;
579 unsigned int fifo_in0_extra : 1;
580 unsigned int fifo_out0_extra : 1;
581 unsigned int trigger_grp0 : 1;
582 unsigned int trigger_grp1 : 1;
583 unsigned int trigger_grp2 : 1;
584 unsigned int trigger_grp3 : 1;
585 unsigned int trigger_grp4 : 1;
586 unsigned int trigger_grp5 : 1;
587 unsigned int trigger_grp6 : 1;
588 unsigned int trigger_grp7 : 1;
589 unsigned int timer_grp0 : 1;
590 unsigned int timer_grp1 : 1;
591} reg_iop_sw_cpu_rw_intr2_mask;
592#define REG_RD_ADDR_iop_sw_cpu_rw_intr2_mask 116
593#define REG_WR_ADDR_iop_sw_cpu_rw_intr2_mask 116
594
595/* Register rw_ack_intr2, scope iop_sw_cpu, type rw */
596typedef struct {
597 unsigned int mpu_0 : 1;
598 unsigned int mpu_1 : 1;
599 unsigned int mpu_2 : 1;
600 unsigned int mpu_3 : 1;
601 unsigned int mpu_4 : 1;
602 unsigned int mpu_5 : 1;
603 unsigned int mpu_6 : 1;
604 unsigned int mpu_7 : 1;
605 unsigned int spu0_0 : 1;
606 unsigned int spu0_1 : 1;
607 unsigned int spu0_2 : 1;
608 unsigned int spu0_3 : 1;
609 unsigned int spu0_4 : 1;
610 unsigned int spu0_5 : 1;
611 unsigned int spu0_6 : 1;
612 unsigned int spu0_7 : 1;
613 unsigned int dummy1 : 16;
614} reg_iop_sw_cpu_rw_ack_intr2;
615#define REG_RD_ADDR_iop_sw_cpu_rw_ack_intr2 120
616#define REG_WR_ADDR_iop_sw_cpu_rw_ack_intr2 120
617
618/* Register r_intr2, scope iop_sw_cpu, type r */
619typedef struct {
620 unsigned int mpu_0 : 1;
621 unsigned int mpu_1 : 1;
622 unsigned int mpu_2 : 1;
623 unsigned int mpu_3 : 1;
624 unsigned int mpu_4 : 1;
625 unsigned int mpu_5 : 1;
626 unsigned int mpu_6 : 1;
627 unsigned int mpu_7 : 1;
628 unsigned int spu0_0 : 1;
629 unsigned int spu0_1 : 1;
630 unsigned int spu0_2 : 1;
631 unsigned int spu0_3 : 1;
632 unsigned int spu0_4 : 1;
633 unsigned int spu0_5 : 1;
634 unsigned int spu0_6 : 1;
635 unsigned int spu0_7 : 1;
636 unsigned int dmc_in0 : 1;
637 unsigned int dmc_out0 : 1;
638 unsigned int fifo_in0 : 1;
639 unsigned int fifo_out0 : 1;
640 unsigned int fifo_in0_extra : 1;
641 unsigned int fifo_out0_extra : 1;
642 unsigned int trigger_grp0 : 1;
643 unsigned int trigger_grp1 : 1;
644 unsigned int trigger_grp2 : 1;
645 unsigned int trigger_grp3 : 1;
646 unsigned int trigger_grp4 : 1;
647 unsigned int trigger_grp5 : 1;
648 unsigned int trigger_grp6 : 1;
649 unsigned int trigger_grp7 : 1;
650 unsigned int timer_grp0 : 1;
651 unsigned int timer_grp1 : 1;
652} reg_iop_sw_cpu_r_intr2;
653#define REG_RD_ADDR_iop_sw_cpu_r_intr2 124
654
655/* Register r_masked_intr2, scope iop_sw_cpu, type r */
656typedef struct {
657 unsigned int mpu_0 : 1;
658 unsigned int mpu_1 : 1;
659 unsigned int mpu_2 : 1;
660 unsigned int mpu_3 : 1;
661 unsigned int mpu_4 : 1;
662 unsigned int mpu_5 : 1;
663 unsigned int mpu_6 : 1;
664 unsigned int mpu_7 : 1;
665 unsigned int spu0_0 : 1;
666 unsigned int spu0_1 : 1;
667 unsigned int spu0_2 : 1;
668 unsigned int spu0_3 : 1;
669 unsigned int spu0_4 : 1;
670 unsigned int spu0_5 : 1;
671 unsigned int spu0_6 : 1;
672 unsigned int spu0_7 : 1;
673 unsigned int dmc_in0 : 1;
674 unsigned int dmc_out0 : 1;
675 unsigned int fifo_in0 : 1;
676 unsigned int fifo_out0 : 1;
677 unsigned int fifo_in0_extra : 1;
678 unsigned int fifo_out0_extra : 1;
679 unsigned int trigger_grp0 : 1;
680 unsigned int trigger_grp1 : 1;
681 unsigned int trigger_grp2 : 1;
682 unsigned int trigger_grp3 : 1;
683 unsigned int trigger_grp4 : 1;
684 unsigned int trigger_grp5 : 1;
685 unsigned int trigger_grp6 : 1;
686 unsigned int trigger_grp7 : 1;
687 unsigned int timer_grp0 : 1;
688 unsigned int timer_grp1 : 1;
689} reg_iop_sw_cpu_r_masked_intr2;
690#define REG_RD_ADDR_iop_sw_cpu_r_masked_intr2 128
691
692/* Register rw_intr3_mask, scope iop_sw_cpu, type rw */
693typedef struct {
694 unsigned int mpu_16 : 1;
695 unsigned int mpu_17 : 1;
696 unsigned int mpu_18 : 1;
697 unsigned int mpu_19 : 1;
698 unsigned int mpu_20 : 1;
699 unsigned int mpu_21 : 1;
700 unsigned int mpu_22 : 1;
701 unsigned int mpu_23 : 1;
702 unsigned int spu1_0 : 1;
703 unsigned int spu1_1 : 1;
704 unsigned int spu1_2 : 1;
705 unsigned int spu1_3 : 1;
706 unsigned int spu1_4 : 1;
707 unsigned int spu1_5 : 1;
708 unsigned int spu1_6 : 1;
709 unsigned int spu1_7 : 1;
710 unsigned int dmc_in1 : 1;
711 unsigned int dmc_out1 : 1;
712 unsigned int fifo_in1 : 1;
713 unsigned int fifo_out1 : 1;
714 unsigned int fifo_in1_extra : 1;
715 unsigned int fifo_out1_extra : 1;
716 unsigned int trigger_grp0 : 1;
717 unsigned int trigger_grp1 : 1;
718 unsigned int trigger_grp2 : 1;
719 unsigned int trigger_grp3 : 1;
720 unsigned int trigger_grp4 : 1;
721 unsigned int trigger_grp5 : 1;
722 unsigned int trigger_grp6 : 1;
723 unsigned int trigger_grp7 : 1;
724 unsigned int timer_grp2 : 1;
725 unsigned int timer_grp3 : 1;
726} reg_iop_sw_cpu_rw_intr3_mask;
727#define REG_RD_ADDR_iop_sw_cpu_rw_intr3_mask 132
728#define REG_WR_ADDR_iop_sw_cpu_rw_intr3_mask 132
729
730/* Register rw_ack_intr3, scope iop_sw_cpu, type rw */
731typedef struct {
732 unsigned int mpu_16 : 1;
733 unsigned int mpu_17 : 1;
734 unsigned int mpu_18 : 1;
735 unsigned int mpu_19 : 1;
736 unsigned int mpu_20 : 1;
737 unsigned int mpu_21 : 1;
738 unsigned int mpu_22 : 1;
739 unsigned int mpu_23 : 1;
740 unsigned int spu1_0 : 1;
741 unsigned int spu1_1 : 1;
742 unsigned int spu1_2 : 1;
743 unsigned int spu1_3 : 1;
744 unsigned int spu1_4 : 1;
745 unsigned int spu1_5 : 1;
746 unsigned int spu1_6 : 1;
747 unsigned int spu1_7 : 1;
748 unsigned int dummy1 : 16;
749} reg_iop_sw_cpu_rw_ack_intr3;
750#define REG_RD_ADDR_iop_sw_cpu_rw_ack_intr3 136
751#define REG_WR_ADDR_iop_sw_cpu_rw_ack_intr3 136
752
753/* Register r_intr3, scope iop_sw_cpu, type r */
754typedef struct {
755 unsigned int mpu_16 : 1;
756 unsigned int mpu_17 : 1;
757 unsigned int mpu_18 : 1;
758 unsigned int mpu_19 : 1;
759 unsigned int mpu_20 : 1;
760 unsigned int mpu_21 : 1;
761 unsigned int mpu_22 : 1;
762 unsigned int mpu_23 : 1;
763 unsigned int spu1_0 : 1;
764 unsigned int spu1_1 : 1;
765 unsigned int spu1_2 : 1;
766 unsigned int spu1_3 : 1;
767 unsigned int spu1_4 : 1;
768 unsigned int spu1_5 : 1;
769 unsigned int spu1_6 : 1;
770 unsigned int spu1_7 : 1;
771 unsigned int dmc_in1 : 1;
772 unsigned int dmc_out1 : 1;
773 unsigned int fifo_in1 : 1;
774 unsigned int fifo_out1 : 1;
775 unsigned int fifo_in1_extra : 1;
776 unsigned int fifo_out1_extra : 1;
777 unsigned int trigger_grp0 : 1;
778 unsigned int trigger_grp1 : 1;
779 unsigned int trigger_grp2 : 1;
780 unsigned int trigger_grp3 : 1;
781 unsigned int trigger_grp4 : 1;
782 unsigned int trigger_grp5 : 1;
783 unsigned int trigger_grp6 : 1;
784 unsigned int trigger_grp7 : 1;
785 unsigned int timer_grp2 : 1;
786 unsigned int timer_grp3 : 1;
787} reg_iop_sw_cpu_r_intr3;
788#define REG_RD_ADDR_iop_sw_cpu_r_intr3 140
789
790/* Register r_masked_intr3, scope iop_sw_cpu, type r */
791typedef struct {
792 unsigned int mpu_16 : 1;
793 unsigned int mpu_17 : 1;
794 unsigned int mpu_18 : 1;
795 unsigned int mpu_19 : 1;
796 unsigned int mpu_20 : 1;
797 unsigned int mpu_21 : 1;
798 unsigned int mpu_22 : 1;
799 unsigned int mpu_23 : 1;
800 unsigned int spu1_0 : 1;
801 unsigned int spu1_1 : 1;
802 unsigned int spu1_2 : 1;
803 unsigned int spu1_3 : 1;
804 unsigned int spu1_4 : 1;
805 unsigned int spu1_5 : 1;
806 unsigned int spu1_6 : 1;
807 unsigned int spu1_7 : 1;
808 unsigned int dmc_in1 : 1;
809 unsigned int dmc_out1 : 1;
810 unsigned int fifo_in1 : 1;
811 unsigned int fifo_out1 : 1;
812 unsigned int fifo_in1_extra : 1;
813 unsigned int fifo_out1_extra : 1;
814 unsigned int trigger_grp0 : 1;
815 unsigned int trigger_grp1 : 1;
816 unsigned int trigger_grp2 : 1;
817 unsigned int trigger_grp3 : 1;
818 unsigned int trigger_grp4 : 1;
819 unsigned int trigger_grp5 : 1;
820 unsigned int trigger_grp6 : 1;
821 unsigned int trigger_grp7 : 1;
822 unsigned int timer_grp2 : 1;
823 unsigned int timer_grp3 : 1;
824} reg_iop_sw_cpu_r_masked_intr3;
825#define REG_RD_ADDR_iop_sw_cpu_r_masked_intr3 144
826
827
828/* Constants */
829enum {
830 regk_iop_sw_cpu_copy = 0x00000000,
831 regk_iop_sw_cpu_no = 0x00000000,
832 regk_iop_sw_cpu_rd = 0x00000002,
833 regk_iop_sw_cpu_reg_copy = 0x00000001,
834 regk_iop_sw_cpu_rw_bus0_clr_mask_default = 0x00000000,
835 regk_iop_sw_cpu_rw_bus0_oe_clr_mask_default = 0x00000000,
836 regk_iop_sw_cpu_rw_bus0_oe_set_mask_default = 0x00000000,
837 regk_iop_sw_cpu_rw_bus0_set_mask_default = 0x00000000,
838 regk_iop_sw_cpu_rw_bus1_clr_mask_default = 0x00000000,
839 regk_iop_sw_cpu_rw_bus1_oe_clr_mask_default = 0x00000000,
840 regk_iop_sw_cpu_rw_bus1_oe_set_mask_default = 0x00000000,
841 regk_iop_sw_cpu_rw_bus1_set_mask_default = 0x00000000,
842 regk_iop_sw_cpu_rw_gio_clr_mask_default = 0x00000000,
843 regk_iop_sw_cpu_rw_gio_oe_clr_mask_default = 0x00000000,
844 regk_iop_sw_cpu_rw_gio_oe_set_mask_default = 0x00000000,
845 regk_iop_sw_cpu_rw_gio_set_mask_default = 0x00000000,
846 regk_iop_sw_cpu_rw_intr0_mask_default = 0x00000000,
847 regk_iop_sw_cpu_rw_intr1_mask_default = 0x00000000,
848 regk_iop_sw_cpu_rw_intr2_mask_default = 0x00000000,
849 regk_iop_sw_cpu_rw_intr3_mask_default = 0x00000000,
850 regk_iop_sw_cpu_wr = 0x00000003,
851 regk_iop_sw_cpu_yes = 0x00000001
852};
853#endif /* __iop_sw_cpu_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_mpu_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_sw_mpu_defs.h
deleted file mode 100644
index da718f2a8cad..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_mpu_defs.h
+++ /dev/null
@@ -1,893 +0,0 @@
1#ifndef __iop_sw_mpu_defs_h
2#define __iop_sw_mpu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_mpu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_sw_mpu_defs.h ../../inst/io_proc/rtl/guinness/iop_sw_mpu.r
11 * id: $Id: iop_sw_mpu_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_sw_mpu */
86
87/* Register rw_sw_cfg_owner, scope iop_sw_mpu, type rw */
88typedef struct {
89 unsigned int cfg : 2;
90 unsigned int dummy1 : 30;
91} reg_iop_sw_mpu_rw_sw_cfg_owner;
92#define REG_RD_ADDR_iop_sw_mpu_rw_sw_cfg_owner 0
93#define REG_WR_ADDR_iop_sw_mpu_rw_sw_cfg_owner 0
94
95/* Register rw_mc_ctrl, scope iop_sw_mpu, type rw */
96typedef struct {
97 unsigned int keep_owner : 1;
98 unsigned int cmd : 2;
99 unsigned int size : 3;
100 unsigned int wr_spu0_mem : 1;
101 unsigned int wr_spu1_mem : 1;
102 unsigned int dummy1 : 24;
103} reg_iop_sw_mpu_rw_mc_ctrl;
104#define REG_RD_ADDR_iop_sw_mpu_rw_mc_ctrl 4
105#define REG_WR_ADDR_iop_sw_mpu_rw_mc_ctrl 4
106
107/* Register rw_mc_data, scope iop_sw_mpu, type rw */
108typedef struct {
109 unsigned int val : 32;
110} reg_iop_sw_mpu_rw_mc_data;
111#define REG_RD_ADDR_iop_sw_mpu_rw_mc_data 8
112#define REG_WR_ADDR_iop_sw_mpu_rw_mc_data 8
113
114/* Register rw_mc_addr, scope iop_sw_mpu, type rw */
115typedef unsigned int reg_iop_sw_mpu_rw_mc_addr;
116#define REG_RD_ADDR_iop_sw_mpu_rw_mc_addr 12
117#define REG_WR_ADDR_iop_sw_mpu_rw_mc_addr 12
118
119/* Register rs_mc_data, scope iop_sw_mpu, type rs */
120typedef unsigned int reg_iop_sw_mpu_rs_mc_data;
121#define REG_RD_ADDR_iop_sw_mpu_rs_mc_data 16
122
123/* Register r_mc_data, scope iop_sw_mpu, type r */
124typedef unsigned int reg_iop_sw_mpu_r_mc_data;
125#define REG_RD_ADDR_iop_sw_mpu_r_mc_data 20
126
127/* Register r_mc_stat, scope iop_sw_mpu, type r */
128typedef struct {
129 unsigned int busy_cpu : 1;
130 unsigned int busy_mpu : 1;
131 unsigned int busy_spu0 : 1;
132 unsigned int busy_spu1 : 1;
133 unsigned int owned_by_cpu : 1;
134 unsigned int owned_by_mpu : 1;
135 unsigned int owned_by_spu0 : 1;
136 unsigned int owned_by_spu1 : 1;
137 unsigned int dummy1 : 24;
138} reg_iop_sw_mpu_r_mc_stat;
139#define REG_RD_ADDR_iop_sw_mpu_r_mc_stat 24
140
141/* Register rw_bus0_clr_mask, scope iop_sw_mpu, type rw */
142typedef struct {
143 unsigned int byte0 : 8;
144 unsigned int byte1 : 8;
145 unsigned int byte2 : 8;
146 unsigned int byte3 : 8;
147} reg_iop_sw_mpu_rw_bus0_clr_mask;
148#define REG_RD_ADDR_iop_sw_mpu_rw_bus0_clr_mask 28
149#define REG_WR_ADDR_iop_sw_mpu_rw_bus0_clr_mask 28
150
151/* Register rw_bus0_set_mask, scope iop_sw_mpu, type rw */
152typedef struct {
153 unsigned int byte0 : 8;
154 unsigned int byte1 : 8;
155 unsigned int byte2 : 8;
156 unsigned int byte3 : 8;
157} reg_iop_sw_mpu_rw_bus0_set_mask;
158#define REG_RD_ADDR_iop_sw_mpu_rw_bus0_set_mask 32
159#define REG_WR_ADDR_iop_sw_mpu_rw_bus0_set_mask 32
160
161/* Register rw_bus0_oe_clr_mask, scope iop_sw_mpu, type rw */
162typedef struct {
163 unsigned int byte0 : 1;
164 unsigned int byte1 : 1;
165 unsigned int byte2 : 1;
166 unsigned int byte3 : 1;
167 unsigned int dummy1 : 28;
168} reg_iop_sw_mpu_rw_bus0_oe_clr_mask;
169#define REG_RD_ADDR_iop_sw_mpu_rw_bus0_oe_clr_mask 36
170#define REG_WR_ADDR_iop_sw_mpu_rw_bus0_oe_clr_mask 36
171
172/* Register rw_bus0_oe_set_mask, scope iop_sw_mpu, type rw */
173typedef struct {
174 unsigned int byte0 : 1;
175 unsigned int byte1 : 1;
176 unsigned int byte2 : 1;
177 unsigned int byte3 : 1;
178 unsigned int dummy1 : 28;
179} reg_iop_sw_mpu_rw_bus0_oe_set_mask;
180#define REG_RD_ADDR_iop_sw_mpu_rw_bus0_oe_set_mask 40
181#define REG_WR_ADDR_iop_sw_mpu_rw_bus0_oe_set_mask 40
182
183/* Register r_bus0_in, scope iop_sw_mpu, type r */
184typedef unsigned int reg_iop_sw_mpu_r_bus0_in;
185#define REG_RD_ADDR_iop_sw_mpu_r_bus0_in 44
186
187/* Register rw_bus1_clr_mask, scope iop_sw_mpu, type rw */
188typedef struct {
189 unsigned int byte0 : 8;
190 unsigned int byte1 : 8;
191 unsigned int byte2 : 8;
192 unsigned int byte3 : 8;
193} reg_iop_sw_mpu_rw_bus1_clr_mask;
194#define REG_RD_ADDR_iop_sw_mpu_rw_bus1_clr_mask 48
195#define REG_WR_ADDR_iop_sw_mpu_rw_bus1_clr_mask 48
196
197/* Register rw_bus1_set_mask, scope iop_sw_mpu, type rw */
198typedef struct {
199 unsigned int byte0 : 8;
200 unsigned int byte1 : 8;
201 unsigned int byte2 : 8;
202 unsigned int byte3 : 8;
203} reg_iop_sw_mpu_rw_bus1_set_mask;
204#define REG_RD_ADDR_iop_sw_mpu_rw_bus1_set_mask 52
205#define REG_WR_ADDR_iop_sw_mpu_rw_bus1_set_mask 52
206
207/* Register rw_bus1_oe_clr_mask, scope iop_sw_mpu, type rw */
208typedef struct {
209 unsigned int byte0 : 1;
210 unsigned int byte1 : 1;
211 unsigned int byte2 : 1;
212 unsigned int byte3 : 1;
213 unsigned int dummy1 : 28;
214} reg_iop_sw_mpu_rw_bus1_oe_clr_mask;
215#define REG_RD_ADDR_iop_sw_mpu_rw_bus1_oe_clr_mask 56
216#define REG_WR_ADDR_iop_sw_mpu_rw_bus1_oe_clr_mask 56
217
218/* Register rw_bus1_oe_set_mask, scope iop_sw_mpu, type rw */
219typedef struct {
220 unsigned int byte0 : 1;
221 unsigned int byte1 : 1;
222 unsigned int byte2 : 1;
223 unsigned int byte3 : 1;
224 unsigned int dummy1 : 28;
225} reg_iop_sw_mpu_rw_bus1_oe_set_mask;
226#define REG_RD_ADDR_iop_sw_mpu_rw_bus1_oe_set_mask 60
227#define REG_WR_ADDR_iop_sw_mpu_rw_bus1_oe_set_mask 60
228
229/* Register r_bus1_in, scope iop_sw_mpu, type r */
230typedef unsigned int reg_iop_sw_mpu_r_bus1_in;
231#define REG_RD_ADDR_iop_sw_mpu_r_bus1_in 64
232
233/* Register rw_gio_clr_mask, scope iop_sw_mpu, type rw */
234typedef struct {
235 unsigned int val : 32;
236} reg_iop_sw_mpu_rw_gio_clr_mask;
237#define REG_RD_ADDR_iop_sw_mpu_rw_gio_clr_mask 68
238#define REG_WR_ADDR_iop_sw_mpu_rw_gio_clr_mask 68
239
240/* Register rw_gio_set_mask, scope iop_sw_mpu, type rw */
241typedef struct {
242 unsigned int val : 32;
243} reg_iop_sw_mpu_rw_gio_set_mask;
244#define REG_RD_ADDR_iop_sw_mpu_rw_gio_set_mask 72
245#define REG_WR_ADDR_iop_sw_mpu_rw_gio_set_mask 72
246
247/* Register rw_gio_oe_clr_mask, scope iop_sw_mpu, type rw */
248typedef struct {
249 unsigned int val : 32;
250} reg_iop_sw_mpu_rw_gio_oe_clr_mask;
251#define REG_RD_ADDR_iop_sw_mpu_rw_gio_oe_clr_mask 76
252#define REG_WR_ADDR_iop_sw_mpu_rw_gio_oe_clr_mask 76
253
254/* Register rw_gio_oe_set_mask, scope iop_sw_mpu, type rw */
255typedef struct {
256 unsigned int val : 32;
257} reg_iop_sw_mpu_rw_gio_oe_set_mask;
258#define REG_RD_ADDR_iop_sw_mpu_rw_gio_oe_set_mask 80
259#define REG_WR_ADDR_iop_sw_mpu_rw_gio_oe_set_mask 80
260
261/* Register r_gio_in, scope iop_sw_mpu, type r */
262typedef unsigned int reg_iop_sw_mpu_r_gio_in;
263#define REG_RD_ADDR_iop_sw_mpu_r_gio_in 84
264
265/* Register rw_cpu_intr, scope iop_sw_mpu, type rw */
266typedef struct {
267 unsigned int intr0 : 1;
268 unsigned int intr1 : 1;
269 unsigned int intr2 : 1;
270 unsigned int intr3 : 1;
271 unsigned int intr4 : 1;
272 unsigned int intr5 : 1;
273 unsigned int intr6 : 1;
274 unsigned int intr7 : 1;
275 unsigned int intr8 : 1;
276 unsigned int intr9 : 1;
277 unsigned int intr10 : 1;
278 unsigned int intr11 : 1;
279 unsigned int intr12 : 1;
280 unsigned int intr13 : 1;
281 unsigned int intr14 : 1;
282 unsigned int intr15 : 1;
283 unsigned int intr16 : 1;
284 unsigned int intr17 : 1;
285 unsigned int intr18 : 1;
286 unsigned int intr19 : 1;
287 unsigned int intr20 : 1;
288 unsigned int intr21 : 1;
289 unsigned int intr22 : 1;
290 unsigned int intr23 : 1;
291 unsigned int intr24 : 1;
292 unsigned int intr25 : 1;
293 unsigned int intr26 : 1;
294 unsigned int intr27 : 1;
295 unsigned int intr28 : 1;
296 unsigned int intr29 : 1;
297 unsigned int intr30 : 1;
298 unsigned int intr31 : 1;
299} reg_iop_sw_mpu_rw_cpu_intr;
300#define REG_RD_ADDR_iop_sw_mpu_rw_cpu_intr 88
301#define REG_WR_ADDR_iop_sw_mpu_rw_cpu_intr 88
302
303/* Register r_cpu_intr, scope iop_sw_mpu, type r */
304typedef struct {
305 unsigned int intr0 : 1;
306 unsigned int intr1 : 1;
307 unsigned int intr2 : 1;
308 unsigned int intr3 : 1;
309 unsigned int intr4 : 1;
310 unsigned int intr5 : 1;
311 unsigned int intr6 : 1;
312 unsigned int intr7 : 1;
313 unsigned int intr8 : 1;
314 unsigned int intr9 : 1;
315 unsigned int intr10 : 1;
316 unsigned int intr11 : 1;
317 unsigned int intr12 : 1;
318 unsigned int intr13 : 1;
319 unsigned int intr14 : 1;
320 unsigned int intr15 : 1;
321 unsigned int intr16 : 1;
322 unsigned int intr17 : 1;
323 unsigned int intr18 : 1;
324 unsigned int intr19 : 1;
325 unsigned int intr20 : 1;
326 unsigned int intr21 : 1;
327 unsigned int intr22 : 1;
328 unsigned int intr23 : 1;
329 unsigned int intr24 : 1;
330 unsigned int intr25 : 1;
331 unsigned int intr26 : 1;
332 unsigned int intr27 : 1;
333 unsigned int intr28 : 1;
334 unsigned int intr29 : 1;
335 unsigned int intr30 : 1;
336 unsigned int intr31 : 1;
337} reg_iop_sw_mpu_r_cpu_intr;
338#define REG_RD_ADDR_iop_sw_mpu_r_cpu_intr 92
339
340/* Register rw_intr_grp0_mask, scope iop_sw_mpu, type rw */
341typedef struct {
342 unsigned int spu0_intr0 : 1;
343 unsigned int spu1_intr0 : 1;
344 unsigned int trigger_grp0 : 1;
345 unsigned int trigger_grp4 : 1;
346 unsigned int timer_grp0 : 1;
347 unsigned int fifo_out0 : 1;
348 unsigned int fifo_out0_extra : 1;
349 unsigned int dmc_out0 : 1;
350 unsigned int spu0_intr1 : 1;
351 unsigned int spu1_intr1 : 1;
352 unsigned int trigger_grp1 : 1;
353 unsigned int trigger_grp5 : 1;
354 unsigned int timer_grp1 : 1;
355 unsigned int fifo_in0 : 1;
356 unsigned int fifo_in0_extra : 1;
357 unsigned int dmc_in0 : 1;
358 unsigned int spu0_intr2 : 1;
359 unsigned int spu1_intr2 : 1;
360 unsigned int trigger_grp2 : 1;
361 unsigned int trigger_grp6 : 1;
362 unsigned int timer_grp2 : 1;
363 unsigned int fifo_out1 : 1;
364 unsigned int fifo_out1_extra : 1;
365 unsigned int dmc_out1 : 1;
366 unsigned int spu0_intr3 : 1;
367 unsigned int spu1_intr3 : 1;
368 unsigned int trigger_grp3 : 1;
369 unsigned int trigger_grp7 : 1;
370 unsigned int timer_grp3 : 1;
371 unsigned int fifo_in1 : 1;
372 unsigned int fifo_in1_extra : 1;
373 unsigned int dmc_in1 : 1;
374} reg_iop_sw_mpu_rw_intr_grp0_mask;
375#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp0_mask 96
376#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp0_mask 96
377
378/* Register rw_ack_intr_grp0, scope iop_sw_mpu, type rw */
379typedef struct {
380 unsigned int spu0_intr0 : 1;
381 unsigned int spu1_intr0 : 1;
382 unsigned int dummy1 : 6;
383 unsigned int spu0_intr1 : 1;
384 unsigned int spu1_intr1 : 1;
385 unsigned int dummy2 : 6;
386 unsigned int spu0_intr2 : 1;
387 unsigned int spu1_intr2 : 1;
388 unsigned int dummy3 : 6;
389 unsigned int spu0_intr3 : 1;
390 unsigned int spu1_intr3 : 1;
391 unsigned int dummy4 : 6;
392} reg_iop_sw_mpu_rw_ack_intr_grp0;
393#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp0 100
394#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp0 100
395
396/* Register r_intr_grp0, scope iop_sw_mpu, type r */
397typedef struct {
398 unsigned int spu0_intr0 : 1;
399 unsigned int spu1_intr0 : 1;
400 unsigned int trigger_grp0 : 1;
401 unsigned int trigger_grp4 : 1;
402 unsigned int timer_grp0 : 1;
403 unsigned int fifo_out0 : 1;
404 unsigned int fifo_out0_extra : 1;
405 unsigned int dmc_out0 : 1;
406 unsigned int spu0_intr1 : 1;
407 unsigned int spu1_intr1 : 1;
408 unsigned int trigger_grp1 : 1;
409 unsigned int trigger_grp5 : 1;
410 unsigned int timer_grp1 : 1;
411 unsigned int fifo_in0 : 1;
412 unsigned int fifo_in0_extra : 1;
413 unsigned int dmc_in0 : 1;
414 unsigned int spu0_intr2 : 1;
415 unsigned int spu1_intr2 : 1;
416 unsigned int trigger_grp2 : 1;
417 unsigned int trigger_grp6 : 1;
418 unsigned int timer_grp2 : 1;
419 unsigned int fifo_out1 : 1;
420 unsigned int fifo_out1_extra : 1;
421 unsigned int dmc_out1 : 1;
422 unsigned int spu0_intr3 : 1;
423 unsigned int spu1_intr3 : 1;
424 unsigned int trigger_grp3 : 1;
425 unsigned int trigger_grp7 : 1;
426 unsigned int timer_grp3 : 1;
427 unsigned int fifo_in1 : 1;
428 unsigned int fifo_in1_extra : 1;
429 unsigned int dmc_in1 : 1;
430} reg_iop_sw_mpu_r_intr_grp0;
431#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp0 104
432
433/* Register r_masked_intr_grp0, scope iop_sw_mpu, type r */
434typedef struct {
435 unsigned int spu0_intr0 : 1;
436 unsigned int spu1_intr0 : 1;
437 unsigned int trigger_grp0 : 1;
438 unsigned int trigger_grp4 : 1;
439 unsigned int timer_grp0 : 1;
440 unsigned int fifo_out0 : 1;
441 unsigned int fifo_out0_extra : 1;
442 unsigned int dmc_out0 : 1;
443 unsigned int spu0_intr1 : 1;
444 unsigned int spu1_intr1 : 1;
445 unsigned int trigger_grp1 : 1;
446 unsigned int trigger_grp5 : 1;
447 unsigned int timer_grp1 : 1;
448 unsigned int fifo_in0 : 1;
449 unsigned int fifo_in0_extra : 1;
450 unsigned int dmc_in0 : 1;
451 unsigned int spu0_intr2 : 1;
452 unsigned int spu1_intr2 : 1;
453 unsigned int trigger_grp2 : 1;
454 unsigned int trigger_grp6 : 1;
455 unsigned int timer_grp2 : 1;
456 unsigned int fifo_out1 : 1;
457 unsigned int fifo_out1_extra : 1;
458 unsigned int dmc_out1 : 1;
459 unsigned int spu0_intr3 : 1;
460 unsigned int spu1_intr3 : 1;
461 unsigned int trigger_grp3 : 1;
462 unsigned int trigger_grp7 : 1;
463 unsigned int timer_grp3 : 1;
464 unsigned int fifo_in1 : 1;
465 unsigned int fifo_in1_extra : 1;
466 unsigned int dmc_in1 : 1;
467} reg_iop_sw_mpu_r_masked_intr_grp0;
468#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp0 108
469
470/* Register rw_intr_grp1_mask, scope iop_sw_mpu, type rw */
471typedef struct {
472 unsigned int spu0_intr4 : 1;
473 unsigned int spu1_intr4 : 1;
474 unsigned int trigger_grp0 : 1;
475 unsigned int trigger_grp5 : 1;
476 unsigned int timer_grp0 : 1;
477 unsigned int fifo_in0 : 1;
478 unsigned int fifo_in0_extra : 1;
479 unsigned int dmc_out0 : 1;
480 unsigned int spu0_intr5 : 1;
481 unsigned int spu1_intr5 : 1;
482 unsigned int trigger_grp1 : 1;
483 unsigned int trigger_grp6 : 1;
484 unsigned int timer_grp1 : 1;
485 unsigned int fifo_out1 : 1;
486 unsigned int fifo_out0_extra : 1;
487 unsigned int dmc_in0 : 1;
488 unsigned int spu0_intr6 : 1;
489 unsigned int spu1_intr6 : 1;
490 unsigned int trigger_grp2 : 1;
491 unsigned int trigger_grp7 : 1;
492 unsigned int timer_grp2 : 1;
493 unsigned int fifo_in1 : 1;
494 unsigned int fifo_in1_extra : 1;
495 unsigned int dmc_out1 : 1;
496 unsigned int spu0_intr7 : 1;
497 unsigned int spu1_intr7 : 1;
498 unsigned int trigger_grp3 : 1;
499 unsigned int trigger_grp4 : 1;
500 unsigned int timer_grp3 : 1;
501 unsigned int fifo_out0 : 1;
502 unsigned int fifo_out1_extra : 1;
503 unsigned int dmc_in1 : 1;
504} reg_iop_sw_mpu_rw_intr_grp1_mask;
505#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp1_mask 112
506#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp1_mask 112
507
508/* Register rw_ack_intr_grp1, scope iop_sw_mpu, type rw */
509typedef struct {
510 unsigned int spu0_intr4 : 1;
511 unsigned int spu1_intr4 : 1;
512 unsigned int dummy1 : 6;
513 unsigned int spu0_intr5 : 1;
514 unsigned int spu1_intr5 : 1;
515 unsigned int dummy2 : 6;
516 unsigned int spu0_intr6 : 1;
517 unsigned int spu1_intr6 : 1;
518 unsigned int dummy3 : 6;
519 unsigned int spu0_intr7 : 1;
520 unsigned int spu1_intr7 : 1;
521 unsigned int dummy4 : 6;
522} reg_iop_sw_mpu_rw_ack_intr_grp1;
523#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp1 116
524#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp1 116
525
526/* Register r_intr_grp1, scope iop_sw_mpu, type r */
527typedef struct {
528 unsigned int spu0_intr4 : 1;
529 unsigned int spu1_intr4 : 1;
530 unsigned int trigger_grp0 : 1;
531 unsigned int trigger_grp5 : 1;
532 unsigned int timer_grp0 : 1;
533 unsigned int fifo_in0 : 1;
534 unsigned int fifo_in0_extra : 1;
535 unsigned int dmc_out0 : 1;
536 unsigned int spu0_intr5 : 1;
537 unsigned int spu1_intr5 : 1;
538 unsigned int trigger_grp1 : 1;
539 unsigned int trigger_grp6 : 1;
540 unsigned int timer_grp1 : 1;
541 unsigned int fifo_out1 : 1;
542 unsigned int fifo_out0_extra : 1;
543 unsigned int dmc_in0 : 1;
544 unsigned int spu0_intr6 : 1;
545 unsigned int spu1_intr6 : 1;
546 unsigned int trigger_grp2 : 1;
547 unsigned int trigger_grp7 : 1;
548 unsigned int timer_grp2 : 1;
549 unsigned int fifo_in1 : 1;
550 unsigned int fifo_in1_extra : 1;
551 unsigned int dmc_out1 : 1;
552 unsigned int spu0_intr7 : 1;
553 unsigned int spu1_intr7 : 1;
554 unsigned int trigger_grp3 : 1;
555 unsigned int trigger_grp4 : 1;
556 unsigned int timer_grp3 : 1;
557 unsigned int fifo_out0 : 1;
558 unsigned int fifo_out1_extra : 1;
559 unsigned int dmc_in1 : 1;
560} reg_iop_sw_mpu_r_intr_grp1;
561#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp1 120
562
563/* Register r_masked_intr_grp1, scope iop_sw_mpu, type r */
564typedef struct {
565 unsigned int spu0_intr4 : 1;
566 unsigned int spu1_intr4 : 1;
567 unsigned int trigger_grp0 : 1;
568 unsigned int trigger_grp5 : 1;
569 unsigned int timer_grp0 : 1;
570 unsigned int fifo_in0 : 1;
571 unsigned int fifo_in0_extra : 1;
572 unsigned int dmc_out0 : 1;
573 unsigned int spu0_intr5 : 1;
574 unsigned int spu1_intr5 : 1;
575 unsigned int trigger_grp1 : 1;
576 unsigned int trigger_grp6 : 1;
577 unsigned int timer_grp1 : 1;
578 unsigned int fifo_out1 : 1;
579 unsigned int fifo_out0_extra : 1;
580 unsigned int dmc_in0 : 1;
581 unsigned int spu0_intr6 : 1;
582 unsigned int spu1_intr6 : 1;
583 unsigned int trigger_grp2 : 1;
584 unsigned int trigger_grp7 : 1;
585 unsigned int timer_grp2 : 1;
586 unsigned int fifo_in1 : 1;
587 unsigned int fifo_in1_extra : 1;
588 unsigned int dmc_out1 : 1;
589 unsigned int spu0_intr7 : 1;
590 unsigned int spu1_intr7 : 1;
591 unsigned int trigger_grp3 : 1;
592 unsigned int trigger_grp4 : 1;
593 unsigned int timer_grp3 : 1;
594 unsigned int fifo_out0 : 1;
595 unsigned int fifo_out1_extra : 1;
596 unsigned int dmc_in1 : 1;
597} reg_iop_sw_mpu_r_masked_intr_grp1;
598#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp1 124
599
600/* Register rw_intr_grp2_mask, scope iop_sw_mpu, type rw */
601typedef struct {
602 unsigned int spu0_intr8 : 1;
603 unsigned int spu1_intr8 : 1;
604 unsigned int trigger_grp0 : 1;
605 unsigned int trigger_grp6 : 1;
606 unsigned int timer_grp0 : 1;
607 unsigned int fifo_out1 : 1;
608 unsigned int fifo_out1_extra : 1;
609 unsigned int dmc_out0 : 1;
610 unsigned int spu0_intr9 : 1;
611 unsigned int spu1_intr9 : 1;
612 unsigned int trigger_grp1 : 1;
613 unsigned int trigger_grp7 : 1;
614 unsigned int timer_grp1 : 1;
615 unsigned int fifo_in1 : 1;
616 unsigned int fifo_in1_extra : 1;
617 unsigned int dmc_in0 : 1;
618 unsigned int spu0_intr10 : 1;
619 unsigned int spu1_intr10 : 1;
620 unsigned int trigger_grp2 : 1;
621 unsigned int trigger_grp4 : 1;
622 unsigned int timer_grp2 : 1;
623 unsigned int fifo_out0 : 1;
624 unsigned int fifo_out0_extra : 1;
625 unsigned int dmc_out1 : 1;
626 unsigned int spu0_intr11 : 1;
627 unsigned int spu1_intr11 : 1;
628 unsigned int trigger_grp3 : 1;
629 unsigned int trigger_grp5 : 1;
630 unsigned int timer_grp3 : 1;
631 unsigned int fifo_in0 : 1;
632 unsigned int fifo_in0_extra : 1;
633 unsigned int dmc_in1 : 1;
634} reg_iop_sw_mpu_rw_intr_grp2_mask;
635#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp2_mask 128
636#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp2_mask 128
637
638/* Register rw_ack_intr_grp2, scope iop_sw_mpu, type rw */
639typedef struct {
640 unsigned int spu0_intr8 : 1;
641 unsigned int spu1_intr8 : 1;
642 unsigned int dummy1 : 6;
643 unsigned int spu0_intr9 : 1;
644 unsigned int spu1_intr9 : 1;
645 unsigned int dummy2 : 6;
646 unsigned int spu0_intr10 : 1;
647 unsigned int spu1_intr10 : 1;
648 unsigned int dummy3 : 6;
649 unsigned int spu0_intr11 : 1;
650 unsigned int spu1_intr11 : 1;
651 unsigned int dummy4 : 6;
652} reg_iop_sw_mpu_rw_ack_intr_grp2;
653#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp2 132
654#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp2 132
655
656/* Register r_intr_grp2, scope iop_sw_mpu, type r */
657typedef struct {
658 unsigned int spu0_intr8 : 1;
659 unsigned int spu1_intr8 : 1;
660 unsigned int trigger_grp0 : 1;
661 unsigned int trigger_grp6 : 1;
662 unsigned int timer_grp0 : 1;
663 unsigned int fifo_out1 : 1;
664 unsigned int fifo_out1_extra : 1;
665 unsigned int dmc_out0 : 1;
666 unsigned int spu0_intr9 : 1;
667 unsigned int spu1_intr9 : 1;
668 unsigned int trigger_grp1 : 1;
669 unsigned int trigger_grp7 : 1;
670 unsigned int timer_grp1 : 1;
671 unsigned int fifo_in1 : 1;
672 unsigned int fifo_in1_extra : 1;
673 unsigned int dmc_in0 : 1;
674 unsigned int spu0_intr10 : 1;
675 unsigned int spu1_intr10 : 1;
676 unsigned int trigger_grp2 : 1;
677 unsigned int trigger_grp4 : 1;
678 unsigned int timer_grp2 : 1;
679 unsigned int fifo_out0 : 1;
680 unsigned int fifo_out0_extra : 1;
681 unsigned int dmc_out1 : 1;
682 unsigned int spu0_intr11 : 1;
683 unsigned int spu1_intr11 : 1;
684 unsigned int trigger_grp3 : 1;
685 unsigned int trigger_grp5 : 1;
686 unsigned int timer_grp3 : 1;
687 unsigned int fifo_in0 : 1;
688 unsigned int fifo_in0_extra : 1;
689 unsigned int dmc_in1 : 1;
690} reg_iop_sw_mpu_r_intr_grp2;
691#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp2 136
692
693/* Register r_masked_intr_grp2, scope iop_sw_mpu, type r */
694typedef struct {
695 unsigned int spu0_intr8 : 1;
696 unsigned int spu1_intr8 : 1;
697 unsigned int trigger_grp0 : 1;
698 unsigned int trigger_grp6 : 1;
699 unsigned int timer_grp0 : 1;
700 unsigned int fifo_out1 : 1;
701 unsigned int fifo_out1_extra : 1;
702 unsigned int dmc_out0 : 1;
703 unsigned int spu0_intr9 : 1;
704 unsigned int spu1_intr9 : 1;
705 unsigned int trigger_grp1 : 1;
706 unsigned int trigger_grp7 : 1;
707 unsigned int timer_grp1 : 1;
708 unsigned int fifo_in1 : 1;
709 unsigned int fifo_in1_extra : 1;
710 unsigned int dmc_in0 : 1;
711 unsigned int spu0_intr10 : 1;
712 unsigned int spu1_intr10 : 1;
713 unsigned int trigger_grp2 : 1;
714 unsigned int trigger_grp4 : 1;
715 unsigned int timer_grp2 : 1;
716 unsigned int fifo_out0 : 1;
717 unsigned int fifo_out0_extra : 1;
718 unsigned int dmc_out1 : 1;
719 unsigned int spu0_intr11 : 1;
720 unsigned int spu1_intr11 : 1;
721 unsigned int trigger_grp3 : 1;
722 unsigned int trigger_grp5 : 1;
723 unsigned int timer_grp3 : 1;
724 unsigned int fifo_in0 : 1;
725 unsigned int fifo_in0_extra : 1;
726 unsigned int dmc_in1 : 1;
727} reg_iop_sw_mpu_r_masked_intr_grp2;
728#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp2 140
729
730/* Register rw_intr_grp3_mask, scope iop_sw_mpu, type rw */
731typedef struct {
732 unsigned int spu0_intr12 : 1;
733 unsigned int spu1_intr12 : 1;
734 unsigned int trigger_grp0 : 1;
735 unsigned int trigger_grp7 : 1;
736 unsigned int timer_grp0 : 1;
737 unsigned int fifo_in1 : 1;
738 unsigned int fifo_in1_extra : 1;
739 unsigned int dmc_out0 : 1;
740 unsigned int spu0_intr13 : 1;
741 unsigned int spu1_intr13 : 1;
742 unsigned int trigger_grp1 : 1;
743 unsigned int trigger_grp4 : 1;
744 unsigned int timer_grp1 : 1;
745 unsigned int fifo_out0 : 1;
746 unsigned int fifo_out0_extra : 1;
747 unsigned int dmc_in0 : 1;
748 unsigned int spu0_intr14 : 1;
749 unsigned int spu1_intr14 : 1;
750 unsigned int trigger_grp2 : 1;
751 unsigned int trigger_grp5 : 1;
752 unsigned int timer_grp2 : 1;
753 unsigned int fifo_in0 : 1;
754 unsigned int fifo_in0_extra : 1;
755 unsigned int dmc_out1 : 1;
756 unsigned int spu0_intr15 : 1;
757 unsigned int spu1_intr15 : 1;
758 unsigned int trigger_grp3 : 1;
759 unsigned int trigger_grp6 : 1;
760 unsigned int timer_grp3 : 1;
761 unsigned int fifo_out1 : 1;
762 unsigned int fifo_out1_extra : 1;
763 unsigned int dmc_in1 : 1;
764} reg_iop_sw_mpu_rw_intr_grp3_mask;
765#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp3_mask 144
766#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp3_mask 144
767
768/* Register rw_ack_intr_grp3, scope iop_sw_mpu, type rw */
769typedef struct {
770 unsigned int spu0_intr12 : 1;
771 unsigned int spu1_intr12 : 1;
772 unsigned int dummy1 : 6;
773 unsigned int spu0_intr13 : 1;
774 unsigned int spu1_intr13 : 1;
775 unsigned int dummy2 : 6;
776 unsigned int spu0_intr14 : 1;
777 unsigned int spu1_intr14 : 1;
778 unsigned int dummy3 : 6;
779 unsigned int spu0_intr15 : 1;
780 unsigned int spu1_intr15 : 1;
781 unsigned int dummy4 : 6;
782} reg_iop_sw_mpu_rw_ack_intr_grp3;
783#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp3 148
784#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp3 148
785
786/* Register r_intr_grp3, scope iop_sw_mpu, type r */
787typedef struct {
788 unsigned int spu0_intr12 : 1;
789 unsigned int spu1_intr12 : 1;
790 unsigned int trigger_grp0 : 1;
791 unsigned int trigger_grp7 : 1;
792 unsigned int timer_grp0 : 1;
793 unsigned int fifo_in1 : 1;
794 unsigned int fifo_in1_extra : 1;
795 unsigned int dmc_out0 : 1;
796 unsigned int spu0_intr13 : 1;
797 unsigned int spu1_intr13 : 1;
798 unsigned int trigger_grp1 : 1;
799 unsigned int trigger_grp4 : 1;
800 unsigned int timer_grp1 : 1;
801 unsigned int fifo_out0 : 1;
802 unsigned int fifo_out0_extra : 1;
803 unsigned int dmc_in0 : 1;
804 unsigned int spu0_intr14 : 1;
805 unsigned int spu1_intr14 : 1;
806 unsigned int trigger_grp2 : 1;
807 unsigned int trigger_grp5 : 1;
808 unsigned int timer_grp2 : 1;
809 unsigned int fifo_in0 : 1;
810 unsigned int fifo_in0_extra : 1;
811 unsigned int dmc_out1 : 1;
812 unsigned int spu0_intr15 : 1;
813 unsigned int spu1_intr15 : 1;
814 unsigned int trigger_grp3 : 1;
815 unsigned int trigger_grp6 : 1;
816 unsigned int timer_grp3 : 1;
817 unsigned int fifo_out1 : 1;
818 unsigned int fifo_out1_extra : 1;
819 unsigned int dmc_in1 : 1;
820} reg_iop_sw_mpu_r_intr_grp3;
821#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp3 152
822
823/* Register r_masked_intr_grp3, scope iop_sw_mpu, type r */
824typedef struct {
825 unsigned int spu0_intr12 : 1;
826 unsigned int spu1_intr12 : 1;
827 unsigned int trigger_grp0 : 1;
828 unsigned int trigger_grp7 : 1;
829 unsigned int timer_grp0 : 1;
830 unsigned int fifo_in1 : 1;
831 unsigned int fifo_in1_extra : 1;
832 unsigned int dmc_out0 : 1;
833 unsigned int spu0_intr13 : 1;
834 unsigned int spu1_intr13 : 1;
835 unsigned int trigger_grp1 : 1;
836 unsigned int trigger_grp4 : 1;
837 unsigned int timer_grp1 : 1;
838 unsigned int fifo_out0 : 1;
839 unsigned int fifo_out0_extra : 1;
840 unsigned int dmc_in0 : 1;
841 unsigned int spu0_intr14 : 1;
842 unsigned int spu1_intr14 : 1;
843 unsigned int trigger_grp2 : 1;
844 unsigned int trigger_grp5 : 1;
845 unsigned int timer_grp2 : 1;
846 unsigned int fifo_in0 : 1;
847 unsigned int fifo_in0_extra : 1;
848 unsigned int dmc_out1 : 1;
849 unsigned int spu0_intr15 : 1;
850 unsigned int spu1_intr15 : 1;
851 unsigned int trigger_grp3 : 1;
852 unsigned int trigger_grp6 : 1;
853 unsigned int timer_grp3 : 1;
854 unsigned int fifo_out1 : 1;
855 unsigned int fifo_out1_extra : 1;
856 unsigned int dmc_in1 : 1;
857} reg_iop_sw_mpu_r_masked_intr_grp3;
858#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp3 156
859
860
861/* Constants */
862enum {
863 regk_iop_sw_mpu_copy = 0x00000000,
864 regk_iop_sw_mpu_cpu = 0x00000000,
865 regk_iop_sw_mpu_mpu = 0x00000001,
866 regk_iop_sw_mpu_no = 0x00000000,
867 regk_iop_sw_mpu_nop = 0x00000000,
868 regk_iop_sw_mpu_rd = 0x00000002,
869 regk_iop_sw_mpu_reg_copy = 0x00000001,
870 regk_iop_sw_mpu_rw_bus0_clr_mask_default = 0x00000000,
871 regk_iop_sw_mpu_rw_bus0_oe_clr_mask_default = 0x00000000,
872 regk_iop_sw_mpu_rw_bus0_oe_set_mask_default = 0x00000000,
873 regk_iop_sw_mpu_rw_bus0_set_mask_default = 0x00000000,
874 regk_iop_sw_mpu_rw_bus1_clr_mask_default = 0x00000000,
875 regk_iop_sw_mpu_rw_bus1_oe_clr_mask_default = 0x00000000,
876 regk_iop_sw_mpu_rw_bus1_oe_set_mask_default = 0x00000000,
877 regk_iop_sw_mpu_rw_bus1_set_mask_default = 0x00000000,
878 regk_iop_sw_mpu_rw_gio_clr_mask_default = 0x00000000,
879 regk_iop_sw_mpu_rw_gio_oe_clr_mask_default = 0x00000000,
880 regk_iop_sw_mpu_rw_gio_oe_set_mask_default = 0x00000000,
881 regk_iop_sw_mpu_rw_gio_set_mask_default = 0x00000000,
882 regk_iop_sw_mpu_rw_intr_grp0_mask_default = 0x00000000,
883 regk_iop_sw_mpu_rw_intr_grp1_mask_default = 0x00000000,
884 regk_iop_sw_mpu_rw_intr_grp2_mask_default = 0x00000000,
885 regk_iop_sw_mpu_rw_intr_grp3_mask_default = 0x00000000,
886 regk_iop_sw_mpu_rw_sw_cfg_owner_default = 0x00000000,
887 regk_iop_sw_mpu_set = 0x00000001,
888 regk_iop_sw_mpu_spu0 = 0x00000002,
889 regk_iop_sw_mpu_spu1 = 0x00000003,
890 regk_iop_sw_mpu_wr = 0x00000003,
891 regk_iop_sw_mpu_yes = 0x00000001
892};
893#endif /* __iop_sw_mpu_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_spu_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_sw_spu_defs.h
deleted file mode 100644
index b59dde4bd0d1..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_sw_spu_defs.h
+++ /dev/null
@@ -1,552 +0,0 @@
1#ifndef __iop_sw_spu_defs_h
2#define __iop_sw_spu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_sw_spu.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:10:19 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_sw_spu_defs.h ../../inst/io_proc/rtl/guinness/iop_sw_spu.r
11 * id: $Id: iop_sw_spu_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_sw_spu */
86
87/* Register rw_mc_ctrl, scope iop_sw_spu, type rw */
88typedef struct {
89 unsigned int keep_owner : 1;
90 unsigned int cmd : 2;
91 unsigned int size : 3;
92 unsigned int wr_spu0_mem : 1;
93 unsigned int wr_spu1_mem : 1;
94 unsigned int dummy1 : 24;
95} reg_iop_sw_spu_rw_mc_ctrl;
96#define REG_RD_ADDR_iop_sw_spu_rw_mc_ctrl 0
97#define REG_WR_ADDR_iop_sw_spu_rw_mc_ctrl 0
98
99/* Register rw_mc_data, scope iop_sw_spu, type rw */
100typedef struct {
101 unsigned int val : 32;
102} reg_iop_sw_spu_rw_mc_data;
103#define REG_RD_ADDR_iop_sw_spu_rw_mc_data 4
104#define REG_WR_ADDR_iop_sw_spu_rw_mc_data 4
105
106/* Register rw_mc_addr, scope iop_sw_spu, type rw */
107typedef unsigned int reg_iop_sw_spu_rw_mc_addr;
108#define REG_RD_ADDR_iop_sw_spu_rw_mc_addr 8
109#define REG_WR_ADDR_iop_sw_spu_rw_mc_addr 8
110
111/* Register rs_mc_data, scope iop_sw_spu, type rs */
112typedef unsigned int reg_iop_sw_spu_rs_mc_data;
113#define REG_RD_ADDR_iop_sw_spu_rs_mc_data 12
114
115/* Register r_mc_data, scope iop_sw_spu, type r */
116typedef unsigned int reg_iop_sw_spu_r_mc_data;
117#define REG_RD_ADDR_iop_sw_spu_r_mc_data 16
118
119/* Register r_mc_stat, scope iop_sw_spu, type r */
120typedef struct {
121 unsigned int busy_cpu : 1;
122 unsigned int busy_mpu : 1;
123 unsigned int busy_spu0 : 1;
124 unsigned int busy_spu1 : 1;
125 unsigned int owned_by_cpu : 1;
126 unsigned int owned_by_mpu : 1;
127 unsigned int owned_by_spu0 : 1;
128 unsigned int owned_by_spu1 : 1;
129 unsigned int dummy1 : 24;
130} reg_iop_sw_spu_r_mc_stat;
131#define REG_RD_ADDR_iop_sw_spu_r_mc_stat 20
132
133/* Register rw_bus0_clr_mask, scope iop_sw_spu, type rw */
134typedef struct {
135 unsigned int byte0 : 8;
136 unsigned int byte1 : 8;
137 unsigned int byte2 : 8;
138 unsigned int byte3 : 8;
139} reg_iop_sw_spu_rw_bus0_clr_mask;
140#define REG_RD_ADDR_iop_sw_spu_rw_bus0_clr_mask 24
141#define REG_WR_ADDR_iop_sw_spu_rw_bus0_clr_mask 24
142
143/* Register rw_bus0_set_mask, scope iop_sw_spu, type rw */
144typedef struct {
145 unsigned int byte0 : 8;
146 unsigned int byte1 : 8;
147 unsigned int byte2 : 8;
148 unsigned int byte3 : 8;
149} reg_iop_sw_spu_rw_bus0_set_mask;
150#define REG_RD_ADDR_iop_sw_spu_rw_bus0_set_mask 28
151#define REG_WR_ADDR_iop_sw_spu_rw_bus0_set_mask 28
152
153/* Register rw_bus0_oe_clr_mask, scope iop_sw_spu, type rw */
154typedef struct {
155 unsigned int byte0 : 1;
156 unsigned int byte1 : 1;
157 unsigned int byte2 : 1;
158 unsigned int byte3 : 1;
159 unsigned int dummy1 : 28;
160} reg_iop_sw_spu_rw_bus0_oe_clr_mask;
161#define REG_RD_ADDR_iop_sw_spu_rw_bus0_oe_clr_mask 32
162#define REG_WR_ADDR_iop_sw_spu_rw_bus0_oe_clr_mask 32
163
164/* Register rw_bus0_oe_set_mask, scope iop_sw_spu, type rw */
165typedef struct {
166 unsigned int byte0 : 1;
167 unsigned int byte1 : 1;
168 unsigned int byte2 : 1;
169 unsigned int byte3 : 1;
170 unsigned int dummy1 : 28;
171} reg_iop_sw_spu_rw_bus0_oe_set_mask;
172#define REG_RD_ADDR_iop_sw_spu_rw_bus0_oe_set_mask 36
173#define REG_WR_ADDR_iop_sw_spu_rw_bus0_oe_set_mask 36
174
175/* Register r_bus0_in, scope iop_sw_spu, type r */
176typedef unsigned int reg_iop_sw_spu_r_bus0_in;
177#define REG_RD_ADDR_iop_sw_spu_r_bus0_in 40
178
179/* Register rw_bus1_clr_mask, scope iop_sw_spu, type rw */
180typedef struct {
181 unsigned int byte0 : 8;
182 unsigned int byte1 : 8;
183 unsigned int byte2 : 8;
184 unsigned int byte3 : 8;
185} reg_iop_sw_spu_rw_bus1_clr_mask;
186#define REG_RD_ADDR_iop_sw_spu_rw_bus1_clr_mask 44
187#define REG_WR_ADDR_iop_sw_spu_rw_bus1_clr_mask 44
188
189/* Register rw_bus1_set_mask, scope iop_sw_spu, type rw */
190typedef struct {
191 unsigned int byte0 : 8;
192 unsigned int byte1 : 8;
193 unsigned int byte2 : 8;
194 unsigned int byte3 : 8;
195} reg_iop_sw_spu_rw_bus1_set_mask;
196#define REG_RD_ADDR_iop_sw_spu_rw_bus1_set_mask 48
197#define REG_WR_ADDR_iop_sw_spu_rw_bus1_set_mask 48
198
199/* Register rw_bus1_oe_clr_mask, scope iop_sw_spu, type rw */
200typedef struct {
201 unsigned int byte0 : 1;
202 unsigned int byte1 : 1;
203 unsigned int byte2 : 1;
204 unsigned int byte3 : 1;
205 unsigned int dummy1 : 28;
206} reg_iop_sw_spu_rw_bus1_oe_clr_mask;
207#define REG_RD_ADDR_iop_sw_spu_rw_bus1_oe_clr_mask 52
208#define REG_WR_ADDR_iop_sw_spu_rw_bus1_oe_clr_mask 52
209
210/* Register rw_bus1_oe_set_mask, scope iop_sw_spu, type rw */
211typedef struct {
212 unsigned int byte0 : 1;
213 unsigned int byte1 : 1;
214 unsigned int byte2 : 1;
215 unsigned int byte3 : 1;
216 unsigned int dummy1 : 28;
217} reg_iop_sw_spu_rw_bus1_oe_set_mask;
218#define REG_RD_ADDR_iop_sw_spu_rw_bus1_oe_set_mask 56
219#define REG_WR_ADDR_iop_sw_spu_rw_bus1_oe_set_mask 56
220
221/* Register r_bus1_in, scope iop_sw_spu, type r */
222typedef unsigned int reg_iop_sw_spu_r_bus1_in;
223#define REG_RD_ADDR_iop_sw_spu_r_bus1_in 60
224
225/* Register rw_gio_clr_mask, scope iop_sw_spu, type rw */
226typedef struct {
227 unsigned int val : 32;
228} reg_iop_sw_spu_rw_gio_clr_mask;
229#define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask 64
230#define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask 64
231
232/* Register rw_gio_set_mask, scope iop_sw_spu, type rw */
233typedef struct {
234 unsigned int val : 32;
235} reg_iop_sw_spu_rw_gio_set_mask;
236#define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask 68
237#define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask 68
238
239/* Register rw_gio_oe_clr_mask, scope iop_sw_spu, type rw */
240typedef struct {
241 unsigned int val : 32;
242} reg_iop_sw_spu_rw_gio_oe_clr_mask;
243#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask 72
244#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask 72
245
246/* Register rw_gio_oe_set_mask, scope iop_sw_spu, type rw */
247typedef struct {
248 unsigned int val : 32;
249} reg_iop_sw_spu_rw_gio_oe_set_mask;
250#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask 76
251#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask 76
252
253/* Register r_gio_in, scope iop_sw_spu, type r */
254typedef unsigned int reg_iop_sw_spu_r_gio_in;
255#define REG_RD_ADDR_iop_sw_spu_r_gio_in 80
256
257/* Register rw_bus0_clr_mask_lo, scope iop_sw_spu, type rw */
258typedef struct {
259 unsigned int byte0 : 8;
260 unsigned int byte1 : 8;
261 unsigned int dummy1 : 16;
262} reg_iop_sw_spu_rw_bus0_clr_mask_lo;
263#define REG_RD_ADDR_iop_sw_spu_rw_bus0_clr_mask_lo 84
264#define REG_WR_ADDR_iop_sw_spu_rw_bus0_clr_mask_lo 84
265
266/* Register rw_bus0_clr_mask_hi, scope iop_sw_spu, type rw */
267typedef struct {
268 unsigned int byte2 : 8;
269 unsigned int byte3 : 8;
270 unsigned int dummy1 : 16;
271} reg_iop_sw_spu_rw_bus0_clr_mask_hi;
272#define REG_RD_ADDR_iop_sw_spu_rw_bus0_clr_mask_hi 88
273#define REG_WR_ADDR_iop_sw_spu_rw_bus0_clr_mask_hi 88
274
275/* Register rw_bus0_set_mask_lo, scope iop_sw_spu, type rw */
276typedef struct {
277 unsigned int byte0 : 8;
278 unsigned int byte1 : 8;
279 unsigned int dummy1 : 16;
280} reg_iop_sw_spu_rw_bus0_set_mask_lo;
281#define REG_RD_ADDR_iop_sw_spu_rw_bus0_set_mask_lo 92
282#define REG_WR_ADDR_iop_sw_spu_rw_bus0_set_mask_lo 92
283
284/* Register rw_bus0_set_mask_hi, scope iop_sw_spu, type rw */
285typedef struct {
286 unsigned int byte2 : 8;
287 unsigned int byte3 : 8;
288 unsigned int dummy1 : 16;
289} reg_iop_sw_spu_rw_bus0_set_mask_hi;
290#define REG_RD_ADDR_iop_sw_spu_rw_bus0_set_mask_hi 96
291#define REG_WR_ADDR_iop_sw_spu_rw_bus0_set_mask_hi 96
292
293/* Register rw_bus1_clr_mask_lo, scope iop_sw_spu, type rw */
294typedef struct {
295 unsigned int byte0 : 8;
296 unsigned int byte1 : 8;
297 unsigned int dummy1 : 16;
298} reg_iop_sw_spu_rw_bus1_clr_mask_lo;
299#define REG_RD_ADDR_iop_sw_spu_rw_bus1_clr_mask_lo 100
300#define REG_WR_ADDR_iop_sw_spu_rw_bus1_clr_mask_lo 100
301
302/* Register rw_bus1_clr_mask_hi, scope iop_sw_spu, type rw */
303typedef struct {
304 unsigned int byte2 : 8;
305 unsigned int byte3 : 8;
306 unsigned int dummy1 : 16;
307} reg_iop_sw_spu_rw_bus1_clr_mask_hi;
308#define REG_RD_ADDR_iop_sw_spu_rw_bus1_clr_mask_hi 104
309#define REG_WR_ADDR_iop_sw_spu_rw_bus1_clr_mask_hi 104
310
311/* Register rw_bus1_set_mask_lo, scope iop_sw_spu, type rw */
312typedef struct {
313 unsigned int byte0 : 8;
314 unsigned int byte1 : 8;
315 unsigned int dummy1 : 16;
316} reg_iop_sw_spu_rw_bus1_set_mask_lo;
317#define REG_RD_ADDR_iop_sw_spu_rw_bus1_set_mask_lo 108
318#define REG_WR_ADDR_iop_sw_spu_rw_bus1_set_mask_lo 108
319
320/* Register rw_bus1_set_mask_hi, scope iop_sw_spu, type rw */
321typedef struct {
322 unsigned int byte2 : 8;
323 unsigned int byte3 : 8;
324 unsigned int dummy1 : 16;
325} reg_iop_sw_spu_rw_bus1_set_mask_hi;
326#define REG_RD_ADDR_iop_sw_spu_rw_bus1_set_mask_hi 112
327#define REG_WR_ADDR_iop_sw_spu_rw_bus1_set_mask_hi 112
328
329/* Register rw_gio_clr_mask_lo, scope iop_sw_spu, type rw */
330typedef struct {
331 unsigned int val : 16;
332 unsigned int dummy1 : 16;
333} reg_iop_sw_spu_rw_gio_clr_mask_lo;
334#define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask_lo 116
335#define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask_lo 116
336
337/* Register rw_gio_clr_mask_hi, scope iop_sw_spu, type rw */
338typedef struct {
339 unsigned int val : 16;
340 unsigned int dummy1 : 16;
341} reg_iop_sw_spu_rw_gio_clr_mask_hi;
342#define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask_hi 120
343#define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask_hi 120
344
345/* Register rw_gio_set_mask_lo, scope iop_sw_spu, type rw */
346typedef struct {
347 unsigned int val : 16;
348 unsigned int dummy1 : 16;
349} reg_iop_sw_spu_rw_gio_set_mask_lo;
350#define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask_lo 124
351#define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask_lo 124
352
353/* Register rw_gio_set_mask_hi, scope iop_sw_spu, type rw */
354typedef struct {
355 unsigned int val : 16;
356 unsigned int dummy1 : 16;
357} reg_iop_sw_spu_rw_gio_set_mask_hi;
358#define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask_hi 128
359#define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask_hi 128
360
361/* Register rw_gio_oe_clr_mask_lo, scope iop_sw_spu, type rw */
362typedef struct {
363 unsigned int val : 16;
364 unsigned int dummy1 : 16;
365} reg_iop_sw_spu_rw_gio_oe_clr_mask_lo;
366#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_lo 132
367#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_lo 132
368
369/* Register rw_gio_oe_clr_mask_hi, scope iop_sw_spu, type rw */
370typedef struct {
371 unsigned int val : 16;
372 unsigned int dummy1 : 16;
373} reg_iop_sw_spu_rw_gio_oe_clr_mask_hi;
374#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_hi 136
375#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_hi 136
376
377/* Register rw_gio_oe_set_mask_lo, scope iop_sw_spu, type rw */
378typedef struct {
379 unsigned int val : 16;
380 unsigned int dummy1 : 16;
381} reg_iop_sw_spu_rw_gio_oe_set_mask_lo;
382#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask_lo 140
383#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask_lo 140
384
385/* Register rw_gio_oe_set_mask_hi, scope iop_sw_spu, type rw */
386typedef struct {
387 unsigned int val : 16;
388 unsigned int dummy1 : 16;
389} reg_iop_sw_spu_rw_gio_oe_set_mask_hi;
390#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask_hi 144
391#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask_hi 144
392
393/* Register rw_cpu_intr, scope iop_sw_spu, type rw */
394typedef struct {
395 unsigned int intr0 : 1;
396 unsigned int intr1 : 1;
397 unsigned int intr2 : 1;
398 unsigned int intr3 : 1;
399 unsigned int intr4 : 1;
400 unsigned int intr5 : 1;
401 unsigned int intr6 : 1;
402 unsigned int intr7 : 1;
403 unsigned int intr8 : 1;
404 unsigned int intr9 : 1;
405 unsigned int intr10 : 1;
406 unsigned int intr11 : 1;
407 unsigned int intr12 : 1;
408 unsigned int intr13 : 1;
409 unsigned int intr14 : 1;
410 unsigned int intr15 : 1;
411 unsigned int dummy1 : 16;
412} reg_iop_sw_spu_rw_cpu_intr;
413#define REG_RD_ADDR_iop_sw_spu_rw_cpu_intr 148
414#define REG_WR_ADDR_iop_sw_spu_rw_cpu_intr 148
415
416/* Register r_cpu_intr, scope iop_sw_spu, type r */
417typedef struct {
418 unsigned int intr0 : 1;
419 unsigned int intr1 : 1;
420 unsigned int intr2 : 1;
421 unsigned int intr3 : 1;
422 unsigned int intr4 : 1;
423 unsigned int intr5 : 1;
424 unsigned int intr6 : 1;
425 unsigned int intr7 : 1;
426 unsigned int intr8 : 1;
427 unsigned int intr9 : 1;
428 unsigned int intr10 : 1;
429 unsigned int intr11 : 1;
430 unsigned int intr12 : 1;
431 unsigned int intr13 : 1;
432 unsigned int intr14 : 1;
433 unsigned int intr15 : 1;
434 unsigned int dummy1 : 16;
435} reg_iop_sw_spu_r_cpu_intr;
436#define REG_RD_ADDR_iop_sw_spu_r_cpu_intr 152
437
438/* Register r_hw_intr, scope iop_sw_spu, type r */
439typedef struct {
440 unsigned int trigger_grp0 : 1;
441 unsigned int trigger_grp1 : 1;
442 unsigned int trigger_grp2 : 1;
443 unsigned int trigger_grp3 : 1;
444 unsigned int trigger_grp4 : 1;
445 unsigned int trigger_grp5 : 1;
446 unsigned int trigger_grp6 : 1;
447 unsigned int trigger_grp7 : 1;
448 unsigned int timer_grp0 : 1;
449 unsigned int timer_grp1 : 1;
450 unsigned int timer_grp2 : 1;
451 unsigned int timer_grp3 : 1;
452 unsigned int fifo_out0 : 1;
453 unsigned int fifo_out0_extra : 1;
454 unsigned int fifo_in0 : 1;
455 unsigned int fifo_in0_extra : 1;
456 unsigned int fifo_out1 : 1;
457 unsigned int fifo_out1_extra : 1;
458 unsigned int fifo_in1 : 1;
459 unsigned int fifo_in1_extra : 1;
460 unsigned int dmc_out0 : 1;
461 unsigned int dmc_in0 : 1;
462 unsigned int dmc_out1 : 1;
463 unsigned int dmc_in1 : 1;
464 unsigned int dummy1 : 8;
465} reg_iop_sw_spu_r_hw_intr;
466#define REG_RD_ADDR_iop_sw_spu_r_hw_intr 156
467
468/* Register rw_mpu_intr, scope iop_sw_spu, type rw */
469typedef struct {
470 unsigned int intr0 : 1;
471 unsigned int intr1 : 1;
472 unsigned int intr2 : 1;
473 unsigned int intr3 : 1;
474 unsigned int intr4 : 1;
475 unsigned int intr5 : 1;
476 unsigned int intr6 : 1;
477 unsigned int intr7 : 1;
478 unsigned int intr8 : 1;
479 unsigned int intr9 : 1;
480 unsigned int intr10 : 1;
481 unsigned int intr11 : 1;
482 unsigned int intr12 : 1;
483 unsigned int intr13 : 1;
484 unsigned int intr14 : 1;
485 unsigned int intr15 : 1;
486 unsigned int dummy1 : 16;
487} reg_iop_sw_spu_rw_mpu_intr;
488#define REG_RD_ADDR_iop_sw_spu_rw_mpu_intr 160
489#define REG_WR_ADDR_iop_sw_spu_rw_mpu_intr 160
490
491/* Register r_mpu_intr, scope iop_sw_spu, type r */
492typedef struct {
493 unsigned int intr0 : 1;
494 unsigned int intr1 : 1;
495 unsigned int intr2 : 1;
496 unsigned int intr3 : 1;
497 unsigned int intr4 : 1;
498 unsigned int intr5 : 1;
499 unsigned int intr6 : 1;
500 unsigned int intr7 : 1;
501 unsigned int intr8 : 1;
502 unsigned int intr9 : 1;
503 unsigned int intr10 : 1;
504 unsigned int intr11 : 1;
505 unsigned int intr12 : 1;
506 unsigned int intr13 : 1;
507 unsigned int intr14 : 1;
508 unsigned int intr15 : 1;
509 unsigned int other_spu_intr0 : 1;
510 unsigned int other_spu_intr1 : 1;
511 unsigned int other_spu_intr2 : 1;
512 unsigned int other_spu_intr3 : 1;
513 unsigned int other_spu_intr4 : 1;
514 unsigned int other_spu_intr5 : 1;
515 unsigned int other_spu_intr6 : 1;
516 unsigned int other_spu_intr7 : 1;
517 unsigned int other_spu_intr8 : 1;
518 unsigned int other_spu_intr9 : 1;
519 unsigned int other_spu_intr10 : 1;
520 unsigned int other_spu_intr11 : 1;
521 unsigned int other_spu_intr12 : 1;
522 unsigned int other_spu_intr13 : 1;
523 unsigned int other_spu_intr14 : 1;
524 unsigned int other_spu_intr15 : 1;
525} reg_iop_sw_spu_r_mpu_intr;
526#define REG_RD_ADDR_iop_sw_spu_r_mpu_intr 164
527
528
529/* Constants */
530enum {
531 regk_iop_sw_spu_copy = 0x00000000,
532 regk_iop_sw_spu_no = 0x00000000,
533 regk_iop_sw_spu_nop = 0x00000000,
534 regk_iop_sw_spu_rd = 0x00000002,
535 regk_iop_sw_spu_reg_copy = 0x00000001,
536 regk_iop_sw_spu_rw_bus0_clr_mask_default = 0x00000000,
537 regk_iop_sw_spu_rw_bus0_oe_clr_mask_default = 0x00000000,
538 regk_iop_sw_spu_rw_bus0_oe_set_mask_default = 0x00000000,
539 regk_iop_sw_spu_rw_bus0_set_mask_default = 0x00000000,
540 regk_iop_sw_spu_rw_bus1_clr_mask_default = 0x00000000,
541 regk_iop_sw_spu_rw_bus1_oe_clr_mask_default = 0x00000000,
542 regk_iop_sw_spu_rw_bus1_oe_set_mask_default = 0x00000000,
543 regk_iop_sw_spu_rw_bus1_set_mask_default = 0x00000000,
544 regk_iop_sw_spu_rw_gio_clr_mask_default = 0x00000000,
545 regk_iop_sw_spu_rw_gio_oe_clr_mask_default = 0x00000000,
546 regk_iop_sw_spu_rw_gio_oe_set_mask_default = 0x00000000,
547 regk_iop_sw_spu_rw_gio_set_mask_default = 0x00000000,
548 regk_iop_sw_spu_set = 0x00000001,
549 regk_iop_sw_spu_wr = 0x00000003,
550 regk_iop_sw_spu_yes = 0x00000001
551};
552#endif /* __iop_sw_spu_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_timer_grp_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_timer_grp_defs.h
deleted file mode 100644
index c994114f3b51..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_timer_grp_defs.h
+++ /dev/null
@@ -1,249 +0,0 @@
1#ifndef __iop_timer_grp_defs_h
2#define __iop_timer_grp_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_timer_grp.r
7 * id: iop_timer_grp.r,v 1.29 2005/02/16 09:13:27 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_timer_grp_defs.h ../../inst/io_proc/rtl/iop_timer_grp.r
11 * id: $Id: iop_timer_grp_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_timer_grp */
86
87/* Register rw_cfg, scope iop_timer_grp, type rw */
88typedef struct {
89 unsigned int clk_src : 1;
90 unsigned int trig : 2;
91 unsigned int clk_gen_div : 8;
92 unsigned int clk_div : 8;
93 unsigned int dummy1 : 13;
94} reg_iop_timer_grp_rw_cfg;
95#define REG_RD_ADDR_iop_timer_grp_rw_cfg 0
96#define REG_WR_ADDR_iop_timer_grp_rw_cfg 0
97
98/* Register rw_half_period, scope iop_timer_grp, type rw */
99typedef struct {
100 unsigned int quota_lo : 15;
101 unsigned int quota_hi : 15;
102 unsigned int quota_hi_sel : 1;
103 unsigned int dummy1 : 1;
104} reg_iop_timer_grp_rw_half_period;
105#define REG_RD_ADDR_iop_timer_grp_rw_half_period 4
106#define REG_WR_ADDR_iop_timer_grp_rw_half_period 4
107
108/* Register rw_half_period_len, scope iop_timer_grp, type rw */
109typedef unsigned int reg_iop_timer_grp_rw_half_period_len;
110#define REG_RD_ADDR_iop_timer_grp_rw_half_period_len 8
111#define REG_WR_ADDR_iop_timer_grp_rw_half_period_len 8
112
113#define STRIDE_iop_timer_grp_rw_tmr_cfg 4
114/* Register rw_tmr_cfg, scope iop_timer_grp, type rw */
115typedef struct {
116 unsigned int clk_src : 3;
117 unsigned int strb : 2;
118 unsigned int run_mode : 2;
119 unsigned int out_mode : 1;
120 unsigned int active_on_tmr : 2;
121 unsigned int inv : 1;
122 unsigned int en_by_tmr : 2;
123 unsigned int dis_by_tmr : 2;
124 unsigned int en_only_by_reg : 1;
125 unsigned int dis_only_by_reg : 1;
126 unsigned int rst_at_en_strb : 1;
127 unsigned int dummy1 : 14;
128} reg_iop_timer_grp_rw_tmr_cfg;
129#define REG_RD_ADDR_iop_timer_grp_rw_tmr_cfg 12
130#define REG_WR_ADDR_iop_timer_grp_rw_tmr_cfg 12
131
132#define STRIDE_iop_timer_grp_rw_tmr_len 4
133/* Register rw_tmr_len, scope iop_timer_grp, type rw */
134typedef struct {
135 unsigned int val : 16;
136 unsigned int dummy1 : 16;
137} reg_iop_timer_grp_rw_tmr_len;
138#define REG_RD_ADDR_iop_timer_grp_rw_tmr_len 44
139#define REG_WR_ADDR_iop_timer_grp_rw_tmr_len 44
140
141/* Register rw_cmd, scope iop_timer_grp, type rw */
142typedef struct {
143 unsigned int rst : 4;
144 unsigned int en : 4;
145 unsigned int dis : 4;
146 unsigned int strb : 4;
147 unsigned int dummy1 : 16;
148} reg_iop_timer_grp_rw_cmd;
149#define REG_RD_ADDR_iop_timer_grp_rw_cmd 60
150#define REG_WR_ADDR_iop_timer_grp_rw_cmd 60
151
152/* Register r_clk_gen_cnt, scope iop_timer_grp, type r */
153typedef unsigned int reg_iop_timer_grp_r_clk_gen_cnt;
154#define REG_RD_ADDR_iop_timer_grp_r_clk_gen_cnt 64
155
156#define STRIDE_iop_timer_grp_rs_tmr_cnt 8
157/* Register rs_tmr_cnt, scope iop_timer_grp, type rs */
158typedef struct {
159 unsigned int val : 16;
160 unsigned int dummy1 : 16;
161} reg_iop_timer_grp_rs_tmr_cnt;
162#define REG_RD_ADDR_iop_timer_grp_rs_tmr_cnt 68
163
164#define STRIDE_iop_timer_grp_r_tmr_cnt 8
165/* Register r_tmr_cnt, scope iop_timer_grp, type r */
166typedef struct {
167 unsigned int val : 16;
168 unsigned int dummy1 : 16;
169} reg_iop_timer_grp_r_tmr_cnt;
170#define REG_RD_ADDR_iop_timer_grp_r_tmr_cnt 72
171
172/* Register rw_intr_mask, scope iop_timer_grp, type rw */
173typedef struct {
174 unsigned int tmr0 : 1;
175 unsigned int tmr1 : 1;
176 unsigned int tmr2 : 1;
177 unsigned int tmr3 : 1;
178 unsigned int dummy1 : 28;
179} reg_iop_timer_grp_rw_intr_mask;
180#define REG_RD_ADDR_iop_timer_grp_rw_intr_mask 100
181#define REG_WR_ADDR_iop_timer_grp_rw_intr_mask 100
182
183/* Register rw_ack_intr, scope iop_timer_grp, type rw */
184typedef struct {
185 unsigned int tmr0 : 1;
186 unsigned int tmr1 : 1;
187 unsigned int tmr2 : 1;
188 unsigned int tmr3 : 1;
189 unsigned int dummy1 : 28;
190} reg_iop_timer_grp_rw_ack_intr;
191#define REG_RD_ADDR_iop_timer_grp_rw_ack_intr 104
192#define REG_WR_ADDR_iop_timer_grp_rw_ack_intr 104
193
194/* Register r_intr, scope iop_timer_grp, type r */
195typedef struct {
196 unsigned int tmr0 : 1;
197 unsigned int tmr1 : 1;
198 unsigned int tmr2 : 1;
199 unsigned int tmr3 : 1;
200 unsigned int dummy1 : 28;
201} reg_iop_timer_grp_r_intr;
202#define REG_RD_ADDR_iop_timer_grp_r_intr 108
203
204/* Register r_masked_intr, scope iop_timer_grp, type r */
205typedef struct {
206 unsigned int tmr0 : 1;
207 unsigned int tmr1 : 1;
208 unsigned int tmr2 : 1;
209 unsigned int tmr3 : 1;
210 unsigned int dummy1 : 28;
211} reg_iop_timer_grp_r_masked_intr;
212#define REG_RD_ADDR_iop_timer_grp_r_masked_intr 112
213
214
215/* Constants */
216enum {
217 regk_iop_timer_grp_clk200 = 0x00000000,
218 regk_iop_timer_grp_clk_gen = 0x00000002,
219 regk_iop_timer_grp_complete = 0x00000002,
220 regk_iop_timer_grp_div_clk200 = 0x00000001,
221 regk_iop_timer_grp_div_clk_gen = 0x00000003,
222 regk_iop_timer_grp_ext = 0x00000001,
223 regk_iop_timer_grp_hi = 0x00000000,
224 regk_iop_timer_grp_long_period = 0x00000001,
225 regk_iop_timer_grp_neg = 0x00000002,
226 regk_iop_timer_grp_no = 0x00000000,
227 regk_iop_timer_grp_once = 0x00000003,
228 regk_iop_timer_grp_pause = 0x00000001,
229 regk_iop_timer_grp_pos = 0x00000001,
230 regk_iop_timer_grp_pos_neg = 0x00000003,
231 regk_iop_timer_grp_pulse = 0x00000000,
232 regk_iop_timer_grp_r_tmr_cnt_size = 0x00000004,
233 regk_iop_timer_grp_rs_tmr_cnt_size = 0x00000004,
234 regk_iop_timer_grp_rw_cfg_default = 0x00000002,
235 regk_iop_timer_grp_rw_intr_mask_default = 0x00000000,
236 regk_iop_timer_grp_rw_tmr_cfg_default0 = 0x00018000,
237 regk_iop_timer_grp_rw_tmr_cfg_default1 = 0x0001a900,
238 regk_iop_timer_grp_rw_tmr_cfg_default2 = 0x0001d200,
239 regk_iop_timer_grp_rw_tmr_cfg_default3 = 0x0001fb00,
240 regk_iop_timer_grp_rw_tmr_cfg_size = 0x00000004,
241 regk_iop_timer_grp_rw_tmr_len_default = 0x00000000,
242 regk_iop_timer_grp_rw_tmr_len_size = 0x00000004,
243 regk_iop_timer_grp_short_period = 0x00000000,
244 regk_iop_timer_grp_stop = 0x00000000,
245 regk_iop_timer_grp_tmr = 0x00000004,
246 regk_iop_timer_grp_toggle = 0x00000001,
247 regk_iop_timer_grp_yes = 0x00000001
248};
249#endif /* __iop_timer_grp_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_trigger_grp_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_trigger_grp_defs.h
deleted file mode 100644
index 36e44282399d..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_trigger_grp_defs.h
+++ /dev/null
@@ -1,170 +0,0 @@
1#ifndef __iop_trigger_grp_defs_h
2#define __iop_trigger_grp_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/iop_trigger_grp.r
7 * id: iop_trigger_grp.r,v 0.20 2005/02/16 09:13:20 niklaspa Exp
8 * last modfied: Mon Apr 11 16:08:46 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_trigger_grp_defs.h ../../inst/io_proc/rtl/iop_trigger_grp.r
11 * id: $Id: iop_trigger_grp_defs.h,v 1.5 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_trigger_grp */
86
87#define STRIDE_iop_trigger_grp_rw_cfg 4
88/* Register rw_cfg, scope iop_trigger_grp, type rw */
89typedef struct {
90 unsigned int action : 2;
91 unsigned int once : 1;
92 unsigned int trig : 3;
93 unsigned int en_only_by_reg : 1;
94 unsigned int dis_only_by_reg : 1;
95 unsigned int dummy1 : 24;
96} reg_iop_trigger_grp_rw_cfg;
97#define REG_RD_ADDR_iop_trigger_grp_rw_cfg 0
98#define REG_WR_ADDR_iop_trigger_grp_rw_cfg 0
99
100/* Register rw_cmd, scope iop_trigger_grp, type rw */
101typedef struct {
102 unsigned int dis : 4;
103 unsigned int en : 4;
104 unsigned int dummy1 : 24;
105} reg_iop_trigger_grp_rw_cmd;
106#define REG_RD_ADDR_iop_trigger_grp_rw_cmd 16
107#define REG_WR_ADDR_iop_trigger_grp_rw_cmd 16
108
109/* Register rw_intr_mask, scope iop_trigger_grp, type rw */
110typedef struct {
111 unsigned int trig0 : 1;
112 unsigned int trig1 : 1;
113 unsigned int trig2 : 1;
114 unsigned int trig3 : 1;
115 unsigned int dummy1 : 28;
116} reg_iop_trigger_grp_rw_intr_mask;
117#define REG_RD_ADDR_iop_trigger_grp_rw_intr_mask 20
118#define REG_WR_ADDR_iop_trigger_grp_rw_intr_mask 20
119
120/* Register rw_ack_intr, scope iop_trigger_grp, type rw */
121typedef struct {
122 unsigned int trig0 : 1;
123 unsigned int trig1 : 1;
124 unsigned int trig2 : 1;
125 unsigned int trig3 : 1;
126 unsigned int dummy1 : 28;
127} reg_iop_trigger_grp_rw_ack_intr;
128#define REG_RD_ADDR_iop_trigger_grp_rw_ack_intr 24
129#define REG_WR_ADDR_iop_trigger_grp_rw_ack_intr 24
130
131/* Register r_intr, scope iop_trigger_grp, type r */
132typedef struct {
133 unsigned int trig0 : 1;
134 unsigned int trig1 : 1;
135 unsigned int trig2 : 1;
136 unsigned int trig3 : 1;
137 unsigned int dummy1 : 28;
138} reg_iop_trigger_grp_r_intr;
139#define REG_RD_ADDR_iop_trigger_grp_r_intr 28
140
141/* Register r_masked_intr, scope iop_trigger_grp, type r */
142typedef struct {
143 unsigned int trig0 : 1;
144 unsigned int trig1 : 1;
145 unsigned int trig2 : 1;
146 unsigned int trig3 : 1;
147 unsigned int dummy1 : 28;
148} reg_iop_trigger_grp_r_masked_intr;
149#define REG_RD_ADDR_iop_trigger_grp_r_masked_intr 32
150
151
152/* Constants */
153enum {
154 regk_iop_trigger_grp_fall = 0x00000002,
155 regk_iop_trigger_grp_fall_lo = 0x00000006,
156 regk_iop_trigger_grp_no = 0x00000000,
157 regk_iop_trigger_grp_off = 0x00000000,
158 regk_iop_trigger_grp_pulse = 0x00000000,
159 regk_iop_trigger_grp_rise = 0x00000001,
160 regk_iop_trigger_grp_rise_fall = 0x00000003,
161 regk_iop_trigger_grp_rise_fall_hi = 0x00000007,
162 regk_iop_trigger_grp_rise_fall_lo = 0x00000004,
163 regk_iop_trigger_grp_rise_hi = 0x00000005,
164 regk_iop_trigger_grp_rw_cfg_default = 0x000000c0,
165 regk_iop_trigger_grp_rw_cfg_size = 0x00000004,
166 regk_iop_trigger_grp_rw_intr_mask_default = 0x00000000,
167 regk_iop_trigger_grp_toggle = 0x00000003,
168 regk_iop_trigger_grp_yes = 0x00000001
169};
170#endif /* __iop_trigger_grp_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/iop/iop_version_defs.h b/include/asm-cris/arch-v32/hwregs/iop/iop_version_defs.h
deleted file mode 100644
index b8d6a910c71c..000000000000
--- a/include/asm-cris/arch-v32/hwregs/iop/iop_version_defs.h
+++ /dev/null
@@ -1,99 +0,0 @@
1#ifndef __iop_version_defs_h
2#define __iop_version_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/io_proc/rtl/guinness/iop_version.r
7 * id: iop_version.r,v 1.3 2004/04/22 12:37:54 jonaso Exp
8 * last modfied: Mon Apr 11 16:08:44 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_version_defs.h ../../inst/io_proc/rtl/guinness/iop_version.r
11 * id: $Id: iop_version_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope iop_version */
86
87/* Register r_version, scope iop_version, type r */
88typedef struct {
89 unsigned int nr : 8;
90 unsigned int dummy1 : 24;
91} reg_iop_version_r_version;
92#define REG_RD_ADDR_iop_version_r_version 0
93
94
95/* Constants */
96enum {
97 regk_iop_version_v1_0 = 0x00000001
98};
99#endif /* __iop_version_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/irq_nmi_defs.h b/include/asm-cris/arch-v32/hwregs/irq_nmi_defs.h
deleted file mode 100644
index 7b167e3c0572..000000000000
--- a/include/asm-cris/arch-v32/hwregs/irq_nmi_defs.h
+++ /dev/null
@@ -1,104 +0,0 @@
1#ifndef __irq_nmi_defs_h
2#define __irq_nmi_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../mod/irq_nmi.r
7 * id: <not found>
8 * last modfied: Thu Jan 22 09:22:43 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile irq_nmi_defs.h ../../mod/irq_nmi.r
11 * id: $Id: irq_nmi_defs.h,v 1.1 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope irq_nmi */
86
87/* Register rw_cmd, scope irq_nmi, type rw */
88typedef struct {
89 unsigned int delay : 16;
90 unsigned int op : 2;
91 unsigned int dummy1 : 14;
92} reg_irq_nmi_rw_cmd;
93#define REG_RD_ADDR_irq_nmi_rw_cmd 0
94#define REG_WR_ADDR_irq_nmi_rw_cmd 0
95
96
97/* Constants */
98enum {
99 regk_irq_nmi_ack_irq = 0x00000002,
100 regk_irq_nmi_ack_nmi = 0x00000003,
101 regk_irq_nmi_irq = 0x00000000,
102 regk_irq_nmi_nmi = 0x00000001
103};
104#endif /* __irq_nmi_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/marb_bp_defs.h b/include/asm-cris/arch-v32/hwregs/marb_bp_defs.h
deleted file mode 100644
index a11fdd3cd907..000000000000
--- a/include/asm-cris/arch-v32/hwregs/marb_bp_defs.h
+++ /dev/null
@@ -1,205 +0,0 @@
1#ifndef __marb_bp_defs_h
2#define __marb_bp_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/memarb/rtl/guinness/marb_top.r
7 * id: <not found>
8 * last modfied: Fri Nov 7 15:36:04 2003
9 *
10 * by /n/asic/projects/guinness/design/top/inst/rdesc/rdes2c ../../rtl/global.rmap ../../mod/modreg.rmap -base 0xb0000000 ../../inst/memarb/rtl/guinness/marb_top.r
11 * id: $Id: marb_bp_defs.h,v 1.2 2004/06/04 07:15:33 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74/* C-code for register scope marb_bp */
75
76/* Register rw_first_addr, scope marb_bp, type rw */
77typedef unsigned int reg_marb_bp_rw_first_addr;
78#define REG_RD_ADDR_marb_bp_rw_first_addr 0
79#define REG_WR_ADDR_marb_bp_rw_first_addr 0
80
81/* Register rw_last_addr, scope marb_bp, type rw */
82typedef unsigned int reg_marb_bp_rw_last_addr;
83#define REG_RD_ADDR_marb_bp_rw_last_addr 4
84#define REG_WR_ADDR_marb_bp_rw_last_addr 4
85
86/* Register rw_op, scope marb_bp, type rw */
87typedef struct {
88 unsigned int read : 1;
89 unsigned int write : 1;
90 unsigned int read_excl : 1;
91 unsigned int pri_write : 1;
92 unsigned int us_read : 1;
93 unsigned int us_write : 1;
94 unsigned int us_read_excl : 1;
95 unsigned int us_pri_write : 1;
96 unsigned int dummy1 : 24;
97} reg_marb_bp_rw_op;
98#define REG_RD_ADDR_marb_bp_rw_op 8
99#define REG_WR_ADDR_marb_bp_rw_op 8
100
101/* Register rw_clients, scope marb_bp, type rw */
102typedef struct {
103 unsigned int dma0 : 1;
104 unsigned int dma1 : 1;
105 unsigned int dma2 : 1;
106 unsigned int dma3 : 1;
107 unsigned int dma4 : 1;
108 unsigned int dma5 : 1;
109 unsigned int dma6 : 1;
110 unsigned int dma7 : 1;
111 unsigned int dma8 : 1;
112 unsigned int dma9 : 1;
113 unsigned int cpui : 1;
114 unsigned int cpud : 1;
115 unsigned int iop : 1;
116 unsigned int slave : 1;
117 unsigned int dummy1 : 18;
118} reg_marb_bp_rw_clients;
119#define REG_RD_ADDR_marb_bp_rw_clients 12
120#define REG_WR_ADDR_marb_bp_rw_clients 12
121
122/* Register rw_options, scope marb_bp, type rw */
123typedef struct {
124 unsigned int wrap : 1;
125 unsigned int dummy1 : 31;
126} reg_marb_bp_rw_options;
127#define REG_RD_ADDR_marb_bp_rw_options 16
128#define REG_WR_ADDR_marb_bp_rw_options 16
129
130/* Register r_break_addr, scope marb_bp, type r */
131typedef unsigned int reg_marb_bp_r_break_addr;
132#define REG_RD_ADDR_marb_bp_r_break_addr 20
133
134/* Register r_break_op, scope marb_bp, type r */
135typedef struct {
136 unsigned int read : 1;
137 unsigned int write : 1;
138 unsigned int read_excl : 1;
139 unsigned int pri_write : 1;
140 unsigned int us_read : 1;
141 unsigned int us_write : 1;
142 unsigned int us_read_excl : 1;
143 unsigned int us_pri_write : 1;
144 unsigned int dummy1 : 24;
145} reg_marb_bp_r_break_op;
146#define REG_RD_ADDR_marb_bp_r_break_op 24
147
148/* Register r_break_clients, scope marb_bp, type r */
149typedef struct {
150 unsigned int dma0 : 1;
151 unsigned int dma1 : 1;
152 unsigned int dma2 : 1;
153 unsigned int dma3 : 1;
154 unsigned int dma4 : 1;
155 unsigned int dma5 : 1;
156 unsigned int dma6 : 1;
157 unsigned int dma7 : 1;
158 unsigned int dma8 : 1;
159 unsigned int dma9 : 1;
160 unsigned int cpui : 1;
161 unsigned int cpud : 1;
162 unsigned int iop : 1;
163 unsigned int slave : 1;
164 unsigned int dummy1 : 18;
165} reg_marb_bp_r_break_clients;
166#define REG_RD_ADDR_marb_bp_r_break_clients 28
167
168/* Register r_break_first_client, scope marb_bp, type r */
169typedef struct {
170 unsigned int dma0 : 1;
171 unsigned int dma1 : 1;
172 unsigned int dma2 : 1;
173 unsigned int dma3 : 1;
174 unsigned int dma4 : 1;
175 unsigned int dma5 : 1;
176 unsigned int dma6 : 1;
177 unsigned int dma7 : 1;
178 unsigned int dma8 : 1;
179 unsigned int dma9 : 1;
180 unsigned int cpui : 1;
181 unsigned int cpud : 1;
182 unsigned int iop : 1;
183 unsigned int slave : 1;
184 unsigned int dummy1 : 18;
185} reg_marb_bp_r_break_first_client;
186#define REG_RD_ADDR_marb_bp_r_break_first_client 32
187
188/* Register r_break_size, scope marb_bp, type r */
189typedef unsigned int reg_marb_bp_r_break_size;
190#define REG_RD_ADDR_marb_bp_r_break_size 36
191
192/* Register rw_ack, scope marb_bp, type rw */
193typedef unsigned int reg_marb_bp_rw_ack;
194#define REG_RD_ADDR_marb_bp_rw_ack 40
195#define REG_WR_ADDR_marb_bp_rw_ack 40
196
197
198/* Constants */
199enum {
200 regk_marb_bp_no = 0x00000000,
201 regk_marb_bp_rw_op_default = 0x00000000,
202 regk_marb_bp_rw_options_default = 0x00000000,
203 regk_marb_bp_yes = 0x00000001
204};
205#endif /* __marb_bp_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/marb_defs.h b/include/asm-cris/arch-v32/hwregs/marb_defs.h
deleted file mode 100644
index 71e8af0bb3a4..000000000000
--- a/include/asm-cris/arch-v32/hwregs/marb_defs.h
+++ /dev/null
@@ -1,475 +0,0 @@
1#ifndef __marb_defs_h
2#define __marb_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/memarb/rtl/guinness/marb_top.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:12:16 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile marb_defs.h ../../inst/memarb/rtl/guinness/marb_top.r
11 * id: $Id: marb_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope marb */
86
87#define STRIDE_marb_rw_int_slots 4
88/* Register rw_int_slots, scope marb, type rw */
89typedef struct {
90 unsigned int owner : 4;
91 unsigned int dummy1 : 28;
92} reg_marb_rw_int_slots;
93#define REG_RD_ADDR_marb_rw_int_slots 0
94#define REG_WR_ADDR_marb_rw_int_slots 0
95
96#define STRIDE_marb_rw_ext_slots 4
97/* Register rw_ext_slots, scope marb, type rw */
98typedef struct {
99 unsigned int owner : 4;
100 unsigned int dummy1 : 28;
101} reg_marb_rw_ext_slots;
102#define REG_RD_ADDR_marb_rw_ext_slots 256
103#define REG_WR_ADDR_marb_rw_ext_slots 256
104
105#define STRIDE_marb_rw_regs_slots 4
106/* Register rw_regs_slots, scope marb, type rw */
107typedef struct {
108 unsigned int owner : 4;
109 unsigned int dummy1 : 28;
110} reg_marb_rw_regs_slots;
111#define REG_RD_ADDR_marb_rw_regs_slots 512
112#define REG_WR_ADDR_marb_rw_regs_slots 512
113
114/* Register rw_intr_mask, scope marb, type rw */
115typedef struct {
116 unsigned int bp0 : 1;
117 unsigned int bp1 : 1;
118 unsigned int bp2 : 1;
119 unsigned int bp3 : 1;
120 unsigned int dummy1 : 28;
121} reg_marb_rw_intr_mask;
122#define REG_RD_ADDR_marb_rw_intr_mask 528
123#define REG_WR_ADDR_marb_rw_intr_mask 528
124
125/* Register rw_ack_intr, scope marb, type rw */
126typedef struct {
127 unsigned int bp0 : 1;
128 unsigned int bp1 : 1;
129 unsigned int bp2 : 1;
130 unsigned int bp3 : 1;
131 unsigned int dummy1 : 28;
132} reg_marb_rw_ack_intr;
133#define REG_RD_ADDR_marb_rw_ack_intr 532
134#define REG_WR_ADDR_marb_rw_ack_intr 532
135
136/* Register r_intr, scope marb, type r */
137typedef struct {
138 unsigned int bp0 : 1;
139 unsigned int bp1 : 1;
140 unsigned int bp2 : 1;
141 unsigned int bp3 : 1;
142 unsigned int dummy1 : 28;
143} reg_marb_r_intr;
144#define REG_RD_ADDR_marb_r_intr 536
145
146/* Register r_masked_intr, scope marb, type r */
147typedef struct {
148 unsigned int bp0 : 1;
149 unsigned int bp1 : 1;
150 unsigned int bp2 : 1;
151 unsigned int bp3 : 1;
152 unsigned int dummy1 : 28;
153} reg_marb_r_masked_intr;
154#define REG_RD_ADDR_marb_r_masked_intr 540
155
156/* Register rw_stop_mask, scope marb, type rw */
157typedef struct {
158 unsigned int dma0 : 1;
159 unsigned int dma1 : 1;
160 unsigned int dma2 : 1;
161 unsigned int dma3 : 1;
162 unsigned int dma4 : 1;
163 unsigned int dma5 : 1;
164 unsigned int dma6 : 1;
165 unsigned int dma7 : 1;
166 unsigned int dma8 : 1;
167 unsigned int dma9 : 1;
168 unsigned int cpui : 1;
169 unsigned int cpud : 1;
170 unsigned int iop : 1;
171 unsigned int slave : 1;
172 unsigned int dummy1 : 18;
173} reg_marb_rw_stop_mask;
174#define REG_RD_ADDR_marb_rw_stop_mask 544
175#define REG_WR_ADDR_marb_rw_stop_mask 544
176
177/* Register r_stopped, scope marb, type r */
178typedef struct {
179 unsigned int dma0 : 1;
180 unsigned int dma1 : 1;
181 unsigned int dma2 : 1;
182 unsigned int dma3 : 1;
183 unsigned int dma4 : 1;
184 unsigned int dma5 : 1;
185 unsigned int dma6 : 1;
186 unsigned int dma7 : 1;
187 unsigned int dma8 : 1;
188 unsigned int dma9 : 1;
189 unsigned int cpui : 1;
190 unsigned int cpud : 1;
191 unsigned int iop : 1;
192 unsigned int slave : 1;
193 unsigned int dummy1 : 18;
194} reg_marb_r_stopped;
195#define REG_RD_ADDR_marb_r_stopped 548
196
197/* Register rw_no_snoop, scope marb, type rw */
198typedef struct {
199 unsigned int dma0 : 1;
200 unsigned int dma1 : 1;
201 unsigned int dma2 : 1;
202 unsigned int dma3 : 1;
203 unsigned int dma4 : 1;
204 unsigned int dma5 : 1;
205 unsigned int dma6 : 1;
206 unsigned int dma7 : 1;
207 unsigned int dma8 : 1;
208 unsigned int dma9 : 1;
209 unsigned int cpui : 1;
210 unsigned int cpud : 1;
211 unsigned int iop : 1;
212 unsigned int slave : 1;
213 unsigned int dummy1 : 18;
214} reg_marb_rw_no_snoop;
215#define REG_RD_ADDR_marb_rw_no_snoop 832
216#define REG_WR_ADDR_marb_rw_no_snoop 832
217
218/* Register rw_no_snoop_rq, scope marb, type rw */
219typedef struct {
220 unsigned int dummy1 : 10;
221 unsigned int cpui : 1;
222 unsigned int cpud : 1;
223 unsigned int dummy2 : 20;
224} reg_marb_rw_no_snoop_rq;
225#define REG_RD_ADDR_marb_rw_no_snoop_rq 836
226#define REG_WR_ADDR_marb_rw_no_snoop_rq 836
227
228
229/* Constants */
230enum {
231 regk_marb_cpud = 0x0000000b,
232 regk_marb_cpui = 0x0000000a,
233 regk_marb_dma0 = 0x00000000,
234 regk_marb_dma1 = 0x00000001,
235 regk_marb_dma2 = 0x00000002,
236 regk_marb_dma3 = 0x00000003,
237 regk_marb_dma4 = 0x00000004,
238 regk_marb_dma5 = 0x00000005,
239 regk_marb_dma6 = 0x00000006,
240 regk_marb_dma7 = 0x00000007,
241 regk_marb_dma8 = 0x00000008,
242 regk_marb_dma9 = 0x00000009,
243 regk_marb_iop = 0x0000000c,
244 regk_marb_no = 0x00000000,
245 regk_marb_r_stopped_default = 0x00000000,
246 regk_marb_rw_ext_slots_default = 0x00000000,
247 regk_marb_rw_ext_slots_size = 0x00000040,
248 regk_marb_rw_int_slots_default = 0x00000000,
249 regk_marb_rw_int_slots_size = 0x00000040,
250 regk_marb_rw_intr_mask_default = 0x00000000,
251 regk_marb_rw_no_snoop_default = 0x00000000,
252 regk_marb_rw_no_snoop_rq_default = 0x00000000,
253 regk_marb_rw_regs_slots_default = 0x00000000,
254 regk_marb_rw_regs_slots_size = 0x00000004,
255 regk_marb_rw_stop_mask_default = 0x00000000,
256 regk_marb_slave = 0x0000000d,
257 regk_marb_yes = 0x00000001
258};
259#endif /* __marb_defs_h */
260#ifndef __marb_bp_defs_h
261#define __marb_bp_defs_h
262
263/*
264 * This file is autogenerated from
265 * file: ../../inst/memarb/rtl/guinness/marb_top.r
266 * id: <not found>
267 * last modfied: Mon Apr 11 16:12:16 2005
268 *
269 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile marb_defs.h ../../inst/memarb/rtl/guinness/marb_top.r
270 * id: $Id: marb_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $
271 * Any changes here will be lost.
272 *
273 * -*- buffer-read-only: t -*-
274 */
275/* Main access macros */
276#ifndef REG_RD
277#define REG_RD( scope, inst, reg ) \
278 REG_READ( reg_##scope##_##reg, \
279 (inst) + REG_RD_ADDR_##scope##_##reg )
280#endif
281
282#ifndef REG_WR
283#define REG_WR( scope, inst, reg, val ) \
284 REG_WRITE( reg_##scope##_##reg, \
285 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
286#endif
287
288#ifndef REG_RD_VECT
289#define REG_RD_VECT( scope, inst, reg, index ) \
290 REG_READ( reg_##scope##_##reg, \
291 (inst) + REG_RD_ADDR_##scope##_##reg + \
292 (index) * STRIDE_##scope##_##reg )
293#endif
294
295#ifndef REG_WR_VECT
296#define REG_WR_VECT( scope, inst, reg, index, val ) \
297 REG_WRITE( reg_##scope##_##reg, \
298 (inst) + REG_WR_ADDR_##scope##_##reg + \
299 (index) * STRIDE_##scope##_##reg, (val) )
300#endif
301
302#ifndef REG_RD_INT
303#define REG_RD_INT( scope, inst, reg ) \
304 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
305#endif
306
307#ifndef REG_WR_INT
308#define REG_WR_INT( scope, inst, reg, val ) \
309 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
310#endif
311
312#ifndef REG_RD_INT_VECT
313#define REG_RD_INT_VECT( scope, inst, reg, index ) \
314 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
315 (index) * STRIDE_##scope##_##reg )
316#endif
317
318#ifndef REG_WR_INT_VECT
319#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
320 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
321 (index) * STRIDE_##scope##_##reg, (val) )
322#endif
323
324#ifndef REG_TYPE_CONV
325#define REG_TYPE_CONV( type, orgtype, val ) \
326 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
327#endif
328
329#ifndef reg_page_size
330#define reg_page_size 8192
331#endif
332
333#ifndef REG_ADDR
334#define REG_ADDR( scope, inst, reg ) \
335 ( (inst) + REG_RD_ADDR_##scope##_##reg )
336#endif
337
338#ifndef REG_ADDR_VECT
339#define REG_ADDR_VECT( scope, inst, reg, index ) \
340 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
341 (index) * STRIDE_##scope##_##reg )
342#endif
343
344/* C-code for register scope marb_bp */
345
346/* Register rw_first_addr, scope marb_bp, type rw */
347typedef unsigned int reg_marb_bp_rw_first_addr;
348#define REG_RD_ADDR_marb_bp_rw_first_addr 0
349#define REG_WR_ADDR_marb_bp_rw_first_addr 0
350
351/* Register rw_last_addr, scope marb_bp, type rw */
352typedef unsigned int reg_marb_bp_rw_last_addr;
353#define REG_RD_ADDR_marb_bp_rw_last_addr 4
354#define REG_WR_ADDR_marb_bp_rw_last_addr 4
355
356/* Register rw_op, scope marb_bp, type rw */
357typedef struct {
358 unsigned int rd : 1;
359 unsigned int wr : 1;
360 unsigned int rd_excl : 1;
361 unsigned int pri_wr : 1;
362 unsigned int us_rd : 1;
363 unsigned int us_wr : 1;
364 unsigned int us_rd_excl : 1;
365 unsigned int us_pri_wr : 1;
366 unsigned int dummy1 : 24;
367} reg_marb_bp_rw_op;
368#define REG_RD_ADDR_marb_bp_rw_op 8
369#define REG_WR_ADDR_marb_bp_rw_op 8
370
371/* Register rw_clients, scope marb_bp, type rw */
372typedef struct {
373 unsigned int dma0 : 1;
374 unsigned int dma1 : 1;
375 unsigned int dma2 : 1;
376 unsigned int dma3 : 1;
377 unsigned int dma4 : 1;
378 unsigned int dma5 : 1;
379 unsigned int dma6 : 1;
380 unsigned int dma7 : 1;
381 unsigned int dma8 : 1;
382 unsigned int dma9 : 1;
383 unsigned int cpui : 1;
384 unsigned int cpud : 1;
385 unsigned int iop : 1;
386 unsigned int slave : 1;
387 unsigned int dummy1 : 18;
388} reg_marb_bp_rw_clients;
389#define REG_RD_ADDR_marb_bp_rw_clients 12
390#define REG_WR_ADDR_marb_bp_rw_clients 12
391
392/* Register rw_options, scope marb_bp, type rw */
393typedef struct {
394 unsigned int wrap : 1;
395 unsigned int dummy1 : 31;
396} reg_marb_bp_rw_options;
397#define REG_RD_ADDR_marb_bp_rw_options 16
398#define REG_WR_ADDR_marb_bp_rw_options 16
399
400/* Register r_brk_addr, scope marb_bp, type r */
401typedef unsigned int reg_marb_bp_r_brk_addr;
402#define REG_RD_ADDR_marb_bp_r_brk_addr 20
403
404/* Register r_brk_op, scope marb_bp, type r */
405typedef struct {
406 unsigned int rd : 1;
407 unsigned int wr : 1;
408 unsigned int rd_excl : 1;
409 unsigned int pri_wr : 1;
410 unsigned int us_rd : 1;
411 unsigned int us_wr : 1;
412 unsigned int us_rd_excl : 1;
413 unsigned int us_pri_wr : 1;
414 unsigned int dummy1 : 24;
415} reg_marb_bp_r_brk_op;
416#define REG_RD_ADDR_marb_bp_r_brk_op 24
417
418/* Register r_brk_clients, scope marb_bp, type r */
419typedef struct {
420 unsigned int dma0 : 1;
421 unsigned int dma1 : 1;
422 unsigned int dma2 : 1;
423 unsigned int dma3 : 1;
424 unsigned int dma4 : 1;
425 unsigned int dma5 : 1;
426 unsigned int dma6 : 1;
427 unsigned int dma7 : 1;
428 unsigned int dma8 : 1;
429 unsigned int dma9 : 1;
430 unsigned int cpui : 1;
431 unsigned int cpud : 1;
432 unsigned int iop : 1;
433 unsigned int slave : 1;
434 unsigned int dummy1 : 18;
435} reg_marb_bp_r_brk_clients;
436#define REG_RD_ADDR_marb_bp_r_brk_clients 28
437
438/* Register r_brk_first_client, scope marb_bp, type r */
439typedef struct {
440 unsigned int dma0 : 1;
441 unsigned int dma1 : 1;
442 unsigned int dma2 : 1;
443 unsigned int dma3 : 1;
444 unsigned int dma4 : 1;
445 unsigned int dma5 : 1;
446 unsigned int dma6 : 1;
447 unsigned int dma7 : 1;
448 unsigned int dma8 : 1;
449 unsigned int dma9 : 1;
450 unsigned int cpui : 1;
451 unsigned int cpud : 1;
452 unsigned int iop : 1;
453 unsigned int slave : 1;
454 unsigned int dummy1 : 18;
455} reg_marb_bp_r_brk_first_client;
456#define REG_RD_ADDR_marb_bp_r_brk_first_client 32
457
458/* Register r_brk_size, scope marb_bp, type r */
459typedef unsigned int reg_marb_bp_r_brk_size;
460#define REG_RD_ADDR_marb_bp_r_brk_size 36
461
462/* Register rw_ack, scope marb_bp, type rw */
463typedef unsigned int reg_marb_bp_rw_ack;
464#define REG_RD_ADDR_marb_bp_rw_ack 40
465#define REG_WR_ADDR_marb_bp_rw_ack 40
466
467
468/* Constants */
469enum {
470 regk_marb_bp_no = 0x00000000,
471 regk_marb_bp_rw_op_default = 0x00000000,
472 regk_marb_bp_rw_options_default = 0x00000000,
473 regk_marb_bp_yes = 0x00000001
474};
475#endif /* __marb_bp_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/pinmux_defs.h b/include/asm-cris/arch-v32/hwregs/pinmux_defs.h
deleted file mode 100644
index 9d91c2de1b07..000000000000
--- a/include/asm-cris/arch-v32/hwregs/pinmux_defs.h
+++ /dev/null
@@ -1,357 +0,0 @@
1#ifndef __pinmux_defs_h
2#define __pinmux_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/pinmux/rtl/guinness/pinmux_regs.r
7 * id: pinmux_regs.r,v 1.40 2005/02/09 16:22:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:11 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile pinmux_defs.h ../../inst/pinmux/rtl/guinness/pinmux_regs.r
11 * id: $Id: pinmux_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope pinmux */
86
87/* Register rw_pa, scope pinmux, type rw */
88typedef struct {
89 unsigned int pa0 : 1;
90 unsigned int pa1 : 1;
91 unsigned int pa2 : 1;
92 unsigned int pa3 : 1;
93 unsigned int pa4 : 1;
94 unsigned int pa5 : 1;
95 unsigned int pa6 : 1;
96 unsigned int pa7 : 1;
97 unsigned int csp2_n : 1;
98 unsigned int csp3_n : 1;
99 unsigned int csp5_n : 1;
100 unsigned int csp6_n : 1;
101 unsigned int hsh4 : 1;
102 unsigned int hsh5 : 1;
103 unsigned int hsh6 : 1;
104 unsigned int hsh7 : 1;
105 unsigned int dummy1 : 16;
106} reg_pinmux_rw_pa;
107#define REG_RD_ADDR_pinmux_rw_pa 0
108#define REG_WR_ADDR_pinmux_rw_pa 0
109
110/* Register rw_hwprot, scope pinmux, type rw */
111typedef struct {
112 unsigned int ser1 : 1;
113 unsigned int ser2 : 1;
114 unsigned int ser3 : 1;
115 unsigned int sser0 : 1;
116 unsigned int sser1 : 1;
117 unsigned int ata0 : 1;
118 unsigned int ata1 : 1;
119 unsigned int ata2 : 1;
120 unsigned int ata3 : 1;
121 unsigned int ata : 1;
122 unsigned int eth1 : 1;
123 unsigned int eth1_mgm : 1;
124 unsigned int timer : 1;
125 unsigned int p21 : 1;
126 unsigned int dummy1 : 18;
127} reg_pinmux_rw_hwprot;
128#define REG_RD_ADDR_pinmux_rw_hwprot 4
129#define REG_WR_ADDR_pinmux_rw_hwprot 4
130
131/* Register rw_pb_gio, scope pinmux, type rw */
132typedef struct {
133 unsigned int pb0 : 1;
134 unsigned int pb1 : 1;
135 unsigned int pb2 : 1;
136 unsigned int pb3 : 1;
137 unsigned int pb4 : 1;
138 unsigned int pb5 : 1;
139 unsigned int pb6 : 1;
140 unsigned int pb7 : 1;
141 unsigned int pb8 : 1;
142 unsigned int pb9 : 1;
143 unsigned int pb10 : 1;
144 unsigned int pb11 : 1;
145 unsigned int pb12 : 1;
146 unsigned int pb13 : 1;
147 unsigned int pb14 : 1;
148 unsigned int pb15 : 1;
149 unsigned int pb16 : 1;
150 unsigned int pb17 : 1;
151 unsigned int dummy1 : 14;
152} reg_pinmux_rw_pb_gio;
153#define REG_RD_ADDR_pinmux_rw_pb_gio 8
154#define REG_WR_ADDR_pinmux_rw_pb_gio 8
155
156/* Register rw_pb_iop, scope pinmux, type rw */
157typedef struct {
158 unsigned int pb0 : 1;
159 unsigned int pb1 : 1;
160 unsigned int pb2 : 1;
161 unsigned int pb3 : 1;
162 unsigned int pb4 : 1;
163 unsigned int pb5 : 1;
164 unsigned int pb6 : 1;
165 unsigned int pb7 : 1;
166 unsigned int pb8 : 1;
167 unsigned int pb9 : 1;
168 unsigned int pb10 : 1;
169 unsigned int pb11 : 1;
170 unsigned int pb12 : 1;
171 unsigned int pb13 : 1;
172 unsigned int pb14 : 1;
173 unsigned int pb15 : 1;
174 unsigned int pb16 : 1;
175 unsigned int pb17 : 1;
176 unsigned int dummy1 : 14;
177} reg_pinmux_rw_pb_iop;
178#define REG_RD_ADDR_pinmux_rw_pb_iop 12
179#define REG_WR_ADDR_pinmux_rw_pb_iop 12
180
181/* Register rw_pc_gio, scope pinmux, type rw */
182typedef struct {
183 unsigned int pc0 : 1;
184 unsigned int pc1 : 1;
185 unsigned int pc2 : 1;
186 unsigned int pc3 : 1;
187 unsigned int pc4 : 1;
188 unsigned int pc5 : 1;
189 unsigned int pc6 : 1;
190 unsigned int pc7 : 1;
191 unsigned int pc8 : 1;
192 unsigned int pc9 : 1;
193 unsigned int pc10 : 1;
194 unsigned int pc11 : 1;
195 unsigned int pc12 : 1;
196 unsigned int pc13 : 1;
197 unsigned int pc14 : 1;
198 unsigned int pc15 : 1;
199 unsigned int pc16 : 1;
200 unsigned int pc17 : 1;
201 unsigned int dummy1 : 14;
202} reg_pinmux_rw_pc_gio;
203#define REG_RD_ADDR_pinmux_rw_pc_gio 16
204#define REG_WR_ADDR_pinmux_rw_pc_gio 16
205
206/* Register rw_pc_iop, scope pinmux, type rw */
207typedef struct {
208 unsigned int pc0 : 1;
209 unsigned int pc1 : 1;
210 unsigned int pc2 : 1;
211 unsigned int pc3 : 1;
212 unsigned int pc4 : 1;
213 unsigned int pc5 : 1;
214 unsigned int pc6 : 1;
215 unsigned int pc7 : 1;
216 unsigned int pc8 : 1;
217 unsigned int pc9 : 1;
218 unsigned int pc10 : 1;
219 unsigned int pc11 : 1;
220 unsigned int pc12 : 1;
221 unsigned int pc13 : 1;
222 unsigned int pc14 : 1;
223 unsigned int pc15 : 1;
224 unsigned int pc16 : 1;
225 unsigned int pc17 : 1;
226 unsigned int dummy1 : 14;
227} reg_pinmux_rw_pc_iop;
228#define REG_RD_ADDR_pinmux_rw_pc_iop 20
229#define REG_WR_ADDR_pinmux_rw_pc_iop 20
230
231/* Register rw_pd_gio, scope pinmux, type rw */
232typedef struct {
233 unsigned int pd0 : 1;
234 unsigned int pd1 : 1;
235 unsigned int pd2 : 1;
236 unsigned int pd3 : 1;
237 unsigned int pd4 : 1;
238 unsigned int pd5 : 1;
239 unsigned int pd6 : 1;
240 unsigned int pd7 : 1;
241 unsigned int pd8 : 1;
242 unsigned int pd9 : 1;
243 unsigned int pd10 : 1;
244 unsigned int pd11 : 1;
245 unsigned int pd12 : 1;
246 unsigned int pd13 : 1;
247 unsigned int pd14 : 1;
248 unsigned int pd15 : 1;
249 unsigned int pd16 : 1;
250 unsigned int pd17 : 1;
251 unsigned int dummy1 : 14;
252} reg_pinmux_rw_pd_gio;
253#define REG_RD_ADDR_pinmux_rw_pd_gio 24
254#define REG_WR_ADDR_pinmux_rw_pd_gio 24
255
256/* Register rw_pd_iop, scope pinmux, type rw */
257typedef struct {
258 unsigned int pd0 : 1;
259 unsigned int pd1 : 1;
260 unsigned int pd2 : 1;
261 unsigned int pd3 : 1;
262 unsigned int pd4 : 1;
263 unsigned int pd5 : 1;
264 unsigned int pd6 : 1;
265 unsigned int pd7 : 1;
266 unsigned int pd8 : 1;
267 unsigned int pd9 : 1;
268 unsigned int pd10 : 1;
269 unsigned int pd11 : 1;
270 unsigned int pd12 : 1;
271 unsigned int pd13 : 1;
272 unsigned int pd14 : 1;
273 unsigned int pd15 : 1;
274 unsigned int pd16 : 1;
275 unsigned int pd17 : 1;
276 unsigned int dummy1 : 14;
277} reg_pinmux_rw_pd_iop;
278#define REG_RD_ADDR_pinmux_rw_pd_iop 28
279#define REG_WR_ADDR_pinmux_rw_pd_iop 28
280
281/* Register rw_pe_gio, scope pinmux, type rw */
282typedef struct {
283 unsigned int pe0 : 1;
284 unsigned int pe1 : 1;
285 unsigned int pe2 : 1;
286 unsigned int pe3 : 1;
287 unsigned int pe4 : 1;
288 unsigned int pe5 : 1;
289 unsigned int pe6 : 1;
290 unsigned int pe7 : 1;
291 unsigned int pe8 : 1;
292 unsigned int pe9 : 1;
293 unsigned int pe10 : 1;
294 unsigned int pe11 : 1;
295 unsigned int pe12 : 1;
296 unsigned int pe13 : 1;
297 unsigned int pe14 : 1;
298 unsigned int pe15 : 1;
299 unsigned int pe16 : 1;
300 unsigned int pe17 : 1;
301 unsigned int dummy1 : 14;
302} reg_pinmux_rw_pe_gio;
303#define REG_RD_ADDR_pinmux_rw_pe_gio 32
304#define REG_WR_ADDR_pinmux_rw_pe_gio 32
305
306/* Register rw_pe_iop, scope pinmux, type rw */
307typedef struct {
308 unsigned int pe0 : 1;
309 unsigned int pe1 : 1;
310 unsigned int pe2 : 1;
311 unsigned int pe3 : 1;
312 unsigned int pe4 : 1;
313 unsigned int pe5 : 1;
314 unsigned int pe6 : 1;
315 unsigned int pe7 : 1;
316 unsigned int pe8 : 1;
317 unsigned int pe9 : 1;
318 unsigned int pe10 : 1;
319 unsigned int pe11 : 1;
320 unsigned int pe12 : 1;
321 unsigned int pe13 : 1;
322 unsigned int pe14 : 1;
323 unsigned int pe15 : 1;
324 unsigned int pe16 : 1;
325 unsigned int pe17 : 1;
326 unsigned int dummy1 : 14;
327} reg_pinmux_rw_pe_iop;
328#define REG_RD_ADDR_pinmux_rw_pe_iop 36
329#define REG_WR_ADDR_pinmux_rw_pe_iop 36
330
331/* Register rw_usb_phy, scope pinmux, type rw */
332typedef struct {
333 unsigned int en_usb0 : 1;
334 unsigned int en_usb1 : 1;
335 unsigned int dummy1 : 30;
336} reg_pinmux_rw_usb_phy;
337#define REG_RD_ADDR_pinmux_rw_usb_phy 40
338#define REG_WR_ADDR_pinmux_rw_usb_phy 40
339
340
341/* Constants */
342enum {
343 regk_pinmux_no = 0x00000000,
344 regk_pinmux_rw_hwprot_default = 0x00000000,
345 regk_pinmux_rw_pa_default = 0x00000000,
346 regk_pinmux_rw_pb_gio_default = 0x00000000,
347 regk_pinmux_rw_pb_iop_default = 0x00000000,
348 regk_pinmux_rw_pc_gio_default = 0x00000000,
349 regk_pinmux_rw_pc_iop_default = 0x00000000,
350 regk_pinmux_rw_pd_gio_default = 0x00000000,
351 regk_pinmux_rw_pd_iop_default = 0x00000000,
352 regk_pinmux_rw_pe_gio_default = 0x00000000,
353 regk_pinmux_rw_pe_iop_default = 0x00000000,
354 regk_pinmux_rw_usb_phy_default = 0x00000000,
355 regk_pinmux_yes = 0x00000001
356};
357#endif /* __pinmux_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/reg_rdwr.h b/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
deleted file mode 100644
index 236f91efe7e8..000000000000
--- a/include/asm-cris/arch-v32/hwregs/reg_rdwr.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * Read/write register macros used by *_defs.h
3 */
4
5#ifndef reg_rdwr_h
6#define reg_rdwr_h
7
8#ifndef REG_READ
9#define REG_READ(type, addr) (*((volatile type *) (addr)))
10#endif
11
12#ifndef REG_WRITE
13#define REG_WRITE(type, addr, val) \
14 do { *((volatile type *) (addr)) = (val); } while(0)
15#endif
16
17#endif
diff --git a/include/asm-cris/arch-v32/hwregs/rt_trace_defs.h b/include/asm-cris/arch-v32/hwregs/rt_trace_defs.h
deleted file mode 100644
index d9f0e924fb23..000000000000
--- a/include/asm-cris/arch-v32/hwregs/rt_trace_defs.h
+++ /dev/null
@@ -1,173 +0,0 @@
1#ifndef __rt_trace_defs_h
2#define __rt_trace_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/rt_trace/rtl/rt_regs.r
7 * id: rt_regs.r,v 1.18 2005/02/08 15:45:00 stefans Exp
8 * last modfied: Mon Apr 11 16:09:14 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile rt_trace_defs.h ../../inst/rt_trace/rtl/rt_regs.r
11 * id: $Id: rt_trace_defs.h,v 1.1 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope rt_trace */
86
87/* Register rw_cfg, scope rt_trace, type rw */
88typedef struct {
89 unsigned int en : 1;
90 unsigned int mode : 1;
91 unsigned int owner : 1;
92 unsigned int wp : 1;
93 unsigned int stall : 1;
94 unsigned int dummy1 : 3;
95 unsigned int wp_start : 7;
96 unsigned int dummy2 : 1;
97 unsigned int wp_stop : 7;
98 unsigned int dummy3 : 9;
99} reg_rt_trace_rw_cfg;
100#define REG_RD_ADDR_rt_trace_rw_cfg 0
101#define REG_WR_ADDR_rt_trace_rw_cfg 0
102
103/* Register rw_tap_ctrl, scope rt_trace, type rw */
104typedef struct {
105 unsigned int ack_data : 1;
106 unsigned int ack_guru : 1;
107 unsigned int dummy1 : 30;
108} reg_rt_trace_rw_tap_ctrl;
109#define REG_RD_ADDR_rt_trace_rw_tap_ctrl 4
110#define REG_WR_ADDR_rt_trace_rw_tap_ctrl 4
111
112/* Register r_tap_stat, scope rt_trace, type r */
113typedef struct {
114 unsigned int dav : 1;
115 unsigned int empty : 1;
116 unsigned int dummy1 : 30;
117} reg_rt_trace_r_tap_stat;
118#define REG_RD_ADDR_rt_trace_r_tap_stat 8
119
120/* Register rw_tap_data, scope rt_trace, type rw */
121typedef unsigned int reg_rt_trace_rw_tap_data;
122#define REG_RD_ADDR_rt_trace_rw_tap_data 12
123#define REG_WR_ADDR_rt_trace_rw_tap_data 12
124
125/* Register rw_tap_hdata, scope rt_trace, type rw */
126typedef struct {
127 unsigned int op : 4;
128 unsigned int sub_op : 4;
129 unsigned int dummy1 : 24;
130} reg_rt_trace_rw_tap_hdata;
131#define REG_RD_ADDR_rt_trace_rw_tap_hdata 16
132#define REG_WR_ADDR_rt_trace_rw_tap_hdata 16
133
134/* Register r_redir, scope rt_trace, type r */
135typedef unsigned int reg_rt_trace_r_redir;
136#define REG_RD_ADDR_rt_trace_r_redir 20
137
138
139/* Constants */
140enum {
141 regk_rt_trace_brk = 0x0000000c,
142 regk_rt_trace_dbg = 0x00000003,
143 regk_rt_trace_dbgdi = 0x00000004,
144 regk_rt_trace_dbgdo = 0x00000005,
145 regk_rt_trace_gmode = 0x00000000,
146 regk_rt_trace_no = 0x00000000,
147 regk_rt_trace_nop = 0x00000000,
148 regk_rt_trace_normal = 0x00000000,
149 regk_rt_trace_rdmem = 0x00000007,
150 regk_rt_trace_rdmemb = 0x00000009,
151 regk_rt_trace_rdpreg = 0x00000002,
152 regk_rt_trace_rdreg = 0x00000001,
153 regk_rt_trace_rdsreg = 0x00000003,
154 regk_rt_trace_redir = 0x00000006,
155 regk_rt_trace_ret = 0x0000000b,
156 regk_rt_trace_rw_cfg_default = 0x00000000,
157 regk_rt_trace_trcfg = 0x00000001,
158 regk_rt_trace_wp = 0x00000001,
159 regk_rt_trace_wp0 = 0x00000001,
160 regk_rt_trace_wp1 = 0x00000002,
161 regk_rt_trace_wp2 = 0x00000004,
162 regk_rt_trace_wp3 = 0x00000008,
163 regk_rt_trace_wp4 = 0x00000010,
164 regk_rt_trace_wp5 = 0x00000020,
165 regk_rt_trace_wp6 = 0x00000040,
166 regk_rt_trace_wrmem = 0x00000008,
167 regk_rt_trace_wrmemb = 0x0000000a,
168 regk_rt_trace_wrpreg = 0x00000005,
169 regk_rt_trace_wrreg = 0x00000004,
170 regk_rt_trace_wrsreg = 0x00000006,
171 regk_rt_trace_yes = 0x00000001
172};
173#endif /* __rt_trace_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/ser_defs.h b/include/asm-cris/arch-v32/hwregs/ser_defs.h
deleted file mode 100644
index 01c2fab97d43..000000000000
--- a/include/asm-cris/arch-v32/hwregs/ser_defs.h
+++ /dev/null
@@ -1,308 +0,0 @@
1#ifndef __ser_defs_h
2#define __ser_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/ser/rtl/ser_regs.r
7 * id: ser_regs.r,v 1.23 2005/02/08 13:58:35 perz Exp
8 * last modfied: Mon Apr 11 16:09:21 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile ser_defs.h ../../inst/ser/rtl/ser_regs.r
11 * id: $Id: ser_defs.h,v 1.10 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope ser */
86
87/* Register rw_tr_ctrl, scope ser, type rw */
88typedef struct {
89 unsigned int base_freq : 3;
90 unsigned int en : 1;
91 unsigned int par : 2;
92 unsigned int par_en : 1;
93 unsigned int data_bits : 1;
94 unsigned int stop_bits : 1;
95 unsigned int stop : 1;
96 unsigned int rts_delay : 3;
97 unsigned int rts_setup : 1;
98 unsigned int auto_rts : 1;
99 unsigned int txd : 1;
100 unsigned int auto_cts : 1;
101 unsigned int dummy1 : 15;
102} reg_ser_rw_tr_ctrl;
103#define REG_RD_ADDR_ser_rw_tr_ctrl 0
104#define REG_WR_ADDR_ser_rw_tr_ctrl 0
105
106/* Register rw_tr_dma_en, scope ser, type rw */
107typedef struct {
108 unsigned int en : 1;
109 unsigned int dummy1 : 31;
110} reg_ser_rw_tr_dma_en;
111#define REG_RD_ADDR_ser_rw_tr_dma_en 4
112#define REG_WR_ADDR_ser_rw_tr_dma_en 4
113
114/* Register rw_rec_ctrl, scope ser, type rw */
115typedef struct {
116 unsigned int base_freq : 3;
117 unsigned int en : 1;
118 unsigned int par : 2;
119 unsigned int par_en : 1;
120 unsigned int data_bits : 1;
121 unsigned int dma_mode : 1;
122 unsigned int dma_err : 1;
123 unsigned int sampling : 1;
124 unsigned int timeout : 3;
125 unsigned int auto_eop : 1;
126 unsigned int half_duplex : 1;
127 unsigned int rts_n : 1;
128 unsigned int loopback : 1;
129 unsigned int dummy1 : 14;
130} reg_ser_rw_rec_ctrl;
131#define REG_RD_ADDR_ser_rw_rec_ctrl 8
132#define REG_WR_ADDR_ser_rw_rec_ctrl 8
133
134/* Register rw_tr_baud_div, scope ser, type rw */
135typedef struct {
136 unsigned int div : 16;
137 unsigned int dummy1 : 16;
138} reg_ser_rw_tr_baud_div;
139#define REG_RD_ADDR_ser_rw_tr_baud_div 12
140#define REG_WR_ADDR_ser_rw_tr_baud_div 12
141
142/* Register rw_rec_baud_div, scope ser, type rw */
143typedef struct {
144 unsigned int div : 16;
145 unsigned int dummy1 : 16;
146} reg_ser_rw_rec_baud_div;
147#define REG_RD_ADDR_ser_rw_rec_baud_div 16
148#define REG_WR_ADDR_ser_rw_rec_baud_div 16
149
150/* Register rw_xoff, scope ser, type rw */
151typedef struct {
152 unsigned int chr : 8;
153 unsigned int automatic : 1;
154 unsigned int dummy1 : 23;
155} reg_ser_rw_xoff;
156#define REG_RD_ADDR_ser_rw_xoff 20
157#define REG_WR_ADDR_ser_rw_xoff 20
158
159/* Register rw_xoff_clr, scope ser, type rw */
160typedef struct {
161 unsigned int clr : 1;
162 unsigned int dummy1 : 31;
163} reg_ser_rw_xoff_clr;
164#define REG_RD_ADDR_ser_rw_xoff_clr 24
165#define REG_WR_ADDR_ser_rw_xoff_clr 24
166
167/* Register rw_dout, scope ser, type rw */
168typedef struct {
169 unsigned int data : 8;
170 unsigned int dummy1 : 24;
171} reg_ser_rw_dout;
172#define REG_RD_ADDR_ser_rw_dout 28
173#define REG_WR_ADDR_ser_rw_dout 28
174
175/* Register rs_stat_din, scope ser, type rs */
176typedef struct {
177 unsigned int data : 8;
178 unsigned int dummy1 : 8;
179 unsigned int dav : 1;
180 unsigned int framing_err : 1;
181 unsigned int par_err : 1;
182 unsigned int orun : 1;
183 unsigned int rec_err : 1;
184 unsigned int rxd : 1;
185 unsigned int tr_idle : 1;
186 unsigned int tr_empty : 1;
187 unsigned int tr_rdy : 1;
188 unsigned int cts_n : 1;
189 unsigned int xoff_detect : 1;
190 unsigned int rts_n : 1;
191 unsigned int txd : 1;
192 unsigned int dummy2 : 3;
193} reg_ser_rs_stat_din;
194#define REG_RD_ADDR_ser_rs_stat_din 32
195
196/* Register r_stat_din, scope ser, type r */
197typedef struct {
198 unsigned int data : 8;
199 unsigned int dummy1 : 8;
200 unsigned int dav : 1;
201 unsigned int framing_err : 1;
202 unsigned int par_err : 1;
203 unsigned int orun : 1;
204 unsigned int rec_err : 1;
205 unsigned int rxd : 1;
206 unsigned int tr_idle : 1;
207 unsigned int tr_empty : 1;
208 unsigned int tr_rdy : 1;
209 unsigned int cts_n : 1;
210 unsigned int xoff_detect : 1;
211 unsigned int rts_n : 1;
212 unsigned int txd : 1;
213 unsigned int dummy2 : 3;
214} reg_ser_r_stat_din;
215#define REG_RD_ADDR_ser_r_stat_din 36
216
217/* Register rw_rec_eop, scope ser, type rw */
218typedef struct {
219 unsigned int set : 1;
220 unsigned int dummy1 : 31;
221} reg_ser_rw_rec_eop;
222#define REG_RD_ADDR_ser_rw_rec_eop 40
223#define REG_WR_ADDR_ser_rw_rec_eop 40
224
225/* Register rw_intr_mask, scope ser, type rw */
226typedef struct {
227 unsigned int tr_rdy : 1;
228 unsigned int tr_empty : 1;
229 unsigned int tr_idle : 1;
230 unsigned int dav : 1;
231 unsigned int dummy1 : 28;
232} reg_ser_rw_intr_mask;
233#define REG_RD_ADDR_ser_rw_intr_mask 44
234#define REG_WR_ADDR_ser_rw_intr_mask 44
235
236/* Register rw_ack_intr, scope ser, type rw */
237typedef struct {
238 unsigned int tr_rdy : 1;
239 unsigned int tr_empty : 1;
240 unsigned int tr_idle : 1;
241 unsigned int dav : 1;
242 unsigned int dummy1 : 28;
243} reg_ser_rw_ack_intr;
244#define REG_RD_ADDR_ser_rw_ack_intr 48
245#define REG_WR_ADDR_ser_rw_ack_intr 48
246
247/* Register r_intr, scope ser, type r */
248typedef struct {
249 unsigned int tr_rdy : 1;
250 unsigned int tr_empty : 1;
251 unsigned int tr_idle : 1;
252 unsigned int dav : 1;
253 unsigned int dummy1 : 28;
254} reg_ser_r_intr;
255#define REG_RD_ADDR_ser_r_intr 52
256
257/* Register r_masked_intr, scope ser, type r */
258typedef struct {
259 unsigned int tr_rdy : 1;
260 unsigned int tr_empty : 1;
261 unsigned int tr_idle : 1;
262 unsigned int dav : 1;
263 unsigned int dummy1 : 28;
264} reg_ser_r_masked_intr;
265#define REG_RD_ADDR_ser_r_masked_intr 56
266
267
268/* Constants */
269enum {
270 regk_ser_active = 0x00000000,
271 regk_ser_bits1 = 0x00000000,
272 regk_ser_bits2 = 0x00000001,
273 regk_ser_bits7 = 0x00000001,
274 regk_ser_bits8 = 0x00000000,
275 regk_ser_del0_5 = 0x00000000,
276 regk_ser_del1 = 0x00000001,
277 regk_ser_del1_5 = 0x00000002,
278 regk_ser_del2 = 0x00000003,
279 regk_ser_del2_5 = 0x00000004,
280 regk_ser_del3 = 0x00000005,
281 regk_ser_del3_5 = 0x00000006,
282 regk_ser_del4 = 0x00000007,
283 regk_ser_even = 0x00000000,
284 regk_ser_ext = 0x00000001,
285 regk_ser_f100 = 0x00000007,
286 regk_ser_f29_493 = 0x00000004,
287 regk_ser_f32 = 0x00000005,
288 regk_ser_f32_768 = 0x00000006,
289 regk_ser_ignore = 0x00000001,
290 regk_ser_inactive = 0x00000001,
291 regk_ser_majority = 0x00000001,
292 regk_ser_mark = 0x00000002,
293 regk_ser_middle = 0x00000000,
294 regk_ser_no = 0x00000000,
295 regk_ser_odd = 0x00000001,
296 regk_ser_off = 0x00000000,
297 regk_ser_rw_intr_mask_default = 0x00000000,
298 regk_ser_rw_rec_baud_div_default = 0x00000000,
299 regk_ser_rw_rec_ctrl_default = 0x00010000,
300 regk_ser_rw_tr_baud_div_default = 0x00000000,
301 regk_ser_rw_tr_ctrl_default = 0x00008000,
302 regk_ser_rw_tr_dma_en_default = 0x00000000,
303 regk_ser_rw_xoff_default = 0x00000000,
304 regk_ser_space = 0x00000003,
305 regk_ser_stop = 0x00000000,
306 regk_ser_yes = 0x00000001
307};
308#endif /* __ser_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/sser_defs.h b/include/asm-cris/arch-v32/hwregs/sser_defs.h
deleted file mode 100644
index 8d1dab218b91..000000000000
--- a/include/asm-cris/arch-v32/hwregs/sser_defs.h
+++ /dev/null
@@ -1,331 +0,0 @@
1#ifndef __sser_defs_h
2#define __sser_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/syncser/rtl/sser_regs.r
7 * id: sser_regs.r,v 1.24 2005/02/11 14:27:36 gunnard Exp
8 * last modfied: Mon Apr 11 16:09:48 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile sser_defs.h ../../inst/syncser/rtl/sser_regs.r
11 * id: $Id: sser_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope sser */
86
87/* Register rw_cfg, scope sser, type rw */
88typedef struct {
89 unsigned int clk_div : 16;
90 unsigned int base_freq : 3;
91 unsigned int gate_clk : 1;
92 unsigned int clkgate_ctrl : 1;
93 unsigned int clkgate_in : 1;
94 unsigned int clk_dir : 1;
95 unsigned int clk_od_mode : 1;
96 unsigned int out_clk_pol : 1;
97 unsigned int out_clk_src : 2;
98 unsigned int clk_in_sel : 1;
99 unsigned int hold_pol : 1;
100 unsigned int prepare : 1;
101 unsigned int en : 1;
102 unsigned int dummy1 : 1;
103} reg_sser_rw_cfg;
104#define REG_RD_ADDR_sser_rw_cfg 0
105#define REG_WR_ADDR_sser_rw_cfg 0
106
107/* Register rw_frm_cfg, scope sser, type rw */
108typedef struct {
109 unsigned int wordrate : 10;
110 unsigned int rec_delay : 3;
111 unsigned int tr_delay : 3;
112 unsigned int early_wend : 1;
113 unsigned int level : 2;
114 unsigned int type : 1;
115 unsigned int clk_pol : 1;
116 unsigned int fr_in_rxclk : 1;
117 unsigned int clk_src : 1;
118 unsigned int out_off : 1;
119 unsigned int out_on : 1;
120 unsigned int frame_pin_dir : 1;
121 unsigned int frame_pin_use : 2;
122 unsigned int status_pin_dir : 1;
123 unsigned int status_pin_use : 2;
124 unsigned int dummy1 : 1;
125} reg_sser_rw_frm_cfg;
126#define REG_RD_ADDR_sser_rw_frm_cfg 4
127#define REG_WR_ADDR_sser_rw_frm_cfg 4
128
129/* Register rw_tr_cfg, scope sser, type rw */
130typedef struct {
131 unsigned int tr_en : 1;
132 unsigned int stop : 1;
133 unsigned int urun_stop : 1;
134 unsigned int eop_stop : 1;
135 unsigned int sample_size : 6;
136 unsigned int sh_dir : 1;
137 unsigned int clk_pol : 1;
138 unsigned int clk_src : 1;
139 unsigned int use_dma : 1;
140 unsigned int mode : 2;
141 unsigned int frm_src : 1;
142 unsigned int use60958 : 1;
143 unsigned int iec60958_ckdiv : 2;
144 unsigned int rate_ctrl : 1;
145 unsigned int use_md : 1;
146 unsigned int dual_i2s : 1;
147 unsigned int data_pin_use : 2;
148 unsigned int od_mode : 1;
149 unsigned int bulk_wspace : 2;
150 unsigned int dummy1 : 4;
151} reg_sser_rw_tr_cfg;
152#define REG_RD_ADDR_sser_rw_tr_cfg 8
153#define REG_WR_ADDR_sser_rw_tr_cfg 8
154
155/* Register rw_rec_cfg, scope sser, type rw */
156typedef struct {
157 unsigned int rec_en : 1;
158 unsigned int force_eop : 1;
159 unsigned int stop : 1;
160 unsigned int orun_stop : 1;
161 unsigned int eop_stop : 1;
162 unsigned int sample_size : 6;
163 unsigned int sh_dir : 1;
164 unsigned int clk_pol : 1;
165 unsigned int clk_src : 1;
166 unsigned int use_dma : 1;
167 unsigned int mode : 2;
168 unsigned int frm_src : 2;
169 unsigned int use60958 : 1;
170 unsigned int iec60958_ui_len : 5;
171 unsigned int slave2_en : 1;
172 unsigned int slave3_en : 1;
173 unsigned int fifo_thr : 2;
174 unsigned int dummy1 : 3;
175} reg_sser_rw_rec_cfg;
176#define REG_RD_ADDR_sser_rw_rec_cfg 12
177#define REG_WR_ADDR_sser_rw_rec_cfg 12
178
179/* Register rw_tr_data, scope sser, type rw */
180typedef struct {
181 unsigned int data : 16;
182 unsigned int md : 1;
183 unsigned int dummy1 : 15;
184} reg_sser_rw_tr_data;
185#define REG_RD_ADDR_sser_rw_tr_data 16
186#define REG_WR_ADDR_sser_rw_tr_data 16
187
188/* Register r_rec_data, scope sser, type r */
189typedef struct {
190 unsigned int data : 16;
191 unsigned int md : 1;
192 unsigned int ext_clk : 1;
193 unsigned int status_in : 1;
194 unsigned int frame_in : 1;
195 unsigned int din : 1;
196 unsigned int data_in : 1;
197 unsigned int clk_in : 1;
198 unsigned int dummy1 : 9;
199} reg_sser_r_rec_data;
200#define REG_RD_ADDR_sser_r_rec_data 20
201
202/* Register rw_extra, scope sser, type rw */
203typedef struct {
204 unsigned int clkoff_cycles : 20;
205 unsigned int clkoff_en : 1;
206 unsigned int clkon_en : 1;
207 unsigned int dout_delay : 5;
208 unsigned int dummy1 : 5;
209} reg_sser_rw_extra;
210#define REG_RD_ADDR_sser_rw_extra 24
211#define REG_WR_ADDR_sser_rw_extra 24
212
213/* Register rw_intr_mask, scope sser, type rw */
214typedef struct {
215 unsigned int trdy : 1;
216 unsigned int rdav : 1;
217 unsigned int tidle : 1;
218 unsigned int rstop : 1;
219 unsigned int urun : 1;
220 unsigned int orun : 1;
221 unsigned int md_rec : 1;
222 unsigned int md_sent : 1;
223 unsigned int r958err : 1;
224 unsigned int dummy1 : 23;
225} reg_sser_rw_intr_mask;
226#define REG_RD_ADDR_sser_rw_intr_mask 28
227#define REG_WR_ADDR_sser_rw_intr_mask 28
228
229/* Register rw_ack_intr, scope sser, type rw */
230typedef struct {
231 unsigned int trdy : 1;
232 unsigned int rdav : 1;
233 unsigned int tidle : 1;
234 unsigned int rstop : 1;
235 unsigned int urun : 1;
236 unsigned int orun : 1;
237 unsigned int md_rec : 1;
238 unsigned int md_sent : 1;
239 unsigned int r958err : 1;
240 unsigned int dummy1 : 23;
241} reg_sser_rw_ack_intr;
242#define REG_RD_ADDR_sser_rw_ack_intr 32
243#define REG_WR_ADDR_sser_rw_ack_intr 32
244
245/* Register r_intr, scope sser, type r */
246typedef struct {
247 unsigned int trdy : 1;
248 unsigned int rdav : 1;
249 unsigned int tidle : 1;
250 unsigned int rstop : 1;
251 unsigned int urun : 1;
252 unsigned int orun : 1;
253 unsigned int md_rec : 1;
254 unsigned int md_sent : 1;
255 unsigned int r958err : 1;
256 unsigned int dummy1 : 23;
257} reg_sser_r_intr;
258#define REG_RD_ADDR_sser_r_intr 36
259
260/* Register r_masked_intr, scope sser, type r */
261typedef struct {
262 unsigned int trdy : 1;
263 unsigned int rdav : 1;
264 unsigned int tidle : 1;
265 unsigned int rstop : 1;
266 unsigned int urun : 1;
267 unsigned int orun : 1;
268 unsigned int md_rec : 1;
269 unsigned int md_sent : 1;
270 unsigned int r958err : 1;
271 unsigned int dummy1 : 23;
272} reg_sser_r_masked_intr;
273#define REG_RD_ADDR_sser_r_masked_intr 40
274
275
276/* Constants */
277enum {
278 regk_sser_both = 0x00000002,
279 regk_sser_bulk = 0x00000001,
280 regk_sser_clk100 = 0x00000000,
281 regk_sser_clk_in = 0x00000000,
282 regk_sser_const0 = 0x00000003,
283 regk_sser_dout = 0x00000002,
284 regk_sser_edge = 0x00000000,
285 regk_sser_ext = 0x00000001,
286 regk_sser_ext_clk = 0x00000001,
287 regk_sser_f100 = 0x00000000,
288 regk_sser_f29_493 = 0x00000004,
289 regk_sser_f32 = 0x00000005,
290 regk_sser_f32_768 = 0x00000006,
291 regk_sser_frm = 0x00000003,
292 regk_sser_gio0 = 0x00000000,
293 regk_sser_gio1 = 0x00000001,
294 regk_sser_hispeed = 0x00000001,
295 regk_sser_hold = 0x00000002,
296 regk_sser_in = 0x00000000,
297 regk_sser_inf = 0x00000003,
298 regk_sser_intern = 0x00000000,
299 regk_sser_intern_clk = 0x00000001,
300 regk_sser_intern_tb = 0x00000000,
301 regk_sser_iso = 0x00000000,
302 regk_sser_level = 0x00000001,
303 regk_sser_lospeed = 0x00000000,
304 regk_sser_lsbfirst = 0x00000000,
305 regk_sser_msbfirst = 0x00000001,
306 regk_sser_neg = 0x00000001,
307 regk_sser_neg_lo = 0x00000000,
308 regk_sser_no = 0x00000000,
309 regk_sser_no_clk = 0x00000007,
310 regk_sser_nojitter = 0x00000002,
311 regk_sser_out = 0x00000001,
312 regk_sser_pos = 0x00000000,
313 regk_sser_pos_hi = 0x00000001,
314 regk_sser_rec = 0x00000000,
315 regk_sser_rw_cfg_default = 0x00000000,
316 regk_sser_rw_extra_default = 0x00000000,
317 regk_sser_rw_frm_cfg_default = 0x00000000,
318 regk_sser_rw_intr_mask_default = 0x00000000,
319 regk_sser_rw_rec_cfg_default = 0x00000000,
320 regk_sser_rw_tr_cfg_default = 0x01800000,
321 regk_sser_rw_tr_data_default = 0x00000000,
322 regk_sser_thr16 = 0x00000001,
323 regk_sser_thr32 = 0x00000002,
324 regk_sser_thr8 = 0x00000000,
325 regk_sser_tr = 0x00000001,
326 regk_sser_ts_out = 0x00000003,
327 regk_sser_tx_bulk = 0x00000002,
328 regk_sser_wiresave = 0x00000002,
329 regk_sser_yes = 0x00000001
330};
331#endif /* __sser_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/strcop.h b/include/asm-cris/arch-v32/hwregs/strcop.h
deleted file mode 100644
index 35131ba466f3..000000000000
--- a/include/asm-cris/arch-v32/hwregs/strcop.h
+++ /dev/null
@@ -1,57 +0,0 @@
1// $Id: strcop.h,v 1.3 2003/10/22 13:27:12 henriken Exp $
2
3// Streamcop meta-data configuration structs
4
5struct strcop_meta_out {
6 unsigned char csumsel : 3;
7 unsigned char ciphsel : 3;
8 unsigned char ciphconf : 2;
9 unsigned char hashsel : 3;
10 unsigned char hashconf : 1;
11 unsigned char hashmode : 1;
12 unsigned char decrypt : 1;
13 unsigned char dlkey : 1;
14 unsigned char cbcmode : 1;
15};
16
17struct strcop_meta_in {
18 unsigned char dmasel : 3;
19 unsigned char sync : 1;
20 unsigned char res1 : 5;
21 unsigned char res2;
22};
23
24// Source definitions
25
26enum {
27 src_none = 0,
28 src_dma = 1,
29 src_des = 2,
30 src_sha1 = 3,
31 src_csum = 4,
32 src_aes = 5,
33 src_md5 = 6,
34 src_res = 7
35};
36
37// Cipher definitions
38
39enum {
40 ciph_des = 0,
41 ciph_3des = 1,
42 ciph_aes = 2
43};
44
45// Hash definitions
46
47enum {
48 hash_sha1 = 0,
49 hash_md5 = 1
50};
51
52enum {
53 hash_noiv = 0,
54 hash_iv = 1
55};
56
57
diff --git a/include/asm-cris/arch-v32/hwregs/strcop_defs.h b/include/asm-cris/arch-v32/hwregs/strcop_defs.h
deleted file mode 100644
index bd145a49b2c4..000000000000
--- a/include/asm-cris/arch-v32/hwregs/strcop_defs.h
+++ /dev/null
@@ -1,109 +0,0 @@
1#ifndef __strcop_defs_h
2#define __strcop_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/strcop/rtl/strcop_regs.r
7 * id: strcop_regs.r,v 1.5 2003/10/15 12:09:45 kriskn Exp
8 * last modfied: Mon Apr 11 16:09:38 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile strcop_defs.h ../../inst/strcop/rtl/strcop_regs.r
11 * id: $Id: strcop_defs.h,v 1.7 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope strcop */
86
87/* Register rw_cfg, scope strcop, type rw */
88typedef struct {
89 unsigned int td3 : 1;
90 unsigned int td2 : 1;
91 unsigned int td1 : 1;
92 unsigned int ipend : 1;
93 unsigned int ignore_sync : 1;
94 unsigned int en : 1;
95 unsigned int dummy1 : 26;
96} reg_strcop_rw_cfg;
97#define REG_RD_ADDR_strcop_rw_cfg 0
98#define REG_WR_ADDR_strcop_rw_cfg 0
99
100
101/* Constants */
102enum {
103 regk_strcop_big = 0x00000001,
104 regk_strcop_d = 0x00000001,
105 regk_strcop_e = 0x00000000,
106 regk_strcop_little = 0x00000000,
107 regk_strcop_rw_cfg_default = 0x00000002
108};
109#endif /* __strcop_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/strmux_defs.h b/include/asm-cris/arch-v32/hwregs/strmux_defs.h
deleted file mode 100644
index 67474855c499..000000000000
--- a/include/asm-cris/arch-v32/hwregs/strmux_defs.h
+++ /dev/null
@@ -1,127 +0,0 @@
1#ifndef __strmux_defs_h
2#define __strmux_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/strmux/rtl/guinness/strmux_regs.r
7 * id: strmux_regs.r,v 1.10 2005/02/10 10:10:46 perz Exp
8 * last modfied: Mon Apr 11 16:09:43 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile strmux_defs.h ../../inst/strmux/rtl/guinness/strmux_regs.r
11 * id: $Id: strmux_defs.h,v 1.5 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope strmux */
86
87/* Register rw_cfg, scope strmux, type rw */
88typedef struct {
89 unsigned int dma0 : 3;
90 unsigned int dma1 : 3;
91 unsigned int dma2 : 3;
92 unsigned int dma3 : 3;
93 unsigned int dma4 : 3;
94 unsigned int dma5 : 3;
95 unsigned int dma6 : 3;
96 unsigned int dma7 : 3;
97 unsigned int dma8 : 3;
98 unsigned int dma9 : 3;
99 unsigned int dummy1 : 2;
100} reg_strmux_rw_cfg;
101#define REG_RD_ADDR_strmux_rw_cfg 0
102#define REG_WR_ADDR_strmux_rw_cfg 0
103
104
105/* Constants */
106enum {
107 regk_strmux_ata = 0x00000003,
108 regk_strmux_eth0 = 0x00000001,
109 regk_strmux_eth1 = 0x00000004,
110 regk_strmux_ext0 = 0x00000001,
111 regk_strmux_ext1 = 0x00000001,
112 regk_strmux_ext2 = 0x00000001,
113 regk_strmux_ext3 = 0x00000001,
114 regk_strmux_iop0 = 0x00000002,
115 regk_strmux_iop1 = 0x00000001,
116 regk_strmux_off = 0x00000000,
117 regk_strmux_p21 = 0x00000004,
118 regk_strmux_rw_cfg_default = 0x00000000,
119 regk_strmux_ser0 = 0x00000002,
120 regk_strmux_ser1 = 0x00000002,
121 regk_strmux_ser2 = 0x00000004,
122 regk_strmux_ser3 = 0x00000003,
123 regk_strmux_sser0 = 0x00000003,
124 regk_strmux_sser1 = 0x00000003,
125 regk_strmux_strcop = 0x00000002
126};
127#endif /* __strmux_defs_h */
diff --git a/include/asm-cris/arch-v32/hwregs/supp_reg.h b/include/asm-cris/arch-v32/hwregs/supp_reg.h
deleted file mode 100644
index ffe49625ae36..000000000000
--- a/include/asm-cris/arch-v32/hwregs/supp_reg.h
+++ /dev/null
@@ -1,78 +0,0 @@
1#ifndef __SUPP_REG_H__
2#define __SUPP_REG_H__
3
4/* Macros for reading and writing support/special registers. */
5
6#ifndef STRINGIFYFY
7#define STRINGIFYFY(i) #i
8#endif
9
10#ifndef STRINGIFY
11#define STRINGIFY(i) STRINGIFYFY(i)
12#endif
13
14#define SPEC_REG_BZ "BZ"
15#define SPEC_REG_VR "VR"
16#define SPEC_REG_PID "PID"
17#define SPEC_REG_SRS "SRS"
18#define SPEC_REG_WZ "WZ"
19#define SPEC_REG_EXS "EXS"
20#define SPEC_REG_EDA "EDA"
21#define SPEC_REG_MOF "MOF"
22#define SPEC_REG_DZ "DZ"
23#define SPEC_REG_EBP "EBP"
24#define SPEC_REG_ERP "ERP"
25#define SPEC_REG_SRP "SRP"
26#define SPEC_REG_NRP "NRP"
27#define SPEC_REG_CCS "CCS"
28#define SPEC_REG_USP "USP"
29#define SPEC_REG_SPC "SPC"
30
31#define RW_MM_CFG 0
32#define RW_MM_KBASE_LO 1
33#define RW_MM_KBASE_HI 2
34#define RW_MM_CAUSE 3
35#define RW_MM_TLB_SEL 4
36#define RW_MM_TLB_LO 5
37#define RW_MM_TLB_HI 6
38#define RW_MM_TLB_PGD 7
39
40#define BANK_GC 0
41#define BANK_IM 1
42#define BANK_DM 2
43#define BANK_BP 3
44
45#define RW_GC_CFG 0
46#define RW_GC_CCS 1
47#define RW_GC_SRS 2
48#define RW_GC_NRP 3
49#define RW_GC_EXS 4
50#define RW_GC_R0 8
51#define RW_GC_R1 9
52
53#define SPEC_REG_WR(r,v) \
54__asm__ __volatile__ ("move %0, $" r : : "r" (v));
55
56#define SPEC_REG_RD(r,v) \
57__asm__ __volatile__ ("move $" r ",%0" : "=r" (v));
58
59#define NOP() \
60 __asm__ __volatile__ ("nop");
61
62#define SUPP_BANK_SEL(b) \
63 SPEC_REG_WR(SPEC_REG_SRS,b); \
64 NOP(); \
65 NOP(); \
66 NOP();
67
68#define SUPP_REG_WR(r,v) \
69__asm__ __volatile__ ("move %0, $S" STRINGIFYFY(r) "\n\t" \
70 "nop\n\t" \
71 "nop\n\t" \
72 "nop\n\t" \
73 : : "r" (v));
74
75#define SUPP_REG_RD(r,v) \
76__asm__ __volatile__ ("move $S" STRINGIFYFY(r) ",%0" : "=r" (v));
77
78#endif /* __SUPP_REG_H__ */
diff --git a/include/asm-cris/arch-v32/intmem.h b/include/asm-cris/arch-v32/intmem.h
deleted file mode 100644
index c0ada33bf90f..000000000000
--- a/include/asm-cris/arch-v32/intmem.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ASM_CRIS_INTMEM_H
2#define _ASM_CRIS_INTMEM_H
3
4void* crisv32_intmem_alloc(unsigned size, unsigned align);
5void crisv32_intmem_free(void* addr);
6void* crisv32_intmem_phys_to_virt(unsigned long addr);
7unsigned long crisv32_intmem_virt_to_phys(void *addr);
8
9#endif /* _ASM_CRIS_ARCH_INTMEM_H */
diff --git a/include/asm-cris/arch-v32/io.h b/include/asm-cris/arch-v32/io.h
deleted file mode 100644
index 6b38912f29ba..000000000000
--- a/include/asm-cris/arch-v32/io.h
+++ /dev/null
@@ -1,136 +0,0 @@
1#ifndef _ASM_ARCH_CRIS_IO_H
2#define _ASM_ARCH_CRIS_IO_H
3
4#include <linux/spinlock.h>
5#include <hwregs/reg_map.h>
6#include <hwregs/reg_rdwr.h>
7#include <hwregs/gio_defs.h>
8
9enum crisv32_io_dir
10{
11 crisv32_io_dir_in = 0,
12 crisv32_io_dir_out = 1
13};
14
15struct crisv32_ioport
16{
17 volatile unsigned long *oe;
18 volatile unsigned long *data;
19 volatile unsigned long *data_in;
20 unsigned int pin_count;
21 spinlock_t lock;
22};
23
24struct crisv32_iopin
25{
26 struct crisv32_ioport* port;
27 int bit;
28};
29
30extern struct crisv32_ioport crisv32_ioports[];
31
32extern struct crisv32_iopin crisv32_led1_green;
33extern struct crisv32_iopin crisv32_led1_red;
34extern struct crisv32_iopin crisv32_led2_green;
35extern struct crisv32_iopin crisv32_led2_red;
36extern struct crisv32_iopin crisv32_led3_green;
37extern struct crisv32_iopin crisv32_led3_red;
38
39extern struct crisv32_iopin crisv32_led_net0_green;
40extern struct crisv32_iopin crisv32_led_net0_red;
41extern struct crisv32_iopin crisv32_led_net1_green;
42extern struct crisv32_iopin crisv32_led_net1_red;
43
44static inline void crisv32_io_set(struct crisv32_iopin *iopin, int val)
45{
46 long flags;
47 spin_lock_irqsave(&iopin->port->lock, flags);
48
49 if (val)
50 *iopin->port->data |= iopin->bit;
51 else
52 *iopin->port->data &= ~iopin->bit;
53
54 spin_unlock_irqrestore(&iopin->port->lock, flags);
55}
56
57static inline void crisv32_io_set_dir(struct crisv32_iopin* iopin,
58 enum crisv32_io_dir dir)
59{
60 long flags;
61 spin_lock_irqsave(&iopin->port->lock, flags);
62
63 if (dir == crisv32_io_dir_in)
64 *iopin->port->oe &= ~iopin->bit;
65 else
66 *iopin->port->oe |= iopin->bit;
67
68 spin_unlock_irqrestore(&iopin->port->lock, flags);
69}
70
71static inline int crisv32_io_rd(struct crisv32_iopin* iopin)
72{
73 return ((*iopin->port->data_in & iopin->bit) ? 1 : 0);
74}
75
76int crisv32_io_get(struct crisv32_iopin* iopin,
77 unsigned int port, unsigned int pin);
78int crisv32_io_get_name(struct crisv32_iopin* iopin,
79 const char *name);
80
81#define CRIS_LED_OFF 0x00
82#define CRIS_LED_GREEN 0x01
83#define CRIS_LED_RED 0x02
84#define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED)
85
86#if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO))
87#define CRIS_LED_NETWORK_GRP0_SET(x) \
88 do { \
89 CRIS_LED_NETWORK_GRP0_SET_G((x) & CRIS_LED_GREEN); \
90 CRIS_LED_NETWORK_GRP0_SET_R((x) & CRIS_LED_RED); \
91 } while (0)
92#else
93#define CRIS_LED_NETWORK_GRP0_SET(x) while (0) {}
94#endif
95
96#define CRIS_LED_NETWORK_GRP0_SET_G(x) \
97 crisv32_io_set(&crisv32_led_net0_green, !(x));
98
99#define CRIS_LED_NETWORK_GRP0_SET_R(x) \
100 crisv32_io_set(&crisv32_led_net0_red, !(x));
101
102#if defined(CONFIG_ETRAX_NBR_LED_GRP_TWO)
103#define CRIS_LED_NETWORK_GRP1_SET(x) \
104 do { \
105 CRIS_LED_NETWORK_GRP1_SET_G((x) & CRIS_LED_GREEN); \
106 CRIS_LED_NETWORK_GRP1_SET_R((x) & CRIS_LED_RED); \
107 } while (0)
108#else
109#define CRIS_LED_NETWORK_GRP1_SET(x) while (0) {}
110#endif
111
112#define CRIS_LED_NETWORK_GRP1_SET_G(x) \
113 crisv32_io_set(&crisv32_led_net1_green, !(x));
114
115#define CRIS_LED_NETWORK_GRP1_SET_R(x) \
116 crisv32_io_set(&crisv32_led_net1_red, !(x));
117
118#define CRIS_LED_ACTIVE_SET(x) \
119 do { \
120 CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \
121 CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \
122 } while (0)
123
124#define CRIS_LED_ACTIVE_SET_G(x) \
125 crisv32_io_set(&crisv32_led2_green, !(x));
126#define CRIS_LED_ACTIVE_SET_R(x) \
127 crisv32_io_set(&crisv32_led2_red, !(x));
128#define CRIS_LED_DISK_WRITE(x) \
129 do{\
130 crisv32_io_set(&crisv32_led3_green, !(x)); \
131 crisv32_io_set(&crisv32_led3_red, !(x)); \
132 }while(0)
133#define CRIS_LED_DISK_READ(x) \
134 crisv32_io_set(&crisv32_led3_green, !(x));
135
136#endif
diff --git a/include/asm-cris/arch-v32/irq.h b/include/asm-cris/arch-v32/irq.h
deleted file mode 100644
index 9e4c9fbdfddf..000000000000
--- a/include/asm-cris/arch-v32/irq.h
+++ /dev/null
@@ -1,124 +0,0 @@
1#ifndef _ASM_ARCH_IRQ_H
2#define _ASM_ARCH_IRQ_H
3
4#include <hwregs/intr_vect.h>
5
6/* Number of non-cpu interrupts. */
7#define NR_IRQS NBR_INTR_VECT /* Exceptions + IRQs */
8#define FIRST_IRQ 0x31 /* Exception number for first IRQ */
9#define NR_REAL_IRQS (NBR_INTR_VECT - FIRST_IRQ) /* IRQs */
10#if NR_REAL_IRQS > 32
11#define MACH_IRQS 64
12#else
13#define MACH_IRQS 32
14#endif
15
16#ifndef __ASSEMBLY__
17/* Global IRQ vector. */
18typedef void (*irqvectptr)(void);
19
20struct etrax_interrupt_vector {
21 irqvectptr v[256];
22};
23
24extern struct etrax_interrupt_vector *etrax_irv; /* head.S */
25
26void mask_irq(int irq);
27void unmask_irq(int irq);
28
29void set_exception_vector(int n, irqvectptr addr);
30
31/* Save registers so that they match pt_regs. */
32#define SAVE_ALL \
33 "subq 12,$sp\n\t" \
34 "move $erp,[$sp]\n\t" \
35 "subq 4,$sp\n\t" \
36 "move $srp,[$sp]\n\t" \
37 "subq 4,$sp\n\t" \
38 "move $ccs,[$sp]\n\t" \
39 "subq 4,$sp\n\t" \
40 "move $spc,[$sp]\n\t" \
41 "subq 4,$sp\n\t" \
42 "move $mof,[$sp]\n\t" \
43 "subq 4,$sp\n\t" \
44 "move $srs,[$sp]\n\t" \
45 "subq 4,$sp\n\t" \
46 "move.d $acr,[$sp]\n\t" \
47 "subq 14*4,$sp\n\t" \
48 "movem $r13,[$sp]\n\t" \
49 "subq 4,$sp\n\t" \
50 "move.d $r10,[$sp]\n"
51
52#define STR2(x) #x
53#define STR(x) STR2(x)
54
55#define IRQ_NAME2(nr) nr##_interrupt(void)
56#define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
57
58/*
59 * The reason for setting the S-bit when debugging the kernel is that we want
60 * hardware breakpoints to remain active while we are in an exception handler.
61 * Note that we cannot simply copy S1, since we may come here from user-space,
62 * or any context where the S-bit wasn't set.
63 */
64#ifdef CONFIG_ETRAX_KGDB
65#define KGDB_FIXUP \
66 "move $ccs, $r10\n\t" \
67 "or.d (1<<9), $r10\n\t" \
68 "move $r10, $ccs\n\t"
69#else
70#define KGDB_FIXUP ""
71#endif
72
73/*
74 * Make sure the causing IRQ is blocked, then call do_IRQ. After that, unblock
75 * and jump to ret_from_intr which is found in entry.S.
76 *
77 * The reason for blocking the IRQ is to allow an sti() before the handler,
78 * which will acknowledge the interrupt, is run. The actual blocking is made
79 * by crisv32_do_IRQ.
80 */
81#define BUILD_IRQ(nr) \
82void IRQ_NAME(nr); \
83__asm__ ( \
84 ".text\n\t" \
85 "IRQ" #nr "_interrupt:\n\t" \
86 SAVE_ALL \
87 KGDB_FIXUP \
88 "move.d "#nr",$r10\n\t" \
89 "move.d $sp, $r12\n\t" \
90 "jsr crisv32_do_IRQ\n\t" \
91 "moveq 1, $r11\n\t" \
92 "jump ret_from_intr\n\t" \
93 "nop\n\t");
94/*
95 * This is subtle. The timer interrupt is crucial and it should not be disabled
96 * for too long. However, if it had been a normal interrupt as per BUILD_IRQ, it
97 * would have been BLOCK'ed, and then softirq's are run before we return here to
98 * UNBLOCK. If the softirq's take too much time to run, the timer irq won't run
99 * and the watchdog will kill us.
100 *
101 * Furthermore, if a lot of other irq's occur before we return here, the
102 * multiple_irq handler is run and it prioritizes the timer interrupt. However
103 * if we had BLOCK'edit here, we would not get the multiple_irq at all.
104 *
105 * The non-blocking here is based on the knowledge that the timer interrupt is
106 * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
107 * be an sti() before the timer irq handler is run to acknowledge the interrupt.
108 */
109#define BUILD_TIMER_IRQ(nr, mask) \
110void IRQ_NAME(nr); \
111__asm__ ( \
112 ".text\n\t" \
113 "IRQ" #nr "_interrupt:\n\t" \
114 SAVE_ALL \
115 KGDB_FIXUP \
116 "move.d "#nr",$r10\n\t" \
117 "move.d $sp,$r12\n\t" \
118 "jsr crisv32_do_IRQ\n\t" \
119 "moveq 0,$r11\n\t" \
120 "jump ret_from_intr\n\t" \
121 "nop\n\t");
122
123#endif /* __ASSEMBLY__ */
124#endif /* _ASM_ARCH_IRQ_H */
diff --git a/include/asm-cris/arch-v32/mach-a3/arbiter.h b/include/asm-cris/arch-v32/mach-a3/arbiter.h
deleted file mode 100644
index 65e9d6ff0520..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/arbiter.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_ARBITER_H
2#define _ASM_CRIS_ARCH_ARBITER_H
3
4#define EXT_REGION 0
5#define INT_REGION 1
6
7typedef void (watch_callback)(void);
8
9enum {
10 arbiter_all_dmas = 0x7fe,
11 arbiter_cpu = 0x1800,
12 arbiter_all_clients = 0x7fff
13};
14
15enum {
16 arbiter_bar_all_clients = 0x1ff
17};
18
19enum {
20 arbiter_all_read = 0x55,
21 arbiter_all_write = 0xaa,
22 arbiter_all_accesses = 0xff
23};
24
25#define MARB_CLIENTS(foo_cli, bar_cli) (((bar_cli) << 16) | (foo_cli))
26
27int crisv32_arbiter_allocate_bandwidth(int client, int region,
28 unsigned long bandwidth);
29int crisv32_arbiter_watch(unsigned long start, unsigned long size,
30 unsigned long clients, unsigned long accesses,
31 watch_callback * cb);
32int crisv32_arbiter_unwatch(int id);
33
34#endif
diff --git a/include/asm-cris/arch-v32/mach-a3/dma.h b/include/asm-cris/arch-v32/mach-a3/dma.h
deleted file mode 100644
index 9e8eb13b601d..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/dma.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _ASM_ARCH_CRIS_DMA_H
2#define _ASM_ARCH_CRIS_DMA_H
3
4/* Defines for using and allocating dma channels. */
5
6#define MAX_DMA_CHANNELS 12 /* 8 and 10 not used. */
7
8enum dma_owner {
9 dma_eth,
10 dma_ser0,
11 dma_ser1,
12 dma_ser2,
13 dma_ser3,
14 dma_ser4,
15 dma_iop,
16 dma_sser,
17 dma_strp,
18 dma_h264,
19 dma_jpeg
20};
21
22int crisv32_request_dma(unsigned int dmanr, const char *device_id,
23 unsigned options, unsigned bandwidth, enum dma_owner owner);
24void crisv32_free_dma(unsigned int dmanr);
25
26/* Masks used by crisv32_request_dma options: */
27#define DMA_VERBOSE_ON_ERROR 1
28#define DMA_PANIC_ON_ERROR (2|DMA_VERBOSE_ON_ERROR)
29#define DMA_INT_MEM 4
30
31#endif /* _ASM_ARCH_CRIS_DMA_H */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/clkgen_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/clkgen_defs_asm.h
deleted file mode 100644
index 02855adf63e8..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/clkgen_defs_asm.h
+++ /dev/null
@@ -1,164 +0,0 @@
1#ifndef __clkgen_defs_asm_h
2#define __clkgen_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: clkgen.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile clkgen_defs_asm.h clkgen.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register r_bootsel, scope clkgen, type r */
54#define reg_clkgen_r_bootsel___boot_mode___lsb 0
55#define reg_clkgen_r_bootsel___boot_mode___width 5
56#define reg_clkgen_r_bootsel___intern_main_clk___lsb 5
57#define reg_clkgen_r_bootsel___intern_main_clk___width 1
58#define reg_clkgen_r_bootsel___intern_main_clk___bit 5
59#define reg_clkgen_r_bootsel___extern_usb2_clk___lsb 6
60#define reg_clkgen_r_bootsel___extern_usb2_clk___width 1
61#define reg_clkgen_r_bootsel___extern_usb2_clk___bit 6
62#define reg_clkgen_r_bootsel_offset 0
63
64/* Register rw_clk_ctrl, scope clkgen, type rw */
65#define reg_clkgen_rw_clk_ctrl___pll___lsb 0
66#define reg_clkgen_rw_clk_ctrl___pll___width 1
67#define reg_clkgen_rw_clk_ctrl___pll___bit 0
68#define reg_clkgen_rw_clk_ctrl___cpu___lsb 1
69#define reg_clkgen_rw_clk_ctrl___cpu___width 1
70#define reg_clkgen_rw_clk_ctrl___cpu___bit 1
71#define reg_clkgen_rw_clk_ctrl___iop_usb___lsb 2
72#define reg_clkgen_rw_clk_ctrl___iop_usb___width 1
73#define reg_clkgen_rw_clk_ctrl___iop_usb___bit 2
74#define reg_clkgen_rw_clk_ctrl___vin___lsb 3
75#define reg_clkgen_rw_clk_ctrl___vin___width 1
76#define reg_clkgen_rw_clk_ctrl___vin___bit 3
77#define reg_clkgen_rw_clk_ctrl___sclr___lsb 4
78#define reg_clkgen_rw_clk_ctrl___sclr___width 1
79#define reg_clkgen_rw_clk_ctrl___sclr___bit 4
80#define reg_clkgen_rw_clk_ctrl___h264___lsb 5
81#define reg_clkgen_rw_clk_ctrl___h264___width 1
82#define reg_clkgen_rw_clk_ctrl___h264___bit 5
83#define reg_clkgen_rw_clk_ctrl___ddr2___lsb 6
84#define reg_clkgen_rw_clk_ctrl___ddr2___width 1
85#define reg_clkgen_rw_clk_ctrl___ddr2___bit 6
86#define reg_clkgen_rw_clk_ctrl___vout_hist___lsb 7
87#define reg_clkgen_rw_clk_ctrl___vout_hist___width 1
88#define reg_clkgen_rw_clk_ctrl___vout_hist___bit 7
89#define reg_clkgen_rw_clk_ctrl___eth___lsb 8
90#define reg_clkgen_rw_clk_ctrl___eth___width 1
91#define reg_clkgen_rw_clk_ctrl___eth___bit 8
92#define reg_clkgen_rw_clk_ctrl___ccd_tg_200___lsb 9
93#define reg_clkgen_rw_clk_ctrl___ccd_tg_200___width 1
94#define reg_clkgen_rw_clk_ctrl___ccd_tg_200___bit 9
95#define reg_clkgen_rw_clk_ctrl___dma0_1_eth___lsb 10
96#define reg_clkgen_rw_clk_ctrl___dma0_1_eth___width 1
97#define reg_clkgen_rw_clk_ctrl___dma0_1_eth___bit 10
98#define reg_clkgen_rw_clk_ctrl___ccd_tg_100___lsb 11
99#define reg_clkgen_rw_clk_ctrl___ccd_tg_100___width 1
100#define reg_clkgen_rw_clk_ctrl___ccd_tg_100___bit 11
101#define reg_clkgen_rw_clk_ctrl___jpeg___lsb 12
102#define reg_clkgen_rw_clk_ctrl___jpeg___width 1
103#define reg_clkgen_rw_clk_ctrl___jpeg___bit 12
104#define reg_clkgen_rw_clk_ctrl___sser_ser_dma6_7___lsb 13
105#define reg_clkgen_rw_clk_ctrl___sser_ser_dma6_7___width 1
106#define reg_clkgen_rw_clk_ctrl___sser_ser_dma6_7___bit 13
107#define reg_clkgen_rw_clk_ctrl___strdma0_2_video___lsb 14
108#define reg_clkgen_rw_clk_ctrl___strdma0_2_video___width 1
109#define reg_clkgen_rw_clk_ctrl___strdma0_2_video___bit 14
110#define reg_clkgen_rw_clk_ctrl___dma2_3_strcop___lsb 15
111#define reg_clkgen_rw_clk_ctrl___dma2_3_strcop___width 1
112#define reg_clkgen_rw_clk_ctrl___dma2_3_strcop___bit 15
113#define reg_clkgen_rw_clk_ctrl___dma4_5_iop___lsb 16
114#define reg_clkgen_rw_clk_ctrl___dma4_5_iop___width 1
115#define reg_clkgen_rw_clk_ctrl___dma4_5_iop___bit 16
116#define reg_clkgen_rw_clk_ctrl___dma9_11___lsb 17
117#define reg_clkgen_rw_clk_ctrl___dma9_11___width 1
118#define reg_clkgen_rw_clk_ctrl___dma9_11___bit 17
119#define reg_clkgen_rw_clk_ctrl___memarb_bar_ddr___lsb 18
120#define reg_clkgen_rw_clk_ctrl___memarb_bar_ddr___width 1
121#define reg_clkgen_rw_clk_ctrl___memarb_bar_ddr___bit 18
122#define reg_clkgen_rw_clk_ctrl___sclr_h264___lsb 19
123#define reg_clkgen_rw_clk_ctrl___sclr_h264___width 1
124#define reg_clkgen_rw_clk_ctrl___sclr_h264___bit 19
125#define reg_clkgen_rw_clk_ctrl_offset 4
126
127
128/* Constants */
129#define regk_clkgen_eth1000_rx 0x0000000c
130#define regk_clkgen_eth1000_tx 0x0000000e
131#define regk_clkgen_eth100_rx 0x0000001d
132#define regk_clkgen_eth100_rx_half 0x0000001c
133#define regk_clkgen_eth100_tx 0x0000001f
134#define regk_clkgen_eth100_tx_half 0x0000001e
135#define regk_clkgen_nand_3_2 0x00000000
136#define regk_clkgen_nand_3_2_0x30 0x00000002
137#define regk_clkgen_nand_3_2_0x30_pll 0x00000012
138#define regk_clkgen_nand_3_2_pll 0x00000010
139#define regk_clkgen_nand_3_3 0x00000001
140#define regk_clkgen_nand_3_3_0x30 0x00000003
141#define regk_clkgen_nand_3_3_0x30_pll 0x00000013
142#define regk_clkgen_nand_3_3_pll 0x00000011
143#define regk_clkgen_nand_4_2 0x00000004
144#define regk_clkgen_nand_4_2_0x30 0x00000006
145#define regk_clkgen_nand_4_2_0x30_pll 0x00000016
146#define regk_clkgen_nand_4_2_pll 0x00000014
147#define regk_clkgen_nand_4_3 0x00000005
148#define regk_clkgen_nand_4_3_0x30 0x00000007
149#define regk_clkgen_nand_4_3_0x30_pll 0x00000017
150#define regk_clkgen_nand_4_3_pll 0x00000015
151#define regk_clkgen_nand_5_2 0x00000008
152#define regk_clkgen_nand_5_2_0x30 0x0000000a
153#define regk_clkgen_nand_5_2_0x30_pll 0x0000001a
154#define regk_clkgen_nand_5_2_pll 0x00000018
155#define regk_clkgen_nand_5_3 0x00000009
156#define regk_clkgen_nand_5_3_0x30 0x0000000b
157#define regk_clkgen_nand_5_3_0x30_pll 0x0000001b
158#define regk_clkgen_nand_5_3_pll 0x00000019
159#define regk_clkgen_no 0x00000000
160#define regk_clkgen_rw_clk_ctrl_default 0x00000002
161#define regk_clkgen_ser 0x0000000d
162#define regk_clkgen_ser_pll 0x0000000f
163#define regk_clkgen_yes 0x00000001
164#endif /* __clkgen_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/ddr2_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/ddr2_defs_asm.h
deleted file mode 100644
index b12be03edacb..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/ddr2_defs_asm.h
+++ /dev/null
@@ -1,266 +0,0 @@
1#ifndef __ddr2_defs_asm_h
2#define __ddr2_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ddr2.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile ddr2_defs_asm.h ddr2.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_cfg, scope ddr2, type rw */
54#define reg_ddr2_rw_cfg___col_width___lsb 0
55#define reg_ddr2_rw_cfg___col_width___width 4
56#define reg_ddr2_rw_cfg___nr_banks___lsb 4
57#define reg_ddr2_rw_cfg___nr_banks___width 1
58#define reg_ddr2_rw_cfg___nr_banks___bit 4
59#define reg_ddr2_rw_cfg___bw___lsb 5
60#define reg_ddr2_rw_cfg___bw___width 1
61#define reg_ddr2_rw_cfg___bw___bit 5
62#define reg_ddr2_rw_cfg___nr_ref___lsb 6
63#define reg_ddr2_rw_cfg___nr_ref___width 4
64#define reg_ddr2_rw_cfg___ref_interval___lsb 10
65#define reg_ddr2_rw_cfg___ref_interval___width 11
66#define reg_ddr2_rw_cfg___odt_ctrl___lsb 21
67#define reg_ddr2_rw_cfg___odt_ctrl___width 2
68#define reg_ddr2_rw_cfg___odt_mem___lsb 23
69#define reg_ddr2_rw_cfg___odt_mem___width 1
70#define reg_ddr2_rw_cfg___odt_mem___bit 23
71#define reg_ddr2_rw_cfg___imp_strength___lsb 24
72#define reg_ddr2_rw_cfg___imp_strength___width 1
73#define reg_ddr2_rw_cfg___imp_strength___bit 24
74#define reg_ddr2_rw_cfg___auto_imp_cal___lsb 25
75#define reg_ddr2_rw_cfg___auto_imp_cal___width 1
76#define reg_ddr2_rw_cfg___auto_imp_cal___bit 25
77#define reg_ddr2_rw_cfg___imp_cal_override___lsb 26
78#define reg_ddr2_rw_cfg___imp_cal_override___width 1
79#define reg_ddr2_rw_cfg___imp_cal_override___bit 26
80#define reg_ddr2_rw_cfg___dll_override___lsb 27
81#define reg_ddr2_rw_cfg___dll_override___width 1
82#define reg_ddr2_rw_cfg___dll_override___bit 27
83#define reg_ddr2_rw_cfg_offset 0
84
85/* Register rw_timing, scope ddr2, type rw */
86#define reg_ddr2_rw_timing___wr___lsb 0
87#define reg_ddr2_rw_timing___wr___width 3
88#define reg_ddr2_rw_timing___rcd___lsb 3
89#define reg_ddr2_rw_timing___rcd___width 3
90#define reg_ddr2_rw_timing___rp___lsb 6
91#define reg_ddr2_rw_timing___rp___width 3
92#define reg_ddr2_rw_timing___ras___lsb 9
93#define reg_ddr2_rw_timing___ras___width 4
94#define reg_ddr2_rw_timing___rfc___lsb 13
95#define reg_ddr2_rw_timing___rfc___width 7
96#define reg_ddr2_rw_timing___rc___lsb 20
97#define reg_ddr2_rw_timing___rc___width 5
98#define reg_ddr2_rw_timing___rtp___lsb 25
99#define reg_ddr2_rw_timing___rtp___width 2
100#define reg_ddr2_rw_timing___rtw___lsb 27
101#define reg_ddr2_rw_timing___rtw___width 3
102#define reg_ddr2_rw_timing___wtr___lsb 30
103#define reg_ddr2_rw_timing___wtr___width 2
104#define reg_ddr2_rw_timing_offset 4
105
106/* Register rw_latency, scope ddr2, type rw */
107#define reg_ddr2_rw_latency___cas___lsb 0
108#define reg_ddr2_rw_latency___cas___width 3
109#define reg_ddr2_rw_latency___additive___lsb 3
110#define reg_ddr2_rw_latency___additive___width 3
111#define reg_ddr2_rw_latency_offset 8
112
113/* Register rw_phy_cfg, scope ddr2, type rw */
114#define reg_ddr2_rw_phy_cfg___en___lsb 0
115#define reg_ddr2_rw_phy_cfg___en___width 1
116#define reg_ddr2_rw_phy_cfg___en___bit 0
117#define reg_ddr2_rw_phy_cfg_offset 12
118
119/* Register rw_phy_ctrl, scope ddr2, type rw */
120#define reg_ddr2_rw_phy_ctrl___rst___lsb 0
121#define reg_ddr2_rw_phy_ctrl___rst___width 1
122#define reg_ddr2_rw_phy_ctrl___rst___bit 0
123#define reg_ddr2_rw_phy_ctrl___cal_rst___lsb 1
124#define reg_ddr2_rw_phy_ctrl___cal_rst___width 1
125#define reg_ddr2_rw_phy_ctrl___cal_rst___bit 1
126#define reg_ddr2_rw_phy_ctrl___cal_start___lsb 2
127#define reg_ddr2_rw_phy_ctrl___cal_start___width 1
128#define reg_ddr2_rw_phy_ctrl___cal_start___bit 2
129#define reg_ddr2_rw_phy_ctrl_offset 16
130
131/* Register rw_ctrl, scope ddr2, type rw */
132#define reg_ddr2_rw_ctrl___mrs_data___lsb 0
133#define reg_ddr2_rw_ctrl___mrs_data___width 16
134#define reg_ddr2_rw_ctrl___cmd___lsb 16
135#define reg_ddr2_rw_ctrl___cmd___width 8
136#define reg_ddr2_rw_ctrl_offset 20
137
138/* Register rw_pwr_down, scope ddr2, type rw */
139#define reg_ddr2_rw_pwr_down___self_ref___lsb 0
140#define reg_ddr2_rw_pwr_down___self_ref___width 2
141#define reg_ddr2_rw_pwr_down___phy_en___lsb 2
142#define reg_ddr2_rw_pwr_down___phy_en___width 1
143#define reg_ddr2_rw_pwr_down___phy_en___bit 2
144#define reg_ddr2_rw_pwr_down_offset 24
145
146/* Register r_stat, scope ddr2, type r */
147#define reg_ddr2_r_stat___dll_lock___lsb 0
148#define reg_ddr2_r_stat___dll_lock___width 1
149#define reg_ddr2_r_stat___dll_lock___bit 0
150#define reg_ddr2_r_stat___dll_delay_code___lsb 1
151#define reg_ddr2_r_stat___dll_delay_code___width 7
152#define reg_ddr2_r_stat___imp_cal_done___lsb 8
153#define reg_ddr2_r_stat___imp_cal_done___width 1
154#define reg_ddr2_r_stat___imp_cal_done___bit 8
155#define reg_ddr2_r_stat___imp_cal_fault___lsb 9
156#define reg_ddr2_r_stat___imp_cal_fault___width 1
157#define reg_ddr2_r_stat___imp_cal_fault___bit 9
158#define reg_ddr2_r_stat___cal_imp_pu___lsb 10
159#define reg_ddr2_r_stat___cal_imp_pu___width 4
160#define reg_ddr2_r_stat___cal_imp_pd___lsb 14
161#define reg_ddr2_r_stat___cal_imp_pd___width 4
162#define reg_ddr2_r_stat_offset 28
163
164/* Register rw_imp_ctrl, scope ddr2, type rw */
165#define reg_ddr2_rw_imp_ctrl___imp_pu___lsb 0
166#define reg_ddr2_rw_imp_ctrl___imp_pu___width 4
167#define reg_ddr2_rw_imp_ctrl___imp_pd___lsb 4
168#define reg_ddr2_rw_imp_ctrl___imp_pd___width 4
169#define reg_ddr2_rw_imp_ctrl_offset 32
170
171#define STRIDE_ddr2_rw_dll_ctrl 4
172/* Register rw_dll_ctrl, scope ddr2, type rw */
173#define reg_ddr2_rw_dll_ctrl___mode___lsb 0
174#define reg_ddr2_rw_dll_ctrl___mode___width 1
175#define reg_ddr2_rw_dll_ctrl___mode___bit 0
176#define reg_ddr2_rw_dll_ctrl___clk_delay___lsb 1
177#define reg_ddr2_rw_dll_ctrl___clk_delay___width 7
178#define reg_ddr2_rw_dll_ctrl_offset 36
179
180#define STRIDE_ddr2_rw_dqs_dll_ctrl 4
181/* Register rw_dqs_dll_ctrl, scope ddr2, type rw */
182#define reg_ddr2_rw_dqs_dll_ctrl___dqs90_delay___lsb 0
183#define reg_ddr2_rw_dqs_dll_ctrl___dqs90_delay___width 7
184#define reg_ddr2_rw_dqs_dll_ctrl___dqs180_delay___lsb 7
185#define reg_ddr2_rw_dqs_dll_ctrl___dqs180_delay___width 7
186#define reg_ddr2_rw_dqs_dll_ctrl___dqs270_delay___lsb 14
187#define reg_ddr2_rw_dqs_dll_ctrl___dqs270_delay___width 7
188#define reg_ddr2_rw_dqs_dll_ctrl___dqs360_delay___lsb 21
189#define reg_ddr2_rw_dqs_dll_ctrl___dqs360_delay___width 7
190#define reg_ddr2_rw_dqs_dll_ctrl_offset 52
191
192
193/* Constants */
194#define regk_ddr2_al0 0x00000000
195#define regk_ddr2_al1 0x00000008
196#define regk_ddr2_al2 0x00000010
197#define regk_ddr2_al3 0x00000018
198#define regk_ddr2_al4 0x00000020
199#define regk_ddr2_auto 0x00000003
200#define regk_ddr2_bank4 0x00000000
201#define regk_ddr2_bank8 0x00000001
202#define regk_ddr2_bl4 0x00000002
203#define regk_ddr2_bl8 0x00000003
204#define regk_ddr2_bt_il 0x00000008
205#define regk_ddr2_bt_seq 0x00000000
206#define regk_ddr2_bw16 0x00000001
207#define regk_ddr2_bw32 0x00000000
208#define regk_ddr2_cas2 0x00000020
209#define regk_ddr2_cas3 0x00000030
210#define regk_ddr2_cas4 0x00000040
211#define regk_ddr2_cas5 0x00000050
212#define regk_ddr2_deselect 0x000000c0
213#define regk_ddr2_dic_weak 0x00000002
214#define regk_ddr2_direct 0x00000001
215#define regk_ddr2_dis 0x00000000
216#define regk_ddr2_dll_dis 0x00000001
217#define regk_ddr2_dll_en 0x00000000
218#define regk_ddr2_dll_rst 0x00000100
219#define regk_ddr2_emrs 0x00000081
220#define regk_ddr2_emrs2 0x00000082
221#define regk_ddr2_emrs3 0x00000083
222#define regk_ddr2_full 0x00000001
223#define regk_ddr2_hi_ref_rate 0x00000080
224#define regk_ddr2_mrs 0x00000080
225#define regk_ddr2_no 0x00000000
226#define regk_ddr2_nop 0x000000b8
227#define regk_ddr2_ocd_adj 0x00000200
228#define regk_ddr2_ocd_default 0x00000380
229#define regk_ddr2_ocd_drive0 0x00000100
230#define regk_ddr2_ocd_drive1 0x00000080
231#define regk_ddr2_ocd_exit 0x00000000
232#define regk_ddr2_odt_dis 0x00000000
233#define regk_ddr2_offs 0x00000000
234#define regk_ddr2_pre 0x00000090
235#define regk_ddr2_pre_all 0x00000400
236#define regk_ddr2_pwr_down_fast 0x00000000
237#define regk_ddr2_pwr_down_slow 0x00001000
238#define regk_ddr2_ref 0x00000088
239#define regk_ddr2_rtt150 0x00000040
240#define regk_ddr2_rtt50 0x00000044
241#define regk_ddr2_rtt75 0x00000004
242#define regk_ddr2_rw_cfg_default 0x00186000
243#define regk_ddr2_rw_dll_ctrl_default 0x00000000
244#define regk_ddr2_rw_dll_ctrl_size 0x00000004
245#define regk_ddr2_rw_dqs_dll_ctrl_default 0x00000000
246#define regk_ddr2_rw_dqs_dll_ctrl_size 0x00000004
247#define regk_ddr2_rw_latency_default 0x00000000
248#define regk_ddr2_rw_phy_cfg_default 0x00000000
249#define regk_ddr2_rw_pwr_down_default 0x00000000
250#define regk_ddr2_rw_timing_default 0x00000000
251#define regk_ddr2_s1Gb 0x0000001a
252#define regk_ddr2_s256Mb 0x0000000f
253#define regk_ddr2_s2Gb 0x00000027
254#define regk_ddr2_s4Gb 0x00000042
255#define regk_ddr2_s512Mb 0x00000015
256#define regk_ddr2_temp0_85 0x00000618
257#define regk_ddr2_temp85_95 0x0000030c
258#define regk_ddr2_term150 0x00000002
259#define regk_ddr2_term50 0x00000003
260#define regk_ddr2_term75 0x00000001
261#define regk_ddr2_test 0x00000080
262#define regk_ddr2_weak 0x00000000
263#define regk_ddr2_wr2 0x00000200
264#define regk_ddr2_wr3 0x00000400
265#define regk_ddr2_yes 0x00000001
266#endif /* __ddr2_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/gio_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/gio_defs_asm.h
deleted file mode 100644
index df6714fda179..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/gio_defs_asm.h
+++ /dev/null
@@ -1,849 +0,0 @@
1#ifndef __gio_defs_asm_h
2#define __gio_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: gio.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile gio_defs_asm.h gio.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register r_pa_din, scope gio, type r */
54#define reg_gio_r_pa_din___data___lsb 0
55#define reg_gio_r_pa_din___data___width 32
56#define reg_gio_r_pa_din_offset 0
57
58/* Register rw_pa_dout, scope gio, type rw */
59#define reg_gio_rw_pa_dout___data___lsb 0
60#define reg_gio_rw_pa_dout___data___width 32
61#define reg_gio_rw_pa_dout_offset 4
62
63/* Register rw_pa_oe, scope gio, type rw */
64#define reg_gio_rw_pa_oe___oe___lsb 0
65#define reg_gio_rw_pa_oe___oe___width 32
66#define reg_gio_rw_pa_oe_offset 8
67
68/* Register rw_pa_byte0_dout, scope gio, type rw */
69#define reg_gio_rw_pa_byte0_dout___data___lsb 0
70#define reg_gio_rw_pa_byte0_dout___data___width 8
71#define reg_gio_rw_pa_byte0_dout_offset 12
72
73/* Register rw_pa_byte0_oe, scope gio, type rw */
74#define reg_gio_rw_pa_byte0_oe___oe___lsb 0
75#define reg_gio_rw_pa_byte0_oe___oe___width 8
76#define reg_gio_rw_pa_byte0_oe_offset 16
77
78/* Register rw_pa_byte1_dout, scope gio, type rw */
79#define reg_gio_rw_pa_byte1_dout___data___lsb 0
80#define reg_gio_rw_pa_byte1_dout___data___width 8
81#define reg_gio_rw_pa_byte1_dout_offset 20
82
83/* Register rw_pa_byte1_oe, scope gio, type rw */
84#define reg_gio_rw_pa_byte1_oe___oe___lsb 0
85#define reg_gio_rw_pa_byte1_oe___oe___width 8
86#define reg_gio_rw_pa_byte1_oe_offset 24
87
88/* Register rw_pa_byte2_dout, scope gio, type rw */
89#define reg_gio_rw_pa_byte2_dout___data___lsb 0
90#define reg_gio_rw_pa_byte2_dout___data___width 8
91#define reg_gio_rw_pa_byte2_dout_offset 28
92
93/* Register rw_pa_byte2_oe, scope gio, type rw */
94#define reg_gio_rw_pa_byte2_oe___oe___lsb 0
95#define reg_gio_rw_pa_byte2_oe___oe___width 8
96#define reg_gio_rw_pa_byte2_oe_offset 32
97
98/* Register rw_pa_byte3_dout, scope gio, type rw */
99#define reg_gio_rw_pa_byte3_dout___data___lsb 0
100#define reg_gio_rw_pa_byte3_dout___data___width 8
101#define reg_gio_rw_pa_byte3_dout_offset 36
102
103/* Register rw_pa_byte3_oe, scope gio, type rw */
104#define reg_gio_rw_pa_byte3_oe___oe___lsb 0
105#define reg_gio_rw_pa_byte3_oe___oe___width 8
106#define reg_gio_rw_pa_byte3_oe_offset 40
107
108/* Register r_pb_din, scope gio, type r */
109#define reg_gio_r_pb_din___data___lsb 0
110#define reg_gio_r_pb_din___data___width 32
111#define reg_gio_r_pb_din_offset 44
112
113/* Register rw_pb_dout, scope gio, type rw */
114#define reg_gio_rw_pb_dout___data___lsb 0
115#define reg_gio_rw_pb_dout___data___width 32
116#define reg_gio_rw_pb_dout_offset 48
117
118/* Register rw_pb_oe, scope gio, type rw */
119#define reg_gio_rw_pb_oe___oe___lsb 0
120#define reg_gio_rw_pb_oe___oe___width 32
121#define reg_gio_rw_pb_oe_offset 52
122
123/* Register rw_pb_byte0_dout, scope gio, type rw */
124#define reg_gio_rw_pb_byte0_dout___data___lsb 0
125#define reg_gio_rw_pb_byte0_dout___data___width 8
126#define reg_gio_rw_pb_byte0_dout_offset 56
127
128/* Register rw_pb_byte0_oe, scope gio, type rw */
129#define reg_gio_rw_pb_byte0_oe___oe___lsb 0
130#define reg_gio_rw_pb_byte0_oe___oe___width 8
131#define reg_gio_rw_pb_byte0_oe_offset 60
132
133/* Register rw_pb_byte1_dout, scope gio, type rw */
134#define reg_gio_rw_pb_byte1_dout___data___lsb 0
135#define reg_gio_rw_pb_byte1_dout___data___width 8
136#define reg_gio_rw_pb_byte1_dout_offset 64
137
138/* Register rw_pb_byte1_oe, scope gio, type rw */
139#define reg_gio_rw_pb_byte1_oe___oe___lsb 0
140#define reg_gio_rw_pb_byte1_oe___oe___width 8
141#define reg_gio_rw_pb_byte1_oe_offset 68
142
143/* Register rw_pb_byte2_dout, scope gio, type rw */
144#define reg_gio_rw_pb_byte2_dout___data___lsb 0
145#define reg_gio_rw_pb_byte2_dout___data___width 8
146#define reg_gio_rw_pb_byte2_dout_offset 72
147
148/* Register rw_pb_byte2_oe, scope gio, type rw */
149#define reg_gio_rw_pb_byte2_oe___oe___lsb 0
150#define reg_gio_rw_pb_byte2_oe___oe___width 8
151#define reg_gio_rw_pb_byte2_oe_offset 76
152
153/* Register rw_pb_byte3_dout, scope gio, type rw */
154#define reg_gio_rw_pb_byte3_dout___data___lsb 0
155#define reg_gio_rw_pb_byte3_dout___data___width 8
156#define reg_gio_rw_pb_byte3_dout_offset 80
157
158/* Register rw_pb_byte3_oe, scope gio, type rw */
159#define reg_gio_rw_pb_byte3_oe___oe___lsb 0
160#define reg_gio_rw_pb_byte3_oe___oe___width 8
161#define reg_gio_rw_pb_byte3_oe_offset 84
162
163/* Register r_pc_din, scope gio, type r */
164#define reg_gio_r_pc_din___data___lsb 0
165#define reg_gio_r_pc_din___data___width 16
166#define reg_gio_r_pc_din_offset 88
167
168/* Register rw_pc_dout, scope gio, type rw */
169#define reg_gio_rw_pc_dout___data___lsb 0
170#define reg_gio_rw_pc_dout___data___width 16
171#define reg_gio_rw_pc_dout_offset 92
172
173/* Register rw_pc_oe, scope gio, type rw */
174#define reg_gio_rw_pc_oe___oe___lsb 0
175#define reg_gio_rw_pc_oe___oe___width 16
176#define reg_gio_rw_pc_oe_offset 96
177
178/* Register rw_pc_byte0_dout, scope gio, type rw */
179#define reg_gio_rw_pc_byte0_dout___data___lsb 0
180#define reg_gio_rw_pc_byte0_dout___data___width 8
181#define reg_gio_rw_pc_byte0_dout_offset 100
182
183/* Register rw_pc_byte0_oe, scope gio, type rw */
184#define reg_gio_rw_pc_byte0_oe___oe___lsb 0
185#define reg_gio_rw_pc_byte0_oe___oe___width 8
186#define reg_gio_rw_pc_byte0_oe_offset 104
187
188/* Register rw_pc_byte1_dout, scope gio, type rw */
189#define reg_gio_rw_pc_byte1_dout___data___lsb 0
190#define reg_gio_rw_pc_byte1_dout___data___width 8
191#define reg_gio_rw_pc_byte1_dout_offset 108
192
193/* Register rw_pc_byte1_oe, scope gio, type rw */
194#define reg_gio_rw_pc_byte1_oe___oe___lsb 0
195#define reg_gio_rw_pc_byte1_oe___oe___width 8
196#define reg_gio_rw_pc_byte1_oe_offset 112
197
198/* Register r_pd_din, scope gio, type r */
199#define reg_gio_r_pd_din___data___lsb 0
200#define reg_gio_r_pd_din___data___width 32
201#define reg_gio_r_pd_din_offset 116
202
203/* Register rw_intr_cfg, scope gio, type rw */
204#define reg_gio_rw_intr_cfg___intr0___lsb 0
205#define reg_gio_rw_intr_cfg___intr0___width 3
206#define reg_gio_rw_intr_cfg___intr1___lsb 3
207#define reg_gio_rw_intr_cfg___intr1___width 3
208#define reg_gio_rw_intr_cfg___intr2___lsb 6
209#define reg_gio_rw_intr_cfg___intr2___width 3
210#define reg_gio_rw_intr_cfg___intr3___lsb 9
211#define reg_gio_rw_intr_cfg___intr3___width 3
212#define reg_gio_rw_intr_cfg___intr4___lsb 12
213#define reg_gio_rw_intr_cfg___intr4___width 3
214#define reg_gio_rw_intr_cfg___intr5___lsb 15
215#define reg_gio_rw_intr_cfg___intr5___width 3
216#define reg_gio_rw_intr_cfg___intr6___lsb 18
217#define reg_gio_rw_intr_cfg___intr6___width 3
218#define reg_gio_rw_intr_cfg___intr7___lsb 21
219#define reg_gio_rw_intr_cfg___intr7___width 3
220#define reg_gio_rw_intr_cfg_offset 120
221
222/* Register rw_intr_pins, scope gio, type rw */
223#define reg_gio_rw_intr_pins___intr0___lsb 0
224#define reg_gio_rw_intr_pins___intr0___width 4
225#define reg_gio_rw_intr_pins___intr1___lsb 4
226#define reg_gio_rw_intr_pins___intr1___width 4
227#define reg_gio_rw_intr_pins___intr2___lsb 8
228#define reg_gio_rw_intr_pins___intr2___width 4
229#define reg_gio_rw_intr_pins___intr3___lsb 12
230#define reg_gio_rw_intr_pins___intr3___width 4
231#define reg_gio_rw_intr_pins___intr4___lsb 16
232#define reg_gio_rw_intr_pins___intr4___width 4
233#define reg_gio_rw_intr_pins___intr5___lsb 20
234#define reg_gio_rw_intr_pins___intr5___width 4
235#define reg_gio_rw_intr_pins___intr6___lsb 24
236#define reg_gio_rw_intr_pins___intr6___width 4
237#define reg_gio_rw_intr_pins___intr7___lsb 28
238#define reg_gio_rw_intr_pins___intr7___width 4
239#define reg_gio_rw_intr_pins_offset 124
240
241/* Register rw_intr_mask, scope gio, type rw */
242#define reg_gio_rw_intr_mask___intr0___lsb 0
243#define reg_gio_rw_intr_mask___intr0___width 1
244#define reg_gio_rw_intr_mask___intr0___bit 0
245#define reg_gio_rw_intr_mask___intr1___lsb 1
246#define reg_gio_rw_intr_mask___intr1___width 1
247#define reg_gio_rw_intr_mask___intr1___bit 1
248#define reg_gio_rw_intr_mask___intr2___lsb 2
249#define reg_gio_rw_intr_mask___intr2___width 1
250#define reg_gio_rw_intr_mask___intr2___bit 2
251#define reg_gio_rw_intr_mask___intr3___lsb 3
252#define reg_gio_rw_intr_mask___intr3___width 1
253#define reg_gio_rw_intr_mask___intr3___bit 3
254#define reg_gio_rw_intr_mask___intr4___lsb 4
255#define reg_gio_rw_intr_mask___intr4___width 1
256#define reg_gio_rw_intr_mask___intr4___bit 4
257#define reg_gio_rw_intr_mask___intr5___lsb 5
258#define reg_gio_rw_intr_mask___intr5___width 1
259#define reg_gio_rw_intr_mask___intr5___bit 5
260#define reg_gio_rw_intr_mask___intr6___lsb 6
261#define reg_gio_rw_intr_mask___intr6___width 1
262#define reg_gio_rw_intr_mask___intr6___bit 6
263#define reg_gio_rw_intr_mask___intr7___lsb 7
264#define reg_gio_rw_intr_mask___intr7___width 1
265#define reg_gio_rw_intr_mask___intr7___bit 7
266#define reg_gio_rw_intr_mask___i2c0_done___lsb 8
267#define reg_gio_rw_intr_mask___i2c0_done___width 1
268#define reg_gio_rw_intr_mask___i2c0_done___bit 8
269#define reg_gio_rw_intr_mask___i2c1_done___lsb 9
270#define reg_gio_rw_intr_mask___i2c1_done___width 1
271#define reg_gio_rw_intr_mask___i2c1_done___bit 9
272#define reg_gio_rw_intr_mask_offset 128
273
274/* Register rw_ack_intr, scope gio, type rw */
275#define reg_gio_rw_ack_intr___intr0___lsb 0
276#define reg_gio_rw_ack_intr___intr0___width 1
277#define reg_gio_rw_ack_intr___intr0___bit 0
278#define reg_gio_rw_ack_intr___intr1___lsb 1
279#define reg_gio_rw_ack_intr___intr1___width 1
280#define reg_gio_rw_ack_intr___intr1___bit 1
281#define reg_gio_rw_ack_intr___intr2___lsb 2
282#define reg_gio_rw_ack_intr___intr2___width 1
283#define reg_gio_rw_ack_intr___intr2___bit 2
284#define reg_gio_rw_ack_intr___intr3___lsb 3
285#define reg_gio_rw_ack_intr___intr3___width 1
286#define reg_gio_rw_ack_intr___intr3___bit 3
287#define reg_gio_rw_ack_intr___intr4___lsb 4
288#define reg_gio_rw_ack_intr___intr4___width 1
289#define reg_gio_rw_ack_intr___intr4___bit 4
290#define reg_gio_rw_ack_intr___intr5___lsb 5
291#define reg_gio_rw_ack_intr___intr5___width 1
292#define reg_gio_rw_ack_intr___intr5___bit 5
293#define reg_gio_rw_ack_intr___intr6___lsb 6
294#define reg_gio_rw_ack_intr___intr6___width 1
295#define reg_gio_rw_ack_intr___intr6___bit 6
296#define reg_gio_rw_ack_intr___intr7___lsb 7
297#define reg_gio_rw_ack_intr___intr7___width 1
298#define reg_gio_rw_ack_intr___intr7___bit 7
299#define reg_gio_rw_ack_intr___i2c0_done___lsb 8
300#define reg_gio_rw_ack_intr___i2c0_done___width 1
301#define reg_gio_rw_ack_intr___i2c0_done___bit 8
302#define reg_gio_rw_ack_intr___i2c1_done___lsb 9
303#define reg_gio_rw_ack_intr___i2c1_done___width 1
304#define reg_gio_rw_ack_intr___i2c1_done___bit 9
305#define reg_gio_rw_ack_intr_offset 132
306
307/* Register r_intr, scope gio, type r */
308#define reg_gio_r_intr___intr0___lsb 0
309#define reg_gio_r_intr___intr0___width 1
310#define reg_gio_r_intr___intr0___bit 0
311#define reg_gio_r_intr___intr1___lsb 1
312#define reg_gio_r_intr___intr1___width 1
313#define reg_gio_r_intr___intr1___bit 1
314#define reg_gio_r_intr___intr2___lsb 2
315#define reg_gio_r_intr___intr2___width 1
316#define reg_gio_r_intr___intr2___bit 2
317#define reg_gio_r_intr___intr3___lsb 3
318#define reg_gio_r_intr___intr3___width 1
319#define reg_gio_r_intr___intr3___bit 3
320#define reg_gio_r_intr___intr4___lsb 4
321#define reg_gio_r_intr___intr4___width 1
322#define reg_gio_r_intr___intr4___bit 4
323#define reg_gio_r_intr___intr5___lsb 5
324#define reg_gio_r_intr___intr5___width 1
325#define reg_gio_r_intr___intr5___bit 5
326#define reg_gio_r_intr___intr6___lsb 6
327#define reg_gio_r_intr___intr6___width 1
328#define reg_gio_r_intr___intr6___bit 6
329#define reg_gio_r_intr___intr7___lsb 7
330#define reg_gio_r_intr___intr7___width 1
331#define reg_gio_r_intr___intr7___bit 7
332#define reg_gio_r_intr___i2c0_done___lsb 8
333#define reg_gio_r_intr___i2c0_done___width 1
334#define reg_gio_r_intr___i2c0_done___bit 8
335#define reg_gio_r_intr___i2c1_done___lsb 9
336#define reg_gio_r_intr___i2c1_done___width 1
337#define reg_gio_r_intr___i2c1_done___bit 9
338#define reg_gio_r_intr_offset 136
339
340/* Register r_masked_intr, scope gio, type r */
341#define reg_gio_r_masked_intr___intr0___lsb 0
342#define reg_gio_r_masked_intr___intr0___width 1
343#define reg_gio_r_masked_intr___intr0___bit 0
344#define reg_gio_r_masked_intr___intr1___lsb 1
345#define reg_gio_r_masked_intr___intr1___width 1
346#define reg_gio_r_masked_intr___intr1___bit 1
347#define reg_gio_r_masked_intr___intr2___lsb 2
348#define reg_gio_r_masked_intr___intr2___width 1
349#define reg_gio_r_masked_intr___intr2___bit 2
350#define reg_gio_r_masked_intr___intr3___lsb 3
351#define reg_gio_r_masked_intr___intr3___width 1
352#define reg_gio_r_masked_intr___intr3___bit 3
353#define reg_gio_r_masked_intr___intr4___lsb 4
354#define reg_gio_r_masked_intr___intr4___width 1
355#define reg_gio_r_masked_intr___intr4___bit 4
356#define reg_gio_r_masked_intr___intr5___lsb 5
357#define reg_gio_r_masked_intr___intr5___width 1
358#define reg_gio_r_masked_intr___intr5___bit 5
359#define reg_gio_r_masked_intr___intr6___lsb 6
360#define reg_gio_r_masked_intr___intr6___width 1
361#define reg_gio_r_masked_intr___intr6___bit 6
362#define reg_gio_r_masked_intr___intr7___lsb 7
363#define reg_gio_r_masked_intr___intr7___width 1
364#define reg_gio_r_masked_intr___intr7___bit 7
365#define reg_gio_r_masked_intr___i2c0_done___lsb 8
366#define reg_gio_r_masked_intr___i2c0_done___width 1
367#define reg_gio_r_masked_intr___i2c0_done___bit 8
368#define reg_gio_r_masked_intr___i2c1_done___lsb 9
369#define reg_gio_r_masked_intr___i2c1_done___width 1
370#define reg_gio_r_masked_intr___i2c1_done___bit 9
371#define reg_gio_r_masked_intr_offset 140
372
373/* Register rw_i2c0_start, scope gio, type rw */
374#define reg_gio_rw_i2c0_start___run___lsb 0
375#define reg_gio_rw_i2c0_start___run___width 1
376#define reg_gio_rw_i2c0_start___run___bit 0
377#define reg_gio_rw_i2c0_start_offset 144
378
379/* Register rw_i2c0_cfg, scope gio, type rw */
380#define reg_gio_rw_i2c0_cfg___en___lsb 0
381#define reg_gio_rw_i2c0_cfg___en___width 1
382#define reg_gio_rw_i2c0_cfg___en___bit 0
383#define reg_gio_rw_i2c0_cfg___bit_order___lsb 1
384#define reg_gio_rw_i2c0_cfg___bit_order___width 1
385#define reg_gio_rw_i2c0_cfg___bit_order___bit 1
386#define reg_gio_rw_i2c0_cfg___scl_io___lsb 2
387#define reg_gio_rw_i2c0_cfg___scl_io___width 1
388#define reg_gio_rw_i2c0_cfg___scl_io___bit 2
389#define reg_gio_rw_i2c0_cfg___scl_inv___lsb 3
390#define reg_gio_rw_i2c0_cfg___scl_inv___width 1
391#define reg_gio_rw_i2c0_cfg___scl_inv___bit 3
392#define reg_gio_rw_i2c0_cfg___sda_io___lsb 4
393#define reg_gio_rw_i2c0_cfg___sda_io___width 1
394#define reg_gio_rw_i2c0_cfg___sda_io___bit 4
395#define reg_gio_rw_i2c0_cfg___sda_idle___lsb 5
396#define reg_gio_rw_i2c0_cfg___sda_idle___width 1
397#define reg_gio_rw_i2c0_cfg___sda_idle___bit 5
398#define reg_gio_rw_i2c0_cfg_offset 148
399
400/* Register rw_i2c0_ctrl, scope gio, type rw */
401#define reg_gio_rw_i2c0_ctrl___trf_bits___lsb 0
402#define reg_gio_rw_i2c0_ctrl___trf_bits___width 6
403#define reg_gio_rw_i2c0_ctrl___switch_dir___lsb 6
404#define reg_gio_rw_i2c0_ctrl___switch_dir___width 6
405#define reg_gio_rw_i2c0_ctrl___extra_start___lsb 12
406#define reg_gio_rw_i2c0_ctrl___extra_start___width 3
407#define reg_gio_rw_i2c0_ctrl___early_end___lsb 15
408#define reg_gio_rw_i2c0_ctrl___early_end___width 1
409#define reg_gio_rw_i2c0_ctrl___early_end___bit 15
410#define reg_gio_rw_i2c0_ctrl___start_stop___lsb 16
411#define reg_gio_rw_i2c0_ctrl___start_stop___width 1
412#define reg_gio_rw_i2c0_ctrl___start_stop___bit 16
413#define reg_gio_rw_i2c0_ctrl___ack_dir0___lsb 17
414#define reg_gio_rw_i2c0_ctrl___ack_dir0___width 1
415#define reg_gio_rw_i2c0_ctrl___ack_dir0___bit 17
416#define reg_gio_rw_i2c0_ctrl___ack_dir1___lsb 18
417#define reg_gio_rw_i2c0_ctrl___ack_dir1___width 1
418#define reg_gio_rw_i2c0_ctrl___ack_dir1___bit 18
419#define reg_gio_rw_i2c0_ctrl___ack_dir2___lsb 19
420#define reg_gio_rw_i2c0_ctrl___ack_dir2___width 1
421#define reg_gio_rw_i2c0_ctrl___ack_dir2___bit 19
422#define reg_gio_rw_i2c0_ctrl___ack_dir3___lsb 20
423#define reg_gio_rw_i2c0_ctrl___ack_dir3___width 1
424#define reg_gio_rw_i2c0_ctrl___ack_dir3___bit 20
425#define reg_gio_rw_i2c0_ctrl___ack_dir4___lsb 21
426#define reg_gio_rw_i2c0_ctrl___ack_dir4___width 1
427#define reg_gio_rw_i2c0_ctrl___ack_dir4___bit 21
428#define reg_gio_rw_i2c0_ctrl___ack_dir5___lsb 22
429#define reg_gio_rw_i2c0_ctrl___ack_dir5___width 1
430#define reg_gio_rw_i2c0_ctrl___ack_dir5___bit 22
431#define reg_gio_rw_i2c0_ctrl___ack_bit___lsb 23
432#define reg_gio_rw_i2c0_ctrl___ack_bit___width 1
433#define reg_gio_rw_i2c0_ctrl___ack_bit___bit 23
434#define reg_gio_rw_i2c0_ctrl___start_bit___lsb 24
435#define reg_gio_rw_i2c0_ctrl___start_bit___width 1
436#define reg_gio_rw_i2c0_ctrl___start_bit___bit 24
437#define reg_gio_rw_i2c0_ctrl___freq___lsb 25
438#define reg_gio_rw_i2c0_ctrl___freq___width 2
439#define reg_gio_rw_i2c0_ctrl_offset 152
440
441/* Register rw_i2c0_data, scope gio, type rw */
442#define reg_gio_rw_i2c0_data___data0___lsb 0
443#define reg_gio_rw_i2c0_data___data0___width 8
444#define reg_gio_rw_i2c0_data___data1___lsb 8
445#define reg_gio_rw_i2c0_data___data1___width 8
446#define reg_gio_rw_i2c0_data___data2___lsb 16
447#define reg_gio_rw_i2c0_data___data2___width 8
448#define reg_gio_rw_i2c0_data___data3___lsb 24
449#define reg_gio_rw_i2c0_data___data3___width 8
450#define reg_gio_rw_i2c0_data_offset 156
451
452/* Register rw_i2c0_data2, scope gio, type rw */
453#define reg_gio_rw_i2c0_data2___data4___lsb 0
454#define reg_gio_rw_i2c0_data2___data4___width 8
455#define reg_gio_rw_i2c0_data2___data5___lsb 8
456#define reg_gio_rw_i2c0_data2___data5___width 8
457#define reg_gio_rw_i2c0_data2___start_val___lsb 16
458#define reg_gio_rw_i2c0_data2___start_val___width 6
459#define reg_gio_rw_i2c0_data2___ack_val___lsb 22
460#define reg_gio_rw_i2c0_data2___ack_val___width 6
461#define reg_gio_rw_i2c0_data2_offset 160
462
463/* Register rw_i2c1_start, scope gio, type rw */
464#define reg_gio_rw_i2c1_start___run___lsb 0
465#define reg_gio_rw_i2c1_start___run___width 1
466#define reg_gio_rw_i2c1_start___run___bit 0
467#define reg_gio_rw_i2c1_start_offset 164
468
469/* Register rw_i2c1_cfg, scope gio, type rw */
470#define reg_gio_rw_i2c1_cfg___en___lsb 0
471#define reg_gio_rw_i2c1_cfg___en___width 1
472#define reg_gio_rw_i2c1_cfg___en___bit 0
473#define reg_gio_rw_i2c1_cfg___bit_order___lsb 1
474#define reg_gio_rw_i2c1_cfg___bit_order___width 1
475#define reg_gio_rw_i2c1_cfg___bit_order___bit 1
476#define reg_gio_rw_i2c1_cfg___scl_io___lsb 2
477#define reg_gio_rw_i2c1_cfg___scl_io___width 1
478#define reg_gio_rw_i2c1_cfg___scl_io___bit 2
479#define reg_gio_rw_i2c1_cfg___scl_inv___lsb 3
480#define reg_gio_rw_i2c1_cfg___scl_inv___width 1
481#define reg_gio_rw_i2c1_cfg___scl_inv___bit 3
482#define reg_gio_rw_i2c1_cfg___sda0_io___lsb 4
483#define reg_gio_rw_i2c1_cfg___sda0_io___width 1
484#define reg_gio_rw_i2c1_cfg___sda0_io___bit 4
485#define reg_gio_rw_i2c1_cfg___sda0_idle___lsb 5
486#define reg_gio_rw_i2c1_cfg___sda0_idle___width 1
487#define reg_gio_rw_i2c1_cfg___sda0_idle___bit 5
488#define reg_gio_rw_i2c1_cfg___sda1_io___lsb 6
489#define reg_gio_rw_i2c1_cfg___sda1_io___width 1
490#define reg_gio_rw_i2c1_cfg___sda1_io___bit 6
491#define reg_gio_rw_i2c1_cfg___sda1_idle___lsb 7
492#define reg_gio_rw_i2c1_cfg___sda1_idle___width 1
493#define reg_gio_rw_i2c1_cfg___sda1_idle___bit 7
494#define reg_gio_rw_i2c1_cfg___sda2_io___lsb 8
495#define reg_gio_rw_i2c1_cfg___sda2_io___width 1
496#define reg_gio_rw_i2c1_cfg___sda2_io___bit 8
497#define reg_gio_rw_i2c1_cfg___sda2_idle___lsb 9
498#define reg_gio_rw_i2c1_cfg___sda2_idle___width 1
499#define reg_gio_rw_i2c1_cfg___sda2_idle___bit 9
500#define reg_gio_rw_i2c1_cfg___sda3_io___lsb 10
501#define reg_gio_rw_i2c1_cfg___sda3_io___width 1
502#define reg_gio_rw_i2c1_cfg___sda3_io___bit 10
503#define reg_gio_rw_i2c1_cfg___sda3_idle___lsb 11
504#define reg_gio_rw_i2c1_cfg___sda3_idle___width 1
505#define reg_gio_rw_i2c1_cfg___sda3_idle___bit 11
506#define reg_gio_rw_i2c1_cfg___sda_sel___lsb 12
507#define reg_gio_rw_i2c1_cfg___sda_sel___width 2
508#define reg_gio_rw_i2c1_cfg___sen_idle___lsb 14
509#define reg_gio_rw_i2c1_cfg___sen_idle___width 1
510#define reg_gio_rw_i2c1_cfg___sen_idle___bit 14
511#define reg_gio_rw_i2c1_cfg___sen_inv___lsb 15
512#define reg_gio_rw_i2c1_cfg___sen_inv___width 1
513#define reg_gio_rw_i2c1_cfg___sen_inv___bit 15
514#define reg_gio_rw_i2c1_cfg___sen_sel___lsb 16
515#define reg_gio_rw_i2c1_cfg___sen_sel___width 2
516#define reg_gio_rw_i2c1_cfg_offset 168
517
518/* Register rw_i2c1_ctrl, scope gio, type rw */
519#define reg_gio_rw_i2c1_ctrl___trf_bits___lsb 0
520#define reg_gio_rw_i2c1_ctrl___trf_bits___width 6
521#define reg_gio_rw_i2c1_ctrl___switch_dir___lsb 6
522#define reg_gio_rw_i2c1_ctrl___switch_dir___width 6
523#define reg_gio_rw_i2c1_ctrl___extra_start___lsb 12
524#define reg_gio_rw_i2c1_ctrl___extra_start___width 3
525#define reg_gio_rw_i2c1_ctrl___early_end___lsb 15
526#define reg_gio_rw_i2c1_ctrl___early_end___width 1
527#define reg_gio_rw_i2c1_ctrl___early_end___bit 15
528#define reg_gio_rw_i2c1_ctrl___start_stop___lsb 16
529#define reg_gio_rw_i2c1_ctrl___start_stop___width 1
530#define reg_gio_rw_i2c1_ctrl___start_stop___bit 16
531#define reg_gio_rw_i2c1_ctrl___ack_dir0___lsb 17
532#define reg_gio_rw_i2c1_ctrl___ack_dir0___width 1
533#define reg_gio_rw_i2c1_ctrl___ack_dir0___bit 17
534#define reg_gio_rw_i2c1_ctrl___ack_dir1___lsb 18
535#define reg_gio_rw_i2c1_ctrl___ack_dir1___width 1
536#define reg_gio_rw_i2c1_ctrl___ack_dir1___bit 18
537#define reg_gio_rw_i2c1_ctrl___ack_dir2___lsb 19
538#define reg_gio_rw_i2c1_ctrl___ack_dir2___width 1
539#define reg_gio_rw_i2c1_ctrl___ack_dir2___bit 19
540#define reg_gio_rw_i2c1_ctrl___ack_dir3___lsb 20
541#define reg_gio_rw_i2c1_ctrl___ack_dir3___width 1
542#define reg_gio_rw_i2c1_ctrl___ack_dir3___bit 20
543#define reg_gio_rw_i2c1_ctrl___ack_dir4___lsb 21
544#define reg_gio_rw_i2c1_ctrl___ack_dir4___width 1
545#define reg_gio_rw_i2c1_ctrl___ack_dir4___bit 21
546#define reg_gio_rw_i2c1_ctrl___ack_dir5___lsb 22
547#define reg_gio_rw_i2c1_ctrl___ack_dir5___width 1
548#define reg_gio_rw_i2c1_ctrl___ack_dir5___bit 22
549#define reg_gio_rw_i2c1_ctrl___ack_bit___lsb 23
550#define reg_gio_rw_i2c1_ctrl___ack_bit___width 1
551#define reg_gio_rw_i2c1_ctrl___ack_bit___bit 23
552#define reg_gio_rw_i2c1_ctrl___start_bit___lsb 24
553#define reg_gio_rw_i2c1_ctrl___start_bit___width 1
554#define reg_gio_rw_i2c1_ctrl___start_bit___bit 24
555#define reg_gio_rw_i2c1_ctrl___freq___lsb 25
556#define reg_gio_rw_i2c1_ctrl___freq___width 2
557#define reg_gio_rw_i2c1_ctrl_offset 172
558
559/* Register rw_i2c1_data, scope gio, type rw */
560#define reg_gio_rw_i2c1_data___data0___lsb 0
561#define reg_gio_rw_i2c1_data___data0___width 8
562#define reg_gio_rw_i2c1_data___data1___lsb 8
563#define reg_gio_rw_i2c1_data___data1___width 8
564#define reg_gio_rw_i2c1_data___data2___lsb 16
565#define reg_gio_rw_i2c1_data___data2___width 8
566#define reg_gio_rw_i2c1_data___data3___lsb 24
567#define reg_gio_rw_i2c1_data___data3___width 8
568#define reg_gio_rw_i2c1_data_offset 176
569
570/* Register rw_i2c1_data2, scope gio, type rw */
571#define reg_gio_rw_i2c1_data2___data4___lsb 0
572#define reg_gio_rw_i2c1_data2___data4___width 8
573#define reg_gio_rw_i2c1_data2___data5___lsb 8
574#define reg_gio_rw_i2c1_data2___data5___width 8
575#define reg_gio_rw_i2c1_data2___start_val___lsb 16
576#define reg_gio_rw_i2c1_data2___start_val___width 6
577#define reg_gio_rw_i2c1_data2___ack_val___lsb 22
578#define reg_gio_rw_i2c1_data2___ack_val___width 6
579#define reg_gio_rw_i2c1_data2_offset 180
580
581/* Register r_ppwm_stat, scope gio, type r */
582#define reg_gio_r_ppwm_stat___freq___lsb 0
583#define reg_gio_r_ppwm_stat___freq___width 2
584#define reg_gio_r_ppwm_stat_offset 184
585
586/* Register rw_ppwm_data, scope gio, type rw */
587#define reg_gio_rw_ppwm_data___data___lsb 0
588#define reg_gio_rw_ppwm_data___data___width 8
589#define reg_gio_rw_ppwm_data_offset 188
590
591/* Register rw_pwm0_ctrl, scope gio, type rw */
592#define reg_gio_rw_pwm0_ctrl___mode___lsb 0
593#define reg_gio_rw_pwm0_ctrl___mode___width 2
594#define reg_gio_rw_pwm0_ctrl___ccd_override___lsb 2
595#define reg_gio_rw_pwm0_ctrl___ccd_override___width 1
596#define reg_gio_rw_pwm0_ctrl___ccd_override___bit 2
597#define reg_gio_rw_pwm0_ctrl___ccd_val___lsb 3
598#define reg_gio_rw_pwm0_ctrl___ccd_val___width 1
599#define reg_gio_rw_pwm0_ctrl___ccd_val___bit 3
600#define reg_gio_rw_pwm0_ctrl_offset 192
601
602/* Register rw_pwm0_var, scope gio, type rw */
603#define reg_gio_rw_pwm0_var___lo___lsb 0
604#define reg_gio_rw_pwm0_var___lo___width 13
605#define reg_gio_rw_pwm0_var___hi___lsb 13
606#define reg_gio_rw_pwm0_var___hi___width 13
607#define reg_gio_rw_pwm0_var_offset 196
608
609/* Register rw_pwm0_data, scope gio, type rw */
610#define reg_gio_rw_pwm0_data___data___lsb 0
611#define reg_gio_rw_pwm0_data___data___width 8
612#define reg_gio_rw_pwm0_data_offset 200
613
614/* Register rw_pwm1_ctrl, scope gio, type rw */
615#define reg_gio_rw_pwm1_ctrl___mode___lsb 0
616#define reg_gio_rw_pwm1_ctrl___mode___width 2
617#define reg_gio_rw_pwm1_ctrl___ccd_override___lsb 2
618#define reg_gio_rw_pwm1_ctrl___ccd_override___width 1
619#define reg_gio_rw_pwm1_ctrl___ccd_override___bit 2
620#define reg_gio_rw_pwm1_ctrl___ccd_val___lsb 3
621#define reg_gio_rw_pwm1_ctrl___ccd_val___width 1
622#define reg_gio_rw_pwm1_ctrl___ccd_val___bit 3
623#define reg_gio_rw_pwm1_ctrl_offset 204
624
625/* Register rw_pwm1_var, scope gio, type rw */
626#define reg_gio_rw_pwm1_var___lo___lsb 0
627#define reg_gio_rw_pwm1_var___lo___width 13
628#define reg_gio_rw_pwm1_var___hi___lsb 13
629#define reg_gio_rw_pwm1_var___hi___width 13
630#define reg_gio_rw_pwm1_var_offset 208
631
632/* Register rw_pwm1_data, scope gio, type rw */
633#define reg_gio_rw_pwm1_data___data___lsb 0
634#define reg_gio_rw_pwm1_data___data___width 8
635#define reg_gio_rw_pwm1_data_offset 212
636
637/* Register rw_pwm2_ctrl, scope gio, type rw */
638#define reg_gio_rw_pwm2_ctrl___mode___lsb 0
639#define reg_gio_rw_pwm2_ctrl___mode___width 2
640#define reg_gio_rw_pwm2_ctrl___ccd_override___lsb 2
641#define reg_gio_rw_pwm2_ctrl___ccd_override___width 1
642#define reg_gio_rw_pwm2_ctrl___ccd_override___bit 2
643#define reg_gio_rw_pwm2_ctrl___ccd_val___lsb 3
644#define reg_gio_rw_pwm2_ctrl___ccd_val___width 1
645#define reg_gio_rw_pwm2_ctrl___ccd_val___bit 3
646#define reg_gio_rw_pwm2_ctrl_offset 216
647
648/* Register rw_pwm2_var, scope gio, type rw */
649#define reg_gio_rw_pwm2_var___lo___lsb 0
650#define reg_gio_rw_pwm2_var___lo___width 13
651#define reg_gio_rw_pwm2_var___hi___lsb 13
652#define reg_gio_rw_pwm2_var___hi___width 13
653#define reg_gio_rw_pwm2_var_offset 220
654
655/* Register rw_pwm2_data, scope gio, type rw */
656#define reg_gio_rw_pwm2_data___data___lsb 0
657#define reg_gio_rw_pwm2_data___data___width 8
658#define reg_gio_rw_pwm2_data_offset 224
659
660/* Register rw_pwm_in_cfg, scope gio, type rw */
661#define reg_gio_rw_pwm_in_cfg___pin___lsb 0
662#define reg_gio_rw_pwm_in_cfg___pin___width 3
663#define reg_gio_rw_pwm_in_cfg_offset 228
664
665/* Register r_pwm_in_lo, scope gio, type r */
666#define reg_gio_r_pwm_in_lo___data___lsb 0
667#define reg_gio_r_pwm_in_lo___data___width 32
668#define reg_gio_r_pwm_in_lo_offset 232
669
670/* Register r_pwm_in_hi, scope gio, type r */
671#define reg_gio_r_pwm_in_hi___data___lsb 0
672#define reg_gio_r_pwm_in_hi___data___width 32
673#define reg_gio_r_pwm_in_hi_offset 236
674
675/* Register r_pwm_in_cnt, scope gio, type r */
676#define reg_gio_r_pwm_in_cnt___data___lsb 0
677#define reg_gio_r_pwm_in_cnt___data___width 32
678#define reg_gio_r_pwm_in_cnt_offset 240
679
680
681/* Constants */
682#define regk_gio_anyedge 0x00000007
683#define regk_gio_f100k 0x00000000
684#define regk_gio_f1562 0x00000000
685#define regk_gio_f195 0x00000003
686#define regk_gio_f1m 0x00000002
687#define regk_gio_f390 0x00000002
688#define regk_gio_f400k 0x00000001
689#define regk_gio_f5m 0x00000003
690#define regk_gio_f781 0x00000001
691#define regk_gio_hi 0x00000001
692#define regk_gio_in 0x00000000
693#define regk_gio_intr_pa0 0x00000000
694#define regk_gio_intr_pa1 0x00000000
695#define regk_gio_intr_pa10 0x00000001
696#define regk_gio_intr_pa11 0x00000001
697#define regk_gio_intr_pa12 0x00000001
698#define regk_gio_intr_pa13 0x00000001
699#define regk_gio_intr_pa14 0x00000001
700#define regk_gio_intr_pa15 0x00000001
701#define regk_gio_intr_pa16 0x00000002
702#define regk_gio_intr_pa17 0x00000002
703#define regk_gio_intr_pa18 0x00000002
704#define regk_gio_intr_pa19 0x00000002
705#define regk_gio_intr_pa2 0x00000000
706#define regk_gio_intr_pa20 0x00000002
707#define regk_gio_intr_pa21 0x00000002
708#define regk_gio_intr_pa22 0x00000002
709#define regk_gio_intr_pa23 0x00000002
710#define regk_gio_intr_pa24 0x00000003
711#define regk_gio_intr_pa25 0x00000003
712#define regk_gio_intr_pa26 0x00000003
713#define regk_gio_intr_pa27 0x00000003
714#define regk_gio_intr_pa28 0x00000003
715#define regk_gio_intr_pa29 0x00000003
716#define regk_gio_intr_pa3 0x00000000
717#define regk_gio_intr_pa30 0x00000003
718#define regk_gio_intr_pa31 0x00000003
719#define regk_gio_intr_pa4 0x00000000
720#define regk_gio_intr_pa5 0x00000000
721#define regk_gio_intr_pa6 0x00000000
722#define regk_gio_intr_pa7 0x00000000
723#define regk_gio_intr_pa8 0x00000001
724#define regk_gio_intr_pa9 0x00000001
725#define regk_gio_intr_pb0 0x00000004
726#define regk_gio_intr_pb1 0x00000004
727#define regk_gio_intr_pb10 0x00000005
728#define regk_gio_intr_pb11 0x00000005
729#define regk_gio_intr_pb12 0x00000005
730#define regk_gio_intr_pb13 0x00000005
731#define regk_gio_intr_pb14 0x00000005
732#define regk_gio_intr_pb15 0x00000005
733#define regk_gio_intr_pb16 0x00000006
734#define regk_gio_intr_pb17 0x00000006
735#define regk_gio_intr_pb18 0x00000006
736#define regk_gio_intr_pb19 0x00000006
737#define regk_gio_intr_pb2 0x00000004
738#define regk_gio_intr_pb20 0x00000006
739#define regk_gio_intr_pb21 0x00000006
740#define regk_gio_intr_pb22 0x00000006
741#define regk_gio_intr_pb23 0x00000006
742#define regk_gio_intr_pb24 0x00000007
743#define regk_gio_intr_pb25 0x00000007
744#define regk_gio_intr_pb26 0x00000007
745#define regk_gio_intr_pb27 0x00000007
746#define regk_gio_intr_pb28 0x00000007
747#define regk_gio_intr_pb29 0x00000007
748#define regk_gio_intr_pb3 0x00000004
749#define regk_gio_intr_pb30 0x00000007
750#define regk_gio_intr_pb31 0x00000007
751#define regk_gio_intr_pb4 0x00000004
752#define regk_gio_intr_pb5 0x00000004
753#define regk_gio_intr_pb6 0x00000004
754#define regk_gio_intr_pb7 0x00000004
755#define regk_gio_intr_pb8 0x00000005
756#define regk_gio_intr_pb9 0x00000005
757#define regk_gio_intr_pc0 0x00000008
758#define regk_gio_intr_pc1 0x00000008
759#define regk_gio_intr_pc10 0x00000009
760#define regk_gio_intr_pc11 0x00000009
761#define regk_gio_intr_pc12 0x00000009
762#define regk_gio_intr_pc13 0x00000009
763#define regk_gio_intr_pc14 0x00000009
764#define regk_gio_intr_pc15 0x00000009
765#define regk_gio_intr_pc2 0x00000008
766#define regk_gio_intr_pc3 0x00000008
767#define regk_gio_intr_pc4 0x00000008
768#define regk_gio_intr_pc5 0x00000008
769#define regk_gio_intr_pc6 0x00000008
770#define regk_gio_intr_pc7 0x00000008
771#define regk_gio_intr_pc8 0x00000009
772#define regk_gio_intr_pc9 0x00000009
773#define regk_gio_intr_pd0 0x0000000c
774#define regk_gio_intr_pd1 0x0000000c
775#define regk_gio_intr_pd10 0x0000000d
776#define regk_gio_intr_pd11 0x0000000d
777#define regk_gio_intr_pd12 0x0000000d
778#define regk_gio_intr_pd13 0x0000000d
779#define regk_gio_intr_pd14 0x0000000d
780#define regk_gio_intr_pd15 0x0000000d
781#define regk_gio_intr_pd16 0x0000000e
782#define regk_gio_intr_pd17 0x0000000e
783#define regk_gio_intr_pd18 0x0000000e
784#define regk_gio_intr_pd19 0x0000000e
785#define regk_gio_intr_pd2 0x0000000c
786#define regk_gio_intr_pd20 0x0000000e
787#define regk_gio_intr_pd21 0x0000000e
788#define regk_gio_intr_pd22 0x0000000e
789#define regk_gio_intr_pd23 0x0000000e
790#define regk_gio_intr_pd24 0x0000000f
791#define regk_gio_intr_pd25 0x0000000f
792#define regk_gio_intr_pd26 0x0000000f
793#define regk_gio_intr_pd27 0x0000000f
794#define regk_gio_intr_pd28 0x0000000f
795#define regk_gio_intr_pd29 0x0000000f
796#define regk_gio_intr_pd3 0x0000000c
797#define regk_gio_intr_pd30 0x0000000f
798#define regk_gio_intr_pd31 0x0000000f
799#define regk_gio_intr_pd4 0x0000000c
800#define regk_gio_intr_pd5 0x0000000c
801#define regk_gio_intr_pd6 0x0000000c
802#define regk_gio_intr_pd7 0x0000000c
803#define regk_gio_intr_pd8 0x0000000d
804#define regk_gio_intr_pd9 0x0000000d
805#define regk_gio_lo 0x00000002
806#define regk_gio_lsb 0x00000000
807#define regk_gio_msb 0x00000001
808#define regk_gio_negedge 0x00000006
809#define regk_gio_no 0x00000000
810#define regk_gio_no_switch 0x0000003f
811#define regk_gio_none 0x00000007
812#define regk_gio_off 0x00000000
813#define regk_gio_opendrain 0x00000000
814#define regk_gio_out 0x00000001
815#define regk_gio_posedge 0x00000005
816#define regk_gio_pwm_hfp 0x00000002
817#define regk_gio_pwm_pa0 0x00000001
818#define regk_gio_pwm_pa19 0x00000004
819#define regk_gio_pwm_pa6 0x00000002
820#define regk_gio_pwm_pa7 0x00000003
821#define regk_gio_pwm_pb26 0x00000005
822#define regk_gio_pwm_pd23 0x00000006
823#define regk_gio_pwm_pd31 0x00000007
824#define regk_gio_pwm_std 0x00000001
825#define regk_gio_pwm_var 0x00000003
826#define regk_gio_rw_i2c0_cfg_default 0x00000020
827#define regk_gio_rw_i2c0_ctrl_default 0x00010000
828#define regk_gio_rw_i2c0_start_default 0x00000000
829#define regk_gio_rw_i2c1_cfg_default 0x00000aa0
830#define regk_gio_rw_i2c1_ctrl_default 0x00010000
831#define regk_gio_rw_i2c1_start_default 0x00000000
832#define regk_gio_rw_intr_cfg_default 0x00000000
833#define regk_gio_rw_intr_mask_default 0x00000000
834#define regk_gio_rw_pa_oe_default 0x00000000
835#define regk_gio_rw_pb_oe_default 0x00000000
836#define regk_gio_rw_pc_oe_default 0x00000000
837#define regk_gio_rw_ppwm_data_default 0x00000000
838#define regk_gio_rw_pwm0_ctrl_default 0x00000000
839#define regk_gio_rw_pwm1_ctrl_default 0x00000000
840#define regk_gio_rw_pwm2_ctrl_default 0x00000000
841#define regk_gio_rw_pwm_in_cfg_default 0x00000000
842#define regk_gio_sda0 0x00000000
843#define regk_gio_sda1 0x00000001
844#define regk_gio_sda2 0x00000002
845#define regk_gio_sda3 0x00000003
846#define regk_gio_sen 0x00000000
847#define regk_gio_set 0x00000003
848#define regk_gio_yes 0x00000001
849#endif /* __gio_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/pinmux_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/pinmux_defs_asm.h
deleted file mode 100644
index c3dc9c666c46..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/pinmux_defs_asm.h
+++ /dev/null
@@ -1,572 +0,0 @@
1#ifndef __pinmux_defs_asm_h
2#define __pinmux_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: pinmux.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile pinmux_defs_asm.h pinmux.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_hwprot, scope pinmux, type rw */
54#define reg_pinmux_rw_hwprot___eth___lsb 0
55#define reg_pinmux_rw_hwprot___eth___width 1
56#define reg_pinmux_rw_hwprot___eth___bit 0
57#define reg_pinmux_rw_hwprot___eth_mdio___lsb 1
58#define reg_pinmux_rw_hwprot___eth_mdio___width 1
59#define reg_pinmux_rw_hwprot___eth_mdio___bit 1
60#define reg_pinmux_rw_hwprot___geth___lsb 2
61#define reg_pinmux_rw_hwprot___geth___width 1
62#define reg_pinmux_rw_hwprot___geth___bit 2
63#define reg_pinmux_rw_hwprot___tg___lsb 3
64#define reg_pinmux_rw_hwprot___tg___width 1
65#define reg_pinmux_rw_hwprot___tg___bit 3
66#define reg_pinmux_rw_hwprot___tg_clk___lsb 4
67#define reg_pinmux_rw_hwprot___tg_clk___width 1
68#define reg_pinmux_rw_hwprot___tg_clk___bit 4
69#define reg_pinmux_rw_hwprot___vout___lsb 5
70#define reg_pinmux_rw_hwprot___vout___width 1
71#define reg_pinmux_rw_hwprot___vout___bit 5
72#define reg_pinmux_rw_hwprot___vout_sync___lsb 6
73#define reg_pinmux_rw_hwprot___vout_sync___width 1
74#define reg_pinmux_rw_hwprot___vout_sync___bit 6
75#define reg_pinmux_rw_hwprot___ser1___lsb 7
76#define reg_pinmux_rw_hwprot___ser1___width 1
77#define reg_pinmux_rw_hwprot___ser1___bit 7
78#define reg_pinmux_rw_hwprot___ser2___lsb 8
79#define reg_pinmux_rw_hwprot___ser2___width 1
80#define reg_pinmux_rw_hwprot___ser2___bit 8
81#define reg_pinmux_rw_hwprot___ser3___lsb 9
82#define reg_pinmux_rw_hwprot___ser3___width 1
83#define reg_pinmux_rw_hwprot___ser3___bit 9
84#define reg_pinmux_rw_hwprot___ser4___lsb 10
85#define reg_pinmux_rw_hwprot___ser4___width 1
86#define reg_pinmux_rw_hwprot___ser4___bit 10
87#define reg_pinmux_rw_hwprot___sser___lsb 11
88#define reg_pinmux_rw_hwprot___sser___width 1
89#define reg_pinmux_rw_hwprot___sser___bit 11
90#define reg_pinmux_rw_hwprot___pwm0___lsb 12
91#define reg_pinmux_rw_hwprot___pwm0___width 1
92#define reg_pinmux_rw_hwprot___pwm0___bit 12
93#define reg_pinmux_rw_hwprot___pwm1___lsb 13
94#define reg_pinmux_rw_hwprot___pwm1___width 1
95#define reg_pinmux_rw_hwprot___pwm1___bit 13
96#define reg_pinmux_rw_hwprot___pwm2___lsb 14
97#define reg_pinmux_rw_hwprot___pwm2___width 1
98#define reg_pinmux_rw_hwprot___pwm2___bit 14
99#define reg_pinmux_rw_hwprot___timer0___lsb 15
100#define reg_pinmux_rw_hwprot___timer0___width 1
101#define reg_pinmux_rw_hwprot___timer0___bit 15
102#define reg_pinmux_rw_hwprot___timer1___lsb 16
103#define reg_pinmux_rw_hwprot___timer1___width 1
104#define reg_pinmux_rw_hwprot___timer1___bit 16
105#define reg_pinmux_rw_hwprot___pio___lsb 17
106#define reg_pinmux_rw_hwprot___pio___width 1
107#define reg_pinmux_rw_hwprot___pio___bit 17
108#define reg_pinmux_rw_hwprot___i2c0___lsb 18
109#define reg_pinmux_rw_hwprot___i2c0___width 1
110#define reg_pinmux_rw_hwprot___i2c0___bit 18
111#define reg_pinmux_rw_hwprot___i2c1___lsb 19
112#define reg_pinmux_rw_hwprot___i2c1___width 1
113#define reg_pinmux_rw_hwprot___i2c1___bit 19
114#define reg_pinmux_rw_hwprot___i2c1_sda1___lsb 20
115#define reg_pinmux_rw_hwprot___i2c1_sda1___width 1
116#define reg_pinmux_rw_hwprot___i2c1_sda1___bit 20
117#define reg_pinmux_rw_hwprot___i2c1_sda2___lsb 21
118#define reg_pinmux_rw_hwprot___i2c1_sda2___width 1
119#define reg_pinmux_rw_hwprot___i2c1_sda2___bit 21
120#define reg_pinmux_rw_hwprot___i2c1_sda3___lsb 22
121#define reg_pinmux_rw_hwprot___i2c1_sda3___width 1
122#define reg_pinmux_rw_hwprot___i2c1_sda3___bit 22
123#define reg_pinmux_rw_hwprot___i2c1_sen___lsb 23
124#define reg_pinmux_rw_hwprot___i2c1_sen___width 1
125#define reg_pinmux_rw_hwprot___i2c1_sen___bit 23
126#define reg_pinmux_rw_hwprot_offset 0
127
128/* Register rw_gio_pa, scope pinmux, type rw */
129#define reg_pinmux_rw_gio_pa___pa0___lsb 0
130#define reg_pinmux_rw_gio_pa___pa0___width 1
131#define reg_pinmux_rw_gio_pa___pa0___bit 0
132#define reg_pinmux_rw_gio_pa___pa1___lsb 1
133#define reg_pinmux_rw_gio_pa___pa1___width 1
134#define reg_pinmux_rw_gio_pa___pa1___bit 1
135#define reg_pinmux_rw_gio_pa___pa2___lsb 2
136#define reg_pinmux_rw_gio_pa___pa2___width 1
137#define reg_pinmux_rw_gio_pa___pa2___bit 2
138#define reg_pinmux_rw_gio_pa___pa3___lsb 3
139#define reg_pinmux_rw_gio_pa___pa3___width 1
140#define reg_pinmux_rw_gio_pa___pa3___bit 3
141#define reg_pinmux_rw_gio_pa___pa4___lsb 4
142#define reg_pinmux_rw_gio_pa___pa4___width 1
143#define reg_pinmux_rw_gio_pa___pa4___bit 4
144#define reg_pinmux_rw_gio_pa___pa5___lsb 5
145#define reg_pinmux_rw_gio_pa___pa5___width 1
146#define reg_pinmux_rw_gio_pa___pa5___bit 5
147#define reg_pinmux_rw_gio_pa___pa6___lsb 6
148#define reg_pinmux_rw_gio_pa___pa6___width 1
149#define reg_pinmux_rw_gio_pa___pa6___bit 6
150#define reg_pinmux_rw_gio_pa___pa7___lsb 7
151#define reg_pinmux_rw_gio_pa___pa7___width 1
152#define reg_pinmux_rw_gio_pa___pa7___bit 7
153#define reg_pinmux_rw_gio_pa___pa8___lsb 8
154#define reg_pinmux_rw_gio_pa___pa8___width 1
155#define reg_pinmux_rw_gio_pa___pa8___bit 8
156#define reg_pinmux_rw_gio_pa___pa9___lsb 9
157#define reg_pinmux_rw_gio_pa___pa9___width 1
158#define reg_pinmux_rw_gio_pa___pa9___bit 9
159#define reg_pinmux_rw_gio_pa___pa10___lsb 10
160#define reg_pinmux_rw_gio_pa___pa10___width 1
161#define reg_pinmux_rw_gio_pa___pa10___bit 10
162#define reg_pinmux_rw_gio_pa___pa11___lsb 11
163#define reg_pinmux_rw_gio_pa___pa11___width 1
164#define reg_pinmux_rw_gio_pa___pa11___bit 11
165#define reg_pinmux_rw_gio_pa___pa12___lsb 12
166#define reg_pinmux_rw_gio_pa___pa12___width 1
167#define reg_pinmux_rw_gio_pa___pa12___bit 12
168#define reg_pinmux_rw_gio_pa___pa13___lsb 13
169#define reg_pinmux_rw_gio_pa___pa13___width 1
170#define reg_pinmux_rw_gio_pa___pa13___bit 13
171#define reg_pinmux_rw_gio_pa___pa14___lsb 14
172#define reg_pinmux_rw_gio_pa___pa14___width 1
173#define reg_pinmux_rw_gio_pa___pa14___bit 14
174#define reg_pinmux_rw_gio_pa___pa15___lsb 15
175#define reg_pinmux_rw_gio_pa___pa15___width 1
176#define reg_pinmux_rw_gio_pa___pa15___bit 15
177#define reg_pinmux_rw_gio_pa___pa16___lsb 16
178#define reg_pinmux_rw_gio_pa___pa16___width 1
179#define reg_pinmux_rw_gio_pa___pa16___bit 16
180#define reg_pinmux_rw_gio_pa___pa17___lsb 17
181#define reg_pinmux_rw_gio_pa___pa17___width 1
182#define reg_pinmux_rw_gio_pa___pa17___bit 17
183#define reg_pinmux_rw_gio_pa___pa18___lsb 18
184#define reg_pinmux_rw_gio_pa___pa18___width 1
185#define reg_pinmux_rw_gio_pa___pa18___bit 18
186#define reg_pinmux_rw_gio_pa___pa19___lsb 19
187#define reg_pinmux_rw_gio_pa___pa19___width 1
188#define reg_pinmux_rw_gio_pa___pa19___bit 19
189#define reg_pinmux_rw_gio_pa___pa20___lsb 20
190#define reg_pinmux_rw_gio_pa___pa20___width 1
191#define reg_pinmux_rw_gio_pa___pa20___bit 20
192#define reg_pinmux_rw_gio_pa___pa21___lsb 21
193#define reg_pinmux_rw_gio_pa___pa21___width 1
194#define reg_pinmux_rw_gio_pa___pa21___bit 21
195#define reg_pinmux_rw_gio_pa___pa22___lsb 22
196#define reg_pinmux_rw_gio_pa___pa22___width 1
197#define reg_pinmux_rw_gio_pa___pa22___bit 22
198#define reg_pinmux_rw_gio_pa___pa23___lsb 23
199#define reg_pinmux_rw_gio_pa___pa23___width 1
200#define reg_pinmux_rw_gio_pa___pa23___bit 23
201#define reg_pinmux_rw_gio_pa___pa24___lsb 24
202#define reg_pinmux_rw_gio_pa___pa24___width 1
203#define reg_pinmux_rw_gio_pa___pa24___bit 24
204#define reg_pinmux_rw_gio_pa___pa25___lsb 25
205#define reg_pinmux_rw_gio_pa___pa25___width 1
206#define reg_pinmux_rw_gio_pa___pa25___bit 25
207#define reg_pinmux_rw_gio_pa___pa26___lsb 26
208#define reg_pinmux_rw_gio_pa___pa26___width 1
209#define reg_pinmux_rw_gio_pa___pa26___bit 26
210#define reg_pinmux_rw_gio_pa___pa27___lsb 27
211#define reg_pinmux_rw_gio_pa___pa27___width 1
212#define reg_pinmux_rw_gio_pa___pa27___bit 27
213#define reg_pinmux_rw_gio_pa___pa28___lsb 28
214#define reg_pinmux_rw_gio_pa___pa28___width 1
215#define reg_pinmux_rw_gio_pa___pa28___bit 28
216#define reg_pinmux_rw_gio_pa___pa29___lsb 29
217#define reg_pinmux_rw_gio_pa___pa29___width 1
218#define reg_pinmux_rw_gio_pa___pa29___bit 29
219#define reg_pinmux_rw_gio_pa___pa30___lsb 30
220#define reg_pinmux_rw_gio_pa___pa30___width 1
221#define reg_pinmux_rw_gio_pa___pa30___bit 30
222#define reg_pinmux_rw_gio_pa___pa31___lsb 31
223#define reg_pinmux_rw_gio_pa___pa31___width 1
224#define reg_pinmux_rw_gio_pa___pa31___bit 31
225#define reg_pinmux_rw_gio_pa_offset 4
226
227/* Register rw_gio_pb, scope pinmux, type rw */
228#define reg_pinmux_rw_gio_pb___pb0___lsb 0
229#define reg_pinmux_rw_gio_pb___pb0___width 1
230#define reg_pinmux_rw_gio_pb___pb0___bit 0
231#define reg_pinmux_rw_gio_pb___pb1___lsb 1
232#define reg_pinmux_rw_gio_pb___pb1___width 1
233#define reg_pinmux_rw_gio_pb___pb1___bit 1
234#define reg_pinmux_rw_gio_pb___pb2___lsb 2
235#define reg_pinmux_rw_gio_pb___pb2___width 1
236#define reg_pinmux_rw_gio_pb___pb2___bit 2
237#define reg_pinmux_rw_gio_pb___pb3___lsb 3
238#define reg_pinmux_rw_gio_pb___pb3___width 1
239#define reg_pinmux_rw_gio_pb___pb3___bit 3
240#define reg_pinmux_rw_gio_pb___pb4___lsb 4
241#define reg_pinmux_rw_gio_pb___pb4___width 1
242#define reg_pinmux_rw_gio_pb___pb4___bit 4
243#define reg_pinmux_rw_gio_pb___pb5___lsb 5
244#define reg_pinmux_rw_gio_pb___pb5___width 1
245#define reg_pinmux_rw_gio_pb___pb5___bit 5
246#define reg_pinmux_rw_gio_pb___pb6___lsb 6
247#define reg_pinmux_rw_gio_pb___pb6___width 1
248#define reg_pinmux_rw_gio_pb___pb6___bit 6
249#define reg_pinmux_rw_gio_pb___pb7___lsb 7
250#define reg_pinmux_rw_gio_pb___pb7___width 1
251#define reg_pinmux_rw_gio_pb___pb7___bit 7
252#define reg_pinmux_rw_gio_pb___pb8___lsb 8
253#define reg_pinmux_rw_gio_pb___pb8___width 1
254#define reg_pinmux_rw_gio_pb___pb8___bit 8
255#define reg_pinmux_rw_gio_pb___pb9___lsb 9
256#define reg_pinmux_rw_gio_pb___pb9___width 1
257#define reg_pinmux_rw_gio_pb___pb9___bit 9
258#define reg_pinmux_rw_gio_pb___pb10___lsb 10
259#define reg_pinmux_rw_gio_pb___pb10___width 1
260#define reg_pinmux_rw_gio_pb___pb10___bit 10
261#define reg_pinmux_rw_gio_pb___pb11___lsb 11
262#define reg_pinmux_rw_gio_pb___pb11___width 1
263#define reg_pinmux_rw_gio_pb___pb11___bit 11
264#define reg_pinmux_rw_gio_pb___pb12___lsb 12
265#define reg_pinmux_rw_gio_pb___pb12___width 1
266#define reg_pinmux_rw_gio_pb___pb12___bit 12
267#define reg_pinmux_rw_gio_pb___pb13___lsb 13
268#define reg_pinmux_rw_gio_pb___pb13___width 1
269#define reg_pinmux_rw_gio_pb___pb13___bit 13
270#define reg_pinmux_rw_gio_pb___pb14___lsb 14
271#define reg_pinmux_rw_gio_pb___pb14___width 1
272#define reg_pinmux_rw_gio_pb___pb14___bit 14
273#define reg_pinmux_rw_gio_pb___pb15___lsb 15
274#define reg_pinmux_rw_gio_pb___pb15___width 1
275#define reg_pinmux_rw_gio_pb___pb15___bit 15
276#define reg_pinmux_rw_gio_pb___pb16___lsb 16
277#define reg_pinmux_rw_gio_pb___pb16___width 1
278#define reg_pinmux_rw_gio_pb___pb16___bit 16
279#define reg_pinmux_rw_gio_pb___pb17___lsb 17
280#define reg_pinmux_rw_gio_pb___pb17___width 1
281#define reg_pinmux_rw_gio_pb___pb17___bit 17
282#define reg_pinmux_rw_gio_pb___pb18___lsb 18
283#define reg_pinmux_rw_gio_pb___pb18___width 1
284#define reg_pinmux_rw_gio_pb___pb18___bit 18
285#define reg_pinmux_rw_gio_pb___pb19___lsb 19
286#define reg_pinmux_rw_gio_pb___pb19___width 1
287#define reg_pinmux_rw_gio_pb___pb19___bit 19
288#define reg_pinmux_rw_gio_pb___pb20___lsb 20
289#define reg_pinmux_rw_gio_pb___pb20___width 1
290#define reg_pinmux_rw_gio_pb___pb20___bit 20
291#define reg_pinmux_rw_gio_pb___pb21___lsb 21
292#define reg_pinmux_rw_gio_pb___pb21___width 1
293#define reg_pinmux_rw_gio_pb___pb21___bit 21
294#define reg_pinmux_rw_gio_pb___pb22___lsb 22
295#define reg_pinmux_rw_gio_pb___pb22___width 1
296#define reg_pinmux_rw_gio_pb___pb22___bit 22
297#define reg_pinmux_rw_gio_pb___pb23___lsb 23
298#define reg_pinmux_rw_gio_pb___pb23___width 1
299#define reg_pinmux_rw_gio_pb___pb23___bit 23
300#define reg_pinmux_rw_gio_pb___pb24___lsb 24
301#define reg_pinmux_rw_gio_pb___pb24___width 1
302#define reg_pinmux_rw_gio_pb___pb24___bit 24
303#define reg_pinmux_rw_gio_pb___pb25___lsb 25
304#define reg_pinmux_rw_gio_pb___pb25___width 1
305#define reg_pinmux_rw_gio_pb___pb25___bit 25
306#define reg_pinmux_rw_gio_pb___pb26___lsb 26
307#define reg_pinmux_rw_gio_pb___pb26___width 1
308#define reg_pinmux_rw_gio_pb___pb26___bit 26
309#define reg_pinmux_rw_gio_pb___pb27___lsb 27
310#define reg_pinmux_rw_gio_pb___pb27___width 1
311#define reg_pinmux_rw_gio_pb___pb27___bit 27
312#define reg_pinmux_rw_gio_pb___pb28___lsb 28
313#define reg_pinmux_rw_gio_pb___pb28___width 1
314#define reg_pinmux_rw_gio_pb___pb28___bit 28
315#define reg_pinmux_rw_gio_pb___pb29___lsb 29
316#define reg_pinmux_rw_gio_pb___pb29___width 1
317#define reg_pinmux_rw_gio_pb___pb29___bit 29
318#define reg_pinmux_rw_gio_pb___pb30___lsb 30
319#define reg_pinmux_rw_gio_pb___pb30___width 1
320#define reg_pinmux_rw_gio_pb___pb30___bit 30
321#define reg_pinmux_rw_gio_pb___pb31___lsb 31
322#define reg_pinmux_rw_gio_pb___pb31___width 1
323#define reg_pinmux_rw_gio_pb___pb31___bit 31
324#define reg_pinmux_rw_gio_pb_offset 8
325
326/* Register rw_gio_pc, scope pinmux, type rw */
327#define reg_pinmux_rw_gio_pc___pc0___lsb 0
328#define reg_pinmux_rw_gio_pc___pc0___width 1
329#define reg_pinmux_rw_gio_pc___pc0___bit 0
330#define reg_pinmux_rw_gio_pc___pc1___lsb 1
331#define reg_pinmux_rw_gio_pc___pc1___width 1
332#define reg_pinmux_rw_gio_pc___pc1___bit 1
333#define reg_pinmux_rw_gio_pc___pc2___lsb 2
334#define reg_pinmux_rw_gio_pc___pc2___width 1
335#define reg_pinmux_rw_gio_pc___pc2___bit 2
336#define reg_pinmux_rw_gio_pc___pc3___lsb 3
337#define reg_pinmux_rw_gio_pc___pc3___width 1
338#define reg_pinmux_rw_gio_pc___pc3___bit 3
339#define reg_pinmux_rw_gio_pc___pc4___lsb 4
340#define reg_pinmux_rw_gio_pc___pc4___width 1
341#define reg_pinmux_rw_gio_pc___pc4___bit 4
342#define reg_pinmux_rw_gio_pc___pc5___lsb 5
343#define reg_pinmux_rw_gio_pc___pc5___width 1
344#define reg_pinmux_rw_gio_pc___pc5___bit 5
345#define reg_pinmux_rw_gio_pc___pc6___lsb 6
346#define reg_pinmux_rw_gio_pc___pc6___width 1
347#define reg_pinmux_rw_gio_pc___pc6___bit 6
348#define reg_pinmux_rw_gio_pc___pc7___lsb 7
349#define reg_pinmux_rw_gio_pc___pc7___width 1
350#define reg_pinmux_rw_gio_pc___pc7___bit 7
351#define reg_pinmux_rw_gio_pc___pc8___lsb 8
352#define reg_pinmux_rw_gio_pc___pc8___width 1
353#define reg_pinmux_rw_gio_pc___pc8___bit 8
354#define reg_pinmux_rw_gio_pc___pc9___lsb 9
355#define reg_pinmux_rw_gio_pc___pc9___width 1
356#define reg_pinmux_rw_gio_pc___pc9___bit 9
357#define reg_pinmux_rw_gio_pc___pc10___lsb 10
358#define reg_pinmux_rw_gio_pc___pc10___width 1
359#define reg_pinmux_rw_gio_pc___pc10___bit 10
360#define reg_pinmux_rw_gio_pc___pc11___lsb 11
361#define reg_pinmux_rw_gio_pc___pc11___width 1
362#define reg_pinmux_rw_gio_pc___pc11___bit 11
363#define reg_pinmux_rw_gio_pc___pc12___lsb 12
364#define reg_pinmux_rw_gio_pc___pc12___width 1
365#define reg_pinmux_rw_gio_pc___pc12___bit 12
366#define reg_pinmux_rw_gio_pc___pc13___lsb 13
367#define reg_pinmux_rw_gio_pc___pc13___width 1
368#define reg_pinmux_rw_gio_pc___pc13___bit 13
369#define reg_pinmux_rw_gio_pc___pc14___lsb 14
370#define reg_pinmux_rw_gio_pc___pc14___width 1
371#define reg_pinmux_rw_gio_pc___pc14___bit 14
372#define reg_pinmux_rw_gio_pc___pc15___lsb 15
373#define reg_pinmux_rw_gio_pc___pc15___width 1
374#define reg_pinmux_rw_gio_pc___pc15___bit 15
375#define reg_pinmux_rw_gio_pc_offset 12
376
377/* Register rw_iop_pa, scope pinmux, type rw */
378#define reg_pinmux_rw_iop_pa___pa0___lsb 0
379#define reg_pinmux_rw_iop_pa___pa0___width 1
380#define reg_pinmux_rw_iop_pa___pa0___bit 0
381#define reg_pinmux_rw_iop_pa___pa1___lsb 1
382#define reg_pinmux_rw_iop_pa___pa1___width 1
383#define reg_pinmux_rw_iop_pa___pa1___bit 1
384#define reg_pinmux_rw_iop_pa___pa2___lsb 2
385#define reg_pinmux_rw_iop_pa___pa2___width 1
386#define reg_pinmux_rw_iop_pa___pa2___bit 2
387#define reg_pinmux_rw_iop_pa___pa3___lsb 3
388#define reg_pinmux_rw_iop_pa___pa3___width 1
389#define reg_pinmux_rw_iop_pa___pa3___bit 3
390#define reg_pinmux_rw_iop_pa___pa4___lsb 4
391#define reg_pinmux_rw_iop_pa___pa4___width 1
392#define reg_pinmux_rw_iop_pa___pa4___bit 4
393#define reg_pinmux_rw_iop_pa___pa5___lsb 5
394#define reg_pinmux_rw_iop_pa___pa5___width 1
395#define reg_pinmux_rw_iop_pa___pa5___bit 5
396#define reg_pinmux_rw_iop_pa___pa6___lsb 6
397#define reg_pinmux_rw_iop_pa___pa6___width 1
398#define reg_pinmux_rw_iop_pa___pa6___bit 6
399#define reg_pinmux_rw_iop_pa___pa7___lsb 7
400#define reg_pinmux_rw_iop_pa___pa7___width 1
401#define reg_pinmux_rw_iop_pa___pa7___bit 7
402#define reg_pinmux_rw_iop_pa___pa8___lsb 8
403#define reg_pinmux_rw_iop_pa___pa8___width 1
404#define reg_pinmux_rw_iop_pa___pa8___bit 8
405#define reg_pinmux_rw_iop_pa___pa9___lsb 9
406#define reg_pinmux_rw_iop_pa___pa9___width 1
407#define reg_pinmux_rw_iop_pa___pa9___bit 9
408#define reg_pinmux_rw_iop_pa___pa10___lsb 10
409#define reg_pinmux_rw_iop_pa___pa10___width 1
410#define reg_pinmux_rw_iop_pa___pa10___bit 10
411#define reg_pinmux_rw_iop_pa___pa11___lsb 11
412#define reg_pinmux_rw_iop_pa___pa11___width 1
413#define reg_pinmux_rw_iop_pa___pa11___bit 11
414#define reg_pinmux_rw_iop_pa___pa12___lsb 12
415#define reg_pinmux_rw_iop_pa___pa12___width 1
416#define reg_pinmux_rw_iop_pa___pa12___bit 12
417#define reg_pinmux_rw_iop_pa___pa13___lsb 13
418#define reg_pinmux_rw_iop_pa___pa13___width 1
419#define reg_pinmux_rw_iop_pa___pa13___bit 13
420#define reg_pinmux_rw_iop_pa___pa14___lsb 14
421#define reg_pinmux_rw_iop_pa___pa14___width 1
422#define reg_pinmux_rw_iop_pa___pa14___bit 14
423#define reg_pinmux_rw_iop_pa___pa15___lsb 15
424#define reg_pinmux_rw_iop_pa___pa15___width 1
425#define reg_pinmux_rw_iop_pa___pa15___bit 15
426#define reg_pinmux_rw_iop_pa___pa16___lsb 16
427#define reg_pinmux_rw_iop_pa___pa16___width 1
428#define reg_pinmux_rw_iop_pa___pa16___bit 16
429#define reg_pinmux_rw_iop_pa___pa17___lsb 17
430#define reg_pinmux_rw_iop_pa___pa17___width 1
431#define reg_pinmux_rw_iop_pa___pa17___bit 17
432#define reg_pinmux_rw_iop_pa___pa18___lsb 18
433#define reg_pinmux_rw_iop_pa___pa18___width 1
434#define reg_pinmux_rw_iop_pa___pa18___bit 18
435#define reg_pinmux_rw_iop_pa___pa19___lsb 19
436#define reg_pinmux_rw_iop_pa___pa19___width 1
437#define reg_pinmux_rw_iop_pa___pa19___bit 19
438#define reg_pinmux_rw_iop_pa___pa20___lsb 20
439#define reg_pinmux_rw_iop_pa___pa20___width 1
440#define reg_pinmux_rw_iop_pa___pa20___bit 20
441#define reg_pinmux_rw_iop_pa___pa21___lsb 21
442#define reg_pinmux_rw_iop_pa___pa21___width 1
443#define reg_pinmux_rw_iop_pa___pa21___bit 21
444#define reg_pinmux_rw_iop_pa___pa22___lsb 22
445#define reg_pinmux_rw_iop_pa___pa22___width 1
446#define reg_pinmux_rw_iop_pa___pa22___bit 22
447#define reg_pinmux_rw_iop_pa___pa23___lsb 23
448#define reg_pinmux_rw_iop_pa___pa23___width 1
449#define reg_pinmux_rw_iop_pa___pa23___bit 23
450#define reg_pinmux_rw_iop_pa___pa24___lsb 24
451#define reg_pinmux_rw_iop_pa___pa24___width 1
452#define reg_pinmux_rw_iop_pa___pa24___bit 24
453#define reg_pinmux_rw_iop_pa___pa25___lsb 25
454#define reg_pinmux_rw_iop_pa___pa25___width 1
455#define reg_pinmux_rw_iop_pa___pa25___bit 25
456#define reg_pinmux_rw_iop_pa___pa26___lsb 26
457#define reg_pinmux_rw_iop_pa___pa26___width 1
458#define reg_pinmux_rw_iop_pa___pa26___bit 26
459#define reg_pinmux_rw_iop_pa___pa27___lsb 27
460#define reg_pinmux_rw_iop_pa___pa27___width 1
461#define reg_pinmux_rw_iop_pa___pa27___bit 27
462#define reg_pinmux_rw_iop_pa___pa28___lsb 28
463#define reg_pinmux_rw_iop_pa___pa28___width 1
464#define reg_pinmux_rw_iop_pa___pa28___bit 28
465#define reg_pinmux_rw_iop_pa___pa29___lsb 29
466#define reg_pinmux_rw_iop_pa___pa29___width 1
467#define reg_pinmux_rw_iop_pa___pa29___bit 29
468#define reg_pinmux_rw_iop_pa___pa30___lsb 30
469#define reg_pinmux_rw_iop_pa___pa30___width 1
470#define reg_pinmux_rw_iop_pa___pa30___bit 30
471#define reg_pinmux_rw_iop_pa___pa31___lsb 31
472#define reg_pinmux_rw_iop_pa___pa31___width 1
473#define reg_pinmux_rw_iop_pa___pa31___bit 31
474#define reg_pinmux_rw_iop_pa_offset 16
475
476/* Register rw_iop_pb, scope pinmux, type rw */
477#define reg_pinmux_rw_iop_pb___pb0___lsb 0
478#define reg_pinmux_rw_iop_pb___pb0___width 1
479#define reg_pinmux_rw_iop_pb___pb0___bit 0
480#define reg_pinmux_rw_iop_pb___pb1___lsb 1
481#define reg_pinmux_rw_iop_pb___pb1___width 1
482#define reg_pinmux_rw_iop_pb___pb1___bit 1
483#define reg_pinmux_rw_iop_pb___pb2___lsb 2
484#define reg_pinmux_rw_iop_pb___pb2___width 1
485#define reg_pinmux_rw_iop_pb___pb2___bit 2
486#define reg_pinmux_rw_iop_pb___pb3___lsb 3
487#define reg_pinmux_rw_iop_pb___pb3___width 1
488#define reg_pinmux_rw_iop_pb___pb3___bit 3
489#define reg_pinmux_rw_iop_pb___pb4___lsb 4
490#define reg_pinmux_rw_iop_pb___pb4___width 1
491#define reg_pinmux_rw_iop_pb___pb4___bit 4
492#define reg_pinmux_rw_iop_pb___pb5___lsb 5
493#define reg_pinmux_rw_iop_pb___pb5___width 1
494#define reg_pinmux_rw_iop_pb___pb5___bit 5
495#define reg_pinmux_rw_iop_pb___pb6___lsb 6
496#define reg_pinmux_rw_iop_pb___pb6___width 1
497#define reg_pinmux_rw_iop_pb___pb6___bit 6
498#define reg_pinmux_rw_iop_pb___pb7___lsb 7
499#define reg_pinmux_rw_iop_pb___pb7___width 1
500#define reg_pinmux_rw_iop_pb___pb7___bit 7
501#define reg_pinmux_rw_iop_pb_offset 20
502
503/* Register rw_iop_pio, scope pinmux, type rw */
504#define reg_pinmux_rw_iop_pio___d0___lsb 0
505#define reg_pinmux_rw_iop_pio___d0___width 1
506#define reg_pinmux_rw_iop_pio___d0___bit 0
507#define reg_pinmux_rw_iop_pio___d1___lsb 1
508#define reg_pinmux_rw_iop_pio___d1___width 1
509#define reg_pinmux_rw_iop_pio___d1___bit 1
510#define reg_pinmux_rw_iop_pio___d2___lsb 2
511#define reg_pinmux_rw_iop_pio___d2___width 1
512#define reg_pinmux_rw_iop_pio___d2___bit 2
513#define reg_pinmux_rw_iop_pio___d3___lsb 3
514#define reg_pinmux_rw_iop_pio___d3___width 1
515#define reg_pinmux_rw_iop_pio___d3___bit 3
516#define reg_pinmux_rw_iop_pio___d4___lsb 4
517#define reg_pinmux_rw_iop_pio___d4___width 1
518#define reg_pinmux_rw_iop_pio___d4___bit 4
519#define reg_pinmux_rw_iop_pio___d5___lsb 5
520#define reg_pinmux_rw_iop_pio___d5___width 1
521#define reg_pinmux_rw_iop_pio___d5___bit 5
522#define reg_pinmux_rw_iop_pio___d6___lsb 6
523#define reg_pinmux_rw_iop_pio___d6___width 1
524#define reg_pinmux_rw_iop_pio___d6___bit 6
525#define reg_pinmux_rw_iop_pio___d7___lsb 7
526#define reg_pinmux_rw_iop_pio___d7___width 1
527#define reg_pinmux_rw_iop_pio___d7___bit 7
528#define reg_pinmux_rw_iop_pio___rd_n___lsb 8
529#define reg_pinmux_rw_iop_pio___rd_n___width 1
530#define reg_pinmux_rw_iop_pio___rd_n___bit 8
531#define reg_pinmux_rw_iop_pio___wr_n___lsb 9
532#define reg_pinmux_rw_iop_pio___wr_n___width 1
533#define reg_pinmux_rw_iop_pio___wr_n___bit 9
534#define reg_pinmux_rw_iop_pio___a0___lsb 10
535#define reg_pinmux_rw_iop_pio___a0___width 1
536#define reg_pinmux_rw_iop_pio___a0___bit 10
537#define reg_pinmux_rw_iop_pio___a1___lsb 11
538#define reg_pinmux_rw_iop_pio___a1___width 1
539#define reg_pinmux_rw_iop_pio___a1___bit 11
540#define reg_pinmux_rw_iop_pio___ce0_n___lsb 12
541#define reg_pinmux_rw_iop_pio___ce0_n___width 1
542#define reg_pinmux_rw_iop_pio___ce0_n___bit 12
543#define reg_pinmux_rw_iop_pio___ce1_n___lsb 13
544#define reg_pinmux_rw_iop_pio___ce1_n___width 1
545#define reg_pinmux_rw_iop_pio___ce1_n___bit 13
546#define reg_pinmux_rw_iop_pio___ce2_n___lsb 14
547#define reg_pinmux_rw_iop_pio___ce2_n___width 1
548#define reg_pinmux_rw_iop_pio___ce2_n___bit 14
549#define reg_pinmux_rw_iop_pio___rdy___lsb 15
550#define reg_pinmux_rw_iop_pio___rdy___width 1
551#define reg_pinmux_rw_iop_pio___rdy___bit 15
552#define reg_pinmux_rw_iop_pio_offset 24
553
554/* Register rw_iop_usb, scope pinmux, type rw */
555#define reg_pinmux_rw_iop_usb___usb0___lsb 0
556#define reg_pinmux_rw_iop_usb___usb0___width 1
557#define reg_pinmux_rw_iop_usb___usb0___bit 0
558#define reg_pinmux_rw_iop_usb_offset 28
559
560
561/* Constants */
562#define regk_pinmux_no 0x00000000
563#define regk_pinmux_rw_gio_pa_default 0x00000000
564#define regk_pinmux_rw_gio_pb_default 0x00000000
565#define regk_pinmux_rw_gio_pc_default 0x00000000
566#define regk_pinmux_rw_hwprot_default 0x00000000
567#define regk_pinmux_rw_iop_pa_default 0x00000000
568#define regk_pinmux_rw_iop_pb_default 0x00000000
569#define regk_pinmux_rw_iop_pio_default 0x00000000
570#define regk_pinmux_rw_iop_usb_default 0x00000001
571#define regk_pinmux_yes 0x00000001
572#endif /* __pinmux_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/pio_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/pio_defs_asm.h
deleted file mode 100644
index 3907ef4921c8..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/pio_defs_asm.h
+++ /dev/null
@@ -1,337 +0,0 @@
1#ifndef __pio_defs_asm_h
2#define __pio_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: pio.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile pio_defs_asm.h pio.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_data, scope pio, type rw */
54#define reg_pio_rw_data_offset 64
55
56/* Register rw_io_access0, scope pio, type rw */
57#define reg_pio_rw_io_access0___data___lsb 0
58#define reg_pio_rw_io_access0___data___width 8
59#define reg_pio_rw_io_access0_offset 0
60
61/* Register rw_io_access1, scope pio, type rw */
62#define reg_pio_rw_io_access1___data___lsb 0
63#define reg_pio_rw_io_access1___data___width 8
64#define reg_pio_rw_io_access1_offset 4
65
66/* Register rw_io_access2, scope pio, type rw */
67#define reg_pio_rw_io_access2___data___lsb 0
68#define reg_pio_rw_io_access2___data___width 8
69#define reg_pio_rw_io_access2_offset 8
70
71/* Register rw_io_access3, scope pio, type rw */
72#define reg_pio_rw_io_access3___data___lsb 0
73#define reg_pio_rw_io_access3___data___width 8
74#define reg_pio_rw_io_access3_offset 12
75
76/* Register rw_io_access4, scope pio, type rw */
77#define reg_pio_rw_io_access4___data___lsb 0
78#define reg_pio_rw_io_access4___data___width 8
79#define reg_pio_rw_io_access4_offset 16
80
81/* Register rw_io_access5, scope pio, type rw */
82#define reg_pio_rw_io_access5___data___lsb 0
83#define reg_pio_rw_io_access5___data___width 8
84#define reg_pio_rw_io_access5_offset 20
85
86/* Register rw_io_access6, scope pio, type rw */
87#define reg_pio_rw_io_access6___data___lsb 0
88#define reg_pio_rw_io_access6___data___width 8
89#define reg_pio_rw_io_access6_offset 24
90
91/* Register rw_io_access7, scope pio, type rw */
92#define reg_pio_rw_io_access7___data___lsb 0
93#define reg_pio_rw_io_access7___data___width 8
94#define reg_pio_rw_io_access7_offset 28
95
96/* Register rw_io_access8, scope pio, type rw */
97#define reg_pio_rw_io_access8___data___lsb 0
98#define reg_pio_rw_io_access8___data___width 8
99#define reg_pio_rw_io_access8_offset 32
100
101/* Register rw_io_access9, scope pio, type rw */
102#define reg_pio_rw_io_access9___data___lsb 0
103#define reg_pio_rw_io_access9___data___width 8
104#define reg_pio_rw_io_access9_offset 36
105
106/* Register rw_io_access10, scope pio, type rw */
107#define reg_pio_rw_io_access10___data___lsb 0
108#define reg_pio_rw_io_access10___data___width 8
109#define reg_pio_rw_io_access10_offset 40
110
111/* Register rw_io_access11, scope pio, type rw */
112#define reg_pio_rw_io_access11___data___lsb 0
113#define reg_pio_rw_io_access11___data___width 8
114#define reg_pio_rw_io_access11_offset 44
115
116/* Register rw_io_access12, scope pio, type rw */
117#define reg_pio_rw_io_access12___data___lsb 0
118#define reg_pio_rw_io_access12___data___width 8
119#define reg_pio_rw_io_access12_offset 48
120
121/* Register rw_io_access13, scope pio, type rw */
122#define reg_pio_rw_io_access13___data___lsb 0
123#define reg_pio_rw_io_access13___data___width 8
124#define reg_pio_rw_io_access13_offset 52
125
126/* Register rw_io_access14, scope pio, type rw */
127#define reg_pio_rw_io_access14___data___lsb 0
128#define reg_pio_rw_io_access14___data___width 8
129#define reg_pio_rw_io_access14_offset 56
130
131/* Register rw_io_access15, scope pio, type rw */
132#define reg_pio_rw_io_access15___data___lsb 0
133#define reg_pio_rw_io_access15___data___width 8
134#define reg_pio_rw_io_access15_offset 60
135
136/* Register rw_ce0_cfg, scope pio, type rw */
137#define reg_pio_rw_ce0_cfg___lw___lsb 0
138#define reg_pio_rw_ce0_cfg___lw___width 6
139#define reg_pio_rw_ce0_cfg___ew___lsb 6
140#define reg_pio_rw_ce0_cfg___ew___width 3
141#define reg_pio_rw_ce0_cfg___zw___lsb 9
142#define reg_pio_rw_ce0_cfg___zw___width 3
143#define reg_pio_rw_ce0_cfg___aw___lsb 12
144#define reg_pio_rw_ce0_cfg___aw___width 2
145#define reg_pio_rw_ce0_cfg___mode___lsb 14
146#define reg_pio_rw_ce0_cfg___mode___width 2
147#define reg_pio_rw_ce0_cfg_offset 68
148
149/* Register rw_ce1_cfg, scope pio, type rw */
150#define reg_pio_rw_ce1_cfg___lw___lsb 0
151#define reg_pio_rw_ce1_cfg___lw___width 6
152#define reg_pio_rw_ce1_cfg___ew___lsb 6
153#define reg_pio_rw_ce1_cfg___ew___width 3
154#define reg_pio_rw_ce1_cfg___zw___lsb 9
155#define reg_pio_rw_ce1_cfg___zw___width 3
156#define reg_pio_rw_ce1_cfg___aw___lsb 12
157#define reg_pio_rw_ce1_cfg___aw___width 2
158#define reg_pio_rw_ce1_cfg___mode___lsb 14
159#define reg_pio_rw_ce1_cfg___mode___width 2
160#define reg_pio_rw_ce1_cfg_offset 72
161
162/* Register rw_ce2_cfg, scope pio, type rw */
163#define reg_pio_rw_ce2_cfg___lw___lsb 0
164#define reg_pio_rw_ce2_cfg___lw___width 6
165#define reg_pio_rw_ce2_cfg___ew___lsb 6
166#define reg_pio_rw_ce2_cfg___ew___width 3
167#define reg_pio_rw_ce2_cfg___zw___lsb 9
168#define reg_pio_rw_ce2_cfg___zw___width 3
169#define reg_pio_rw_ce2_cfg___aw___lsb 12
170#define reg_pio_rw_ce2_cfg___aw___width 2
171#define reg_pio_rw_ce2_cfg___mode___lsb 14
172#define reg_pio_rw_ce2_cfg___mode___width 2
173#define reg_pio_rw_ce2_cfg_offset 76
174
175/* Register rw_dout, scope pio, type rw */
176#define reg_pio_rw_dout___data___lsb 0
177#define reg_pio_rw_dout___data___width 8
178#define reg_pio_rw_dout___rd_n___lsb 8
179#define reg_pio_rw_dout___rd_n___width 1
180#define reg_pio_rw_dout___rd_n___bit 8
181#define reg_pio_rw_dout___wr_n___lsb 9
182#define reg_pio_rw_dout___wr_n___width 1
183#define reg_pio_rw_dout___wr_n___bit 9
184#define reg_pio_rw_dout___a0___lsb 10
185#define reg_pio_rw_dout___a0___width 1
186#define reg_pio_rw_dout___a0___bit 10
187#define reg_pio_rw_dout___a1___lsb 11
188#define reg_pio_rw_dout___a1___width 1
189#define reg_pio_rw_dout___a1___bit 11
190#define reg_pio_rw_dout___ce0_n___lsb 12
191#define reg_pio_rw_dout___ce0_n___width 1
192#define reg_pio_rw_dout___ce0_n___bit 12
193#define reg_pio_rw_dout___ce1_n___lsb 13
194#define reg_pio_rw_dout___ce1_n___width 1
195#define reg_pio_rw_dout___ce1_n___bit 13
196#define reg_pio_rw_dout___ce2_n___lsb 14
197#define reg_pio_rw_dout___ce2_n___width 1
198#define reg_pio_rw_dout___ce2_n___bit 14
199#define reg_pio_rw_dout___rdy___lsb 15
200#define reg_pio_rw_dout___rdy___width 1
201#define reg_pio_rw_dout___rdy___bit 15
202#define reg_pio_rw_dout_offset 80
203
204/* Register rw_oe, scope pio, type rw */
205#define reg_pio_rw_oe___data___lsb 0
206#define reg_pio_rw_oe___data___width 8
207#define reg_pio_rw_oe___rd_n___lsb 8
208#define reg_pio_rw_oe___rd_n___width 1
209#define reg_pio_rw_oe___rd_n___bit 8
210#define reg_pio_rw_oe___wr_n___lsb 9
211#define reg_pio_rw_oe___wr_n___width 1
212#define reg_pio_rw_oe___wr_n___bit 9
213#define reg_pio_rw_oe___a0___lsb 10
214#define reg_pio_rw_oe___a0___width 1
215#define reg_pio_rw_oe___a0___bit 10
216#define reg_pio_rw_oe___a1___lsb 11
217#define reg_pio_rw_oe___a1___width 1
218#define reg_pio_rw_oe___a1___bit 11
219#define reg_pio_rw_oe___ce0_n___lsb 12
220#define reg_pio_rw_oe___ce0_n___width 1
221#define reg_pio_rw_oe___ce0_n___bit 12
222#define reg_pio_rw_oe___ce1_n___lsb 13
223#define reg_pio_rw_oe___ce1_n___width 1
224#define reg_pio_rw_oe___ce1_n___bit 13
225#define reg_pio_rw_oe___ce2_n___lsb 14
226#define reg_pio_rw_oe___ce2_n___width 1
227#define reg_pio_rw_oe___ce2_n___bit 14
228#define reg_pio_rw_oe___rdy___lsb 15
229#define reg_pio_rw_oe___rdy___width 1
230#define reg_pio_rw_oe___rdy___bit 15
231#define reg_pio_rw_oe_offset 84
232
233/* Register rw_man_ctrl, scope pio, type rw */
234#define reg_pio_rw_man_ctrl___data___lsb 0
235#define reg_pio_rw_man_ctrl___data___width 8
236#define reg_pio_rw_man_ctrl___rd_n___lsb 8
237#define reg_pio_rw_man_ctrl___rd_n___width 1
238#define reg_pio_rw_man_ctrl___rd_n___bit 8
239#define reg_pio_rw_man_ctrl___wr_n___lsb 9
240#define reg_pio_rw_man_ctrl___wr_n___width 1
241#define reg_pio_rw_man_ctrl___wr_n___bit 9
242#define reg_pio_rw_man_ctrl___a0___lsb 10
243#define reg_pio_rw_man_ctrl___a0___width 1
244#define reg_pio_rw_man_ctrl___a0___bit 10
245#define reg_pio_rw_man_ctrl___a1___lsb 11
246#define reg_pio_rw_man_ctrl___a1___width 1
247#define reg_pio_rw_man_ctrl___a1___bit 11
248#define reg_pio_rw_man_ctrl___ce0_n___lsb 12
249#define reg_pio_rw_man_ctrl___ce0_n___width 1
250#define reg_pio_rw_man_ctrl___ce0_n___bit 12
251#define reg_pio_rw_man_ctrl___ce1_n___lsb 13
252#define reg_pio_rw_man_ctrl___ce1_n___width 1
253#define reg_pio_rw_man_ctrl___ce1_n___bit 13
254#define reg_pio_rw_man_ctrl___ce2_n___lsb 14
255#define reg_pio_rw_man_ctrl___ce2_n___width 1
256#define reg_pio_rw_man_ctrl___ce2_n___bit 14
257#define reg_pio_rw_man_ctrl___rdy___lsb 15
258#define reg_pio_rw_man_ctrl___rdy___width 1
259#define reg_pio_rw_man_ctrl___rdy___bit 15
260#define reg_pio_rw_man_ctrl_offset 88
261
262/* Register r_din, scope pio, type r */
263#define reg_pio_r_din___data___lsb 0
264#define reg_pio_r_din___data___width 8
265#define reg_pio_r_din___rd_n___lsb 8
266#define reg_pio_r_din___rd_n___width 1
267#define reg_pio_r_din___rd_n___bit 8
268#define reg_pio_r_din___wr_n___lsb 9
269#define reg_pio_r_din___wr_n___width 1
270#define reg_pio_r_din___wr_n___bit 9
271#define reg_pio_r_din___a0___lsb 10
272#define reg_pio_r_din___a0___width 1
273#define reg_pio_r_din___a0___bit 10
274#define reg_pio_r_din___a1___lsb 11
275#define reg_pio_r_din___a1___width 1
276#define reg_pio_r_din___a1___bit 11
277#define reg_pio_r_din___ce0_n___lsb 12
278#define reg_pio_r_din___ce0_n___width 1
279#define reg_pio_r_din___ce0_n___bit 12
280#define reg_pio_r_din___ce1_n___lsb 13
281#define reg_pio_r_din___ce1_n___width 1
282#define reg_pio_r_din___ce1_n___bit 13
283#define reg_pio_r_din___ce2_n___lsb 14
284#define reg_pio_r_din___ce2_n___width 1
285#define reg_pio_r_din___ce2_n___bit 14
286#define reg_pio_r_din___rdy___lsb 15
287#define reg_pio_r_din___rdy___width 1
288#define reg_pio_r_din___rdy___bit 15
289#define reg_pio_r_din_offset 92
290
291/* Register r_stat, scope pio, type r */
292#define reg_pio_r_stat___busy___lsb 0
293#define reg_pio_r_stat___busy___width 1
294#define reg_pio_r_stat___busy___bit 0
295#define reg_pio_r_stat_offset 96
296
297/* Register rw_intr_mask, scope pio, type rw */
298#define reg_pio_rw_intr_mask___rdy___lsb 0
299#define reg_pio_rw_intr_mask___rdy___width 1
300#define reg_pio_rw_intr_mask___rdy___bit 0
301#define reg_pio_rw_intr_mask_offset 100
302
303/* Register rw_ack_intr, scope pio, type rw */
304#define reg_pio_rw_ack_intr___rdy___lsb 0
305#define reg_pio_rw_ack_intr___rdy___width 1
306#define reg_pio_rw_ack_intr___rdy___bit 0
307#define reg_pio_rw_ack_intr_offset 104
308
309/* Register r_intr, scope pio, type r */
310#define reg_pio_r_intr___rdy___lsb 0
311#define reg_pio_r_intr___rdy___width 1
312#define reg_pio_r_intr___rdy___bit 0
313#define reg_pio_r_intr_offset 108
314
315/* Register r_masked_intr, scope pio, type r */
316#define reg_pio_r_masked_intr___rdy___lsb 0
317#define reg_pio_r_masked_intr___rdy___width 1
318#define reg_pio_r_masked_intr___rdy___bit 0
319#define reg_pio_r_masked_intr_offset 112
320
321
322/* Constants */
323#define regk_pio_a2 0x00000003
324#define regk_pio_no 0x00000000
325#define regk_pio_normal 0x00000000
326#define regk_pio_rd 0x00000001
327#define regk_pio_rw_ce0_cfg_default 0x00000000
328#define regk_pio_rw_ce1_cfg_default 0x00000000
329#define regk_pio_rw_ce2_cfg_default 0x00000000
330#define regk_pio_rw_intr_mask_default 0x00000000
331#define regk_pio_rw_man_ctrl_default 0x00000000
332#define regk_pio_rw_oe_default 0x00000000
333#define regk_pio_wr 0x00000002
334#define regk_pio_wr_ce2 0x00000003
335#define regk_pio_yes 0x00000001
336#define regk_pio_yes_all 0x000000ff
337#endif /* __pio_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/reg_map_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/reg_map_asm.h
deleted file mode 100644
index 89439e9610e2..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/reg_map_asm.h
+++ /dev/null
@@ -1,99 +0,0 @@
1#ifndef __reg_map_asm_h
2#define __reg_map_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: reg.rmap
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -base 0xb0000000 -map marb_bar.r marb_foo.r ccd_top.r ccd_stat.r ccd_tg.r ccd_dp.r ccd.r iop_sap_in.r iop_sap_out.r iop_sw_cfg.r iop_sw_cpu.r iop_sw_mpu.r iop_sw_spu.r iop_version.r iop_crc_par.r iop_dmc_in.r iop_dmc_out.r iop_fifo_in_extra.r iop_fifo_in.r iop_fifo_out_extra.r iop_fifo_out.r iop_mc.r iop_mpu.r iop_scrc_in.r iop_scrc_out.r iop_spu.r iop_timer_grp.r iop_trigger_grp.r iop.r -outfile reg_map_asm.h reg.rmap
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13#define regi_ccd 0xb0000000
14#define regi_ccd_top 0xb0000000
15#define regi_ccd_dp 0xb0000400
16#define regi_ccd_stat 0xb0000800
17#define regi_ccd_tg 0xb0001000
18#define regi_cfg 0xb0002000
19#define regi_clkgen 0xb0004000
20#define regi_ddr2_ctrl 0xb0006000
21#define regi_dma0 0xb0008000
22#define regi_dma1 0xb000a000
23#define regi_dma11 0xb000c000
24#define regi_dma2 0xb000e000
25#define regi_dma3 0xb0010000
26#define regi_dma4 0xb0012000
27#define regi_dma5 0xb0014000
28#define regi_dma6 0xb0016000
29#define regi_dma7 0xb0018000
30#define regi_dma9 0xb001a000
31#define regi_eth 0xb001c000
32#define regi_gio 0xb0020000
33#define regi_h264 0xb0022000
34#define regi_hist 0xb0026000
35#define regi_iop 0xb0028000
36#define regi_iop_version 0xb0028000
37#define regi_iop_fifo_in_extra 0xb0028040
38#define regi_iop_fifo_out_extra 0xb0028080
39#define regi_iop_trigger_grp0 0xb00280c0
40#define regi_iop_trigger_grp1 0xb0028100
41#define regi_iop_trigger_grp2 0xb0028140
42#define regi_iop_trigger_grp3 0xb0028180
43#define regi_iop_trigger_grp4 0xb00281c0
44#define regi_iop_trigger_grp5 0xb0028200
45#define regi_iop_trigger_grp6 0xb0028240
46#define regi_iop_trigger_grp7 0xb0028280
47#define regi_iop_crc_par 0xb0028300
48#define regi_iop_dmc_in 0xb0028380
49#define regi_iop_dmc_out 0xb0028400
50#define regi_iop_fifo_in 0xb0028480
51#define regi_iop_fifo_out 0xb0028500
52#define regi_iop_scrc_in 0xb0028580
53#define regi_iop_scrc_out 0xb0028600
54#define regi_iop_timer_grp0 0xb0028680
55#define regi_iop_timer_grp1 0xb0028700
56#define regi_iop_sap_in 0xb0028800
57#define regi_iop_sap_out 0xb0028900
58#define regi_iop_spu 0xb0028a00
59#define regi_iop_sw_cfg 0xb0028b00
60#define regi_iop_sw_cpu 0xb0028c00
61#define regi_iop_sw_mpu 0xb0028d00
62#define regi_iop_sw_spu 0xb0028e00
63#define regi_iop_mpu 0xb0029000
64#define regi_irq 0xb002a000
65#define regi_jpeg 0xb002c000
66#define regi_l2cache 0xb0030000
67#define regi_marb_bar 0xb0032000
68#define regi_marb_bar_bp0 0xb0032140
69#define regi_marb_bar_bp1 0xb0032180
70#define regi_marb_bar_bp2 0xb00321c0
71#define regi_marb_bar_bp3 0xb0032200
72#define regi_marb_foo 0xb0034000
73#define regi_marb_foo_bp0 0xb0034280
74#define regi_marb_foo_bp1 0xb00342c0
75#define regi_marb_foo_bp2 0xb0034300
76#define regi_marb_foo_bp3 0xb0034340
77#define regi_pinmux 0xb0038000
78#define regi_pio 0xb0036000
79#define regi_sclr 0xb003a000
80#define regi_sclr_fifo 0xb003c000
81#define regi_ser0 0xb003e000
82#define regi_ser1 0xb0040000
83#define regi_ser2 0xb0042000
84#define regi_ser3 0xb0044000
85#define regi_ser4 0xb0046000
86#define regi_sser 0xb0048000
87#define regi_strcop 0xb004a000
88#define regi_strdma0 0xb004e000
89#define regi_strdma1 0xb0050000
90#define regi_strdma2 0xb0052000
91#define regi_strdma3 0xb0054000
92#define regi_strdma5 0xb0056000
93#define regi_strmux 0xb004c000
94#define regi_timer0 0xb0058000
95#define regi_timer1 0xb005a000
96#define regi_trace 0xb005c000
97#define regi_vin 0xb005e000
98#define regi_vout 0xb0060000
99#endif /* __reg_map_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/timer_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/asm/timer_defs_asm.h
deleted file mode 100644
index b129e826fc34..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/asm/timer_defs_asm.h
+++ /dev/null
@@ -1,228 +0,0 @@
1#ifndef __timer_defs_asm_h
2#define __timer_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: timer.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile timer_defs_asm.h timer.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_tmr0_div, scope timer, type rw */
54#define reg_timer_rw_tmr0_div_offset 0
55
56/* Register r_tmr0_data, scope timer, type r */
57#define reg_timer_r_tmr0_data_offset 4
58
59/* Register rw_tmr0_ctrl, scope timer, type rw */
60#define reg_timer_rw_tmr0_ctrl___op___lsb 0
61#define reg_timer_rw_tmr0_ctrl___op___width 2
62#define reg_timer_rw_tmr0_ctrl___freq___lsb 2
63#define reg_timer_rw_tmr0_ctrl___freq___width 3
64#define reg_timer_rw_tmr0_ctrl_offset 8
65
66/* Register rw_tmr1_div, scope timer, type rw */
67#define reg_timer_rw_tmr1_div_offset 16
68
69/* Register r_tmr1_data, scope timer, type r */
70#define reg_timer_r_tmr1_data_offset 20
71
72/* Register rw_tmr1_ctrl, scope timer, type rw */
73#define reg_timer_rw_tmr1_ctrl___op___lsb 0
74#define reg_timer_rw_tmr1_ctrl___op___width 2
75#define reg_timer_rw_tmr1_ctrl___freq___lsb 2
76#define reg_timer_rw_tmr1_ctrl___freq___width 3
77#define reg_timer_rw_tmr1_ctrl_offset 24
78
79/* Register rs_cnt_data, scope timer, type rs */
80#define reg_timer_rs_cnt_data___tmr___lsb 0
81#define reg_timer_rs_cnt_data___tmr___width 24
82#define reg_timer_rs_cnt_data___cnt___lsb 24
83#define reg_timer_rs_cnt_data___cnt___width 8
84#define reg_timer_rs_cnt_data_offset 32
85
86/* Register r_cnt_data, scope timer, type r */
87#define reg_timer_r_cnt_data___tmr___lsb 0
88#define reg_timer_r_cnt_data___tmr___width 24
89#define reg_timer_r_cnt_data___cnt___lsb 24
90#define reg_timer_r_cnt_data___cnt___width 8
91#define reg_timer_r_cnt_data_offset 36
92
93/* Register rw_cnt_cfg, scope timer, type rw */
94#define reg_timer_rw_cnt_cfg___clk___lsb 0
95#define reg_timer_rw_cnt_cfg___clk___width 2
96#define reg_timer_rw_cnt_cfg_offset 40
97
98/* Register rw_trig, scope timer, type rw */
99#define reg_timer_rw_trig_offset 48
100
101/* Register rw_trig_cfg, scope timer, type rw */
102#define reg_timer_rw_trig_cfg___tmr___lsb 0
103#define reg_timer_rw_trig_cfg___tmr___width 2
104#define reg_timer_rw_trig_cfg_offset 52
105
106/* Register r_time, scope timer, type r */
107#define reg_timer_r_time_offset 56
108
109/* Register rw_out, scope timer, type rw */
110#define reg_timer_rw_out___tmr___lsb 0
111#define reg_timer_rw_out___tmr___width 2
112#define reg_timer_rw_out_offset 60
113
114/* Register rw_wd_ctrl, scope timer, type rw */
115#define reg_timer_rw_wd_ctrl___cnt___lsb 0
116#define reg_timer_rw_wd_ctrl___cnt___width 8
117#define reg_timer_rw_wd_ctrl___cmd___lsb 8
118#define reg_timer_rw_wd_ctrl___cmd___width 1
119#define reg_timer_rw_wd_ctrl___cmd___bit 8
120#define reg_timer_rw_wd_ctrl___key___lsb 9
121#define reg_timer_rw_wd_ctrl___key___width 7
122#define reg_timer_rw_wd_ctrl_offset 64
123
124/* Register r_wd_stat, scope timer, type r */
125#define reg_timer_r_wd_stat___cnt___lsb 0
126#define reg_timer_r_wd_stat___cnt___width 8
127#define reg_timer_r_wd_stat___cmd___lsb 8
128#define reg_timer_r_wd_stat___cmd___width 1
129#define reg_timer_r_wd_stat___cmd___bit 8
130#define reg_timer_r_wd_stat_offset 68
131
132/* Register rw_intr_mask, scope timer, type rw */
133#define reg_timer_rw_intr_mask___tmr0___lsb 0
134#define reg_timer_rw_intr_mask___tmr0___width 1
135#define reg_timer_rw_intr_mask___tmr0___bit 0
136#define reg_timer_rw_intr_mask___tmr1___lsb 1
137#define reg_timer_rw_intr_mask___tmr1___width 1
138#define reg_timer_rw_intr_mask___tmr1___bit 1
139#define reg_timer_rw_intr_mask___cnt___lsb 2
140#define reg_timer_rw_intr_mask___cnt___width 1
141#define reg_timer_rw_intr_mask___cnt___bit 2
142#define reg_timer_rw_intr_mask___trig___lsb 3
143#define reg_timer_rw_intr_mask___trig___width 1
144#define reg_timer_rw_intr_mask___trig___bit 3
145#define reg_timer_rw_intr_mask_offset 72
146
147/* Register rw_ack_intr, scope timer, type rw */
148#define reg_timer_rw_ack_intr___tmr0___lsb 0
149#define reg_timer_rw_ack_intr___tmr0___width 1
150#define reg_timer_rw_ack_intr___tmr0___bit 0
151#define reg_timer_rw_ack_intr___tmr1___lsb 1
152#define reg_timer_rw_ack_intr___tmr1___width 1
153#define reg_timer_rw_ack_intr___tmr1___bit 1
154#define reg_timer_rw_ack_intr___cnt___lsb 2
155#define reg_timer_rw_ack_intr___cnt___width 1
156#define reg_timer_rw_ack_intr___cnt___bit 2
157#define reg_timer_rw_ack_intr___trig___lsb 3
158#define reg_timer_rw_ack_intr___trig___width 1
159#define reg_timer_rw_ack_intr___trig___bit 3
160#define reg_timer_rw_ack_intr_offset 76
161
162/* Register r_intr, scope timer, type r */
163#define reg_timer_r_intr___tmr0___lsb 0
164#define reg_timer_r_intr___tmr0___width 1
165#define reg_timer_r_intr___tmr0___bit 0
166#define reg_timer_r_intr___tmr1___lsb 1
167#define reg_timer_r_intr___tmr1___width 1
168#define reg_timer_r_intr___tmr1___bit 1
169#define reg_timer_r_intr___cnt___lsb 2
170#define reg_timer_r_intr___cnt___width 1
171#define reg_timer_r_intr___cnt___bit 2
172#define reg_timer_r_intr___trig___lsb 3
173#define reg_timer_r_intr___trig___width 1
174#define reg_timer_r_intr___trig___bit 3
175#define reg_timer_r_intr_offset 80
176
177/* Register r_masked_intr, scope timer, type r */
178#define reg_timer_r_masked_intr___tmr0___lsb 0
179#define reg_timer_r_masked_intr___tmr0___width 1
180#define reg_timer_r_masked_intr___tmr0___bit 0
181#define reg_timer_r_masked_intr___tmr1___lsb 1
182#define reg_timer_r_masked_intr___tmr1___width 1
183#define reg_timer_r_masked_intr___tmr1___bit 1
184#define reg_timer_r_masked_intr___cnt___lsb 2
185#define reg_timer_r_masked_intr___cnt___width 1
186#define reg_timer_r_masked_intr___cnt___bit 2
187#define reg_timer_r_masked_intr___trig___lsb 3
188#define reg_timer_r_masked_intr___trig___width 1
189#define reg_timer_r_masked_intr___trig___bit 3
190#define reg_timer_r_masked_intr_offset 84
191
192/* Register rw_test, scope timer, type rw */
193#define reg_timer_rw_test___dis___lsb 0
194#define reg_timer_rw_test___dis___width 1
195#define reg_timer_rw_test___dis___bit 0
196#define reg_timer_rw_test___en___lsb 1
197#define reg_timer_rw_test___en___width 1
198#define reg_timer_rw_test___en___bit 1
199#define reg_timer_rw_test_offset 88
200
201
202/* Constants */
203#define regk_timer_ext 0x00000001
204#define regk_timer_f100 0x00000007
205#define regk_timer_f29_493 0x00000004
206#define regk_timer_f32 0x00000005
207#define regk_timer_f32_768 0x00000006
208#define regk_timer_f90 0x00000003
209#define regk_timer_hold 0x00000001
210#define regk_timer_ld 0x00000000
211#define regk_timer_no 0x00000000
212#define regk_timer_off 0x00000000
213#define regk_timer_run 0x00000002
214#define regk_timer_rw_cnt_cfg_default 0x00000000
215#define regk_timer_rw_intr_mask_default 0x00000000
216#define regk_timer_rw_out_default 0x00000000
217#define regk_timer_rw_test_default 0x00000000
218#define regk_timer_rw_tmr0_ctrl_default 0x00000000
219#define regk_timer_rw_tmr1_ctrl_default 0x00000000
220#define regk_timer_rw_trig_cfg_default 0x00000000
221#define regk_timer_start 0x00000001
222#define regk_timer_stop 0x00000000
223#define regk_timer_time 0x00000001
224#define regk_timer_tmr0 0x00000002
225#define regk_timer_tmr1 0x00000003
226#define regk_timer_vclk 0x00000002
227#define regk_timer_yes 0x00000001
228#endif /* __timer_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/clkgen_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/clkgen_defs.h
deleted file mode 100644
index c1e9ba93b3a3..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/clkgen_defs.h
+++ /dev/null
@@ -1,159 +0,0 @@
1#ifndef __clkgen_defs_h
2#define __clkgen_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: clkgen.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile clkgen_defs.h clkgen.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope clkgen */
83
84/* Register r_bootsel, scope clkgen, type r */
85typedef struct {
86 unsigned int boot_mode : 5;
87 unsigned int intern_main_clk : 1;
88 unsigned int extern_usb2_clk : 1;
89 unsigned int dummy1 : 25;
90} reg_clkgen_r_bootsel;
91#define REG_RD_ADDR_clkgen_r_bootsel 0
92
93/* Register rw_clk_ctrl, scope clkgen, type rw */
94typedef struct {
95 unsigned int pll : 1;
96 unsigned int cpu : 1;
97 unsigned int iop_usb : 1;
98 unsigned int vin : 1;
99 unsigned int sclr : 1;
100 unsigned int h264 : 1;
101 unsigned int ddr2 : 1;
102 unsigned int vout_hist : 1;
103 unsigned int eth : 1;
104 unsigned int ccd_tg_200 : 1;
105 unsigned int dma0_1_eth : 1;
106 unsigned int ccd_tg_100 : 1;
107 unsigned int jpeg : 1;
108 unsigned int sser_ser_dma6_7 : 1;
109 unsigned int strdma0_2_video : 1;
110 unsigned int dma2_3_strcop : 1;
111 unsigned int dma4_5_iop : 1;
112 unsigned int dma9_11 : 1;
113 unsigned int memarb_bar_ddr : 1;
114 unsigned int sclr_h264 : 1;
115 unsigned int dummy1 : 12;
116} reg_clkgen_rw_clk_ctrl;
117#define REG_RD_ADDR_clkgen_rw_clk_ctrl 4
118#define REG_WR_ADDR_clkgen_rw_clk_ctrl 4
119
120
121/* Constants */
122enum {
123 regk_clkgen_eth1000_rx = 0x0000000c,
124 regk_clkgen_eth1000_tx = 0x0000000e,
125 regk_clkgen_eth100_rx = 0x0000001d,
126 regk_clkgen_eth100_rx_half = 0x0000001c,
127 regk_clkgen_eth100_tx = 0x0000001f,
128 regk_clkgen_eth100_tx_half = 0x0000001e,
129 regk_clkgen_nand_3_2 = 0x00000000,
130 regk_clkgen_nand_3_2_0x30 = 0x00000002,
131 regk_clkgen_nand_3_2_0x30_pll = 0x00000012,
132 regk_clkgen_nand_3_2_pll = 0x00000010,
133 regk_clkgen_nand_3_3 = 0x00000001,
134 regk_clkgen_nand_3_3_0x30 = 0x00000003,
135 regk_clkgen_nand_3_3_0x30_pll = 0x00000013,
136 regk_clkgen_nand_3_3_pll = 0x00000011,
137 regk_clkgen_nand_4_2 = 0x00000004,
138 regk_clkgen_nand_4_2_0x30 = 0x00000006,
139 regk_clkgen_nand_4_2_0x30_pll = 0x00000016,
140 regk_clkgen_nand_4_2_pll = 0x00000014,
141 regk_clkgen_nand_4_3 = 0x00000005,
142 regk_clkgen_nand_4_3_0x30 = 0x00000007,
143 regk_clkgen_nand_4_3_0x30_pll = 0x00000017,
144 regk_clkgen_nand_4_3_pll = 0x00000015,
145 regk_clkgen_nand_5_2 = 0x00000008,
146 regk_clkgen_nand_5_2_0x30 = 0x0000000a,
147 regk_clkgen_nand_5_2_0x30_pll = 0x0000001a,
148 regk_clkgen_nand_5_2_pll = 0x00000018,
149 regk_clkgen_nand_5_3 = 0x00000009,
150 regk_clkgen_nand_5_3_0x30 = 0x0000000b,
151 regk_clkgen_nand_5_3_0x30_pll = 0x0000001b,
152 regk_clkgen_nand_5_3_pll = 0x00000019,
153 regk_clkgen_no = 0x00000000,
154 regk_clkgen_rw_clk_ctrl_default = 0x00000002,
155 regk_clkgen_ser = 0x0000000d,
156 regk_clkgen_ser_pll = 0x0000000f,
157 regk_clkgen_yes = 0x00000001
158};
159#endif /* __clkgen_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/ddr2_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/ddr2_defs.h
deleted file mode 100644
index 0f30e8bf946d..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/ddr2_defs.h
+++ /dev/null
@@ -1,281 +0,0 @@
1#ifndef __ddr2_defs_h
2#define __ddr2_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ddr2.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile ddr2_defs.h ddr2.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope ddr2 */
83
84/* Register rw_cfg, scope ddr2, type rw */
85typedef struct {
86 unsigned int col_width : 4;
87 unsigned int nr_banks : 1;
88 unsigned int bw : 1;
89 unsigned int nr_ref : 4;
90 unsigned int ref_interval : 11;
91 unsigned int odt_ctrl : 2;
92 unsigned int odt_mem : 1;
93 unsigned int imp_strength : 1;
94 unsigned int auto_imp_cal : 1;
95 unsigned int imp_cal_override : 1;
96 unsigned int dll_override : 1;
97 unsigned int dummy1 : 4;
98} reg_ddr2_rw_cfg;
99#define REG_RD_ADDR_ddr2_rw_cfg 0
100#define REG_WR_ADDR_ddr2_rw_cfg 0
101
102/* Register rw_timing, scope ddr2, type rw */
103typedef struct {
104 unsigned int wr : 3;
105 unsigned int rcd : 3;
106 unsigned int rp : 3;
107 unsigned int ras : 4;
108 unsigned int rfc : 7;
109 unsigned int rc : 5;
110 unsigned int rtp : 2;
111 unsigned int rtw : 3;
112 unsigned int wtr : 2;
113} reg_ddr2_rw_timing;
114#define REG_RD_ADDR_ddr2_rw_timing 4
115#define REG_WR_ADDR_ddr2_rw_timing 4
116
117/* Register rw_latency, scope ddr2, type rw */
118typedef struct {
119 unsigned int cas : 3;
120 unsigned int additive : 3;
121 unsigned int dummy1 : 26;
122} reg_ddr2_rw_latency;
123#define REG_RD_ADDR_ddr2_rw_latency 8
124#define REG_WR_ADDR_ddr2_rw_latency 8
125
126/* Register rw_phy_cfg, scope ddr2, type rw */
127typedef struct {
128 unsigned int en : 1;
129 unsigned int dummy1 : 31;
130} reg_ddr2_rw_phy_cfg;
131#define REG_RD_ADDR_ddr2_rw_phy_cfg 12
132#define REG_WR_ADDR_ddr2_rw_phy_cfg 12
133
134/* Register rw_phy_ctrl, scope ddr2, type rw */
135typedef struct {
136 unsigned int rst : 1;
137 unsigned int cal_rst : 1;
138 unsigned int cal_start : 1;
139 unsigned int dummy1 : 29;
140} reg_ddr2_rw_phy_ctrl;
141#define REG_RD_ADDR_ddr2_rw_phy_ctrl 16
142#define REG_WR_ADDR_ddr2_rw_phy_ctrl 16
143
144/* Register rw_ctrl, scope ddr2, type rw */
145typedef struct {
146 unsigned int mrs_data : 16;
147 unsigned int cmd : 8;
148 unsigned int dummy1 : 8;
149} reg_ddr2_rw_ctrl;
150#define REG_RD_ADDR_ddr2_rw_ctrl 20
151#define REG_WR_ADDR_ddr2_rw_ctrl 20
152
153/* Register rw_pwr_down, scope ddr2, type rw */
154typedef struct {
155 unsigned int self_ref : 2;
156 unsigned int phy_en : 1;
157 unsigned int dummy1 : 29;
158} reg_ddr2_rw_pwr_down;
159#define REG_RD_ADDR_ddr2_rw_pwr_down 24
160#define REG_WR_ADDR_ddr2_rw_pwr_down 24
161
162/* Register r_stat, scope ddr2, type r */
163typedef struct {
164 unsigned int dll_lock : 1;
165 unsigned int dll_delay_code : 7;
166 unsigned int imp_cal_done : 1;
167 unsigned int imp_cal_fault : 1;
168 unsigned int cal_imp_pu : 4;
169 unsigned int cal_imp_pd : 4;
170 unsigned int dummy1 : 14;
171} reg_ddr2_r_stat;
172#define REG_RD_ADDR_ddr2_r_stat 28
173
174/* Register rw_imp_ctrl, scope ddr2, type rw */
175typedef struct {
176 unsigned int imp_pu : 4;
177 unsigned int imp_pd : 4;
178 unsigned int dummy1 : 24;
179} reg_ddr2_rw_imp_ctrl;
180#define REG_RD_ADDR_ddr2_rw_imp_ctrl 32
181#define REG_WR_ADDR_ddr2_rw_imp_ctrl 32
182
183#define STRIDE_ddr2_rw_dll_ctrl 4
184/* Register rw_dll_ctrl, scope ddr2, type rw */
185typedef struct {
186 unsigned int mode : 1;
187 unsigned int clk_delay : 7;
188 unsigned int dummy1 : 24;
189} reg_ddr2_rw_dll_ctrl;
190#define REG_RD_ADDR_ddr2_rw_dll_ctrl 36
191#define REG_WR_ADDR_ddr2_rw_dll_ctrl 36
192
193#define STRIDE_ddr2_rw_dqs_dll_ctrl 4
194/* Register rw_dqs_dll_ctrl, scope ddr2, type rw */
195typedef struct {
196 unsigned int dqs90_delay : 7;
197 unsigned int dqs180_delay : 7;
198 unsigned int dqs270_delay : 7;
199 unsigned int dqs360_delay : 7;
200 unsigned int dummy1 : 4;
201} reg_ddr2_rw_dqs_dll_ctrl;
202#define REG_RD_ADDR_ddr2_rw_dqs_dll_ctrl 52
203#define REG_WR_ADDR_ddr2_rw_dqs_dll_ctrl 52
204
205
206/* Constants */
207enum {
208 regk_ddr2_al0 = 0x00000000,
209 regk_ddr2_al1 = 0x00000008,
210 regk_ddr2_al2 = 0x00000010,
211 regk_ddr2_al3 = 0x00000018,
212 regk_ddr2_al4 = 0x00000020,
213 regk_ddr2_auto = 0x00000003,
214 regk_ddr2_bank4 = 0x00000000,
215 regk_ddr2_bank8 = 0x00000001,
216 regk_ddr2_bl4 = 0x00000002,
217 regk_ddr2_bl8 = 0x00000003,
218 regk_ddr2_bt_il = 0x00000008,
219 regk_ddr2_bt_seq = 0x00000000,
220 regk_ddr2_bw16 = 0x00000001,
221 regk_ddr2_bw32 = 0x00000000,
222 regk_ddr2_cas2 = 0x00000020,
223 regk_ddr2_cas3 = 0x00000030,
224 regk_ddr2_cas4 = 0x00000040,
225 regk_ddr2_cas5 = 0x00000050,
226 regk_ddr2_deselect = 0x000000c0,
227 regk_ddr2_dic_weak = 0x00000002,
228 regk_ddr2_direct = 0x00000001,
229 regk_ddr2_dis = 0x00000000,
230 regk_ddr2_dll_dis = 0x00000001,
231 regk_ddr2_dll_en = 0x00000000,
232 regk_ddr2_dll_rst = 0x00000100,
233 regk_ddr2_emrs = 0x00000081,
234 regk_ddr2_emrs2 = 0x00000082,
235 regk_ddr2_emrs3 = 0x00000083,
236 regk_ddr2_full = 0x00000001,
237 regk_ddr2_hi_ref_rate = 0x00000080,
238 regk_ddr2_mrs = 0x00000080,
239 regk_ddr2_no = 0x00000000,
240 regk_ddr2_nop = 0x000000b8,
241 regk_ddr2_ocd_adj = 0x00000200,
242 regk_ddr2_ocd_default = 0x00000380,
243 regk_ddr2_ocd_drive0 = 0x00000100,
244 regk_ddr2_ocd_drive1 = 0x00000080,
245 regk_ddr2_ocd_exit = 0x00000000,
246 regk_ddr2_odt_dis = 0x00000000,
247 regk_ddr2_offs = 0x00000000,
248 regk_ddr2_pre = 0x00000090,
249 regk_ddr2_pre_all = 0x00000400,
250 regk_ddr2_pwr_down_fast = 0x00000000,
251 regk_ddr2_pwr_down_slow = 0x00001000,
252 regk_ddr2_ref = 0x00000088,
253 regk_ddr2_rtt150 = 0x00000040,
254 regk_ddr2_rtt50 = 0x00000044,
255 regk_ddr2_rtt75 = 0x00000004,
256 regk_ddr2_rw_cfg_default = 0x00186000,
257 regk_ddr2_rw_dll_ctrl_default = 0x00000000,
258 regk_ddr2_rw_dll_ctrl_size = 0x00000004,
259 regk_ddr2_rw_dqs_dll_ctrl_default = 0x00000000,
260 regk_ddr2_rw_dqs_dll_ctrl_size = 0x00000004,
261 regk_ddr2_rw_latency_default = 0x00000000,
262 regk_ddr2_rw_phy_cfg_default = 0x00000000,
263 regk_ddr2_rw_pwr_down_default = 0x00000000,
264 regk_ddr2_rw_timing_default = 0x00000000,
265 regk_ddr2_s1Gb = 0x0000001a,
266 regk_ddr2_s256Mb = 0x0000000f,
267 regk_ddr2_s2Gb = 0x00000027,
268 regk_ddr2_s4Gb = 0x00000042,
269 regk_ddr2_s512Mb = 0x00000015,
270 regk_ddr2_temp0_85 = 0x00000618,
271 regk_ddr2_temp85_95 = 0x0000030c,
272 regk_ddr2_term150 = 0x00000002,
273 regk_ddr2_term50 = 0x00000003,
274 regk_ddr2_term75 = 0x00000001,
275 regk_ddr2_test = 0x00000080,
276 regk_ddr2_weak = 0x00000000,
277 regk_ddr2_wr2 = 0x00000200,
278 regk_ddr2_wr3 = 0x00000400,
279 regk_ddr2_yes = 0x00000001
280};
281#endif /* __ddr2_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/gio_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/gio_defs.h
deleted file mode 100644
index 5d88e0db23ae..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/gio_defs.h
+++ /dev/null
@@ -1,837 +0,0 @@
1#ifndef __gio_defs_h
2#define __gio_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: gio.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile gio_defs.h gio.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope gio */
83
84/* Register r_pa_din, scope gio, type r */
85typedef struct {
86 unsigned int data : 32;
87} reg_gio_r_pa_din;
88#define REG_RD_ADDR_gio_r_pa_din 0
89
90/* Register rw_pa_dout, scope gio, type rw */
91typedef struct {
92 unsigned int data : 32;
93} reg_gio_rw_pa_dout;
94#define REG_RD_ADDR_gio_rw_pa_dout 4
95#define REG_WR_ADDR_gio_rw_pa_dout 4
96
97/* Register rw_pa_oe, scope gio, type rw */
98typedef struct {
99 unsigned int oe : 32;
100} reg_gio_rw_pa_oe;
101#define REG_RD_ADDR_gio_rw_pa_oe 8
102#define REG_WR_ADDR_gio_rw_pa_oe 8
103
104/* Register rw_pa_byte0_dout, scope gio, type rw */
105typedef struct {
106 unsigned int data : 8;
107 unsigned int dummy1 : 24;
108} reg_gio_rw_pa_byte0_dout;
109#define REG_RD_ADDR_gio_rw_pa_byte0_dout 12
110#define REG_WR_ADDR_gio_rw_pa_byte0_dout 12
111
112/* Register rw_pa_byte0_oe, scope gio, type rw */
113typedef struct {
114 unsigned int oe : 8;
115 unsigned int dummy1 : 24;
116} reg_gio_rw_pa_byte0_oe;
117#define REG_RD_ADDR_gio_rw_pa_byte0_oe 16
118#define REG_WR_ADDR_gio_rw_pa_byte0_oe 16
119
120/* Register rw_pa_byte1_dout, scope gio, type rw */
121typedef struct {
122 unsigned int data : 8;
123 unsigned int dummy1 : 24;
124} reg_gio_rw_pa_byte1_dout;
125#define REG_RD_ADDR_gio_rw_pa_byte1_dout 20
126#define REG_WR_ADDR_gio_rw_pa_byte1_dout 20
127
128/* Register rw_pa_byte1_oe, scope gio, type rw */
129typedef struct {
130 unsigned int oe : 8;
131 unsigned int dummy1 : 24;
132} reg_gio_rw_pa_byte1_oe;
133#define REG_RD_ADDR_gio_rw_pa_byte1_oe 24
134#define REG_WR_ADDR_gio_rw_pa_byte1_oe 24
135
136/* Register rw_pa_byte2_dout, scope gio, type rw */
137typedef struct {
138 unsigned int data : 8;
139 unsigned int dummy1 : 24;
140} reg_gio_rw_pa_byte2_dout;
141#define REG_RD_ADDR_gio_rw_pa_byte2_dout 28
142#define REG_WR_ADDR_gio_rw_pa_byte2_dout 28
143
144/* Register rw_pa_byte2_oe, scope gio, type rw */
145typedef struct {
146 unsigned int oe : 8;
147 unsigned int dummy1 : 24;
148} reg_gio_rw_pa_byte2_oe;
149#define REG_RD_ADDR_gio_rw_pa_byte2_oe 32
150#define REG_WR_ADDR_gio_rw_pa_byte2_oe 32
151
152/* Register rw_pa_byte3_dout, scope gio, type rw */
153typedef struct {
154 unsigned int data : 8;
155 unsigned int dummy1 : 24;
156} reg_gio_rw_pa_byte3_dout;
157#define REG_RD_ADDR_gio_rw_pa_byte3_dout 36
158#define REG_WR_ADDR_gio_rw_pa_byte3_dout 36
159
160/* Register rw_pa_byte3_oe, scope gio, type rw */
161typedef struct {
162 unsigned int oe : 8;
163 unsigned int dummy1 : 24;
164} reg_gio_rw_pa_byte3_oe;
165#define REG_RD_ADDR_gio_rw_pa_byte3_oe 40
166#define REG_WR_ADDR_gio_rw_pa_byte3_oe 40
167
168/* Register r_pb_din, scope gio, type r */
169typedef struct {
170 unsigned int data : 32;
171} reg_gio_r_pb_din;
172#define REG_RD_ADDR_gio_r_pb_din 44
173
174/* Register rw_pb_dout, scope gio, type rw */
175typedef struct {
176 unsigned int data : 32;
177} reg_gio_rw_pb_dout;
178#define REG_RD_ADDR_gio_rw_pb_dout 48
179#define REG_WR_ADDR_gio_rw_pb_dout 48
180
181/* Register rw_pb_oe, scope gio, type rw */
182typedef struct {
183 unsigned int oe : 32;
184} reg_gio_rw_pb_oe;
185#define REG_RD_ADDR_gio_rw_pb_oe 52
186#define REG_WR_ADDR_gio_rw_pb_oe 52
187
188/* Register rw_pb_byte0_dout, scope gio, type rw */
189typedef struct {
190 unsigned int data : 8;
191 unsigned int dummy1 : 24;
192} reg_gio_rw_pb_byte0_dout;
193#define REG_RD_ADDR_gio_rw_pb_byte0_dout 56
194#define REG_WR_ADDR_gio_rw_pb_byte0_dout 56
195
196/* Register rw_pb_byte0_oe, scope gio, type rw */
197typedef struct {
198 unsigned int oe : 8;
199 unsigned int dummy1 : 24;
200} reg_gio_rw_pb_byte0_oe;
201#define REG_RD_ADDR_gio_rw_pb_byte0_oe 60
202#define REG_WR_ADDR_gio_rw_pb_byte0_oe 60
203
204/* Register rw_pb_byte1_dout, scope gio, type rw */
205typedef struct {
206 unsigned int data : 8;
207 unsigned int dummy1 : 24;
208} reg_gio_rw_pb_byte1_dout;
209#define REG_RD_ADDR_gio_rw_pb_byte1_dout 64
210#define REG_WR_ADDR_gio_rw_pb_byte1_dout 64
211
212/* Register rw_pb_byte1_oe, scope gio, type rw */
213typedef struct {
214 unsigned int oe : 8;
215 unsigned int dummy1 : 24;
216} reg_gio_rw_pb_byte1_oe;
217#define REG_RD_ADDR_gio_rw_pb_byte1_oe 68
218#define REG_WR_ADDR_gio_rw_pb_byte1_oe 68
219
220/* Register rw_pb_byte2_dout, scope gio, type rw */
221typedef struct {
222 unsigned int data : 8;
223 unsigned int dummy1 : 24;
224} reg_gio_rw_pb_byte2_dout;
225#define REG_RD_ADDR_gio_rw_pb_byte2_dout 72
226#define REG_WR_ADDR_gio_rw_pb_byte2_dout 72
227
228/* Register rw_pb_byte2_oe, scope gio, type rw */
229typedef struct {
230 unsigned int oe : 8;
231 unsigned int dummy1 : 24;
232} reg_gio_rw_pb_byte2_oe;
233#define REG_RD_ADDR_gio_rw_pb_byte2_oe 76
234#define REG_WR_ADDR_gio_rw_pb_byte2_oe 76
235
236/* Register rw_pb_byte3_dout, scope gio, type rw */
237typedef struct {
238 unsigned int data : 8;
239 unsigned int dummy1 : 24;
240} reg_gio_rw_pb_byte3_dout;
241#define REG_RD_ADDR_gio_rw_pb_byte3_dout 80
242#define REG_WR_ADDR_gio_rw_pb_byte3_dout 80
243
244/* Register rw_pb_byte3_oe, scope gio, type rw */
245typedef struct {
246 unsigned int oe : 8;
247 unsigned int dummy1 : 24;
248} reg_gio_rw_pb_byte3_oe;
249#define REG_RD_ADDR_gio_rw_pb_byte3_oe 84
250#define REG_WR_ADDR_gio_rw_pb_byte3_oe 84
251
252/* Register r_pc_din, scope gio, type r */
253typedef struct {
254 unsigned int data : 16;
255 unsigned int dummy1 : 16;
256} reg_gio_r_pc_din;
257#define REG_RD_ADDR_gio_r_pc_din 88
258
259/* Register rw_pc_dout, scope gio, type rw */
260typedef struct {
261 unsigned int data : 16;
262 unsigned int dummy1 : 16;
263} reg_gio_rw_pc_dout;
264#define REG_RD_ADDR_gio_rw_pc_dout 92
265#define REG_WR_ADDR_gio_rw_pc_dout 92
266
267/* Register rw_pc_oe, scope gio, type rw */
268typedef struct {
269 unsigned int oe : 16;
270 unsigned int dummy1 : 16;
271} reg_gio_rw_pc_oe;
272#define REG_RD_ADDR_gio_rw_pc_oe 96
273#define REG_WR_ADDR_gio_rw_pc_oe 96
274
275/* Register rw_pc_byte0_dout, scope gio, type rw */
276typedef struct {
277 unsigned int data : 8;
278 unsigned int dummy1 : 24;
279} reg_gio_rw_pc_byte0_dout;
280#define REG_RD_ADDR_gio_rw_pc_byte0_dout 100
281#define REG_WR_ADDR_gio_rw_pc_byte0_dout 100
282
283/* Register rw_pc_byte0_oe, scope gio, type rw */
284typedef struct {
285 unsigned int oe : 8;
286 unsigned int dummy1 : 24;
287} reg_gio_rw_pc_byte0_oe;
288#define REG_RD_ADDR_gio_rw_pc_byte0_oe 104
289#define REG_WR_ADDR_gio_rw_pc_byte0_oe 104
290
291/* Register rw_pc_byte1_dout, scope gio, type rw */
292typedef struct {
293 unsigned int data : 8;
294 unsigned int dummy1 : 24;
295} reg_gio_rw_pc_byte1_dout;
296#define REG_RD_ADDR_gio_rw_pc_byte1_dout 108
297#define REG_WR_ADDR_gio_rw_pc_byte1_dout 108
298
299/* Register rw_pc_byte1_oe, scope gio, type rw */
300typedef struct {
301 unsigned int oe : 8;
302 unsigned int dummy1 : 24;
303} reg_gio_rw_pc_byte1_oe;
304#define REG_RD_ADDR_gio_rw_pc_byte1_oe 112
305#define REG_WR_ADDR_gio_rw_pc_byte1_oe 112
306
307/* Register r_pd_din, scope gio, type r */
308typedef struct {
309 unsigned int data : 32;
310} reg_gio_r_pd_din;
311#define REG_RD_ADDR_gio_r_pd_din 116
312
313/* Register rw_intr_cfg, scope gio, type rw */
314typedef struct {
315 unsigned int intr0 : 3;
316 unsigned int intr1 : 3;
317 unsigned int intr2 : 3;
318 unsigned int intr3 : 3;
319 unsigned int intr4 : 3;
320 unsigned int intr5 : 3;
321 unsigned int intr6 : 3;
322 unsigned int intr7 : 3;
323 unsigned int dummy1 : 8;
324} reg_gio_rw_intr_cfg;
325#define REG_RD_ADDR_gio_rw_intr_cfg 120
326#define REG_WR_ADDR_gio_rw_intr_cfg 120
327
328/* Register rw_intr_pins, scope gio, type rw */
329typedef struct {
330 unsigned int intr0 : 4;
331 unsigned int intr1 : 4;
332 unsigned int intr2 : 4;
333 unsigned int intr3 : 4;
334 unsigned int intr4 : 4;
335 unsigned int intr5 : 4;
336 unsigned int intr6 : 4;
337 unsigned int intr7 : 4;
338} reg_gio_rw_intr_pins;
339#define REG_RD_ADDR_gio_rw_intr_pins 124
340#define REG_WR_ADDR_gio_rw_intr_pins 124
341
342/* Register rw_intr_mask, scope gio, type rw */
343typedef struct {
344 unsigned int intr0 : 1;
345 unsigned int intr1 : 1;
346 unsigned int intr2 : 1;
347 unsigned int intr3 : 1;
348 unsigned int intr4 : 1;
349 unsigned int intr5 : 1;
350 unsigned int intr6 : 1;
351 unsigned int intr7 : 1;
352 unsigned int i2c0_done : 1;
353 unsigned int i2c1_done : 1;
354 unsigned int dummy1 : 22;
355} reg_gio_rw_intr_mask;
356#define REG_RD_ADDR_gio_rw_intr_mask 128
357#define REG_WR_ADDR_gio_rw_intr_mask 128
358
359/* Register rw_ack_intr, scope gio, type rw */
360typedef struct {
361 unsigned int intr0 : 1;
362 unsigned int intr1 : 1;
363 unsigned int intr2 : 1;
364 unsigned int intr3 : 1;
365 unsigned int intr4 : 1;
366 unsigned int intr5 : 1;
367 unsigned int intr6 : 1;
368 unsigned int intr7 : 1;
369 unsigned int i2c0_done : 1;
370 unsigned int i2c1_done : 1;
371 unsigned int dummy1 : 22;
372} reg_gio_rw_ack_intr;
373#define REG_RD_ADDR_gio_rw_ack_intr 132
374#define REG_WR_ADDR_gio_rw_ack_intr 132
375
376/* Register r_intr, scope gio, type r */
377typedef struct {
378 unsigned int intr0 : 1;
379 unsigned int intr1 : 1;
380 unsigned int intr2 : 1;
381 unsigned int intr3 : 1;
382 unsigned int intr4 : 1;
383 unsigned int intr5 : 1;
384 unsigned int intr6 : 1;
385 unsigned int intr7 : 1;
386 unsigned int i2c0_done : 1;
387 unsigned int i2c1_done : 1;
388 unsigned int dummy1 : 22;
389} reg_gio_r_intr;
390#define REG_RD_ADDR_gio_r_intr 136
391
392/* Register r_masked_intr, scope gio, type r */
393typedef struct {
394 unsigned int intr0 : 1;
395 unsigned int intr1 : 1;
396 unsigned int intr2 : 1;
397 unsigned int intr3 : 1;
398 unsigned int intr4 : 1;
399 unsigned int intr5 : 1;
400 unsigned int intr6 : 1;
401 unsigned int intr7 : 1;
402 unsigned int i2c0_done : 1;
403 unsigned int i2c1_done : 1;
404 unsigned int dummy1 : 22;
405} reg_gio_r_masked_intr;
406#define REG_RD_ADDR_gio_r_masked_intr 140
407
408/* Register rw_i2c0_start, scope gio, type rw */
409typedef struct {
410 unsigned int run : 1;
411 unsigned int dummy1 : 31;
412} reg_gio_rw_i2c0_start;
413#define REG_RD_ADDR_gio_rw_i2c0_start 144
414#define REG_WR_ADDR_gio_rw_i2c0_start 144
415
416/* Register rw_i2c0_cfg, scope gio, type rw */
417typedef struct {
418 unsigned int en : 1;
419 unsigned int bit_order : 1;
420 unsigned int scl_io : 1;
421 unsigned int scl_inv : 1;
422 unsigned int sda_io : 1;
423 unsigned int sda_idle : 1;
424 unsigned int dummy1 : 26;
425} reg_gio_rw_i2c0_cfg;
426#define REG_RD_ADDR_gio_rw_i2c0_cfg 148
427#define REG_WR_ADDR_gio_rw_i2c0_cfg 148
428
429/* Register rw_i2c0_ctrl, scope gio, type rw */
430typedef struct {
431 unsigned int trf_bits : 6;
432 unsigned int switch_dir : 6;
433 unsigned int extra_start : 3;
434 unsigned int early_end : 1;
435 unsigned int start_stop : 1;
436 unsigned int ack_dir0 : 1;
437 unsigned int ack_dir1 : 1;
438 unsigned int ack_dir2 : 1;
439 unsigned int ack_dir3 : 1;
440 unsigned int ack_dir4 : 1;
441 unsigned int ack_dir5 : 1;
442 unsigned int ack_bit : 1;
443 unsigned int start_bit : 1;
444 unsigned int freq : 2;
445 unsigned int dummy1 : 5;
446} reg_gio_rw_i2c0_ctrl;
447#define REG_RD_ADDR_gio_rw_i2c0_ctrl 152
448#define REG_WR_ADDR_gio_rw_i2c0_ctrl 152
449
450/* Register rw_i2c0_data, scope gio, type rw */
451typedef struct {
452 unsigned int data0 : 8;
453 unsigned int data1 : 8;
454 unsigned int data2 : 8;
455 unsigned int data3 : 8;
456} reg_gio_rw_i2c0_data;
457#define REG_RD_ADDR_gio_rw_i2c0_data 156
458#define REG_WR_ADDR_gio_rw_i2c0_data 156
459
460/* Register rw_i2c0_data2, scope gio, type rw */
461typedef struct {
462 unsigned int data4 : 8;
463 unsigned int data5 : 8;
464 unsigned int start_val : 6;
465 unsigned int ack_val : 6;
466 unsigned int dummy1 : 4;
467} reg_gio_rw_i2c0_data2;
468#define REG_RD_ADDR_gio_rw_i2c0_data2 160
469#define REG_WR_ADDR_gio_rw_i2c0_data2 160
470
471/* Register rw_i2c1_start, scope gio, type rw */
472typedef struct {
473 unsigned int run : 1;
474 unsigned int dummy1 : 31;
475} reg_gio_rw_i2c1_start;
476#define REG_RD_ADDR_gio_rw_i2c1_start 164
477#define REG_WR_ADDR_gio_rw_i2c1_start 164
478
479/* Register rw_i2c1_cfg, scope gio, type rw */
480typedef struct {
481 unsigned int en : 1;
482 unsigned int bit_order : 1;
483 unsigned int scl_io : 1;
484 unsigned int scl_inv : 1;
485 unsigned int sda0_io : 1;
486 unsigned int sda0_idle : 1;
487 unsigned int sda1_io : 1;
488 unsigned int sda1_idle : 1;
489 unsigned int sda2_io : 1;
490 unsigned int sda2_idle : 1;
491 unsigned int sda3_io : 1;
492 unsigned int sda3_idle : 1;
493 unsigned int sda_sel : 2;
494 unsigned int sen_idle : 1;
495 unsigned int sen_inv : 1;
496 unsigned int sen_sel : 2;
497 unsigned int dummy1 : 14;
498} reg_gio_rw_i2c1_cfg;
499#define REG_RD_ADDR_gio_rw_i2c1_cfg 168
500#define REG_WR_ADDR_gio_rw_i2c1_cfg 168
501
502/* Register rw_i2c1_ctrl, scope gio, type rw */
503typedef struct {
504 unsigned int trf_bits : 6;
505 unsigned int switch_dir : 6;
506 unsigned int extra_start : 3;
507 unsigned int early_end : 1;
508 unsigned int start_stop : 1;
509 unsigned int ack_dir0 : 1;
510 unsigned int ack_dir1 : 1;
511 unsigned int ack_dir2 : 1;
512 unsigned int ack_dir3 : 1;
513 unsigned int ack_dir4 : 1;
514 unsigned int ack_dir5 : 1;
515 unsigned int ack_bit : 1;
516 unsigned int start_bit : 1;
517 unsigned int freq : 2;
518 unsigned int dummy1 : 5;
519} reg_gio_rw_i2c1_ctrl;
520#define REG_RD_ADDR_gio_rw_i2c1_ctrl 172
521#define REG_WR_ADDR_gio_rw_i2c1_ctrl 172
522
523/* Register rw_i2c1_data, scope gio, type rw */
524typedef struct {
525 unsigned int data0 : 8;
526 unsigned int data1 : 8;
527 unsigned int data2 : 8;
528 unsigned int data3 : 8;
529} reg_gio_rw_i2c1_data;
530#define REG_RD_ADDR_gio_rw_i2c1_data 176
531#define REG_WR_ADDR_gio_rw_i2c1_data 176
532
533/* Register rw_i2c1_data2, scope gio, type rw */
534typedef struct {
535 unsigned int data4 : 8;
536 unsigned int data5 : 8;
537 unsigned int start_val : 6;
538 unsigned int ack_val : 6;
539 unsigned int dummy1 : 4;
540} reg_gio_rw_i2c1_data2;
541#define REG_RD_ADDR_gio_rw_i2c1_data2 180
542#define REG_WR_ADDR_gio_rw_i2c1_data2 180
543
544/* Register r_ppwm_stat, scope gio, type r */
545typedef struct {
546 unsigned int freq : 2;
547 unsigned int dummy1 : 30;
548} reg_gio_r_ppwm_stat;
549#define REG_RD_ADDR_gio_r_ppwm_stat 184
550
551/* Register rw_ppwm_data, scope gio, type rw */
552typedef struct {
553 unsigned int data : 8;
554 unsigned int dummy1 : 24;
555} reg_gio_rw_ppwm_data;
556#define REG_RD_ADDR_gio_rw_ppwm_data 188
557#define REG_WR_ADDR_gio_rw_ppwm_data 188
558
559/* Register rw_pwm0_ctrl, scope gio, type rw */
560typedef struct {
561 unsigned int mode : 2;
562 unsigned int ccd_override : 1;
563 unsigned int ccd_val : 1;
564 unsigned int dummy1 : 28;
565} reg_gio_rw_pwm0_ctrl;
566#define REG_RD_ADDR_gio_rw_pwm0_ctrl 192
567#define REG_WR_ADDR_gio_rw_pwm0_ctrl 192
568
569/* Register rw_pwm0_var, scope gio, type rw */
570typedef struct {
571 unsigned int lo : 13;
572 unsigned int hi : 13;
573 unsigned int dummy1 : 6;
574} reg_gio_rw_pwm0_var;
575#define REG_RD_ADDR_gio_rw_pwm0_var 196
576#define REG_WR_ADDR_gio_rw_pwm0_var 196
577
578/* Register rw_pwm0_data, scope gio, type rw */
579typedef struct {
580 unsigned int data : 8;
581 unsigned int dummy1 : 24;
582} reg_gio_rw_pwm0_data;
583#define REG_RD_ADDR_gio_rw_pwm0_data 200
584#define REG_WR_ADDR_gio_rw_pwm0_data 200
585
586/* Register rw_pwm1_ctrl, scope gio, type rw */
587typedef struct {
588 unsigned int mode : 2;
589 unsigned int ccd_override : 1;
590 unsigned int ccd_val : 1;
591 unsigned int dummy1 : 28;
592} reg_gio_rw_pwm1_ctrl;
593#define REG_RD_ADDR_gio_rw_pwm1_ctrl 204
594#define REG_WR_ADDR_gio_rw_pwm1_ctrl 204
595
596/* Register rw_pwm1_var, scope gio, type rw */
597typedef struct {
598 unsigned int lo : 13;
599 unsigned int hi : 13;
600 unsigned int dummy1 : 6;
601} reg_gio_rw_pwm1_var;
602#define REG_RD_ADDR_gio_rw_pwm1_var 208
603#define REG_WR_ADDR_gio_rw_pwm1_var 208
604
605/* Register rw_pwm1_data, scope gio, type rw */
606typedef struct {
607 unsigned int data : 8;
608 unsigned int dummy1 : 24;
609} reg_gio_rw_pwm1_data;
610#define REG_RD_ADDR_gio_rw_pwm1_data 212
611#define REG_WR_ADDR_gio_rw_pwm1_data 212
612
613/* Register rw_pwm2_ctrl, scope gio, type rw */
614typedef struct {
615 unsigned int mode : 2;
616 unsigned int ccd_override : 1;
617 unsigned int ccd_val : 1;
618 unsigned int dummy1 : 28;
619} reg_gio_rw_pwm2_ctrl;
620#define REG_RD_ADDR_gio_rw_pwm2_ctrl 216
621#define REG_WR_ADDR_gio_rw_pwm2_ctrl 216
622
623/* Register rw_pwm2_var, scope gio, type rw */
624typedef struct {
625 unsigned int lo : 13;
626 unsigned int hi : 13;
627 unsigned int dummy1 : 6;
628} reg_gio_rw_pwm2_var;
629#define REG_RD_ADDR_gio_rw_pwm2_var 220
630#define REG_WR_ADDR_gio_rw_pwm2_var 220
631
632/* Register rw_pwm2_data, scope gio, type rw */
633typedef struct {
634 unsigned int data : 8;
635 unsigned int dummy1 : 24;
636} reg_gio_rw_pwm2_data;
637#define REG_RD_ADDR_gio_rw_pwm2_data 224
638#define REG_WR_ADDR_gio_rw_pwm2_data 224
639
640/* Register rw_pwm_in_cfg, scope gio, type rw */
641typedef struct {
642 unsigned int pin : 3;
643 unsigned int dummy1 : 29;
644} reg_gio_rw_pwm_in_cfg;
645#define REG_RD_ADDR_gio_rw_pwm_in_cfg 228
646#define REG_WR_ADDR_gio_rw_pwm_in_cfg 228
647
648/* Register r_pwm_in_lo, scope gio, type r */
649typedef struct {
650 unsigned int data : 32;
651} reg_gio_r_pwm_in_lo;
652#define REG_RD_ADDR_gio_r_pwm_in_lo 232
653
654/* Register r_pwm_in_hi, scope gio, type r */
655typedef struct {
656 unsigned int data : 32;
657} reg_gio_r_pwm_in_hi;
658#define REG_RD_ADDR_gio_r_pwm_in_hi 236
659
660/* Register r_pwm_in_cnt, scope gio, type r */
661typedef struct {
662 unsigned int data : 32;
663} reg_gio_r_pwm_in_cnt;
664#define REG_RD_ADDR_gio_r_pwm_in_cnt 240
665
666
667/* Constants */
668enum {
669 regk_gio_anyedge = 0x00000007,
670 regk_gio_f100k = 0x00000000,
671 regk_gio_f1562 = 0x00000000,
672 regk_gio_f195 = 0x00000003,
673 regk_gio_f1m = 0x00000002,
674 regk_gio_f390 = 0x00000002,
675 regk_gio_f400k = 0x00000001,
676 regk_gio_f5m = 0x00000003,
677 regk_gio_f781 = 0x00000001,
678 regk_gio_hi = 0x00000001,
679 regk_gio_in = 0x00000000,
680 regk_gio_intr_pa0 = 0x00000000,
681 regk_gio_intr_pa1 = 0x00000000,
682 regk_gio_intr_pa10 = 0x00000001,
683 regk_gio_intr_pa11 = 0x00000001,
684 regk_gio_intr_pa12 = 0x00000001,
685 regk_gio_intr_pa13 = 0x00000001,
686 regk_gio_intr_pa14 = 0x00000001,
687 regk_gio_intr_pa15 = 0x00000001,
688 regk_gio_intr_pa16 = 0x00000002,
689 regk_gio_intr_pa17 = 0x00000002,
690 regk_gio_intr_pa18 = 0x00000002,
691 regk_gio_intr_pa19 = 0x00000002,
692 regk_gio_intr_pa2 = 0x00000000,
693 regk_gio_intr_pa20 = 0x00000002,
694 regk_gio_intr_pa21 = 0x00000002,
695 regk_gio_intr_pa22 = 0x00000002,
696 regk_gio_intr_pa23 = 0x00000002,
697 regk_gio_intr_pa24 = 0x00000003,
698 regk_gio_intr_pa25 = 0x00000003,
699 regk_gio_intr_pa26 = 0x00000003,
700 regk_gio_intr_pa27 = 0x00000003,
701 regk_gio_intr_pa28 = 0x00000003,
702 regk_gio_intr_pa29 = 0x00000003,
703 regk_gio_intr_pa3 = 0x00000000,
704 regk_gio_intr_pa30 = 0x00000003,
705 regk_gio_intr_pa31 = 0x00000003,
706 regk_gio_intr_pa4 = 0x00000000,
707 regk_gio_intr_pa5 = 0x00000000,
708 regk_gio_intr_pa6 = 0x00000000,
709 regk_gio_intr_pa7 = 0x00000000,
710 regk_gio_intr_pa8 = 0x00000001,
711 regk_gio_intr_pa9 = 0x00000001,
712 regk_gio_intr_pb0 = 0x00000004,
713 regk_gio_intr_pb1 = 0x00000004,
714 regk_gio_intr_pb10 = 0x00000005,
715 regk_gio_intr_pb11 = 0x00000005,
716 regk_gio_intr_pb12 = 0x00000005,
717 regk_gio_intr_pb13 = 0x00000005,
718 regk_gio_intr_pb14 = 0x00000005,
719 regk_gio_intr_pb15 = 0x00000005,
720 regk_gio_intr_pb16 = 0x00000006,
721 regk_gio_intr_pb17 = 0x00000006,
722 regk_gio_intr_pb18 = 0x00000006,
723 regk_gio_intr_pb19 = 0x00000006,
724 regk_gio_intr_pb2 = 0x00000004,
725 regk_gio_intr_pb20 = 0x00000006,
726 regk_gio_intr_pb21 = 0x00000006,
727 regk_gio_intr_pb22 = 0x00000006,
728 regk_gio_intr_pb23 = 0x00000006,
729 regk_gio_intr_pb24 = 0x00000007,
730 regk_gio_intr_pb25 = 0x00000007,
731 regk_gio_intr_pb26 = 0x00000007,
732 regk_gio_intr_pb27 = 0x00000007,
733 regk_gio_intr_pb28 = 0x00000007,
734 regk_gio_intr_pb29 = 0x00000007,
735 regk_gio_intr_pb3 = 0x00000004,
736 regk_gio_intr_pb30 = 0x00000007,
737 regk_gio_intr_pb31 = 0x00000007,
738 regk_gio_intr_pb4 = 0x00000004,
739 regk_gio_intr_pb5 = 0x00000004,
740 regk_gio_intr_pb6 = 0x00000004,
741 regk_gio_intr_pb7 = 0x00000004,
742 regk_gio_intr_pb8 = 0x00000005,
743 regk_gio_intr_pb9 = 0x00000005,
744 regk_gio_intr_pc0 = 0x00000008,
745 regk_gio_intr_pc1 = 0x00000008,
746 regk_gio_intr_pc10 = 0x00000009,
747 regk_gio_intr_pc11 = 0x00000009,
748 regk_gio_intr_pc12 = 0x00000009,
749 regk_gio_intr_pc13 = 0x00000009,
750 regk_gio_intr_pc14 = 0x00000009,
751 regk_gio_intr_pc15 = 0x00000009,
752 regk_gio_intr_pc2 = 0x00000008,
753 regk_gio_intr_pc3 = 0x00000008,
754 regk_gio_intr_pc4 = 0x00000008,
755 regk_gio_intr_pc5 = 0x00000008,
756 regk_gio_intr_pc6 = 0x00000008,
757 regk_gio_intr_pc7 = 0x00000008,
758 regk_gio_intr_pc8 = 0x00000009,
759 regk_gio_intr_pc9 = 0x00000009,
760 regk_gio_intr_pd0 = 0x0000000c,
761 regk_gio_intr_pd1 = 0x0000000c,
762 regk_gio_intr_pd10 = 0x0000000d,
763 regk_gio_intr_pd11 = 0x0000000d,
764 regk_gio_intr_pd12 = 0x0000000d,
765 regk_gio_intr_pd13 = 0x0000000d,
766 regk_gio_intr_pd14 = 0x0000000d,
767 regk_gio_intr_pd15 = 0x0000000d,
768 regk_gio_intr_pd16 = 0x0000000e,
769 regk_gio_intr_pd17 = 0x0000000e,
770 regk_gio_intr_pd18 = 0x0000000e,
771 regk_gio_intr_pd19 = 0x0000000e,
772 regk_gio_intr_pd2 = 0x0000000c,
773 regk_gio_intr_pd20 = 0x0000000e,
774 regk_gio_intr_pd21 = 0x0000000e,
775 regk_gio_intr_pd22 = 0x0000000e,
776 regk_gio_intr_pd23 = 0x0000000e,
777 regk_gio_intr_pd24 = 0x0000000f,
778 regk_gio_intr_pd25 = 0x0000000f,
779 regk_gio_intr_pd26 = 0x0000000f,
780 regk_gio_intr_pd27 = 0x0000000f,
781 regk_gio_intr_pd28 = 0x0000000f,
782 regk_gio_intr_pd29 = 0x0000000f,
783 regk_gio_intr_pd3 = 0x0000000c,
784 regk_gio_intr_pd30 = 0x0000000f,
785 regk_gio_intr_pd31 = 0x0000000f,
786 regk_gio_intr_pd4 = 0x0000000c,
787 regk_gio_intr_pd5 = 0x0000000c,
788 regk_gio_intr_pd6 = 0x0000000c,
789 regk_gio_intr_pd7 = 0x0000000c,
790 regk_gio_intr_pd8 = 0x0000000d,
791 regk_gio_intr_pd9 = 0x0000000d,
792 regk_gio_lo = 0x00000002,
793 regk_gio_lsb = 0x00000000,
794 regk_gio_msb = 0x00000001,
795 regk_gio_negedge = 0x00000006,
796 regk_gio_no = 0x00000000,
797 regk_gio_no_switch = 0x0000003f,
798 regk_gio_none = 0x00000007,
799 regk_gio_off = 0x00000000,
800 regk_gio_opendrain = 0x00000000,
801 regk_gio_out = 0x00000001,
802 regk_gio_posedge = 0x00000005,
803 regk_gio_pwm_hfp = 0x00000002,
804 regk_gio_pwm_pa0 = 0x00000001,
805 regk_gio_pwm_pa19 = 0x00000004,
806 regk_gio_pwm_pa6 = 0x00000002,
807 regk_gio_pwm_pa7 = 0x00000003,
808 regk_gio_pwm_pb26 = 0x00000005,
809 regk_gio_pwm_pd23 = 0x00000006,
810 regk_gio_pwm_pd31 = 0x00000007,
811 regk_gio_pwm_std = 0x00000001,
812 regk_gio_pwm_var = 0x00000003,
813 regk_gio_rw_i2c0_cfg_default = 0x00000020,
814 regk_gio_rw_i2c0_ctrl_default = 0x00010000,
815 regk_gio_rw_i2c0_start_default = 0x00000000,
816 regk_gio_rw_i2c1_cfg_default = 0x00000aa0,
817 regk_gio_rw_i2c1_ctrl_default = 0x00010000,
818 regk_gio_rw_i2c1_start_default = 0x00000000,
819 regk_gio_rw_intr_cfg_default = 0x00000000,
820 regk_gio_rw_intr_mask_default = 0x00000000,
821 regk_gio_rw_pa_oe_default = 0x00000000,
822 regk_gio_rw_pb_oe_default = 0x00000000,
823 regk_gio_rw_pc_oe_default = 0x00000000,
824 regk_gio_rw_ppwm_data_default = 0x00000000,
825 regk_gio_rw_pwm0_ctrl_default = 0x00000000,
826 regk_gio_rw_pwm1_ctrl_default = 0x00000000,
827 regk_gio_rw_pwm2_ctrl_default = 0x00000000,
828 regk_gio_rw_pwm_in_cfg_default = 0x00000000,
829 regk_gio_sda0 = 0x00000000,
830 regk_gio_sda1 = 0x00000001,
831 regk_gio_sda2 = 0x00000002,
832 regk_gio_sda3 = 0x00000003,
833 regk_gio_sen = 0x00000000,
834 regk_gio_set = 0x00000003,
835 regk_gio_yes = 0x00000001
836};
837#endif /* __gio_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect.h b/include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect.h
deleted file mode 100644
index bea699aa480e..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/* Interrupt vector numbers autogenerated by ../../../tools/rdesc/bin/rdes2intr
2 from intr_vect.r */
3
4#ifndef _INTR_VECT_R
5#define _INTR_VECT_R
6#define TIMER0_INTR_VECT 0x31
7#define TIMER1_INTR_VECT 0x32
8#define DMA0_INTR_VECT 0x33
9#define DMA1_INTR_VECT 0x34
10#define DMA2_INTR_VECT 0x35
11#define DMA3_INTR_VECT 0x36
12#define DMA4_INTR_VECT 0x37
13#define DMA5_INTR_VECT 0x38
14#define DMA6_INTR_VECT 0x39
15#define DMA7_INTR_VECT 0x3a
16#define DMA9_INTR_VECT 0x3b
17#define DMA11_INTR_VECT 0x3c
18#define GIO_INTR_VECT 0x3d
19#define IOP0_INTR_VECT 0x3e
20#define IOP1_INTR_VECT 0x3f
21#define SER0_INTR_VECT 0x40
22#define SER1_INTR_VECT 0x41
23#define SER2_INTR_VECT 0x42
24#define SER3_INTR_VECT 0x43
25#define SER4_INTR_VECT 0x44
26#define SSER_INTR_VECT 0x45
27#define STRDMA0_INTR_VECT 0x46
28#define STRDMA1_INTR_VECT 0x47
29#define STRDMA2_INTR_VECT 0x48
30#define STRDMA3_INTR_VECT 0x49
31#define STRDMA5_INTR_VECT 0x4a
32#define VIN_INTR_VECT 0x4b
33#define VOUT_INTR_VECT 0x4c
34#define JPEG_INTR_VECT 0x4d
35#define H264_INTR_VECT 0x4e
36#define HISTO_INTR_VECT 0x4f
37#define CCD_INTR_VECT 0x50
38#define ETH_INTR_VECT 0x51
39#define MEMARB_BAR_INTR_VECT 0x52
40#define MEMARB_FOO_INTR_VECT 0x53
41#define PIO_INTR_VECT 0x54
42#define SCLR_INTR_VECT 0x55
43#define SCLR_FIFO_INTR_VECT 0x56
44#define IPI_INTR_VECT 0x57
45#define NBR_INTR_VECT 0x58
46#endif
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect_defs.h
deleted file mode 100644
index b820f6347c74..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect_defs.h
+++ /dev/null
@@ -1,341 +0,0 @@
1#ifndef __intr_vect_defs_h
2#define __intr_vect_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: intr_vect.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile intr_vect_defs.h intr_vect.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope intr_vect */
83
84
85#define STRIDE_intr_vect_rw_mask 4
86/* Register rw_mask0, scope intr_vect, type rw */
87typedef struct {
88 unsigned int timer0 : 1;
89 unsigned int timer1 : 1;
90 unsigned int dma0 : 1;
91 unsigned int dma1 : 1;
92 unsigned int dma2 : 1;
93 unsigned int dma3 : 1;
94 unsigned int dma4 : 1;
95 unsigned int dma5 : 1;
96 unsigned int dma6 : 1;
97 unsigned int dma7 : 1;
98 unsigned int dma9 : 1;
99 unsigned int dma11 : 1;
100 unsigned int gio : 1;
101 unsigned int iop0 : 1;
102 unsigned int iop1 : 1;
103 unsigned int ser0 : 1;
104 unsigned int ser1 : 1;
105 unsigned int ser2 : 1;
106 unsigned int ser3 : 1;
107 unsigned int ser4 : 1;
108 unsigned int sser : 1;
109 unsigned int strdma0 : 1;
110 unsigned int strdma1 : 1;
111 unsigned int strdma2 : 1;
112 unsigned int strdma3 : 1;
113 unsigned int strdma5 : 1;
114 unsigned int vin : 1;
115 unsigned int vout : 1;
116 unsigned int jpeg : 1;
117 unsigned int h264 : 1;
118 unsigned int histo : 1;
119 unsigned int ccd : 1;
120} reg_intr_vect_rw_mask0;
121#define reg_intr_vect_rw_mask reg_intr_vect_rw_mask0
122#define REG_RD_ADDR_intr_vect_rw_mask 0
123#define REG_WR_ADDR_intr_vect_rw_mask 0
124#define REG_RD_ADDR_intr_vect_rw_mask0 0
125#define REG_WR_ADDR_intr_vect_rw_mask0 0
126
127#define STRIDE_intr_vect_r_vect 4
128/* Register r_vect0, scope intr_vect, type r */
129typedef struct {
130 unsigned int timer0 : 1;
131 unsigned int timer1 : 1;
132 unsigned int dma0 : 1;
133 unsigned int dma1 : 1;
134 unsigned int dma2 : 1;
135 unsigned int dma3 : 1;
136 unsigned int dma4 : 1;
137 unsigned int dma5 : 1;
138 unsigned int dma6 : 1;
139 unsigned int dma7 : 1;
140 unsigned int dma9 : 1;
141 unsigned int dma11 : 1;
142 unsigned int gio : 1;
143 unsigned int iop0 : 1;
144 unsigned int iop1 : 1;
145 unsigned int ser0 : 1;
146 unsigned int ser1 : 1;
147 unsigned int ser2 : 1;
148 unsigned int ser3 : 1;
149 unsigned int ser4 : 1;
150 unsigned int sser : 1;
151 unsigned int strdma0 : 1;
152 unsigned int strdma1 : 1;
153 unsigned int strdma2 : 1;
154 unsigned int strdma3 : 1;
155 unsigned int strdma5 : 1;
156 unsigned int vin : 1;
157 unsigned int vout : 1;
158 unsigned int jpeg : 1;
159 unsigned int h264 : 1;
160 unsigned int histo : 1;
161 unsigned int ccd : 1;
162} reg_intr_vect_r_vect0;
163#define reg_intr_vect_r_vect reg_intr_vect_r_vect0
164#define REG_RD_ADDR_intr_vect_r_vect 8
165#define REG_RD_ADDR_intr_vect_r_vect0 8
166
167#define STRIDE_intr_vect_r_masked_vect 4
168/* Register r_masked_vect0, scope intr_vect, type r */
169typedef struct {
170 unsigned int timer0 : 1;
171 unsigned int timer1 : 1;
172 unsigned int dma0 : 1;
173 unsigned int dma1 : 1;
174 unsigned int dma2 : 1;
175 unsigned int dma3 : 1;
176 unsigned int dma4 : 1;
177 unsigned int dma5 : 1;
178 unsigned int dma6 : 1;
179 unsigned int dma7 : 1;
180 unsigned int dma9 : 1;
181 unsigned int dma11 : 1;
182 unsigned int gio : 1;
183 unsigned int iop0 : 1;
184 unsigned int iop1 : 1;
185 unsigned int ser0 : 1;
186 unsigned int ser1 : 1;
187 unsigned int ser2 : 1;
188 unsigned int ser3 : 1;
189 unsigned int ser4 : 1;
190 unsigned int sser : 1;
191 unsigned int strdma0 : 1;
192 unsigned int strdma1 : 1;
193 unsigned int strdma2 : 1;
194 unsigned int strdma3 : 1;
195 unsigned int strdma5 : 1;
196 unsigned int vin : 1;
197 unsigned int vout : 1;
198 unsigned int jpeg : 1;
199 unsigned int h264 : 1;
200 unsigned int histo : 1;
201 unsigned int ccd : 1;
202} reg_intr_vect_r_masked_vect0;
203#define reg_intr_vect_r_masked_vect reg_intr_masked_vect_r_vect0
204#define REG_RD_ADDR_intr_vect_r_masked_vect0 16
205#define REG_RD_ADDR_intr_vect_r_masked_vect 16
206
207#define STRIDE_intr_vect_rw_xmask 4
208/* Register rw_xmask0, scope intr_vect, type rw */
209typedef struct {
210 unsigned int timer0 : 1;
211 unsigned int timer1 : 1;
212 unsigned int dma0 : 1;
213 unsigned int dma1 : 1;
214 unsigned int dma2 : 1;
215 unsigned int dma3 : 1;
216 unsigned int dma4 : 1;
217 unsigned int dma5 : 1;
218 unsigned int dma6 : 1;
219 unsigned int dma7 : 1;
220 unsigned int dma9 : 1;
221 unsigned int dma11 : 1;
222 unsigned int gio : 1;
223 unsigned int iop0 : 1;
224 unsigned int iop1 : 1;
225 unsigned int ser0 : 1;
226 unsigned int ser1 : 1;
227 unsigned int ser2 : 1;
228 unsigned int ser3 : 1;
229 unsigned int ser4 : 1;
230 unsigned int sser : 1;
231 unsigned int strdma0 : 1;
232 unsigned int strdma1 : 1;
233 unsigned int strdma2 : 1;
234 unsigned int strdma3 : 1;
235 unsigned int strdma5 : 1;
236 unsigned int vin : 1;
237 unsigned int vout : 1;
238 unsigned int jpeg : 1;
239 unsigned int h264 : 1;
240 unsigned int histo : 1;
241 unsigned int ccd : 1;
242} reg_intr_vect_rw_xmask0;
243#define reg_intr_vect_rw_xmask reg_intr_vect_rw_xmask0
244#define REG_RD_ADDR_intr_vect_rw_xmask0 24
245#define REG_WR_ADDR_intr_vect_rw_xmask0 24
246#define REG_RD_ADDR_intr_vect_rw_xmask 24
247#define REG_WR_ADDR_intr_vect_rw_xmask 24
248
249/* Register rw_mask1, scope intr_vect, type rw */
250typedef struct {
251 unsigned int eth : 1;
252 unsigned int memarb_bar : 1;
253 unsigned int memarb_foo : 1;
254 unsigned int pio : 1;
255 unsigned int sclr : 1;
256 unsigned int sclr_fifo : 1;
257 unsigned int dummy1 : 26;
258} reg_intr_vect_rw_mask1;
259#define REG_RD_ADDR_intr_vect_rw_mask1 4
260#define REG_WR_ADDR_intr_vect_rw_mask1 4
261
262/* Register r_vect1, scope intr_vect, type r */
263typedef struct {
264 unsigned int eth : 1;
265 unsigned int memarb_bar : 1;
266 unsigned int memarb_foo : 1;
267 unsigned int pio : 1;
268 unsigned int sclr : 1;
269 unsigned int sclr_fifo : 1;
270 unsigned int dummy1 : 26;
271} reg_intr_vect_r_vect1;
272#define REG_RD_ADDR_intr_vect_r_vect1 12
273
274/* Register r_masked_vect1, scope intr_vect, type r */
275typedef struct {
276 unsigned int eth : 1;
277 unsigned int memarb_bar : 1;
278 unsigned int memarb_foo : 1;
279 unsigned int pio : 1;
280 unsigned int sclr : 1;
281 unsigned int sclr_fifo : 1;
282 unsigned int dummy1 : 26;
283} reg_intr_vect_r_masked_vect1;
284#define REG_RD_ADDR_intr_vect_r_masked_vect1 20
285
286/* Register rw_xmask1, scope intr_vect, type rw */
287typedef struct {
288 unsigned int eth : 1;
289 unsigned int memarb_bar : 1;
290 unsigned int memarb_foo : 1;
291 unsigned int pio : 1;
292 unsigned int sclr : 1;
293 unsigned int sclr_fifo : 1;
294 unsigned int dummy1 : 26;
295} reg_intr_vect_rw_xmask1;
296#define REG_RD_ADDR_intr_vect_rw_xmask1 28
297#define REG_WR_ADDR_intr_vect_rw_xmask1 28
298
299/* Register rw_xmask_ctrl, scope intr_vect, type rw */
300typedef struct {
301 unsigned int en : 1;
302 unsigned int dummy1 : 31;
303} reg_intr_vect_rw_xmask_ctrl;
304#define REG_RD_ADDR_intr_vect_rw_xmask_ctrl 32
305#define REG_WR_ADDR_intr_vect_rw_xmask_ctrl 32
306
307/* Register r_nmi, scope intr_vect, type r */
308typedef struct {
309 unsigned int watchdog0 : 1;
310 unsigned int watchdog1 : 1;
311 unsigned int dummy1 : 30;
312} reg_intr_vect_r_nmi;
313#define REG_RD_ADDR_intr_vect_r_nmi 64
314
315/* Register r_guru, scope intr_vect, type r */
316typedef struct {
317 unsigned int jtag : 1;
318 unsigned int dummy1 : 31;
319} reg_intr_vect_r_guru;
320#define REG_RD_ADDR_intr_vect_r_guru 68
321
322
323/* Register rw_ipi, scope intr_vect, type rw */
324typedef struct
325{
326 unsigned int vector;
327} reg_intr_vect_rw_ipi;
328#define REG_RD_ADDR_intr_vect_rw_ipi 72
329#define REG_WR_ADDR_intr_vect_rw_ipi 72
330
331/* Constants */
332enum {
333 regk_intr_vect_no = 0x00000000,
334 regk_intr_vect_rw_mask0_default = 0x00000000,
335 regk_intr_vect_rw_mask1_default = 0x00000000,
336 regk_intr_vect_rw_xmask0_default = 0x00000000,
337 regk_intr_vect_rw_xmask1_default = 0x00000000,
338 regk_intr_vect_rw_xmask_ctrl_default = 0x00000000,
339 regk_intr_vect_yes = 0x00000001
340};
341#endif /* __intr_vect_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_reg_space_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_reg_space_asm.h
deleted file mode 100644
index d75a74e90458..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_reg_space_asm.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* Autogenerated Changes here will be lost!
2 * generated by ./gen_sw.pl Wed Feb 14 09:27:48 2007 iop_sw.cfg
3 */
4#define iop_version 0
5#define iop_fifo_in_extra 64
6#define iop_fifo_out_extra 128
7#define iop_trigger_grp0 192
8#define iop_trigger_grp1 256
9#define iop_trigger_grp2 320
10#define iop_trigger_grp3 384
11#define iop_trigger_grp4 448
12#define iop_trigger_grp5 512
13#define iop_trigger_grp6 576
14#define iop_trigger_grp7 640
15#define iop_crc_par 768
16#define iop_dmc_in 896
17#define iop_dmc_out 1024
18#define iop_fifo_in 1152
19#define iop_fifo_out 1280
20#define iop_scrc_in 1408
21#define iop_scrc_out 1536
22#define iop_timer_grp0 1664
23#define iop_timer_grp1 1792
24#define iop_sap_in 2048
25#define iop_sap_out 2304
26#define iop_spu 2560
27#define iop_sw_cfg 2816
28#define iop_sw_cpu 3072
29#define iop_sw_mpu 3328
30#define iop_sw_spu 3584
31#define iop_mpu 4096
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_in_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_in_defs_asm.h
deleted file mode 100644
index 7f90b5a0460d..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_in_defs_asm.h
+++ /dev/null
@@ -1,109 +0,0 @@
1#ifndef __iop_sap_in_defs_asm_h
2#define __iop_sap_in_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sap_in.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_sap_in_defs_asm.h iop_sap_in.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53#define STRIDE_iop_sap_in_rw_bus_byte 4
54/* Register rw_bus_byte, scope iop_sap_in, type rw */
55#define reg_iop_sap_in_rw_bus_byte___sync_sel___lsb 0
56#define reg_iop_sap_in_rw_bus_byte___sync_sel___width 2
57#define reg_iop_sap_in_rw_bus_byte___sync_ext_src___lsb 2
58#define reg_iop_sap_in_rw_bus_byte___sync_ext_src___width 3
59#define reg_iop_sap_in_rw_bus_byte___sync_edge___lsb 5
60#define reg_iop_sap_in_rw_bus_byte___sync_edge___width 2
61#define reg_iop_sap_in_rw_bus_byte___delay___lsb 7
62#define reg_iop_sap_in_rw_bus_byte___delay___width 2
63#define reg_iop_sap_in_rw_bus_byte_offset 0
64
65#define STRIDE_iop_sap_in_rw_gio 4
66/* Register rw_gio, scope iop_sap_in, type rw */
67#define reg_iop_sap_in_rw_gio___sync_sel___lsb 0
68#define reg_iop_sap_in_rw_gio___sync_sel___width 2
69#define reg_iop_sap_in_rw_gio___sync_ext_src___lsb 2
70#define reg_iop_sap_in_rw_gio___sync_ext_src___width 3
71#define reg_iop_sap_in_rw_gio___sync_edge___lsb 5
72#define reg_iop_sap_in_rw_gio___sync_edge___width 2
73#define reg_iop_sap_in_rw_gio___delay___lsb 7
74#define reg_iop_sap_in_rw_gio___delay___width 2
75#define reg_iop_sap_in_rw_gio___logic___lsb 9
76#define reg_iop_sap_in_rw_gio___logic___width 2
77#define reg_iop_sap_in_rw_gio_offset 16
78
79
80/* Constants */
81#define regk_iop_sap_in_and 0x00000002
82#define regk_iop_sap_in_ext_clk200 0x00000003
83#define regk_iop_sap_in_gio0 0x00000000
84#define regk_iop_sap_in_gio12 0x00000003
85#define regk_iop_sap_in_gio16 0x00000004
86#define regk_iop_sap_in_gio20 0x00000005
87#define regk_iop_sap_in_gio24 0x00000006
88#define regk_iop_sap_in_gio28 0x00000007
89#define regk_iop_sap_in_gio4 0x00000001
90#define regk_iop_sap_in_gio8 0x00000002
91#define regk_iop_sap_in_inv 0x00000001
92#define regk_iop_sap_in_neg 0x00000002
93#define regk_iop_sap_in_no 0x00000000
94#define regk_iop_sap_in_no_del_ext_clk200 0x00000002
95#define regk_iop_sap_in_none 0x00000000
96#define regk_iop_sap_in_one 0x00000001
97#define regk_iop_sap_in_or 0x00000003
98#define regk_iop_sap_in_pos 0x00000001
99#define regk_iop_sap_in_pos_neg 0x00000003
100#define regk_iop_sap_in_rw_bus_byte_default 0x00000000
101#define regk_iop_sap_in_rw_bus_byte_size 0x00000004
102#define regk_iop_sap_in_rw_gio_default 0x00000000
103#define regk_iop_sap_in_rw_gio_size 0x00000020
104#define regk_iop_sap_in_timer_grp0_tmr3 0x00000000
105#define regk_iop_sap_in_timer_grp1_tmr3 0x00000001
106#define regk_iop_sap_in_tmr_clk200 0x00000001
107#define regk_iop_sap_in_two 0x00000002
108#define regk_iop_sap_in_two_clk200 0x00000000
109#endif /* __iop_sap_in_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_out_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_out_defs_asm.h
deleted file mode 100644
index 399bd656406b..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_out_defs_asm.h
+++ /dev/null
@@ -1,276 +0,0 @@
1#ifndef __iop_sap_out_defs_asm_h
2#define __iop_sap_out_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sap_out.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_sap_out_defs_asm.h iop_sap_out.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_gen_gated, scope iop_sap_out, type rw */
54#define reg_iop_sap_out_rw_gen_gated___clk0_src___lsb 0
55#define reg_iop_sap_out_rw_gen_gated___clk0_src___width 2
56#define reg_iop_sap_out_rw_gen_gated___clk0_gate_src___lsb 2
57#define reg_iop_sap_out_rw_gen_gated___clk0_gate_src___width 2
58#define reg_iop_sap_out_rw_gen_gated___clk0_force_src___lsb 4
59#define reg_iop_sap_out_rw_gen_gated___clk0_force_src___width 3
60#define reg_iop_sap_out_rw_gen_gated___clk1_src___lsb 7
61#define reg_iop_sap_out_rw_gen_gated___clk1_src___width 2
62#define reg_iop_sap_out_rw_gen_gated___clk1_gate_src___lsb 9
63#define reg_iop_sap_out_rw_gen_gated___clk1_gate_src___width 2
64#define reg_iop_sap_out_rw_gen_gated___clk1_force_src___lsb 11
65#define reg_iop_sap_out_rw_gen_gated___clk1_force_src___width 3
66#define reg_iop_sap_out_rw_gen_gated_offset 0
67
68/* Register rw_bus, scope iop_sap_out, type rw */
69#define reg_iop_sap_out_rw_bus___byte0_clk_sel___lsb 0
70#define reg_iop_sap_out_rw_bus___byte0_clk_sel___width 2
71#define reg_iop_sap_out_rw_bus___byte0_clk_ext___lsb 2
72#define reg_iop_sap_out_rw_bus___byte0_clk_ext___width 2
73#define reg_iop_sap_out_rw_bus___byte0_gated_clk___lsb 4
74#define reg_iop_sap_out_rw_bus___byte0_gated_clk___width 1
75#define reg_iop_sap_out_rw_bus___byte0_gated_clk___bit 4
76#define reg_iop_sap_out_rw_bus___byte0_clk_inv___lsb 5
77#define reg_iop_sap_out_rw_bus___byte0_clk_inv___width 1
78#define reg_iop_sap_out_rw_bus___byte0_clk_inv___bit 5
79#define reg_iop_sap_out_rw_bus___byte0_delay___lsb 6
80#define reg_iop_sap_out_rw_bus___byte0_delay___width 1
81#define reg_iop_sap_out_rw_bus___byte0_delay___bit 6
82#define reg_iop_sap_out_rw_bus___byte1_clk_sel___lsb 7
83#define reg_iop_sap_out_rw_bus___byte1_clk_sel___width 2
84#define reg_iop_sap_out_rw_bus___byte1_clk_ext___lsb 9
85#define reg_iop_sap_out_rw_bus___byte1_clk_ext___width 2
86#define reg_iop_sap_out_rw_bus___byte1_gated_clk___lsb 11
87#define reg_iop_sap_out_rw_bus___byte1_gated_clk___width 1
88#define reg_iop_sap_out_rw_bus___byte1_gated_clk___bit 11
89#define reg_iop_sap_out_rw_bus___byte1_clk_inv___lsb 12
90#define reg_iop_sap_out_rw_bus___byte1_clk_inv___width 1
91#define reg_iop_sap_out_rw_bus___byte1_clk_inv___bit 12
92#define reg_iop_sap_out_rw_bus___byte1_delay___lsb 13
93#define reg_iop_sap_out_rw_bus___byte1_delay___width 1
94#define reg_iop_sap_out_rw_bus___byte1_delay___bit 13
95#define reg_iop_sap_out_rw_bus___byte2_clk_sel___lsb 14
96#define reg_iop_sap_out_rw_bus___byte2_clk_sel___width 2
97#define reg_iop_sap_out_rw_bus___byte2_clk_ext___lsb 16
98#define reg_iop_sap_out_rw_bus___byte2_clk_ext___width 2
99#define reg_iop_sap_out_rw_bus___byte2_gated_clk___lsb 18
100#define reg_iop_sap_out_rw_bus___byte2_gated_clk___width 1
101#define reg_iop_sap_out_rw_bus___byte2_gated_clk___bit 18
102#define reg_iop_sap_out_rw_bus___byte2_clk_inv___lsb 19
103#define reg_iop_sap_out_rw_bus___byte2_clk_inv___width 1
104#define reg_iop_sap_out_rw_bus___byte2_clk_inv___bit 19
105#define reg_iop_sap_out_rw_bus___byte2_delay___lsb 20
106#define reg_iop_sap_out_rw_bus___byte2_delay___width 1
107#define reg_iop_sap_out_rw_bus___byte2_delay___bit 20
108#define reg_iop_sap_out_rw_bus___byte3_clk_sel___lsb 21
109#define reg_iop_sap_out_rw_bus___byte3_clk_sel___width 2
110#define reg_iop_sap_out_rw_bus___byte3_clk_ext___lsb 23
111#define reg_iop_sap_out_rw_bus___byte3_clk_ext___width 2
112#define reg_iop_sap_out_rw_bus___byte3_gated_clk___lsb 25
113#define reg_iop_sap_out_rw_bus___byte3_gated_clk___width 1
114#define reg_iop_sap_out_rw_bus___byte3_gated_clk___bit 25
115#define reg_iop_sap_out_rw_bus___byte3_clk_inv___lsb 26
116#define reg_iop_sap_out_rw_bus___byte3_clk_inv___width 1
117#define reg_iop_sap_out_rw_bus___byte3_clk_inv___bit 26
118#define reg_iop_sap_out_rw_bus___byte3_delay___lsb 27
119#define reg_iop_sap_out_rw_bus___byte3_delay___width 1
120#define reg_iop_sap_out_rw_bus___byte3_delay___bit 27
121#define reg_iop_sap_out_rw_bus_offset 4
122
123/* Register rw_bus_lo_oe, scope iop_sap_out, type rw */
124#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_sel___lsb 0
125#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_sel___width 2
126#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_ext___lsb 2
127#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_ext___width 2
128#define reg_iop_sap_out_rw_bus_lo_oe___byte0_gated_clk___lsb 4
129#define reg_iop_sap_out_rw_bus_lo_oe___byte0_gated_clk___width 1
130#define reg_iop_sap_out_rw_bus_lo_oe___byte0_gated_clk___bit 4
131#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_inv___lsb 5
132#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_inv___width 1
133#define reg_iop_sap_out_rw_bus_lo_oe___byte0_clk_inv___bit 5
134#define reg_iop_sap_out_rw_bus_lo_oe___byte0_delay___lsb 6
135#define reg_iop_sap_out_rw_bus_lo_oe___byte0_delay___width 1
136#define reg_iop_sap_out_rw_bus_lo_oe___byte0_delay___bit 6
137#define reg_iop_sap_out_rw_bus_lo_oe___byte0_logic___lsb 7
138#define reg_iop_sap_out_rw_bus_lo_oe___byte0_logic___width 2
139#define reg_iop_sap_out_rw_bus_lo_oe___byte0_logic_src___lsb 9
140#define reg_iop_sap_out_rw_bus_lo_oe___byte0_logic_src___width 2
141#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_sel___lsb 11
142#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_sel___width 2
143#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_ext___lsb 13
144#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_ext___width 2
145#define reg_iop_sap_out_rw_bus_lo_oe___byte1_gated_clk___lsb 15
146#define reg_iop_sap_out_rw_bus_lo_oe___byte1_gated_clk___width 1
147#define reg_iop_sap_out_rw_bus_lo_oe___byte1_gated_clk___bit 15
148#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_inv___lsb 16
149#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_inv___width 1
150#define reg_iop_sap_out_rw_bus_lo_oe___byte1_clk_inv___bit 16
151#define reg_iop_sap_out_rw_bus_lo_oe___byte1_delay___lsb 17
152#define reg_iop_sap_out_rw_bus_lo_oe___byte1_delay___width 1
153#define reg_iop_sap_out_rw_bus_lo_oe___byte1_delay___bit 17
154#define reg_iop_sap_out_rw_bus_lo_oe___byte1_logic___lsb 18
155#define reg_iop_sap_out_rw_bus_lo_oe___byte1_logic___width 2
156#define reg_iop_sap_out_rw_bus_lo_oe___byte1_logic_src___lsb 20
157#define reg_iop_sap_out_rw_bus_lo_oe___byte1_logic_src___width 2
158#define reg_iop_sap_out_rw_bus_lo_oe_offset 8
159
160/* Register rw_bus_hi_oe, scope iop_sap_out, type rw */
161#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_sel___lsb 0
162#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_sel___width 2
163#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_ext___lsb 2
164#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_ext___width 2
165#define reg_iop_sap_out_rw_bus_hi_oe___byte2_gated_clk___lsb 4
166#define reg_iop_sap_out_rw_bus_hi_oe___byte2_gated_clk___width 1
167#define reg_iop_sap_out_rw_bus_hi_oe___byte2_gated_clk___bit 4
168#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_inv___lsb 5
169#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_inv___width 1
170#define reg_iop_sap_out_rw_bus_hi_oe___byte2_clk_inv___bit 5
171#define reg_iop_sap_out_rw_bus_hi_oe___byte2_delay___lsb 6
172#define reg_iop_sap_out_rw_bus_hi_oe___byte2_delay___width 1
173#define reg_iop_sap_out_rw_bus_hi_oe___byte2_delay___bit 6
174#define reg_iop_sap_out_rw_bus_hi_oe___byte2_logic___lsb 7
175#define reg_iop_sap_out_rw_bus_hi_oe___byte2_logic___width 2
176#define reg_iop_sap_out_rw_bus_hi_oe___byte2_logic_src___lsb 9
177#define reg_iop_sap_out_rw_bus_hi_oe___byte2_logic_src___width 2
178#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_sel___lsb 11
179#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_sel___width 2
180#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_ext___lsb 13
181#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_ext___width 2
182#define reg_iop_sap_out_rw_bus_hi_oe___byte3_gated_clk___lsb 15
183#define reg_iop_sap_out_rw_bus_hi_oe___byte3_gated_clk___width 1
184#define reg_iop_sap_out_rw_bus_hi_oe___byte3_gated_clk___bit 15
185#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_inv___lsb 16
186#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_inv___width 1
187#define reg_iop_sap_out_rw_bus_hi_oe___byte3_clk_inv___bit 16
188#define reg_iop_sap_out_rw_bus_hi_oe___byte3_delay___lsb 17
189#define reg_iop_sap_out_rw_bus_hi_oe___byte3_delay___width 1
190#define reg_iop_sap_out_rw_bus_hi_oe___byte3_delay___bit 17
191#define reg_iop_sap_out_rw_bus_hi_oe___byte3_logic___lsb 18
192#define reg_iop_sap_out_rw_bus_hi_oe___byte3_logic___width 2
193#define reg_iop_sap_out_rw_bus_hi_oe___byte3_logic_src___lsb 20
194#define reg_iop_sap_out_rw_bus_hi_oe___byte3_logic_src___width 2
195#define reg_iop_sap_out_rw_bus_hi_oe_offset 12
196
197#define STRIDE_iop_sap_out_rw_gio 4
198/* Register rw_gio, scope iop_sap_out, type rw */
199#define reg_iop_sap_out_rw_gio___out_clk_sel___lsb 0
200#define reg_iop_sap_out_rw_gio___out_clk_sel___width 3
201#define reg_iop_sap_out_rw_gio___out_clk_ext___lsb 3
202#define reg_iop_sap_out_rw_gio___out_clk_ext___width 2
203#define reg_iop_sap_out_rw_gio___out_gated_clk___lsb 5
204#define reg_iop_sap_out_rw_gio___out_gated_clk___width 1
205#define reg_iop_sap_out_rw_gio___out_gated_clk___bit 5
206#define reg_iop_sap_out_rw_gio___out_clk_inv___lsb 6
207#define reg_iop_sap_out_rw_gio___out_clk_inv___width 1
208#define reg_iop_sap_out_rw_gio___out_clk_inv___bit 6
209#define reg_iop_sap_out_rw_gio___out_delay___lsb 7
210#define reg_iop_sap_out_rw_gio___out_delay___width 1
211#define reg_iop_sap_out_rw_gio___out_delay___bit 7
212#define reg_iop_sap_out_rw_gio___out_logic___lsb 8
213#define reg_iop_sap_out_rw_gio___out_logic___width 2
214#define reg_iop_sap_out_rw_gio___out_logic_src___lsb 10
215#define reg_iop_sap_out_rw_gio___out_logic_src___width 2
216#define reg_iop_sap_out_rw_gio___oe_clk_sel___lsb 12
217#define reg_iop_sap_out_rw_gio___oe_clk_sel___width 3
218#define reg_iop_sap_out_rw_gio___oe_clk_ext___lsb 15
219#define reg_iop_sap_out_rw_gio___oe_clk_ext___width 2
220#define reg_iop_sap_out_rw_gio___oe_gated_clk___lsb 17
221#define reg_iop_sap_out_rw_gio___oe_gated_clk___width 1
222#define reg_iop_sap_out_rw_gio___oe_gated_clk___bit 17
223#define reg_iop_sap_out_rw_gio___oe_clk_inv___lsb 18
224#define reg_iop_sap_out_rw_gio___oe_clk_inv___width 1
225#define reg_iop_sap_out_rw_gio___oe_clk_inv___bit 18
226#define reg_iop_sap_out_rw_gio___oe_delay___lsb 19
227#define reg_iop_sap_out_rw_gio___oe_delay___width 1
228#define reg_iop_sap_out_rw_gio___oe_delay___bit 19
229#define reg_iop_sap_out_rw_gio___oe_logic___lsb 20
230#define reg_iop_sap_out_rw_gio___oe_logic___width 2
231#define reg_iop_sap_out_rw_gio___oe_logic_src___lsb 22
232#define reg_iop_sap_out_rw_gio___oe_logic_src___width 2
233#define reg_iop_sap_out_rw_gio_offset 16
234
235
236/* Constants */
237#define regk_iop_sap_out_always 0x00000001
238#define regk_iop_sap_out_and 0x00000002
239#define regk_iop_sap_out_clk0 0x00000000
240#define regk_iop_sap_out_clk1 0x00000001
241#define regk_iop_sap_out_clk12 0x00000004
242#define regk_iop_sap_out_clk200 0x00000000
243#define regk_iop_sap_out_ext 0x00000002
244#define regk_iop_sap_out_gated 0x00000003
245#define regk_iop_sap_out_gio0 0x00000000
246#define regk_iop_sap_out_gio1 0x00000000
247#define regk_iop_sap_out_gio16 0x00000002
248#define regk_iop_sap_out_gio17 0x00000002
249#define regk_iop_sap_out_gio24 0x00000003
250#define regk_iop_sap_out_gio25 0x00000003
251#define regk_iop_sap_out_gio8 0x00000001
252#define regk_iop_sap_out_gio9 0x00000001
253#define regk_iop_sap_out_gio_out10 0x00000005
254#define regk_iop_sap_out_gio_out18 0x00000006
255#define regk_iop_sap_out_gio_out2 0x00000004
256#define regk_iop_sap_out_gio_out26 0x00000007
257#define regk_iop_sap_out_inv 0x00000001
258#define regk_iop_sap_out_nand 0x00000003
259#define regk_iop_sap_out_no 0x00000000
260#define regk_iop_sap_out_none 0x00000000
261#define regk_iop_sap_out_one 0x00000001
262#define regk_iop_sap_out_rw_bus_default 0x00000000
263#define regk_iop_sap_out_rw_bus_hi_oe_default 0x00000000
264#define regk_iop_sap_out_rw_bus_lo_oe_default 0x00000000
265#define regk_iop_sap_out_rw_gen_gated_default 0x00000000
266#define regk_iop_sap_out_rw_gio_default 0x00000000
267#define regk_iop_sap_out_rw_gio_size 0x00000020
268#define regk_iop_sap_out_spu_gio6 0x00000002
269#define regk_iop_sap_out_spu_gio7 0x00000003
270#define regk_iop_sap_out_timer_grp0_tmr2 0x00000000
271#define regk_iop_sap_out_timer_grp0_tmr3 0x00000001
272#define regk_iop_sap_out_timer_grp1_tmr2 0x00000002
273#define regk_iop_sap_out_timer_grp1_tmr3 0x00000003
274#define regk_iop_sap_out_tmr200 0x00000001
275#define regk_iop_sap_out_yes 0x00000001
276#endif /* __iop_sap_out_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cfg_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
deleted file mode 100644
index 3b3949b51a66..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
+++ /dev/null
@@ -1,739 +0,0 @@
1#ifndef __iop_sw_cfg_defs_asm_h
2#define __iop_sw_cfg_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_cfg.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_sw_cfg_defs_asm.h iop_sw_cfg.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_crc_par_owner, scope iop_sw_cfg, type rw */
54#define reg_iop_sw_cfg_rw_crc_par_owner___cfg___lsb 0
55#define reg_iop_sw_cfg_rw_crc_par_owner___cfg___width 2
56#define reg_iop_sw_cfg_rw_crc_par_owner_offset 0
57
58/* Register rw_dmc_in_owner, scope iop_sw_cfg, type rw */
59#define reg_iop_sw_cfg_rw_dmc_in_owner___cfg___lsb 0
60#define reg_iop_sw_cfg_rw_dmc_in_owner___cfg___width 2
61#define reg_iop_sw_cfg_rw_dmc_in_owner_offset 4
62
63/* Register rw_dmc_out_owner, scope iop_sw_cfg, type rw */
64#define reg_iop_sw_cfg_rw_dmc_out_owner___cfg___lsb 0
65#define reg_iop_sw_cfg_rw_dmc_out_owner___cfg___width 2
66#define reg_iop_sw_cfg_rw_dmc_out_owner_offset 8
67
68/* Register rw_fifo_in_owner, scope iop_sw_cfg, type rw */
69#define reg_iop_sw_cfg_rw_fifo_in_owner___cfg___lsb 0
70#define reg_iop_sw_cfg_rw_fifo_in_owner___cfg___width 2
71#define reg_iop_sw_cfg_rw_fifo_in_owner_offset 12
72
73/* Register rw_fifo_in_extra_owner, scope iop_sw_cfg, type rw */
74#define reg_iop_sw_cfg_rw_fifo_in_extra_owner___cfg___lsb 0
75#define reg_iop_sw_cfg_rw_fifo_in_extra_owner___cfg___width 2
76#define reg_iop_sw_cfg_rw_fifo_in_extra_owner_offset 16
77
78/* Register rw_fifo_out_owner, scope iop_sw_cfg, type rw */
79#define reg_iop_sw_cfg_rw_fifo_out_owner___cfg___lsb 0
80#define reg_iop_sw_cfg_rw_fifo_out_owner___cfg___width 2
81#define reg_iop_sw_cfg_rw_fifo_out_owner_offset 20
82
83/* Register rw_fifo_out_extra_owner, scope iop_sw_cfg, type rw */
84#define reg_iop_sw_cfg_rw_fifo_out_extra_owner___cfg___lsb 0
85#define reg_iop_sw_cfg_rw_fifo_out_extra_owner___cfg___width 2
86#define reg_iop_sw_cfg_rw_fifo_out_extra_owner_offset 24
87
88/* Register rw_sap_in_owner, scope iop_sw_cfg, type rw */
89#define reg_iop_sw_cfg_rw_sap_in_owner___cfg___lsb 0
90#define reg_iop_sw_cfg_rw_sap_in_owner___cfg___width 2
91#define reg_iop_sw_cfg_rw_sap_in_owner_offset 28
92
93/* Register rw_sap_out_owner, scope iop_sw_cfg, type rw */
94#define reg_iop_sw_cfg_rw_sap_out_owner___cfg___lsb 0
95#define reg_iop_sw_cfg_rw_sap_out_owner___cfg___width 2
96#define reg_iop_sw_cfg_rw_sap_out_owner_offset 32
97
98/* Register rw_scrc_in_owner, scope iop_sw_cfg, type rw */
99#define reg_iop_sw_cfg_rw_scrc_in_owner___cfg___lsb 0
100#define reg_iop_sw_cfg_rw_scrc_in_owner___cfg___width 2
101#define reg_iop_sw_cfg_rw_scrc_in_owner_offset 36
102
103/* Register rw_scrc_out_owner, scope iop_sw_cfg, type rw */
104#define reg_iop_sw_cfg_rw_scrc_out_owner___cfg___lsb 0
105#define reg_iop_sw_cfg_rw_scrc_out_owner___cfg___width 2
106#define reg_iop_sw_cfg_rw_scrc_out_owner_offset 40
107
108/* Register rw_spu_owner, scope iop_sw_cfg, type rw */
109#define reg_iop_sw_cfg_rw_spu_owner___cfg___lsb 0
110#define reg_iop_sw_cfg_rw_spu_owner___cfg___width 1
111#define reg_iop_sw_cfg_rw_spu_owner___cfg___bit 0
112#define reg_iop_sw_cfg_rw_spu_owner_offset 44
113
114/* Register rw_timer_grp0_owner, scope iop_sw_cfg, type rw */
115#define reg_iop_sw_cfg_rw_timer_grp0_owner___cfg___lsb 0
116#define reg_iop_sw_cfg_rw_timer_grp0_owner___cfg___width 2
117#define reg_iop_sw_cfg_rw_timer_grp0_owner_offset 48
118
119/* Register rw_timer_grp1_owner, scope iop_sw_cfg, type rw */
120#define reg_iop_sw_cfg_rw_timer_grp1_owner___cfg___lsb 0
121#define reg_iop_sw_cfg_rw_timer_grp1_owner___cfg___width 2
122#define reg_iop_sw_cfg_rw_timer_grp1_owner_offset 52
123
124/* Register rw_trigger_grp0_owner, scope iop_sw_cfg, type rw */
125#define reg_iop_sw_cfg_rw_trigger_grp0_owner___cfg___lsb 0
126#define reg_iop_sw_cfg_rw_trigger_grp0_owner___cfg___width 2
127#define reg_iop_sw_cfg_rw_trigger_grp0_owner_offset 56
128
129/* Register rw_trigger_grp1_owner, scope iop_sw_cfg, type rw */
130#define reg_iop_sw_cfg_rw_trigger_grp1_owner___cfg___lsb 0
131#define reg_iop_sw_cfg_rw_trigger_grp1_owner___cfg___width 2
132#define reg_iop_sw_cfg_rw_trigger_grp1_owner_offset 60
133
134/* Register rw_trigger_grp2_owner, scope iop_sw_cfg, type rw */
135#define reg_iop_sw_cfg_rw_trigger_grp2_owner___cfg___lsb 0
136#define reg_iop_sw_cfg_rw_trigger_grp2_owner___cfg___width 2
137#define reg_iop_sw_cfg_rw_trigger_grp2_owner_offset 64
138
139/* Register rw_trigger_grp3_owner, scope iop_sw_cfg, type rw */
140#define reg_iop_sw_cfg_rw_trigger_grp3_owner___cfg___lsb 0
141#define reg_iop_sw_cfg_rw_trigger_grp3_owner___cfg___width 2
142#define reg_iop_sw_cfg_rw_trigger_grp3_owner_offset 68
143
144/* Register rw_trigger_grp4_owner, scope iop_sw_cfg, type rw */
145#define reg_iop_sw_cfg_rw_trigger_grp4_owner___cfg___lsb 0
146#define reg_iop_sw_cfg_rw_trigger_grp4_owner___cfg___width 2
147#define reg_iop_sw_cfg_rw_trigger_grp4_owner_offset 72
148
149/* Register rw_trigger_grp5_owner, scope iop_sw_cfg, type rw */
150#define reg_iop_sw_cfg_rw_trigger_grp5_owner___cfg___lsb 0
151#define reg_iop_sw_cfg_rw_trigger_grp5_owner___cfg___width 2
152#define reg_iop_sw_cfg_rw_trigger_grp5_owner_offset 76
153
154/* Register rw_trigger_grp6_owner, scope iop_sw_cfg, type rw */
155#define reg_iop_sw_cfg_rw_trigger_grp6_owner___cfg___lsb 0
156#define reg_iop_sw_cfg_rw_trigger_grp6_owner___cfg___width 2
157#define reg_iop_sw_cfg_rw_trigger_grp6_owner_offset 80
158
159/* Register rw_trigger_grp7_owner, scope iop_sw_cfg, type rw */
160#define reg_iop_sw_cfg_rw_trigger_grp7_owner___cfg___lsb 0
161#define reg_iop_sw_cfg_rw_trigger_grp7_owner___cfg___width 2
162#define reg_iop_sw_cfg_rw_trigger_grp7_owner_offset 84
163
164/* Register rw_bus_mask, scope iop_sw_cfg, type rw */
165#define reg_iop_sw_cfg_rw_bus_mask___byte0___lsb 0
166#define reg_iop_sw_cfg_rw_bus_mask___byte0___width 8
167#define reg_iop_sw_cfg_rw_bus_mask___byte1___lsb 8
168#define reg_iop_sw_cfg_rw_bus_mask___byte1___width 8
169#define reg_iop_sw_cfg_rw_bus_mask___byte2___lsb 16
170#define reg_iop_sw_cfg_rw_bus_mask___byte2___width 8
171#define reg_iop_sw_cfg_rw_bus_mask___byte3___lsb 24
172#define reg_iop_sw_cfg_rw_bus_mask___byte3___width 8
173#define reg_iop_sw_cfg_rw_bus_mask_offset 88
174
175/* Register rw_bus_oe_mask, scope iop_sw_cfg, type rw */
176#define reg_iop_sw_cfg_rw_bus_oe_mask___byte0___lsb 0
177#define reg_iop_sw_cfg_rw_bus_oe_mask___byte0___width 1
178#define reg_iop_sw_cfg_rw_bus_oe_mask___byte0___bit 0
179#define reg_iop_sw_cfg_rw_bus_oe_mask___byte1___lsb 1
180#define reg_iop_sw_cfg_rw_bus_oe_mask___byte1___width 1
181#define reg_iop_sw_cfg_rw_bus_oe_mask___byte1___bit 1
182#define reg_iop_sw_cfg_rw_bus_oe_mask___byte2___lsb 2
183#define reg_iop_sw_cfg_rw_bus_oe_mask___byte2___width 1
184#define reg_iop_sw_cfg_rw_bus_oe_mask___byte2___bit 2
185#define reg_iop_sw_cfg_rw_bus_oe_mask___byte3___lsb 3
186#define reg_iop_sw_cfg_rw_bus_oe_mask___byte3___width 1
187#define reg_iop_sw_cfg_rw_bus_oe_mask___byte3___bit 3
188#define reg_iop_sw_cfg_rw_bus_oe_mask_offset 92
189
190/* Register rw_gio_mask, scope iop_sw_cfg, type rw */
191#define reg_iop_sw_cfg_rw_gio_mask___val___lsb 0
192#define reg_iop_sw_cfg_rw_gio_mask___val___width 32
193#define reg_iop_sw_cfg_rw_gio_mask_offset 96
194
195/* Register rw_gio_oe_mask, scope iop_sw_cfg, type rw */
196#define reg_iop_sw_cfg_rw_gio_oe_mask___val___lsb 0
197#define reg_iop_sw_cfg_rw_gio_oe_mask___val___width 32
198#define reg_iop_sw_cfg_rw_gio_oe_mask_offset 100
199
200/* Register rw_pinmapping, scope iop_sw_cfg, type rw */
201#define reg_iop_sw_cfg_rw_pinmapping___bus_byte0___lsb 0
202#define reg_iop_sw_cfg_rw_pinmapping___bus_byte0___width 2
203#define reg_iop_sw_cfg_rw_pinmapping___bus_byte1___lsb 2
204#define reg_iop_sw_cfg_rw_pinmapping___bus_byte1___width 2
205#define reg_iop_sw_cfg_rw_pinmapping___bus_byte2___lsb 4
206#define reg_iop_sw_cfg_rw_pinmapping___bus_byte2___width 2
207#define reg_iop_sw_cfg_rw_pinmapping___bus_byte3___lsb 6
208#define reg_iop_sw_cfg_rw_pinmapping___bus_byte3___width 2
209#define reg_iop_sw_cfg_rw_pinmapping___gio3_0___lsb 8
210#define reg_iop_sw_cfg_rw_pinmapping___gio3_0___width 2
211#define reg_iop_sw_cfg_rw_pinmapping___gio7_4___lsb 10
212#define reg_iop_sw_cfg_rw_pinmapping___gio7_4___width 2
213#define reg_iop_sw_cfg_rw_pinmapping___gio11_8___lsb 12
214#define reg_iop_sw_cfg_rw_pinmapping___gio11_8___width 2
215#define reg_iop_sw_cfg_rw_pinmapping___gio15_12___lsb 14
216#define reg_iop_sw_cfg_rw_pinmapping___gio15_12___width 2
217#define reg_iop_sw_cfg_rw_pinmapping___gio19_16___lsb 16
218#define reg_iop_sw_cfg_rw_pinmapping___gio19_16___width 2
219#define reg_iop_sw_cfg_rw_pinmapping___gio23_20___lsb 18
220#define reg_iop_sw_cfg_rw_pinmapping___gio23_20___width 2
221#define reg_iop_sw_cfg_rw_pinmapping___gio27_24___lsb 20
222#define reg_iop_sw_cfg_rw_pinmapping___gio27_24___width 2
223#define reg_iop_sw_cfg_rw_pinmapping___gio31_28___lsb 22
224#define reg_iop_sw_cfg_rw_pinmapping___gio31_28___width 2
225#define reg_iop_sw_cfg_rw_pinmapping_offset 104
226
227/* Register rw_bus_out_cfg, scope iop_sw_cfg, type rw */
228#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_lo___lsb 0
229#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_lo___width 2
230#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_hi___lsb 2
231#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_hi___width 2
232#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_lo_oe___lsb 4
233#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_lo_oe___width 2
234#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_hi_oe___lsb 6
235#define reg_iop_sw_cfg_rw_bus_out_cfg___bus_hi_oe___width 2
236#define reg_iop_sw_cfg_rw_bus_out_cfg_offset 108
237
238/* Register rw_gio_out_grp0_cfg, scope iop_sw_cfg, type rw */
239#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0___lsb 0
240#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0___width 3
241#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0_oe___lsb 3
242#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0_oe___width 1
243#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio0_oe___bit 3
244#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1___lsb 4
245#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1___width 3
246#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1_oe___lsb 7
247#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1_oe___width 1
248#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio1_oe___bit 7
249#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2___lsb 8
250#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2___width 3
251#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2_oe___lsb 11
252#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2_oe___width 1
253#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio2_oe___bit 11
254#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3___lsb 12
255#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3___width 3
256#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3_oe___lsb 15
257#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3_oe___width 1
258#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg___gio3_oe___bit 15
259#define reg_iop_sw_cfg_rw_gio_out_grp0_cfg_offset 112
260
261/* Register rw_gio_out_grp1_cfg, scope iop_sw_cfg, type rw */
262#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4___lsb 0
263#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4___width 3
264#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4_oe___lsb 3
265#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4_oe___width 1
266#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio4_oe___bit 3
267#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5___lsb 4
268#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5___width 3
269#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5_oe___lsb 7
270#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5_oe___width 1
271#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio5_oe___bit 7
272#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6___lsb 8
273#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6___width 3
274#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6_oe___lsb 11
275#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6_oe___width 1
276#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio6_oe___bit 11
277#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7___lsb 12
278#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7___width 3
279#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7_oe___lsb 15
280#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7_oe___width 1
281#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg___gio7_oe___bit 15
282#define reg_iop_sw_cfg_rw_gio_out_grp1_cfg_offset 116
283
284/* Register rw_gio_out_grp2_cfg, scope iop_sw_cfg, type rw */
285#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8___lsb 0
286#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8___width 3
287#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8_oe___lsb 3
288#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8_oe___width 1
289#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio8_oe___bit 3
290#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9___lsb 4
291#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9___width 3
292#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9_oe___lsb 7
293#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9_oe___width 1
294#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio9_oe___bit 7
295#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10___lsb 8
296#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10___width 3
297#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10_oe___lsb 11
298#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10_oe___width 1
299#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio10_oe___bit 11
300#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11___lsb 12
301#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11___width 3
302#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11_oe___lsb 15
303#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11_oe___width 1
304#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg___gio11_oe___bit 15
305#define reg_iop_sw_cfg_rw_gio_out_grp2_cfg_offset 120
306
307/* Register rw_gio_out_grp3_cfg, scope iop_sw_cfg, type rw */
308#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12___lsb 0
309#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12___width 3
310#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12_oe___lsb 3
311#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12_oe___width 1
312#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio12_oe___bit 3
313#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13___lsb 4
314#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13___width 3
315#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13_oe___lsb 7
316#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13_oe___width 1
317#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio13_oe___bit 7
318#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14___lsb 8
319#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14___width 3
320#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14_oe___lsb 11
321#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14_oe___width 1
322#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio14_oe___bit 11
323#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15___lsb 12
324#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15___width 3
325#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15_oe___lsb 15
326#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15_oe___width 1
327#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg___gio15_oe___bit 15
328#define reg_iop_sw_cfg_rw_gio_out_grp3_cfg_offset 124
329
330/* Register rw_gio_out_grp4_cfg, scope iop_sw_cfg, type rw */
331#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16___lsb 0
332#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16___width 3
333#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16_oe___lsb 3
334#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16_oe___width 1
335#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio16_oe___bit 3
336#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17___lsb 4
337#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17___width 3
338#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17_oe___lsb 7
339#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17_oe___width 1
340#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio17_oe___bit 7
341#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18___lsb 8
342#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18___width 3
343#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18_oe___lsb 11
344#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18_oe___width 1
345#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio18_oe___bit 11
346#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19___lsb 12
347#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19___width 3
348#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19_oe___lsb 15
349#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19_oe___width 1
350#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg___gio19_oe___bit 15
351#define reg_iop_sw_cfg_rw_gio_out_grp4_cfg_offset 128
352
353/* Register rw_gio_out_grp5_cfg, scope iop_sw_cfg, type rw */
354#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20___lsb 0
355#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20___width 3
356#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20_oe___lsb 3
357#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20_oe___width 1
358#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio20_oe___bit 3
359#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21___lsb 4
360#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21___width 3
361#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21_oe___lsb 7
362#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21_oe___width 1
363#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio21_oe___bit 7
364#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22___lsb 8
365#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22___width 3
366#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22_oe___lsb 11
367#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22_oe___width 1
368#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio22_oe___bit 11
369#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23___lsb 12
370#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23___width 3
371#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23_oe___lsb 15
372#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23_oe___width 1
373#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg___gio23_oe___bit 15
374#define reg_iop_sw_cfg_rw_gio_out_grp5_cfg_offset 132
375
376/* Register rw_gio_out_grp6_cfg, scope iop_sw_cfg, type rw */
377#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24___lsb 0
378#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24___width 3
379#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24_oe___lsb 3
380#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24_oe___width 1
381#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio24_oe___bit 3
382#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25___lsb 4
383#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25___width 3
384#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25_oe___lsb 7
385#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25_oe___width 1
386#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio25_oe___bit 7
387#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26___lsb 8
388#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26___width 3
389#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26_oe___lsb 11
390#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26_oe___width 1
391#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio26_oe___bit 11
392#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27___lsb 12
393#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27___width 3
394#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27_oe___lsb 15
395#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27_oe___width 1
396#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg___gio27_oe___bit 15
397#define reg_iop_sw_cfg_rw_gio_out_grp6_cfg_offset 136
398
399/* Register rw_gio_out_grp7_cfg, scope iop_sw_cfg, type rw */
400#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28___lsb 0
401#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28___width 3
402#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28_oe___lsb 3
403#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28_oe___width 1
404#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio28_oe___bit 3
405#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29___lsb 4
406#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29___width 3
407#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29_oe___lsb 7
408#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29_oe___width 1
409#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio29_oe___bit 7
410#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30___lsb 8
411#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30___width 3
412#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30_oe___lsb 11
413#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30_oe___width 1
414#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio30_oe___bit 11
415#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31___lsb 12
416#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31___width 3
417#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31_oe___lsb 15
418#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31_oe___width 1
419#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg___gio31_oe___bit 15
420#define reg_iop_sw_cfg_rw_gio_out_grp7_cfg_offset 140
421
422/* Register rw_spu_cfg, scope iop_sw_cfg, type rw */
423#define reg_iop_sw_cfg_rw_spu_cfg___bus0_in___lsb 0
424#define reg_iop_sw_cfg_rw_spu_cfg___bus0_in___width 1
425#define reg_iop_sw_cfg_rw_spu_cfg___bus0_in___bit 0
426#define reg_iop_sw_cfg_rw_spu_cfg___bus1_in___lsb 1
427#define reg_iop_sw_cfg_rw_spu_cfg___bus1_in___width 1
428#define reg_iop_sw_cfg_rw_spu_cfg___bus1_in___bit 1
429#define reg_iop_sw_cfg_rw_spu_cfg_offset 144
430
431/* Register rw_timer_grp0_cfg, scope iop_sw_cfg, type rw */
432#define reg_iop_sw_cfg_rw_timer_grp0_cfg___ext_clk___lsb 0
433#define reg_iop_sw_cfg_rw_timer_grp0_cfg___ext_clk___width 3
434#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_en___lsb 3
435#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_en___width 2
436#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_en___lsb 5
437#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_en___width 2
438#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_en___lsb 7
439#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_en___width 2
440#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_en___lsb 9
441#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_en___width 2
442#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_dis___lsb 11
443#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr0_dis___width 2
444#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_dis___lsb 13
445#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr1_dis___width 2
446#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_dis___lsb 15
447#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr2_dis___width 2
448#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_dis___lsb 17
449#define reg_iop_sw_cfg_rw_timer_grp0_cfg___tmr3_dis___width 2
450#define reg_iop_sw_cfg_rw_timer_grp0_cfg_offset 148
451
452/* Register rw_timer_grp1_cfg, scope iop_sw_cfg, type rw */
453#define reg_iop_sw_cfg_rw_timer_grp1_cfg___ext_clk___lsb 0
454#define reg_iop_sw_cfg_rw_timer_grp1_cfg___ext_clk___width 3
455#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_en___lsb 3
456#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_en___width 2
457#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_en___lsb 5
458#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_en___width 2
459#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_en___lsb 7
460#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_en___width 2
461#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_en___lsb 9
462#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_en___width 2
463#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_dis___lsb 11
464#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr0_dis___width 2
465#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_dis___lsb 13
466#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr1_dis___width 2
467#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_dis___lsb 15
468#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr2_dis___width 2
469#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_dis___lsb 17
470#define reg_iop_sw_cfg_rw_timer_grp1_cfg___tmr3_dis___width 2
471#define reg_iop_sw_cfg_rw_timer_grp1_cfg_offset 152
472
473/* Register rw_trigger_grps_cfg, scope iop_sw_cfg, type rw */
474#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_dis___lsb 0
475#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_dis___width 1
476#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_dis___bit 0
477#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_en___lsb 1
478#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_en___width 1
479#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp0_en___bit 1
480#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_dis___lsb 2
481#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_dis___width 1
482#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_dis___bit 2
483#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_en___lsb 3
484#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_en___width 1
485#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp1_en___bit 3
486#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_dis___lsb 4
487#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_dis___width 1
488#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_dis___bit 4
489#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_en___lsb 5
490#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_en___width 1
491#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp2_en___bit 5
492#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_dis___lsb 6
493#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_dis___width 1
494#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_dis___bit 6
495#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_en___lsb 7
496#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_en___width 1
497#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp3_en___bit 7
498#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_dis___lsb 8
499#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_dis___width 1
500#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_dis___bit 8
501#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_en___lsb 9
502#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_en___width 1
503#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp4_en___bit 9
504#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_dis___lsb 10
505#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_dis___width 1
506#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_dis___bit 10
507#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_en___lsb 11
508#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_en___width 1
509#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp5_en___bit 11
510#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_dis___lsb 12
511#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_dis___width 1
512#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_dis___bit 12
513#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_en___lsb 13
514#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_en___width 1
515#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp6_en___bit 13
516#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_dis___lsb 14
517#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_dis___width 1
518#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_dis___bit 14
519#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_en___lsb 15
520#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_en___width 1
521#define reg_iop_sw_cfg_rw_trigger_grps_cfg___grp7_en___bit 15
522#define reg_iop_sw_cfg_rw_trigger_grps_cfg_offset 156
523
524/* Register rw_pdp_cfg, scope iop_sw_cfg, type rw */
525#define reg_iop_sw_cfg_rw_pdp_cfg___out_strb___lsb 0
526#define reg_iop_sw_cfg_rw_pdp_cfg___out_strb___width 4
527#define reg_iop_sw_cfg_rw_pdp_cfg___in_src___lsb 4
528#define reg_iop_sw_cfg_rw_pdp_cfg___in_src___width 2
529#define reg_iop_sw_cfg_rw_pdp_cfg___in_size___lsb 6
530#define reg_iop_sw_cfg_rw_pdp_cfg___in_size___width 3
531#define reg_iop_sw_cfg_rw_pdp_cfg___in_last___lsb 9
532#define reg_iop_sw_cfg_rw_pdp_cfg___in_last___width 2
533#define reg_iop_sw_cfg_rw_pdp_cfg___in_strb___lsb 11
534#define reg_iop_sw_cfg_rw_pdp_cfg___in_strb___width 4
535#define reg_iop_sw_cfg_rw_pdp_cfg_offset 160
536
537/* Register rw_sdp_cfg, scope iop_sw_cfg, type rw */
538#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_out_strb___lsb 0
539#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_out_strb___width 3
540#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in_data___lsb 3
541#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in_data___width 3
542#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in_last___lsb 6
543#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in_last___width 2
544#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in_strb___lsb 8
545#define reg_iop_sw_cfg_rw_sdp_cfg___sdp_in_strb___width 3
546#define reg_iop_sw_cfg_rw_sdp_cfg_offset 164
547
548
549/* Constants */
550#define regk_iop_sw_cfg_a 0x00000001
551#define regk_iop_sw_cfg_b 0x00000002
552#define regk_iop_sw_cfg_bus 0x00000000
553#define regk_iop_sw_cfg_bus_rot16 0x00000002
554#define regk_iop_sw_cfg_bus_rot24 0x00000003
555#define regk_iop_sw_cfg_bus_rot8 0x00000001
556#define regk_iop_sw_cfg_clk12 0x00000000
557#define regk_iop_sw_cfg_cpu 0x00000000
558#define regk_iop_sw_cfg_gated_clk0 0x0000000e
559#define regk_iop_sw_cfg_gated_clk1 0x0000000f
560#define regk_iop_sw_cfg_gio0 0x00000004
561#define regk_iop_sw_cfg_gio1 0x00000001
562#define regk_iop_sw_cfg_gio2 0x00000005
563#define regk_iop_sw_cfg_gio3 0x00000002
564#define regk_iop_sw_cfg_gio4 0x00000006
565#define regk_iop_sw_cfg_gio5 0x00000003
566#define regk_iop_sw_cfg_gio6 0x00000007
567#define regk_iop_sw_cfg_gio7 0x00000004
568#define regk_iop_sw_cfg_gio_in18 0x00000002
569#define regk_iop_sw_cfg_gio_in19 0x00000003
570#define regk_iop_sw_cfg_gio_in20 0x00000004
571#define regk_iop_sw_cfg_gio_in21 0x00000005
572#define regk_iop_sw_cfg_gio_in26 0x00000006
573#define regk_iop_sw_cfg_gio_in27 0x00000007
574#define regk_iop_sw_cfg_gio_in4 0x00000000
575#define regk_iop_sw_cfg_gio_in5 0x00000001
576#define regk_iop_sw_cfg_last_timer_grp0_tmr2 0x00000001
577#define regk_iop_sw_cfg_last_timer_grp1_tmr2 0x00000002
578#define regk_iop_sw_cfg_last_timer_grp1_tmr3 0x00000003
579#define regk_iop_sw_cfg_mpu 0x00000001
580#define regk_iop_sw_cfg_none 0x00000000
581#define regk_iop_sw_cfg_pdp_out 0x00000001
582#define regk_iop_sw_cfg_pdp_out_hi 0x00000001
583#define regk_iop_sw_cfg_pdp_out_lo 0x00000000
584#define regk_iop_sw_cfg_rw_bus_mask_default 0x00000000
585#define regk_iop_sw_cfg_rw_bus_oe_mask_default 0x00000000
586#define regk_iop_sw_cfg_rw_bus_out_cfg_default 0x00000000
587#define regk_iop_sw_cfg_rw_crc_par_owner_default 0x00000000
588#define regk_iop_sw_cfg_rw_dmc_in_owner_default 0x00000000
589#define regk_iop_sw_cfg_rw_dmc_out_owner_default 0x00000000
590#define regk_iop_sw_cfg_rw_fifo_in_extra_owner_default 0x00000000
591#define regk_iop_sw_cfg_rw_fifo_in_owner_default 0x00000000
592#define regk_iop_sw_cfg_rw_fifo_out_extra_owner_default 0x00000000
593#define regk_iop_sw_cfg_rw_fifo_out_owner_default 0x00000000
594#define regk_iop_sw_cfg_rw_gio_mask_default 0x00000000
595#define regk_iop_sw_cfg_rw_gio_oe_mask_default 0x00000000
596#define regk_iop_sw_cfg_rw_gio_out_grp0_cfg_default 0x00000000
597#define regk_iop_sw_cfg_rw_gio_out_grp1_cfg_default 0x00000000
598#define regk_iop_sw_cfg_rw_gio_out_grp2_cfg_default 0x00000000
599#define regk_iop_sw_cfg_rw_gio_out_grp3_cfg_default 0x00000000
600#define regk_iop_sw_cfg_rw_gio_out_grp4_cfg_default 0x00000000
601#define regk_iop_sw_cfg_rw_gio_out_grp5_cfg_default 0x00000000
602#define regk_iop_sw_cfg_rw_gio_out_grp6_cfg_default 0x00000000
603#define regk_iop_sw_cfg_rw_gio_out_grp7_cfg_default 0x00000000
604#define regk_iop_sw_cfg_rw_pdp_cfg_default 0x00000000
605#define regk_iop_sw_cfg_rw_pinmapping_default 0x00555555
606#define regk_iop_sw_cfg_rw_sap_in_owner_default 0x00000000
607#define regk_iop_sw_cfg_rw_sap_out_owner_default 0x00000000
608#define regk_iop_sw_cfg_rw_scrc_in_owner_default 0x00000000
609#define regk_iop_sw_cfg_rw_scrc_out_owner_default 0x00000000
610#define regk_iop_sw_cfg_rw_sdp_cfg_default 0x00000000
611#define regk_iop_sw_cfg_rw_spu_cfg_default 0x00000000
612#define regk_iop_sw_cfg_rw_spu_owner_default 0x00000000
613#define regk_iop_sw_cfg_rw_timer_grp0_cfg_default 0x00000000
614#define regk_iop_sw_cfg_rw_timer_grp0_owner_default 0x00000000
615#define regk_iop_sw_cfg_rw_timer_grp1_cfg_default 0x00000000
616#define regk_iop_sw_cfg_rw_timer_grp1_owner_default 0x00000000
617#define regk_iop_sw_cfg_rw_trigger_grp0_owner_default 0x00000000
618#define regk_iop_sw_cfg_rw_trigger_grp1_owner_default 0x00000000
619#define regk_iop_sw_cfg_rw_trigger_grp2_owner_default 0x00000000
620#define regk_iop_sw_cfg_rw_trigger_grp3_owner_default 0x00000000
621#define regk_iop_sw_cfg_rw_trigger_grp4_owner_default 0x00000000
622#define regk_iop_sw_cfg_rw_trigger_grp5_owner_default 0x00000000
623#define regk_iop_sw_cfg_rw_trigger_grp6_owner_default 0x00000000
624#define regk_iop_sw_cfg_rw_trigger_grp7_owner_default 0x00000000
625#define regk_iop_sw_cfg_rw_trigger_grps_cfg_default 0x00000000
626#define regk_iop_sw_cfg_sdp_out 0x00000004
627#define regk_iop_sw_cfg_size16 0x00000002
628#define regk_iop_sw_cfg_size24 0x00000003
629#define regk_iop_sw_cfg_size32 0x00000004
630#define regk_iop_sw_cfg_size8 0x00000001
631#define regk_iop_sw_cfg_spu 0x00000002
632#define regk_iop_sw_cfg_spu_bus_out0_hi 0x00000002
633#define regk_iop_sw_cfg_spu_bus_out0_lo 0x00000002
634#define regk_iop_sw_cfg_spu_bus_out1_hi 0x00000003
635#define regk_iop_sw_cfg_spu_bus_out1_lo 0x00000003
636#define regk_iop_sw_cfg_spu_g0 0x00000007
637#define regk_iop_sw_cfg_spu_g1 0x00000007
638#define regk_iop_sw_cfg_spu_g2 0x00000007
639#define regk_iop_sw_cfg_spu_g3 0x00000007
640#define regk_iop_sw_cfg_spu_g4 0x00000007
641#define regk_iop_sw_cfg_spu_g5 0x00000007
642#define regk_iop_sw_cfg_spu_g6 0x00000007
643#define regk_iop_sw_cfg_spu_g7 0x00000007
644#define regk_iop_sw_cfg_spu_gio0 0x00000000
645#define regk_iop_sw_cfg_spu_gio1 0x00000001
646#define regk_iop_sw_cfg_spu_gio5 0x00000005
647#define regk_iop_sw_cfg_spu_gio6 0x00000006
648#define regk_iop_sw_cfg_spu_gio7 0x00000007
649#define regk_iop_sw_cfg_spu_gio_out0 0x00000008
650#define regk_iop_sw_cfg_spu_gio_out1 0x00000009
651#define regk_iop_sw_cfg_spu_gio_out2 0x0000000a
652#define regk_iop_sw_cfg_spu_gio_out3 0x0000000b
653#define regk_iop_sw_cfg_spu_gio_out4 0x0000000c
654#define regk_iop_sw_cfg_spu_gio_out5 0x0000000d
655#define regk_iop_sw_cfg_spu_gio_out6 0x0000000e
656#define regk_iop_sw_cfg_spu_gio_out7 0x0000000f
657#define regk_iop_sw_cfg_spu_gioout0 0x00000000
658#define regk_iop_sw_cfg_spu_gioout1 0x00000000
659#define regk_iop_sw_cfg_spu_gioout10 0x00000007
660#define regk_iop_sw_cfg_spu_gioout11 0x00000007
661#define regk_iop_sw_cfg_spu_gioout12 0x00000007
662#define regk_iop_sw_cfg_spu_gioout13 0x00000007
663#define regk_iop_sw_cfg_spu_gioout14 0x00000007
664#define regk_iop_sw_cfg_spu_gioout15 0x00000007
665#define regk_iop_sw_cfg_spu_gioout16 0x00000007
666#define regk_iop_sw_cfg_spu_gioout17 0x00000007
667#define regk_iop_sw_cfg_spu_gioout18 0x00000007
668#define regk_iop_sw_cfg_spu_gioout19 0x00000007
669#define regk_iop_sw_cfg_spu_gioout2 0x00000001
670#define regk_iop_sw_cfg_spu_gioout20 0x00000007
671#define regk_iop_sw_cfg_spu_gioout21 0x00000007
672#define regk_iop_sw_cfg_spu_gioout22 0x00000007
673#define regk_iop_sw_cfg_spu_gioout23 0x00000007
674#define regk_iop_sw_cfg_spu_gioout24 0x00000007
675#define regk_iop_sw_cfg_spu_gioout25 0x00000007
676#define regk_iop_sw_cfg_spu_gioout26 0x00000007
677#define regk_iop_sw_cfg_spu_gioout27 0x00000007
678#define regk_iop_sw_cfg_spu_gioout28 0x00000007
679#define regk_iop_sw_cfg_spu_gioout29 0x00000007
680#define regk_iop_sw_cfg_spu_gioout3 0x00000001
681#define regk_iop_sw_cfg_spu_gioout30 0x00000007
682#define regk_iop_sw_cfg_spu_gioout31 0x00000007
683#define regk_iop_sw_cfg_spu_gioout4 0x00000002
684#define regk_iop_sw_cfg_spu_gioout5 0x00000002
685#define regk_iop_sw_cfg_spu_gioout6 0x00000003
686#define regk_iop_sw_cfg_spu_gioout7 0x00000003
687#define regk_iop_sw_cfg_spu_gioout8 0x00000007
688#define regk_iop_sw_cfg_spu_gioout9 0x00000007
689#define regk_iop_sw_cfg_strb_timer_grp0_tmr0 0x00000001
690#define regk_iop_sw_cfg_strb_timer_grp0_tmr1 0x00000002
691#define regk_iop_sw_cfg_strb_timer_grp1_tmr0 0x00000003
692#define regk_iop_sw_cfg_strb_timer_grp1_tmr1 0x00000002
693#define regk_iop_sw_cfg_timer_grp0 0x00000000
694#define regk_iop_sw_cfg_timer_grp0_rot 0x00000001
695#define regk_iop_sw_cfg_timer_grp0_strb0 0x00000005
696#define regk_iop_sw_cfg_timer_grp0_strb1 0x00000005
697#define regk_iop_sw_cfg_timer_grp0_strb2 0x00000005
698#define regk_iop_sw_cfg_timer_grp0_strb3 0x00000005
699#define regk_iop_sw_cfg_timer_grp0_tmr0 0x00000002
700#define regk_iop_sw_cfg_timer_grp1 0x00000000
701#define regk_iop_sw_cfg_timer_grp1_rot 0x00000001
702#define regk_iop_sw_cfg_timer_grp1_strb0 0x00000006
703#define regk_iop_sw_cfg_timer_grp1_strb1 0x00000006
704#define regk_iop_sw_cfg_timer_grp1_strb2 0x00000006
705#define regk_iop_sw_cfg_timer_grp1_strb3 0x00000006
706#define regk_iop_sw_cfg_timer_grp1_tmr0 0x00000003
707#define regk_iop_sw_cfg_trig0_0 0x00000000
708#define regk_iop_sw_cfg_trig0_1 0x00000000
709#define regk_iop_sw_cfg_trig0_2 0x00000000
710#define regk_iop_sw_cfg_trig0_3 0x00000000
711#define regk_iop_sw_cfg_trig1_0 0x00000000
712#define regk_iop_sw_cfg_trig1_1 0x00000000
713#define regk_iop_sw_cfg_trig1_2 0x00000000
714#define regk_iop_sw_cfg_trig1_3 0x00000000
715#define regk_iop_sw_cfg_trig2_0 0x00000001
716#define regk_iop_sw_cfg_trig2_1 0x00000001
717#define regk_iop_sw_cfg_trig2_2 0x00000001
718#define regk_iop_sw_cfg_trig2_3 0x00000001
719#define regk_iop_sw_cfg_trig3_0 0x00000001
720#define regk_iop_sw_cfg_trig3_1 0x00000001
721#define regk_iop_sw_cfg_trig3_2 0x00000001
722#define regk_iop_sw_cfg_trig3_3 0x00000001
723#define regk_iop_sw_cfg_trig4_0 0x00000002
724#define regk_iop_sw_cfg_trig4_1 0x00000002
725#define regk_iop_sw_cfg_trig4_2 0x00000002
726#define regk_iop_sw_cfg_trig4_3 0x00000002
727#define regk_iop_sw_cfg_trig5_0 0x00000002
728#define regk_iop_sw_cfg_trig5_1 0x00000002
729#define regk_iop_sw_cfg_trig5_2 0x00000002
730#define regk_iop_sw_cfg_trig5_3 0x00000002
731#define regk_iop_sw_cfg_trig6_0 0x00000003
732#define regk_iop_sw_cfg_trig6_1 0x00000003
733#define regk_iop_sw_cfg_trig6_2 0x00000003
734#define regk_iop_sw_cfg_trig6_3 0x00000003
735#define regk_iop_sw_cfg_trig7_0 0x00000003
736#define regk_iop_sw_cfg_trig7_1 0x00000003
737#define regk_iop_sw_cfg_trig7_2 0x00000003
738#define regk_iop_sw_cfg_trig7_3 0x00000003
739#endif /* __iop_sw_cfg_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cpu_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
deleted file mode 100644
index 3f4fe1b31815..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
+++ /dev/null
@@ -1,950 +0,0 @@
1#ifndef __iop_sw_cpu_defs_asm_h
2#define __iop_sw_cpu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_cpu.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_sw_cpu_defs_asm.h iop_sw_cpu.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register r_mpu_trace, scope iop_sw_cpu, type r */
54#define reg_iop_sw_cpu_r_mpu_trace_offset 0
55
56/* Register r_spu_trace, scope iop_sw_cpu, type r */
57#define reg_iop_sw_cpu_r_spu_trace_offset 4
58
59/* Register r_spu_fsm_trace, scope iop_sw_cpu, type r */
60#define reg_iop_sw_cpu_r_spu_fsm_trace_offset 8
61
62/* Register rw_mc_ctrl, scope iop_sw_cpu, type rw */
63#define reg_iop_sw_cpu_rw_mc_ctrl___keep_owner___lsb 0
64#define reg_iop_sw_cpu_rw_mc_ctrl___keep_owner___width 1
65#define reg_iop_sw_cpu_rw_mc_ctrl___keep_owner___bit 0
66#define reg_iop_sw_cpu_rw_mc_ctrl___cmd___lsb 1
67#define reg_iop_sw_cpu_rw_mc_ctrl___cmd___width 2
68#define reg_iop_sw_cpu_rw_mc_ctrl___size___lsb 3
69#define reg_iop_sw_cpu_rw_mc_ctrl___size___width 3
70#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu_mem___lsb 6
71#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu_mem___width 1
72#define reg_iop_sw_cpu_rw_mc_ctrl___wr_spu_mem___bit 6
73#define reg_iop_sw_cpu_rw_mc_ctrl_offset 12
74
75/* Register rw_mc_data, scope iop_sw_cpu, type rw */
76#define reg_iop_sw_cpu_rw_mc_data___val___lsb 0
77#define reg_iop_sw_cpu_rw_mc_data___val___width 32
78#define reg_iop_sw_cpu_rw_mc_data_offset 16
79
80/* Register rw_mc_addr, scope iop_sw_cpu, type rw */
81#define reg_iop_sw_cpu_rw_mc_addr_offset 20
82
83/* Register rs_mc_data, scope iop_sw_cpu, type rs */
84#define reg_iop_sw_cpu_rs_mc_data_offset 24
85
86/* Register r_mc_data, scope iop_sw_cpu, type r */
87#define reg_iop_sw_cpu_r_mc_data_offset 28
88
89/* Register r_mc_stat, scope iop_sw_cpu, type r */
90#define reg_iop_sw_cpu_r_mc_stat___busy_cpu___lsb 0
91#define reg_iop_sw_cpu_r_mc_stat___busy_cpu___width 1
92#define reg_iop_sw_cpu_r_mc_stat___busy_cpu___bit 0
93#define reg_iop_sw_cpu_r_mc_stat___busy_mpu___lsb 1
94#define reg_iop_sw_cpu_r_mc_stat___busy_mpu___width 1
95#define reg_iop_sw_cpu_r_mc_stat___busy_mpu___bit 1
96#define reg_iop_sw_cpu_r_mc_stat___busy_spu___lsb 2
97#define reg_iop_sw_cpu_r_mc_stat___busy_spu___width 1
98#define reg_iop_sw_cpu_r_mc_stat___busy_spu___bit 2
99#define reg_iop_sw_cpu_r_mc_stat___owned_by_cpu___lsb 3
100#define reg_iop_sw_cpu_r_mc_stat___owned_by_cpu___width 1
101#define reg_iop_sw_cpu_r_mc_stat___owned_by_cpu___bit 3
102#define reg_iop_sw_cpu_r_mc_stat___owned_by_mpu___lsb 4
103#define reg_iop_sw_cpu_r_mc_stat___owned_by_mpu___width 1
104#define reg_iop_sw_cpu_r_mc_stat___owned_by_mpu___bit 4
105#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu___lsb 5
106#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu___width 1
107#define reg_iop_sw_cpu_r_mc_stat___owned_by_spu___bit 5
108#define reg_iop_sw_cpu_r_mc_stat_offset 32
109
110/* Register rw_bus_clr_mask, scope iop_sw_cpu, type rw */
111#define reg_iop_sw_cpu_rw_bus_clr_mask___byte0___lsb 0
112#define reg_iop_sw_cpu_rw_bus_clr_mask___byte0___width 8
113#define reg_iop_sw_cpu_rw_bus_clr_mask___byte1___lsb 8
114#define reg_iop_sw_cpu_rw_bus_clr_mask___byte1___width 8
115#define reg_iop_sw_cpu_rw_bus_clr_mask___byte2___lsb 16
116#define reg_iop_sw_cpu_rw_bus_clr_mask___byte2___width 8
117#define reg_iop_sw_cpu_rw_bus_clr_mask___byte3___lsb 24
118#define reg_iop_sw_cpu_rw_bus_clr_mask___byte3___width 8
119#define reg_iop_sw_cpu_rw_bus_clr_mask_offset 36
120
121/* Register rw_bus_set_mask, scope iop_sw_cpu, type rw */
122#define reg_iop_sw_cpu_rw_bus_set_mask___byte0___lsb 0
123#define reg_iop_sw_cpu_rw_bus_set_mask___byte0___width 8
124#define reg_iop_sw_cpu_rw_bus_set_mask___byte1___lsb 8
125#define reg_iop_sw_cpu_rw_bus_set_mask___byte1___width 8
126#define reg_iop_sw_cpu_rw_bus_set_mask___byte2___lsb 16
127#define reg_iop_sw_cpu_rw_bus_set_mask___byte2___width 8
128#define reg_iop_sw_cpu_rw_bus_set_mask___byte3___lsb 24
129#define reg_iop_sw_cpu_rw_bus_set_mask___byte3___width 8
130#define reg_iop_sw_cpu_rw_bus_set_mask_offset 40
131
132/* Register rw_bus_oe_clr_mask, scope iop_sw_cpu, type rw */
133#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte0___lsb 0
134#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte0___width 1
135#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte0___bit 0
136#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte1___lsb 1
137#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte1___width 1
138#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte1___bit 1
139#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte2___lsb 2
140#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte2___width 1
141#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte2___bit 2
142#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte3___lsb 3
143#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte3___width 1
144#define reg_iop_sw_cpu_rw_bus_oe_clr_mask___byte3___bit 3
145#define reg_iop_sw_cpu_rw_bus_oe_clr_mask_offset 44
146
147/* Register rw_bus_oe_set_mask, scope iop_sw_cpu, type rw */
148#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte0___lsb 0
149#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte0___width 1
150#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte0___bit 0
151#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte1___lsb 1
152#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte1___width 1
153#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte1___bit 1
154#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte2___lsb 2
155#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte2___width 1
156#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte2___bit 2
157#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte3___lsb 3
158#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte3___width 1
159#define reg_iop_sw_cpu_rw_bus_oe_set_mask___byte3___bit 3
160#define reg_iop_sw_cpu_rw_bus_oe_set_mask_offset 48
161
162/* Register r_bus_in, scope iop_sw_cpu, type r */
163#define reg_iop_sw_cpu_r_bus_in_offset 52
164
165/* Register rw_gio_clr_mask, scope iop_sw_cpu, type rw */
166#define reg_iop_sw_cpu_rw_gio_clr_mask___val___lsb 0
167#define reg_iop_sw_cpu_rw_gio_clr_mask___val___width 32
168#define reg_iop_sw_cpu_rw_gio_clr_mask_offset 56
169
170/* Register rw_gio_set_mask, scope iop_sw_cpu, type rw */
171#define reg_iop_sw_cpu_rw_gio_set_mask___val___lsb 0
172#define reg_iop_sw_cpu_rw_gio_set_mask___val___width 32
173#define reg_iop_sw_cpu_rw_gio_set_mask_offset 60
174
175/* Register rw_gio_oe_clr_mask, scope iop_sw_cpu, type rw */
176#define reg_iop_sw_cpu_rw_gio_oe_clr_mask___val___lsb 0
177#define reg_iop_sw_cpu_rw_gio_oe_clr_mask___val___width 32
178#define reg_iop_sw_cpu_rw_gio_oe_clr_mask_offset 64
179
180/* Register rw_gio_oe_set_mask, scope iop_sw_cpu, type rw */
181#define reg_iop_sw_cpu_rw_gio_oe_set_mask___val___lsb 0
182#define reg_iop_sw_cpu_rw_gio_oe_set_mask___val___width 32
183#define reg_iop_sw_cpu_rw_gio_oe_set_mask_offset 68
184
185/* Register r_gio_in, scope iop_sw_cpu, type r */
186#define reg_iop_sw_cpu_r_gio_in_offset 72
187
188/* Register rw_intr0_mask, scope iop_sw_cpu, type rw */
189#define reg_iop_sw_cpu_rw_intr0_mask___mpu_0___lsb 0
190#define reg_iop_sw_cpu_rw_intr0_mask___mpu_0___width 1
191#define reg_iop_sw_cpu_rw_intr0_mask___mpu_0___bit 0
192#define reg_iop_sw_cpu_rw_intr0_mask___mpu_1___lsb 1
193#define reg_iop_sw_cpu_rw_intr0_mask___mpu_1___width 1
194#define reg_iop_sw_cpu_rw_intr0_mask___mpu_1___bit 1
195#define reg_iop_sw_cpu_rw_intr0_mask___mpu_2___lsb 2
196#define reg_iop_sw_cpu_rw_intr0_mask___mpu_2___width 1
197#define reg_iop_sw_cpu_rw_intr0_mask___mpu_2___bit 2
198#define reg_iop_sw_cpu_rw_intr0_mask___mpu_3___lsb 3
199#define reg_iop_sw_cpu_rw_intr0_mask___mpu_3___width 1
200#define reg_iop_sw_cpu_rw_intr0_mask___mpu_3___bit 3
201#define reg_iop_sw_cpu_rw_intr0_mask___mpu_4___lsb 4
202#define reg_iop_sw_cpu_rw_intr0_mask___mpu_4___width 1
203#define reg_iop_sw_cpu_rw_intr0_mask___mpu_4___bit 4
204#define reg_iop_sw_cpu_rw_intr0_mask___mpu_5___lsb 5
205#define reg_iop_sw_cpu_rw_intr0_mask___mpu_5___width 1
206#define reg_iop_sw_cpu_rw_intr0_mask___mpu_5___bit 5
207#define reg_iop_sw_cpu_rw_intr0_mask___mpu_6___lsb 6
208#define reg_iop_sw_cpu_rw_intr0_mask___mpu_6___width 1
209#define reg_iop_sw_cpu_rw_intr0_mask___mpu_6___bit 6
210#define reg_iop_sw_cpu_rw_intr0_mask___mpu_7___lsb 7
211#define reg_iop_sw_cpu_rw_intr0_mask___mpu_7___width 1
212#define reg_iop_sw_cpu_rw_intr0_mask___mpu_7___bit 7
213#define reg_iop_sw_cpu_rw_intr0_mask___mpu_8___lsb 8
214#define reg_iop_sw_cpu_rw_intr0_mask___mpu_8___width 1
215#define reg_iop_sw_cpu_rw_intr0_mask___mpu_8___bit 8
216#define reg_iop_sw_cpu_rw_intr0_mask___mpu_9___lsb 9
217#define reg_iop_sw_cpu_rw_intr0_mask___mpu_9___width 1
218#define reg_iop_sw_cpu_rw_intr0_mask___mpu_9___bit 9
219#define reg_iop_sw_cpu_rw_intr0_mask___mpu_10___lsb 10
220#define reg_iop_sw_cpu_rw_intr0_mask___mpu_10___width 1
221#define reg_iop_sw_cpu_rw_intr0_mask___mpu_10___bit 10
222#define reg_iop_sw_cpu_rw_intr0_mask___mpu_11___lsb 11
223#define reg_iop_sw_cpu_rw_intr0_mask___mpu_11___width 1
224#define reg_iop_sw_cpu_rw_intr0_mask___mpu_11___bit 11
225#define reg_iop_sw_cpu_rw_intr0_mask___mpu_12___lsb 12
226#define reg_iop_sw_cpu_rw_intr0_mask___mpu_12___width 1
227#define reg_iop_sw_cpu_rw_intr0_mask___mpu_12___bit 12
228#define reg_iop_sw_cpu_rw_intr0_mask___mpu_13___lsb 13
229#define reg_iop_sw_cpu_rw_intr0_mask___mpu_13___width 1
230#define reg_iop_sw_cpu_rw_intr0_mask___mpu_13___bit 13
231#define reg_iop_sw_cpu_rw_intr0_mask___mpu_14___lsb 14
232#define reg_iop_sw_cpu_rw_intr0_mask___mpu_14___width 1
233#define reg_iop_sw_cpu_rw_intr0_mask___mpu_14___bit 14
234#define reg_iop_sw_cpu_rw_intr0_mask___mpu_15___lsb 15
235#define reg_iop_sw_cpu_rw_intr0_mask___mpu_15___width 1
236#define reg_iop_sw_cpu_rw_intr0_mask___mpu_15___bit 15
237#define reg_iop_sw_cpu_rw_intr0_mask___spu_0___lsb 16
238#define reg_iop_sw_cpu_rw_intr0_mask___spu_0___width 1
239#define reg_iop_sw_cpu_rw_intr0_mask___spu_0___bit 16
240#define reg_iop_sw_cpu_rw_intr0_mask___spu_1___lsb 17
241#define reg_iop_sw_cpu_rw_intr0_mask___spu_1___width 1
242#define reg_iop_sw_cpu_rw_intr0_mask___spu_1___bit 17
243#define reg_iop_sw_cpu_rw_intr0_mask___spu_2___lsb 18
244#define reg_iop_sw_cpu_rw_intr0_mask___spu_2___width 1
245#define reg_iop_sw_cpu_rw_intr0_mask___spu_2___bit 18
246#define reg_iop_sw_cpu_rw_intr0_mask___spu_3___lsb 19
247#define reg_iop_sw_cpu_rw_intr0_mask___spu_3___width 1
248#define reg_iop_sw_cpu_rw_intr0_mask___spu_3___bit 19
249#define reg_iop_sw_cpu_rw_intr0_mask___spu_4___lsb 20
250#define reg_iop_sw_cpu_rw_intr0_mask___spu_4___width 1
251#define reg_iop_sw_cpu_rw_intr0_mask___spu_4___bit 20
252#define reg_iop_sw_cpu_rw_intr0_mask___spu_5___lsb 21
253#define reg_iop_sw_cpu_rw_intr0_mask___spu_5___width 1
254#define reg_iop_sw_cpu_rw_intr0_mask___spu_5___bit 21
255#define reg_iop_sw_cpu_rw_intr0_mask___spu_6___lsb 22
256#define reg_iop_sw_cpu_rw_intr0_mask___spu_6___width 1
257#define reg_iop_sw_cpu_rw_intr0_mask___spu_6___bit 22
258#define reg_iop_sw_cpu_rw_intr0_mask___spu_7___lsb 23
259#define reg_iop_sw_cpu_rw_intr0_mask___spu_7___width 1
260#define reg_iop_sw_cpu_rw_intr0_mask___spu_7___bit 23
261#define reg_iop_sw_cpu_rw_intr0_mask___spu_8___lsb 24
262#define reg_iop_sw_cpu_rw_intr0_mask___spu_8___width 1
263#define reg_iop_sw_cpu_rw_intr0_mask___spu_8___bit 24
264#define reg_iop_sw_cpu_rw_intr0_mask___spu_9___lsb 25
265#define reg_iop_sw_cpu_rw_intr0_mask___spu_9___width 1
266#define reg_iop_sw_cpu_rw_intr0_mask___spu_9___bit 25
267#define reg_iop_sw_cpu_rw_intr0_mask___spu_10___lsb 26
268#define reg_iop_sw_cpu_rw_intr0_mask___spu_10___width 1
269#define reg_iop_sw_cpu_rw_intr0_mask___spu_10___bit 26
270#define reg_iop_sw_cpu_rw_intr0_mask___spu_11___lsb 27
271#define reg_iop_sw_cpu_rw_intr0_mask___spu_11___width 1
272#define reg_iop_sw_cpu_rw_intr0_mask___spu_11___bit 27
273#define reg_iop_sw_cpu_rw_intr0_mask___spu_12___lsb 28
274#define reg_iop_sw_cpu_rw_intr0_mask___spu_12___width 1
275#define reg_iop_sw_cpu_rw_intr0_mask___spu_12___bit 28
276#define reg_iop_sw_cpu_rw_intr0_mask___spu_13___lsb 29
277#define reg_iop_sw_cpu_rw_intr0_mask___spu_13___width 1
278#define reg_iop_sw_cpu_rw_intr0_mask___spu_13___bit 29
279#define reg_iop_sw_cpu_rw_intr0_mask___spu_14___lsb 30
280#define reg_iop_sw_cpu_rw_intr0_mask___spu_14___width 1
281#define reg_iop_sw_cpu_rw_intr0_mask___spu_14___bit 30
282#define reg_iop_sw_cpu_rw_intr0_mask___spu_15___lsb 31
283#define reg_iop_sw_cpu_rw_intr0_mask___spu_15___width 1
284#define reg_iop_sw_cpu_rw_intr0_mask___spu_15___bit 31
285#define reg_iop_sw_cpu_rw_intr0_mask_offset 76
286
287/* Register rw_ack_intr0, scope iop_sw_cpu, type rw */
288#define reg_iop_sw_cpu_rw_ack_intr0___mpu_0___lsb 0
289#define reg_iop_sw_cpu_rw_ack_intr0___mpu_0___width 1
290#define reg_iop_sw_cpu_rw_ack_intr0___mpu_0___bit 0
291#define reg_iop_sw_cpu_rw_ack_intr0___mpu_1___lsb 1
292#define reg_iop_sw_cpu_rw_ack_intr0___mpu_1___width 1
293#define reg_iop_sw_cpu_rw_ack_intr0___mpu_1___bit 1
294#define reg_iop_sw_cpu_rw_ack_intr0___mpu_2___lsb 2
295#define reg_iop_sw_cpu_rw_ack_intr0___mpu_2___width 1
296#define reg_iop_sw_cpu_rw_ack_intr0___mpu_2___bit 2
297#define reg_iop_sw_cpu_rw_ack_intr0___mpu_3___lsb 3
298#define reg_iop_sw_cpu_rw_ack_intr0___mpu_3___width 1
299#define reg_iop_sw_cpu_rw_ack_intr0___mpu_3___bit 3
300#define reg_iop_sw_cpu_rw_ack_intr0___mpu_4___lsb 4
301#define reg_iop_sw_cpu_rw_ack_intr0___mpu_4___width 1
302#define reg_iop_sw_cpu_rw_ack_intr0___mpu_4___bit 4
303#define reg_iop_sw_cpu_rw_ack_intr0___mpu_5___lsb 5
304#define reg_iop_sw_cpu_rw_ack_intr0___mpu_5___width 1
305#define reg_iop_sw_cpu_rw_ack_intr0___mpu_5___bit 5
306#define reg_iop_sw_cpu_rw_ack_intr0___mpu_6___lsb 6
307#define reg_iop_sw_cpu_rw_ack_intr0___mpu_6___width 1
308#define reg_iop_sw_cpu_rw_ack_intr0___mpu_6___bit 6
309#define reg_iop_sw_cpu_rw_ack_intr0___mpu_7___lsb 7
310#define reg_iop_sw_cpu_rw_ack_intr0___mpu_7___width 1
311#define reg_iop_sw_cpu_rw_ack_intr0___mpu_7___bit 7
312#define reg_iop_sw_cpu_rw_ack_intr0___mpu_8___lsb 8
313#define reg_iop_sw_cpu_rw_ack_intr0___mpu_8___width 1
314#define reg_iop_sw_cpu_rw_ack_intr0___mpu_8___bit 8
315#define reg_iop_sw_cpu_rw_ack_intr0___mpu_9___lsb 9
316#define reg_iop_sw_cpu_rw_ack_intr0___mpu_9___width 1
317#define reg_iop_sw_cpu_rw_ack_intr0___mpu_9___bit 9
318#define reg_iop_sw_cpu_rw_ack_intr0___mpu_10___lsb 10
319#define reg_iop_sw_cpu_rw_ack_intr0___mpu_10___width 1
320#define reg_iop_sw_cpu_rw_ack_intr0___mpu_10___bit 10
321#define reg_iop_sw_cpu_rw_ack_intr0___mpu_11___lsb 11
322#define reg_iop_sw_cpu_rw_ack_intr0___mpu_11___width 1
323#define reg_iop_sw_cpu_rw_ack_intr0___mpu_11___bit 11
324#define reg_iop_sw_cpu_rw_ack_intr0___mpu_12___lsb 12
325#define reg_iop_sw_cpu_rw_ack_intr0___mpu_12___width 1
326#define reg_iop_sw_cpu_rw_ack_intr0___mpu_12___bit 12
327#define reg_iop_sw_cpu_rw_ack_intr0___mpu_13___lsb 13
328#define reg_iop_sw_cpu_rw_ack_intr0___mpu_13___width 1
329#define reg_iop_sw_cpu_rw_ack_intr0___mpu_13___bit 13
330#define reg_iop_sw_cpu_rw_ack_intr0___mpu_14___lsb 14
331#define reg_iop_sw_cpu_rw_ack_intr0___mpu_14___width 1
332#define reg_iop_sw_cpu_rw_ack_intr0___mpu_14___bit 14
333#define reg_iop_sw_cpu_rw_ack_intr0___mpu_15___lsb 15
334#define reg_iop_sw_cpu_rw_ack_intr0___mpu_15___width 1
335#define reg_iop_sw_cpu_rw_ack_intr0___mpu_15___bit 15
336#define reg_iop_sw_cpu_rw_ack_intr0___spu_0___lsb 16
337#define reg_iop_sw_cpu_rw_ack_intr0___spu_0___width 1
338#define reg_iop_sw_cpu_rw_ack_intr0___spu_0___bit 16
339#define reg_iop_sw_cpu_rw_ack_intr0___spu_1___lsb 17
340#define reg_iop_sw_cpu_rw_ack_intr0___spu_1___width 1
341#define reg_iop_sw_cpu_rw_ack_intr0___spu_1___bit 17
342#define reg_iop_sw_cpu_rw_ack_intr0___spu_2___lsb 18
343#define reg_iop_sw_cpu_rw_ack_intr0___spu_2___width 1
344#define reg_iop_sw_cpu_rw_ack_intr0___spu_2___bit 18
345#define reg_iop_sw_cpu_rw_ack_intr0___spu_3___lsb 19
346#define reg_iop_sw_cpu_rw_ack_intr0___spu_3___width 1
347#define reg_iop_sw_cpu_rw_ack_intr0___spu_3___bit 19
348#define reg_iop_sw_cpu_rw_ack_intr0___spu_4___lsb 20
349#define reg_iop_sw_cpu_rw_ack_intr0___spu_4___width 1
350#define reg_iop_sw_cpu_rw_ack_intr0___spu_4___bit 20
351#define reg_iop_sw_cpu_rw_ack_intr0___spu_5___lsb 21
352#define reg_iop_sw_cpu_rw_ack_intr0___spu_5___width 1
353#define reg_iop_sw_cpu_rw_ack_intr0___spu_5___bit 21
354#define reg_iop_sw_cpu_rw_ack_intr0___spu_6___lsb 22
355#define reg_iop_sw_cpu_rw_ack_intr0___spu_6___width 1
356#define reg_iop_sw_cpu_rw_ack_intr0___spu_6___bit 22
357#define reg_iop_sw_cpu_rw_ack_intr0___spu_7___lsb 23
358#define reg_iop_sw_cpu_rw_ack_intr0___spu_7___width 1
359#define reg_iop_sw_cpu_rw_ack_intr0___spu_7___bit 23
360#define reg_iop_sw_cpu_rw_ack_intr0___spu_8___lsb 24
361#define reg_iop_sw_cpu_rw_ack_intr0___spu_8___width 1
362#define reg_iop_sw_cpu_rw_ack_intr0___spu_8___bit 24
363#define reg_iop_sw_cpu_rw_ack_intr0___spu_9___lsb 25
364#define reg_iop_sw_cpu_rw_ack_intr0___spu_9___width 1
365#define reg_iop_sw_cpu_rw_ack_intr0___spu_9___bit 25
366#define reg_iop_sw_cpu_rw_ack_intr0___spu_10___lsb 26
367#define reg_iop_sw_cpu_rw_ack_intr0___spu_10___width 1
368#define reg_iop_sw_cpu_rw_ack_intr0___spu_10___bit 26
369#define reg_iop_sw_cpu_rw_ack_intr0___spu_11___lsb 27
370#define reg_iop_sw_cpu_rw_ack_intr0___spu_11___width 1
371#define reg_iop_sw_cpu_rw_ack_intr0___spu_11___bit 27
372#define reg_iop_sw_cpu_rw_ack_intr0___spu_12___lsb 28
373#define reg_iop_sw_cpu_rw_ack_intr0___spu_12___width 1
374#define reg_iop_sw_cpu_rw_ack_intr0___spu_12___bit 28
375#define reg_iop_sw_cpu_rw_ack_intr0___spu_13___lsb 29
376#define reg_iop_sw_cpu_rw_ack_intr0___spu_13___width 1
377#define reg_iop_sw_cpu_rw_ack_intr0___spu_13___bit 29
378#define reg_iop_sw_cpu_rw_ack_intr0___spu_14___lsb 30
379#define reg_iop_sw_cpu_rw_ack_intr0___spu_14___width 1
380#define reg_iop_sw_cpu_rw_ack_intr0___spu_14___bit 30
381#define reg_iop_sw_cpu_rw_ack_intr0___spu_15___lsb 31
382#define reg_iop_sw_cpu_rw_ack_intr0___spu_15___width 1
383#define reg_iop_sw_cpu_rw_ack_intr0___spu_15___bit 31
384#define reg_iop_sw_cpu_rw_ack_intr0_offset 80
385
386/* Register r_intr0, scope iop_sw_cpu, type r */
387#define reg_iop_sw_cpu_r_intr0___mpu_0___lsb 0
388#define reg_iop_sw_cpu_r_intr0___mpu_0___width 1
389#define reg_iop_sw_cpu_r_intr0___mpu_0___bit 0
390#define reg_iop_sw_cpu_r_intr0___mpu_1___lsb 1
391#define reg_iop_sw_cpu_r_intr0___mpu_1___width 1
392#define reg_iop_sw_cpu_r_intr0___mpu_1___bit 1
393#define reg_iop_sw_cpu_r_intr0___mpu_2___lsb 2
394#define reg_iop_sw_cpu_r_intr0___mpu_2___width 1
395#define reg_iop_sw_cpu_r_intr0___mpu_2___bit 2
396#define reg_iop_sw_cpu_r_intr0___mpu_3___lsb 3
397#define reg_iop_sw_cpu_r_intr0___mpu_3___width 1
398#define reg_iop_sw_cpu_r_intr0___mpu_3___bit 3
399#define reg_iop_sw_cpu_r_intr0___mpu_4___lsb 4
400#define reg_iop_sw_cpu_r_intr0___mpu_4___width 1
401#define reg_iop_sw_cpu_r_intr0___mpu_4___bit 4
402#define reg_iop_sw_cpu_r_intr0___mpu_5___lsb 5
403#define reg_iop_sw_cpu_r_intr0___mpu_5___width 1
404#define reg_iop_sw_cpu_r_intr0___mpu_5___bit 5
405#define reg_iop_sw_cpu_r_intr0___mpu_6___lsb 6
406#define reg_iop_sw_cpu_r_intr0___mpu_6___width 1
407#define reg_iop_sw_cpu_r_intr0___mpu_6___bit 6
408#define reg_iop_sw_cpu_r_intr0___mpu_7___lsb 7
409#define reg_iop_sw_cpu_r_intr0___mpu_7___width 1
410#define reg_iop_sw_cpu_r_intr0___mpu_7___bit 7
411#define reg_iop_sw_cpu_r_intr0___mpu_8___lsb 8
412#define reg_iop_sw_cpu_r_intr0___mpu_8___width 1
413#define reg_iop_sw_cpu_r_intr0___mpu_8___bit 8
414#define reg_iop_sw_cpu_r_intr0___mpu_9___lsb 9
415#define reg_iop_sw_cpu_r_intr0___mpu_9___width 1
416#define reg_iop_sw_cpu_r_intr0___mpu_9___bit 9
417#define reg_iop_sw_cpu_r_intr0___mpu_10___lsb 10
418#define reg_iop_sw_cpu_r_intr0___mpu_10___width 1
419#define reg_iop_sw_cpu_r_intr0___mpu_10___bit 10
420#define reg_iop_sw_cpu_r_intr0___mpu_11___lsb 11
421#define reg_iop_sw_cpu_r_intr0___mpu_11___width 1
422#define reg_iop_sw_cpu_r_intr0___mpu_11___bit 11
423#define reg_iop_sw_cpu_r_intr0___mpu_12___lsb 12
424#define reg_iop_sw_cpu_r_intr0___mpu_12___width 1
425#define reg_iop_sw_cpu_r_intr0___mpu_12___bit 12
426#define reg_iop_sw_cpu_r_intr0___mpu_13___lsb 13
427#define reg_iop_sw_cpu_r_intr0___mpu_13___width 1
428#define reg_iop_sw_cpu_r_intr0___mpu_13___bit 13
429#define reg_iop_sw_cpu_r_intr0___mpu_14___lsb 14
430#define reg_iop_sw_cpu_r_intr0___mpu_14___width 1
431#define reg_iop_sw_cpu_r_intr0___mpu_14___bit 14
432#define reg_iop_sw_cpu_r_intr0___mpu_15___lsb 15
433#define reg_iop_sw_cpu_r_intr0___mpu_15___width 1
434#define reg_iop_sw_cpu_r_intr0___mpu_15___bit 15
435#define reg_iop_sw_cpu_r_intr0___spu_0___lsb 16
436#define reg_iop_sw_cpu_r_intr0___spu_0___width 1
437#define reg_iop_sw_cpu_r_intr0___spu_0___bit 16
438#define reg_iop_sw_cpu_r_intr0___spu_1___lsb 17
439#define reg_iop_sw_cpu_r_intr0___spu_1___width 1
440#define reg_iop_sw_cpu_r_intr0___spu_1___bit 17
441#define reg_iop_sw_cpu_r_intr0___spu_2___lsb 18
442#define reg_iop_sw_cpu_r_intr0___spu_2___width 1
443#define reg_iop_sw_cpu_r_intr0___spu_2___bit 18
444#define reg_iop_sw_cpu_r_intr0___spu_3___lsb 19
445#define reg_iop_sw_cpu_r_intr0___spu_3___width 1
446#define reg_iop_sw_cpu_r_intr0___spu_3___bit 19
447#define reg_iop_sw_cpu_r_intr0___spu_4___lsb 20
448#define reg_iop_sw_cpu_r_intr0___spu_4___width 1
449#define reg_iop_sw_cpu_r_intr0___spu_4___bit 20
450#define reg_iop_sw_cpu_r_intr0___spu_5___lsb 21
451#define reg_iop_sw_cpu_r_intr0___spu_5___width 1
452#define reg_iop_sw_cpu_r_intr0___spu_5___bit 21
453#define reg_iop_sw_cpu_r_intr0___spu_6___lsb 22
454#define reg_iop_sw_cpu_r_intr0___spu_6___width 1
455#define reg_iop_sw_cpu_r_intr0___spu_6___bit 22
456#define reg_iop_sw_cpu_r_intr0___spu_7___lsb 23
457#define reg_iop_sw_cpu_r_intr0___spu_7___width 1
458#define reg_iop_sw_cpu_r_intr0___spu_7___bit 23
459#define reg_iop_sw_cpu_r_intr0___spu_8___lsb 24
460#define reg_iop_sw_cpu_r_intr0___spu_8___width 1
461#define reg_iop_sw_cpu_r_intr0___spu_8___bit 24
462#define reg_iop_sw_cpu_r_intr0___spu_9___lsb 25
463#define reg_iop_sw_cpu_r_intr0___spu_9___width 1
464#define reg_iop_sw_cpu_r_intr0___spu_9___bit 25
465#define reg_iop_sw_cpu_r_intr0___spu_10___lsb 26
466#define reg_iop_sw_cpu_r_intr0___spu_10___width 1
467#define reg_iop_sw_cpu_r_intr0___spu_10___bit 26
468#define reg_iop_sw_cpu_r_intr0___spu_11___lsb 27
469#define reg_iop_sw_cpu_r_intr0___spu_11___width 1
470#define reg_iop_sw_cpu_r_intr0___spu_11___bit 27
471#define reg_iop_sw_cpu_r_intr0___spu_12___lsb 28
472#define reg_iop_sw_cpu_r_intr0___spu_12___width 1
473#define reg_iop_sw_cpu_r_intr0___spu_12___bit 28
474#define reg_iop_sw_cpu_r_intr0___spu_13___lsb 29
475#define reg_iop_sw_cpu_r_intr0___spu_13___width 1
476#define reg_iop_sw_cpu_r_intr0___spu_13___bit 29
477#define reg_iop_sw_cpu_r_intr0___spu_14___lsb 30
478#define reg_iop_sw_cpu_r_intr0___spu_14___width 1
479#define reg_iop_sw_cpu_r_intr0___spu_14___bit 30
480#define reg_iop_sw_cpu_r_intr0___spu_15___lsb 31
481#define reg_iop_sw_cpu_r_intr0___spu_15___width 1
482#define reg_iop_sw_cpu_r_intr0___spu_15___bit 31
483#define reg_iop_sw_cpu_r_intr0_offset 84
484
485/* Register r_masked_intr0, scope iop_sw_cpu, type r */
486#define reg_iop_sw_cpu_r_masked_intr0___mpu_0___lsb 0
487#define reg_iop_sw_cpu_r_masked_intr0___mpu_0___width 1
488#define reg_iop_sw_cpu_r_masked_intr0___mpu_0___bit 0
489#define reg_iop_sw_cpu_r_masked_intr0___mpu_1___lsb 1
490#define reg_iop_sw_cpu_r_masked_intr0___mpu_1___width 1
491#define reg_iop_sw_cpu_r_masked_intr0___mpu_1___bit 1
492#define reg_iop_sw_cpu_r_masked_intr0___mpu_2___lsb 2
493#define reg_iop_sw_cpu_r_masked_intr0___mpu_2___width 1
494#define reg_iop_sw_cpu_r_masked_intr0___mpu_2___bit 2
495#define reg_iop_sw_cpu_r_masked_intr0___mpu_3___lsb 3
496#define reg_iop_sw_cpu_r_masked_intr0___mpu_3___width 1
497#define reg_iop_sw_cpu_r_masked_intr0___mpu_3___bit 3
498#define reg_iop_sw_cpu_r_masked_intr0___mpu_4___lsb 4
499#define reg_iop_sw_cpu_r_masked_intr0___mpu_4___width 1
500#define reg_iop_sw_cpu_r_masked_intr0___mpu_4___bit 4
501#define reg_iop_sw_cpu_r_masked_intr0___mpu_5___lsb 5
502#define reg_iop_sw_cpu_r_masked_intr0___mpu_5___width 1
503#define reg_iop_sw_cpu_r_masked_intr0___mpu_5___bit 5
504#define reg_iop_sw_cpu_r_masked_intr0___mpu_6___lsb 6
505#define reg_iop_sw_cpu_r_masked_intr0___mpu_6___width 1
506#define reg_iop_sw_cpu_r_masked_intr0___mpu_6___bit 6
507#define reg_iop_sw_cpu_r_masked_intr0___mpu_7___lsb 7
508#define reg_iop_sw_cpu_r_masked_intr0___mpu_7___width 1
509#define reg_iop_sw_cpu_r_masked_intr0___mpu_7___bit 7
510#define reg_iop_sw_cpu_r_masked_intr0___mpu_8___lsb 8
511#define reg_iop_sw_cpu_r_masked_intr0___mpu_8___width 1
512#define reg_iop_sw_cpu_r_masked_intr0___mpu_8___bit 8
513#define reg_iop_sw_cpu_r_masked_intr0___mpu_9___lsb 9
514#define reg_iop_sw_cpu_r_masked_intr0___mpu_9___width 1
515#define reg_iop_sw_cpu_r_masked_intr0___mpu_9___bit 9
516#define reg_iop_sw_cpu_r_masked_intr0___mpu_10___lsb 10
517#define reg_iop_sw_cpu_r_masked_intr0___mpu_10___width 1
518#define reg_iop_sw_cpu_r_masked_intr0___mpu_10___bit 10
519#define reg_iop_sw_cpu_r_masked_intr0___mpu_11___lsb 11
520#define reg_iop_sw_cpu_r_masked_intr0___mpu_11___width 1
521#define reg_iop_sw_cpu_r_masked_intr0___mpu_11___bit 11
522#define reg_iop_sw_cpu_r_masked_intr0___mpu_12___lsb 12
523#define reg_iop_sw_cpu_r_masked_intr0___mpu_12___width 1
524#define reg_iop_sw_cpu_r_masked_intr0___mpu_12___bit 12
525#define reg_iop_sw_cpu_r_masked_intr0___mpu_13___lsb 13
526#define reg_iop_sw_cpu_r_masked_intr0___mpu_13___width 1
527#define reg_iop_sw_cpu_r_masked_intr0___mpu_13___bit 13
528#define reg_iop_sw_cpu_r_masked_intr0___mpu_14___lsb 14
529#define reg_iop_sw_cpu_r_masked_intr0___mpu_14___width 1
530#define reg_iop_sw_cpu_r_masked_intr0___mpu_14___bit 14
531#define reg_iop_sw_cpu_r_masked_intr0___mpu_15___lsb 15
532#define reg_iop_sw_cpu_r_masked_intr0___mpu_15___width 1
533#define reg_iop_sw_cpu_r_masked_intr0___mpu_15___bit 15
534#define reg_iop_sw_cpu_r_masked_intr0___spu_0___lsb 16
535#define reg_iop_sw_cpu_r_masked_intr0___spu_0___width 1
536#define reg_iop_sw_cpu_r_masked_intr0___spu_0___bit 16
537#define reg_iop_sw_cpu_r_masked_intr0___spu_1___lsb 17
538#define reg_iop_sw_cpu_r_masked_intr0___spu_1___width 1
539#define reg_iop_sw_cpu_r_masked_intr0___spu_1___bit 17
540#define reg_iop_sw_cpu_r_masked_intr0___spu_2___lsb 18
541#define reg_iop_sw_cpu_r_masked_intr0___spu_2___width 1
542#define reg_iop_sw_cpu_r_masked_intr0___spu_2___bit 18
543#define reg_iop_sw_cpu_r_masked_intr0___spu_3___lsb 19
544#define reg_iop_sw_cpu_r_masked_intr0___spu_3___width 1
545#define reg_iop_sw_cpu_r_masked_intr0___spu_3___bit 19
546#define reg_iop_sw_cpu_r_masked_intr0___spu_4___lsb 20
547#define reg_iop_sw_cpu_r_masked_intr0___spu_4___width 1
548#define reg_iop_sw_cpu_r_masked_intr0___spu_4___bit 20
549#define reg_iop_sw_cpu_r_masked_intr0___spu_5___lsb 21
550#define reg_iop_sw_cpu_r_masked_intr0___spu_5___width 1
551#define reg_iop_sw_cpu_r_masked_intr0___spu_5___bit 21
552#define reg_iop_sw_cpu_r_masked_intr0___spu_6___lsb 22
553#define reg_iop_sw_cpu_r_masked_intr0___spu_6___width 1
554#define reg_iop_sw_cpu_r_masked_intr0___spu_6___bit 22
555#define reg_iop_sw_cpu_r_masked_intr0___spu_7___lsb 23
556#define reg_iop_sw_cpu_r_masked_intr0___spu_7___width 1
557#define reg_iop_sw_cpu_r_masked_intr0___spu_7___bit 23
558#define reg_iop_sw_cpu_r_masked_intr0___spu_8___lsb 24
559#define reg_iop_sw_cpu_r_masked_intr0___spu_8___width 1
560#define reg_iop_sw_cpu_r_masked_intr0___spu_8___bit 24
561#define reg_iop_sw_cpu_r_masked_intr0___spu_9___lsb 25
562#define reg_iop_sw_cpu_r_masked_intr0___spu_9___width 1
563#define reg_iop_sw_cpu_r_masked_intr0___spu_9___bit 25
564#define reg_iop_sw_cpu_r_masked_intr0___spu_10___lsb 26
565#define reg_iop_sw_cpu_r_masked_intr0___spu_10___width 1
566#define reg_iop_sw_cpu_r_masked_intr0___spu_10___bit 26
567#define reg_iop_sw_cpu_r_masked_intr0___spu_11___lsb 27
568#define reg_iop_sw_cpu_r_masked_intr0___spu_11___width 1
569#define reg_iop_sw_cpu_r_masked_intr0___spu_11___bit 27
570#define reg_iop_sw_cpu_r_masked_intr0___spu_12___lsb 28
571#define reg_iop_sw_cpu_r_masked_intr0___spu_12___width 1
572#define reg_iop_sw_cpu_r_masked_intr0___spu_12___bit 28
573#define reg_iop_sw_cpu_r_masked_intr0___spu_13___lsb 29
574#define reg_iop_sw_cpu_r_masked_intr0___spu_13___width 1
575#define reg_iop_sw_cpu_r_masked_intr0___spu_13___bit 29
576#define reg_iop_sw_cpu_r_masked_intr0___spu_14___lsb 30
577#define reg_iop_sw_cpu_r_masked_intr0___spu_14___width 1
578#define reg_iop_sw_cpu_r_masked_intr0___spu_14___bit 30
579#define reg_iop_sw_cpu_r_masked_intr0___spu_15___lsb 31
580#define reg_iop_sw_cpu_r_masked_intr0___spu_15___width 1
581#define reg_iop_sw_cpu_r_masked_intr0___spu_15___bit 31
582#define reg_iop_sw_cpu_r_masked_intr0_offset 88
583
584/* Register rw_intr1_mask, scope iop_sw_cpu, type rw */
585#define reg_iop_sw_cpu_rw_intr1_mask___mpu_16___lsb 0
586#define reg_iop_sw_cpu_rw_intr1_mask___mpu_16___width 1
587#define reg_iop_sw_cpu_rw_intr1_mask___mpu_16___bit 0
588#define reg_iop_sw_cpu_rw_intr1_mask___mpu_17___lsb 1
589#define reg_iop_sw_cpu_rw_intr1_mask___mpu_17___width 1
590#define reg_iop_sw_cpu_rw_intr1_mask___mpu_17___bit 1
591#define reg_iop_sw_cpu_rw_intr1_mask___mpu_18___lsb 2
592#define reg_iop_sw_cpu_rw_intr1_mask___mpu_18___width 1
593#define reg_iop_sw_cpu_rw_intr1_mask___mpu_18___bit 2
594#define reg_iop_sw_cpu_rw_intr1_mask___mpu_19___lsb 3
595#define reg_iop_sw_cpu_rw_intr1_mask___mpu_19___width 1
596#define reg_iop_sw_cpu_rw_intr1_mask___mpu_19___bit 3
597#define reg_iop_sw_cpu_rw_intr1_mask___mpu_20___lsb 4
598#define reg_iop_sw_cpu_rw_intr1_mask___mpu_20___width 1
599#define reg_iop_sw_cpu_rw_intr1_mask___mpu_20___bit 4
600#define reg_iop_sw_cpu_rw_intr1_mask___mpu_21___lsb 5
601#define reg_iop_sw_cpu_rw_intr1_mask___mpu_21___width 1
602#define reg_iop_sw_cpu_rw_intr1_mask___mpu_21___bit 5
603#define reg_iop_sw_cpu_rw_intr1_mask___mpu_22___lsb 6
604#define reg_iop_sw_cpu_rw_intr1_mask___mpu_22___width 1
605#define reg_iop_sw_cpu_rw_intr1_mask___mpu_22___bit 6
606#define reg_iop_sw_cpu_rw_intr1_mask___mpu_23___lsb 7
607#define reg_iop_sw_cpu_rw_intr1_mask___mpu_23___width 1
608#define reg_iop_sw_cpu_rw_intr1_mask___mpu_23___bit 7
609#define reg_iop_sw_cpu_rw_intr1_mask___mpu_24___lsb 8
610#define reg_iop_sw_cpu_rw_intr1_mask___mpu_24___width 1
611#define reg_iop_sw_cpu_rw_intr1_mask___mpu_24___bit 8
612#define reg_iop_sw_cpu_rw_intr1_mask___mpu_25___lsb 9
613#define reg_iop_sw_cpu_rw_intr1_mask___mpu_25___width 1
614#define reg_iop_sw_cpu_rw_intr1_mask___mpu_25___bit 9
615#define reg_iop_sw_cpu_rw_intr1_mask___mpu_26___lsb 10
616#define reg_iop_sw_cpu_rw_intr1_mask___mpu_26___width 1
617#define reg_iop_sw_cpu_rw_intr1_mask___mpu_26___bit 10
618#define reg_iop_sw_cpu_rw_intr1_mask___mpu_27___lsb 11
619#define reg_iop_sw_cpu_rw_intr1_mask___mpu_27___width 1
620#define reg_iop_sw_cpu_rw_intr1_mask___mpu_27___bit 11
621#define reg_iop_sw_cpu_rw_intr1_mask___mpu_28___lsb 12
622#define reg_iop_sw_cpu_rw_intr1_mask___mpu_28___width 1
623#define reg_iop_sw_cpu_rw_intr1_mask___mpu_28___bit 12
624#define reg_iop_sw_cpu_rw_intr1_mask___mpu_29___lsb 13
625#define reg_iop_sw_cpu_rw_intr1_mask___mpu_29___width 1
626#define reg_iop_sw_cpu_rw_intr1_mask___mpu_29___bit 13
627#define reg_iop_sw_cpu_rw_intr1_mask___mpu_30___lsb 14
628#define reg_iop_sw_cpu_rw_intr1_mask___mpu_30___width 1
629#define reg_iop_sw_cpu_rw_intr1_mask___mpu_30___bit 14
630#define reg_iop_sw_cpu_rw_intr1_mask___mpu_31___lsb 15
631#define reg_iop_sw_cpu_rw_intr1_mask___mpu_31___width 1
632#define reg_iop_sw_cpu_rw_intr1_mask___mpu_31___bit 15
633#define reg_iop_sw_cpu_rw_intr1_mask___dmc_in___lsb 16
634#define reg_iop_sw_cpu_rw_intr1_mask___dmc_in___width 1
635#define reg_iop_sw_cpu_rw_intr1_mask___dmc_in___bit 16
636#define reg_iop_sw_cpu_rw_intr1_mask___dmc_out___lsb 17
637#define reg_iop_sw_cpu_rw_intr1_mask___dmc_out___width 1
638#define reg_iop_sw_cpu_rw_intr1_mask___dmc_out___bit 17
639#define reg_iop_sw_cpu_rw_intr1_mask___fifo_in___lsb 18
640#define reg_iop_sw_cpu_rw_intr1_mask___fifo_in___width 1
641#define reg_iop_sw_cpu_rw_intr1_mask___fifo_in___bit 18
642#define reg_iop_sw_cpu_rw_intr1_mask___fifo_out___lsb 19
643#define reg_iop_sw_cpu_rw_intr1_mask___fifo_out___width 1
644#define reg_iop_sw_cpu_rw_intr1_mask___fifo_out___bit 19
645#define reg_iop_sw_cpu_rw_intr1_mask___fifo_in_extra___lsb 20
646#define reg_iop_sw_cpu_rw_intr1_mask___fifo_in_extra___width 1
647#define reg_iop_sw_cpu_rw_intr1_mask___fifo_in_extra___bit 20
648#define reg_iop_sw_cpu_rw_intr1_mask___fifo_out_extra___lsb 21
649#define reg_iop_sw_cpu_rw_intr1_mask___fifo_out_extra___width 1
650#define reg_iop_sw_cpu_rw_intr1_mask___fifo_out_extra___bit 21
651#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp0___lsb 22
652#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp0___width 1
653#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp0___bit 22
654#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp1___lsb 23
655#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp1___width 1
656#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp1___bit 23
657#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp2___lsb 24
658#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp2___width 1
659#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp2___bit 24
660#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp3___lsb 25
661#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp3___width 1
662#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp3___bit 25
663#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp4___lsb 26
664#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp4___width 1
665#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp4___bit 26
666#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp5___lsb 27
667#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp5___width 1
668#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp5___bit 27
669#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp6___lsb 28
670#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp6___width 1
671#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp6___bit 28
672#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp7___lsb 29
673#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp7___width 1
674#define reg_iop_sw_cpu_rw_intr1_mask___trigger_grp7___bit 29
675#define reg_iop_sw_cpu_rw_intr1_mask___timer_grp0___lsb 30
676#define reg_iop_sw_cpu_rw_intr1_mask___timer_grp0___width 1
677#define reg_iop_sw_cpu_rw_intr1_mask___timer_grp0___bit 30
678#define reg_iop_sw_cpu_rw_intr1_mask___timer_grp1___lsb 31
679#define reg_iop_sw_cpu_rw_intr1_mask___timer_grp1___width 1
680#define reg_iop_sw_cpu_rw_intr1_mask___timer_grp1___bit 31
681#define reg_iop_sw_cpu_rw_intr1_mask_offset 92
682
683/* Register rw_ack_intr1, scope iop_sw_cpu, type rw */
684#define reg_iop_sw_cpu_rw_ack_intr1___mpu_16___lsb 0
685#define reg_iop_sw_cpu_rw_ack_intr1___mpu_16___width 1
686#define reg_iop_sw_cpu_rw_ack_intr1___mpu_16___bit 0
687#define reg_iop_sw_cpu_rw_ack_intr1___mpu_17___lsb 1
688#define reg_iop_sw_cpu_rw_ack_intr1___mpu_17___width 1
689#define reg_iop_sw_cpu_rw_ack_intr1___mpu_17___bit 1
690#define reg_iop_sw_cpu_rw_ack_intr1___mpu_18___lsb 2
691#define reg_iop_sw_cpu_rw_ack_intr1___mpu_18___width 1
692#define reg_iop_sw_cpu_rw_ack_intr1___mpu_18___bit 2
693#define reg_iop_sw_cpu_rw_ack_intr1___mpu_19___lsb 3
694#define reg_iop_sw_cpu_rw_ack_intr1___mpu_19___width 1
695#define reg_iop_sw_cpu_rw_ack_intr1___mpu_19___bit 3
696#define reg_iop_sw_cpu_rw_ack_intr1___mpu_20___lsb 4
697#define reg_iop_sw_cpu_rw_ack_intr1___mpu_20___width 1
698#define reg_iop_sw_cpu_rw_ack_intr1___mpu_20___bit 4
699#define reg_iop_sw_cpu_rw_ack_intr1___mpu_21___lsb 5
700#define reg_iop_sw_cpu_rw_ack_intr1___mpu_21___width 1
701#define reg_iop_sw_cpu_rw_ack_intr1___mpu_21___bit 5
702#define reg_iop_sw_cpu_rw_ack_intr1___mpu_22___lsb 6
703#define reg_iop_sw_cpu_rw_ack_intr1___mpu_22___width 1
704#define reg_iop_sw_cpu_rw_ack_intr1___mpu_22___bit 6
705#define reg_iop_sw_cpu_rw_ack_intr1___mpu_23___lsb 7
706#define reg_iop_sw_cpu_rw_ack_intr1___mpu_23___width 1
707#define reg_iop_sw_cpu_rw_ack_intr1___mpu_23___bit 7
708#define reg_iop_sw_cpu_rw_ack_intr1___mpu_24___lsb 8
709#define reg_iop_sw_cpu_rw_ack_intr1___mpu_24___width 1
710#define reg_iop_sw_cpu_rw_ack_intr1___mpu_24___bit 8
711#define reg_iop_sw_cpu_rw_ack_intr1___mpu_25___lsb 9
712#define reg_iop_sw_cpu_rw_ack_intr1___mpu_25___width 1
713#define reg_iop_sw_cpu_rw_ack_intr1___mpu_25___bit 9
714#define reg_iop_sw_cpu_rw_ack_intr1___mpu_26___lsb 10
715#define reg_iop_sw_cpu_rw_ack_intr1___mpu_26___width 1
716#define reg_iop_sw_cpu_rw_ack_intr1___mpu_26___bit 10
717#define reg_iop_sw_cpu_rw_ack_intr1___mpu_27___lsb 11
718#define reg_iop_sw_cpu_rw_ack_intr1___mpu_27___width 1
719#define reg_iop_sw_cpu_rw_ack_intr1___mpu_27___bit 11
720#define reg_iop_sw_cpu_rw_ack_intr1___mpu_28___lsb 12
721#define reg_iop_sw_cpu_rw_ack_intr1___mpu_28___width 1
722#define reg_iop_sw_cpu_rw_ack_intr1___mpu_28___bit 12
723#define reg_iop_sw_cpu_rw_ack_intr1___mpu_29___lsb 13
724#define reg_iop_sw_cpu_rw_ack_intr1___mpu_29___width 1
725#define reg_iop_sw_cpu_rw_ack_intr1___mpu_29___bit 13
726#define reg_iop_sw_cpu_rw_ack_intr1___mpu_30___lsb 14
727#define reg_iop_sw_cpu_rw_ack_intr1___mpu_30___width 1
728#define reg_iop_sw_cpu_rw_ack_intr1___mpu_30___bit 14
729#define reg_iop_sw_cpu_rw_ack_intr1___mpu_31___lsb 15
730#define reg_iop_sw_cpu_rw_ack_intr1___mpu_31___width 1
731#define reg_iop_sw_cpu_rw_ack_intr1___mpu_31___bit 15
732#define reg_iop_sw_cpu_rw_ack_intr1_offset 96
733
734/* Register r_intr1, scope iop_sw_cpu, type r */
735#define reg_iop_sw_cpu_r_intr1___mpu_16___lsb 0
736#define reg_iop_sw_cpu_r_intr1___mpu_16___width 1
737#define reg_iop_sw_cpu_r_intr1___mpu_16___bit 0
738#define reg_iop_sw_cpu_r_intr1___mpu_17___lsb 1
739#define reg_iop_sw_cpu_r_intr1___mpu_17___width 1
740#define reg_iop_sw_cpu_r_intr1___mpu_17___bit 1
741#define reg_iop_sw_cpu_r_intr1___mpu_18___lsb 2
742#define reg_iop_sw_cpu_r_intr1___mpu_18___width 1
743#define reg_iop_sw_cpu_r_intr1___mpu_18___bit 2
744#define reg_iop_sw_cpu_r_intr1___mpu_19___lsb 3
745#define reg_iop_sw_cpu_r_intr1___mpu_19___width 1
746#define reg_iop_sw_cpu_r_intr1___mpu_19___bit 3
747#define reg_iop_sw_cpu_r_intr1___mpu_20___lsb 4
748#define reg_iop_sw_cpu_r_intr1___mpu_20___width 1
749#define reg_iop_sw_cpu_r_intr1___mpu_20___bit 4
750#define reg_iop_sw_cpu_r_intr1___mpu_21___lsb 5
751#define reg_iop_sw_cpu_r_intr1___mpu_21___width 1
752#define reg_iop_sw_cpu_r_intr1___mpu_21___bit 5
753#define reg_iop_sw_cpu_r_intr1___mpu_22___lsb 6
754#define reg_iop_sw_cpu_r_intr1___mpu_22___width 1
755#define reg_iop_sw_cpu_r_intr1___mpu_22___bit 6
756#define reg_iop_sw_cpu_r_intr1___mpu_23___lsb 7
757#define reg_iop_sw_cpu_r_intr1___mpu_23___width 1
758#define reg_iop_sw_cpu_r_intr1___mpu_23___bit 7
759#define reg_iop_sw_cpu_r_intr1___mpu_24___lsb 8
760#define reg_iop_sw_cpu_r_intr1___mpu_24___width 1
761#define reg_iop_sw_cpu_r_intr1___mpu_24___bit 8
762#define reg_iop_sw_cpu_r_intr1___mpu_25___lsb 9
763#define reg_iop_sw_cpu_r_intr1___mpu_25___width 1
764#define reg_iop_sw_cpu_r_intr1___mpu_25___bit 9
765#define reg_iop_sw_cpu_r_intr1___mpu_26___lsb 10
766#define reg_iop_sw_cpu_r_intr1___mpu_26___width 1
767#define reg_iop_sw_cpu_r_intr1___mpu_26___bit 10
768#define reg_iop_sw_cpu_r_intr1___mpu_27___lsb 11
769#define reg_iop_sw_cpu_r_intr1___mpu_27___width 1
770#define reg_iop_sw_cpu_r_intr1___mpu_27___bit 11
771#define reg_iop_sw_cpu_r_intr1___mpu_28___lsb 12
772#define reg_iop_sw_cpu_r_intr1___mpu_28___width 1
773#define reg_iop_sw_cpu_r_intr1___mpu_28___bit 12
774#define reg_iop_sw_cpu_r_intr1___mpu_29___lsb 13
775#define reg_iop_sw_cpu_r_intr1___mpu_29___width 1
776#define reg_iop_sw_cpu_r_intr1___mpu_29___bit 13
777#define reg_iop_sw_cpu_r_intr1___mpu_30___lsb 14
778#define reg_iop_sw_cpu_r_intr1___mpu_30___width 1
779#define reg_iop_sw_cpu_r_intr1___mpu_30___bit 14
780#define reg_iop_sw_cpu_r_intr1___mpu_31___lsb 15
781#define reg_iop_sw_cpu_r_intr1___mpu_31___width 1
782#define reg_iop_sw_cpu_r_intr1___mpu_31___bit 15
783#define reg_iop_sw_cpu_r_intr1___dmc_in___lsb 16
784#define reg_iop_sw_cpu_r_intr1___dmc_in___width 1
785#define reg_iop_sw_cpu_r_intr1___dmc_in___bit 16
786#define reg_iop_sw_cpu_r_intr1___dmc_out___lsb 17
787#define reg_iop_sw_cpu_r_intr1___dmc_out___width 1
788#define reg_iop_sw_cpu_r_intr1___dmc_out___bit 17
789#define reg_iop_sw_cpu_r_intr1___fifo_in___lsb 18
790#define reg_iop_sw_cpu_r_intr1___fifo_in___width 1
791#define reg_iop_sw_cpu_r_intr1___fifo_in___bit 18
792#define reg_iop_sw_cpu_r_intr1___fifo_out___lsb 19
793#define reg_iop_sw_cpu_r_intr1___fifo_out___width 1
794#define reg_iop_sw_cpu_r_intr1___fifo_out___bit 19
795#define reg_iop_sw_cpu_r_intr1___fifo_in_extra___lsb 20
796#define reg_iop_sw_cpu_r_intr1___fifo_in_extra___width 1
797#define reg_iop_sw_cpu_r_intr1___fifo_in_extra___bit 20
798#define reg_iop_sw_cpu_r_intr1___fifo_out_extra___lsb 21
799#define reg_iop_sw_cpu_r_intr1___fifo_out_extra___width 1
800#define reg_iop_sw_cpu_r_intr1___fifo_out_extra___bit 21
801#define reg_iop_sw_cpu_r_intr1___trigger_grp0___lsb 22
802#define reg_iop_sw_cpu_r_intr1___trigger_grp0___width 1
803#define reg_iop_sw_cpu_r_intr1___trigger_grp0___bit 22
804#define reg_iop_sw_cpu_r_intr1___trigger_grp1___lsb 23
805#define reg_iop_sw_cpu_r_intr1___trigger_grp1___width 1
806#define reg_iop_sw_cpu_r_intr1___trigger_grp1___bit 23
807#define reg_iop_sw_cpu_r_intr1___trigger_grp2___lsb 24
808#define reg_iop_sw_cpu_r_intr1___trigger_grp2___width 1
809#define reg_iop_sw_cpu_r_intr1___trigger_grp2___bit 24
810#define reg_iop_sw_cpu_r_intr1___trigger_grp3___lsb 25
811#define reg_iop_sw_cpu_r_intr1___trigger_grp3___width 1
812#define reg_iop_sw_cpu_r_intr1___trigger_grp3___bit 25
813#define reg_iop_sw_cpu_r_intr1___trigger_grp4___lsb 26
814#define reg_iop_sw_cpu_r_intr1___trigger_grp4___width 1
815#define reg_iop_sw_cpu_r_intr1___trigger_grp4___bit 26
816#define reg_iop_sw_cpu_r_intr1___trigger_grp5___lsb 27
817#define reg_iop_sw_cpu_r_intr1___trigger_grp5___width 1
818#define reg_iop_sw_cpu_r_intr1___trigger_grp5___bit 27
819#define reg_iop_sw_cpu_r_intr1___trigger_grp6___lsb 28
820#define reg_iop_sw_cpu_r_intr1___trigger_grp6___width 1
821#define reg_iop_sw_cpu_r_intr1___trigger_grp6___bit 28
822#define reg_iop_sw_cpu_r_intr1___trigger_grp7___lsb 29
823#define reg_iop_sw_cpu_r_intr1___trigger_grp7___width 1
824#define reg_iop_sw_cpu_r_intr1___trigger_grp7___bit 29
825#define reg_iop_sw_cpu_r_intr1___timer_grp0___lsb 30
826#define reg_iop_sw_cpu_r_intr1___timer_grp0___width 1
827#define reg_iop_sw_cpu_r_intr1___timer_grp0___bit 30
828#define reg_iop_sw_cpu_r_intr1___timer_grp1___lsb 31
829#define reg_iop_sw_cpu_r_intr1___timer_grp1___width 1
830#define reg_iop_sw_cpu_r_intr1___timer_grp1___bit 31
831#define reg_iop_sw_cpu_r_intr1_offset 100
832
833/* Register r_masked_intr1, scope iop_sw_cpu, type r */
834#define reg_iop_sw_cpu_r_masked_intr1___mpu_16___lsb 0
835#define reg_iop_sw_cpu_r_masked_intr1___mpu_16___width 1
836#define reg_iop_sw_cpu_r_masked_intr1___mpu_16___bit 0
837#define reg_iop_sw_cpu_r_masked_intr1___mpu_17___lsb 1
838#define reg_iop_sw_cpu_r_masked_intr1___mpu_17___width 1
839#define reg_iop_sw_cpu_r_masked_intr1___mpu_17___bit 1
840#define reg_iop_sw_cpu_r_masked_intr1___mpu_18___lsb 2
841#define reg_iop_sw_cpu_r_masked_intr1___mpu_18___width 1
842#define reg_iop_sw_cpu_r_masked_intr1___mpu_18___bit 2
843#define reg_iop_sw_cpu_r_masked_intr1___mpu_19___lsb 3
844#define reg_iop_sw_cpu_r_masked_intr1___mpu_19___width 1
845#define reg_iop_sw_cpu_r_masked_intr1___mpu_19___bit 3
846#define reg_iop_sw_cpu_r_masked_intr1___mpu_20___lsb 4
847#define reg_iop_sw_cpu_r_masked_intr1___mpu_20___width 1
848#define reg_iop_sw_cpu_r_masked_intr1___mpu_20___bit 4
849#define reg_iop_sw_cpu_r_masked_intr1___mpu_21___lsb 5
850#define reg_iop_sw_cpu_r_masked_intr1___mpu_21___width 1
851#define reg_iop_sw_cpu_r_masked_intr1___mpu_21___bit 5
852#define reg_iop_sw_cpu_r_masked_intr1___mpu_22___lsb 6
853#define reg_iop_sw_cpu_r_masked_intr1___mpu_22___width 1
854#define reg_iop_sw_cpu_r_masked_intr1___mpu_22___bit 6
855#define reg_iop_sw_cpu_r_masked_intr1___mpu_23___lsb 7
856#define reg_iop_sw_cpu_r_masked_intr1___mpu_23___width 1
857#define reg_iop_sw_cpu_r_masked_intr1___mpu_23___bit 7
858#define reg_iop_sw_cpu_r_masked_intr1___mpu_24___lsb 8
859#define reg_iop_sw_cpu_r_masked_intr1___mpu_24___width 1
860#define reg_iop_sw_cpu_r_masked_intr1___mpu_24___bit 8
861#define reg_iop_sw_cpu_r_masked_intr1___mpu_25___lsb 9
862#define reg_iop_sw_cpu_r_masked_intr1___mpu_25___width 1
863#define reg_iop_sw_cpu_r_masked_intr1___mpu_25___bit 9
864#define reg_iop_sw_cpu_r_masked_intr1___mpu_26___lsb 10
865#define reg_iop_sw_cpu_r_masked_intr1___mpu_26___width 1
866#define reg_iop_sw_cpu_r_masked_intr1___mpu_26___bit 10
867#define reg_iop_sw_cpu_r_masked_intr1___mpu_27___lsb 11
868#define reg_iop_sw_cpu_r_masked_intr1___mpu_27___width 1
869#define reg_iop_sw_cpu_r_masked_intr1___mpu_27___bit 11
870#define reg_iop_sw_cpu_r_masked_intr1___mpu_28___lsb 12
871#define reg_iop_sw_cpu_r_masked_intr1___mpu_28___width 1
872#define reg_iop_sw_cpu_r_masked_intr1___mpu_28___bit 12
873#define reg_iop_sw_cpu_r_masked_intr1___mpu_29___lsb 13
874#define reg_iop_sw_cpu_r_masked_intr1___mpu_29___width 1
875#define reg_iop_sw_cpu_r_masked_intr1___mpu_29___bit 13
876#define reg_iop_sw_cpu_r_masked_intr1___mpu_30___lsb 14
877#define reg_iop_sw_cpu_r_masked_intr1___mpu_30___width 1
878#define reg_iop_sw_cpu_r_masked_intr1___mpu_30___bit 14
879#define reg_iop_sw_cpu_r_masked_intr1___mpu_31___lsb 15
880#define reg_iop_sw_cpu_r_masked_intr1___mpu_31___width 1
881#define reg_iop_sw_cpu_r_masked_intr1___mpu_31___bit 15
882#define reg_iop_sw_cpu_r_masked_intr1___dmc_in___lsb 16
883#define reg_iop_sw_cpu_r_masked_intr1___dmc_in___width 1
884#define reg_iop_sw_cpu_r_masked_intr1___dmc_in___bit 16
885#define reg_iop_sw_cpu_r_masked_intr1___dmc_out___lsb 17
886#define reg_iop_sw_cpu_r_masked_intr1___dmc_out___width 1
887#define reg_iop_sw_cpu_r_masked_intr1___dmc_out___bit 17
888#define reg_iop_sw_cpu_r_masked_intr1___fifo_in___lsb 18
889#define reg_iop_sw_cpu_r_masked_intr1___fifo_in___width 1
890#define reg_iop_sw_cpu_r_masked_intr1___fifo_in___bit 18
891#define reg_iop_sw_cpu_r_masked_intr1___fifo_out___lsb 19
892#define reg_iop_sw_cpu_r_masked_intr1___fifo_out___width 1
893#define reg_iop_sw_cpu_r_masked_intr1___fifo_out___bit 19
894#define reg_iop_sw_cpu_r_masked_intr1___fifo_in_extra___lsb 20
895#define reg_iop_sw_cpu_r_masked_intr1___fifo_in_extra___width 1
896#define reg_iop_sw_cpu_r_masked_intr1___fifo_in_extra___bit 20
897#define reg_iop_sw_cpu_r_masked_intr1___fifo_out_extra___lsb 21
898#define reg_iop_sw_cpu_r_masked_intr1___fifo_out_extra___width 1
899#define reg_iop_sw_cpu_r_masked_intr1___fifo_out_extra___bit 21
900#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp0___lsb 22
901#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp0___width 1
902#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp0___bit 22
903#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp1___lsb 23
904#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp1___width 1
905#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp1___bit 23
906#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp2___lsb 24
907#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp2___width 1
908#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp2___bit 24
909#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp3___lsb 25
910#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp3___width 1
911#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp3___bit 25
912#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp4___lsb 26
913#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp4___width 1
914#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp4___bit 26
915#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp5___lsb 27
916#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp5___width 1
917#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp5___bit 27
918#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp6___lsb 28
919#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp6___width 1
920#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp6___bit 28
921#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp7___lsb 29
922#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp7___width 1
923#define reg_iop_sw_cpu_r_masked_intr1___trigger_grp7___bit 29
924#define reg_iop_sw_cpu_r_masked_intr1___timer_grp0___lsb 30
925#define reg_iop_sw_cpu_r_masked_intr1___timer_grp0___width 1
926#define reg_iop_sw_cpu_r_masked_intr1___timer_grp0___bit 30
927#define reg_iop_sw_cpu_r_masked_intr1___timer_grp1___lsb 31
928#define reg_iop_sw_cpu_r_masked_intr1___timer_grp1___width 1
929#define reg_iop_sw_cpu_r_masked_intr1___timer_grp1___bit 31
930#define reg_iop_sw_cpu_r_masked_intr1_offset 104
931
932
933/* Constants */
934#define regk_iop_sw_cpu_copy 0x00000000
935#define regk_iop_sw_cpu_no 0x00000000
936#define regk_iop_sw_cpu_rd 0x00000002
937#define regk_iop_sw_cpu_reg_copy 0x00000001
938#define regk_iop_sw_cpu_rw_bus_clr_mask_default 0x00000000
939#define regk_iop_sw_cpu_rw_bus_oe_clr_mask_default 0x00000000
940#define regk_iop_sw_cpu_rw_bus_oe_set_mask_default 0x00000000
941#define regk_iop_sw_cpu_rw_bus_set_mask_default 0x00000000
942#define regk_iop_sw_cpu_rw_gio_clr_mask_default 0x00000000
943#define regk_iop_sw_cpu_rw_gio_oe_clr_mask_default 0x00000000
944#define regk_iop_sw_cpu_rw_gio_oe_set_mask_default 0x00000000
945#define regk_iop_sw_cpu_rw_gio_set_mask_default 0x00000000
946#define regk_iop_sw_cpu_rw_intr0_mask_default 0x00000000
947#define regk_iop_sw_cpu_rw_intr1_mask_default 0x00000000
948#define regk_iop_sw_cpu_wr 0x00000003
949#define regk_iop_sw_cpu_yes 0x00000001
950#endif /* __iop_sw_cpu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_mpu_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
deleted file mode 100644
index ffcc83b22d21..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
+++ /dev/null
@@ -1,1086 +0,0 @@
1#ifndef __iop_sw_mpu_defs_asm_h
2#define __iop_sw_mpu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_mpu.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_sw_mpu_defs_asm.h iop_sw_mpu.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register rw_sw_cfg_owner, scope iop_sw_mpu, type rw */
54#define reg_iop_sw_mpu_rw_sw_cfg_owner___cfg___lsb 0
55#define reg_iop_sw_mpu_rw_sw_cfg_owner___cfg___width 2
56#define reg_iop_sw_mpu_rw_sw_cfg_owner_offset 0
57
58/* Register r_spu_trace, scope iop_sw_mpu, type r */
59#define reg_iop_sw_mpu_r_spu_trace_offset 4
60
61/* Register r_spu_fsm_trace, scope iop_sw_mpu, type r */
62#define reg_iop_sw_mpu_r_spu_fsm_trace_offset 8
63
64/* Register rw_mc_ctrl, scope iop_sw_mpu, type rw */
65#define reg_iop_sw_mpu_rw_mc_ctrl___keep_owner___lsb 0
66#define reg_iop_sw_mpu_rw_mc_ctrl___keep_owner___width 1
67#define reg_iop_sw_mpu_rw_mc_ctrl___keep_owner___bit 0
68#define reg_iop_sw_mpu_rw_mc_ctrl___cmd___lsb 1
69#define reg_iop_sw_mpu_rw_mc_ctrl___cmd___width 2
70#define reg_iop_sw_mpu_rw_mc_ctrl___size___lsb 3
71#define reg_iop_sw_mpu_rw_mc_ctrl___size___width 3
72#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu_mem___lsb 6
73#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu_mem___width 1
74#define reg_iop_sw_mpu_rw_mc_ctrl___wr_spu_mem___bit 6
75#define reg_iop_sw_mpu_rw_mc_ctrl_offset 12
76
77/* Register rw_mc_data, scope iop_sw_mpu, type rw */
78#define reg_iop_sw_mpu_rw_mc_data___val___lsb 0
79#define reg_iop_sw_mpu_rw_mc_data___val___width 32
80#define reg_iop_sw_mpu_rw_mc_data_offset 16
81
82/* Register rw_mc_addr, scope iop_sw_mpu, type rw */
83#define reg_iop_sw_mpu_rw_mc_addr_offset 20
84
85/* Register rs_mc_data, scope iop_sw_mpu, type rs */
86#define reg_iop_sw_mpu_rs_mc_data_offset 24
87
88/* Register r_mc_data, scope iop_sw_mpu, type r */
89#define reg_iop_sw_mpu_r_mc_data_offset 28
90
91/* Register r_mc_stat, scope iop_sw_mpu, type r */
92#define reg_iop_sw_mpu_r_mc_stat___busy_cpu___lsb 0
93#define reg_iop_sw_mpu_r_mc_stat___busy_cpu___width 1
94#define reg_iop_sw_mpu_r_mc_stat___busy_cpu___bit 0
95#define reg_iop_sw_mpu_r_mc_stat___busy_mpu___lsb 1
96#define reg_iop_sw_mpu_r_mc_stat___busy_mpu___width 1
97#define reg_iop_sw_mpu_r_mc_stat___busy_mpu___bit 1
98#define reg_iop_sw_mpu_r_mc_stat___busy_spu___lsb 2
99#define reg_iop_sw_mpu_r_mc_stat___busy_spu___width 1
100#define reg_iop_sw_mpu_r_mc_stat___busy_spu___bit 2
101#define reg_iop_sw_mpu_r_mc_stat___owned_by_cpu___lsb 3
102#define reg_iop_sw_mpu_r_mc_stat___owned_by_cpu___width 1
103#define reg_iop_sw_mpu_r_mc_stat___owned_by_cpu___bit 3
104#define reg_iop_sw_mpu_r_mc_stat___owned_by_mpu___lsb 4
105#define reg_iop_sw_mpu_r_mc_stat___owned_by_mpu___width 1
106#define reg_iop_sw_mpu_r_mc_stat___owned_by_mpu___bit 4
107#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu___lsb 5
108#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu___width 1
109#define reg_iop_sw_mpu_r_mc_stat___owned_by_spu___bit 5
110#define reg_iop_sw_mpu_r_mc_stat_offset 32
111
112/* Register rw_bus_clr_mask, scope iop_sw_mpu, type rw */
113#define reg_iop_sw_mpu_rw_bus_clr_mask___byte0___lsb 0
114#define reg_iop_sw_mpu_rw_bus_clr_mask___byte0___width 8
115#define reg_iop_sw_mpu_rw_bus_clr_mask___byte1___lsb 8
116#define reg_iop_sw_mpu_rw_bus_clr_mask___byte1___width 8
117#define reg_iop_sw_mpu_rw_bus_clr_mask___byte2___lsb 16
118#define reg_iop_sw_mpu_rw_bus_clr_mask___byte2___width 8
119#define reg_iop_sw_mpu_rw_bus_clr_mask___byte3___lsb 24
120#define reg_iop_sw_mpu_rw_bus_clr_mask___byte3___width 8
121#define reg_iop_sw_mpu_rw_bus_clr_mask_offset 36
122
123/* Register rw_bus_set_mask, scope iop_sw_mpu, type rw */
124#define reg_iop_sw_mpu_rw_bus_set_mask___byte0___lsb 0
125#define reg_iop_sw_mpu_rw_bus_set_mask___byte0___width 8
126#define reg_iop_sw_mpu_rw_bus_set_mask___byte1___lsb 8
127#define reg_iop_sw_mpu_rw_bus_set_mask___byte1___width 8
128#define reg_iop_sw_mpu_rw_bus_set_mask___byte2___lsb 16
129#define reg_iop_sw_mpu_rw_bus_set_mask___byte2___width 8
130#define reg_iop_sw_mpu_rw_bus_set_mask___byte3___lsb 24
131#define reg_iop_sw_mpu_rw_bus_set_mask___byte3___width 8
132#define reg_iop_sw_mpu_rw_bus_set_mask_offset 40
133
134/* Register rw_bus_oe_clr_mask, scope iop_sw_mpu, type rw */
135#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte0___lsb 0
136#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte0___width 1
137#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte0___bit 0
138#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte1___lsb 1
139#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte1___width 1
140#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte1___bit 1
141#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte2___lsb 2
142#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte2___width 1
143#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte2___bit 2
144#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte3___lsb 3
145#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte3___width 1
146#define reg_iop_sw_mpu_rw_bus_oe_clr_mask___byte3___bit 3
147#define reg_iop_sw_mpu_rw_bus_oe_clr_mask_offset 44
148
149/* Register rw_bus_oe_set_mask, scope iop_sw_mpu, type rw */
150#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte0___lsb 0
151#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte0___width 1
152#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte0___bit 0
153#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte1___lsb 1
154#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte1___width 1
155#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte1___bit 1
156#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte2___lsb 2
157#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte2___width 1
158#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte2___bit 2
159#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte3___lsb 3
160#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte3___width 1
161#define reg_iop_sw_mpu_rw_bus_oe_set_mask___byte3___bit 3
162#define reg_iop_sw_mpu_rw_bus_oe_set_mask_offset 48
163
164/* Register r_bus_in, scope iop_sw_mpu, type r */
165#define reg_iop_sw_mpu_r_bus_in_offset 52
166
167/* Register rw_gio_clr_mask, scope iop_sw_mpu, type rw */
168#define reg_iop_sw_mpu_rw_gio_clr_mask___val___lsb 0
169#define reg_iop_sw_mpu_rw_gio_clr_mask___val___width 32
170#define reg_iop_sw_mpu_rw_gio_clr_mask_offset 56
171
172/* Register rw_gio_set_mask, scope iop_sw_mpu, type rw */
173#define reg_iop_sw_mpu_rw_gio_set_mask___val___lsb 0
174#define reg_iop_sw_mpu_rw_gio_set_mask___val___width 32
175#define reg_iop_sw_mpu_rw_gio_set_mask_offset 60
176
177/* Register rw_gio_oe_clr_mask, scope iop_sw_mpu, type rw */
178#define reg_iop_sw_mpu_rw_gio_oe_clr_mask___val___lsb 0
179#define reg_iop_sw_mpu_rw_gio_oe_clr_mask___val___width 32
180#define reg_iop_sw_mpu_rw_gio_oe_clr_mask_offset 64
181
182/* Register rw_gio_oe_set_mask, scope iop_sw_mpu, type rw */
183#define reg_iop_sw_mpu_rw_gio_oe_set_mask___val___lsb 0
184#define reg_iop_sw_mpu_rw_gio_oe_set_mask___val___width 32
185#define reg_iop_sw_mpu_rw_gio_oe_set_mask_offset 68
186
187/* Register r_gio_in, scope iop_sw_mpu, type r */
188#define reg_iop_sw_mpu_r_gio_in_offset 72
189
190/* Register rw_cpu_intr, scope iop_sw_mpu, type rw */
191#define reg_iop_sw_mpu_rw_cpu_intr___intr0___lsb 0
192#define reg_iop_sw_mpu_rw_cpu_intr___intr0___width 1
193#define reg_iop_sw_mpu_rw_cpu_intr___intr0___bit 0
194#define reg_iop_sw_mpu_rw_cpu_intr___intr1___lsb 1
195#define reg_iop_sw_mpu_rw_cpu_intr___intr1___width 1
196#define reg_iop_sw_mpu_rw_cpu_intr___intr1___bit 1
197#define reg_iop_sw_mpu_rw_cpu_intr___intr2___lsb 2
198#define reg_iop_sw_mpu_rw_cpu_intr___intr2___width 1
199#define reg_iop_sw_mpu_rw_cpu_intr___intr2___bit 2
200#define reg_iop_sw_mpu_rw_cpu_intr___intr3___lsb 3
201#define reg_iop_sw_mpu_rw_cpu_intr___intr3___width 1
202#define reg_iop_sw_mpu_rw_cpu_intr___intr3___bit 3
203#define reg_iop_sw_mpu_rw_cpu_intr___intr4___lsb 4
204#define reg_iop_sw_mpu_rw_cpu_intr___intr4___width 1
205#define reg_iop_sw_mpu_rw_cpu_intr___intr4___bit 4
206#define reg_iop_sw_mpu_rw_cpu_intr___intr5___lsb 5
207#define reg_iop_sw_mpu_rw_cpu_intr___intr5___width 1
208#define reg_iop_sw_mpu_rw_cpu_intr___intr5___bit 5
209#define reg_iop_sw_mpu_rw_cpu_intr___intr6___lsb 6
210#define reg_iop_sw_mpu_rw_cpu_intr___intr6___width 1
211#define reg_iop_sw_mpu_rw_cpu_intr___intr6___bit 6
212#define reg_iop_sw_mpu_rw_cpu_intr___intr7___lsb 7
213#define reg_iop_sw_mpu_rw_cpu_intr___intr7___width 1
214#define reg_iop_sw_mpu_rw_cpu_intr___intr7___bit 7
215#define reg_iop_sw_mpu_rw_cpu_intr___intr8___lsb 8
216#define reg_iop_sw_mpu_rw_cpu_intr___intr8___width 1
217#define reg_iop_sw_mpu_rw_cpu_intr___intr8___bit 8
218#define reg_iop_sw_mpu_rw_cpu_intr___intr9___lsb 9
219#define reg_iop_sw_mpu_rw_cpu_intr___intr9___width 1
220#define reg_iop_sw_mpu_rw_cpu_intr___intr9___bit 9
221#define reg_iop_sw_mpu_rw_cpu_intr___intr10___lsb 10
222#define reg_iop_sw_mpu_rw_cpu_intr___intr10___width 1
223#define reg_iop_sw_mpu_rw_cpu_intr___intr10___bit 10
224#define reg_iop_sw_mpu_rw_cpu_intr___intr11___lsb 11
225#define reg_iop_sw_mpu_rw_cpu_intr___intr11___width 1
226#define reg_iop_sw_mpu_rw_cpu_intr___intr11___bit 11
227#define reg_iop_sw_mpu_rw_cpu_intr___intr12___lsb 12
228#define reg_iop_sw_mpu_rw_cpu_intr___intr12___width 1
229#define reg_iop_sw_mpu_rw_cpu_intr___intr12___bit 12
230#define reg_iop_sw_mpu_rw_cpu_intr___intr13___lsb 13
231#define reg_iop_sw_mpu_rw_cpu_intr___intr13___width 1
232#define reg_iop_sw_mpu_rw_cpu_intr___intr13___bit 13
233#define reg_iop_sw_mpu_rw_cpu_intr___intr14___lsb 14
234#define reg_iop_sw_mpu_rw_cpu_intr___intr14___width 1
235#define reg_iop_sw_mpu_rw_cpu_intr___intr14___bit 14
236#define reg_iop_sw_mpu_rw_cpu_intr___intr15___lsb 15
237#define reg_iop_sw_mpu_rw_cpu_intr___intr15___width 1
238#define reg_iop_sw_mpu_rw_cpu_intr___intr15___bit 15
239#define reg_iop_sw_mpu_rw_cpu_intr___intr16___lsb 16
240#define reg_iop_sw_mpu_rw_cpu_intr___intr16___width 1
241#define reg_iop_sw_mpu_rw_cpu_intr___intr16___bit 16
242#define reg_iop_sw_mpu_rw_cpu_intr___intr17___lsb 17
243#define reg_iop_sw_mpu_rw_cpu_intr___intr17___width 1
244#define reg_iop_sw_mpu_rw_cpu_intr___intr17___bit 17
245#define reg_iop_sw_mpu_rw_cpu_intr___intr18___lsb 18
246#define reg_iop_sw_mpu_rw_cpu_intr___intr18___width 1
247#define reg_iop_sw_mpu_rw_cpu_intr___intr18___bit 18
248#define reg_iop_sw_mpu_rw_cpu_intr___intr19___lsb 19
249#define reg_iop_sw_mpu_rw_cpu_intr___intr19___width 1
250#define reg_iop_sw_mpu_rw_cpu_intr___intr19___bit 19
251#define reg_iop_sw_mpu_rw_cpu_intr___intr20___lsb 20
252#define reg_iop_sw_mpu_rw_cpu_intr___intr20___width 1
253#define reg_iop_sw_mpu_rw_cpu_intr___intr20___bit 20
254#define reg_iop_sw_mpu_rw_cpu_intr___intr21___lsb 21
255#define reg_iop_sw_mpu_rw_cpu_intr___intr21___width 1
256#define reg_iop_sw_mpu_rw_cpu_intr___intr21___bit 21
257#define reg_iop_sw_mpu_rw_cpu_intr___intr22___lsb 22
258#define reg_iop_sw_mpu_rw_cpu_intr___intr22___width 1
259#define reg_iop_sw_mpu_rw_cpu_intr___intr22___bit 22
260#define reg_iop_sw_mpu_rw_cpu_intr___intr23___lsb 23
261#define reg_iop_sw_mpu_rw_cpu_intr___intr23___width 1
262#define reg_iop_sw_mpu_rw_cpu_intr___intr23___bit 23
263#define reg_iop_sw_mpu_rw_cpu_intr___intr24___lsb 24
264#define reg_iop_sw_mpu_rw_cpu_intr___intr24___width 1
265#define reg_iop_sw_mpu_rw_cpu_intr___intr24___bit 24
266#define reg_iop_sw_mpu_rw_cpu_intr___intr25___lsb 25
267#define reg_iop_sw_mpu_rw_cpu_intr___intr25___width 1
268#define reg_iop_sw_mpu_rw_cpu_intr___intr25___bit 25
269#define reg_iop_sw_mpu_rw_cpu_intr___intr26___lsb 26
270#define reg_iop_sw_mpu_rw_cpu_intr___intr26___width 1
271#define reg_iop_sw_mpu_rw_cpu_intr___intr26___bit 26
272#define reg_iop_sw_mpu_rw_cpu_intr___intr27___lsb 27
273#define reg_iop_sw_mpu_rw_cpu_intr___intr27___width 1
274#define reg_iop_sw_mpu_rw_cpu_intr___intr27___bit 27
275#define reg_iop_sw_mpu_rw_cpu_intr___intr28___lsb 28
276#define reg_iop_sw_mpu_rw_cpu_intr___intr28___width 1
277#define reg_iop_sw_mpu_rw_cpu_intr___intr28___bit 28
278#define reg_iop_sw_mpu_rw_cpu_intr___intr29___lsb 29
279#define reg_iop_sw_mpu_rw_cpu_intr___intr29___width 1
280#define reg_iop_sw_mpu_rw_cpu_intr___intr29___bit 29
281#define reg_iop_sw_mpu_rw_cpu_intr___intr30___lsb 30
282#define reg_iop_sw_mpu_rw_cpu_intr___intr30___width 1
283#define reg_iop_sw_mpu_rw_cpu_intr___intr30___bit 30
284#define reg_iop_sw_mpu_rw_cpu_intr___intr31___lsb 31
285#define reg_iop_sw_mpu_rw_cpu_intr___intr31___width 1
286#define reg_iop_sw_mpu_rw_cpu_intr___intr31___bit 31
287#define reg_iop_sw_mpu_rw_cpu_intr_offset 76
288
289/* Register r_cpu_intr, scope iop_sw_mpu, type r */
290#define reg_iop_sw_mpu_r_cpu_intr___intr0___lsb 0
291#define reg_iop_sw_mpu_r_cpu_intr___intr0___width 1
292#define reg_iop_sw_mpu_r_cpu_intr___intr0___bit 0
293#define reg_iop_sw_mpu_r_cpu_intr___intr1___lsb 1
294#define reg_iop_sw_mpu_r_cpu_intr___intr1___width 1
295#define reg_iop_sw_mpu_r_cpu_intr___intr1___bit 1
296#define reg_iop_sw_mpu_r_cpu_intr___intr2___lsb 2
297#define reg_iop_sw_mpu_r_cpu_intr___intr2___width 1
298#define reg_iop_sw_mpu_r_cpu_intr___intr2___bit 2
299#define reg_iop_sw_mpu_r_cpu_intr___intr3___lsb 3
300#define reg_iop_sw_mpu_r_cpu_intr___intr3___width 1
301#define reg_iop_sw_mpu_r_cpu_intr___intr3___bit 3
302#define reg_iop_sw_mpu_r_cpu_intr___intr4___lsb 4
303#define reg_iop_sw_mpu_r_cpu_intr___intr4___width 1
304#define reg_iop_sw_mpu_r_cpu_intr___intr4___bit 4
305#define reg_iop_sw_mpu_r_cpu_intr___intr5___lsb 5
306#define reg_iop_sw_mpu_r_cpu_intr___intr5___width 1
307#define reg_iop_sw_mpu_r_cpu_intr___intr5___bit 5
308#define reg_iop_sw_mpu_r_cpu_intr___intr6___lsb 6
309#define reg_iop_sw_mpu_r_cpu_intr___intr6___width 1
310#define reg_iop_sw_mpu_r_cpu_intr___intr6___bit 6
311#define reg_iop_sw_mpu_r_cpu_intr___intr7___lsb 7
312#define reg_iop_sw_mpu_r_cpu_intr___intr7___width 1
313#define reg_iop_sw_mpu_r_cpu_intr___intr7___bit 7
314#define reg_iop_sw_mpu_r_cpu_intr___intr8___lsb 8
315#define reg_iop_sw_mpu_r_cpu_intr___intr8___width 1
316#define reg_iop_sw_mpu_r_cpu_intr___intr8___bit 8
317#define reg_iop_sw_mpu_r_cpu_intr___intr9___lsb 9
318#define reg_iop_sw_mpu_r_cpu_intr___intr9___width 1
319#define reg_iop_sw_mpu_r_cpu_intr___intr9___bit 9
320#define reg_iop_sw_mpu_r_cpu_intr___intr10___lsb 10
321#define reg_iop_sw_mpu_r_cpu_intr___intr10___width 1
322#define reg_iop_sw_mpu_r_cpu_intr___intr10___bit 10
323#define reg_iop_sw_mpu_r_cpu_intr___intr11___lsb 11
324#define reg_iop_sw_mpu_r_cpu_intr___intr11___width 1
325#define reg_iop_sw_mpu_r_cpu_intr___intr11___bit 11
326#define reg_iop_sw_mpu_r_cpu_intr___intr12___lsb 12
327#define reg_iop_sw_mpu_r_cpu_intr___intr12___width 1
328#define reg_iop_sw_mpu_r_cpu_intr___intr12___bit 12
329#define reg_iop_sw_mpu_r_cpu_intr___intr13___lsb 13
330#define reg_iop_sw_mpu_r_cpu_intr___intr13___width 1
331#define reg_iop_sw_mpu_r_cpu_intr___intr13___bit 13
332#define reg_iop_sw_mpu_r_cpu_intr___intr14___lsb 14
333#define reg_iop_sw_mpu_r_cpu_intr___intr14___width 1
334#define reg_iop_sw_mpu_r_cpu_intr___intr14___bit 14
335#define reg_iop_sw_mpu_r_cpu_intr___intr15___lsb 15
336#define reg_iop_sw_mpu_r_cpu_intr___intr15___width 1
337#define reg_iop_sw_mpu_r_cpu_intr___intr15___bit 15
338#define reg_iop_sw_mpu_r_cpu_intr___intr16___lsb 16
339#define reg_iop_sw_mpu_r_cpu_intr___intr16___width 1
340#define reg_iop_sw_mpu_r_cpu_intr___intr16___bit 16
341#define reg_iop_sw_mpu_r_cpu_intr___intr17___lsb 17
342#define reg_iop_sw_mpu_r_cpu_intr___intr17___width 1
343#define reg_iop_sw_mpu_r_cpu_intr___intr17___bit 17
344#define reg_iop_sw_mpu_r_cpu_intr___intr18___lsb 18
345#define reg_iop_sw_mpu_r_cpu_intr___intr18___width 1
346#define reg_iop_sw_mpu_r_cpu_intr___intr18___bit 18
347#define reg_iop_sw_mpu_r_cpu_intr___intr19___lsb 19
348#define reg_iop_sw_mpu_r_cpu_intr___intr19___width 1
349#define reg_iop_sw_mpu_r_cpu_intr___intr19___bit 19
350#define reg_iop_sw_mpu_r_cpu_intr___intr20___lsb 20
351#define reg_iop_sw_mpu_r_cpu_intr___intr20___width 1
352#define reg_iop_sw_mpu_r_cpu_intr___intr20___bit 20
353#define reg_iop_sw_mpu_r_cpu_intr___intr21___lsb 21
354#define reg_iop_sw_mpu_r_cpu_intr___intr21___width 1
355#define reg_iop_sw_mpu_r_cpu_intr___intr21___bit 21
356#define reg_iop_sw_mpu_r_cpu_intr___intr22___lsb 22
357#define reg_iop_sw_mpu_r_cpu_intr___intr22___width 1
358#define reg_iop_sw_mpu_r_cpu_intr___intr22___bit 22
359#define reg_iop_sw_mpu_r_cpu_intr___intr23___lsb 23
360#define reg_iop_sw_mpu_r_cpu_intr___intr23___width 1
361#define reg_iop_sw_mpu_r_cpu_intr___intr23___bit 23
362#define reg_iop_sw_mpu_r_cpu_intr___intr24___lsb 24
363#define reg_iop_sw_mpu_r_cpu_intr___intr24___width 1
364#define reg_iop_sw_mpu_r_cpu_intr___intr24___bit 24
365#define reg_iop_sw_mpu_r_cpu_intr___intr25___lsb 25
366#define reg_iop_sw_mpu_r_cpu_intr___intr25___width 1
367#define reg_iop_sw_mpu_r_cpu_intr___intr25___bit 25
368#define reg_iop_sw_mpu_r_cpu_intr___intr26___lsb 26
369#define reg_iop_sw_mpu_r_cpu_intr___intr26___width 1
370#define reg_iop_sw_mpu_r_cpu_intr___intr26___bit 26
371#define reg_iop_sw_mpu_r_cpu_intr___intr27___lsb 27
372#define reg_iop_sw_mpu_r_cpu_intr___intr27___width 1
373#define reg_iop_sw_mpu_r_cpu_intr___intr27___bit 27
374#define reg_iop_sw_mpu_r_cpu_intr___intr28___lsb 28
375#define reg_iop_sw_mpu_r_cpu_intr___intr28___width 1
376#define reg_iop_sw_mpu_r_cpu_intr___intr28___bit 28
377#define reg_iop_sw_mpu_r_cpu_intr___intr29___lsb 29
378#define reg_iop_sw_mpu_r_cpu_intr___intr29___width 1
379#define reg_iop_sw_mpu_r_cpu_intr___intr29___bit 29
380#define reg_iop_sw_mpu_r_cpu_intr___intr30___lsb 30
381#define reg_iop_sw_mpu_r_cpu_intr___intr30___width 1
382#define reg_iop_sw_mpu_r_cpu_intr___intr30___bit 30
383#define reg_iop_sw_mpu_r_cpu_intr___intr31___lsb 31
384#define reg_iop_sw_mpu_r_cpu_intr___intr31___width 1
385#define reg_iop_sw_mpu_r_cpu_intr___intr31___bit 31
386#define reg_iop_sw_mpu_r_cpu_intr_offset 80
387
388/* Register rw_intr_grp0_mask, scope iop_sw_mpu, type rw */
389#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr0___lsb 0
390#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr0___width 1
391#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr0___bit 0
392#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp0___lsb 1
393#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp0___width 1
394#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp0___bit 1
395#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp0___lsb 2
396#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp0___width 1
397#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp0___bit 2
398#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out___lsb 3
399#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out___width 1
400#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out___bit 3
401#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr1___lsb 4
402#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr1___width 1
403#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr1___bit 4
404#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp1___lsb 5
405#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp1___width 1
406#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp1___bit 5
407#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp1___lsb 6
408#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp1___width 1
409#define reg_iop_sw_mpu_rw_intr_grp0_mask___timer_grp1___bit 6
410#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in___lsb 7
411#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in___width 1
412#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in___bit 7
413#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr2___lsb 8
414#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr2___width 1
415#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr2___bit 8
416#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp2___lsb 9
417#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp2___width 1
418#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp2___bit 9
419#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out_extra___lsb 10
420#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out_extra___width 1
421#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_out_extra___bit 10
422#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out___lsb 11
423#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out___width 1
424#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_out___bit 11
425#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr3___lsb 12
426#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr3___width 1
427#define reg_iop_sw_mpu_rw_intr_grp0_mask___spu_intr3___bit 12
428#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp3___lsb 13
429#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp3___width 1
430#define reg_iop_sw_mpu_rw_intr_grp0_mask___trigger_grp3___bit 13
431#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in_extra___lsb 14
432#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in_extra___width 1
433#define reg_iop_sw_mpu_rw_intr_grp0_mask___fifo_in_extra___bit 14
434#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in___lsb 15
435#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in___width 1
436#define reg_iop_sw_mpu_rw_intr_grp0_mask___dmc_in___bit 15
437#define reg_iop_sw_mpu_rw_intr_grp0_mask_offset 84
438
439/* Register rw_ack_intr_grp0, scope iop_sw_mpu, type rw */
440#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr0___lsb 0
441#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr0___width 1
442#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr0___bit 0
443#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr1___lsb 4
444#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr1___width 1
445#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr1___bit 4
446#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr2___lsb 8
447#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr2___width 1
448#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr2___bit 8
449#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr3___lsb 12
450#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr3___width 1
451#define reg_iop_sw_mpu_rw_ack_intr_grp0___spu_intr3___bit 12
452#define reg_iop_sw_mpu_rw_ack_intr_grp0_offset 88
453
454/* Register r_intr_grp0, scope iop_sw_mpu, type r */
455#define reg_iop_sw_mpu_r_intr_grp0___spu_intr0___lsb 0
456#define reg_iop_sw_mpu_r_intr_grp0___spu_intr0___width 1
457#define reg_iop_sw_mpu_r_intr_grp0___spu_intr0___bit 0
458#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp0___lsb 1
459#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp0___width 1
460#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp0___bit 1
461#define reg_iop_sw_mpu_r_intr_grp0___timer_grp0___lsb 2
462#define reg_iop_sw_mpu_r_intr_grp0___timer_grp0___width 1
463#define reg_iop_sw_mpu_r_intr_grp0___timer_grp0___bit 2
464#define reg_iop_sw_mpu_r_intr_grp0___fifo_out___lsb 3
465#define reg_iop_sw_mpu_r_intr_grp0___fifo_out___width 1
466#define reg_iop_sw_mpu_r_intr_grp0___fifo_out___bit 3
467#define reg_iop_sw_mpu_r_intr_grp0___spu_intr1___lsb 4
468#define reg_iop_sw_mpu_r_intr_grp0___spu_intr1___width 1
469#define reg_iop_sw_mpu_r_intr_grp0___spu_intr1___bit 4
470#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp1___lsb 5
471#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp1___width 1
472#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp1___bit 5
473#define reg_iop_sw_mpu_r_intr_grp0___timer_grp1___lsb 6
474#define reg_iop_sw_mpu_r_intr_grp0___timer_grp1___width 1
475#define reg_iop_sw_mpu_r_intr_grp0___timer_grp1___bit 6
476#define reg_iop_sw_mpu_r_intr_grp0___fifo_in___lsb 7
477#define reg_iop_sw_mpu_r_intr_grp0___fifo_in___width 1
478#define reg_iop_sw_mpu_r_intr_grp0___fifo_in___bit 7
479#define reg_iop_sw_mpu_r_intr_grp0___spu_intr2___lsb 8
480#define reg_iop_sw_mpu_r_intr_grp0___spu_intr2___width 1
481#define reg_iop_sw_mpu_r_intr_grp0___spu_intr2___bit 8
482#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp2___lsb 9
483#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp2___width 1
484#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp2___bit 9
485#define reg_iop_sw_mpu_r_intr_grp0___fifo_out_extra___lsb 10
486#define reg_iop_sw_mpu_r_intr_grp0___fifo_out_extra___width 1
487#define reg_iop_sw_mpu_r_intr_grp0___fifo_out_extra___bit 10
488#define reg_iop_sw_mpu_r_intr_grp0___dmc_out___lsb 11
489#define reg_iop_sw_mpu_r_intr_grp0___dmc_out___width 1
490#define reg_iop_sw_mpu_r_intr_grp0___dmc_out___bit 11
491#define reg_iop_sw_mpu_r_intr_grp0___spu_intr3___lsb 12
492#define reg_iop_sw_mpu_r_intr_grp0___spu_intr3___width 1
493#define reg_iop_sw_mpu_r_intr_grp0___spu_intr3___bit 12
494#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp3___lsb 13
495#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp3___width 1
496#define reg_iop_sw_mpu_r_intr_grp0___trigger_grp3___bit 13
497#define reg_iop_sw_mpu_r_intr_grp0___fifo_in_extra___lsb 14
498#define reg_iop_sw_mpu_r_intr_grp0___fifo_in_extra___width 1
499#define reg_iop_sw_mpu_r_intr_grp0___fifo_in_extra___bit 14
500#define reg_iop_sw_mpu_r_intr_grp0___dmc_in___lsb 15
501#define reg_iop_sw_mpu_r_intr_grp0___dmc_in___width 1
502#define reg_iop_sw_mpu_r_intr_grp0___dmc_in___bit 15
503#define reg_iop_sw_mpu_r_intr_grp0_offset 92
504
505/* Register r_masked_intr_grp0, scope iop_sw_mpu, type r */
506#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr0___lsb 0
507#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr0___width 1
508#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr0___bit 0
509#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp0___lsb 1
510#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp0___width 1
511#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp0___bit 1
512#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp0___lsb 2
513#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp0___width 1
514#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp0___bit 2
515#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out___lsb 3
516#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out___width 1
517#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out___bit 3
518#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr1___lsb 4
519#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr1___width 1
520#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr1___bit 4
521#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp1___lsb 5
522#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp1___width 1
523#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp1___bit 5
524#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp1___lsb 6
525#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp1___width 1
526#define reg_iop_sw_mpu_r_masked_intr_grp0___timer_grp1___bit 6
527#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in___lsb 7
528#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in___width 1
529#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in___bit 7
530#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr2___lsb 8
531#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr2___width 1
532#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr2___bit 8
533#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp2___lsb 9
534#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp2___width 1
535#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp2___bit 9
536#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out_extra___lsb 10
537#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out_extra___width 1
538#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_out_extra___bit 10
539#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out___lsb 11
540#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out___width 1
541#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_out___bit 11
542#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr3___lsb 12
543#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr3___width 1
544#define reg_iop_sw_mpu_r_masked_intr_grp0___spu_intr3___bit 12
545#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp3___lsb 13
546#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp3___width 1
547#define reg_iop_sw_mpu_r_masked_intr_grp0___trigger_grp3___bit 13
548#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in_extra___lsb 14
549#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in_extra___width 1
550#define reg_iop_sw_mpu_r_masked_intr_grp0___fifo_in_extra___bit 14
551#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in___lsb 15
552#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in___width 1
553#define reg_iop_sw_mpu_r_masked_intr_grp0___dmc_in___bit 15
554#define reg_iop_sw_mpu_r_masked_intr_grp0_offset 96
555
556/* Register rw_intr_grp1_mask, scope iop_sw_mpu, type rw */
557#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr4___lsb 0
558#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr4___width 1
559#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr4___bit 0
560#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp4___lsb 1
561#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp4___width 1
562#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp4___bit 1
563#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out_extra___lsb 2
564#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out_extra___width 1
565#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out_extra___bit 2
566#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out___lsb 3
567#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out___width 1
568#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_out___bit 3
569#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr5___lsb 4
570#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr5___width 1
571#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr5___bit 4
572#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp5___lsb 5
573#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp5___width 1
574#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp5___bit 5
575#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in_extra___lsb 6
576#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in_extra___width 1
577#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in_extra___bit 6
578#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in___lsb 7
579#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in___width 1
580#define reg_iop_sw_mpu_rw_intr_grp1_mask___dmc_in___bit 7
581#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr6___lsb 8
582#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr6___width 1
583#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr6___bit 8
584#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp6___lsb 9
585#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp6___width 1
586#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp6___bit 9
587#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp0___lsb 10
588#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp0___width 1
589#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp0___bit 10
590#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out___lsb 11
591#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out___width 1
592#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_out___bit 11
593#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr7___lsb 12
594#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr7___width 1
595#define reg_iop_sw_mpu_rw_intr_grp1_mask___spu_intr7___bit 12
596#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp7___lsb 13
597#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp7___width 1
598#define reg_iop_sw_mpu_rw_intr_grp1_mask___trigger_grp7___bit 13
599#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp1___lsb 14
600#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp1___width 1
601#define reg_iop_sw_mpu_rw_intr_grp1_mask___timer_grp1___bit 14
602#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in___lsb 15
603#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in___width 1
604#define reg_iop_sw_mpu_rw_intr_grp1_mask___fifo_in___bit 15
605#define reg_iop_sw_mpu_rw_intr_grp1_mask_offset 100
606
607/* Register rw_ack_intr_grp1, scope iop_sw_mpu, type rw */
608#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr4___lsb 0
609#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr4___width 1
610#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr4___bit 0
611#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr5___lsb 4
612#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr5___width 1
613#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr5___bit 4
614#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr6___lsb 8
615#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr6___width 1
616#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr6___bit 8
617#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr7___lsb 12
618#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr7___width 1
619#define reg_iop_sw_mpu_rw_ack_intr_grp1___spu_intr7___bit 12
620#define reg_iop_sw_mpu_rw_ack_intr_grp1_offset 104
621
622/* Register r_intr_grp1, scope iop_sw_mpu, type r */
623#define reg_iop_sw_mpu_r_intr_grp1___spu_intr4___lsb 0
624#define reg_iop_sw_mpu_r_intr_grp1___spu_intr4___width 1
625#define reg_iop_sw_mpu_r_intr_grp1___spu_intr4___bit 0
626#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp4___lsb 1
627#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp4___width 1
628#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp4___bit 1
629#define reg_iop_sw_mpu_r_intr_grp1___fifo_out_extra___lsb 2
630#define reg_iop_sw_mpu_r_intr_grp1___fifo_out_extra___width 1
631#define reg_iop_sw_mpu_r_intr_grp1___fifo_out_extra___bit 2
632#define reg_iop_sw_mpu_r_intr_grp1___dmc_out___lsb 3
633#define reg_iop_sw_mpu_r_intr_grp1___dmc_out___width 1
634#define reg_iop_sw_mpu_r_intr_grp1___dmc_out___bit 3
635#define reg_iop_sw_mpu_r_intr_grp1___spu_intr5___lsb 4
636#define reg_iop_sw_mpu_r_intr_grp1___spu_intr5___width 1
637#define reg_iop_sw_mpu_r_intr_grp1___spu_intr5___bit 4
638#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp5___lsb 5
639#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp5___width 1
640#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp5___bit 5
641#define reg_iop_sw_mpu_r_intr_grp1___fifo_in_extra___lsb 6
642#define reg_iop_sw_mpu_r_intr_grp1___fifo_in_extra___width 1
643#define reg_iop_sw_mpu_r_intr_grp1___fifo_in_extra___bit 6
644#define reg_iop_sw_mpu_r_intr_grp1___dmc_in___lsb 7
645#define reg_iop_sw_mpu_r_intr_grp1___dmc_in___width 1
646#define reg_iop_sw_mpu_r_intr_grp1___dmc_in___bit 7
647#define reg_iop_sw_mpu_r_intr_grp1___spu_intr6___lsb 8
648#define reg_iop_sw_mpu_r_intr_grp1___spu_intr6___width 1
649#define reg_iop_sw_mpu_r_intr_grp1___spu_intr6___bit 8
650#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp6___lsb 9
651#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp6___width 1
652#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp6___bit 9
653#define reg_iop_sw_mpu_r_intr_grp1___timer_grp0___lsb 10
654#define reg_iop_sw_mpu_r_intr_grp1___timer_grp0___width 1
655#define reg_iop_sw_mpu_r_intr_grp1___timer_grp0___bit 10
656#define reg_iop_sw_mpu_r_intr_grp1___fifo_out___lsb 11
657#define reg_iop_sw_mpu_r_intr_grp1___fifo_out___width 1
658#define reg_iop_sw_mpu_r_intr_grp1___fifo_out___bit 11
659#define reg_iop_sw_mpu_r_intr_grp1___spu_intr7___lsb 12
660#define reg_iop_sw_mpu_r_intr_grp1___spu_intr7___width 1
661#define reg_iop_sw_mpu_r_intr_grp1___spu_intr7___bit 12
662#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp7___lsb 13
663#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp7___width 1
664#define reg_iop_sw_mpu_r_intr_grp1___trigger_grp7___bit 13
665#define reg_iop_sw_mpu_r_intr_grp1___timer_grp1___lsb 14
666#define reg_iop_sw_mpu_r_intr_grp1___timer_grp1___width 1
667#define reg_iop_sw_mpu_r_intr_grp1___timer_grp1___bit 14
668#define reg_iop_sw_mpu_r_intr_grp1___fifo_in___lsb 15
669#define reg_iop_sw_mpu_r_intr_grp1___fifo_in___width 1
670#define reg_iop_sw_mpu_r_intr_grp1___fifo_in___bit 15
671#define reg_iop_sw_mpu_r_intr_grp1_offset 108
672
673/* Register r_masked_intr_grp1, scope iop_sw_mpu, type r */
674#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr4___lsb 0
675#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr4___width 1
676#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr4___bit 0
677#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp4___lsb 1
678#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp4___width 1
679#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp4___bit 1
680#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out_extra___lsb 2
681#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out_extra___width 1
682#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out_extra___bit 2
683#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out___lsb 3
684#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out___width 1
685#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_out___bit 3
686#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr5___lsb 4
687#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr5___width 1
688#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr5___bit 4
689#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp5___lsb 5
690#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp5___width 1
691#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp5___bit 5
692#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in_extra___lsb 6
693#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in_extra___width 1
694#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in_extra___bit 6
695#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in___lsb 7
696#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in___width 1
697#define reg_iop_sw_mpu_r_masked_intr_grp1___dmc_in___bit 7
698#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr6___lsb 8
699#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr6___width 1
700#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr6___bit 8
701#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp6___lsb 9
702#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp6___width 1
703#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp6___bit 9
704#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp0___lsb 10
705#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp0___width 1
706#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp0___bit 10
707#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out___lsb 11
708#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out___width 1
709#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_out___bit 11
710#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr7___lsb 12
711#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr7___width 1
712#define reg_iop_sw_mpu_r_masked_intr_grp1___spu_intr7___bit 12
713#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp7___lsb 13
714#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp7___width 1
715#define reg_iop_sw_mpu_r_masked_intr_grp1___trigger_grp7___bit 13
716#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp1___lsb 14
717#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp1___width 1
718#define reg_iop_sw_mpu_r_masked_intr_grp1___timer_grp1___bit 14
719#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in___lsb 15
720#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in___width 1
721#define reg_iop_sw_mpu_r_masked_intr_grp1___fifo_in___bit 15
722#define reg_iop_sw_mpu_r_masked_intr_grp1_offset 112
723
724/* Register rw_intr_grp2_mask, scope iop_sw_mpu, type rw */
725#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr8___lsb 0
726#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr8___width 1
727#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr8___bit 0
728#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp0___lsb 1
729#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp0___width 1
730#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp0___bit 1
731#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp0___lsb 2
732#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp0___width 1
733#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp0___bit 2
734#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out___lsb 3
735#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out___width 1
736#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out___bit 3
737#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr9___lsb 4
738#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr9___width 1
739#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr9___bit 4
740#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp1___lsb 5
741#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp1___width 1
742#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp1___bit 5
743#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp1___lsb 6
744#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp1___width 1
745#define reg_iop_sw_mpu_rw_intr_grp2_mask___timer_grp1___bit 6
746#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in___lsb 7
747#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in___width 1
748#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in___bit 7
749#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr10___lsb 8
750#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr10___width 1
751#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr10___bit 8
752#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp2___lsb 9
753#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp2___width 1
754#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp2___bit 9
755#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out_extra___lsb 10
756#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out_extra___width 1
757#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_out_extra___bit 10
758#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out___lsb 11
759#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out___width 1
760#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_out___bit 11
761#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr11___lsb 12
762#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr11___width 1
763#define reg_iop_sw_mpu_rw_intr_grp2_mask___spu_intr11___bit 12
764#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp3___lsb 13
765#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp3___width 1
766#define reg_iop_sw_mpu_rw_intr_grp2_mask___trigger_grp3___bit 13
767#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in_extra___lsb 14
768#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in_extra___width 1
769#define reg_iop_sw_mpu_rw_intr_grp2_mask___fifo_in_extra___bit 14
770#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in___lsb 15
771#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in___width 1
772#define reg_iop_sw_mpu_rw_intr_grp2_mask___dmc_in___bit 15
773#define reg_iop_sw_mpu_rw_intr_grp2_mask_offset 116
774
775/* Register rw_ack_intr_grp2, scope iop_sw_mpu, type rw */
776#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr8___lsb 0
777#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr8___width 1
778#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr8___bit 0
779#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr9___lsb 4
780#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr9___width 1
781#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr9___bit 4
782#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr10___lsb 8
783#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr10___width 1
784#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr10___bit 8
785#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr11___lsb 12
786#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr11___width 1
787#define reg_iop_sw_mpu_rw_ack_intr_grp2___spu_intr11___bit 12
788#define reg_iop_sw_mpu_rw_ack_intr_grp2_offset 120
789
790/* Register r_intr_grp2, scope iop_sw_mpu, type r */
791#define reg_iop_sw_mpu_r_intr_grp2___spu_intr8___lsb 0
792#define reg_iop_sw_mpu_r_intr_grp2___spu_intr8___width 1
793#define reg_iop_sw_mpu_r_intr_grp2___spu_intr8___bit 0
794#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp0___lsb 1
795#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp0___width 1
796#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp0___bit 1
797#define reg_iop_sw_mpu_r_intr_grp2___timer_grp0___lsb 2
798#define reg_iop_sw_mpu_r_intr_grp2___timer_grp0___width 1
799#define reg_iop_sw_mpu_r_intr_grp2___timer_grp0___bit 2
800#define reg_iop_sw_mpu_r_intr_grp2___fifo_out___lsb 3
801#define reg_iop_sw_mpu_r_intr_grp2___fifo_out___width 1
802#define reg_iop_sw_mpu_r_intr_grp2___fifo_out___bit 3
803#define reg_iop_sw_mpu_r_intr_grp2___spu_intr9___lsb 4
804#define reg_iop_sw_mpu_r_intr_grp2___spu_intr9___width 1
805#define reg_iop_sw_mpu_r_intr_grp2___spu_intr9___bit 4
806#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp1___lsb 5
807#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp1___width 1
808#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp1___bit 5
809#define reg_iop_sw_mpu_r_intr_grp2___timer_grp1___lsb 6
810#define reg_iop_sw_mpu_r_intr_grp2___timer_grp1___width 1
811#define reg_iop_sw_mpu_r_intr_grp2___timer_grp1___bit 6
812#define reg_iop_sw_mpu_r_intr_grp2___fifo_in___lsb 7
813#define reg_iop_sw_mpu_r_intr_grp2___fifo_in___width 1
814#define reg_iop_sw_mpu_r_intr_grp2___fifo_in___bit 7
815#define reg_iop_sw_mpu_r_intr_grp2___spu_intr10___lsb 8
816#define reg_iop_sw_mpu_r_intr_grp2___spu_intr10___width 1
817#define reg_iop_sw_mpu_r_intr_grp2___spu_intr10___bit 8
818#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp2___lsb 9
819#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp2___width 1
820#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp2___bit 9
821#define reg_iop_sw_mpu_r_intr_grp2___fifo_out_extra___lsb 10
822#define reg_iop_sw_mpu_r_intr_grp2___fifo_out_extra___width 1
823#define reg_iop_sw_mpu_r_intr_grp2___fifo_out_extra___bit 10
824#define reg_iop_sw_mpu_r_intr_grp2___dmc_out___lsb 11
825#define reg_iop_sw_mpu_r_intr_grp2___dmc_out___width 1
826#define reg_iop_sw_mpu_r_intr_grp2___dmc_out___bit 11
827#define reg_iop_sw_mpu_r_intr_grp2___spu_intr11___lsb 12
828#define reg_iop_sw_mpu_r_intr_grp2___spu_intr11___width 1
829#define reg_iop_sw_mpu_r_intr_grp2___spu_intr11___bit 12
830#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp3___lsb 13
831#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp3___width 1
832#define reg_iop_sw_mpu_r_intr_grp2___trigger_grp3___bit 13
833#define reg_iop_sw_mpu_r_intr_grp2___fifo_in_extra___lsb 14
834#define reg_iop_sw_mpu_r_intr_grp2___fifo_in_extra___width 1
835#define reg_iop_sw_mpu_r_intr_grp2___fifo_in_extra___bit 14
836#define reg_iop_sw_mpu_r_intr_grp2___dmc_in___lsb 15
837#define reg_iop_sw_mpu_r_intr_grp2___dmc_in___width 1
838#define reg_iop_sw_mpu_r_intr_grp2___dmc_in___bit 15
839#define reg_iop_sw_mpu_r_intr_grp2_offset 124
840
841/* Register r_masked_intr_grp2, scope iop_sw_mpu, type r */
842#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr8___lsb 0
843#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr8___width 1
844#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr8___bit 0
845#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp0___lsb 1
846#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp0___width 1
847#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp0___bit 1
848#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp0___lsb 2
849#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp0___width 1
850#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp0___bit 2
851#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out___lsb 3
852#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out___width 1
853#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out___bit 3
854#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr9___lsb 4
855#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr9___width 1
856#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr9___bit 4
857#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp1___lsb 5
858#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp1___width 1
859#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp1___bit 5
860#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp1___lsb 6
861#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp1___width 1
862#define reg_iop_sw_mpu_r_masked_intr_grp2___timer_grp1___bit 6
863#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in___lsb 7
864#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in___width 1
865#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in___bit 7
866#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr10___lsb 8
867#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr10___width 1
868#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr10___bit 8
869#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp2___lsb 9
870#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp2___width 1
871#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp2___bit 9
872#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out_extra___lsb 10
873#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out_extra___width 1
874#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_out_extra___bit 10
875#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out___lsb 11
876#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out___width 1
877#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_out___bit 11
878#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr11___lsb 12
879#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr11___width 1
880#define reg_iop_sw_mpu_r_masked_intr_grp2___spu_intr11___bit 12
881#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp3___lsb 13
882#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp3___width 1
883#define reg_iop_sw_mpu_r_masked_intr_grp2___trigger_grp3___bit 13
884#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in_extra___lsb 14
885#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in_extra___width 1
886#define reg_iop_sw_mpu_r_masked_intr_grp2___fifo_in_extra___bit 14
887#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in___lsb 15
888#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in___width 1
889#define reg_iop_sw_mpu_r_masked_intr_grp2___dmc_in___bit 15
890#define reg_iop_sw_mpu_r_masked_intr_grp2_offset 128
891
892/* Register rw_intr_grp3_mask, scope iop_sw_mpu, type rw */
893#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr12___lsb 0
894#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr12___width 1
895#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr12___bit 0
896#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp4___lsb 1
897#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp4___width 1
898#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp4___bit 1
899#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out_extra___lsb 2
900#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out_extra___width 1
901#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out_extra___bit 2
902#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out___lsb 3
903#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out___width 1
904#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_out___bit 3
905#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr13___lsb 4
906#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr13___width 1
907#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr13___bit 4
908#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp5___lsb 5
909#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp5___width 1
910#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp5___bit 5
911#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in_extra___lsb 6
912#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in_extra___width 1
913#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in_extra___bit 6
914#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in___lsb 7
915#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in___width 1
916#define reg_iop_sw_mpu_rw_intr_grp3_mask___dmc_in___bit 7
917#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr14___lsb 8
918#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr14___width 1
919#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr14___bit 8
920#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp6___lsb 9
921#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp6___width 1
922#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp6___bit 9
923#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp0___lsb 10
924#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp0___width 1
925#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp0___bit 10
926#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out___lsb 11
927#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out___width 1
928#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_out___bit 11
929#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr15___lsb 12
930#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr15___width 1
931#define reg_iop_sw_mpu_rw_intr_grp3_mask___spu_intr15___bit 12
932#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp7___lsb 13
933#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp7___width 1
934#define reg_iop_sw_mpu_rw_intr_grp3_mask___trigger_grp7___bit 13
935#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp1___lsb 14
936#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp1___width 1
937#define reg_iop_sw_mpu_rw_intr_grp3_mask___timer_grp1___bit 14
938#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in___lsb 15
939#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in___width 1
940#define reg_iop_sw_mpu_rw_intr_grp3_mask___fifo_in___bit 15
941#define reg_iop_sw_mpu_rw_intr_grp3_mask_offset 132
942
943/* Register rw_ack_intr_grp3, scope iop_sw_mpu, type rw */
944#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr12___lsb 0
945#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr12___width 1
946#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr12___bit 0
947#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr13___lsb 4
948#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr13___width 1
949#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr13___bit 4
950#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr14___lsb 8
951#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr14___width 1
952#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr14___bit 8
953#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr15___lsb 12
954#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr15___width 1
955#define reg_iop_sw_mpu_rw_ack_intr_grp3___spu_intr15___bit 12
956#define reg_iop_sw_mpu_rw_ack_intr_grp3_offset 136
957
958/* Register r_intr_grp3, scope iop_sw_mpu, type r */
959#define reg_iop_sw_mpu_r_intr_grp3___spu_intr12___lsb 0
960#define reg_iop_sw_mpu_r_intr_grp3___spu_intr12___width 1
961#define reg_iop_sw_mpu_r_intr_grp3___spu_intr12___bit 0
962#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp4___lsb 1
963#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp4___width 1
964#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp4___bit 1
965#define reg_iop_sw_mpu_r_intr_grp3___fifo_out_extra___lsb 2
966#define reg_iop_sw_mpu_r_intr_grp3___fifo_out_extra___width 1
967#define reg_iop_sw_mpu_r_intr_grp3___fifo_out_extra___bit 2
968#define reg_iop_sw_mpu_r_intr_grp3___dmc_out___lsb 3
969#define reg_iop_sw_mpu_r_intr_grp3___dmc_out___width 1
970#define reg_iop_sw_mpu_r_intr_grp3___dmc_out___bit 3
971#define reg_iop_sw_mpu_r_intr_grp3___spu_intr13___lsb 4
972#define reg_iop_sw_mpu_r_intr_grp3___spu_intr13___width 1
973#define reg_iop_sw_mpu_r_intr_grp3___spu_intr13___bit 4
974#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp5___lsb 5
975#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp5___width 1
976#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp5___bit 5
977#define reg_iop_sw_mpu_r_intr_grp3___fifo_in_extra___lsb 6
978#define reg_iop_sw_mpu_r_intr_grp3___fifo_in_extra___width 1
979#define reg_iop_sw_mpu_r_intr_grp3___fifo_in_extra___bit 6
980#define reg_iop_sw_mpu_r_intr_grp3___dmc_in___lsb 7
981#define reg_iop_sw_mpu_r_intr_grp3___dmc_in___width 1
982#define reg_iop_sw_mpu_r_intr_grp3___dmc_in___bit 7
983#define reg_iop_sw_mpu_r_intr_grp3___spu_intr14___lsb 8
984#define reg_iop_sw_mpu_r_intr_grp3___spu_intr14___width 1
985#define reg_iop_sw_mpu_r_intr_grp3___spu_intr14___bit 8
986#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp6___lsb 9
987#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp6___width 1
988#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp6___bit 9
989#define reg_iop_sw_mpu_r_intr_grp3___timer_grp0___lsb 10
990#define reg_iop_sw_mpu_r_intr_grp3___timer_grp0___width 1
991#define reg_iop_sw_mpu_r_intr_grp3___timer_grp0___bit 10
992#define reg_iop_sw_mpu_r_intr_grp3___fifo_out___lsb 11
993#define reg_iop_sw_mpu_r_intr_grp3___fifo_out___width 1
994#define reg_iop_sw_mpu_r_intr_grp3___fifo_out___bit 11
995#define reg_iop_sw_mpu_r_intr_grp3___spu_intr15___lsb 12
996#define reg_iop_sw_mpu_r_intr_grp3___spu_intr15___width 1
997#define reg_iop_sw_mpu_r_intr_grp3___spu_intr15___bit 12
998#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp7___lsb 13
999#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp7___width 1
1000#define reg_iop_sw_mpu_r_intr_grp3___trigger_grp7___bit 13
1001#define reg_iop_sw_mpu_r_intr_grp3___timer_grp1___lsb 14
1002#define reg_iop_sw_mpu_r_intr_grp3___timer_grp1___width 1
1003#define reg_iop_sw_mpu_r_intr_grp3___timer_grp1___bit 14
1004#define reg_iop_sw_mpu_r_intr_grp3___fifo_in___lsb 15
1005#define reg_iop_sw_mpu_r_intr_grp3___fifo_in___width 1
1006#define reg_iop_sw_mpu_r_intr_grp3___fifo_in___bit 15
1007#define reg_iop_sw_mpu_r_intr_grp3_offset 140
1008
1009/* Register r_masked_intr_grp3, scope iop_sw_mpu, type r */
1010#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr12___lsb 0
1011#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr12___width 1
1012#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr12___bit 0
1013#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp4___lsb 1
1014#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp4___width 1
1015#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp4___bit 1
1016#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out_extra___lsb 2
1017#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out_extra___width 1
1018#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out_extra___bit 2
1019#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out___lsb 3
1020#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out___width 1
1021#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_out___bit 3
1022#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr13___lsb 4
1023#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr13___width 1
1024#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr13___bit 4
1025#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp5___lsb 5
1026#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp5___width 1
1027#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp5___bit 5
1028#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in_extra___lsb 6
1029#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in_extra___width 1
1030#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in_extra___bit 6
1031#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in___lsb 7
1032#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in___width 1
1033#define reg_iop_sw_mpu_r_masked_intr_grp3___dmc_in___bit 7
1034#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr14___lsb 8
1035#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr14___width 1
1036#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr14___bit 8
1037#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp6___lsb 9
1038#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp6___width 1
1039#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp6___bit 9
1040#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp0___lsb 10
1041#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp0___width 1
1042#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp0___bit 10
1043#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out___lsb 11
1044#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out___width 1
1045#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_out___bit 11
1046#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr15___lsb 12
1047#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr15___width 1
1048#define reg_iop_sw_mpu_r_masked_intr_grp3___spu_intr15___bit 12
1049#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp7___lsb 13
1050#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp7___width 1
1051#define reg_iop_sw_mpu_r_masked_intr_grp3___trigger_grp7___bit 13
1052#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp1___lsb 14
1053#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp1___width 1
1054#define reg_iop_sw_mpu_r_masked_intr_grp3___timer_grp1___bit 14
1055#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in___lsb 15
1056#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in___width 1
1057#define reg_iop_sw_mpu_r_masked_intr_grp3___fifo_in___bit 15
1058#define reg_iop_sw_mpu_r_masked_intr_grp3_offset 144
1059
1060
1061/* Constants */
1062#define regk_iop_sw_mpu_copy 0x00000000
1063#define regk_iop_sw_mpu_cpu 0x00000000
1064#define regk_iop_sw_mpu_mpu 0x00000001
1065#define regk_iop_sw_mpu_no 0x00000000
1066#define regk_iop_sw_mpu_nop 0x00000000
1067#define regk_iop_sw_mpu_rd 0x00000002
1068#define regk_iop_sw_mpu_reg_copy 0x00000001
1069#define regk_iop_sw_mpu_rw_bus_clr_mask_default 0x00000000
1070#define regk_iop_sw_mpu_rw_bus_oe_clr_mask_default 0x00000000
1071#define regk_iop_sw_mpu_rw_bus_oe_set_mask_default 0x00000000
1072#define regk_iop_sw_mpu_rw_bus_set_mask_default 0x00000000
1073#define regk_iop_sw_mpu_rw_gio_clr_mask_default 0x00000000
1074#define regk_iop_sw_mpu_rw_gio_oe_clr_mask_default 0x00000000
1075#define regk_iop_sw_mpu_rw_gio_oe_set_mask_default 0x00000000
1076#define regk_iop_sw_mpu_rw_gio_set_mask_default 0x00000000
1077#define regk_iop_sw_mpu_rw_intr_grp0_mask_default 0x00000000
1078#define regk_iop_sw_mpu_rw_intr_grp1_mask_default 0x00000000
1079#define regk_iop_sw_mpu_rw_intr_grp2_mask_default 0x00000000
1080#define regk_iop_sw_mpu_rw_intr_grp3_mask_default 0x00000000
1081#define regk_iop_sw_mpu_rw_sw_cfg_owner_default 0x00000000
1082#define regk_iop_sw_mpu_set 0x00000001
1083#define regk_iop_sw_mpu_spu 0x00000002
1084#define regk_iop_sw_mpu_wr 0x00000003
1085#define regk_iop_sw_mpu_yes 0x00000001
1086#endif /* __iop_sw_mpu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_spu_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_spu_defs_asm.h
deleted file mode 100644
index 67a745338087..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_spu_defs_asm.h
+++ /dev/null
@@ -1,523 +0,0 @@
1#ifndef __iop_sw_spu_defs_asm_h
2#define __iop_sw_spu_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_spu.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_sw_spu_defs_asm.h iop_sw_spu.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register r_mpu_trace, scope iop_sw_spu, type r */
54#define reg_iop_sw_spu_r_mpu_trace_offset 0
55
56/* Register rw_mc_ctrl, scope iop_sw_spu, type rw */
57#define reg_iop_sw_spu_rw_mc_ctrl___keep_owner___lsb 0
58#define reg_iop_sw_spu_rw_mc_ctrl___keep_owner___width 1
59#define reg_iop_sw_spu_rw_mc_ctrl___keep_owner___bit 0
60#define reg_iop_sw_spu_rw_mc_ctrl___cmd___lsb 1
61#define reg_iop_sw_spu_rw_mc_ctrl___cmd___width 2
62#define reg_iop_sw_spu_rw_mc_ctrl___size___lsb 3
63#define reg_iop_sw_spu_rw_mc_ctrl___size___width 3
64#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu_mem___lsb 6
65#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu_mem___width 1
66#define reg_iop_sw_spu_rw_mc_ctrl___wr_spu_mem___bit 6
67#define reg_iop_sw_spu_rw_mc_ctrl_offset 4
68
69/* Register rw_mc_data, scope iop_sw_spu, type rw */
70#define reg_iop_sw_spu_rw_mc_data___val___lsb 0
71#define reg_iop_sw_spu_rw_mc_data___val___width 32
72#define reg_iop_sw_spu_rw_mc_data_offset 8
73
74/* Register rw_mc_addr, scope iop_sw_spu, type rw */
75#define reg_iop_sw_spu_rw_mc_addr_offset 12
76
77/* Register rs_mc_data, scope iop_sw_spu, type rs */
78#define reg_iop_sw_spu_rs_mc_data_offset 16
79
80/* Register r_mc_data, scope iop_sw_spu, type r */
81#define reg_iop_sw_spu_r_mc_data_offset 20
82
83/* Register r_mc_stat, scope iop_sw_spu, type r */
84#define reg_iop_sw_spu_r_mc_stat___busy_cpu___lsb 0
85#define reg_iop_sw_spu_r_mc_stat___busy_cpu___width 1
86#define reg_iop_sw_spu_r_mc_stat___busy_cpu___bit 0
87#define reg_iop_sw_spu_r_mc_stat___busy_mpu___lsb 1
88#define reg_iop_sw_spu_r_mc_stat___busy_mpu___width 1
89#define reg_iop_sw_spu_r_mc_stat___busy_mpu___bit 1
90#define reg_iop_sw_spu_r_mc_stat___busy_spu___lsb 2
91#define reg_iop_sw_spu_r_mc_stat___busy_spu___width 1
92#define reg_iop_sw_spu_r_mc_stat___busy_spu___bit 2
93#define reg_iop_sw_spu_r_mc_stat___owned_by_cpu___lsb 3
94#define reg_iop_sw_spu_r_mc_stat___owned_by_cpu___width 1
95#define reg_iop_sw_spu_r_mc_stat___owned_by_cpu___bit 3
96#define reg_iop_sw_spu_r_mc_stat___owned_by_mpu___lsb 4
97#define reg_iop_sw_spu_r_mc_stat___owned_by_mpu___width 1
98#define reg_iop_sw_spu_r_mc_stat___owned_by_mpu___bit 4
99#define reg_iop_sw_spu_r_mc_stat___owned_by_spu___lsb 5
100#define reg_iop_sw_spu_r_mc_stat___owned_by_spu___width 1
101#define reg_iop_sw_spu_r_mc_stat___owned_by_spu___bit 5
102#define reg_iop_sw_spu_r_mc_stat_offset 24
103
104/* Register rw_bus_clr_mask, scope iop_sw_spu, type rw */
105#define reg_iop_sw_spu_rw_bus_clr_mask___byte0___lsb 0
106#define reg_iop_sw_spu_rw_bus_clr_mask___byte0___width 8
107#define reg_iop_sw_spu_rw_bus_clr_mask___byte1___lsb 8
108#define reg_iop_sw_spu_rw_bus_clr_mask___byte1___width 8
109#define reg_iop_sw_spu_rw_bus_clr_mask___byte2___lsb 16
110#define reg_iop_sw_spu_rw_bus_clr_mask___byte2___width 8
111#define reg_iop_sw_spu_rw_bus_clr_mask___byte3___lsb 24
112#define reg_iop_sw_spu_rw_bus_clr_mask___byte3___width 8
113#define reg_iop_sw_spu_rw_bus_clr_mask_offset 28
114
115/* Register rw_bus_set_mask, scope iop_sw_spu, type rw */
116#define reg_iop_sw_spu_rw_bus_set_mask___byte0___lsb 0
117#define reg_iop_sw_spu_rw_bus_set_mask___byte0___width 8
118#define reg_iop_sw_spu_rw_bus_set_mask___byte1___lsb 8
119#define reg_iop_sw_spu_rw_bus_set_mask___byte1___width 8
120#define reg_iop_sw_spu_rw_bus_set_mask___byte2___lsb 16
121#define reg_iop_sw_spu_rw_bus_set_mask___byte2___width 8
122#define reg_iop_sw_spu_rw_bus_set_mask___byte3___lsb 24
123#define reg_iop_sw_spu_rw_bus_set_mask___byte3___width 8
124#define reg_iop_sw_spu_rw_bus_set_mask_offset 32
125
126/* Register rw_bus_oe_clr_mask, scope iop_sw_spu, type rw */
127#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte0___lsb 0
128#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte0___width 1
129#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte0___bit 0
130#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte1___lsb 1
131#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte1___width 1
132#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte1___bit 1
133#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte2___lsb 2
134#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte2___width 1
135#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte2___bit 2
136#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte3___lsb 3
137#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte3___width 1
138#define reg_iop_sw_spu_rw_bus_oe_clr_mask___byte3___bit 3
139#define reg_iop_sw_spu_rw_bus_oe_clr_mask_offset 36
140
141/* Register rw_bus_oe_set_mask, scope iop_sw_spu, type rw */
142#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte0___lsb 0
143#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte0___width 1
144#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte0___bit 0
145#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte1___lsb 1
146#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte1___width 1
147#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte1___bit 1
148#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte2___lsb 2
149#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte2___width 1
150#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte2___bit 2
151#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte3___lsb 3
152#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte3___width 1
153#define reg_iop_sw_spu_rw_bus_oe_set_mask___byte3___bit 3
154#define reg_iop_sw_spu_rw_bus_oe_set_mask_offset 40
155
156/* Register r_bus_in, scope iop_sw_spu, type r */
157#define reg_iop_sw_spu_r_bus_in_offset 44
158
159/* Register rw_gio_clr_mask, scope iop_sw_spu, type rw */
160#define reg_iop_sw_spu_rw_gio_clr_mask___val___lsb 0
161#define reg_iop_sw_spu_rw_gio_clr_mask___val___width 32
162#define reg_iop_sw_spu_rw_gio_clr_mask_offset 48
163
164/* Register rw_gio_set_mask, scope iop_sw_spu, type rw */
165#define reg_iop_sw_spu_rw_gio_set_mask___val___lsb 0
166#define reg_iop_sw_spu_rw_gio_set_mask___val___width 32
167#define reg_iop_sw_spu_rw_gio_set_mask_offset 52
168
169/* Register rw_gio_oe_clr_mask, scope iop_sw_spu, type rw */
170#define reg_iop_sw_spu_rw_gio_oe_clr_mask___val___lsb 0
171#define reg_iop_sw_spu_rw_gio_oe_clr_mask___val___width 32
172#define reg_iop_sw_spu_rw_gio_oe_clr_mask_offset 56
173
174/* Register rw_gio_oe_set_mask, scope iop_sw_spu, type rw */
175#define reg_iop_sw_spu_rw_gio_oe_set_mask___val___lsb 0
176#define reg_iop_sw_spu_rw_gio_oe_set_mask___val___width 32
177#define reg_iop_sw_spu_rw_gio_oe_set_mask_offset 60
178
179/* Register r_gio_in, scope iop_sw_spu, type r */
180#define reg_iop_sw_spu_r_gio_in_offset 64
181
182/* Register rw_bus_clr_mask_lo, scope iop_sw_spu, type rw */
183#define reg_iop_sw_spu_rw_bus_clr_mask_lo___byte0___lsb 0
184#define reg_iop_sw_spu_rw_bus_clr_mask_lo___byte0___width 8
185#define reg_iop_sw_spu_rw_bus_clr_mask_lo___byte1___lsb 8
186#define reg_iop_sw_spu_rw_bus_clr_mask_lo___byte1___width 8
187#define reg_iop_sw_spu_rw_bus_clr_mask_lo_offset 68
188
189/* Register rw_bus_clr_mask_hi, scope iop_sw_spu, type rw */
190#define reg_iop_sw_spu_rw_bus_clr_mask_hi___byte2___lsb 0
191#define reg_iop_sw_spu_rw_bus_clr_mask_hi___byte2___width 8
192#define reg_iop_sw_spu_rw_bus_clr_mask_hi___byte3___lsb 8
193#define reg_iop_sw_spu_rw_bus_clr_mask_hi___byte3___width 8
194#define reg_iop_sw_spu_rw_bus_clr_mask_hi_offset 72
195
196/* Register rw_bus_set_mask_lo, scope iop_sw_spu, type rw */
197#define reg_iop_sw_spu_rw_bus_set_mask_lo___byte0___lsb 0
198#define reg_iop_sw_spu_rw_bus_set_mask_lo___byte0___width 8
199#define reg_iop_sw_spu_rw_bus_set_mask_lo___byte1___lsb 8
200#define reg_iop_sw_spu_rw_bus_set_mask_lo___byte1___width 8
201#define reg_iop_sw_spu_rw_bus_set_mask_lo_offset 76
202
203/* Register rw_bus_set_mask_hi, scope iop_sw_spu, type rw */
204#define reg_iop_sw_spu_rw_bus_set_mask_hi___byte2___lsb 0
205#define reg_iop_sw_spu_rw_bus_set_mask_hi___byte2___width 8
206#define reg_iop_sw_spu_rw_bus_set_mask_hi___byte3___lsb 8
207#define reg_iop_sw_spu_rw_bus_set_mask_hi___byte3___width 8
208#define reg_iop_sw_spu_rw_bus_set_mask_hi_offset 80
209
210/* Register rw_gio_clr_mask_lo, scope iop_sw_spu, type rw */
211#define reg_iop_sw_spu_rw_gio_clr_mask_lo___val___lsb 0
212#define reg_iop_sw_spu_rw_gio_clr_mask_lo___val___width 16
213#define reg_iop_sw_spu_rw_gio_clr_mask_lo_offset 84
214
215/* Register rw_gio_clr_mask_hi, scope iop_sw_spu, type rw */
216#define reg_iop_sw_spu_rw_gio_clr_mask_hi___val___lsb 0
217#define reg_iop_sw_spu_rw_gio_clr_mask_hi___val___width 16
218#define reg_iop_sw_spu_rw_gio_clr_mask_hi_offset 88
219
220/* Register rw_gio_set_mask_lo, scope iop_sw_spu, type rw */
221#define reg_iop_sw_spu_rw_gio_set_mask_lo___val___lsb 0
222#define reg_iop_sw_spu_rw_gio_set_mask_lo___val___width 16
223#define reg_iop_sw_spu_rw_gio_set_mask_lo_offset 92
224
225/* Register rw_gio_set_mask_hi, scope iop_sw_spu, type rw */
226#define reg_iop_sw_spu_rw_gio_set_mask_hi___val___lsb 0
227#define reg_iop_sw_spu_rw_gio_set_mask_hi___val___width 16
228#define reg_iop_sw_spu_rw_gio_set_mask_hi_offset 96
229
230/* Register rw_gio_oe_clr_mask_lo, scope iop_sw_spu, type rw */
231#define reg_iop_sw_spu_rw_gio_oe_clr_mask_lo___val___lsb 0
232#define reg_iop_sw_spu_rw_gio_oe_clr_mask_lo___val___width 16
233#define reg_iop_sw_spu_rw_gio_oe_clr_mask_lo_offset 100
234
235/* Register rw_gio_oe_clr_mask_hi, scope iop_sw_spu, type rw */
236#define reg_iop_sw_spu_rw_gio_oe_clr_mask_hi___val___lsb 0
237#define reg_iop_sw_spu_rw_gio_oe_clr_mask_hi___val___width 16
238#define reg_iop_sw_spu_rw_gio_oe_clr_mask_hi_offset 104
239
240/* Register rw_gio_oe_set_mask_lo, scope iop_sw_spu, type rw */
241#define reg_iop_sw_spu_rw_gio_oe_set_mask_lo___val___lsb 0
242#define reg_iop_sw_spu_rw_gio_oe_set_mask_lo___val___width 16
243#define reg_iop_sw_spu_rw_gio_oe_set_mask_lo_offset 108
244
245/* Register rw_gio_oe_set_mask_hi, scope iop_sw_spu, type rw */
246#define reg_iop_sw_spu_rw_gio_oe_set_mask_hi___val___lsb 0
247#define reg_iop_sw_spu_rw_gio_oe_set_mask_hi___val___width 16
248#define reg_iop_sw_spu_rw_gio_oe_set_mask_hi_offset 112
249
250/* Register rw_cpu_intr, scope iop_sw_spu, type rw */
251#define reg_iop_sw_spu_rw_cpu_intr___intr0___lsb 0
252#define reg_iop_sw_spu_rw_cpu_intr___intr0___width 1
253#define reg_iop_sw_spu_rw_cpu_intr___intr0___bit 0
254#define reg_iop_sw_spu_rw_cpu_intr___intr1___lsb 1
255#define reg_iop_sw_spu_rw_cpu_intr___intr1___width 1
256#define reg_iop_sw_spu_rw_cpu_intr___intr1___bit 1
257#define reg_iop_sw_spu_rw_cpu_intr___intr2___lsb 2
258#define reg_iop_sw_spu_rw_cpu_intr___intr2___width 1
259#define reg_iop_sw_spu_rw_cpu_intr___intr2___bit 2
260#define reg_iop_sw_spu_rw_cpu_intr___intr3___lsb 3
261#define reg_iop_sw_spu_rw_cpu_intr___intr3___width 1
262#define reg_iop_sw_spu_rw_cpu_intr___intr3___bit 3
263#define reg_iop_sw_spu_rw_cpu_intr___intr4___lsb 4
264#define reg_iop_sw_spu_rw_cpu_intr___intr4___width 1
265#define reg_iop_sw_spu_rw_cpu_intr___intr4___bit 4
266#define reg_iop_sw_spu_rw_cpu_intr___intr5___lsb 5
267#define reg_iop_sw_spu_rw_cpu_intr___intr5___width 1
268#define reg_iop_sw_spu_rw_cpu_intr___intr5___bit 5
269#define reg_iop_sw_spu_rw_cpu_intr___intr6___lsb 6
270#define reg_iop_sw_spu_rw_cpu_intr___intr6___width 1
271#define reg_iop_sw_spu_rw_cpu_intr___intr6___bit 6
272#define reg_iop_sw_spu_rw_cpu_intr___intr7___lsb 7
273#define reg_iop_sw_spu_rw_cpu_intr___intr7___width 1
274#define reg_iop_sw_spu_rw_cpu_intr___intr7___bit 7
275#define reg_iop_sw_spu_rw_cpu_intr___intr8___lsb 8
276#define reg_iop_sw_spu_rw_cpu_intr___intr8___width 1
277#define reg_iop_sw_spu_rw_cpu_intr___intr8___bit 8
278#define reg_iop_sw_spu_rw_cpu_intr___intr9___lsb 9
279#define reg_iop_sw_spu_rw_cpu_intr___intr9___width 1
280#define reg_iop_sw_spu_rw_cpu_intr___intr9___bit 9
281#define reg_iop_sw_spu_rw_cpu_intr___intr10___lsb 10
282#define reg_iop_sw_spu_rw_cpu_intr___intr10___width 1
283#define reg_iop_sw_spu_rw_cpu_intr___intr10___bit 10
284#define reg_iop_sw_spu_rw_cpu_intr___intr11___lsb 11
285#define reg_iop_sw_spu_rw_cpu_intr___intr11___width 1
286#define reg_iop_sw_spu_rw_cpu_intr___intr11___bit 11
287#define reg_iop_sw_spu_rw_cpu_intr___intr12___lsb 12
288#define reg_iop_sw_spu_rw_cpu_intr___intr12___width 1
289#define reg_iop_sw_spu_rw_cpu_intr___intr12___bit 12
290#define reg_iop_sw_spu_rw_cpu_intr___intr13___lsb 13
291#define reg_iop_sw_spu_rw_cpu_intr___intr13___width 1
292#define reg_iop_sw_spu_rw_cpu_intr___intr13___bit 13
293#define reg_iop_sw_spu_rw_cpu_intr___intr14___lsb 14
294#define reg_iop_sw_spu_rw_cpu_intr___intr14___width 1
295#define reg_iop_sw_spu_rw_cpu_intr___intr14___bit 14
296#define reg_iop_sw_spu_rw_cpu_intr___intr15___lsb 15
297#define reg_iop_sw_spu_rw_cpu_intr___intr15___width 1
298#define reg_iop_sw_spu_rw_cpu_intr___intr15___bit 15
299#define reg_iop_sw_spu_rw_cpu_intr_offset 116
300
301/* Register r_cpu_intr, scope iop_sw_spu, type r */
302#define reg_iop_sw_spu_r_cpu_intr___intr0___lsb 0
303#define reg_iop_sw_spu_r_cpu_intr___intr0___width 1
304#define reg_iop_sw_spu_r_cpu_intr___intr0___bit 0
305#define reg_iop_sw_spu_r_cpu_intr___intr1___lsb 1
306#define reg_iop_sw_spu_r_cpu_intr___intr1___width 1
307#define reg_iop_sw_spu_r_cpu_intr___intr1___bit 1
308#define reg_iop_sw_spu_r_cpu_intr___intr2___lsb 2
309#define reg_iop_sw_spu_r_cpu_intr___intr2___width 1
310#define reg_iop_sw_spu_r_cpu_intr___intr2___bit 2
311#define reg_iop_sw_spu_r_cpu_intr___intr3___lsb 3
312#define reg_iop_sw_spu_r_cpu_intr___intr3___width 1
313#define reg_iop_sw_spu_r_cpu_intr___intr3___bit 3
314#define reg_iop_sw_spu_r_cpu_intr___intr4___lsb 4
315#define reg_iop_sw_spu_r_cpu_intr___intr4___width 1
316#define reg_iop_sw_spu_r_cpu_intr___intr4___bit 4
317#define reg_iop_sw_spu_r_cpu_intr___intr5___lsb 5
318#define reg_iop_sw_spu_r_cpu_intr___intr5___width 1
319#define reg_iop_sw_spu_r_cpu_intr___intr5___bit 5
320#define reg_iop_sw_spu_r_cpu_intr___intr6___lsb 6
321#define reg_iop_sw_spu_r_cpu_intr___intr6___width 1
322#define reg_iop_sw_spu_r_cpu_intr___intr6___bit 6
323#define reg_iop_sw_spu_r_cpu_intr___intr7___lsb 7
324#define reg_iop_sw_spu_r_cpu_intr___intr7___width 1
325#define reg_iop_sw_spu_r_cpu_intr___intr7___bit 7
326#define reg_iop_sw_spu_r_cpu_intr___intr8___lsb 8
327#define reg_iop_sw_spu_r_cpu_intr___intr8___width 1
328#define reg_iop_sw_spu_r_cpu_intr___intr8___bit 8
329#define reg_iop_sw_spu_r_cpu_intr___intr9___lsb 9
330#define reg_iop_sw_spu_r_cpu_intr___intr9___width 1
331#define reg_iop_sw_spu_r_cpu_intr___intr9___bit 9
332#define reg_iop_sw_spu_r_cpu_intr___intr10___lsb 10
333#define reg_iop_sw_spu_r_cpu_intr___intr10___width 1
334#define reg_iop_sw_spu_r_cpu_intr___intr10___bit 10
335#define reg_iop_sw_spu_r_cpu_intr___intr11___lsb 11
336#define reg_iop_sw_spu_r_cpu_intr___intr11___width 1
337#define reg_iop_sw_spu_r_cpu_intr___intr11___bit 11
338#define reg_iop_sw_spu_r_cpu_intr___intr12___lsb 12
339#define reg_iop_sw_spu_r_cpu_intr___intr12___width 1
340#define reg_iop_sw_spu_r_cpu_intr___intr12___bit 12
341#define reg_iop_sw_spu_r_cpu_intr___intr13___lsb 13
342#define reg_iop_sw_spu_r_cpu_intr___intr13___width 1
343#define reg_iop_sw_spu_r_cpu_intr___intr13___bit 13
344#define reg_iop_sw_spu_r_cpu_intr___intr14___lsb 14
345#define reg_iop_sw_spu_r_cpu_intr___intr14___width 1
346#define reg_iop_sw_spu_r_cpu_intr___intr14___bit 14
347#define reg_iop_sw_spu_r_cpu_intr___intr15___lsb 15
348#define reg_iop_sw_spu_r_cpu_intr___intr15___width 1
349#define reg_iop_sw_spu_r_cpu_intr___intr15___bit 15
350#define reg_iop_sw_spu_r_cpu_intr_offset 120
351
352/* Register r_hw_intr, scope iop_sw_spu, type r */
353#define reg_iop_sw_spu_r_hw_intr___trigger_grp0___lsb 0
354#define reg_iop_sw_spu_r_hw_intr___trigger_grp0___width 1
355#define reg_iop_sw_spu_r_hw_intr___trigger_grp0___bit 0
356#define reg_iop_sw_spu_r_hw_intr___trigger_grp1___lsb 1
357#define reg_iop_sw_spu_r_hw_intr___trigger_grp1___width 1
358#define reg_iop_sw_spu_r_hw_intr___trigger_grp1___bit 1
359#define reg_iop_sw_spu_r_hw_intr___trigger_grp2___lsb 2
360#define reg_iop_sw_spu_r_hw_intr___trigger_grp2___width 1
361#define reg_iop_sw_spu_r_hw_intr___trigger_grp2___bit 2
362#define reg_iop_sw_spu_r_hw_intr___trigger_grp3___lsb 3
363#define reg_iop_sw_spu_r_hw_intr___trigger_grp3___width 1
364#define reg_iop_sw_spu_r_hw_intr___trigger_grp3___bit 3
365#define reg_iop_sw_spu_r_hw_intr___trigger_grp4___lsb 4
366#define reg_iop_sw_spu_r_hw_intr___trigger_grp4___width 1
367#define reg_iop_sw_spu_r_hw_intr___trigger_grp4___bit 4
368#define reg_iop_sw_spu_r_hw_intr___trigger_grp5___lsb 5
369#define reg_iop_sw_spu_r_hw_intr___trigger_grp5___width 1
370#define reg_iop_sw_spu_r_hw_intr___trigger_grp5___bit 5
371#define reg_iop_sw_spu_r_hw_intr___trigger_grp6___lsb 6
372#define reg_iop_sw_spu_r_hw_intr___trigger_grp6___width 1
373#define reg_iop_sw_spu_r_hw_intr___trigger_grp6___bit 6
374#define reg_iop_sw_spu_r_hw_intr___trigger_grp7___lsb 7
375#define reg_iop_sw_spu_r_hw_intr___trigger_grp7___width 1
376#define reg_iop_sw_spu_r_hw_intr___trigger_grp7___bit 7
377#define reg_iop_sw_spu_r_hw_intr___timer_grp0___lsb 8
378#define reg_iop_sw_spu_r_hw_intr___timer_grp0___width 1
379#define reg_iop_sw_spu_r_hw_intr___timer_grp0___bit 8
380#define reg_iop_sw_spu_r_hw_intr___timer_grp1___lsb 9
381#define reg_iop_sw_spu_r_hw_intr___timer_grp1___width 1
382#define reg_iop_sw_spu_r_hw_intr___timer_grp1___bit 9
383#define reg_iop_sw_spu_r_hw_intr___fifo_out___lsb 10
384#define reg_iop_sw_spu_r_hw_intr___fifo_out___width 1
385#define reg_iop_sw_spu_r_hw_intr___fifo_out___bit 10
386#define reg_iop_sw_spu_r_hw_intr___fifo_out_extra___lsb 11
387#define reg_iop_sw_spu_r_hw_intr___fifo_out_extra___width 1
388#define reg_iop_sw_spu_r_hw_intr___fifo_out_extra___bit 11
389#define reg_iop_sw_spu_r_hw_intr___fifo_in___lsb 12
390#define reg_iop_sw_spu_r_hw_intr___fifo_in___width 1
391#define reg_iop_sw_spu_r_hw_intr___fifo_in___bit 12
392#define reg_iop_sw_spu_r_hw_intr___fifo_in_extra___lsb 13
393#define reg_iop_sw_spu_r_hw_intr___fifo_in_extra___width 1
394#define reg_iop_sw_spu_r_hw_intr___fifo_in_extra___bit 13
395#define reg_iop_sw_spu_r_hw_intr___dmc_out___lsb 14
396#define reg_iop_sw_spu_r_hw_intr___dmc_out___width 1
397#define reg_iop_sw_spu_r_hw_intr___dmc_out___bit 14
398#define reg_iop_sw_spu_r_hw_intr___dmc_in___lsb 15
399#define reg_iop_sw_spu_r_hw_intr___dmc_in___width 1
400#define reg_iop_sw_spu_r_hw_intr___dmc_in___bit 15
401#define reg_iop_sw_spu_r_hw_intr_offset 124
402
403/* Register rw_mpu_intr, scope iop_sw_spu, type rw */
404#define reg_iop_sw_spu_rw_mpu_intr___intr0___lsb 0
405#define reg_iop_sw_spu_rw_mpu_intr___intr0___width 1
406#define reg_iop_sw_spu_rw_mpu_intr___intr0___bit 0
407#define reg_iop_sw_spu_rw_mpu_intr___intr1___lsb 1
408#define reg_iop_sw_spu_rw_mpu_intr___intr1___width 1
409#define reg_iop_sw_spu_rw_mpu_intr___intr1___bit 1
410#define reg_iop_sw_spu_rw_mpu_intr___intr2___lsb 2
411#define reg_iop_sw_spu_rw_mpu_intr___intr2___width 1
412#define reg_iop_sw_spu_rw_mpu_intr___intr2___bit 2
413#define reg_iop_sw_spu_rw_mpu_intr___intr3___lsb 3
414#define reg_iop_sw_spu_rw_mpu_intr___intr3___width 1
415#define reg_iop_sw_spu_rw_mpu_intr___intr3___bit 3
416#define reg_iop_sw_spu_rw_mpu_intr___intr4___lsb 4
417#define reg_iop_sw_spu_rw_mpu_intr___intr4___width 1
418#define reg_iop_sw_spu_rw_mpu_intr___intr4___bit 4
419#define reg_iop_sw_spu_rw_mpu_intr___intr5___lsb 5
420#define reg_iop_sw_spu_rw_mpu_intr___intr5___width 1
421#define reg_iop_sw_spu_rw_mpu_intr___intr5___bit 5
422#define reg_iop_sw_spu_rw_mpu_intr___intr6___lsb 6
423#define reg_iop_sw_spu_rw_mpu_intr___intr6___width 1
424#define reg_iop_sw_spu_rw_mpu_intr___intr6___bit 6
425#define reg_iop_sw_spu_rw_mpu_intr___intr7___lsb 7
426#define reg_iop_sw_spu_rw_mpu_intr___intr7___width 1
427#define reg_iop_sw_spu_rw_mpu_intr___intr7___bit 7
428#define reg_iop_sw_spu_rw_mpu_intr___intr8___lsb 8
429#define reg_iop_sw_spu_rw_mpu_intr___intr8___width 1
430#define reg_iop_sw_spu_rw_mpu_intr___intr8___bit 8
431#define reg_iop_sw_spu_rw_mpu_intr___intr9___lsb 9
432#define reg_iop_sw_spu_rw_mpu_intr___intr9___width 1
433#define reg_iop_sw_spu_rw_mpu_intr___intr9___bit 9
434#define reg_iop_sw_spu_rw_mpu_intr___intr10___lsb 10
435#define reg_iop_sw_spu_rw_mpu_intr___intr10___width 1
436#define reg_iop_sw_spu_rw_mpu_intr___intr10___bit 10
437#define reg_iop_sw_spu_rw_mpu_intr___intr11___lsb 11
438#define reg_iop_sw_spu_rw_mpu_intr___intr11___width 1
439#define reg_iop_sw_spu_rw_mpu_intr___intr11___bit 11
440#define reg_iop_sw_spu_rw_mpu_intr___intr12___lsb 12
441#define reg_iop_sw_spu_rw_mpu_intr___intr12___width 1
442#define reg_iop_sw_spu_rw_mpu_intr___intr12___bit 12
443#define reg_iop_sw_spu_rw_mpu_intr___intr13___lsb 13
444#define reg_iop_sw_spu_rw_mpu_intr___intr13___width 1
445#define reg_iop_sw_spu_rw_mpu_intr___intr13___bit 13
446#define reg_iop_sw_spu_rw_mpu_intr___intr14___lsb 14
447#define reg_iop_sw_spu_rw_mpu_intr___intr14___width 1
448#define reg_iop_sw_spu_rw_mpu_intr___intr14___bit 14
449#define reg_iop_sw_spu_rw_mpu_intr___intr15___lsb 15
450#define reg_iop_sw_spu_rw_mpu_intr___intr15___width 1
451#define reg_iop_sw_spu_rw_mpu_intr___intr15___bit 15
452#define reg_iop_sw_spu_rw_mpu_intr_offset 128
453
454/* Register r_mpu_intr, scope iop_sw_spu, type r */
455#define reg_iop_sw_spu_r_mpu_intr___intr0___lsb 0
456#define reg_iop_sw_spu_r_mpu_intr___intr0___width 1
457#define reg_iop_sw_spu_r_mpu_intr___intr0___bit 0
458#define reg_iop_sw_spu_r_mpu_intr___intr1___lsb 1
459#define reg_iop_sw_spu_r_mpu_intr___intr1___width 1
460#define reg_iop_sw_spu_r_mpu_intr___intr1___bit 1
461#define reg_iop_sw_spu_r_mpu_intr___intr2___lsb 2
462#define reg_iop_sw_spu_r_mpu_intr___intr2___width 1
463#define reg_iop_sw_spu_r_mpu_intr___intr2___bit 2
464#define reg_iop_sw_spu_r_mpu_intr___intr3___lsb 3
465#define reg_iop_sw_spu_r_mpu_intr___intr3___width 1
466#define reg_iop_sw_spu_r_mpu_intr___intr3___bit 3
467#define reg_iop_sw_spu_r_mpu_intr___intr4___lsb 4
468#define reg_iop_sw_spu_r_mpu_intr___intr4___width 1
469#define reg_iop_sw_spu_r_mpu_intr___intr4___bit 4
470#define reg_iop_sw_spu_r_mpu_intr___intr5___lsb 5
471#define reg_iop_sw_spu_r_mpu_intr___intr5___width 1
472#define reg_iop_sw_spu_r_mpu_intr___intr5___bit 5
473#define reg_iop_sw_spu_r_mpu_intr___intr6___lsb 6
474#define reg_iop_sw_spu_r_mpu_intr___intr6___width 1
475#define reg_iop_sw_spu_r_mpu_intr___intr6___bit 6
476#define reg_iop_sw_spu_r_mpu_intr___intr7___lsb 7
477#define reg_iop_sw_spu_r_mpu_intr___intr7___width 1
478#define reg_iop_sw_spu_r_mpu_intr___intr7___bit 7
479#define reg_iop_sw_spu_r_mpu_intr___intr8___lsb 8
480#define reg_iop_sw_spu_r_mpu_intr___intr8___width 1
481#define reg_iop_sw_spu_r_mpu_intr___intr8___bit 8
482#define reg_iop_sw_spu_r_mpu_intr___intr9___lsb 9
483#define reg_iop_sw_spu_r_mpu_intr___intr9___width 1
484#define reg_iop_sw_spu_r_mpu_intr___intr9___bit 9
485#define reg_iop_sw_spu_r_mpu_intr___intr10___lsb 10
486#define reg_iop_sw_spu_r_mpu_intr___intr10___width 1
487#define reg_iop_sw_spu_r_mpu_intr___intr10___bit 10
488#define reg_iop_sw_spu_r_mpu_intr___intr11___lsb 11
489#define reg_iop_sw_spu_r_mpu_intr___intr11___width 1
490#define reg_iop_sw_spu_r_mpu_intr___intr11___bit 11
491#define reg_iop_sw_spu_r_mpu_intr___intr12___lsb 12
492#define reg_iop_sw_spu_r_mpu_intr___intr12___width 1
493#define reg_iop_sw_spu_r_mpu_intr___intr12___bit 12
494#define reg_iop_sw_spu_r_mpu_intr___intr13___lsb 13
495#define reg_iop_sw_spu_r_mpu_intr___intr13___width 1
496#define reg_iop_sw_spu_r_mpu_intr___intr13___bit 13
497#define reg_iop_sw_spu_r_mpu_intr___intr14___lsb 14
498#define reg_iop_sw_spu_r_mpu_intr___intr14___width 1
499#define reg_iop_sw_spu_r_mpu_intr___intr14___bit 14
500#define reg_iop_sw_spu_r_mpu_intr___intr15___lsb 15
501#define reg_iop_sw_spu_r_mpu_intr___intr15___width 1
502#define reg_iop_sw_spu_r_mpu_intr___intr15___bit 15
503#define reg_iop_sw_spu_r_mpu_intr_offset 132
504
505
506/* Constants */
507#define regk_iop_sw_spu_copy 0x00000000
508#define regk_iop_sw_spu_no 0x00000000
509#define regk_iop_sw_spu_nop 0x00000000
510#define regk_iop_sw_spu_rd 0x00000002
511#define regk_iop_sw_spu_reg_copy 0x00000001
512#define regk_iop_sw_spu_rw_bus_clr_mask_default 0x00000000
513#define regk_iop_sw_spu_rw_bus_oe_clr_mask_default 0x00000000
514#define regk_iop_sw_spu_rw_bus_oe_set_mask_default 0x00000000
515#define regk_iop_sw_spu_rw_bus_set_mask_default 0x00000000
516#define regk_iop_sw_spu_rw_gio_clr_mask_default 0x00000000
517#define regk_iop_sw_spu_rw_gio_oe_clr_mask_default 0x00000000
518#define regk_iop_sw_spu_rw_gio_oe_set_mask_default 0x00000000
519#define regk_iop_sw_spu_rw_gio_set_mask_default 0x00000000
520#define regk_iop_sw_spu_set 0x00000001
521#define regk_iop_sw_spu_wr 0x00000003
522#define regk_iop_sw_spu_yes 0x00000001
523#endif /* __iop_sw_spu_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_version_defs_asm.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_version_defs_asm.h
deleted file mode 100644
index 4ad671202af0..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_version_defs_asm.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef __iop_version_defs_asm_h
2#define __iop_version_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_version.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -asm -outfile iop_version_defs_asm.h iop_version.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13
14#ifndef REG_FIELD
15#define REG_FIELD( scope, reg, field, value ) \
16 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
17#define REG_FIELD_X_( value, shift ) ((value) << shift)
18#endif
19
20#ifndef REG_STATE
21#define REG_STATE( scope, reg, field, symbolic_value ) \
22 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
23#define REG_STATE_X_( k, shift ) (k << shift)
24#endif
25
26#ifndef REG_MASK
27#define REG_MASK( scope, reg, field ) \
28 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
29#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
30#endif
31
32#ifndef REG_LSB
33#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
34#endif
35
36#ifndef REG_BIT
37#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
38#endif
39
40#ifndef REG_ADDR
41#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
42#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
43#endif
44
45#ifndef REG_ADDR_VECT
46#define REG_ADDR_VECT( scope, inst, reg, index ) \
47 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
48 STRIDE_##scope##_##reg )
49#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
50 ((inst) + offs + (index) * stride)
51#endif
52
53/* Register r_version, scope iop_version, type r */
54#define reg_iop_version_r_version___nr___lsb 0
55#define reg_iop_version_r_version___nr___width 8
56#define reg_iop_version_r_version_offset 0
57
58
59/* Constants */
60#define regk_iop_version_v2_0 0x00000002
61#endif /* __iop_version_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_reg_space.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_reg_space.h
deleted file mode 100644
index af3196c60a46..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_reg_space.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* Autogenerated Changes here will be lost!
2 * generated by ./gen_sw.pl Wed Feb 14 09:27:48 2007 iop_sw.cfg
3 */
4#define regi_iop_version (regi_iop + 0)
5#define regi_iop_fifo_in_extra (regi_iop + 64)
6#define regi_iop_fifo_out_extra (regi_iop + 128)
7#define regi_iop_trigger_grp0 (regi_iop + 192)
8#define regi_iop_trigger_grp1 (regi_iop + 256)
9#define regi_iop_trigger_grp2 (regi_iop + 320)
10#define regi_iop_trigger_grp3 (regi_iop + 384)
11#define regi_iop_trigger_grp4 (regi_iop + 448)
12#define regi_iop_trigger_grp5 (regi_iop + 512)
13#define regi_iop_trigger_grp6 (regi_iop + 576)
14#define regi_iop_trigger_grp7 (regi_iop + 640)
15#define regi_iop_crc_par (regi_iop + 768)
16#define regi_iop_dmc_in (regi_iop + 896)
17#define regi_iop_dmc_out (regi_iop + 1024)
18#define regi_iop_fifo_in (regi_iop + 1152)
19#define regi_iop_fifo_out (regi_iop + 1280)
20#define regi_iop_scrc_in (regi_iop + 1408)
21#define regi_iop_scrc_out (regi_iop + 1536)
22#define regi_iop_timer_grp0 (regi_iop + 1664)
23#define regi_iop_timer_grp1 (regi_iop + 1792)
24#define regi_iop_sap_in (regi_iop + 2048)
25#define regi_iop_sap_out (regi_iop + 2304)
26#define regi_iop_spu (regi_iop + 2560)
27#define regi_iop_sw_cfg (regi_iop + 2816)
28#define regi_iop_sw_cpu (regi_iop + 3072)
29#define regi_iop_sw_mpu (regi_iop + 3328)
30#define regi_iop_sw_spu (regi_iop + 3584)
31#define regi_iop_mpu (regi_iop + 4096)
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_in_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_in_defs.h
deleted file mode 100644
index 51dde016c03a..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_in_defs.h
+++ /dev/null
@@ -1,141 +0,0 @@
1#ifndef __iop_sap_in_defs_h
2#define __iop_sap_in_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sap_in.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sap_in_defs.h iop_sap_in.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_sap_in */
83
84#define STRIDE_iop_sap_in_rw_bus_byte 4
85/* Register rw_bus_byte, scope iop_sap_in, type rw */
86typedef struct {
87 unsigned int sync_sel : 2;
88 unsigned int sync_ext_src : 3;
89 unsigned int sync_edge : 2;
90 unsigned int delay : 2;
91 unsigned int dummy1 : 23;
92} reg_iop_sap_in_rw_bus_byte;
93#define REG_RD_ADDR_iop_sap_in_rw_bus_byte 0
94#define REG_WR_ADDR_iop_sap_in_rw_bus_byte 0
95
96#define STRIDE_iop_sap_in_rw_gio 4
97/* Register rw_gio, scope iop_sap_in, type rw */
98typedef struct {
99 unsigned int sync_sel : 2;
100 unsigned int sync_ext_src : 3;
101 unsigned int sync_edge : 2;
102 unsigned int delay : 2;
103 unsigned int logic : 2;
104 unsigned int dummy1 : 21;
105} reg_iop_sap_in_rw_gio;
106#define REG_RD_ADDR_iop_sap_in_rw_gio 16
107#define REG_WR_ADDR_iop_sap_in_rw_gio 16
108
109
110/* Constants */
111enum {
112 regk_iop_sap_in_and = 0x00000002,
113 regk_iop_sap_in_ext_clk200 = 0x00000003,
114 regk_iop_sap_in_gio0 = 0x00000000,
115 regk_iop_sap_in_gio12 = 0x00000003,
116 regk_iop_sap_in_gio16 = 0x00000004,
117 regk_iop_sap_in_gio20 = 0x00000005,
118 regk_iop_sap_in_gio24 = 0x00000006,
119 regk_iop_sap_in_gio28 = 0x00000007,
120 regk_iop_sap_in_gio4 = 0x00000001,
121 regk_iop_sap_in_gio8 = 0x00000002,
122 regk_iop_sap_in_inv = 0x00000001,
123 regk_iop_sap_in_neg = 0x00000002,
124 regk_iop_sap_in_no = 0x00000000,
125 regk_iop_sap_in_no_del_ext_clk200 = 0x00000002,
126 regk_iop_sap_in_none = 0x00000000,
127 regk_iop_sap_in_one = 0x00000001,
128 regk_iop_sap_in_or = 0x00000003,
129 regk_iop_sap_in_pos = 0x00000001,
130 regk_iop_sap_in_pos_neg = 0x00000003,
131 regk_iop_sap_in_rw_bus_byte_default = 0x00000000,
132 regk_iop_sap_in_rw_bus_byte_size = 0x00000004,
133 regk_iop_sap_in_rw_gio_default = 0x00000000,
134 regk_iop_sap_in_rw_gio_size = 0x00000020,
135 regk_iop_sap_in_timer_grp0_tmr3 = 0x00000000,
136 regk_iop_sap_in_timer_grp1_tmr3 = 0x00000001,
137 regk_iop_sap_in_tmr_clk200 = 0x00000001,
138 regk_iop_sap_in_two = 0x00000002,
139 regk_iop_sap_in_two_clk200 = 0x00000000
140};
141#endif /* __iop_sap_in_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_out_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_out_defs.h
deleted file mode 100644
index 5af88baa2ac1..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_out_defs.h
+++ /dev/null
@@ -1,231 +0,0 @@
1#ifndef __iop_sap_out_defs_h
2#define __iop_sap_out_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sap_out.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sap_out_defs.h iop_sap_out.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_sap_out */
83
84/* Register rw_gen_gated, scope iop_sap_out, type rw */
85typedef struct {
86 unsigned int clk0_src : 2;
87 unsigned int clk0_gate_src : 2;
88 unsigned int clk0_force_src : 3;
89 unsigned int clk1_src : 2;
90 unsigned int clk1_gate_src : 2;
91 unsigned int clk1_force_src : 3;
92 unsigned int dummy1 : 18;
93} reg_iop_sap_out_rw_gen_gated;
94#define REG_RD_ADDR_iop_sap_out_rw_gen_gated 0
95#define REG_WR_ADDR_iop_sap_out_rw_gen_gated 0
96
97/* Register rw_bus, scope iop_sap_out, type rw */
98typedef struct {
99 unsigned int byte0_clk_sel : 2;
100 unsigned int byte0_clk_ext : 2;
101 unsigned int byte0_gated_clk : 1;
102 unsigned int byte0_clk_inv : 1;
103 unsigned int byte0_delay : 1;
104 unsigned int byte1_clk_sel : 2;
105 unsigned int byte1_clk_ext : 2;
106 unsigned int byte1_gated_clk : 1;
107 unsigned int byte1_clk_inv : 1;
108 unsigned int byte1_delay : 1;
109 unsigned int byte2_clk_sel : 2;
110 unsigned int byte2_clk_ext : 2;
111 unsigned int byte2_gated_clk : 1;
112 unsigned int byte2_clk_inv : 1;
113 unsigned int byte2_delay : 1;
114 unsigned int byte3_clk_sel : 2;
115 unsigned int byte3_clk_ext : 2;
116 unsigned int byte3_gated_clk : 1;
117 unsigned int byte3_clk_inv : 1;
118 unsigned int byte3_delay : 1;
119 unsigned int dummy1 : 4;
120} reg_iop_sap_out_rw_bus;
121#define REG_RD_ADDR_iop_sap_out_rw_bus 4
122#define REG_WR_ADDR_iop_sap_out_rw_bus 4
123
124/* Register rw_bus_lo_oe, scope iop_sap_out, type rw */
125typedef struct {
126 unsigned int byte0_clk_sel : 2;
127 unsigned int byte0_clk_ext : 2;
128 unsigned int byte0_gated_clk : 1;
129 unsigned int byte0_clk_inv : 1;
130 unsigned int byte0_delay : 1;
131 unsigned int byte0_logic : 2;
132 unsigned int byte0_logic_src : 2;
133 unsigned int byte1_clk_sel : 2;
134 unsigned int byte1_clk_ext : 2;
135 unsigned int byte1_gated_clk : 1;
136 unsigned int byte1_clk_inv : 1;
137 unsigned int byte1_delay : 1;
138 unsigned int byte1_logic : 2;
139 unsigned int byte1_logic_src : 2;
140 unsigned int dummy1 : 10;
141} reg_iop_sap_out_rw_bus_lo_oe;
142#define REG_RD_ADDR_iop_sap_out_rw_bus_lo_oe 8
143#define REG_WR_ADDR_iop_sap_out_rw_bus_lo_oe 8
144
145/* Register rw_bus_hi_oe, scope iop_sap_out, type rw */
146typedef struct {
147 unsigned int byte2_clk_sel : 2;
148 unsigned int byte2_clk_ext : 2;
149 unsigned int byte2_gated_clk : 1;
150 unsigned int byte2_clk_inv : 1;
151 unsigned int byte2_delay : 1;
152 unsigned int byte2_logic : 2;
153 unsigned int byte2_logic_src : 2;
154 unsigned int byte3_clk_sel : 2;
155 unsigned int byte3_clk_ext : 2;
156 unsigned int byte3_gated_clk : 1;
157 unsigned int byte3_clk_inv : 1;
158 unsigned int byte3_delay : 1;
159 unsigned int byte3_logic : 2;
160 unsigned int byte3_logic_src : 2;
161 unsigned int dummy1 : 10;
162} reg_iop_sap_out_rw_bus_hi_oe;
163#define REG_RD_ADDR_iop_sap_out_rw_bus_hi_oe 12
164#define REG_WR_ADDR_iop_sap_out_rw_bus_hi_oe 12
165
166#define STRIDE_iop_sap_out_rw_gio 4
167/* Register rw_gio, scope iop_sap_out, type rw */
168typedef struct {
169 unsigned int out_clk_sel : 3;
170 unsigned int out_clk_ext : 2;
171 unsigned int out_gated_clk : 1;
172 unsigned int out_clk_inv : 1;
173 unsigned int out_delay : 1;
174 unsigned int out_logic : 2;
175 unsigned int out_logic_src : 2;
176 unsigned int oe_clk_sel : 3;
177 unsigned int oe_clk_ext : 2;
178 unsigned int oe_gated_clk : 1;
179 unsigned int oe_clk_inv : 1;
180 unsigned int oe_delay : 1;
181 unsigned int oe_logic : 2;
182 unsigned int oe_logic_src : 2;
183 unsigned int dummy1 : 8;
184} reg_iop_sap_out_rw_gio;
185#define REG_RD_ADDR_iop_sap_out_rw_gio 16
186#define REG_WR_ADDR_iop_sap_out_rw_gio 16
187
188
189/* Constants */
190enum {
191 regk_iop_sap_out_always = 0x00000001,
192 regk_iop_sap_out_and = 0x00000002,
193 regk_iop_sap_out_clk0 = 0x00000000,
194 regk_iop_sap_out_clk1 = 0x00000001,
195 regk_iop_sap_out_clk12 = 0x00000004,
196 regk_iop_sap_out_clk200 = 0x00000000,
197 regk_iop_sap_out_ext = 0x00000002,
198 regk_iop_sap_out_gated = 0x00000003,
199 regk_iop_sap_out_gio0 = 0x00000000,
200 regk_iop_sap_out_gio1 = 0x00000000,
201 regk_iop_sap_out_gio16 = 0x00000002,
202 regk_iop_sap_out_gio17 = 0x00000002,
203 regk_iop_sap_out_gio24 = 0x00000003,
204 regk_iop_sap_out_gio25 = 0x00000003,
205 regk_iop_sap_out_gio8 = 0x00000001,
206 regk_iop_sap_out_gio9 = 0x00000001,
207 regk_iop_sap_out_gio_out10 = 0x00000005,
208 regk_iop_sap_out_gio_out18 = 0x00000006,
209 regk_iop_sap_out_gio_out2 = 0x00000004,
210 regk_iop_sap_out_gio_out26 = 0x00000007,
211 regk_iop_sap_out_inv = 0x00000001,
212 regk_iop_sap_out_nand = 0x00000003,
213 regk_iop_sap_out_no = 0x00000000,
214 regk_iop_sap_out_none = 0x00000000,
215 regk_iop_sap_out_one = 0x00000001,
216 regk_iop_sap_out_rw_bus_default = 0x00000000,
217 regk_iop_sap_out_rw_bus_hi_oe_default = 0x00000000,
218 regk_iop_sap_out_rw_bus_lo_oe_default = 0x00000000,
219 regk_iop_sap_out_rw_gen_gated_default = 0x00000000,
220 regk_iop_sap_out_rw_gio_default = 0x00000000,
221 regk_iop_sap_out_rw_gio_size = 0x00000020,
222 regk_iop_sap_out_spu_gio6 = 0x00000002,
223 regk_iop_sap_out_spu_gio7 = 0x00000003,
224 regk_iop_sap_out_timer_grp0_tmr2 = 0x00000000,
225 regk_iop_sap_out_timer_grp0_tmr3 = 0x00000001,
226 regk_iop_sap_out_timer_grp1_tmr2 = 0x00000002,
227 regk_iop_sap_out_timer_grp1_tmr3 = 0x00000003,
228 regk_iop_sap_out_tmr200 = 0x00000001,
229 regk_iop_sap_out_yes = 0x00000001
230};
231#endif /* __iop_sap_out_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cfg_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cfg_defs.h
deleted file mode 100644
index 98ac95275a1c..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cfg_defs.h
+++ /dev/null
@@ -1,725 +0,0 @@
1#ifndef __iop_sw_cfg_defs_h
2#define __iop_sw_cfg_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_cfg.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sw_cfg_defs.h iop_sw_cfg.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_sw_cfg */
83
84/* Register rw_crc_par_owner, scope iop_sw_cfg, type rw */
85typedef struct {
86 unsigned int cfg : 2;
87 unsigned int dummy1 : 30;
88} reg_iop_sw_cfg_rw_crc_par_owner;
89#define REG_RD_ADDR_iop_sw_cfg_rw_crc_par_owner 0
90#define REG_WR_ADDR_iop_sw_cfg_rw_crc_par_owner 0
91
92/* Register rw_dmc_in_owner, scope iop_sw_cfg, type rw */
93typedef struct {
94 unsigned int cfg : 2;
95 unsigned int dummy1 : 30;
96} reg_iop_sw_cfg_rw_dmc_in_owner;
97#define REG_RD_ADDR_iop_sw_cfg_rw_dmc_in_owner 4
98#define REG_WR_ADDR_iop_sw_cfg_rw_dmc_in_owner 4
99
100/* Register rw_dmc_out_owner, scope iop_sw_cfg, type rw */
101typedef struct {
102 unsigned int cfg : 2;
103 unsigned int dummy1 : 30;
104} reg_iop_sw_cfg_rw_dmc_out_owner;
105#define REG_RD_ADDR_iop_sw_cfg_rw_dmc_out_owner 8
106#define REG_WR_ADDR_iop_sw_cfg_rw_dmc_out_owner 8
107
108/* Register rw_fifo_in_owner, scope iop_sw_cfg, type rw */
109typedef struct {
110 unsigned int cfg : 2;
111 unsigned int dummy1 : 30;
112} reg_iop_sw_cfg_rw_fifo_in_owner;
113#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in_owner 12
114#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in_owner 12
115
116/* Register rw_fifo_in_extra_owner, scope iop_sw_cfg, type rw */
117typedef struct {
118 unsigned int cfg : 2;
119 unsigned int dummy1 : 30;
120} reg_iop_sw_cfg_rw_fifo_in_extra_owner;
121#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in_extra_owner 16
122#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in_extra_owner 16
123
124/* Register rw_fifo_out_owner, scope iop_sw_cfg, type rw */
125typedef struct {
126 unsigned int cfg : 2;
127 unsigned int dummy1 : 30;
128} reg_iop_sw_cfg_rw_fifo_out_owner;
129#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out_owner 20
130#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out_owner 20
131
132/* Register rw_fifo_out_extra_owner, scope iop_sw_cfg, type rw */
133typedef struct {
134 unsigned int cfg : 2;
135 unsigned int dummy1 : 30;
136} reg_iop_sw_cfg_rw_fifo_out_extra_owner;
137#define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out_extra_owner 24
138#define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out_extra_owner 24
139
140/* Register rw_sap_in_owner, scope iop_sw_cfg, type rw */
141typedef struct {
142 unsigned int cfg : 2;
143 unsigned int dummy1 : 30;
144} reg_iop_sw_cfg_rw_sap_in_owner;
145#define REG_RD_ADDR_iop_sw_cfg_rw_sap_in_owner 28
146#define REG_WR_ADDR_iop_sw_cfg_rw_sap_in_owner 28
147
148/* Register rw_sap_out_owner, scope iop_sw_cfg, type rw */
149typedef struct {
150 unsigned int cfg : 2;
151 unsigned int dummy1 : 30;
152} reg_iop_sw_cfg_rw_sap_out_owner;
153#define REG_RD_ADDR_iop_sw_cfg_rw_sap_out_owner 32
154#define REG_WR_ADDR_iop_sw_cfg_rw_sap_out_owner 32
155
156/* Register rw_scrc_in_owner, scope iop_sw_cfg, type rw */
157typedef struct {
158 unsigned int cfg : 2;
159 unsigned int dummy1 : 30;
160} reg_iop_sw_cfg_rw_scrc_in_owner;
161#define REG_RD_ADDR_iop_sw_cfg_rw_scrc_in_owner 36
162#define REG_WR_ADDR_iop_sw_cfg_rw_scrc_in_owner 36
163
164/* Register rw_scrc_out_owner, scope iop_sw_cfg, type rw */
165typedef struct {
166 unsigned int cfg : 2;
167 unsigned int dummy1 : 30;
168} reg_iop_sw_cfg_rw_scrc_out_owner;
169#define REG_RD_ADDR_iop_sw_cfg_rw_scrc_out_owner 40
170#define REG_WR_ADDR_iop_sw_cfg_rw_scrc_out_owner 40
171
172/* Register rw_spu_owner, scope iop_sw_cfg, type rw */
173typedef struct {
174 unsigned int cfg : 1;
175 unsigned int dummy1 : 31;
176} reg_iop_sw_cfg_rw_spu_owner;
177#define REG_RD_ADDR_iop_sw_cfg_rw_spu_owner 44
178#define REG_WR_ADDR_iop_sw_cfg_rw_spu_owner 44
179
180/* Register rw_timer_grp0_owner, scope iop_sw_cfg, type rw */
181typedef struct {
182 unsigned int cfg : 2;
183 unsigned int dummy1 : 30;
184} reg_iop_sw_cfg_rw_timer_grp0_owner;
185#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_owner 48
186#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_owner 48
187
188/* Register rw_timer_grp1_owner, scope iop_sw_cfg, type rw */
189typedef struct {
190 unsigned int cfg : 2;
191 unsigned int dummy1 : 30;
192} reg_iop_sw_cfg_rw_timer_grp1_owner;
193#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_owner 52
194#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_owner 52
195
196/* Register rw_trigger_grp0_owner, scope iop_sw_cfg, type rw */
197typedef struct {
198 unsigned int cfg : 2;
199 unsigned int dummy1 : 30;
200} reg_iop_sw_cfg_rw_trigger_grp0_owner;
201#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 56
202#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 56
203
204/* Register rw_trigger_grp1_owner, scope iop_sw_cfg, type rw */
205typedef struct {
206 unsigned int cfg : 2;
207 unsigned int dummy1 : 30;
208} reg_iop_sw_cfg_rw_trigger_grp1_owner;
209#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 60
210#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 60
211
212/* Register rw_trigger_grp2_owner, scope iop_sw_cfg, type rw */
213typedef struct {
214 unsigned int cfg : 2;
215 unsigned int dummy1 : 30;
216} reg_iop_sw_cfg_rw_trigger_grp2_owner;
217#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 64
218#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 64
219
220/* Register rw_trigger_grp3_owner, scope iop_sw_cfg, type rw */
221typedef struct {
222 unsigned int cfg : 2;
223 unsigned int dummy1 : 30;
224} reg_iop_sw_cfg_rw_trigger_grp3_owner;
225#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 68
226#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 68
227
228/* Register rw_trigger_grp4_owner, scope iop_sw_cfg, type rw */
229typedef struct {
230 unsigned int cfg : 2;
231 unsigned int dummy1 : 30;
232} reg_iop_sw_cfg_rw_trigger_grp4_owner;
233#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 72
234#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 72
235
236/* Register rw_trigger_grp5_owner, scope iop_sw_cfg, type rw */
237typedef struct {
238 unsigned int cfg : 2;
239 unsigned int dummy1 : 30;
240} reg_iop_sw_cfg_rw_trigger_grp5_owner;
241#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 76
242#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 76
243
244/* Register rw_trigger_grp6_owner, scope iop_sw_cfg, type rw */
245typedef struct {
246 unsigned int cfg : 2;
247 unsigned int dummy1 : 30;
248} reg_iop_sw_cfg_rw_trigger_grp6_owner;
249#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 80
250#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 80
251
252/* Register rw_trigger_grp7_owner, scope iop_sw_cfg, type rw */
253typedef struct {
254 unsigned int cfg : 2;
255 unsigned int dummy1 : 30;
256} reg_iop_sw_cfg_rw_trigger_grp7_owner;
257#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 84
258#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 84
259
260/* Register rw_bus_mask, scope iop_sw_cfg, type rw */
261typedef struct {
262 unsigned int byte0 : 8;
263 unsigned int byte1 : 8;
264 unsigned int byte2 : 8;
265 unsigned int byte3 : 8;
266} reg_iop_sw_cfg_rw_bus_mask;
267#define REG_RD_ADDR_iop_sw_cfg_rw_bus_mask 88
268#define REG_WR_ADDR_iop_sw_cfg_rw_bus_mask 88
269
270/* Register rw_bus_oe_mask, scope iop_sw_cfg, type rw */
271typedef struct {
272 unsigned int byte0 : 1;
273 unsigned int byte1 : 1;
274 unsigned int byte2 : 1;
275 unsigned int byte3 : 1;
276 unsigned int dummy1 : 28;
277} reg_iop_sw_cfg_rw_bus_oe_mask;
278#define REG_RD_ADDR_iop_sw_cfg_rw_bus_oe_mask 92
279#define REG_WR_ADDR_iop_sw_cfg_rw_bus_oe_mask 92
280
281/* Register rw_gio_mask, scope iop_sw_cfg, type rw */
282typedef struct {
283 unsigned int val : 32;
284} reg_iop_sw_cfg_rw_gio_mask;
285#define REG_RD_ADDR_iop_sw_cfg_rw_gio_mask 96
286#define REG_WR_ADDR_iop_sw_cfg_rw_gio_mask 96
287
288/* Register rw_gio_oe_mask, scope iop_sw_cfg, type rw */
289typedef struct {
290 unsigned int val : 32;
291} reg_iop_sw_cfg_rw_gio_oe_mask;
292#define REG_RD_ADDR_iop_sw_cfg_rw_gio_oe_mask 100
293#define REG_WR_ADDR_iop_sw_cfg_rw_gio_oe_mask 100
294
295/* Register rw_pinmapping, scope iop_sw_cfg, type rw */
296typedef struct {
297 unsigned int bus_byte0 : 2;
298 unsigned int bus_byte1 : 2;
299 unsigned int bus_byte2 : 2;
300 unsigned int bus_byte3 : 2;
301 unsigned int gio3_0 : 2;
302 unsigned int gio7_4 : 2;
303 unsigned int gio11_8 : 2;
304 unsigned int gio15_12 : 2;
305 unsigned int gio19_16 : 2;
306 unsigned int gio23_20 : 2;
307 unsigned int gio27_24 : 2;
308 unsigned int gio31_28 : 2;
309 unsigned int dummy1 : 8;
310} reg_iop_sw_cfg_rw_pinmapping;
311#define REG_RD_ADDR_iop_sw_cfg_rw_pinmapping 104
312#define REG_WR_ADDR_iop_sw_cfg_rw_pinmapping 104
313
314/* Register rw_bus_out_cfg, scope iop_sw_cfg, type rw */
315typedef struct {
316 unsigned int bus_lo : 2;
317 unsigned int bus_hi : 2;
318 unsigned int bus_lo_oe : 2;
319 unsigned int bus_hi_oe : 2;
320 unsigned int dummy1 : 24;
321} reg_iop_sw_cfg_rw_bus_out_cfg;
322#define REG_RD_ADDR_iop_sw_cfg_rw_bus_out_cfg 108
323#define REG_WR_ADDR_iop_sw_cfg_rw_bus_out_cfg 108
324
325/* Register rw_gio_out_grp0_cfg, scope iop_sw_cfg, type rw */
326typedef struct {
327 unsigned int gio0 : 3;
328 unsigned int gio0_oe : 1;
329 unsigned int gio1 : 3;
330 unsigned int gio1_oe : 1;
331 unsigned int gio2 : 3;
332 unsigned int gio2_oe : 1;
333 unsigned int gio3 : 3;
334 unsigned int gio3_oe : 1;
335 unsigned int dummy1 : 16;
336} reg_iop_sw_cfg_rw_gio_out_grp0_cfg;
337#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 112
338#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 112
339
340/* Register rw_gio_out_grp1_cfg, scope iop_sw_cfg, type rw */
341typedef struct {
342 unsigned int gio4 : 3;
343 unsigned int gio4_oe : 1;
344 unsigned int gio5 : 3;
345 unsigned int gio5_oe : 1;
346 unsigned int gio6 : 3;
347 unsigned int gio6_oe : 1;
348 unsigned int gio7 : 3;
349 unsigned int gio7_oe : 1;
350 unsigned int dummy1 : 16;
351} reg_iop_sw_cfg_rw_gio_out_grp1_cfg;
352#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 116
353#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 116
354
355/* Register rw_gio_out_grp2_cfg, scope iop_sw_cfg, type rw */
356typedef struct {
357 unsigned int gio8 : 3;
358 unsigned int gio8_oe : 1;
359 unsigned int gio9 : 3;
360 unsigned int gio9_oe : 1;
361 unsigned int gio10 : 3;
362 unsigned int gio10_oe : 1;
363 unsigned int gio11 : 3;
364 unsigned int gio11_oe : 1;
365 unsigned int dummy1 : 16;
366} reg_iop_sw_cfg_rw_gio_out_grp2_cfg;
367#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 120
368#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 120
369
370/* Register rw_gio_out_grp3_cfg, scope iop_sw_cfg, type rw */
371typedef struct {
372 unsigned int gio12 : 3;
373 unsigned int gio12_oe : 1;
374 unsigned int gio13 : 3;
375 unsigned int gio13_oe : 1;
376 unsigned int gio14 : 3;
377 unsigned int gio14_oe : 1;
378 unsigned int gio15 : 3;
379 unsigned int gio15_oe : 1;
380 unsigned int dummy1 : 16;
381} reg_iop_sw_cfg_rw_gio_out_grp3_cfg;
382#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 124
383#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 124
384
385/* Register rw_gio_out_grp4_cfg, scope iop_sw_cfg, type rw */
386typedef struct {
387 unsigned int gio16 : 3;
388 unsigned int gio16_oe : 1;
389 unsigned int gio17 : 3;
390 unsigned int gio17_oe : 1;
391 unsigned int gio18 : 3;
392 unsigned int gio18_oe : 1;
393 unsigned int gio19 : 3;
394 unsigned int gio19_oe : 1;
395 unsigned int dummy1 : 16;
396} reg_iop_sw_cfg_rw_gio_out_grp4_cfg;
397#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 128
398#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 128
399
400/* Register rw_gio_out_grp5_cfg, scope iop_sw_cfg, type rw */
401typedef struct {
402 unsigned int gio20 : 3;
403 unsigned int gio20_oe : 1;
404 unsigned int gio21 : 3;
405 unsigned int gio21_oe : 1;
406 unsigned int gio22 : 3;
407 unsigned int gio22_oe : 1;
408 unsigned int gio23 : 3;
409 unsigned int gio23_oe : 1;
410 unsigned int dummy1 : 16;
411} reg_iop_sw_cfg_rw_gio_out_grp5_cfg;
412#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 132
413#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 132
414
415/* Register rw_gio_out_grp6_cfg, scope iop_sw_cfg, type rw */
416typedef struct {
417 unsigned int gio24 : 3;
418 unsigned int gio24_oe : 1;
419 unsigned int gio25 : 3;
420 unsigned int gio25_oe : 1;
421 unsigned int gio26 : 3;
422 unsigned int gio26_oe : 1;
423 unsigned int gio27 : 3;
424 unsigned int gio27_oe : 1;
425 unsigned int dummy1 : 16;
426} reg_iop_sw_cfg_rw_gio_out_grp6_cfg;
427#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 136
428#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 136
429
430/* Register rw_gio_out_grp7_cfg, scope iop_sw_cfg, type rw */
431typedef struct {
432 unsigned int gio28 : 3;
433 unsigned int gio28_oe : 1;
434 unsigned int gio29 : 3;
435 unsigned int gio29_oe : 1;
436 unsigned int gio30 : 3;
437 unsigned int gio30_oe : 1;
438 unsigned int gio31 : 3;
439 unsigned int gio31_oe : 1;
440 unsigned int dummy1 : 16;
441} reg_iop_sw_cfg_rw_gio_out_grp7_cfg;
442#define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 140
443#define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 140
444
445/* Register rw_spu_cfg, scope iop_sw_cfg, type rw */
446typedef struct {
447 unsigned int bus0_in : 1;
448 unsigned int bus1_in : 1;
449 unsigned int dummy1 : 30;
450} reg_iop_sw_cfg_rw_spu_cfg;
451#define REG_RD_ADDR_iop_sw_cfg_rw_spu_cfg 144
452#define REG_WR_ADDR_iop_sw_cfg_rw_spu_cfg 144
453
454/* Register rw_timer_grp0_cfg, scope iop_sw_cfg, type rw */
455typedef struct {
456 unsigned int ext_clk : 3;
457 unsigned int tmr0_en : 2;
458 unsigned int tmr1_en : 2;
459 unsigned int tmr2_en : 2;
460 unsigned int tmr3_en : 2;
461 unsigned int tmr0_dis : 2;
462 unsigned int tmr1_dis : 2;
463 unsigned int tmr2_dis : 2;
464 unsigned int tmr3_dis : 2;
465 unsigned int dummy1 : 13;
466} reg_iop_sw_cfg_rw_timer_grp0_cfg;
467#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 148
468#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 148
469
470/* Register rw_timer_grp1_cfg, scope iop_sw_cfg, type rw */
471typedef struct {
472 unsigned int ext_clk : 3;
473 unsigned int tmr0_en : 2;
474 unsigned int tmr1_en : 2;
475 unsigned int tmr2_en : 2;
476 unsigned int tmr3_en : 2;
477 unsigned int tmr0_dis : 2;
478 unsigned int tmr1_dis : 2;
479 unsigned int tmr2_dis : 2;
480 unsigned int tmr3_dis : 2;
481 unsigned int dummy1 : 13;
482} reg_iop_sw_cfg_rw_timer_grp1_cfg;
483#define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 152
484#define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 152
485
486/* Register rw_trigger_grps_cfg, scope iop_sw_cfg, type rw */
487typedef struct {
488 unsigned int grp0_dis : 1;
489 unsigned int grp0_en : 1;
490 unsigned int grp1_dis : 1;
491 unsigned int grp1_en : 1;
492 unsigned int grp2_dis : 1;
493 unsigned int grp2_en : 1;
494 unsigned int grp3_dis : 1;
495 unsigned int grp3_en : 1;
496 unsigned int grp4_dis : 1;
497 unsigned int grp4_en : 1;
498 unsigned int grp5_dis : 1;
499 unsigned int grp5_en : 1;
500 unsigned int grp6_dis : 1;
501 unsigned int grp6_en : 1;
502 unsigned int grp7_dis : 1;
503 unsigned int grp7_en : 1;
504 unsigned int dummy1 : 16;
505} reg_iop_sw_cfg_rw_trigger_grps_cfg;
506#define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 156
507#define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 156
508
509/* Register rw_pdp_cfg, scope iop_sw_cfg, type rw */
510typedef struct {
511 unsigned int out_strb : 4;
512 unsigned int in_src : 2;
513 unsigned int in_size : 3;
514 unsigned int in_last : 2;
515 unsigned int in_strb : 4;
516 unsigned int dummy1 : 17;
517} reg_iop_sw_cfg_rw_pdp_cfg;
518#define REG_RD_ADDR_iop_sw_cfg_rw_pdp_cfg 160
519#define REG_WR_ADDR_iop_sw_cfg_rw_pdp_cfg 160
520
521/* Register rw_sdp_cfg, scope iop_sw_cfg, type rw */
522typedef struct {
523 unsigned int sdp_out_strb : 3;
524 unsigned int sdp_in_data : 3;
525 unsigned int sdp_in_last : 2;
526 unsigned int sdp_in_strb : 3;
527 unsigned int dummy1 : 21;
528} reg_iop_sw_cfg_rw_sdp_cfg;
529#define REG_RD_ADDR_iop_sw_cfg_rw_sdp_cfg 164
530#define REG_WR_ADDR_iop_sw_cfg_rw_sdp_cfg 164
531
532
533/* Constants */
534enum {
535 regk_iop_sw_cfg_a = 0x00000001,
536 regk_iop_sw_cfg_b = 0x00000002,
537 regk_iop_sw_cfg_bus = 0x00000000,
538 regk_iop_sw_cfg_bus_rot16 = 0x00000002,
539 regk_iop_sw_cfg_bus_rot24 = 0x00000003,
540 regk_iop_sw_cfg_bus_rot8 = 0x00000001,
541 regk_iop_sw_cfg_clk12 = 0x00000000,
542 regk_iop_sw_cfg_cpu = 0x00000000,
543 regk_iop_sw_cfg_gated_clk0 = 0x0000000e,
544 regk_iop_sw_cfg_gated_clk1 = 0x0000000f,
545 regk_iop_sw_cfg_gio0 = 0x00000004,
546 regk_iop_sw_cfg_gio1 = 0x00000001,
547 regk_iop_sw_cfg_gio2 = 0x00000005,
548 regk_iop_sw_cfg_gio3 = 0x00000002,
549 regk_iop_sw_cfg_gio4 = 0x00000006,
550 regk_iop_sw_cfg_gio5 = 0x00000003,
551 regk_iop_sw_cfg_gio6 = 0x00000007,
552 regk_iop_sw_cfg_gio7 = 0x00000004,
553 regk_iop_sw_cfg_gio_in18 = 0x00000002,
554 regk_iop_sw_cfg_gio_in19 = 0x00000003,
555 regk_iop_sw_cfg_gio_in20 = 0x00000004,
556 regk_iop_sw_cfg_gio_in21 = 0x00000005,
557 regk_iop_sw_cfg_gio_in26 = 0x00000006,
558 regk_iop_sw_cfg_gio_in27 = 0x00000007,
559 regk_iop_sw_cfg_gio_in4 = 0x00000000,
560 regk_iop_sw_cfg_gio_in5 = 0x00000001,
561 regk_iop_sw_cfg_last_timer_grp0_tmr2 = 0x00000001,
562 regk_iop_sw_cfg_last_timer_grp1_tmr2 = 0x00000002,
563 regk_iop_sw_cfg_last_timer_grp1_tmr3 = 0x00000003,
564 regk_iop_sw_cfg_mpu = 0x00000001,
565 regk_iop_sw_cfg_none = 0x00000000,
566 regk_iop_sw_cfg_pdp_out = 0x00000001,
567 regk_iop_sw_cfg_pdp_out_hi = 0x00000001,
568 regk_iop_sw_cfg_pdp_out_lo = 0x00000000,
569 regk_iop_sw_cfg_rw_bus_mask_default = 0x00000000,
570 regk_iop_sw_cfg_rw_bus_oe_mask_default = 0x00000000,
571 regk_iop_sw_cfg_rw_bus_out_cfg_default = 0x00000000,
572 regk_iop_sw_cfg_rw_crc_par_owner_default = 0x00000000,
573 regk_iop_sw_cfg_rw_dmc_in_owner_default = 0x00000000,
574 regk_iop_sw_cfg_rw_dmc_out_owner_default = 0x00000000,
575 regk_iop_sw_cfg_rw_fifo_in_extra_owner_default = 0x00000000,
576 regk_iop_sw_cfg_rw_fifo_in_owner_default = 0x00000000,
577 regk_iop_sw_cfg_rw_fifo_out_extra_owner_default = 0x00000000,
578 regk_iop_sw_cfg_rw_fifo_out_owner_default = 0x00000000,
579 regk_iop_sw_cfg_rw_gio_mask_default = 0x00000000,
580 regk_iop_sw_cfg_rw_gio_oe_mask_default = 0x00000000,
581 regk_iop_sw_cfg_rw_gio_out_grp0_cfg_default = 0x00000000,
582 regk_iop_sw_cfg_rw_gio_out_grp1_cfg_default = 0x00000000,
583 regk_iop_sw_cfg_rw_gio_out_grp2_cfg_default = 0x00000000,
584 regk_iop_sw_cfg_rw_gio_out_grp3_cfg_default = 0x00000000,
585 regk_iop_sw_cfg_rw_gio_out_grp4_cfg_default = 0x00000000,
586 regk_iop_sw_cfg_rw_gio_out_grp5_cfg_default = 0x00000000,
587 regk_iop_sw_cfg_rw_gio_out_grp6_cfg_default = 0x00000000,
588 regk_iop_sw_cfg_rw_gio_out_grp7_cfg_default = 0x00000000,
589 regk_iop_sw_cfg_rw_pdp_cfg_default = 0x00000000,
590 regk_iop_sw_cfg_rw_pinmapping_default = 0x00555555,
591 regk_iop_sw_cfg_rw_sap_in_owner_default = 0x00000000,
592 regk_iop_sw_cfg_rw_sap_out_owner_default = 0x00000000,
593 regk_iop_sw_cfg_rw_scrc_in_owner_default = 0x00000000,
594 regk_iop_sw_cfg_rw_scrc_out_owner_default = 0x00000000,
595 regk_iop_sw_cfg_rw_sdp_cfg_default = 0x00000000,
596 regk_iop_sw_cfg_rw_spu_cfg_default = 0x00000000,
597 regk_iop_sw_cfg_rw_spu_owner_default = 0x00000000,
598 regk_iop_sw_cfg_rw_timer_grp0_cfg_default = 0x00000000,
599 regk_iop_sw_cfg_rw_timer_grp0_owner_default = 0x00000000,
600 regk_iop_sw_cfg_rw_timer_grp1_cfg_default = 0x00000000,
601 regk_iop_sw_cfg_rw_timer_grp1_owner_default = 0x00000000,
602 regk_iop_sw_cfg_rw_trigger_grp0_owner_default = 0x00000000,
603 regk_iop_sw_cfg_rw_trigger_grp1_owner_default = 0x00000000,
604 regk_iop_sw_cfg_rw_trigger_grp2_owner_default = 0x00000000,
605 regk_iop_sw_cfg_rw_trigger_grp3_owner_default = 0x00000000,
606 regk_iop_sw_cfg_rw_trigger_grp4_owner_default = 0x00000000,
607 regk_iop_sw_cfg_rw_trigger_grp5_owner_default = 0x00000000,
608 regk_iop_sw_cfg_rw_trigger_grp6_owner_default = 0x00000000,
609 regk_iop_sw_cfg_rw_trigger_grp7_owner_default = 0x00000000,
610 regk_iop_sw_cfg_rw_trigger_grps_cfg_default = 0x00000000,
611 regk_iop_sw_cfg_sdp_out = 0x00000004,
612 regk_iop_sw_cfg_size16 = 0x00000002,
613 regk_iop_sw_cfg_size24 = 0x00000003,
614 regk_iop_sw_cfg_size32 = 0x00000004,
615 regk_iop_sw_cfg_size8 = 0x00000001,
616 regk_iop_sw_cfg_spu = 0x00000002,
617 regk_iop_sw_cfg_spu_bus_out0_hi = 0x00000002,
618 regk_iop_sw_cfg_spu_bus_out0_lo = 0x00000002,
619 regk_iop_sw_cfg_spu_bus_out1_hi = 0x00000003,
620 regk_iop_sw_cfg_spu_bus_out1_lo = 0x00000003,
621 regk_iop_sw_cfg_spu_g0 = 0x00000007,
622 regk_iop_sw_cfg_spu_g1 = 0x00000007,
623 regk_iop_sw_cfg_spu_g2 = 0x00000007,
624 regk_iop_sw_cfg_spu_g3 = 0x00000007,
625 regk_iop_sw_cfg_spu_g4 = 0x00000007,
626 regk_iop_sw_cfg_spu_g5 = 0x00000007,
627 regk_iop_sw_cfg_spu_g6 = 0x00000007,
628 regk_iop_sw_cfg_spu_g7 = 0x00000007,
629 regk_iop_sw_cfg_spu_gio0 = 0x00000000,
630 regk_iop_sw_cfg_spu_gio1 = 0x00000001,
631 regk_iop_sw_cfg_spu_gio5 = 0x00000005,
632 regk_iop_sw_cfg_spu_gio6 = 0x00000006,
633 regk_iop_sw_cfg_spu_gio7 = 0x00000007,
634 regk_iop_sw_cfg_spu_gio_out0 = 0x00000008,
635 regk_iop_sw_cfg_spu_gio_out1 = 0x00000009,
636 regk_iop_sw_cfg_spu_gio_out2 = 0x0000000a,
637 regk_iop_sw_cfg_spu_gio_out3 = 0x0000000b,
638 regk_iop_sw_cfg_spu_gio_out4 = 0x0000000c,
639 regk_iop_sw_cfg_spu_gio_out5 = 0x0000000d,
640 regk_iop_sw_cfg_spu_gio_out6 = 0x0000000e,
641 regk_iop_sw_cfg_spu_gio_out7 = 0x0000000f,
642 regk_iop_sw_cfg_spu_gioout0 = 0x00000000,
643 regk_iop_sw_cfg_spu_gioout1 = 0x00000000,
644 regk_iop_sw_cfg_spu_gioout10 = 0x00000007,
645 regk_iop_sw_cfg_spu_gioout11 = 0x00000007,
646 regk_iop_sw_cfg_spu_gioout12 = 0x00000007,
647 regk_iop_sw_cfg_spu_gioout13 = 0x00000007,
648 regk_iop_sw_cfg_spu_gioout14 = 0x00000007,
649 regk_iop_sw_cfg_spu_gioout15 = 0x00000007,
650 regk_iop_sw_cfg_spu_gioout16 = 0x00000007,
651 regk_iop_sw_cfg_spu_gioout17 = 0x00000007,
652 regk_iop_sw_cfg_spu_gioout18 = 0x00000007,
653 regk_iop_sw_cfg_spu_gioout19 = 0x00000007,
654 regk_iop_sw_cfg_spu_gioout2 = 0x00000001,
655 regk_iop_sw_cfg_spu_gioout20 = 0x00000007,
656 regk_iop_sw_cfg_spu_gioout21 = 0x00000007,
657 regk_iop_sw_cfg_spu_gioout22 = 0x00000007,
658 regk_iop_sw_cfg_spu_gioout23 = 0x00000007,
659 regk_iop_sw_cfg_spu_gioout24 = 0x00000007,
660 regk_iop_sw_cfg_spu_gioout25 = 0x00000007,
661 regk_iop_sw_cfg_spu_gioout26 = 0x00000007,
662 regk_iop_sw_cfg_spu_gioout27 = 0x00000007,
663 regk_iop_sw_cfg_spu_gioout28 = 0x00000007,
664 regk_iop_sw_cfg_spu_gioout29 = 0x00000007,
665 regk_iop_sw_cfg_spu_gioout3 = 0x00000001,
666 regk_iop_sw_cfg_spu_gioout30 = 0x00000007,
667 regk_iop_sw_cfg_spu_gioout31 = 0x00000007,
668 regk_iop_sw_cfg_spu_gioout4 = 0x00000002,
669 regk_iop_sw_cfg_spu_gioout5 = 0x00000002,
670 regk_iop_sw_cfg_spu_gioout6 = 0x00000003,
671 regk_iop_sw_cfg_spu_gioout7 = 0x00000003,
672 regk_iop_sw_cfg_spu_gioout8 = 0x00000007,
673 regk_iop_sw_cfg_spu_gioout9 = 0x00000007,
674 regk_iop_sw_cfg_strb_timer_grp0_tmr0 = 0x00000001,
675 regk_iop_sw_cfg_strb_timer_grp0_tmr1 = 0x00000002,
676 regk_iop_sw_cfg_strb_timer_grp1_tmr0 = 0x00000003,
677 regk_iop_sw_cfg_strb_timer_grp1_tmr1 = 0x00000002,
678 regk_iop_sw_cfg_timer_grp0 = 0x00000000,
679 regk_iop_sw_cfg_timer_grp0_rot = 0x00000001,
680 regk_iop_sw_cfg_timer_grp0_strb0 = 0x00000005,
681 regk_iop_sw_cfg_timer_grp0_strb1 = 0x00000005,
682 regk_iop_sw_cfg_timer_grp0_strb2 = 0x00000005,
683 regk_iop_sw_cfg_timer_grp0_strb3 = 0x00000005,
684 regk_iop_sw_cfg_timer_grp0_tmr0 = 0x00000002,
685 regk_iop_sw_cfg_timer_grp1 = 0x00000000,
686 regk_iop_sw_cfg_timer_grp1_rot = 0x00000001,
687 regk_iop_sw_cfg_timer_grp1_strb0 = 0x00000006,
688 regk_iop_sw_cfg_timer_grp1_strb1 = 0x00000006,
689 regk_iop_sw_cfg_timer_grp1_strb2 = 0x00000006,
690 regk_iop_sw_cfg_timer_grp1_strb3 = 0x00000006,
691 regk_iop_sw_cfg_timer_grp1_tmr0 = 0x00000003,
692 regk_iop_sw_cfg_trig0_0 = 0x00000000,
693 regk_iop_sw_cfg_trig0_1 = 0x00000000,
694 regk_iop_sw_cfg_trig0_2 = 0x00000000,
695 regk_iop_sw_cfg_trig0_3 = 0x00000000,
696 regk_iop_sw_cfg_trig1_0 = 0x00000000,
697 regk_iop_sw_cfg_trig1_1 = 0x00000000,
698 regk_iop_sw_cfg_trig1_2 = 0x00000000,
699 regk_iop_sw_cfg_trig1_3 = 0x00000000,
700 regk_iop_sw_cfg_trig2_0 = 0x00000001,
701 regk_iop_sw_cfg_trig2_1 = 0x00000001,
702 regk_iop_sw_cfg_trig2_2 = 0x00000001,
703 regk_iop_sw_cfg_trig2_3 = 0x00000001,
704 regk_iop_sw_cfg_trig3_0 = 0x00000001,
705 regk_iop_sw_cfg_trig3_1 = 0x00000001,
706 regk_iop_sw_cfg_trig3_2 = 0x00000001,
707 regk_iop_sw_cfg_trig3_3 = 0x00000001,
708 regk_iop_sw_cfg_trig4_0 = 0x00000002,
709 regk_iop_sw_cfg_trig4_1 = 0x00000002,
710 regk_iop_sw_cfg_trig4_2 = 0x00000002,
711 regk_iop_sw_cfg_trig4_3 = 0x00000002,
712 regk_iop_sw_cfg_trig5_0 = 0x00000002,
713 regk_iop_sw_cfg_trig5_1 = 0x00000002,
714 regk_iop_sw_cfg_trig5_2 = 0x00000002,
715 regk_iop_sw_cfg_trig5_3 = 0x00000002,
716 regk_iop_sw_cfg_trig6_0 = 0x00000003,
717 regk_iop_sw_cfg_trig6_1 = 0x00000003,
718 regk_iop_sw_cfg_trig6_2 = 0x00000003,
719 regk_iop_sw_cfg_trig6_3 = 0x00000003,
720 regk_iop_sw_cfg_trig7_0 = 0x00000003,
721 regk_iop_sw_cfg_trig7_1 = 0x00000003,
722 regk_iop_sw_cfg_trig7_2 = 0x00000003,
723 regk_iop_sw_cfg_trig7_3 = 0x00000003
724};
725#endif /* __iop_sw_cfg_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cpu_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cpu_defs.h
deleted file mode 100644
index a16f556370eb..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cpu_defs.h
+++ /dev/null
@@ -1,522 +0,0 @@
1#ifndef __iop_sw_cpu_defs_h
2#define __iop_sw_cpu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_cpu.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sw_cpu_defs.h iop_sw_cpu.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_sw_cpu */
83
84/* Register r_mpu_trace, scope iop_sw_cpu, type r */
85typedef unsigned int reg_iop_sw_cpu_r_mpu_trace;
86#define REG_RD_ADDR_iop_sw_cpu_r_mpu_trace 0
87
88/* Register r_spu_trace, scope iop_sw_cpu, type r */
89typedef unsigned int reg_iop_sw_cpu_r_spu_trace;
90#define REG_RD_ADDR_iop_sw_cpu_r_spu_trace 4
91
92/* Register r_spu_fsm_trace, scope iop_sw_cpu, type r */
93typedef unsigned int reg_iop_sw_cpu_r_spu_fsm_trace;
94#define REG_RD_ADDR_iop_sw_cpu_r_spu_fsm_trace 8
95
96/* Register rw_mc_ctrl, scope iop_sw_cpu, type rw */
97typedef struct {
98 unsigned int keep_owner : 1;
99 unsigned int cmd : 2;
100 unsigned int size : 3;
101 unsigned int wr_spu_mem : 1;
102 unsigned int dummy1 : 25;
103} reg_iop_sw_cpu_rw_mc_ctrl;
104#define REG_RD_ADDR_iop_sw_cpu_rw_mc_ctrl 12
105#define REG_WR_ADDR_iop_sw_cpu_rw_mc_ctrl 12
106
107/* Register rw_mc_data, scope iop_sw_cpu, type rw */
108typedef struct {
109 unsigned int val : 32;
110} reg_iop_sw_cpu_rw_mc_data;
111#define REG_RD_ADDR_iop_sw_cpu_rw_mc_data 16
112#define REG_WR_ADDR_iop_sw_cpu_rw_mc_data 16
113
114/* Register rw_mc_addr, scope iop_sw_cpu, type rw */
115typedef unsigned int reg_iop_sw_cpu_rw_mc_addr;
116#define REG_RD_ADDR_iop_sw_cpu_rw_mc_addr 20
117#define REG_WR_ADDR_iop_sw_cpu_rw_mc_addr 20
118
119/* Register rs_mc_data, scope iop_sw_cpu, type rs */
120typedef unsigned int reg_iop_sw_cpu_rs_mc_data;
121#define REG_RD_ADDR_iop_sw_cpu_rs_mc_data 24
122
123/* Register r_mc_data, scope iop_sw_cpu, type r */
124typedef unsigned int reg_iop_sw_cpu_r_mc_data;
125#define REG_RD_ADDR_iop_sw_cpu_r_mc_data 28
126
127/* Register r_mc_stat, scope iop_sw_cpu, type r */
128typedef struct {
129 unsigned int busy_cpu : 1;
130 unsigned int busy_mpu : 1;
131 unsigned int busy_spu : 1;
132 unsigned int owned_by_cpu : 1;
133 unsigned int owned_by_mpu : 1;
134 unsigned int owned_by_spu : 1;
135 unsigned int dummy1 : 26;
136} reg_iop_sw_cpu_r_mc_stat;
137#define REG_RD_ADDR_iop_sw_cpu_r_mc_stat 32
138
139/* Register rw_bus_clr_mask, scope iop_sw_cpu, type rw */
140typedef struct {
141 unsigned int byte0 : 8;
142 unsigned int byte1 : 8;
143 unsigned int byte2 : 8;
144 unsigned int byte3 : 8;
145} reg_iop_sw_cpu_rw_bus_clr_mask;
146#define REG_RD_ADDR_iop_sw_cpu_rw_bus_clr_mask 36
147#define REG_WR_ADDR_iop_sw_cpu_rw_bus_clr_mask 36
148
149/* Register rw_bus_set_mask, scope iop_sw_cpu, type rw */
150typedef struct {
151 unsigned int byte0 : 8;
152 unsigned int byte1 : 8;
153 unsigned int byte2 : 8;
154 unsigned int byte3 : 8;
155} reg_iop_sw_cpu_rw_bus_set_mask;
156#define REG_RD_ADDR_iop_sw_cpu_rw_bus_set_mask 40
157#define REG_WR_ADDR_iop_sw_cpu_rw_bus_set_mask 40
158
159/* Register rw_bus_oe_clr_mask, scope iop_sw_cpu, type rw */
160typedef struct {
161 unsigned int byte0 : 1;
162 unsigned int byte1 : 1;
163 unsigned int byte2 : 1;
164 unsigned int byte3 : 1;
165 unsigned int dummy1 : 28;
166} reg_iop_sw_cpu_rw_bus_oe_clr_mask;
167#define REG_RD_ADDR_iop_sw_cpu_rw_bus_oe_clr_mask 44
168#define REG_WR_ADDR_iop_sw_cpu_rw_bus_oe_clr_mask 44
169
170/* Register rw_bus_oe_set_mask, scope iop_sw_cpu, type rw */
171typedef struct {
172 unsigned int byte0 : 1;
173 unsigned int byte1 : 1;
174 unsigned int byte2 : 1;
175 unsigned int byte3 : 1;
176 unsigned int dummy1 : 28;
177} reg_iop_sw_cpu_rw_bus_oe_set_mask;
178#define REG_RD_ADDR_iop_sw_cpu_rw_bus_oe_set_mask 48
179#define REG_WR_ADDR_iop_sw_cpu_rw_bus_oe_set_mask 48
180
181/* Register r_bus_in, scope iop_sw_cpu, type r */
182typedef unsigned int reg_iop_sw_cpu_r_bus_in;
183#define REG_RD_ADDR_iop_sw_cpu_r_bus_in 52
184
185/* Register rw_gio_clr_mask, scope iop_sw_cpu, type rw */
186typedef struct {
187 unsigned int val : 32;
188} reg_iop_sw_cpu_rw_gio_clr_mask;
189#define REG_RD_ADDR_iop_sw_cpu_rw_gio_clr_mask 56
190#define REG_WR_ADDR_iop_sw_cpu_rw_gio_clr_mask 56
191
192/* Register rw_gio_set_mask, scope iop_sw_cpu, type rw */
193typedef struct {
194 unsigned int val : 32;
195} reg_iop_sw_cpu_rw_gio_set_mask;
196#define REG_RD_ADDR_iop_sw_cpu_rw_gio_set_mask 60
197#define REG_WR_ADDR_iop_sw_cpu_rw_gio_set_mask 60
198
199/* Register rw_gio_oe_clr_mask, scope iop_sw_cpu, type rw */
200typedef struct {
201 unsigned int val : 32;
202} reg_iop_sw_cpu_rw_gio_oe_clr_mask;
203#define REG_RD_ADDR_iop_sw_cpu_rw_gio_oe_clr_mask 64
204#define REG_WR_ADDR_iop_sw_cpu_rw_gio_oe_clr_mask 64
205
206/* Register rw_gio_oe_set_mask, scope iop_sw_cpu, type rw */
207typedef struct {
208 unsigned int val : 32;
209} reg_iop_sw_cpu_rw_gio_oe_set_mask;
210#define REG_RD_ADDR_iop_sw_cpu_rw_gio_oe_set_mask 68
211#define REG_WR_ADDR_iop_sw_cpu_rw_gio_oe_set_mask 68
212
213/* Register r_gio_in, scope iop_sw_cpu, type r */
214typedef unsigned int reg_iop_sw_cpu_r_gio_in;
215#define REG_RD_ADDR_iop_sw_cpu_r_gio_in 72
216
217/* Register rw_intr0_mask, scope iop_sw_cpu, type rw */
218typedef struct {
219 unsigned int mpu_0 : 1;
220 unsigned int mpu_1 : 1;
221 unsigned int mpu_2 : 1;
222 unsigned int mpu_3 : 1;
223 unsigned int mpu_4 : 1;
224 unsigned int mpu_5 : 1;
225 unsigned int mpu_6 : 1;
226 unsigned int mpu_7 : 1;
227 unsigned int mpu_8 : 1;
228 unsigned int mpu_9 : 1;
229 unsigned int mpu_10 : 1;
230 unsigned int mpu_11 : 1;
231 unsigned int mpu_12 : 1;
232 unsigned int mpu_13 : 1;
233 unsigned int mpu_14 : 1;
234 unsigned int mpu_15 : 1;
235 unsigned int spu_0 : 1;
236 unsigned int spu_1 : 1;
237 unsigned int spu_2 : 1;
238 unsigned int spu_3 : 1;
239 unsigned int spu_4 : 1;
240 unsigned int spu_5 : 1;
241 unsigned int spu_6 : 1;
242 unsigned int spu_7 : 1;
243 unsigned int spu_8 : 1;
244 unsigned int spu_9 : 1;
245 unsigned int spu_10 : 1;
246 unsigned int spu_11 : 1;
247 unsigned int spu_12 : 1;
248 unsigned int spu_13 : 1;
249 unsigned int spu_14 : 1;
250 unsigned int spu_15 : 1;
251} reg_iop_sw_cpu_rw_intr0_mask;
252#define REG_RD_ADDR_iop_sw_cpu_rw_intr0_mask 76
253#define REG_WR_ADDR_iop_sw_cpu_rw_intr0_mask 76
254
255/* Register rw_ack_intr0, scope iop_sw_cpu, type rw */
256typedef struct {
257 unsigned int mpu_0 : 1;
258 unsigned int mpu_1 : 1;
259 unsigned int mpu_2 : 1;
260 unsigned int mpu_3 : 1;
261 unsigned int mpu_4 : 1;
262 unsigned int mpu_5 : 1;
263 unsigned int mpu_6 : 1;
264 unsigned int mpu_7 : 1;
265 unsigned int mpu_8 : 1;
266 unsigned int mpu_9 : 1;
267 unsigned int mpu_10 : 1;
268 unsigned int mpu_11 : 1;
269 unsigned int mpu_12 : 1;
270 unsigned int mpu_13 : 1;
271 unsigned int mpu_14 : 1;
272 unsigned int mpu_15 : 1;
273 unsigned int spu_0 : 1;
274 unsigned int spu_1 : 1;
275 unsigned int spu_2 : 1;
276 unsigned int spu_3 : 1;
277 unsigned int spu_4 : 1;
278 unsigned int spu_5 : 1;
279 unsigned int spu_6 : 1;
280 unsigned int spu_7 : 1;
281 unsigned int spu_8 : 1;
282 unsigned int spu_9 : 1;
283 unsigned int spu_10 : 1;
284 unsigned int spu_11 : 1;
285 unsigned int spu_12 : 1;
286 unsigned int spu_13 : 1;
287 unsigned int spu_14 : 1;
288 unsigned int spu_15 : 1;
289} reg_iop_sw_cpu_rw_ack_intr0;
290#define REG_RD_ADDR_iop_sw_cpu_rw_ack_intr0 80
291#define REG_WR_ADDR_iop_sw_cpu_rw_ack_intr0 80
292
293/* Register r_intr0, scope iop_sw_cpu, type r */
294typedef struct {
295 unsigned int mpu_0 : 1;
296 unsigned int mpu_1 : 1;
297 unsigned int mpu_2 : 1;
298 unsigned int mpu_3 : 1;
299 unsigned int mpu_4 : 1;
300 unsigned int mpu_5 : 1;
301 unsigned int mpu_6 : 1;
302 unsigned int mpu_7 : 1;
303 unsigned int mpu_8 : 1;
304 unsigned int mpu_9 : 1;
305 unsigned int mpu_10 : 1;
306 unsigned int mpu_11 : 1;
307 unsigned int mpu_12 : 1;
308 unsigned int mpu_13 : 1;
309 unsigned int mpu_14 : 1;
310 unsigned int mpu_15 : 1;
311 unsigned int spu_0 : 1;
312 unsigned int spu_1 : 1;
313 unsigned int spu_2 : 1;
314 unsigned int spu_3 : 1;
315 unsigned int spu_4 : 1;
316 unsigned int spu_5 : 1;
317 unsigned int spu_6 : 1;
318 unsigned int spu_7 : 1;
319 unsigned int spu_8 : 1;
320 unsigned int spu_9 : 1;
321 unsigned int spu_10 : 1;
322 unsigned int spu_11 : 1;
323 unsigned int spu_12 : 1;
324 unsigned int spu_13 : 1;
325 unsigned int spu_14 : 1;
326 unsigned int spu_15 : 1;
327} reg_iop_sw_cpu_r_intr0;
328#define REG_RD_ADDR_iop_sw_cpu_r_intr0 84
329
330/* Register r_masked_intr0, scope iop_sw_cpu, type r */
331typedef struct {
332 unsigned int mpu_0 : 1;
333 unsigned int mpu_1 : 1;
334 unsigned int mpu_2 : 1;
335 unsigned int mpu_3 : 1;
336 unsigned int mpu_4 : 1;
337 unsigned int mpu_5 : 1;
338 unsigned int mpu_6 : 1;
339 unsigned int mpu_7 : 1;
340 unsigned int mpu_8 : 1;
341 unsigned int mpu_9 : 1;
342 unsigned int mpu_10 : 1;
343 unsigned int mpu_11 : 1;
344 unsigned int mpu_12 : 1;
345 unsigned int mpu_13 : 1;
346 unsigned int mpu_14 : 1;
347 unsigned int mpu_15 : 1;
348 unsigned int spu_0 : 1;
349 unsigned int spu_1 : 1;
350 unsigned int spu_2 : 1;
351 unsigned int spu_3 : 1;
352 unsigned int spu_4 : 1;
353 unsigned int spu_5 : 1;
354 unsigned int spu_6 : 1;
355 unsigned int spu_7 : 1;
356 unsigned int spu_8 : 1;
357 unsigned int spu_9 : 1;
358 unsigned int spu_10 : 1;
359 unsigned int spu_11 : 1;
360 unsigned int spu_12 : 1;
361 unsigned int spu_13 : 1;
362 unsigned int spu_14 : 1;
363 unsigned int spu_15 : 1;
364} reg_iop_sw_cpu_r_masked_intr0;
365#define REG_RD_ADDR_iop_sw_cpu_r_masked_intr0 88
366
367/* Register rw_intr1_mask, scope iop_sw_cpu, type rw */
368typedef struct {
369 unsigned int mpu_16 : 1;
370 unsigned int mpu_17 : 1;
371 unsigned int mpu_18 : 1;
372 unsigned int mpu_19 : 1;
373 unsigned int mpu_20 : 1;
374 unsigned int mpu_21 : 1;
375 unsigned int mpu_22 : 1;
376 unsigned int mpu_23 : 1;
377 unsigned int mpu_24 : 1;
378 unsigned int mpu_25 : 1;
379 unsigned int mpu_26 : 1;
380 unsigned int mpu_27 : 1;
381 unsigned int mpu_28 : 1;
382 unsigned int mpu_29 : 1;
383 unsigned int mpu_30 : 1;
384 unsigned int mpu_31 : 1;
385 unsigned int dmc_in : 1;
386 unsigned int dmc_out : 1;
387 unsigned int fifo_in : 1;
388 unsigned int fifo_out : 1;
389 unsigned int fifo_in_extra : 1;
390 unsigned int fifo_out_extra : 1;
391 unsigned int trigger_grp0 : 1;
392 unsigned int trigger_grp1 : 1;
393 unsigned int trigger_grp2 : 1;
394 unsigned int trigger_grp3 : 1;
395 unsigned int trigger_grp4 : 1;
396 unsigned int trigger_grp5 : 1;
397 unsigned int trigger_grp6 : 1;
398 unsigned int trigger_grp7 : 1;
399 unsigned int timer_grp0 : 1;
400 unsigned int timer_grp1 : 1;
401} reg_iop_sw_cpu_rw_intr1_mask;
402#define REG_RD_ADDR_iop_sw_cpu_rw_intr1_mask 92
403#define REG_WR_ADDR_iop_sw_cpu_rw_intr1_mask 92
404
405/* Register rw_ack_intr1, scope iop_sw_cpu, type rw */
406typedef struct {
407 unsigned int mpu_16 : 1;
408 unsigned int mpu_17 : 1;
409 unsigned int mpu_18 : 1;
410 unsigned int mpu_19 : 1;
411 unsigned int mpu_20 : 1;
412 unsigned int mpu_21 : 1;
413 unsigned int mpu_22 : 1;
414 unsigned int mpu_23 : 1;
415 unsigned int mpu_24 : 1;
416 unsigned int mpu_25 : 1;
417 unsigned int mpu_26 : 1;
418 unsigned int mpu_27 : 1;
419 unsigned int mpu_28 : 1;
420 unsigned int mpu_29 : 1;
421 unsigned int mpu_30 : 1;
422 unsigned int mpu_31 : 1;
423 unsigned int dummy1 : 16;
424} reg_iop_sw_cpu_rw_ack_intr1;
425#define REG_RD_ADDR_iop_sw_cpu_rw_ack_intr1 96
426#define REG_WR_ADDR_iop_sw_cpu_rw_ack_intr1 96
427
428/* Register r_intr1, scope iop_sw_cpu, type r */
429typedef struct {
430 unsigned int mpu_16 : 1;
431 unsigned int mpu_17 : 1;
432 unsigned int mpu_18 : 1;
433 unsigned int mpu_19 : 1;
434 unsigned int mpu_20 : 1;
435 unsigned int mpu_21 : 1;
436 unsigned int mpu_22 : 1;
437 unsigned int mpu_23 : 1;
438 unsigned int mpu_24 : 1;
439 unsigned int mpu_25 : 1;
440 unsigned int mpu_26 : 1;
441 unsigned int mpu_27 : 1;
442 unsigned int mpu_28 : 1;
443 unsigned int mpu_29 : 1;
444 unsigned int mpu_30 : 1;
445 unsigned int mpu_31 : 1;
446 unsigned int dmc_in : 1;
447 unsigned int dmc_out : 1;
448 unsigned int fifo_in : 1;
449 unsigned int fifo_out : 1;
450 unsigned int fifo_in_extra : 1;
451 unsigned int fifo_out_extra : 1;
452 unsigned int trigger_grp0 : 1;
453 unsigned int trigger_grp1 : 1;
454 unsigned int trigger_grp2 : 1;
455 unsigned int trigger_grp3 : 1;
456 unsigned int trigger_grp4 : 1;
457 unsigned int trigger_grp5 : 1;
458 unsigned int trigger_grp6 : 1;
459 unsigned int trigger_grp7 : 1;
460 unsigned int timer_grp0 : 1;
461 unsigned int timer_grp1 : 1;
462} reg_iop_sw_cpu_r_intr1;
463#define REG_RD_ADDR_iop_sw_cpu_r_intr1 100
464
465/* Register r_masked_intr1, scope iop_sw_cpu, type r */
466typedef struct {
467 unsigned int mpu_16 : 1;
468 unsigned int mpu_17 : 1;
469 unsigned int mpu_18 : 1;
470 unsigned int mpu_19 : 1;
471 unsigned int mpu_20 : 1;
472 unsigned int mpu_21 : 1;
473 unsigned int mpu_22 : 1;
474 unsigned int mpu_23 : 1;
475 unsigned int mpu_24 : 1;
476 unsigned int mpu_25 : 1;
477 unsigned int mpu_26 : 1;
478 unsigned int mpu_27 : 1;
479 unsigned int mpu_28 : 1;
480 unsigned int mpu_29 : 1;
481 unsigned int mpu_30 : 1;
482 unsigned int mpu_31 : 1;
483 unsigned int dmc_in : 1;
484 unsigned int dmc_out : 1;
485 unsigned int fifo_in : 1;
486 unsigned int fifo_out : 1;
487 unsigned int fifo_in_extra : 1;
488 unsigned int fifo_out_extra : 1;
489 unsigned int trigger_grp0 : 1;
490 unsigned int trigger_grp1 : 1;
491 unsigned int trigger_grp2 : 1;
492 unsigned int trigger_grp3 : 1;
493 unsigned int trigger_grp4 : 1;
494 unsigned int trigger_grp5 : 1;
495 unsigned int trigger_grp6 : 1;
496 unsigned int trigger_grp7 : 1;
497 unsigned int timer_grp0 : 1;
498 unsigned int timer_grp1 : 1;
499} reg_iop_sw_cpu_r_masked_intr1;
500#define REG_RD_ADDR_iop_sw_cpu_r_masked_intr1 104
501
502
503/* Constants */
504enum {
505 regk_iop_sw_cpu_copy = 0x00000000,
506 regk_iop_sw_cpu_no = 0x00000000,
507 regk_iop_sw_cpu_rd = 0x00000002,
508 regk_iop_sw_cpu_reg_copy = 0x00000001,
509 regk_iop_sw_cpu_rw_bus_clr_mask_default = 0x00000000,
510 regk_iop_sw_cpu_rw_bus_oe_clr_mask_default = 0x00000000,
511 regk_iop_sw_cpu_rw_bus_oe_set_mask_default = 0x00000000,
512 regk_iop_sw_cpu_rw_bus_set_mask_default = 0x00000000,
513 regk_iop_sw_cpu_rw_gio_clr_mask_default = 0x00000000,
514 regk_iop_sw_cpu_rw_gio_oe_clr_mask_default = 0x00000000,
515 regk_iop_sw_cpu_rw_gio_oe_set_mask_default = 0x00000000,
516 regk_iop_sw_cpu_rw_gio_set_mask_default = 0x00000000,
517 regk_iop_sw_cpu_rw_intr0_mask_default = 0x00000000,
518 regk_iop_sw_cpu_rw_intr1_mask_default = 0x00000000,
519 regk_iop_sw_cpu_wr = 0x00000003,
520 regk_iop_sw_cpu_yes = 0x00000001
521};
522#endif /* __iop_sw_cpu_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_mpu_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_mpu_defs.h
deleted file mode 100644
index a2e4e1a33e57..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_mpu_defs.h
+++ /dev/null
@@ -1,648 +0,0 @@
1#ifndef __iop_sw_mpu_defs_h
2#define __iop_sw_mpu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_mpu.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sw_mpu_defs.h iop_sw_mpu.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_sw_mpu */
83
84/* Register rw_sw_cfg_owner, scope iop_sw_mpu, type rw */
85typedef struct {
86 unsigned int cfg : 2;
87 unsigned int dummy1 : 30;
88} reg_iop_sw_mpu_rw_sw_cfg_owner;
89#define REG_RD_ADDR_iop_sw_mpu_rw_sw_cfg_owner 0
90#define REG_WR_ADDR_iop_sw_mpu_rw_sw_cfg_owner 0
91
92/* Register r_spu_trace, scope iop_sw_mpu, type r */
93typedef unsigned int reg_iop_sw_mpu_r_spu_trace;
94#define REG_RD_ADDR_iop_sw_mpu_r_spu_trace 4
95
96/* Register r_spu_fsm_trace, scope iop_sw_mpu, type r */
97typedef unsigned int reg_iop_sw_mpu_r_spu_fsm_trace;
98#define REG_RD_ADDR_iop_sw_mpu_r_spu_fsm_trace 8
99
100/* Register rw_mc_ctrl, scope iop_sw_mpu, type rw */
101typedef struct {
102 unsigned int keep_owner : 1;
103 unsigned int cmd : 2;
104 unsigned int size : 3;
105 unsigned int wr_spu_mem : 1;
106 unsigned int dummy1 : 25;
107} reg_iop_sw_mpu_rw_mc_ctrl;
108#define REG_RD_ADDR_iop_sw_mpu_rw_mc_ctrl 12
109#define REG_WR_ADDR_iop_sw_mpu_rw_mc_ctrl 12
110
111/* Register rw_mc_data, scope iop_sw_mpu, type rw */
112typedef struct {
113 unsigned int val : 32;
114} reg_iop_sw_mpu_rw_mc_data;
115#define REG_RD_ADDR_iop_sw_mpu_rw_mc_data 16
116#define REG_WR_ADDR_iop_sw_mpu_rw_mc_data 16
117
118/* Register rw_mc_addr, scope iop_sw_mpu, type rw */
119typedef unsigned int reg_iop_sw_mpu_rw_mc_addr;
120#define REG_RD_ADDR_iop_sw_mpu_rw_mc_addr 20
121#define REG_WR_ADDR_iop_sw_mpu_rw_mc_addr 20
122
123/* Register rs_mc_data, scope iop_sw_mpu, type rs */
124typedef unsigned int reg_iop_sw_mpu_rs_mc_data;
125#define REG_RD_ADDR_iop_sw_mpu_rs_mc_data 24
126
127/* Register r_mc_data, scope iop_sw_mpu, type r */
128typedef unsigned int reg_iop_sw_mpu_r_mc_data;
129#define REG_RD_ADDR_iop_sw_mpu_r_mc_data 28
130
131/* Register r_mc_stat, scope iop_sw_mpu, type r */
132typedef struct {
133 unsigned int busy_cpu : 1;
134 unsigned int busy_mpu : 1;
135 unsigned int busy_spu : 1;
136 unsigned int owned_by_cpu : 1;
137 unsigned int owned_by_mpu : 1;
138 unsigned int owned_by_spu : 1;
139 unsigned int dummy1 : 26;
140} reg_iop_sw_mpu_r_mc_stat;
141#define REG_RD_ADDR_iop_sw_mpu_r_mc_stat 32
142
143/* Register rw_bus_clr_mask, scope iop_sw_mpu, type rw */
144typedef struct {
145 unsigned int byte0 : 8;
146 unsigned int byte1 : 8;
147 unsigned int byte2 : 8;
148 unsigned int byte3 : 8;
149} reg_iop_sw_mpu_rw_bus_clr_mask;
150#define REG_RD_ADDR_iop_sw_mpu_rw_bus_clr_mask 36
151#define REG_WR_ADDR_iop_sw_mpu_rw_bus_clr_mask 36
152
153/* Register rw_bus_set_mask, scope iop_sw_mpu, type rw */
154typedef struct {
155 unsigned int byte0 : 8;
156 unsigned int byte1 : 8;
157 unsigned int byte2 : 8;
158 unsigned int byte3 : 8;
159} reg_iop_sw_mpu_rw_bus_set_mask;
160#define REG_RD_ADDR_iop_sw_mpu_rw_bus_set_mask 40
161#define REG_WR_ADDR_iop_sw_mpu_rw_bus_set_mask 40
162
163/* Register rw_bus_oe_clr_mask, scope iop_sw_mpu, type rw */
164typedef struct {
165 unsigned int byte0 : 1;
166 unsigned int byte1 : 1;
167 unsigned int byte2 : 1;
168 unsigned int byte3 : 1;
169 unsigned int dummy1 : 28;
170} reg_iop_sw_mpu_rw_bus_oe_clr_mask;
171#define REG_RD_ADDR_iop_sw_mpu_rw_bus_oe_clr_mask 44
172#define REG_WR_ADDR_iop_sw_mpu_rw_bus_oe_clr_mask 44
173
174/* Register rw_bus_oe_set_mask, scope iop_sw_mpu, type rw */
175typedef struct {
176 unsigned int byte0 : 1;
177 unsigned int byte1 : 1;
178 unsigned int byte2 : 1;
179 unsigned int byte3 : 1;
180 unsigned int dummy1 : 28;
181} reg_iop_sw_mpu_rw_bus_oe_set_mask;
182#define REG_RD_ADDR_iop_sw_mpu_rw_bus_oe_set_mask 48
183#define REG_WR_ADDR_iop_sw_mpu_rw_bus_oe_set_mask 48
184
185/* Register r_bus_in, scope iop_sw_mpu, type r */
186typedef unsigned int reg_iop_sw_mpu_r_bus_in;
187#define REG_RD_ADDR_iop_sw_mpu_r_bus_in 52
188
189/* Register rw_gio_clr_mask, scope iop_sw_mpu, type rw */
190typedef struct {
191 unsigned int val : 32;
192} reg_iop_sw_mpu_rw_gio_clr_mask;
193#define REG_RD_ADDR_iop_sw_mpu_rw_gio_clr_mask 56
194#define REG_WR_ADDR_iop_sw_mpu_rw_gio_clr_mask 56
195
196/* Register rw_gio_set_mask, scope iop_sw_mpu, type rw */
197typedef struct {
198 unsigned int val : 32;
199} reg_iop_sw_mpu_rw_gio_set_mask;
200#define REG_RD_ADDR_iop_sw_mpu_rw_gio_set_mask 60
201#define REG_WR_ADDR_iop_sw_mpu_rw_gio_set_mask 60
202
203/* Register rw_gio_oe_clr_mask, scope iop_sw_mpu, type rw */
204typedef struct {
205 unsigned int val : 32;
206} reg_iop_sw_mpu_rw_gio_oe_clr_mask;
207#define REG_RD_ADDR_iop_sw_mpu_rw_gio_oe_clr_mask 64
208#define REG_WR_ADDR_iop_sw_mpu_rw_gio_oe_clr_mask 64
209
210/* Register rw_gio_oe_set_mask, scope iop_sw_mpu, type rw */
211typedef struct {
212 unsigned int val : 32;
213} reg_iop_sw_mpu_rw_gio_oe_set_mask;
214#define REG_RD_ADDR_iop_sw_mpu_rw_gio_oe_set_mask 68
215#define REG_WR_ADDR_iop_sw_mpu_rw_gio_oe_set_mask 68
216
217/* Register r_gio_in, scope iop_sw_mpu, type r */
218typedef unsigned int reg_iop_sw_mpu_r_gio_in;
219#define REG_RD_ADDR_iop_sw_mpu_r_gio_in 72
220
221/* Register rw_cpu_intr, scope iop_sw_mpu, type rw */
222typedef struct {
223 unsigned int intr0 : 1;
224 unsigned int intr1 : 1;
225 unsigned int intr2 : 1;
226 unsigned int intr3 : 1;
227 unsigned int intr4 : 1;
228 unsigned int intr5 : 1;
229 unsigned int intr6 : 1;
230 unsigned int intr7 : 1;
231 unsigned int intr8 : 1;
232 unsigned int intr9 : 1;
233 unsigned int intr10 : 1;
234 unsigned int intr11 : 1;
235 unsigned int intr12 : 1;
236 unsigned int intr13 : 1;
237 unsigned int intr14 : 1;
238 unsigned int intr15 : 1;
239 unsigned int intr16 : 1;
240 unsigned int intr17 : 1;
241 unsigned int intr18 : 1;
242 unsigned int intr19 : 1;
243 unsigned int intr20 : 1;
244 unsigned int intr21 : 1;
245 unsigned int intr22 : 1;
246 unsigned int intr23 : 1;
247 unsigned int intr24 : 1;
248 unsigned int intr25 : 1;
249 unsigned int intr26 : 1;
250 unsigned int intr27 : 1;
251 unsigned int intr28 : 1;
252 unsigned int intr29 : 1;
253 unsigned int intr30 : 1;
254 unsigned int intr31 : 1;
255} reg_iop_sw_mpu_rw_cpu_intr;
256#define REG_RD_ADDR_iop_sw_mpu_rw_cpu_intr 76
257#define REG_WR_ADDR_iop_sw_mpu_rw_cpu_intr 76
258
259/* Register r_cpu_intr, scope iop_sw_mpu, type r */
260typedef struct {
261 unsigned int intr0 : 1;
262 unsigned int intr1 : 1;
263 unsigned int intr2 : 1;
264 unsigned int intr3 : 1;
265 unsigned int intr4 : 1;
266 unsigned int intr5 : 1;
267 unsigned int intr6 : 1;
268 unsigned int intr7 : 1;
269 unsigned int intr8 : 1;
270 unsigned int intr9 : 1;
271 unsigned int intr10 : 1;
272 unsigned int intr11 : 1;
273 unsigned int intr12 : 1;
274 unsigned int intr13 : 1;
275 unsigned int intr14 : 1;
276 unsigned int intr15 : 1;
277 unsigned int intr16 : 1;
278 unsigned int intr17 : 1;
279 unsigned int intr18 : 1;
280 unsigned int intr19 : 1;
281 unsigned int intr20 : 1;
282 unsigned int intr21 : 1;
283 unsigned int intr22 : 1;
284 unsigned int intr23 : 1;
285 unsigned int intr24 : 1;
286 unsigned int intr25 : 1;
287 unsigned int intr26 : 1;
288 unsigned int intr27 : 1;
289 unsigned int intr28 : 1;
290 unsigned int intr29 : 1;
291 unsigned int intr30 : 1;
292 unsigned int intr31 : 1;
293} reg_iop_sw_mpu_r_cpu_intr;
294#define REG_RD_ADDR_iop_sw_mpu_r_cpu_intr 80
295
296/* Register rw_intr_grp0_mask, scope iop_sw_mpu, type rw */
297typedef struct {
298 unsigned int spu_intr0 : 1;
299 unsigned int trigger_grp0 : 1;
300 unsigned int timer_grp0 : 1;
301 unsigned int fifo_out : 1;
302 unsigned int spu_intr1 : 1;
303 unsigned int trigger_grp1 : 1;
304 unsigned int timer_grp1 : 1;
305 unsigned int fifo_in : 1;
306 unsigned int spu_intr2 : 1;
307 unsigned int trigger_grp2 : 1;
308 unsigned int fifo_out_extra : 1;
309 unsigned int dmc_out : 1;
310 unsigned int spu_intr3 : 1;
311 unsigned int trigger_grp3 : 1;
312 unsigned int fifo_in_extra : 1;
313 unsigned int dmc_in : 1;
314 unsigned int dummy1 : 16;
315} reg_iop_sw_mpu_rw_intr_grp0_mask;
316#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp0_mask 84
317#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp0_mask 84
318
319/* Register rw_ack_intr_grp0, scope iop_sw_mpu, type rw */
320typedef struct {
321 unsigned int spu_intr0 : 1;
322 unsigned int dummy1 : 3;
323 unsigned int spu_intr1 : 1;
324 unsigned int dummy2 : 3;
325 unsigned int spu_intr2 : 1;
326 unsigned int dummy3 : 3;
327 unsigned int spu_intr3 : 1;
328 unsigned int dummy4 : 19;
329} reg_iop_sw_mpu_rw_ack_intr_grp0;
330#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp0 88
331#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp0 88
332
333/* Register r_intr_grp0, scope iop_sw_mpu, type r */
334typedef struct {
335 unsigned int spu_intr0 : 1;
336 unsigned int trigger_grp0 : 1;
337 unsigned int timer_grp0 : 1;
338 unsigned int fifo_out : 1;
339 unsigned int spu_intr1 : 1;
340 unsigned int trigger_grp1 : 1;
341 unsigned int timer_grp1 : 1;
342 unsigned int fifo_in : 1;
343 unsigned int spu_intr2 : 1;
344 unsigned int trigger_grp2 : 1;
345 unsigned int fifo_out_extra : 1;
346 unsigned int dmc_out : 1;
347 unsigned int spu_intr3 : 1;
348 unsigned int trigger_grp3 : 1;
349 unsigned int fifo_in_extra : 1;
350 unsigned int dmc_in : 1;
351 unsigned int dummy1 : 16;
352} reg_iop_sw_mpu_r_intr_grp0;
353#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp0 92
354
355/* Register r_masked_intr_grp0, scope iop_sw_mpu, type r */
356typedef struct {
357 unsigned int spu_intr0 : 1;
358 unsigned int trigger_grp0 : 1;
359 unsigned int timer_grp0 : 1;
360 unsigned int fifo_out : 1;
361 unsigned int spu_intr1 : 1;
362 unsigned int trigger_grp1 : 1;
363 unsigned int timer_grp1 : 1;
364 unsigned int fifo_in : 1;
365 unsigned int spu_intr2 : 1;
366 unsigned int trigger_grp2 : 1;
367 unsigned int fifo_out_extra : 1;
368 unsigned int dmc_out : 1;
369 unsigned int spu_intr3 : 1;
370 unsigned int trigger_grp3 : 1;
371 unsigned int fifo_in_extra : 1;
372 unsigned int dmc_in : 1;
373 unsigned int dummy1 : 16;
374} reg_iop_sw_mpu_r_masked_intr_grp0;
375#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp0 96
376
377/* Register rw_intr_grp1_mask, scope iop_sw_mpu, type rw */
378typedef struct {
379 unsigned int spu_intr4 : 1;
380 unsigned int trigger_grp4 : 1;
381 unsigned int fifo_out_extra : 1;
382 unsigned int dmc_out : 1;
383 unsigned int spu_intr5 : 1;
384 unsigned int trigger_grp5 : 1;
385 unsigned int fifo_in_extra : 1;
386 unsigned int dmc_in : 1;
387 unsigned int spu_intr6 : 1;
388 unsigned int trigger_grp6 : 1;
389 unsigned int timer_grp0 : 1;
390 unsigned int fifo_out : 1;
391 unsigned int spu_intr7 : 1;
392 unsigned int trigger_grp7 : 1;
393 unsigned int timer_grp1 : 1;
394 unsigned int fifo_in : 1;
395 unsigned int dummy1 : 16;
396} reg_iop_sw_mpu_rw_intr_grp1_mask;
397#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp1_mask 100
398#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp1_mask 100
399
400/* Register rw_ack_intr_grp1, scope iop_sw_mpu, type rw */
401typedef struct {
402 unsigned int spu_intr4 : 1;
403 unsigned int dummy1 : 3;
404 unsigned int spu_intr5 : 1;
405 unsigned int dummy2 : 3;
406 unsigned int spu_intr6 : 1;
407 unsigned int dummy3 : 3;
408 unsigned int spu_intr7 : 1;
409 unsigned int dummy4 : 19;
410} reg_iop_sw_mpu_rw_ack_intr_grp1;
411#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp1 104
412#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp1 104
413
414/* Register r_intr_grp1, scope iop_sw_mpu, type r */
415typedef struct {
416 unsigned int spu_intr4 : 1;
417 unsigned int trigger_grp4 : 1;
418 unsigned int fifo_out_extra : 1;
419 unsigned int dmc_out : 1;
420 unsigned int spu_intr5 : 1;
421 unsigned int trigger_grp5 : 1;
422 unsigned int fifo_in_extra : 1;
423 unsigned int dmc_in : 1;
424 unsigned int spu_intr6 : 1;
425 unsigned int trigger_grp6 : 1;
426 unsigned int timer_grp0 : 1;
427 unsigned int fifo_out : 1;
428 unsigned int spu_intr7 : 1;
429 unsigned int trigger_grp7 : 1;
430 unsigned int timer_grp1 : 1;
431 unsigned int fifo_in : 1;
432 unsigned int dummy1 : 16;
433} reg_iop_sw_mpu_r_intr_grp1;
434#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp1 108
435
436/* Register r_masked_intr_grp1, scope iop_sw_mpu, type r */
437typedef struct {
438 unsigned int spu_intr4 : 1;
439 unsigned int trigger_grp4 : 1;
440 unsigned int fifo_out_extra : 1;
441 unsigned int dmc_out : 1;
442 unsigned int spu_intr5 : 1;
443 unsigned int trigger_grp5 : 1;
444 unsigned int fifo_in_extra : 1;
445 unsigned int dmc_in : 1;
446 unsigned int spu_intr6 : 1;
447 unsigned int trigger_grp6 : 1;
448 unsigned int timer_grp0 : 1;
449 unsigned int fifo_out : 1;
450 unsigned int spu_intr7 : 1;
451 unsigned int trigger_grp7 : 1;
452 unsigned int timer_grp1 : 1;
453 unsigned int fifo_in : 1;
454 unsigned int dummy1 : 16;
455} reg_iop_sw_mpu_r_masked_intr_grp1;
456#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp1 112
457
458/* Register rw_intr_grp2_mask, scope iop_sw_mpu, type rw */
459typedef struct {
460 unsigned int spu_intr8 : 1;
461 unsigned int trigger_grp0 : 1;
462 unsigned int timer_grp0 : 1;
463 unsigned int fifo_out : 1;
464 unsigned int spu_intr9 : 1;
465 unsigned int trigger_grp1 : 1;
466 unsigned int timer_grp1 : 1;
467 unsigned int fifo_in : 1;
468 unsigned int spu_intr10 : 1;
469 unsigned int trigger_grp2 : 1;
470 unsigned int fifo_out_extra : 1;
471 unsigned int dmc_out : 1;
472 unsigned int spu_intr11 : 1;
473 unsigned int trigger_grp3 : 1;
474 unsigned int fifo_in_extra : 1;
475 unsigned int dmc_in : 1;
476 unsigned int dummy1 : 16;
477} reg_iop_sw_mpu_rw_intr_grp2_mask;
478#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp2_mask 116
479#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp2_mask 116
480
481/* Register rw_ack_intr_grp2, scope iop_sw_mpu, type rw */
482typedef struct {
483 unsigned int spu_intr8 : 1;
484 unsigned int dummy1 : 3;
485 unsigned int spu_intr9 : 1;
486 unsigned int dummy2 : 3;
487 unsigned int spu_intr10 : 1;
488 unsigned int dummy3 : 3;
489 unsigned int spu_intr11 : 1;
490 unsigned int dummy4 : 19;
491} reg_iop_sw_mpu_rw_ack_intr_grp2;
492#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp2 120
493#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp2 120
494
495/* Register r_intr_grp2, scope iop_sw_mpu, type r */
496typedef struct {
497 unsigned int spu_intr8 : 1;
498 unsigned int trigger_grp0 : 1;
499 unsigned int timer_grp0 : 1;
500 unsigned int fifo_out : 1;
501 unsigned int spu_intr9 : 1;
502 unsigned int trigger_grp1 : 1;
503 unsigned int timer_grp1 : 1;
504 unsigned int fifo_in : 1;
505 unsigned int spu_intr10 : 1;
506 unsigned int trigger_grp2 : 1;
507 unsigned int fifo_out_extra : 1;
508 unsigned int dmc_out : 1;
509 unsigned int spu_intr11 : 1;
510 unsigned int trigger_grp3 : 1;
511 unsigned int fifo_in_extra : 1;
512 unsigned int dmc_in : 1;
513 unsigned int dummy1 : 16;
514} reg_iop_sw_mpu_r_intr_grp2;
515#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp2 124
516
517/* Register r_masked_intr_grp2, scope iop_sw_mpu, type r */
518typedef struct {
519 unsigned int spu_intr8 : 1;
520 unsigned int trigger_grp0 : 1;
521 unsigned int timer_grp0 : 1;
522 unsigned int fifo_out : 1;
523 unsigned int spu_intr9 : 1;
524 unsigned int trigger_grp1 : 1;
525 unsigned int timer_grp1 : 1;
526 unsigned int fifo_in : 1;
527 unsigned int spu_intr10 : 1;
528 unsigned int trigger_grp2 : 1;
529 unsigned int fifo_out_extra : 1;
530 unsigned int dmc_out : 1;
531 unsigned int spu_intr11 : 1;
532 unsigned int trigger_grp3 : 1;
533 unsigned int fifo_in_extra : 1;
534 unsigned int dmc_in : 1;
535 unsigned int dummy1 : 16;
536} reg_iop_sw_mpu_r_masked_intr_grp2;
537#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp2 128
538
539/* Register rw_intr_grp3_mask, scope iop_sw_mpu, type rw */
540typedef struct {
541 unsigned int spu_intr12 : 1;
542 unsigned int trigger_grp4 : 1;
543 unsigned int fifo_out_extra : 1;
544 unsigned int dmc_out : 1;
545 unsigned int spu_intr13 : 1;
546 unsigned int trigger_grp5 : 1;
547 unsigned int fifo_in_extra : 1;
548 unsigned int dmc_in : 1;
549 unsigned int spu_intr14 : 1;
550 unsigned int trigger_grp6 : 1;
551 unsigned int timer_grp0 : 1;
552 unsigned int fifo_out : 1;
553 unsigned int spu_intr15 : 1;
554 unsigned int trigger_grp7 : 1;
555 unsigned int timer_grp1 : 1;
556 unsigned int fifo_in : 1;
557 unsigned int dummy1 : 16;
558} reg_iop_sw_mpu_rw_intr_grp3_mask;
559#define REG_RD_ADDR_iop_sw_mpu_rw_intr_grp3_mask 132
560#define REG_WR_ADDR_iop_sw_mpu_rw_intr_grp3_mask 132
561
562/* Register rw_ack_intr_grp3, scope iop_sw_mpu, type rw */
563typedef struct {
564 unsigned int spu_intr12 : 1;
565 unsigned int dummy1 : 3;
566 unsigned int spu_intr13 : 1;
567 unsigned int dummy2 : 3;
568 unsigned int spu_intr14 : 1;
569 unsigned int dummy3 : 3;
570 unsigned int spu_intr15 : 1;
571 unsigned int dummy4 : 19;
572} reg_iop_sw_mpu_rw_ack_intr_grp3;
573#define REG_RD_ADDR_iop_sw_mpu_rw_ack_intr_grp3 136
574#define REG_WR_ADDR_iop_sw_mpu_rw_ack_intr_grp3 136
575
576/* Register r_intr_grp3, scope iop_sw_mpu, type r */
577typedef struct {
578 unsigned int spu_intr12 : 1;
579 unsigned int trigger_grp4 : 1;
580 unsigned int fifo_out_extra : 1;
581 unsigned int dmc_out : 1;
582 unsigned int spu_intr13 : 1;
583 unsigned int trigger_grp5 : 1;
584 unsigned int fifo_in_extra : 1;
585 unsigned int dmc_in : 1;
586 unsigned int spu_intr14 : 1;
587 unsigned int trigger_grp6 : 1;
588 unsigned int timer_grp0 : 1;
589 unsigned int fifo_out : 1;
590 unsigned int spu_intr15 : 1;
591 unsigned int trigger_grp7 : 1;
592 unsigned int timer_grp1 : 1;
593 unsigned int fifo_in : 1;
594 unsigned int dummy1 : 16;
595} reg_iop_sw_mpu_r_intr_grp3;
596#define REG_RD_ADDR_iop_sw_mpu_r_intr_grp3 140
597
598/* Register r_masked_intr_grp3, scope iop_sw_mpu, type r */
599typedef struct {
600 unsigned int spu_intr12 : 1;
601 unsigned int trigger_grp4 : 1;
602 unsigned int fifo_out_extra : 1;
603 unsigned int dmc_out : 1;
604 unsigned int spu_intr13 : 1;
605 unsigned int trigger_grp5 : 1;
606 unsigned int fifo_in_extra : 1;
607 unsigned int dmc_in : 1;
608 unsigned int spu_intr14 : 1;
609 unsigned int trigger_grp6 : 1;
610 unsigned int timer_grp0 : 1;
611 unsigned int fifo_out : 1;
612 unsigned int spu_intr15 : 1;
613 unsigned int trigger_grp7 : 1;
614 unsigned int timer_grp1 : 1;
615 unsigned int fifo_in : 1;
616 unsigned int dummy1 : 16;
617} reg_iop_sw_mpu_r_masked_intr_grp3;
618#define REG_RD_ADDR_iop_sw_mpu_r_masked_intr_grp3 144
619
620
621/* Constants */
622enum {
623 regk_iop_sw_mpu_copy = 0x00000000,
624 regk_iop_sw_mpu_cpu = 0x00000000,
625 regk_iop_sw_mpu_mpu = 0x00000001,
626 regk_iop_sw_mpu_no = 0x00000000,
627 regk_iop_sw_mpu_nop = 0x00000000,
628 regk_iop_sw_mpu_rd = 0x00000002,
629 regk_iop_sw_mpu_reg_copy = 0x00000001,
630 regk_iop_sw_mpu_rw_bus_clr_mask_default = 0x00000000,
631 regk_iop_sw_mpu_rw_bus_oe_clr_mask_default = 0x00000000,
632 regk_iop_sw_mpu_rw_bus_oe_set_mask_default = 0x00000000,
633 regk_iop_sw_mpu_rw_bus_set_mask_default = 0x00000000,
634 regk_iop_sw_mpu_rw_gio_clr_mask_default = 0x00000000,
635 regk_iop_sw_mpu_rw_gio_oe_clr_mask_default = 0x00000000,
636 regk_iop_sw_mpu_rw_gio_oe_set_mask_default = 0x00000000,
637 regk_iop_sw_mpu_rw_gio_set_mask_default = 0x00000000,
638 regk_iop_sw_mpu_rw_intr_grp0_mask_default = 0x00000000,
639 regk_iop_sw_mpu_rw_intr_grp1_mask_default = 0x00000000,
640 regk_iop_sw_mpu_rw_intr_grp2_mask_default = 0x00000000,
641 regk_iop_sw_mpu_rw_intr_grp3_mask_default = 0x00000000,
642 regk_iop_sw_mpu_rw_sw_cfg_owner_default = 0x00000000,
643 regk_iop_sw_mpu_set = 0x00000001,
644 regk_iop_sw_mpu_spu = 0x00000002,
645 regk_iop_sw_mpu_wr = 0x00000003,
646 regk_iop_sw_mpu_yes = 0x00000001
647};
648#endif /* __iop_sw_mpu_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_spu_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_spu_defs.h
deleted file mode 100644
index c8560b865a1a..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_spu_defs.h
+++ /dev/null
@@ -1,441 +0,0 @@
1#ifndef __iop_sw_spu_defs_h
2#define __iop_sw_spu_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_sw_spu.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sw_spu_defs.h iop_sw_spu.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_sw_spu */
83
84/* Register r_mpu_trace, scope iop_sw_spu, type r */
85typedef unsigned int reg_iop_sw_spu_r_mpu_trace;
86#define REG_RD_ADDR_iop_sw_spu_r_mpu_trace 0
87
88/* Register rw_mc_ctrl, scope iop_sw_spu, type rw */
89typedef struct {
90 unsigned int keep_owner : 1;
91 unsigned int cmd : 2;
92 unsigned int size : 3;
93 unsigned int wr_spu_mem : 1;
94 unsigned int dummy1 : 25;
95} reg_iop_sw_spu_rw_mc_ctrl;
96#define REG_RD_ADDR_iop_sw_spu_rw_mc_ctrl 4
97#define REG_WR_ADDR_iop_sw_spu_rw_mc_ctrl 4
98
99/* Register rw_mc_data, scope iop_sw_spu, type rw */
100typedef struct {
101 unsigned int val : 32;
102} reg_iop_sw_spu_rw_mc_data;
103#define REG_RD_ADDR_iop_sw_spu_rw_mc_data 8
104#define REG_WR_ADDR_iop_sw_spu_rw_mc_data 8
105
106/* Register rw_mc_addr, scope iop_sw_spu, type rw */
107typedef unsigned int reg_iop_sw_spu_rw_mc_addr;
108#define REG_RD_ADDR_iop_sw_spu_rw_mc_addr 12
109#define REG_WR_ADDR_iop_sw_spu_rw_mc_addr 12
110
111/* Register rs_mc_data, scope iop_sw_spu, type rs */
112typedef unsigned int reg_iop_sw_spu_rs_mc_data;
113#define REG_RD_ADDR_iop_sw_spu_rs_mc_data 16
114
115/* Register r_mc_data, scope iop_sw_spu, type r */
116typedef unsigned int reg_iop_sw_spu_r_mc_data;
117#define REG_RD_ADDR_iop_sw_spu_r_mc_data 20
118
119/* Register r_mc_stat, scope iop_sw_spu, type r */
120typedef struct {
121 unsigned int busy_cpu : 1;
122 unsigned int busy_mpu : 1;
123 unsigned int busy_spu : 1;
124 unsigned int owned_by_cpu : 1;
125 unsigned int owned_by_mpu : 1;
126 unsigned int owned_by_spu : 1;
127 unsigned int dummy1 : 26;
128} reg_iop_sw_spu_r_mc_stat;
129#define REG_RD_ADDR_iop_sw_spu_r_mc_stat 24
130
131/* Register rw_bus_clr_mask, scope iop_sw_spu, type rw */
132typedef struct {
133 unsigned int byte0 : 8;
134 unsigned int byte1 : 8;
135 unsigned int byte2 : 8;
136 unsigned int byte3 : 8;
137} reg_iop_sw_spu_rw_bus_clr_mask;
138#define REG_RD_ADDR_iop_sw_spu_rw_bus_clr_mask 28
139#define REG_WR_ADDR_iop_sw_spu_rw_bus_clr_mask 28
140
141/* Register rw_bus_set_mask, scope iop_sw_spu, type rw */
142typedef struct {
143 unsigned int byte0 : 8;
144 unsigned int byte1 : 8;
145 unsigned int byte2 : 8;
146 unsigned int byte3 : 8;
147} reg_iop_sw_spu_rw_bus_set_mask;
148#define REG_RD_ADDR_iop_sw_spu_rw_bus_set_mask 32
149#define REG_WR_ADDR_iop_sw_spu_rw_bus_set_mask 32
150
151/* Register rw_bus_oe_clr_mask, scope iop_sw_spu, type rw */
152typedef struct {
153 unsigned int byte0 : 1;
154 unsigned int byte1 : 1;
155 unsigned int byte2 : 1;
156 unsigned int byte3 : 1;
157 unsigned int dummy1 : 28;
158} reg_iop_sw_spu_rw_bus_oe_clr_mask;
159#define REG_RD_ADDR_iop_sw_spu_rw_bus_oe_clr_mask 36
160#define REG_WR_ADDR_iop_sw_spu_rw_bus_oe_clr_mask 36
161
162/* Register rw_bus_oe_set_mask, scope iop_sw_spu, type rw */
163typedef struct {
164 unsigned int byte0 : 1;
165 unsigned int byte1 : 1;
166 unsigned int byte2 : 1;
167 unsigned int byte3 : 1;
168 unsigned int dummy1 : 28;
169} reg_iop_sw_spu_rw_bus_oe_set_mask;
170#define REG_RD_ADDR_iop_sw_spu_rw_bus_oe_set_mask 40
171#define REG_WR_ADDR_iop_sw_spu_rw_bus_oe_set_mask 40
172
173/* Register r_bus_in, scope iop_sw_spu, type r */
174typedef unsigned int reg_iop_sw_spu_r_bus_in;
175#define REG_RD_ADDR_iop_sw_spu_r_bus_in 44
176
177/* Register rw_gio_clr_mask, scope iop_sw_spu, type rw */
178typedef struct {
179 unsigned int val : 32;
180} reg_iop_sw_spu_rw_gio_clr_mask;
181#define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask 48
182#define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask 48
183
184/* Register rw_gio_set_mask, scope iop_sw_spu, type rw */
185typedef struct {
186 unsigned int val : 32;
187} reg_iop_sw_spu_rw_gio_set_mask;
188#define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask 52
189#define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask 52
190
191/* Register rw_gio_oe_clr_mask, scope iop_sw_spu, type rw */
192typedef struct {
193 unsigned int val : 32;
194} reg_iop_sw_spu_rw_gio_oe_clr_mask;
195#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask 56
196#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask 56
197
198/* Register rw_gio_oe_set_mask, scope iop_sw_spu, type rw */
199typedef struct {
200 unsigned int val : 32;
201} reg_iop_sw_spu_rw_gio_oe_set_mask;
202#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask 60
203#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask 60
204
205/* Register r_gio_in, scope iop_sw_spu, type r */
206typedef unsigned int reg_iop_sw_spu_r_gio_in;
207#define REG_RD_ADDR_iop_sw_spu_r_gio_in 64
208
209/* Register rw_bus_clr_mask_lo, scope iop_sw_spu, type rw */
210typedef struct {
211 unsigned int byte0 : 8;
212 unsigned int byte1 : 8;
213 unsigned int dummy1 : 16;
214} reg_iop_sw_spu_rw_bus_clr_mask_lo;
215#define REG_RD_ADDR_iop_sw_spu_rw_bus_clr_mask_lo 68
216#define REG_WR_ADDR_iop_sw_spu_rw_bus_clr_mask_lo 68
217
218/* Register rw_bus_clr_mask_hi, scope iop_sw_spu, type rw */
219typedef struct {
220 unsigned int byte2 : 8;
221 unsigned int byte3 : 8;
222 unsigned int dummy1 : 16;
223} reg_iop_sw_spu_rw_bus_clr_mask_hi;
224#define REG_RD_ADDR_iop_sw_spu_rw_bus_clr_mask_hi 72
225#define REG_WR_ADDR_iop_sw_spu_rw_bus_clr_mask_hi 72
226
227/* Register rw_bus_set_mask_lo, scope iop_sw_spu, type rw */
228typedef struct {
229 unsigned int byte0 : 8;
230 unsigned int byte1 : 8;
231 unsigned int dummy1 : 16;
232} reg_iop_sw_spu_rw_bus_set_mask_lo;
233#define REG_RD_ADDR_iop_sw_spu_rw_bus_set_mask_lo 76
234#define REG_WR_ADDR_iop_sw_spu_rw_bus_set_mask_lo 76
235
236/* Register rw_bus_set_mask_hi, scope iop_sw_spu, type rw */
237typedef struct {
238 unsigned int byte2 : 8;
239 unsigned int byte3 : 8;
240 unsigned int dummy1 : 16;
241} reg_iop_sw_spu_rw_bus_set_mask_hi;
242#define REG_RD_ADDR_iop_sw_spu_rw_bus_set_mask_hi 80
243#define REG_WR_ADDR_iop_sw_spu_rw_bus_set_mask_hi 80
244
245/* Register rw_gio_clr_mask_lo, scope iop_sw_spu, type rw */
246typedef struct {
247 unsigned int val : 16;
248 unsigned int dummy1 : 16;
249} reg_iop_sw_spu_rw_gio_clr_mask_lo;
250#define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask_lo 84
251#define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask_lo 84
252
253/* Register rw_gio_clr_mask_hi, scope iop_sw_spu, type rw */
254typedef struct {
255 unsigned int val : 16;
256 unsigned int dummy1 : 16;
257} reg_iop_sw_spu_rw_gio_clr_mask_hi;
258#define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask_hi 88
259#define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask_hi 88
260
261/* Register rw_gio_set_mask_lo, scope iop_sw_spu, type rw */
262typedef struct {
263 unsigned int val : 16;
264 unsigned int dummy1 : 16;
265} reg_iop_sw_spu_rw_gio_set_mask_lo;
266#define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask_lo 92
267#define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask_lo 92
268
269/* Register rw_gio_set_mask_hi, scope iop_sw_spu, type rw */
270typedef struct {
271 unsigned int val : 16;
272 unsigned int dummy1 : 16;
273} reg_iop_sw_spu_rw_gio_set_mask_hi;
274#define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask_hi 96
275#define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask_hi 96
276
277/* Register rw_gio_oe_clr_mask_lo, scope iop_sw_spu, type rw */
278typedef struct {
279 unsigned int val : 16;
280 unsigned int dummy1 : 16;
281} reg_iop_sw_spu_rw_gio_oe_clr_mask_lo;
282#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_lo 100
283#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_lo 100
284
285/* Register rw_gio_oe_clr_mask_hi, scope iop_sw_spu, type rw */
286typedef struct {
287 unsigned int val : 16;
288 unsigned int dummy1 : 16;
289} reg_iop_sw_spu_rw_gio_oe_clr_mask_hi;
290#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_hi 104
291#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_hi 104
292
293/* Register rw_gio_oe_set_mask_lo, scope iop_sw_spu, type rw */
294typedef struct {
295 unsigned int val : 16;
296 unsigned int dummy1 : 16;
297} reg_iop_sw_spu_rw_gio_oe_set_mask_lo;
298#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask_lo 108
299#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask_lo 108
300
301/* Register rw_gio_oe_set_mask_hi, scope iop_sw_spu, type rw */
302typedef struct {
303 unsigned int val : 16;
304 unsigned int dummy1 : 16;
305} reg_iop_sw_spu_rw_gio_oe_set_mask_hi;
306#define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask_hi 112
307#define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask_hi 112
308
309/* Register rw_cpu_intr, scope iop_sw_spu, type rw */
310typedef struct {
311 unsigned int intr0 : 1;
312 unsigned int intr1 : 1;
313 unsigned int intr2 : 1;
314 unsigned int intr3 : 1;
315 unsigned int intr4 : 1;
316 unsigned int intr5 : 1;
317 unsigned int intr6 : 1;
318 unsigned int intr7 : 1;
319 unsigned int intr8 : 1;
320 unsigned int intr9 : 1;
321 unsigned int intr10 : 1;
322 unsigned int intr11 : 1;
323 unsigned int intr12 : 1;
324 unsigned int intr13 : 1;
325 unsigned int intr14 : 1;
326 unsigned int intr15 : 1;
327 unsigned int dummy1 : 16;
328} reg_iop_sw_spu_rw_cpu_intr;
329#define REG_RD_ADDR_iop_sw_spu_rw_cpu_intr 116
330#define REG_WR_ADDR_iop_sw_spu_rw_cpu_intr 116
331
332/* Register r_cpu_intr, scope iop_sw_spu, type r */
333typedef struct {
334 unsigned int intr0 : 1;
335 unsigned int intr1 : 1;
336 unsigned int intr2 : 1;
337 unsigned int intr3 : 1;
338 unsigned int intr4 : 1;
339 unsigned int intr5 : 1;
340 unsigned int intr6 : 1;
341 unsigned int intr7 : 1;
342 unsigned int intr8 : 1;
343 unsigned int intr9 : 1;
344 unsigned int intr10 : 1;
345 unsigned int intr11 : 1;
346 unsigned int intr12 : 1;
347 unsigned int intr13 : 1;
348 unsigned int intr14 : 1;
349 unsigned int intr15 : 1;
350 unsigned int dummy1 : 16;
351} reg_iop_sw_spu_r_cpu_intr;
352#define REG_RD_ADDR_iop_sw_spu_r_cpu_intr 120
353
354/* Register r_hw_intr, scope iop_sw_spu, type r */
355typedef struct {
356 unsigned int trigger_grp0 : 1;
357 unsigned int trigger_grp1 : 1;
358 unsigned int trigger_grp2 : 1;
359 unsigned int trigger_grp3 : 1;
360 unsigned int trigger_grp4 : 1;
361 unsigned int trigger_grp5 : 1;
362 unsigned int trigger_grp6 : 1;
363 unsigned int trigger_grp7 : 1;
364 unsigned int timer_grp0 : 1;
365 unsigned int timer_grp1 : 1;
366 unsigned int fifo_out : 1;
367 unsigned int fifo_out_extra : 1;
368 unsigned int fifo_in : 1;
369 unsigned int fifo_in_extra : 1;
370 unsigned int dmc_out : 1;
371 unsigned int dmc_in : 1;
372 unsigned int dummy1 : 16;
373} reg_iop_sw_spu_r_hw_intr;
374#define REG_RD_ADDR_iop_sw_spu_r_hw_intr 124
375
376/* Register rw_mpu_intr, scope iop_sw_spu, type rw */
377typedef struct {
378 unsigned int intr0 : 1;
379 unsigned int intr1 : 1;
380 unsigned int intr2 : 1;
381 unsigned int intr3 : 1;
382 unsigned int intr4 : 1;
383 unsigned int intr5 : 1;
384 unsigned int intr6 : 1;
385 unsigned int intr7 : 1;
386 unsigned int intr8 : 1;
387 unsigned int intr9 : 1;
388 unsigned int intr10 : 1;
389 unsigned int intr11 : 1;
390 unsigned int intr12 : 1;
391 unsigned int intr13 : 1;
392 unsigned int intr14 : 1;
393 unsigned int intr15 : 1;
394 unsigned int dummy1 : 16;
395} reg_iop_sw_spu_rw_mpu_intr;
396#define REG_RD_ADDR_iop_sw_spu_rw_mpu_intr 128
397#define REG_WR_ADDR_iop_sw_spu_rw_mpu_intr 128
398
399/* Register r_mpu_intr, scope iop_sw_spu, type r */
400typedef struct {
401 unsigned int intr0 : 1;
402 unsigned int intr1 : 1;
403 unsigned int intr2 : 1;
404 unsigned int intr3 : 1;
405 unsigned int intr4 : 1;
406 unsigned int intr5 : 1;
407 unsigned int intr6 : 1;
408 unsigned int intr7 : 1;
409 unsigned int intr8 : 1;
410 unsigned int intr9 : 1;
411 unsigned int intr10 : 1;
412 unsigned int intr11 : 1;
413 unsigned int intr12 : 1;
414 unsigned int intr13 : 1;
415 unsigned int intr14 : 1;
416 unsigned int intr15 : 1;
417 unsigned int dummy1 : 16;
418} reg_iop_sw_spu_r_mpu_intr;
419#define REG_RD_ADDR_iop_sw_spu_r_mpu_intr 132
420
421
422/* Constants */
423enum {
424 regk_iop_sw_spu_copy = 0x00000000,
425 regk_iop_sw_spu_no = 0x00000000,
426 regk_iop_sw_spu_nop = 0x00000000,
427 regk_iop_sw_spu_rd = 0x00000002,
428 regk_iop_sw_spu_reg_copy = 0x00000001,
429 regk_iop_sw_spu_rw_bus_clr_mask_default = 0x00000000,
430 regk_iop_sw_spu_rw_bus_oe_clr_mask_default = 0x00000000,
431 regk_iop_sw_spu_rw_bus_oe_set_mask_default = 0x00000000,
432 regk_iop_sw_spu_rw_bus_set_mask_default = 0x00000000,
433 regk_iop_sw_spu_rw_gio_clr_mask_default = 0x00000000,
434 regk_iop_sw_spu_rw_gio_oe_clr_mask_default = 0x00000000,
435 regk_iop_sw_spu_rw_gio_oe_set_mask_default = 0x00000000,
436 regk_iop_sw_spu_rw_gio_set_mask_default = 0x00000000,
437 regk_iop_sw_spu_set = 0x00000001,
438 regk_iop_sw_spu_wr = 0x00000003,
439 regk_iop_sw_spu_yes = 0x00000001
440};
441#endif /* __iop_sw_spu_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_version_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_version_defs.h
deleted file mode 100644
index 20de425e652b..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_version_defs.h
+++ /dev/null
@@ -1,96 +0,0 @@
1#ifndef __iop_version_defs_h
2#define __iop_version_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: iop_version.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile iop_version_defs.h iop_version.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope iop_version */
83
84/* Register r_version, scope iop_version, type r */
85typedef struct {
86 unsigned int nr : 8;
87 unsigned int dummy1 : 24;
88} reg_iop_version_r_version;
89#define REG_RD_ADDR_iop_version_r_version 0
90
91
92/* Constants */
93enum {
94 regk_iop_version_v2_0 = 0x00000002
95};
96#endif /* __iop_version_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/l2cache_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/l2cache_defs.h
deleted file mode 100644
index 243ac3c882cb..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/l2cache_defs.h
+++ /dev/null
@@ -1,142 +0,0 @@
1#ifndef __l2cache_defs_h
2#define __l2cache_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: l2cache.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile l2cache_defs.h l2cache.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope l2cache */
83
84/* Register rw_cfg, scope l2cache, type rw */
85typedef struct {
86 unsigned int en : 1;
87 unsigned int dummy1 : 31;
88} reg_l2cache_rw_cfg;
89#define REG_RD_ADDR_l2cache_rw_cfg 0
90#define REG_WR_ADDR_l2cache_rw_cfg 0
91
92/* Register rw_ctrl, scope l2cache, type rw */
93typedef struct {
94 unsigned int dummy1 : 7;
95 unsigned int cbase : 9;
96 unsigned int dummy2 : 4;
97 unsigned int csize : 10;
98 unsigned int dummy3 : 2;
99} reg_l2cache_rw_ctrl;
100#define REG_RD_ADDR_l2cache_rw_ctrl 4
101#define REG_WR_ADDR_l2cache_rw_ctrl 4
102
103/* Register rw_idxop, scope l2cache, type rw */
104typedef struct {
105 unsigned int idx : 10;
106 unsigned int dummy1 : 14;
107 unsigned int way : 3;
108 unsigned int dummy2 : 2;
109 unsigned int cmd : 3;
110} reg_l2cache_rw_idxop;
111#define REG_RD_ADDR_l2cache_rw_idxop 8
112#define REG_WR_ADDR_l2cache_rw_idxop 8
113
114/* Register rw_addrop_addr, scope l2cache, type rw */
115typedef struct {
116 unsigned int addr : 32;
117} reg_l2cache_rw_addrop_addr;
118#define REG_RD_ADDR_l2cache_rw_addrop_addr 12
119#define REG_WR_ADDR_l2cache_rw_addrop_addr 12
120
121/* Register rw_addrop_ctrl, scope l2cache, type rw */
122typedef struct {
123 unsigned int size : 16;
124 unsigned int dummy1 : 13;
125 unsigned int cmd : 3;
126} reg_l2cache_rw_addrop_ctrl;
127#define REG_RD_ADDR_l2cache_rw_addrop_ctrl 16
128#define REG_WR_ADDR_l2cache_rw_addrop_ctrl 16
129
130
131/* Constants */
132enum {
133 regk_l2cache_flush = 0x00000001,
134 regk_l2cache_no = 0x00000000,
135 regk_l2cache_rw_addrop_addr_default = 0x00000000,
136 regk_l2cache_rw_addrop_ctrl_default = 0x00000000,
137 regk_l2cache_rw_cfg_default = 0x00000000,
138 regk_l2cache_rw_ctrl_default = 0x00000000,
139 regk_l2cache_rw_idxop_default = 0x00000000,
140 regk_l2cache_yes = 0x00000001
141};
142#endif /* __l2cache_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/marb_bar_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/marb_bar_defs.h
deleted file mode 100644
index c0e7628cbf7d..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/marb_bar_defs.h
+++ /dev/null
@@ -1,482 +0,0 @@
1#ifndef __marb_bar_defs_h
2#define __marb_bar_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: marb_bar.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile marb_bar_defs.h marb_bar.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope marb_bar */
83
84#define STRIDE_marb_bar_rw_ddr2_slots 4
85/* Register rw_ddr2_slots, scope marb_bar, type rw */
86typedef struct {
87 unsigned int owner : 4;
88 unsigned int dummy1 : 28;
89} reg_marb_bar_rw_ddr2_slots;
90#define REG_RD_ADDR_marb_bar_rw_ddr2_slots 0
91#define REG_WR_ADDR_marb_bar_rw_ddr2_slots 0
92
93/* Register rw_h264_rd_burst, scope marb_bar, type rw */
94typedef struct {
95 unsigned int ddr2_bsize : 2;
96 unsigned int dummy1 : 30;
97} reg_marb_bar_rw_h264_rd_burst;
98#define REG_RD_ADDR_marb_bar_rw_h264_rd_burst 256
99#define REG_WR_ADDR_marb_bar_rw_h264_rd_burst 256
100
101/* Register rw_h264_wr_burst, scope marb_bar, type rw */
102typedef struct {
103 unsigned int ddr2_bsize : 2;
104 unsigned int dummy1 : 30;
105} reg_marb_bar_rw_h264_wr_burst;
106#define REG_RD_ADDR_marb_bar_rw_h264_wr_burst 260
107#define REG_WR_ADDR_marb_bar_rw_h264_wr_burst 260
108
109/* Register rw_ccd_burst, scope marb_bar, type rw */
110typedef struct {
111 unsigned int ddr2_bsize : 2;
112 unsigned int dummy1 : 30;
113} reg_marb_bar_rw_ccd_burst;
114#define REG_RD_ADDR_marb_bar_rw_ccd_burst 264
115#define REG_WR_ADDR_marb_bar_rw_ccd_burst 264
116
117/* Register rw_vin_wr_burst, scope marb_bar, type rw */
118typedef struct {
119 unsigned int ddr2_bsize : 2;
120 unsigned int dummy1 : 30;
121} reg_marb_bar_rw_vin_wr_burst;
122#define REG_RD_ADDR_marb_bar_rw_vin_wr_burst 268
123#define REG_WR_ADDR_marb_bar_rw_vin_wr_burst 268
124
125/* Register rw_vin_rd_burst, scope marb_bar, type rw */
126typedef struct {
127 unsigned int ddr2_bsize : 2;
128 unsigned int dummy1 : 30;
129} reg_marb_bar_rw_vin_rd_burst;
130#define REG_RD_ADDR_marb_bar_rw_vin_rd_burst 272
131#define REG_WR_ADDR_marb_bar_rw_vin_rd_burst 272
132
133/* Register rw_sclr_rd_burst, scope marb_bar, type rw */
134typedef struct {
135 unsigned int ddr2_bsize : 2;
136 unsigned int dummy1 : 30;
137} reg_marb_bar_rw_sclr_rd_burst;
138#define REG_RD_ADDR_marb_bar_rw_sclr_rd_burst 276
139#define REG_WR_ADDR_marb_bar_rw_sclr_rd_burst 276
140
141/* Register rw_vout_burst, scope marb_bar, type rw */
142typedef struct {
143 unsigned int ddr2_bsize : 2;
144 unsigned int dummy1 : 30;
145} reg_marb_bar_rw_vout_burst;
146#define REG_RD_ADDR_marb_bar_rw_vout_burst 280
147#define REG_WR_ADDR_marb_bar_rw_vout_burst 280
148
149/* Register rw_sclr_fifo_burst, scope marb_bar, type rw */
150typedef struct {
151 unsigned int ddr2_bsize : 2;
152 unsigned int dummy1 : 30;
153} reg_marb_bar_rw_sclr_fifo_burst;
154#define REG_RD_ADDR_marb_bar_rw_sclr_fifo_burst 284
155#define REG_WR_ADDR_marb_bar_rw_sclr_fifo_burst 284
156
157/* Register rw_l2cache_burst, scope marb_bar, type rw */
158typedef struct {
159 unsigned int ddr2_bsize : 2;
160 unsigned int dummy1 : 30;
161} reg_marb_bar_rw_l2cache_burst;
162#define REG_RD_ADDR_marb_bar_rw_l2cache_burst 288
163#define REG_WR_ADDR_marb_bar_rw_l2cache_burst 288
164
165/* Register rw_intr_mask, scope marb_bar, type rw */
166typedef struct {
167 unsigned int bp0 : 1;
168 unsigned int bp1 : 1;
169 unsigned int bp2 : 1;
170 unsigned int bp3 : 1;
171 unsigned int dummy1 : 28;
172} reg_marb_bar_rw_intr_mask;
173#define REG_RD_ADDR_marb_bar_rw_intr_mask 292
174#define REG_WR_ADDR_marb_bar_rw_intr_mask 292
175
176/* Register rw_ack_intr, scope marb_bar, type rw */
177typedef struct {
178 unsigned int bp0 : 1;
179 unsigned int bp1 : 1;
180 unsigned int bp2 : 1;
181 unsigned int bp3 : 1;
182 unsigned int dummy1 : 28;
183} reg_marb_bar_rw_ack_intr;
184#define REG_RD_ADDR_marb_bar_rw_ack_intr 296
185#define REG_WR_ADDR_marb_bar_rw_ack_intr 296
186
187/* Register r_intr, scope marb_bar, type r */
188typedef struct {
189 unsigned int bp0 : 1;
190 unsigned int bp1 : 1;
191 unsigned int bp2 : 1;
192 unsigned int bp3 : 1;
193 unsigned int dummy1 : 28;
194} reg_marb_bar_r_intr;
195#define REG_RD_ADDR_marb_bar_r_intr 300
196
197/* Register r_masked_intr, scope marb_bar, type r */
198typedef struct {
199 unsigned int bp0 : 1;
200 unsigned int bp1 : 1;
201 unsigned int bp2 : 1;
202 unsigned int bp3 : 1;
203 unsigned int dummy1 : 28;
204} reg_marb_bar_r_masked_intr;
205#define REG_RD_ADDR_marb_bar_r_masked_intr 304
206
207/* Register rw_stop_mask, scope marb_bar, type rw */
208typedef struct {
209 unsigned int h264_rd : 1;
210 unsigned int h264_wr : 1;
211 unsigned int ccd : 1;
212 unsigned int vin_wr : 1;
213 unsigned int vin_rd : 1;
214 unsigned int sclr_rd : 1;
215 unsigned int vout : 1;
216 unsigned int sclr_fifo : 1;
217 unsigned int l2cache : 1;
218 unsigned int dummy1 : 23;
219} reg_marb_bar_rw_stop_mask;
220#define REG_RD_ADDR_marb_bar_rw_stop_mask 308
221#define REG_WR_ADDR_marb_bar_rw_stop_mask 308
222
223/* Register r_stopped, scope marb_bar, type r */
224typedef struct {
225 unsigned int h264_rd : 1;
226 unsigned int h264_wr : 1;
227 unsigned int ccd : 1;
228 unsigned int vin_wr : 1;
229 unsigned int vin_rd : 1;
230 unsigned int sclr_rd : 1;
231 unsigned int vout : 1;
232 unsigned int sclr_fifo : 1;
233 unsigned int l2cache : 1;
234 unsigned int dummy1 : 23;
235} reg_marb_bar_r_stopped;
236#define REG_RD_ADDR_marb_bar_r_stopped 312
237
238/* Register rw_no_snoop, scope marb_bar, type rw */
239typedef struct {
240 unsigned int h264_rd : 1;
241 unsigned int h264_wr : 1;
242 unsigned int ccd : 1;
243 unsigned int vin_wr : 1;
244 unsigned int vin_rd : 1;
245 unsigned int sclr_rd : 1;
246 unsigned int vout : 1;
247 unsigned int sclr_fifo : 1;
248 unsigned int l2cache : 1;
249 unsigned int dummy1 : 23;
250} reg_marb_bar_rw_no_snoop;
251#define REG_RD_ADDR_marb_bar_rw_no_snoop 576
252#define REG_WR_ADDR_marb_bar_rw_no_snoop 576
253
254
255/* Constants */
256enum {
257 regk_marb_bar_ccd = 0x00000002,
258 regk_marb_bar_h264_rd = 0x00000000,
259 regk_marb_bar_h264_wr = 0x00000001,
260 regk_marb_bar_l2cache = 0x00000008,
261 regk_marb_bar_no = 0x00000000,
262 regk_marb_bar_r_stopped_default = 0x00000000,
263 regk_marb_bar_rw_ccd_burst_default = 0x00000000,
264 regk_marb_bar_rw_ddr2_slots_default = 0x00000000,
265 regk_marb_bar_rw_ddr2_slots_size = 0x00000040,
266 regk_marb_bar_rw_h264_rd_burst_default = 0x00000000,
267 regk_marb_bar_rw_h264_wr_burst_default = 0x00000000,
268 regk_marb_bar_rw_intr_mask_default = 0x00000000,
269 regk_marb_bar_rw_l2cache_burst_default = 0x00000000,
270 regk_marb_bar_rw_no_snoop_default = 0x00000000,
271 regk_marb_bar_rw_sclr_fifo_burst_default = 0x00000000,
272 regk_marb_bar_rw_sclr_rd_burst_default = 0x00000000,
273 regk_marb_bar_rw_stop_mask_default = 0x00000000,
274 regk_marb_bar_rw_vin_rd_burst_default = 0x00000000,
275 regk_marb_bar_rw_vin_wr_burst_default = 0x00000000,
276 regk_marb_bar_rw_vout_burst_default = 0x00000000,
277 regk_marb_bar_sclr_fifo = 0x00000007,
278 regk_marb_bar_sclr_rd = 0x00000005,
279 regk_marb_bar_vin_rd = 0x00000004,
280 regk_marb_bar_vin_wr = 0x00000003,
281 regk_marb_bar_vout = 0x00000006,
282 regk_marb_bar_yes = 0x00000001
283};
284#endif /* __marb_bar_defs_h */
285#ifndef __marb_bar_bp_defs_h
286#define __marb_bar_bp_defs_h
287
288/*
289 * This file is autogenerated from
290 * file: marb_bar.r
291 *
292 * by ../../../tools/rdesc/bin/rdes2c -outfile marb_bar_defs.h marb_bar.r
293 * Any changes here will be lost.
294 *
295 * -*- buffer-read-only: t -*-
296 */
297/* Main access macros */
298#ifndef REG_RD
299#define REG_RD( scope, inst, reg ) \
300 REG_READ( reg_##scope##_##reg, \
301 (inst) + REG_RD_ADDR_##scope##_##reg )
302#endif
303
304#ifndef REG_WR
305#define REG_WR( scope, inst, reg, val ) \
306 REG_WRITE( reg_##scope##_##reg, \
307 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
308#endif
309
310#ifndef REG_RD_VECT
311#define REG_RD_VECT( scope, inst, reg, index ) \
312 REG_READ( reg_##scope##_##reg, \
313 (inst) + REG_RD_ADDR_##scope##_##reg + \
314 (index) * STRIDE_##scope##_##reg )
315#endif
316
317#ifndef REG_WR_VECT
318#define REG_WR_VECT( scope, inst, reg, index, val ) \
319 REG_WRITE( reg_##scope##_##reg, \
320 (inst) + REG_WR_ADDR_##scope##_##reg + \
321 (index) * STRIDE_##scope##_##reg, (val) )
322#endif
323
324#ifndef REG_RD_INT
325#define REG_RD_INT( scope, inst, reg ) \
326 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
327#endif
328
329#ifndef REG_WR_INT
330#define REG_WR_INT( scope, inst, reg, val ) \
331 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
332#endif
333
334#ifndef REG_RD_INT_VECT
335#define REG_RD_INT_VECT( scope, inst, reg, index ) \
336 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
337 (index) * STRIDE_##scope##_##reg )
338#endif
339
340#ifndef REG_WR_INT_VECT
341#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
342 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
343 (index) * STRIDE_##scope##_##reg, (val) )
344#endif
345
346#ifndef REG_TYPE_CONV
347#define REG_TYPE_CONV( type, orgtype, val ) \
348 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
349#endif
350
351#ifndef reg_page_size
352#define reg_page_size 8192
353#endif
354
355#ifndef REG_ADDR
356#define REG_ADDR( scope, inst, reg ) \
357 ( (inst) + REG_RD_ADDR_##scope##_##reg )
358#endif
359
360#ifndef REG_ADDR_VECT
361#define REG_ADDR_VECT( scope, inst, reg, index ) \
362 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
363 (index) * STRIDE_##scope##_##reg )
364#endif
365
366/* C-code for register scope marb_bar_bp */
367
368/* Register rw_first_addr, scope marb_bar_bp, type rw */
369typedef unsigned int reg_marb_bar_bp_rw_first_addr;
370#define REG_RD_ADDR_marb_bar_bp_rw_first_addr 0
371#define REG_WR_ADDR_marb_bar_bp_rw_first_addr 0
372
373/* Register rw_last_addr, scope marb_bar_bp, type rw */
374typedef unsigned int reg_marb_bar_bp_rw_last_addr;
375#define REG_RD_ADDR_marb_bar_bp_rw_last_addr 4
376#define REG_WR_ADDR_marb_bar_bp_rw_last_addr 4
377
378/* Register rw_op, scope marb_bar_bp, type rw */
379typedef struct {
380 unsigned int rd : 1;
381 unsigned int wr : 1;
382 unsigned int rd_excl : 1;
383 unsigned int pri_wr : 1;
384 unsigned int us_rd : 1;
385 unsigned int us_wr : 1;
386 unsigned int us_rd_excl : 1;
387 unsigned int us_pri_wr : 1;
388 unsigned int dummy1 : 24;
389} reg_marb_bar_bp_rw_op;
390#define REG_RD_ADDR_marb_bar_bp_rw_op 8
391#define REG_WR_ADDR_marb_bar_bp_rw_op 8
392
393/* Register rw_clients, scope marb_bar_bp, type rw */
394typedef struct {
395 unsigned int h264_rd : 1;
396 unsigned int h264_wr : 1;
397 unsigned int ccd : 1;
398 unsigned int vin_wr : 1;
399 unsigned int vin_rd : 1;
400 unsigned int sclr_rd : 1;
401 unsigned int vout : 1;
402 unsigned int sclr_fifo : 1;
403 unsigned int l2cache : 1;
404 unsigned int dummy1 : 23;
405} reg_marb_bar_bp_rw_clients;
406#define REG_RD_ADDR_marb_bar_bp_rw_clients 12
407#define REG_WR_ADDR_marb_bar_bp_rw_clients 12
408
409/* Register rw_options, scope marb_bar_bp, type rw */
410typedef struct {
411 unsigned int wrap : 1;
412 unsigned int dummy1 : 31;
413} reg_marb_bar_bp_rw_options;
414#define REG_RD_ADDR_marb_bar_bp_rw_options 16
415#define REG_WR_ADDR_marb_bar_bp_rw_options 16
416
417/* Register r_brk_addr, scope marb_bar_bp, type r */
418typedef unsigned int reg_marb_bar_bp_r_brk_addr;
419#define REG_RD_ADDR_marb_bar_bp_r_brk_addr 20
420
421/* Register r_brk_op, scope marb_bar_bp, type r */
422typedef struct {
423 unsigned int rd : 1;
424 unsigned int wr : 1;
425 unsigned int rd_excl : 1;
426 unsigned int pri_wr : 1;
427 unsigned int us_rd : 1;
428 unsigned int us_wr : 1;
429 unsigned int us_rd_excl : 1;
430 unsigned int us_pri_wr : 1;
431 unsigned int dummy1 : 24;
432} reg_marb_bar_bp_r_brk_op;
433#define REG_RD_ADDR_marb_bar_bp_r_brk_op 24
434
435/* Register r_brk_clients, scope marb_bar_bp, type r */
436typedef struct {
437 unsigned int h264_rd : 1;
438 unsigned int h264_wr : 1;
439 unsigned int ccd : 1;
440 unsigned int vin_wr : 1;
441 unsigned int vin_rd : 1;
442 unsigned int sclr_rd : 1;
443 unsigned int vout : 1;
444 unsigned int sclr_fifo : 1;
445 unsigned int l2cache : 1;
446 unsigned int dummy1 : 23;
447} reg_marb_bar_bp_r_brk_clients;
448#define REG_RD_ADDR_marb_bar_bp_r_brk_clients 28
449
450/* Register r_brk_first_client, scope marb_bar_bp, type r */
451typedef struct {
452 unsigned int h264_rd : 1;
453 unsigned int h264_wr : 1;
454 unsigned int ccd : 1;
455 unsigned int vin_wr : 1;
456 unsigned int vin_rd : 1;
457 unsigned int sclr_rd : 1;
458 unsigned int vout : 1;
459 unsigned int sclr_fifo : 1;
460 unsigned int l2cache : 1;
461 unsigned int dummy1 : 23;
462} reg_marb_bar_bp_r_brk_first_client;
463#define REG_RD_ADDR_marb_bar_bp_r_brk_first_client 32
464
465/* Register r_brk_size, scope marb_bar_bp, type r */
466typedef unsigned int reg_marb_bar_bp_r_brk_size;
467#define REG_RD_ADDR_marb_bar_bp_r_brk_size 36
468
469/* Register rw_ack, scope marb_bar_bp, type rw */
470typedef unsigned int reg_marb_bar_bp_rw_ack;
471#define REG_RD_ADDR_marb_bar_bp_rw_ack 40
472#define REG_WR_ADDR_marb_bar_bp_rw_ack 40
473
474
475/* Constants */
476enum {
477 regk_marb_bar_bp_no = 0x00000000,
478 regk_marb_bar_bp_rw_op_default = 0x00000000,
479 regk_marb_bar_bp_rw_options_default = 0x00000000,
480 regk_marb_bar_bp_yes = 0x00000001
481};
482#endif /* __marb_bar_bp_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/marb_foo_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/marb_foo_defs.h
deleted file mode 100644
index 2baa833f109a..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/marb_foo_defs.h
+++ /dev/null
@@ -1,626 +0,0 @@
1#ifndef __marb_foo_defs_h
2#define __marb_foo_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: marb_foo.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile marb_foo_defs.h marb_foo.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope marb_foo */
83
84#define STRIDE_marb_foo_rw_intm_slots 4
85/* Register rw_intm_slots, scope marb_foo, type rw */
86typedef struct {
87 unsigned int owner : 4;
88 unsigned int dummy1 : 28;
89} reg_marb_foo_rw_intm_slots;
90#define REG_RD_ADDR_marb_foo_rw_intm_slots 0
91#define REG_WR_ADDR_marb_foo_rw_intm_slots 0
92
93#define STRIDE_marb_foo_rw_l2_slots 4
94/* Register rw_l2_slots, scope marb_foo, type rw */
95typedef struct {
96 unsigned int owner : 4;
97 unsigned int dummy1 : 28;
98} reg_marb_foo_rw_l2_slots;
99#define REG_RD_ADDR_marb_foo_rw_l2_slots 256
100#define REG_WR_ADDR_marb_foo_rw_l2_slots 256
101
102#define STRIDE_marb_foo_rw_regs_slots 4
103/* Register rw_regs_slots, scope marb_foo, type rw */
104typedef struct {
105 unsigned int owner : 4;
106 unsigned int dummy1 : 28;
107} reg_marb_foo_rw_regs_slots;
108#define REG_RD_ADDR_marb_foo_rw_regs_slots 512
109#define REG_WR_ADDR_marb_foo_rw_regs_slots 512
110
111/* Register rw_sclr_burst, scope marb_foo, type rw */
112typedef struct {
113 unsigned int intm_bsize : 2;
114 unsigned int l2_bsize : 2;
115 unsigned int dummy1 : 28;
116} reg_marb_foo_rw_sclr_burst;
117#define REG_RD_ADDR_marb_foo_rw_sclr_burst 528
118#define REG_WR_ADDR_marb_foo_rw_sclr_burst 528
119
120/* Register rw_dma0_burst, scope marb_foo, type rw */
121typedef struct {
122 unsigned int intm_bsize : 2;
123 unsigned int l2_bsize : 2;
124 unsigned int dummy1 : 28;
125} reg_marb_foo_rw_dma0_burst;
126#define REG_RD_ADDR_marb_foo_rw_dma0_burst 532
127#define REG_WR_ADDR_marb_foo_rw_dma0_burst 532
128
129/* Register rw_dma1_burst, scope marb_foo, type rw */
130typedef struct {
131 unsigned int intm_bsize : 2;
132 unsigned int l2_bsize : 2;
133 unsigned int dummy1 : 28;
134} reg_marb_foo_rw_dma1_burst;
135#define REG_RD_ADDR_marb_foo_rw_dma1_burst 536
136#define REG_WR_ADDR_marb_foo_rw_dma1_burst 536
137
138/* Register rw_dma2_burst, scope marb_foo, type rw */
139typedef struct {
140 unsigned int intm_bsize : 2;
141 unsigned int l2_bsize : 2;
142 unsigned int dummy1 : 28;
143} reg_marb_foo_rw_dma2_burst;
144#define REG_RD_ADDR_marb_foo_rw_dma2_burst 540
145#define REG_WR_ADDR_marb_foo_rw_dma2_burst 540
146
147/* Register rw_dma3_burst, scope marb_foo, type rw */
148typedef struct {
149 unsigned int intm_bsize : 2;
150 unsigned int l2_bsize : 2;
151 unsigned int dummy1 : 28;
152} reg_marb_foo_rw_dma3_burst;
153#define REG_RD_ADDR_marb_foo_rw_dma3_burst 544
154#define REG_WR_ADDR_marb_foo_rw_dma3_burst 544
155
156/* Register rw_dma4_burst, scope marb_foo, type rw */
157typedef struct {
158 unsigned int intm_bsize : 2;
159 unsigned int l2_bsize : 2;
160 unsigned int dummy1 : 28;
161} reg_marb_foo_rw_dma4_burst;
162#define REG_RD_ADDR_marb_foo_rw_dma4_burst 548
163#define REG_WR_ADDR_marb_foo_rw_dma4_burst 548
164
165/* Register rw_dma5_burst, scope marb_foo, type rw */
166typedef struct {
167 unsigned int intm_bsize : 2;
168 unsigned int l2_bsize : 2;
169 unsigned int dummy1 : 28;
170} reg_marb_foo_rw_dma5_burst;
171#define REG_RD_ADDR_marb_foo_rw_dma5_burst 552
172#define REG_WR_ADDR_marb_foo_rw_dma5_burst 552
173
174/* Register rw_dma6_burst, scope marb_foo, type rw */
175typedef struct {
176 unsigned int intm_bsize : 2;
177 unsigned int l2_bsize : 2;
178 unsigned int dummy1 : 28;
179} reg_marb_foo_rw_dma6_burst;
180#define REG_RD_ADDR_marb_foo_rw_dma6_burst 556
181#define REG_WR_ADDR_marb_foo_rw_dma6_burst 556
182
183/* Register rw_dma7_burst, scope marb_foo, type rw */
184typedef struct {
185 unsigned int intm_bsize : 2;
186 unsigned int l2_bsize : 2;
187 unsigned int dummy1 : 28;
188} reg_marb_foo_rw_dma7_burst;
189#define REG_RD_ADDR_marb_foo_rw_dma7_burst 560
190#define REG_WR_ADDR_marb_foo_rw_dma7_burst 560
191
192/* Register rw_dma9_burst, scope marb_foo, type rw */
193typedef struct {
194 unsigned int intm_bsize : 2;
195 unsigned int l2_bsize : 2;
196 unsigned int dummy1 : 28;
197} reg_marb_foo_rw_dma9_burst;
198#define REG_RD_ADDR_marb_foo_rw_dma9_burst 564
199#define REG_WR_ADDR_marb_foo_rw_dma9_burst 564
200
201/* Register rw_dma11_burst, scope marb_foo, type rw */
202typedef struct {
203 unsigned int intm_bsize : 2;
204 unsigned int l2_bsize : 2;
205 unsigned int dummy1 : 28;
206} reg_marb_foo_rw_dma11_burst;
207#define REG_RD_ADDR_marb_foo_rw_dma11_burst 568
208#define REG_WR_ADDR_marb_foo_rw_dma11_burst 568
209
210/* Register rw_cpui_burst, scope marb_foo, type rw */
211typedef struct {
212 unsigned int intm_bsize : 2;
213 unsigned int l2_bsize : 2;
214 unsigned int dummy1 : 28;
215} reg_marb_foo_rw_cpui_burst;
216#define REG_RD_ADDR_marb_foo_rw_cpui_burst 572
217#define REG_WR_ADDR_marb_foo_rw_cpui_burst 572
218
219/* Register rw_cpud_burst, scope marb_foo, type rw */
220typedef struct {
221 unsigned int intm_bsize : 2;
222 unsigned int l2_bsize : 2;
223 unsigned int dummy1 : 28;
224} reg_marb_foo_rw_cpud_burst;
225#define REG_RD_ADDR_marb_foo_rw_cpud_burst 576
226#define REG_WR_ADDR_marb_foo_rw_cpud_burst 576
227
228/* Register rw_iop_burst, scope marb_foo, type rw */
229typedef struct {
230 unsigned int intm_bsize : 2;
231 unsigned int l2_bsize : 2;
232 unsigned int dummy1 : 28;
233} reg_marb_foo_rw_iop_burst;
234#define REG_RD_ADDR_marb_foo_rw_iop_burst 580
235#define REG_WR_ADDR_marb_foo_rw_iop_burst 580
236
237/* Register rw_ccdstat_burst, scope marb_foo, type rw */
238typedef struct {
239 unsigned int intm_bsize : 2;
240 unsigned int l2_bsize : 2;
241 unsigned int dummy1 : 28;
242} reg_marb_foo_rw_ccdstat_burst;
243#define REG_RD_ADDR_marb_foo_rw_ccdstat_burst 584
244#define REG_WR_ADDR_marb_foo_rw_ccdstat_burst 584
245
246/* Register rw_intr_mask, scope marb_foo, type rw */
247typedef struct {
248 unsigned int bp0 : 1;
249 unsigned int bp1 : 1;
250 unsigned int bp2 : 1;
251 unsigned int bp3 : 1;
252 unsigned int dummy1 : 28;
253} reg_marb_foo_rw_intr_mask;
254#define REG_RD_ADDR_marb_foo_rw_intr_mask 588
255#define REG_WR_ADDR_marb_foo_rw_intr_mask 588
256
257/* Register rw_ack_intr, scope marb_foo, type rw */
258typedef struct {
259 unsigned int bp0 : 1;
260 unsigned int bp1 : 1;
261 unsigned int bp2 : 1;
262 unsigned int bp3 : 1;
263 unsigned int dummy1 : 28;
264} reg_marb_foo_rw_ack_intr;
265#define REG_RD_ADDR_marb_foo_rw_ack_intr 592
266#define REG_WR_ADDR_marb_foo_rw_ack_intr 592
267
268/* Register r_intr, scope marb_foo, type r */
269typedef struct {
270 unsigned int bp0 : 1;
271 unsigned int bp1 : 1;
272 unsigned int bp2 : 1;
273 unsigned int bp3 : 1;
274 unsigned int dummy1 : 28;
275} reg_marb_foo_r_intr;
276#define REG_RD_ADDR_marb_foo_r_intr 596
277
278/* Register r_masked_intr, scope marb_foo, type r */
279typedef struct {
280 unsigned int bp0 : 1;
281 unsigned int bp1 : 1;
282 unsigned int bp2 : 1;
283 unsigned int bp3 : 1;
284 unsigned int dummy1 : 28;
285} reg_marb_foo_r_masked_intr;
286#define REG_RD_ADDR_marb_foo_r_masked_intr 600
287
288/* Register rw_stop_mask, scope marb_foo, type rw */
289typedef struct {
290 unsigned int sclr : 1;
291 unsigned int dma0 : 1;
292 unsigned int dma1 : 1;
293 unsigned int dma2 : 1;
294 unsigned int dma3 : 1;
295 unsigned int dma4 : 1;
296 unsigned int dma5 : 1;
297 unsigned int dma6 : 1;
298 unsigned int dma7 : 1;
299 unsigned int dma9 : 1;
300 unsigned int dma11 : 1;
301 unsigned int cpui : 1;
302 unsigned int cpud : 1;
303 unsigned int iop : 1;
304 unsigned int ccdstat : 1;
305 unsigned int dummy1 : 17;
306} reg_marb_foo_rw_stop_mask;
307#define REG_RD_ADDR_marb_foo_rw_stop_mask 604
308#define REG_WR_ADDR_marb_foo_rw_stop_mask 604
309
310/* Register r_stopped, scope marb_foo, type r */
311typedef struct {
312 unsigned int sclr : 1;
313 unsigned int dma0 : 1;
314 unsigned int dma1 : 1;
315 unsigned int dma2 : 1;
316 unsigned int dma3 : 1;
317 unsigned int dma4 : 1;
318 unsigned int dma5 : 1;
319 unsigned int dma6 : 1;
320 unsigned int dma7 : 1;
321 unsigned int dma9 : 1;
322 unsigned int dma11 : 1;
323 unsigned int cpui : 1;
324 unsigned int cpud : 1;
325 unsigned int iop : 1;
326 unsigned int ccdstat : 1;
327 unsigned int dummy1 : 17;
328} reg_marb_foo_r_stopped;
329#define REG_RD_ADDR_marb_foo_r_stopped 608
330
331/* Register rw_no_snoop, scope marb_foo, type rw */
332typedef struct {
333 unsigned int sclr : 1;
334 unsigned int dma0 : 1;
335 unsigned int dma1 : 1;
336 unsigned int dma2 : 1;
337 unsigned int dma3 : 1;
338 unsigned int dma4 : 1;
339 unsigned int dma5 : 1;
340 unsigned int dma6 : 1;
341 unsigned int dma7 : 1;
342 unsigned int dma9 : 1;
343 unsigned int dma11 : 1;
344 unsigned int cpui : 1;
345 unsigned int cpud : 1;
346 unsigned int iop : 1;
347 unsigned int ccdstat : 1;
348 unsigned int dummy1 : 17;
349} reg_marb_foo_rw_no_snoop;
350#define REG_RD_ADDR_marb_foo_rw_no_snoop 896
351#define REG_WR_ADDR_marb_foo_rw_no_snoop 896
352
353/* Register rw_no_snoop_rq, scope marb_foo, type rw */
354typedef struct {
355 unsigned int dummy1 : 11;
356 unsigned int cpui : 1;
357 unsigned int cpud : 1;
358 unsigned int dummy2 : 19;
359} reg_marb_foo_rw_no_snoop_rq;
360#define REG_RD_ADDR_marb_foo_rw_no_snoop_rq 900
361#define REG_WR_ADDR_marb_foo_rw_no_snoop_rq 900
362
363
364/* Constants */
365enum {
366 regk_marb_foo_ccdstat = 0x0000000e,
367 regk_marb_foo_cpud = 0x0000000c,
368 regk_marb_foo_cpui = 0x0000000b,
369 regk_marb_foo_dma0 = 0x00000001,
370 regk_marb_foo_dma1 = 0x00000002,
371 regk_marb_foo_dma11 = 0x0000000a,
372 regk_marb_foo_dma2 = 0x00000003,
373 regk_marb_foo_dma3 = 0x00000004,
374 regk_marb_foo_dma4 = 0x00000005,
375 regk_marb_foo_dma5 = 0x00000006,
376 regk_marb_foo_dma6 = 0x00000007,
377 regk_marb_foo_dma7 = 0x00000008,
378 regk_marb_foo_dma9 = 0x00000009,
379 regk_marb_foo_iop = 0x0000000d,
380 regk_marb_foo_no = 0x00000000,
381 regk_marb_foo_r_stopped_default = 0x00000000,
382 regk_marb_foo_rw_ccdstat_burst_default = 0x00000000,
383 regk_marb_foo_rw_cpud_burst_default = 0x00000000,
384 regk_marb_foo_rw_cpui_burst_default = 0x00000000,
385 regk_marb_foo_rw_dma0_burst_default = 0x00000000,
386 regk_marb_foo_rw_dma11_burst_default = 0x00000000,
387 regk_marb_foo_rw_dma1_burst_default = 0x00000000,
388 regk_marb_foo_rw_dma2_burst_default = 0x00000000,
389 regk_marb_foo_rw_dma3_burst_default = 0x00000000,
390 regk_marb_foo_rw_dma4_burst_default = 0x00000000,
391 regk_marb_foo_rw_dma5_burst_default = 0x00000000,
392 regk_marb_foo_rw_dma6_burst_default = 0x00000000,
393 regk_marb_foo_rw_dma7_burst_default = 0x00000000,
394 regk_marb_foo_rw_dma9_burst_default = 0x00000000,
395 regk_marb_foo_rw_intm_slots_default = 0x00000000,
396 regk_marb_foo_rw_intm_slots_size = 0x00000040,
397 regk_marb_foo_rw_intr_mask_default = 0x00000000,
398 regk_marb_foo_rw_iop_burst_default = 0x00000000,
399 regk_marb_foo_rw_l2_slots_default = 0x00000000,
400 regk_marb_foo_rw_l2_slots_size = 0x00000040,
401 regk_marb_foo_rw_no_snoop_default = 0x00000000,
402 regk_marb_foo_rw_no_snoop_rq_default = 0x00000000,
403 regk_marb_foo_rw_regs_slots_default = 0x00000000,
404 regk_marb_foo_rw_regs_slots_size = 0x00000004,
405 regk_marb_foo_rw_sclr_burst_default = 0x00000000,
406 regk_marb_foo_rw_stop_mask_default = 0x00000000,
407 regk_marb_foo_sclr = 0x00000000,
408 regk_marb_foo_yes = 0x00000001
409};
410#endif /* __marb_foo_defs_h */
411#ifndef __marb_foo_bp_defs_h
412#define __marb_foo_bp_defs_h
413
414/*
415 * This file is autogenerated from
416 * file: marb_foo.r
417 *
418 * by ../../../tools/rdesc/bin/rdes2c -outfile marb_foo_defs.h marb_foo.r
419 * Any changes here will be lost.
420 *
421 * -*- buffer-read-only: t -*-
422 */
423/* Main access macros */
424#ifndef REG_RD
425#define REG_RD( scope, inst, reg ) \
426 REG_READ( reg_##scope##_##reg, \
427 (inst) + REG_RD_ADDR_##scope##_##reg )
428#endif
429
430#ifndef REG_WR
431#define REG_WR( scope, inst, reg, val ) \
432 REG_WRITE( reg_##scope##_##reg, \
433 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
434#endif
435
436#ifndef REG_RD_VECT
437#define REG_RD_VECT( scope, inst, reg, index ) \
438 REG_READ( reg_##scope##_##reg, \
439 (inst) + REG_RD_ADDR_##scope##_##reg + \
440 (index) * STRIDE_##scope##_##reg )
441#endif
442
443#ifndef REG_WR_VECT
444#define REG_WR_VECT( scope, inst, reg, index, val ) \
445 REG_WRITE( reg_##scope##_##reg, \
446 (inst) + REG_WR_ADDR_##scope##_##reg + \
447 (index) * STRIDE_##scope##_##reg, (val) )
448#endif
449
450#ifndef REG_RD_INT
451#define REG_RD_INT( scope, inst, reg ) \
452 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
453#endif
454
455#ifndef REG_WR_INT
456#define REG_WR_INT( scope, inst, reg, val ) \
457 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
458#endif
459
460#ifndef REG_RD_INT_VECT
461#define REG_RD_INT_VECT( scope, inst, reg, index ) \
462 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
463 (index) * STRIDE_##scope##_##reg )
464#endif
465
466#ifndef REG_WR_INT_VECT
467#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
468 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
469 (index) * STRIDE_##scope##_##reg, (val) )
470#endif
471
472#ifndef REG_TYPE_CONV
473#define REG_TYPE_CONV( type, orgtype, val ) \
474 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
475#endif
476
477#ifndef reg_page_size
478#define reg_page_size 8192
479#endif
480
481#ifndef REG_ADDR
482#define REG_ADDR( scope, inst, reg ) \
483 ( (inst) + REG_RD_ADDR_##scope##_##reg )
484#endif
485
486#ifndef REG_ADDR_VECT
487#define REG_ADDR_VECT( scope, inst, reg, index ) \
488 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
489 (index) * STRIDE_##scope##_##reg )
490#endif
491
492/* C-code for register scope marb_foo_bp */
493
494/* Register rw_first_addr, scope marb_foo_bp, type rw */
495typedef unsigned int reg_marb_foo_bp_rw_first_addr;
496#define REG_RD_ADDR_marb_foo_bp_rw_first_addr 0
497#define REG_WR_ADDR_marb_foo_bp_rw_first_addr 0
498
499/* Register rw_last_addr, scope marb_foo_bp, type rw */
500typedef unsigned int reg_marb_foo_bp_rw_last_addr;
501#define REG_RD_ADDR_marb_foo_bp_rw_last_addr 4
502#define REG_WR_ADDR_marb_foo_bp_rw_last_addr 4
503
504/* Register rw_op, scope marb_foo_bp, type rw */
505typedef struct {
506 unsigned int rd : 1;
507 unsigned int wr : 1;
508 unsigned int rd_excl : 1;
509 unsigned int pri_wr : 1;
510 unsigned int us_rd : 1;
511 unsigned int us_wr : 1;
512 unsigned int us_rd_excl : 1;
513 unsigned int us_pri_wr : 1;
514 unsigned int dummy1 : 24;
515} reg_marb_foo_bp_rw_op;
516#define REG_RD_ADDR_marb_foo_bp_rw_op 8
517#define REG_WR_ADDR_marb_foo_bp_rw_op 8
518
519/* Register rw_clients, scope marb_foo_bp, type rw */
520typedef struct {
521 unsigned int sclr : 1;
522 unsigned int dma0 : 1;
523 unsigned int dma1 : 1;
524 unsigned int dma2 : 1;
525 unsigned int dma3 : 1;
526 unsigned int dma4 : 1;
527 unsigned int dma5 : 1;
528 unsigned int dma6 : 1;
529 unsigned int dma7 : 1;
530 unsigned int dma9 : 1;
531 unsigned int dma11 : 1;
532 unsigned int cpui : 1;
533 unsigned int cpud : 1;
534 unsigned int iop : 1;
535 unsigned int ccdstat : 1;
536 unsigned int dummy1 : 17;
537} reg_marb_foo_bp_rw_clients;
538#define REG_RD_ADDR_marb_foo_bp_rw_clients 12
539#define REG_WR_ADDR_marb_foo_bp_rw_clients 12
540
541/* Register rw_options, scope marb_foo_bp, type rw */
542typedef struct {
543 unsigned int wrap : 1;
544 unsigned int dummy1 : 31;
545} reg_marb_foo_bp_rw_options;
546#define REG_RD_ADDR_marb_foo_bp_rw_options 16
547#define REG_WR_ADDR_marb_foo_bp_rw_options 16
548
549/* Register r_brk_addr, scope marb_foo_bp, type r */
550typedef unsigned int reg_marb_foo_bp_r_brk_addr;
551#define REG_RD_ADDR_marb_foo_bp_r_brk_addr 20
552
553/* Register r_brk_op, scope marb_foo_bp, type r */
554typedef struct {
555 unsigned int rd : 1;
556 unsigned int wr : 1;
557 unsigned int rd_excl : 1;
558 unsigned int pri_wr : 1;
559 unsigned int us_rd : 1;
560 unsigned int us_wr : 1;
561 unsigned int us_rd_excl : 1;
562 unsigned int us_pri_wr : 1;
563 unsigned int dummy1 : 24;
564} reg_marb_foo_bp_r_brk_op;
565#define REG_RD_ADDR_marb_foo_bp_r_brk_op 24
566
567/* Register r_brk_clients, scope marb_foo_bp, type r */
568typedef struct {
569 unsigned int sclr : 1;
570 unsigned int dma0 : 1;
571 unsigned int dma1 : 1;
572 unsigned int dma2 : 1;
573 unsigned int dma3 : 1;
574 unsigned int dma4 : 1;
575 unsigned int dma5 : 1;
576 unsigned int dma6 : 1;
577 unsigned int dma7 : 1;
578 unsigned int dma9 : 1;
579 unsigned int dma11 : 1;
580 unsigned int cpui : 1;
581 unsigned int cpud : 1;
582 unsigned int iop : 1;
583 unsigned int ccdstat : 1;
584 unsigned int dummy1 : 17;
585} reg_marb_foo_bp_r_brk_clients;
586#define REG_RD_ADDR_marb_foo_bp_r_brk_clients 28
587
588/* Register r_brk_first_client, scope marb_foo_bp, type r */
589typedef struct {
590 unsigned int sclr : 1;
591 unsigned int dma0 : 1;
592 unsigned int dma1 : 1;
593 unsigned int dma2 : 1;
594 unsigned int dma3 : 1;
595 unsigned int dma4 : 1;
596 unsigned int dma5 : 1;
597 unsigned int dma6 : 1;
598 unsigned int dma7 : 1;
599 unsigned int dma9 : 1;
600 unsigned int dma11 : 1;
601 unsigned int cpui : 1;
602 unsigned int cpud : 1;
603 unsigned int iop : 1;
604 unsigned int ccdstat : 1;
605 unsigned int dummy1 : 17;
606} reg_marb_foo_bp_r_brk_first_client;
607#define REG_RD_ADDR_marb_foo_bp_r_brk_first_client 32
608
609/* Register r_brk_size, scope marb_foo_bp, type r */
610typedef unsigned int reg_marb_foo_bp_r_brk_size;
611#define REG_RD_ADDR_marb_foo_bp_r_brk_size 36
612
613/* Register rw_ack, scope marb_foo_bp, type rw */
614typedef unsigned int reg_marb_foo_bp_rw_ack;
615#define REG_RD_ADDR_marb_foo_bp_rw_ack 40
616#define REG_WR_ADDR_marb_foo_bp_rw_ack 40
617
618
619/* Constants */
620enum {
621 regk_marb_foo_bp_no = 0x00000000,
622 regk_marb_foo_bp_rw_op_default = 0x00000000,
623 regk_marb_foo_bp_rw_options_default = 0x00000000,
624 regk_marb_foo_bp_yes = 0x00000001
625};
626#endif /* __marb_foo_bp_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/pinmux_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/pinmux_defs.h
deleted file mode 100644
index 4b96cd2cba8a..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/pinmux_defs.h
+++ /dev/null
@@ -1,312 +0,0 @@
1#ifndef __pinmux_defs_h
2#define __pinmux_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: pinmux.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile pinmux_defs.h pinmux.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope pinmux */
83
84/* Register rw_hwprot, scope pinmux, type rw */
85typedef struct {
86 unsigned int eth : 1;
87 unsigned int eth_mdio : 1;
88 unsigned int geth : 1;
89 unsigned int tg : 1;
90 unsigned int tg_clk : 1;
91 unsigned int vout : 1;
92 unsigned int vout_sync : 1;
93 unsigned int ser1 : 1;
94 unsigned int ser2 : 1;
95 unsigned int ser3 : 1;
96 unsigned int ser4 : 1;
97 unsigned int sser : 1;
98 unsigned int pwm0 : 1;
99 unsigned int pwm1 : 1;
100 unsigned int pwm2 : 1;
101 unsigned int timer0 : 1;
102 unsigned int timer1 : 1;
103 unsigned int pio : 1;
104 unsigned int i2c0 : 1;
105 unsigned int i2c1 : 1;
106 unsigned int i2c1_sda1 : 1;
107 unsigned int i2c1_sda2 : 1;
108 unsigned int i2c1_sda3 : 1;
109 unsigned int i2c1_sen : 1;
110 unsigned int dummy1 : 8;
111} reg_pinmux_rw_hwprot;
112#define REG_RD_ADDR_pinmux_rw_hwprot 0
113#define REG_WR_ADDR_pinmux_rw_hwprot 0
114
115/* Register rw_gio_pa, scope pinmux, type rw */
116typedef struct {
117 unsigned int pa0 : 1;
118 unsigned int pa1 : 1;
119 unsigned int pa2 : 1;
120 unsigned int pa3 : 1;
121 unsigned int pa4 : 1;
122 unsigned int pa5 : 1;
123 unsigned int pa6 : 1;
124 unsigned int pa7 : 1;
125 unsigned int pa8 : 1;
126 unsigned int pa9 : 1;
127 unsigned int pa10 : 1;
128 unsigned int pa11 : 1;
129 unsigned int pa12 : 1;
130 unsigned int pa13 : 1;
131 unsigned int pa14 : 1;
132 unsigned int pa15 : 1;
133 unsigned int pa16 : 1;
134 unsigned int pa17 : 1;
135 unsigned int pa18 : 1;
136 unsigned int pa19 : 1;
137 unsigned int pa20 : 1;
138 unsigned int pa21 : 1;
139 unsigned int pa22 : 1;
140 unsigned int pa23 : 1;
141 unsigned int pa24 : 1;
142 unsigned int pa25 : 1;
143 unsigned int pa26 : 1;
144 unsigned int pa27 : 1;
145 unsigned int pa28 : 1;
146 unsigned int pa29 : 1;
147 unsigned int pa30 : 1;
148 unsigned int pa31 : 1;
149} reg_pinmux_rw_gio_pa;
150#define REG_RD_ADDR_pinmux_rw_gio_pa 4
151#define REG_WR_ADDR_pinmux_rw_gio_pa 4
152
153/* Register rw_gio_pb, scope pinmux, type rw */
154typedef struct {
155 unsigned int pb0 : 1;
156 unsigned int pb1 : 1;
157 unsigned int pb2 : 1;
158 unsigned int pb3 : 1;
159 unsigned int pb4 : 1;
160 unsigned int pb5 : 1;
161 unsigned int pb6 : 1;
162 unsigned int pb7 : 1;
163 unsigned int pb8 : 1;
164 unsigned int pb9 : 1;
165 unsigned int pb10 : 1;
166 unsigned int pb11 : 1;
167 unsigned int pb12 : 1;
168 unsigned int pb13 : 1;
169 unsigned int pb14 : 1;
170 unsigned int pb15 : 1;
171 unsigned int pb16 : 1;
172 unsigned int pb17 : 1;
173 unsigned int pb18 : 1;
174 unsigned int pb19 : 1;
175 unsigned int pb20 : 1;
176 unsigned int pb21 : 1;
177 unsigned int pb22 : 1;
178 unsigned int pb23 : 1;
179 unsigned int pb24 : 1;
180 unsigned int pb25 : 1;
181 unsigned int pb26 : 1;
182 unsigned int pb27 : 1;
183 unsigned int pb28 : 1;
184 unsigned int pb29 : 1;
185 unsigned int pb30 : 1;
186 unsigned int pb31 : 1;
187} reg_pinmux_rw_gio_pb;
188#define REG_RD_ADDR_pinmux_rw_gio_pb 8
189#define REG_WR_ADDR_pinmux_rw_gio_pb 8
190
191/* Register rw_gio_pc, scope pinmux, type rw */
192typedef struct {
193 unsigned int pc0 : 1;
194 unsigned int pc1 : 1;
195 unsigned int pc2 : 1;
196 unsigned int pc3 : 1;
197 unsigned int pc4 : 1;
198 unsigned int pc5 : 1;
199 unsigned int pc6 : 1;
200 unsigned int pc7 : 1;
201 unsigned int pc8 : 1;
202 unsigned int pc9 : 1;
203 unsigned int pc10 : 1;
204 unsigned int pc11 : 1;
205 unsigned int pc12 : 1;
206 unsigned int pc13 : 1;
207 unsigned int pc14 : 1;
208 unsigned int pc15 : 1;
209 unsigned int dummy1 : 16;
210} reg_pinmux_rw_gio_pc;
211#define REG_RD_ADDR_pinmux_rw_gio_pc 12
212#define REG_WR_ADDR_pinmux_rw_gio_pc 12
213
214/* Register rw_iop_pa, scope pinmux, type rw */
215typedef struct {
216 unsigned int pa0 : 1;
217 unsigned int pa1 : 1;
218 unsigned int pa2 : 1;
219 unsigned int pa3 : 1;
220 unsigned int pa4 : 1;
221 unsigned int pa5 : 1;
222 unsigned int pa6 : 1;
223 unsigned int pa7 : 1;
224 unsigned int pa8 : 1;
225 unsigned int pa9 : 1;
226 unsigned int pa10 : 1;
227 unsigned int pa11 : 1;
228 unsigned int pa12 : 1;
229 unsigned int pa13 : 1;
230 unsigned int pa14 : 1;
231 unsigned int pa15 : 1;
232 unsigned int pa16 : 1;
233 unsigned int pa17 : 1;
234 unsigned int pa18 : 1;
235 unsigned int pa19 : 1;
236 unsigned int pa20 : 1;
237 unsigned int pa21 : 1;
238 unsigned int pa22 : 1;
239 unsigned int pa23 : 1;
240 unsigned int pa24 : 1;
241 unsigned int pa25 : 1;
242 unsigned int pa26 : 1;
243 unsigned int pa27 : 1;
244 unsigned int pa28 : 1;
245 unsigned int pa29 : 1;
246 unsigned int pa30 : 1;
247 unsigned int pa31 : 1;
248} reg_pinmux_rw_iop_pa;
249#define REG_RD_ADDR_pinmux_rw_iop_pa 16
250#define REG_WR_ADDR_pinmux_rw_iop_pa 16
251
252/* Register rw_iop_pb, scope pinmux, type rw */
253typedef struct {
254 unsigned int pb0 : 1;
255 unsigned int pb1 : 1;
256 unsigned int pb2 : 1;
257 unsigned int pb3 : 1;
258 unsigned int pb4 : 1;
259 unsigned int pb5 : 1;
260 unsigned int pb6 : 1;
261 unsigned int pb7 : 1;
262 unsigned int dummy1 : 24;
263} reg_pinmux_rw_iop_pb;
264#define REG_RD_ADDR_pinmux_rw_iop_pb 20
265#define REG_WR_ADDR_pinmux_rw_iop_pb 20
266
267/* Register rw_iop_pio, scope pinmux, type rw */
268typedef struct {
269 unsigned int d0 : 1;
270 unsigned int d1 : 1;
271 unsigned int d2 : 1;
272 unsigned int d3 : 1;
273 unsigned int d4 : 1;
274 unsigned int d5 : 1;
275 unsigned int d6 : 1;
276 unsigned int d7 : 1;
277 unsigned int rd_n : 1;
278 unsigned int wr_n : 1;
279 unsigned int a0 : 1;
280 unsigned int a1 : 1;
281 unsigned int ce0_n : 1;
282 unsigned int ce1_n : 1;
283 unsigned int ce2_n : 1;
284 unsigned int rdy : 1;
285 unsigned int dummy1 : 16;
286} reg_pinmux_rw_iop_pio;
287#define REG_RD_ADDR_pinmux_rw_iop_pio 24
288#define REG_WR_ADDR_pinmux_rw_iop_pio 24
289
290/* Register rw_iop_usb, scope pinmux, type rw */
291typedef struct {
292 unsigned int usb0 : 1;
293 unsigned int dummy1 : 31;
294} reg_pinmux_rw_iop_usb;
295#define REG_RD_ADDR_pinmux_rw_iop_usb 28
296#define REG_WR_ADDR_pinmux_rw_iop_usb 28
297
298
299/* Constants */
300enum {
301 regk_pinmux_no = 0x00000000,
302 regk_pinmux_rw_gio_pa_default = 0x00000000,
303 regk_pinmux_rw_gio_pb_default = 0x00000000,
304 regk_pinmux_rw_gio_pc_default = 0x00000000,
305 regk_pinmux_rw_hwprot_default = 0x00000000,
306 regk_pinmux_rw_iop_pa_default = 0x00000000,
307 regk_pinmux_rw_iop_pb_default = 0x00000000,
308 regk_pinmux_rw_iop_pio_default = 0x00000000,
309 regk_pinmux_rw_iop_usb_default = 0x00000001,
310 regk_pinmux_yes = 0x00000001
311};
312#endif /* __pinmux_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/pio_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/pio_defs.h
deleted file mode 100644
index 2d8e4b4cc602..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/pio_defs.h
+++ /dev/null
@@ -1,371 +0,0 @@
1#ifndef __pio_defs_h
2#define __pio_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: pio.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile pio_defs.h pio.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope pio */
83
84/* Register rw_data, scope pio, type rw */
85typedef unsigned int reg_pio_rw_data;
86#define REG_RD_ADDR_pio_rw_data 64
87#define REG_WR_ADDR_pio_rw_data 64
88
89/* Register rw_io_access0, scope pio, type rw */
90typedef struct {
91 unsigned int data : 8;
92 unsigned int dummy1 : 24;
93} reg_pio_rw_io_access0;
94#define REG_RD_ADDR_pio_rw_io_access0 0
95#define REG_WR_ADDR_pio_rw_io_access0 0
96
97/* Register rw_io_access1, scope pio, type rw */
98typedef struct {
99 unsigned int data : 8;
100 unsigned int dummy1 : 24;
101} reg_pio_rw_io_access1;
102#define REG_RD_ADDR_pio_rw_io_access1 4
103#define REG_WR_ADDR_pio_rw_io_access1 4
104
105/* Register rw_io_access2, scope pio, type rw */
106typedef struct {
107 unsigned int data : 8;
108 unsigned int dummy1 : 24;
109} reg_pio_rw_io_access2;
110#define REG_RD_ADDR_pio_rw_io_access2 8
111#define REG_WR_ADDR_pio_rw_io_access2 8
112
113/* Register rw_io_access3, scope pio, type rw */
114typedef struct {
115 unsigned int data : 8;
116 unsigned int dummy1 : 24;
117} reg_pio_rw_io_access3;
118#define REG_RD_ADDR_pio_rw_io_access3 12
119#define REG_WR_ADDR_pio_rw_io_access3 12
120
121/* Register rw_io_access4, scope pio, type rw */
122typedef struct {
123 unsigned int data : 8;
124 unsigned int dummy1 : 24;
125} reg_pio_rw_io_access4;
126#define REG_RD_ADDR_pio_rw_io_access4 16
127#define REG_WR_ADDR_pio_rw_io_access4 16
128
129/* Register rw_io_access5, scope pio, type rw */
130typedef struct {
131 unsigned int data : 8;
132 unsigned int dummy1 : 24;
133} reg_pio_rw_io_access5;
134#define REG_RD_ADDR_pio_rw_io_access5 20
135#define REG_WR_ADDR_pio_rw_io_access5 20
136
137/* Register rw_io_access6, scope pio, type rw */
138typedef struct {
139 unsigned int data : 8;
140 unsigned int dummy1 : 24;
141} reg_pio_rw_io_access6;
142#define REG_RD_ADDR_pio_rw_io_access6 24
143#define REG_WR_ADDR_pio_rw_io_access6 24
144
145/* Register rw_io_access7, scope pio, type rw */
146typedef struct {
147 unsigned int data : 8;
148 unsigned int dummy1 : 24;
149} reg_pio_rw_io_access7;
150#define REG_RD_ADDR_pio_rw_io_access7 28
151#define REG_WR_ADDR_pio_rw_io_access7 28
152
153/* Register rw_io_access8, scope pio, type rw */
154typedef struct {
155 unsigned int data : 8;
156 unsigned int dummy1 : 24;
157} reg_pio_rw_io_access8;
158#define REG_RD_ADDR_pio_rw_io_access8 32
159#define REG_WR_ADDR_pio_rw_io_access8 32
160
161/* Register rw_io_access9, scope pio, type rw */
162typedef struct {
163 unsigned int data : 8;
164 unsigned int dummy1 : 24;
165} reg_pio_rw_io_access9;
166#define REG_RD_ADDR_pio_rw_io_access9 36
167#define REG_WR_ADDR_pio_rw_io_access9 36
168
169/* Register rw_io_access10, scope pio, type rw */
170typedef struct {
171 unsigned int data : 8;
172 unsigned int dummy1 : 24;
173} reg_pio_rw_io_access10;
174#define REG_RD_ADDR_pio_rw_io_access10 40
175#define REG_WR_ADDR_pio_rw_io_access10 40
176
177/* Register rw_io_access11, scope pio, type rw */
178typedef struct {
179 unsigned int data : 8;
180 unsigned int dummy1 : 24;
181} reg_pio_rw_io_access11;
182#define REG_RD_ADDR_pio_rw_io_access11 44
183#define REG_WR_ADDR_pio_rw_io_access11 44
184
185/* Register rw_io_access12, scope pio, type rw */
186typedef struct {
187 unsigned int data : 8;
188 unsigned int dummy1 : 24;
189} reg_pio_rw_io_access12;
190#define REG_RD_ADDR_pio_rw_io_access12 48
191#define REG_WR_ADDR_pio_rw_io_access12 48
192
193/* Register rw_io_access13, scope pio, type rw */
194typedef struct {
195 unsigned int data : 8;
196 unsigned int dummy1 : 24;
197} reg_pio_rw_io_access13;
198#define REG_RD_ADDR_pio_rw_io_access13 52
199#define REG_WR_ADDR_pio_rw_io_access13 52
200
201/* Register rw_io_access14, scope pio, type rw */
202typedef struct {
203 unsigned int data : 8;
204 unsigned int dummy1 : 24;
205} reg_pio_rw_io_access14;
206#define REG_RD_ADDR_pio_rw_io_access14 56
207#define REG_WR_ADDR_pio_rw_io_access14 56
208
209/* Register rw_io_access15, scope pio, type rw */
210typedef struct {
211 unsigned int data : 8;
212 unsigned int dummy1 : 24;
213} reg_pio_rw_io_access15;
214#define REG_RD_ADDR_pio_rw_io_access15 60
215#define REG_WR_ADDR_pio_rw_io_access15 60
216
217/* Register rw_ce0_cfg, scope pio, type rw */
218typedef struct {
219 unsigned int lw : 6;
220 unsigned int ew : 3;
221 unsigned int zw : 3;
222 unsigned int aw : 2;
223 unsigned int mode : 2;
224 unsigned int dummy1 : 16;
225} reg_pio_rw_ce0_cfg;
226#define REG_RD_ADDR_pio_rw_ce0_cfg 68
227#define REG_WR_ADDR_pio_rw_ce0_cfg 68
228
229/* Register rw_ce1_cfg, scope pio, type rw */
230typedef struct {
231 unsigned int lw : 6;
232 unsigned int ew : 3;
233 unsigned int zw : 3;
234 unsigned int aw : 2;
235 unsigned int mode : 2;
236 unsigned int dummy1 : 16;
237} reg_pio_rw_ce1_cfg;
238#define REG_RD_ADDR_pio_rw_ce1_cfg 72
239#define REG_WR_ADDR_pio_rw_ce1_cfg 72
240
241/* Register rw_ce2_cfg, scope pio, type rw */
242typedef struct {
243 unsigned int lw : 6;
244 unsigned int ew : 3;
245 unsigned int zw : 3;
246 unsigned int aw : 2;
247 unsigned int mode : 2;
248 unsigned int dummy1 : 16;
249} reg_pio_rw_ce2_cfg;
250#define REG_RD_ADDR_pio_rw_ce2_cfg 76
251#define REG_WR_ADDR_pio_rw_ce2_cfg 76
252
253/* Register rw_dout, scope pio, type rw */
254typedef struct {
255 unsigned int data : 8;
256 unsigned int rd_n : 1;
257 unsigned int wr_n : 1;
258 unsigned int a0 : 1;
259 unsigned int a1 : 1;
260 unsigned int ce0_n : 1;
261 unsigned int ce1_n : 1;
262 unsigned int ce2_n : 1;
263 unsigned int rdy : 1;
264 unsigned int dummy1 : 16;
265} reg_pio_rw_dout;
266#define REG_RD_ADDR_pio_rw_dout 80
267#define REG_WR_ADDR_pio_rw_dout 80
268
269/* Register rw_oe, scope pio, type rw */
270typedef struct {
271 unsigned int data : 8;
272 unsigned int rd_n : 1;
273 unsigned int wr_n : 1;
274 unsigned int a0 : 1;
275 unsigned int a1 : 1;
276 unsigned int ce0_n : 1;
277 unsigned int ce1_n : 1;
278 unsigned int ce2_n : 1;
279 unsigned int rdy : 1;
280 unsigned int dummy1 : 16;
281} reg_pio_rw_oe;
282#define REG_RD_ADDR_pio_rw_oe 84
283#define REG_WR_ADDR_pio_rw_oe 84
284
285/* Register rw_man_ctrl, scope pio, type rw */
286typedef struct {
287 unsigned int data : 8;
288 unsigned int rd_n : 1;
289 unsigned int wr_n : 1;
290 unsigned int a0 : 1;
291 unsigned int a1 : 1;
292 unsigned int ce0_n : 1;
293 unsigned int ce1_n : 1;
294 unsigned int ce2_n : 1;
295 unsigned int rdy : 1;
296 unsigned int dummy1 : 16;
297} reg_pio_rw_man_ctrl;
298#define REG_RD_ADDR_pio_rw_man_ctrl 88
299#define REG_WR_ADDR_pio_rw_man_ctrl 88
300
301/* Register r_din, scope pio, type r */
302typedef struct {
303 unsigned int data : 8;
304 unsigned int rd_n : 1;
305 unsigned int wr_n : 1;
306 unsigned int a0 : 1;
307 unsigned int a1 : 1;
308 unsigned int ce0_n : 1;
309 unsigned int ce1_n : 1;
310 unsigned int ce2_n : 1;
311 unsigned int rdy : 1;
312 unsigned int dummy1 : 16;
313} reg_pio_r_din;
314#define REG_RD_ADDR_pio_r_din 92
315
316/* Register r_stat, scope pio, type r */
317typedef struct {
318 unsigned int busy : 1;
319 unsigned int dummy1 : 31;
320} reg_pio_r_stat;
321#define REG_RD_ADDR_pio_r_stat 96
322
323/* Register rw_intr_mask, scope pio, type rw */
324typedef struct {
325 unsigned int rdy : 1;
326 unsigned int dummy1 : 31;
327} reg_pio_rw_intr_mask;
328#define REG_RD_ADDR_pio_rw_intr_mask 100
329#define REG_WR_ADDR_pio_rw_intr_mask 100
330
331/* Register rw_ack_intr, scope pio, type rw */
332typedef struct {
333 unsigned int rdy : 1;
334 unsigned int dummy1 : 31;
335} reg_pio_rw_ack_intr;
336#define REG_RD_ADDR_pio_rw_ack_intr 104
337#define REG_WR_ADDR_pio_rw_ack_intr 104
338
339/* Register r_intr, scope pio, type r */
340typedef struct {
341 unsigned int rdy : 1;
342 unsigned int dummy1 : 31;
343} reg_pio_r_intr;
344#define REG_RD_ADDR_pio_r_intr 108
345
346/* Register r_masked_intr, scope pio, type r */
347typedef struct {
348 unsigned int rdy : 1;
349 unsigned int dummy1 : 31;
350} reg_pio_r_masked_intr;
351#define REG_RD_ADDR_pio_r_masked_intr 112
352
353
354/* Constants */
355enum {
356 regk_pio_a2 = 0x00000003,
357 regk_pio_no = 0x00000000,
358 regk_pio_normal = 0x00000000,
359 regk_pio_rd = 0x00000001,
360 regk_pio_rw_ce0_cfg_default = 0x00000000,
361 regk_pio_rw_ce1_cfg_default = 0x00000000,
362 regk_pio_rw_ce2_cfg_default = 0x00000000,
363 regk_pio_rw_intr_mask_default = 0x00000000,
364 regk_pio_rw_man_ctrl_default = 0x00000000,
365 regk_pio_rw_oe_default = 0x00000000,
366 regk_pio_wr = 0x00000002,
367 regk_pio_wr_ce2 = 0x00000003,
368 regk_pio_yes = 0x00000001,
369 regk_pio_yes_all = 0x000000ff
370};
371#endif /* __pio_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/reg_map.h b/include/asm-cris/arch-v32/mach-a3/hwregs/reg_map.h
deleted file mode 100644
index 36e59d6e96b6..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/reg_map.h
+++ /dev/null
@@ -1,103 +0,0 @@
1#ifndef __reg_map_h
2#define __reg_map_h
3
4/*
5 * This file is autogenerated from
6 * file: reg.rmap
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -base 0xb0000000 -map marb_bar.r marb_foo.r ccd_top.r ccd_stat.r ccd_tg.r ccd_dp.r ccd.r iop_sap_in.r iop_sap_out.r iop_sw_cfg.r iop_sw_cpu.r iop_sw_mpu.r iop_sw_spu.r iop_version.r iop_crc_par.r iop_dmc_in.r iop_dmc_out.r iop_fifo_in_extra.r iop_fifo_in.r iop_fifo_out_extra.r iop_fifo_out.r iop_mc.r iop_mpu.r iop_scrc_in.r iop_scrc_out.r iop_spu.r iop_timer_grp.r iop_trigger_grp.r iop.r -outfile reg_map.h reg.rmap
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13typedef enum {
14 regi_ccd = 0xb0000000,
15 regi_ccd_top = 0xb0000000,
16 regi_ccd_dp = 0xb0000400,
17 regi_ccd_stat = 0xb0000800,
18 regi_ccd_tg = 0xb0001000,
19 regi_cfg = 0xb0002000,
20 regi_clkgen = 0xb0004000,
21 regi_ddr2_ctrl = 0xb0006000,
22 regi_dma0 = 0xb0008000,
23 regi_dma1 = 0xb000a000,
24 regi_dma11 = 0xb000c000,
25 regi_dma2 = 0xb000e000,
26 regi_dma3 = 0xb0010000,
27 regi_dma4 = 0xb0012000,
28 regi_dma5 = 0xb0014000,
29 regi_dma6 = 0xb0016000,
30 regi_dma7 = 0xb0018000,
31 regi_dma9 = 0xb001a000,
32 regi_eth = 0xb001c000,
33 regi_gio = 0xb0020000,
34 regi_h264 = 0xb0022000,
35 regi_hist = 0xb0026000,
36 regi_iop = 0xb0028000,
37 regi_iop_version = 0xb0028000,
38 regi_iop_fifo_in_extra = 0xb0028040,
39 regi_iop_fifo_out_extra = 0xb0028080,
40 regi_iop_trigger_grp0 = 0xb00280c0,
41 regi_iop_trigger_grp1 = 0xb0028100,
42 regi_iop_trigger_grp2 = 0xb0028140,
43 regi_iop_trigger_grp3 = 0xb0028180,
44 regi_iop_trigger_grp4 = 0xb00281c0,
45 regi_iop_trigger_grp5 = 0xb0028200,
46 regi_iop_trigger_grp6 = 0xb0028240,
47 regi_iop_trigger_grp7 = 0xb0028280,
48 regi_iop_crc_par = 0xb0028300,
49 regi_iop_dmc_in = 0xb0028380,
50 regi_iop_dmc_out = 0xb0028400,
51 regi_iop_fifo_in = 0xb0028480,
52 regi_iop_fifo_out = 0xb0028500,
53 regi_iop_scrc_in = 0xb0028580,
54 regi_iop_scrc_out = 0xb0028600,
55 regi_iop_timer_grp0 = 0xb0028680,
56 regi_iop_timer_grp1 = 0xb0028700,
57 regi_iop_sap_in = 0xb0028800,
58 regi_iop_sap_out = 0xb0028900,
59 regi_iop_spu = 0xb0028a00,
60 regi_iop_sw_cfg = 0xb0028b00,
61 regi_iop_sw_cpu = 0xb0028c00,
62 regi_iop_sw_mpu = 0xb0028d00,
63 regi_iop_sw_spu = 0xb0028e00,
64 regi_iop_mpu = 0xb0029000,
65 regi_irq = 0xb002a000,
66 regi_irq2 = 0xb006a000,
67 regi_jpeg = 0xb002c000,
68 regi_l2cache = 0xb0030000,
69 regi_marb_bar = 0xb0032000,
70 regi_marb_bar_bp0 = 0xb0032140,
71 regi_marb_bar_bp1 = 0xb0032180,
72 regi_marb_bar_bp2 = 0xb00321c0,
73 regi_marb_bar_bp3 = 0xb0032200,
74 regi_marb_foo = 0xb0034000,
75 regi_marb_foo_bp0 = 0xb0034280,
76 regi_marb_foo_bp1 = 0xb00342c0,
77 regi_marb_foo_bp2 = 0xb0034300,
78 regi_marb_foo_bp3 = 0xb0034340,
79 regi_pinmux = 0xb0038000,
80 regi_pio = 0xb0036000,
81 regi_sclr = 0xb003a000,
82 regi_sclr_fifo = 0xb003c000,
83 regi_ser0 = 0xb003e000,
84 regi_ser1 = 0xb0040000,
85 regi_ser2 = 0xb0042000,
86 regi_ser3 = 0xb0044000,
87 regi_ser4 = 0xb0046000,
88 regi_sser = 0xb0048000,
89 regi_strcop = 0xb004a000,
90 regi_strdma0 = 0xb004e000,
91 regi_strdma1 = 0xb0050000,
92 regi_strdma2 = 0xb0052000,
93 regi_strdma3 = 0xb0054000,
94 regi_strdma5 = 0xb0056000,
95 regi_strmux = 0xb004c000,
96 regi_timer0 = 0xb0058000,
97 regi_timer1 = 0xb005a000,
98 regi_timer2 = 0xb006e000,
99 regi_trace = 0xb005c000,
100 regi_vin = 0xb005e000,
101 regi_vout = 0xb0060000
102} reg_scope_instances;
103#endif /* __reg_map_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/strmux_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/strmux_defs.h
deleted file mode 100644
index 14f718a4ecc3..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/strmux_defs.h
+++ /dev/null
@@ -1,120 +0,0 @@
1#ifndef __strmux_defs_h
2#define __strmux_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: strmux.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile strmux_defs.h strmux.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope strmux */
83
84/* Register rw_cfg, scope strmux, type rw */
85typedef struct {
86 unsigned int dma0 : 2;
87 unsigned int dma1 : 2;
88 unsigned int dma2 : 2;
89 unsigned int dma3 : 2;
90 unsigned int dma4 : 2;
91 unsigned int dma5 : 2;
92 unsigned int dma6 : 2;
93 unsigned int dma7 : 2;
94 unsigned int dummy1 : 2;
95 unsigned int dma9 : 2;
96 unsigned int dummy2 : 2;
97 unsigned int dma11 : 2;
98 unsigned int dummy3 : 8;
99} reg_strmux_rw_cfg;
100#define REG_RD_ADDR_strmux_rw_cfg 0
101#define REG_WR_ADDR_strmux_rw_cfg 0
102
103
104/* Constants */
105enum {
106 regk_strmux_eth = 0x00000001,
107 regk_strmux_h264 = 0x00000001,
108 regk_strmux_iop = 0x00000001,
109 regk_strmux_jpeg = 0x00000001,
110 regk_strmux_off = 0x00000000,
111 regk_strmux_rw_cfg_default = 0x00000000,
112 regk_strmux_ser0 = 0x00000002,
113 regk_strmux_ser1 = 0x00000002,
114 regk_strmux_ser2 = 0x00000002,
115 regk_strmux_ser3 = 0x00000002,
116 regk_strmux_ser4 = 0x00000002,
117 regk_strmux_sser = 0x00000001,
118 regk_strmux_strcop = 0x00000001
119};
120#endif /* __strmux_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/hwregs/timer_defs.h b/include/asm-cris/arch-v32/mach-a3/hwregs/timer_defs.h
deleted file mode 100644
index 2c33e097d60a..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/hwregs/timer_defs.h
+++ /dev/null
@@ -1,265 +0,0 @@
1#ifndef __timer_defs_h
2#define __timer_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: timer.r
7 *
8 * by ../../../tools/rdesc/bin/rdes2c -outfile timer_defs.h timer.r
9 * Any changes here will be lost.
10 *
11 * -*- buffer-read-only: t -*-
12 */
13/* Main access macros */
14#ifndef REG_RD
15#define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
18#endif
19
20#ifndef REG_WR
21#define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
24#endif
25
26#ifndef REG_RD_VECT
27#define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
31#endif
32
33#ifndef REG_WR_VECT
34#define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
38#endif
39
40#ifndef REG_RD_INT
41#define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
43#endif
44
45#ifndef REG_WR_INT
46#define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
48#endif
49
50#ifndef REG_RD_INT_VECT
51#define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
54#endif
55
56#ifndef REG_WR_INT_VECT
57#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
60#endif
61
62#ifndef REG_TYPE_CONV
63#define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
65#endif
66
67#ifndef reg_page_size
68#define reg_page_size 8192
69#endif
70
71#ifndef REG_ADDR
72#define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
74#endif
75
76#ifndef REG_ADDR_VECT
77#define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
80#endif
81
82/* C-code for register scope timer */
83
84/* Register rw_tmr0_div, scope timer, type rw */
85typedef unsigned int reg_timer_rw_tmr0_div;
86#define REG_RD_ADDR_timer_rw_tmr0_div 0
87#define REG_WR_ADDR_timer_rw_tmr0_div 0
88
89/* Register r_tmr0_data, scope timer, type r */
90typedef unsigned int reg_timer_r_tmr0_data;
91#define REG_RD_ADDR_timer_r_tmr0_data 4
92
93/* Register rw_tmr0_ctrl, scope timer, type rw */
94typedef struct {
95 unsigned int op : 2;
96 unsigned int freq : 3;
97 unsigned int dummy1 : 27;
98} reg_timer_rw_tmr0_ctrl;
99#define REG_RD_ADDR_timer_rw_tmr0_ctrl 8
100#define REG_WR_ADDR_timer_rw_tmr0_ctrl 8
101
102/* Register rw_tmr1_div, scope timer, type rw */
103typedef unsigned int reg_timer_rw_tmr1_div;
104#define REG_RD_ADDR_timer_rw_tmr1_div 16
105#define REG_WR_ADDR_timer_rw_tmr1_div 16
106
107/* Register r_tmr1_data, scope timer, type r */
108typedef unsigned int reg_timer_r_tmr1_data;
109#define REG_RD_ADDR_timer_r_tmr1_data 20
110
111/* Register rw_tmr1_ctrl, scope timer, type rw */
112typedef struct {
113 unsigned int op : 2;
114 unsigned int freq : 3;
115 unsigned int dummy1 : 27;
116} reg_timer_rw_tmr1_ctrl;
117#define REG_RD_ADDR_timer_rw_tmr1_ctrl 24
118#define REG_WR_ADDR_timer_rw_tmr1_ctrl 24
119
120/* Register rs_cnt_data, scope timer, type rs */
121typedef struct {
122 unsigned int tmr : 24;
123 unsigned int cnt : 8;
124} reg_timer_rs_cnt_data;
125#define REG_RD_ADDR_timer_rs_cnt_data 32
126
127/* Register r_cnt_data, scope timer, type r */
128typedef struct {
129 unsigned int tmr : 24;
130 unsigned int cnt : 8;
131} reg_timer_r_cnt_data;
132#define REG_RD_ADDR_timer_r_cnt_data 36
133
134/* Register rw_cnt_cfg, scope timer, type rw */
135typedef struct {
136 unsigned int clk : 2;
137 unsigned int dummy1 : 30;
138} reg_timer_rw_cnt_cfg;
139#define REG_RD_ADDR_timer_rw_cnt_cfg 40
140#define REG_WR_ADDR_timer_rw_cnt_cfg 40
141
142/* Register rw_trig, scope timer, type rw */
143typedef unsigned int reg_timer_rw_trig;
144#define REG_RD_ADDR_timer_rw_trig 48
145#define REG_WR_ADDR_timer_rw_trig 48
146
147/* Register rw_trig_cfg, scope timer, type rw */
148typedef struct {
149 unsigned int tmr : 2;
150 unsigned int dummy1 : 30;
151} reg_timer_rw_trig_cfg;
152#define REG_RD_ADDR_timer_rw_trig_cfg 52
153#define REG_WR_ADDR_timer_rw_trig_cfg 52
154
155/* Register r_time, scope timer, type r */
156typedef unsigned int reg_timer_r_time;
157#define REG_RD_ADDR_timer_r_time 56
158
159/* Register rw_out, scope timer, type rw */
160typedef struct {
161 unsigned int tmr : 2;
162 unsigned int dummy1 : 30;
163} reg_timer_rw_out;
164#define REG_RD_ADDR_timer_rw_out 60
165#define REG_WR_ADDR_timer_rw_out 60
166
167/* Register rw_wd_ctrl, scope timer, type rw */
168typedef struct {
169 unsigned int cnt : 8;
170 unsigned int cmd : 1;
171 unsigned int key : 7;
172 unsigned int dummy1 : 16;
173} reg_timer_rw_wd_ctrl;
174#define REG_RD_ADDR_timer_rw_wd_ctrl 64
175#define REG_WR_ADDR_timer_rw_wd_ctrl 64
176
177/* Register r_wd_stat, scope timer, type r */
178typedef struct {
179 unsigned int cnt : 8;
180 unsigned int cmd : 1;
181 unsigned int dummy1 : 23;
182} reg_timer_r_wd_stat;
183#define REG_RD_ADDR_timer_r_wd_stat 68
184
185/* Register rw_intr_mask, scope timer, type rw */
186typedef struct {
187 unsigned int tmr0 : 1;
188 unsigned int tmr1 : 1;
189 unsigned int cnt : 1;
190 unsigned int trig : 1;
191 unsigned int dummy1 : 28;
192} reg_timer_rw_intr_mask;
193#define REG_RD_ADDR_timer_rw_intr_mask 72
194#define REG_WR_ADDR_timer_rw_intr_mask 72
195
196/* Register rw_ack_intr, scope timer, type rw */
197typedef struct {
198 unsigned int tmr0 : 1;
199 unsigned int tmr1 : 1;
200 unsigned int cnt : 1;
201 unsigned int trig : 1;
202 unsigned int dummy1 : 28;
203} reg_timer_rw_ack_intr;
204#define REG_RD_ADDR_timer_rw_ack_intr 76
205#define REG_WR_ADDR_timer_rw_ack_intr 76
206
207/* Register r_intr, scope timer, type r */
208typedef struct {
209 unsigned int tmr0 : 1;
210 unsigned int tmr1 : 1;
211 unsigned int cnt : 1;
212 unsigned int trig : 1;
213 unsigned int dummy1 : 28;
214} reg_timer_r_intr;
215#define REG_RD_ADDR_timer_r_intr 80
216
217/* Register r_masked_intr, scope timer, type r */
218typedef struct {
219 unsigned int tmr0 : 1;
220 unsigned int tmr1 : 1;
221 unsigned int cnt : 1;
222 unsigned int trig : 1;
223 unsigned int dummy1 : 28;
224} reg_timer_r_masked_intr;
225#define REG_RD_ADDR_timer_r_masked_intr 84
226
227/* Register rw_test, scope timer, type rw */
228typedef struct {
229 unsigned int dis : 1;
230 unsigned int en : 1;
231 unsigned int dummy1 : 30;
232} reg_timer_rw_test;
233#define REG_RD_ADDR_timer_rw_test 88
234#define REG_WR_ADDR_timer_rw_test 88
235
236
237/* Constants */
238enum {
239 regk_timer_ext = 0x00000001,
240 regk_timer_f100 = 0x00000007,
241 regk_timer_f29_493 = 0x00000004,
242 regk_timer_f32 = 0x00000005,
243 regk_timer_f32_768 = 0x00000006,
244 regk_timer_f90 = 0x00000003,
245 regk_timer_hold = 0x00000001,
246 regk_timer_ld = 0x00000000,
247 regk_timer_no = 0x00000000,
248 regk_timer_off = 0x00000000,
249 regk_timer_run = 0x00000002,
250 regk_timer_rw_cnt_cfg_default = 0x00000000,
251 regk_timer_rw_intr_mask_default = 0x00000000,
252 regk_timer_rw_out_default = 0x00000000,
253 regk_timer_rw_test_default = 0x00000000,
254 regk_timer_rw_tmr0_ctrl_default = 0x00000000,
255 regk_timer_rw_tmr1_ctrl_default = 0x00000000,
256 regk_timer_rw_trig_cfg_default = 0x00000000,
257 regk_timer_start = 0x00000001,
258 regk_timer_stop = 0x00000000,
259 regk_timer_time = 0x00000001,
260 regk_timer_tmr0 = 0x00000002,
261 regk_timer_tmr1 = 0x00000003,
262 regk_timer_vclk = 0x00000002,
263 regk_timer_yes = 0x00000001
264};
265#endif /* __timer_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-a3/memmap.h b/include/asm-cris/arch-v32/mach-a3/memmap.h
deleted file mode 100644
index 7e15c9eb4e49..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/memmap.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef _ASM_ARCH_MEMMAP_H
2#define _ASM_ARCH_MEMMAP_H
3
4#define MEM_INTMEM_START (0x38000000)
5#define MEM_INTMEM_SIZE (0x00018000)
6#define MEM_DRAM_START (0x40000000)
7
8#define MEM_NON_CACHEABLE (0x80000000)
9
10#endif
diff --git a/include/asm-cris/arch-v32/mach-a3/pinmux.h b/include/asm-cris/arch-v32/mach-a3/pinmux.h
deleted file mode 100644
index db42a7254584..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/pinmux.h
+++ /dev/null
@@ -1,45 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PINMUX_H
2#define _ASM_CRIS_ARCH_PINMUX_H
3
4#define PORT_A 0
5#define PORT_B 1
6#define PORT_C 2
7
8enum pin_mode {
9 pinmux_none = 0,
10 pinmux_fixed,
11 pinmux_gpio,
12 pinmux_iop
13};
14
15enum fixed_function {
16 pinmux_eth,
17 pinmux_geth,
18 pinmux_tg_ccd,
19 pinmux_tg_cmos,
20 pinmux_vout,
21 pinmux_ser1,
22 pinmux_ser2,
23 pinmux_ser3,
24 pinmux_ser4,
25 pinmux_sser,
26 pinmux_pio,
27 pinmux_pwm0,
28 pinmux_pwm1,
29 pinmux_pwm2,
30 pinmux_i2c0,
31 pinmux_i2c1,
32 pinmux_i2c1_3wire,
33 pinmux_i2c1_sda1,
34 pinmux_i2c1_sda2,
35 pinmux_i2c1_sda3,
36};
37
38int crisv32_pinmux_init(void);
39int crisv32_pinmux_alloc(int port, int first_pin, int last_pin, enum pin_mode);
40int crisv32_pinmux_alloc_fixed(enum fixed_function function);
41int crisv32_pinmux_dealloc(int port, int first_pin, int last_pin);
42int crisv32_pinmux_dealloc_fixed(enum fixed_function function);
43void crisv32_pinmux_dump(void);
44
45#endif
diff --git a/include/asm-cris/arch-v32/mach-a3/startup.inc b/include/asm-cris/arch-v32/mach-a3/startup.inc
deleted file mode 100644
index 2f23e5e16f4a..000000000000
--- a/include/asm-cris/arch-v32/mach-a3/startup.inc
+++ /dev/null
@@ -1,60 +0,0 @@
1#include <hwregs/asm/reg_map_asm.h>
2#include <hwregs/asm/gio_defs_asm.h>
3#include <hwregs/asm/pio_defs_asm.h>
4#include <hwregs/asm/clkgen_defs_asm.h>
5#include <hwregs/asm/pinmux_defs_asm.h>
6
7 .macro GIO_INIT
8 move.d CONFIG_ETRAX_DEF_GIO_PA_OUT, $r0
9 move.d REG_ADDR(gio, regi_gio, rw_pa_dout), $r1
10 move.d $r0, [$r1]
11
12 move.d CONFIG_ETRAX_DEF_GIO_PA_OE, $r0
13 move.d REG_ADDR(gio, regi_gio, rw_pa_oe), $r1
14 move.d $r0, [$r1]
15
16 move.d CONFIG_ETRAX_DEF_GIO_PB_OUT, $r0
17 move.d REG_ADDR(gio, regi_gio, rw_pb_dout), $r1
18 move.d $r0, [$r1]
19
20 move.d CONFIG_ETRAX_DEF_GIO_PB_OE, $r0
21 move.d REG_ADDR(gio, regi_gio, rw_pb_oe), $r1
22 move.d $r0, [$r1]
23
24 move.d CONFIG_ETRAX_DEF_GIO_PC_OUT, $r0
25 move.d REG_ADDR(gio, regi_gio, rw_pc_dout), $r1
26 move.d $r0, [$r1]
27
28 move.d CONFIG_ETRAX_DEF_GIO_PC_OE, $r0
29 move.d REG_ADDR(gio, regi_gio, rw_pc_oe), $r1
30 move.d $r0, [$r1]
31
32 move.d 0xFFFFFFFF, $r0
33 move.d REG_ADDR(pinmux, regi_pinmux, rw_gio_pa), $r1
34 move.d $r0, [$r1]
35 move.d REG_ADDR(pinmux, regi_pinmux, rw_gio_pb), $r1
36 move.d $r0, [$r1]
37 move.d REG_ADDR(pinmux, regi_pinmux, rw_gio_pc), $r1
38 move.d $r0, [$r1]
39 .endm
40
41 .macro START_CLOCKS
42 move.d REG_ADDR(clkgen, regi_clkgen, rw_clk_ctrl), $r1
43 move.d [$r1], $r0
44 or.d REG_STATE(clkgen, rw_clk_ctrl, cpu, yes) | \
45 REG_STATE(clkgen, rw_clk_ctrl, ddr2, yes) | \
46 REG_STATE(clkgen, rw_clk_ctrl, memarb_bar_ddr, yes), $r0
47 move.d $r0, [$r1]
48 .endm
49
50 .macro SETUP_WAIT_STATES
51 move.d REG_ADDR(pio, regi_pio, rw_ce0_cfg), $r0
52 move.d CONFIG_ETRAX_PIO_CE0_CFG, $r1
53 move.d $r1, [$r0]
54 move.d REG_ADDR(pio, regi_pio, rw_ce1_cfg), $r0
55 move.d CONFIG_ETRAX_PIO_CE1_CFG, $r1
56 move.d $r1, [$r0]
57 move.d REG_ADDR(pio, regi_pio, rw_ce2_cfg), $r0
58 move.d CONFIG_ETRAX_PIO_CE2_CFG, $r1
59 move.d $r1, [$r0]
60 .endm
diff --git a/include/asm-cris/arch-v32/mach-fs/arbiter.h b/include/asm-cris/arch-v32/mach-fs/arbiter.h
deleted file mode 100644
index a2e0ec8faa7d..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/arbiter.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_ARBITER_H
2#define _ASM_CRIS_ARCH_ARBITER_H
3
4#define EXT_REGION 0
5#define INT_REGION 1
6
7typedef void (watch_callback)(void);
8
9enum {
10 arbiter_all_dmas = 0x3ff,
11 arbiter_cpu = 0xc00,
12 arbiter_all_clients = 0x3fff
13};
14
15enum {
16 arbiter_all_read = 0x55,
17 arbiter_all_write = 0xaa,
18 arbiter_all_accesses = 0xff
19};
20
21int crisv32_arbiter_allocate_bandwidth(int client, int region,
22 unsigned long bandwidth);
23int crisv32_arbiter_watch(unsigned long start, unsigned long size,
24 unsigned long clients, unsigned long accesses,
25 watch_callback * cb);
26int crisv32_arbiter_unwatch(int id);
27
28#endif
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/bif_core_defs_asm.h b/include/asm-cris/arch-v32/mach-fs/hwregs/asm/bif_core_defs_asm.h
deleted file mode 100644
index 0a409c92837e..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/bif_core_defs_asm.h
+++ /dev/null
@@ -1,319 +0,0 @@
1#ifndef __bif_core_defs_asm_h
2#define __bif_core_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_core_regs.r
7 * id: bif_core_regs.r,v 1.17 2005/02/04 13:28:22 np Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/bif_core_defs_asm.h ../../inst/bif/rtl/bif_core_regs.r
11 * id: $Id: bif_core_defs_asm.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_grp1_cfg, scope bif_core, type rw */
57#define reg_bif_core_rw_grp1_cfg___lw___lsb 0
58#define reg_bif_core_rw_grp1_cfg___lw___width 6
59#define reg_bif_core_rw_grp1_cfg___ew___lsb 6
60#define reg_bif_core_rw_grp1_cfg___ew___width 3
61#define reg_bif_core_rw_grp1_cfg___zw___lsb 9
62#define reg_bif_core_rw_grp1_cfg___zw___width 3
63#define reg_bif_core_rw_grp1_cfg___aw___lsb 12
64#define reg_bif_core_rw_grp1_cfg___aw___width 2
65#define reg_bif_core_rw_grp1_cfg___dw___lsb 14
66#define reg_bif_core_rw_grp1_cfg___dw___width 2
67#define reg_bif_core_rw_grp1_cfg___ewb___lsb 16
68#define reg_bif_core_rw_grp1_cfg___ewb___width 2
69#define reg_bif_core_rw_grp1_cfg___bw___lsb 18
70#define reg_bif_core_rw_grp1_cfg___bw___width 1
71#define reg_bif_core_rw_grp1_cfg___bw___bit 18
72#define reg_bif_core_rw_grp1_cfg___wr_extend___lsb 19
73#define reg_bif_core_rw_grp1_cfg___wr_extend___width 1
74#define reg_bif_core_rw_grp1_cfg___wr_extend___bit 19
75#define reg_bif_core_rw_grp1_cfg___erc_en___lsb 20
76#define reg_bif_core_rw_grp1_cfg___erc_en___width 1
77#define reg_bif_core_rw_grp1_cfg___erc_en___bit 20
78#define reg_bif_core_rw_grp1_cfg___mode___lsb 21
79#define reg_bif_core_rw_grp1_cfg___mode___width 1
80#define reg_bif_core_rw_grp1_cfg___mode___bit 21
81#define reg_bif_core_rw_grp1_cfg_offset 0
82
83/* Register rw_grp2_cfg, scope bif_core, type rw */
84#define reg_bif_core_rw_grp2_cfg___lw___lsb 0
85#define reg_bif_core_rw_grp2_cfg___lw___width 6
86#define reg_bif_core_rw_grp2_cfg___ew___lsb 6
87#define reg_bif_core_rw_grp2_cfg___ew___width 3
88#define reg_bif_core_rw_grp2_cfg___zw___lsb 9
89#define reg_bif_core_rw_grp2_cfg___zw___width 3
90#define reg_bif_core_rw_grp2_cfg___aw___lsb 12
91#define reg_bif_core_rw_grp2_cfg___aw___width 2
92#define reg_bif_core_rw_grp2_cfg___dw___lsb 14
93#define reg_bif_core_rw_grp2_cfg___dw___width 2
94#define reg_bif_core_rw_grp2_cfg___ewb___lsb 16
95#define reg_bif_core_rw_grp2_cfg___ewb___width 2
96#define reg_bif_core_rw_grp2_cfg___bw___lsb 18
97#define reg_bif_core_rw_grp2_cfg___bw___width 1
98#define reg_bif_core_rw_grp2_cfg___bw___bit 18
99#define reg_bif_core_rw_grp2_cfg___wr_extend___lsb 19
100#define reg_bif_core_rw_grp2_cfg___wr_extend___width 1
101#define reg_bif_core_rw_grp2_cfg___wr_extend___bit 19
102#define reg_bif_core_rw_grp2_cfg___erc_en___lsb 20
103#define reg_bif_core_rw_grp2_cfg___erc_en___width 1
104#define reg_bif_core_rw_grp2_cfg___erc_en___bit 20
105#define reg_bif_core_rw_grp2_cfg___mode___lsb 21
106#define reg_bif_core_rw_grp2_cfg___mode___width 1
107#define reg_bif_core_rw_grp2_cfg___mode___bit 21
108#define reg_bif_core_rw_grp2_cfg_offset 4
109
110/* Register rw_grp3_cfg, scope bif_core, type rw */
111#define reg_bif_core_rw_grp3_cfg___lw___lsb 0
112#define reg_bif_core_rw_grp3_cfg___lw___width 6
113#define reg_bif_core_rw_grp3_cfg___ew___lsb 6
114#define reg_bif_core_rw_grp3_cfg___ew___width 3
115#define reg_bif_core_rw_grp3_cfg___zw___lsb 9
116#define reg_bif_core_rw_grp3_cfg___zw___width 3
117#define reg_bif_core_rw_grp3_cfg___aw___lsb 12
118#define reg_bif_core_rw_grp3_cfg___aw___width 2
119#define reg_bif_core_rw_grp3_cfg___dw___lsb 14
120#define reg_bif_core_rw_grp3_cfg___dw___width 2
121#define reg_bif_core_rw_grp3_cfg___ewb___lsb 16
122#define reg_bif_core_rw_grp3_cfg___ewb___width 2
123#define reg_bif_core_rw_grp3_cfg___bw___lsb 18
124#define reg_bif_core_rw_grp3_cfg___bw___width 1
125#define reg_bif_core_rw_grp3_cfg___bw___bit 18
126#define reg_bif_core_rw_grp3_cfg___wr_extend___lsb 19
127#define reg_bif_core_rw_grp3_cfg___wr_extend___width 1
128#define reg_bif_core_rw_grp3_cfg___wr_extend___bit 19
129#define reg_bif_core_rw_grp3_cfg___erc_en___lsb 20
130#define reg_bif_core_rw_grp3_cfg___erc_en___width 1
131#define reg_bif_core_rw_grp3_cfg___erc_en___bit 20
132#define reg_bif_core_rw_grp3_cfg___mode___lsb 21
133#define reg_bif_core_rw_grp3_cfg___mode___width 1
134#define reg_bif_core_rw_grp3_cfg___mode___bit 21
135#define reg_bif_core_rw_grp3_cfg___gated_csp0___lsb 24
136#define reg_bif_core_rw_grp3_cfg___gated_csp0___width 2
137#define reg_bif_core_rw_grp3_cfg___gated_csp1___lsb 26
138#define reg_bif_core_rw_grp3_cfg___gated_csp1___width 2
139#define reg_bif_core_rw_grp3_cfg___gated_csp2___lsb 28
140#define reg_bif_core_rw_grp3_cfg___gated_csp2___width 2
141#define reg_bif_core_rw_grp3_cfg___gated_csp3___lsb 30
142#define reg_bif_core_rw_grp3_cfg___gated_csp3___width 2
143#define reg_bif_core_rw_grp3_cfg_offset 8
144
145/* Register rw_grp4_cfg, scope bif_core, type rw */
146#define reg_bif_core_rw_grp4_cfg___lw___lsb 0
147#define reg_bif_core_rw_grp4_cfg___lw___width 6
148#define reg_bif_core_rw_grp4_cfg___ew___lsb 6
149#define reg_bif_core_rw_grp4_cfg___ew___width 3
150#define reg_bif_core_rw_grp4_cfg___zw___lsb 9
151#define reg_bif_core_rw_grp4_cfg___zw___width 3
152#define reg_bif_core_rw_grp4_cfg___aw___lsb 12
153#define reg_bif_core_rw_grp4_cfg___aw___width 2
154#define reg_bif_core_rw_grp4_cfg___dw___lsb 14
155#define reg_bif_core_rw_grp4_cfg___dw___width 2
156#define reg_bif_core_rw_grp4_cfg___ewb___lsb 16
157#define reg_bif_core_rw_grp4_cfg___ewb___width 2
158#define reg_bif_core_rw_grp4_cfg___bw___lsb 18
159#define reg_bif_core_rw_grp4_cfg___bw___width 1
160#define reg_bif_core_rw_grp4_cfg___bw___bit 18
161#define reg_bif_core_rw_grp4_cfg___wr_extend___lsb 19
162#define reg_bif_core_rw_grp4_cfg___wr_extend___width 1
163#define reg_bif_core_rw_grp4_cfg___wr_extend___bit 19
164#define reg_bif_core_rw_grp4_cfg___erc_en___lsb 20
165#define reg_bif_core_rw_grp4_cfg___erc_en___width 1
166#define reg_bif_core_rw_grp4_cfg___erc_en___bit 20
167#define reg_bif_core_rw_grp4_cfg___mode___lsb 21
168#define reg_bif_core_rw_grp4_cfg___mode___width 1
169#define reg_bif_core_rw_grp4_cfg___mode___bit 21
170#define reg_bif_core_rw_grp4_cfg___gated_csp4___lsb 26
171#define reg_bif_core_rw_grp4_cfg___gated_csp4___width 2
172#define reg_bif_core_rw_grp4_cfg___gated_csp5___lsb 28
173#define reg_bif_core_rw_grp4_cfg___gated_csp5___width 2
174#define reg_bif_core_rw_grp4_cfg___gated_csp6___lsb 30
175#define reg_bif_core_rw_grp4_cfg___gated_csp6___width 2
176#define reg_bif_core_rw_grp4_cfg_offset 12
177
178/* Register rw_sdram_cfg_grp0, scope bif_core, type rw */
179#define reg_bif_core_rw_sdram_cfg_grp0___bank_sel___lsb 0
180#define reg_bif_core_rw_sdram_cfg_grp0___bank_sel___width 5
181#define reg_bif_core_rw_sdram_cfg_grp0___ca___lsb 5
182#define reg_bif_core_rw_sdram_cfg_grp0___ca___width 3
183#define reg_bif_core_rw_sdram_cfg_grp0___type___lsb 8
184#define reg_bif_core_rw_sdram_cfg_grp0___type___width 1
185#define reg_bif_core_rw_sdram_cfg_grp0___type___bit 8
186#define reg_bif_core_rw_sdram_cfg_grp0___bw___lsb 9
187#define reg_bif_core_rw_sdram_cfg_grp0___bw___width 1
188#define reg_bif_core_rw_sdram_cfg_grp0___bw___bit 9
189#define reg_bif_core_rw_sdram_cfg_grp0___sh___lsb 10
190#define reg_bif_core_rw_sdram_cfg_grp0___sh___width 3
191#define reg_bif_core_rw_sdram_cfg_grp0___wmm___lsb 13
192#define reg_bif_core_rw_sdram_cfg_grp0___wmm___width 1
193#define reg_bif_core_rw_sdram_cfg_grp0___wmm___bit 13
194#define reg_bif_core_rw_sdram_cfg_grp0___sh16___lsb 14
195#define reg_bif_core_rw_sdram_cfg_grp0___sh16___width 1
196#define reg_bif_core_rw_sdram_cfg_grp0___sh16___bit 14
197#define reg_bif_core_rw_sdram_cfg_grp0___grp_sel___lsb 15
198#define reg_bif_core_rw_sdram_cfg_grp0___grp_sel___width 5
199#define reg_bif_core_rw_sdram_cfg_grp0_offset 16
200
201/* Register rw_sdram_cfg_grp1, scope bif_core, type rw */
202#define reg_bif_core_rw_sdram_cfg_grp1___bank_sel___lsb 0
203#define reg_bif_core_rw_sdram_cfg_grp1___bank_sel___width 5
204#define reg_bif_core_rw_sdram_cfg_grp1___ca___lsb 5
205#define reg_bif_core_rw_sdram_cfg_grp1___ca___width 3
206#define reg_bif_core_rw_sdram_cfg_grp1___type___lsb 8
207#define reg_bif_core_rw_sdram_cfg_grp1___type___width 1
208#define reg_bif_core_rw_sdram_cfg_grp1___type___bit 8
209#define reg_bif_core_rw_sdram_cfg_grp1___bw___lsb 9
210#define reg_bif_core_rw_sdram_cfg_grp1___bw___width 1
211#define reg_bif_core_rw_sdram_cfg_grp1___bw___bit 9
212#define reg_bif_core_rw_sdram_cfg_grp1___sh___lsb 10
213#define reg_bif_core_rw_sdram_cfg_grp1___sh___width 3
214#define reg_bif_core_rw_sdram_cfg_grp1___wmm___lsb 13
215#define reg_bif_core_rw_sdram_cfg_grp1___wmm___width 1
216#define reg_bif_core_rw_sdram_cfg_grp1___wmm___bit 13
217#define reg_bif_core_rw_sdram_cfg_grp1___sh16___lsb 14
218#define reg_bif_core_rw_sdram_cfg_grp1___sh16___width 1
219#define reg_bif_core_rw_sdram_cfg_grp1___sh16___bit 14
220#define reg_bif_core_rw_sdram_cfg_grp1_offset 20
221
222/* Register rw_sdram_timing, scope bif_core, type rw */
223#define reg_bif_core_rw_sdram_timing___cl___lsb 0
224#define reg_bif_core_rw_sdram_timing___cl___width 3
225#define reg_bif_core_rw_sdram_timing___rcd___lsb 3
226#define reg_bif_core_rw_sdram_timing___rcd___width 3
227#define reg_bif_core_rw_sdram_timing___rp___lsb 6
228#define reg_bif_core_rw_sdram_timing___rp___width 3
229#define reg_bif_core_rw_sdram_timing___rc___lsb 9
230#define reg_bif_core_rw_sdram_timing___rc___width 2
231#define reg_bif_core_rw_sdram_timing___dpl___lsb 11
232#define reg_bif_core_rw_sdram_timing___dpl___width 2
233#define reg_bif_core_rw_sdram_timing___pde___lsb 13
234#define reg_bif_core_rw_sdram_timing___pde___width 1
235#define reg_bif_core_rw_sdram_timing___pde___bit 13
236#define reg_bif_core_rw_sdram_timing___ref___lsb 14
237#define reg_bif_core_rw_sdram_timing___ref___width 2
238#define reg_bif_core_rw_sdram_timing___cpd___lsb 16
239#define reg_bif_core_rw_sdram_timing___cpd___width 1
240#define reg_bif_core_rw_sdram_timing___cpd___bit 16
241#define reg_bif_core_rw_sdram_timing___sdcke___lsb 17
242#define reg_bif_core_rw_sdram_timing___sdcke___width 1
243#define reg_bif_core_rw_sdram_timing___sdcke___bit 17
244#define reg_bif_core_rw_sdram_timing___sdclk___lsb 18
245#define reg_bif_core_rw_sdram_timing___sdclk___width 1
246#define reg_bif_core_rw_sdram_timing___sdclk___bit 18
247#define reg_bif_core_rw_sdram_timing_offset 24
248
249/* Register rw_sdram_cmd, scope bif_core, type rw */
250#define reg_bif_core_rw_sdram_cmd___cmd___lsb 0
251#define reg_bif_core_rw_sdram_cmd___cmd___width 3
252#define reg_bif_core_rw_sdram_cmd___mrs_data___lsb 3
253#define reg_bif_core_rw_sdram_cmd___mrs_data___width 15
254#define reg_bif_core_rw_sdram_cmd_offset 28
255
256/* Register rs_sdram_ref_stat, scope bif_core, type rs */
257#define reg_bif_core_rs_sdram_ref_stat___ok___lsb 0
258#define reg_bif_core_rs_sdram_ref_stat___ok___width 1
259#define reg_bif_core_rs_sdram_ref_stat___ok___bit 0
260#define reg_bif_core_rs_sdram_ref_stat_offset 32
261
262/* Register r_sdram_ref_stat, scope bif_core, type r */
263#define reg_bif_core_r_sdram_ref_stat___ok___lsb 0
264#define reg_bif_core_r_sdram_ref_stat___ok___width 1
265#define reg_bif_core_r_sdram_ref_stat___ok___bit 0
266#define reg_bif_core_r_sdram_ref_stat_offset 36
267
268
269/* Constants */
270#define regk_bif_core_bank2 0x00000000
271#define regk_bif_core_bank4 0x00000001
272#define regk_bif_core_bit10 0x0000000a
273#define regk_bif_core_bit11 0x0000000b
274#define regk_bif_core_bit12 0x0000000c
275#define regk_bif_core_bit13 0x0000000d
276#define regk_bif_core_bit14 0x0000000e
277#define regk_bif_core_bit15 0x0000000f
278#define regk_bif_core_bit16 0x00000010
279#define regk_bif_core_bit17 0x00000011
280#define regk_bif_core_bit18 0x00000012
281#define regk_bif_core_bit19 0x00000013
282#define regk_bif_core_bit20 0x00000014
283#define regk_bif_core_bit21 0x00000015
284#define regk_bif_core_bit22 0x00000016
285#define regk_bif_core_bit23 0x00000017
286#define regk_bif_core_bit24 0x00000018
287#define regk_bif_core_bit25 0x00000019
288#define regk_bif_core_bit26 0x0000001a
289#define regk_bif_core_bit27 0x0000001b
290#define regk_bif_core_bit28 0x0000001c
291#define regk_bif_core_bit29 0x0000001d
292#define regk_bif_core_bit9 0x00000009
293#define regk_bif_core_bw16 0x00000001
294#define regk_bif_core_bw32 0x00000000
295#define regk_bif_core_bwe 0x00000000
296#define regk_bif_core_cwe 0x00000001
297#define regk_bif_core_e15us 0x00000001
298#define regk_bif_core_e7800ns 0x00000002
299#define regk_bif_core_grp0 0x00000000
300#define regk_bif_core_grp1 0x00000001
301#define regk_bif_core_mrs 0x00000003
302#define regk_bif_core_no 0x00000000
303#define regk_bif_core_none 0x00000000
304#define regk_bif_core_nop 0x00000000
305#define regk_bif_core_off 0x00000000
306#define regk_bif_core_pre 0x00000002
307#define regk_bif_core_r_sdram_ref_stat_default 0x00000001
308#define regk_bif_core_rd 0x00000002
309#define regk_bif_core_ref 0x00000001
310#define regk_bif_core_rs_sdram_ref_stat_default 0x00000001
311#define regk_bif_core_rw_grp1_cfg_default 0x000006cf
312#define regk_bif_core_rw_grp2_cfg_default 0x000006cf
313#define regk_bif_core_rw_grp3_cfg_default 0x000006cf
314#define regk_bif_core_rw_grp4_cfg_default 0x000006cf
315#define regk_bif_core_rw_sdram_cfg_grp1_default 0x00000000
316#define regk_bif_core_slf 0x00000004
317#define regk_bif_core_wr 0x00000001
318#define regk_bif_core_yes 0x00000001
319#endif /* __bif_core_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/config_defs_asm.h b/include/asm-cris/arch-v32/mach-fs/hwregs/asm/config_defs_asm.h
deleted file mode 100644
index a9908dfc2937..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/config_defs_asm.h
+++ /dev/null
@@ -1,131 +0,0 @@
1#ifndef __config_defs_asm_h
2#define __config_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../rtl/config_regs.r
7 * id: config_regs.r,v 1.23 2004/03/04 11:34:42 mikaeln Exp
8 * last modfied: Thu Mar 4 12:34:39 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/config_defs_asm.h ../../rtl/config_regs.r
11 * id: $Id: config_defs_asm.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register r_bootsel, scope config, type r */
57#define reg_config_r_bootsel___boot_mode___lsb 0
58#define reg_config_r_bootsel___boot_mode___width 3
59#define reg_config_r_bootsel___full_duplex___lsb 3
60#define reg_config_r_bootsel___full_duplex___width 1
61#define reg_config_r_bootsel___full_duplex___bit 3
62#define reg_config_r_bootsel___user___lsb 4
63#define reg_config_r_bootsel___user___width 1
64#define reg_config_r_bootsel___user___bit 4
65#define reg_config_r_bootsel___pll___lsb 5
66#define reg_config_r_bootsel___pll___width 1
67#define reg_config_r_bootsel___pll___bit 5
68#define reg_config_r_bootsel___flash_bw___lsb 6
69#define reg_config_r_bootsel___flash_bw___width 1
70#define reg_config_r_bootsel___flash_bw___bit 6
71#define reg_config_r_bootsel_offset 0
72
73/* Register rw_clk_ctrl, scope config, type rw */
74#define reg_config_rw_clk_ctrl___pll___lsb 0
75#define reg_config_rw_clk_ctrl___pll___width 1
76#define reg_config_rw_clk_ctrl___pll___bit 0
77#define reg_config_rw_clk_ctrl___cpu___lsb 1
78#define reg_config_rw_clk_ctrl___cpu___width 1
79#define reg_config_rw_clk_ctrl___cpu___bit 1
80#define reg_config_rw_clk_ctrl___iop___lsb 2
81#define reg_config_rw_clk_ctrl___iop___width 1
82#define reg_config_rw_clk_ctrl___iop___bit 2
83#define reg_config_rw_clk_ctrl___dma01_eth0___lsb 3
84#define reg_config_rw_clk_ctrl___dma01_eth0___width 1
85#define reg_config_rw_clk_ctrl___dma01_eth0___bit 3
86#define reg_config_rw_clk_ctrl___dma23___lsb 4
87#define reg_config_rw_clk_ctrl___dma23___width 1
88#define reg_config_rw_clk_ctrl___dma23___bit 4
89#define reg_config_rw_clk_ctrl___dma45___lsb 5
90#define reg_config_rw_clk_ctrl___dma45___width 1
91#define reg_config_rw_clk_ctrl___dma45___bit 5
92#define reg_config_rw_clk_ctrl___dma67___lsb 6
93#define reg_config_rw_clk_ctrl___dma67___width 1
94#define reg_config_rw_clk_ctrl___dma67___bit 6
95#define reg_config_rw_clk_ctrl___dma89_strcop___lsb 7
96#define reg_config_rw_clk_ctrl___dma89_strcop___width 1
97#define reg_config_rw_clk_ctrl___dma89_strcop___bit 7
98#define reg_config_rw_clk_ctrl___bif___lsb 8
99#define reg_config_rw_clk_ctrl___bif___width 1
100#define reg_config_rw_clk_ctrl___bif___bit 8
101#define reg_config_rw_clk_ctrl___fix_io___lsb 9
102#define reg_config_rw_clk_ctrl___fix_io___width 1
103#define reg_config_rw_clk_ctrl___fix_io___bit 9
104#define reg_config_rw_clk_ctrl_offset 4
105
106/* Register rw_pad_ctrl, scope config, type rw */
107#define reg_config_rw_pad_ctrl___usb_susp___lsb 0
108#define reg_config_rw_pad_ctrl___usb_susp___width 1
109#define reg_config_rw_pad_ctrl___usb_susp___bit 0
110#define reg_config_rw_pad_ctrl___phyrst_n___lsb 1
111#define reg_config_rw_pad_ctrl___phyrst_n___width 1
112#define reg_config_rw_pad_ctrl___phyrst_n___bit 1
113#define reg_config_rw_pad_ctrl_offset 8
114
115
116/* Constants */
117#define regk_config_bw16 0x00000000
118#define regk_config_bw32 0x00000001
119#define regk_config_master 0x00000005
120#define regk_config_nand 0x00000003
121#define regk_config_net_rx 0x00000001
122#define regk_config_net_tx_rx 0x00000002
123#define regk_config_no 0x00000000
124#define regk_config_none 0x00000007
125#define regk_config_nor 0x00000000
126#define regk_config_rw_clk_ctrl_default 0x00000002
127#define regk_config_rw_pad_ctrl_default 0x00000000
128#define regk_config_ser 0x00000004
129#define regk_config_slave 0x00000006
130#define regk_config_yes 0x00000001
131#endif /* __config_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/gio_defs_asm.h b/include/asm-cris/arch-v32/mach-fs/hwregs/asm/gio_defs_asm.h
deleted file mode 100644
index be4c63936d90..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/gio_defs_asm.h
+++ /dev/null
@@ -1,276 +0,0 @@
1#ifndef __gio_defs_asm_h
2#define __gio_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/gio/rtl/gio_regs.r
7 * id: gio_regs.r,v 1.5 2005/02/04 09:43:21 perz Exp
8 * last modfied: Mon Apr 11 16:07:47 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/gio_defs_asm.h ../../inst/gio/rtl/gio_regs.r
11 * id: $Id: gio_defs_asm.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_pa_dout, scope gio, type rw */
57#define reg_gio_rw_pa_dout___data___lsb 0
58#define reg_gio_rw_pa_dout___data___width 8
59#define reg_gio_rw_pa_dout_offset 0
60
61/* Register r_pa_din, scope gio, type r */
62#define reg_gio_r_pa_din___data___lsb 0
63#define reg_gio_r_pa_din___data___width 8
64#define reg_gio_r_pa_din_offset 4
65
66/* Register rw_pa_oe, scope gio, type rw */
67#define reg_gio_rw_pa_oe___oe___lsb 0
68#define reg_gio_rw_pa_oe___oe___width 8
69#define reg_gio_rw_pa_oe_offset 8
70
71/* Register rw_intr_cfg, scope gio, type rw */
72#define reg_gio_rw_intr_cfg___pa0___lsb 0
73#define reg_gio_rw_intr_cfg___pa0___width 3
74#define reg_gio_rw_intr_cfg___pa1___lsb 3
75#define reg_gio_rw_intr_cfg___pa1___width 3
76#define reg_gio_rw_intr_cfg___pa2___lsb 6
77#define reg_gio_rw_intr_cfg___pa2___width 3
78#define reg_gio_rw_intr_cfg___pa3___lsb 9
79#define reg_gio_rw_intr_cfg___pa3___width 3
80#define reg_gio_rw_intr_cfg___pa4___lsb 12
81#define reg_gio_rw_intr_cfg___pa4___width 3
82#define reg_gio_rw_intr_cfg___pa5___lsb 15
83#define reg_gio_rw_intr_cfg___pa5___width 3
84#define reg_gio_rw_intr_cfg___pa6___lsb 18
85#define reg_gio_rw_intr_cfg___pa6___width 3
86#define reg_gio_rw_intr_cfg___pa7___lsb 21
87#define reg_gio_rw_intr_cfg___pa7___width 3
88#define reg_gio_rw_intr_cfg_offset 12
89
90/* Register rw_intr_mask, scope gio, type rw */
91#define reg_gio_rw_intr_mask___pa0___lsb 0
92#define reg_gio_rw_intr_mask___pa0___width 1
93#define reg_gio_rw_intr_mask___pa0___bit 0
94#define reg_gio_rw_intr_mask___pa1___lsb 1
95#define reg_gio_rw_intr_mask___pa1___width 1
96#define reg_gio_rw_intr_mask___pa1___bit 1
97#define reg_gio_rw_intr_mask___pa2___lsb 2
98#define reg_gio_rw_intr_mask___pa2___width 1
99#define reg_gio_rw_intr_mask___pa2___bit 2
100#define reg_gio_rw_intr_mask___pa3___lsb 3
101#define reg_gio_rw_intr_mask___pa3___width 1
102#define reg_gio_rw_intr_mask___pa3___bit 3
103#define reg_gio_rw_intr_mask___pa4___lsb 4
104#define reg_gio_rw_intr_mask___pa4___width 1
105#define reg_gio_rw_intr_mask___pa4___bit 4
106#define reg_gio_rw_intr_mask___pa5___lsb 5
107#define reg_gio_rw_intr_mask___pa5___width 1
108#define reg_gio_rw_intr_mask___pa5___bit 5
109#define reg_gio_rw_intr_mask___pa6___lsb 6
110#define reg_gio_rw_intr_mask___pa6___width 1
111#define reg_gio_rw_intr_mask___pa6___bit 6
112#define reg_gio_rw_intr_mask___pa7___lsb 7
113#define reg_gio_rw_intr_mask___pa7___width 1
114#define reg_gio_rw_intr_mask___pa7___bit 7
115#define reg_gio_rw_intr_mask_offset 16
116
117/* Register rw_ack_intr, scope gio, type rw */
118#define reg_gio_rw_ack_intr___pa0___lsb 0
119#define reg_gio_rw_ack_intr___pa0___width 1
120#define reg_gio_rw_ack_intr___pa0___bit 0
121#define reg_gio_rw_ack_intr___pa1___lsb 1
122#define reg_gio_rw_ack_intr___pa1___width 1
123#define reg_gio_rw_ack_intr___pa1___bit 1
124#define reg_gio_rw_ack_intr___pa2___lsb 2
125#define reg_gio_rw_ack_intr___pa2___width 1
126#define reg_gio_rw_ack_intr___pa2___bit 2
127#define reg_gio_rw_ack_intr___pa3___lsb 3
128#define reg_gio_rw_ack_intr___pa3___width 1
129#define reg_gio_rw_ack_intr___pa3___bit 3
130#define reg_gio_rw_ack_intr___pa4___lsb 4
131#define reg_gio_rw_ack_intr___pa4___width 1
132#define reg_gio_rw_ack_intr___pa4___bit 4
133#define reg_gio_rw_ack_intr___pa5___lsb 5
134#define reg_gio_rw_ack_intr___pa5___width 1
135#define reg_gio_rw_ack_intr___pa5___bit 5
136#define reg_gio_rw_ack_intr___pa6___lsb 6
137#define reg_gio_rw_ack_intr___pa6___width 1
138#define reg_gio_rw_ack_intr___pa6___bit 6
139#define reg_gio_rw_ack_intr___pa7___lsb 7
140#define reg_gio_rw_ack_intr___pa7___width 1
141#define reg_gio_rw_ack_intr___pa7___bit 7
142#define reg_gio_rw_ack_intr_offset 20
143
144/* Register r_intr, scope gio, type r */
145#define reg_gio_r_intr___pa0___lsb 0
146#define reg_gio_r_intr___pa0___width 1
147#define reg_gio_r_intr___pa0___bit 0
148#define reg_gio_r_intr___pa1___lsb 1
149#define reg_gio_r_intr___pa1___width 1
150#define reg_gio_r_intr___pa1___bit 1
151#define reg_gio_r_intr___pa2___lsb 2
152#define reg_gio_r_intr___pa2___width 1
153#define reg_gio_r_intr___pa2___bit 2
154#define reg_gio_r_intr___pa3___lsb 3
155#define reg_gio_r_intr___pa3___width 1
156#define reg_gio_r_intr___pa3___bit 3
157#define reg_gio_r_intr___pa4___lsb 4
158#define reg_gio_r_intr___pa4___width 1
159#define reg_gio_r_intr___pa4___bit 4
160#define reg_gio_r_intr___pa5___lsb 5
161#define reg_gio_r_intr___pa5___width 1
162#define reg_gio_r_intr___pa5___bit 5
163#define reg_gio_r_intr___pa6___lsb 6
164#define reg_gio_r_intr___pa6___width 1
165#define reg_gio_r_intr___pa6___bit 6
166#define reg_gio_r_intr___pa7___lsb 7
167#define reg_gio_r_intr___pa7___width 1
168#define reg_gio_r_intr___pa7___bit 7
169#define reg_gio_r_intr_offset 24
170
171/* Register r_masked_intr, scope gio, type r */
172#define reg_gio_r_masked_intr___pa0___lsb 0
173#define reg_gio_r_masked_intr___pa0___width 1
174#define reg_gio_r_masked_intr___pa0___bit 0
175#define reg_gio_r_masked_intr___pa1___lsb 1
176#define reg_gio_r_masked_intr___pa1___width 1
177#define reg_gio_r_masked_intr___pa1___bit 1
178#define reg_gio_r_masked_intr___pa2___lsb 2
179#define reg_gio_r_masked_intr___pa2___width 1
180#define reg_gio_r_masked_intr___pa2___bit 2
181#define reg_gio_r_masked_intr___pa3___lsb 3
182#define reg_gio_r_masked_intr___pa3___width 1
183#define reg_gio_r_masked_intr___pa3___bit 3
184#define reg_gio_r_masked_intr___pa4___lsb 4
185#define reg_gio_r_masked_intr___pa4___width 1
186#define reg_gio_r_masked_intr___pa4___bit 4
187#define reg_gio_r_masked_intr___pa5___lsb 5
188#define reg_gio_r_masked_intr___pa5___width 1
189#define reg_gio_r_masked_intr___pa5___bit 5
190#define reg_gio_r_masked_intr___pa6___lsb 6
191#define reg_gio_r_masked_intr___pa6___width 1
192#define reg_gio_r_masked_intr___pa6___bit 6
193#define reg_gio_r_masked_intr___pa7___lsb 7
194#define reg_gio_r_masked_intr___pa7___width 1
195#define reg_gio_r_masked_intr___pa7___bit 7
196#define reg_gio_r_masked_intr_offset 28
197
198/* Register rw_pb_dout, scope gio, type rw */
199#define reg_gio_rw_pb_dout___data___lsb 0
200#define reg_gio_rw_pb_dout___data___width 18
201#define reg_gio_rw_pb_dout_offset 32
202
203/* Register r_pb_din, scope gio, type r */
204#define reg_gio_r_pb_din___data___lsb 0
205#define reg_gio_r_pb_din___data___width 18
206#define reg_gio_r_pb_din_offset 36
207
208/* Register rw_pb_oe, scope gio, type rw */
209#define reg_gio_rw_pb_oe___oe___lsb 0
210#define reg_gio_rw_pb_oe___oe___width 18
211#define reg_gio_rw_pb_oe_offset 40
212
213/* Register rw_pc_dout, scope gio, type rw */
214#define reg_gio_rw_pc_dout___data___lsb 0
215#define reg_gio_rw_pc_dout___data___width 18
216#define reg_gio_rw_pc_dout_offset 48
217
218/* Register r_pc_din, scope gio, type r */
219#define reg_gio_r_pc_din___data___lsb 0
220#define reg_gio_r_pc_din___data___width 18
221#define reg_gio_r_pc_din_offset 52
222
223/* Register rw_pc_oe, scope gio, type rw */
224#define reg_gio_rw_pc_oe___oe___lsb 0
225#define reg_gio_rw_pc_oe___oe___width 18
226#define reg_gio_rw_pc_oe_offset 56
227
228/* Register rw_pd_dout, scope gio, type rw */
229#define reg_gio_rw_pd_dout___data___lsb 0
230#define reg_gio_rw_pd_dout___data___width 18
231#define reg_gio_rw_pd_dout_offset 64
232
233/* Register r_pd_din, scope gio, type r */
234#define reg_gio_r_pd_din___data___lsb 0
235#define reg_gio_r_pd_din___data___width 18
236#define reg_gio_r_pd_din_offset 68
237
238/* Register rw_pd_oe, scope gio, type rw */
239#define reg_gio_rw_pd_oe___oe___lsb 0
240#define reg_gio_rw_pd_oe___oe___width 18
241#define reg_gio_rw_pd_oe_offset 72
242
243/* Register rw_pe_dout, scope gio, type rw */
244#define reg_gio_rw_pe_dout___data___lsb 0
245#define reg_gio_rw_pe_dout___data___width 18
246#define reg_gio_rw_pe_dout_offset 80
247
248/* Register r_pe_din, scope gio, type r */
249#define reg_gio_r_pe_din___data___lsb 0
250#define reg_gio_r_pe_din___data___width 18
251#define reg_gio_r_pe_din_offset 84
252
253/* Register rw_pe_oe, scope gio, type rw */
254#define reg_gio_rw_pe_oe___oe___lsb 0
255#define reg_gio_rw_pe_oe___oe___width 18
256#define reg_gio_rw_pe_oe_offset 88
257
258
259/* Constants */
260#define regk_gio_anyedge 0x00000007
261#define regk_gio_hi 0x00000001
262#define regk_gio_lo 0x00000002
263#define regk_gio_negedge 0x00000006
264#define regk_gio_no 0x00000000
265#define regk_gio_off 0x00000000
266#define regk_gio_posedge 0x00000005
267#define regk_gio_rw_intr_cfg_default 0x00000000
268#define regk_gio_rw_intr_mask_default 0x00000000
269#define regk_gio_rw_pa_oe_default 0x00000000
270#define regk_gio_rw_pb_oe_default 0x00000000
271#define regk_gio_rw_pc_oe_default 0x00000000
272#define regk_gio_rw_pd_oe_default 0x00000000
273#define regk_gio_rw_pe_oe_default 0x00000000
274#define regk_gio_set 0x00000003
275#define regk_gio_yes 0x00000001
276#endif /* __gio_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/pinmux_defs_asm.h b/include/asm-cris/arch-v32/mach-fs/hwregs/asm/pinmux_defs_asm.h
deleted file mode 100644
index 30cf5a936b64..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/pinmux_defs_asm.h
+++ /dev/null
@@ -1,632 +0,0 @@
1#ifndef __pinmux_defs_asm_h
2#define __pinmux_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/pinmux/rtl/guinness/pinmux_regs.r
7 * id: pinmux_regs.r,v 1.40 2005/02/09 16:22:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:11 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/pinmux_defs_asm.h ../../inst/pinmux/rtl/guinness/pinmux_regs.r
11 * id: $Id: pinmux_defs_asm.h,v 1.1 2007/04/11 11:00:39 ricardw Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_pa, scope pinmux, type rw */
57#define reg_pinmux_rw_pa___pa0___lsb 0
58#define reg_pinmux_rw_pa___pa0___width 1
59#define reg_pinmux_rw_pa___pa0___bit 0
60#define reg_pinmux_rw_pa___pa1___lsb 1
61#define reg_pinmux_rw_pa___pa1___width 1
62#define reg_pinmux_rw_pa___pa1___bit 1
63#define reg_pinmux_rw_pa___pa2___lsb 2
64#define reg_pinmux_rw_pa___pa2___width 1
65#define reg_pinmux_rw_pa___pa2___bit 2
66#define reg_pinmux_rw_pa___pa3___lsb 3
67#define reg_pinmux_rw_pa___pa3___width 1
68#define reg_pinmux_rw_pa___pa3___bit 3
69#define reg_pinmux_rw_pa___pa4___lsb 4
70#define reg_pinmux_rw_pa___pa4___width 1
71#define reg_pinmux_rw_pa___pa4___bit 4
72#define reg_pinmux_rw_pa___pa5___lsb 5
73#define reg_pinmux_rw_pa___pa5___width 1
74#define reg_pinmux_rw_pa___pa5___bit 5
75#define reg_pinmux_rw_pa___pa6___lsb 6
76#define reg_pinmux_rw_pa___pa6___width 1
77#define reg_pinmux_rw_pa___pa6___bit 6
78#define reg_pinmux_rw_pa___pa7___lsb 7
79#define reg_pinmux_rw_pa___pa7___width 1
80#define reg_pinmux_rw_pa___pa7___bit 7
81#define reg_pinmux_rw_pa___csp2_n___lsb 8
82#define reg_pinmux_rw_pa___csp2_n___width 1
83#define reg_pinmux_rw_pa___csp2_n___bit 8
84#define reg_pinmux_rw_pa___csp3_n___lsb 9
85#define reg_pinmux_rw_pa___csp3_n___width 1
86#define reg_pinmux_rw_pa___csp3_n___bit 9
87#define reg_pinmux_rw_pa___csp5_n___lsb 10
88#define reg_pinmux_rw_pa___csp5_n___width 1
89#define reg_pinmux_rw_pa___csp5_n___bit 10
90#define reg_pinmux_rw_pa___csp6_n___lsb 11
91#define reg_pinmux_rw_pa___csp6_n___width 1
92#define reg_pinmux_rw_pa___csp6_n___bit 11
93#define reg_pinmux_rw_pa___hsh4___lsb 12
94#define reg_pinmux_rw_pa___hsh4___width 1
95#define reg_pinmux_rw_pa___hsh4___bit 12
96#define reg_pinmux_rw_pa___hsh5___lsb 13
97#define reg_pinmux_rw_pa___hsh5___width 1
98#define reg_pinmux_rw_pa___hsh5___bit 13
99#define reg_pinmux_rw_pa___hsh6___lsb 14
100#define reg_pinmux_rw_pa___hsh6___width 1
101#define reg_pinmux_rw_pa___hsh6___bit 14
102#define reg_pinmux_rw_pa___hsh7___lsb 15
103#define reg_pinmux_rw_pa___hsh7___width 1
104#define reg_pinmux_rw_pa___hsh7___bit 15
105#define reg_pinmux_rw_pa_offset 0
106
107/* Register rw_hwprot, scope pinmux, type rw */
108#define reg_pinmux_rw_hwprot___ser1___lsb 0
109#define reg_pinmux_rw_hwprot___ser1___width 1
110#define reg_pinmux_rw_hwprot___ser1___bit 0
111#define reg_pinmux_rw_hwprot___ser2___lsb 1
112#define reg_pinmux_rw_hwprot___ser2___width 1
113#define reg_pinmux_rw_hwprot___ser2___bit 1
114#define reg_pinmux_rw_hwprot___ser3___lsb 2
115#define reg_pinmux_rw_hwprot___ser3___width 1
116#define reg_pinmux_rw_hwprot___ser3___bit 2
117#define reg_pinmux_rw_hwprot___sser0___lsb 3
118#define reg_pinmux_rw_hwprot___sser0___width 1
119#define reg_pinmux_rw_hwprot___sser0___bit 3
120#define reg_pinmux_rw_hwprot___sser1___lsb 4
121#define reg_pinmux_rw_hwprot___sser1___width 1
122#define reg_pinmux_rw_hwprot___sser1___bit 4
123#define reg_pinmux_rw_hwprot___ata0___lsb 5
124#define reg_pinmux_rw_hwprot___ata0___width 1
125#define reg_pinmux_rw_hwprot___ata0___bit 5
126#define reg_pinmux_rw_hwprot___ata1___lsb 6
127#define reg_pinmux_rw_hwprot___ata1___width 1
128#define reg_pinmux_rw_hwprot___ata1___bit 6
129#define reg_pinmux_rw_hwprot___ata2___lsb 7
130#define reg_pinmux_rw_hwprot___ata2___width 1
131#define reg_pinmux_rw_hwprot___ata2___bit 7
132#define reg_pinmux_rw_hwprot___ata3___lsb 8
133#define reg_pinmux_rw_hwprot___ata3___width 1
134#define reg_pinmux_rw_hwprot___ata3___bit 8
135#define reg_pinmux_rw_hwprot___ata___lsb 9
136#define reg_pinmux_rw_hwprot___ata___width 1
137#define reg_pinmux_rw_hwprot___ata___bit 9
138#define reg_pinmux_rw_hwprot___eth1___lsb 10
139#define reg_pinmux_rw_hwprot___eth1___width 1
140#define reg_pinmux_rw_hwprot___eth1___bit 10
141#define reg_pinmux_rw_hwprot___eth1_mgm___lsb 11
142#define reg_pinmux_rw_hwprot___eth1_mgm___width 1
143#define reg_pinmux_rw_hwprot___eth1_mgm___bit 11
144#define reg_pinmux_rw_hwprot___timer___lsb 12
145#define reg_pinmux_rw_hwprot___timer___width 1
146#define reg_pinmux_rw_hwprot___timer___bit 12
147#define reg_pinmux_rw_hwprot___p21___lsb 13
148#define reg_pinmux_rw_hwprot___p21___width 1
149#define reg_pinmux_rw_hwprot___p21___bit 13
150#define reg_pinmux_rw_hwprot_offset 4
151
152/* Register rw_pb_gio, scope pinmux, type rw */
153#define reg_pinmux_rw_pb_gio___pb0___lsb 0
154#define reg_pinmux_rw_pb_gio___pb0___width 1
155#define reg_pinmux_rw_pb_gio___pb0___bit 0
156#define reg_pinmux_rw_pb_gio___pb1___lsb 1
157#define reg_pinmux_rw_pb_gio___pb1___width 1
158#define reg_pinmux_rw_pb_gio___pb1___bit 1
159#define reg_pinmux_rw_pb_gio___pb2___lsb 2
160#define reg_pinmux_rw_pb_gio___pb2___width 1
161#define reg_pinmux_rw_pb_gio___pb2___bit 2
162#define reg_pinmux_rw_pb_gio___pb3___lsb 3
163#define reg_pinmux_rw_pb_gio___pb3___width 1
164#define reg_pinmux_rw_pb_gio___pb3___bit 3
165#define reg_pinmux_rw_pb_gio___pb4___lsb 4
166#define reg_pinmux_rw_pb_gio___pb4___width 1
167#define reg_pinmux_rw_pb_gio___pb4___bit 4
168#define reg_pinmux_rw_pb_gio___pb5___lsb 5
169#define reg_pinmux_rw_pb_gio___pb5___width 1
170#define reg_pinmux_rw_pb_gio___pb5___bit 5
171#define reg_pinmux_rw_pb_gio___pb6___lsb 6
172#define reg_pinmux_rw_pb_gio___pb6___width 1
173#define reg_pinmux_rw_pb_gio___pb6___bit 6
174#define reg_pinmux_rw_pb_gio___pb7___lsb 7
175#define reg_pinmux_rw_pb_gio___pb7___width 1
176#define reg_pinmux_rw_pb_gio___pb7___bit 7
177#define reg_pinmux_rw_pb_gio___pb8___lsb 8
178#define reg_pinmux_rw_pb_gio___pb8___width 1
179#define reg_pinmux_rw_pb_gio___pb8___bit 8
180#define reg_pinmux_rw_pb_gio___pb9___lsb 9
181#define reg_pinmux_rw_pb_gio___pb9___width 1
182#define reg_pinmux_rw_pb_gio___pb9___bit 9
183#define reg_pinmux_rw_pb_gio___pb10___lsb 10
184#define reg_pinmux_rw_pb_gio___pb10___width 1
185#define reg_pinmux_rw_pb_gio___pb10___bit 10
186#define reg_pinmux_rw_pb_gio___pb11___lsb 11
187#define reg_pinmux_rw_pb_gio___pb11___width 1
188#define reg_pinmux_rw_pb_gio___pb11___bit 11
189#define reg_pinmux_rw_pb_gio___pb12___lsb 12
190#define reg_pinmux_rw_pb_gio___pb12___width 1
191#define reg_pinmux_rw_pb_gio___pb12___bit 12
192#define reg_pinmux_rw_pb_gio___pb13___lsb 13
193#define reg_pinmux_rw_pb_gio___pb13___width 1
194#define reg_pinmux_rw_pb_gio___pb13___bit 13
195#define reg_pinmux_rw_pb_gio___pb14___lsb 14
196#define reg_pinmux_rw_pb_gio___pb14___width 1
197#define reg_pinmux_rw_pb_gio___pb14___bit 14
198#define reg_pinmux_rw_pb_gio___pb15___lsb 15
199#define reg_pinmux_rw_pb_gio___pb15___width 1
200#define reg_pinmux_rw_pb_gio___pb15___bit 15
201#define reg_pinmux_rw_pb_gio___pb16___lsb 16
202#define reg_pinmux_rw_pb_gio___pb16___width 1
203#define reg_pinmux_rw_pb_gio___pb16___bit 16
204#define reg_pinmux_rw_pb_gio___pb17___lsb 17
205#define reg_pinmux_rw_pb_gio___pb17___width 1
206#define reg_pinmux_rw_pb_gio___pb17___bit 17
207#define reg_pinmux_rw_pb_gio_offset 8
208
209/* Register rw_pb_iop, scope pinmux, type rw */
210#define reg_pinmux_rw_pb_iop___pb0___lsb 0
211#define reg_pinmux_rw_pb_iop___pb0___width 1
212#define reg_pinmux_rw_pb_iop___pb0___bit 0
213#define reg_pinmux_rw_pb_iop___pb1___lsb 1
214#define reg_pinmux_rw_pb_iop___pb1___width 1
215#define reg_pinmux_rw_pb_iop___pb1___bit 1
216#define reg_pinmux_rw_pb_iop___pb2___lsb 2
217#define reg_pinmux_rw_pb_iop___pb2___width 1
218#define reg_pinmux_rw_pb_iop___pb2___bit 2
219#define reg_pinmux_rw_pb_iop___pb3___lsb 3
220#define reg_pinmux_rw_pb_iop___pb3___width 1
221#define reg_pinmux_rw_pb_iop___pb3___bit 3
222#define reg_pinmux_rw_pb_iop___pb4___lsb 4
223#define reg_pinmux_rw_pb_iop___pb4___width 1
224#define reg_pinmux_rw_pb_iop___pb4___bit 4
225#define reg_pinmux_rw_pb_iop___pb5___lsb 5
226#define reg_pinmux_rw_pb_iop___pb5___width 1
227#define reg_pinmux_rw_pb_iop___pb5___bit 5
228#define reg_pinmux_rw_pb_iop___pb6___lsb 6
229#define reg_pinmux_rw_pb_iop___pb6___width 1
230#define reg_pinmux_rw_pb_iop___pb6___bit 6
231#define reg_pinmux_rw_pb_iop___pb7___lsb 7
232#define reg_pinmux_rw_pb_iop___pb7___width 1
233#define reg_pinmux_rw_pb_iop___pb7___bit 7
234#define reg_pinmux_rw_pb_iop___pb8___lsb 8
235#define reg_pinmux_rw_pb_iop___pb8___width 1
236#define reg_pinmux_rw_pb_iop___pb8___bit 8
237#define reg_pinmux_rw_pb_iop___pb9___lsb 9
238#define reg_pinmux_rw_pb_iop___pb9___width 1
239#define reg_pinmux_rw_pb_iop___pb9___bit 9
240#define reg_pinmux_rw_pb_iop___pb10___lsb 10
241#define reg_pinmux_rw_pb_iop___pb10___width 1
242#define reg_pinmux_rw_pb_iop___pb10___bit 10
243#define reg_pinmux_rw_pb_iop___pb11___lsb 11
244#define reg_pinmux_rw_pb_iop___pb11___width 1
245#define reg_pinmux_rw_pb_iop___pb11___bit 11
246#define reg_pinmux_rw_pb_iop___pb12___lsb 12
247#define reg_pinmux_rw_pb_iop___pb12___width 1
248#define reg_pinmux_rw_pb_iop___pb12___bit 12
249#define reg_pinmux_rw_pb_iop___pb13___lsb 13
250#define reg_pinmux_rw_pb_iop___pb13___width 1
251#define reg_pinmux_rw_pb_iop___pb13___bit 13
252#define reg_pinmux_rw_pb_iop___pb14___lsb 14
253#define reg_pinmux_rw_pb_iop___pb14___width 1
254#define reg_pinmux_rw_pb_iop___pb14___bit 14
255#define reg_pinmux_rw_pb_iop___pb15___lsb 15
256#define reg_pinmux_rw_pb_iop___pb15___width 1
257#define reg_pinmux_rw_pb_iop___pb15___bit 15
258#define reg_pinmux_rw_pb_iop___pb16___lsb 16
259#define reg_pinmux_rw_pb_iop___pb16___width 1
260#define reg_pinmux_rw_pb_iop___pb16___bit 16
261#define reg_pinmux_rw_pb_iop___pb17___lsb 17
262#define reg_pinmux_rw_pb_iop___pb17___width 1
263#define reg_pinmux_rw_pb_iop___pb17___bit 17
264#define reg_pinmux_rw_pb_iop_offset 12
265
266/* Register rw_pc_gio, scope pinmux, type rw */
267#define reg_pinmux_rw_pc_gio___pc0___lsb 0
268#define reg_pinmux_rw_pc_gio___pc0___width 1
269#define reg_pinmux_rw_pc_gio___pc0___bit 0
270#define reg_pinmux_rw_pc_gio___pc1___lsb 1
271#define reg_pinmux_rw_pc_gio___pc1___width 1
272#define reg_pinmux_rw_pc_gio___pc1___bit 1
273#define reg_pinmux_rw_pc_gio___pc2___lsb 2
274#define reg_pinmux_rw_pc_gio___pc2___width 1
275#define reg_pinmux_rw_pc_gio___pc2___bit 2
276#define reg_pinmux_rw_pc_gio___pc3___lsb 3
277#define reg_pinmux_rw_pc_gio___pc3___width 1
278#define reg_pinmux_rw_pc_gio___pc3___bit 3
279#define reg_pinmux_rw_pc_gio___pc4___lsb 4
280#define reg_pinmux_rw_pc_gio___pc4___width 1
281#define reg_pinmux_rw_pc_gio___pc4___bit 4
282#define reg_pinmux_rw_pc_gio___pc5___lsb 5
283#define reg_pinmux_rw_pc_gio___pc5___width 1
284#define reg_pinmux_rw_pc_gio___pc5___bit 5
285#define reg_pinmux_rw_pc_gio___pc6___lsb 6
286#define reg_pinmux_rw_pc_gio___pc6___width 1
287#define reg_pinmux_rw_pc_gio___pc6___bit 6
288#define reg_pinmux_rw_pc_gio___pc7___lsb 7
289#define reg_pinmux_rw_pc_gio___pc7___width 1
290#define reg_pinmux_rw_pc_gio___pc7___bit 7
291#define reg_pinmux_rw_pc_gio___pc8___lsb 8
292#define reg_pinmux_rw_pc_gio___pc8___width 1
293#define reg_pinmux_rw_pc_gio___pc8___bit 8
294#define reg_pinmux_rw_pc_gio___pc9___lsb 9
295#define reg_pinmux_rw_pc_gio___pc9___width 1
296#define reg_pinmux_rw_pc_gio___pc9___bit 9
297#define reg_pinmux_rw_pc_gio___pc10___lsb 10
298#define reg_pinmux_rw_pc_gio___pc10___width 1
299#define reg_pinmux_rw_pc_gio___pc10___bit 10
300#define reg_pinmux_rw_pc_gio___pc11___lsb 11
301#define reg_pinmux_rw_pc_gio___pc11___width 1
302#define reg_pinmux_rw_pc_gio___pc11___bit 11
303#define reg_pinmux_rw_pc_gio___pc12___lsb 12
304#define reg_pinmux_rw_pc_gio___pc12___width 1
305#define reg_pinmux_rw_pc_gio___pc12___bit 12
306#define reg_pinmux_rw_pc_gio___pc13___lsb 13
307#define reg_pinmux_rw_pc_gio___pc13___width 1
308#define reg_pinmux_rw_pc_gio___pc13___bit 13
309#define reg_pinmux_rw_pc_gio___pc14___lsb 14
310#define reg_pinmux_rw_pc_gio___pc14___width 1
311#define reg_pinmux_rw_pc_gio___pc14___bit 14
312#define reg_pinmux_rw_pc_gio___pc15___lsb 15
313#define reg_pinmux_rw_pc_gio___pc15___width 1
314#define reg_pinmux_rw_pc_gio___pc15___bit 15
315#define reg_pinmux_rw_pc_gio___pc16___lsb 16
316#define reg_pinmux_rw_pc_gio___pc16___width 1
317#define reg_pinmux_rw_pc_gio___pc16___bit 16
318#define reg_pinmux_rw_pc_gio___pc17___lsb 17
319#define reg_pinmux_rw_pc_gio___pc17___width 1
320#define reg_pinmux_rw_pc_gio___pc17___bit 17
321#define reg_pinmux_rw_pc_gio_offset 16
322
323/* Register rw_pc_iop, scope pinmux, type rw */
324#define reg_pinmux_rw_pc_iop___pc0___lsb 0
325#define reg_pinmux_rw_pc_iop___pc0___width 1
326#define reg_pinmux_rw_pc_iop___pc0___bit 0
327#define reg_pinmux_rw_pc_iop___pc1___lsb 1
328#define reg_pinmux_rw_pc_iop___pc1___width 1
329#define reg_pinmux_rw_pc_iop___pc1___bit 1
330#define reg_pinmux_rw_pc_iop___pc2___lsb 2
331#define reg_pinmux_rw_pc_iop___pc2___width 1
332#define reg_pinmux_rw_pc_iop___pc2___bit 2
333#define reg_pinmux_rw_pc_iop___pc3___lsb 3
334#define reg_pinmux_rw_pc_iop___pc3___width 1
335#define reg_pinmux_rw_pc_iop___pc3___bit 3
336#define reg_pinmux_rw_pc_iop___pc4___lsb 4
337#define reg_pinmux_rw_pc_iop___pc4___width 1
338#define reg_pinmux_rw_pc_iop___pc4___bit 4
339#define reg_pinmux_rw_pc_iop___pc5___lsb 5
340#define reg_pinmux_rw_pc_iop___pc5___width 1
341#define reg_pinmux_rw_pc_iop___pc5___bit 5
342#define reg_pinmux_rw_pc_iop___pc6___lsb 6
343#define reg_pinmux_rw_pc_iop___pc6___width 1
344#define reg_pinmux_rw_pc_iop___pc6___bit 6
345#define reg_pinmux_rw_pc_iop___pc7___lsb 7
346#define reg_pinmux_rw_pc_iop___pc7___width 1
347#define reg_pinmux_rw_pc_iop___pc7___bit 7
348#define reg_pinmux_rw_pc_iop___pc8___lsb 8
349#define reg_pinmux_rw_pc_iop___pc8___width 1
350#define reg_pinmux_rw_pc_iop___pc8___bit 8
351#define reg_pinmux_rw_pc_iop___pc9___lsb 9
352#define reg_pinmux_rw_pc_iop___pc9___width 1
353#define reg_pinmux_rw_pc_iop___pc9___bit 9
354#define reg_pinmux_rw_pc_iop___pc10___lsb 10
355#define reg_pinmux_rw_pc_iop___pc10___width 1
356#define reg_pinmux_rw_pc_iop___pc10___bit 10
357#define reg_pinmux_rw_pc_iop___pc11___lsb 11
358#define reg_pinmux_rw_pc_iop___pc11___width 1
359#define reg_pinmux_rw_pc_iop___pc11___bit 11
360#define reg_pinmux_rw_pc_iop___pc12___lsb 12
361#define reg_pinmux_rw_pc_iop___pc12___width 1
362#define reg_pinmux_rw_pc_iop___pc12___bit 12
363#define reg_pinmux_rw_pc_iop___pc13___lsb 13
364#define reg_pinmux_rw_pc_iop___pc13___width 1
365#define reg_pinmux_rw_pc_iop___pc13___bit 13
366#define reg_pinmux_rw_pc_iop___pc14___lsb 14
367#define reg_pinmux_rw_pc_iop___pc14___width 1
368#define reg_pinmux_rw_pc_iop___pc14___bit 14
369#define reg_pinmux_rw_pc_iop___pc15___lsb 15
370#define reg_pinmux_rw_pc_iop___pc15___width 1
371#define reg_pinmux_rw_pc_iop___pc15___bit 15
372#define reg_pinmux_rw_pc_iop___pc16___lsb 16
373#define reg_pinmux_rw_pc_iop___pc16___width 1
374#define reg_pinmux_rw_pc_iop___pc16___bit 16
375#define reg_pinmux_rw_pc_iop___pc17___lsb 17
376#define reg_pinmux_rw_pc_iop___pc17___width 1
377#define reg_pinmux_rw_pc_iop___pc17___bit 17
378#define reg_pinmux_rw_pc_iop_offset 20
379
380/* Register rw_pd_gio, scope pinmux, type rw */
381#define reg_pinmux_rw_pd_gio___pd0___lsb 0
382#define reg_pinmux_rw_pd_gio___pd0___width 1
383#define reg_pinmux_rw_pd_gio___pd0___bit 0
384#define reg_pinmux_rw_pd_gio___pd1___lsb 1
385#define reg_pinmux_rw_pd_gio___pd1___width 1
386#define reg_pinmux_rw_pd_gio___pd1___bit 1
387#define reg_pinmux_rw_pd_gio___pd2___lsb 2
388#define reg_pinmux_rw_pd_gio___pd2___width 1
389#define reg_pinmux_rw_pd_gio___pd2___bit 2
390#define reg_pinmux_rw_pd_gio___pd3___lsb 3
391#define reg_pinmux_rw_pd_gio___pd3___width 1
392#define reg_pinmux_rw_pd_gio___pd3___bit 3
393#define reg_pinmux_rw_pd_gio___pd4___lsb 4
394#define reg_pinmux_rw_pd_gio___pd4___width 1
395#define reg_pinmux_rw_pd_gio___pd4___bit 4
396#define reg_pinmux_rw_pd_gio___pd5___lsb 5
397#define reg_pinmux_rw_pd_gio___pd5___width 1
398#define reg_pinmux_rw_pd_gio___pd5___bit 5
399#define reg_pinmux_rw_pd_gio___pd6___lsb 6
400#define reg_pinmux_rw_pd_gio___pd6___width 1
401#define reg_pinmux_rw_pd_gio___pd6___bit 6
402#define reg_pinmux_rw_pd_gio___pd7___lsb 7
403#define reg_pinmux_rw_pd_gio___pd7___width 1
404#define reg_pinmux_rw_pd_gio___pd7___bit 7
405#define reg_pinmux_rw_pd_gio___pd8___lsb 8
406#define reg_pinmux_rw_pd_gio___pd8___width 1
407#define reg_pinmux_rw_pd_gio___pd8___bit 8
408#define reg_pinmux_rw_pd_gio___pd9___lsb 9
409#define reg_pinmux_rw_pd_gio___pd9___width 1
410#define reg_pinmux_rw_pd_gio___pd9___bit 9
411#define reg_pinmux_rw_pd_gio___pd10___lsb 10
412#define reg_pinmux_rw_pd_gio___pd10___width 1
413#define reg_pinmux_rw_pd_gio___pd10___bit 10
414#define reg_pinmux_rw_pd_gio___pd11___lsb 11
415#define reg_pinmux_rw_pd_gio___pd11___width 1
416#define reg_pinmux_rw_pd_gio___pd11___bit 11
417#define reg_pinmux_rw_pd_gio___pd12___lsb 12
418#define reg_pinmux_rw_pd_gio___pd12___width 1
419#define reg_pinmux_rw_pd_gio___pd12___bit 12
420#define reg_pinmux_rw_pd_gio___pd13___lsb 13
421#define reg_pinmux_rw_pd_gio___pd13___width 1
422#define reg_pinmux_rw_pd_gio___pd13___bit 13
423#define reg_pinmux_rw_pd_gio___pd14___lsb 14
424#define reg_pinmux_rw_pd_gio___pd14___width 1
425#define reg_pinmux_rw_pd_gio___pd14___bit 14
426#define reg_pinmux_rw_pd_gio___pd15___lsb 15
427#define reg_pinmux_rw_pd_gio___pd15___width 1
428#define reg_pinmux_rw_pd_gio___pd15___bit 15
429#define reg_pinmux_rw_pd_gio___pd16___lsb 16
430#define reg_pinmux_rw_pd_gio___pd16___width 1
431#define reg_pinmux_rw_pd_gio___pd16___bit 16
432#define reg_pinmux_rw_pd_gio___pd17___lsb 17
433#define reg_pinmux_rw_pd_gio___pd17___width 1
434#define reg_pinmux_rw_pd_gio___pd17___bit 17
435#define reg_pinmux_rw_pd_gio_offset 24
436
437/* Register rw_pd_iop, scope pinmux, type rw */
438#define reg_pinmux_rw_pd_iop___pd0___lsb 0
439#define reg_pinmux_rw_pd_iop___pd0___width 1
440#define reg_pinmux_rw_pd_iop___pd0___bit 0
441#define reg_pinmux_rw_pd_iop___pd1___lsb 1
442#define reg_pinmux_rw_pd_iop___pd1___width 1
443#define reg_pinmux_rw_pd_iop___pd1___bit 1
444#define reg_pinmux_rw_pd_iop___pd2___lsb 2
445#define reg_pinmux_rw_pd_iop___pd2___width 1
446#define reg_pinmux_rw_pd_iop___pd2___bit 2
447#define reg_pinmux_rw_pd_iop___pd3___lsb 3
448#define reg_pinmux_rw_pd_iop___pd3___width 1
449#define reg_pinmux_rw_pd_iop___pd3___bit 3
450#define reg_pinmux_rw_pd_iop___pd4___lsb 4
451#define reg_pinmux_rw_pd_iop___pd4___width 1
452#define reg_pinmux_rw_pd_iop___pd4___bit 4
453#define reg_pinmux_rw_pd_iop___pd5___lsb 5
454#define reg_pinmux_rw_pd_iop___pd5___width 1
455#define reg_pinmux_rw_pd_iop___pd5___bit 5
456#define reg_pinmux_rw_pd_iop___pd6___lsb 6
457#define reg_pinmux_rw_pd_iop___pd6___width 1
458#define reg_pinmux_rw_pd_iop___pd6___bit 6
459#define reg_pinmux_rw_pd_iop___pd7___lsb 7
460#define reg_pinmux_rw_pd_iop___pd7___width 1
461#define reg_pinmux_rw_pd_iop___pd7___bit 7
462#define reg_pinmux_rw_pd_iop___pd8___lsb 8
463#define reg_pinmux_rw_pd_iop___pd8___width 1
464#define reg_pinmux_rw_pd_iop___pd8___bit 8
465#define reg_pinmux_rw_pd_iop___pd9___lsb 9
466#define reg_pinmux_rw_pd_iop___pd9___width 1
467#define reg_pinmux_rw_pd_iop___pd9___bit 9
468#define reg_pinmux_rw_pd_iop___pd10___lsb 10
469#define reg_pinmux_rw_pd_iop___pd10___width 1
470#define reg_pinmux_rw_pd_iop___pd10___bit 10
471#define reg_pinmux_rw_pd_iop___pd11___lsb 11
472#define reg_pinmux_rw_pd_iop___pd11___width 1
473#define reg_pinmux_rw_pd_iop___pd11___bit 11
474#define reg_pinmux_rw_pd_iop___pd12___lsb 12
475#define reg_pinmux_rw_pd_iop___pd12___width 1
476#define reg_pinmux_rw_pd_iop___pd12___bit 12
477#define reg_pinmux_rw_pd_iop___pd13___lsb 13
478#define reg_pinmux_rw_pd_iop___pd13___width 1
479#define reg_pinmux_rw_pd_iop___pd13___bit 13
480#define reg_pinmux_rw_pd_iop___pd14___lsb 14
481#define reg_pinmux_rw_pd_iop___pd14___width 1
482#define reg_pinmux_rw_pd_iop___pd14___bit 14
483#define reg_pinmux_rw_pd_iop___pd15___lsb 15
484#define reg_pinmux_rw_pd_iop___pd15___width 1
485#define reg_pinmux_rw_pd_iop___pd15___bit 15
486#define reg_pinmux_rw_pd_iop___pd16___lsb 16
487#define reg_pinmux_rw_pd_iop___pd16___width 1
488#define reg_pinmux_rw_pd_iop___pd16___bit 16
489#define reg_pinmux_rw_pd_iop___pd17___lsb 17
490#define reg_pinmux_rw_pd_iop___pd17___width 1
491#define reg_pinmux_rw_pd_iop___pd17___bit 17
492#define reg_pinmux_rw_pd_iop_offset 28
493
494/* Register rw_pe_gio, scope pinmux, type rw */
495#define reg_pinmux_rw_pe_gio___pe0___lsb 0
496#define reg_pinmux_rw_pe_gio___pe0___width 1
497#define reg_pinmux_rw_pe_gio___pe0___bit 0
498#define reg_pinmux_rw_pe_gio___pe1___lsb 1
499#define reg_pinmux_rw_pe_gio___pe1___width 1
500#define reg_pinmux_rw_pe_gio___pe1___bit 1
501#define reg_pinmux_rw_pe_gio___pe2___lsb 2
502#define reg_pinmux_rw_pe_gio___pe2___width 1
503#define reg_pinmux_rw_pe_gio___pe2___bit 2
504#define reg_pinmux_rw_pe_gio___pe3___lsb 3
505#define reg_pinmux_rw_pe_gio___pe3___width 1
506#define reg_pinmux_rw_pe_gio___pe3___bit 3
507#define reg_pinmux_rw_pe_gio___pe4___lsb 4
508#define reg_pinmux_rw_pe_gio___pe4___width 1
509#define reg_pinmux_rw_pe_gio___pe4___bit 4
510#define reg_pinmux_rw_pe_gio___pe5___lsb 5
511#define reg_pinmux_rw_pe_gio___pe5___width 1
512#define reg_pinmux_rw_pe_gio___pe5___bit 5
513#define reg_pinmux_rw_pe_gio___pe6___lsb 6
514#define reg_pinmux_rw_pe_gio___pe6___width 1
515#define reg_pinmux_rw_pe_gio___pe6___bit 6
516#define reg_pinmux_rw_pe_gio___pe7___lsb 7
517#define reg_pinmux_rw_pe_gio___pe7___width 1
518#define reg_pinmux_rw_pe_gio___pe7___bit 7
519#define reg_pinmux_rw_pe_gio___pe8___lsb 8
520#define reg_pinmux_rw_pe_gio___pe8___width 1
521#define reg_pinmux_rw_pe_gio___pe8___bit 8
522#define reg_pinmux_rw_pe_gio___pe9___lsb 9
523#define reg_pinmux_rw_pe_gio___pe9___width 1
524#define reg_pinmux_rw_pe_gio___pe9___bit 9
525#define reg_pinmux_rw_pe_gio___pe10___lsb 10
526#define reg_pinmux_rw_pe_gio___pe10___width 1
527#define reg_pinmux_rw_pe_gio___pe10___bit 10
528#define reg_pinmux_rw_pe_gio___pe11___lsb 11
529#define reg_pinmux_rw_pe_gio___pe11___width 1
530#define reg_pinmux_rw_pe_gio___pe11___bit 11
531#define reg_pinmux_rw_pe_gio___pe12___lsb 12
532#define reg_pinmux_rw_pe_gio___pe12___width 1
533#define reg_pinmux_rw_pe_gio___pe12___bit 12
534#define reg_pinmux_rw_pe_gio___pe13___lsb 13
535#define reg_pinmux_rw_pe_gio___pe13___width 1
536#define reg_pinmux_rw_pe_gio___pe13___bit 13
537#define reg_pinmux_rw_pe_gio___pe14___lsb 14
538#define reg_pinmux_rw_pe_gio___pe14___width 1
539#define reg_pinmux_rw_pe_gio___pe14___bit 14
540#define reg_pinmux_rw_pe_gio___pe15___lsb 15
541#define reg_pinmux_rw_pe_gio___pe15___width 1
542#define reg_pinmux_rw_pe_gio___pe15___bit 15
543#define reg_pinmux_rw_pe_gio___pe16___lsb 16
544#define reg_pinmux_rw_pe_gio___pe16___width 1
545#define reg_pinmux_rw_pe_gio___pe16___bit 16
546#define reg_pinmux_rw_pe_gio___pe17___lsb 17
547#define reg_pinmux_rw_pe_gio___pe17___width 1
548#define reg_pinmux_rw_pe_gio___pe17___bit 17
549#define reg_pinmux_rw_pe_gio_offset 32
550
551/* Register rw_pe_iop, scope pinmux, type rw */
552#define reg_pinmux_rw_pe_iop___pe0___lsb 0
553#define reg_pinmux_rw_pe_iop___pe0___width 1
554#define reg_pinmux_rw_pe_iop___pe0___bit 0
555#define reg_pinmux_rw_pe_iop___pe1___lsb 1
556#define reg_pinmux_rw_pe_iop___pe1___width 1
557#define reg_pinmux_rw_pe_iop___pe1___bit 1
558#define reg_pinmux_rw_pe_iop___pe2___lsb 2
559#define reg_pinmux_rw_pe_iop___pe2___width 1
560#define reg_pinmux_rw_pe_iop___pe2___bit 2
561#define reg_pinmux_rw_pe_iop___pe3___lsb 3
562#define reg_pinmux_rw_pe_iop___pe3___width 1
563#define reg_pinmux_rw_pe_iop___pe3___bit 3
564#define reg_pinmux_rw_pe_iop___pe4___lsb 4
565#define reg_pinmux_rw_pe_iop___pe4___width 1
566#define reg_pinmux_rw_pe_iop___pe4___bit 4
567#define reg_pinmux_rw_pe_iop___pe5___lsb 5
568#define reg_pinmux_rw_pe_iop___pe5___width 1
569#define reg_pinmux_rw_pe_iop___pe5___bit 5
570#define reg_pinmux_rw_pe_iop___pe6___lsb 6
571#define reg_pinmux_rw_pe_iop___pe6___width 1
572#define reg_pinmux_rw_pe_iop___pe6___bit 6
573#define reg_pinmux_rw_pe_iop___pe7___lsb 7
574#define reg_pinmux_rw_pe_iop___pe7___width 1
575#define reg_pinmux_rw_pe_iop___pe7___bit 7
576#define reg_pinmux_rw_pe_iop___pe8___lsb 8
577#define reg_pinmux_rw_pe_iop___pe8___width 1
578#define reg_pinmux_rw_pe_iop___pe8___bit 8
579#define reg_pinmux_rw_pe_iop___pe9___lsb 9
580#define reg_pinmux_rw_pe_iop___pe9___width 1
581#define reg_pinmux_rw_pe_iop___pe9___bit 9
582#define reg_pinmux_rw_pe_iop___pe10___lsb 10
583#define reg_pinmux_rw_pe_iop___pe10___width 1
584#define reg_pinmux_rw_pe_iop___pe10___bit 10
585#define reg_pinmux_rw_pe_iop___pe11___lsb 11
586#define reg_pinmux_rw_pe_iop___pe11___width 1
587#define reg_pinmux_rw_pe_iop___pe11___bit 11
588#define reg_pinmux_rw_pe_iop___pe12___lsb 12
589#define reg_pinmux_rw_pe_iop___pe12___width 1
590#define reg_pinmux_rw_pe_iop___pe12___bit 12
591#define reg_pinmux_rw_pe_iop___pe13___lsb 13
592#define reg_pinmux_rw_pe_iop___pe13___width 1
593#define reg_pinmux_rw_pe_iop___pe13___bit 13
594#define reg_pinmux_rw_pe_iop___pe14___lsb 14
595#define reg_pinmux_rw_pe_iop___pe14___width 1
596#define reg_pinmux_rw_pe_iop___pe14___bit 14
597#define reg_pinmux_rw_pe_iop___pe15___lsb 15
598#define reg_pinmux_rw_pe_iop___pe15___width 1
599#define reg_pinmux_rw_pe_iop___pe15___bit 15
600#define reg_pinmux_rw_pe_iop___pe16___lsb 16
601#define reg_pinmux_rw_pe_iop___pe16___width 1
602#define reg_pinmux_rw_pe_iop___pe16___bit 16
603#define reg_pinmux_rw_pe_iop___pe17___lsb 17
604#define reg_pinmux_rw_pe_iop___pe17___width 1
605#define reg_pinmux_rw_pe_iop___pe17___bit 17
606#define reg_pinmux_rw_pe_iop_offset 36
607
608/* Register rw_usb_phy, scope pinmux, type rw */
609#define reg_pinmux_rw_usb_phy___en_usb0___lsb 0
610#define reg_pinmux_rw_usb_phy___en_usb0___width 1
611#define reg_pinmux_rw_usb_phy___en_usb0___bit 0
612#define reg_pinmux_rw_usb_phy___en_usb1___lsb 1
613#define reg_pinmux_rw_usb_phy___en_usb1___width 1
614#define reg_pinmux_rw_usb_phy___en_usb1___bit 1
615#define reg_pinmux_rw_usb_phy_offset 40
616
617
618/* Constants */
619#define regk_pinmux_no 0x00000000
620#define regk_pinmux_rw_hwprot_default 0x00000000
621#define regk_pinmux_rw_pa_default 0x00000000
622#define regk_pinmux_rw_pb_gio_default 0x00000000
623#define regk_pinmux_rw_pb_iop_default 0x00000000
624#define regk_pinmux_rw_pc_gio_default 0x00000000
625#define regk_pinmux_rw_pc_iop_default 0x00000000
626#define regk_pinmux_rw_pd_gio_default 0x00000000
627#define regk_pinmux_rw_pd_iop_default 0x00000000
628#define regk_pinmux_rw_pe_gio_default 0x00000000
629#define regk_pinmux_rw_pe_iop_default 0x00000000
630#define regk_pinmux_rw_usb_phy_default 0x00000000
631#define regk_pinmux_yes 0x00000001
632#endif /* __pinmux_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/reg_map_asm.h b/include/asm-cris/arch-v32/mach-fs/hwregs/asm/reg_map_asm.h
deleted file mode 100644
index 87517aebd2cb..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/reg_map_asm.h
+++ /dev/null
@@ -1,96 +0,0 @@
1#ifndef __reg_map_h
2#define __reg_map_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../mod/fakereg.rmap
7 * id: fakereg.rmap,v 1.3 2004/02/11 19:53:22 ronny Exp
8 * last modified: Wed Feb 11 20:53:25 2004
9 * file: ../../rtl/global.rmap
10 * id: global.rmap,v 1.3 2003/08/18 15:08:23 mikaeln Exp
11 * last modified: Mon Aug 18 17:08:23 2003
12 * file: ../../mod/modreg.rmap
13 * id: modreg.rmap,v 1.31 2004/02/20 15:40:04 stefans Exp
14 * last modified: Fri Feb 20 16:40:04 2004
15 *
16 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/reg_map_asm.h -base 0xb0000000 ../../rtl/global.rmap ../../mod/modreg.rmap ../../inst/memarb/rtl/guinness/marb_top.r ../../mod/fakereg.rmap
17 * id: $Id: reg_map_asm.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
18 * Any changes here will be lost.
19 *
20 * -*- buffer-read-only: t -*-
21 */
22#define regi_artpec_mod 0xb7044000
23#define regi_ata 0xb0032000
24#define regi_ata_mod 0xb7006000
25#define regi_barber 0xb701a000
26#define regi_bif_core 0xb0014000
27#define regi_bif_dma 0xb0016000
28#define regi_bif_slave 0xb0018000
29#define regi_bif_slave_ext 0xac000000
30#define regi_bus_master 0xb703c000
31#define regi_config 0xb003c000
32#define regi_dma0 0xb0000000
33#define regi_dma1 0xb0002000
34#define regi_dma2 0xb0004000
35#define regi_dma3 0xb0006000
36#define regi_dma4 0xb0008000
37#define regi_dma5 0xb000a000
38#define regi_dma6 0xb000c000
39#define regi_dma7 0xb000e000
40#define regi_dma8 0xb0010000
41#define regi_dma9 0xb0012000
42#define regi_eth0 0xb0034000
43#define regi_eth1 0xb0036000
44#define regi_eth_mod 0xb7004000
45#define regi_eth_mod1 0xb701c000
46#define regi_eth_strmod 0xb7008000
47#define regi_eth_strmod1 0xb7032000
48#define regi_ext_dma 0xb703a000
49#define regi_ext_mem 0xb7046000
50#define regi_gen_io 0xb7016000
51#define regi_gio 0xb001a000
52#define regi_hook 0xb7000000
53#define regi_iop 0xb0020000
54#define regi_irq 0xb001c000
55#define regi_irq_nmi 0xb701e000
56#define regi_marb 0xb003e000
57#define regi_marb_bp0 0xb003e240
58#define regi_marb_bp1 0xb003e280
59#define regi_marb_bp2 0xb003e2c0
60#define regi_marb_bp3 0xb003e300
61#define regi_nand_mod 0xb7014000
62#define regi_p21 0xb002e000
63#define regi_p21_mod 0xb7042000
64#define regi_pci_mod 0xb7010000
65#define regi_pin_test 0xb7018000
66#define regi_pinmux 0xb0038000
67#define regi_sdram_chk 0xb703e000
68#define regi_sdram_mod 0xb7012000
69#define regi_ser0 0xb0026000
70#define regi_ser1 0xb0028000
71#define regi_ser2 0xb002a000
72#define regi_ser3 0xb002c000
73#define regi_ser_mod0 0xb7020000
74#define regi_ser_mod1 0xb7022000
75#define regi_ser_mod2 0xb7024000
76#define regi_ser_mod3 0xb7026000
77#define regi_smif_stat 0xb700e000
78#define regi_sser0 0xb0022000
79#define regi_sser1 0xb0024000
80#define regi_sser_mod0 0xb700a000
81#define regi_sser_mod1 0xb700c000
82#define regi_strcop 0xb0030000
83#define regi_strmux 0xb003a000
84#define regi_strmux_tst 0xb7040000
85#define regi_tap 0xb7002000
86#define regi_timer 0xb001e000
87#define regi_timer_mod 0xb7034000
88#define regi_trace 0xb0040000
89#define regi_usb0 0xb7028000
90#define regi_usb1 0xb702a000
91#define regi_usb2 0xb702c000
92#define regi_usb3 0xb702e000
93#define regi_usb_dev 0xb7030000
94#define regi_utmi_mod0 0xb7036000
95#define regi_utmi_mod1 0xb7038000
96#endif /* __reg_map_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/timer_defs_asm.h b/include/asm-cris/arch-v32/mach-fs/hwregs/asm/timer_defs_asm.h
deleted file mode 100644
index e1197194d5c1..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/asm/timer_defs_asm.h
+++ /dev/null
@@ -1,229 +0,0 @@
1#ifndef __timer_defs_asm_h
2#define __timer_defs_asm_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/timer/rtl/timer_regs.r
7 * id: timer_regs.r,v 1.7 2003/03/11 11:16:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:53 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/timer_defs_asm.h ../../inst/timer/rtl/timer_regs.r
11 * id: $Id: timer_defs_asm.h,v 1.1 2007/04/11 13:51:01 ricardw Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16
17#ifndef REG_FIELD
18#define REG_FIELD( scope, reg, field, value ) \
19 REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
20#define REG_FIELD_X_( value, shift ) ((value) << shift)
21#endif
22
23#ifndef REG_STATE
24#define REG_STATE( scope, reg, field, symbolic_value ) \
25 REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
26#define REG_STATE_X_( k, shift ) (k << shift)
27#endif
28
29#ifndef REG_MASK
30#define REG_MASK( scope, reg, field ) \
31 REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
32#define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
33#endif
34
35#ifndef REG_LSB
36#define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
37#endif
38
39#ifndef REG_BIT
40#define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
41#endif
42
43#ifndef REG_ADDR
44#define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
45#define REG_ADDR_X_( inst, offs ) ((inst) + offs)
46#endif
47
48#ifndef REG_ADDR_VECT
49#define REG_ADDR_VECT( scope, inst, reg, index ) \
50 REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
51 STRIDE_##scope##_##reg )
52#define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
53 ((inst) + offs + (index) * stride)
54#endif
55
56/* Register rw_tmr0_div, scope timer, type rw */
57#define reg_timer_rw_tmr0_div_offset 0
58
59/* Register r_tmr0_data, scope timer, type r */
60#define reg_timer_r_tmr0_data_offset 4
61
62/* Register rw_tmr0_ctrl, scope timer, type rw */
63#define reg_timer_rw_tmr0_ctrl___op___lsb 0
64#define reg_timer_rw_tmr0_ctrl___op___width 2
65#define reg_timer_rw_tmr0_ctrl___freq___lsb 2
66#define reg_timer_rw_tmr0_ctrl___freq___width 3
67#define reg_timer_rw_tmr0_ctrl_offset 8
68
69/* Register rw_tmr1_div, scope timer, type rw */
70#define reg_timer_rw_tmr1_div_offset 16
71
72/* Register r_tmr1_data, scope timer, type r */
73#define reg_timer_r_tmr1_data_offset 20
74
75/* Register rw_tmr1_ctrl, scope timer, type rw */
76#define reg_timer_rw_tmr1_ctrl___op___lsb 0
77#define reg_timer_rw_tmr1_ctrl___op___width 2
78#define reg_timer_rw_tmr1_ctrl___freq___lsb 2
79#define reg_timer_rw_tmr1_ctrl___freq___width 3
80#define reg_timer_rw_tmr1_ctrl_offset 24
81
82/* Register rs_cnt_data, scope timer, type rs */
83#define reg_timer_rs_cnt_data___tmr___lsb 0
84#define reg_timer_rs_cnt_data___tmr___width 24
85#define reg_timer_rs_cnt_data___cnt___lsb 24
86#define reg_timer_rs_cnt_data___cnt___width 8
87#define reg_timer_rs_cnt_data_offset 32
88
89/* Register r_cnt_data, scope timer, type r */
90#define reg_timer_r_cnt_data___tmr___lsb 0
91#define reg_timer_r_cnt_data___tmr___width 24
92#define reg_timer_r_cnt_data___cnt___lsb 24
93#define reg_timer_r_cnt_data___cnt___width 8
94#define reg_timer_r_cnt_data_offset 36
95
96/* Register rw_cnt_cfg, scope timer, type rw */
97#define reg_timer_rw_cnt_cfg___clk___lsb 0
98#define reg_timer_rw_cnt_cfg___clk___width 2
99#define reg_timer_rw_cnt_cfg_offset 40
100
101/* Register rw_trig, scope timer, type rw */
102#define reg_timer_rw_trig_offset 48
103
104/* Register rw_trig_cfg, scope timer, type rw */
105#define reg_timer_rw_trig_cfg___tmr___lsb 0
106#define reg_timer_rw_trig_cfg___tmr___width 2
107#define reg_timer_rw_trig_cfg_offset 52
108
109/* Register r_time, scope timer, type r */
110#define reg_timer_r_time_offset 56
111
112/* Register rw_out, scope timer, type rw */
113#define reg_timer_rw_out___tmr___lsb 0
114#define reg_timer_rw_out___tmr___width 2
115#define reg_timer_rw_out_offset 60
116
117/* Register rw_wd_ctrl, scope timer, type rw */
118#define reg_timer_rw_wd_ctrl___cnt___lsb 0
119#define reg_timer_rw_wd_ctrl___cnt___width 8
120#define reg_timer_rw_wd_ctrl___cmd___lsb 8
121#define reg_timer_rw_wd_ctrl___cmd___width 1
122#define reg_timer_rw_wd_ctrl___cmd___bit 8
123#define reg_timer_rw_wd_ctrl___key___lsb 9
124#define reg_timer_rw_wd_ctrl___key___width 7
125#define reg_timer_rw_wd_ctrl_offset 64
126
127/* Register r_wd_stat, scope timer, type r */
128#define reg_timer_r_wd_stat___cnt___lsb 0
129#define reg_timer_r_wd_stat___cnt___width 8
130#define reg_timer_r_wd_stat___cmd___lsb 8
131#define reg_timer_r_wd_stat___cmd___width 1
132#define reg_timer_r_wd_stat___cmd___bit 8
133#define reg_timer_r_wd_stat_offset 68
134
135/* Register rw_intr_mask, scope timer, type rw */
136#define reg_timer_rw_intr_mask___tmr0___lsb 0
137#define reg_timer_rw_intr_mask___tmr0___width 1
138#define reg_timer_rw_intr_mask___tmr0___bit 0
139#define reg_timer_rw_intr_mask___tmr1___lsb 1
140#define reg_timer_rw_intr_mask___tmr1___width 1
141#define reg_timer_rw_intr_mask___tmr1___bit 1
142#define reg_timer_rw_intr_mask___cnt___lsb 2
143#define reg_timer_rw_intr_mask___cnt___width 1
144#define reg_timer_rw_intr_mask___cnt___bit 2
145#define reg_timer_rw_intr_mask___trig___lsb 3
146#define reg_timer_rw_intr_mask___trig___width 1
147#define reg_timer_rw_intr_mask___trig___bit 3
148#define reg_timer_rw_intr_mask_offset 72
149
150/* Register rw_ack_intr, scope timer, type rw */
151#define reg_timer_rw_ack_intr___tmr0___lsb 0
152#define reg_timer_rw_ack_intr___tmr0___width 1
153#define reg_timer_rw_ack_intr___tmr0___bit 0
154#define reg_timer_rw_ack_intr___tmr1___lsb 1
155#define reg_timer_rw_ack_intr___tmr1___width 1
156#define reg_timer_rw_ack_intr___tmr1___bit 1
157#define reg_timer_rw_ack_intr___cnt___lsb 2
158#define reg_timer_rw_ack_intr___cnt___width 1
159#define reg_timer_rw_ack_intr___cnt___bit 2
160#define reg_timer_rw_ack_intr___trig___lsb 3
161#define reg_timer_rw_ack_intr___trig___width 1
162#define reg_timer_rw_ack_intr___trig___bit 3
163#define reg_timer_rw_ack_intr_offset 76
164
165/* Register r_intr, scope timer, type r */
166#define reg_timer_r_intr___tmr0___lsb 0
167#define reg_timer_r_intr___tmr0___width 1
168#define reg_timer_r_intr___tmr0___bit 0
169#define reg_timer_r_intr___tmr1___lsb 1
170#define reg_timer_r_intr___tmr1___width 1
171#define reg_timer_r_intr___tmr1___bit 1
172#define reg_timer_r_intr___cnt___lsb 2
173#define reg_timer_r_intr___cnt___width 1
174#define reg_timer_r_intr___cnt___bit 2
175#define reg_timer_r_intr___trig___lsb 3
176#define reg_timer_r_intr___trig___width 1
177#define reg_timer_r_intr___trig___bit 3
178#define reg_timer_r_intr_offset 80
179
180/* Register r_masked_intr, scope timer, type r */
181#define reg_timer_r_masked_intr___tmr0___lsb 0
182#define reg_timer_r_masked_intr___tmr0___width 1
183#define reg_timer_r_masked_intr___tmr0___bit 0
184#define reg_timer_r_masked_intr___tmr1___lsb 1
185#define reg_timer_r_masked_intr___tmr1___width 1
186#define reg_timer_r_masked_intr___tmr1___bit 1
187#define reg_timer_r_masked_intr___cnt___lsb 2
188#define reg_timer_r_masked_intr___cnt___width 1
189#define reg_timer_r_masked_intr___cnt___bit 2
190#define reg_timer_r_masked_intr___trig___lsb 3
191#define reg_timer_r_masked_intr___trig___width 1
192#define reg_timer_r_masked_intr___trig___bit 3
193#define reg_timer_r_masked_intr_offset 84
194
195/* Register rw_test, scope timer, type rw */
196#define reg_timer_rw_test___dis___lsb 0
197#define reg_timer_rw_test___dis___width 1
198#define reg_timer_rw_test___dis___bit 0
199#define reg_timer_rw_test___en___lsb 1
200#define reg_timer_rw_test___en___width 1
201#define reg_timer_rw_test___en___bit 1
202#define reg_timer_rw_test_offset 88
203
204
205/* Constants */
206#define regk_timer_ext 0x00000001
207#define regk_timer_f100 0x00000007
208#define regk_timer_f29_493 0x00000004
209#define regk_timer_f32 0x00000005
210#define regk_timer_f32_768 0x00000006
211#define regk_timer_hold 0x00000001
212#define regk_timer_ld 0x00000000
213#define regk_timer_no 0x00000000
214#define regk_timer_off 0x00000000
215#define regk_timer_run 0x00000002
216#define regk_timer_rw_cnt_cfg_default 0x00000000
217#define regk_timer_rw_intr_mask_default 0x00000000
218#define regk_timer_rw_out_default 0x00000000
219#define regk_timer_rw_test_default 0x00000000
220#define regk_timer_rw_tmr0_ctrl_default 0x00000000
221#define regk_timer_rw_tmr1_ctrl_default 0x00000000
222#define regk_timer_rw_trig_cfg_default 0x00000000
223#define regk_timer_start 0x00000001
224#define regk_timer_stop 0x00000000
225#define regk_timer_time 0x00000001
226#define regk_timer_tmr0 0x00000002
227#define regk_timer_tmr1 0x00000003
228#define regk_timer_yes 0x00000001
229#endif /* __timer_defs_asm_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/bif_core_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/bif_core_defs.h
deleted file mode 100644
index 44362a62b47c..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/bif_core_defs.h
+++ /dev/null
@@ -1,284 +0,0 @@
1#ifndef __bif_core_defs_h
2#define __bif_core_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_core_regs.r
7 * id: bif_core_regs.r,v 1.17 2005/02/04 13:28:22 np Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_core_defs.h ../../inst/bif/rtl/bif_core_regs.r
11 * id: $Id: bif_core_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope bif_core */
86
87/* Register rw_grp1_cfg, scope bif_core, type rw */
88typedef struct {
89 unsigned int lw : 6;
90 unsigned int ew : 3;
91 unsigned int zw : 3;
92 unsigned int aw : 2;
93 unsigned int dw : 2;
94 unsigned int ewb : 2;
95 unsigned int bw : 1;
96 unsigned int wr_extend : 1;
97 unsigned int erc_en : 1;
98 unsigned int mode : 1;
99 unsigned int dummy1 : 10;
100} reg_bif_core_rw_grp1_cfg;
101#define REG_RD_ADDR_bif_core_rw_grp1_cfg 0
102#define REG_WR_ADDR_bif_core_rw_grp1_cfg 0
103
104/* Register rw_grp2_cfg, scope bif_core, type rw */
105typedef struct {
106 unsigned int lw : 6;
107 unsigned int ew : 3;
108 unsigned int zw : 3;
109 unsigned int aw : 2;
110 unsigned int dw : 2;
111 unsigned int ewb : 2;
112 unsigned int bw : 1;
113 unsigned int wr_extend : 1;
114 unsigned int erc_en : 1;
115 unsigned int mode : 1;
116 unsigned int dummy1 : 10;
117} reg_bif_core_rw_grp2_cfg;
118#define REG_RD_ADDR_bif_core_rw_grp2_cfg 4
119#define REG_WR_ADDR_bif_core_rw_grp2_cfg 4
120
121/* Register rw_grp3_cfg, scope bif_core, type rw */
122typedef struct {
123 unsigned int lw : 6;
124 unsigned int ew : 3;
125 unsigned int zw : 3;
126 unsigned int aw : 2;
127 unsigned int dw : 2;
128 unsigned int ewb : 2;
129 unsigned int bw : 1;
130 unsigned int wr_extend : 1;
131 unsigned int erc_en : 1;
132 unsigned int mode : 1;
133 unsigned int dummy1 : 2;
134 unsigned int gated_csp0 : 2;
135 unsigned int gated_csp1 : 2;
136 unsigned int gated_csp2 : 2;
137 unsigned int gated_csp3 : 2;
138} reg_bif_core_rw_grp3_cfg;
139#define REG_RD_ADDR_bif_core_rw_grp3_cfg 8
140#define REG_WR_ADDR_bif_core_rw_grp3_cfg 8
141
142/* Register rw_grp4_cfg, scope bif_core, type rw */
143typedef struct {
144 unsigned int lw : 6;
145 unsigned int ew : 3;
146 unsigned int zw : 3;
147 unsigned int aw : 2;
148 unsigned int dw : 2;
149 unsigned int ewb : 2;
150 unsigned int bw : 1;
151 unsigned int wr_extend : 1;
152 unsigned int erc_en : 1;
153 unsigned int mode : 1;
154 unsigned int dummy1 : 4;
155 unsigned int gated_csp4 : 2;
156 unsigned int gated_csp5 : 2;
157 unsigned int gated_csp6 : 2;
158} reg_bif_core_rw_grp4_cfg;
159#define REG_RD_ADDR_bif_core_rw_grp4_cfg 12
160#define REG_WR_ADDR_bif_core_rw_grp4_cfg 12
161
162/* Register rw_sdram_cfg_grp0, scope bif_core, type rw */
163typedef struct {
164 unsigned int bank_sel : 5;
165 unsigned int ca : 3;
166 unsigned int type : 1;
167 unsigned int bw : 1;
168 unsigned int sh : 3;
169 unsigned int wmm : 1;
170 unsigned int sh16 : 1;
171 unsigned int grp_sel : 5;
172 unsigned int dummy1 : 12;
173} reg_bif_core_rw_sdram_cfg_grp0;
174#define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp0 16
175#define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp0 16
176
177/* Register rw_sdram_cfg_grp1, scope bif_core, type rw */
178typedef struct {
179 unsigned int bank_sel : 5;
180 unsigned int ca : 3;
181 unsigned int type : 1;
182 unsigned int bw : 1;
183 unsigned int sh : 3;
184 unsigned int wmm : 1;
185 unsigned int sh16 : 1;
186 unsigned int dummy1 : 17;
187} reg_bif_core_rw_sdram_cfg_grp1;
188#define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp1 20
189#define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp1 20
190
191/* Register rw_sdram_timing, scope bif_core, type rw */
192typedef struct {
193 unsigned int cl : 3;
194 unsigned int rcd : 3;
195 unsigned int rp : 3;
196 unsigned int rc : 2;
197 unsigned int dpl : 2;
198 unsigned int pde : 1;
199 unsigned int ref : 2;
200 unsigned int cpd : 1;
201 unsigned int sdcke : 1;
202 unsigned int sdclk : 1;
203 unsigned int dummy1 : 13;
204} reg_bif_core_rw_sdram_timing;
205#define REG_RD_ADDR_bif_core_rw_sdram_timing 24
206#define REG_WR_ADDR_bif_core_rw_sdram_timing 24
207
208/* Register rw_sdram_cmd, scope bif_core, type rw */
209typedef struct {
210 unsigned int cmd : 3;
211 unsigned int mrs_data : 15;
212 unsigned int dummy1 : 14;
213} reg_bif_core_rw_sdram_cmd;
214#define REG_RD_ADDR_bif_core_rw_sdram_cmd 28
215#define REG_WR_ADDR_bif_core_rw_sdram_cmd 28
216
217/* Register rs_sdram_ref_stat, scope bif_core, type rs */
218typedef struct {
219 unsigned int ok : 1;
220 unsigned int dummy1 : 31;
221} reg_bif_core_rs_sdram_ref_stat;
222#define REG_RD_ADDR_bif_core_rs_sdram_ref_stat 32
223
224/* Register r_sdram_ref_stat, scope bif_core, type r */
225typedef struct {
226 unsigned int ok : 1;
227 unsigned int dummy1 : 31;
228} reg_bif_core_r_sdram_ref_stat;
229#define REG_RD_ADDR_bif_core_r_sdram_ref_stat 36
230
231
232/* Constants */
233enum {
234 regk_bif_core_bank2 = 0x00000000,
235 regk_bif_core_bank4 = 0x00000001,
236 regk_bif_core_bit10 = 0x0000000a,
237 regk_bif_core_bit11 = 0x0000000b,
238 regk_bif_core_bit12 = 0x0000000c,
239 regk_bif_core_bit13 = 0x0000000d,
240 regk_bif_core_bit14 = 0x0000000e,
241 regk_bif_core_bit15 = 0x0000000f,
242 regk_bif_core_bit16 = 0x00000010,
243 regk_bif_core_bit17 = 0x00000011,
244 regk_bif_core_bit18 = 0x00000012,
245 regk_bif_core_bit19 = 0x00000013,
246 regk_bif_core_bit20 = 0x00000014,
247 regk_bif_core_bit21 = 0x00000015,
248 regk_bif_core_bit22 = 0x00000016,
249 regk_bif_core_bit23 = 0x00000017,
250 regk_bif_core_bit24 = 0x00000018,
251 regk_bif_core_bit25 = 0x00000019,
252 regk_bif_core_bit26 = 0x0000001a,
253 regk_bif_core_bit27 = 0x0000001b,
254 regk_bif_core_bit28 = 0x0000001c,
255 regk_bif_core_bit29 = 0x0000001d,
256 regk_bif_core_bit9 = 0x00000009,
257 regk_bif_core_bw16 = 0x00000001,
258 regk_bif_core_bw32 = 0x00000000,
259 regk_bif_core_bwe = 0x00000000,
260 regk_bif_core_cwe = 0x00000001,
261 regk_bif_core_e15us = 0x00000001,
262 regk_bif_core_e7800ns = 0x00000002,
263 regk_bif_core_grp0 = 0x00000000,
264 regk_bif_core_grp1 = 0x00000001,
265 regk_bif_core_mrs = 0x00000003,
266 regk_bif_core_no = 0x00000000,
267 regk_bif_core_none = 0x00000000,
268 regk_bif_core_nop = 0x00000000,
269 regk_bif_core_off = 0x00000000,
270 regk_bif_core_pre = 0x00000002,
271 regk_bif_core_r_sdram_ref_stat_default = 0x00000001,
272 regk_bif_core_rd = 0x00000002,
273 regk_bif_core_ref = 0x00000001,
274 regk_bif_core_rs_sdram_ref_stat_default = 0x00000001,
275 regk_bif_core_rw_grp1_cfg_default = 0x000006cf,
276 regk_bif_core_rw_grp2_cfg_default = 0x000006cf,
277 regk_bif_core_rw_grp3_cfg_default = 0x000006cf,
278 regk_bif_core_rw_grp4_cfg_default = 0x000006cf,
279 regk_bif_core_rw_sdram_cfg_grp1_default = 0x00000000,
280 regk_bif_core_slf = 0x00000004,
281 regk_bif_core_wr = 0x00000001,
282 regk_bif_core_yes = 0x00000001
283};
284#endif /* __bif_core_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/bif_dma_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/bif_dma_defs.h
deleted file mode 100644
index 3cb51a09dba7..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/bif_dma_defs.h
+++ /dev/null
@@ -1,473 +0,0 @@
1#ifndef __bif_dma_defs_h
2#define __bif_dma_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_dma_regs.r
7 * id: bif_dma_regs.r,v 1.6 2005/02/04 13:28:31 perz Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_dma_defs.h ../../inst/bif/rtl/bif_dma_regs.r
11 * id: $Id: bif_dma_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope bif_dma */
86
87/* Register rw_ch0_ctrl, scope bif_dma, type rw */
88typedef struct {
89 unsigned int bw : 2;
90 unsigned int burst_len : 1;
91 unsigned int cont : 1;
92 unsigned int end_pad : 1;
93 unsigned int cnt : 1;
94 unsigned int dreq_pin : 3;
95 unsigned int dreq_mode : 2;
96 unsigned int tc_in_pin : 3;
97 unsigned int tc_in_mode : 2;
98 unsigned int bus_mode : 2;
99 unsigned int rate_en : 1;
100 unsigned int wr_all : 1;
101 unsigned int dummy1 : 12;
102} reg_bif_dma_rw_ch0_ctrl;
103#define REG_RD_ADDR_bif_dma_rw_ch0_ctrl 0
104#define REG_WR_ADDR_bif_dma_rw_ch0_ctrl 0
105
106/* Register rw_ch0_addr, scope bif_dma, type rw */
107typedef struct {
108 unsigned int addr : 32;
109} reg_bif_dma_rw_ch0_addr;
110#define REG_RD_ADDR_bif_dma_rw_ch0_addr 4
111#define REG_WR_ADDR_bif_dma_rw_ch0_addr 4
112
113/* Register rw_ch0_start, scope bif_dma, type rw */
114typedef struct {
115 unsigned int run : 1;
116 unsigned int dummy1 : 31;
117} reg_bif_dma_rw_ch0_start;
118#define REG_RD_ADDR_bif_dma_rw_ch0_start 8
119#define REG_WR_ADDR_bif_dma_rw_ch0_start 8
120
121/* Register rw_ch0_cnt, scope bif_dma, type rw */
122typedef struct {
123 unsigned int start_cnt : 16;
124 unsigned int dummy1 : 16;
125} reg_bif_dma_rw_ch0_cnt;
126#define REG_RD_ADDR_bif_dma_rw_ch0_cnt 12
127#define REG_WR_ADDR_bif_dma_rw_ch0_cnt 12
128
129/* Register r_ch0_stat, scope bif_dma, type r */
130typedef struct {
131 unsigned int cnt : 16;
132 unsigned int dummy1 : 15;
133 unsigned int run : 1;
134} reg_bif_dma_r_ch0_stat;
135#define REG_RD_ADDR_bif_dma_r_ch0_stat 16
136
137/* Register rw_ch1_ctrl, scope bif_dma, type rw */
138typedef struct {
139 unsigned int bw : 2;
140 unsigned int burst_len : 1;
141 unsigned int cont : 1;
142 unsigned int end_discard : 1;
143 unsigned int cnt : 1;
144 unsigned int dreq_pin : 3;
145 unsigned int dreq_mode : 2;
146 unsigned int tc_in_pin : 3;
147 unsigned int tc_in_mode : 2;
148 unsigned int bus_mode : 2;
149 unsigned int rate_en : 1;
150 unsigned int dummy1 : 13;
151} reg_bif_dma_rw_ch1_ctrl;
152#define REG_RD_ADDR_bif_dma_rw_ch1_ctrl 32
153#define REG_WR_ADDR_bif_dma_rw_ch1_ctrl 32
154
155/* Register rw_ch1_addr, scope bif_dma, type rw */
156typedef struct {
157 unsigned int addr : 32;
158} reg_bif_dma_rw_ch1_addr;
159#define REG_RD_ADDR_bif_dma_rw_ch1_addr 36
160#define REG_WR_ADDR_bif_dma_rw_ch1_addr 36
161
162/* Register rw_ch1_start, scope bif_dma, type rw */
163typedef struct {
164 unsigned int run : 1;
165 unsigned int dummy1 : 31;
166} reg_bif_dma_rw_ch1_start;
167#define REG_RD_ADDR_bif_dma_rw_ch1_start 40
168#define REG_WR_ADDR_bif_dma_rw_ch1_start 40
169
170/* Register rw_ch1_cnt, scope bif_dma, type rw */
171typedef struct {
172 unsigned int start_cnt : 16;
173 unsigned int dummy1 : 16;
174} reg_bif_dma_rw_ch1_cnt;
175#define REG_RD_ADDR_bif_dma_rw_ch1_cnt 44
176#define REG_WR_ADDR_bif_dma_rw_ch1_cnt 44
177
178/* Register r_ch1_stat, scope bif_dma, type r */
179typedef struct {
180 unsigned int cnt : 16;
181 unsigned int dummy1 : 15;
182 unsigned int run : 1;
183} reg_bif_dma_r_ch1_stat;
184#define REG_RD_ADDR_bif_dma_r_ch1_stat 48
185
186/* Register rw_ch2_ctrl, scope bif_dma, type rw */
187typedef struct {
188 unsigned int bw : 2;
189 unsigned int burst_len : 1;
190 unsigned int cont : 1;
191 unsigned int end_pad : 1;
192 unsigned int cnt : 1;
193 unsigned int dreq_pin : 3;
194 unsigned int dreq_mode : 2;
195 unsigned int tc_in_pin : 3;
196 unsigned int tc_in_mode : 2;
197 unsigned int bus_mode : 2;
198 unsigned int rate_en : 1;
199 unsigned int wr_all : 1;
200 unsigned int dummy1 : 12;
201} reg_bif_dma_rw_ch2_ctrl;
202#define REG_RD_ADDR_bif_dma_rw_ch2_ctrl 64
203#define REG_WR_ADDR_bif_dma_rw_ch2_ctrl 64
204
205/* Register rw_ch2_addr, scope bif_dma, type rw */
206typedef struct {
207 unsigned int addr : 32;
208} reg_bif_dma_rw_ch2_addr;
209#define REG_RD_ADDR_bif_dma_rw_ch2_addr 68
210#define REG_WR_ADDR_bif_dma_rw_ch2_addr 68
211
212/* Register rw_ch2_start, scope bif_dma, type rw */
213typedef struct {
214 unsigned int run : 1;
215 unsigned int dummy1 : 31;
216} reg_bif_dma_rw_ch2_start;
217#define REG_RD_ADDR_bif_dma_rw_ch2_start 72
218#define REG_WR_ADDR_bif_dma_rw_ch2_start 72
219
220/* Register rw_ch2_cnt, scope bif_dma, type rw */
221typedef struct {
222 unsigned int start_cnt : 16;
223 unsigned int dummy1 : 16;
224} reg_bif_dma_rw_ch2_cnt;
225#define REG_RD_ADDR_bif_dma_rw_ch2_cnt 76
226#define REG_WR_ADDR_bif_dma_rw_ch2_cnt 76
227
228/* Register r_ch2_stat, scope bif_dma, type r */
229typedef struct {
230 unsigned int cnt : 16;
231 unsigned int dummy1 : 15;
232 unsigned int run : 1;
233} reg_bif_dma_r_ch2_stat;
234#define REG_RD_ADDR_bif_dma_r_ch2_stat 80
235
236/* Register rw_ch3_ctrl, scope bif_dma, type rw */
237typedef struct {
238 unsigned int bw : 2;
239 unsigned int burst_len : 1;
240 unsigned int cont : 1;
241 unsigned int end_discard : 1;
242 unsigned int cnt : 1;
243 unsigned int dreq_pin : 3;
244 unsigned int dreq_mode : 2;
245 unsigned int tc_in_pin : 3;
246 unsigned int tc_in_mode : 2;
247 unsigned int bus_mode : 2;
248 unsigned int rate_en : 1;
249 unsigned int dummy1 : 13;
250} reg_bif_dma_rw_ch3_ctrl;
251#define REG_RD_ADDR_bif_dma_rw_ch3_ctrl 96
252#define REG_WR_ADDR_bif_dma_rw_ch3_ctrl 96
253
254/* Register rw_ch3_addr, scope bif_dma, type rw */
255typedef struct {
256 unsigned int addr : 32;
257} reg_bif_dma_rw_ch3_addr;
258#define REG_RD_ADDR_bif_dma_rw_ch3_addr 100
259#define REG_WR_ADDR_bif_dma_rw_ch3_addr 100
260
261/* Register rw_ch3_start, scope bif_dma, type rw */
262typedef struct {
263 unsigned int run : 1;
264 unsigned int dummy1 : 31;
265} reg_bif_dma_rw_ch3_start;
266#define REG_RD_ADDR_bif_dma_rw_ch3_start 104
267#define REG_WR_ADDR_bif_dma_rw_ch3_start 104
268
269/* Register rw_ch3_cnt, scope bif_dma, type rw */
270typedef struct {
271 unsigned int start_cnt : 16;
272 unsigned int dummy1 : 16;
273} reg_bif_dma_rw_ch3_cnt;
274#define REG_RD_ADDR_bif_dma_rw_ch3_cnt 108
275#define REG_WR_ADDR_bif_dma_rw_ch3_cnt 108
276
277/* Register r_ch3_stat, scope bif_dma, type r */
278typedef struct {
279 unsigned int cnt : 16;
280 unsigned int dummy1 : 15;
281 unsigned int run : 1;
282} reg_bif_dma_r_ch3_stat;
283#define REG_RD_ADDR_bif_dma_r_ch3_stat 112
284
285/* Register rw_intr_mask, scope bif_dma, type rw */
286typedef struct {
287 unsigned int ext_dma0 : 1;
288 unsigned int ext_dma1 : 1;
289 unsigned int ext_dma2 : 1;
290 unsigned int ext_dma3 : 1;
291 unsigned int dummy1 : 28;
292} reg_bif_dma_rw_intr_mask;
293#define REG_RD_ADDR_bif_dma_rw_intr_mask 128
294#define REG_WR_ADDR_bif_dma_rw_intr_mask 128
295
296/* Register rw_ack_intr, scope bif_dma, type rw */
297typedef struct {
298 unsigned int ext_dma0 : 1;
299 unsigned int ext_dma1 : 1;
300 unsigned int ext_dma2 : 1;
301 unsigned int ext_dma3 : 1;
302 unsigned int dummy1 : 28;
303} reg_bif_dma_rw_ack_intr;
304#define REG_RD_ADDR_bif_dma_rw_ack_intr 132
305#define REG_WR_ADDR_bif_dma_rw_ack_intr 132
306
307/* Register r_intr, scope bif_dma, type r */
308typedef struct {
309 unsigned int ext_dma0 : 1;
310 unsigned int ext_dma1 : 1;
311 unsigned int ext_dma2 : 1;
312 unsigned int ext_dma3 : 1;
313 unsigned int dummy1 : 28;
314} reg_bif_dma_r_intr;
315#define REG_RD_ADDR_bif_dma_r_intr 136
316
317/* Register r_masked_intr, scope bif_dma, type r */
318typedef struct {
319 unsigned int ext_dma0 : 1;
320 unsigned int ext_dma1 : 1;
321 unsigned int ext_dma2 : 1;
322 unsigned int ext_dma3 : 1;
323 unsigned int dummy1 : 28;
324} reg_bif_dma_r_masked_intr;
325#define REG_RD_ADDR_bif_dma_r_masked_intr 140
326
327/* Register rw_pin0_cfg, scope bif_dma, type rw */
328typedef struct {
329 unsigned int master_ch : 2;
330 unsigned int master_mode : 3;
331 unsigned int slave_ch : 2;
332 unsigned int slave_mode : 3;
333 unsigned int dummy1 : 22;
334} reg_bif_dma_rw_pin0_cfg;
335#define REG_RD_ADDR_bif_dma_rw_pin0_cfg 160
336#define REG_WR_ADDR_bif_dma_rw_pin0_cfg 160
337
338/* Register rw_pin1_cfg, scope bif_dma, type rw */
339typedef struct {
340 unsigned int master_ch : 2;
341 unsigned int master_mode : 3;
342 unsigned int slave_ch : 2;
343 unsigned int slave_mode : 3;
344 unsigned int dummy1 : 22;
345} reg_bif_dma_rw_pin1_cfg;
346#define REG_RD_ADDR_bif_dma_rw_pin1_cfg 164
347#define REG_WR_ADDR_bif_dma_rw_pin1_cfg 164
348
349/* Register rw_pin2_cfg, scope bif_dma, type rw */
350typedef struct {
351 unsigned int master_ch : 2;
352 unsigned int master_mode : 3;
353 unsigned int slave_ch : 2;
354 unsigned int slave_mode : 3;
355 unsigned int dummy1 : 22;
356} reg_bif_dma_rw_pin2_cfg;
357#define REG_RD_ADDR_bif_dma_rw_pin2_cfg 168
358#define REG_WR_ADDR_bif_dma_rw_pin2_cfg 168
359
360/* Register rw_pin3_cfg, scope bif_dma, type rw */
361typedef struct {
362 unsigned int master_ch : 2;
363 unsigned int master_mode : 3;
364 unsigned int slave_ch : 2;
365 unsigned int slave_mode : 3;
366 unsigned int dummy1 : 22;
367} reg_bif_dma_rw_pin3_cfg;
368#define REG_RD_ADDR_bif_dma_rw_pin3_cfg 172
369#define REG_WR_ADDR_bif_dma_rw_pin3_cfg 172
370
371/* Register rw_pin4_cfg, scope bif_dma, type rw */
372typedef struct {
373 unsigned int master_ch : 2;
374 unsigned int master_mode : 3;
375 unsigned int slave_ch : 2;
376 unsigned int slave_mode : 3;
377 unsigned int dummy1 : 22;
378} reg_bif_dma_rw_pin4_cfg;
379#define REG_RD_ADDR_bif_dma_rw_pin4_cfg 176
380#define REG_WR_ADDR_bif_dma_rw_pin4_cfg 176
381
382/* Register rw_pin5_cfg, scope bif_dma, type rw */
383typedef struct {
384 unsigned int master_ch : 2;
385 unsigned int master_mode : 3;
386 unsigned int slave_ch : 2;
387 unsigned int slave_mode : 3;
388 unsigned int dummy1 : 22;
389} reg_bif_dma_rw_pin5_cfg;
390#define REG_RD_ADDR_bif_dma_rw_pin5_cfg 180
391#define REG_WR_ADDR_bif_dma_rw_pin5_cfg 180
392
393/* Register rw_pin6_cfg, scope bif_dma, type rw */
394typedef struct {
395 unsigned int master_ch : 2;
396 unsigned int master_mode : 3;
397 unsigned int slave_ch : 2;
398 unsigned int slave_mode : 3;
399 unsigned int dummy1 : 22;
400} reg_bif_dma_rw_pin6_cfg;
401#define REG_RD_ADDR_bif_dma_rw_pin6_cfg 184
402#define REG_WR_ADDR_bif_dma_rw_pin6_cfg 184
403
404/* Register rw_pin7_cfg, scope bif_dma, type rw */
405typedef struct {
406 unsigned int master_ch : 2;
407 unsigned int master_mode : 3;
408 unsigned int slave_ch : 2;
409 unsigned int slave_mode : 3;
410 unsigned int dummy1 : 22;
411} reg_bif_dma_rw_pin7_cfg;
412#define REG_RD_ADDR_bif_dma_rw_pin7_cfg 188
413#define REG_WR_ADDR_bif_dma_rw_pin7_cfg 188
414
415/* Register r_pin_stat, scope bif_dma, type r */
416typedef struct {
417 unsigned int pin0 : 1;
418 unsigned int pin1 : 1;
419 unsigned int pin2 : 1;
420 unsigned int pin3 : 1;
421 unsigned int pin4 : 1;
422 unsigned int pin5 : 1;
423 unsigned int pin6 : 1;
424 unsigned int pin7 : 1;
425 unsigned int dummy1 : 24;
426} reg_bif_dma_r_pin_stat;
427#define REG_RD_ADDR_bif_dma_r_pin_stat 192
428
429
430/* Constants */
431enum {
432 regk_bif_dma_as_master = 0x00000001,
433 regk_bif_dma_as_slave = 0x00000001,
434 regk_bif_dma_burst1 = 0x00000000,
435 regk_bif_dma_burst8 = 0x00000001,
436 regk_bif_dma_bw16 = 0x00000001,
437 regk_bif_dma_bw32 = 0x00000002,
438 regk_bif_dma_bw8 = 0x00000000,
439 regk_bif_dma_dack = 0x00000006,
440 regk_bif_dma_dack_inv = 0x00000007,
441 regk_bif_dma_force = 0x00000001,
442 regk_bif_dma_hi = 0x00000003,
443 regk_bif_dma_inv = 0x00000003,
444 regk_bif_dma_lo = 0x00000002,
445 regk_bif_dma_master = 0x00000001,
446 regk_bif_dma_no = 0x00000000,
447 regk_bif_dma_norm = 0x00000002,
448 regk_bif_dma_off = 0x00000000,
449 regk_bif_dma_rw_ch0_ctrl_default = 0x00000000,
450 regk_bif_dma_rw_ch0_start_default = 0x00000000,
451 regk_bif_dma_rw_ch1_ctrl_default = 0x00000000,
452 regk_bif_dma_rw_ch1_start_default = 0x00000000,
453 regk_bif_dma_rw_ch2_ctrl_default = 0x00000000,
454 regk_bif_dma_rw_ch2_start_default = 0x00000000,
455 regk_bif_dma_rw_ch3_ctrl_default = 0x00000000,
456 regk_bif_dma_rw_ch3_start_default = 0x00000000,
457 regk_bif_dma_rw_intr_mask_default = 0x00000000,
458 regk_bif_dma_rw_pin0_cfg_default = 0x00000000,
459 regk_bif_dma_rw_pin1_cfg_default = 0x00000000,
460 regk_bif_dma_rw_pin2_cfg_default = 0x00000000,
461 regk_bif_dma_rw_pin3_cfg_default = 0x00000000,
462 regk_bif_dma_rw_pin4_cfg_default = 0x00000000,
463 regk_bif_dma_rw_pin5_cfg_default = 0x00000000,
464 regk_bif_dma_rw_pin6_cfg_default = 0x00000000,
465 regk_bif_dma_rw_pin7_cfg_default = 0x00000000,
466 regk_bif_dma_slave = 0x00000002,
467 regk_bif_dma_sreq = 0x00000006,
468 regk_bif_dma_sreq_inv = 0x00000007,
469 regk_bif_dma_tc = 0x00000004,
470 regk_bif_dma_tc_inv = 0x00000005,
471 regk_bif_dma_yes = 0x00000001
472};
473#endif /* __bif_dma_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/bif_slave_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/bif_slave_defs.h
deleted file mode 100644
index 0c434585a3f9..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/bif_slave_defs.h
+++ /dev/null
@@ -1,249 +0,0 @@
1#ifndef __bif_slave_defs_h
2#define __bif_slave_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_slave_regs.r
7 * id: bif_slave_regs.r,v 1.5 2005/02/04 13:55:28 perz Exp
8 * last modfied: Mon Apr 11 16:06:34 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_slave_defs.h ../../inst/bif/rtl/bif_slave_regs.r
11 * id: $Id: bif_slave_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope bif_slave */
86
87/* Register rw_slave_cfg, scope bif_slave, type rw */
88typedef struct {
89 unsigned int slave_id : 3;
90 unsigned int use_slave_id : 1;
91 unsigned int boot_rdy : 1;
92 unsigned int loopback : 1;
93 unsigned int dis : 1;
94 unsigned int dummy1 : 25;
95} reg_bif_slave_rw_slave_cfg;
96#define REG_RD_ADDR_bif_slave_rw_slave_cfg 0
97#define REG_WR_ADDR_bif_slave_rw_slave_cfg 0
98
99/* Register r_slave_mode, scope bif_slave, type r */
100typedef struct {
101 unsigned int ch0_mode : 1;
102 unsigned int ch1_mode : 1;
103 unsigned int ch2_mode : 1;
104 unsigned int ch3_mode : 1;
105 unsigned int dummy1 : 28;
106} reg_bif_slave_r_slave_mode;
107#define REG_RD_ADDR_bif_slave_r_slave_mode 4
108
109/* Register rw_ch0_cfg, scope bif_slave, type rw */
110typedef struct {
111 unsigned int rd_hold : 2;
112 unsigned int access_mode : 1;
113 unsigned int access_ctrl : 1;
114 unsigned int data_cs : 2;
115 unsigned int dummy1 : 26;
116} reg_bif_slave_rw_ch0_cfg;
117#define REG_RD_ADDR_bif_slave_rw_ch0_cfg 16
118#define REG_WR_ADDR_bif_slave_rw_ch0_cfg 16
119
120/* Register rw_ch1_cfg, scope bif_slave, type rw */
121typedef struct {
122 unsigned int rd_hold : 2;
123 unsigned int access_mode : 1;
124 unsigned int access_ctrl : 1;
125 unsigned int data_cs : 2;
126 unsigned int dummy1 : 26;
127} reg_bif_slave_rw_ch1_cfg;
128#define REG_RD_ADDR_bif_slave_rw_ch1_cfg 20
129#define REG_WR_ADDR_bif_slave_rw_ch1_cfg 20
130
131/* Register rw_ch2_cfg, scope bif_slave, type rw */
132typedef struct {
133 unsigned int rd_hold : 2;
134 unsigned int access_mode : 1;
135 unsigned int access_ctrl : 1;
136 unsigned int data_cs : 2;
137 unsigned int dummy1 : 26;
138} reg_bif_slave_rw_ch2_cfg;
139#define REG_RD_ADDR_bif_slave_rw_ch2_cfg 24
140#define REG_WR_ADDR_bif_slave_rw_ch2_cfg 24
141
142/* Register rw_ch3_cfg, scope bif_slave, type rw */
143typedef struct {
144 unsigned int rd_hold : 2;
145 unsigned int access_mode : 1;
146 unsigned int access_ctrl : 1;
147 unsigned int data_cs : 2;
148 unsigned int dummy1 : 26;
149} reg_bif_slave_rw_ch3_cfg;
150#define REG_RD_ADDR_bif_slave_rw_ch3_cfg 28
151#define REG_WR_ADDR_bif_slave_rw_ch3_cfg 28
152
153/* Register rw_arb_cfg, scope bif_slave, type rw */
154typedef struct {
155 unsigned int brin_mode : 1;
156 unsigned int brout_mode : 3;
157 unsigned int bg_mode : 3;
158 unsigned int release : 2;
159 unsigned int acquire : 1;
160 unsigned int settle_time : 2;
161 unsigned int dram_ctrl : 1;
162 unsigned int dummy1 : 19;
163} reg_bif_slave_rw_arb_cfg;
164#define REG_RD_ADDR_bif_slave_rw_arb_cfg 32
165#define REG_WR_ADDR_bif_slave_rw_arb_cfg 32
166
167/* Register r_arb_stat, scope bif_slave, type r */
168typedef struct {
169 unsigned int init_mode : 1;
170 unsigned int mode : 1;
171 unsigned int brin : 1;
172 unsigned int brout : 1;
173 unsigned int bg : 1;
174 unsigned int dummy1 : 27;
175} reg_bif_slave_r_arb_stat;
176#define REG_RD_ADDR_bif_slave_r_arb_stat 36
177
178/* Register rw_intr_mask, scope bif_slave, type rw */
179typedef struct {
180 unsigned int bus_release : 1;
181 unsigned int bus_acquire : 1;
182 unsigned int dummy1 : 30;
183} reg_bif_slave_rw_intr_mask;
184#define REG_RD_ADDR_bif_slave_rw_intr_mask 64
185#define REG_WR_ADDR_bif_slave_rw_intr_mask 64
186
187/* Register rw_ack_intr, scope bif_slave, type rw */
188typedef struct {
189 unsigned int bus_release : 1;
190 unsigned int bus_acquire : 1;
191 unsigned int dummy1 : 30;
192} reg_bif_slave_rw_ack_intr;
193#define REG_RD_ADDR_bif_slave_rw_ack_intr 68
194#define REG_WR_ADDR_bif_slave_rw_ack_intr 68
195
196/* Register r_intr, scope bif_slave, type r */
197typedef struct {
198 unsigned int bus_release : 1;
199 unsigned int bus_acquire : 1;
200 unsigned int dummy1 : 30;
201} reg_bif_slave_r_intr;
202#define REG_RD_ADDR_bif_slave_r_intr 72
203
204/* Register r_masked_intr, scope bif_slave, type r */
205typedef struct {
206 unsigned int bus_release : 1;
207 unsigned int bus_acquire : 1;
208 unsigned int dummy1 : 30;
209} reg_bif_slave_r_masked_intr;
210#define REG_RD_ADDR_bif_slave_r_masked_intr 76
211
212
213/* Constants */
214enum {
215 regk_bif_slave_active_hi = 0x00000003,
216 regk_bif_slave_active_lo = 0x00000002,
217 regk_bif_slave_addr = 0x00000000,
218 regk_bif_slave_always = 0x00000001,
219 regk_bif_slave_at_idle = 0x00000002,
220 regk_bif_slave_burst_end = 0x00000003,
221 regk_bif_slave_dma = 0x00000001,
222 regk_bif_slave_hi = 0x00000003,
223 regk_bif_slave_inv = 0x00000001,
224 regk_bif_slave_lo = 0x00000002,
225 regk_bif_slave_local = 0x00000001,
226 regk_bif_slave_master = 0x00000000,
227 regk_bif_slave_mode_reg = 0x00000001,
228 regk_bif_slave_no = 0x00000000,
229 regk_bif_slave_norm = 0x00000000,
230 regk_bif_slave_on_access = 0x00000000,
231 regk_bif_slave_rw_arb_cfg_default = 0x00000000,
232 regk_bif_slave_rw_ch0_cfg_default = 0x00000000,
233 regk_bif_slave_rw_ch1_cfg_default = 0x00000000,
234 regk_bif_slave_rw_ch2_cfg_default = 0x00000000,
235 regk_bif_slave_rw_ch3_cfg_default = 0x00000000,
236 regk_bif_slave_rw_intr_mask_default = 0x00000000,
237 regk_bif_slave_rw_slave_cfg_default = 0x00000000,
238 regk_bif_slave_shared = 0x00000000,
239 regk_bif_slave_slave = 0x00000001,
240 regk_bif_slave_t0ns = 0x00000003,
241 regk_bif_slave_t10ns = 0x00000002,
242 regk_bif_slave_t20ns = 0x00000003,
243 regk_bif_slave_t30ns = 0x00000002,
244 regk_bif_slave_t40ns = 0x00000001,
245 regk_bif_slave_t50ns = 0x00000000,
246 regk_bif_slave_yes = 0x00000001,
247 regk_bif_slave_z = 0x00000004
248};
249#endif /* __bif_slave_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/config_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/config_defs.h
deleted file mode 100644
index abc5f20705f7..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/config_defs.h
+++ /dev/null
@@ -1,142 +0,0 @@
1#ifndef __config_defs_h
2#define __config_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../rtl/config_regs.r
7 * id: config_regs.r,v 1.23 2004/03/04 11:34:42 mikaeln Exp
8 * last modfied: Thu Mar 4 12:34:39 2004
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile config_defs.h ../../rtl/config_regs.r
11 * id: $Id: config_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope config */
86
87/* Register r_bootsel, scope config, type r */
88typedef struct {
89 unsigned int boot_mode : 3;
90 unsigned int full_duplex : 1;
91 unsigned int user : 1;
92 unsigned int pll : 1;
93 unsigned int flash_bw : 1;
94 unsigned int dummy1 : 25;
95} reg_config_r_bootsel;
96#define REG_RD_ADDR_config_r_bootsel 0
97
98/* Register rw_clk_ctrl, scope config, type rw */
99typedef struct {
100 unsigned int pll : 1;
101 unsigned int cpu : 1;
102 unsigned int iop : 1;
103 unsigned int dma01_eth0 : 1;
104 unsigned int dma23 : 1;
105 unsigned int dma45 : 1;
106 unsigned int dma67 : 1;
107 unsigned int dma89_strcop : 1;
108 unsigned int bif : 1;
109 unsigned int fix_io : 1;
110 unsigned int dummy1 : 22;
111} reg_config_rw_clk_ctrl;
112#define REG_RD_ADDR_config_rw_clk_ctrl 4
113#define REG_WR_ADDR_config_rw_clk_ctrl 4
114
115/* Register rw_pad_ctrl, scope config, type rw */
116typedef struct {
117 unsigned int usb_susp : 1;
118 unsigned int phyrst_n : 1;
119 unsigned int dummy1 : 30;
120} reg_config_rw_pad_ctrl;
121#define REG_RD_ADDR_config_rw_pad_ctrl 8
122#define REG_WR_ADDR_config_rw_pad_ctrl 8
123
124
125/* Constants */
126enum {
127 regk_config_bw16 = 0x00000000,
128 regk_config_bw32 = 0x00000001,
129 regk_config_master = 0x00000005,
130 regk_config_nand = 0x00000003,
131 regk_config_net_rx = 0x00000001,
132 regk_config_net_tx_rx = 0x00000002,
133 regk_config_no = 0x00000000,
134 regk_config_none = 0x00000007,
135 regk_config_nor = 0x00000000,
136 regk_config_rw_clk_ctrl_default = 0x00000002,
137 regk_config_rw_pad_ctrl_default = 0x00000000,
138 regk_config_ser = 0x00000004,
139 regk_config_slave = 0x00000006,
140 regk_config_yes = 0x00000001
141};
142#endif /* __config_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/gio_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/gio_defs.h
deleted file mode 100644
index 26aa3efcf91b..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/gio_defs.h
+++ /dev/null
@@ -1,295 +0,0 @@
1#ifndef __gio_defs_h
2#define __gio_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/gio/rtl/gio_regs.r
7 * id: gio_regs.r,v 1.5 2005/02/04 09:43:21 perz Exp
8 * last modfied: Mon Apr 11 16:07:47 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile gio_defs.h ../../inst/gio/rtl/gio_regs.r
11 * id: $Id: gio_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope gio */
86
87/* Register rw_pa_dout, scope gio, type rw */
88typedef struct {
89 unsigned int data : 8;
90 unsigned int dummy1 : 24;
91} reg_gio_rw_pa_dout;
92#define REG_RD_ADDR_gio_rw_pa_dout 0
93#define REG_WR_ADDR_gio_rw_pa_dout 0
94
95/* Register r_pa_din, scope gio, type r */
96typedef struct {
97 unsigned int data : 8;
98 unsigned int dummy1 : 24;
99} reg_gio_r_pa_din;
100#define REG_RD_ADDR_gio_r_pa_din 4
101
102/* Register rw_pa_oe, scope gio, type rw */
103typedef struct {
104 unsigned int oe : 8;
105 unsigned int dummy1 : 24;
106} reg_gio_rw_pa_oe;
107#define REG_RD_ADDR_gio_rw_pa_oe 8
108#define REG_WR_ADDR_gio_rw_pa_oe 8
109
110/* Register rw_intr_cfg, scope gio, type rw */
111typedef struct {
112 unsigned int pa0 : 3;
113 unsigned int pa1 : 3;
114 unsigned int pa2 : 3;
115 unsigned int pa3 : 3;
116 unsigned int pa4 : 3;
117 unsigned int pa5 : 3;
118 unsigned int pa6 : 3;
119 unsigned int pa7 : 3;
120 unsigned int dummy1 : 8;
121} reg_gio_rw_intr_cfg;
122#define REG_RD_ADDR_gio_rw_intr_cfg 12
123#define REG_WR_ADDR_gio_rw_intr_cfg 12
124
125/* Register rw_intr_mask, scope gio, type rw */
126typedef struct {
127 unsigned int pa0 : 1;
128 unsigned int pa1 : 1;
129 unsigned int pa2 : 1;
130 unsigned int pa3 : 1;
131 unsigned int pa4 : 1;
132 unsigned int pa5 : 1;
133 unsigned int pa6 : 1;
134 unsigned int pa7 : 1;
135 unsigned int dummy1 : 24;
136} reg_gio_rw_intr_mask;
137#define REG_RD_ADDR_gio_rw_intr_mask 16
138#define REG_WR_ADDR_gio_rw_intr_mask 16
139
140/* Register rw_ack_intr, scope gio, type rw */
141typedef struct {
142 unsigned int pa0 : 1;
143 unsigned int pa1 : 1;
144 unsigned int pa2 : 1;
145 unsigned int pa3 : 1;
146 unsigned int pa4 : 1;
147 unsigned int pa5 : 1;
148 unsigned int pa6 : 1;
149 unsigned int pa7 : 1;
150 unsigned int dummy1 : 24;
151} reg_gio_rw_ack_intr;
152#define REG_RD_ADDR_gio_rw_ack_intr 20
153#define REG_WR_ADDR_gio_rw_ack_intr 20
154
155/* Register r_intr, scope gio, type r */
156typedef struct {
157 unsigned int pa0 : 1;
158 unsigned int pa1 : 1;
159 unsigned int pa2 : 1;
160 unsigned int pa3 : 1;
161 unsigned int pa4 : 1;
162 unsigned int pa5 : 1;
163 unsigned int pa6 : 1;
164 unsigned int pa7 : 1;
165 unsigned int dummy1 : 24;
166} reg_gio_r_intr;
167#define REG_RD_ADDR_gio_r_intr 24
168
169/* Register r_masked_intr, scope gio, type r */
170typedef struct {
171 unsigned int pa0 : 1;
172 unsigned int pa1 : 1;
173 unsigned int pa2 : 1;
174 unsigned int pa3 : 1;
175 unsigned int pa4 : 1;
176 unsigned int pa5 : 1;
177 unsigned int pa6 : 1;
178 unsigned int pa7 : 1;
179 unsigned int dummy1 : 24;
180} reg_gio_r_masked_intr;
181#define REG_RD_ADDR_gio_r_masked_intr 28
182
183/* Register rw_pb_dout, scope gio, type rw */
184typedef struct {
185 unsigned int data : 18;
186 unsigned int dummy1 : 14;
187} reg_gio_rw_pb_dout;
188#define REG_RD_ADDR_gio_rw_pb_dout 32
189#define REG_WR_ADDR_gio_rw_pb_dout 32
190
191/* Register r_pb_din, scope gio, type r */
192typedef struct {
193 unsigned int data : 18;
194 unsigned int dummy1 : 14;
195} reg_gio_r_pb_din;
196#define REG_RD_ADDR_gio_r_pb_din 36
197
198/* Register rw_pb_oe, scope gio, type rw */
199typedef struct {
200 unsigned int oe : 18;
201 unsigned int dummy1 : 14;
202} reg_gio_rw_pb_oe;
203#define REG_RD_ADDR_gio_rw_pb_oe 40
204#define REG_WR_ADDR_gio_rw_pb_oe 40
205
206/* Register rw_pc_dout, scope gio, type rw */
207typedef struct {
208 unsigned int data : 18;
209 unsigned int dummy1 : 14;
210} reg_gio_rw_pc_dout;
211#define REG_RD_ADDR_gio_rw_pc_dout 48
212#define REG_WR_ADDR_gio_rw_pc_dout 48
213
214/* Register r_pc_din, scope gio, type r */
215typedef struct {
216 unsigned int data : 18;
217 unsigned int dummy1 : 14;
218} reg_gio_r_pc_din;
219#define REG_RD_ADDR_gio_r_pc_din 52
220
221/* Register rw_pc_oe, scope gio, type rw */
222typedef struct {
223 unsigned int oe : 18;
224 unsigned int dummy1 : 14;
225} reg_gio_rw_pc_oe;
226#define REG_RD_ADDR_gio_rw_pc_oe 56
227#define REG_WR_ADDR_gio_rw_pc_oe 56
228
229/* Register rw_pd_dout, scope gio, type rw */
230typedef struct {
231 unsigned int data : 18;
232 unsigned int dummy1 : 14;
233} reg_gio_rw_pd_dout;
234#define REG_RD_ADDR_gio_rw_pd_dout 64
235#define REG_WR_ADDR_gio_rw_pd_dout 64
236
237/* Register r_pd_din, scope gio, type r */
238typedef struct {
239 unsigned int data : 18;
240 unsigned int dummy1 : 14;
241} reg_gio_r_pd_din;
242#define REG_RD_ADDR_gio_r_pd_din 68
243
244/* Register rw_pd_oe, scope gio, type rw */
245typedef struct {
246 unsigned int oe : 18;
247 unsigned int dummy1 : 14;
248} reg_gio_rw_pd_oe;
249#define REG_RD_ADDR_gio_rw_pd_oe 72
250#define REG_WR_ADDR_gio_rw_pd_oe 72
251
252/* Register rw_pe_dout, scope gio, type rw */
253typedef struct {
254 unsigned int data : 18;
255 unsigned int dummy1 : 14;
256} reg_gio_rw_pe_dout;
257#define REG_RD_ADDR_gio_rw_pe_dout 80
258#define REG_WR_ADDR_gio_rw_pe_dout 80
259
260/* Register r_pe_din, scope gio, type r */
261typedef struct {
262 unsigned int data : 18;
263 unsigned int dummy1 : 14;
264} reg_gio_r_pe_din;
265#define REG_RD_ADDR_gio_r_pe_din 84
266
267/* Register rw_pe_oe, scope gio, type rw */
268typedef struct {
269 unsigned int oe : 18;
270 unsigned int dummy1 : 14;
271} reg_gio_rw_pe_oe;
272#define REG_RD_ADDR_gio_rw_pe_oe 88
273#define REG_WR_ADDR_gio_rw_pe_oe 88
274
275
276/* Constants */
277enum {
278 regk_gio_anyedge = 0x00000007,
279 regk_gio_hi = 0x00000001,
280 regk_gio_lo = 0x00000002,
281 regk_gio_negedge = 0x00000006,
282 regk_gio_no = 0x00000000,
283 regk_gio_off = 0x00000000,
284 regk_gio_posedge = 0x00000005,
285 regk_gio_rw_intr_cfg_default = 0x00000000,
286 regk_gio_rw_intr_mask_default = 0x00000000,
287 regk_gio_rw_pa_oe_default = 0x00000000,
288 regk_gio_rw_pb_oe_default = 0x00000000,
289 regk_gio_rw_pc_oe_default = 0x00000000,
290 regk_gio_rw_pd_oe_default = 0x00000000,
291 regk_gio_rw_pe_oe_default = 0x00000000,
292 regk_gio_set = 0x00000003,
293 regk_gio_yes = 0x00000001
294};
295#endif /* __gio_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect.h b/include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect.h
deleted file mode 100644
index bacc2a895c21..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
2 from ../../inst/intr_vect/rtl/guinness/ivmask.config.r
3version . */
4
5#ifndef _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R
6#define _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R
7#define MEMARB_INTR_VECT 0x31
8#define GEN_IO_INTR_VECT 0x32
9#define GIO_INTR_VECT GEN_IO_INTR_VECT
10#define IOP0_INTR_VECT 0x33
11#define IOP1_INTR_VECT 0x34
12#define IOP2_INTR_VECT 0x35
13#define IOP3_INTR_VECT 0x36
14#define DMA0_INTR_VECT 0x37
15#define DMA1_INTR_VECT 0x38
16#define DMA2_INTR_VECT 0x39
17#define DMA3_INTR_VECT 0x3a
18#define DMA4_INTR_VECT 0x3b
19#define DMA5_INTR_VECT 0x3c
20#define DMA6_INTR_VECT 0x3d
21#define DMA7_INTR_VECT 0x3e
22#define DMA8_INTR_VECT 0x3f
23#define DMA9_INTR_VECT 0x40
24#define ATA_INTR_VECT 0x41
25#define SSER0_INTR_VECT 0x42
26#define SSER1_INTR_VECT 0x43
27#define SER0_INTR_VECT 0x44
28#define SER1_INTR_VECT 0x45
29#define SER2_INTR_VECT 0x46
30#define SER3_INTR_VECT 0x47
31#define P21_INTR_VECT 0x48
32#define ETH0_INTR_VECT 0x49
33#define ETH1_INTR_VECT 0x4a
34#define TIMER_INTR_VECT 0x4b
35#define TIMER0_INTR_VECT TIMER_INTR_VECT
36#define BIF_ARB_INTR_VECT 0x4c
37#define BIF_DMA_INTR_VECT 0x4d
38#define EXT_INTR_VECT 0x4e
39#define IPI_INTR_VECT 0x4f
40#define NBR_INTR_VECT 0x50
41#endif
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect_defs.h
deleted file mode 100644
index aa65128ae1aa..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect_defs.h
+++ /dev/null
@@ -1,228 +0,0 @@
1#ifndef __intr_vect_defs_h
2#define __intr_vect_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/intr_vect/rtl/guinness/ivmask.config.r
7 * id: ivmask.config.r,v 1.4 2005/02/15 16:05:38 stefans Exp
8 * last modfied: Mon Apr 11 16:08:03 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile intr_vect_defs.h ../../inst/intr_vect/rtl/guinness/ivmask.config.r
11 * id: $Id: intr_vect_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope intr_vect */
86
87#define STRIDE_intr_vect_rw_mask 0
88/* Register rw_mask, scope intr_vect, type rw */
89typedef struct {
90 unsigned int memarb : 1;
91 unsigned int gen_io : 1;
92 unsigned int iop0 : 1;
93 unsigned int iop1 : 1;
94 unsigned int iop2 : 1;
95 unsigned int iop3 : 1;
96 unsigned int dma0 : 1;
97 unsigned int dma1 : 1;
98 unsigned int dma2 : 1;
99 unsigned int dma3 : 1;
100 unsigned int dma4 : 1;
101 unsigned int dma5 : 1;
102 unsigned int dma6 : 1;
103 unsigned int dma7 : 1;
104 unsigned int dma8 : 1;
105 unsigned int dma9 : 1;
106 unsigned int ata : 1;
107 unsigned int sser0 : 1;
108 unsigned int sser1 : 1;
109 unsigned int ser0 : 1;
110 unsigned int ser1 : 1;
111 unsigned int ser2 : 1;
112 unsigned int ser3 : 1;
113 unsigned int p21 : 1;
114 unsigned int eth0 : 1;
115 unsigned int eth1 : 1;
116 unsigned int timer0 : 1;
117 unsigned int bif_arb : 1;
118 unsigned int bif_dma : 1;
119 unsigned int ext : 1;
120 unsigned int dummy1 : 2;
121} reg_intr_vect_rw_mask;
122#define REG_RD_ADDR_intr_vect_rw_mask 0
123#define REG_WR_ADDR_intr_vect_rw_mask 0
124
125#define STRIDE_intr_vect_r_vect 0
126/* Register r_vect, scope intr_vect, type r */
127typedef struct {
128 unsigned int memarb : 1;
129 unsigned int gen_io : 1;
130 unsigned int iop0 : 1;
131 unsigned int iop1 : 1;
132 unsigned int iop2 : 1;
133 unsigned int iop3 : 1;
134 unsigned int dma0 : 1;
135 unsigned int dma1 : 1;
136 unsigned int dma2 : 1;
137 unsigned int dma3 : 1;
138 unsigned int dma4 : 1;
139 unsigned int dma5 : 1;
140 unsigned int dma6 : 1;
141 unsigned int dma7 : 1;
142 unsigned int dma8 : 1;
143 unsigned int dma9 : 1;
144 unsigned int ata : 1;
145 unsigned int sser0 : 1;
146 unsigned int sser1 : 1;
147 unsigned int ser0 : 1;
148 unsigned int ser1 : 1;
149 unsigned int ser2 : 1;
150 unsigned int ser3 : 1;
151 unsigned int p21 : 1;
152 unsigned int eth0 : 1;
153 unsigned int eth1 : 1;
154 unsigned int timer : 1;
155 unsigned int bif_arb : 1;
156 unsigned int bif_dma : 1;
157 unsigned int ext : 1;
158 unsigned int dummy1 : 2;
159} reg_intr_vect_r_vect;
160#define REG_RD_ADDR_intr_vect_r_vect 4
161
162#define STRIDE_intr_vect_r_masked_vect 0
163/* Register r_masked_vect, scope intr_vect, type r */
164typedef struct {
165 unsigned int memarb : 1;
166 unsigned int gen_io : 1;
167 unsigned int iop0 : 1;
168 unsigned int iop1 : 1;
169 unsigned int iop2 : 1;
170 unsigned int iop3 : 1;
171 unsigned int dma0 : 1;
172 unsigned int dma1 : 1;
173 unsigned int dma2 : 1;
174 unsigned int dma3 : 1;
175 unsigned int dma4 : 1;
176 unsigned int dma5 : 1;
177 unsigned int dma6 : 1;
178 unsigned int dma7 : 1;
179 unsigned int dma8 : 1;
180 unsigned int dma9 : 1;
181 unsigned int ata : 1;
182 unsigned int sser0 : 1;
183 unsigned int sser1 : 1;
184 unsigned int ser0 : 1;
185 unsigned int ser1 : 1;
186 unsigned int ser2 : 1;
187 unsigned int ser3 : 1;
188 unsigned int p21 : 1;
189 unsigned int eth0 : 1;
190 unsigned int eth1 : 1;
191 unsigned int timer : 1;
192 unsigned int bif_arb : 1;
193 unsigned int bif_dma : 1;
194 unsigned int ext : 1;
195 unsigned int dummy1 : 2;
196} reg_intr_vect_r_masked_vect;
197#define REG_RD_ADDR_intr_vect_r_masked_vect 8
198
199/* Register r_nmi, scope intr_vect, type r */
200typedef struct {
201 unsigned int ext : 1;
202 unsigned int watchdog : 1;
203 unsigned int dummy1 : 30;
204} reg_intr_vect_r_nmi;
205#define REG_RD_ADDR_intr_vect_r_nmi 12
206
207/* Register r_guru, scope intr_vect, type r */
208typedef struct {
209 unsigned int jtag : 1;
210 unsigned int dummy1 : 31;
211} reg_intr_vect_r_guru;
212#define REG_RD_ADDR_intr_vect_r_guru 16
213
214/* Register rw_ipi, scope intr_vect, type rw */
215typedef struct
216{
217 unsigned int vector;
218} reg_intr_vect_rw_ipi;
219#define REG_RD_ADDR_intr_vect_rw_ipi 20
220#define REG_WR_ADDR_intr_vect_rw_ipi 20
221
222/* Constants */
223enum {
224 regk_intr_vect_off = 0x00000000,
225 regk_intr_vect_on = 0x00000001,
226 regk_intr_vect_rw_mask_default = 0x00000000
227};
228#endif /* __intr_vect_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/marb_bp_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/marb_bp_defs.h
deleted file mode 100644
index dcaaec4620ba..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/marb_bp_defs.h
+++ /dev/null
@@ -1,205 +0,0 @@
1#ifndef __marb_bp_defs_h
2#define __marb_bp_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/memarb/rtl/guinness/marb_top.r
7 * id: <not found>
8 * last modfied: Fri Nov 7 15:36:04 2003
9 *
10 * by /n/asic/projects/guinness/design/top/inst/rdesc/rdes2c ../../rtl/global.rmap ../../mod/modreg.rmap -base 0xb0000000 ../../inst/memarb/rtl/guinness/marb_top.r
11 * id: $Id: marb_bp_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74/* C-code for register scope marb_bp */
75
76/* Register rw_first_addr, scope marb_bp, type rw */
77typedef unsigned int reg_marb_bp_rw_first_addr;
78#define REG_RD_ADDR_marb_bp_rw_first_addr 0
79#define REG_WR_ADDR_marb_bp_rw_first_addr 0
80
81/* Register rw_last_addr, scope marb_bp, type rw */
82typedef unsigned int reg_marb_bp_rw_last_addr;
83#define REG_RD_ADDR_marb_bp_rw_last_addr 4
84#define REG_WR_ADDR_marb_bp_rw_last_addr 4
85
86/* Register rw_op, scope marb_bp, type rw */
87typedef struct {
88 unsigned int read : 1;
89 unsigned int write : 1;
90 unsigned int read_excl : 1;
91 unsigned int pri_write : 1;
92 unsigned int us_read : 1;
93 unsigned int us_write : 1;
94 unsigned int us_read_excl : 1;
95 unsigned int us_pri_write : 1;
96 unsigned int dummy1 : 24;
97} reg_marb_bp_rw_op;
98#define REG_RD_ADDR_marb_bp_rw_op 8
99#define REG_WR_ADDR_marb_bp_rw_op 8
100
101/* Register rw_clients, scope marb_bp, type rw */
102typedef struct {
103 unsigned int dma0 : 1;
104 unsigned int dma1 : 1;
105 unsigned int dma2 : 1;
106 unsigned int dma3 : 1;
107 unsigned int dma4 : 1;
108 unsigned int dma5 : 1;
109 unsigned int dma6 : 1;
110 unsigned int dma7 : 1;
111 unsigned int dma8 : 1;
112 unsigned int dma9 : 1;
113 unsigned int cpui : 1;
114 unsigned int cpud : 1;
115 unsigned int iop : 1;
116 unsigned int slave : 1;
117 unsigned int dummy1 : 18;
118} reg_marb_bp_rw_clients;
119#define REG_RD_ADDR_marb_bp_rw_clients 12
120#define REG_WR_ADDR_marb_bp_rw_clients 12
121
122/* Register rw_options, scope marb_bp, type rw */
123typedef struct {
124 unsigned int wrap : 1;
125 unsigned int dummy1 : 31;
126} reg_marb_bp_rw_options;
127#define REG_RD_ADDR_marb_bp_rw_options 16
128#define REG_WR_ADDR_marb_bp_rw_options 16
129
130/* Register r_break_addr, scope marb_bp, type r */
131typedef unsigned int reg_marb_bp_r_break_addr;
132#define REG_RD_ADDR_marb_bp_r_break_addr 20
133
134/* Register r_break_op, scope marb_bp, type r */
135typedef struct {
136 unsigned int read : 1;
137 unsigned int write : 1;
138 unsigned int read_excl : 1;
139 unsigned int pri_write : 1;
140 unsigned int us_read : 1;
141 unsigned int us_write : 1;
142 unsigned int us_read_excl : 1;
143 unsigned int us_pri_write : 1;
144 unsigned int dummy1 : 24;
145} reg_marb_bp_r_break_op;
146#define REG_RD_ADDR_marb_bp_r_break_op 24
147
148/* Register r_break_clients, scope marb_bp, type r */
149typedef struct {
150 unsigned int dma0 : 1;
151 unsigned int dma1 : 1;
152 unsigned int dma2 : 1;
153 unsigned int dma3 : 1;
154 unsigned int dma4 : 1;
155 unsigned int dma5 : 1;
156 unsigned int dma6 : 1;
157 unsigned int dma7 : 1;
158 unsigned int dma8 : 1;
159 unsigned int dma9 : 1;
160 unsigned int cpui : 1;
161 unsigned int cpud : 1;
162 unsigned int iop : 1;
163 unsigned int slave : 1;
164 unsigned int dummy1 : 18;
165} reg_marb_bp_r_break_clients;
166#define REG_RD_ADDR_marb_bp_r_break_clients 28
167
168/* Register r_break_first_client, scope marb_bp, type r */
169typedef struct {
170 unsigned int dma0 : 1;
171 unsigned int dma1 : 1;
172 unsigned int dma2 : 1;
173 unsigned int dma3 : 1;
174 unsigned int dma4 : 1;
175 unsigned int dma5 : 1;
176 unsigned int dma6 : 1;
177 unsigned int dma7 : 1;
178 unsigned int dma8 : 1;
179 unsigned int dma9 : 1;
180 unsigned int cpui : 1;
181 unsigned int cpud : 1;
182 unsigned int iop : 1;
183 unsigned int slave : 1;
184 unsigned int dummy1 : 18;
185} reg_marb_bp_r_break_first_client;
186#define REG_RD_ADDR_marb_bp_r_break_first_client 32
187
188/* Register r_break_size, scope marb_bp, type r */
189typedef unsigned int reg_marb_bp_r_break_size;
190#define REG_RD_ADDR_marb_bp_r_break_size 36
191
192/* Register rw_ack, scope marb_bp, type rw */
193typedef unsigned int reg_marb_bp_rw_ack;
194#define REG_RD_ADDR_marb_bp_rw_ack 40
195#define REG_WR_ADDR_marb_bp_rw_ack 40
196
197
198/* Constants */
199enum {
200 regk_marb_bp_no = 0x00000000,
201 regk_marb_bp_rw_op_default = 0x00000000,
202 regk_marb_bp_rw_options_default = 0x00000000,
203 regk_marb_bp_yes = 0x00000001
204};
205#endif /* __marb_bp_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/marb_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/marb_defs.h
deleted file mode 100644
index 254da0854986..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/marb_defs.h
+++ /dev/null
@@ -1,475 +0,0 @@
1#ifndef __marb_defs_h
2#define __marb_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/memarb/rtl/guinness/marb_top.r
7 * id: <not found>
8 * last modfied: Mon Apr 11 16:12:16 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile marb_defs.h ../../inst/memarb/rtl/guinness/marb_top.r
11 * id: $Id: marb_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope marb */
86
87#define STRIDE_marb_rw_int_slots 4
88/* Register rw_int_slots, scope marb, type rw */
89typedef struct {
90 unsigned int owner : 4;
91 unsigned int dummy1 : 28;
92} reg_marb_rw_int_slots;
93#define REG_RD_ADDR_marb_rw_int_slots 0
94#define REG_WR_ADDR_marb_rw_int_slots 0
95
96#define STRIDE_marb_rw_ext_slots 4
97/* Register rw_ext_slots, scope marb, type rw */
98typedef struct {
99 unsigned int owner : 4;
100 unsigned int dummy1 : 28;
101} reg_marb_rw_ext_slots;
102#define REG_RD_ADDR_marb_rw_ext_slots 256
103#define REG_WR_ADDR_marb_rw_ext_slots 256
104
105#define STRIDE_marb_rw_regs_slots 4
106/* Register rw_regs_slots, scope marb, type rw */
107typedef struct {
108 unsigned int owner : 4;
109 unsigned int dummy1 : 28;
110} reg_marb_rw_regs_slots;
111#define REG_RD_ADDR_marb_rw_regs_slots 512
112#define REG_WR_ADDR_marb_rw_regs_slots 512
113
114/* Register rw_intr_mask, scope marb, type rw */
115typedef struct {
116 unsigned int bp0 : 1;
117 unsigned int bp1 : 1;
118 unsigned int bp2 : 1;
119 unsigned int bp3 : 1;
120 unsigned int dummy1 : 28;
121} reg_marb_rw_intr_mask;
122#define REG_RD_ADDR_marb_rw_intr_mask 528
123#define REG_WR_ADDR_marb_rw_intr_mask 528
124
125/* Register rw_ack_intr, scope marb, type rw */
126typedef struct {
127 unsigned int bp0 : 1;
128 unsigned int bp1 : 1;
129 unsigned int bp2 : 1;
130 unsigned int bp3 : 1;
131 unsigned int dummy1 : 28;
132} reg_marb_rw_ack_intr;
133#define REG_RD_ADDR_marb_rw_ack_intr 532
134#define REG_WR_ADDR_marb_rw_ack_intr 532
135
136/* Register r_intr, scope marb, type r */
137typedef struct {
138 unsigned int bp0 : 1;
139 unsigned int bp1 : 1;
140 unsigned int bp2 : 1;
141 unsigned int bp3 : 1;
142 unsigned int dummy1 : 28;
143} reg_marb_r_intr;
144#define REG_RD_ADDR_marb_r_intr 536
145
146/* Register r_masked_intr, scope marb, type r */
147typedef struct {
148 unsigned int bp0 : 1;
149 unsigned int bp1 : 1;
150 unsigned int bp2 : 1;
151 unsigned int bp3 : 1;
152 unsigned int dummy1 : 28;
153} reg_marb_r_masked_intr;
154#define REG_RD_ADDR_marb_r_masked_intr 540
155
156/* Register rw_stop_mask, scope marb, type rw */
157typedef struct {
158 unsigned int dma0 : 1;
159 unsigned int dma1 : 1;
160 unsigned int dma2 : 1;
161 unsigned int dma3 : 1;
162 unsigned int dma4 : 1;
163 unsigned int dma5 : 1;
164 unsigned int dma6 : 1;
165 unsigned int dma7 : 1;
166 unsigned int dma8 : 1;
167 unsigned int dma9 : 1;
168 unsigned int cpui : 1;
169 unsigned int cpud : 1;
170 unsigned int iop : 1;
171 unsigned int slave : 1;
172 unsigned int dummy1 : 18;
173} reg_marb_rw_stop_mask;
174#define REG_RD_ADDR_marb_rw_stop_mask 544
175#define REG_WR_ADDR_marb_rw_stop_mask 544
176
177/* Register r_stopped, scope marb, type r */
178typedef struct {
179 unsigned int dma0 : 1;
180 unsigned int dma1 : 1;
181 unsigned int dma2 : 1;
182 unsigned int dma3 : 1;
183 unsigned int dma4 : 1;
184 unsigned int dma5 : 1;
185 unsigned int dma6 : 1;
186 unsigned int dma7 : 1;
187 unsigned int dma8 : 1;
188 unsigned int dma9 : 1;
189 unsigned int cpui : 1;
190 unsigned int cpud : 1;
191 unsigned int iop : 1;
192 unsigned int slave : 1;
193 unsigned int dummy1 : 18;
194} reg_marb_r_stopped;
195#define REG_RD_ADDR_marb_r_stopped 548
196
197/* Register rw_no_snoop, scope marb, type rw */
198typedef struct {
199 unsigned int dma0 : 1;
200 unsigned int dma1 : 1;
201 unsigned int dma2 : 1;
202 unsigned int dma3 : 1;
203 unsigned int dma4 : 1;
204 unsigned int dma5 : 1;
205 unsigned int dma6 : 1;
206 unsigned int dma7 : 1;
207 unsigned int dma8 : 1;
208 unsigned int dma9 : 1;
209 unsigned int cpui : 1;
210 unsigned int cpud : 1;
211 unsigned int iop : 1;
212 unsigned int slave : 1;
213 unsigned int dummy1 : 18;
214} reg_marb_rw_no_snoop;
215#define REG_RD_ADDR_marb_rw_no_snoop 832
216#define REG_WR_ADDR_marb_rw_no_snoop 832
217
218/* Register rw_no_snoop_rq, scope marb, type rw */
219typedef struct {
220 unsigned int dummy1 : 10;
221 unsigned int cpui : 1;
222 unsigned int cpud : 1;
223 unsigned int dummy2 : 20;
224} reg_marb_rw_no_snoop_rq;
225#define REG_RD_ADDR_marb_rw_no_snoop_rq 836
226#define REG_WR_ADDR_marb_rw_no_snoop_rq 836
227
228
229/* Constants */
230enum {
231 regk_marb_cpud = 0x0000000b,
232 regk_marb_cpui = 0x0000000a,
233 regk_marb_dma0 = 0x00000000,
234 regk_marb_dma1 = 0x00000001,
235 regk_marb_dma2 = 0x00000002,
236 regk_marb_dma3 = 0x00000003,
237 regk_marb_dma4 = 0x00000004,
238 regk_marb_dma5 = 0x00000005,
239 regk_marb_dma6 = 0x00000006,
240 regk_marb_dma7 = 0x00000007,
241 regk_marb_dma8 = 0x00000008,
242 regk_marb_dma9 = 0x00000009,
243 regk_marb_iop = 0x0000000c,
244 regk_marb_no = 0x00000000,
245 regk_marb_r_stopped_default = 0x00000000,
246 regk_marb_rw_ext_slots_default = 0x00000000,
247 regk_marb_rw_ext_slots_size = 0x00000040,
248 regk_marb_rw_int_slots_default = 0x00000000,
249 regk_marb_rw_int_slots_size = 0x00000040,
250 regk_marb_rw_intr_mask_default = 0x00000000,
251 regk_marb_rw_no_snoop_default = 0x00000000,
252 regk_marb_rw_no_snoop_rq_default = 0x00000000,
253 regk_marb_rw_regs_slots_default = 0x00000000,
254 regk_marb_rw_regs_slots_size = 0x00000004,
255 regk_marb_rw_stop_mask_default = 0x00000000,
256 regk_marb_slave = 0x0000000d,
257 regk_marb_yes = 0x00000001
258};
259#endif /* __marb_defs_h */
260#ifndef __marb_bp_defs_h
261#define __marb_bp_defs_h
262
263/*
264 * This file is autogenerated from
265 * file: ../../inst/memarb/rtl/guinness/marb_top.r
266 * id: <not found>
267 * last modfied: Mon Apr 11 16:12:16 2005
268 *
269 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile marb_defs.h ../../inst/memarb/rtl/guinness/marb_top.r
270 * id: $Id: marb_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
271 * Any changes here will be lost.
272 *
273 * -*- buffer-read-only: t -*-
274 */
275/* Main access macros */
276#ifndef REG_RD
277#define REG_RD( scope, inst, reg ) \
278 REG_READ( reg_##scope##_##reg, \
279 (inst) + REG_RD_ADDR_##scope##_##reg )
280#endif
281
282#ifndef REG_WR
283#define REG_WR( scope, inst, reg, val ) \
284 REG_WRITE( reg_##scope##_##reg, \
285 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
286#endif
287
288#ifndef REG_RD_VECT
289#define REG_RD_VECT( scope, inst, reg, index ) \
290 REG_READ( reg_##scope##_##reg, \
291 (inst) + REG_RD_ADDR_##scope##_##reg + \
292 (index) * STRIDE_##scope##_##reg )
293#endif
294
295#ifndef REG_WR_VECT
296#define REG_WR_VECT( scope, inst, reg, index, val ) \
297 REG_WRITE( reg_##scope##_##reg, \
298 (inst) + REG_WR_ADDR_##scope##_##reg + \
299 (index) * STRIDE_##scope##_##reg, (val) )
300#endif
301
302#ifndef REG_RD_INT
303#define REG_RD_INT( scope, inst, reg ) \
304 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
305#endif
306
307#ifndef REG_WR_INT
308#define REG_WR_INT( scope, inst, reg, val ) \
309 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
310#endif
311
312#ifndef REG_RD_INT_VECT
313#define REG_RD_INT_VECT( scope, inst, reg, index ) \
314 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
315 (index) * STRIDE_##scope##_##reg )
316#endif
317
318#ifndef REG_WR_INT_VECT
319#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
320 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
321 (index) * STRIDE_##scope##_##reg, (val) )
322#endif
323
324#ifndef REG_TYPE_CONV
325#define REG_TYPE_CONV( type, orgtype, val ) \
326 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
327#endif
328
329#ifndef reg_page_size
330#define reg_page_size 8192
331#endif
332
333#ifndef REG_ADDR
334#define REG_ADDR( scope, inst, reg ) \
335 ( (inst) + REG_RD_ADDR_##scope##_##reg )
336#endif
337
338#ifndef REG_ADDR_VECT
339#define REG_ADDR_VECT( scope, inst, reg, index ) \
340 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
341 (index) * STRIDE_##scope##_##reg )
342#endif
343
344/* C-code for register scope marb_bp */
345
346/* Register rw_first_addr, scope marb_bp, type rw */
347typedef unsigned int reg_marb_bp_rw_first_addr;
348#define REG_RD_ADDR_marb_bp_rw_first_addr 0
349#define REG_WR_ADDR_marb_bp_rw_first_addr 0
350
351/* Register rw_last_addr, scope marb_bp, type rw */
352typedef unsigned int reg_marb_bp_rw_last_addr;
353#define REG_RD_ADDR_marb_bp_rw_last_addr 4
354#define REG_WR_ADDR_marb_bp_rw_last_addr 4
355
356/* Register rw_op, scope marb_bp, type rw */
357typedef struct {
358 unsigned int rd : 1;
359 unsigned int wr : 1;
360 unsigned int rd_excl : 1;
361 unsigned int pri_wr : 1;
362 unsigned int us_rd : 1;
363 unsigned int us_wr : 1;
364 unsigned int us_rd_excl : 1;
365 unsigned int us_pri_wr : 1;
366 unsigned int dummy1 : 24;
367} reg_marb_bp_rw_op;
368#define REG_RD_ADDR_marb_bp_rw_op 8
369#define REG_WR_ADDR_marb_bp_rw_op 8
370
371/* Register rw_clients, scope marb_bp, type rw */
372typedef struct {
373 unsigned int dma0 : 1;
374 unsigned int dma1 : 1;
375 unsigned int dma2 : 1;
376 unsigned int dma3 : 1;
377 unsigned int dma4 : 1;
378 unsigned int dma5 : 1;
379 unsigned int dma6 : 1;
380 unsigned int dma7 : 1;
381 unsigned int dma8 : 1;
382 unsigned int dma9 : 1;
383 unsigned int cpui : 1;
384 unsigned int cpud : 1;
385 unsigned int iop : 1;
386 unsigned int slave : 1;
387 unsigned int dummy1 : 18;
388} reg_marb_bp_rw_clients;
389#define REG_RD_ADDR_marb_bp_rw_clients 12
390#define REG_WR_ADDR_marb_bp_rw_clients 12
391
392/* Register rw_options, scope marb_bp, type rw */
393typedef struct {
394 unsigned int wrap : 1;
395 unsigned int dummy1 : 31;
396} reg_marb_bp_rw_options;
397#define REG_RD_ADDR_marb_bp_rw_options 16
398#define REG_WR_ADDR_marb_bp_rw_options 16
399
400/* Register r_brk_addr, scope marb_bp, type r */
401typedef unsigned int reg_marb_bp_r_brk_addr;
402#define REG_RD_ADDR_marb_bp_r_brk_addr 20
403
404/* Register r_brk_op, scope marb_bp, type r */
405typedef struct {
406 unsigned int rd : 1;
407 unsigned int wr : 1;
408 unsigned int rd_excl : 1;
409 unsigned int pri_wr : 1;
410 unsigned int us_rd : 1;
411 unsigned int us_wr : 1;
412 unsigned int us_rd_excl : 1;
413 unsigned int us_pri_wr : 1;
414 unsigned int dummy1 : 24;
415} reg_marb_bp_r_brk_op;
416#define REG_RD_ADDR_marb_bp_r_brk_op 24
417
418/* Register r_brk_clients, scope marb_bp, type r */
419typedef struct {
420 unsigned int dma0 : 1;
421 unsigned int dma1 : 1;
422 unsigned int dma2 : 1;
423 unsigned int dma3 : 1;
424 unsigned int dma4 : 1;
425 unsigned int dma5 : 1;
426 unsigned int dma6 : 1;
427 unsigned int dma7 : 1;
428 unsigned int dma8 : 1;
429 unsigned int dma9 : 1;
430 unsigned int cpui : 1;
431 unsigned int cpud : 1;
432 unsigned int iop : 1;
433 unsigned int slave : 1;
434 unsigned int dummy1 : 18;
435} reg_marb_bp_r_brk_clients;
436#define REG_RD_ADDR_marb_bp_r_brk_clients 28
437
438/* Register r_brk_first_client, scope marb_bp, type r */
439typedef struct {
440 unsigned int dma0 : 1;
441 unsigned int dma1 : 1;
442 unsigned int dma2 : 1;
443 unsigned int dma3 : 1;
444 unsigned int dma4 : 1;
445 unsigned int dma5 : 1;
446 unsigned int dma6 : 1;
447 unsigned int dma7 : 1;
448 unsigned int dma8 : 1;
449 unsigned int dma9 : 1;
450 unsigned int cpui : 1;
451 unsigned int cpud : 1;
452 unsigned int iop : 1;
453 unsigned int slave : 1;
454 unsigned int dummy1 : 18;
455} reg_marb_bp_r_brk_first_client;
456#define REG_RD_ADDR_marb_bp_r_brk_first_client 32
457
458/* Register r_brk_size, scope marb_bp, type r */
459typedef unsigned int reg_marb_bp_r_brk_size;
460#define REG_RD_ADDR_marb_bp_r_brk_size 36
461
462/* Register rw_ack, scope marb_bp, type rw */
463typedef unsigned int reg_marb_bp_rw_ack;
464#define REG_RD_ADDR_marb_bp_rw_ack 40
465#define REG_WR_ADDR_marb_bp_rw_ack 40
466
467
468/* Constants */
469enum {
470 regk_marb_bp_no = 0x00000000,
471 regk_marb_bp_rw_op_default = 0x00000000,
472 regk_marb_bp_rw_options_default = 0x00000000,
473 regk_marb_bp_yes = 0x00000001
474};
475#endif /* __marb_bp_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/pinmux_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/pinmux_defs.h
deleted file mode 100644
index 751eab5f191c..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/pinmux_defs.h
+++ /dev/null
@@ -1,357 +0,0 @@
1#ifndef __pinmux_defs_h
2#define __pinmux_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/pinmux/rtl/guinness/pinmux_regs.r
7 * id: pinmux_regs.r,v 1.40 2005/02/09 16:22:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:11 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile pinmux_defs.h ../../inst/pinmux/rtl/guinness/pinmux_regs.r
11 * id: $Id: pinmux_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope pinmux */
86
87/* Register rw_pa, scope pinmux, type rw */
88typedef struct {
89 unsigned int pa0 : 1;
90 unsigned int pa1 : 1;
91 unsigned int pa2 : 1;
92 unsigned int pa3 : 1;
93 unsigned int pa4 : 1;
94 unsigned int pa5 : 1;
95 unsigned int pa6 : 1;
96 unsigned int pa7 : 1;
97 unsigned int csp2_n : 1;
98 unsigned int csp3_n : 1;
99 unsigned int csp5_n : 1;
100 unsigned int csp6_n : 1;
101 unsigned int hsh4 : 1;
102 unsigned int hsh5 : 1;
103 unsigned int hsh6 : 1;
104 unsigned int hsh7 : 1;
105 unsigned int dummy1 : 16;
106} reg_pinmux_rw_pa;
107#define REG_RD_ADDR_pinmux_rw_pa 0
108#define REG_WR_ADDR_pinmux_rw_pa 0
109
110/* Register rw_hwprot, scope pinmux, type rw */
111typedef struct {
112 unsigned int ser1 : 1;
113 unsigned int ser2 : 1;
114 unsigned int ser3 : 1;
115 unsigned int sser0 : 1;
116 unsigned int sser1 : 1;
117 unsigned int ata0 : 1;
118 unsigned int ata1 : 1;
119 unsigned int ata2 : 1;
120 unsigned int ata3 : 1;
121 unsigned int ata : 1;
122 unsigned int eth1 : 1;
123 unsigned int eth1_mgm : 1;
124 unsigned int timer : 1;
125 unsigned int p21 : 1;
126 unsigned int dummy1 : 18;
127} reg_pinmux_rw_hwprot;
128#define REG_RD_ADDR_pinmux_rw_hwprot 4
129#define REG_WR_ADDR_pinmux_rw_hwprot 4
130
131/* Register rw_pb_gio, scope pinmux, type rw */
132typedef struct {
133 unsigned int pb0 : 1;
134 unsigned int pb1 : 1;
135 unsigned int pb2 : 1;
136 unsigned int pb3 : 1;
137 unsigned int pb4 : 1;
138 unsigned int pb5 : 1;
139 unsigned int pb6 : 1;
140 unsigned int pb7 : 1;
141 unsigned int pb8 : 1;
142 unsigned int pb9 : 1;
143 unsigned int pb10 : 1;
144 unsigned int pb11 : 1;
145 unsigned int pb12 : 1;
146 unsigned int pb13 : 1;
147 unsigned int pb14 : 1;
148 unsigned int pb15 : 1;
149 unsigned int pb16 : 1;
150 unsigned int pb17 : 1;
151 unsigned int dummy1 : 14;
152} reg_pinmux_rw_pb_gio;
153#define REG_RD_ADDR_pinmux_rw_pb_gio 8
154#define REG_WR_ADDR_pinmux_rw_pb_gio 8
155
156/* Register rw_pb_iop, scope pinmux, type rw */
157typedef struct {
158 unsigned int pb0 : 1;
159 unsigned int pb1 : 1;
160 unsigned int pb2 : 1;
161 unsigned int pb3 : 1;
162 unsigned int pb4 : 1;
163 unsigned int pb5 : 1;
164 unsigned int pb6 : 1;
165 unsigned int pb7 : 1;
166 unsigned int pb8 : 1;
167 unsigned int pb9 : 1;
168 unsigned int pb10 : 1;
169 unsigned int pb11 : 1;
170 unsigned int pb12 : 1;
171 unsigned int pb13 : 1;
172 unsigned int pb14 : 1;
173 unsigned int pb15 : 1;
174 unsigned int pb16 : 1;
175 unsigned int pb17 : 1;
176 unsigned int dummy1 : 14;
177} reg_pinmux_rw_pb_iop;
178#define REG_RD_ADDR_pinmux_rw_pb_iop 12
179#define REG_WR_ADDR_pinmux_rw_pb_iop 12
180
181/* Register rw_pc_gio, scope pinmux, type rw */
182typedef struct {
183 unsigned int pc0 : 1;
184 unsigned int pc1 : 1;
185 unsigned int pc2 : 1;
186 unsigned int pc3 : 1;
187 unsigned int pc4 : 1;
188 unsigned int pc5 : 1;
189 unsigned int pc6 : 1;
190 unsigned int pc7 : 1;
191 unsigned int pc8 : 1;
192 unsigned int pc9 : 1;
193 unsigned int pc10 : 1;
194 unsigned int pc11 : 1;
195 unsigned int pc12 : 1;
196 unsigned int pc13 : 1;
197 unsigned int pc14 : 1;
198 unsigned int pc15 : 1;
199 unsigned int pc16 : 1;
200 unsigned int pc17 : 1;
201 unsigned int dummy1 : 14;
202} reg_pinmux_rw_pc_gio;
203#define REG_RD_ADDR_pinmux_rw_pc_gio 16
204#define REG_WR_ADDR_pinmux_rw_pc_gio 16
205
206/* Register rw_pc_iop, scope pinmux, type rw */
207typedef struct {
208 unsigned int pc0 : 1;
209 unsigned int pc1 : 1;
210 unsigned int pc2 : 1;
211 unsigned int pc3 : 1;
212 unsigned int pc4 : 1;
213 unsigned int pc5 : 1;
214 unsigned int pc6 : 1;
215 unsigned int pc7 : 1;
216 unsigned int pc8 : 1;
217 unsigned int pc9 : 1;
218 unsigned int pc10 : 1;
219 unsigned int pc11 : 1;
220 unsigned int pc12 : 1;
221 unsigned int pc13 : 1;
222 unsigned int pc14 : 1;
223 unsigned int pc15 : 1;
224 unsigned int pc16 : 1;
225 unsigned int pc17 : 1;
226 unsigned int dummy1 : 14;
227} reg_pinmux_rw_pc_iop;
228#define REG_RD_ADDR_pinmux_rw_pc_iop 20
229#define REG_WR_ADDR_pinmux_rw_pc_iop 20
230
231/* Register rw_pd_gio, scope pinmux, type rw */
232typedef struct {
233 unsigned int pd0 : 1;
234 unsigned int pd1 : 1;
235 unsigned int pd2 : 1;
236 unsigned int pd3 : 1;
237 unsigned int pd4 : 1;
238 unsigned int pd5 : 1;
239 unsigned int pd6 : 1;
240 unsigned int pd7 : 1;
241 unsigned int pd8 : 1;
242 unsigned int pd9 : 1;
243 unsigned int pd10 : 1;
244 unsigned int pd11 : 1;
245 unsigned int pd12 : 1;
246 unsigned int pd13 : 1;
247 unsigned int pd14 : 1;
248 unsigned int pd15 : 1;
249 unsigned int pd16 : 1;
250 unsigned int pd17 : 1;
251 unsigned int dummy1 : 14;
252} reg_pinmux_rw_pd_gio;
253#define REG_RD_ADDR_pinmux_rw_pd_gio 24
254#define REG_WR_ADDR_pinmux_rw_pd_gio 24
255
256/* Register rw_pd_iop, scope pinmux, type rw */
257typedef struct {
258 unsigned int pd0 : 1;
259 unsigned int pd1 : 1;
260 unsigned int pd2 : 1;
261 unsigned int pd3 : 1;
262 unsigned int pd4 : 1;
263 unsigned int pd5 : 1;
264 unsigned int pd6 : 1;
265 unsigned int pd7 : 1;
266 unsigned int pd8 : 1;
267 unsigned int pd9 : 1;
268 unsigned int pd10 : 1;
269 unsigned int pd11 : 1;
270 unsigned int pd12 : 1;
271 unsigned int pd13 : 1;
272 unsigned int pd14 : 1;
273 unsigned int pd15 : 1;
274 unsigned int pd16 : 1;
275 unsigned int pd17 : 1;
276 unsigned int dummy1 : 14;
277} reg_pinmux_rw_pd_iop;
278#define REG_RD_ADDR_pinmux_rw_pd_iop 28
279#define REG_WR_ADDR_pinmux_rw_pd_iop 28
280
281/* Register rw_pe_gio, scope pinmux, type rw */
282typedef struct {
283 unsigned int pe0 : 1;
284 unsigned int pe1 : 1;
285 unsigned int pe2 : 1;
286 unsigned int pe3 : 1;
287 unsigned int pe4 : 1;
288 unsigned int pe5 : 1;
289 unsigned int pe6 : 1;
290 unsigned int pe7 : 1;
291 unsigned int pe8 : 1;
292 unsigned int pe9 : 1;
293 unsigned int pe10 : 1;
294 unsigned int pe11 : 1;
295 unsigned int pe12 : 1;
296 unsigned int pe13 : 1;
297 unsigned int pe14 : 1;
298 unsigned int pe15 : 1;
299 unsigned int pe16 : 1;
300 unsigned int pe17 : 1;
301 unsigned int dummy1 : 14;
302} reg_pinmux_rw_pe_gio;
303#define REG_RD_ADDR_pinmux_rw_pe_gio 32
304#define REG_WR_ADDR_pinmux_rw_pe_gio 32
305
306/* Register rw_pe_iop, scope pinmux, type rw */
307typedef struct {
308 unsigned int pe0 : 1;
309 unsigned int pe1 : 1;
310 unsigned int pe2 : 1;
311 unsigned int pe3 : 1;
312 unsigned int pe4 : 1;
313 unsigned int pe5 : 1;
314 unsigned int pe6 : 1;
315 unsigned int pe7 : 1;
316 unsigned int pe8 : 1;
317 unsigned int pe9 : 1;
318 unsigned int pe10 : 1;
319 unsigned int pe11 : 1;
320 unsigned int pe12 : 1;
321 unsigned int pe13 : 1;
322 unsigned int pe14 : 1;
323 unsigned int pe15 : 1;
324 unsigned int pe16 : 1;
325 unsigned int pe17 : 1;
326 unsigned int dummy1 : 14;
327} reg_pinmux_rw_pe_iop;
328#define REG_RD_ADDR_pinmux_rw_pe_iop 36
329#define REG_WR_ADDR_pinmux_rw_pe_iop 36
330
331/* Register rw_usb_phy, scope pinmux, type rw */
332typedef struct {
333 unsigned int en_usb0 : 1;
334 unsigned int en_usb1 : 1;
335 unsigned int dummy1 : 30;
336} reg_pinmux_rw_usb_phy;
337#define REG_RD_ADDR_pinmux_rw_usb_phy 40
338#define REG_WR_ADDR_pinmux_rw_usb_phy 40
339
340
341/* Constants */
342enum {
343 regk_pinmux_no = 0x00000000,
344 regk_pinmux_rw_hwprot_default = 0x00000000,
345 regk_pinmux_rw_pa_default = 0x00000000,
346 regk_pinmux_rw_pb_gio_default = 0x00000000,
347 regk_pinmux_rw_pb_iop_default = 0x00000000,
348 regk_pinmux_rw_pc_gio_default = 0x00000000,
349 regk_pinmux_rw_pc_iop_default = 0x00000000,
350 regk_pinmux_rw_pd_gio_default = 0x00000000,
351 regk_pinmux_rw_pd_iop_default = 0x00000000,
352 regk_pinmux_rw_pe_gio_default = 0x00000000,
353 regk_pinmux_rw_pe_iop_default = 0x00000000,
354 regk_pinmux_rw_usb_phy_default = 0x00000000,
355 regk_pinmux_yes = 0x00000001
356};
357#endif /* __pinmux_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/reg_map.h b/include/asm-cris/arch-v32/mach-fs/hwregs/reg_map.h
deleted file mode 100644
index 4146973a58b3..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/reg_map.h
+++ /dev/null
@@ -1,104 +0,0 @@
1#ifndef __reg_map_h
2#define __reg_map_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../mod/fakereg.rmap
7 * id: fakereg.rmap,v 1.3 2004/02/11 19:53:22 ronny Exp
8 * last modified: Wed Feb 11 20:53:25 2004
9 * file: ../../rtl/global.rmap
10 * id: global.rmap,v 1.3 2003/08/18 15:08:23 mikaeln Exp
11 * last modified: Mon Aug 18 17:08:23 2003
12 * file: ../../mod/modreg.rmap
13 * id: modreg.rmap,v 1.31 2004/02/20 15:40:04 stefans Exp
14 * last modified: Fri Feb 20 16:40:04 2004
15 *
16 * by /n/asic/design/tools/rdesc/src/rdes2c -map -base 0xb0000000 ../../rtl/global.rmap ../../mod/modreg.rmap ../../inst/io_proc/rtl/guinness/iop_top.r ../../inst/memarb/rtl/guinness/marb_top.r ../../mod/fakereg.rmap
17 * id: $Id: reg_map.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
18 * Any changes here will be lost.
19 *
20 * -*- buffer-read-only: t -*-
21 */
22typedef enum {
23 regi_ata = 0xb0032000,
24 regi_bif_core = 0xb0014000,
25 regi_bif_dma = 0xb0016000,
26 regi_bif_slave = 0xb0018000,
27 regi_config = 0xb003c000,
28 regi_dma0 = 0xb0000000,
29 regi_dma1 = 0xb0002000,
30 regi_dma2 = 0xb0004000,
31 regi_dma3 = 0xb0006000,
32 regi_dma4 = 0xb0008000,
33 regi_dma5 = 0xb000a000,
34 regi_dma6 = 0xb000c000,
35 regi_dma7 = 0xb000e000,
36 regi_dma8 = 0xb0010000,
37 regi_dma9 = 0xb0012000,
38 regi_eth0 = 0xb0034000,
39 regi_eth1 = 0xb0036000,
40 regi_gio = 0xb001a000,
41 regi_iop = 0xb0020000,
42 regi_iop_version = 0xb0020000,
43 regi_iop_fifo_in0_extra = 0xb0020040,
44 regi_iop_fifo_in1_extra = 0xb0020080,
45 regi_iop_fifo_out0_extra = 0xb00200c0,
46 regi_iop_fifo_out1_extra = 0xb0020100,
47 regi_iop_trigger_grp0 = 0xb0020140,
48 regi_iop_trigger_grp1 = 0xb0020180,
49 regi_iop_trigger_grp2 = 0xb00201c0,
50 regi_iop_trigger_grp3 = 0xb0020200,
51 regi_iop_trigger_grp4 = 0xb0020240,
52 regi_iop_trigger_grp5 = 0xb0020280,
53 regi_iop_trigger_grp6 = 0xb00202c0,
54 regi_iop_trigger_grp7 = 0xb0020300,
55 regi_iop_crc_par0 = 0xb0020380,
56 regi_iop_crc_par1 = 0xb0020400,
57 regi_iop_dmc_in0 = 0xb0020480,
58 regi_iop_dmc_in1 = 0xb0020500,
59 regi_iop_dmc_out0 = 0xb0020580,
60 regi_iop_dmc_out1 = 0xb0020600,
61 regi_iop_fifo_in0 = 0xb0020680,
62 regi_iop_fifo_in1 = 0xb0020700,
63 regi_iop_fifo_out0 = 0xb0020780,
64 regi_iop_fifo_out1 = 0xb0020800,
65 regi_iop_scrc_in0 = 0xb0020880,
66 regi_iop_scrc_in1 = 0xb0020900,
67 regi_iop_scrc_out0 = 0xb0020980,
68 regi_iop_scrc_out1 = 0xb0020a00,
69 regi_iop_timer_grp0 = 0xb0020a80,
70 regi_iop_timer_grp1 = 0xb0020b00,
71 regi_iop_timer_grp2 = 0xb0020b80,
72 regi_iop_timer_grp3 = 0xb0020c00,
73 regi_iop_sap_in = 0xb0020d00,
74 regi_iop_sap_out = 0xb0020e00,
75 regi_iop_spu0 = 0xb0020f00,
76 regi_iop_spu1 = 0xb0021000,
77 regi_iop_sw_cfg = 0xb0021100,
78 regi_iop_sw_cpu = 0xb0021200,
79 regi_iop_sw_mpu = 0xb0021300,
80 regi_iop_sw_spu0 = 0xb0021400,
81 regi_iop_sw_spu1 = 0xb0021500,
82 regi_iop_mpu = 0xb0021600,
83 regi_irq = 0xb001c000,
84 regi_irq2 = 0xb005c000,
85 regi_marb = 0xb003e000,
86 regi_marb_bp0 = 0xb003e240,
87 regi_marb_bp1 = 0xb003e280,
88 regi_marb_bp2 = 0xb003e2c0,
89 regi_marb_bp3 = 0xb003e300,
90 regi_pinmux = 0xb0038000,
91 regi_ser0 = 0xb0026000,
92 regi_ser1 = 0xb0028000,
93 regi_ser2 = 0xb002a000,
94 regi_ser3 = 0xb002c000,
95 regi_sser0 = 0xb0022000,
96 regi_sser1 = 0xb0024000,
97 regi_strcop = 0xb0030000,
98 regi_strmux = 0xb003a000,
99 regi_timer = 0xb001e000,
100 regi_timer0 = 0xb001e000,
101 regi_timer2 = 0xb005e000,
102 regi_trace = 0xb0040000,
103} reg_scope_instances;
104#endif /* __reg_map_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/strmux_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/strmux_defs.h
deleted file mode 100644
index cbfaa867829e..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/strmux_defs.h
+++ /dev/null
@@ -1,127 +0,0 @@
1#ifndef __strmux_defs_h
2#define __strmux_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/strmux/rtl/guinness/strmux_regs.r
7 * id: strmux_regs.r,v 1.10 2005/02/10 10:10:46 perz Exp
8 * last modfied: Mon Apr 11 16:09:43 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile strmux_defs.h ../../inst/strmux/rtl/guinness/strmux_regs.r
11 * id: $Id: strmux_defs.h,v 1.1 2007/02/13 11:55:30 starvik Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope strmux */
86
87/* Register rw_cfg, scope strmux, type rw */
88typedef struct {
89 unsigned int dma0 : 3;
90 unsigned int dma1 : 3;
91 unsigned int dma2 : 3;
92 unsigned int dma3 : 3;
93 unsigned int dma4 : 3;
94 unsigned int dma5 : 3;
95 unsigned int dma6 : 3;
96 unsigned int dma7 : 3;
97 unsigned int dma8 : 3;
98 unsigned int dma9 : 3;
99 unsigned int dummy1 : 2;
100} reg_strmux_rw_cfg;
101#define REG_RD_ADDR_strmux_rw_cfg 0
102#define REG_WR_ADDR_strmux_rw_cfg 0
103
104
105/* Constants */
106enum {
107 regk_strmux_ata = 0x00000003,
108 regk_strmux_eth0 = 0x00000001,
109 regk_strmux_eth1 = 0x00000004,
110 regk_strmux_ext0 = 0x00000001,
111 regk_strmux_ext1 = 0x00000001,
112 regk_strmux_ext2 = 0x00000001,
113 regk_strmux_ext3 = 0x00000001,
114 regk_strmux_iop0 = 0x00000002,
115 regk_strmux_iop1 = 0x00000001,
116 regk_strmux_off = 0x00000000,
117 regk_strmux_p21 = 0x00000004,
118 regk_strmux_rw_cfg_default = 0x00000000,
119 regk_strmux_ser0 = 0x00000002,
120 regk_strmux_ser1 = 0x00000002,
121 regk_strmux_ser2 = 0x00000004,
122 regk_strmux_ser3 = 0x00000003,
123 regk_strmux_sser0 = 0x00000003,
124 regk_strmux_sser1 = 0x00000003,
125 regk_strmux_strcop = 0x00000002
126};
127#endif /* __strmux_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/hwregs/timer_defs.h b/include/asm-cris/arch-v32/mach-fs/hwregs/timer_defs.h
deleted file mode 100644
index 76bcc591921d..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/hwregs/timer_defs.h
+++ /dev/null
@@ -1,266 +0,0 @@
1#ifndef __timer_defs_h
2#define __timer_defs_h
3
4/*
5 * This file is autogenerated from
6 * file: ../../inst/timer/rtl/timer_regs.r
7 * id: timer_regs.r,v 1.7 2003/03/11 11:16:59 perz Exp
8 * last modfied: Mon Apr 11 16:09:53 2005
9 *
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile timer_defs.h ../../inst/timer/rtl/timer_regs.r
11 * id: $Id: timer_defs.h,v 1.1 2007/04/11 13:51:01 ricardw Exp $
12 * Any changes here will be lost.
13 *
14 * -*- buffer-read-only: t -*-
15 */
16/* Main access macros */
17#ifndef REG_RD
18#define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
21#endif
22
23#ifndef REG_WR
24#define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27#endif
28
29#ifndef REG_RD_VECT
30#define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
34#endif
35
36#ifndef REG_WR_VECT
37#define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
41#endif
42
43#ifndef REG_RD_INT
44#define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46#endif
47
48#ifndef REG_WR_INT
49#define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
51#endif
52
53#ifndef REG_RD_INT_VECT
54#define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
57#endif
58
59#ifndef REG_WR_INT_VECT
60#define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
63#endif
64
65#ifndef REG_TYPE_CONV
66#define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68#endif
69
70#ifndef reg_page_size
71#define reg_page_size 8192
72#endif
73
74#ifndef REG_ADDR
75#define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77#endif
78
79#ifndef REG_ADDR_VECT
80#define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
83#endif
84
85/* C-code for register scope timer */
86
87/* Register rw_tmr0_div, scope timer, type rw */
88typedef unsigned int reg_timer_rw_tmr0_div;
89#define REG_RD_ADDR_timer_rw_tmr0_div 0
90#define REG_WR_ADDR_timer_rw_tmr0_div 0
91
92/* Register r_tmr0_data, scope timer, type r */
93typedef unsigned int reg_timer_r_tmr0_data;
94#define REG_RD_ADDR_timer_r_tmr0_data 4
95
96/* Register rw_tmr0_ctrl, scope timer, type rw */
97typedef struct {
98 unsigned int op : 2;
99 unsigned int freq : 3;
100 unsigned int dummy1 : 27;
101} reg_timer_rw_tmr0_ctrl;
102#define REG_RD_ADDR_timer_rw_tmr0_ctrl 8
103#define REG_WR_ADDR_timer_rw_tmr0_ctrl 8
104
105/* Register rw_tmr1_div, scope timer, type rw */
106typedef unsigned int reg_timer_rw_tmr1_div;
107#define REG_RD_ADDR_timer_rw_tmr1_div 16
108#define REG_WR_ADDR_timer_rw_tmr1_div 16
109
110/* Register r_tmr1_data, scope timer, type r */
111typedef unsigned int reg_timer_r_tmr1_data;
112#define REG_RD_ADDR_timer_r_tmr1_data 20
113
114/* Register rw_tmr1_ctrl, scope timer, type rw */
115typedef struct {
116 unsigned int op : 2;
117 unsigned int freq : 3;
118 unsigned int dummy1 : 27;
119} reg_timer_rw_tmr1_ctrl;
120#define REG_RD_ADDR_timer_rw_tmr1_ctrl 24
121#define REG_WR_ADDR_timer_rw_tmr1_ctrl 24
122
123/* Register rs_cnt_data, scope timer, type rs */
124typedef struct {
125 unsigned int tmr : 24;
126 unsigned int cnt : 8;
127} reg_timer_rs_cnt_data;
128#define REG_RD_ADDR_timer_rs_cnt_data 32
129
130/* Register r_cnt_data, scope timer, type r */
131typedef struct {
132 unsigned int tmr : 24;
133 unsigned int cnt : 8;
134} reg_timer_r_cnt_data;
135#define REG_RD_ADDR_timer_r_cnt_data 36
136
137/* Register rw_cnt_cfg, scope timer, type rw */
138typedef struct {
139 unsigned int clk : 2;
140 unsigned int dummy1 : 30;
141} reg_timer_rw_cnt_cfg;
142#define REG_RD_ADDR_timer_rw_cnt_cfg 40
143#define REG_WR_ADDR_timer_rw_cnt_cfg 40
144
145/* Register rw_trig, scope timer, type rw */
146typedef unsigned int reg_timer_rw_trig;
147#define REG_RD_ADDR_timer_rw_trig 48
148#define REG_WR_ADDR_timer_rw_trig 48
149
150/* Register rw_trig_cfg, scope timer, type rw */
151typedef struct {
152 unsigned int tmr : 2;
153 unsigned int dummy1 : 30;
154} reg_timer_rw_trig_cfg;
155#define REG_RD_ADDR_timer_rw_trig_cfg 52
156#define REG_WR_ADDR_timer_rw_trig_cfg 52
157
158/* Register r_time, scope timer, type r */
159typedef unsigned int reg_timer_r_time;
160#define REG_RD_ADDR_timer_r_time 56
161
162/* Register rw_out, scope timer, type rw */
163typedef struct {
164 unsigned int tmr : 2;
165 unsigned int dummy1 : 30;
166} reg_timer_rw_out;
167#define REG_RD_ADDR_timer_rw_out 60
168#define REG_WR_ADDR_timer_rw_out 60
169
170/* Register rw_wd_ctrl, scope timer, type rw */
171typedef struct {
172 unsigned int cnt : 8;
173 unsigned int cmd : 1;
174 unsigned int key : 7;
175 unsigned int dummy1 : 16;
176} reg_timer_rw_wd_ctrl;
177#define REG_RD_ADDR_timer_rw_wd_ctrl 64
178#define REG_WR_ADDR_timer_rw_wd_ctrl 64
179
180/* Register r_wd_stat, scope timer, type r */
181typedef struct {
182 unsigned int cnt : 8;
183 unsigned int cmd : 1;
184 unsigned int dummy1 : 23;
185} reg_timer_r_wd_stat;
186#define REG_RD_ADDR_timer_r_wd_stat 68
187
188/* Register rw_intr_mask, scope timer, type rw */
189typedef struct {
190 unsigned int tmr0 : 1;
191 unsigned int tmr1 : 1;
192 unsigned int cnt : 1;
193 unsigned int trig : 1;
194 unsigned int dummy1 : 28;
195} reg_timer_rw_intr_mask;
196#define REG_RD_ADDR_timer_rw_intr_mask 72
197#define REG_WR_ADDR_timer_rw_intr_mask 72
198
199/* Register rw_ack_intr, scope timer, type rw */
200typedef struct {
201 unsigned int tmr0 : 1;
202 unsigned int tmr1 : 1;
203 unsigned int cnt : 1;
204 unsigned int trig : 1;
205 unsigned int dummy1 : 28;
206} reg_timer_rw_ack_intr;
207#define REG_RD_ADDR_timer_rw_ack_intr 76
208#define REG_WR_ADDR_timer_rw_ack_intr 76
209
210/* Register r_intr, scope timer, type r */
211typedef struct {
212 unsigned int tmr0 : 1;
213 unsigned int tmr1 : 1;
214 unsigned int cnt : 1;
215 unsigned int trig : 1;
216 unsigned int dummy1 : 28;
217} reg_timer_r_intr;
218#define REG_RD_ADDR_timer_r_intr 80
219
220/* Register r_masked_intr, scope timer, type r */
221typedef struct {
222 unsigned int tmr0 : 1;
223 unsigned int tmr1 : 1;
224 unsigned int cnt : 1;
225 unsigned int trig : 1;
226 unsigned int dummy1 : 28;
227} reg_timer_r_masked_intr;
228#define REG_RD_ADDR_timer_r_masked_intr 84
229
230/* Register rw_test, scope timer, type rw */
231typedef struct {
232 unsigned int dis : 1;
233 unsigned int en : 1;
234 unsigned int dummy1 : 30;
235} reg_timer_rw_test;
236#define REG_RD_ADDR_timer_rw_test 88
237#define REG_WR_ADDR_timer_rw_test 88
238
239
240/* Constants */
241enum {
242 regk_timer_ext = 0x00000001,
243 regk_timer_f100 = 0x00000007,
244 regk_timer_f29_493 = 0x00000004,
245 regk_timer_f32 = 0x00000005,
246 regk_timer_f32_768 = 0x00000006,
247 regk_timer_hold = 0x00000001,
248 regk_timer_ld = 0x00000000,
249 regk_timer_no = 0x00000000,
250 regk_timer_off = 0x00000000,
251 regk_timer_run = 0x00000002,
252 regk_timer_rw_cnt_cfg_default = 0x00000000,
253 regk_timer_rw_intr_mask_default = 0x00000000,
254 regk_timer_rw_out_default = 0x00000000,
255 regk_timer_rw_test_default = 0x00000000,
256 regk_timer_rw_tmr0_ctrl_default = 0x00000000,
257 regk_timer_rw_tmr1_ctrl_default = 0x00000000,
258 regk_timer_rw_trig_cfg_default = 0x00000000,
259 regk_timer_start = 0x00000001,
260 regk_timer_stop = 0x00000000,
261 regk_timer_time = 0x00000001,
262 regk_timer_tmr0 = 0x00000002,
263 regk_timer_tmr1 = 0x00000003,
264 regk_timer_yes = 0x00000001
265};
266#endif /* __timer_defs_h */
diff --git a/include/asm-cris/arch-v32/mach-fs/pinmux.h b/include/asm-cris/arch-v32/mach-fs/pinmux.h
deleted file mode 100644
index c2b3036779df..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/pinmux.h
+++ /dev/null
@@ -1,38 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PINMUX_H
2#define _ASM_CRIS_ARCH_PINMUX_H
3
4#define PORT_B 0
5#define PORT_C 1
6#define PORT_D 2
7#define PORT_E 3
8
9enum pin_mode {
10 pinmux_none = 0,
11 pinmux_fixed,
12 pinmux_gpio,
13 pinmux_iop
14};
15
16enum fixed_function {
17 pinmux_ser1,
18 pinmux_ser2,
19 pinmux_ser3,
20 pinmux_sser0,
21 pinmux_sser1,
22 pinmux_ata0,
23 pinmux_ata1,
24 pinmux_ata2,
25 pinmux_ata3,
26 pinmux_ata,
27 pinmux_eth1,
28 pinmux_timer
29};
30
31int crisv32_pinmux_init(void);
32int crisv32_pinmux_alloc(int port, int first_pin, int last_pin, enum pin_mode);
33int crisv32_pinmux_alloc_fixed(enum fixed_function function);
34int crisv32_pinmux_dealloc(int port, int first_pin, int last_pin);
35int crisv32_pinmux_dealloc_fixed(enum fixed_function function);
36void crisv32_pinmux_dump(void);
37
38#endif
diff --git a/include/asm-cris/arch-v32/mach-fs/startup.inc b/include/asm-cris/arch-v32/mach-fs/startup.inc
deleted file mode 100644
index 4a10ccbd6cc1..000000000000
--- a/include/asm-cris/arch-v32/mach-fs/startup.inc
+++ /dev/null
@@ -1,77 +0,0 @@
1#include <hwregs/asm/reg_map_asm.h>
2#include <hwregs/asm/bif_core_defs_asm.h>
3#include <hwregs/asm/gio_defs_asm.h>
4#include <hwregs/asm/config_defs_asm.h>
5
6 .macro GIO_INIT
7 move.d CONFIG_ETRAX_DEF_GIO_PA_OUT, $r0
8 move.d REG_ADDR(gio, regi_gio, rw_pa_dout), $r1
9 move.d $r0, [$r1]
10
11 move.d CONFIG_ETRAX_DEF_GIO_PA_OE, $r0
12 move.d REG_ADDR(gio, regi_gio, rw_pa_oe), $r1
13 move.d $r0, [$r1]
14
15 move.d CONFIG_ETRAX_DEF_GIO_PB_OUT, $r0
16 move.d REG_ADDR(gio, regi_gio, rw_pb_dout), $r1
17 move.d $r0, [$r1]
18
19 move.d CONFIG_ETRAX_DEF_GIO_PB_OE, $r0
20 move.d REG_ADDR(gio, regi_gio, rw_pb_oe), $r1
21 move.d $r0, [$r1]
22
23 move.d CONFIG_ETRAX_DEF_GIO_PC_OUT, $r0
24 move.d REG_ADDR(gio, regi_gio, rw_pc_dout), $r1
25 move.d $r0, [$r1]
26
27 move.d CONFIG_ETRAX_DEF_GIO_PC_OE, $r0
28 move.d REG_ADDR(gio, regi_gio, rw_pc_oe), $r1
29 move.d $r0, [$r1]
30
31 move.d CONFIG_ETRAX_DEF_GIO_PD_OUT, $r0
32 move.d REG_ADDR(gio, regi_gio, rw_pd_dout), $r1
33 move.d $r0, [$r1]
34
35 move.d CONFIG_ETRAX_DEF_GIO_PD_OE, $r0
36 move.d REG_ADDR(gio, regi_gio, rw_pd_oe), $r1
37 move.d $r0, [$r1]
38
39 move.d CONFIG_ETRAX_DEF_GIO_PE_OUT, $r0
40 move.d REG_ADDR(gio, regi_gio, rw_pe_dout), $r1
41 move.d $r0, [$r1]
42
43 move.d CONFIG_ETRAX_DEF_GIO_PE_OE, $r0
44 move.d REG_ADDR(gio, regi_gio, rw_pe_oe), $r1
45 move.d $r0, [$r1]
46 .endm
47
48 .macro START_CLOCKS
49 move.d REG_ADDR(config, regi_config, rw_clk_ctrl), $r1
50 move.d [$r1], $r0
51 or.d REG_STATE(config, rw_clk_ctrl, cpu, yes) | \
52 REG_STATE(config, rw_clk_ctrl, bif, yes) | \
53 REG_STATE(config, rw_clk_ctrl, fix_io, yes), $r0
54 move.d $r0, [$r1]
55 .endm
56
57 .macro SETUP_WAIT_STATES
58 ;; Set up waitstates etc
59 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp1_cfg), $r0
60 move.d CONFIG_ETRAX_MEM_GRP1_CONFIG, $r1
61 move.d $r1, [$r0]
62 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp2_cfg), $r0
63 move.d CONFIG_ETRAX_MEM_GRP2_CONFIG, $r1
64 move.d $r1, [$r0]
65 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp3_cfg), $r0
66 move.d CONFIG_ETRAX_MEM_GRP3_CONFIG, $r1
67 move.d $r1, [$r0]
68 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp4_cfg), $r0
69 move.d CONFIG_ETRAX_MEM_GRP4_CONFIG, $r1
70 move.d $r1, [$r0]
71#ifdef CONFIG_ETRAX_VCS_SIM
72 ;; Set up minimal flash waitstates
73 move.d 0, $r10
74 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp1_cfg), $r11
75 move.d $r10, [$r11]
76#endif
77 .endm
diff --git a/include/asm-cris/arch-v32/memmap.h b/include/asm-cris/arch-v32/memmap.h
deleted file mode 100644
index d29df5644d3e..000000000000
--- a/include/asm-cris/arch-v32/memmap.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef _ASM_ARCH_MEMMAP_H
2#define _ASM_ARCH_MEMMAP_H
3
4#define MEM_CSE0_START (0x00000000)
5#define MEM_CSE0_SIZE (0x04000000)
6#define MEM_CSE1_START (0x04000000)
7#define MEM_CSE1_SIZE (0x04000000)
8#define MEM_CSR0_START (0x08000000)
9#define MEM_CSR1_START (0x0c000000)
10#define MEM_CSP0_START (0x10000000)
11#define MEM_CSP1_START (0x14000000)
12#define MEM_CSP2_START (0x18000000)
13#define MEM_CSP3_START (0x1c000000)
14#define MEM_CSP4_START (0x20000000)
15#define MEM_CSP5_START (0x24000000)
16#define MEM_CSP6_START (0x28000000)
17#define MEM_CSP7_START (0x2c000000)
18#define MEM_INTMEM_START (0x38000000)
19#define MEM_INTMEM_SIZE (0x00020000)
20#define MEM_DRAM_START (0x40000000)
21
22#define MEM_NON_CACHEABLE (0x80000000)
23
24#endif
diff --git a/include/asm-cris/arch-v32/mmu.h b/include/asm-cris/arch-v32/mmu.h
deleted file mode 100644
index 6bcdc3fdf7dc..000000000000
--- a/include/asm-cris/arch-v32/mmu.h
+++ /dev/null
@@ -1,111 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_MMU_H
2#define _ASM_CRIS_ARCH_MMU_H
3
4/* MMU context type. */
5typedef struct
6{
7 unsigned int page_id;
8} mm_context_t;
9
10/* Kernel memory segments. */
11#define KSEG_F 0xf0000000UL
12#define KSEG_E 0xe0000000UL
13#define KSEG_D 0xd0000000UL
14#define KSEG_C 0xc0000000UL
15#define KSEG_B 0xb0000000UL
16#define KSEG_A 0xa0000000UL
17#define KSEG_9 0x90000000UL
18#define KSEG_8 0x80000000UL
19#define KSEG_7 0x70000000UL
20#define KSEG_6 0x60000000UL
21#define KSEG_5 0x50000000UL
22#define KSEG_4 0x40000000UL
23#define KSEG_3 0x30000000UL
24#define KSEG_2 0x20000000UL
25#define KSEG_1 0x10000000UL
26#define KSEG_0 0x00000000UL
27
28/*
29 * CRISv32 PTE bits:
30 *
31 * Bit: 31-13 12-5 4 3 2 1 0
32 * +-----+------+--------+-------+--------+-------+---------+
33 * | pfn | zero | global | valid | kernel | write | execute |
34 * +-----+------+--------+-------+--------+-------+---------+
35 */
36
37/*
38 * Defines for accessing the bits. Also define some synonyms for use with
39 * the software-based defined bits below.
40 */
41#define _PAGE_EXECUTE (1 << 0) /* Execution bit. */
42#define _PAGE_WE (1 << 1) /* Write bit. */
43#define _PAGE_SILENT_WRITE (1 << 1) /* Same as above. */
44#define _PAGE_KERNEL (1 << 2) /* Kernel mode page. */
45#define _PAGE_VALID (1 << 3) /* Page is valid. */
46#define _PAGE_SILENT_READ (1 << 3) /* Same as above. */
47#define _PAGE_GLOBAL (1 << 4) /* Global page. */
48
49/*
50 * The hardware doesn't care about these bits, but the kernel uses them in
51 * software.
52 */
53#define _PAGE_PRESENT (1 << 5) /* Page is present in memory. */
54#define _PAGE_FILE (1 << 6) /* 1=pagecache, 0=swap (when !present) */
55#define _PAGE_ACCESSED (1 << 6) /* Simulated in software using valid bit. */
56#define _PAGE_MODIFIED (1 << 7) /* Simulated in software using we bit. */
57#define _PAGE_READ (1 << 8) /* Read enabled. */
58#define _PAGE_WRITE (1 << 9) /* Write enabled. */
59
60/* Define some higher level generic page attributes. */
61#define __READABLE (_PAGE_READ | _PAGE_SILENT_READ | _PAGE_ACCESSED)
62#define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED)
63
64#define _PAGE_TABLE (_PAGE_PRESENT | __READABLE | __WRITEABLE)
65#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED)
66
67#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
68#define PAGE_SHARED __pgprot(_PAGE_PRESENT | __READABLE | _PAGE_WRITE | \
69 _PAGE_ACCESSED)
70#define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | __READABLE | _PAGE_WRITE | \
71 _PAGE_ACCESSED | _PAGE_EXECUTE)
72
73#define PAGE_READONLY __pgprot(_PAGE_PRESENT | __READABLE)
74#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | __READABLE | _PAGE_EXECUTE | _PAGE_ACCESSED)
75
76#define PAGE_COPY __pgprot(_PAGE_PRESENT | __READABLE)
77#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | __READABLE | _PAGE_EXECUTE)
78#define PAGE_KERNEL __pgprot(_PAGE_GLOBAL | _PAGE_KERNEL | \
79 _PAGE_PRESENT | __READABLE | __WRITEABLE)
80#define PAGE_KERNEL_EXEC __pgprot(_PAGE_GLOBAL | _PAGE_KERNEL | _PAGE_EXECUTE | \
81 _PAGE_PRESENT | __READABLE | __WRITEABLE)
82#define PAGE_SIGNAL_TRAMPOLINE __pgprot(_PAGE_GLOBAL | _PAGE_EXECUTE | \
83 _PAGE_PRESENT | __READABLE)
84
85#define _KERNPG_TABLE (_PAGE_TABLE | _PAGE_KERNEL)
86
87/* CRISv32 can do page protection for execute.
88 * Write permissions imply read permissions.
89 * Note that the numbers are in Execute-Write-Read order!
90 */
91#define __P000 PAGE_NONE
92#define __P001 PAGE_READONLY
93#define __P010 PAGE_COPY
94#define __P011 PAGE_COPY
95#define __P100 PAGE_READONLY_EXEC
96#define __P101 PAGE_READONLY_EXEC
97#define __P110 PAGE_COPY_EXEC
98#define __P111 PAGE_COPY_EXEC
99
100#define __S000 PAGE_NONE
101#define __S001 PAGE_READONLY
102#define __S010 PAGE_SHARED
103#define __S011 PAGE_SHARED
104#define __S100 PAGE_READONLY_EXEC
105#define __S101 PAGE_READONLY_EXEC
106#define __S110 PAGE_SHARED_EXEC
107#define __S111 PAGE_SHARED_EXEC
108
109#define PTE_FILE_MAX_BITS 25
110
111#endif /* _ASM_CRIS_ARCH_MMU_H */
diff --git a/include/asm-cris/arch-v32/offset.h b/include/asm-cris/arch-v32/offset.h
deleted file mode 100644
index 4442c4bd52f4..000000000000
--- a/include/asm-cris/arch-v32/offset.h
+++ /dev/null
@@ -1,35 +0,0 @@
1#ifndef __ASM_OFFSETS_H__
2#define __ASM_OFFSETS_H__
3/*
4 * DO NOT MODIFY.
5 *
6 * This file was generated by arch/cris/Makefile
7 *
8 */
9
10#define PT_orig_r10 0 /* offsetof(struct pt_regs, orig_r10) */
11#define PT_r13 56 /* offsetof(struct pt_regs, r13) */
12#define PT_r12 52 /* offsetof(struct pt_regs, r12) */
13#define PT_r11 48 /* offsetof(struct pt_regs, r11) */
14#define PT_r10 44 /* offsetof(struct pt_regs, r10) */
15#define PT_r9 40 /* offsetof(struct pt_regs, r9) */
16#define PT_acr 60 /* offsetof(struct pt_regs, acr) */
17#define PT_srs 64 /* offsetof(struct pt_regs, srs) */
18#define PT_mof 68 /* offsetof(struct pt_regs, mof) */
19#define PT_ccs 76 /* offsetof(struct pt_regs, ccs) */
20#define PT_srp 80 /* offsetof(struct pt_regs, srp) */
21
22#define TI_task 0 /* offsetof(struct thread_info, task) */
23#define TI_flags 8 /* offsetof(struct thread_info, flags) */
24#define TI_preempt_count 16 /* offsetof(struct thread_info, preempt_count) */
25
26#define THREAD_ksp 0 /* offsetof(struct thread_struct, ksp) */
27#define THREAD_usp 4 /* offsetof(struct thread_struct, usp) */
28#define THREAD_ccs 8 /* offsetof(struct thread_struct, ccs) */
29
30#define TASK_pid 151 /* offsetof(struct task_struct, pid) */
31
32#define LCLONE_VM 256 /* CLONE_VM */
33#define LCLONE_UNTRACED 8388608 /* CLONE_UNTRACED */
34
35#endif
diff --git a/include/asm-cris/arch-v32/page.h b/include/asm-cris/arch-v32/page.h
deleted file mode 100644
index 20f1b4806bfe..000000000000
--- a/include/asm-cris/arch-v32/page.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PAGE_H
2#define _ASM_CRIS_ARCH_PAGE_H
3
4
5#ifdef __KERNEL__
6
7#define PAGE_OFFSET KSEG_C /* kseg_c is mapped to physical ram. */
8
9/*
10 * Macros to convert between physical and virtual addresses. By stripping a
11 * selected bit it's possible to convert between KSEG_x and 0x40000000 where the
12 * DRAM really resides. DRAM is virtually at 0xc.
13 */
14#ifndef CONFIG_ETRAX_VCS_SIM
15#define __pa(x) ((unsigned long)(x) & 0x7fffffff)
16#define __va(x) ((void *)((unsigned long)(x) | 0x80000000))
17#else
18#define __pa(x) ((unsigned long)(x) & 0x3fffffff)
19#define __va(x) ((void *)((unsigned long)(x) | 0xc0000000))
20#endif
21
22#define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
23 VM_MAYREAD | VM_MAYWRITE)
24
25#endif /* __KERNEL__ */
26
27#endif /* _ASM_CRIS_ARCH_PAGE_H */
diff --git a/include/asm-cris/arch-v32/pgtable.h b/include/asm-cris/arch-v32/pgtable.h
deleted file mode 100644
index 08cb7ff7e4e7..000000000000
--- a/include/asm-cris/arch-v32/pgtable.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PGTABLE_H
2#define _ASM_CRIS_ARCH_PGTABLE_H
3
4/* Define the kernels virtual memory area. */
5#define VMALLOC_START KSEG_D
6#define VMALLOC_END KSEG_E
7#define VMALLOC_VMADDR(x) ((unsigned long)(x))
8
9#endif /* _ASM_CRIS_ARCH_PGTABLE_H */
diff --git a/include/asm-cris/arch-v32/pinmux.h b/include/asm-cris/arch-v32/pinmux.h
deleted file mode 100644
index bb09bce42e7a..000000000000
--- a/include/asm-cris/arch-v32/pinmux.h
+++ /dev/null
@@ -1,40 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PINMUX_H
2#define _ASM_CRIS_ARCH_PINMUX_H
3
4#define PORT_B 0
5#define PORT_C 1
6#define PORT_D 2
7#define PORT_E 3
8
9enum pin_mode
10{
11 pinmux_none = 0,
12 pinmux_fixed,
13 pinmux_gpio,
14 pinmux_iop
15};
16
17enum fixed_function
18{
19 pinmux_ser1,
20 pinmux_ser2,
21 pinmux_ser3,
22 pinmux_sser0,
23 pinmux_sser1,
24 pinmux_ata0,
25 pinmux_ata1,
26 pinmux_ata2,
27 pinmux_ata3,
28 pinmux_ata,
29 pinmux_eth1,
30 pinmux_timer
31};
32
33int crisv32_pinmux_init(void);
34int crisv32_pinmux_alloc(int port, int first_pin, int last_pin, enum pin_mode);
35int crisv32_pinmux_alloc_fixed(enum fixed_function function);
36int crisv32_pinmux_dealloc(int port, int first_pin, int last_pin);
37int crisv32_pinmux_dealloc_fixed(enum fixed_function function);
38void crisv32_pinmux_dump(void);
39
40#endif
diff --git a/include/asm-cris/arch-v32/processor.h b/include/asm-cris/arch-v32/processor.h
deleted file mode 100644
index f80b47790ca6..000000000000
--- a/include/asm-cris/arch-v32/processor.h
+++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_PROCESSOR_H
2#define _ASM_CRIS_ARCH_PROCESSOR_H
3
4
5/* Return current instruction pointer. */
6#define current_text_addr() \
7 ({void *pc; __asm__ __volatile__ ("lapcq .,%0" : "=rm" (pc)); pc;})
8
9/*
10 * Since CRIS doesn't do hardware task-switching this hasn't really anything to
11 * do with the proccessor itself, it's just here for legacy reasons. This is
12 * used when task-switching using _resume defined in entry.S. The offsets here
13 * are hardcoded into _resume, so if this struct is changed, entry.S needs to be
14 * changed as well.
15 */
16struct thread_struct {
17 unsigned long ksp; /* Kernel stack pointer. */
18 unsigned long usp; /* User stack pointer. */
19 unsigned long ccs; /* Saved flags register. */
20};
21
22/*
23 * User-space process size. This is hardcoded into a few places, so don't
24 * changed it unless everything's clear!
25 */
26#ifndef CONFIG_ETRAX_VCS_SIM
27#define TASK_SIZE (0xB0000000UL)
28#else
29#define TASK_SIZE (0xA0000000UL)
30#endif
31
32/* CCS I=1, enable interrupts. */
33#define INIT_THREAD { 0, 0, (1 << I_CCS_BITNR) }
34
35#define KSTK_EIP(tsk) \
36({ \
37 unsigned long eip = 0; \
38 unsigned long regs = (unsigned long)task_pt_regs(tsk); \
39 if (regs > PAGE_SIZE && virt_addr_valid(regs)) \
40 eip = ((struct pt_regs *)regs)->erp; \
41 eip; \
42})
43
44/*
45 * Give the thread a program location, set user-mode and switch user
46 * stackpointer.
47 */
48#define start_thread(regs, ip, usp) \
49do { \
50 set_fs(USER_DS); \
51 regs->erp = ip; \
52 regs->ccs |= 1 << (U_CCS_BITNR + CCS_SHIFT); \
53 wrusp(usp); \
54} while(0)
55
56/* Nothing special to do for v32 when handling a kernel bus fault fixup. */
57#define arch_fixup(regs) {};
58
59#endif /* _ASM_CRIS_ARCH_PROCESSOR_H */
diff --git a/include/asm-cris/arch-v32/ptrace.h b/include/asm-cris/arch-v32/ptrace.h
deleted file mode 100644
index 41f4e8662bc2..000000000000
--- a/include/asm-cris/arch-v32/ptrace.h
+++ /dev/null
@@ -1,118 +0,0 @@
1#ifndef _CRIS_ARCH_PTRACE_H
2#define _CRIS_ARCH_PTRACE_H
3
4/* Register numbers in the ptrace system call interface */
5
6#define PT_ORIG_R10 0
7#define PT_R0 1
8#define PT_R1 2
9#define PT_R2 3
10#define PT_R3 4
11#define PT_R4 5
12#define PT_R5 6
13#define PT_R6 7
14#define PT_R7 8
15#define PT_R8 9
16#define PT_R9 10
17#define PT_R10 11
18#define PT_R11 12
19#define PT_R12 13
20#define PT_R13 14
21#define PT_ACR 15
22#define PT_SRS 16
23#define PT_MOF 17
24#define PT_SPC 18
25#define PT_CCS 19
26#define PT_SRP 20
27#define PT_ERP 21 /* This is actually the debugged process' PC */
28#define PT_EXS 22
29#define PT_EDA 23
30#define PT_USP 24 /* special case - USP is not in the pt_regs */
31#define PT_PPC 25 /* special case - pseudo PC */
32#define PT_BP 26 /* Base number for BP registers. */
33#define PT_BP_CTRL 26 /* BP control register. */
34#define PT_MAX 40
35
36/* Condition code bit numbers. */
37#define C_CCS_BITNR 0
38#define V_CCS_BITNR 1
39#define Z_CCS_BITNR 2
40#define N_CCS_BITNR 3
41#define X_CCS_BITNR 4
42#define I_CCS_BITNR 5
43#define U_CCS_BITNR 6
44#define P_CCS_BITNR 7
45#define R_CCS_BITNR 8
46#define S_CCS_BITNR 9
47#define M_CCS_BITNR 30
48#define Q_CCS_BITNR 31
49#define CCS_SHIFT 10 /* Shift count for each level in CCS */
50
51/* pt_regs not only specifices the format in the user-struct during
52 * ptrace but is also the frame format used in the kernel prologue/epilogues
53 * themselves
54 */
55
56struct pt_regs {
57 unsigned long orig_r10;
58 /* pushed by movem r13, [sp] in SAVE_ALL. */
59 unsigned long r0;
60 unsigned long r1;
61 unsigned long r2;
62 unsigned long r3;
63 unsigned long r4;
64 unsigned long r5;
65 unsigned long r6;
66 unsigned long r7;
67 unsigned long r8;
68 unsigned long r9;
69 unsigned long r10;
70 unsigned long r11;
71 unsigned long r12;
72 unsigned long r13;
73 unsigned long acr;
74 unsigned long srs;
75 unsigned long mof;
76 unsigned long spc;
77 unsigned long ccs;
78 unsigned long srp;
79 unsigned long erp; /* This is actually the debugged process' PC */
80 /* For debugging purposes; saved only when needed. */
81 unsigned long exs;
82 unsigned long eda;
83};
84
85/* switch_stack is the extra stuff pushed onto the stack in _resume (entry.S)
86 * when doing a context-switch. it is used (apart from in resume) when a new
87 * thread is made and we need to make _resume (which is starting it for the
88 * first time) realise what is going on.
89 *
90 * Actually, the use is very close to the thread struct (TSS) in that both the
91 * switch_stack and the TSS are used to keep thread stuff when switching in
92 * _resume.
93 */
94
95struct switch_stack {
96 unsigned long r0;
97 unsigned long r1;
98 unsigned long r2;
99 unsigned long r3;
100 unsigned long r4;
101 unsigned long r5;
102 unsigned long r6;
103 unsigned long r7;
104 unsigned long r8;
105 unsigned long r9;
106 unsigned long return_ip; /* ip that _resume will return to */
107};
108
109#ifdef __KERNEL__
110
111#define user_mode(regs) (((regs)->ccs & (1 << (U_CCS_BITNR + CCS_SHIFT))) != 0)
112#define instruction_pointer(regs) ((regs)->erp)
113extern void show_regs(struct pt_regs *);
114#define profile_pc(regs) instruction_pointer(regs)
115
116#endif /* __KERNEL__ */
117
118#endif
diff --git a/include/asm-cris/arch-v32/spinlock.h b/include/asm-cris/arch-v32/spinlock.h
deleted file mode 100644
index 0d5709b983a1..000000000000
--- a/include/asm-cris/arch-v32/spinlock.h
+++ /dev/null
@@ -1,129 +0,0 @@
1#ifndef __ASM_ARCH_SPINLOCK_H
2#define __ASM_ARCH_SPINLOCK_H
3
4#include <linux/spinlock_types.h>
5
6#define RW_LOCK_BIAS 0x01000000
7
8extern void cris_spin_unlock(void *l, int val);
9extern void cris_spin_lock(void *l);
10extern int cris_spin_trylock(void *l);
11
12static inline int __raw_spin_is_locked(raw_spinlock_t *x)
13{
14 return *(volatile signed char *)(&(x)->slock) <= 0;
15}
16
17static inline void __raw_spin_unlock(raw_spinlock_t *lock)
18{
19 __asm__ volatile ("move.d %1,%0" \
20 : "=m" (lock->slock) \
21 : "r" (1) \
22 : "memory");
23}
24
25static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock)
26{
27 while (__raw_spin_is_locked(lock))
28 cpu_relax();
29}
30
31static inline int __raw_spin_trylock(raw_spinlock_t *lock)
32{
33 return cris_spin_trylock((void *)&lock->slock);
34}
35
36static inline void __raw_spin_lock(raw_spinlock_t *lock)
37{
38 cris_spin_lock((void *)&lock->slock);
39}
40
41static inline void
42__raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
43{
44 __raw_spin_lock(lock);
45}
46
47/*
48 * Read-write spinlocks, allowing multiple readers
49 * but only one writer.
50 *
51 * NOTE! it is quite common to have readers in interrupts
52 * but no interrupt writers. For those circumstances we
53 * can "mix" irq-safe locks - any writer needs to get a
54 * irq-safe write-lock, but readers can get non-irqsafe
55 * read-locks.
56 *
57 */
58
59static inline int __raw_read_can_lock(raw_rwlock_t *x)
60{
61 return (int)(x)->lock > 0;
62}
63
64static inline int __raw_write_can_lock(raw_rwlock_t *x)
65{
66 return (x)->lock == RW_LOCK_BIAS;
67}
68
69static inline void __raw_read_lock(raw_rwlock_t *rw)
70{
71 __raw_spin_lock(&rw->slock);
72 while (rw->lock == 0);
73 rw->lock--;
74 __raw_spin_unlock(&rw->slock);
75}
76
77static inline void __raw_write_lock(raw_rwlock_t *rw)
78{
79 __raw_spin_lock(&rw->slock);
80 while (rw->lock != RW_LOCK_BIAS);
81 rw->lock == 0;
82 __raw_spin_unlock(&rw->slock);
83}
84
85static inline void __raw_read_unlock(raw_rwlock_t *rw)
86{
87 __raw_spin_lock(&rw->slock);
88 rw->lock++;
89 __raw_spin_unlock(&rw->slock);
90}
91
92static inline void __raw_write_unlock(raw_rwlock_t *rw)
93{
94 __raw_spin_lock(&rw->slock);
95 while (rw->lock != RW_LOCK_BIAS);
96 rw->lock == RW_LOCK_BIAS;
97 __raw_spin_unlock(&rw->slock);
98}
99
100static inline int __raw_read_trylock(raw_rwlock_t *rw)
101{
102 int ret = 0;
103 __raw_spin_lock(&rw->slock);
104 if (rw->lock != 0) {
105 rw->lock--;
106 ret = 1;
107 }
108 __raw_spin_unlock(&rw->slock);
109 return ret;
110}
111
112static inline int __raw_write_trylock(raw_rwlock_t *rw)
113{
114 int ret = 0;
115 __raw_spin_lock(&rw->slock);
116 if (rw->lock == RW_LOCK_BIAS) {
117 rw->lock == 0;
118 ret = 1;
119 }
120 __raw_spin_unlock(&rw->slock);
121 return 1;
122}
123
124
125#define _raw_spin_relax(lock) cpu_relax()
126#define _raw_read_relax(lock) cpu_relax()
127#define _raw_write_relax(lock) cpu_relax()
128
129#endif /* __ASM_ARCH_SPINLOCK_H */
diff --git a/include/asm-cris/arch-v32/system.h b/include/asm-cris/arch-v32/system.h
deleted file mode 100644
index 6ca90f1f110a..000000000000
--- a/include/asm-cris/arch-v32/system.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_SYSTEM_H
2#define _ASM_CRIS_ARCH_SYSTEM_H
3
4
5/* Read the CPU version register. */
6static inline unsigned long rdvr(void)
7{
8 unsigned char vr;
9
10 __asm__ __volatile__ ("move $vr, %0" : "=rm" (vr));
11 return vr;
12}
13
14#define cris_machine_name "crisv32"
15
16/* Read the user-mode stack pointer. */
17static inline unsigned long rdusp(void)
18{
19 unsigned long usp;
20
21 __asm__ __volatile__ ("move $usp, %0" : "=rm" (usp));
22 return usp;
23}
24
25/* Read the current stack pointer. */
26static inline unsigned long rdsp(void)
27{
28 unsigned long sp;
29
30 __asm__ __volatile__ ("move.d $sp, %0" : "=rm" (sp));
31 return sp;
32}
33
34/* Write the user-mode stack pointer. */
35#define wrusp(usp) __asm__ __volatile__ ("move %0, $usp" : : "rm" (usp))
36
37#define nop() __asm__ __volatile__ ("nop");
38
39#define xchg(ptr,x) \
40 ((__typeof__(*(ptr)))__xchg((unsigned long) (x),(ptr),sizeof(*(ptr))))
41
42#define tas(ptr) (xchg((ptr),1))
43
44struct __xchg_dummy { unsigned long a[100]; };
45#define __xg(x) ((struct __xchg_dummy *)(x))
46
47/* Used for interrupt control. */
48#define local_save_flags(x) \
49 __asm__ __volatile__ ("move $ccs, %0" : "=rm" (x) : : "memory");
50
51#define local_irq_restore(x) \
52 __asm__ __volatile__ ("move %0, $ccs" : : "rm" (x) : "memory");
53
54#define local_irq_disable() __asm__ __volatile__ ("di" : : : "memory");
55#define local_irq_enable() __asm__ __volatile__ ("ei" : : : "memory");
56
57#define irqs_disabled() \
58({ \
59 unsigned long flags; \
60 \
61 local_save_flags(flags);\
62 !(flags & (1 << I_CCS_BITNR)); \
63})
64
65/* Used for spinlocks, etc. */
66#define local_irq_save(x) \
67 __asm__ __volatile__ ("move $ccs, %0\n\tdi" : "=rm" (x) : : "memory");
68
69#endif /* _ASM_CRIS_ARCH_SYSTEM_H */
diff --git a/include/asm-cris/arch-v32/thread_info.h b/include/asm-cris/arch-v32/thread_info.h
deleted file mode 100644
index d6936956a3c6..000000000000
--- a/include/asm-cris/arch-v32/thread_info.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_THREAD_INFO_H
2#define _ASM_CRIS_ARCH_THREAD_INFO_H
3
4/* Return a thread_info struct. */
5static inline struct thread_info *current_thread_info(void)
6{
7 struct thread_info *ti;
8
9 __asm__ __volatile__ ("and.d $sp, %0" : "=r" (ti) : "0" (~8191UL));
10 return ti;
11}
12
13#endif /* _ASM_CRIS_ARCH_THREAD_INFO_H */
diff --git a/include/asm-cris/arch-v32/timex.h b/include/asm-cris/arch-v32/timex.h
deleted file mode 100644
index 2591d3c5ed9d..000000000000
--- a/include/asm-cris/arch-v32/timex.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_TIMEX_H
2#define _ASM_CRIS_ARCH_TIMEX_H
3
4#include <hwregs/reg_map.h>
5#include <hwregs/reg_rdwr.h>
6#include <hwregs/timer_defs.h>
7
8/*
9 * The clock runs at 100MHz, we divide it by 1000000. If you change anything
10 * here you must check time.c as well.
11 */
12
13#define CLOCK_TICK_RATE 100000000 /* Underlying frequency of the HZ timer */
14
15/* The timer0 values gives 10 ns resolution but interrupts at HZ. */
16#define TIMER0_FREQ (CLOCK_TICK_RATE)
17#define TIMER0_DIV (TIMER0_FREQ/(HZ))
18
19/* Convert the value in step of 10 ns to 1us without overflow: */
20#define GET_JIFFIES_USEC() \
21 ((TIMER0_DIV - REG_RD(timer, regi_timer0, r_tmr0_data)) / 100)
22
23extern unsigned long get_ns_in_jiffie(void);
24
25static inline unsigned long get_us_in_jiffie_highres(void)
26{
27 return get_ns_in_jiffie() / 1000;
28}
29
30#endif
31
diff --git a/include/asm-cris/arch-v32/tlb.h b/include/asm-cris/arch-v32/tlb.h
deleted file mode 100644
index 4effb1253660..000000000000
--- a/include/asm-cris/arch-v32/tlb.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef _CRIS_ARCH_TLB_H
2#define _CRIS_ARCH_TLB_H
3
4/*
5 * The TLB is a 64-entry cache. Each entry has a 8-bit page_id that is used
6 * to store the "process" it belongs to (=> fast mm context switch). The
7 * last page_id is never used so we can make TLB entries that never matches.
8 */
9#define NUM_TLB_ENTRIES 64
10#define NUM_PAGEID 256
11#define INVALID_PAGEID 255
12#define NO_CONTEXT -1
13
14#endif /* _CRIS_ARCH_TLB_H */
diff --git a/include/asm-cris/arch-v32/uaccess.h b/include/asm-cris/arch-v32/uaccess.h
deleted file mode 100644
index 6b207f1b6622..000000000000
--- a/include/asm-cris/arch-v32/uaccess.h
+++ /dev/null
@@ -1,748 +0,0 @@
1/*
2 * Authors: Hans-Peter Nilsson (hp@axis.com)
3 *
4 */
5#ifndef _CRIS_ARCH_UACCESS_H
6#define _CRIS_ARCH_UACCESS_H
7
8/*
9 * We don't tell gcc that we are accessing memory, but this is OK
10 * because we do not write to any memory gcc knows about, so there
11 * are no aliasing issues.
12 *
13 * Note that PC at a fault is the address *at* the faulting
14 * instruction for CRISv32.
15 */
16#define __put_user_asm(x, addr, err, op) \
17 __asm__ __volatile__( \
18 "2: "op" %1,[%2]\n" \
19 "4:\n" \
20 " .section .fixup,\"ax\"\n" \
21 "3: move.d %3,%0\n" \
22 " jump 4b\n" \
23 " nop\n" \
24 " .previous\n" \
25 " .section __ex_table,\"a\"\n" \
26 " .dword 2b,3b\n" \
27 " .previous\n" \
28 : "=r" (err) \
29 : "r" (x), "r" (addr), "g" (-EFAULT), "0" (err))
30
31#define __put_user_asm_64(x, addr, err) do { \
32 int dummy_for_put_user_asm_64_; \
33 __asm__ __volatile__( \
34 "2: move.d %M2,[%1+]\n" \
35 "4: move.d %H2,[%1]\n" \
36 "5:\n" \
37 " .section .fixup,\"ax\"\n" \
38 "3: move.d %4,%0\n" \
39 " jump 5b\n" \
40 " .previous\n" \
41 " .section __ex_table,\"a\"\n" \
42 " .dword 2b,3b\n" \
43 " .dword 4b,3b\n" \
44 " .previous\n" \
45 : "=r" (err), "=b" (dummy_for_put_user_asm_64_) \
46 : "r" (x), "1" (addr), "g" (-EFAULT), \
47 "0" (err)); \
48 } while (0)
49
50/* See comment before __put_user_asm. */
51
52#define __get_user_asm(x, addr, err, op) \
53 __asm__ __volatile__( \
54 "2: "op" [%2],%1\n" \
55 "4:\n" \
56 " .section .fixup,\"ax\"\n" \
57 "3: move.d %3,%0\n" \
58 " jump 4b\n" \
59 " moveq 0,%1\n" \
60 " .previous\n" \
61 " .section __ex_table,\"a\"\n" \
62 " .dword 2b,3b\n" \
63 " .previous\n" \
64 : "=r" (err), "=r" (x) \
65 : "r" (addr), "g" (-EFAULT), "0" (err))
66
67#define __get_user_asm_64(x, addr, err) do { \
68 int dummy_for_get_user_asm_64_; \
69 __asm__ __volatile__( \
70 "2: move.d [%2+],%M1\n" \
71 "4: move.d [%2],%H1\n" \
72 "5:\n" \
73 " .section .fixup,\"ax\"\n" \
74 "3: move.d %4,%0\n" \
75 " jump 5b\n" \
76 " moveq 0,%1\n" \
77 " .previous\n" \
78 " .section __ex_table,\"a\"\n" \
79 " .dword 2b,3b\n" \
80 " .dword 4b,3b\n" \
81 " .previous\n" \
82 : "=r" (err), "=r" (x), \
83 "=b" (dummy_for_get_user_asm_64_) \
84 : "2" (addr), "g" (-EFAULT), "0" (err));\
85 } while (0)
86
87/*
88 * Copy a null terminated string from userspace.
89 *
90 * Must return:
91 * -EFAULT for an exception
92 * count if we hit the buffer limit
93 * bytes copied if we hit a null byte
94 * (without the null byte)
95 */
96static inline long
97__do_strncpy_from_user(char *dst, const char *src, long count)
98{
99 long res;
100
101 if (count == 0)
102 return 0;
103
104 /*
105 * Currently, in 2.4.0-test9, most ports use a simple byte-copy loop.
106 * So do we.
107 *
108 * This code is deduced from:
109 *
110 * char tmp2;
111 * long tmp1, tmp3;
112 * tmp1 = count;
113 * while ((*dst++ = (tmp2 = *src++)) != 0
114 * && --tmp1)
115 * ;
116 *
117 * res = count - tmp1;
118 *
119 * with tweaks.
120 */
121
122 __asm__ __volatile__ (
123 " move.d %3,%0\n"
124 "5: move.b [%2+],$acr\n"
125 "1: beq 2f\n"
126 " move.b $acr,[%1+]\n"
127
128 " subq 1,%0\n"
129 "2: bne 1b\n"
130 " move.b [%2+],$acr\n"
131
132 " sub.d %3,%0\n"
133 " neg.d %0,%0\n"
134 "3:\n"
135 " .section .fixup,\"ax\"\n"
136 "4: move.d %7,%0\n"
137 " jump 3b\n"
138 " nop\n"
139
140 /* The address for a fault at the first move is trivial.
141 The address for a fault at the second move is that of
142 the preceding branch insn, since the move insn is in
143 its delay-slot. That address is also a branch
144 target. Just so you don't get confused... */
145 " .previous\n"
146 " .section __ex_table,\"a\"\n"
147 " .dword 5b,4b\n"
148 " .dword 2b,4b\n"
149 " .previous"
150 : "=r" (res), "=b" (dst), "=b" (src), "=r" (count)
151 : "3" (count), "1" (dst), "2" (src), "g" (-EFAULT)
152 : "acr");
153
154 return res;
155}
156
157/* A few copy asms to build up the more complex ones from.
158
159 Note again, a post-increment is performed regardless of whether a bus
160 fault occurred in that instruction, and PC for a faulted insn is the
161 address for the insn, or for the preceding branch when in a delay-slot. */
162
163#define __asm_copy_user_cont(to, from, ret, COPY, FIXUP, TENTRY) \
164 __asm__ __volatile__ ( \
165 COPY \
166 "1:\n" \
167 " .section .fixup,\"ax\"\n" \
168 FIXUP \
169 " .previous\n" \
170 " .section __ex_table,\"a\"\n" \
171 TENTRY \
172 " .previous\n" \
173 : "=b" (to), "=b" (from), "=r" (ret) \
174 : "0" (to), "1" (from), "2" (ret) \
175 : "acr", "memory")
176
177#define __asm_copy_from_user_1(to, from, ret) \
178 __asm_copy_user_cont(to, from, ret, \
179 "2: move.b [%1+],$acr\n" \
180 " move.b $acr,[%0+]\n", \
181 "3: addq 1,%2\n" \
182 " jump 1b\n" \
183 " clear.b [%0+]\n", \
184 " .dword 2b,3b\n")
185
186#define __asm_copy_from_user_2x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
187 __asm_copy_user_cont(to, from, ret, \
188 COPY \
189 "2: move.w [%1+],$acr\n" \
190 " move.w $acr,[%0+]\n", \
191 FIXUP \
192 "3: addq 2,%2\n" \
193 " jump 1b\n" \
194 " clear.w [%0+]\n", \
195 TENTRY \
196 " .dword 2b,3b\n")
197
198#define __asm_copy_from_user_2(to, from, ret) \
199 __asm_copy_from_user_2x_cont(to, from, ret, "", "", "")
200
201#define __asm_copy_from_user_3(to, from, ret) \
202 __asm_copy_from_user_2x_cont(to, from, ret, \
203 "4: move.b [%1+],$acr\n" \
204 " move.b $acr,[%0+]\n", \
205 "5: addq 1,%2\n" \
206 " clear.b [%0+]\n", \
207 " .dword 4b,5b\n")
208
209#define __asm_copy_from_user_4x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
210 __asm_copy_user_cont(to, from, ret, \
211 COPY \
212 "2: move.d [%1+],$acr\n" \
213 " move.d $acr,[%0+]\n", \
214 FIXUP \
215 "3: addq 4,%2\n" \
216 " jump 1b\n" \
217 " clear.d [%0+]\n", \
218 TENTRY \
219 " .dword 2b,3b\n")
220
221#define __asm_copy_from_user_4(to, from, ret) \
222 __asm_copy_from_user_4x_cont(to, from, ret, "", "", "")
223
224#define __asm_copy_from_user_5(to, from, ret) \
225 __asm_copy_from_user_4x_cont(to, from, ret, \
226 "4: move.b [%1+],$acr\n" \
227 " move.b $acr,[%0+]\n", \
228 "5: addq 1,%2\n" \
229 " clear.b [%0+]\n", \
230 " .dword 4b,5b\n")
231
232#define __asm_copy_from_user_6x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
233 __asm_copy_from_user_4x_cont(to, from, ret, \
234 COPY \
235 "4: move.w [%1+],$acr\n" \
236 " move.w $acr,[%0+]\n", \
237 FIXUP \
238 "5: addq 2,%2\n" \
239 " clear.w [%0+]\n", \
240 TENTRY \
241 " .dword 4b,5b\n")
242
243#define __asm_copy_from_user_6(to, from, ret) \
244 __asm_copy_from_user_6x_cont(to, from, ret, "", "", "")
245
246#define __asm_copy_from_user_7(to, from, ret) \
247 __asm_copy_from_user_6x_cont(to, from, ret, \
248 "6: move.b [%1+],$acr\n" \
249 " move.b $acr,[%0+]\n", \
250 "7: addq 1,%2\n" \
251 " clear.b [%0+]\n", \
252 " .dword 6b,7b\n")
253
254#define __asm_copy_from_user_8x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
255 __asm_copy_from_user_4x_cont(to, from, ret, \
256 COPY \
257 "4: move.d [%1+],$acr\n" \
258 " move.d $acr,[%0+]\n", \
259 FIXUP \
260 "5: addq 4,%2\n" \
261 " clear.d [%0+]\n", \
262 TENTRY \
263 " .dword 4b,5b\n")
264
265#define __asm_copy_from_user_8(to, from, ret) \
266 __asm_copy_from_user_8x_cont(to, from, ret, "", "", "")
267
268#define __asm_copy_from_user_9(to, from, ret) \
269 __asm_copy_from_user_8x_cont(to, from, ret, \
270 "6: move.b [%1+],$acr\n" \
271 " move.b $acr,[%0+]\n", \
272 "7: addq 1,%2\n" \
273 " clear.b [%0+]\n", \
274 " .dword 6b,7b\n")
275
276#define __asm_copy_from_user_10x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
277 __asm_copy_from_user_8x_cont(to, from, ret, \
278 COPY \
279 "6: move.w [%1+],$acr\n" \
280 " move.w $acr,[%0+]\n", \
281 FIXUP \
282 "7: addq 2,%2\n" \
283 " clear.w [%0+]\n", \
284 TENTRY \
285 " .dword 6b,7b\n")
286
287#define __asm_copy_from_user_10(to, from, ret) \
288 __asm_copy_from_user_10x_cont(to, from, ret, "", "", "")
289
290#define __asm_copy_from_user_11(to, from, ret) \
291 __asm_copy_from_user_10x_cont(to, from, ret, \
292 "8: move.b [%1+],$acr\n" \
293 " move.b $acr,[%0+]\n", \
294 "9: addq 1,%2\n" \
295 " clear.b [%0+]\n", \
296 " .dword 8b,9b\n")
297
298#define __asm_copy_from_user_12x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
299 __asm_copy_from_user_8x_cont(to, from, ret, \
300 COPY \
301 "6: move.d [%1+],$acr\n" \
302 " move.d $acr,[%0+]\n", \
303 FIXUP \
304 "7: addq 4,%2\n" \
305 " clear.d [%0+]\n", \
306 TENTRY \
307 " .dword 6b,7b\n")
308
309#define __asm_copy_from_user_12(to, from, ret) \
310 __asm_copy_from_user_12x_cont(to, from, ret, "", "", "")
311
312#define __asm_copy_from_user_13(to, from, ret) \
313 __asm_copy_from_user_12x_cont(to, from, ret, \
314 "8: move.b [%1+],$acr\n" \
315 " move.b $acr,[%0+]\n", \
316 "9: addq 1,%2\n" \
317 " clear.b [%0+]\n", \
318 " .dword 8b,9b\n")
319
320#define __asm_copy_from_user_14x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
321 __asm_copy_from_user_12x_cont(to, from, ret, \
322 COPY \
323 "8: move.w [%1+],$acr\n" \
324 " move.w $acr,[%0+]\n", \
325 FIXUP \
326 "9: addq 2,%2\n" \
327 " clear.w [%0+]\n", \
328 TENTRY \
329 " .dword 8b,9b\n")
330
331#define __asm_copy_from_user_14(to, from, ret) \
332 __asm_copy_from_user_14x_cont(to, from, ret, "", "", "")
333
334#define __asm_copy_from_user_15(to, from, ret) \
335 __asm_copy_from_user_14x_cont(to, from, ret, \
336 "10: move.b [%1+],$acr\n" \
337 " move.b $acr,[%0+]\n", \
338 "11: addq 1,%2\n" \
339 " clear.b [%0+]\n", \
340 " .dword 10b,11b\n")
341
342#define __asm_copy_from_user_16x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
343 __asm_copy_from_user_12x_cont(to, from, ret, \
344 COPY \
345 "8: move.d [%1+],$acr\n" \
346 " move.d $acr,[%0+]\n", \
347 FIXUP \
348 "9: addq 4,%2\n" \
349 " clear.d [%0+]\n", \
350 TENTRY \
351 " .dword 8b,9b\n")
352
353#define __asm_copy_from_user_16(to, from, ret) \
354 __asm_copy_from_user_16x_cont(to, from, ret, "", "", "")
355
356#define __asm_copy_from_user_20x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
357 __asm_copy_from_user_16x_cont(to, from, ret, \
358 COPY \
359 "10: move.d [%1+],$acr\n" \
360 " move.d $acr,[%0+]\n", \
361 FIXUP \
362 "11: addq 4,%2\n" \
363 " clear.d [%0+]\n", \
364 TENTRY \
365 " .dword 10b,11b\n")
366
367#define __asm_copy_from_user_20(to, from, ret) \
368 __asm_copy_from_user_20x_cont(to, from, ret, "", "", "")
369
370#define __asm_copy_from_user_24x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
371 __asm_copy_from_user_20x_cont(to, from, ret, \
372 COPY \
373 "12: move.d [%1+],$acr\n" \
374 " move.d $acr,[%0+]\n", \
375 FIXUP \
376 "13: addq 4,%2\n" \
377 " clear.d [%0+]\n", \
378 TENTRY \
379 " .dword 12b,13b\n")
380
381#define __asm_copy_from_user_24(to, from, ret) \
382 __asm_copy_from_user_24x_cont(to, from, ret, "", "", "")
383
384/* And now, the to-user ones. */
385
386#define __asm_copy_to_user_1(to, from, ret) \
387 __asm_copy_user_cont(to, from, ret, \
388 " move.b [%1+],$acr\n" \
389 "2: move.b $acr,[%0+]\n", \
390 "3: jump 1b\n" \
391 " addq 1,%2\n", \
392 " .dword 2b,3b\n")
393
394#define __asm_copy_to_user_2x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
395 __asm_copy_user_cont(to, from, ret, \
396 COPY \
397 " move.w [%1+],$acr\n" \
398 "2: move.w $acr,[%0+]\n", \
399 FIXUP \
400 "3: jump 1b\n" \
401 " addq 2,%2\n", \
402 TENTRY \
403 " .dword 2b,3b\n")
404
405#define __asm_copy_to_user_2(to, from, ret) \
406 __asm_copy_to_user_2x_cont(to, from, ret, "", "", "")
407
408#define __asm_copy_to_user_3(to, from, ret) \
409 __asm_copy_to_user_2x_cont(to, from, ret, \
410 " move.b [%1+],$acr\n" \
411 "4: move.b $acr,[%0+]\n", \
412 "5: addq 1,%2\n", \
413 " .dword 4b,5b\n")
414
415#define __asm_copy_to_user_4x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
416 __asm_copy_user_cont(to, from, ret, \
417 COPY \
418 " move.d [%1+],$acr\n" \
419 "2: move.d $acr,[%0+]\n", \
420 FIXUP \
421 "3: jump 1b\n" \
422 " addq 4,%2\n", \
423 TENTRY \
424 " .dword 2b,3b\n")
425
426#define __asm_copy_to_user_4(to, from, ret) \
427 __asm_copy_to_user_4x_cont(to, from, ret, "", "", "")
428
429#define __asm_copy_to_user_5(to, from, ret) \
430 __asm_copy_to_user_4x_cont(to, from, ret, \
431 " move.b [%1+],$acr\n" \
432 "4: move.b $acr,[%0+]\n", \
433 "5: addq 1,%2\n", \
434 " .dword 4b,5b\n")
435
436#define __asm_copy_to_user_6x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
437 __asm_copy_to_user_4x_cont(to, from, ret, \
438 COPY \
439 " move.w [%1+],$acr\n" \
440 "4: move.w $acr,[%0+]\n", \
441 FIXUP \
442 "5: addq 2,%2\n", \
443 TENTRY \
444 " .dword 4b,5b\n")
445
446#define __asm_copy_to_user_6(to, from, ret) \
447 __asm_copy_to_user_6x_cont(to, from, ret, "", "", "")
448
449#define __asm_copy_to_user_7(to, from, ret) \
450 __asm_copy_to_user_6x_cont(to, from, ret, \
451 " move.b [%1+],$acr\n" \
452 "6: move.b $acr,[%0+]\n", \
453 "7: addq 1,%2\n", \
454 " .dword 6b,7b\n")
455
456#define __asm_copy_to_user_8x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
457 __asm_copy_to_user_4x_cont(to, from, ret, \
458 COPY \
459 " move.d [%1+],$acr\n" \
460 "4: move.d $acr,[%0+]\n", \
461 FIXUP \
462 "5: addq 4,%2\n", \
463 TENTRY \
464 " .dword 4b,5b\n")
465
466#define __asm_copy_to_user_8(to, from, ret) \
467 __asm_copy_to_user_8x_cont(to, from, ret, "", "", "")
468
469#define __asm_copy_to_user_9(to, from, ret) \
470 __asm_copy_to_user_8x_cont(to, from, ret, \
471 " move.b [%1+],$acr\n" \
472 "6: move.b $acr,[%0+]\n", \
473 "7: addq 1,%2\n", \
474 " .dword 6b,7b\n")
475
476#define __asm_copy_to_user_10x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
477 __asm_copy_to_user_8x_cont(to, from, ret, \
478 COPY \
479 " move.w [%1+],$acr\n" \
480 "6: move.w $acr,[%0+]\n", \
481 FIXUP \
482 "7: addq 2,%2\n", \
483 TENTRY \
484 " .dword 6b,7b\n")
485
486#define __asm_copy_to_user_10(to, from, ret) \
487 __asm_copy_to_user_10x_cont(to, from, ret, "", "", "")
488
489#define __asm_copy_to_user_11(to, from, ret) \
490 __asm_copy_to_user_10x_cont(to, from, ret, \
491 " move.b [%1+],$acr\n" \
492 "8: move.b $acr,[%0+]\n", \
493 "9: addq 1,%2\n", \
494 " .dword 8b,9b\n")
495
496#define __asm_copy_to_user_12x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
497 __asm_copy_to_user_8x_cont(to, from, ret, \
498 COPY \
499 " move.d [%1+],$acr\n" \
500 "6: move.d $acr,[%0+]\n", \
501 FIXUP \
502 "7: addq 4,%2\n", \
503 TENTRY \
504 " .dword 6b,7b\n")
505
506#define __asm_copy_to_user_12(to, from, ret) \
507 __asm_copy_to_user_12x_cont(to, from, ret, "", "", "")
508
509#define __asm_copy_to_user_13(to, from, ret) \
510 __asm_copy_to_user_12x_cont(to, from, ret, \
511 " move.b [%1+],$acr\n" \
512 "8: move.b $acr,[%0+]\n", \
513 "9: addq 1,%2\n", \
514 " .dword 8b,9b\n")
515
516#define __asm_copy_to_user_14x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
517 __asm_copy_to_user_12x_cont(to, from, ret, \
518 COPY \
519 " move.w [%1+],$acr\n" \
520 "8: move.w $acr,[%0+]\n", \
521 FIXUP \
522 "9: addq 2,%2\n", \
523 TENTRY \
524 " .dword 8b,9b\n")
525
526#define __asm_copy_to_user_14(to, from, ret) \
527 __asm_copy_to_user_14x_cont(to, from, ret, "", "", "")
528
529#define __asm_copy_to_user_15(to, from, ret) \
530 __asm_copy_to_user_14x_cont(to, from, ret, \
531 " move.b [%1+],$acr\n" \
532 "10: move.b $acr,[%0+]\n", \
533 "11: addq 1,%2\n", \
534 " .dword 10b,11b\n")
535
536#define __asm_copy_to_user_16x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
537 __asm_copy_to_user_12x_cont(to, from, ret, \
538 COPY \
539 " move.d [%1+],$acr\n" \
540 "8: move.d $acr,[%0+]\n", \
541 FIXUP \
542 "9: addq 4,%2\n", \
543 TENTRY \
544 " .dword 8b,9b\n")
545
546#define __asm_copy_to_user_16(to, from, ret) \
547 __asm_copy_to_user_16x_cont(to, from, ret, "", "", "")
548
549#define __asm_copy_to_user_20x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
550 __asm_copy_to_user_16x_cont(to, from, ret, \
551 COPY \
552 " move.d [%1+],$acr\n" \
553 "10: move.d $acr,[%0+]\n", \
554 FIXUP \
555 "11: addq 4,%2\n", \
556 TENTRY \
557 " .dword 10b,11b\n")
558
559#define __asm_copy_to_user_20(to, from, ret) \
560 __asm_copy_to_user_20x_cont(to, from, ret, "", "", "")
561
562#define __asm_copy_to_user_24x_cont(to, from, ret, COPY, FIXUP, TENTRY) \
563 __asm_copy_to_user_20x_cont(to, from, ret, \
564 COPY \
565 " move.d [%1+],$acr\n" \
566 "12: move.d $acr,[%0+]\n", \
567 FIXUP \
568 "13: addq 4,%2\n", \
569 TENTRY \
570 " .dword 12b,13b\n")
571
572#define __asm_copy_to_user_24(to, from, ret) \
573 __asm_copy_to_user_24x_cont(to, from, ret, "", "", "")
574
575/* Define a few clearing asms with exception handlers. */
576
577/* This frame-asm is like the __asm_copy_user_cont one, but has one less
578 input. */
579
580#define __asm_clear(to, ret, CLEAR, FIXUP, TENTRY) \
581 __asm__ __volatile__ ( \
582 CLEAR \
583 "1:\n" \
584 " .section .fixup,\"ax\"\n" \
585 FIXUP \
586 " .previous\n" \
587 " .section __ex_table,\"a\"\n" \
588 TENTRY \
589 " .previous" \
590 : "=b" (to), "=r" (ret) \
591 : "0" (to), "1" (ret) \
592 : "memory")
593
594#define __asm_clear_1(to, ret) \
595 __asm_clear(to, ret, \
596 "2: clear.b [%0+]\n", \
597 "3: jump 1b\n" \
598 " addq 1,%1\n", \
599 " .dword 2b,3b\n")
600
601#define __asm_clear_2(to, ret) \
602 __asm_clear(to, ret, \
603 "2: clear.w [%0+]\n", \
604 "3: jump 1b\n" \
605 " addq 2,%1\n", \
606 " .dword 2b,3b\n")
607
608#define __asm_clear_3(to, ret) \
609 __asm_clear(to, ret, \
610 "2: clear.w [%0+]\n" \
611 "3: clear.b [%0+]\n", \
612 "4: addq 2,%1\n" \
613 "5: jump 1b\n" \
614 " addq 1,%1\n", \
615 " .dword 2b,4b\n" \
616 " .dword 3b,5b\n")
617
618#define __asm_clear_4x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
619 __asm_clear(to, ret, \
620 CLEAR \
621 "2: clear.d [%0+]\n", \
622 FIXUP \
623 "3: jump 1b\n" \
624 " addq 4,%1\n", \
625 TENTRY \
626 " .dword 2b,3b\n")
627
628#define __asm_clear_4(to, ret) \
629 __asm_clear_4x_cont(to, ret, "", "", "")
630
631#define __asm_clear_8x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
632 __asm_clear_4x_cont(to, ret, \
633 CLEAR \
634 "4: clear.d [%0+]\n", \
635 FIXUP \
636 "5: addq 4,%1\n", \
637 TENTRY \
638 " .dword 4b,5b\n")
639
640#define __asm_clear_8(to, ret) \
641 __asm_clear_8x_cont(to, ret, "", "", "")
642
643#define __asm_clear_12x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
644 __asm_clear_8x_cont(to, ret, \
645 CLEAR \
646 "6: clear.d [%0+]\n", \
647 FIXUP \
648 "7: addq 4,%1\n", \
649 TENTRY \
650 " .dword 6b,7b\n")
651
652#define __asm_clear_12(to, ret) \
653 __asm_clear_12x_cont(to, ret, "", "", "")
654
655#define __asm_clear_16x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
656 __asm_clear_12x_cont(to, ret, \
657 CLEAR \
658 "8: clear.d [%0+]\n", \
659 FIXUP \
660 "9: addq 4,%1\n", \
661 TENTRY \
662 " .dword 8b,9b\n")
663
664#define __asm_clear_16(to, ret) \
665 __asm_clear_16x_cont(to, ret, "", "", "")
666
667#define __asm_clear_20x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
668 __asm_clear_16x_cont(to, ret, \
669 CLEAR \
670 "10: clear.d [%0+]\n", \
671 FIXUP \
672 "11: addq 4,%1\n", \
673 TENTRY \
674 " .dword 10b,11b\n")
675
676#define __asm_clear_20(to, ret) \
677 __asm_clear_20x_cont(to, ret, "", "", "")
678
679#define __asm_clear_24x_cont(to, ret, CLEAR, FIXUP, TENTRY) \
680 __asm_clear_20x_cont(to, ret, \
681 CLEAR \
682 "12: clear.d [%0+]\n", \
683 FIXUP \
684 "13: addq 4,%1\n", \
685 TENTRY \
686 " .dword 12b,13b\n")
687
688#define __asm_clear_24(to, ret) \
689 __asm_clear_24x_cont(to, ret, "", "", "")
690
691/*
692 * Return the size of a string (including the ending 0)
693 *
694 * Return length of string in userspace including terminating 0
695 * or 0 for error. Return a value greater than N if too long.
696 */
697
698static inline long
699strnlen_user(const char *s, long n)
700{
701 long res, tmp1;
702
703 if (!access_ok(VERIFY_READ, s, 0))
704 return 0;
705
706 /*
707 * This code is deduced from:
708 *
709 * tmp1 = n;
710 * while (tmp1-- > 0 && *s++)
711 * ;
712 *
713 * res = n - tmp1;
714 *
715 * (with tweaks).
716 */
717
718 __asm__ __volatile__ (
719 " move.d %1,$acr\n"
720 " cmpq 0,$acr\n"
721 "0:\n"
722 " ble 1f\n"
723 " subq 1,$acr\n"
724
725 "4: test.b [%0+]\n"
726 " bne 0b\n"
727 " cmpq 0,$acr\n"
728 "1:\n"
729 " move.d %1,%0\n"
730 " sub.d $acr,%0\n"
731 "2:\n"
732 " .section .fixup,\"ax\"\n"
733
734 "3: jump 2b\n"
735 " clear.d %0\n"
736
737 " .previous\n"
738 " .section __ex_table,\"a\"\n"
739 " .dword 4b,3b\n"
740 " .previous\n"
741 : "=r" (res), "=r" (tmp1)
742 : "0" (s), "1" (n)
743 : "acr");
744
745 return res;
746}
747
748#endif
diff --git a/include/asm-cris/arch-v32/unistd.h b/include/asm-cris/arch-v32/unistd.h
deleted file mode 100644
index 0051114c63c7..000000000000
--- a/include/asm-cris/arch-v32/unistd.h
+++ /dev/null
@@ -1,155 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_UNISTD_H_
2#define _ASM_CRIS_ARCH_UNISTD_H_
3
4/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
5/*
6 * Don't remove the .ifnc tests; they are an insurance against
7 * any hard-to-spot gcc register allocation bugs.
8 */
9#define _syscall0(type,name) \
10type name(void) \
11{ \
12 register long __a __asm__ ("r10"); \
13 register long __n_ __asm__ ("r9") = (__NR_##name); \
14 __asm__ __volatile__ (".ifnc %0%1,$r10$r9\n\t" \
15 ".err\n\t" \
16 ".endif\n\t" \
17 "break 13" \
18 : "=r" (__a) \
19 : "r" (__n_) \
20 : "memory"); \
21 if (__a >= 0) \
22 return (type) __a; \
23 errno = -__a; \
24 return (type) -1; \
25}
26
27#define _syscall1(type,name,type1,arg1) \
28type name(type1 arg1) \
29{ \
30 register long __a __asm__ ("r10") = (long) arg1; \
31 register long __n_ __asm__ ("r9") = (__NR_##name); \
32 __asm__ __volatile__ (".ifnc %0%1,$r10$r9\n\t" \
33 ".err\n\t" \
34 ".endif\n\t" \
35 "break 13" \
36 : "=r" (__a) \
37 : "r" (__n_), "0" (__a) \
38 : "memory"); \
39 if (__a >= 0) \
40 return (type) __a; \
41 errno = -__a; \
42 return (type) -1; \
43}
44
45#define _syscall2(type,name,type1,arg1,type2,arg2) \
46type name(type1 arg1,type2 arg2) \
47{ \
48 register long __a __asm__ ("r10") = (long) arg1; \
49 register long __b __asm__ ("r11") = (long) arg2; \
50 register long __n_ __asm__ ("r9") = (__NR_##name); \
51 __asm__ __volatile__ (".ifnc %0%1%3,$r10$r9$r11\n\t" \
52 ".err\n\t" \
53 ".endif\n\t" \
54 "break 13" \
55 : "=r" (__a) \
56 : "r" (__n_), "0" (__a), "r" (__b) \
57 : "memory"); \
58 if (__a >= 0) \
59 return (type) __a; \
60 errno = -__a; \
61 return (type) -1; \
62}
63
64#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
65type name(type1 arg1,type2 arg2,type3 arg3) \
66{ \
67 register long __a __asm__ ("r10") = (long) arg1; \
68 register long __b __asm__ ("r11") = (long) arg2; \
69 register long __c __asm__ ("r12") = (long) arg3; \
70 register long __n_ __asm__ ("r9") = (__NR_##name); \
71 __asm__ __volatile__ (".ifnc %0%1%3%4,$r10$r9$r11$r12\n\t" \
72 ".err\n\t" \
73 ".endif\n\t" \
74 "break 13" \
75 : "=r" (__a) \
76 : "r" (__n_), "0" (__a), "r" (__b), "r" (__c) \
77 : "memory"); \
78 if (__a >= 0) \
79 return (type) __a; \
80 errno = -__a; \
81 return (type) -1; \
82}
83
84#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
85type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
86{ \
87 register long __a __asm__ ("r10") = (long) arg1; \
88 register long __b __asm__ ("r11") = (long) arg2; \
89 register long __c __asm__ ("r12") = (long) arg3; \
90 register long __d __asm__ ("r13") = (long) arg4; \
91 register long __n_ __asm__ ("r9") = (__NR_##name); \
92 __asm__ __volatile__ (".ifnc %0%1%3%4%5,$r10$r9$r11$r12$r13\n\t" \
93 ".err\n\t" \
94 ".endif\n\t" \
95 "break 13" \
96 : "=r" (__a) \
97 : "r" (__n_), "0" (__a), "r" (__b), \
98 "r" (__c), "r" (__d)\
99 : "memory"); \
100 if (__a >= 0) \
101 return (type) __a; \
102 errno = -__a; \
103 return (type) -1; \
104}
105
106#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
107 type5,arg5) \
108type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
109{ \
110 register long __a __asm__ ("r10") = (long) arg1; \
111 register long __b __asm__ ("r11") = (long) arg2; \
112 register long __c __asm__ ("r12") = (long) arg3; \
113 register long __d __asm__ ("r13") = (long) arg4; \
114 register long __e __asm__ ("mof") = (long) arg5; \
115 register long __n_ __asm__ ("r9") = (__NR_##name); \
116 __asm__ __volatile__ (".ifnc %0%1%3%4%5%6,$r10$r9$r11$r12$r13$mof\n\t" \
117 ".err\n\t" \
118 ".endif\n\t" \
119 "break 13" \
120 : "=r" (__a) \
121 : "r" (__n_), "0" (__a), "r" (__b), \
122 "r" (__c), "r" (__d), "h" (__e) \
123 : "memory"); \
124 if (__a >= 0) \
125 return (type) __a; \
126 errno = -__a; \
127 return (type) -1; \
128}
129
130#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
131 type5,arg5,type6,arg6) \
132type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
133{ \
134 register long __a __asm__ ("r10") = (long) arg1; \
135 register long __b __asm__ ("r11") = (long) arg2; \
136 register long __c __asm__ ("r12") = (long) arg3; \
137 register long __d __asm__ ("r13") = (long) arg4; \
138 register long __e __asm__ ("mof") = (long) arg5; \
139 register long __f __asm__ ("srp") = (long) arg6; \
140 register long __n_ __asm__ ("r9") = (__NR_##name); \
141 __asm__ __volatile__ (".ifnc %0%1%3%4%5%6%7,$r10$r9$r11$r12$r13$mof$srp\n\t" \
142 ".err\n\t" \
143 ".endif\n\t" \
144 "break 13" \
145 : "=r" (__a) \
146 : "r" (__n_), "0" (__a), "r" (__b), \
147 "r" (__c), "r" (__d), "h" (__e), "x" (__f) \
148 : "memory"); \
149 if (__a >= 0) \
150 return (type) __a; \
151 errno = -__a; \
152 return (type) -1; \
153}
154
155#endif
diff --git a/include/asm-cris/arch-v32/user.h b/include/asm-cris/arch-v32/user.h
deleted file mode 100644
index 03fa1f3c3c00..000000000000
--- a/include/asm-cris/arch-v32/user.h
+++ /dev/null
@@ -1,41 +0,0 @@
1#ifndef _ASM_CRIS_ARCH_USER_H
2#define _ASM_CRIS_ARCH_USER_H
3
4/* User-mode register used for core dumps. */
5
6struct user_regs_struct {
7 unsigned long r0; /* General registers. */
8 unsigned long r1;
9 unsigned long r2;
10 unsigned long r3;
11 unsigned long r4;
12 unsigned long r5;
13 unsigned long r6;
14 unsigned long r7;
15 unsigned long r8;
16 unsigned long r9;
17 unsigned long r10;
18 unsigned long r11;
19 unsigned long r12;
20 unsigned long r13;
21 unsigned long sp; /* R14, Stack pointer. */
22 unsigned long acr; /* R15, Address calculation register. */
23 unsigned long bz; /* P0, Constant zero (8-bits). */
24 unsigned long vr; /* P1, Version register (8-bits). */
25 unsigned long pid; /* P2, Process ID (8-bits). */
26 unsigned long srs; /* P3, Support register select (8-bits). */
27 unsigned long wz; /* P4, Constant zero (16-bits). */
28 unsigned long exs; /* P5, Exception status. */
29 unsigned long eda; /* P6, Exception data address. */
30 unsigned long mof; /* P7, Multiply overflow regiter. */
31 unsigned long dz; /* P8, Constant zero (32-bits). */
32 unsigned long ebp; /* P9, Exception base pointer. */
33 unsigned long erp; /* P10, Exception return pointer. */
34 unsigned long srp; /* P11, Subroutine return pointer. */
35 unsigned long nrp; /* P12, NMI return pointer. */
36 unsigned long ccs; /* P13, Condition code stack. */
37 unsigned long usp; /* P14, User mode stack pointer. */
38 unsigned long spc; /* P15, Single step PC. */
39};
40
41#endif /* _ASM_CRIS_ARCH_USER_H */
diff --git a/include/asm-cris/atomic.h b/include/asm-cris/atomic.h
deleted file mode 100644
index 5fc87768774a..000000000000
--- a/include/asm-cris/atomic.h
+++ /dev/null
@@ -1,164 +0,0 @@
1/* $Id: atomic.h,v 1.3 2001/07/25 16:15:19 bjornw Exp $ */
2
3#ifndef __ASM_CRIS_ATOMIC__
4#define __ASM_CRIS_ATOMIC__
5
6#include <linux/compiler.h>
7
8#include <asm/system.h>
9#include <asm/arch/atomic.h>
10
11/*
12 * Atomic operations that C can't guarantee us. Useful for
13 * resource counting etc..
14 */
15
16typedef struct { volatile int counter; } atomic_t;
17
18#define ATOMIC_INIT(i) { (i) }
19
20#define atomic_read(v) ((v)->counter)
21#define atomic_set(v,i) (((v)->counter) = (i))
22
23/* These should be written in asm but we do it in C for now. */
24
25static inline void atomic_add(int i, volatile atomic_t *v)
26{
27 unsigned long flags;
28 cris_atomic_save(v, flags);
29 v->counter += i;
30 cris_atomic_restore(v, flags);
31}
32
33static inline void atomic_sub(int i, volatile atomic_t *v)
34{
35 unsigned long flags;
36 cris_atomic_save(v, flags);
37 v->counter -= i;
38 cris_atomic_restore(v, flags);
39}
40
41static inline int atomic_add_return(int i, volatile atomic_t *v)
42{
43 unsigned long flags;
44 int retval;
45 cris_atomic_save(v, flags);
46 retval = (v->counter += i);
47 cris_atomic_restore(v, flags);
48 return retval;
49}
50
51#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
52
53static inline int atomic_sub_return(int i, volatile atomic_t *v)
54{
55 unsigned long flags;
56 int retval;
57 cris_atomic_save(v, flags);
58 retval = (v->counter -= i);
59 cris_atomic_restore(v, flags);
60 return retval;
61}
62
63static inline int atomic_sub_and_test(int i, volatile atomic_t *v)
64{
65 int retval;
66 unsigned long flags;
67 cris_atomic_save(v, flags);
68 retval = (v->counter -= i) == 0;
69 cris_atomic_restore(v, flags);
70 return retval;
71}
72
73static inline void atomic_inc(volatile atomic_t *v)
74{
75 unsigned long flags;
76 cris_atomic_save(v, flags);
77 (v->counter)++;
78 cris_atomic_restore(v, flags);
79}
80
81static inline void atomic_dec(volatile atomic_t *v)
82{
83 unsigned long flags;
84 cris_atomic_save(v, flags);
85 (v->counter)--;
86 cris_atomic_restore(v, flags);
87}
88
89static inline int atomic_inc_return(volatile atomic_t *v)
90{
91 unsigned long flags;
92 int retval;
93 cris_atomic_save(v, flags);
94 retval = ++(v->counter);
95 cris_atomic_restore(v, flags);
96 return retval;
97}
98
99static inline int atomic_dec_return(volatile atomic_t *v)
100{
101 unsigned long flags;
102 int retval;
103 cris_atomic_save(v, flags);
104 retval = --(v->counter);
105 cris_atomic_restore(v, flags);
106 return retval;
107}
108static inline int atomic_dec_and_test(volatile atomic_t *v)
109{
110 int retval;
111 unsigned long flags;
112 cris_atomic_save(v, flags);
113 retval = --(v->counter) == 0;
114 cris_atomic_restore(v, flags);
115 return retval;
116}
117
118static inline int atomic_inc_and_test(volatile atomic_t *v)
119{
120 int retval;
121 unsigned long flags;
122 cris_atomic_save(v, flags);
123 retval = ++(v->counter) == 0;
124 cris_atomic_restore(v, flags);
125 return retval;
126}
127
128static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
129{
130 int ret;
131 unsigned long flags;
132
133 cris_atomic_save(v, flags);
134 ret = v->counter;
135 if (likely(ret == old))
136 v->counter = new;
137 cris_atomic_restore(v, flags);
138 return ret;
139}
140
141#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
142
143static inline int atomic_add_unless(atomic_t *v, int a, int u)
144{
145 int ret;
146 unsigned long flags;
147
148 cris_atomic_save(v, flags);
149 ret = v->counter;
150 if (ret != u)
151 v->counter += a;
152 cris_atomic_restore(v, flags);
153 return ret != u;
154}
155#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
156
157/* Atomic operations are already serializing */
158#define smp_mb__before_atomic_dec() barrier()
159#define smp_mb__after_atomic_dec() barrier()
160#define smp_mb__before_atomic_inc() barrier()
161#define smp_mb__after_atomic_inc() barrier()
162
163#include <asm-generic/atomic.h>
164#endif
diff --git a/include/asm-cris/auxvec.h b/include/asm-cris/auxvec.h
deleted file mode 100644
index cb30b01bf19f..000000000000
--- a/include/asm-cris/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASMCRIS_AUXVEC_H
2#define __ASMCRIS_AUXVEC_H
3
4#endif
diff --git a/include/asm-cris/axisflashmap.h b/include/asm-cris/axisflashmap.h
deleted file mode 100644
index 015ca5445ddd..000000000000
--- a/include/asm-cris/axisflashmap.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef __ASM_AXISFLASHMAP_H
2#define __ASM_AXISFLASHMAP_H
3
4/* Bootblock parameters are stored at 0xc000 and has the FLASH_BOOT_MAGIC
5 * as start, it ends with 0xFFFFFFFF */
6#define FLASH_BOOT_MAGIC 0xbeefcace
7#define BOOTPARAM_OFFSET 0xc000
8/* apps/bootblocktool is used to read and write the parameters,
9 * and it has nothing to do with the partition table.
10 */
11
12#define PARTITION_TABLE_OFFSET 10
13#define PARTITION_TABLE_MAGIC 0xbeef /* Not a good magic */
14
15/* The partitiontable_head is located at offset +10: */
16struct partitiontable_head {
17 __u16 magic; /* PARTITION_TABLE_MAGIC */
18 __u16 size; /* Length of ptable block (entries + end marker) */
19 __u32 checksum; /* simple longword sum, over entries + end marker */
20};
21
22/* And followed by partition table entries */
23struct partitiontable_entry {
24 __u32 offset; /* relative to the sector the ptable is in */
25 __u32 size; /* in bytes */
26 __u32 checksum; /* simple longword sum */
27 __u16 type; /* see type codes below */
28 __u16 flags; /* bit 0: ro/rw = 1/0 */
29 __u32 future0; /* 16 bytes reserved for future use */
30 __u32 future1;
31 __u32 future2;
32 __u32 future3;
33};
34/* ended by an end marker: */
35#define PARTITIONTABLE_END_MARKER 0xFFFFFFFF
36#define PARTITIONTABLE_END_MARKER_SIZE 4
37
38#define PARTITIONTABLE_END_PAD 10
39
40/* Complete structure for whole partition table */
41/* note that table may end before CONFIG_ETRAX_PTABLE_ENTRIES by setting
42 * offset of the last entry + 1 to PARTITIONTABLE_END_MARKER.
43 */
44struct partitiontable {
45 __u8 skip[PARTITION_TABLE_OFFSET];
46 struct partitiontable_head head;
47 struct partitiontable_entry entries[];
48};
49
50#define PARTITION_TYPE_PARAM 0x0001
51#define PARTITION_TYPE_KERNEL 0x0002
52#define PARTITION_TYPE_JFFS 0x0003
53#define PARTITION_TYPE_JFFS2 0x0000
54
55#define PARTITION_FLAGS_READONLY_MASK 0x0001
56#define PARTITION_FLAGS_READONLY 0x0001
57
58/* The master mtd for the entire flash. */
59extern struct mtd_info *axisflash_mtd;
60
61#endif
diff --git a/include/asm-cris/bitops.h b/include/asm-cris/bitops.h
deleted file mode 100644
index 75ea6e096483..000000000000
--- a/include/asm-cris/bitops.h
+++ /dev/null
@@ -1,166 +0,0 @@
1/* asm/bitops.h for Linux/CRIS
2 *
3 * TODO: asm versions if speed is needed
4 *
5 * All bit operations return 0 if the bit was cleared before the
6 * operation and != 0 if it was not.
7 *
8 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
9 */
10
11#ifndef _CRIS_BITOPS_H
12#define _CRIS_BITOPS_H
13
14/* Currently this is unsuitable for consumption outside the kernel. */
15#ifdef __KERNEL__
16
17#ifndef _LINUX_BITOPS_H
18#error only <linux/bitops.h> can be included directly
19#endif
20
21#include <asm/arch/bitops.h>
22#include <asm/system.h>
23#include <asm/atomic.h>
24#include <linux/compiler.h>
25
26/*
27 * set_bit - Atomically set a bit in memory
28 * @nr: the bit to set
29 * @addr: the address to start counting from
30 *
31 * This function is atomic and may not be reordered. See __set_bit()
32 * if you do not require the atomic guarantees.
33 * Note that @nr may be almost arbitrarily large; this function is not
34 * restricted to acting on a single-word quantity.
35 */
36
37#define set_bit(nr, addr) (void)test_and_set_bit(nr, addr)
38
39/*
40 * clear_bit - Clears a bit in memory
41 * @nr: Bit to clear
42 * @addr: Address to start counting from
43 *
44 * clear_bit() is atomic and may not be reordered. However, it does
45 * not contain a memory barrier, so if it is used for locking purposes,
46 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
47 * in order to ensure changes are visible on other processors.
48 */
49
50#define clear_bit(nr, addr) (void)test_and_clear_bit(nr, addr)
51
52/*
53 * change_bit - Toggle a bit in memory
54 * @nr: Bit to change
55 * @addr: Address to start counting from
56 *
57 * change_bit() is atomic and may not be reordered.
58 * Note that @nr may be almost arbitrarily large; this function is not
59 * restricted to acting on a single-word quantity.
60 */
61
62#define change_bit(nr, addr) (void)test_and_change_bit(nr, addr)
63
64/**
65 * test_and_set_bit - Set a bit and return its old value
66 * @nr: Bit to set
67 * @addr: Address to count from
68 *
69 * This operation is atomic and cannot be reordered.
70 * It also implies a memory barrier.
71 */
72
73static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
74{
75 unsigned int mask, retval;
76 unsigned long flags;
77 unsigned int *adr = (unsigned int *)addr;
78
79 adr += nr >> 5;
80 mask = 1 << (nr & 0x1f);
81 cris_atomic_save(addr, flags);
82 retval = (mask & *adr) != 0;
83 *adr |= mask;
84 cris_atomic_restore(addr, flags);
85 return retval;
86}
87
88/*
89 * clear_bit() doesn't provide any barrier for the compiler.
90 */
91#define smp_mb__before_clear_bit() barrier()
92#define smp_mb__after_clear_bit() barrier()
93
94/**
95 * test_and_clear_bit - Clear a bit and return its old value
96 * @nr: Bit to clear
97 * @addr: Address to count from
98 *
99 * This operation is atomic and cannot be reordered.
100 * It also implies a memory barrier.
101 */
102
103static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
104{
105 unsigned int mask, retval;
106 unsigned long flags;
107 unsigned int *adr = (unsigned int *)addr;
108
109 adr += nr >> 5;
110 mask = 1 << (nr & 0x1f);
111 cris_atomic_save(addr, flags);
112 retval = (mask & *adr) != 0;
113 *adr &= ~mask;
114 cris_atomic_restore(addr, flags);
115 return retval;
116}
117
118/**
119 * test_and_change_bit - Change a bit and return its old value
120 * @nr: Bit to change
121 * @addr: Address to count from
122 *
123 * This operation is atomic and cannot be reordered.
124 * It also implies a memory barrier.
125 */
126
127static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
128{
129 unsigned int mask, retval;
130 unsigned long flags;
131 unsigned int *adr = (unsigned int *)addr;
132 adr += nr >> 5;
133 mask = 1 << (nr & 0x1f);
134 cris_atomic_save(addr, flags);
135 retval = (mask & *adr) != 0;
136 *adr ^= mask;
137 cris_atomic_restore(addr, flags);
138 return retval;
139}
140
141#include <asm-generic/bitops/non-atomic.h>
142
143/*
144 * Since we define it "external", it collides with the built-in
145 * definition, which doesn't have the same semantics. We don't want to
146 * use -fno-builtin, so just hide the name ffs.
147 */
148#define ffs kernel_ffs
149
150#include <asm-generic/bitops/fls.h>
151#include <asm-generic/bitops/fls64.h>
152#include <asm-generic/bitops/hweight.h>
153#include <asm-generic/bitops/find.h>
154#include <asm-generic/bitops/lock.h>
155
156#include <asm-generic/bitops/ext2-non-atomic.h>
157
158#define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a)
159#define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a)
160
161#include <asm-generic/bitops/minix.h>
162#include <asm-generic/bitops/sched.h>
163
164#endif /* __KERNEL__ */
165
166#endif /* _CRIS_BITOPS_H */
diff --git a/include/asm-cris/bug.h b/include/asm-cris/bug.h
deleted file mode 100644
index fee12d4ae683..000000000000
--- a/include/asm-cris/bug.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef _CRIS_BUG_H
2#define _CRIS_BUG_H
3#include <asm/arch/bug.h>
4#endif
diff --git a/include/asm-cris/bugs.h b/include/asm-cris/bugs.h
deleted file mode 100644
index c5907aac1007..000000000000
--- a/include/asm-cris/bugs.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* $Id: bugs.h,v 1.2 2001/01/17 17:03:18 bjornw Exp $
2 *
3 * include/asm-cris/bugs.h
4 *
5 * Copyright (C) 2001 Axis Communications AB
6 */
7
8/*
9 * This is included by init/main.c to check for architecture-dependent bugs.
10 *
11 * Needs:
12 * void check_bugs(void);
13 */
14
15static void check_bugs(void)
16{
17}
18
19
20
21
diff --git a/include/asm-cris/byteorder.h b/include/asm-cris/byteorder.h
deleted file mode 100644
index 0cd9db1cc888..000000000000
--- a/include/asm-cris/byteorder.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _CRIS_BYTEORDER_H
2#define _CRIS_BYTEORDER_H
3
4#ifdef __GNUC__
5
6#ifdef __KERNEL__
7#include <asm/arch/byteorder.h>
8
9/* defines are necessary because the other files detect the presence
10 * of a defined __arch_swab32, not an inline
11 */
12#define __arch__swab32(x) ___arch__swab32(x)
13#define __arch__swab16(x) ___arch__swab16(x)
14#endif /* __KERNEL__ */
15
16#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
17# define __BYTEORDER_HAS_U64__
18# define __SWAB_64_THRU_32__
19#endif
20
21#endif /* __GNUC__ */
22
23#include <linux/byteorder/little_endian.h>
24
25#endif
26
27
diff --git a/include/asm-cris/cache.h b/include/asm-cris/cache.h
deleted file mode 100644
index 46a3b26e205a..000000000000
--- a/include/asm-cris/cache.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_CACHE_H
2#define _ASM_CACHE_H
3
4#include <asm/arch/cache.h>
5
6#endif /* _ASM_CACHE_H */
diff --git a/include/asm-cris/cacheflush.h b/include/asm-cris/cacheflush.h
deleted file mode 100644
index cf60e3f69f8d..000000000000
--- a/include/asm-cris/cacheflush.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _CRIS_CACHEFLUSH_H
2#define _CRIS_CACHEFLUSH_H
3
4/* Keep includes the same across arches. */
5#include <linux/mm.h>
6
7/* The cache doesn't need to be flushed when TLB entries change because
8 * the cache is mapped to physical memory, not virtual memory
9 */
10#define flush_cache_all() do { } while (0)
11#define flush_cache_mm(mm) do { } while (0)
12#define flush_cache_dup_mm(mm) do { } while (0)
13#define flush_cache_range(vma, start, end) do { } while (0)
14#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
15#define flush_dcache_page(page) do { } while (0)
16#define flush_dcache_mmap_lock(mapping) do { } while (0)
17#define flush_dcache_mmap_unlock(mapping) do { } while (0)
18#define flush_icache_range(start, end) do { } while (0)
19#define flush_icache_page(vma,pg) do { } while (0)
20#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
21#define flush_cache_vmap(start, end) do { } while (0)
22#define flush_cache_vunmap(start, end) do { } while (0)
23
24#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
25 memcpy(dst, src, len)
26#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
27 memcpy(dst, src, len)
28
29int change_page_attr(struct page *page, int numpages, pgprot_t prot);
30
31#endif /* _CRIS_CACHEFLUSH_H */
diff --git a/include/asm-cris/checksum.h b/include/asm-cris/checksum.h
deleted file mode 100644
index c6c5be62c698..000000000000
--- a/include/asm-cris/checksum.h
+++ /dev/null
@@ -1,83 +0,0 @@
1/* TODO: csum_tcpudp_magic could be speeded up, and csum_fold as well */
2
3#ifndef _CRIS_CHECKSUM_H
4#define _CRIS_CHECKSUM_H
5
6#include <asm/arch/checksum.h>
7
8/*
9 * computes the checksum of a memory block at buff, length len,
10 * and adds in "sum" (32-bit)
11 *
12 * returns a 32-bit number suitable for feeding into itself
13 * or csum_tcpudp_magic
14 *
15 * this function must be called with even lengths, except
16 * for the last fragment, which may be odd
17 *
18 * it's best to have buff aligned on a 32-bit boundary
19 */
20__wsum csum_partial(const void *buff, int len, __wsum sum);
21
22/*
23 * the same as csum_partial, but copies from src while it
24 * checksums
25 *
26 * here even more important to align src and dst on a 32-bit (or even
27 * better 64-bit) boundary
28 */
29
30__wsum csum_partial_copy_nocheck(const void *src, void *dst,
31 int len, __wsum sum);
32
33/*
34 * Fold a partial checksum into a word
35 */
36
37static inline __sum16 csum_fold(__wsum csum)
38{
39 u32 sum = (__force u32)csum;
40 sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */
41 sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */
42 return (__force __sum16)~sum;
43}
44
45extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
46 int len, __wsum sum,
47 int *errptr);
48
49/*
50 * This is a version of ip_compute_csum() optimized for IP headers,
51 * which always checksum on 4 octet boundaries.
52 *
53 */
54
55static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
56{
57 return csum_fold(csum_partial(iph, ihl * 4, 0));
58}
59
60/*
61 * computes the checksum of the TCP/UDP pseudo-header
62 * returns a 16-bit checksum, already complemented
63 */
64
65static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
66 unsigned short len,
67 unsigned short proto,
68 __wsum sum)
69{
70 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
71}
72
73/*
74 * this routine is used for miscellaneous IP-like checksums, mainly
75 * in icmp.c
76 */
77
78static inline __sum16 ip_compute_csum(const void *buff, int len)
79{
80 return csum_fold (csum_partial(buff, len, 0));
81}
82
83#endif
diff --git a/include/asm-cris/cputime.h b/include/asm-cris/cputime.h
deleted file mode 100644
index 4446a65656fa..000000000000
--- a/include/asm-cris/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __CRIS_CPUTIME_H
2#define __CRIS_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __CRIS_CPUTIME_H */
diff --git a/include/asm-cris/current.h b/include/asm-cris/current.h
deleted file mode 100644
index 5f5c0efd00be..000000000000
--- a/include/asm-cris/current.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _CRIS_CURRENT_H
2#define _CRIS_CURRENT_H
3
4#include <linux/thread_info.h>
5
6struct task_struct;
7
8static inline struct task_struct * get_current(void)
9{
10 return current_thread_info()->task;
11}
12
13#define current get_current()
14
15#endif /* !(_CRIS_CURRENT_H) */
diff --git a/include/asm-cris/delay.h b/include/asm-cris/delay.h
deleted file mode 100644
index 123e19aef49d..000000000000
--- a/include/asm-cris/delay.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _CRIS_DELAY_H
2#define _CRIS_DELAY_H
3
4/*
5 * Copyright (C) 1998-2002 Axis Communications AB
6 *
7 * Delay routines, using a pre-computed "loops_per_second" value.
8 */
9
10#include <asm/arch/delay.h>
11
12/* Use only for very small delays ( < 1 msec). */
13
14extern unsigned long loops_per_usec; /* arch/cris/mm/init.c */
15
16/* May be defined by arch/delay.h. */
17#ifndef udelay
18static inline void udelay(unsigned long usecs)
19{
20 __delay(usecs * loops_per_usec);
21}
22#endif
23
24#endif /* defined(_CRIS_DELAY_H) */
25
26
27
diff --git a/include/asm-cris/device.h b/include/asm-cris/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-cris/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-cris/div64.h b/include/asm-cris/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/include/asm-cris/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/include/asm-cris/dma-mapping.h b/include/asm-cris/dma-mapping.h
deleted file mode 100644
index da8ef8e8f842..000000000000
--- a/include/asm-cris/dma-mapping.h
+++ /dev/null
@@ -1,170 +0,0 @@
1/* DMA mapping. Nothing tricky here, just virt_to_phys */
2
3#ifndef _ASM_CRIS_DMA_MAPPING_H
4#define _ASM_CRIS_DMA_MAPPING_H
5
6#include <linux/mm.h>
7#include <linux/kernel.h>
8
9#include <asm/cache.h>
10#include <asm/io.h>
11#include <asm/scatterlist.h>
12
13#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
14#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
15
16#ifdef CONFIG_PCI
17#include <asm-generic/dma-coherent.h>
18
19void *dma_alloc_coherent(struct device *dev, size_t size,
20 dma_addr_t *dma_handle, gfp_t flag);
21
22void dma_free_coherent(struct device *dev, size_t size,
23 void *vaddr, dma_addr_t dma_handle);
24#else
25static inline void *
26dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
27 gfp_t flag)
28{
29 BUG();
30 return NULL;
31}
32
33static inline void
34dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
35 dma_addr_t dma_handle)
36{
37 BUG();
38}
39#endif
40static inline dma_addr_t
41dma_map_single(struct device *dev, void *ptr, size_t size,
42 enum dma_data_direction direction)
43{
44 BUG_ON(direction == DMA_NONE);
45 return virt_to_phys(ptr);
46}
47
48static inline void
49dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
50 enum dma_data_direction direction)
51{
52 BUG_ON(direction == DMA_NONE);
53}
54
55static inline int
56dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
57 enum dma_data_direction direction)
58{
59 printk("Map sg\n");
60 return nents;
61}
62
63static inline dma_addr_t
64dma_map_page(struct device *dev, struct page *page, unsigned long offset,
65 size_t size, enum dma_data_direction direction)
66{
67 BUG_ON(direction == DMA_NONE);
68 return page_to_phys(page) + offset;
69}
70
71static inline void
72dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
73 enum dma_data_direction direction)
74{
75 BUG_ON(direction == DMA_NONE);
76}
77
78
79static inline void
80dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
81 enum dma_data_direction direction)
82{
83 BUG_ON(direction == DMA_NONE);
84}
85
86static inline void
87dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
88 enum dma_data_direction direction)
89{
90}
91
92static inline void
93dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
94 enum dma_data_direction direction)
95{
96}
97
98static inline void
99dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
100 unsigned long offset, size_t size,
101 enum dma_data_direction direction)
102{
103}
104
105static inline void
106dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
107 unsigned long offset, size_t size,
108 enum dma_data_direction direction)
109{
110}
111
112static inline void
113dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
114 enum dma_data_direction direction)
115{
116}
117
118static inline void
119dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
120 enum dma_data_direction direction)
121{
122}
123
124static inline int
125dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
126{
127 return 0;
128}
129
130static inline int
131dma_supported(struct device *dev, u64 mask)
132{
133 /*
134 * we fall back to GFP_DMA when the mask isn't all 1s,
135 * so we can't guarantee allocations that must be
136 * within a tighter range than GFP_DMA..
137 */
138 if(mask < 0x00ffffff)
139 return 0;
140
141 return 1;
142}
143
144static inline int
145dma_set_mask(struct device *dev, u64 mask)
146{
147 if(!dev->dma_mask || !dma_supported(dev, mask))
148 return -EIO;
149
150 *dev->dma_mask = mask;
151
152 return 0;
153}
154
155static inline int
156dma_get_cache_alignment(void)
157{
158 return (1 << INTERNODE_CACHE_SHIFT);
159}
160
161#define dma_is_consistent(d, h) (1)
162
163static inline void
164dma_cache_sync(struct device *dev, void *vaddr, size_t size,
165 enum dma_data_direction direction)
166{
167}
168
169
170#endif
diff --git a/include/asm-cris/dma.h b/include/asm-cris/dma.h
deleted file mode 100644
index 6f188dc56138..000000000000
--- a/include/asm-cris/dma.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* $Id: dma.h,v 1.2 2001/05/09 12:17:42 johana Exp $ */
2
3#ifndef _ASM_DMA_H
4#define _ASM_DMA_H
5
6#include <asm/arch/dma.h>
7
8/* it's useless on the Etrax, but unfortunately needed by the new
9 bootmem allocator (but this should do it for this) */
10
11#define MAX_DMA_ADDRESS PAGE_OFFSET
12
13/* From PCI */
14
15#ifdef CONFIG_PCI
16extern int isa_dma_bridge_buggy;
17#else
18#define isa_dma_bridge_buggy (0)
19#endif
20
21#endif /* _ASM_DMA_H */
diff --git a/include/asm-cris/elf.h b/include/asm-cris/elf.h
deleted file mode 100644
index 001f64ad11e8..000000000000
--- a/include/asm-cris/elf.h
+++ /dev/null
@@ -1,93 +0,0 @@
1#ifndef __ASMCRIS_ELF_H
2#define __ASMCRIS_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/user.h>
9
10#define R_CRIS_NONE 0
11#define R_CRIS_8 1
12#define R_CRIS_16 2
13#define R_CRIS_32 3
14#define R_CRIS_8_PCREL 4
15#define R_CRIS_16_PCREL 5
16#define R_CRIS_32_PCREL 6
17#define R_CRIS_GNU_VTINHERIT 7
18#define R_CRIS_GNU_VTENTRY 8
19#define R_CRIS_COPY 9
20#define R_CRIS_GLOB_DAT 10
21#define R_CRIS_JUMP_SLOT 11
22#define R_CRIS_RELATIVE 12
23#define R_CRIS_16_GOT 13
24#define R_CRIS_32_GOT 14
25#define R_CRIS_16_GOTPLT 15
26#define R_CRIS_32_GOTPLT 16
27#define R_CRIS_32_GOTREL 17
28#define R_CRIS_32_PLT_GOTREL 18
29#define R_CRIS_32_PLT_PCREL 19
30
31typedef unsigned long elf_greg_t;
32
33/* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is
34 thus exposed to user-space. */
35#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
36typedef elf_greg_t elf_gregset_t[ELF_NGREG];
37
38/* A placeholder; CRIS does not have any fp regs. */
39typedef unsigned long elf_fpregset_t;
40
41/*
42 * These are used to set parameters in the core dumps.
43 */
44#define ELF_CLASS ELFCLASS32
45#define ELF_DATA ELFDATA2LSB
46#define ELF_ARCH EM_CRIS
47
48#include <asm/arch/elf.h>
49
50/* The master for these definitions is {binutils}/include/elf/cris.h: */
51/* User symbols in this file have a leading underscore. */
52#define EF_CRIS_UNDERSCORE 0x00000001
53
54/* This is a mask for different incompatible machine variants. */
55#define EF_CRIS_VARIANT_MASK 0x0000000e
56
57/* Variant 0; may contain v0..10 object. */
58#define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000
59
60/* Variant 1; contains v32 object. */
61#define EF_CRIS_VARIANT_V32 0x00000002
62
63/* Variant 2; contains object compatible with v32 and v10. */
64#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
65/* End of excerpt from {binutils}/include/elf/cris.h. */
66
67#define USE_ELF_CORE_DUMP
68
69#define ELF_EXEC_PAGESIZE 8192
70
71/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
72 use of this is to invoke "./ld.so someprog" to test out a new version of
73 the loader. We need to make sure that it is out of the way of the program
74 that it will "exec", and that there is sufficient room for the brk. */
75
76#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
77
78/* This yields a mask that user programs can use to figure out what
79 instruction set this CPU supports. This could be done in user space,
80 but it's not easy, and we've already done it here. */
81
82#define ELF_HWCAP (0)
83
84/* This yields a string that ld.so will use to load implementation
85 specific libraries for optimization. This is more specific in
86 intent than poking at uname or /proc/cpuinfo.
87*/
88
89#define ELF_PLATFORM (NULL)
90
91#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
92
93#endif
diff --git a/include/asm-cris/emergency-restart.h b/include/asm-cris/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/include/asm-cris/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-cris/errno.h b/include/asm-cris/errno.h
deleted file mode 100644
index 2bf5eb5fa773..000000000000
--- a/include/asm-cris/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _CRIS_ERRNO_H
2#define _CRIS_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif
diff --git a/include/asm-cris/eshlibld.h b/include/asm-cris/eshlibld.h
deleted file mode 100644
index 10ce36cf79a9..000000000000
--- a/include/asm-cris/eshlibld.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/*!**************************************************************************
2*!
3*! FILE NAME : eshlibld.h
4*!
5*! DESCRIPTION: Prototypes for exported shared library functions
6*!
7*! FUNCTIONS : perform_cris_aout_relocations, shlibmod_fork, shlibmod_exit
8*! (EXPORTED)
9*!
10*!---------------------------------------------------------------------------
11*!
12*! (C) Copyright 1998, 1999 Axis Communications AB, LUND, SWEDEN
13*!
14*!**************************************************************************/
15/* $Id: eshlibld.h,v 1.2 2001/02/23 13:47:33 bjornw Exp $ */
16
17#ifndef _cris_relocate_h
18#define _cris_relocate_h
19
20/* Please note that this file is also compiled into the xsim simulator.
21 Try to avoid breaking its double use (only works on a little-endian
22 32-bit machine such as the i386 anyway).
23
24 Use __KERNEL__ when you're about to use kernel functions,
25 (which you should not do here anyway, since this file is
26 used by glibc).
27 Use defined(__KERNEL__) || defined(__elinux__) when doing
28 things that only makes sense on an elinux system.
29 Use __CRIS__ when you're about to do (really) CRIS-specific code.
30*/
31
32/* We have dependencies all over the place for the host system
33 for xsim being a linux system, so let's not pretend anything
34 else with #ifdef:s here until fixed. */
35#include <linux/limits.h>
36
37/* Maybe do sanity checking if file input. */
38#undef SANITYCHECK_RELOC
39
40/* Maybe output debug messages. */
41#undef RELOC_DEBUG
42
43/* Maybe we want to share core as well as disk space.
44 Mainly depends on the config macro CONFIG_SHARE_SHLIB_CORE, but it is
45 assumed that we want to share code when debugging (exposes more
46 trouble). */
47#ifndef SHARE_LIB_CORE
48# if (defined(__KERNEL__) || !defined(RELOC_DEBUG)) \
49 && !defined(CONFIG_SHARE_SHLIB_CORE)
50# define SHARE_LIB_CORE 0
51# else
52# define SHARE_LIB_CORE 1
53# endif /* __KERNEL__ etc */
54#endif /* SHARE_LIB_CORE */
55
56
57/* Main exported function; supposed to be called when the program a.out
58 has been read in. */
59extern int
60perform_cris_aout_relocations(unsigned long text, unsigned long tlength,
61 unsigned long data, unsigned long dlength,
62 unsigned long baddr, unsigned long blength,
63
64 /* These may be zero when there's "perfect"
65 position-independent code. */
66 unsigned char *trel, unsigned long tsrel,
67 unsigned long dsrel,
68
69 /* These will be zero at a first try, to see
70 if code is statically linked. Else a
71 second try, with the symbol table and
72 string table nonzero should be done. */
73 unsigned char *symbols, unsigned long symlength,
74 unsigned char *strings, unsigned long stringlength,
75
76 /* These will only be used when symbol table
77 information is present. */
78 char **env, int envc,
79 int euid, int is_suid);
80
81
82#ifdef RELOC_DEBUG
83/* Task-specific debug stuff. */
84struct task_reloc_debug {
85 struct memdebug *alloclast;
86 unsigned long alloc_total;
87 unsigned long export_total;
88};
89#endif /* RELOC_DEBUG */
90
91#if SHARE_LIB_CORE
92
93/* When code (and some very specific data) is shared and not just
94 dynamically linked, we need to export hooks for exec beginning and
95 end. */
96
97struct shlibdep;
98
99extern void
100shlibmod_exit(struct shlibdep **deps);
101
102/* Returns 0 if failure, nonzero for ok. */
103extern int
104shlibmod_fork(struct shlibdep **deps);
105
106#else /* ! SHARE_LIB_CORE */
107# define shlibmod_exit(x)
108# define shlibmod_fork(x) 1
109#endif /* ! SHARE_LIB_CORE */
110
111#endif _cris_relocate_h
112/********************** END OF FILE eshlibld.h *****************************/
113
diff --git a/include/asm-cris/ethernet.h b/include/asm-cris/ethernet.h
deleted file mode 100644
index 4d58652c3a49..000000000000
--- a/include/asm-cris/ethernet.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * ioctl defines for ethernet driver
3 *
4 * Copyright (c) 2001 Axis Communications AB
5 *
6 * Author: Mikael Starvik
7 *
8 */
9
10#ifndef _CRIS_ETHERNET_H
11#define _CRIS_ETHERNET_H
12#define SET_ETH_SPEED_AUTO SIOCDEVPRIVATE /* Auto neg speed */
13#define SET_ETH_SPEED_10 SIOCDEVPRIVATE+1 /* 10 Mbps */
14#define SET_ETH_SPEED_100 SIOCDEVPRIVATE+2 /* 100 Mbps. */
15#define SET_ETH_DUPLEX_AUTO SIOCDEVPRIVATE+3 /* Auto neg duplex */
16#define SET_ETH_DUPLEX_HALF SIOCDEVPRIVATE+4 /* Full duplex */
17#define SET_ETH_DUPLEX_FULL SIOCDEVPRIVATE+5 /* Half duplex */
18#define SET_ETH_ENABLE_LEDS SIOCDEVPRIVATE+6 /* Enable net LEDs */
19#define SET_ETH_DISABLE_LEDS SIOCDEVPRIVATE+7 /* Disable net LEDs */
20#define SET_ETH_AUTONEG SIOCDEVPRIVATE+8
21#endif /* _CRIS_ETHERNET_H */
diff --git a/include/asm-cris/etraxgpio.h b/include/asm-cris/etraxgpio.h
deleted file mode 100644
index 38f1c8e1770c..000000000000
--- a/include/asm-cris/etraxgpio.h
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 * The following devices are accessable using this driver using
3 * GPIO_MAJOR (120) and a couple of minor numbers.
4 *
5 * For ETRAX 100LX (CONFIG_ETRAX_ARCH_V10):
6 * /dev/gpioa minor 0, 8 bit GPIO, each bit can change direction
7 * /dev/gpiob minor 1, 8 bit GPIO, each bit can change direction
8 * /dev/leds minor 2, Access to leds depending on kernelconfig
9 * /dev/gpiog minor 3
10 * g0dir, g8_15dir, g16_23dir, g24 dir configurable in R_GEN_CONFIG
11 * g1-g7 and g25-g31 is both input and outputs but on different pins
12 * Also note that some bits change pins depending on what interfaces
13 * are enabled.
14 *
15 * For ETRAX FS (CONFIG_ETRAXFS):
16 * /dev/gpioa minor 0, 8 bit GPIO, each bit can change direction
17 * /dev/gpiob minor 1, 18 bit GPIO, each bit can change direction
18 * /dev/gpioc minor 3, 18 bit GPIO, each bit can change direction
19 * /dev/gpiod minor 4, 18 bit GPIO, each bit can change direction
20 * /dev/gpioe minor 5, 18 bit GPIO, each bit can change direction
21 * /dev/leds minor 2, Access to leds depending on kernelconfig
22 *
23 * For ARTPEC-3 (CONFIG_CRIS_MACH_ARTPEC3):
24 * /dev/gpioa minor 0, 8 bit GPIO, each bit can change direction
25 * /dev/gpiob minor 1, 18 bit GPIO, each bit can change direction
26 * /dev/gpioc minor 3, 18 bit GPIO, each bit can change direction
27 * /dev/gpiod minor 4, 18 bit GPIO, each bit can change direction
28 * /dev/leds minor 2, Access to leds depending on kernelconfig
29 * /dev/pwm0 minor 16, PWM channel 0 on PA30
30 * /dev/pwm1 minor 17, PWM channel 1 on PA31
31 * /dev/pwm2 minor 18, PWM channel 2 on PB26
32 *
33 */
34#ifndef _ASM_ETRAXGPIO_H
35#define _ASM_ETRAXGPIO_H
36
37/* etraxgpio _IOC_TYPE, bits 8 to 15 in ioctl cmd */
38#ifdef CONFIG_ETRAX_ARCH_V10
39#define ETRAXGPIO_IOCTYPE 43
40#define GPIO_MINOR_A 0
41#define GPIO_MINOR_B 1
42#define GPIO_MINOR_LEDS 2
43#define GPIO_MINOR_G 3
44#define GPIO_MINOR_LAST 3
45#endif
46
47#ifdef CONFIG_ETRAXFS
48#define ETRAXGPIO_IOCTYPE 43
49#define GPIO_MINOR_A 0
50#define GPIO_MINOR_B 1
51#define GPIO_MINOR_LEDS 2
52#define GPIO_MINOR_C 3
53#define GPIO_MINOR_D 4
54#define GPIO_MINOR_E 5
55#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
56#define GPIO_MINOR_V 6
57#define GPIO_MINOR_LAST 6
58#else
59#define GPIO_MINOR_LAST 5
60#endif
61#endif
62
63#ifdef CONFIG_CRIS_MACH_ARTPEC3
64#define ETRAXGPIO_IOCTYPE 43
65#define GPIO_MINOR_A 0
66#define GPIO_MINOR_B 1
67#define GPIO_MINOR_LEDS 2
68#define GPIO_MINOR_C 3
69#define GPIO_MINOR_D 4
70#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
71#define GPIO_MINOR_V 6
72#define GPIO_MINOR_LAST 6
73#else
74#define GPIO_MINOR_LAST 4
75#endif
76#define GPIO_MINOR_PWM0 16
77#define GPIO_MINOR_PWM1 17
78#define GPIO_MINOR_PWM2 18
79#define GPIO_MINOR_LAST_PWM GPIO_MINOR_PWM2
80#endif
81
82/* supported ioctl _IOC_NR's */
83
84#define IO_READBITS 0x1 /* read and return current port bits (obsolete) */
85#define IO_SETBITS 0x2 /* set the bits marked by 1 in the argument */
86#define IO_CLRBITS 0x3 /* clear the bits marked by 1 in the argument */
87
88/* the alarm is waited for by select() */
89
90#define IO_HIGHALARM 0x4 /* set alarm on high for bits marked by 1 */
91#define IO_LOWALARM 0x5 /* set alarm on low for bits marked by 1 */
92#define IO_CLRALARM 0x6 /* clear alarm for bits marked by 1 */
93
94/* LED ioctl */
95#define IO_LEDACTIVE_SET 0x7 /* set active led
96 * 0=off, 1=green, 2=red, 3=yellow */
97
98/* GPIO direction ioctl's */
99#define IO_READDIR 0x8 /* Read direction 0=input 1=output (obsolete) */
100#define IO_SETINPUT 0x9 /* Set direction for bits set, 0=unchanged 1=input,
101 returns mask with current inputs (obsolete) */
102#define IO_SETOUTPUT 0xA /* Set direction for bits set, 0=unchanged 1=output,
103 returns mask with current outputs (obsolete)*/
104
105/* LED ioctl extended */
106#define IO_LED_SETBIT 0xB
107#define IO_LED_CLRBIT 0xC
108
109/* SHUTDOWN ioctl */
110#define IO_SHUTDOWN 0xD
111#define IO_GET_PWR_BT 0xE
112
113/* Bit toggling in driver settings */
114/* bit set in low byte0 is CLK mask (0x00FF),
115 bit set in byte1 is DATA mask (0xFF00)
116 msb, data_mask[7:0] , clk_mask[7:0]
117 */
118#define IO_CFG_WRITE_MODE 0xF
119#define IO_CFG_WRITE_MODE_VALUE(msb, data_mask, clk_mask) \
120 ( (((msb)&1) << 16) | (((data_mask) &0xFF) << 8) | ((clk_mask) & 0xFF) )
121
122/* The following 4 ioctl's take a pointer as argument and handles
123 * 32 bit ports (port G) properly.
124 * These replaces IO_READBITS,IO_SETINPUT AND IO_SETOUTPUT
125 */
126#define IO_READ_INBITS 0x10 /* *arg is result of reading the input pins */
127#define IO_READ_OUTBITS 0x11 /* *arg is result of reading the output shadow */
128#define IO_SETGET_INPUT 0x12 /* bits set in *arg is set to input,
129 * *arg updated with current input pins.
130 */
131#define IO_SETGET_OUTPUT 0x13 /* bits set in *arg is set to output,
132 * *arg updated with current output pins.
133 */
134
135/* The following ioctl's are applicable to the PWM channels only */
136
137#define IO_PWM_SET_MODE 0x20
138
139enum io_pwm_mode {
140 PWM_OFF = 0, /* disabled, deallocated */
141 PWM_STANDARD = 1, /* 390 kHz, duty cycle 0..255/256 */
142 PWM_FAST = 2, /* variable freq, w/ 10ns active pulse len */
143 PWM_VARFREQ = 3 /* individually configurable high/low periods */
144};
145
146struct io_pwm_set_mode {
147 enum io_pwm_mode mode;
148};
149
150/* Only for mode PWM_VARFREQ. Period lo/high set in increments of 10ns
151 * from 10ns (value = 0) to 81920ns (value = 8191)
152 * (Resulting frequencies range from 50 MHz (10ns + 10ns) down to
153 * 6.1 kHz (81920ns + 81920ns) at 50% duty cycle, to 12.2 kHz at min/max duty
154 * cycle (81920 + 10ns or 10ns + 81920ns, respectively).)
155 */
156#define IO_PWM_SET_PERIOD 0x21
157
158struct io_pwm_set_period {
159 unsigned int lo; /* 0..8191 */
160 unsigned int hi; /* 0..8191 */
161};
162
163/* Only for modes PWM_STANDARD and PWM_FAST.
164 * For PWM_STANDARD, set duty cycle of 390 kHz PWM output signal, from
165 * 0 (value = 0) to 255/256 (value = 255).
166 * For PWM_FAST, set duty cycle of PWM output signal from
167 * 0% (value = 0) to 100% (value = 255). Output signal in this mode
168 * is a 10ns pulse surrounded by a high or low level depending on duty
169 * cycle (except for 0% and 100% which result in a constant output).
170 * Resulting output frequency varies from 50 MHz at 50% duty cycle,
171 * down to 390 kHz at min/max duty cycle.
172 */
173#define IO_PWM_SET_DUTY 0x22
174
175struct io_pwm_set_duty {
176 int duty; /* 0..255 */
177};
178
179#endif
diff --git a/include/asm-cris/etraxi2c.h b/include/asm-cris/etraxi2c.h
deleted file mode 100644
index e369a7620893..000000000000
--- a/include/asm-cris/etraxi2c.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/* $Id: etraxi2c.h,v 1.1 2001/01/18 15:49:57 bjornw Exp $ */
2
3#ifndef _LINUX_ETRAXI2C_H
4#define _LINUX_ETRAXI2C_H
5
6/* etraxi2c _IOC_TYPE, bits 8 to 15 in ioctl cmd */
7
8#define ETRAXI2C_IOCTYPE 44
9
10/* supported ioctl _IOC_NR's */
11
12/* in write operations, the argument contains both i2c
13 * slave, register and value.
14 */
15
16#define I2C_WRITEARG(slave, reg, value) (((slave) << 16) | ((reg) << 8) | (value))
17#define I2C_READARG(slave, reg) (((slave) << 16) | ((reg) << 8))
18
19#define I2C_ARGSLAVE(arg) ((arg) >> 16)
20#define I2C_ARGREG(arg) (((arg) >> 8) & 0xff)
21#define I2C_ARGVALUE(arg) ((arg) & 0xff)
22
23#define I2C_WRITEREG 0x1 /* write to an i2c register */
24#define I2C_READREG 0x2 /* read from an i2c register */
25
26/*
27EXAMPLE usage:
28
29 i2c_arg = I2C_WRITEARG(STA013_WRITE_ADDR, reg, val);
30 ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_WRITEREG), i2c_arg);
31
32 i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
33 val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
34
35*/
36#endif
diff --git a/include/asm-cris/fasttimer.h b/include/asm-cris/fasttimer.h
deleted file mode 100644
index 8f8a8d6c9653..000000000000
--- a/include/asm-cris/fasttimer.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * linux/include/asm-cris/fasttimer.h
3 *
4 * Fast timers for ETRAX100LX
5 * Copyright (C) 2000-2007 Axis Communications AB
6 */
7#include <linux/time.h> /* struct timeval */
8#include <linux/timex.h>
9
10#ifdef CONFIG_ETRAX_FAST_TIMER
11
12typedef void fast_timer_function_type(unsigned long);
13
14struct fasttime_t {
15 unsigned long tv_jiff; /* jiffies */
16 unsigned long tv_usec; /* microseconds */
17};
18
19struct fast_timer{ /* Close to timer_list */
20 struct fast_timer *next;
21 struct fast_timer *prev;
22 struct fasttime_t tv_set;
23 struct fasttime_t tv_expires;
24 unsigned long delay_us;
25 fast_timer_function_type *function;
26 unsigned long data;
27 const char *name;
28};
29
30extern struct fast_timer *fast_timer_list;
31
32void start_one_shot_timer(struct fast_timer *t,
33 fast_timer_function_type *function,
34 unsigned long data,
35 unsigned long delay_us,
36 const char *name);
37
38int del_fast_timer(struct fast_timer * t);
39/* return 1 if deleted */
40
41
42void schedule_usleep(unsigned long us);
43
44
45int fast_timer_init(void);
46
47#endif
diff --git a/include/asm-cris/fb.h b/include/asm-cris/fb.h
deleted file mode 100644
index c7df38030992..000000000000
--- a/include/asm-cris/fb.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4
5#define fb_pgprotect(...) do {} while (0)
6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-cris/fcntl.h b/include/asm-cris/fcntl.h
deleted file mode 100644
index 46ab12db5739..000000000000
--- a/include/asm-cris/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/fcntl.h>
diff --git a/include/asm-cris/futex.h b/include/asm-cris/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/include/asm-cris/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/include/asm-cris/hardirq.h b/include/asm-cris/hardirq.h
deleted file mode 100644
index 74178adeb1cd..000000000000
--- a/include/asm-cris/hardirq.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef __ASM_HARDIRQ_H
2#define __ASM_HARDIRQ_H
3
4#include <asm/irq.h>
5#include <linux/threads.h>
6#include <linux/cache.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14void ack_bad_irq(unsigned int irq);
15
16#define HARDIRQ_BITS 8
17
18/*
19 * The hardirq mask has to be large enough to have
20 * space for potentially all IRQ sources in the system
21 * nesting on a single CPU:
22 */
23#if (1 << HARDIRQ_BITS) < NR_IRQS
24# error HARDIRQ_BITS is too low!
25#endif
26
27#endif /* __ASM_HARDIRQ_H */
diff --git a/include/asm-cris/hw_irq.h b/include/asm-cris/hw_irq.h
deleted file mode 100644
index 298066020af2..000000000000
--- a/include/asm-cris/hw_irq.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef _ASM_HW_IRQ_H
2#define _ASM_HW_IRQ_H
3
4#endif
5
diff --git a/include/asm-cris/io.h b/include/asm-cris/io.h
deleted file mode 100644
index b87ce63f531f..000000000000
--- a/include/asm-cris/io.h
+++ /dev/null
@@ -1,154 +0,0 @@
1#ifndef _ASM_CRIS_IO_H
2#define _ASM_CRIS_IO_H
3
4#include <asm/page.h> /* for __va, __pa */
5#include <asm/arch/io.h>
6#include <linux/kernel.h>
7
8struct cris_io_operations
9{
10 u32 (*read_mem)(void *addr, int size);
11 void (*write_mem)(u32 val, int size, void *addr);
12 u32 (*read_io)(u32 port, void *addr, int size, int count);
13 void (*write_io)(u32 port, void *addr, int size, int count);
14};
15
16#ifdef CONFIG_PCI
17extern struct cris_io_operations *cris_iops;
18#else
19#define cris_iops ((struct cris_io_operations*)NULL)
20#endif
21
22/*
23 * Change virtual addresses to physical addresses and vv.
24 */
25
26static inline unsigned long virt_to_phys(volatile void * address)
27{
28 return __pa(address);
29}
30
31static inline void * phys_to_virt(unsigned long address)
32{
33 return __va(address);
34}
35
36extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
37extern void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot);
38
39static inline void __iomem * ioremap (unsigned long offset, unsigned long size)
40{
41 return __ioremap(offset, size, 0);
42}
43
44extern void iounmap(volatile void * __iomem addr);
45
46extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size);
47
48/*
49 * IO bus memory addresses are also 1:1 with the physical address
50 */
51#define virt_to_bus virt_to_phys
52#define bus_to_virt phys_to_virt
53
54/*
55 * readX/writeX() are used to access memory mapped devices. On some
56 * architectures the memory mapped IO stuff needs to be accessed
57 * differently. On the CRIS architecture, we just read/write the
58 * memory location directly.
59 */
60#ifdef CONFIG_PCI
61#define PCI_SPACE(x) ((((unsigned)(x)) & 0x10000000) == 0x10000000)
62#else
63#define PCI_SPACE(x) 0
64#endif
65static inline unsigned char readb(const volatile void __iomem *addr)
66{
67 if (PCI_SPACE(addr) && cris_iops)
68 return cris_iops->read_mem((void*)addr, 1);
69 else
70 return *(volatile unsigned char __force *) addr;
71}
72static inline unsigned short readw(const volatile void __iomem *addr)
73{
74 if (PCI_SPACE(addr) && cris_iops)
75 return cris_iops->read_mem((void*)addr, 2);
76 else
77 return *(volatile unsigned short __force *) addr;
78}
79static inline unsigned int readl(const volatile void __iomem *addr)
80{
81 if (PCI_SPACE(addr) && cris_iops)
82 return cris_iops->read_mem((void*)addr, 4);
83 else
84 return *(volatile unsigned int __force *) addr;
85}
86#define readb_relaxed(addr) readb(addr)
87#define readw_relaxed(addr) readw(addr)
88#define readl_relaxed(addr) readl(addr)
89#define __raw_readb readb
90#define __raw_readw readw
91#define __raw_readl readl
92
93static inline void writeb(unsigned char b, volatile void __iomem *addr)
94{
95 if (PCI_SPACE(addr) && cris_iops)
96 cris_iops->write_mem(b, 1, (void*)addr);
97 else
98 *(volatile unsigned char __force *) addr = b;
99}
100static inline void writew(unsigned short b, volatile void __iomem *addr)
101{
102 if (PCI_SPACE(addr) && cris_iops)
103 cris_iops->write_mem(b, 2, (void*)addr);
104 else
105 *(volatile unsigned short __force *) addr = b;
106}
107static inline void writel(unsigned int b, volatile void __iomem *addr)
108{
109 if (PCI_SPACE(addr) && cris_iops)
110 cris_iops->write_mem(b, 4, (void*)addr);
111 else
112 *(volatile unsigned int __force *) addr = b;
113}
114#define __raw_writeb writeb
115#define __raw_writew writew
116#define __raw_writel writel
117
118#define mmiowb()
119
120#define memset_io(a,b,c) memset((void *)(a),(b),(c))
121#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
122#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
123
124
125/* I/O port access. Normally there is no I/O space on CRIS but when
126 * Cardbus/PCI is enabled the request is passed through the bridge.
127 */
128
129#define IO_SPACE_LIMIT 0xffff
130#define inb(port) (cris_iops ? cris_iops->read_io(port,NULL,1,1) : 0)
131#define inw(port) (cris_iops ? cris_iops->read_io(port,NULL,2,1) : 0)
132#define inl(port) (cris_iops ? cris_iops->read_io(port,NULL,4,1) : 0)
133#define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)
134#define insw(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0)
135#define insl(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0)
136#define outb(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1)
137#define outw(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1)
138#define outl(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1)
139#define outsb(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count)
140#define outsw(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count)
141#define outsl(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count)
142
143/*
144 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
145 * access
146 */
147#define xlate_dev_mem_ptr(p) __va(p)
148
149/*
150 * Convert a virtual cached pointer to an uncached pointer
151 */
152#define xlate_dev_kmem_ptr(p) p
153
154#endif
diff --git a/include/asm-cris/ioctl.h b/include/asm-cris/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/include/asm-cris/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/include/asm-cris/ioctls.h b/include/asm-cris/ioctls.h
deleted file mode 100644
index 4f4e52531fa0..000000000000
--- a/include/asm-cris/ioctls.h
+++ /dev/null
@@ -1,91 +0,0 @@
1#ifndef __ARCH_CRIS_IOCTLS_H__
2#define __ARCH_CRIS_IOCTLS_H__
3
4/* verbatim copy of asm-i386/ioctls.h */
5
6#include <asm/ioctl.h>
7
8/* 0x54 is just a magic number to make these relatively unique ('T') */
9
10#define TCGETS 0x5401
11#define TCSETS 0x5402
12#define TCSETSW 0x5403
13#define TCSETSF 0x5404
14#define TCGETA 0x5405
15#define TCSETA 0x5406
16#define TCSETAW 0x5407
17#define TCSETAF 0x5408
18#define TCSBRK 0x5409
19#define TCXONC 0x540A
20#define TCFLSH 0x540B
21#define TIOCEXCL 0x540C
22#define TIOCNXCL 0x540D
23#define TIOCSCTTY 0x540E
24#define TIOCGPGRP 0x540F
25#define TIOCSPGRP 0x5410
26#define TIOCOUTQ 0x5411
27#define TIOCSTI 0x5412
28#define TIOCGWINSZ 0x5413
29#define TIOCSWINSZ 0x5414
30#define TIOCMGET 0x5415
31#define TIOCMBIS 0x5416
32#define TIOCMBIC 0x5417
33#define TIOCMSET 0x5418
34#define TIOCGSOFTCAR 0x5419
35#define TIOCSSOFTCAR 0x541A
36#define FIONREAD 0x541B
37#define TIOCINQ FIONREAD
38#define TIOCLINUX 0x541C
39#define TIOCCONS 0x541D
40#define TIOCGSERIAL 0x541E
41#define TIOCSSERIAL 0x541F
42#define TIOCPKT 0x5420
43#define FIONBIO 0x5421
44#define TIOCNOTTY 0x5422
45#define TIOCSETD 0x5423
46#define TIOCGETD 0x5424
47#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
48#define TIOCSBRK 0x5427 /* BSD compatibility */
49#define TIOCCBRK 0x5428 /* BSD compatibility */
50#define TIOCGSID 0x5429 /* Return the session ID of FD */
51#define TCGETS2 _IOR('T',0x2A, struct termios2)
52#define TCSETS2 _IOW('T',0x2B, struct termios2)
53#define TCSETSW2 _IOW('T',0x2C, struct termios2)
54#define TCSETSF2 _IOW('T',0x2D, struct termios2)
55#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
56#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
57
58#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
59#define FIOCLEX 0x5451
60#define FIOASYNC 0x5452
61#define TIOCSERCONFIG 0x5453
62#define TIOCSERGWILD 0x5454
63#define TIOCSERSWILD 0x5455
64#define TIOCGLCKTRMIOS 0x5456
65#define TIOCSLCKTRMIOS 0x5457
66#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
67#define TIOCSERGETLSR 0x5459 /* Get line status register */
68#define TIOCSERGETMULTI 0x545A /* Get multiport config */
69#define TIOCSERSETMULTI 0x545B /* Set multiport config */
70
71#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
72#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
73#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
74#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
75#define FIOQSIZE 0x5460
76
77#define TIOCSERSETRS485 0x5461 /* enable rs-485 */
78#define TIOCSERWRRS485 0x5462 /* write rs-485 */
79
80/* Used for packet mode */
81#define TIOCPKT_DATA 0
82#define TIOCPKT_FLUSHREAD 1
83#define TIOCPKT_FLUSHWRITE 2
84#define TIOCPKT_STOP 4
85#define TIOCPKT_START 8
86#define TIOCPKT_NOSTOP 16
87#define TIOCPKT_DOSTOP 32
88
89#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
90
91#endif
diff --git a/include/asm-cris/ipcbuf.h b/include/asm-cris/ipcbuf.h
deleted file mode 100644
index 8b0c18b02844..000000000000
--- a/include/asm-cris/ipcbuf.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef __CRIS_IPCBUF_H__
2#define __CRIS_IPCBUF_H__
3
4/*
5 * The user_ipc_perm structure for CRIS architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24 unsigned short __pad2;
25 unsigned long __unused1;
26 unsigned long __unused2;
27};
28
29#endif /* __CRIS_IPCBUF_H__ */
diff --git a/include/asm-cris/irq.h b/include/asm-cris/irq.h
deleted file mode 100644
index 998cce9f3200..000000000000
--- a/include/asm-cris/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_IRQ_H
2#define _ASM_IRQ_H
3
4#include <asm/arch/irq.h>
5
6static inline int irq_canonicalize(int irq)
7{
8 return irq;
9}
10
11#endif /* _ASM_IRQ_H */
12
13
diff --git a/include/asm-cris/irq_regs.h b/include/asm-cris/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-cris/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-cris/kdebug.h b/include/asm-cris/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-cris/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-cris/kmap_types.h b/include/asm-cris/kmap_types.h
deleted file mode 100644
index 492988cb9077..000000000000
--- a/include/asm-cris/kmap_types.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4/* Dummy header just to define km_type. None of this
5 * is actually used on cris.
6 */
7
8enum km_type {
9 KM_BOUNCE_READ,
10 KM_SKB_SUNRPC_DATA,
11 KM_SKB_DATA_SOFTIRQ,
12 KM_USER0,
13 KM_USER1,
14 KM_BIO_SRC_IRQ,
15 KM_BIO_DST_IRQ,
16 KM_PTE0,
17 KM_PTE1,
18 KM_IRQ0,
19 KM_IRQ1,
20 KM_SOFTIRQ0,
21 KM_SOFTIRQ1,
22 KM_TYPE_NR
23};
24
25#endif
diff --git a/include/asm-cris/linkage.h b/include/asm-cris/linkage.h
deleted file mode 100644
index 291c2d01c44f..000000000000
--- a/include/asm-cris/linkage.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_LINKAGE_H
2#define __ASM_LINKAGE_H
3
4/* Nothing to see here... */
5
6#endif
diff --git a/include/asm-cris/local.h b/include/asm-cris/local.h
deleted file mode 100644
index c11c530f74d0..000000000000
--- a/include/asm-cris/local.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local.h>
diff --git a/include/asm-cris/mman.h b/include/asm-cris/mman.h
deleted file mode 100644
index 1c35e1b66b46..000000000000
--- a/include/asm-cris/mman.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef __CRIS_MMAN_H__
2#define __CRIS_MMAN_H__
3
4/* verbatim copy of asm-i386/ version */
5
6#include <asm-generic/mman.h>
7
8#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
9#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
10#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
11#define MAP_LOCKED 0x2000 /* pages are locked */
12#define MAP_NORESERVE 0x4000 /* don't check for reservations */
13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
14#define MAP_NONBLOCK 0x10000 /* do not block on IO */
15
16#define MCL_CURRENT 1 /* lock all current mappings */
17#define MCL_FUTURE 2 /* lock all future mappings */
18
19#endif /* __CRIS_MMAN_H__ */
diff --git a/include/asm-cris/mmu.h b/include/asm-cris/mmu.h
deleted file mode 100644
index c40a1bcad06c..000000000000
--- a/include/asm-cris/mmu.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * CRIS MMU constants and PTE layout
3 */
4
5#ifndef _CRIS_MMU_H
6#define _CRIS_MMU_H
7
8#include <asm/arch/mmu.h>
9
10#endif
diff --git a/include/asm-cris/mmu_context.h b/include/asm-cris/mmu_context.h
deleted file mode 100644
index 72ba08dcfd18..000000000000
--- a/include/asm-cris/mmu_context.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef __CRIS_MMU_CONTEXT_H
2#define __CRIS_MMU_CONTEXT_H
3
4#include <asm-generic/mm_hooks.h>
5
6extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
7extern void get_mmu_context(struct mm_struct *mm);
8extern void destroy_context(struct mm_struct *mm);
9extern void switch_mm(struct mm_struct *prev, struct mm_struct *next,
10 struct task_struct *tsk);
11
12#define deactivate_mm(tsk,mm) do { } while (0)
13
14#define activate_mm(prev,next) switch_mm((prev),(next),NULL)
15
16/* current active pgd - this is similar to other processors pgd
17 * registers like cr3 on the i386
18 */
19
20extern volatile DEFINE_PER_CPU(pgd_t *,current_pgd); /* defined in arch/cris/mm/fault.c */
21
22static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
23{
24}
25
26#endif
diff --git a/include/asm-cris/module.h b/include/asm-cris/module.h
deleted file mode 100644
index 7ee72311bd78..000000000000
--- a/include/asm-cris/module.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _ASM_CRIS_MODULE_H
2#define _ASM_CRIS_MODULE_H
3/* cris is simple */
4struct mod_arch_specific { };
5
6#define Elf_Shdr Elf32_Shdr
7#define Elf_Sym Elf32_Sym
8#define Elf_Ehdr Elf32_Ehdr
9#endif /* _ASM_CRIS_MODULE_H */
diff --git a/include/asm-cris/msgbuf.h b/include/asm-cris/msgbuf.h
deleted file mode 100644
index ada63df1d574..000000000000
--- a/include/asm-cris/msgbuf.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef _CRIS_MSGBUF_H
2#define _CRIS_MSGBUF_H
3
4/* verbatim copy of asm-i386 version */
5
6/*
7 * The msqid64_ds structure for CRIS architecture.
8 * Note extra padding because this structure is passed back and forth
9 * between kernel and user space.
10 *
11 * Pad space is left for:
12 * - 64-bit time_t to solve y2038 problem
13 * - 2 miscellaneous 32-bit values
14 */
15
16struct msqid64_ds {
17 struct ipc64_perm msg_perm;
18 __kernel_time_t msg_stime; /* last msgsnd time */
19 unsigned long __unused1;
20 __kernel_time_t msg_rtime; /* last msgrcv time */
21 unsigned long __unused2;
22 __kernel_time_t msg_ctime; /* last change time */
23 unsigned long __unused3;
24 unsigned long msg_cbytes; /* current number of bytes on queue */
25 unsigned long msg_qnum; /* number of messages in queue */
26 unsigned long msg_qbytes; /* max number of bytes on queue */
27 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
28 __kernel_pid_t msg_lrpid; /* last receive pid */
29 unsigned long __unused4;
30 unsigned long __unused5;
31};
32
33#endif /* _CRIS_MSGBUF_H */
diff --git a/include/asm-cris/mutex.h b/include/asm-cris/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/include/asm-cris/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h
deleted file mode 100644
index d19272ba6b69..000000000000
--- a/include/asm-cris/page.h
+++ /dev/null
@@ -1,74 +0,0 @@
1#ifndef _CRIS_PAGE_H
2#define _CRIS_PAGE_H
3
4#include <asm/arch/page.h>
5#include <linux/const.h>
6
7/* PAGE_SHIFT determines the page size */
8#define PAGE_SHIFT 13
9#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
10#define PAGE_MASK (~(PAGE_SIZE-1))
11
12#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
13#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
14
15#define clear_user_page(page, vaddr, pg) clear_page(page)
16#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
17
18#define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
19 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
20#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
21
22/*
23 * These are used to make use of C type-checking..
24 */
25#ifndef __ASSEMBLY__
26typedef struct { unsigned long pte; } pte_t;
27typedef struct { unsigned long pgd; } pgd_t;
28typedef struct { unsigned long pgprot; } pgprot_t;
29typedef struct page *pgtable_t;
30#endif
31
32#define pte_val(x) ((x).pte)
33#define pgd_val(x) ((x).pgd)
34#define pgprot_val(x) ((x).pgprot)
35
36#define __pte(x) ((pte_t) { (x) } )
37#define __pgd(x) ((pgd_t) { (x) } )
38#define __pgprot(x) ((pgprot_t) { (x) } )
39
40/* On CRIS the PFN numbers doesn't start at 0 so we have to compensate */
41/* for that before indexing into the page table starting at mem_map */
42#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
43#define pfn_valid(pfn) (((pfn) - (PAGE_OFFSET >> PAGE_SHIFT)) < max_mapnr)
44
45/* to index into the page map. our pages all start at physical addr PAGE_OFFSET so
46 * we can let the map start there. notice that we subtract PAGE_OFFSET because
47 * we start our mem_map there - in other ports they map mem_map physically and
48 * use __pa instead. in our system both the physical and virtual address of DRAM
49 * is too high to let mem_map start at 0, so we do it this way instead (similar
50 * to arm and m68k I think)
51 */
52
53#define virt_to_page(kaddr) (mem_map + (((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT))
54#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
55#define virt_addr_valid(kaddr) pfn_valid((unsigned)(kaddr) >> PAGE_SHIFT)
56
57/* convert a page (based on mem_map and forward) to a physical address
58 * do this by figuring out the virtual address and then use __pa
59 */
60
61#define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
62
63#ifndef __ASSEMBLY__
64
65#endif /* __ASSEMBLY__ */
66
67#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
68 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
69
70#include <asm-generic/memory_model.h>
71#include <asm-generic/page.h>
72
73#endif /* _CRIS_PAGE_H */
74
diff --git a/include/asm-cris/param.h b/include/asm-cris/param.h
deleted file mode 100644
index 0e47994e40be..000000000000
--- a/include/asm-cris/param.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef _ASMCRIS_PARAM_H
2#define _ASMCRIS_PARAM_H
3
4/* Currently we assume that HZ=100 is good for CRIS. */
5#ifdef __KERNEL__
6# define HZ CONFIG_HZ /* Internal kernel timer frequency */
7# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
8# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
9#endif
10
11#ifndef HZ
12#define HZ 100
13#endif
14
15#define EXEC_PAGESIZE 8192
16
17#ifndef NOGROUP
18#define NOGROUP (-1)
19#endif
20
21#define MAXHOSTNAMELEN 64 /* max length of hostname */
22
23#endif
diff --git a/include/asm-cris/pci.h b/include/asm-cris/pci.h
deleted file mode 100644
index 730ce40fdd0f..000000000000
--- a/include/asm-cris/pci.h
+++ /dev/null
@@ -1,68 +0,0 @@
1#ifndef __ASM_CRIS_PCI_H
2#define __ASM_CRIS_PCI_H
3
4
5#ifdef __KERNEL__
6#include <linux/mm.h> /* for struct page */
7
8/* Can be used to override the logic in pci_scan_bus for skipping
9 already-configured bus numbers - to be used for buggy BIOSes
10 or architectures with incomplete PCI setup by the loader */
11
12#define pcibios_assign_all_busses(void) 1
13
14extern unsigned long pci_mem_start;
15#define PCIBIOS_MIN_IO 0x1000
16#define PCIBIOS_MIN_MEM 0x10000000
17
18#define PCIBIOS_MIN_CARDBUS_IO 0x4000
19
20void pcibios_config_init(void);
21struct pci_bus * pcibios_scan_root(int bus);
22int pcibios_assign_resources(void);
23
24void pcibios_set_master(struct pci_dev *dev);
25void pcibios_penalize_isa_irq(int irq);
26struct irq_routing_table *pcibios_get_irq_routing_table(void);
27int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
28
29/* Dynamic DMA mapping stuff.
30 * i386 has everything mapped statically.
31 */
32
33#include <linux/types.h>
34#include <linux/slab.h>
35#include <asm/scatterlist.h>
36#include <linux/string.h>
37#include <asm/io.h>
38
39struct pci_dev;
40
41/* The PCI address space does equal the physical memory
42 * address space. The networking and block device layers use
43 * this boolean for bounce buffer decisions.
44 */
45#define PCI_DMA_BUS_IS_PHYS (1)
46
47/* pci_unmap_{page,single} is a nop so... */
48#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
49#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
50#define pci_unmap_addr(PTR, ADDR_NAME) (0)
51#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
52#define pci_unmap_len(PTR, LEN_NAME) (0)
53#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
54
55#define HAVE_PCI_MMAP
56extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
57 enum pci_mmap_state mmap_state, int write_combine);
58
59
60#endif /* __KERNEL__ */
61
62/* implement the pci_ DMA API in terms of the generic device dma_ one */
63#include <asm-generic/pci-dma-compat.h>
64
65/* generic pci stuff */
66#include <asm-generic/pci.h>
67
68#endif /* __ASM_CRIS_PCI_H */
diff --git a/include/asm-cris/percpu.h b/include/asm-cris/percpu.h
deleted file mode 100644
index 6db9b43cf80a..000000000000
--- a/include/asm-cris/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _CRIS_PERCPU_H
2#define _CRIS_PERCPU_H
3
4#include <asm-generic/percpu.h>
5
6#endif /* _CRIS_PERCPU_H */
diff --git a/include/asm-cris/pgalloc.h b/include/asm-cris/pgalloc.h
deleted file mode 100644
index a1ba761d0573..000000000000
--- a/include/asm-cris/pgalloc.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef _CRIS_PGALLOC_H
2#define _CRIS_PGALLOC_H
3
4#include <linux/threads.h>
5#include <linux/mm.h>
6
7#define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, pte)
8#define pmd_populate(mm, pmd, pte) pmd_set(pmd, page_address(pte))
9#define pmd_pgtable(pmd) pmd_page(pmd)
10
11/*
12 * Allocate and free page tables.
13 */
14
15static inline pgd_t *pgd_alloc (struct mm_struct *mm)
16{
17 return (pgd_t *)get_zeroed_page(GFP_KERNEL);
18}
19
20static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
21{
22 free_page((unsigned long)pgd);
23}
24
25static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
26{
27 pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
28 return pte;
29}
30
31static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
32{
33 struct page *pte;
34 pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
35 pgtable_page_ctor(pte);
36 return pte;
37}
38
39static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
40{
41 free_page((unsigned long)pte);
42}
43
44static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
45{
46 pgtable_page_dtor(pte);
47 __free_page(pte);
48}
49
50#define __pte_free_tlb(tlb,pte) \
51do { \
52 pgtable_page_dtor(pte); \
53 tlb_remove_page((tlb), pte); \
54} while (0)
55
56#define check_pgt_cache() do { } while (0)
57
58#endif
diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h
deleted file mode 100644
index 829e7a7d9fb9..000000000000
--- a/include/asm-cris/pgtable.h
+++ /dev/null
@@ -1,299 +0,0 @@
1/*
2 * CRIS pgtable.h - macros and functions to manipulate page tables.
3 */
4
5#ifndef _CRIS_PGTABLE_H
6#define _CRIS_PGTABLE_H
7
8#include <asm/page.h>
9#include <asm-generic/pgtable-nopmd.h>
10
11#ifndef __ASSEMBLY__
12#include <linux/sched.h>
13#include <asm/mmu.h>
14#endif
15#include <asm/arch/pgtable.h>
16
17/*
18 * The Linux memory management assumes a three-level page table setup. On
19 * CRIS, we use that, but "fold" the mid level into the top-level page
20 * table. Since the MMU TLB is software loaded through an interrupt, it
21 * supports any page table structure, so we could have used a three-level
22 * setup, but for the amounts of memory we normally use, a two-level is
23 * probably more efficient.
24 *
25 * This file contains the functions and defines necessary to modify and use
26 * the CRIS page table tree.
27 */
28#ifndef __ASSEMBLY__
29extern void paging_init(void);
30#endif
31
32/* Certain architectures need to do special things when pte's
33 * within a page table are directly modified. Thus, the following
34 * hook is made available.
35 */
36#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
37#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
38
39/*
40 * (pmds are folded into pgds so this doesn't get actually called,
41 * but the define is needed for a generic inline function.)
42 */
43#define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval)
44#define set_pgu(pudptr, pudval) (*(pudptr) = pudval)
45
46/* PGDIR_SHIFT determines the size of the area a second-level page table can
47 * map. It is equal to the page size times the number of PTE's that fit in
48 * a PMD page. A PTE is 4-bytes in CRIS. Hence the following number.
49 */
50
51#define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-2))
52#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
53#define PGDIR_MASK (~(PGDIR_SIZE-1))
54
55/*
56 * entries per page directory level: we use a two-level, so
57 * we don't really have any PMD directory physically.
58 * pointers are 4 bytes so we can use the page size and
59 * divide it by 4 (shift by 2).
60 */
61#define PTRS_PER_PTE (1UL << (PAGE_SHIFT-2))
62#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-2))
63
64/* calculate how many PGD entries a user-level program can use
65 * the first mappable virtual address is 0
66 * (TASK_SIZE is the maximum virtual address space)
67 */
68
69#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
70#define FIRST_USER_ADDRESS 0
71
72/* zero page used for uninitialized stuff */
73#ifndef __ASSEMBLY__
74extern unsigned long empty_zero_page;
75#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
76#endif
77
78/* number of bits that fit into a memory pointer */
79#define BITS_PER_PTR (8*sizeof(unsigned long))
80
81/* to align the pointer to a pointer address */
82#define PTR_MASK (~(sizeof(void*)-1))
83
84/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
85/* 64-bit machines, beware! SRB. */
86#define SIZEOF_PTR_LOG2 2
87
88/* to find an entry in a page-table */
89#define PAGE_PTR(address) \
90((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
91
92/* to set the page-dir */
93#define SET_PAGE_DIR(tsk,pgdir)
94
95#define pte_none(x) (!pte_val(x))
96#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
97#define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0)
98
99#define pmd_none(x) (!pmd_val(x))
100/* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad
101 * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries.
102 */
103#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE)
104#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
105#define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0)
106
107#ifndef __ASSEMBLY__
108
109/*
110 * The following only work if pte_present() is true.
111 * Undefined behaviour if not..
112 */
113
114static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
115static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; }
116static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
117static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
118static inline int pte_special(pte_t pte) { return 0; }
119
120static inline pte_t pte_wrprotect(pte_t pte)
121{
122 pte_val(pte) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE);
123 return pte;
124}
125
126static inline pte_t pte_mkclean(pte_t pte)
127{
128 pte_val(pte) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE);
129 return pte;
130}
131
132static inline pte_t pte_mkold(pte_t pte)
133{
134 pte_val(pte) &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ);
135 return pte;
136}
137
138static inline pte_t pte_mkwrite(pte_t pte)
139{
140 pte_val(pte) |= _PAGE_WRITE;
141 if (pte_val(pte) & _PAGE_MODIFIED)
142 pte_val(pte) |= _PAGE_SILENT_WRITE;
143 return pte;
144}
145
146static inline pte_t pte_mkdirty(pte_t pte)
147{
148 pte_val(pte) |= _PAGE_MODIFIED;
149 if (pte_val(pte) & _PAGE_WRITE)
150 pte_val(pte) |= _PAGE_SILENT_WRITE;
151 return pte;
152}
153
154static inline pte_t pte_mkyoung(pte_t pte)
155{
156 pte_val(pte) |= _PAGE_ACCESSED;
157 if (pte_val(pte) & _PAGE_READ)
158 {
159 pte_val(pte) |= _PAGE_SILENT_READ;
160 if ((pte_val(pte) & (_PAGE_WRITE | _PAGE_MODIFIED)) ==
161 (_PAGE_WRITE | _PAGE_MODIFIED))
162 pte_val(pte) |= _PAGE_SILENT_WRITE;
163 }
164 return pte;
165}
166static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
167
168/*
169 * Conversion functions: convert a page and protection to a page entry,
170 * and a page entry and page directory to the page they refer to.
171 */
172
173/* What actually goes as arguments to the various functions is less than
174 * obvious, but a rule of thumb is that struct page's goes as struct page *,
175 * really physical DRAM addresses are unsigned long's, and DRAM "virtual"
176 * addresses (the 0xc0xxxxxx's) goes as void *'s.
177 */
178
179static inline pte_t __mk_pte(void * page, pgprot_t pgprot)
180{
181 pte_t pte;
182 /* the PTE needs a physical address */
183 pte_val(pte) = __pa(page) | pgprot_val(pgprot);
184 return pte;
185}
186
187#define mk_pte(page, pgprot) __mk_pte(page_address(page), (pgprot))
188
189#define mk_pte_phys(physpage, pgprot) \
190({ \
191 pte_t __pte; \
192 \
193 pte_val(__pte) = (physpage) + pgprot_val(pgprot); \
194 __pte; \
195})
196
197static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
198{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
199
200
201/* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval
202 * __pte_page(pte_val) refers to the "virtual" DRAM interval
203 * pte_pagenr refers to the page-number counted starting from the virtual DRAM start
204 */
205
206static inline unsigned long __pte_page(pte_t pte)
207{
208 /* the PTE contains a physical address */
209 return (unsigned long)__va(pte_val(pte) & PAGE_MASK);
210}
211
212#define pte_pagenr(pte) ((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT)
213
214/* permanent address of a page */
215
216#define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
217#define pte_page(pte) (mem_map+pte_pagenr(pte))
218
219/* only the pte's themselves need to point to physical DRAM (see above)
220 * the pagetable links are purely handled within the kernel SW and thus
221 * don't need the __pa and __va transformations.
222 */
223
224static inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
225{ pmd_val(*pmdp) = _PAGE_TABLE | (unsigned long) ptep; }
226
227#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
228#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
229
230/* to find an entry in a page-table-directory. */
231#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
232
233/* to find an entry in a page-table-directory */
234static inline pgd_t * pgd_offset(const struct mm_struct *mm, unsigned long address)
235{
236 return mm->pgd + pgd_index(address);
237}
238
239/* to find an entry in a kernel page-table-directory */
240#define pgd_offset_k(address) pgd_offset(&init_mm, address)
241
242/* Find an entry in the third-level page table.. */
243#define __pte_offset(address) \
244 (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
245#define pte_offset_kernel(dir, address) \
246 ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address))
247#define pte_offset_map(dir, address) \
248 ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address))
249#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address)
250
251#define pte_unmap(pte) do { } while (0)
252#define pte_unmap_nested(pte) do { } while (0)
253#define pte_pfn(x) ((unsigned long)(__va((x).pte)) >> PAGE_SHIFT)
254#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
255
256#define pte_ERROR(e) \
257 printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), pte_val(e))
258#define pgd_ERROR(e) \
259 printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
260
261
262extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */
263
264/*
265 * CRIS doesn't have any external MMU info: the kernel page
266 * tables contain all the necessary information.
267 *
268 * Actually I am not sure on what this could be used for.
269 */
270static inline void update_mmu_cache(struct vm_area_struct * vma,
271 unsigned long address, pte_t pte)
272{
273}
274
275/* Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e)) */
276/* Since the PAGE_PRESENT bit is bit 4, we can use the bits above */
277
278#define __swp_type(x) (((x).val >> 5) & 0x7f)
279#define __swp_offset(x) ((x).val >> 12)
280#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 5) | ((offset) << 12) })
281#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
282#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
283
284#define kern_addr_valid(addr) (1)
285
286#include <asm-generic/pgtable.h>
287
288/*
289 * No page table caches to initialise
290 */
291#define pgtable_cache_init() do { } while (0)
292
293#define pte_to_pgoff(x) (pte_val(x) >> 6)
294#define pgoff_to_pte(x) __pte(((x) << 6) | _PAGE_FILE)
295
296typedef pte_t *pte_addr_t;
297
298#endif /* __ASSEMBLY__ */
299#endif /* _CRIS_PGTABLE_H */
diff --git a/include/asm-cris/poll.h b/include/asm-cris/poll.h
deleted file mode 100644
index c98509d3149e..000000000000
--- a/include/asm-cris/poll.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/poll.h>
diff --git a/include/asm-cris/posix_types.h b/include/asm-cris/posix_types.h
deleted file mode 100644
index ce3fb25a460b..000000000000
--- a/include/asm-cris/posix_types.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/* $Id: posix_types.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
2
3/* We cheat a bit and use our C-coded bitops functions from asm/bitops.h */
4/* I guess we should write these in assembler because they are used often. */
5
6#ifndef __ARCH_CRIS_POSIX_TYPES_H
7#define __ARCH_CRIS_POSIX_TYPES_H
8
9/*
10 * This file is generally used by user-level software, so you need to
11 * be a little careful about namespace pollution etc. Also, we cannot
12 * assume GCC is being used.
13 */
14
15typedef unsigned long __kernel_ino_t;
16typedef unsigned short __kernel_mode_t;
17typedef unsigned short __kernel_nlink_t;
18typedef long __kernel_off_t;
19typedef int __kernel_pid_t;
20typedef unsigned short __kernel_ipc_pid_t;
21typedef unsigned short __kernel_uid_t;
22typedef unsigned short __kernel_gid_t;
23typedef __SIZE_TYPE__ __kernel_size_t;
24typedef long __kernel_ssize_t;
25typedef int __kernel_ptrdiff_t;
26typedef long __kernel_time_t;
27typedef long __kernel_suseconds_t;
28typedef long __kernel_clock_t;
29typedef int __kernel_timer_t;
30typedef int __kernel_clockid_t;
31typedef int __kernel_daddr_t;
32typedef char * __kernel_caddr_t;
33typedef unsigned short __kernel_uid16_t;
34typedef unsigned short __kernel_gid16_t;
35typedef unsigned int __kernel_uid32_t;
36typedef unsigned int __kernel_gid32_t;
37
38typedef unsigned short __kernel_old_uid_t;
39typedef unsigned short __kernel_old_gid_t;
40typedef unsigned short __kernel_old_dev_t;
41
42#ifdef __GNUC__
43typedef long long __kernel_loff_t;
44#endif
45
46typedef struct {
47 int val[2];
48} __kernel_fsid_t;
49
50#ifdef __KERNEL__
51
52#undef __FD_SET
53#define __FD_SET(fd,fdsetp) set_bit(fd, (void *)(fdsetp))
54
55#undef __FD_CLR
56#define __FD_CLR(fd,fdsetp) clear_bit(fd, (void *)(fdsetp))
57
58#undef __FD_ISSET
59#define __FD_ISSET(fd,fdsetp) test_bit(fd, (void *)(fdsetp))
60
61#undef __FD_ZERO
62#define __FD_ZERO(fdsetp) memset((void *)(fdsetp), 0, __FDSET_LONGS << 2)
63
64#endif /* __KERNEL__ */
65
66#endif /* __ARCH_CRIS_POSIX_TYPES_H */
diff --git a/include/asm-cris/processor.h b/include/asm-cris/processor.h
deleted file mode 100644
index cdc0c1dce6be..000000000000
--- a/include/asm-cris/processor.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * include/asm-cris/processor.h
3 *
4 * Copyright (C) 2000, 2001 Axis Communications AB
5 *
6 * Authors: Bjorn Wesen Initial version
7 *
8 */
9
10#ifndef __ASM_CRIS_PROCESSOR_H
11#define __ASM_CRIS_PROCESSOR_H
12
13#include <asm/system.h>
14#include <asm/page.h>
15#include <asm/ptrace.h>
16#include <asm/arch/processor.h>
17
18struct task_struct;
19
20#define STACK_TOP TASK_SIZE
21#define STACK_TOP_MAX STACK_TOP
22
23/* This decides where the kernel will search for a free chunk of vm
24 * space during mmap's.
25 */
26#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
27
28/* THREAD_SIZE is the size of the task_struct/kernel_stack combo.
29 * normally, the stack is found by doing something like p + THREAD_SIZE
30 * in CRIS, a page is 8192 bytes, which seems like a sane size
31 */
32
33#define THREAD_SIZE PAGE_SIZE
34#define KERNEL_STACK_SIZE PAGE_SIZE
35
36/*
37 * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack.
38 * This macro allows us to find those regs for a task.
39 * Notice that subsequent pt_regs stackings, like recursive interrupts occurring while
40 * we're in the kernel, won't affect this - only the first user->kernel transition
41 * registers are reached by this.
42 */
43
44#define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE)) - 1)
45
46/*
47 * Dito but for the currently running task
48 */
49
50#define task_pt_regs(task) user_regs(task_thread_info(task))
51#define current_regs() task_pt_regs(current)
52
53static inline void prepare_to_copy(struct task_struct *tsk)
54{
55}
56
57extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
58
59unsigned long get_wchan(struct task_struct *p);
60
61#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
62
63extern unsigned long thread_saved_pc(struct task_struct *tsk);
64
65/* Free all resources held by a thread. */
66static inline void release_thread(struct task_struct *dead_task)
67{
68 /* Nothing needs to be done. */
69}
70
71#define init_stack (init_thread_union.stack)
72
73#define cpu_relax() barrier()
74
75#endif /* __ASM_CRIS_PROCESSOR_H */
diff --git a/include/asm-cris/ptrace.h b/include/asm-cris/ptrace.h
deleted file mode 100644
index d910925e3174..000000000000
--- a/include/asm-cris/ptrace.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _CRIS_PTRACE_H
2#define _CRIS_PTRACE_H
3
4#include <asm/arch/ptrace.h>
5
6#ifdef __KERNEL__
7
8/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
9#define PTRACE_GETREGS 12
10#define PTRACE_SETREGS 13
11
12#define profile_pc(regs) instruction_pointer(regs)
13
14#endif /* __KERNEL__ */
15
16#endif /* _CRIS_PTRACE_H */
diff --git a/include/asm-cris/resource.h b/include/asm-cris/resource.h
deleted file mode 100644
index b5d29448de4e..000000000000
--- a/include/asm-cris/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _CRIS_RESOURCE_H
2#define _CRIS_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif
diff --git a/include/asm-cris/rs485.h b/include/asm-cris/rs485.h
deleted file mode 100644
index c331c51b0c2b..000000000000
--- a/include/asm-cris/rs485.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/* RS-485 structures */
2
3/* RS-485 support */
4/* Used with ioctl() TIOCSERSETRS485 */
5struct rs485_control {
6 unsigned short rts_on_send;
7 unsigned short rts_after_sent;
8 unsigned long delay_rts_before_send;
9 unsigned short enabled;
10#ifdef __KERNEL__
11 int disable_serial_loopback;
12#endif
13};
14
15/* Used with ioctl() TIOCSERWRRS485 */
16struct rs485_write {
17 unsigned short outc_size;
18 unsigned char *outc;
19};
20
diff --git a/include/asm-cris/rtc.h b/include/asm-cris/rtc.h
deleted file mode 100644
index 17d3019529e1..000000000000
--- a/include/asm-cris/rtc.h
+++ /dev/null
@@ -1,107 +0,0 @@
1
2#ifndef __RTC_H__
3#define __RTC_H__
4
5#ifdef CONFIG_ETRAX_DS1302
6 /* Dallas DS1302 clock/calendar register numbers. */
7# define RTC_SECONDS 0
8# define RTC_MINUTES 1
9# define RTC_HOURS 2
10# define RTC_DAY_OF_MONTH 3
11# define RTC_MONTH 4
12# define RTC_WEEKDAY 5
13# define RTC_YEAR 6
14# define RTC_CONTROL 7
15
16 /* Bits in CONTROL register. */
17# define RTC_CONTROL_WRITEPROTECT 0x80
18# define RTC_TRICKLECHARGER 8
19
20 /* Bits in TRICKLECHARGER register TCS TCS TCS TCS DS DS RS RS. */
21# define RTC_TCR_PATTERN 0xA0 /* 1010xxxx */
22# define RTC_TCR_1DIOD 0x04 /* xxxx01xx */
23# define RTC_TCR_2DIOD 0x08 /* xxxx10xx */
24# define RTC_TCR_DISABLED 0x00 /* xxxxxx00 Disabled */
25# define RTC_TCR_2KOHM 0x01 /* xxxxxx01 2KOhm */
26# define RTC_TCR_4KOHM 0x02 /* xxxxxx10 4kOhm */
27# define RTC_TCR_8KOHM 0x03 /* xxxxxx11 8kOhm */
28
29#elif defined(CONFIG_ETRAX_PCF8563)
30 /* I2C bus slave registers. */
31# define RTC_I2C_READ 0xa3
32# define RTC_I2C_WRITE 0xa2
33
34 /* Phillips PCF8563 registers. */
35# define RTC_CONTROL1 0x00 /* Control/Status register 1. */
36# define RTC_CONTROL2 0x01 /* Control/Status register 2. */
37# define RTC_CLOCKOUT_FREQ 0x0d /* CLKOUT frequency. */
38# define RTC_TIMER_CONTROL 0x0e /* Timer control. */
39# define RTC_TIMER_CNTDOWN 0x0f /* Timer countdown. */
40
41 /* BCD encoded clock registers. */
42# define RTC_SECONDS 0x02
43# define RTC_MINUTES 0x03
44# define RTC_HOURS 0x04
45# define RTC_DAY_OF_MONTH 0x05
46# define RTC_WEEKDAY 0x06 /* Not coded in BCD! */
47# define RTC_MONTH 0x07
48# define RTC_YEAR 0x08
49# define RTC_MINUTE_ALARM 0x09
50# define RTC_HOUR_ALARM 0x0a
51# define RTC_DAY_ALARM 0x0b
52# define RTC_WEEKDAY_ALARM 0x0c
53
54#endif
55
56#ifdef CONFIG_ETRAX_DS1302
57extern unsigned char ds1302_readreg(int reg);
58extern void ds1302_writereg(int reg, unsigned char val);
59extern int ds1302_init(void);
60# define CMOS_READ(x) ds1302_readreg(x)
61# define CMOS_WRITE(val,reg) ds1302_writereg(reg,val)
62# define RTC_INIT() ds1302_init()
63#elif defined(CONFIG_ETRAX_PCF8563)
64extern unsigned char pcf8563_readreg(int reg);
65extern void pcf8563_writereg(int reg, unsigned char val);
66extern int pcf8563_init(void);
67# define CMOS_READ(x) pcf8563_readreg(x)
68# define CMOS_WRITE(val,reg) pcf8563_writereg(reg,val)
69# define RTC_INIT() pcf8563_init()
70#else
71 /* No RTC configured so we shouldn't try to access any. */
72# define CMOS_READ(x) 42
73# define CMOS_WRITE(x,y)
74# define RTC_INIT() (-1)
75#endif
76
77/*
78 * The struct used to pass data via the following ioctl. Similar to the
79 * struct tm in <time.h>, but it needs to be here so that the kernel
80 * source is self contained, allowing cross-compiles, etc. etc.
81 */
82struct rtc_time {
83 int tm_sec;
84 int tm_min;
85 int tm_hour;
86 int tm_mday;
87 int tm_mon;
88 int tm_year;
89 int tm_wday;
90 int tm_yday;
91 int tm_isdst;
92};
93
94/* ioctl() calls that are permitted to the /dev/rtc interface. */
95#define RTC_MAGIC 'p'
96/* Read RTC time. */
97#define RTC_RD_TIME _IOR(RTC_MAGIC, 0x09, struct rtc_time)
98/* Set RTC time. */
99#define RTC_SET_TIME _IOW(RTC_MAGIC, 0x0a, struct rtc_time)
100#define RTC_SET_CHARGE _IOW(RTC_MAGIC, 0x0b, int)
101/* Voltage low detector */
102#define RTC_VL_READ _IOR(RTC_MAGIC, 0x13, int)
103/* Clear voltage low information */
104#define RTC_VL_CLR _IO(RTC_MAGIC, 0x14)
105#define RTC_MAX_IOCTL 0x14
106
107#endif /* __RTC_H__ */
diff --git a/include/asm-cris/scatterlist.h b/include/asm-cris/scatterlist.h
deleted file mode 100644
index faff53ad1f96..000000000000
--- a/include/asm-cris/scatterlist.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef __ASM_CRIS_SCATTERLIST_H
2#define __ASM_CRIS_SCATTERLIST_H
3
4struct scatterlist {
5#ifdef CONFIG_DEBUG_SG
6 unsigned long sg_magic;
7#endif
8 char * address; /* Location data is to be transferred to */
9 unsigned int length;
10
11 /* The following is i386 highmem junk - not used by us */
12 unsigned long page_link;
13 unsigned int offset;/* for highmem, page offset */
14
15};
16
17#define sg_dma_address(sg) ((sg)->address)
18#define sg_dma_len(sg) ((sg)->length)
19/* i386 junk */
20
21#define ISA_DMA_THRESHOLD (0x1fffffff)
22
23#endif /* !(__ASM_CRIS_SCATTERLIST_H) */
diff --git a/include/asm-cris/sections.h b/include/asm-cris/sections.h
deleted file mode 100644
index 2c998ce8967b..000000000000
--- a/include/asm-cris/sections.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _CRIS_SECTIONS_H
2#define _CRIS_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#endif
diff --git a/include/asm-cris/segment.h b/include/asm-cris/segment.h
deleted file mode 100644
index c067513beaaf..000000000000
--- a/include/asm-cris/segment.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_SEGMENT_H
2#define _ASM_SEGMENT_H
3
4typedef struct {
5 unsigned long seg;
6} mm_segment_t;
7
8#endif
diff --git a/include/asm-cris/sembuf.h b/include/asm-cris/sembuf.h
deleted file mode 100644
index 7fed9843796d..000000000000
--- a/include/asm-cris/sembuf.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _CRIS_SEMBUF_H
2#define _CRIS_SEMBUF_H
3
4/*
5 * The semid64_ds structure for CRIS architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17 unsigned long __unused1;
18 __kernel_time_t sem_ctime; /* last change time */
19 unsigned long __unused2;
20 unsigned long sem_nsems; /* no. of semaphores in array */
21 unsigned long __unused3;
22 unsigned long __unused4;
23};
24
25#endif /* _CRIS_SEMBUF_H */
diff --git a/include/asm-cris/setup.h b/include/asm-cris/setup.h
deleted file mode 100644
index b90728652d1a..000000000000
--- a/include/asm-cris/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _CRIS_SETUP_H
2#define _CRIS_SETUP_H
3
4#define COMMAND_LINE_SIZE 256
5
6#endif
diff --git a/include/asm-cris/shmbuf.h b/include/asm-cris/shmbuf.h
deleted file mode 100644
index 3239e3f000e8..000000000000
--- a/include/asm-cris/shmbuf.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef _CRIS_SHMBUF_H
2#define _CRIS_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for CRIS architecture (same as for i386)
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct shmid64_ds {
15 struct ipc64_perm shm_perm; /* operation perms */
16 size_t shm_segsz; /* size of segment (bytes) */
17 __kernel_time_t shm_atime; /* last attach time */
18 unsigned long __unused1;
19 __kernel_time_t shm_dtime; /* last detach time */
20 unsigned long __unused2;
21 __kernel_time_t shm_ctime; /* last change time */
22 unsigned long __unused3;
23 __kernel_pid_t shm_cpid; /* pid of creator */
24 __kernel_pid_t shm_lpid; /* pid of last operator */
25 unsigned long shm_nattch; /* no. of current attaches */
26 unsigned long __unused4;
27 unsigned long __unused5;
28};
29
30struct shminfo64 {
31 unsigned long shmmax;
32 unsigned long shmmin;
33 unsigned long shmmni;
34 unsigned long shmseg;
35 unsigned long shmall;
36 unsigned long __unused1;
37 unsigned long __unused2;
38 unsigned long __unused3;
39 unsigned long __unused4;
40};
41
42#endif /* _CRIS_SHMBUF_H */
diff --git a/include/asm-cris/shmparam.h b/include/asm-cris/shmparam.h
deleted file mode 100644
index d29d12270687..000000000000
--- a/include/asm-cris/shmparam.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_CRIS_SHMPARAM_H
2#define _ASM_CRIS_SHMPARAM_H
3
4/* same as asm-i386/ version.. */
5
6#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
7
8#endif /* _ASM_CRIS_SHMPARAM_H */
diff --git a/include/asm-cris/sigcontext.h b/include/asm-cris/sigcontext.h
deleted file mode 100644
index a1d634e120df..000000000000
--- a/include/asm-cris/sigcontext.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* $Id: sigcontext.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
2
3#ifndef _ASM_CRIS_SIGCONTEXT_H
4#define _ASM_CRIS_SIGCONTEXT_H
5
6#include <asm/ptrace.h>
7
8/* This struct is saved by setup_frame in signal.c, to keep the current context while
9 a signal handler is executed. It's restored by sys_sigreturn.
10
11 To keep things simple, we use pt_regs here even though normally you just specify
12 the list of regs to save. Then we can use copy_from_user on the entire regs instead
13 of a bunch of get_user's as well...
14
15*/
16
17struct sigcontext {
18 struct pt_regs regs; /* needs to be first */
19 unsigned long oldmask;
20 unsigned long usp; /* usp before stacking this gunk on it */
21};
22
23#endif
24
diff --git a/include/asm-cris/siginfo.h b/include/asm-cris/siginfo.h
deleted file mode 100644
index c1cd6d16928b..000000000000
--- a/include/asm-cris/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _CRIS_SIGINFO_H
2#define _CRIS_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h
deleted file mode 100644
index 349ae682b568..000000000000
--- a/include/asm-cris/signal.h
+++ /dev/null
@@ -1,163 +0,0 @@
1#ifndef _ASM_CRIS_SIGNAL_H
2#define _ASM_CRIS_SIGNAL_H
3
4#include <linux/types.h>
5
6/* Avoid too many header ordering problems. */
7struct siginfo;
8
9#ifdef __KERNEL__
10/* Most things should be clean enough to redefine this at will, if care
11 is taken to make libc match. */
12
13#define _NSIG 64
14#define _NSIG_BPW 32
15#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
16
17typedef unsigned long old_sigset_t; /* at least 32 bits */
18
19typedef struct {
20 unsigned long sig[_NSIG_WORDS];
21} sigset_t;
22
23#else
24/* Here we must cater to libcs that poke about in kernel headers. */
25
26#define NSIG 32
27typedef unsigned long sigset_t;
28
29#endif /* __KERNEL__ */
30
31#define SIGHUP 1
32#define SIGINT 2
33#define SIGQUIT 3
34#define SIGILL 4
35#define SIGTRAP 5
36#define SIGABRT 6
37#define SIGIOT 6
38#define SIGBUS 7
39#define SIGFPE 8
40#define SIGKILL 9
41#define SIGUSR1 10
42#define SIGSEGV 11
43#define SIGUSR2 12
44#define SIGPIPE 13
45#define SIGALRM 14
46#define SIGTERM 15
47#define SIGSTKFLT 16
48#define SIGCHLD 17
49#define SIGCONT 18
50#define SIGSTOP 19
51#define SIGTSTP 20
52#define SIGTTIN 21
53#define SIGTTOU 22
54#define SIGURG 23
55#define SIGXCPU 24
56#define SIGXFSZ 25
57#define SIGVTALRM 26
58#define SIGPROF 27
59#define SIGWINCH 28
60#define SIGIO 29
61#define SIGPOLL SIGIO
62/*
63#define SIGLOST 29
64*/
65#define SIGPWR 30
66#define SIGSYS 31
67#define SIGUNUSED 31
68
69/* These should not be considered constants from userland. */
70#define SIGRTMIN 32
71#define SIGRTMAX _NSIG
72
73/*
74 * SA_FLAGS values:
75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_RESTART flag to get restarting signals (which were the default long ago)
78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
79 * SA_RESETHAND clears the handler when the signal is delivered.
80 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
81 * SA_NODEFER prevents the current signal from being masked in the handler.
82 *
83 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
84 * Unix names RESETHAND and NODEFER respectively.
85 */
86
87#define SA_NOCLDSTOP 0x00000001u
88#define SA_NOCLDWAIT 0x00000002u
89#define SA_SIGINFO 0x00000004u
90#define SA_ONSTACK 0x08000000u
91#define SA_RESTART 0x10000000u
92#define SA_NODEFER 0x40000000u
93#define SA_RESETHAND 0x80000000u
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98#define SA_RESTORER 0x04000000
99
100/*
101 * sigaltstack controls
102 */
103#define SS_ONSTACK 1
104#define SS_DISABLE 2
105
106#define MINSIGSTKSZ 2048
107#define SIGSTKSZ 8192
108
109#include <asm-generic/signal.h>
110
111#ifdef __KERNEL__
112struct old_sigaction {
113 __sighandler_t sa_handler;
114 old_sigset_t sa_mask;
115 unsigned long sa_flags;
116 void (*sa_restorer)(void);
117};
118
119struct sigaction {
120 __sighandler_t sa_handler;
121 unsigned long sa_flags;
122 void (*sa_restorer)(void);
123 sigset_t sa_mask; /* mask last for extensibility */
124};
125
126struct k_sigaction {
127 struct sigaction sa;
128};
129#else
130/* Here we must cater to libcs that poke about in kernel headers. */
131
132struct sigaction {
133 union {
134 __sighandler_t _sa_handler;
135 void (*_sa_sigaction)(int, struct siginfo *, void *);
136 } _u;
137 sigset_t sa_mask;
138 unsigned long sa_flags;
139 void (*sa_restorer)(void);
140};
141
142#define sa_handler _u._sa_handler
143#define sa_sigaction _u._sa_sigaction
144
145#endif /* __KERNEL__ */
146
147typedef struct sigaltstack {
148 void *ss_sp;
149 int ss_flags;
150 size_t ss_size;
151} stack_t;
152
153#ifdef __KERNEL__
154#include <asm/sigcontext.h>
155
156/* here we could define asm-optimized sigaddset, sigdelset etc. operations.
157 * if we don't, generic ones are used from linux/signal.h
158 */
159#define ptrace_signal_deliver(regs, cookie) do { } while (0)
160
161#endif /* __KERNEL__ */
162
163#endif
diff --git a/include/asm-cris/smp.h b/include/asm-cris/smp.h
deleted file mode 100644
index dba33aba3e95..000000000000
--- a/include/asm-cris/smp.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __ASM_SMP_H
2#define __ASM_SMP_H
3
4#include <linux/cpumask.h>
5
6extern cpumask_t phys_cpu_present_map;
7extern cpumask_t cpu_possible_map;
8
9#define raw_smp_processor_id() (current_thread_info()->cpu)
10
11#endif
diff --git a/include/asm-cris/socket.h b/include/asm-cris/socket.h
deleted file mode 100644
index 9df0ca82f5de..000000000000
--- a/include/asm-cris/socket.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef _ASM_SOCKET_H
2#define _ASM_SOCKET_H
3
4/* almost the same as asm-i386/socket.h */
5
6#include <asm/sockios.h>
7
8/* For setsockoptions(2) */
9#define SOL_SOCKET 1
10
11#define SO_DEBUG 1
12#define SO_REUSEADDR 2
13#define SO_TYPE 3
14#define SO_ERROR 4
15#define SO_DONTROUTE 5
16#define SO_BROADCAST 6
17#define SO_SNDBUF 7
18#define SO_RCVBUF 8
19#define SO_SNDBUFFORCE 32
20#define SO_RCVBUFFORCE 33
21#define SO_KEEPALIVE 9
22#define SO_OOBINLINE 10
23#define SO_NO_CHECK 11
24#define SO_PRIORITY 12
25#define SO_LINGER 13
26#define SO_BSDCOMPAT 14
27/* To add :#define SO_REUSEPORT 15 */
28#define SO_PASSCRED 16
29#define SO_PEERCRED 17
30#define SO_RCVLOWAT 18
31#define SO_SNDLOWAT 19
32#define SO_RCVTIMEO 20
33#define SO_SNDTIMEO 21
34
35/* Security levels - as per NRL IPv6 - don't actually do anything */
36#define SO_SECURITY_AUTHENTICATION 22
37#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
38#define SO_SECURITY_ENCRYPTION_NETWORK 24
39
40#define SO_BINDTODEVICE 25
41
42/* Socket filtering */
43#define SO_ATTACH_FILTER 26
44#define SO_DETACH_FILTER 27
45
46#define SO_PEERNAME 28
47#define SO_TIMESTAMP 29
48#define SCM_TIMESTAMP SO_TIMESTAMP
49
50#define SO_ACCEPTCONN 30
51
52#define SO_PEERSEC 31
53#define SO_PASSSEC 34
54#define SO_TIMESTAMPNS 35
55#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
56
57#define SO_MARK 36
58
59#endif /* _ASM_SOCKET_H */
60
61
diff --git a/include/asm-cris/sockios.h b/include/asm-cris/sockios.h
deleted file mode 100644
index cfe7bfecf599..000000000000
--- a/include/asm-cris/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_CRIS_SOCKIOS__
2#define __ARCH_CRIS_SOCKIOS__
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif
diff --git a/include/asm-cris/spinlock.h b/include/asm-cris/spinlock.h
deleted file mode 100644
index 2e8ba8afc7af..000000000000
--- a/include/asm-cris/spinlock.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm/arch/spinlock.h>
diff --git a/include/asm-cris/stat.h b/include/asm-cris/stat.h
deleted file mode 100644
index 9e558cc3c43b..000000000000
--- a/include/asm-cris/stat.h
+++ /dev/null
@@ -1,81 +0,0 @@
1#ifndef _CRIS_STAT_H
2#define _CRIS_STAT_H
3
4/* Keep this a verbatim copy of i386 version; tweak CRIS-specific bits in
5 the kernel if necessary. */
6
7struct __old_kernel_stat {
8 unsigned short st_dev;
9 unsigned short st_ino;
10 unsigned short st_mode;
11 unsigned short st_nlink;
12 unsigned short st_uid;
13 unsigned short st_gid;
14 unsigned short st_rdev;
15 unsigned long st_size;
16 unsigned long st_atime;
17 unsigned long st_mtime;
18 unsigned long st_ctime;
19};
20
21#define STAT_HAVE_NSEC 1
22
23struct stat {
24 unsigned long st_dev;
25 unsigned long st_ino;
26 unsigned short st_mode;
27 unsigned short st_nlink;
28 unsigned short st_uid;
29 unsigned short st_gid;
30 unsigned long st_rdev;
31 unsigned long st_size;
32 unsigned long st_blksize;
33 unsigned long st_blocks;
34 unsigned long st_atime;
35 unsigned long st_atime_nsec;
36 unsigned long st_mtime;
37 unsigned long st_mtime_nsec;
38 unsigned long st_ctime;
39 unsigned long st_ctime_nsec;
40 unsigned long __unused4;
41 unsigned long __unused5;
42};
43
44/* This matches struct stat64 in glibc2.1, hence the absolutely
45 * insane amounts of padding around dev_t's.
46 */
47struct stat64 {
48 unsigned long long st_dev;
49 unsigned char __pad0[4];
50
51#define STAT64_HAS_BROKEN_ST_INO 1
52 unsigned long __st_ino;
53
54 unsigned int st_mode;
55 unsigned int st_nlink;
56
57 unsigned long st_uid;
58 unsigned long st_gid;
59
60 unsigned long long st_rdev;
61 unsigned char __pad3[4];
62
63 long long st_size;
64 unsigned long st_blksize;
65
66 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
67 unsigned long __pad4; /* future possible st_blocks high bits */
68
69 unsigned long st_atime;
70 unsigned long st_atime_nsec;
71
72 unsigned long st_mtime;
73 unsigned long st_mtime_nsec;
74
75 unsigned long st_ctime;
76 unsigned long st_ctime_nsec; /* will be high 32 bits of ctime someday */
77
78 unsigned long long st_ino;
79};
80
81#endif
diff --git a/include/asm-cris/statfs.h b/include/asm-cris/statfs.h
deleted file mode 100644
index fdaf921844bc..000000000000
--- a/include/asm-cris/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _CRIS_STATFS_H
2#define _CRIS_STATFS_H
3
4#include <asm-generic/statfs.h>
5
6#endif
diff --git a/include/asm-cris/string.h b/include/asm-cris/string.h
deleted file mode 100644
index 691190e99a27..000000000000
--- a/include/asm-cris/string.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef _ASM_CRIS_STRING_H
2#define _ASM_CRIS_STRING_H
3
4/* the optimized memcpy is in arch/cris/lib/string.c */
5
6#define __HAVE_ARCH_MEMCPY
7extern void *memcpy(void *, const void *, size_t);
8
9/* New and improved. In arch/cris/lib/memset.c */
10
11#define __HAVE_ARCH_MEMSET
12extern void *memset(void *, int, size_t);
13
14#endif
diff --git a/include/asm-cris/sync_serial.h b/include/asm-cris/sync_serial.h
deleted file mode 100644
index d87c24df2b38..000000000000
--- a/include/asm-cris/sync_serial.h
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * ioctl defines for synchronous serial port driver
3 *
4 * Copyright (c) 2001-2003 Axis Communications AB
5 *
6 * Author: Mikael Starvik
7 *
8 */
9
10#ifndef SYNC_SERIAL_H
11#define SYNC_SERIAL_H
12
13#include <linux/ioctl.h>
14
15#define SSP_SPEED _IOR('S', 0, unsigned int)
16#define SSP_MODE _IOR('S', 1, unsigned int)
17#define SSP_FRAME_SYNC _IOR('S', 2, unsigned int)
18#define SSP_IPOLARITY _IOR('S', 3, unsigned int)
19#define SSP_OPOLARITY _IOR('S', 4, unsigned int)
20#define SSP_SPI _IOR('S', 5, unsigned int)
21#define SSP_INBUFCHUNK _IOR('S', 6, unsigned int)
22
23/* Values for SSP_SPEED */
24#define SSP150 0
25#define SSP300 1
26#define SSP600 2
27#define SSP1200 3
28#define SSP2400 4
29#define SSP4800 5
30#define SSP9600 6
31#define SSP19200 7
32#define SSP28800 8
33#define SSP57600 9
34#define SSP115200 10
35#define SSP230400 11
36#define SSP460800 12
37#define SSP921600 13
38#define SSP3125000 14
39#define CODEC 15
40
41#define FREQ_4MHz 0
42#define FREQ_2MHz 1
43#define FREQ_1MHz 2
44#define FREQ_512kHz 3
45#define FREQ_256kHz 4
46#define FREQ_128kHz 5
47#define FREQ_64kHz 6
48#define FREQ_32kHz 7
49
50/* Used by application to set CODEC divider, word rate and frame rate */
51#define CODEC_VAL(freq, clk_per_sync, sync_per_frame) (CODEC | (freq << 8) | (clk_per_sync << 16) | (sync_per_frame << 28))
52
53/* Used by driver to extract speed */
54#define GET_SPEED(x) (x & 0xff)
55#define GET_FREQ(x) ((x & 0xff00) >> 8)
56#define GET_WORD_RATE(x) (((x & 0x0fff0000) >> 16) - 1)
57#define GET_FRAME_RATE(x) (((x & 0xf0000000) >> 28) - 1)
58
59/* Values for SSP_MODE */
60#define MASTER_OUTPUT 0
61#define SLAVE_OUTPUT 1
62#define MASTER_INPUT 2
63#define SLAVE_INPUT 3
64#define MASTER_BIDIR 4
65#define SLAVE_BIDIR 5
66
67/* Values for SSP_FRAME_SYNC */
68#define NORMAL_SYNC 1
69#define EARLY_SYNC 2
70#define SECOND_WORD_SYNC 0x40000
71
72#define BIT_SYNC 4
73#define WORD_SYNC 8
74#define EXTENDED_SYNC 0x10
75
76#define SYNC_OFF 0x20
77#define SYNC_ON 0x40
78#define WORD_SIZE_8 0x80
79#define WORD_SIZE_12 0x100
80#define WORD_SIZE_16 0x200
81#define WORD_SIZE_24 0x400
82#define WORD_SIZE_32 0x800
83#define BIT_ORDER_LSB 0x1000
84#define BIT_ORDER_MSB 0x2000
85#define FLOW_CONTROL_ENABLE 0x4000
86#define FLOW_CONTROL_DISABLE 0x8000
87#define CLOCK_GATED 0x10000
88#define CLOCK_NOT_GATED 0x20000
89
90/* Values for SSP_IPOLARITY and SSP_OPOLARITY */
91#define CLOCK_NORMAL 1
92#define CLOCK_INVERT 2
93#define CLOCK_INEGEDGE CLOCK_NORMAL
94#define CLOCK_IPOSEDGE CLOCK_INVERT
95#define FRAME_NORMAL 4
96#define FRAME_INVERT 8
97#define STATUS_NORMAL 0x10
98#define STATUS_INVERT 0x20
99
100/* Values for SSP_SPI */
101#define SPI_MASTER 0
102#define SPI_SLAVE 1
103
104/* Values for SSP_INBUFCHUNK */
105/* plain integer with the size of DMA chunks */
106
107#endif
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h
deleted file mode 100644
index 5bcfe5a10907..000000000000
--- a/include/asm-cris/system.h
+++ /dev/null
@@ -1,88 +0,0 @@
1#ifndef __ASM_CRIS_SYSTEM_H
2#define __ASM_CRIS_SYSTEM_H
3
4#include <asm/arch/system.h>
5
6/* the switch_to macro calls resume, an asm function in entry.S which does the actual
7 * task switching.
8 */
9
10extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int);
11#define switch_to(prev,next,last) last = resume(prev,next, \
12 (int)&((struct task_struct *)0)->thread)
13
14#define barrier() __asm__ __volatile__("": : :"memory")
15#define mb() barrier()
16#define rmb() mb()
17#define wmb() mb()
18#define read_barrier_depends() do { } while(0)
19#define set_mb(var, value) do { var = value; mb(); } while (0)
20
21#ifdef CONFIG_SMP
22#define smp_mb() mb()
23#define smp_rmb() rmb()
24#define smp_wmb() wmb()
25#define smp_read_barrier_depends() read_barrier_depends()
26#else
27#define smp_mb() barrier()
28#define smp_rmb() barrier()
29#define smp_wmb() barrier()
30#define smp_read_barrier_depends() do { } while(0)
31#endif
32
33#define iret()
34
35/*
36 * disable hlt during certain critical i/o operations
37 */
38#define HAVE_DISABLE_HLT
39void disable_hlt(void);
40void enable_hlt(void);
41
42static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
43{
44 /* since Etrax doesn't have any atomic xchg instructions, we need to disable
45 irq's (if enabled) and do it with move.d's */
46 unsigned long flags,temp;
47 local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
48 switch (size) {
49 case 1:
50 *((unsigned char *)&temp) = x;
51 x = *(unsigned char *)ptr;
52 *(unsigned char *)ptr = *((unsigned char *)&temp);
53 break;
54 case 2:
55 *((unsigned short *)&temp) = x;
56 x = *(unsigned short *)ptr;
57 *(unsigned short *)ptr = *((unsigned short *)&temp);
58 break;
59 case 4:
60 temp = x;
61 x = *(unsigned long *)ptr;
62 *(unsigned long *)ptr = temp;
63 break;
64 }
65 local_irq_restore(flags); /* restore irq enable bit */
66 return x;
67}
68
69#include <asm-generic/cmpxchg-local.h>
70
71/*
72 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
73 * them available.
74 */
75#define cmpxchg_local(ptr, o, n) \
76 ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
77 (unsigned long)(n), sizeof(*(ptr))))
78#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
79
80#ifndef CONFIG_SMP
81#include <asm-generic/cmpxchg.h>
82#endif
83
84#define arch_align_stack(x) (x)
85
86void default_idle(void);
87
88#endif
diff --git a/include/asm-cris/termbits.h b/include/asm-cris/termbits.h
deleted file mode 100644
index 66e1a7492a0c..000000000000
--- a/include/asm-cris/termbits.h
+++ /dev/null
@@ -1,234 +0,0 @@
1/* $Id: termbits.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
2
3#ifndef __ARCH_ETRAX100_TERMBITS_H__
4#define __ARCH_ETRAX100_TERMBITS_H__
5
6#include <linux/posix_types.h>
7
8typedef unsigned char cc_t;
9typedef unsigned int speed_t;
10typedef unsigned int tcflag_t;
11
12#define NCCS 19
13struct termios {
14 tcflag_t c_iflag; /* input mode flags */
15 tcflag_t c_oflag; /* output mode flags */
16 tcflag_t c_cflag; /* control mode flags */
17 tcflag_t c_lflag; /* local mode flags */
18 cc_t c_line; /* line discipline */
19 cc_t c_cc[NCCS]; /* control characters */
20};
21
22struct termios2 {
23 tcflag_t c_iflag; /* input mode flags */
24 tcflag_t c_oflag; /* output mode flags */
25 tcflag_t c_cflag; /* control mode flags */
26 tcflag_t c_lflag; /* local mode flags */
27 cc_t c_line; /* line discipline */
28 cc_t c_cc[NCCS]; /* control characters */
29 speed_t c_ispeed; /* input speed */
30 speed_t c_ospeed; /* output speed */
31};
32
33struct ktermios {
34 tcflag_t c_iflag; /* input mode flags */
35 tcflag_t c_oflag; /* output mode flags */
36 tcflag_t c_cflag; /* control mode flags */
37 tcflag_t c_lflag; /* local mode flags */
38 cc_t c_line; /* line discipline */
39 cc_t c_cc[NCCS]; /* control characters */
40 speed_t c_ispeed; /* input speed */
41 speed_t c_ospeed; /* output speed */
42};
43
44/* c_cc characters */
45#define VINTR 0
46#define VQUIT 1
47#define VERASE 2
48#define VKILL 3
49#define VEOF 4
50#define VTIME 5
51#define VMIN 6
52#define VSWTC 7
53#define VSTART 8
54#define VSTOP 9
55#define VSUSP 10
56#define VEOL 11
57#define VREPRINT 12
58#define VDISCARD 13
59#define VWERASE 14
60#define VLNEXT 15
61#define VEOL2 16
62
63/* c_iflag bits */
64#define IGNBRK 0000001
65#define BRKINT 0000002
66#define IGNPAR 0000004
67#define PARMRK 0000010
68#define INPCK 0000020
69#define ISTRIP 0000040
70#define INLCR 0000100
71#define IGNCR 0000200
72#define ICRNL 0000400
73#define IUCLC 0001000
74#define IXON 0002000
75#define IXANY 0004000
76#define IXOFF 0010000
77#define IMAXBEL 0020000
78#define IUTF8 0040000
79
80/* c_oflag bits */
81#define OPOST 0000001
82#define OLCUC 0000002
83#define ONLCR 0000004
84#define OCRNL 0000010
85#define ONOCR 0000020
86#define ONLRET 0000040
87#define OFILL 0000100
88#define OFDEL 0000200
89#define NLDLY 0000400
90#define NL0 0000000
91#define NL1 0000400
92#define CRDLY 0003000
93#define CR0 0000000
94#define CR1 0001000
95#define CR2 0002000
96#define CR3 0003000
97#define TABDLY 0014000
98#define TAB0 0000000
99#define TAB1 0004000
100#define TAB2 0010000
101#define TAB3 0014000
102#define XTABS 0014000
103#define BSDLY 0020000
104#define BS0 0000000
105#define BS1 0020000
106#define VTDLY 0040000
107#define VT0 0000000
108#define VT1 0040000
109#define FFDLY 0100000
110#define FF0 0000000
111#define FF1 0100000
112
113/* c_cflag bit meaning */
114/*
115 * 3 2 1
116 * 10 987 654 321 098 765 432 109 876 543 210
117 * | | ||| CBAUD
118 * obaud
119 *
120 * ||CSIZE
121 *
122 * |CSTOP
123 * |CREAD
124 * |CPARENB
125 *
126 * |CPARODD
127 * |HUPCL
128 * |CLOCAL
129 * |CBAUDEX
130 * 10 987 654 321 098 765 432 109 876 543 210
131 * | || || CIBAUD, IBSHIFT=16
132 * ibaud
133 * |CMSPAR
134 * | CRTSCTS
135 * x x xxx xxx x x xx Free bits
136 */
137
138#define CBAUD 0010017
139#define B0 0000000 /* hang up */
140#define B50 0000001
141#define B75 0000002
142#define B110 0000003
143#define B134 0000004
144#define B150 0000005
145#define B200 0000006
146#define B300 0000007
147#define B600 0000010
148#define B1200 0000011
149#define B1800 0000012
150#define B2400 0000013
151#define B4800 0000014
152#define B9600 0000015
153#define B19200 0000016
154#define B38400 0000017
155#define EXTA B19200
156#define EXTB B38400
157#define CSIZE 0000060
158#define CS5 0000000
159#define CS6 0000020
160#define CS7 0000040
161#define CS8 0000060
162#define CSTOPB 0000100
163#define CREAD 0000200
164#define PARENB 0000400
165#define PARODD 0001000
166#define HUPCL 0002000
167#define CLOCAL 0004000
168#define CBAUDEX 0010000
169#define BOTHER 0010000
170#define B57600 0010001
171#define B115200 0010002
172#define B230400 0010003
173#define B460800 0010004
174
175/* Unsupported rates, but needed to avoid compile error. */
176#define B500000 0010005
177#define B576000 0010006
178#define B1000000 0010010
179#define B1152000 0010011
180#define B1500000 0010012
181#define B2000000 0010013
182#define B2500000 0010014
183#define B3000000 0010015
184#define B3500000 0010016
185#define B4000000 0010017
186
187/* etrax supports these additional three baud rates */
188#define B921600 0010005
189#define B1843200 0010006
190#define B6250000 0010007
191/* ETRAX FS supports this as well */
192#define B12500000 0010010
193#define CIBAUD 002003600000 /* input baud rate (used in v32) */
194/* The values for CIBAUD bits are the same as the values for CBAUD and CBAUDEX
195 * shifted left IBSHIFT bits.
196 */
197#define IBSHIFT 16
198#define CMSPAR 010000000000 /* mark or space (stick) parity - PARODD=space*/
199#define CRTSCTS 020000000000 /* flow control */
200
201/* c_lflag bits */
202#define ISIG 0000001
203#define ICANON 0000002
204#define XCASE 0000004
205#define ECHO 0000010
206#define ECHOE 0000020
207#define ECHOK 0000040
208#define ECHONL 0000100
209#define NOFLSH 0000200
210#define TOSTOP 0000400
211#define ECHOCTL 0001000
212#define ECHOPRT 0002000
213#define ECHOKE 0004000
214#define FLUSHO 0010000
215#define PENDIN 0040000
216#define IEXTEN 0100000
217
218/* tcflow() and TCXONC use these */
219#define TCOOFF 0
220#define TCOON 1
221#define TCIOFF 2
222#define TCION 3
223
224/* tcflush() and TCFLSH use these */
225#define TCIFLUSH 0
226#define TCOFLUSH 1
227#define TCIOFLUSH 2
228
229/* tcsetattr uses these */
230#define TCSANOW 0
231#define TCSADRAIN 1
232#define TCSAFLUSH 2
233
234#endif
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h
deleted file mode 100644
index b0124e6c2e41..000000000000
--- a/include/asm-cris/termios.h
+++ /dev/null
@@ -1,91 +0,0 @@
1#ifndef _CRIS_TERMIOS_H
2#define _CRIS_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6#include <asm/rs485.h>
7
8struct winsize {
9 unsigned short ws_row;
10 unsigned short ws_col;
11 unsigned short ws_xpixel;
12 unsigned short ws_ypixel;
13};
14
15#define NCC 8
16struct termio {
17 unsigned short c_iflag; /* input mode flags */
18 unsigned short c_oflag; /* output mode flags */
19 unsigned short c_cflag; /* control mode flags */
20 unsigned short c_lflag; /* local mode flags */
21 unsigned char c_line; /* line discipline */
22 unsigned char c_cc[NCC]; /* control characters */
23};
24
25/* modem lines */
26#define TIOCM_LE 0x001
27#define TIOCM_DTR 0x002
28#define TIOCM_RTS 0x004
29#define TIOCM_ST 0x008
30#define TIOCM_SR 0x010
31#define TIOCM_CTS 0x020
32#define TIOCM_CAR 0x040
33#define TIOCM_RNG 0x080
34#define TIOCM_DSR 0x100
35#define TIOCM_CD TIOCM_CAR
36#define TIOCM_RI TIOCM_RNG
37#define TIOCM_OUT1 0x2000
38#define TIOCM_OUT2 0x4000
39#define TIOCM_LOOP 0x8000
40
41/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
42
43#ifdef __KERNEL__
44
45/* intr=^C quit=^\ erase=del kill=^U
46 eof=^D vtime=\0 vmin=\1 sxtc=\0
47 start=^Q stop=^S susp=^Z eol=\0
48 reprint=^R discard=^U werase=^W lnext=^V
49 eol2=\0
50*/
51#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
52
53/*
54 * Translate a "termio" structure into a "termios". Ugh.
55 */
56#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
57 unsigned short __tmp; \
58 get_user(__tmp,&(termio)->x); \
59 *(unsigned short *) &(termios)->x = __tmp; \
60}
61
62#define user_termio_to_kernel_termios(termios, termio) \
63({ \
64 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
67 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
68 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
69})
70
71/*
72 * Translate a "termios" structure into a "termio". Ugh.
73 */
74#define kernel_termios_to_user_termio(termio, termios) \
75({ \
76 put_user((termios)->c_iflag, &(termio)->c_iflag); \
77 put_user((termios)->c_oflag, &(termio)->c_oflag); \
78 put_user((termios)->c_cflag, &(termio)->c_cflag); \
79 put_user((termios)->c_lflag, &(termio)->c_lflag); \
80 put_user((termios)->c_line, &(termio)->c_line); \
81 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
82})
83
84#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
85#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
86#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
87#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
88
89#endif /* __KERNEL__ */
90
91#endif /* _CRIS_TERMIOS_H */
diff --git a/include/asm-cris/thread_info.h b/include/asm-cris/thread_info.h
deleted file mode 100644
index 7efe1000f99d..000000000000
--- a/include/asm-cris/thread_info.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/* thread_info.h: CRIS low-level thread information
2 *
3 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 *
6 * CRIS port by Axis Communications
7 */
8
9#ifndef _ASM_THREAD_INFO_H
10#define _ASM_THREAD_INFO_H
11
12#ifdef __KERNEL__
13
14#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
15
16#ifndef __ASSEMBLY__
17#include <asm/types.h>
18#include <asm/processor.h>
19#include <asm/arch/thread_info.h>
20#include <asm/segment.h>
21#endif
22
23
24/*
25 * low level task data that entry.S needs immediate access to
26 * - this struct should fit entirely inside of one cache line
27 * - this struct shares the supervisor stack pages
28 * - if the contents of this structure are changed, the assembly constants must also be changed
29 */
30#ifndef __ASSEMBLY__
31struct thread_info {
32 struct task_struct *task; /* main task structure */
33 struct exec_domain *exec_domain; /* execution domain */
34 unsigned long flags; /* low level flags */
35 __u32 cpu; /* current CPU */
36 int preempt_count; /* 0 => preemptable, <0 => BUG */
37 __u32 tls; /* TLS for this thread */
38
39 mm_segment_t addr_limit; /* thread address space:
40 0-0xBFFFFFFF for user-thead
41 0-0xFFFFFFFF for kernel-thread
42 */
43 struct restart_block restart_block;
44 __u8 supervisor_stack[0];
45};
46
47#endif
48
49#define PREEMPT_ACTIVE 0x10000000
50
51/*
52 * macros/functions for gaining access to the thread information structure
53 *
54 * preempt_count needs to be 1 initially, until the scheduler is functional.
55 */
56#ifndef __ASSEMBLY__
57#define INIT_THREAD_INFO(tsk) \
58{ \
59 .task = &tsk, \
60 .exec_domain = &default_exec_domain, \
61 .flags = 0, \
62 .cpu = 0, \
63 .preempt_count = 1, \
64 .addr_limit = KERNEL_DS, \
65 .restart_block = { \
66 .fn = do_no_restart_syscall, \
67 }, \
68}
69
70#define init_thread_info (init_thread_union.thread_info)
71
72/* thread information allocation */
73#define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
74#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
75
76#endif /* !__ASSEMBLY__ */
77
78/*
79 * thread information flags
80 * - these are process state flags that various assembly files may need to access
81 * - pending work-to-be-done flags are in LSW
82 * - other flags in MSW
83 */
84#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
85#define TIF_NOTIFY_RESUME 1 /* resumption notification requested */
86#define TIF_SIGPENDING 2 /* signal pending */
87#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
88#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */
89#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
90#define TIF_MEMDIE 17
91
92#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
93#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
94#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
95#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
96#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
97#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
98
99#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
100#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
101
102#endif /* __KERNEL__ */
103
104#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-cris/timex.h b/include/asm-cris/timex.h
deleted file mode 100644
index b92e0e80fe86..000000000000
--- a/include/asm-cris/timex.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-cris/timex.h
3 *
4 * CRIS architecture timex specifications
5 */
6
7#ifndef _ASM_CRIS_TIMEX_H
8#define _ASM_CRIS_TIMEX_H
9
10#include <asm/arch/timex.h>
11
12/*
13 * We don't have a cycle-counter.. but we do not support SMP anyway where this is
14 * used so it does not matter.
15 */
16
17typedef unsigned long long cycles_t;
18
19static inline cycles_t get_cycles(void)
20{
21 return 0;
22}
23
24#endif
diff --git a/include/asm-cris/tlb.h b/include/asm-cris/tlb.h
deleted file mode 100644
index 7724246a2601..000000000000
--- a/include/asm-cris/tlb.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef _CRIS_TLB_H
2#define _CRIS_TLB_H
3
4#include <linux/pagemap.h>
5
6#include <asm/arch/tlb.h>
7
8/*
9 * cris doesn't need any special per-pte or
10 * per-vma handling..
11 */
12#define tlb_start_vma(tlb, vma) do { } while (0)
13#define tlb_end_vma(tlb, vma) do { } while (0)
14#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
15
16#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
17#include <asm-generic/tlb.h>
18
19#endif
diff --git a/include/asm-cris/tlbflush.h b/include/asm-cris/tlbflush.h
deleted file mode 100644
index 20697e7ef4f2..000000000000
--- a/include/asm-cris/tlbflush.h
+++ /dev/null
@@ -1,48 +0,0 @@
1#ifndef _CRIS_TLBFLUSH_H
2#define _CRIS_TLBFLUSH_H
3
4#include <linux/mm.h>
5#include <asm/processor.h>
6#include <asm/pgtable.h>
7#include <asm/pgalloc.h>
8
9/*
10 * TLB flushing (implemented in arch/cris/mm/tlb.c):
11 *
12 * - flush_tlb() flushes the current mm struct TLBs
13 * - flush_tlb_all() flushes all processes TLBs
14 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
15 * - flush_tlb_page(vma, vmaddr) flushes one page
16 * - flush_tlb_range(mm, start, end) flushes a range of pages
17 *
18 */
19
20extern void __flush_tlb_all(void);
21extern void __flush_tlb_mm(struct mm_struct *mm);
22extern void __flush_tlb_page(struct vm_area_struct *vma,
23 unsigned long addr);
24
25#ifdef CONFIG_SMP
26extern void flush_tlb_all(void);
27extern void flush_tlb_mm(struct mm_struct *mm);
28extern void flush_tlb_page(struct vm_area_struct *vma,
29 unsigned long addr);
30#else
31#define flush_tlb_all __flush_tlb_all
32#define flush_tlb_mm __flush_tlb_mm
33#define flush_tlb_page __flush_tlb_page
34#endif
35
36static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long start, unsigned long end)
37{
38 flush_tlb_mm(vma->vm_mm);
39}
40
41static inline void flush_tlb(void)
42{
43 flush_tlb_mm(current->mm);
44}
45
46#define flush_tlb_kernel_range(start, end) flush_tlb_all()
47
48#endif /* _CRIS_TLBFLUSH_H */
diff --git a/include/asm-cris/topology.h b/include/asm-cris/topology.h
deleted file mode 100644
index 2ac613d32a89..000000000000
--- a/include/asm-cris/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_CRIS_TOPOLOGY_H
2#define _ASM_CRIS_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_CRIS_TOPOLOGY_H */
diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h
deleted file mode 100644
index 5790262cbe8a..000000000000
--- a/include/asm-cris/types.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _ETRAX_TYPES_H
2#define _ETRAX_TYPES_H
3
4#include <asm-generic/int-ll64.h>
5
6#ifndef __ASSEMBLY__
7
8typedef unsigned short umode_t;
9
10#endif /* __ASSEMBLY__ */
11
12/*
13 * These aren't exported outside the kernel to avoid name space clashes
14 */
15#ifdef __KERNEL__
16
17#define BITS_PER_LONG 32
18
19#ifndef __ASSEMBLY__
20
21/* Dma addresses are 32-bits wide, just like our other addresses. */
22
23typedef u32 dma_addr_t;
24typedef u32 dma64_addr_t;
25
26#endif /* __ASSEMBLY__ */
27
28#endif /* __KERNEL__ */
29
30#endif
diff --git a/include/asm-cris/uaccess.h b/include/asm-cris/uaccess.h
deleted file mode 100644
index ea11eaf0e922..000000000000
--- a/include/asm-cris/uaccess.h
+++ /dev/null
@@ -1,404 +0,0 @@
1/*
2 * Authors: Bjorn Wesen (bjornw@axis.com)
3 * Hans-Peter Nilsson (hp@axis.com)
4 */
5
6/* Asm:s have been tweaked (within the domain of correctness) to give
7 satisfactory results for "gcc version 2.96 20000427 (experimental)".
8
9 Check regularly...
10
11 Register $r9 is chosen for temporaries, being a call-clobbered register
12 first in line to be used (notably for local blocks), not colliding with
13 parameter registers. */
14
15#ifndef _CRIS_UACCESS_H
16#define _CRIS_UACCESS_H
17
18#ifndef __ASSEMBLY__
19#include <linux/sched.h>
20#include <linux/errno.h>
21#include <asm/processor.h>
22#include <asm/page.h>
23
24#define VERIFY_READ 0
25#define VERIFY_WRITE 1
26
27/*
28 * The fs value determines whether argument validity checking should be
29 * performed or not. If get_fs() == USER_DS, checking is performed, with
30 * get_fs() == KERNEL_DS, checking is bypassed.
31 *
32 * For historical reasons, these macros are grossly misnamed.
33 */
34
35#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
36
37/* addr_limit is the maximum accessible address for the task. we misuse
38 * the KERNEL_DS and USER_DS values to both assign and compare the
39 * addr_limit values through the equally misnamed get/set_fs macros.
40 * (see above)
41 */
42
43#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
44#define USER_DS MAKE_MM_SEG(TASK_SIZE)
45
46#define get_ds() (KERNEL_DS)
47#define get_fs() (current_thread_info()->addr_limit)
48#define set_fs(x) (current_thread_info()->addr_limit = (x))
49
50#define segment_eq(a,b) ((a).seg == (b).seg)
51
52#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
53#define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size)))
54#define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
55#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
56
57#include <asm/arch/uaccess.h>
58
59/*
60 * The exception table consists of pairs of addresses: the first is the
61 * address of an instruction that is allowed to fault, and the second is
62 * the address at which the program should continue. No registers are
63 * modified, so it is entirely up to the continuation code to figure out
64 * what to do.
65 *
66 * All the routines below use bits of fixup code that are out of line
67 * with the main instruction path. This means when everything is well,
68 * we don't even have to jump over them. Further, they do not intrude
69 * on our cache or tlb entries.
70 */
71
72struct exception_table_entry
73{
74 unsigned long insn, fixup;
75};
76
77/*
78 * These are the main single-value transfer routines. They automatically
79 * use the right size if we just have the right pointer type.
80 *
81 * This gets kind of ugly. We want to return _two_ values in "get_user()"
82 * and yet we don't want to do any pointers, because that is too much
83 * of a performance impact. Thus we have a few rather ugly macros here,
84 * and hide all the ugliness from the user.
85 *
86 * The "__xxx" versions of the user access functions are versions that
87 * do not verify the address space, that must have been done previously
88 * with a separate "access_ok()" call (this is used when we do multiple
89 * accesses to the same area of user memory).
90 *
91 * As we use the same address space for kernel and user data on
92 * CRIS, we can just do these as direct assignments. (Of course, the
93 * exception handling means that it's no longer "just"...)
94 */
95#define get_user(x,ptr) \
96 __get_user_check((x),(ptr),sizeof(*(ptr)))
97#define put_user(x,ptr) \
98 __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
99
100#define __get_user(x,ptr) \
101 __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
102#define __put_user(x,ptr) \
103 __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
104
105extern long __put_user_bad(void);
106
107#define __put_user_size(x,ptr,size,retval) \
108do { \
109 retval = 0; \
110 switch (size) { \
111 case 1: __put_user_asm(x,ptr,retval,"move.b"); break; \
112 case 2: __put_user_asm(x,ptr,retval,"move.w"); break; \
113 case 4: __put_user_asm(x,ptr,retval,"move.d"); break; \
114 case 8: __put_user_asm_64(x,ptr,retval); break; \
115 default: __put_user_bad(); \
116 } \
117} while (0)
118
119#define __get_user_size(x,ptr,size,retval) \
120do { \
121 retval = 0; \
122 switch (size) { \
123 case 1: __get_user_asm(x,ptr,retval,"move.b"); break; \
124 case 2: __get_user_asm(x,ptr,retval,"move.w"); break; \
125 case 4: __get_user_asm(x,ptr,retval,"move.d"); break; \
126 case 8: __get_user_asm_64(x,ptr,retval); break; \
127 default: (x) = __get_user_bad(); \
128 } \
129} while (0)
130
131#define __put_user_nocheck(x,ptr,size) \
132({ \
133 long __pu_err; \
134 __put_user_size((x),(ptr),(size),__pu_err); \
135 __pu_err; \
136})
137
138#define __put_user_check(x,ptr,size) \
139({ \
140 long __pu_err = -EFAULT; \
141 __typeof__(*(ptr)) *__pu_addr = (ptr); \
142 if (access_ok(VERIFY_WRITE,__pu_addr,size)) \
143 __put_user_size((x),__pu_addr,(size),__pu_err); \
144 __pu_err; \
145})
146
147struct __large_struct { unsigned long buf[100]; };
148#define __m(x) (*(struct __large_struct *)(x))
149
150
151
152#define __get_user_nocheck(x,ptr,size) \
153({ \
154 long __gu_err, __gu_val; \
155 __get_user_size(__gu_val,(ptr),(size),__gu_err); \
156 (x) = (__typeof__(*(ptr)))__gu_val; \
157 __gu_err; \
158})
159
160#define __get_user_check(x,ptr,size) \
161({ \
162 long __gu_err = -EFAULT, __gu_val = 0; \
163 const __typeof__(*(ptr)) *__gu_addr = (ptr); \
164 if (access_ok(VERIFY_READ,__gu_addr,size)) \
165 __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \
166 (x) = (__typeof__(*(ptr)))__gu_val; \
167 __gu_err; \
168})
169
170extern long __get_user_bad(void);
171
172/* More complex functions. Most are inline, but some call functions that
173 live in lib/usercopy.c */
174
175extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n);
176extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n);
177extern unsigned long __do_clear_user(void __user *to, unsigned long n);
178
179static inline unsigned long
180__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
181{
182 if (access_ok(VERIFY_WRITE, to, n))
183 return __copy_user(to,from,n);
184 return n;
185}
186
187static inline unsigned long
188__generic_copy_from_user(void *to, const void __user *from, unsigned long n)
189{
190 if (access_ok(VERIFY_READ, from, n))
191 return __copy_user_zeroing(to,from,n);
192 return n;
193}
194
195static inline unsigned long
196__generic_clear_user(void __user *to, unsigned long n)
197{
198 if (access_ok(VERIFY_WRITE, to, n))
199 return __do_clear_user(to,n);
200 return n;
201}
202
203static inline long
204__strncpy_from_user(char *dst, const char __user *src, long count)
205{
206 return __do_strncpy_from_user(dst, src, count);
207}
208
209static inline long
210strncpy_from_user(char *dst, const char __user *src, long count)
211{
212 long res = -EFAULT;
213 if (access_ok(VERIFY_READ, src, 1))
214 res = __do_strncpy_from_user(dst, src, count);
215 return res;
216}
217
218
219/* Note that these expand awfully if made into switch constructs, so
220 don't do that. */
221
222static inline unsigned long
223__constant_copy_from_user(void *to, const void __user *from, unsigned long n)
224{
225 unsigned long ret = 0;
226 if (n == 0)
227 ;
228 else if (n == 1)
229 __asm_copy_from_user_1(to, from, ret);
230 else if (n == 2)
231 __asm_copy_from_user_2(to, from, ret);
232 else if (n == 3)
233 __asm_copy_from_user_3(to, from, ret);
234 else if (n == 4)
235 __asm_copy_from_user_4(to, from, ret);
236 else if (n == 5)
237 __asm_copy_from_user_5(to, from, ret);
238 else if (n == 6)
239 __asm_copy_from_user_6(to, from, ret);
240 else if (n == 7)
241 __asm_copy_from_user_7(to, from, ret);
242 else if (n == 8)
243 __asm_copy_from_user_8(to, from, ret);
244 else if (n == 9)
245 __asm_copy_from_user_9(to, from, ret);
246 else if (n == 10)
247 __asm_copy_from_user_10(to, from, ret);
248 else if (n == 11)
249 __asm_copy_from_user_11(to, from, ret);
250 else if (n == 12)
251 __asm_copy_from_user_12(to, from, ret);
252 else if (n == 13)
253 __asm_copy_from_user_13(to, from, ret);
254 else if (n == 14)
255 __asm_copy_from_user_14(to, from, ret);
256 else if (n == 15)
257 __asm_copy_from_user_15(to, from, ret);
258 else if (n == 16)
259 __asm_copy_from_user_16(to, from, ret);
260 else if (n == 20)
261 __asm_copy_from_user_20(to, from, ret);
262 else if (n == 24)
263 __asm_copy_from_user_24(to, from, ret);
264 else
265 ret = __generic_copy_from_user(to, from, n);
266
267 return ret;
268}
269
270/* Ditto, don't make a switch out of this. */
271
272static inline unsigned long
273__constant_copy_to_user(void __user *to, const void *from, unsigned long n)
274{
275 unsigned long ret = 0;
276 if (n == 0)
277 ;
278 else if (n == 1)
279 __asm_copy_to_user_1(to, from, ret);
280 else if (n == 2)
281 __asm_copy_to_user_2(to, from, ret);
282 else if (n == 3)
283 __asm_copy_to_user_3(to, from, ret);
284 else if (n == 4)
285 __asm_copy_to_user_4(to, from, ret);
286 else if (n == 5)
287 __asm_copy_to_user_5(to, from, ret);
288 else if (n == 6)
289 __asm_copy_to_user_6(to, from, ret);
290 else if (n == 7)
291 __asm_copy_to_user_7(to, from, ret);
292 else if (n == 8)
293 __asm_copy_to_user_8(to, from, ret);
294 else if (n == 9)
295 __asm_copy_to_user_9(to, from, ret);
296 else if (n == 10)
297 __asm_copy_to_user_10(to, from, ret);
298 else if (n == 11)
299 __asm_copy_to_user_11(to, from, ret);
300 else if (n == 12)
301 __asm_copy_to_user_12(to, from, ret);
302 else if (n == 13)
303 __asm_copy_to_user_13(to, from, ret);
304 else if (n == 14)
305 __asm_copy_to_user_14(to, from, ret);
306 else if (n == 15)
307 __asm_copy_to_user_15(to, from, ret);
308 else if (n == 16)
309 __asm_copy_to_user_16(to, from, ret);
310 else if (n == 20)
311 __asm_copy_to_user_20(to, from, ret);
312 else if (n == 24)
313 __asm_copy_to_user_24(to, from, ret);
314 else
315 ret = __generic_copy_to_user(to, from, n);
316
317 return ret;
318}
319
320/* No switch, please. */
321
322static inline unsigned long
323__constant_clear_user(void __user *to, unsigned long n)
324{
325 unsigned long ret = 0;
326 if (n == 0)
327 ;
328 else if (n == 1)
329 __asm_clear_1(to, ret);
330 else if (n == 2)
331 __asm_clear_2(to, ret);
332 else if (n == 3)
333 __asm_clear_3(to, ret);
334 else if (n == 4)
335 __asm_clear_4(to, ret);
336 else if (n == 8)
337 __asm_clear_8(to, ret);
338 else if (n == 12)
339 __asm_clear_12(to, ret);
340 else if (n == 16)
341 __asm_clear_16(to, ret);
342 else if (n == 20)
343 __asm_clear_20(to, ret);
344 else if (n == 24)
345 __asm_clear_24(to, ret);
346 else
347 ret = __generic_clear_user(to, n);
348
349 return ret;
350}
351
352
353#define clear_user(to, n) \
354(__builtin_constant_p(n) ? \
355 __constant_clear_user(to, n) : \
356 __generic_clear_user(to, n))
357
358#define copy_from_user(to, from, n) \
359(__builtin_constant_p(n) ? \
360 __constant_copy_from_user(to, from, n) : \
361 __generic_copy_from_user(to, from, n))
362
363#define copy_to_user(to, from, n) \
364(__builtin_constant_p(n) ? \
365 __constant_copy_to_user(to, from, n) : \
366 __generic_copy_to_user(to, from, n))
367
368/* We let the __ versions of copy_from/to_user inline, because they're often
369 * used in fast paths and have only a small space overhead.
370 */
371
372static inline unsigned long
373__generic_copy_from_user_nocheck(void *to, const void __user *from,
374 unsigned long n)
375{
376 return __copy_user_zeroing(to,from,n);
377}
378
379static inline unsigned long
380__generic_copy_to_user_nocheck(void __user *to, const void *from,
381 unsigned long n)
382{
383 return __copy_user(to,from,n);
384}
385
386static inline unsigned long
387__generic_clear_user_nocheck(void __user *to, unsigned long n)
388{
389 return __do_clear_user(to,n);
390}
391
392/* without checking */
393
394#define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n))
395#define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n))
396#define __copy_to_user_inatomic __copy_to_user
397#define __copy_from_user_inatomic __copy_from_user
398#define __clear_user(to,n) __generic_clear_user_nocheck((to),(n))
399
400#define strlen_user(str) strnlen_user((str), 0x7ffffffe)
401
402#endif /* __ASSEMBLY__ */
403
404#endif /* _CRIS_UACCESS_H */
diff --git a/include/asm-cris/ucontext.h b/include/asm-cris/ucontext.h
deleted file mode 100644
index eed6ad5eb3f2..000000000000
--- a/include/asm-cris/ucontext.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_CRIS_UCONTEXT_H
2#define _ASM_CRIS_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif /* !_ASM_CRIS_UCONTEXT_H */
diff --git a/include/asm-cris/unaligned.h b/include/asm-cris/unaligned.h
deleted file mode 100644
index 7b3f3fec567c..000000000000
--- a/include/asm-cris/unaligned.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ASM_CRIS_UNALIGNED_H
2#define _ASM_CRIS_UNALIGNED_H
3
4/*
5 * CRIS can do unaligned accesses itself.
6 */
7#include <linux/unaligned/access_ok.h>
8#include <linux/unaligned/generic.h>
9
10#define get_unaligned __get_unaligned_le
11#define put_unaligned __put_unaligned_le
12
13#endif /* _ASM_CRIS_UNALIGNED_H */
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
deleted file mode 100644
index 76398ef87e9b..000000000000
--- a/include/asm-cris/unistd.h
+++ /dev/null
@@ -1,374 +0,0 @@
1#ifndef _ASM_CRIS_UNISTD_H_
2#define _ASM_CRIS_UNISTD_H_
3
4/*
5 * This file contains the system call numbers, and stub macros for libc.
6 */
7
8#define __NR_restart_syscall 0
9#define __NR_exit 1
10#define __NR_fork 2
11#define __NR_read 3
12#define __NR_write 4
13#define __NR_open 5
14#define __NR_close 6
15#define __NR_waitpid 7
16#define __NR_creat 8
17#define __NR_link 9
18#define __NR_unlink 10
19#define __NR_execve 11
20#define __NR_chdir 12
21#define __NR_time 13
22#define __NR_mknod 14
23#define __NR_chmod 15
24#define __NR_lchown 16
25#define __NR_break 17
26#define __NR_oldstat 18
27#define __NR_lseek 19
28#define __NR_getpid 20
29#define __NR_mount 21
30#define __NR_umount 22
31#define __NR_setuid 23
32#define __NR_getuid 24
33#define __NR_stime 25
34#define __NR_ptrace 26
35#define __NR_alarm 27
36#define __NR_oldfstat 28
37#define __NR_pause 29
38#define __NR_utime 30
39#define __NR_stty 31
40#define __NR_gtty 32
41#define __NR_access 33
42#define __NR_nice 34
43#define __NR_ftime 35
44#define __NR_sync 36
45#define __NR_kill 37
46#define __NR_rename 38
47#define __NR_mkdir 39
48#define __NR_rmdir 40
49#define __NR_dup 41
50#define __NR_pipe 42
51#define __NR_times 43
52#define __NR_prof 44
53#define __NR_brk 45
54#define __NR_setgid 46
55#define __NR_getgid 47
56#define __NR_signal 48
57#define __NR_geteuid 49
58#define __NR_getegid 50
59#define __NR_acct 51
60#define __NR_umount2 52
61#define __NR_lock 53
62#define __NR_ioctl 54
63#define __NR_fcntl 55
64#define __NR_mpx 56
65#define __NR_setpgid 57
66#define __NR_ulimit 58
67#define __NR_oldolduname 59
68#define __NR_umask 60
69#define __NR_chroot 61
70#define __NR_ustat 62
71#define __NR_dup2 63
72#define __NR_getppid 64
73#define __NR_getpgrp 65
74#define __NR_setsid 66
75#define __NR_sigaction 67
76#define __NR_sgetmask 68
77#define __NR_ssetmask 69
78#define __NR_setreuid 70
79#define __NR_setregid 71
80#define __NR_sigsuspend 72
81#define __NR_sigpending 73
82#define __NR_sethostname 74
83#define __NR_setrlimit 75
84#define __NR_getrlimit 76
85#define __NR_getrusage 77
86#define __NR_gettimeofday 78
87#define __NR_settimeofday 79
88#define __NR_getgroups 80
89#define __NR_setgroups 81
90#define __NR_select 82
91#define __NR_symlink 83
92#define __NR_oldlstat 84
93#define __NR_readlink 85
94#define __NR_uselib 86
95#define __NR_swapon 87
96#define __NR_reboot 88
97#define __NR_readdir 89
98#define __NR_mmap 90
99#define __NR_munmap 91
100#define __NR_truncate 92
101#define __NR_ftruncate 93
102#define __NR_fchmod 94
103#define __NR_fchown 95
104#define __NR_getpriority 96
105#define __NR_setpriority 97
106#define __NR_profil 98
107#define __NR_statfs 99
108#define __NR_fstatfs 100
109#define __NR_ioperm 101
110#define __NR_socketcall 102
111#define __NR_syslog 103
112#define __NR_setitimer 104
113#define __NR_getitimer 105
114#define __NR_stat 106
115#define __NR_lstat 107
116#define __NR_fstat 108
117#define __NR_olduname 109
118#define __NR_iopl 110
119#define __NR_vhangup 111
120#define __NR_idle 112
121#define __NR_vm86 113
122#define __NR_wait4 114
123#define __NR_swapoff 115
124#define __NR_sysinfo 116
125#define __NR_ipc 117
126#define __NR_fsync 118
127#define __NR_sigreturn 119
128#define __NR_clone 120
129#define __NR_setdomainname 121
130#define __NR_uname 122
131#define __NR_modify_ldt 123
132#define __NR_adjtimex 124
133#define __NR_mprotect 125
134#define __NR_sigprocmask 126
135#define __NR_create_module 127
136#define __NR_init_module 128
137#define __NR_delete_module 129
138#define __NR_get_kernel_syms 130
139#define __NR_quotactl 131
140#define __NR_getpgid 132
141#define __NR_fchdir 133
142#define __NR_bdflush 134
143#define __NR_sysfs 135
144#define __NR_personality 136
145#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
146#define __NR_setfsuid 138
147#define __NR_setfsgid 139
148#define __NR__llseek 140
149#define __NR_getdents 141
150#define __NR__newselect 142
151#define __NR_flock 143
152#define __NR_msync 144
153#define __NR_readv 145
154#define __NR_writev 146
155#define __NR_getsid 147
156#define __NR_fdatasync 148
157#define __NR__sysctl 149
158#define __NR_mlock 150
159#define __NR_munlock 151
160#define __NR_mlockall 152
161#define __NR_munlockall 153
162#define __NR_sched_setparam 154
163#define __NR_sched_getparam 155
164#define __NR_sched_setscheduler 156
165#define __NR_sched_getscheduler 157
166#define __NR_sched_yield 158
167#define __NR_sched_get_priority_max 159
168#define __NR_sched_get_priority_min 160
169#define __NR_sched_rr_get_interval 161
170#define __NR_nanosleep 162
171#define __NR_mremap 163
172#define __NR_setresuid 164
173#define __NR_getresuid 165
174
175#define __NR_query_module 167
176#define __NR_poll 168
177#define __NR_nfsservctl 169
178#define __NR_setresgid 170
179#define __NR_getresgid 171
180#define __NR_prctl 172
181#define __NR_rt_sigreturn 173
182#define __NR_rt_sigaction 174
183#define __NR_rt_sigprocmask 175
184#define __NR_rt_sigpending 176
185#define __NR_rt_sigtimedwait 177
186#define __NR_rt_sigqueueinfo 178
187#define __NR_rt_sigsuspend 179
188#define __NR_pread64 180
189#define __NR_pwrite64 181
190#define __NR_chown 182
191#define __NR_getcwd 183
192#define __NR_capget 184
193#define __NR_capset 185
194#define __NR_sigaltstack 186
195#define __NR_sendfile 187
196#define __NR_getpmsg 188 /* some people actually want streams */
197#define __NR_putpmsg 189 /* some people actually want streams */
198#define __NR_vfork 190
199#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */
200#define __NR_mmap2 192
201#define __NR_truncate64 193
202#define __NR_ftruncate64 194
203#define __NR_stat64 195
204#define __NR_lstat64 196
205#define __NR_fstat64 197
206#define __NR_lchown32 198
207#define __NR_getuid32 199
208#define __NR_getgid32 200
209#define __NR_geteuid32 201
210#define __NR_getegid32 202
211#define __NR_setreuid32 203
212#define __NR_setregid32 204
213#define __NR_getgroups32 205
214#define __NR_setgroups32 206
215#define __NR_fchown32 207
216#define __NR_setresuid32 208
217#define __NR_getresuid32 209
218#define __NR_setresgid32 210
219#define __NR_getresgid32 211
220#define __NR_chown32 212
221#define __NR_setuid32 213
222#define __NR_setgid32 214
223#define __NR_setfsuid32 215
224#define __NR_setfsgid32 216
225#define __NR_pivot_root 217
226#define __NR_mincore 218
227#define __NR_madvise 219
228#define __NR_getdents64 220
229#define __NR_fcntl64 221
230/* 223 is unused */
231#define __NR_gettid 224
232#define __NR_readahead 225
233#define __NR_setxattr 226
234#define __NR_lsetxattr 227
235#define __NR_fsetxattr 228
236#define __NR_getxattr 229
237#define __NR_lgetxattr 230
238#define __NR_fgetxattr 231
239#define __NR_listxattr 232
240#define __NR_llistxattr 233
241#define __NR_flistxattr 234
242#define __NR_removexattr 235
243#define __NR_lremovexattr 236
244#define __NR_fremovexattr 237
245#define __NR_tkill 238
246#define __NR_sendfile64 239
247#define __NR_futex 240
248#define __NR_sched_setaffinity 241
249#define __NR_sched_getaffinity 242
250#define __NR_set_thread_area 243
251#define __NR_get_thread_area 244
252#define __NR_io_setup 245
253#define __NR_io_destroy 246
254#define __NR_io_getevents 247
255#define __NR_io_submit 248
256#define __NR_io_cancel 249
257#define __NR_fadvise64 250
258/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */
259#define __NR_exit_group 252
260#define __NR_lookup_dcookie 253
261#define __NR_epoll_create 254
262#define __NR_epoll_ctl 255
263#define __NR_epoll_wait 256
264#define __NR_remap_file_pages 257
265#define __NR_set_tid_address 258
266#define __NR_timer_create 259
267#define __NR_timer_settime (__NR_timer_create+1)
268#define __NR_timer_gettime (__NR_timer_create+2)
269#define __NR_timer_getoverrun (__NR_timer_create+3)
270#define __NR_timer_delete (__NR_timer_create+4)
271#define __NR_clock_settime (__NR_timer_create+5)
272#define __NR_clock_gettime (__NR_timer_create+6)
273#define __NR_clock_getres (__NR_timer_create+7)
274#define __NR_clock_nanosleep (__NR_timer_create+8)
275#define __NR_statfs64 268
276#define __NR_fstatfs64 269
277#define __NR_tgkill 270
278#define __NR_utimes 271
279#define __NR_fadvise64_64 272
280#define __NR_vserver 273
281#define __NR_mbind 274
282#define __NR_get_mempolicy 275
283#define __NR_set_mempolicy 276
284#define __NR_mq_open 277
285#define __NR_mq_unlink (__NR_mq_open+1)
286#define __NR_mq_timedsend (__NR_mq_open+2)
287#define __NR_mq_timedreceive (__NR_mq_open+3)
288#define __NR_mq_notify (__NR_mq_open+4)
289#define __NR_mq_getsetattr (__NR_mq_open+5)
290#define __NR_kexec_load 283
291#define __NR_waitid 284
292/* #define __NR_sys_setaltroot 285 */
293#define __NR_add_key 286
294#define __NR_request_key 287
295#define __NR_keyctl 288
296#define __NR_ioprio_set 289
297#define __NR_ioprio_get 290
298#define __NR_inotify_init 291
299#define __NR_inotify_add_watch 292
300#define __NR_inotify_rm_watch 293
301#define __NR_migrate_pages 294
302#define __NR_openat 295
303#define __NR_mkdirat 296
304#define __NR_mknodat 297
305#define __NR_fchownat 298
306#define __NR_futimesat 299
307#define __NR_fstatat64 300
308#define __NR_unlinkat 301
309#define __NR_renameat 302
310#define __NR_linkat 303
311#define __NR_symlinkat 304
312#define __NR_readlinkat 305
313#define __NR_fchmodat 306
314#define __NR_faccessat 307
315#define __NR_pselect6 308
316#define __NR_ppoll 309
317#define __NR_unshare 310
318#define __NR_set_robust_list 311
319#define __NR_get_robust_list 312
320#define __NR_splice 313
321#define __NR_sync_file_range 314
322#define __NR_tee 315
323#define __NR_vmsplice 316
324#define __NR_move_pages 317
325#define __NR_getcpu 318
326#define __NR_epoll_pwait 319
327#define __NR_utimensat 320
328#define __NR_signalfd 321
329#define __NR_timerfd_create 322
330#define __NR_eventfd 323
331#define __NR_fallocate 324
332#define __NR_timerfd_settime 325
333#define __NR_timerfd_gettime 326
334
335#ifdef __KERNEL__
336
337#define NR_syscalls 327
338
339#include <asm/arch/unistd.h>
340
341#define __ARCH_WANT_IPC_PARSE_VERSION
342#define __ARCH_WANT_OLD_READDIR
343#define __ARCH_WANT_OLD_STAT
344#define __ARCH_WANT_STAT64
345#define __ARCH_WANT_SYS_ALARM
346#define __ARCH_WANT_SYS_GETHOSTNAME
347#define __ARCH_WANT_SYS_PAUSE
348#define __ARCH_WANT_SYS_SGETMASK
349#define __ARCH_WANT_SYS_SIGNAL
350#define __ARCH_WANT_SYS_TIME
351#define __ARCH_WANT_SYS_UTIME
352#define __ARCH_WANT_SYS_WAITPID
353#define __ARCH_WANT_SYS_SOCKETCALL
354#define __ARCH_WANT_SYS_FADVISE64
355#define __ARCH_WANT_SYS_GETPGRP
356#define __ARCH_WANT_SYS_LLSEEK
357#define __ARCH_WANT_SYS_NICE
358#define __ARCH_WANT_SYS_OLD_GETRLIMIT
359#define __ARCH_WANT_SYS_OLDUMOUNT
360#define __ARCH_WANT_SYS_SIGPENDING
361#define __ARCH_WANT_SYS_SIGPROCMASK
362#define __ARCH_WANT_SYS_RT_SIGACTION
363#define __ARCH_WANT_SYS_RT_SIGSUSPEND
364
365/*
366 * "Conditional" syscalls
367 *
368 * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
369 * but it doesn't work on all toolchains, so we just do it by hand
370 */
371#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
372
373#endif /* __KERNEL__ */
374#endif /* _ASM_CRIS_UNISTD_H_ */
diff --git a/include/asm-cris/user.h b/include/asm-cris/user.h
deleted file mode 100644
index 73e60fcbcf38..000000000000
--- a/include/asm-cris/user.h
+++ /dev/null
@@ -1,52 +0,0 @@
1#ifndef __ASM_CRIS_USER_H
2#define __ASM_CRIS_USER_H
3
4#include <linux/types.h>
5#include <asm/ptrace.h>
6#include <asm/page.h>
7#include <asm/arch/user.h>
8
9/*
10 * Core file format: The core file is written in such a way that gdb
11 * can understand it and provide useful information to the user (under
12 * linux we use the `trad-core' bfd). The file contents are as follows:
13 *
14 * upage: 1 page consisting of a user struct that tells gdb
15 * what is present in the file. Directly after this is a
16 * copy of the task_struct, which is currently not used by gdb,
17 * but it may come in handy at some point. All of the registers
18 * are stored as part of the upage. The upage should always be
19 * only one page long.
20 * data: The data segment follows next. We use current->end_text to
21 * current->brk to pick up all of the user variables, plus any memory
22 * that may have been sbrk'ed. No attempt is made to determine if a
23 * page is demand-zero or if a page is totally unused, we just cover
24 * the entire range. All of the addresses are rounded in such a way
25 * that an integral number of pages is written.
26 * stack: We need the stack information in order to get a meaningful
27 * backtrace. We need to write the data from usp to
28 * current->start_stack, so we round each of these in order to be able
29 * to write an integer number of pages.
30 */
31
32struct user {
33 struct user_regs_struct regs; /* entire machine state */
34 size_t u_tsize; /* text size (pages) */
35 size_t u_dsize; /* data size (pages) */
36 size_t u_ssize; /* stack size (pages) */
37 unsigned long start_code; /* text starting address */
38 unsigned long start_data; /* data starting address */
39 unsigned long start_stack; /* stack starting address */
40 long int signal; /* signal causing core dump */
41 unsigned long u_ar0; /* help gdb find registers */
42 unsigned long magic; /* identifies a core file */
43 char u_comm[32]; /* user command name */
44};
45
46#define NBPG PAGE_SIZE
47#define UPAGES 1
48#define HOST_TEXT_START_ADDR (u.start_code)
49#define HOST_DATA_START_ADDR (u.start_data)
50#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
51
52#endif /* __ASM_CRIS_USER_H */
diff --git a/include/asm-frv/elf.h b/include/asm-frv/elf.h
index 9fb946bb7dc9..7279ec07d62e 100644
--- a/include/asm-frv/elf.h
+++ b/include/asm-frv/elf.h
@@ -137,6 +137,6 @@ do { \
137 137
138#define ELF_PLATFORM (NULL) 138#define ELF_PLATFORM (NULL)
139 139
140#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 140#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
141 141
142#endif 142#endif
diff --git a/include/asm-frv/ide.h b/include/asm-frv/ide.h
index 7ebcc56a2229..361076611855 100644
--- a/include/asm-frv/ide.h
+++ b/include/asm-frv/ide.h
@@ -18,15 +18,7 @@
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/irq.h> 19#include <asm/irq.h>
20 20
21/****************************************************************************/ 21#include <asm-generic/ide_iops.h>
22/*
23 * some bits needed for parts of the IDE subsystem to compile
24 */
25#define __ide_mm_insw(port, addr, n) insw((unsigned long) (port), addr, n)
26#define __ide_mm_insl(port, addr, n) insl((unsigned long) (port), addr, n)
27#define __ide_mm_outsw(port, addr, n) outsw((unsigned long) (port), addr, n)
28#define __ide_mm_outsl(port, addr, n) outsl((unsigned long) (port), addr, n)
29
30 22
31#endif /* __KERNEL__ */ 23#endif /* __KERNEL__ */
32#endif /* _ASM_IDE_H */ 24#endif /* _ASM_IDE_H */
diff --git a/include/asm-frv/unaligned.h b/include/asm-frv/unaligned.h
index 839a2fbffa0f..6c61c05b2e0c 100644
--- a/include/asm-frv/unaligned.h
+++ b/include/asm-frv/unaligned.h
@@ -13,7 +13,7 @@
13#define _ASM_UNALIGNED_H 13#define _ASM_UNALIGNED_H
14 14
15#include <linux/unaligned/le_byteshift.h> 15#include <linux/unaligned/le_byteshift.h>
16#include <linux/unaligned/be_byteshift.h> 16#include <linux/unaligned/be_struct.h>
17#include <linux/unaligned/generic.h> 17#include <linux/unaligned/generic.h>
18 18
19#define get_unaligned __get_unaligned_be 19#define get_unaligned __get_unaligned_be
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index 4ec0a296bdec..7abdaa91ccd3 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -251,7 +251,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
251#define atomic_long_cmpxchg(l, old, new) \ 251#define atomic_long_cmpxchg(l, old, new) \
252 (atomic_cmpxchg((atomic_t *)(l), (old), (new))) 252 (atomic_cmpxchg((atomic_t *)(l), (old), (new)))
253#define atomic_long_xchg(v, new) \ 253#define atomic_long_xchg(v, new) \
254 (atomic_xchg((atomic_t *)(l), (new))) 254 (atomic_xchg((atomic_t *)(v), (new)))
255 255
256#endif /* BITS_PER_LONG == 64 */ 256#endif /* BITS_PER_LONG == 64 */
257 257
diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h
index f10d367fb2a5..c5f1c2c920e2 100644
--- a/include/asm-generic/audit_write.h
+++ b/include/asm-generic/audit_write.h
@@ -1,6 +1,8 @@
1#include <asm-generic/audit_dir_write.h> 1#include <asm-generic/audit_dir_write.h>
2__NR_acct, 2__NR_acct,
3#ifdef __NR_swapon
3__NR_swapon, 4__NR_swapon,
5#endif
4__NR_quotactl, 6__NR_quotactl,
5__NR_truncate, 7__NR_truncate,
6#ifdef __NR_truncate64 8#ifdef __NR_truncate64
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index edc6ba82e090..8af276361bf2 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -8,9 +8,17 @@
8#ifdef CONFIG_GENERIC_BUG 8#ifdef CONFIG_GENERIC_BUG
9#ifndef __ASSEMBLY__ 9#ifndef __ASSEMBLY__
10struct bug_entry { 10struct bug_entry {
11#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
11 unsigned long bug_addr; 12 unsigned long bug_addr;
13#else
14 signed int bug_addr_disp;
15#endif
12#ifdef CONFIG_DEBUG_BUGVERBOSE 16#ifdef CONFIG_DEBUG_BUGVERBOSE
17#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
13 const char *file; 18 const char *file;
19#else
20 signed int file_disp;
21#endif
14 unsigned short line; 22 unsigned short line;
15#endif 23#endif
16 unsigned short flags; 24 unsigned short flags;
@@ -22,7 +30,7 @@ struct bug_entry {
22 30
23#ifndef HAVE_ARCH_BUG 31#ifndef HAVE_ARCH_BUG
24#define BUG() do { \ 32#define BUG() do { \
25 printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ 33 printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
26 panic("BUG!"); \ 34 panic("BUG!"); \
27} while (0) 35} while (0)
28#endif 36#endif
@@ -33,15 +41,14 @@ struct bug_entry {
33 41
34#ifndef __WARN 42#ifndef __WARN
35#ifndef __ASSEMBLY__ 43#ifndef __ASSEMBLY__
36extern void warn_on_slowpath(const char *file, const int line);
37extern void warn_slowpath(const char *file, const int line, 44extern void warn_slowpath(const char *file, const int line,
38 const char *fmt, ...) __attribute__((format(printf, 3, 4))); 45 const char *fmt, ...) __attribute__((format(printf, 3, 4)));
39#define WANT_WARN_ON_SLOWPATH 46#define WANT_WARN_ON_SLOWPATH
40#endif 47#endif
41#define __WARN() warn_on_slowpath(__FILE__, __LINE__) 48#define __WARN() warn_slowpath(__FILE__, __LINE__, NULL)
42#define __WARN_printf(arg...) warn_slowpath(__FILE__, __LINE__, arg) 49#define __WARN_printf(arg...) warn_slowpath(__FILE__, __LINE__, arg)
43#else 50#else
44#define __WARN_printf(arg...) __WARN() 51#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)
45#endif 52#endif
46 53
47#ifndef WARN_ON 54#ifndef WARN_ON
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 0f99ad38b012..81797ec9ab29 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -35,11 +35,17 @@ struct module;
35 * @label: for diagnostics 35 * @label: for diagnostics
36 * @dev: optional device providing the GPIOs 36 * @dev: optional device providing the GPIOs
37 * @owner: helps prevent removal of modules exporting active GPIOs 37 * @owner: helps prevent removal of modules exporting active GPIOs
38 * @request: optional hook for chip-specific activation, such as
39 * enabling module power and clock; may sleep
40 * @free: optional hook for chip-specific deactivation, such as
41 * disabling module power and clock; may sleep
38 * @direction_input: configures signal "offset" as input, or returns error 42 * @direction_input: configures signal "offset" as input, or returns error
39 * @get: returns value for signal "offset"; for output signals this 43 * @get: returns value for signal "offset"; for output signals this
40 * returns either the value actually sensed, or zero 44 * returns either the value actually sensed, or zero
41 * @direction_output: configures signal "offset" as output, or returns error 45 * @direction_output: configures signal "offset" as output, or returns error
42 * @set: assigns output value for signal "offset" 46 * @set: assigns output value for signal "offset"
47 * @to_irq: optional hook supporting non-static gpio_to_irq() mappings;
48 * implementation may not sleep
43 * @dbg_show: optional routine to show contents in debugfs; default code 49 * @dbg_show: optional routine to show contents in debugfs; default code
44 * will be used when this is omitted, but custom code can show extra 50 * will be used when this is omitted, but custom code can show extra
45 * state (such as pullup/pulldown configuration). 51 * state (such as pullup/pulldown configuration).
@@ -61,10 +67,15 @@ struct module;
61 * is calculated by subtracting @base from the gpio number. 67 * is calculated by subtracting @base from the gpio number.
62 */ 68 */
63struct gpio_chip { 69struct gpio_chip {
64 char *label; 70 const char *label;
65 struct device *dev; 71 struct device *dev;
66 struct module *owner; 72 struct module *owner;
67 73
74 int (*request)(struct gpio_chip *chip,
75 unsigned offset);
76 void (*free)(struct gpio_chip *chip,
77 unsigned offset);
78
68 int (*direction_input)(struct gpio_chip *chip, 79 int (*direction_input)(struct gpio_chip *chip,
69 unsigned offset); 80 unsigned offset);
70 int (*get)(struct gpio_chip *chip, 81 int (*get)(struct gpio_chip *chip,
@@ -73,6 +84,10 @@ struct gpio_chip {
73 unsigned offset, int value); 84 unsigned offset, int value);
74 void (*set)(struct gpio_chip *chip, 85 void (*set)(struct gpio_chip *chip,
75 unsigned offset, int value); 86 unsigned offset, int value);
87
88 int (*to_irq)(struct gpio_chip *chip,
89 unsigned offset);
90
76 void (*dbg_show)(struct seq_file *s, 91 void (*dbg_show)(struct seq_file *s,
77 struct gpio_chip *chip); 92 struct gpio_chip *chip);
78 int base; 93 int base;
@@ -112,6 +127,7 @@ extern void __gpio_set_value(unsigned gpio, int value);
112 127
113extern int __gpio_cansleep(unsigned gpio); 128extern int __gpio_cansleep(unsigned gpio);
114 129
130extern int __gpio_to_irq(unsigned gpio);
115 131
116#ifdef CONFIG_GPIO_SYSFS 132#ifdef CONFIG_GPIO_SYSFS
117 133
diff --git a/include/asm-generic/kdebug.h b/include/asm-generic/kdebug.h
index 2b799c90b2d4..11e57b6a85fc 100644
--- a/include/asm-generic/kdebug.h
+++ b/include/asm-generic/kdebug.h
@@ -3,6 +3,7 @@
3 3
4enum die_val { 4enum die_val {
5 DIE_UNUSED, 5 DIE_UNUSED,
6 DIE_OOPS=1
6}; 7};
7 8
8#endif /* _ASM_GENERIC_KDEBUG_H */ 9#endif /* _ASM_GENERIC_KDEBUG_H */
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h
index ae060c62aff1..36fa286adad5 100644
--- a/include/asm-generic/memory_model.h
+++ b/include/asm-generic/memory_model.h
@@ -34,7 +34,7 @@
34 34
35#define __pfn_to_page(pfn) \ 35#define __pfn_to_page(pfn) \
36({ unsigned long __pfn = (pfn); \ 36({ unsigned long __pfn = (pfn); \
37 unsigned long __nid = arch_pfn_to_nid(pfn); \ 37 unsigned long __nid = arch_pfn_to_nid(__pfn); \
38 NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\ 38 NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\
39}) 39})
40 40
@@ -49,7 +49,7 @@
49 49
50/* memmap is virtually contigious. */ 50/* memmap is virtually contigious. */
51#define __pfn_to_page(pfn) (vmemmap + (pfn)) 51#define __pfn_to_page(pfn) (vmemmap + (pfn))
52#define __page_to_pfn(page) ((page) - vmemmap) 52#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
53 53
54#elif defined(CONFIG_SPARSEMEM) 54#elif defined(CONFIG_SPARSEMEM)
55/* 55/*
diff --git a/include/asm-generic/mutex-dec.h b/include/asm-generic/mutex-dec.h
index ed108be6743f..f104af7cf437 100644
--- a/include/asm-generic/mutex-dec.h
+++ b/include/asm-generic/mutex-dec.h
@@ -22,8 +22,6 @@ __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
22{ 22{
23 if (unlikely(atomic_dec_return(count) < 0)) 23 if (unlikely(atomic_dec_return(count) < 0))
24 fail_fn(count); 24 fail_fn(count);
25 else
26 smp_mb();
27} 25}
28 26
29/** 27/**
@@ -41,10 +39,7 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
41{ 39{
42 if (unlikely(atomic_dec_return(count) < 0)) 40 if (unlikely(atomic_dec_return(count) < 0))
43 return fail_fn(count); 41 return fail_fn(count);
44 else { 42 return 0;
45 smp_mb();
46 return 0;
47 }
48} 43}
49 44
50/** 45/**
@@ -63,7 +58,6 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
63static inline void 58static inline void
64__mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) 59__mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
65{ 60{
66 smp_mb();
67 if (unlikely(atomic_inc_return(count) <= 0)) 61 if (unlikely(atomic_inc_return(count) <= 0))
68 fail_fn(count); 62 fail_fn(count);
69} 63}
@@ -88,25 +82,9 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
88static inline int 82static inline int
89__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) 83__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
90{ 84{
91 /* 85 if (likely(atomic_cmpxchg(count, 1, 0) == 1))
92 * We have two variants here. The cmpxchg based one is the best one
93 * because it never induce a false contention state. It is included
94 * here because architectures using the inc/dec algorithms over the
95 * xchg ones are much more likely to support cmpxchg natively.
96 *
97 * If not we fall back to the spinlock based variant - that is
98 * just as efficient (and simpler) as a 'destructive' probing of
99 * the mutex state would be.
100 */
101#ifdef __HAVE_ARCH_CMPXCHG
102 if (likely(atomic_cmpxchg(count, 1, 0) == 1)) {
103 smp_mb();
104 return 1; 86 return 1;
105 }
106 return 0; 87 return 0;
107#else
108 return fail_fn(count);
109#endif
110} 88}
111 89
112#endif 90#endif
diff --git a/include/asm-generic/mutex-xchg.h b/include/asm-generic/mutex-xchg.h
index 7b9cd2cbfebe..580a6d35c700 100644
--- a/include/asm-generic/mutex-xchg.h
+++ b/include/asm-generic/mutex-xchg.h
@@ -27,8 +27,6 @@ __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
27{ 27{
28 if (unlikely(atomic_xchg(count, 0) != 1)) 28 if (unlikely(atomic_xchg(count, 0) != 1))
29 fail_fn(count); 29 fail_fn(count);
30 else
31 smp_mb();
32} 30}
33 31
34/** 32/**
@@ -46,10 +44,7 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
46{ 44{
47 if (unlikely(atomic_xchg(count, 0) != 1)) 45 if (unlikely(atomic_xchg(count, 0) != 1))
48 return fail_fn(count); 46 return fail_fn(count);
49 else { 47 return 0;
50 smp_mb();
51 return 0;
52 }
53} 48}
54 49
55/** 50/**
@@ -67,7 +62,6 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
67static inline void 62static inline void
68__mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) 63__mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
69{ 64{
70 smp_mb();
71 if (unlikely(atomic_xchg(count, 1) != 0)) 65 if (unlikely(atomic_xchg(count, 1) != 0))
72 fail_fn(count); 66 fail_fn(count);
73} 67}
@@ -110,7 +104,6 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
110 if (prev < 0) 104 if (prev < 0)
111 prev = 0; 105 prev = 0;
112 } 106 }
113 smp_mb();
114 107
115 return prev; 108 return prev;
116} 109}
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index ef87f889ef62..72ebe91005a8 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -129,6 +129,10 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres
129#define move_pte(pte, prot, old_addr, new_addr) (pte) 129#define move_pte(pte, prot, old_addr, new_addr) (pte)
130#endif 130#endif
131 131
132#ifndef pgprot_writecombine
133#define pgprot_writecombine pgprot_noncached
134#endif
135
132/* 136/*
133 * When walking page tables, get the address of the next boundary, 137 * When walking page tables, get the address of the next boundary,
134 * or the end address of the range if that comes earlier. Although no 138 * or the end address of the range if that comes earlier. Although no
@@ -289,6 +293,52 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
289#define arch_flush_lazy_cpu_mode() do {} while (0) 293#define arch_flush_lazy_cpu_mode() do {} while (0)
290#endif 294#endif
291 295
296#ifndef __HAVE_PFNMAP_TRACKING
297/*
298 * Interface that can be used by architecture code to keep track of
299 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
300 *
301 * track_pfn_vma_new is called when a _new_ pfn mapping is being established
302 * for physical range indicated by pfn and size.
303 */
304static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
305 unsigned long pfn, unsigned long size)
306{
307 return 0;
308}
309
310/*
311 * Interface that can be used by architecture code to keep track of
312 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
313 *
314 * track_pfn_vma_copy is called when vma that is covering the pfnmap gets
315 * copied through copy_page_range().
316 */
317static inline int track_pfn_vma_copy(struct vm_area_struct *vma)
318{
319 return 0;
320}
321
322/*
323 * Interface that can be used by architecture code to keep track of
324 * memory type of pfn mappings (remap_pfn_range, vm_insert_pfn)
325 *
326 * untrack_pfn_vma is called while unmapping a pfnmap for a region.
327 * untrack can be called for a specific region indicated by pfn and size or
328 * can be for the entire vma (in which case size can be zero).
329 */
330static inline void untrack_pfn_vma(struct vm_area_struct *vma,
331 unsigned long pfn, unsigned long size)
332{
333}
334#else
335extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot,
336 unsigned long pfn, unsigned long size);
337extern int track_pfn_vma_copy(struct vm_area_struct *vma);
338extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
339 unsigned long size);
340#endif
341
292#endif /* !__ASSEMBLY__ */ 342#endif /* !__ASSEMBLY__ */
293 343
294#endif /* _ASM_GENERIC_PGTABLE_H */ 344#endif /* _ASM_GENERIC_PGTABLE_H */
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h
index 71ef3f0b9685..89061c1a67d4 100644
--- a/include/asm-generic/rtc.h
+++ b/include/asm-generic/rtc.h
@@ -84,12 +84,12 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
84 84
85 if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 85 if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
86 { 86 {
87 BCD_TO_BIN(time->tm_sec); 87 time->tm_sec = bcd2bin(time->tm_sec);
88 BCD_TO_BIN(time->tm_min); 88 time->tm_min = bcd2bin(time->tm_min);
89 BCD_TO_BIN(time->tm_hour); 89 time->tm_hour = bcd2bin(time->tm_hour);
90 BCD_TO_BIN(time->tm_mday); 90 time->tm_mday = bcd2bin(time->tm_mday);
91 BCD_TO_BIN(time->tm_mon); 91 time->tm_mon = bcd2bin(time->tm_mon);
92 BCD_TO_BIN(time->tm_year); 92 time->tm_year = bcd2bin(time->tm_year);
93 } 93 }
94 94
95#ifdef CONFIG_MACH_DECSTATION 95#ifdef CONFIG_MACH_DECSTATION
@@ -159,12 +159,12 @@ static inline int set_rtc_time(struct rtc_time *time)
159 159
160 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) 160 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY)
161 || RTC_ALWAYS_BCD) { 161 || RTC_ALWAYS_BCD) {
162 BIN_TO_BCD(sec); 162 sec = bin2bcd(sec);
163 BIN_TO_BCD(min); 163 min = bin2bcd(min);
164 BIN_TO_BCD(hrs); 164 hrs = bin2bcd(hrs);
165 BIN_TO_BCD(day); 165 day = bin2bcd(day);
166 BIN_TO_BCD(mon); 166 mon = bin2bcd(mon);
167 BIN_TO_BCD(yrs); 167 yrs = bin2bcd(yrs);
168 } 168 }
169 169
170 save_control = CMOS_READ(RTC_CONTROL); 170 save_control = CMOS_READ(RTC_CONTROL);
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 7440a0dceddb..c61fab1dd2f8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -37,6 +37,29 @@
37#define MEM_DISCARD(sec) *(.mem##sec) 37#define MEM_DISCARD(sec) *(.mem##sec)
38#endif 38#endif
39 39
40#ifdef CONFIG_FTRACE_MCOUNT_RECORD
41#define MCOUNT_REC() VMLINUX_SYMBOL(__start_mcount_loc) = .; \
42 *(__mcount_loc) \
43 VMLINUX_SYMBOL(__stop_mcount_loc) = .;
44#else
45#define MCOUNT_REC()
46#endif
47
48#ifdef CONFIG_TRACE_BRANCH_PROFILING
49#define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
50 *(_ftrace_annotated_branch) \
51 VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
52#else
53#define LIKELY_PROFILE()
54#endif
55
56#ifdef CONFIG_PROFILE_ALL_BRANCHES
57#define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \
58 *(_ftrace_branch) \
59 VMLINUX_SYMBOL(__stop_branch_profile) = .;
60#else
61#define BRANCH_PROFILE()
62#endif
40 63
41/* .data section */ 64/* .data section */
42#define DATA_DATA \ 65#define DATA_DATA \
@@ -52,7 +75,13 @@
52 . = ALIGN(8); \ 75 . = ALIGN(8); \
53 VMLINUX_SYMBOL(__start___markers) = .; \ 76 VMLINUX_SYMBOL(__start___markers) = .; \
54 *(__markers) \ 77 *(__markers) \
55 VMLINUX_SYMBOL(__stop___markers) = .; 78 VMLINUX_SYMBOL(__stop___markers) = .; \
79 . = ALIGN(32); \
80 VMLINUX_SYMBOL(__start___tracepoints) = .; \
81 *(__tracepoints) \
82 VMLINUX_SYMBOL(__stop___tracepoints) = .; \
83 LIKELY_PROFILE() \
84 BRANCH_PROFILE()
56 85
57#define RO_DATA(align) \ 86#define RO_DATA(align) \
58 . = ALIGN((align)); \ 87 . = ALIGN((align)); \
@@ -61,6 +90,7 @@
61 *(.rodata) *(.rodata.*) \ 90 *(.rodata) *(.rodata.*) \
62 *(__vermagic) /* Kernel version magic */ \ 91 *(__vermagic) /* Kernel version magic */ \
63 *(__markers_strings) /* Markers: strings */ \ 92 *(__markers_strings) /* Markers: strings */ \
93 *(__tracepoints_strings)/* Tracepoints: strings */ \
64 } \ 94 } \
65 \ 95 \
66 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \ 96 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
@@ -188,6 +218,7 @@
188 /* __*init sections */ \ 218 /* __*init sections */ \
189 __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ 219 __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
190 *(.ref.rodata) \ 220 *(.ref.rodata) \
221 MCOUNT_REC() \
191 DEV_KEEP(init.rodata) \ 222 DEV_KEEP(init.rodata) \
192 DEV_KEEP(exit.rodata) \ 223 DEV_KEEP(exit.rodata) \
193 CPU_KEEP(init.rodata) \ 224 CPU_KEEP(init.rodata) \
@@ -257,6 +288,16 @@
257 *(.kprobes.text) \ 288 *(.kprobes.text) \
258 VMLINUX_SYMBOL(__kprobes_text_end) = .; 289 VMLINUX_SYMBOL(__kprobes_text_end) = .;
259 290
291#ifdef CONFIG_FUNCTION_GRAPH_TRACER
292#define IRQENTRY_TEXT \
293 ALIGN_FUNCTION(); \
294 VMLINUX_SYMBOL(__irqentry_text_start) = .; \
295 *(.irqentry.text) \
296 VMLINUX_SYMBOL(__irqentry_text_end) = .;
297#else
298#define IRQENTRY_TEXT
299#endif
300
260/* Section used for early init (in .S files) */ 301/* Section used for early init (in .S files) */
261#define HEAD_TEXT *(.head.text) 302#define HEAD_TEXT *(.head.text)
262 303
@@ -268,7 +309,15 @@
268 CPU_DISCARD(init.data) \ 309 CPU_DISCARD(init.data) \
269 CPU_DISCARD(init.rodata) \ 310 CPU_DISCARD(init.rodata) \
270 MEM_DISCARD(init.data) \ 311 MEM_DISCARD(init.data) \
271 MEM_DISCARD(init.rodata) 312 MEM_DISCARD(init.rodata) \
313 /* implement dynamic printk debug */ \
314 VMLINUX_SYMBOL(__start___verbose_strings) = .; \
315 *(__verbose_strings) \
316 VMLINUX_SYMBOL(__stop___verbose_strings) = .; \
317 . = ALIGN(8); \
318 VMLINUX_SYMBOL(__start___verbose) = .; \
319 *(__verbose) \
320 VMLINUX_SYMBOL(__stop___verbose) = .;
272 321
273#define INIT_TEXT \ 322#define INIT_TEXT \
274 *(.init.text) \ 323 *(.init.text) \
diff --git a/include/asm-h8300/timer.h b/include/asm-h8300/timer.h
new file mode 100644
index 000000000000..def80464d38f
--- /dev/null
+++ b/include/asm-h8300/timer.h
@@ -0,0 +1,25 @@
1#ifndef __H8300_TIMER_H
2#define __H8300_TIMER_H
3
4void h8300_timer_tick(void);
5void h8300_timer_setup(void);
6void h8300_gettod(unsigned int *year, unsigned int *mon, unsigned int *day,
7 unsigned int *hour, unsigned int *min, unsigned int *sec);
8
9#define TIMER_FREQ (CONFIG_CPU_CLOCK*10000) /* Timer input freq. */
10
11#define calc_param(cnt, div, rate, limit) \
12do { \
13 cnt = TIMER_FREQ / HZ; \
14 for (div = 0; div < ARRAY_SIZE(divide_rate); div++) { \
15 if (rate[div] == 0) \
16 continue; \
17 if ((cnt / rate[div]) > limit) \
18 break; \
19 } \
20 if (div == ARRAY_SIZE(divide_rate)) \
21 panic("Timer counter overflow"); \
22 cnt /= divide_rate[div]; \
23} while(0)
24
25#endif
diff --git a/include/asm-m32r/elf.h b/include/asm-m32r/elf.h
index 67bcd77494a5..0cc34c94bf2b 100644
--- a/include/asm-m32r/elf.h
+++ b/include/asm-m32r/elf.h
@@ -129,6 +129,6 @@ typedef elf_fpreg_t elf_fpregset_t;
129 intent than poking at uname or /proc/cpuinfo. */ 129 intent than poking at uname or /proc/cpuinfo. */
130#define ELF_PLATFORM (NULL) 130#define ELF_PLATFORM (NULL)
131 131
132#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) 132#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
133 133
134#endif /* _ASM_M32R__ELF_H */ 134#endif /* _ASM_M32R__ELF_H */
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 70a57c8c002b..c980f5ba8de7 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#if defined(CONFIG_FRAME_POINTER) || \ 25#if defined(CONFIG_FRAME_POINTER) || \
26 !defined(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER) 26 !defined(CONFIG_SCHED_OMIT_FRAME_POINTER)
27#define M32R_PUSH_FP " push fp\n" 27#define M32R_PUSH_FP " push fp\n"
28#define M32R_POP_FP " pop fp\n" 28#define M32R_POP_FP " pop fp\n"
29#else 29#else
diff --git a/include/asm-m68k/byteorder.h b/include/asm-m68k/byteorder.h
index 81d420b35c80..b354acdafec8 100644
--- a/include/asm-m68k/byteorder.h
+++ b/include/asm-m68k/byteorder.h
@@ -4,22 +4,16 @@
4#include <asm/types.h> 4#include <asm/types.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
6 6
7#ifdef __GNUC__ 7#define __BIG_ENDIAN
8#define __SWAB_64_THRU_32__
8 9
9static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 val) 10static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
10{ 11{
11 __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); 12 __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val));
12 return val; 13 return val;
13} 14}
14#define __arch__swab32(x) ___arch__swab32(x) 15#define __arch_swab32 __arch_swab32
15 16
16#endif 17#include <linux/byteorder.h>
17
18#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
19# define __BYTEORDER_HAS_U64__
20# define __SWAB_64_THRU_32__
21#endif
22
23#include <linux/byteorder/big_endian.h>
24 18
25#endif /* _M68K_BYTEORDER_H */ 19#endif /* _M68K_BYTEORDER_H */
diff --git a/include/asm-m68k/elf.h b/include/asm-m68k/elf.h
index 14ea42152b97..0b0f49eb876b 100644
--- a/include/asm-m68k/elf.h
+++ b/include/asm-m68k/elf.h
@@ -114,6 +114,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
114 114
115#define ELF_PLATFORM (NULL) 115#define ELF_PLATFORM (NULL)
116 116
117#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 117#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
118 118
119#endif 119#endif
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h
index 1daf6cbdd9f0..b996a3c8cff5 100644
--- a/include/asm-m68k/ide.h
+++ b/include/asm-m68k/ide.h
@@ -92,15 +92,6 @@
92#define outsw_swapw(port, addr, n) raw_outsw_swapw((u16 *)port, addr, n) 92#define outsw_swapw(port, addr, n) raw_outsw_swapw((u16 *)port, addr, n)
93#endif 93#endif
94 94
95
96/* Q40 and Atari have byteswapped IDE busses and since many interesting
97 * values in the identification string are text, chars and words they
98 * happened to be almost correct without swapping.. However *_capacity
99 * is needed for drives over 8 GB. RZ */
100#if defined(CONFIG_Q40) || defined(CONFIG_ATARI)
101#define M68K_IDE_SWAPW (MACH_IS_Q40 || MACH_IS_ATARI)
102#endif
103
104#ifdef CONFIG_BLK_DEV_FALCON_IDE 95#ifdef CONFIG_BLK_DEV_FALCON_IDE
105#define IDE_ARCH_LOCK 96#define IDE_ARCH_LOCK
106 97
diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h
index 26d2b91209c5..5637dcef314e 100644
--- a/include/asm-m68k/machdep.h
+++ b/include/asm-m68k/machdep.h
@@ -14,7 +14,7 @@ extern void (*mach_sched_init) (irq_handler_t handler);
14/* machine dependent irq functions */ 14/* machine dependent irq functions */
15extern void (*mach_init_IRQ) (void); 15extern void (*mach_init_IRQ) (void);
16extern void (*mach_get_model) (char *model); 16extern void (*mach_get_model) (char *model);
17extern int (*mach_get_hardware_list) (char *buffer); 17extern void (*mach_get_hardware_list) (struct seq_file *m);
18/* machine dependent timer functions */ 18/* machine dependent timer functions */
19extern unsigned long (*mach_gettimeoffset)(void); 19extern unsigned long (*mach_gettimeoffset)(void);
20extern int (*mach_hwclk)(int, struct rtc_time*); 20extern int (*mach_hwclk)(int, struct rtc_time*);
diff --git a/include/asm-m68k/machw.h b/include/asm-m68k/machw.h
index 35624998291c..2b4de0c2ce4a 100644
--- a/include/asm-m68k/machw.h
+++ b/include/asm-m68k/machw.h
@@ -26,28 +26,6 @@
26#include <linux/types.h> 26#include <linux/types.h>
27 27
28#if 0 28#if 0
29/* Mac SCSI Controller 5380 */
30
31#define MAC_5380_BAS (0x50F10000) /* This is definitely wrong!! */
32struct MAC_5380 {
33 u_char scsi_data;
34 u_char char_dummy1;
35 u_char scsi_icr;
36 u_char char_dummy2;
37 u_char scsi_mode;
38 u_char char_dummy3;
39 u_char scsi_tcr;
40 u_char char_dummy4;
41 u_char scsi_idstat;
42 u_char char_dummy5;
43 u_char scsi_dmastat;
44 u_char char_dummy6;
45 u_char scsi_targrcv;
46 u_char char_dummy7;
47 u_char scsi_inircv;
48};
49#define mac_scsi ((*(volatile struct MAC_5380 *)MAC_5380_BAS))
50
51/* 29/*
52** SCC Z8530 30** SCC Z8530
53*/ 31*/
diff --git a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h
index abc002798a2b..af0fda46e94b 100644
--- a/include/asm-m68k/thread_info.h
+++ b/include/asm-m68k/thread_info.h
@@ -52,5 +52,6 @@ struct thread_info {
52#define TIF_DELAYED_TRACE 14 /* single step a syscall */ 52#define TIF_DELAYED_TRACE 14 /* single step a syscall */
53#define TIF_SYSCALL_TRACE 15 /* syscall trace active */ 53#define TIF_SYSCALL_TRACE 15 /* syscall trace active */
54#define TIF_MEMDIE 16 54#define TIF_MEMDIE 16
55#define TIF_FREEZE 17 /* thread is freezing for suspend */
55 56
56#endif /* _ASM_M68K_THREAD_INFO_H */ 57#endif /* _ASM_M68K_THREAD_INFO_H */
diff --git a/include/asm-mips/cevt-r4k.h b/include/asm-mips/cevt-r4k.h
deleted file mode 100644
index fa4328f9124f..000000000000
--- a/include/asm-mips/cevt-r4k.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2008 Kevin D. Kissell
7 */
8
9/*
10 * Definitions used for common event timer implementation
11 * for MIPS 4K-type processors and their MIPS MT variants.
12 * Avoids unsightly extern declarations in C files.
13 */
14#ifndef __ASM_CEVT_R4K_H
15#define __ASM_CEVT_R4K_H
16
17DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device);
18
19void mips_event_handler(struct clock_event_device *dev);
20int c0_compare_int_usable(void);
21void mips_set_clock_mode(enum clock_event_mode, struct clock_event_device *);
22irqreturn_t c0_compare_interrupt(int, void *);
23
24extern struct irqaction c0_compare_irqaction;
25extern int cp0_timer_irq_installed;
26
27/*
28 * Possibly handle a performance counter interrupt.
29 * Return true if the timer interrupt should not be checked
30 */
31
32static inline int handle_perf_irq(int r2)
33{
34 /*
35 * The performance counter overflow interrupt may be shared with the
36 * timer interrupt (cp0_perfcount_irq < 0). If it is and a
37 * performance counter has overflowed (perf_irq() == IRQ_HANDLED)
38 * and we can't reliably determine if a counter interrupt has also
39 * happened (!r2) then don't check for a timer interrupt.
40 */
41 return (cp0_perfcount_irq < 0) &&
42 perf_irq() == IRQ_HANDLED &&
43 !r2;
44}
45
46#endif /* __ASM_CEVT_R4K_H */
diff --git a/include/asm-mn10300/elf.h b/include/asm-mn10300/elf.h
index 256a70466ca4..bf09f8bb392e 100644
--- a/include/asm-mn10300/elf.h
+++ b/include/asm-mn10300/elf.h
@@ -141,7 +141,7 @@ do { \
141#define ELF_PLATFORM (NULL) 141#define ELF_PLATFORM (NULL)
142 142
143#ifdef __KERNEL__ 143#ifdef __KERNEL__
144#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) 144#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
145#endif 145#endif
146 146
147#endif /* _ASM_ELF_H */ 147#endif /* _ASM_ELF_H */
diff --git a/include/asm-mn10300/uaccess.h b/include/asm-mn10300/uaccess.h
index 46b9b647f3c3..8a3a4dd55763 100644
--- a/include/asm-mn10300/uaccess.h
+++ b/include/asm-mn10300/uaccess.h
@@ -266,7 +266,7 @@ extern int __get_user_unknown(void);
266 " .section .fixup,\"ax\" \n" \ 266 " .section .fixup,\"ax\" \n" \
267 "4: \n" \ 267 "4: \n" \
268 " mov %5,%0 \n" \ 268 " mov %5,%0 \n" \
269 " jmp 2b \n" \ 269 " jmp 3b \n" \
270 " .previous \n" \ 270 " .previous \n" \
271 " .section __ex_table,\"a\"\n" \ 271 " .section __ex_table,\"a\"\n" \
272 " .balign 4 \n" \ 272 " .balign 4 \n" \
diff --git a/include/asm-parisc/Kbuild b/include/asm-parisc/Kbuild
deleted file mode 100644
index f88b252e419c..000000000000
--- a/include/asm-parisc/Kbuild
+++ /dev/null
@@ -1,3 +0,0 @@
1include include/asm-generic/Kbuild.asm
2
3unifdef-y += pdc.h
diff --git a/include/asm-parisc/agp.h b/include/asm-parisc/agp.h
deleted file mode 100644
index 9651660da639..000000000000
--- a/include/asm-parisc/agp.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef _ASM_PARISC_AGP_H
2#define _ASM_PARISC_AGP_H
3
4/*
5 * PARISC specific AGP definitions.
6 * Copyright (c) 2006 Kyle McMartin <kyle@parisc-linux.org>
7 *
8 */
9
10#define map_page_into_agp(page) /* nothing */
11#define unmap_page_from_agp(page) /* nothing */
12#define flush_agp_cache() mb()
13
14/* Convert a physical address to an address suitable for the GART. */
15#define phys_to_gart(x) (x)
16#define gart_to_phys(x) (x)
17
18/* GATT allocation. Returns/accepts GATT kernel virtual address. */
19#define alloc_gatt_pages(order) \
20 ((char *)__get_free_pages(GFP_KERNEL, (order)))
21#define free_gatt_pages(table, order) \
22 free_pages((unsigned long)(table), (order))
23
24#endif /* _ASM_PARISC_AGP_H */
diff --git a/include/asm-parisc/asmregs.h b/include/asm-parisc/asmregs.h
deleted file mode 100644
index d93c646e1887..000000000000
--- a/include/asm-parisc/asmregs.h
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * Copyright (C) 1999 Hewlett-Packard (Frank Rowand)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef _PARISC_ASMREGS_H
20#define _PARISC_ASMREGS_H
21
22;! General Registers
23
24rp: .reg %r2
25arg3: .reg %r23
26arg2: .reg %r24
27arg1: .reg %r25
28arg0: .reg %r26
29dp: .reg %r27
30ret0: .reg %r28
31ret1: .reg %r29
32sl: .reg %r29
33sp: .reg %r30
34
35#if 0
36/* PA20_REVISIT */
37arg7: .reg r19
38arg6: .reg r20
39arg5: .reg r21
40arg4: .reg r22
41gp: .reg r27
42ap: .reg r29
43#endif
44
45
46r0: .reg %r0
47r1: .reg %r1
48r2: .reg %r2
49r3: .reg %r3
50r4: .reg %r4
51r5: .reg %r5
52r6: .reg %r6
53r7: .reg %r7
54r8: .reg %r8
55r9: .reg %r9
56r10: .reg %r10
57r11: .reg %r11
58r12: .reg %r12
59r13: .reg %r13
60r14: .reg %r14
61r15: .reg %r15
62r16: .reg %r16
63r17: .reg %r17
64r18: .reg %r18
65r19: .reg %r19
66r20: .reg %r20
67r21: .reg %r21
68r22: .reg %r22
69r23: .reg %r23
70r24: .reg %r24
71r25: .reg %r25
72r26: .reg %r26
73r27: .reg %r27
74r28: .reg %r28
75r29: .reg %r29
76r30: .reg %r30
77r31: .reg %r31
78
79
80;! Space Registers
81
82sr0: .reg %sr0
83sr1: .reg %sr1
84sr2: .reg %sr2
85sr3: .reg %sr3
86sr4: .reg %sr4
87sr5: .reg %sr5
88sr6: .reg %sr6
89sr7: .reg %sr7
90
91
92;! Floating Point Registers
93
94fr0: .reg %fr0
95fr1: .reg %fr1
96fr2: .reg %fr2
97fr3: .reg %fr3
98fr4: .reg %fr4
99fr5: .reg %fr5
100fr6: .reg %fr6
101fr7: .reg %fr7
102fr8: .reg %fr8
103fr9: .reg %fr9
104fr10: .reg %fr10
105fr11: .reg %fr11
106fr12: .reg %fr12
107fr13: .reg %fr13
108fr14: .reg %fr14
109fr15: .reg %fr15
110fr16: .reg %fr16
111fr17: .reg %fr17
112fr18: .reg %fr18
113fr19: .reg %fr19
114fr20: .reg %fr20
115fr21: .reg %fr21
116fr22: .reg %fr22
117fr23: .reg %fr23
118fr24: .reg %fr24
119fr25: .reg %fr25
120fr26: .reg %fr26
121fr27: .reg %fr27
122fr28: .reg %fr28
123fr29: .reg %fr29
124fr30: .reg %fr30
125fr31: .reg %fr31
126
127
128;! Control Registers
129
130rctr: .reg %cr0
131pidr1: .reg %cr8
132pidr2: .reg %cr9
133ccr: .reg %cr10
134sar: .reg %cr11
135pidr3: .reg %cr12
136pidr4: .reg %cr13
137iva: .reg %cr14
138eiem: .reg %cr15
139itmr: .reg %cr16
140pcsq: .reg %cr17
141pcoq: .reg %cr18
142iir: .reg %cr19
143isr: .reg %cr20
144ior: .reg %cr21
145ipsw: .reg %cr22
146eirr: .reg %cr23
147tr0: .reg %cr24
148tr1: .reg %cr25
149tr2: .reg %cr26
150tr3: .reg %cr27
151tr4: .reg %cr28
152tr5: .reg %cr29
153tr6: .reg %cr30
154tr7: .reg %cr31
155
156
157cr0: .reg %cr0
158cr8: .reg %cr8
159cr9: .reg %cr9
160cr10: .reg %cr10
161cr11: .reg %cr11
162cr12: .reg %cr12
163cr13: .reg %cr13
164cr14: .reg %cr14
165cr15: .reg %cr15
166cr16: .reg %cr16
167cr17: .reg %cr17
168cr18: .reg %cr18
169cr19: .reg %cr19
170cr20: .reg %cr20
171cr21: .reg %cr21
172cr22: .reg %cr22
173cr23: .reg %cr23
174cr24: .reg %cr24
175cr25: .reg %cr25
176cr26: .reg %cr26
177cr27: .reg %cr27
178cr28: .reg %cr28
179cr29: .reg %cr29
180cr30: .reg %cr30
181cr31: .reg %cr31
182
183#endif
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h
deleted file mode 100644
index ffb208840ecc..000000000000
--- a/include/asm-parisc/assembly.h
+++ /dev/null
@@ -1,519 +0,0 @@
1/*
2 * Copyright (C) 1999 Hewlett-Packard (Frank Rowand)
3 * Copyright (C) 1999 Philipp Rumpf <prumpf@tux.org>
4 * Copyright (C) 1999 SuSE GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#ifndef _PARISC_ASSEMBLY_H
22#define _PARISC_ASSEMBLY_H
23
24#define CALLEE_FLOAT_FRAME_SIZE 80
25
26#ifdef CONFIG_64BIT
27#define LDREG ldd
28#define STREG std
29#define LDREGX ldd,s
30#define LDREGM ldd,mb
31#define STREGM std,ma
32#define SHRREG shrd
33#define SHLREG shld
34#define ANDCM andcm,*
35#define COND(x) * ## x
36#define RP_OFFSET 16
37#define FRAME_SIZE 128
38#define CALLEE_REG_FRAME_SIZE 144
39#define ASM_ULONG_INSN .dword
40#else /* CONFIG_64BIT */
41#define LDREG ldw
42#define STREG stw
43#define LDREGX ldwx,s
44#define LDREGM ldwm
45#define STREGM stwm
46#define SHRREG shr
47#define SHLREG shlw
48#define ANDCM andcm
49#define COND(x) x
50#define RP_OFFSET 20
51#define FRAME_SIZE 64
52#define CALLEE_REG_FRAME_SIZE 128
53#define ASM_ULONG_INSN .word
54#endif
55
56#define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
57
58#ifdef CONFIG_PA20
59#define LDCW ldcw,co
60#define BL b,l
61# ifdef CONFIG_64BIT
62# define LEVEL 2.0w
63# else
64# define LEVEL 2.0
65# endif
66#else
67#define LDCW ldcw
68#define BL bl
69#define LEVEL 1.1
70#endif
71
72#ifdef __ASSEMBLY__
73
74#ifdef CONFIG_64BIT
75/* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so
76 * work around that for now... */
77 .level 2.0w
78#endif
79
80#include <asm/asm-offsets.h>
81#include <asm/page.h>
82
83#include <asm/asmregs.h>
84
85 sp = 30
86 gp = 27
87 ipsw = 22
88
89 /*
90 * We provide two versions of each macro to convert from physical
91 * to virtual and vice versa. The "_r1" versions take one argument
92 * register, but trashes r1 to do the conversion. The other
93 * version takes two arguments: a src and destination register.
94 * However, the source and destination registers can not be
95 * the same register.
96 */
97
98 .macro tophys grvirt, grphys
99 ldil L%(__PAGE_OFFSET), \grphys
100 sub \grvirt, \grphys, \grphys
101 .endm
102
103 .macro tovirt grphys, grvirt
104 ldil L%(__PAGE_OFFSET), \grvirt
105 add \grphys, \grvirt, \grvirt
106 .endm
107
108 .macro tophys_r1 gr
109 ldil L%(__PAGE_OFFSET), %r1
110 sub \gr, %r1, \gr
111 .endm
112
113 .macro tovirt_r1 gr
114 ldil L%(__PAGE_OFFSET), %r1
115 add \gr, %r1, \gr
116 .endm
117
118 .macro delay value
119 ldil L%\value, 1
120 ldo R%\value(1), 1
121 addib,UV,n -1,1,.
122 addib,NUV,n -1,1,.+8
123 nop
124 .endm
125
126 .macro debug value
127 .endm
128
129
130 /* Shift Left - note the r and t can NOT be the same! */
131 .macro shl r, sa, t
132 dep,z \r, 31-\sa, 32-\sa, \t
133 .endm
134
135 /* The PA 2.0 shift left */
136 .macro shlw r, sa, t
137 depw,z \r, 31-\sa, 32-\sa, \t
138 .endm
139
140 /* And the PA 2.0W shift left */
141 .macro shld r, sa, t
142 depd,z \r, 63-\sa, 64-\sa, \t
143 .endm
144
145 /* Shift Right - note the r and t can NOT be the same! */
146 .macro shr r, sa, t
147 extru \r, 31-\sa, 32-\sa, \t
148 .endm
149
150 /* pa20w version of shift right */
151 .macro shrd r, sa, t
152 extrd,u \r, 63-\sa, 64-\sa, \t
153 .endm
154
155 /* load 32-bit 'value' into 'reg' compensating for the ldil
156 * sign-extension when running in wide mode.
157 * WARNING!! neither 'value' nor 'reg' can be expressions
158 * containing '.'!!!! */
159 .macro load32 value, reg
160 ldil L%\value, \reg
161 ldo R%\value(\reg), \reg
162 .endm
163
164 .macro loadgp
165#ifdef CONFIG_64BIT
166 ldil L%__gp, %r27
167 ldo R%__gp(%r27), %r27
168#else
169 ldil L%$global$, %r27
170 ldo R%$global$(%r27), %r27
171#endif
172 .endm
173
174#define SAVE_SP(r, where) mfsp r, %r1 ! STREG %r1, where
175#define REST_SP(r, where) LDREG where, %r1 ! mtsp %r1, r
176#define SAVE_CR(r, where) mfctl r, %r1 ! STREG %r1, where
177#define REST_CR(r, where) LDREG where, %r1 ! mtctl %r1, r
178
179 .macro save_general regs
180 STREG %r1, PT_GR1 (\regs)
181 STREG %r2, PT_GR2 (\regs)
182 STREG %r3, PT_GR3 (\regs)
183 STREG %r4, PT_GR4 (\regs)
184 STREG %r5, PT_GR5 (\regs)
185 STREG %r6, PT_GR6 (\regs)
186 STREG %r7, PT_GR7 (\regs)
187 STREG %r8, PT_GR8 (\regs)
188 STREG %r9, PT_GR9 (\regs)
189 STREG %r10, PT_GR10(\regs)
190 STREG %r11, PT_GR11(\regs)
191 STREG %r12, PT_GR12(\regs)
192 STREG %r13, PT_GR13(\regs)
193 STREG %r14, PT_GR14(\regs)
194 STREG %r15, PT_GR15(\regs)
195 STREG %r16, PT_GR16(\regs)
196 STREG %r17, PT_GR17(\regs)
197 STREG %r18, PT_GR18(\regs)
198 STREG %r19, PT_GR19(\regs)
199 STREG %r20, PT_GR20(\regs)
200 STREG %r21, PT_GR21(\regs)
201 STREG %r22, PT_GR22(\regs)
202 STREG %r23, PT_GR23(\regs)
203 STREG %r24, PT_GR24(\regs)
204 STREG %r25, PT_GR25(\regs)
205 /* r26 is saved in get_stack and used to preserve a value across virt_map */
206 STREG %r27, PT_GR27(\regs)
207 STREG %r28, PT_GR28(\regs)
208 /* r29 is saved in get_stack and used to point to saved registers */
209 /* r30 stack pointer saved in get_stack */
210 STREG %r31, PT_GR31(\regs)
211 .endm
212
213 .macro rest_general regs
214 /* r1 used as a temp in rest_stack and is restored there */
215 LDREG PT_GR2 (\regs), %r2
216 LDREG PT_GR3 (\regs), %r3
217 LDREG PT_GR4 (\regs), %r4
218 LDREG PT_GR5 (\regs), %r5
219 LDREG PT_GR6 (\regs), %r6
220 LDREG PT_GR7 (\regs), %r7
221 LDREG PT_GR8 (\regs), %r8
222 LDREG PT_GR9 (\regs), %r9
223 LDREG PT_GR10(\regs), %r10
224 LDREG PT_GR11(\regs), %r11
225 LDREG PT_GR12(\regs), %r12
226 LDREG PT_GR13(\regs), %r13
227 LDREG PT_GR14(\regs), %r14
228 LDREG PT_GR15(\regs), %r15
229 LDREG PT_GR16(\regs), %r16
230 LDREG PT_GR17(\regs), %r17
231 LDREG PT_GR18(\regs), %r18
232 LDREG PT_GR19(\regs), %r19
233 LDREG PT_GR20(\regs), %r20
234 LDREG PT_GR21(\regs), %r21
235 LDREG PT_GR22(\regs), %r22
236 LDREG PT_GR23(\regs), %r23
237 LDREG PT_GR24(\regs), %r24
238 LDREG PT_GR25(\regs), %r25
239 LDREG PT_GR26(\regs), %r26
240 LDREG PT_GR27(\regs), %r27
241 LDREG PT_GR28(\regs), %r28
242 /* r29 points to register save area, and is restored in rest_stack */
243 /* r30 stack pointer restored in rest_stack */
244 LDREG PT_GR31(\regs), %r31
245 .endm
246
247 .macro save_fp regs
248 fstd,ma %fr0, 8(\regs)
249 fstd,ma %fr1, 8(\regs)
250 fstd,ma %fr2, 8(\regs)
251 fstd,ma %fr3, 8(\regs)
252 fstd,ma %fr4, 8(\regs)
253 fstd,ma %fr5, 8(\regs)
254 fstd,ma %fr6, 8(\regs)
255 fstd,ma %fr7, 8(\regs)
256 fstd,ma %fr8, 8(\regs)
257 fstd,ma %fr9, 8(\regs)
258 fstd,ma %fr10, 8(\regs)
259 fstd,ma %fr11, 8(\regs)
260 fstd,ma %fr12, 8(\regs)
261 fstd,ma %fr13, 8(\regs)
262 fstd,ma %fr14, 8(\regs)
263 fstd,ma %fr15, 8(\regs)
264 fstd,ma %fr16, 8(\regs)
265 fstd,ma %fr17, 8(\regs)
266 fstd,ma %fr18, 8(\regs)
267 fstd,ma %fr19, 8(\regs)
268 fstd,ma %fr20, 8(\regs)
269 fstd,ma %fr21, 8(\regs)
270 fstd,ma %fr22, 8(\regs)
271 fstd,ma %fr23, 8(\regs)
272 fstd,ma %fr24, 8(\regs)
273 fstd,ma %fr25, 8(\regs)
274 fstd,ma %fr26, 8(\regs)
275 fstd,ma %fr27, 8(\regs)
276 fstd,ma %fr28, 8(\regs)
277 fstd,ma %fr29, 8(\regs)
278 fstd,ma %fr30, 8(\regs)
279 fstd %fr31, 0(\regs)
280 .endm
281
282 .macro rest_fp regs
283 fldd 0(\regs), %fr31
284 fldd,mb -8(\regs), %fr30
285 fldd,mb -8(\regs), %fr29
286 fldd,mb -8(\regs), %fr28
287 fldd,mb -8(\regs), %fr27
288 fldd,mb -8(\regs), %fr26
289 fldd,mb -8(\regs), %fr25
290 fldd,mb -8(\regs), %fr24
291 fldd,mb -8(\regs), %fr23
292 fldd,mb -8(\regs), %fr22
293 fldd,mb -8(\regs), %fr21
294 fldd,mb -8(\regs), %fr20
295 fldd,mb -8(\regs), %fr19
296 fldd,mb -8(\regs), %fr18
297 fldd,mb -8(\regs), %fr17
298 fldd,mb -8(\regs), %fr16
299 fldd,mb -8(\regs), %fr15
300 fldd,mb -8(\regs), %fr14
301 fldd,mb -8(\regs), %fr13
302 fldd,mb -8(\regs), %fr12
303 fldd,mb -8(\regs), %fr11
304 fldd,mb -8(\regs), %fr10
305 fldd,mb -8(\regs), %fr9
306 fldd,mb -8(\regs), %fr8
307 fldd,mb -8(\regs), %fr7
308 fldd,mb -8(\regs), %fr6
309 fldd,mb -8(\regs), %fr5
310 fldd,mb -8(\regs), %fr4
311 fldd,mb -8(\regs), %fr3
312 fldd,mb -8(\regs), %fr2
313 fldd,mb -8(\regs), %fr1
314 fldd,mb -8(\regs), %fr0
315 .endm
316
317 .macro callee_save_float
318 fstd,ma %fr12, 8(%r30)
319 fstd,ma %fr13, 8(%r30)
320 fstd,ma %fr14, 8(%r30)
321 fstd,ma %fr15, 8(%r30)
322 fstd,ma %fr16, 8(%r30)
323 fstd,ma %fr17, 8(%r30)
324 fstd,ma %fr18, 8(%r30)
325 fstd,ma %fr19, 8(%r30)
326 fstd,ma %fr20, 8(%r30)
327 fstd,ma %fr21, 8(%r30)
328 .endm
329
330 .macro callee_rest_float
331 fldd,mb -8(%r30), %fr21
332 fldd,mb -8(%r30), %fr20
333 fldd,mb -8(%r30), %fr19
334 fldd,mb -8(%r30), %fr18
335 fldd,mb -8(%r30), %fr17
336 fldd,mb -8(%r30), %fr16
337 fldd,mb -8(%r30), %fr15
338 fldd,mb -8(%r30), %fr14
339 fldd,mb -8(%r30), %fr13
340 fldd,mb -8(%r30), %fr12
341 .endm
342
343#ifdef CONFIG_64BIT
344 .macro callee_save
345 std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30)
346 mfctl %cr27, %r3
347 std %r4, -136(%r30)
348 std %r5, -128(%r30)
349 std %r6, -120(%r30)
350 std %r7, -112(%r30)
351 std %r8, -104(%r30)
352 std %r9, -96(%r30)
353 std %r10, -88(%r30)
354 std %r11, -80(%r30)
355 std %r12, -72(%r30)
356 std %r13, -64(%r30)
357 std %r14, -56(%r30)
358 std %r15, -48(%r30)
359 std %r16, -40(%r30)
360 std %r17, -32(%r30)
361 std %r18, -24(%r30)
362 std %r3, -16(%r30)
363 .endm
364
365 .macro callee_rest
366 ldd -16(%r30), %r3
367 ldd -24(%r30), %r18
368 ldd -32(%r30), %r17
369 ldd -40(%r30), %r16
370 ldd -48(%r30), %r15
371 ldd -56(%r30), %r14
372 ldd -64(%r30), %r13
373 ldd -72(%r30), %r12
374 ldd -80(%r30), %r11
375 ldd -88(%r30), %r10
376 ldd -96(%r30), %r9
377 ldd -104(%r30), %r8
378 ldd -112(%r30), %r7
379 ldd -120(%r30), %r6
380 ldd -128(%r30), %r5
381 ldd -136(%r30), %r4
382 mtctl %r3, %cr27
383 ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3
384 .endm
385
386#else /* ! CONFIG_64BIT */
387
388 .macro callee_save
389 stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30)
390 mfctl %cr27, %r3
391 stw %r4, -124(%r30)
392 stw %r5, -120(%r30)
393 stw %r6, -116(%r30)
394 stw %r7, -112(%r30)
395 stw %r8, -108(%r30)
396 stw %r9, -104(%r30)
397 stw %r10, -100(%r30)
398 stw %r11, -96(%r30)
399 stw %r12, -92(%r30)
400 stw %r13, -88(%r30)
401 stw %r14, -84(%r30)
402 stw %r15, -80(%r30)
403 stw %r16, -76(%r30)
404 stw %r17, -72(%r30)
405 stw %r18, -68(%r30)
406 stw %r3, -64(%r30)
407 .endm
408
409 .macro callee_rest
410 ldw -64(%r30), %r3
411 ldw -68(%r30), %r18
412 ldw -72(%r30), %r17
413 ldw -76(%r30), %r16
414 ldw -80(%r30), %r15
415 ldw -84(%r30), %r14
416 ldw -88(%r30), %r13
417 ldw -92(%r30), %r12
418 ldw -96(%r30), %r11
419 ldw -100(%r30), %r10
420 ldw -104(%r30), %r9
421 ldw -108(%r30), %r8
422 ldw -112(%r30), %r7
423 ldw -116(%r30), %r6
424 ldw -120(%r30), %r5
425 ldw -124(%r30), %r4
426 mtctl %r3, %cr27
427 ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3
428 .endm
429#endif /* ! CONFIG_64BIT */
430
431 .macro save_specials regs
432
433 SAVE_SP (%sr0, PT_SR0 (\regs))
434 SAVE_SP (%sr1, PT_SR1 (\regs))
435 SAVE_SP (%sr2, PT_SR2 (\regs))
436 SAVE_SP (%sr3, PT_SR3 (\regs))
437 SAVE_SP (%sr4, PT_SR4 (\regs))
438 SAVE_SP (%sr5, PT_SR5 (\regs))
439 SAVE_SP (%sr6, PT_SR6 (\regs))
440 SAVE_SP (%sr7, PT_SR7 (\regs))
441
442 SAVE_CR (%cr17, PT_IASQ0(\regs))
443 mtctl %r0, %cr17
444 SAVE_CR (%cr17, PT_IASQ1(\regs))
445
446 SAVE_CR (%cr18, PT_IAOQ0(\regs))
447 mtctl %r0, %cr18
448 SAVE_CR (%cr18, PT_IAOQ1(\regs))
449
450#ifdef CONFIG_64BIT
451 /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0
452 * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only
453 * reads 5 bits. Use mfctl,w to read all six bits. Otherwise
454 * we lose the 6th bit on a save/restore over interrupt.
455 */
456 mfctl,w %cr11, %r1
457 STREG %r1, PT_SAR (\regs)
458#else
459 SAVE_CR (%cr11, PT_SAR (\regs))
460#endif
461 SAVE_CR (%cr19, PT_IIR (\regs))
462
463 /*
464 * Code immediately following this macro (in intr_save) relies
465 * on r8 containing ipsw.
466 */
467 mfctl %cr22, %r8
468 STREG %r8, PT_PSW(\regs)
469 .endm
470
471 .macro rest_specials regs
472
473 REST_SP (%sr0, PT_SR0 (\regs))
474 REST_SP (%sr1, PT_SR1 (\regs))
475 REST_SP (%sr2, PT_SR2 (\regs))
476 REST_SP (%sr3, PT_SR3 (\regs))
477 REST_SP (%sr4, PT_SR4 (\regs))
478 REST_SP (%sr5, PT_SR5 (\regs))
479 REST_SP (%sr6, PT_SR6 (\regs))
480 REST_SP (%sr7, PT_SR7 (\regs))
481
482 REST_CR (%cr17, PT_IASQ0(\regs))
483 REST_CR (%cr17, PT_IASQ1(\regs))
484
485 REST_CR (%cr18, PT_IAOQ0(\regs))
486 REST_CR (%cr18, PT_IAOQ1(\regs))
487
488 REST_CR (%cr11, PT_SAR (\regs))
489
490 REST_CR (%cr22, PT_PSW (\regs))
491 .endm
492
493
494 /* First step to create a "relied upon translation"
495 * See PA 2.0 Arch. page F-4 and F-5.
496 *
497 * The ssm was originally necessary due to a "PCxT bug".
498 * But someone decided it needed to be added to the architecture
499 * and this "feature" went into rev3 of PA-RISC 1.1 Arch Manual.
500 * It's been carried forward into PA 2.0 Arch as well. :^(
501 *
502 * "ssm 0,%r0" is a NOP with side effects (prefetch barrier).
503 * rsm/ssm prevents the ifetch unit from speculatively fetching
504 * instructions past this line in the code stream.
505 * PA 2.0 processor will single step all insn in the same QUAD (4 insn).
506 */
507 .macro pcxt_ssm_bug
508 rsm PSW_SM_I,%r0
509 nop /* 1 */
510 nop /* 2 */
511 nop /* 3 */
512 nop /* 4 */
513 nop /* 5 */
514 nop /* 6 */
515 nop /* 7 */
516 .endm
517
518#endif /* __ASSEMBLY__ */
519#endif
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h
deleted file mode 100644
index 57fcc4a5ebb4..000000000000
--- a/include/asm-parisc/atomic.h
+++ /dev/null
@@ -1,348 +0,0 @@
1/* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
2 * Copyright (C) 2006 Kyle McMartin <kyle@parisc-linux.org>
3 */
4
5#ifndef _ASM_PARISC_ATOMIC_H_
6#define _ASM_PARISC_ATOMIC_H_
7
8#include <linux/types.h>
9#include <asm/system.h>
10
11/*
12 * Atomic operations that C can't guarantee us. Useful for
13 * resource counting etc..
14 *
15 * And probably incredibly slow on parisc. OTOH, we don't
16 * have to write any serious assembly. prumpf
17 */
18
19#ifdef CONFIG_SMP
20#include <asm/spinlock.h>
21#include <asm/cache.h> /* we use L1_CACHE_BYTES */
22
23/* Use an array of spinlocks for our atomic_ts.
24 * Hash function to index into a different SPINLOCK.
25 * Since "a" is usually an address, use one spinlock per cacheline.
26 */
27# define ATOMIC_HASH_SIZE 4
28# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
29
30extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
31
32/* Can't use raw_spin_lock_irq because of #include problems, so
33 * this is the substitute */
34#define _atomic_spin_lock_irqsave(l,f) do { \
35 raw_spinlock_t *s = ATOMIC_HASH(l); \
36 local_irq_save(f); \
37 __raw_spin_lock(s); \
38} while(0)
39
40#define _atomic_spin_unlock_irqrestore(l,f) do { \
41 raw_spinlock_t *s = ATOMIC_HASH(l); \
42 __raw_spin_unlock(s); \
43 local_irq_restore(f); \
44} while(0)
45
46
47#else
48# define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
49# define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
50#endif
51
52/* This should get optimized out since it's never called.
53** Or get a link error if xchg is used "wrong".
54*/
55extern void __xchg_called_with_bad_pointer(void);
56
57
58/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
59extern unsigned long __xchg8(char, char *);
60extern unsigned long __xchg32(int, int *);
61#ifdef CONFIG_64BIT
62extern unsigned long __xchg64(unsigned long, unsigned long *);
63#endif
64
65/* optimizer better get rid of switch since size is a constant */
66static __inline__ unsigned long
67__xchg(unsigned long x, __volatile__ void * ptr, int size)
68{
69 switch(size) {
70#ifdef CONFIG_64BIT
71 case 8: return __xchg64(x,(unsigned long *) ptr);
72#endif
73 case 4: return __xchg32((int) x, (int *) ptr);
74 case 1: return __xchg8((char) x, (char *) ptr);
75 }
76 __xchg_called_with_bad_pointer();
77 return x;
78}
79
80
81/*
82** REVISIT - Abandoned use of LDCW in xchg() for now:
83** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
84** o and while we are at it, could CONFIG_64BIT code use LDCD too?
85**
86** if (__builtin_constant_p(x) && (x == NULL))
87** if (((unsigned long)p & 0xf) == 0)
88** return __ldcw(p);
89*/
90#define xchg(ptr,x) \
91 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
92
93
94#define __HAVE_ARCH_CMPXCHG 1
95
96/* bug catcher for when unsupported size is used - won't link */
97extern void __cmpxchg_called_with_bad_pointer(void);
98
99/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
100extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old, unsigned int new_);
101extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new_);
102
103/* don't worry...optimizer will get rid of most of this */
104static __inline__ unsigned long
105__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
106{
107 switch(size) {
108#ifdef CONFIG_64BIT
109 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
110#endif
111 case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_);
112 }
113 __cmpxchg_called_with_bad_pointer();
114 return old;
115}
116
117#define cmpxchg(ptr,o,n) \
118 ({ \
119 __typeof__(*(ptr)) _o_ = (o); \
120 __typeof__(*(ptr)) _n_ = (n); \
121 (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
122 (unsigned long)_n_, sizeof(*(ptr))); \
123 })
124
125#include <asm-generic/cmpxchg-local.h>
126
127static inline unsigned long __cmpxchg_local(volatile void *ptr,
128 unsigned long old,
129 unsigned long new_, int size)
130{
131 switch (size) {
132#ifdef CONFIG_64BIT
133 case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
134#endif
135 case 4: return __cmpxchg_u32(ptr, old, new_);
136 default:
137 return __cmpxchg_local_generic(ptr, old, new_, size);
138 }
139}
140
141/*
142 * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make
143 * them available.
144 */
145#define cmpxchg_local(ptr, o, n) \
146 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
147 (unsigned long)(n), sizeof(*(ptr))))
148#ifdef CONFIG_64BIT
149#define cmpxchg64_local(ptr, o, n) \
150 ({ \
151 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
152 cmpxchg_local((ptr), (o), (n)); \
153 })
154#else
155#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
156#endif
157
158/* Note that we need not lock read accesses - aligned word writes/reads
159 * are atomic, so a reader never sees unconsistent values.
160 *
161 * Cache-line alignment would conflict with, for example, linux/module.h
162 */
163
164typedef struct { volatile int counter; } atomic_t;
165
166/* It's possible to reduce all atomic operations to either
167 * __atomic_add_return, atomic_set and atomic_read (the latter
168 * is there only for consistency).
169 */
170
171static __inline__ int __atomic_add_return(int i, atomic_t *v)
172{
173 int ret;
174 unsigned long flags;
175 _atomic_spin_lock_irqsave(v, flags);
176
177 ret = (v->counter += i);
178
179 _atomic_spin_unlock_irqrestore(v, flags);
180 return ret;
181}
182
183static __inline__ void atomic_set(atomic_t *v, int i)
184{
185 unsigned long flags;
186 _atomic_spin_lock_irqsave(v, flags);
187
188 v->counter = i;
189
190 _atomic_spin_unlock_irqrestore(v, flags);
191}
192
193static __inline__ int atomic_read(const atomic_t *v)
194{
195 return v->counter;
196}
197
198/* exported interface */
199#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
200#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
201
202/**
203 * atomic_add_unless - add unless the number is a given value
204 * @v: pointer of type atomic_t
205 * @a: the amount to add to v...
206 * @u: ...unless v is equal to u.
207 *
208 * Atomically adds @a to @v, so long as it was not @u.
209 * Returns non-zero if @v was not @u, and zero otherwise.
210 */
211static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
212{
213 int c, old;
214 c = atomic_read(v);
215 for (;;) {
216 if (unlikely(c == (u)))
217 break;
218 old = atomic_cmpxchg((v), c, c + (a));
219 if (likely(old == c))
220 break;
221 c = old;
222 }
223 return c != (u);
224}
225
226#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
227
228#define atomic_add(i,v) ((void)(__atomic_add_return( ((int)i),(v))))
229#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)i),(v))))
230#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
231#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))
232
233#define atomic_add_return(i,v) (__atomic_add_return( ((int)i),(v)))
234#define atomic_sub_return(i,v) (__atomic_add_return(-((int)i),(v)))
235#define atomic_inc_return(v) (__atomic_add_return( 1,(v)))
236#define atomic_dec_return(v) (__atomic_add_return( -1,(v)))
237
238#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0)
239
240/*
241 * atomic_inc_and_test - increment and test
242 * @v: pointer of type atomic_t
243 *
244 * Atomically increments @v by 1
245 * and returns true if the result is zero, or false for all
246 * other cases.
247 */
248#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0)
249
250#define atomic_dec_and_test(v) (atomic_dec_return(v) == 0)
251
252#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
253
254#define ATOMIC_INIT(i) ((atomic_t) { (i) })
255
256#define smp_mb__before_atomic_dec() smp_mb()
257#define smp_mb__after_atomic_dec() smp_mb()
258#define smp_mb__before_atomic_inc() smp_mb()
259#define smp_mb__after_atomic_inc() smp_mb()
260
261#ifdef CONFIG_64BIT
262
263typedef struct { volatile s64 counter; } atomic64_t;
264
265#define ATOMIC64_INIT(i) ((atomic64_t) { (i) })
266
267static __inline__ int
268__atomic64_add_return(s64 i, atomic64_t *v)
269{
270 int ret;
271 unsigned long flags;
272 _atomic_spin_lock_irqsave(v, flags);
273
274 ret = (v->counter += i);
275
276 _atomic_spin_unlock_irqrestore(v, flags);
277 return ret;
278}
279
280static __inline__ void
281atomic64_set(atomic64_t *v, s64 i)
282{
283 unsigned long flags;
284 _atomic_spin_lock_irqsave(v, flags);
285
286 v->counter = i;
287
288 _atomic_spin_unlock_irqrestore(v, flags);
289}
290
291static __inline__ s64
292atomic64_read(const atomic64_t *v)
293{
294 return v->counter;
295}
296
297#define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)i),(v))))
298#define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)i),(v))))
299#define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v))))
300#define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v))))
301
302#define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)i),(v)))
303#define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)i),(v)))
304#define atomic64_inc_return(v) (__atomic64_add_return( 1,(v)))
305#define atomic64_dec_return(v) (__atomic64_add_return( -1,(v)))
306
307#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0)
308
309#define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0)
310#define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0)
311#define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0)
312
313/* exported interface */
314#define atomic64_cmpxchg(v, o, n) \
315 ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
316#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
317
318/**
319 * atomic64_add_unless - add unless the number is a given value
320 * @v: pointer of type atomic64_t
321 * @a: the amount to add to v...
322 * @u: ...unless v is equal to u.
323 *
324 * Atomically adds @a to @v, so long as it was not @u.
325 * Returns non-zero if @v was not @u, and zero otherwise.
326 */
327static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
328{
329 long c, old;
330 c = atomic64_read(v);
331 for (;;) {
332 if (unlikely(c == (u)))
333 break;
334 old = atomic64_cmpxchg((v), c, c + (a));
335 if (likely(old == c))
336 break;
337 c = old;
338 }
339 return c != (u);
340}
341
342#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
343
344#endif /* CONFIG_64BIT */
345
346#include <asm-generic/atomic.h>
347
348#endif /* _ASM_PARISC_ATOMIC_H_ */
diff --git a/include/asm-parisc/auxvec.h b/include/asm-parisc/auxvec.h
deleted file mode 100644
index 9c3ac4b89dc9..000000000000
--- a/include/asm-parisc/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASMPARISC_AUXVEC_H
2#define __ASMPARISC_AUXVEC_H
3
4#endif
diff --git a/include/asm-parisc/bitops.h b/include/asm-parisc/bitops.h
deleted file mode 100644
index 7a6ea10bd231..000000000000
--- a/include/asm-parisc/bitops.h
+++ /dev/null
@@ -1,239 +0,0 @@
1#ifndef _PARISC_BITOPS_H
2#define _PARISC_BITOPS_H
3
4#ifndef _LINUX_BITOPS_H
5#error only <linux/bitops.h> can be included directly
6#endif
7
8#include <linux/compiler.h>
9#include <asm/types.h> /* for BITS_PER_LONG/SHIFT_PER_LONG */
10#include <asm/byteorder.h>
11#include <asm/atomic.h>
12
13/*
14 * HP-PARISC specific bit operations
15 * for a detailed description of the functions please refer
16 * to include/asm-i386/bitops.h or kerneldoc
17 */
18
19#define CHOP_SHIFTCOUNT(x) (((unsigned long) (x)) & (BITS_PER_LONG - 1))
20
21
22#define smp_mb__before_clear_bit() smp_mb()
23#define smp_mb__after_clear_bit() smp_mb()
24
25/* See http://marc.theaimsgroup.com/?t=108826637900003 for discussion
26 * on use of volatile and __*_bit() (set/clear/change):
27 * *_bit() want use of volatile.
28 * __*_bit() are "relaxed" and don't use spinlock or volatile.
29 */
30
31static __inline__ void set_bit(int nr, volatile unsigned long * addr)
32{
33 unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr);
34 unsigned long flags;
35
36 addr += (nr >> SHIFT_PER_LONG);
37 _atomic_spin_lock_irqsave(addr, flags);
38 *addr |= mask;
39 _atomic_spin_unlock_irqrestore(addr, flags);
40}
41
42static __inline__ void clear_bit(int nr, volatile unsigned long * addr)
43{
44 unsigned long mask = ~(1UL << CHOP_SHIFTCOUNT(nr));
45 unsigned long flags;
46
47 addr += (nr >> SHIFT_PER_LONG);
48 _atomic_spin_lock_irqsave(addr, flags);
49 *addr &= mask;
50 _atomic_spin_unlock_irqrestore(addr, flags);
51}
52
53static __inline__ void change_bit(int nr, volatile unsigned long * addr)
54{
55 unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr);
56 unsigned long flags;
57
58 addr += (nr >> SHIFT_PER_LONG);
59 _atomic_spin_lock_irqsave(addr, flags);
60 *addr ^= mask;
61 _atomic_spin_unlock_irqrestore(addr, flags);
62}
63
64static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr)
65{
66 unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr);
67 unsigned long old;
68 unsigned long flags;
69 int set;
70
71 addr += (nr >> SHIFT_PER_LONG);
72 _atomic_spin_lock_irqsave(addr, flags);
73 old = *addr;
74 set = (old & mask) ? 1 : 0;
75 if (!set)
76 *addr = old | mask;
77 _atomic_spin_unlock_irqrestore(addr, flags);
78
79 return set;
80}
81
82static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr)
83{
84 unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr);
85 unsigned long old;
86 unsigned long flags;
87 int set;
88
89 addr += (nr >> SHIFT_PER_LONG);
90 _atomic_spin_lock_irqsave(addr, flags);
91 old = *addr;
92 set = (old & mask) ? 1 : 0;
93 if (set)
94 *addr = old & ~mask;
95 _atomic_spin_unlock_irqrestore(addr, flags);
96
97 return set;
98}
99
100static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr)
101{
102 unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr);
103 unsigned long oldbit;
104 unsigned long flags;
105
106 addr += (nr >> SHIFT_PER_LONG);
107 _atomic_spin_lock_irqsave(addr, flags);
108 oldbit = *addr;
109 *addr = oldbit ^ mask;
110 _atomic_spin_unlock_irqrestore(addr, flags);
111
112 return (oldbit & mask) ? 1 : 0;
113}
114
115#include <asm-generic/bitops/non-atomic.h>
116
117#ifdef __KERNEL__
118
119/**
120 * __ffs - find first bit in word. returns 0 to "BITS_PER_LONG-1".
121 * @word: The word to search
122 *
123 * __ffs() return is undefined if no bit is set.
124 *
125 * 32-bit fast __ffs by LaMont Jones "lamont At hp com".
126 * 64-bit enhancement by Grant Grundler "grundler At parisc-linux org".
127 * (with help from willy/jejb to get the semantics right)
128 *
129 * This algorithm avoids branches by making use of nullification.
130 * One side effect of "extr" instructions is it sets PSW[N] bit.
131 * How PSW[N] (nullify next insn) gets set is determined by the
132 * "condition" field (eg "<>" or "TR" below) in the extr* insn.
133 * Only the 1st and one of either the 2cd or 3rd insn will get executed.
134 * Each set of 3 insn will get executed in 2 cycles on PA8x00 vs 16 or so
135 * cycles for each mispredicted branch.
136 */
137
138static __inline__ unsigned long __ffs(unsigned long x)
139{
140 unsigned long ret;
141
142 __asm__(
143#ifdef CONFIG_64BIT
144 " ldi 63,%1\n"
145 " extrd,u,*<> %0,63,32,%%r0\n"
146 " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */
147 " addi -32,%1,%1\n"
148#else
149 " ldi 31,%1\n"
150#endif
151 " extru,<> %0,31,16,%%r0\n"
152 " extru,TR %0,15,16,%0\n" /* xxxx0000 -> 0000xxxx */
153 " addi -16,%1,%1\n"
154 " extru,<> %0,31,8,%%r0\n"
155 " extru,TR %0,23,8,%0\n" /* 0000xx00 -> 000000xx */
156 " addi -8,%1,%1\n"
157 " extru,<> %0,31,4,%%r0\n"
158 " extru,TR %0,27,4,%0\n" /* 000000x0 -> 0000000x */
159 " addi -4,%1,%1\n"
160 " extru,<> %0,31,2,%%r0\n"
161 " extru,TR %0,29,2,%0\n" /* 0000000y, 1100b -> 0011b */
162 " addi -2,%1,%1\n"
163 " extru,= %0,31,1,%%r0\n" /* check last bit */
164 " addi -1,%1,%1\n"
165 : "+r" (x), "=r" (ret) );
166 return ret;
167}
168
169#include <asm-generic/bitops/ffz.h>
170
171/*
172 * ffs: find first bit set. returns 1 to BITS_PER_LONG or 0 (if none set)
173 * This is defined the same way as the libc and compiler builtin
174 * ffs routines, therefore differs in spirit from the above ffz (man ffs).
175 */
176static __inline__ int ffs(int x)
177{
178 return x ? (__ffs((unsigned long)x) + 1) : 0;
179}
180
181/*
182 * fls: find last (most significant) bit set.
183 * fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
184 */
185
186static __inline__ int fls(int x)
187{
188 int ret;
189 if (!x)
190 return 0;
191
192 __asm__(
193 " ldi 1,%1\n"
194 " extru,<> %0,15,16,%%r0\n"
195 " zdep,TR %0,15,16,%0\n" /* xxxx0000 */
196 " addi 16,%1,%1\n"
197 " extru,<> %0,7,8,%%r0\n"
198 " zdep,TR %0,23,24,%0\n" /* xx000000 */
199 " addi 8,%1,%1\n"
200 " extru,<> %0,3,4,%%r0\n"
201 " zdep,TR %0,27,28,%0\n" /* x0000000 */
202 " addi 4,%1,%1\n"
203 " extru,<> %0,1,2,%%r0\n"
204 " zdep,TR %0,29,30,%0\n" /* y0000000 (y&3 = 0) */
205 " addi 2,%1,%1\n"
206 " extru,= %0,0,1,%%r0\n"
207 " addi 1,%1,%1\n" /* if y & 8, add 1 */
208 : "+r" (x), "=r" (ret) );
209
210 return ret;
211}
212
213#include <asm-generic/bitops/__fls.h>
214#include <asm-generic/bitops/fls64.h>
215#include <asm-generic/bitops/hweight.h>
216#include <asm-generic/bitops/lock.h>
217#include <asm-generic/bitops/sched.h>
218
219#endif /* __KERNEL__ */
220
221#include <asm-generic/bitops/find.h>
222
223#ifdef __KERNEL__
224
225#include <asm-generic/bitops/ext2-non-atomic.h>
226
227/* '3' is bits per byte */
228#define LE_BYTE_ADDR ((sizeof(unsigned long) - 1) << 3)
229
230#define ext2_set_bit_atomic(l,nr,addr) \
231 test_and_set_bit((nr) ^ LE_BYTE_ADDR, (unsigned long *)addr)
232#define ext2_clear_bit_atomic(l,nr,addr) \
233 test_and_clear_bit( (nr) ^ LE_BYTE_ADDR, (unsigned long *)addr)
234
235#endif /* __KERNEL__ */
236
237#include <asm-generic/bitops/minix-le.h>
238
239#endif /* _PARISC_BITOPS_H */
diff --git a/include/asm-parisc/bug.h b/include/asm-parisc/bug.h
deleted file mode 100644
index 8cfc553fc837..000000000000
--- a/include/asm-parisc/bug.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef _PARISC_BUG_H
2#define _PARISC_BUG_H
3
4/*
5 * Tell the user there is some problem.
6 * The offending file and line are encoded in the __bug_table section.
7 */
8
9#ifdef CONFIG_BUG
10#define HAVE_ARCH_BUG
11#define HAVE_ARCH_WARN_ON
12
13/* the break instruction is used as BUG() marker. */
14#define PARISC_BUG_BREAK_ASM "break 0x1f, 0x1fff"
15#define PARISC_BUG_BREAK_INSN 0x03ffe01f /* PARISC_BUG_BREAK_ASM */
16
17#if defined(CONFIG_64BIT)
18#define ASM_WORD_INSN ".dword\t"
19#else
20#define ASM_WORD_INSN ".word\t"
21#endif
22
23#ifdef CONFIG_DEBUG_BUGVERBOSE
24#define BUG() \
25 do { \
26 asm volatile("\n" \
27 "1:\t" PARISC_BUG_BREAK_ASM "\n" \
28 "\t.pushsection __bug_table,\"a\"\n" \
29 "2:\t" ASM_WORD_INSN "1b, %c0\n" \
30 "\t.short %c1, %c2\n" \
31 "\t.org 2b+%c3\n" \
32 "\t.popsection" \
33 : : "i" (__FILE__), "i" (__LINE__), \
34 "i" (0), "i" (sizeof(struct bug_entry)) ); \
35 for(;;) ; \
36 } while(0)
37
38#else
39#define BUG() \
40 do { \
41 asm volatile(PARISC_BUG_BREAK_ASM : : ); \
42 for(;;) ; \
43 } while(0)
44#endif
45
46#ifdef CONFIG_DEBUG_BUGVERBOSE
47#define __WARN() \
48 do { \
49 asm volatile("\n" \
50 "1:\t" PARISC_BUG_BREAK_ASM "\n" \
51 "\t.pushsection __bug_table,\"a\"\n" \
52 "2:\t" ASM_WORD_INSN "1b, %c0\n" \
53 "\t.short %c1, %c2\n" \
54 "\t.org 2b+%c3\n" \
55 "\t.popsection" \
56 : : "i" (__FILE__), "i" (__LINE__), \
57 "i" (BUGFLAG_WARNING), \
58 "i" (sizeof(struct bug_entry)) ); \
59 } while(0)
60#else
61#define __WARN() \
62 do { \
63 asm volatile("\n" \
64 "1:\t" PARISC_BUG_BREAK_ASM "\n" \
65 "\t.pushsection __bug_table,\"a\"\n" \
66 "2:\t" ASM_WORD_INSN "1b\n" \
67 "\t.short %c0\n" \
68 "\t.org 2b+%c1\n" \
69 "\t.popsection" \
70 : : "i" (BUGFLAG_WARNING), \
71 "i" (sizeof(struct bug_entry)) ); \
72 } while(0)
73#endif
74
75
76#define WARN_ON(x) ({ \
77 int __ret_warn_on = !!(x); \
78 if (__builtin_constant_p(__ret_warn_on)) { \
79 if (__ret_warn_on) \
80 __WARN(); \
81 } else { \
82 if (unlikely(__ret_warn_on)) \
83 __WARN(); \
84 } \
85 unlikely(__ret_warn_on); \
86})
87
88#endif
89
90#include <asm-generic/bug.h>
91#endif
92
diff --git a/include/asm-parisc/bugs.h b/include/asm-parisc/bugs.h
deleted file mode 100644
index 9e6284342a5f..000000000000
--- a/include/asm-parisc/bugs.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-parisc/bugs.h
3 *
4 * Copyright (C) 1999 Mike Shaver
5 */
6
7/*
8 * This is included by init/main.c to check for architecture-dependent bugs.
9 *
10 * Needs:
11 * void check_bugs(void);
12 */
13
14#include <asm/processor.h>
15
16static inline void check_bugs(void)
17{
18// identify_cpu(&boot_cpu_data);
19}
diff --git a/include/asm-parisc/byteorder.h b/include/asm-parisc/byteorder.h
deleted file mode 100644
index db148313de5d..000000000000
--- a/include/asm-parisc/byteorder.h
+++ /dev/null
@@ -1,82 +0,0 @@
1#ifndef _PARISC_BYTEORDER_H
2#define _PARISC_BYTEORDER_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6
7#ifdef __GNUC__
8
9static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
10{
11 __asm__("dep %0, 15, 8, %0\n\t" /* deposit 00ab -> 0bab */
12 "shd %%r0, %0, 8, %0" /* shift 000000ab -> 00ba */
13 : "=r" (x)
14 : "0" (x));
15 return x;
16}
17
18static __inline__ __attribute_const__ __u32 ___arch__swab24(__u32 x)
19{
20 __asm__("shd %0, %0, 8, %0\n\t" /* shift xabcxabc -> cxab */
21 "dep %0, 15, 8, %0\n\t" /* deposit cxab -> cbab */
22 "shd %%r0, %0, 8, %0" /* shift 0000cbab -> 0cba */
23 : "=r" (x)
24 : "0" (x));
25 return x;
26}
27
28static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
29{
30 unsigned int temp;
31 __asm__("shd %0, %0, 16, %1\n\t" /* shift abcdabcd -> cdab */
32 "dep %1, 15, 8, %1\n\t" /* deposit cdab -> cbab */
33 "shd %0, %1, 8, %0" /* shift abcdcbab -> dcba */
34 : "=r" (x), "=&r" (temp)
35 : "0" (x));
36 return x;
37}
38
39
40#if BITS_PER_LONG > 32
41/*
42** From "PA-RISC 2.0 Architecture", HP Professional Books.
43** See Appendix I page 8 , "Endian Byte Swapping".
44**
45** Pretty cool algorithm: (* == zero'd bits)
46** PERMH 01234567 -> 67452301 into %0
47** HSHL 67452301 -> 7*5*3*1* into %1
48** HSHR 67452301 -> *6*4*2*0 into %0
49** OR %0 | %1 -> 76543210 into %0 (all done!)
50*/
51static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x) {
52 __u64 temp;
53 __asm__("permh,3210 %0, %0\n\t"
54 "hshl %0, 8, %1\n\t"
55 "hshr,u %0, 8, %0\n\t"
56 "or %1, %0, %0"
57 : "=r" (x), "=&r" (temp)
58 : "0" (x));
59 return x;
60}
61#define __arch__swab64(x) ___arch__swab64(x)
62#define __BYTEORDER_HAS_U64__
63#elif !defined(__STRICT_ANSI__)
64static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x)
65{
66 __u32 t1 = ___arch__swab32((__u32) x);
67 __u32 t2 = ___arch__swab32((__u32) (x >> 32));
68 return (((__u64) t1 << 32) | t2);
69}
70#define __arch__swab64(x) ___arch__swab64(x)
71#define __BYTEORDER_HAS_U64__
72#endif
73
74#define __arch__swab16(x) ___arch__swab16(x)
75#define __arch__swab24(x) ___arch__swab24(x)
76#define __arch__swab32(x) ___arch__swab32(x)
77
78#endif /* __GNUC__ */
79
80#include <linux/byteorder/big_endian.h>
81
82#endif /* _PARISC_BYTEORDER_H */
diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h
deleted file mode 100644
index 32c2cca74345..000000000000
--- a/include/asm-parisc/cache.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * include/asm-parisc/cache.h
3 */
4
5#ifndef __ARCH_PARISC_CACHE_H
6#define __ARCH_PARISC_CACHE_H
7
8
9/*
10 * PA 2.0 processors have 64-byte cachelines; PA 1.1 processors have
11 * 32-byte cachelines. The default configuration is not for SMP anyway,
12 * so if you're building for SMP, you should select the appropriate
13 * processor type. There is a potential livelock danger when running
14 * a machine with this value set too small, but it's more probable you'll
15 * just ruin performance.
16 */
17#ifdef CONFIG_PA20
18#define L1_CACHE_BYTES 64
19#define L1_CACHE_SHIFT 6
20#else
21#define L1_CACHE_BYTES 32
22#define L1_CACHE_SHIFT 5
23#endif
24
25#ifndef __ASSEMBLY__
26
27#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
28
29#define SMP_CACHE_BYTES L1_CACHE_BYTES
30
31#define __read_mostly __attribute__((__section__(".data.read_mostly")))
32
33void parisc_cache_init(void); /* initializes cache-flushing */
34void disable_sr_hashing_asm(int); /* low level support for above */
35void disable_sr_hashing(void); /* turns off space register hashing */
36void free_sid(unsigned long);
37unsigned long alloc_sid(void);
38
39struct seq_file;
40extern void show_cache_info(struct seq_file *m);
41
42extern int split_tlb;
43extern int dcache_stride;
44extern int icache_stride;
45extern struct pdc_cache_info cache_info;
46void parisc_setup_cache_timing(void);
47
48#define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr));
49#define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr));
50#define pdtlb_kernel(addr) asm volatile("pdtlb 0(%0)" : : "r" (addr));
51
52#endif /* ! __ASSEMBLY__ */
53
54/* Classes of processor wrt: disabling space register hashing */
55
56#define SRHASH_PCXST 0 /* pcxs, pcxt, pcxt_ */
57#define SRHASH_PCXL 1 /* pcxl */
58#define SRHASH_PA20 2 /* pcxu, pcxu_, pcxw, pcxw_ */
59
60#endif
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h
deleted file mode 100644
index b7ca6dc7fddc..000000000000
--- a/include/asm-parisc/cacheflush.h
+++ /dev/null
@@ -1,121 +0,0 @@
1#ifndef _PARISC_CACHEFLUSH_H
2#define _PARISC_CACHEFLUSH_H
3
4#include <linux/mm.h>
5
6/* The usual comment is "Caches aren't brain-dead on the <architecture>".
7 * Unfortunately, that doesn't apply to PA-RISC. */
8
9/* Internal implementation */
10void flush_data_cache_local(void *); /* flushes local data-cache only */
11void flush_instruction_cache_local(void *); /* flushes local code-cache only */
12#ifdef CONFIG_SMP
13void flush_data_cache(void); /* flushes data-cache only (all processors) */
14void flush_instruction_cache(void); /* flushes i-cache only (all processors) */
15#else
16#define flush_data_cache() flush_data_cache_local(NULL)
17#define flush_instruction_cache() flush_instruction_cache_local(NULL)
18#endif
19
20#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
21
22void flush_user_icache_range_asm(unsigned long, unsigned long);
23void flush_kernel_icache_range_asm(unsigned long, unsigned long);
24void flush_user_dcache_range_asm(unsigned long, unsigned long);
25void flush_kernel_dcache_range_asm(unsigned long, unsigned long);
26void flush_kernel_dcache_page_asm(void *);
27void flush_kernel_icache_page(void *);
28void flush_user_dcache_page(unsigned long);
29void flush_user_icache_page(unsigned long);
30void flush_user_dcache_range(unsigned long, unsigned long);
31void flush_user_icache_range(unsigned long, unsigned long);
32
33/* Cache flush operations */
34
35void flush_cache_all_local(void);
36void flush_cache_all(void);
37void flush_cache_mm(struct mm_struct *mm);
38
39#define flush_kernel_dcache_range(start,size) \
40 flush_kernel_dcache_range_asm((start), (start)+(size));
41
42#define flush_cache_vmap(start, end) flush_cache_all()
43#define flush_cache_vunmap(start, end) flush_cache_all()
44
45extern void flush_dcache_page(struct page *page);
46
47#define flush_dcache_mmap_lock(mapping) \
48 spin_lock_irq(&(mapping)->tree_lock)
49#define flush_dcache_mmap_unlock(mapping) \
50 spin_unlock_irq(&(mapping)->tree_lock)
51
52#define flush_icache_page(vma,page) do { \
53 flush_kernel_dcache_page(page); \
54 flush_kernel_icache_page(page_address(page)); \
55} while (0)
56
57#define flush_icache_range(s,e) do { \
58 flush_kernel_dcache_range_asm(s,e); \
59 flush_kernel_icache_range_asm(s,e); \
60} while (0)
61
62#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
63do { \
64 flush_cache_page(vma, vaddr, page_to_pfn(page)); \
65 memcpy(dst, src, len); \
66 flush_kernel_dcache_range_asm((unsigned long)dst, (unsigned long)dst + len); \
67} while (0)
68
69#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
70do { \
71 flush_cache_page(vma, vaddr, page_to_pfn(page)); \
72 memcpy(dst, src, len); \
73} while (0)
74
75void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn);
76void flush_cache_range(struct vm_area_struct *vma,
77 unsigned long start, unsigned long end);
78
79#define ARCH_HAS_FLUSH_ANON_PAGE
80static inline void
81flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr)
82{
83 if (PageAnon(page))
84 flush_user_dcache_page(vmaddr);
85}
86
87#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
88void flush_kernel_dcache_page_addr(void *addr);
89static inline void flush_kernel_dcache_page(struct page *page)
90{
91 flush_kernel_dcache_page_addr(page_address(page));
92}
93
94#ifdef CONFIG_DEBUG_RODATA
95void mark_rodata_ro(void);
96#endif
97
98#ifdef CONFIG_PA8X00
99/* Only pa8800, pa8900 needs this */
100#define ARCH_HAS_KMAP
101
102void kunmap_parisc(void *addr);
103
104static inline void *kmap(struct page *page)
105{
106 might_sleep();
107 return page_address(page);
108}
109
110#define kunmap(page) kunmap_parisc(page_address(page))
111
112#define kmap_atomic(page, idx) page_address(page)
113
114#define kunmap_atomic(addr, idx) kunmap_parisc(addr)
115
116#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
117#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
118#endif
119
120#endif /* _PARISC_CACHEFLUSH_H */
121
diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h
deleted file mode 100644
index e9639ccc3fce..000000000000
--- a/include/asm-parisc/checksum.h
+++ /dev/null
@@ -1,210 +0,0 @@
1#ifndef _PARISC_CHECKSUM_H
2#define _PARISC_CHECKSUM_H
3
4#include <linux/in6.h>
5
6/*
7 * computes the checksum of a memory block at buff, length len,
8 * and adds in "sum" (32-bit)
9 *
10 * returns a 32-bit number suitable for feeding into itself
11 * or csum_tcpudp_magic
12 *
13 * this function must be called with even lengths, except
14 * for the last fragment, which may be odd
15 *
16 * it's best to have buff aligned on a 32-bit boundary
17 */
18extern __wsum csum_partial(const void *, int, __wsum);
19
20/*
21 * The same as csum_partial, but copies from src while it checksums.
22 *
23 * Here even more important to align src and dst on a 32-bit (or even
24 * better 64-bit) boundary
25 */
26extern __wsum csum_partial_copy_nocheck(const void *, void *, int, __wsum);
27
28/*
29 * this is a new version of the above that records errors it finds in *errp,
30 * but continues and zeros the rest of the buffer.
31 */
32extern __wsum csum_partial_copy_from_user(const void __user *src,
33 void *dst, int len, __wsum sum, int *errp);
34
35/*
36 * Optimized for IP headers, which always checksum on 4 octet boundaries.
37 *
38 * Written by Randolph Chung <tausq@debian.org>, and then mucked with by
39 * LaMont Jones <lamont@debian.org>
40 */
41static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
42{
43 unsigned int sum;
44
45 __asm__ __volatile__ (
46" ldws,ma 4(%1), %0\n"
47" addib,<= -4, %2, 2f\n"
48"\n"
49" ldws 4(%1), %%r20\n"
50" ldws 8(%1), %%r21\n"
51" add %0, %%r20, %0\n"
52" ldws,ma 12(%1), %%r19\n"
53" addc %0, %%r21, %0\n"
54" addc %0, %%r19, %0\n"
55"1: ldws,ma 4(%1), %%r19\n"
56" addib,< 0, %2, 1b\n"
57" addc %0, %%r19, %0\n"
58"\n"
59" extru %0, 31, 16, %%r20\n"
60" extru %0, 15, 16, %%r21\n"
61" addc %%r20, %%r21, %0\n"
62" extru %0, 15, 16, %%r21\n"
63" add %0, %%r21, %0\n"
64" subi -1, %0, %0\n"
65"2:\n"
66 : "=r" (sum), "=r" (iph), "=r" (ihl)
67 : "1" (iph), "2" (ihl)
68 : "r19", "r20", "r21", "memory");
69
70 return (__force __sum16)sum;
71}
72
73/*
74 * Fold a partial checksum
75 */
76static inline __sum16 csum_fold(__wsum csum)
77{
78 u32 sum = (__force u32)csum;
79 /* add the swapped two 16-bit halves of sum,
80 a possible carry from adding the two 16-bit halves,
81 will carry from the lower half into the upper half,
82 giving us the correct sum in the upper half. */
83 sum += (sum << 16) + (sum >> 16);
84 return (__force __sum16)(~sum >> 16);
85}
86
87static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
88 unsigned short len,
89 unsigned short proto,
90 __wsum sum)
91{
92 __asm__(
93 " add %1, %0, %0\n"
94 " addc %2, %0, %0\n"
95 " addc %3, %0, %0\n"
96 " addc %%r0, %0, %0\n"
97 : "=r" (sum)
98 : "r" (daddr), "r"(saddr), "r"(proto+len), "0"(sum));
99 return sum;
100}
101
102/*
103 * computes the checksum of the TCP/UDP pseudo-header
104 * returns a 16-bit checksum, already complemented
105 */
106static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
107 unsigned short len,
108 unsigned short proto,
109 __wsum sum)
110{
111 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
112}
113
114/*
115 * this routine is used for miscellaneous IP-like checksums, mainly
116 * in icmp.c
117 */
118static inline __sum16 ip_compute_csum(const void *buf, int len)
119{
120 return csum_fold (csum_partial(buf, len, 0));
121}
122
123
124#define _HAVE_ARCH_IPV6_CSUM
125static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
126 const struct in6_addr *daddr,
127 __u32 len, unsigned short proto,
128 __wsum sum)
129{
130 __asm__ __volatile__ (
131
132#if BITS_PER_LONG > 32
133
134 /*
135 ** We can execute two loads and two adds per cycle on PA 8000.
136 ** But add insn's get serialized waiting for the carry bit.
137 ** Try to keep 4 registers with "live" values ahead of the ALU.
138 */
139
140" ldd,ma 8(%1), %%r19\n" /* get 1st saddr word */
141" ldd,ma 8(%2), %%r20\n" /* get 1st daddr word */
142" add %8, %3, %3\n"/* add 16-bit proto + len */
143" add %%r19, %0, %0\n"
144" ldd,ma 8(%1), %%r21\n" /* 2cd saddr */
145" ldd,ma 8(%2), %%r22\n" /* 2cd daddr */
146" add,dc %%r20, %0, %0\n"
147" add,dc %%r21, %0, %0\n"
148" add,dc %%r22, %0, %0\n"
149" add,dc %3, %0, %0\n" /* fold in proto+len | carry bit */
150" extrd,u %0, 31, 32, %%r19\n" /* copy upper half down */
151" depdi 0, 31, 32, %0\n" /* clear upper half */
152" add %%r19, %0, %0\n" /* fold into 32-bits */
153" addc 0, %0, %0\n" /* add carry */
154
155#else
156
157 /*
158 ** For PA 1.x, the insn order doesn't matter as much.
159 ** Insn stream is serialized on the carry bit here too.
160 ** result from the previous operation (eg r0 + x)
161 */
162
163" ldw,ma 4(%1), %%r19\n" /* get 1st saddr word */
164" ldw,ma 4(%2), %%r20\n" /* get 1st daddr word */
165" add %8, %3, %3\n" /* add 16-bit proto + len */
166" add %%r19, %0, %0\n"
167" ldw,ma 4(%1), %%r21\n" /* 2cd saddr */
168" addc %%r20, %0, %0\n"
169" ldw,ma 4(%2), %%r22\n" /* 2cd daddr */
170" addc %%r21, %0, %0\n"
171" ldw,ma 4(%1), %%r19\n" /* 3rd saddr */
172" addc %%r22, %0, %0\n"
173" ldw,ma 4(%2), %%r20\n" /* 3rd daddr */
174" addc %%r19, %0, %0\n"
175" ldw,ma 4(%1), %%r21\n" /* 4th saddr */
176" addc %%r20, %0, %0\n"
177" ldw,ma 4(%2), %%r22\n" /* 4th daddr */
178" addc %%r21, %0, %0\n"
179" addc %%r22, %0, %0\n"
180" addc %3, %0, %0\n" /* fold in proto+len, catch carry */
181
182#endif
183 : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len)
184 : "0" (sum), "1" (saddr), "2" (daddr), "3" (len), "r" (proto)
185 : "r19", "r20", "r21", "r22");
186 return csum_fold(sum);
187}
188
189/*
190 * Copy and checksum to user
191 */
192#define HAVE_CSUM_COPY_USER
193static __inline__ __wsum csum_and_copy_to_user(const void *src,
194 void __user *dst,
195 int len, __wsum sum,
196 int *err_ptr)
197{
198 /* code stolen from include/asm-mips64 */
199 sum = csum_partial(src, len, sum);
200
201 if (copy_to_user(dst, src, len)) {
202 *err_ptr = -EFAULT;
203 return (__force __wsum)-1;
204 }
205
206 return sum;
207}
208
209#endif
210
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h
deleted file mode 100644
index 7f32611a7a5e..000000000000
--- a/include/asm-parisc/compat.h
+++ /dev/null
@@ -1,165 +0,0 @@
1#ifndef _ASM_PARISC_COMPAT_H
2#define _ASM_PARISC_COMPAT_H
3/*
4 * Architecture specific compatibility types
5 */
6#include <linux/types.h>
7#include <linux/sched.h>
8#include <linux/thread_info.h>
9
10#define COMPAT_USER_HZ 100
11
12typedef u32 compat_size_t;
13typedef s32 compat_ssize_t;
14typedef s32 compat_time_t;
15typedef s32 compat_clock_t;
16typedef s32 compat_pid_t;
17typedef u32 __compat_uid_t;
18typedef u32 __compat_gid_t;
19typedef u32 __compat_uid32_t;
20typedef u32 __compat_gid32_t;
21typedef u16 compat_mode_t;
22typedef u32 compat_ino_t;
23typedef u32 compat_dev_t;
24typedef s32 compat_off_t;
25typedef s64 compat_loff_t;
26typedef u16 compat_nlink_t;
27typedef u16 compat_ipc_pid_t;
28typedef s32 compat_daddr_t;
29typedef u32 compat_caddr_t;
30typedef s32 compat_timer_t;
31
32typedef s32 compat_int_t;
33typedef s32 compat_long_t;
34typedef s64 compat_s64;
35typedef u32 compat_uint_t;
36typedef u32 compat_ulong_t;
37typedef u64 compat_u64;
38
39struct compat_timespec {
40 compat_time_t tv_sec;
41 s32 tv_nsec;
42};
43
44struct compat_timeval {
45 compat_time_t tv_sec;
46 s32 tv_usec;
47};
48
49struct compat_stat {
50 compat_dev_t st_dev; /* dev_t is 32 bits on parisc */
51 compat_ino_t st_ino; /* 32 bits */
52 compat_mode_t st_mode; /* 16 bits */
53 compat_nlink_t st_nlink; /* 16 bits */
54 u16 st_reserved1; /* old st_uid */
55 u16 st_reserved2; /* old st_gid */
56 compat_dev_t st_rdev;
57 compat_off_t st_size;
58 compat_time_t st_atime;
59 u32 st_atime_nsec;
60 compat_time_t st_mtime;
61 u32 st_mtime_nsec;
62 compat_time_t st_ctime;
63 u32 st_ctime_nsec;
64 s32 st_blksize;
65 s32 st_blocks;
66 u32 __unused1; /* ACL stuff */
67 compat_dev_t __unused2; /* network */
68 compat_ino_t __unused3; /* network */
69 u32 __unused4; /* cnodes */
70 u16 __unused5; /* netsite */
71 short st_fstype;
72 compat_dev_t st_realdev;
73 u16 st_basemode;
74 u16 st_spareshort;
75 __compat_uid32_t st_uid;
76 __compat_gid32_t st_gid;
77 u32 st_spare4[3];
78};
79
80struct compat_flock {
81 short l_type;
82 short l_whence;
83 compat_off_t l_start;
84 compat_off_t l_len;
85 compat_pid_t l_pid;
86};
87
88struct compat_flock64 {
89 short l_type;
90 short l_whence;
91 compat_loff_t l_start;
92 compat_loff_t l_len;
93 compat_pid_t l_pid;
94};
95
96struct compat_statfs {
97 s32 f_type;
98 s32 f_bsize;
99 s32 f_blocks;
100 s32 f_bfree;
101 s32 f_bavail;
102 s32 f_files;
103 s32 f_ffree;
104 __kernel_fsid_t f_fsid;
105 s32 f_namelen;
106 s32 f_frsize;
107 s32 f_spare[5];
108};
109
110struct compat_sigcontext {
111 compat_int_t sc_flags;
112 compat_int_t sc_gr[32]; /* PSW in sc_gr[0] */
113 u64 sc_fr[32];
114 compat_int_t sc_iasq[2];
115 compat_int_t sc_iaoq[2];
116 compat_int_t sc_sar; /* cr11 */
117};
118
119#define COMPAT_RLIM_INFINITY 0xffffffff
120
121typedef u32 compat_old_sigset_t; /* at least 32 bits */
122
123#define _COMPAT_NSIG 64
124#define _COMPAT_NSIG_BPW 32
125
126typedef u32 compat_sigset_word;
127
128#define COMPAT_OFF_T_MAX 0x7fffffff
129#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
130
131/*
132 * A pointer passed in from user mode. This should not
133 * be used for syscall parameters, just declare them
134 * as pointers because the syscall entry code will have
135 * appropriately converted them already.
136 */
137typedef u32 compat_uptr_t;
138
139static inline void __user *compat_ptr(compat_uptr_t uptr)
140{
141 return (void __user *)(unsigned long)uptr;
142}
143
144static inline compat_uptr_t ptr_to_compat(void __user *uptr)
145{
146 return (u32)(unsigned long)uptr;
147}
148
149static __inline__ void __user *compat_alloc_user_space(long len)
150{
151 struct pt_regs *regs = &current->thread.regs;
152 return (void __user *)regs->gr[30];
153}
154
155static inline int __is_compat_task(struct task_struct *t)
156{
157 return test_ti_thread_flag(task_thread_info(t), TIF_32BIT);
158}
159
160static inline int is_compat_task(void)
161{
162 return __is_compat_task(current);
163}
164
165#endif /* _ASM_PARISC_COMPAT_H */
diff --git a/include/asm-parisc/compat_rt_sigframe.h b/include/asm-parisc/compat_rt_sigframe.h
deleted file mode 100644
index 81bec28bdc48..000000000000
--- a/include/asm-parisc/compat_rt_sigframe.h
+++ /dev/null
@@ -1,50 +0,0 @@
1#include<linux/compat.h>
2#include<linux/compat_siginfo.h>
3#include<asm/compat_ucontext.h>
4
5#ifndef _ASM_PARISC_COMPAT_RT_SIGFRAME_H
6#define _ASM_PARISC_COMPAT_RT_SIGFRAME_H
7
8/* In a deft move of uber-hackery, we decide to carry the top half of all
9 * 64-bit registers in a non-portable, non-ABI, hidden structure.
10 * Userspace can read the hidden structure if it *wants* but is never
11 * guaranteed to be in the same place. Infact the uc_sigmask from the
12 * ucontext_t structure may push the hidden register file downards
13 */
14struct compat_regfile {
15 /* Upper half of all the 64-bit registers that were truncated
16 on a copy to a 32-bit userspace */
17 compat_int_t rf_gr[32];
18 compat_int_t rf_iasq[2];
19 compat_int_t rf_iaoq[2];
20 compat_int_t rf_sar;
21};
22
23#define COMPAT_SIGRETURN_TRAMP 4
24#define COMPAT_SIGRESTARTBLOCK_TRAMP 5
25#define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + COMPAT_SIGRESTARTBLOCK_TRAMP)
26
27struct compat_rt_sigframe {
28 /* XXX: Must match trampoline size in arch/parisc/kernel/signal.c
29 Secondary to that it must protect the ERESTART_RESTARTBLOCK
30 trampoline we left on the stack (we were bad and didn't
31 change sp so we could run really fast.) */
32 compat_uint_t tramp[COMPAT_TRAMP_SIZE];
33 compat_siginfo_t info;
34 struct compat_ucontext uc;
35 /* Hidden location of truncated registers, *must* be last. */
36 struct compat_regfile regs;
37};
38
39/*
40 * The 32-bit ABI wants at least 48 bytes for a function call frame:
41 * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
42 * which Linux/parisc uses is sp-20 for the saved return pointer...)
43 * Then, the stack pointer must be rounded to a cache line (64 bytes).
44 */
45#define SIGFRAME32 64
46#define FUNCTIONCALLFRAME32 48
47#define PARISC_RT_SIGFRAME_SIZE32 \
48 (((sizeof(struct compat_rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32)
49
50#endif
diff --git a/include/asm-parisc/compat_signal.h b/include/asm-parisc/compat_signal.h
deleted file mode 100644
index 6ad02c360b21..000000000000
--- a/include/asm-parisc/compat_signal.h
+++ /dev/null
@@ -1,2 +0,0 @@
1/* Use generic */
2#include <asm-generic/compat_signal.h>
diff --git a/include/asm-parisc/compat_ucontext.h b/include/asm-parisc/compat_ucontext.h
deleted file mode 100644
index 2f7292afde3c..000000000000
--- a/include/asm-parisc/compat_ucontext.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef _ASM_PARISC_COMPAT_UCONTEXT_H
2#define _ASM_PARISC_COMPAT_UCONTEXT_H
3
4#include <linux/compat.h>
5
6/* 32-bit ucontext as seen from an 64-bit kernel */
7struct compat_ucontext {
8 compat_uint_t uc_flags;
9 compat_uptr_t uc_link;
10 compat_stack_t uc_stack; /* struct compat_sigaltstack (12 bytes)*/
11 /* FIXME: Pad out to get uc_mcontext to start at an 8-byte aligned boundary */
12 compat_uint_t pad[1];
13 struct compat_sigcontext uc_mcontext;
14 compat_sigset_t uc_sigmask; /* mask last for extensibility */
15};
16
17#endif /* !_ASM_PARISC_COMPAT_UCONTEXT_H */
diff --git a/include/asm-parisc/cputime.h b/include/asm-parisc/cputime.h
deleted file mode 100644
index dcdf2fbd7e72..000000000000
--- a/include/asm-parisc/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __PARISC_CPUTIME_H
2#define __PARISC_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __PARISC_CPUTIME_H */
diff --git a/include/asm-parisc/current.h b/include/asm-parisc/current.h
deleted file mode 100644
index 0fb9338e3bf2..000000000000
--- a/include/asm-parisc/current.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _PARISC_CURRENT_H
2#define _PARISC_CURRENT_H
3
4#include <linux/thread_info.h>
5
6struct task_struct;
7
8static inline struct task_struct * get_current(void)
9{
10 return current_thread_info()->task;
11}
12
13#define current get_current()
14
15#endif /* !(_PARISC_CURRENT_H) */
diff --git a/include/asm-parisc/delay.h b/include/asm-parisc/delay.h
deleted file mode 100644
index 7a75e984674b..000000000000
--- a/include/asm-parisc/delay.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef _PARISC_DELAY_H
2#define _PARISC_DELAY_H
3
4#include <asm/system.h> /* for mfctl() */
5#include <asm/processor.h> /* for boot_cpu_data */
6
7
8/*
9 * Copyright (C) 1993 Linus Torvalds
10 *
11 * Delay routines
12 */
13
14static __inline__ void __delay(unsigned long loops) {
15 asm volatile(
16 " .balignl 64,0x34000034\n"
17 " addib,UV -1,%0,.\n"
18 " nop\n"
19 : "=r" (loops) : "0" (loops));
20}
21
22static __inline__ void __cr16_delay(unsigned long clocks) {
23 unsigned long start;
24
25 /*
26 * Note: Due to unsigned math, cr16 rollovers shouldn't be
27 * a problem here. However, on 32 bit, we need to make sure
28 * we don't pass in too big a value. The current default
29 * value of MAX_UDELAY_MS should help prevent this.
30 */
31
32 start = mfctl(16);
33 while ((mfctl(16) - start) < clocks)
34 ;
35}
36
37static __inline__ void __udelay(unsigned long usecs) {
38 __cr16_delay(usecs * ((unsigned long)boot_cpu_data.cpu_hz / 1000000UL));
39}
40
41#define udelay(n) __udelay(n)
42
43#endif /* defined(_PARISC_DELAY_H) */
diff --git a/include/asm-parisc/device.h b/include/asm-parisc/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-parisc/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-parisc/div64.h b/include/asm-parisc/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/include/asm-parisc/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h
deleted file mode 100644
index 53af696f23d2..000000000000
--- a/include/asm-parisc/dma-mapping.h
+++ /dev/null
@@ -1,253 +0,0 @@
1#ifndef _PARISC_DMA_MAPPING_H
2#define _PARISC_DMA_MAPPING_H
3
4#include <linux/mm.h>
5#include <asm/cacheflush.h>
6#include <asm/scatterlist.h>
7
8/* See Documentation/DMA-mapping.txt */
9struct hppa_dma_ops {
10 int (*dma_supported)(struct device *dev, u64 mask);
11 void *(*alloc_consistent)(struct device *dev, size_t size, dma_addr_t *iova, gfp_t flag);
12 void *(*alloc_noncoherent)(struct device *dev, size_t size, dma_addr_t *iova, gfp_t flag);
13 void (*free_consistent)(struct device *dev, size_t size, void *vaddr, dma_addr_t iova);
14 dma_addr_t (*map_single)(struct device *dev, void *addr, size_t size, enum dma_data_direction direction);
15 void (*unmap_single)(struct device *dev, dma_addr_t iova, size_t size, enum dma_data_direction direction);
16 int (*map_sg)(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction);
17 void (*unmap_sg)(struct device *dev, struct scatterlist *sg, int nhwents, enum dma_data_direction direction);
18 void (*dma_sync_single_for_cpu)(struct device *dev, dma_addr_t iova, unsigned long offset, size_t size, enum dma_data_direction direction);
19 void (*dma_sync_single_for_device)(struct device *dev, dma_addr_t iova, unsigned long offset, size_t size, enum dma_data_direction direction);
20 void (*dma_sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction direction);
21 void (*dma_sync_sg_for_device)(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction direction);
22};
23
24/*
25** We could live without the hppa_dma_ops indirection if we didn't want
26** to support 4 different coherent dma models with one binary (they will
27** someday be loadable modules):
28** I/O MMU consistent method dma_sync behavior
29** ============= ====================== =======================
30** a) PA-7x00LC uncachable host memory flush/purge
31** b) U2/Uturn cachable host memory NOP
32** c) Ike/Astro cachable host memory NOP
33** d) EPIC/SAGA memory on EPIC/SAGA flush/reset DMA channel
34**
35** PA-7[13]00LC processors have a GSC bus interface and no I/O MMU.
36**
37** Systems (eg PCX-T workstations) that don't fall into the above
38** categories will need to modify the needed drivers to perform
39** flush/purge and allocate "regular" cacheable pages for everything.
40*/
41
42#ifdef CONFIG_PA11
43extern struct hppa_dma_ops pcxl_dma_ops;
44extern struct hppa_dma_ops pcx_dma_ops;
45#endif
46
47extern struct hppa_dma_ops *hppa_dma_ops;
48
49static inline void *
50dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
51 gfp_t flag)
52{
53 return hppa_dma_ops->alloc_consistent(dev, size, dma_handle, flag);
54}
55
56static inline void *
57dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
58 gfp_t flag)
59{
60 return hppa_dma_ops->alloc_noncoherent(dev, size, dma_handle, flag);
61}
62
63static inline void
64dma_free_coherent(struct device *dev, size_t size,
65 void *vaddr, dma_addr_t dma_handle)
66{
67 hppa_dma_ops->free_consistent(dev, size, vaddr, dma_handle);
68}
69
70static inline void
71dma_free_noncoherent(struct device *dev, size_t size,
72 void *vaddr, dma_addr_t dma_handle)
73{
74 hppa_dma_ops->free_consistent(dev, size, vaddr, dma_handle);
75}
76
77static inline dma_addr_t
78dma_map_single(struct device *dev, void *ptr, size_t size,
79 enum dma_data_direction direction)
80{
81 return hppa_dma_ops->map_single(dev, ptr, size, direction);
82}
83
84static inline void
85dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
86 enum dma_data_direction direction)
87{
88 hppa_dma_ops->unmap_single(dev, dma_addr, size, direction);
89}
90
91static inline int
92dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
93 enum dma_data_direction direction)
94{
95 return hppa_dma_ops->map_sg(dev, sg, nents, direction);
96}
97
98static inline void
99dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
100 enum dma_data_direction direction)
101{
102 hppa_dma_ops->unmap_sg(dev, sg, nhwentries, direction);
103}
104
105static inline dma_addr_t
106dma_map_page(struct device *dev, struct page *page, unsigned long offset,
107 size_t size, enum dma_data_direction direction)
108{
109 return dma_map_single(dev, (page_address(page) + (offset)), size, direction);
110}
111
112static inline void
113dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
114 enum dma_data_direction direction)
115{
116 dma_unmap_single(dev, dma_address, size, direction);
117}
118
119
120static inline void
121dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
122 enum dma_data_direction direction)
123{
124 if(hppa_dma_ops->dma_sync_single_for_cpu)
125 hppa_dma_ops->dma_sync_single_for_cpu(dev, dma_handle, 0, size, direction);
126}
127
128static inline void
129dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size,
130 enum dma_data_direction direction)
131{
132 if(hppa_dma_ops->dma_sync_single_for_device)
133 hppa_dma_ops->dma_sync_single_for_device(dev, dma_handle, 0, size, direction);
134}
135
136static inline void
137dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
138 unsigned long offset, size_t size,
139 enum dma_data_direction direction)
140{
141 if(hppa_dma_ops->dma_sync_single_for_cpu)
142 hppa_dma_ops->dma_sync_single_for_cpu(dev, dma_handle, offset, size, direction);
143}
144
145static inline void
146dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
147 unsigned long offset, size_t size,
148 enum dma_data_direction direction)
149{
150 if(hppa_dma_ops->dma_sync_single_for_device)
151 hppa_dma_ops->dma_sync_single_for_device(dev, dma_handle, offset, size, direction);
152}
153
154static inline void
155dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
156 enum dma_data_direction direction)
157{
158 if(hppa_dma_ops->dma_sync_sg_for_cpu)
159 hppa_dma_ops->dma_sync_sg_for_cpu(dev, sg, nelems, direction);
160}
161
162static inline void
163dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
164 enum dma_data_direction direction)
165{
166 if(hppa_dma_ops->dma_sync_sg_for_device)
167 hppa_dma_ops->dma_sync_sg_for_device(dev, sg, nelems, direction);
168}
169
170static inline int
171dma_supported(struct device *dev, u64 mask)
172{
173 return hppa_dma_ops->dma_supported(dev, mask);
174}
175
176static inline int
177dma_set_mask(struct device *dev, u64 mask)
178{
179 if(!dev->dma_mask || !dma_supported(dev, mask))
180 return -EIO;
181
182 *dev->dma_mask = mask;
183
184 return 0;
185}
186
187static inline int
188dma_get_cache_alignment(void)
189{
190 return dcache_stride;
191}
192
193static inline int
194dma_is_consistent(struct device *dev, dma_addr_t dma_addr)
195{
196 return (hppa_dma_ops->dma_sync_single_for_cpu == NULL);
197}
198
199static inline void
200dma_cache_sync(struct device *dev, void *vaddr, size_t size,
201 enum dma_data_direction direction)
202{
203 if(hppa_dma_ops->dma_sync_single_for_cpu)
204 flush_kernel_dcache_range((unsigned long)vaddr, size);
205}
206
207static inline void *
208parisc_walk_tree(struct device *dev)
209{
210 struct device *otherdev;
211 if(likely(dev->platform_data != NULL))
212 return dev->platform_data;
213 /* OK, just traverse the bus to find it */
214 for(otherdev = dev->parent; otherdev;
215 otherdev = otherdev->parent) {
216 if(otherdev->platform_data) {
217 dev->platform_data = otherdev->platform_data;
218 break;
219 }
220 }
221 BUG_ON(!dev->platform_data);
222 return dev->platform_data;
223}
224
225#define GET_IOC(dev) (HBA_DATA(parisc_walk_tree(dev))->iommu);
226
227
228#ifdef CONFIG_IOMMU_CCIO
229struct parisc_device;
230struct ioc;
231void * ccio_get_iommu(const struct parisc_device *dev);
232int ccio_request_resource(const struct parisc_device *dev,
233 struct resource *res);
234int ccio_allocate_resource(const struct parisc_device *dev,
235 struct resource *res, unsigned long size,
236 unsigned long min, unsigned long max, unsigned long align);
237#else /* !CONFIG_IOMMU_CCIO */
238#define ccio_get_iommu(dev) NULL
239#define ccio_request_resource(dev, res) insert_resource(&iomem_resource, res)
240#define ccio_allocate_resource(dev, res, size, min, max, align) \
241 allocate_resource(&iomem_resource, res, size, min, max, \
242 align, NULL, NULL)
243#endif /* !CONFIG_IOMMU_CCIO */
244
245#ifdef CONFIG_IOMMU_SBA
246struct parisc_device;
247void * sba_get_iommu(struct parisc_device *dev);
248#endif
249
250/* At the moment, we panic on error for IOMMU resource exaustion */
251#define dma_mapping_error(dev, x) 0
252
253#endif
diff --git a/include/asm-parisc/dma.h b/include/asm-parisc/dma.h
deleted file mode 100644
index 31ad0f05af3d..000000000000
--- a/include/asm-parisc/dma.h
+++ /dev/null
@@ -1,186 +0,0 @@
1/* $Id: dma.h,v 1.2 1999/04/27 00:46:18 deller Exp $
2 * linux/include/asm/dma.h: Defines for using and allocating dma channels.
3 * Written by Hennus Bergman, 1992.
4 * High DMA channel support & info by Hannu Savolainen
5 * and John Boyd, Nov. 1992.
6 * (c) Copyright 2000, Grant Grundler
7 */
8
9#ifndef _ASM_DMA_H
10#define _ASM_DMA_H
11
12#include <asm/io.h> /* need byte IO */
13#include <asm/system.h>
14
15#define dma_outb outb
16#define dma_inb inb
17
18/*
19** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
20** (or rather not merge) DMAs into manageable chunks.
21** On parisc, this is more of the software/tuning constraint
22** rather than the HW. I/O MMU allocation algorithms can be
23** faster with smaller sizes (to some degree).
24*/
25#define DMA_CHUNK_SIZE (BITS_PER_LONG*PAGE_SIZE)
26
27/* The maximum address that we can perform a DMA transfer to on this platform
28** New dynamic DMA interfaces should obsolete this....
29*/
30#define MAX_DMA_ADDRESS (~0UL)
31
32/*
33** We don't have DMA channels... well V-class does but the
34** Dynamic DMA Mapping interface will support them... right? :^)
35** Note: this is not relevant right now for PA-RISC, but we cannot
36** leave this as undefined because some things (e.g. sound)
37** won't compile :-(
38*/
39#define MAX_DMA_CHANNELS 8
40#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */
41#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */
42#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */
43
44#define DMA_AUTOINIT 0x10
45
46/* 8237 DMA controllers */
47#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */
48#define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */
49
50/* DMA controller registers */
51#define DMA1_CMD_REG 0x08 /* command register (w) */
52#define DMA1_STAT_REG 0x08 /* status register (r) */
53#define DMA1_REQ_REG 0x09 /* request register (w) */
54#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */
55#define DMA1_MODE_REG 0x0B /* mode register (w) */
56#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */
57#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */
58#define DMA1_RESET_REG 0x0D /* Master Clear (w) */
59#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */
60#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */
61#define DMA1_EXT_MODE_REG (0x400 | DMA1_MODE_REG)
62
63#define DMA2_CMD_REG 0xD0 /* command register (w) */
64#define DMA2_STAT_REG 0xD0 /* status register (r) */
65#define DMA2_REQ_REG 0xD2 /* request register (w) */
66#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */
67#define DMA2_MODE_REG 0xD6 /* mode register (w) */
68#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */
69#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */
70#define DMA2_RESET_REG 0xDA /* Master Clear (w) */
71#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */
72#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */
73#define DMA2_EXT_MODE_REG (0x400 | DMA2_MODE_REG)
74
75static __inline__ unsigned long claim_dma_lock(void)
76{
77 return 0;
78}
79
80static __inline__ void release_dma_lock(unsigned long flags)
81{
82}
83
84
85/* Get DMA residue count. After a DMA transfer, this
86 * should return zero. Reading this while a DMA transfer is
87 * still in progress will return unpredictable results.
88 * If called before the channel has been used, it may return 1.
89 * Otherwise, it returns the number of _bytes_ left to transfer.
90 *
91 * Assumes DMA flip-flop is clear.
92 */
93static __inline__ int get_dma_residue(unsigned int dmanr)
94{
95 unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE
96 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE;
97
98 /* using short to get 16-bit wrap around */
99 unsigned short count;
100
101 count = 1 + dma_inb(io_port);
102 count += dma_inb(io_port) << 8;
103
104 return (dmanr<=3)? count : (count<<1);
105}
106
107/* enable/disable a specific DMA channel */
108static __inline__ void enable_dma(unsigned int dmanr)
109{
110#ifdef CONFIG_SUPERIO
111 if (dmanr<=3)
112 dma_outb(dmanr, DMA1_MASK_REG);
113 else
114 dma_outb(dmanr & 3, DMA2_MASK_REG);
115#endif
116}
117
118static __inline__ void disable_dma(unsigned int dmanr)
119{
120#ifdef CONFIG_SUPERIO
121 if (dmanr<=3)
122 dma_outb(dmanr | 4, DMA1_MASK_REG);
123 else
124 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG);
125#endif
126}
127
128/* reserve a DMA channel */
129#define request_dma(dmanr, device_id) (0)
130
131/* Clear the 'DMA Pointer Flip Flop'.
132 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
133 * Use this once to initialize the FF to a known state.
134 * After that, keep track of it. :-)
135 * --- In order to do that, the DMA routines below should ---
136 * --- only be used while holding the DMA lock ! ---
137 */
138static __inline__ void clear_dma_ff(unsigned int dmanr)
139{
140}
141
142/* set mode (above) for a specific DMA channel */
143static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
144{
145}
146
147/* Set only the page register bits of the transfer address.
148 * This is used for successive transfers when we know the contents of
149 * the lower 16 bits of the DMA current address register, but a 64k boundary
150 * may have been crossed.
151 */
152static __inline__ void set_dma_page(unsigned int dmanr, char pagenr)
153{
154}
155
156
157/* Set transfer address & page bits for specific DMA channel.
158 * Assumes dma flipflop is clear.
159 */
160static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
161{
162}
163
164
165/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
166 * a specific DMA channel.
167 * You must ensure the parameters are valid.
168 * NOTE: from a manual: "the number of transfers is one more
169 * than the initial word count"! This is taken into account.
170 * Assumes dma flip-flop is clear.
171 * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
172 */
173static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
174{
175}
176
177
178#define free_dma(dmanr)
179
180#ifdef CONFIG_PCI
181extern int isa_dma_bridge_buggy;
182#else
183#define isa_dma_bridge_buggy (0)
184#endif
185
186#endif /* _ASM_DMA_H */
diff --git a/include/asm-parisc/eisa_bus.h b/include/asm-parisc/eisa_bus.h
deleted file mode 100644
index 201085f83dd5..000000000000
--- a/include/asm-parisc/eisa_bus.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * eisa_bus.h interface between the eisa BA driver and the bus enumerator
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Copyright (c) 2002 Daniel Engstrom <5116@telia.com>
10 *
11 */
12
13#ifndef ASM_EISA_H
14#define ASM_EISA_H
15
16extern void eisa_make_irq_level(int num);
17extern void eisa_make_irq_edge(int num);
18extern int eisa_enumerator(unsigned long eeprom_addr,
19 struct resource *io_parent,
20 struct resource *mem_parent);
21extern int eisa_eeprom_init(unsigned long addr);
22
23#endif
diff --git a/include/asm-parisc/eisa_eeprom.h b/include/asm-parisc/eisa_eeprom.h
deleted file mode 100644
index 9c9da980402a..000000000000
--- a/include/asm-parisc/eisa_eeprom.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/*
2 * eisa_eeprom.h - provide support for EISA adapters in PA-RISC machines
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Copyright (c) 2001, 2002 Daniel Engstrom <5116@telia.com>
10 *
11 */
12
13#ifndef ASM_EISA_EEPROM_H
14#define ASM_EISA_EEPROM_H
15
16extern void __iomem *eisa_eeprom_addr;
17
18#define HPEE_MAX_LENGTH 0x2000 /* maximum eeprom length */
19
20#define HPEE_SLOT_INFO(slot) (20+(48*slot))
21
22struct eeprom_header
23{
24
25 u_int32_t num_writes; /* number of writes */
26 u_int8_t flags; /* flags, usage? */
27 u_int8_t ver_maj;
28 u_int8_t ver_min;
29 u_int8_t num_slots; /* number of EISA slots in system */
30 u_int16_t csum; /* checksum, I don't know how to calulate this */
31 u_int8_t pad[10];
32} __attribute__ ((packed));
33
34
35struct eeprom_eisa_slot_info
36{
37 u_int32_t eisa_slot_id;
38 u_int32_t config_data_offset;
39 u_int32_t num_writes;
40 u_int16_t csum;
41 u_int16_t num_functions;
42 u_int16_t config_data_length;
43
44 /* bits 0..3 are the duplicate slot id */
45#define HPEE_SLOT_INFO_EMBEDDED 0x10
46#define HPEE_SLOT_INFO_VIRTUAL 0x20
47#define HPEE_SLOT_INFO_NO_READID 0x40
48#define HPEE_SLOT_INFO_DUPLICATE 0x80
49 u_int8_t slot_info;
50
51#define HPEE_SLOT_FEATURES_ENABLE 0x01
52#define HPEE_SLOT_FEATURES_IOCHK 0x02
53#define HPEE_SLOT_FEATURES_CFG_INCOMPLETE 0x80
54 u_int8_t slot_features;
55
56 u_int8_t ver_min;
57 u_int8_t ver_maj;
58
59#define HPEE_FUNCTION_INFO_HAVE_TYPE 0x01
60#define HPEE_FUNCTION_INFO_HAVE_MEMORY 0x02
61#define HPEE_FUNCTION_INFO_HAVE_IRQ 0x04
62#define HPEE_FUNCTION_INFO_HAVE_DMA 0x08
63#define HPEE_FUNCTION_INFO_HAVE_PORT 0x10
64#define HPEE_FUNCTION_INFO_HAVE_PORT_INIT 0x20
65/* I think there are two slighty different
66 * versions of the function_info field
67 * one int the fixed header and one optional
68 * in the parsed slot data area */
69#define HPEE_FUNCTION_INFO_HAVE_FUNCTION 0x01
70#define HPEE_FUNCTION_INFO_F_DISABLED 0x80
71#define HPEE_FUNCTION_INFO_CFG_FREE_FORM 0x40
72 u_int8_t function_info;
73
74#define HPEE_FLAG_BOARD_IS_ISA 0x01 /* flag and minor version for isa board */
75 u_int8_t flags;
76 u_int8_t pad[24];
77} __attribute__ ((packed));
78
79
80#define HPEE_MEMORY_MAX_ENT 9
81/* memory descriptor: byte 0 */
82#define HPEE_MEMORY_WRITABLE 0x01
83#define HPEE_MEMORY_CACHABLE 0x02
84#define HPEE_MEMORY_TYPE_MASK 0x18
85#define HPEE_MEMORY_TYPE_SYS 0x00
86#define HPEE_MEMORY_TYPE_EXP 0x08
87#define HPEE_MEMORY_TYPE_VIR 0x10
88#define HPEE_MEMORY_TYPE_OTH 0x18
89#define HPEE_MEMORY_SHARED 0x20
90#define HPEE_MEMORY_MORE 0x80
91
92/* memory descriptor: byte 1 */
93#define HPEE_MEMORY_WIDTH_MASK 0x03
94#define HPEE_MEMORY_WIDTH_BYTE 0x00
95#define HPEE_MEMORY_WIDTH_WORD 0x01
96#define HPEE_MEMORY_WIDTH_DWORD 0x02
97#define HPEE_MEMORY_DECODE_MASK 0x0c
98#define HPEE_MEMORY_DECODE_20BITS 0x00
99#define HPEE_MEMORY_DECODE_24BITS 0x04
100#define HPEE_MEMORY_DECODE_32BITS 0x08
101/* byte 2 and 3 are a 16bit LE value
102 * containging the memory size in kilobytes */
103/* byte 4,5,6 are a 24bit LE value
104 * containing the memory base address */
105
106
107#define HPEE_IRQ_MAX_ENT 7
108/* Interrupt entry: byte 0 */
109#define HPEE_IRQ_CHANNEL_MASK 0xf
110#define HPEE_IRQ_TRIG_LEVEL 0x20
111#define HPEE_IRQ_MORE 0x80
112/* byte 1 seems to be unused */
113
114#define HPEE_DMA_MAX_ENT 4
115
116/* dma entry: byte 0 */
117#define HPEE_DMA_CHANNEL_MASK 7
118#define HPEE_DMA_SIZE_MASK 0xc
119#define HPEE_DMA_SIZE_BYTE 0x0
120#define HPEE_DMA_SIZE_WORD 0x4
121#define HPEE_DMA_SIZE_DWORD 0x8
122#define HPEE_DMA_SHARED 0x40
123#define HPEE_DMA_MORE 0x80
124
125/* dma entry: byte 1 */
126#define HPEE_DMA_TIMING_MASK 0x30
127#define HPEE_DMA_TIMING_ISA 0x0
128#define HPEE_DMA_TIMING_TYPEA 0x10
129#define HPEE_DMA_TIMING_TYPEB 0x20
130#define HPEE_DMA_TIMING_TYPEC 0x30
131
132#define HPEE_PORT_MAX_ENT 20
133/* port entry byte 0 */
134#define HPEE_PORT_SIZE_MASK 0x1f
135#define HPEE_PORT_SHARED 0x40
136#define HPEE_PORT_MORE 0x80
137/* byte 1 and 2 is a 16bit LE value
138 * conating the start port number */
139
140#define HPEE_PORT_INIT_MAX_LEN 60 /* in bytes here */
141/* port init entry byte 0 */
142#define HPEE_PORT_INIT_WIDTH_MASK 0x3
143#define HPEE_PORT_INIT_WIDTH_BYTE 0x0
144#define HPEE_PORT_INIT_WIDTH_WORD 0x1
145#define HPEE_PORT_INIT_WIDTH_DWORD 0x2
146#define HPEE_PORT_INIT_MASK 0x4
147#define HPEE_PORT_INIT_MORE 0x80
148
149#define HPEE_SELECTION_MAX_ENT 26
150
151#define HPEE_TYPE_MAX_LEN 80
152
153#endif
diff --git a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h
deleted file mode 100644
index d0a4a8262818..000000000000
--- a/include/asm-parisc/elf.h
+++ /dev/null
@@ -1,342 +0,0 @@
1#ifndef __ASMPARISC_ELF_H
2#define __ASMPARISC_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9
10#define EM_PARISC 15
11
12/* HPPA specific definitions. */
13
14/* Legal values for e_flags field of Elf32_Ehdr. */
15
16#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */
17#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */
18#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */
19#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */
20#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch
21 prediction. */
22#define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */
23#define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */
24
25/* Defined values for `e_flags & EF_PARISC_ARCH' are: */
26
27#define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */
28#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
29#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */
30
31/* Additional section indices. */
32
33#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
34 symbols in ANSI C. */
35#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */
36
37/* Legal values for sh_type field of Elf32_Shdr. */
38
39#define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */
40#define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */
41#define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */
42
43/* Legal values for sh_flags field of Elf32_Shdr. */
44
45#define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */
46#define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */
47#define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */
48
49/* Legal values for ST_TYPE subfield of st_info (symbol type). */
50
51#define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */
52
53#define STT_HP_OPAQUE (STT_LOOS + 0x1)
54#define STT_HP_STUB (STT_LOOS + 0x2)
55
56/* HPPA relocs. */
57
58#define R_PARISC_NONE 0 /* No reloc. */
59#define R_PARISC_DIR32 1 /* Direct 32-bit reference. */
60#define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */
61#define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */
62#define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */
63#define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */
64#define R_PARISC_PCREL32 9 /* 32-bit rel. address. */
65#define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */
66#define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */
67#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
68#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
69#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
70#define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
71#define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
72#define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
73#define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
74#define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
75#define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
76#define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
77#define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
78#define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
79#define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
80#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
81#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
82#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
83#define R_PARISC_FPTR64 64 /* 64 bits function address. */
84#define R_PARISC_PLABEL32 65 /* 32 bits function address. */
85#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
86#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
87#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
88#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
89#define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */
90#define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */
91#define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */
92#define R_PARISC_DIR64 80 /* 64 bits of eff. address. */
93#define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */
94#define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */
95#define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */
96#define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */
97#define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */
98#define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */
99#define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */
100#define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */
101#define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */
102#define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */
103#define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */
104#define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */
105#define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */
106#define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */
107#define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */
108#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
109#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
110#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
111#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
112#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
113#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
114#define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */
115#define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */
116#define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */
117#define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */
118#define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */
119#define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */
120#define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */
121#define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */
122#define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */
123#define R_PARISC_LORESERVE 128
124#define R_PARISC_COPY 128 /* Copy relocation. */
125#define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */
126#define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */
127#define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */
128#define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */
129#define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */
130#define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */
131#define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/
132#define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */
133#define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */
134#define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */
135#define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */
136#define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */
137#define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */
138#define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */
139#define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */
140#define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/
141#define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/
142#define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */
143#define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */
144#define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */
145#define R_PARISC_HIRESERVE 255
146
147#define PA_PLABEL_FDESC 0x02 /* bit set if PLABEL points to
148 * a function descriptor, not
149 * an address */
150
151/* The following are PA function descriptors
152 *
153 * addr: the absolute address of the function
154 * gp: either the data pointer (r27) for non-PIC code or the
155 * the PLT pointer (r19) for PIC code */
156
157/* Format for the Elf32 Function descriptor */
158typedef struct elf32_fdesc {
159 __u32 addr;
160 __u32 gp;
161} Elf32_Fdesc;
162
163/* Format for the Elf64 Function descriptor */
164typedef struct elf64_fdesc {
165 __u64 dummy[2]; /* FIXME: nothing uses these, why waste
166 * the space */
167 __u64 addr;
168 __u64 gp;
169} Elf64_Fdesc;
170
171/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */
172
173#define PT_HP_TLS (PT_LOOS + 0x0)
174#define PT_HP_CORE_NONE (PT_LOOS + 0x1)
175#define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
176#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
177#define PT_HP_CORE_COMM (PT_LOOS + 0x4)
178#define PT_HP_CORE_PROC (PT_LOOS + 0x5)
179#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
180#define PT_HP_CORE_STACK (PT_LOOS + 0x7)
181#define PT_HP_CORE_SHM (PT_LOOS + 0x8)
182#define PT_HP_CORE_MMF (PT_LOOS + 0x9)
183#define PT_HP_PARALLEL (PT_LOOS + 0x10)
184#define PT_HP_FASTBIND (PT_LOOS + 0x11)
185#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
186#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
187#define PT_HP_STACK (PT_LOOS + 0x14)
188
189#define PT_PARISC_ARCHEXT 0x70000000
190#define PT_PARISC_UNWIND 0x70000001
191
192/* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */
193
194#define PF_PARISC_SBP 0x08000000
195
196#define PF_HP_PAGE_SIZE 0x00100000
197#define PF_HP_FAR_SHARED 0x00200000
198#define PF_HP_NEAR_SHARED 0x00400000
199#define PF_HP_CODE 0x01000000
200#define PF_HP_MODIFY 0x02000000
201#define PF_HP_LAZYSWAP 0x04000000
202#define PF_HP_SBP 0x08000000
203
204/*
205 * The following definitions are those for 32-bit ELF binaries on a 32-bit
206 * kernel and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries
207 * on a 64-bit kernel, arch/parisc/kernel/binfmt_elf32.c defines these
208 * macros appropriately and then #includes binfmt_elf.c, which then includes
209 * this file.
210 */
211#ifndef ELF_CLASS
212
213/*
214 * This is used to ensure we don't load something for the wrong architecture.
215 *
216 * Note that this header file is used by default in fs/binfmt_elf.c. So
217 * the following macros are for the default case. However, for the 64
218 * bit kernel we also support 32 bit parisc binaries. To do that
219 * arch/parisc/kernel/binfmt_elf32.c defines its own set of these
220 * macros, and then it includes fs/binfmt_elf.c to provide an alternate
221 * elf binary handler for 32 bit binaries (on the 64 bit kernel).
222 */
223#ifdef CONFIG_64BIT
224#define ELF_CLASS ELFCLASS64
225#else
226#define ELF_CLASS ELFCLASS32
227#endif
228
229typedef unsigned long elf_greg_t;
230
231/*
232 * This yields a string that ld.so will use to load implementation
233 * specific libraries for optimization. This is more specific in
234 * intent than poking at uname or /proc/cpuinfo.
235 */
236
237#define ELF_PLATFORM ("PARISC\0")
238
239#define SET_PERSONALITY(ex, ibcs2) \
240 current->personality = PER_LINUX; \
241 current->thread.map_base = DEFAULT_MAP_BASE; \
242 current->thread.task_size = DEFAULT_TASK_SIZE \
243
244/*
245 * Fill in general registers in a core dump. This saves pretty
246 * much the same registers as hp-ux, although in a different order.
247 * Registers marked # below are not currently saved in pt_regs, so
248 * we use their current values here.
249 *
250 * gr0..gr31
251 * sr0..sr7
252 * iaoq0..iaoq1
253 * iasq0..iasq1
254 * cr11 (sar)
255 * cr19 (iir)
256 * cr20 (isr)
257 * cr21 (ior)
258 * # cr22 (ipsw)
259 * # cr0 (recovery counter)
260 * # cr24..cr31 (temporary registers)
261 * # cr8,9,12,13 (protection IDs)
262 * # cr10 (scr/ccr)
263 * # cr15 (ext int enable mask)
264 *
265 */
266
267#define ELF_CORE_COPY_REGS(dst, pt) \
268 memset(dst, 0, sizeof(dst)); /* don't leak any "random" bits */ \
269 memcpy(dst + 0, pt->gr, 32 * sizeof(elf_greg_t)); \
270 memcpy(dst + 32, pt->sr, 8 * sizeof(elf_greg_t)); \
271 memcpy(dst + 40, pt->iaoq, 2 * sizeof(elf_greg_t)); \
272 memcpy(dst + 42, pt->iasq, 2 * sizeof(elf_greg_t)); \
273 dst[44] = pt->sar; dst[45] = pt->iir; \
274 dst[46] = pt->isr; dst[47] = pt->ior; \
275 dst[48] = mfctl(22); dst[49] = mfctl(0); \
276 dst[50] = mfctl(24); dst[51] = mfctl(25); \
277 dst[52] = mfctl(26); dst[53] = mfctl(27); \
278 dst[54] = mfctl(28); dst[55] = mfctl(29); \
279 dst[56] = mfctl(30); dst[57] = mfctl(31); \
280 dst[58] = mfctl( 8); dst[59] = mfctl( 9); \
281 dst[60] = mfctl(12); dst[61] = mfctl(13); \
282 dst[62] = mfctl(10); dst[63] = mfctl(15);
283
284#endif /* ! ELF_CLASS */
285
286#define ELF_NGREG 80 /* We only need 64 at present, but leave space
287 for expansion. */
288typedef elf_greg_t elf_gregset_t[ELF_NGREG];
289
290#define ELF_NFPREG 32
291typedef double elf_fpreg_t;
292typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
293
294struct task_struct;
295
296extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
297#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
298
299struct pt_regs; /* forward declaration... */
300
301
302#define elf_check_arch(x) ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS)
303
304/*
305 * These are used to set parameters in the core dumps.
306 */
307#define ELF_DATA ELFDATA2MSB
308#define ELF_ARCH EM_PARISC
309#define ELF_OSABI ELFOSABI_LINUX
310
311/* %r23 is set by ld.so to a pointer to a function which might be
312 registered using atexit. This provides a means for the dynamic
313 linker to call DT_FINI functions for shared libraries that have
314 been loaded before the code runs.
315
316 So that we can use the same startup file with static executables,
317 we start programs with a value of 0 to indicate that there is no
318 such function. */
319#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0
320
321#define USE_ELF_CORE_DUMP
322#define ELF_EXEC_PAGESIZE 4096
323
324/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
325 use of this is to invoke "./ld.so someprog" to test out a new version of
326 the loader. We need to make sure that it is out of the way of the program
327 that it will "exec", and that there is sufficient room for the brk.
328
329 (2 * TASK_SIZE / 3) turns into something undefined when run through a
330 32 bit preprocessor and in some cases results in the kernel trying to map
331 ld.so to the kernel virtual base. Use a sane value instead. /Jes
332 */
333
334#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
335
336/* This yields a mask that user programs can use to figure out what
337 instruction set this CPU supports. This could be done in user space,
338 but it's not easy, and we've already done it here. */
339
340#define ELF_HWCAP 0
341
342#endif
diff --git a/include/asm-parisc/emergency-restart.h b/include/asm-parisc/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/include/asm-parisc/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-parisc/errno.h b/include/asm-parisc/errno.h
deleted file mode 100644
index e2f3ddc796be..000000000000
--- a/include/asm-parisc/errno.h
+++ /dev/null
@@ -1,124 +0,0 @@
1#ifndef _PARISC_ERRNO_H
2#define _PARISC_ERRNO_H
3
4#include <asm-generic/errno-base.h>
5
6#define ENOMSG 35 /* No message of desired type */
7#define EIDRM 36 /* Identifier removed */
8#define ECHRNG 37 /* Channel number out of range */
9#define EL2NSYNC 38 /* Level 2 not synchronized */
10#define EL3HLT 39 /* Level 3 halted */
11#define EL3RST 40 /* Level 3 reset */
12#define ELNRNG 41 /* Link number out of range */
13#define EUNATCH 42 /* Protocol driver not attached */
14#define ENOCSI 43 /* No CSI structure available */
15#define EL2HLT 44 /* Level 2 halted */
16#define EDEADLK 45 /* Resource deadlock would occur */
17#define EDEADLOCK EDEADLK
18#define ENOLCK 46 /* No record locks available */
19#define EILSEQ 47 /* Illegal byte sequence */
20
21#define ENONET 50 /* Machine is not on the network */
22#define ENODATA 51 /* No data available */
23#define ETIME 52 /* Timer expired */
24#define ENOSR 53 /* Out of streams resources */
25#define ENOSTR 54 /* Device not a stream */
26#define ENOPKG 55 /* Package not installed */
27
28#define ENOLINK 57 /* Link has been severed */
29#define EADV 58 /* Advertise error */
30#define ESRMNT 59 /* Srmount error */
31#define ECOMM 60 /* Communication error on send */
32#define EPROTO 61 /* Protocol error */
33
34#define EMULTIHOP 64 /* Multihop attempted */
35
36#define EDOTDOT 66 /* RFS specific error */
37#define EBADMSG 67 /* Not a data message */
38#define EUSERS 68 /* Too many users */
39#define EDQUOT 69 /* Quota exceeded */
40#define ESTALE 70 /* Stale NFS file handle */
41#define EREMOTE 71 /* Object is remote */
42#define EOVERFLOW 72 /* Value too large for defined data type */
43
44/* these errnos are defined by Linux but not HPUX. */
45
46#define EBADE 160 /* Invalid exchange */
47#define EBADR 161 /* Invalid request descriptor */
48#define EXFULL 162 /* Exchange full */
49#define ENOANO 163 /* No anode */
50#define EBADRQC 164 /* Invalid request code */
51#define EBADSLT 165 /* Invalid slot */
52#define EBFONT 166 /* Bad font file format */
53#define ENOTUNIQ 167 /* Name not unique on network */
54#define EBADFD 168 /* File descriptor in bad state */
55#define EREMCHG 169 /* Remote address changed */
56#define ELIBACC 170 /* Can not access a needed shared library */
57#define ELIBBAD 171 /* Accessing a corrupted shared library */
58#define ELIBSCN 172 /* .lib section in a.out corrupted */
59#define ELIBMAX 173 /* Attempting to link in too many shared libraries */
60#define ELIBEXEC 174 /* Cannot exec a shared library directly */
61#define ERESTART 175 /* Interrupted system call should be restarted */
62#define ESTRPIPE 176 /* Streams pipe error */
63#define EUCLEAN 177 /* Structure needs cleaning */
64#define ENOTNAM 178 /* Not a XENIX named type file */
65#define ENAVAIL 179 /* No XENIX semaphores available */
66#define EISNAM 180 /* Is a named type file */
67#define EREMOTEIO 181 /* Remote I/O error */
68#define ENOMEDIUM 182 /* No medium found */
69#define EMEDIUMTYPE 183 /* Wrong medium type */
70#define ENOKEY 184 /* Required key not available */
71#define EKEYEXPIRED 185 /* Key has expired */
72#define EKEYREVOKED 186 /* Key has been revoked */
73#define EKEYREJECTED 187 /* Key was rejected by service */
74
75/* We now return you to your regularly scheduled HPUX. */
76
77#define ENOSYM 215 /* symbol does not exist in executable */
78#define ENOTSOCK 216 /* Socket operation on non-socket */
79#define EDESTADDRREQ 217 /* Destination address required */
80#define EMSGSIZE 218 /* Message too long */
81#define EPROTOTYPE 219 /* Protocol wrong type for socket */
82#define ENOPROTOOPT 220 /* Protocol not available */
83#define EPROTONOSUPPORT 221 /* Protocol not supported */
84#define ESOCKTNOSUPPORT 222 /* Socket type not supported */
85#define EOPNOTSUPP 223 /* Operation not supported on transport endpoint */
86#define EPFNOSUPPORT 224 /* Protocol family not supported */
87#define EAFNOSUPPORT 225 /* Address family not supported by protocol */
88#define EADDRINUSE 226 /* Address already in use */
89#define EADDRNOTAVAIL 227 /* Cannot assign requested address */
90#define ENETDOWN 228 /* Network is down */
91#define ENETUNREACH 229 /* Network is unreachable */
92#define ENETRESET 230 /* Network dropped connection because of reset */
93#define ECONNABORTED 231 /* Software caused connection abort */
94#define ECONNRESET 232 /* Connection reset by peer */
95#define ENOBUFS 233 /* No buffer space available */
96#define EISCONN 234 /* Transport endpoint is already connected */
97#define ENOTCONN 235 /* Transport endpoint is not connected */
98#define ESHUTDOWN 236 /* Cannot send after transport endpoint shutdown */
99#define ETOOMANYREFS 237 /* Too many references: cannot splice */
100#define EREFUSED ECONNREFUSED /* for HP's NFS apparently */
101#define ETIMEDOUT 238 /* Connection timed out */
102#define ECONNREFUSED 239 /* Connection refused */
103#define EREMOTERELEASE 240 /* Remote peer released connection */
104#define EHOSTDOWN 241 /* Host is down */
105#define EHOSTUNREACH 242 /* No route to host */
106
107#define EALREADY 244 /* Operation already in progress */
108#define EINPROGRESS 245 /* Operation now in progress */
109#define EWOULDBLOCK 246 /* Operation would block (Linux returns EAGAIN) */
110#define ENOTEMPTY 247 /* Directory not empty */
111#define ENAMETOOLONG 248 /* File name too long */
112#define ELOOP 249 /* Too many symbolic links encountered */
113#define ENOSYS 251 /* Function not implemented */
114
115#define ENOTSUP 252 /* Function not implemented (POSIX.4 / HPUX) */
116#define ECANCELLED 253 /* aio request was canceled before complete (POSIX.4 / HPUX) */
117#define ECANCELED ECANCELLED /* SuSv3 and Solaris wants one 'L' */
118
119/* for robust mutexes */
120#define EOWNERDEAD 254 /* Owner died */
121#define ENOTRECOVERABLE 255 /* State not recoverable */
122
123
124#endif
diff --git a/include/asm-parisc/fb.h b/include/asm-parisc/fb.h
deleted file mode 100644
index 4d503a023ab2..000000000000
--- a/include/asm-parisc/fb.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7
8static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
9 unsigned long off)
10{
11 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
12}
13
14static inline int fb_is_primary_device(struct fb_info *info)
15{
16 return 0;
17}
18
19#endif /* _ASM_FB_H_ */
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h
deleted file mode 100644
index 1e1c824764ee..000000000000
--- a/include/asm-parisc/fcntl.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef _PARISC_FCNTL_H
2#define _PARISC_FCNTL_H
3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_APPEND 000000010
7#define O_BLKSEEK 000000100 /* HPUX only */
8#define O_CREAT 000000400 /* not fcntl */
9#define O_EXCL 000002000 /* not fcntl */
10#define O_LARGEFILE 000004000
11#define O_SYNC 000100000
12#define O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */
13#define O_NOCTTY 000400000 /* not fcntl */
14#define O_DSYNC 001000000 /* HPUX only */
15#define O_RSYNC 002000000 /* HPUX only */
16#define O_NOATIME 004000000
17#define O_CLOEXEC 010000000 /* set close_on_exec */
18
19#define O_DIRECTORY 000010000 /* must be a directory */
20#define O_NOFOLLOW 000000200 /* don't follow links */
21#define O_INVISIBLE 004000000 /* invisible I/O, for DMAPI/XDSM */
22
23#define F_GETLK64 8
24#define F_SETLK64 9
25#define F_SETLKW64 10
26
27#define F_GETOWN 11 /* for sockets. */
28#define F_SETOWN 12 /* for sockets. */
29#define F_SETSIG 13 /* for sockets. */
30#define F_GETSIG 14 /* for sockets. */
31
32/* for posix fcntl() and lockf() */
33#define F_RDLCK 01
34#define F_WRLCK 02
35#define F_UNLCK 03
36
37#include <asm-generic/fcntl.h>
38
39#endif
diff --git a/include/asm-parisc/fixmap.h b/include/asm-parisc/fixmap.h
deleted file mode 100644
index de3fe3a18229..000000000000
--- a/include/asm-parisc/fixmap.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _ASM_FIXMAP_H
2#define _ASM_FIXMAP_H
3
4/*
5 * This file defines the locations of the fixed mappings on parisc.
6 *
7 * All of the values in this file are machine virtual addresses.
8 *
9 * All of the values in this file must be <4GB (because of assembly
10 * loading restrictions). If you place this region anywhere above
11 * __PAGE_OFFSET, you must adjust the memory map accordingly */
12
13/* The alias region is used in kernel space to do copy/clear to or
14 * from areas congruently mapped with user space. It is 8MB large
15 * and must be 16MB aligned */
16#define TMPALIAS_MAP_START ((__PAGE_OFFSET) - 16*1024*1024)
17/* This is the kernel area for all maps (vmalloc, dma etc.) most
18 * usually, it extends up to TMPALIAS_MAP_START. Virtual addresses
19 * 0..GATEWAY_PAGE_SIZE are reserved for the gateway page */
20#define KERNEL_MAP_START (GATEWAY_PAGE_SIZE)
21#define KERNEL_MAP_END (TMPALIAS_MAP_START)
22
23#ifndef __ASSEMBLY__
24extern void *vmalloc_start;
25#define PCXL_DMA_MAP_SIZE (8*1024*1024)
26#define VMALLOC_START ((unsigned long)vmalloc_start)
27#define VMALLOC_END (KERNEL_MAP_END)
28#endif /*__ASSEMBLY__*/
29
30#endif /*_ASM_FIXMAP_H*/
diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h
deleted file mode 100644
index 4ca69f558fae..000000000000
--- a/include/asm-parisc/floppy.h
+++ /dev/null
@@ -1,271 +0,0 @@
1/* Architecture specific parts of the Floppy driver
2 *
3 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
4 * Copyright (C) 2000 Matthew Wilcox (willy a debian . org)
5 * Copyright (C) 2000 Dave Kennedy
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_PARISC_FLOPPY_H
22#define __ASM_PARISC_FLOPPY_H
23
24#include <linux/vmalloc.h>
25
26
27/*
28 * The DMA channel used by the floppy controller cannot access data at
29 * addresses >= 16MB
30 *
31 * Went back to the 1MB limit, as some people had problems with the floppy
32 * driver otherwise. It doesn't matter much for performance anyway, as most
33 * floppy accesses go through the track buffer.
34 */
35#define _CROSS_64KB(a,s,vdma) \
36(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
37
38#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
39
40
41#define SW fd_routine[use_virtual_dma&1]
42#define CSW fd_routine[can_use_virtual_dma & 1]
43
44
45#define fd_inb(port) readb(port)
46#define fd_outb(value, port) writeb(value, port)
47
48#define fd_request_dma() CSW._request_dma(FLOPPY_DMA,"floppy")
49#define fd_free_dma() CSW._free_dma(FLOPPY_DMA)
50#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
51#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
52#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
53#define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA)
54#define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size)
55#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
56
57#define FLOPPY_CAN_FALLBACK_ON_NODMA
58
59static int virtual_dma_count=0;
60static int virtual_dma_residue=0;
61static char *virtual_dma_addr=0;
62static int virtual_dma_mode=0;
63static int doing_pdma=0;
64
65static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
66{
67 register unsigned char st;
68
69#undef TRACE_FLPY_INT
70
71#ifdef TRACE_FLPY_INT
72 static int calls=0;
73 static int bytes=0;
74 static int dma_wait=0;
75#endif
76 if (!doing_pdma) {
77 floppy_interrupt(irq, dev_id, regs);
78 return;
79 }
80
81#ifdef TRACE_FLPY_INT
82 if(!calls)
83 bytes = virtual_dma_count;
84#endif
85
86 {
87 register int lcount;
88 register char *lptr = virtual_dma_addr;
89
90 for (lcount = virtual_dma_count; lcount; lcount--) {
91 st = fd_inb(virtual_dma_port+4) & 0xa0 ;
92 if (st != 0xa0)
93 break;
94 if (virtual_dma_mode) {
95 fd_outb(*lptr, virtual_dma_port+5);
96 } else {
97 *lptr = fd_inb(virtual_dma_port+5);
98 }
99 lptr++;
100 }
101 virtual_dma_count = lcount;
102 virtual_dma_addr = lptr;
103 st = fd_inb(virtual_dma_port+4);
104 }
105
106#ifdef TRACE_FLPY_INT
107 calls++;
108#endif
109 if (st == 0x20)
110 return;
111 if (!(st & 0x20)) {
112 virtual_dma_residue += virtual_dma_count;
113 virtual_dma_count = 0;
114#ifdef TRACE_FLPY_INT
115 printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
116 virtual_dma_count, virtual_dma_residue, calls, bytes,
117 dma_wait);
118 calls = 0;
119 dma_wait=0;
120#endif
121 doing_pdma = 0;
122 floppy_interrupt(irq, dev_id, regs);
123 return;
124 }
125#ifdef TRACE_FLPY_INT
126 if (!virtual_dma_count)
127 dma_wait++;
128#endif
129}
130
131static void fd_disable_dma(void)
132{
133 if(! (can_use_virtual_dma & 1))
134 disable_dma(FLOPPY_DMA);
135 doing_pdma = 0;
136 virtual_dma_residue += virtual_dma_count;
137 virtual_dma_count=0;
138}
139
140static int vdma_request_dma(unsigned int dmanr, const char * device_id)
141{
142 return 0;
143}
144
145static void vdma_nop(unsigned int dummy)
146{
147}
148
149
150static int vdma_get_dma_residue(unsigned int dummy)
151{
152 return virtual_dma_count + virtual_dma_residue;
153}
154
155
156static int fd_request_irq(void)
157{
158 if(can_use_virtual_dma)
159 return request_irq(FLOPPY_IRQ, floppy_hardint,
160 IRQF_DISABLED, "floppy", NULL);
161 else
162 return request_irq(FLOPPY_IRQ, floppy_interrupt,
163 IRQF_DISABLED, "floppy", NULL);
164}
165
166static unsigned long dma_mem_alloc(unsigned long size)
167{
168 return __get_dma_pages(GFP_KERNEL, get_order(size));
169}
170
171
172static unsigned long vdma_mem_alloc(unsigned long size)
173{
174 return (unsigned long) vmalloc(size);
175
176}
177
178#define nodma_mem_alloc(size) vdma_mem_alloc(size)
179
180static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
181{
182 if((unsigned int) addr >= (unsigned int) high_memory)
183 return vfree((void *)addr);
184 else
185 free_pages(addr, get_order(size));
186}
187
188#define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size)
189
190static void _fd_chose_dma_mode(char *addr, unsigned long size)
191{
192 if(can_use_virtual_dma == 2) {
193 if((unsigned int) addr >= (unsigned int) high_memory ||
194 virt_to_bus(addr) >= 0x1000000 ||
195 _CROSS_64KB(addr, size, 0))
196 use_virtual_dma = 1;
197 else
198 use_virtual_dma = 0;
199 } else {
200 use_virtual_dma = can_use_virtual_dma & 1;
201 }
202}
203
204#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
205
206
207static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
208{
209 doing_pdma = 1;
210 virtual_dma_port = io;
211 virtual_dma_mode = (mode == DMA_MODE_WRITE);
212 virtual_dma_addr = addr;
213 virtual_dma_count = size;
214 virtual_dma_residue = 0;
215 return 0;
216}
217
218static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
219{
220#ifdef FLOPPY_SANITY_CHECK
221 if (CROSS_64KB(addr, size)) {
222 printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
223 return -1;
224 }
225#endif
226 /* actual, physical DMA */
227 doing_pdma = 0;
228 clear_dma_ff(FLOPPY_DMA);
229 set_dma_mode(FLOPPY_DMA,mode);
230 set_dma_addr(FLOPPY_DMA,virt_to_bus(addr));
231 set_dma_count(FLOPPY_DMA,size);
232 enable_dma(FLOPPY_DMA);
233 return 0;
234}
235
236static struct fd_routine_l {
237 int (*_request_dma)(unsigned int dmanr, const char * device_id);
238 void (*_free_dma)(unsigned int dmanr);
239 int (*_get_dma_residue)(unsigned int dummy);
240 unsigned long (*_dma_mem_alloc) (unsigned long size);
241 int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
242} fd_routine[] = {
243 {
244 request_dma,
245 free_dma,
246 get_dma_residue,
247 dma_mem_alloc,
248 hard_dma_setup
249 },
250 {
251 vdma_request_dma,
252 vdma_nop,
253 vdma_get_dma_residue,
254 vdma_mem_alloc,
255 vdma_dma_setup
256 }
257};
258
259
260static int FDC1 = 0x3f0; /* Lies. Floppy controller is memory mapped, not io mapped */
261static int FDC2 = -1;
262
263#define FLOPPY0_TYPE 0
264#define FLOPPY1_TYPE 0
265
266#define N_FDC 1
267#define N_DRIVE 8
268
269#define EXTRA_FLOPPY_PARAMS
270
271#endif /* __ASM_PARISC_FLOPPY_H */
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h
deleted file mode 100644
index 0c705c3a55ef..000000000000
--- a/include/asm-parisc/futex.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef _ASM_PARISC_FUTEX_H
2#define _ASM_PARISC_FUTEX_H
3
4#ifdef __KERNEL__
5
6#include <linux/futex.h>
7#include <linux/uaccess.h>
8#include <asm/errno.h>
9
10static inline int
11futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
12{
13 int op = (encoded_op >> 28) & 7;
14 int cmp = (encoded_op >> 24) & 15;
15 int oparg = (encoded_op << 8) >> 20;
16 int cmparg = (encoded_op << 20) >> 20;
17 int oldval = 0, ret;
18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
19 oparg = 1 << oparg;
20
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT;
23
24 pagefault_disable();
25
26 switch (op) {
27 case FUTEX_OP_SET:
28 case FUTEX_OP_ADD:
29 case FUTEX_OP_OR:
30 case FUTEX_OP_ANDN:
31 case FUTEX_OP_XOR:
32 default:
33 ret = -ENOSYS;
34 }
35
36 pagefault_enable();
37
38 if (!ret) {
39 switch (cmp) {
40 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
41 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
42 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
43 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
44 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
45 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
46 default: ret = -ENOSYS;
47 }
48 }
49 return ret;
50}
51
52/* Non-atomic version */
53static inline int
54futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
55{
56 int err = 0;
57 int uval;
58
59 /* futex.c wants to do a cmpxchg_inatomic on kernel NULL, which is
60 * our gateway page, and causes no end of trouble...
61 */
62 if (segment_eq(KERNEL_DS, get_fs()) && !uaddr)
63 return -EFAULT;
64
65 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
66 return -EFAULT;
67
68 err = get_user(uval, uaddr);
69 if (err) return -EFAULT;
70 if (uval == oldval)
71 err = put_user(newval, uaddr);
72 if (err) return -EFAULT;
73 return uval;
74}
75
76#endif /*__KERNEL__*/
77#endif /*_ASM_PARISC_FUTEX_H*/
diff --git a/include/asm-parisc/grfioctl.h b/include/asm-parisc/grfioctl.h
deleted file mode 100644
index 671e06042b40..000000000000
--- a/include/asm-parisc/grfioctl.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/* Architecture specific parts of HP's STI (framebuffer) driver.
2 * Structures are HP-UX compatible for XFree86 usage.
3 *
4 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
5 * Copyright (C) 2001 Helge Deller (deller a parisc-linux org)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ASM_PARISC_GRFIOCTL_H
23#define __ASM_PARISC_GRFIOCTL_H
24
25/* upper 32 bits of graphics id (HP/UX identifier) */
26
27#define GRFGATOR 8
28#define S9000_ID_S300 9
29#define GRFBOBCAT 9
30#define GRFCATSEYE 9
31#define S9000_ID_98720 10
32#define GRFRBOX 10
33#define S9000_ID_98550 11
34#define GRFFIREEYE 11
35#define S9000_ID_A1096A 12
36#define GRFHYPERION 12
37#define S9000_ID_FRI 13
38#define S9000_ID_98730 14
39#define GRFDAVINCI 14
40#define S9000_ID_98705 0x26C08070 /* Tigershark */
41#define S9000_ID_98736 0x26D148AB
42#define S9000_ID_A1659A 0x26D1482A /* CRX 8 plane color (=ELK) */
43#define S9000_ID_ELK S9000_ID_A1659A
44#define S9000_ID_A1439A 0x26D148EE /* CRX24 = CRX+ (24-plane color) */
45#define S9000_ID_A1924A 0x26D1488C /* GRX gray-scale */
46#define S9000_ID_ELM S9000_ID_A1924A
47#define S9000_ID_98765 0x27480DEF
48#define S9000_ID_ELK_768 0x27482101
49#define S9000_ID_STINGER 0x27A4A402
50#define S9000_ID_TIMBER 0x27F12392 /* Bushmaster (710) Graphics */
51#define S9000_ID_TOMCAT 0x27FCCB6D /* dual-headed ELK (Dual CRX) */
52#define S9000_ID_ARTIST 0x2B4DED6D /* Artist (Gecko/712 & 715) onboard Graphics */
53#define S9000_ID_HCRX 0x2BCB015A /* Hyperdrive/Hyperbowl (A4071A) Graphics */
54#define CRX24_OVERLAY_PLANES 0x920825AA /* Overlay planes on CRX24 */
55
56#define CRT_ID_ELK_1024 S9000_ID_ELK_768 /* Elk 1024x768 CRX */
57#define CRT_ID_ELK_1280 S9000_ID_A1659A /* Elk 1280x1024 CRX */
58#define CRT_ID_ELK_1024DB 0x27849CA5 /* Elk 1024x768 double buffer */
59#define CRT_ID_ELK_GS S9000_ID_A1924A /* Elk 1280x1024 GreyScale */
60#define CRT_ID_CRX24 S9000_ID_A1439A /* Piranha */
61#define CRT_ID_VISUALIZE_EG 0x2D08C0A7 /* Graffiti, A4450A (built-in B132+/B160L) */
62#define CRT_ID_THUNDER 0x2F23E5FC /* Thunder 1 VISUALIZE 48*/
63#define CRT_ID_THUNDER2 0x2F8D570E /* Thunder 2 VISUALIZE 48 XP*/
64#define CRT_ID_HCRX S9000_ID_HCRX /* Hyperdrive HCRX */
65#define CRT_ID_CRX48Z S9000_ID_STINGER /* Stinger */
66#define CRT_ID_DUAL_CRX S9000_ID_TOMCAT /* Tomcat */
67#define CRT_ID_PVRX S9000_ID_98705 /* Tigershark */
68#define CRT_ID_TIMBER S9000_ID_TIMBER /* Timber (710 builtin) */
69#define CRT_ID_TVRX S9000_ID_98765 /* TVRX (gto/falcon) */
70#define CRT_ID_ARTIST S9000_ID_ARTIST /* Artist */
71#define CRT_ID_SUMMIT 0x2FC1066B /* Summit FX2, FX4, FX6 ... */
72#define CRT_ID_LEGO 0x35ACDA30 /* Lego FX5, FX10 ... */
73#define CRT_ID_PINNACLE 0x35ACDA16 /* Pinnacle FXe */
74
75/* structure for ioctl(GCDESCRIBE) */
76
77#define gaddr_t unsigned long /* FIXME: PA2.0 (64bit) portable ? */
78
79struct grf_fbinfo {
80 unsigned int id; /* upper 32 bits of graphics id */
81 unsigned int mapsize; /* mapped size of framebuffer */
82 unsigned int dwidth, dlength;/* x and y sizes */
83 unsigned int width, length; /* total x and total y size */
84 unsigned int xlen; /* x pitch size */
85 unsigned int bpp, bppu; /* bits per pixel and used bpp */
86 unsigned int npl, nplbytes; /* # of planes and bytes per plane */
87 char name[32]; /* name of the device (from ROM) */
88 unsigned int attr; /* attributes */
89 gaddr_t fbbase, regbase;/* framebuffer and register base addr */
90 gaddr_t regions[6]; /* region bases */
91};
92
93#define GCID _IOR('G', 0, int)
94#define GCON _IO('G', 1)
95#define GCOFF _IO('G', 2)
96#define GCAON _IO('G', 3)
97#define GCAOFF _IO('G', 4)
98#define GCMAP _IOWR('G', 5, int)
99#define GCUNMAP _IOWR('G', 6, int)
100#define GCMAP_HPUX _IO('G', 5)
101#define GCUNMAP_HPUX _IO('G', 6)
102#define GCLOCK _IO('G', 7)
103#define GCUNLOCK _IO('G', 8)
104#define GCLOCK_MINIMUM _IO('G', 9)
105#define GCUNLOCK_MINIMUM _IO('G', 10)
106#define GCSTATIC_CMAP _IO('G', 11)
107#define GCVARIABLE_CMAP _IO('G', 12)
108#define GCTERM _IOWR('G',20,int) /* multi-headed Tomcat */
109#define GCDESCRIBE _IOR('G', 21, struct grf_fbinfo)
110#define GCFASTLOCK _IO('G', 26)
111
112#endif /* __ASM_PARISC_GRFIOCTL_H */
113
diff --git a/include/asm-parisc/hardirq.h b/include/asm-parisc/hardirq.h
deleted file mode 100644
index ce93133d5112..000000000000
--- a/include/asm-parisc/hardirq.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* hardirq.h: PA-RISC hard IRQ support.
2 *
3 * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
4 *
5 * The locking is really quite interesting. There's a cpu-local
6 * count of how many interrupts are being handled, and a global
7 * lock. An interrupt can only be serviced if the global lock
8 * is free. You can't be sure no more interrupts are being
9 * serviced until you've acquired the lock and then checked
10 * all the per-cpu interrupt counts are all zero. It's a specialised
11 * br_lock, and that's exactly how Sparc does it. We don't because
12 * it's more locking for us. This way is lock-free in the interrupt path.
13 */
14
15#ifndef _PARISC_HARDIRQ_H
16#define _PARISC_HARDIRQ_H
17
18#include <linux/threads.h>
19#include <linux/irq.h>
20
21typedef struct {
22 unsigned long __softirq_pending; /* set_bit is used on this */
23} ____cacheline_aligned irq_cpustat_t;
24
25#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
26
27void ack_bad_irq(unsigned int irq);
28
29#endif /* _PARISC_HARDIRQ_H */
diff --git a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h
deleted file mode 100644
index 4e9626836bab..000000000000
--- a/include/asm-parisc/hardware.h
+++ /dev/null
@@ -1,127 +0,0 @@
1#ifndef _PARISC_HARDWARE_H
2#define _PARISC_HARDWARE_H
3
4#include <linux/mod_devicetable.h>
5#include <asm/pdc.h>
6
7#define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID
8#define HVERSION_ANY_ID PA_HVERSION_ANY_ID
9#define HVERSION_REV_ANY_ID PA_HVERSION_REV_ANY_ID
10#define SVERSION_ANY_ID PA_SVERSION_ANY_ID
11
12struct hp_hardware {
13 unsigned short hw_type:5; /* HPHW_xxx */
14 unsigned short hversion;
15 unsigned long sversion:28;
16 unsigned short opt;
17 const char name[80]; /* The hardware description */
18};
19
20struct parisc_device;
21
22enum cpu_type {
23 pcx = 0, /* pa7000 pa 1.0 */
24 pcxs = 1, /* pa7000 pa 1.1a */
25 pcxt = 2, /* pa7100 pa 1.1b */
26 pcxt_ = 3, /* pa7200 (t') pa 1.1c */
27 pcxl = 4, /* pa7100lc pa 1.1d */
28 pcxl2 = 5, /* pa7300lc pa 1.1e */
29 pcxu = 6, /* pa8000 pa 2.0 */
30 pcxu_ = 7, /* pa8200 (u+) pa 2.0 */
31 pcxw = 8, /* pa8500 pa 2.0 */
32 pcxw_ = 9, /* pa8600 (w+) pa 2.0 */
33 pcxw2 = 10, /* pa8700 pa 2.0 */
34 mako = 11, /* pa8800 pa 2.0 */
35 mako2 = 12 /* pa8900 pa 2.0 */
36};
37
38extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
39
40struct parisc_driver;
41
42struct io_module {
43 volatile uint32_t nothing; /* reg 0 */
44 volatile uint32_t io_eim;
45 volatile uint32_t io_dc_adata;
46 volatile uint32_t io_ii_cdata;
47 volatile uint32_t io_dma_link; /* reg 4 */
48 volatile uint32_t io_dma_command;
49 volatile uint32_t io_dma_address;
50 volatile uint32_t io_dma_count;
51 volatile uint32_t io_flex; /* reg 8 */
52 volatile uint32_t io_spa_address;
53 volatile uint32_t reserved1[2];
54 volatile uint32_t io_command; /* reg 12 */
55 volatile uint32_t io_status;
56 volatile uint32_t io_control;
57 volatile uint32_t io_data;
58 volatile uint32_t reserved2; /* reg 16 */
59 volatile uint32_t chain_addr;
60 volatile uint32_t sub_mask_clr;
61 volatile uint32_t reserved3[13];
62 volatile uint32_t undefined[480];
63 volatile uint32_t unpriv[512];
64};
65
66struct bc_module {
67 volatile uint32_t unused1[12];
68 volatile uint32_t io_command;
69 volatile uint32_t io_status;
70 volatile uint32_t io_control;
71 volatile uint32_t unused2[1];
72 volatile uint32_t io_err_resp;
73 volatile uint32_t io_err_info;
74 volatile uint32_t io_err_req;
75 volatile uint32_t unused3[11];
76 volatile uint32_t io_io_low;
77 volatile uint32_t io_io_high;
78};
79
80#define HPHW_NPROC 0
81#define HPHW_MEMORY 1
82#define HPHW_B_DMA 2
83#define HPHW_OBSOLETE 3
84#define HPHW_A_DMA 4
85#define HPHW_A_DIRECT 5
86#define HPHW_OTHER 6
87#define HPHW_BCPORT 7
88#define HPHW_CIO 8
89#define HPHW_CONSOLE 9
90#define HPHW_FIO 10
91#define HPHW_BA 11
92#define HPHW_IOA 12
93#define HPHW_BRIDGE 13
94#define HPHW_FABRIC 14
95#define HPHW_MC 15
96#define HPHW_FAULTY 31
97
98
99/* hardware.c: */
100extern const char *parisc_hardware_description(struct parisc_device_id *id);
101extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
102
103struct pci_dev;
104
105/* drivers.c: */
106extern struct parisc_device *alloc_pa_dev(unsigned long hpa,
107 struct hardware_path *path);
108extern int register_parisc_device(struct parisc_device *dev);
109extern int register_parisc_driver(struct parisc_driver *driver);
110extern int count_parisc_driver(struct parisc_driver *driver);
111extern int unregister_parisc_driver(struct parisc_driver *driver);
112extern void walk_central_bus(void);
113extern const struct parisc_device *find_pa_parent_type(const struct parisc_device *, int);
114extern void print_parisc_devices(void);
115extern char *print_pa_hwpath(struct parisc_device *dev, char *path);
116extern char *print_pci_hwpath(struct pci_dev *dev, char *path);
117extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path);
118extern void init_parisc_bus(void);
119extern struct device *hwpath_to_device(struct hardware_path *modpath);
120extern void device_to_hwpath(struct device *dev, struct hardware_path *path);
121
122
123/* inventory.c: */
124extern void do_memory_inventory(void);
125extern void do_device_inventory(void);
126
127#endif /* _PARISC_HARDWARE_H */
diff --git a/include/asm-parisc/hw_irq.h b/include/asm-parisc/hw_irq.h
deleted file mode 100644
index 6707f7df3921..000000000000
--- a/include/asm-parisc/hw_irq.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_HW_IRQ_H
2#define _ASM_HW_IRQ_H
3
4/*
5 * linux/include/asm/hw_irq.h
6 */
7
8#endif
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h
deleted file mode 100644
index c246ef75017d..000000000000
--- a/include/asm-parisc/ide.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * linux/include/asm-parisc/ide.h
3 *
4 * Copyright (C) 1994-1996 Linus Torvalds & authors
5 */
6
7/*
8 * This file contains the PARISC architecture specific IDE code.
9 */
10
11#ifndef __ASM_PARISC_IDE_H
12#define __ASM_PARISC_IDE_H
13
14#ifdef __KERNEL__
15
16#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
17#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
18#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
19#define ide_release_region(from,extent) release_region((from), (extent))
20/* Generic I/O and MEMIO string operations. */
21
22#define __ide_insw insw
23#define __ide_insl insl
24#define __ide_outsw outsw
25#define __ide_outsl outsl
26
27static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
28{
29 while (count--) {
30 *(u16 *)addr = __raw_readw(port);
31 addr += 2;
32 }
33}
34
35static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
36{
37 while (count--) {
38 *(u32 *)addr = __raw_readl(port);
39 addr += 4;
40 }
41}
42
43static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
44{
45 while (count--) {
46 __raw_writew(*(u16 *)addr, port);
47 addr += 2;
48 }
49}
50
51static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
52{
53 while (count--) {
54 __raw_writel(*(u32 *)addr, port);
55 addr += 4;
56 }
57}
58
59#endif /* __KERNEL__ */
60
61#endif /* __ASM_PARISC_IDE_H */
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h
deleted file mode 100644
index 55ddb1842107..000000000000
--- a/include/asm-parisc/io.h
+++ /dev/null
@@ -1,293 +0,0 @@
1#ifndef _ASM_IO_H
2#define _ASM_IO_H
3
4#include <linux/types.h>
5#include <asm/pgtable.h>
6
7extern unsigned long parisc_vmerge_boundary;
8extern unsigned long parisc_vmerge_max_size;
9
10#define BIO_VMERGE_BOUNDARY parisc_vmerge_boundary
11#define BIO_VMERGE_MAX_SIZE parisc_vmerge_max_size
12
13#define virt_to_phys(a) ((unsigned long)__pa(a))
14#define phys_to_virt(a) __va(a)
15#define virt_to_bus virt_to_phys
16#define bus_to_virt phys_to_virt
17
18static inline unsigned long isa_bus_to_virt(unsigned long addr) {
19 BUG();
20 return 0;
21}
22
23static inline unsigned long isa_virt_to_bus(void *addr) {
24 BUG();
25 return 0;
26}
27
28/*
29 * Memory mapped I/O
30 *
31 * readX()/writeX() do byteswapping and take an ioremapped address
32 * __raw_readX()/__raw_writeX() don't byteswap and take an ioremapped address.
33 * gsc_*() don't byteswap and operate on physical addresses;
34 * eg dev->hpa or 0xfee00000.
35 */
36
37static inline unsigned char gsc_readb(unsigned long addr)
38{
39 long flags;
40 unsigned char ret;
41
42 __asm__ __volatile__(
43 " rsm 2,%0\n"
44 " ldbx 0(%2),%1\n"
45 " mtsm %0\n"
46 : "=&r" (flags), "=r" (ret) : "r" (addr) );
47
48 return ret;
49}
50
51static inline unsigned short gsc_readw(unsigned long addr)
52{
53 long flags;
54 unsigned short ret;
55
56 __asm__ __volatile__(
57 " rsm 2,%0\n"
58 " ldhx 0(%2),%1\n"
59 " mtsm %0\n"
60 : "=&r" (flags), "=r" (ret) : "r" (addr) );
61
62 return ret;
63}
64
65static inline unsigned int gsc_readl(unsigned long addr)
66{
67 u32 ret;
68
69 __asm__ __volatile__(
70 " ldwax 0(%1),%0\n"
71 : "=r" (ret) : "r" (addr) );
72
73 return ret;
74}
75
76static inline unsigned long long gsc_readq(unsigned long addr)
77{
78 unsigned long long ret;
79
80#ifdef CONFIG_64BIT
81 __asm__ __volatile__(
82 " ldda 0(%1),%0\n"
83 : "=r" (ret) : "r" (addr) );
84#else
85 /* two reads may have side effects.. */
86 ret = ((u64) gsc_readl(addr)) << 32;
87 ret |= gsc_readl(addr+4);
88#endif
89 return ret;
90}
91
92static inline void gsc_writeb(unsigned char val, unsigned long addr)
93{
94 long flags;
95 __asm__ __volatile__(
96 " rsm 2,%0\n"
97 " stbs %1,0(%2)\n"
98 " mtsm %0\n"
99 : "=&r" (flags) : "r" (val), "r" (addr) );
100}
101
102static inline void gsc_writew(unsigned short val, unsigned long addr)
103{
104 long flags;
105 __asm__ __volatile__(
106 " rsm 2,%0\n"
107 " sths %1,0(%2)\n"
108 " mtsm %0\n"
109 : "=&r" (flags) : "r" (val), "r" (addr) );
110}
111
112static inline void gsc_writel(unsigned int val, unsigned long addr)
113{
114 __asm__ __volatile__(
115 " stwas %0,0(%1)\n"
116 : : "r" (val), "r" (addr) );
117}
118
119static inline void gsc_writeq(unsigned long long val, unsigned long addr)
120{
121#ifdef CONFIG_64BIT
122 __asm__ __volatile__(
123 " stda %0,0(%1)\n"
124 : : "r" (val), "r" (addr) );
125#else
126 /* two writes may have side effects.. */
127 gsc_writel(val >> 32, addr);
128 gsc_writel(val, addr+4);
129#endif
130}
131
132/*
133 * The standard PCI ioremap interfaces
134 */
135
136extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
137
138/* Most machines react poorly to I/O-space being cacheable... Instead let's
139 * define ioremap() in terms of ioremap_nocache().
140 */
141static inline void __iomem * ioremap(unsigned long offset, unsigned long size)
142{
143 return __ioremap(offset, size, _PAGE_NO_CACHE);
144}
145#define ioremap_nocache(off, sz) ioremap((off), (sz))
146
147extern void iounmap(const volatile void __iomem *addr);
148
149static inline unsigned char __raw_readb(const volatile void __iomem *addr)
150{
151 return (*(volatile unsigned char __force *) (addr));
152}
153static inline unsigned short __raw_readw(const volatile void __iomem *addr)
154{
155 return *(volatile unsigned short __force *) addr;
156}
157static inline unsigned int __raw_readl(const volatile void __iomem *addr)
158{
159 return *(volatile unsigned int __force *) addr;
160}
161static inline unsigned long long __raw_readq(const volatile void __iomem *addr)
162{
163 return *(volatile unsigned long long __force *) addr;
164}
165
166static inline void __raw_writeb(unsigned char b, volatile void __iomem *addr)
167{
168 *(volatile unsigned char __force *) addr = b;
169}
170static inline void __raw_writew(unsigned short b, volatile void __iomem *addr)
171{
172 *(volatile unsigned short __force *) addr = b;
173}
174static inline void __raw_writel(unsigned int b, volatile void __iomem *addr)
175{
176 *(volatile unsigned int __force *) addr = b;
177}
178static inline void __raw_writeq(unsigned long long b, volatile void __iomem *addr)
179{
180 *(volatile unsigned long long __force *) addr = b;
181}
182
183/* readb can never be const, so use __fswab instead of le*_to_cpu */
184#define readb(addr) __raw_readb(addr)
185#define readw(addr) __fswab16(__raw_readw(addr))
186#define readl(addr) __fswab32(__raw_readl(addr))
187#define readq(addr) __fswab64(__raw_readq(addr))
188#define writeb(b, addr) __raw_writeb(b, addr)
189#define writew(b, addr) __raw_writew(cpu_to_le16(b), addr)
190#define writel(b, addr) __raw_writel(cpu_to_le32(b), addr)
191#define writeq(b, addr) __raw_writeq(cpu_to_le64(b), addr)
192
193#define readb_relaxed(addr) readb(addr)
194#define readw_relaxed(addr) readw(addr)
195#define readl_relaxed(addr) readl(addr)
196#define readq_relaxed(addr) readq(addr)
197
198#define mmiowb() do { } while (0)
199
200void memset_io(volatile void __iomem *addr, unsigned char val, int count);
201void memcpy_fromio(void *dst, const volatile void __iomem *src, int count);
202void memcpy_toio(volatile void __iomem *dst, const void *src, int count);
203
204/* Port-space IO */
205
206#define inb_p inb
207#define inw_p inw
208#define inl_p inl
209#define outb_p outb
210#define outw_p outw
211#define outl_p outl
212
213extern unsigned char eisa_in8(unsigned short port);
214extern unsigned short eisa_in16(unsigned short port);
215extern unsigned int eisa_in32(unsigned short port);
216extern void eisa_out8(unsigned char data, unsigned short port);
217extern void eisa_out16(unsigned short data, unsigned short port);
218extern void eisa_out32(unsigned int data, unsigned short port);
219
220#if defined(CONFIG_PCI)
221extern unsigned char inb(int addr);
222extern unsigned short inw(int addr);
223extern unsigned int inl(int addr);
224
225extern void outb(unsigned char b, int addr);
226extern void outw(unsigned short b, int addr);
227extern void outl(unsigned int b, int addr);
228#elif defined(CONFIG_EISA)
229#define inb eisa_in8
230#define inw eisa_in16
231#define inl eisa_in32
232#define outb eisa_out8
233#define outw eisa_out16
234#define outl eisa_out32
235#else
236static inline char inb(unsigned long addr)
237{
238 BUG();
239 return -1;
240}
241
242static inline short inw(unsigned long addr)
243{
244 BUG();
245 return -1;
246}
247
248static inline int inl(unsigned long addr)
249{
250 BUG();
251 return -1;
252}
253
254#define outb(x, y) BUG()
255#define outw(x, y) BUG()
256#define outl(x, y) BUG()
257#endif
258
259/*
260 * String versions of in/out ops:
261 */
262extern void insb (unsigned long port, void *dst, unsigned long count);
263extern void insw (unsigned long port, void *dst, unsigned long count);
264extern void insl (unsigned long port, void *dst, unsigned long count);
265extern void outsb (unsigned long port, const void *src, unsigned long count);
266extern void outsw (unsigned long port, const void *src, unsigned long count);
267extern void outsl (unsigned long port, const void *src, unsigned long count);
268
269
270/* IO Port space is : BBiiii where BB is HBA number. */
271#define IO_SPACE_LIMIT 0x00ffffff
272
273/* PA machines have an MM I/O space from 0xf0000000-0xffffffff in 32
274 * bit mode and from 0xfffffffff0000000-0xfffffffffffffff in 64 bit
275 * mode (essentially just sign extending. This macro takes in a 32
276 * bit I/O address (still with the leading f) and outputs the correct
277 * value for either 32 or 64 bit mode */
278#define F_EXTEND(x) ((unsigned long)((x) | (0xffffffff00000000ULL)))
279
280#include <asm-generic/iomap.h>
281
282/*
283 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
284 * access
285 */
286#define xlate_dev_mem_ptr(p) __va(p)
287
288/*
289 * Convert a virtual cached pointer to an uncached pointer
290 */
291#define xlate_dev_kmem_ptr(p) p
292
293#endif
diff --git a/include/asm-parisc/ioctl.h b/include/asm-parisc/ioctl.h
deleted file mode 100644
index ec8efa02beda..000000000000
--- a/include/asm-parisc/ioctl.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
3 * Copyright (C) 1999,2003 Matthew Wilcox < willy at debian . org >
4 * portions from "linux/ioctl.h for Linux" by H.H. Bergman.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21
22#ifndef _ASM_PARISC_IOCTL_H
23#define _ASM_PARISC_IOCTL_H
24
25/* ioctl command encoding: 32 bits total, command in lower 16 bits,
26 * size of the parameter structure in the lower 14 bits of the
27 * upper 16 bits.
28 * Encoding the size of the parameter structure in the ioctl request
29 * is useful for catching programs compiled with old versions
30 * and to avoid overwriting user space outside the user buffer area.
31 * The highest 2 bits are reserved for indicating the ``access mode''.
32 * NOTE: This limits the max parameter size to 16kB -1 !
33 */
34
35/*
36 * Direction bits.
37 */
38#define _IOC_NONE 0U
39#define _IOC_WRITE 2U
40#define _IOC_READ 1U
41
42#include <asm-generic/ioctl.h>
43
44#endif /* _ASM_PARISC_IOCTL_H */
diff --git a/include/asm-parisc/ioctls.h b/include/asm-parisc/ioctls.h
deleted file mode 100644
index 6747fad07a3e..000000000000
--- a/include/asm-parisc/ioctls.h
+++ /dev/null
@@ -1,90 +0,0 @@
1#ifndef __ARCH_PARISC_IOCTLS_H__
2#define __ARCH_PARISC_IOCTLS_H__
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS _IOR('T', 16, struct termios) /* TCGETATTR */
9#define TCSETS _IOW('T', 17, struct termios) /* TCSETATTR */
10#define TCSETSW _IOW('T', 18, struct termios) /* TCSETATTRD */
11#define TCSETSF _IOW('T', 19, struct termios) /* TCSETATTRF */
12#define TCGETA _IOR('T', 1, struct termio)
13#define TCSETA _IOW('T', 2, struct termio)
14#define TCSETAW _IOW('T', 3, struct termio)
15#define TCSETAF _IOW('T', 4, struct termio)
16#define TCSBRK _IO('T', 5)
17#define TCXONC _IO('T', 6)
18#define TCFLSH _IO('T', 7)
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP _IOR('T', 30, int)
23#define TIOCSPGRP _IOW('T', 29, int)
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46#define TIOCSBRK 0x5427 /* BSD compatibility */
47#define TIOCCBRK 0x5428 /* BSD compatibility */
48#define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */
49#define TCGETS2 _IOR('T',0x2A, struct termios2)
50#define TCSETS2 _IOW('T',0x2B, struct termios2)
51#define TCSETSW2 _IOW('T',0x2C, struct termios2)
52#define TCSETSF2 _IOW('T',0x2D, struct termios2)
53#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
54#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
55
56#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
57#define FIOCLEX 0x5451
58#define FIOASYNC 0x5452
59#define TIOCSERCONFIG 0x5453
60#define TIOCSERGWILD 0x5454
61#define TIOCSERSWILD 0x5455
62#define TIOCGLCKTRMIOS 0x5456
63#define TIOCSLCKTRMIOS 0x5457
64#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
65#define TIOCSERGETLSR 0x5459 /* Get line status register */
66#define TIOCSERGETMULTI 0x545A /* Get multiport config */
67#define TIOCSERSETMULTI 0x545B /* Set multiport config */
68
69#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
70#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
71#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
72#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
73#define FIOQSIZE 0x5460 /* Get exact space used by quota */
74
75#define TIOCSTART 0x5461
76#define TIOCSTOP 0x5462
77#define TIOCSLTC 0x5462
78
79/* Used for packet mode */
80#define TIOCPKT_DATA 0
81#define TIOCPKT_FLUSHREAD 1
82#define TIOCPKT_FLUSHWRITE 2
83#define TIOCPKT_STOP 4
84#define TIOCPKT_START 8
85#define TIOCPKT_NOSTOP 16
86#define TIOCPKT_DOSTOP 32
87
88#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
89
90#endif /* _ASM_PARISC_IOCTLS_H */
diff --git a/include/asm-parisc/ipcbuf.h b/include/asm-parisc/ipcbuf.h
deleted file mode 100644
index bd956c425785..000000000000
--- a/include/asm-parisc/ipcbuf.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef __PARISC_IPCBUF_H__
2#define __PARISC_IPCBUF_H__
3
4/*
5 * The ipc64_perm structure for PA-RISC is almost identical to
6 * kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the kernel.
7 * 'seq' has been changed from long to int so that it's the same size
8 * on 64-bit kernels as on 32-bit ones.
9 */
10
11struct ipc64_perm
12{
13 key_t key;
14 uid_t uid;
15 gid_t gid;
16 uid_t cuid;
17 gid_t cgid;
18 unsigned short int __pad1;
19 mode_t mode;
20 unsigned short int __pad2;
21 unsigned short int seq;
22 unsigned int __pad3;
23 unsigned long long int __unused1;
24 unsigned long long int __unused2;
25};
26
27#endif /* __PARISC_IPCBUF_H__ */
diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h
deleted file mode 100644
index 399c81981ed5..000000000000
--- a/include/asm-parisc/irq.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * include/asm-parisc/irq.h
3 *
4 * Copyright 2005 Matthew Wilcox <matthew@wil.cx>
5 */
6
7#ifndef _ASM_PARISC_IRQ_H
8#define _ASM_PARISC_IRQ_H
9
10#include <linux/cpumask.h>
11#include <asm/types.h>
12
13#define NO_IRQ (-1)
14
15#ifdef CONFIG_GSC
16#define GSC_IRQ_BASE 16
17#define GSC_IRQ_MAX 63
18#define CPU_IRQ_BASE 64
19#else
20#define CPU_IRQ_BASE 16
21#endif
22
23#define TIMER_IRQ (CPU_IRQ_BASE + 0)
24#define IPI_IRQ (CPU_IRQ_BASE + 1)
25#define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1))
26
27#define NR_IRQS (CPU_IRQ_MAX + 1)
28
29static __inline__ int irq_canonicalize(int irq)
30{
31 return (irq == 2) ? 9 : irq;
32}
33
34struct irq_chip;
35
36/*
37 * Some useful "we don't have to do anything here" handlers. Should
38 * probably be provided by the generic code.
39 */
40void no_ack_irq(unsigned int irq);
41void no_end_irq(unsigned int irq);
42void cpu_ack_irq(unsigned int irq);
43void cpu_end_irq(unsigned int irq);
44
45extern int txn_alloc_irq(unsigned int nbits);
46extern int txn_claim_irq(int);
47extern unsigned int txn_alloc_data(unsigned int);
48extern unsigned long txn_alloc_addr(unsigned int);
49extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
50
51extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *);
52extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest);
53
54/* soft power switch support (power.c) */
55extern struct tasklet_struct power_tasklet;
56
57#endif /* _ASM_PARISC_IRQ_H */
diff --git a/include/asm-parisc/irq_regs.h b/include/asm-parisc/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-parisc/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-parisc/kdebug.h b/include/asm-parisc/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-parisc/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-parisc/kmap_types.h b/include/asm-parisc/kmap_types.h
deleted file mode 100644
index 806aae3c5338..000000000000
--- a/include/asm-parisc/kmap_types.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef _ASM_KMAP_TYPES_H
2#define _ASM_KMAP_TYPES_H
3
4
5#ifdef CONFIG_DEBUG_HIGHMEM
6# define D(n) __KM_FENCE_##n ,
7#else
8# define D(n)
9#endif
10
11enum km_type {
12D(0) KM_BOUNCE_READ,
13D(1) KM_SKB_SUNRPC_DATA,
14D(2) KM_SKB_DATA_SOFTIRQ,
15D(3) KM_USER0,
16D(4) KM_USER1,
17D(5) KM_BIO_SRC_IRQ,
18D(6) KM_BIO_DST_IRQ,
19D(7) KM_PTE0,
20D(8) KM_PTE1,
21D(9) KM_IRQ0,
22D(10) KM_IRQ1,
23D(11) KM_SOFTIRQ0,
24D(12) KM_SOFTIRQ1,
25D(13) KM_TYPE_NR
26};
27
28#undef D
29
30#endif
diff --git a/include/asm-parisc/led.h b/include/asm-parisc/led.h
deleted file mode 100644
index c3405ab9d60a..000000000000
--- a/include/asm-parisc/led.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef LED_H
2#define LED_H
3
4#define LED7 0x80 /* top (or furthest right) LED */
5#define LED6 0x40
6#define LED5 0x20
7#define LED4 0x10
8#define LED3 0x08
9#define LED2 0x04
10#define LED1 0x02
11#define LED0 0x01 /* bottom (or furthest left) LED */
12
13#define LED_LAN_TX LED0 /* for LAN transmit activity */
14#define LED_LAN_RCV LED1 /* for LAN receive activity */
15#define LED_DISK_IO LED2 /* for disk activity */
16#define LED_HEARTBEAT LED3 /* heartbeat */
17
18/* values for pdc_chassis_lcd_info_ret_block.model: */
19#define DISPLAY_MODEL_LCD 0 /* KittyHawk LED or LCD */
20#define DISPLAY_MODEL_NONE 1 /* no LED or LCD */
21#define DISPLAY_MODEL_LASI 2 /* LASI style 8 bit LED */
22#define DISPLAY_MODEL_OLD_ASP 0x7F /* faked: ASP style 8 x 1 bit LED (only very old ASP versions) */
23
24#define LED_CMD_REG_NONE 0 /* NULL == no addr for the cmd register */
25
26/* register_led_driver() */
27int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg);
28
29/* registers the LED regions for procfs */
30void __init register_led_regions(void);
31
32#ifdef CONFIG_CHASSIS_LCD_LED
33/* writes a string to the LCD display (if possible on this h/w) */
34int lcd_print(const char *str);
35#else
36#define lcd_print(str)
37#endif
38
39/* main LED initialization function (uses PDC) */
40int __init led_init(void);
41
42#endif /* LED_H */
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h
deleted file mode 100644
index 0b19a7242d0c..000000000000
--- a/include/asm-parisc/linkage.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef __ASM_PARISC_LINKAGE_H
2#define __ASM_PARISC_LINKAGE_H
3
4#ifndef __ALIGN
5#define __ALIGN .align 4
6#define __ALIGN_STR ".align 4"
7#endif
8
9/*
10 * In parisc assembly a semicolon marks a comment while a
11 * exclamation mark is used to separate independent lines.
12 */
13#ifdef __ASSEMBLY__
14
15#define ENTRY(name) \
16 .export name !\
17 ALIGN !\
18name:
19
20#ifdef CONFIG_64BIT
21#define ENDPROC(name) \
22 END(name)
23#else
24#define ENDPROC(name) \
25 .type name, @function !\
26 END(name)
27#endif
28
29#endif /* __ASSEMBLY__ */
30
31#endif /* __ASM_PARISC_LINKAGE_H */
diff --git a/include/asm-parisc/local.h b/include/asm-parisc/local.h
deleted file mode 100644
index c11c530f74d0..000000000000
--- a/include/asm-parisc/local.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/local.h>
diff --git a/include/asm-parisc/machdep.h b/include/asm-parisc/machdep.h
deleted file mode 100644
index a231c97d703e..000000000000
--- a/include/asm-parisc/machdep.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _PARISC_MACHDEP_H
2#define _PARISC_MACHDEP_H
3
4#include <linux/notifier.h>
5
6#define MACH_RESTART 1
7#define MACH_HALT 2
8#define MACH_POWER_ON 3
9#define MACH_POWER_OFF 4
10
11extern struct notifier_block *mach_notifier;
12extern void pa7300lc_init(void);
13
14extern void (*cpu_lpmc)(int, struct pt_regs *);
15
16#endif
diff --git a/include/asm-parisc/mc146818rtc.h b/include/asm-parisc/mc146818rtc.h
deleted file mode 100644
index adf41631449f..000000000000
--- a/include/asm-parisc/mc146818rtc.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef _ASM_MC146818RTC_H
5#define _ASM_MC146818RTC_H
6
7/* empty include file to satisfy the include in genrtc.c */
8
9#endif /* _ASM_MC146818RTC_H */
diff --git a/include/asm-parisc/mckinley.h b/include/asm-parisc/mckinley.h
deleted file mode 100644
index d1ea6f12915e..000000000000
--- a/include/asm-parisc/mckinley.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef ASM_PARISC_MCKINLEY_H
2#define ASM_PARISC_MCKINLEY_H
3#ifdef __KERNEL__
4
5/* declared in arch/parisc/kernel/setup.c */
6extern struct proc_dir_entry * proc_mckinley_root;
7
8#endif /*__KERNEL__*/
9#endif /*ASM_PARISC_MCKINLEY_H*/
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
deleted file mode 100644
index defe752cc996..000000000000
--- a/include/asm-parisc/mman.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef __PARISC_MMAN_H__
2#define __PARISC_MMAN_H__
3
4#define PROT_READ 0x1 /* page can be read */
5#define PROT_WRITE 0x2 /* page can be written */
6#define PROT_EXEC 0x4 /* page can be executed */
7#define PROT_SEM 0x8 /* page may be used for atomic ops */
8#define PROT_NONE 0x0 /* page can not be accessed */
9#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
10#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
11
12#define MAP_SHARED 0x01 /* Share changes */
13#define MAP_PRIVATE 0x02 /* Changes are private */
14#define MAP_TYPE 0x03 /* Mask for type of mapping */
15#define MAP_FIXED 0x04 /* Interpret addr exactly */
16#define MAP_ANONYMOUS 0x10 /* don't use a file */
17
18#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
19#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
20#define MAP_LOCKED 0x2000 /* pages are locked */
21#define MAP_NORESERVE 0x4000 /* don't check for reservations */
22#define MAP_GROWSDOWN 0x8000 /* stack-like segment */
23#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
24#define MAP_NONBLOCK 0x20000 /* do not block on IO */
25
26#define MS_SYNC 1 /* synchronous memory sync */
27#define MS_ASYNC 2 /* sync memory asynchronously */
28#define MS_INVALIDATE 4 /* invalidate the caches */
29
30#define MCL_CURRENT 1 /* lock all current mappings */
31#define MCL_FUTURE 2 /* lock all future mappings */
32
33#define MADV_NORMAL 0 /* no further special treatment */
34#define MADV_RANDOM 1 /* expect random page references */
35#define MADV_SEQUENTIAL 2 /* expect sequential page references */
36#define MADV_WILLNEED 3 /* will need these pages */
37#define MADV_DONTNEED 4 /* don't need these pages */
38#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
39#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
40#define MADV_VPS_INHERIT 7 /* Inherit parents page size */
41
42/* common/generic parameters */
43#define MADV_REMOVE 9 /* remove these pages & resources */
44#define MADV_DONTFORK 10 /* don't inherit across fork */
45#define MADV_DOFORK 11 /* do inherit across fork */
46
47/* The range 12-64 is reserved for page size specification. */
48#define MADV_4K_PAGES 12 /* Use 4K pages */
49#define MADV_16K_PAGES 14 /* Use 16K pages */
50#define MADV_64K_PAGES 16 /* Use 64K pages */
51#define MADV_256K_PAGES 18 /* Use 256K pages */
52#define MADV_1M_PAGES 20 /* Use 1 Megabyte pages */
53#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */
54#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */
55#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
56
57/* compatibility flags */
58#define MAP_FILE 0
59#define MAP_VARIABLE 0
60
61#endif /* __PARISC_MMAN_H__ */
diff --git a/include/asm-parisc/mmu.h b/include/asm-parisc/mmu.h
deleted file mode 100644
index 6a310cf8b734..000000000000
--- a/include/asm-parisc/mmu.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _PARISC_MMU_H_
2#define _PARISC_MMU_H_
3
4/* On parisc, we store the space id here */
5typedef unsigned long mm_context_t;
6
7#endif /* _PARISC_MMU_H_ */
diff --git a/include/asm-parisc/mmu_context.h b/include/asm-parisc/mmu_context.h
deleted file mode 100644
index 85856c74ad1d..000000000000
--- a/include/asm-parisc/mmu_context.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef __PARISC_MMU_CONTEXT_H
2#define __PARISC_MMU_CONTEXT_H
3
4#include <linux/mm.h>
5#include <linux/sched.h>
6#include <asm/atomic.h>
7#include <asm/pgalloc.h>
8#include <asm/pgtable.h>
9#include <asm-generic/mm_hooks.h>
10
11static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
12{
13}
14
15/* on PA-RISC, we actually have enough contexts to justify an allocator
16 * for them. prumpf */
17
18extern unsigned long alloc_sid(void);
19extern void free_sid(unsigned long);
20
21static inline int
22init_new_context(struct task_struct *tsk, struct mm_struct *mm)
23{
24 BUG_ON(atomic_read(&mm->mm_users) != 1);
25
26 mm->context = alloc_sid();
27 return 0;
28}
29
30static inline void
31destroy_context(struct mm_struct *mm)
32{
33 free_sid(mm->context);
34 mm->context = 0;
35}
36
37static inline void load_context(mm_context_t context)
38{
39 mtsp(context, 3);
40#if SPACEID_SHIFT == 0
41 mtctl(context << 1,8);
42#else
43 mtctl(context >> (SPACEID_SHIFT - 1),8);
44#endif
45}
46
47static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
48{
49
50 if (prev != next) {
51 mtctl(__pa(next->pgd), 25);
52 load_context(next->context);
53 }
54}
55
56#define deactivate_mm(tsk,mm) do { } while (0)
57
58static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
59{
60 /*
61 * Activate_mm is our one chance to allocate a space id
62 * for a new mm created in the exec path. There's also
63 * some lazy tlb stuff, which is currently dead code, but
64 * we only allocate a space id if one hasn't been allocated
65 * already, so we should be OK.
66 */
67
68 BUG_ON(next == &init_mm); /* Should never happen */
69
70 if (next->context == 0)
71 next->context = alloc_sid();
72
73 switch_mm(prev,next,current);
74}
75#endif
diff --git a/include/asm-parisc/mmzone.h b/include/asm-parisc/mmzone.h
deleted file mode 100644
index 9608d2cf214a..000000000000
--- a/include/asm-parisc/mmzone.h
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifndef _PARISC_MMZONE_H
2#define _PARISC_MMZONE_H
3
4#ifdef CONFIG_DISCONTIGMEM
5
6#define MAX_PHYSMEM_RANGES 8 /* Fix the size for now (current known max is 3) */
7extern int npmem_ranges;
8
9struct node_map_data {
10 pg_data_t pg_data;
11};
12
13extern struct node_map_data node_data[];
14
15#define NODE_DATA(nid) (&node_data[nid].pg_data)
16
17#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
18#define node_end_pfn(nid) \
19({ \
20 pg_data_t *__pgdat = NODE_DATA(nid); \
21 __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \
22})
23
24/* We have these possible memory map layouts:
25 * Astro: 0-3.75, 67.75-68, 4-64
26 * zx1: 0-1, 257-260, 4-256
27 * Stretch (N-class): 0-2, 4-32, 34-xxx
28 */
29
30/* Since each 1GB can only belong to one region (node), we can create
31 * an index table for pfn to nid lookup; each entry in pfnnid_map
32 * represents 1GB, and contains the node that the memory belongs to. */
33
34#define PFNNID_SHIFT (30 - PAGE_SHIFT)
35#define PFNNID_MAP_MAX 512 /* support 512GB */
36extern unsigned char pfnnid_map[PFNNID_MAP_MAX];
37
38#ifndef CONFIG_64BIT
39#define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT))
40#else
41/* io can be 0xf0f0f0f0f0xxxxxx or 0xfffffffff0000000 */
42#define pfn_is_io(pfn) ((pfn & (0xf000000000000000UL >> PAGE_SHIFT)) == (0xf000000000000000UL >> PAGE_SHIFT))
43#endif
44
45static inline int pfn_to_nid(unsigned long pfn)
46{
47 unsigned int i;
48 unsigned char r;
49
50 if (unlikely(pfn_is_io(pfn)))
51 return 0;
52
53 i = pfn >> PFNNID_SHIFT;
54 BUG_ON(i >= sizeof(pfnnid_map) / sizeof(pfnnid_map[0]));
55 r = pfnnid_map[i];
56 BUG_ON(r == 0xff);
57
58 return (int)r;
59}
60
61static inline int pfn_valid(int pfn)
62{
63 int nid = pfn_to_nid(pfn);
64
65 if (nid >= 0)
66 return (pfn < node_end_pfn(nid));
67 return 0;
68}
69
70#else /* !CONFIG_DISCONTIGMEM */
71#define MAX_PHYSMEM_RANGES 1
72#endif
73#endif /* _PARISC_MMZONE_H */
diff --git a/include/asm-parisc/module.h b/include/asm-parisc/module.h
deleted file mode 100644
index c2cb49e934c1..000000000000
--- a/include/asm-parisc/module.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef _ASM_PARISC_MODULE_H
2#define _ASM_PARISC_MODULE_H
3/*
4 * This file contains the parisc architecture specific module code.
5 */
6#ifdef CONFIG_64BIT
7#define Elf_Shdr Elf64_Shdr
8#define Elf_Sym Elf64_Sym
9#define Elf_Ehdr Elf64_Ehdr
10#define Elf_Addr Elf64_Addr
11#define Elf_Rela Elf64_Rela
12#else
13#define Elf_Shdr Elf32_Shdr
14#define Elf_Sym Elf32_Sym
15#define Elf_Ehdr Elf32_Ehdr
16#define Elf_Addr Elf32_Addr
17#define Elf_Rela Elf32_Rela
18#endif
19
20struct unwind_table;
21
22struct mod_arch_specific
23{
24 unsigned long got_offset, got_count, got_max;
25 unsigned long fdesc_offset, fdesc_count, fdesc_max;
26 unsigned long stub_offset, stub_count, stub_max;
27 unsigned long init_stub_offset, init_stub_count, init_stub_max;
28 int unwind_section;
29 struct unwind_table *unwind;
30};
31
32#endif /* _ASM_PARISC_MODULE_H */
diff --git a/include/asm-parisc/msgbuf.h b/include/asm-parisc/msgbuf.h
deleted file mode 100644
index fe88f2649418..000000000000
--- a/include/asm-parisc/msgbuf.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef _PARISC_MSGBUF_H
2#define _PARISC_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for parisc architecture, copied from sparc.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct msqid64_ds {
15 struct ipc64_perm msg_perm;
16#ifndef CONFIG_64BIT
17 unsigned int __pad1;
18#endif
19 __kernel_time_t msg_stime; /* last msgsnd time */
20#ifndef CONFIG_64BIT
21 unsigned int __pad2;
22#endif
23 __kernel_time_t msg_rtime; /* last msgrcv time */
24#ifndef CONFIG_64BIT
25 unsigned int __pad3;
26#endif
27 __kernel_time_t msg_ctime; /* last change time */
28 unsigned int msg_cbytes; /* current number of bytes on queue */
29 unsigned int msg_qnum; /* number of messages in queue */
30 unsigned int msg_qbytes; /* max number of bytes on queue */
31 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
32 __kernel_pid_t msg_lrpid; /* last receive pid */
33 unsigned int __unused1;
34 unsigned int __unused2;
35};
36
37#endif /* _PARISC_MSGBUF_H */
diff --git a/include/asm-parisc/mutex.h b/include/asm-parisc/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/include/asm-parisc/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
deleted file mode 100644
index c3941f09a878..000000000000
--- a/include/asm-parisc/page.h
+++ /dev/null
@@ -1,173 +0,0 @@
1#ifndef _PARISC_PAGE_H
2#define _PARISC_PAGE_H
3
4#include <linux/const.h>
5
6#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
7# define PAGE_SHIFT 12
8#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
9# define PAGE_SHIFT 14
10#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
11# define PAGE_SHIFT 16
12#else
13# error "unknown default kernel page size"
14#endif
15#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
16#define PAGE_MASK (~(PAGE_SIZE-1))
17
18
19#ifndef __ASSEMBLY__
20
21#include <asm/types.h>
22#include <asm/cache.h>
23
24#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
25#define copy_page(to,from) copy_user_page_asm((void *)(to), (void *)(from))
26
27struct page;
28
29void copy_user_page_asm(void *to, void *from);
30void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
31 struct page *pg);
32void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
33
34/*
35 * These are used to make use of C type-checking..
36 */
37#define STRICT_MM_TYPECHECKS
38#ifdef STRICT_MM_TYPECHECKS
39typedef struct { unsigned long pte;
40#if !defined(CONFIG_64BIT)
41 unsigned long future_flags;
42 /* XXX: it's possible to remove future_flags and change BITS_PER_PTE_ENTRY
43 to 2, but then strangely the identical 32bit kernel boots on a
44 c3000(pa20), but not any longer on a 715(pa11).
45 Still investigating... HelgeD.
46 */
47#endif
48} pte_t; /* either 32 or 64bit */
49
50/* NOTE: even on 64 bits, these entries are __u32 because we allocate
51 * the pmd and pgd in ZONE_DMA (i.e. under 4GB) */
52typedef struct { __u32 pmd; } pmd_t;
53typedef struct { __u32 pgd; } pgd_t;
54typedef struct { unsigned long pgprot; } pgprot_t;
55
56#define pte_val(x) ((x).pte)
57/* These do not work lvalues, so make sure we don't use them as such. */
58#define pmd_val(x) ((x).pmd + 0)
59#define pgd_val(x) ((x).pgd + 0)
60#define pgprot_val(x) ((x).pgprot)
61
62#define __pte(x) ((pte_t) { (x) } )
63#define __pmd(x) ((pmd_t) { (x) } )
64#define __pgd(x) ((pgd_t) { (x) } )
65#define __pgprot(x) ((pgprot_t) { (x) } )
66
67#define __pmd_val_set(x,n) (x).pmd = (n)
68#define __pgd_val_set(x,n) (x).pgd = (n)
69
70#else
71/*
72 * .. while these make it easier on the compiler
73 */
74typedef unsigned long pte_t;
75typedef __u32 pmd_t;
76typedef __u32 pgd_t;
77typedef unsigned long pgprot_t;
78
79#define pte_val(x) (x)
80#define pmd_val(x) (x)
81#define pgd_val(x) (x)
82#define pgprot_val(x) (x)
83
84#define __pte(x) (x)
85#define __pmd(x) (x)
86#define __pgd(x) (x)
87#define __pgprot(x) (x)
88
89#define __pmd_val_set(x,n) (x) = (n)
90#define __pgd_val_set(x,n) (x) = (n)
91
92#endif /* STRICT_MM_TYPECHECKS */
93
94typedef struct page *pgtable_t;
95
96typedef struct __physmem_range {
97 unsigned long start_pfn;
98 unsigned long pages; /* PAGE_SIZE pages */
99} physmem_range_t;
100
101extern physmem_range_t pmem_ranges[];
102extern int npmem_ranges;
103
104#endif /* !__ASSEMBLY__ */
105
106/* WARNING: The definitions below must match exactly to sizeof(pte_t)
107 * etc
108 */
109#ifdef CONFIG_64BIT
110#define BITS_PER_PTE_ENTRY 3
111#define BITS_PER_PMD_ENTRY 2
112#define BITS_PER_PGD_ENTRY 2
113#else
114#define BITS_PER_PTE_ENTRY 3
115#define BITS_PER_PMD_ENTRY 2
116#define BITS_PER_PGD_ENTRY BITS_PER_PMD_ENTRY
117#endif
118#define PGD_ENTRY_SIZE (1UL << BITS_PER_PGD_ENTRY)
119#define PMD_ENTRY_SIZE (1UL << BITS_PER_PMD_ENTRY)
120#define PTE_ENTRY_SIZE (1UL << BITS_PER_PTE_ENTRY)
121
122#define LINUX_GATEWAY_SPACE 0
123
124/* This governs the relationship between virtual and physical addresses.
125 * If you alter it, make sure to take care of our various fixed mapping
126 * segments in fixmap.h */
127#ifdef CONFIG_64BIT
128#define __PAGE_OFFSET (0x40000000) /* 1GB */
129#else
130#define __PAGE_OFFSET (0x10000000) /* 256MB */
131#endif
132
133#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
134
135/* The size of the gateway page (we leave lots of room for expansion) */
136#define GATEWAY_PAGE_SIZE 0x4000
137
138/* The start of the actual kernel binary---used in vmlinux.lds.S
139 * Leave some space after __PAGE_OFFSET for detecting kernel null
140 * ptr derefs */
141#define KERNEL_BINARY_TEXT_START (__PAGE_OFFSET + 0x100000)
142
143/* These macros don't work for 64-bit C code -- don't allow in C at all */
144#ifdef __ASSEMBLY__
145# define PA(x) ((x)-__PAGE_OFFSET)
146# define VA(x) ((x)+__PAGE_OFFSET)
147#endif
148#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
149#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
150
151#ifndef CONFIG_DISCONTIGMEM
152#define pfn_valid(pfn) ((pfn) < max_mapnr)
153#endif /* CONFIG_DISCONTIGMEM */
154
155#ifdef CONFIG_HUGETLB_PAGE
156#define HPAGE_SHIFT 22 /* 4MB (is this fixed?) */
157#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
158#define HPAGE_MASK (~(HPAGE_SIZE - 1))
159#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
160#endif
161
162#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
163
164#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
165#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
166
167#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
168 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
169
170#include <asm-generic/memory_model.h>
171#include <asm-generic/page.h>
172
173#endif /* _PARISC_PAGE_H */
diff --git a/include/asm-parisc/param.h b/include/asm-parisc/param.h
deleted file mode 100644
index 32e03d877858..000000000000
--- a/include/asm-parisc/param.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef _ASMPARISC_PARAM_H
2#define _ASMPARISC_PARAM_H
3
4#ifdef __KERNEL__
5#define HZ CONFIG_HZ
6#define USER_HZ 100 /* some user API use "ticks" */
7#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
8#endif
9
10#ifndef HZ
11#define HZ 100
12#endif
13
14#define EXEC_PAGESIZE 4096
15
16#ifndef NOGROUP
17#define NOGROUP (-1)
18#endif
19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21
22#endif
diff --git a/include/asm-parisc/parisc-device.h b/include/asm-parisc/parisc-device.h
deleted file mode 100644
index 7aa13f2add7a..000000000000
--- a/include/asm-parisc/parisc-device.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef _ASM_PARISC_PARISC_DEVICE_H_
2#define _ASM_PARISC_PARISC_DEVICE_H_
3
4#include <linux/device.h>
5
6struct parisc_device {
7 struct resource hpa; /* Hard Physical Address */
8 struct parisc_device_id id;
9 struct parisc_driver *driver; /* Driver for this device */
10 char name[80]; /* The hardware description */
11 int irq;
12 int aux_irq; /* Some devices have a second IRQ */
13
14 char hw_path; /* The module number on this bus */
15 unsigned int num_addrs; /* some devices have additional address ranges. */
16 unsigned long *addr; /* which will be stored here */
17
18#ifdef CONFIG_64BIT
19 /* parms for pdc_pat_cell_module() call */
20 unsigned long pcell_loc; /* Physical Cell location */
21 unsigned long mod_index; /* PAT specific - Misc Module info */
22
23 /* generic info returned from pdc_pat_cell_module() */
24 unsigned long mod_info; /* PAT specific - Misc Module info */
25 unsigned long pmod_loc; /* physical Module location */
26#endif
27 u64 dma_mask; /* DMA mask for I/O */
28 struct device dev;
29};
30
31struct parisc_driver {
32 struct parisc_driver *next;
33 char *name;
34 const struct parisc_device_id *id_table;
35 int (*probe) (struct parisc_device *dev); /* New device discovered */
36 int (*remove) (struct parisc_device *dev);
37 struct device_driver drv;
38};
39
40
41#define to_parisc_device(d) container_of(d, struct parisc_device, dev)
42#define to_parisc_driver(d) container_of(d, struct parisc_driver, drv)
43#define parisc_parent(d) to_parisc_device(d->dev.parent)
44
45static inline char *parisc_pathname(struct parisc_device *d)
46{
47 return d->dev.bus_id;
48}
49
50static inline void
51parisc_set_drvdata(struct parisc_device *d, void *p)
52{
53 dev_set_drvdata(&d->dev, p);
54}
55
56static inline void *
57parisc_get_drvdata(struct parisc_device *d)
58{
59 return dev_get_drvdata(&d->dev);
60}
61
62extern struct bus_type parisc_bus_type;
63
64#endif /*_ASM_PARISC_PARISC_DEVICE_H_*/
diff --git a/include/asm-parisc/parport.h b/include/asm-parisc/parport.h
deleted file mode 100644
index 00d9cc3e7b97..000000000000
--- a/include/asm-parisc/parport.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 *
3 * parport.h: ia32-compatible parport initialisation
4 *
5 * This file should only be included by drivers/parport/parport_pc.c.
6 */
7#ifndef _ASM_PARPORT_H
8#define _ASM_PARPORT_H 1
9
10
11static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
12{
13 /* nothing ! */
14 return 0;
15}
16
17
18#endif /* !(_ASM_PARPORT_H) */
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h
deleted file mode 100644
index 4ba868f44a5e..000000000000
--- a/include/asm-parisc/pci.h
+++ /dev/null
@@ -1,294 +0,0 @@
1#ifndef __ASM_PARISC_PCI_H
2#define __ASM_PARISC_PCI_H
3
4#include <asm/scatterlist.h>
5
6
7
8/*
9** HP PCI platforms generally support multiple bus adapters.
10** (workstations 1-~4, servers 2-~32)
11**
12** Newer platforms number the busses across PCI bus adapters *sparsely*.
13** E.g. 0, 8, 16, ...
14**
15** Under a PCI bus, most HP platforms support PPBs up to two or three
16** levels deep. See "Bit3" product line.
17*/
18#define PCI_MAX_BUSSES 256
19
20
21/* To be used as: mdelay(pci_post_reset_delay);
22 *
23 * post_reset is the time the kernel should stall to prevent anyone from
24 * accessing the PCI bus once #RESET is de-asserted.
25 * PCI spec somewhere says 1 second but with multi-PCI bus systems,
26 * this makes the boot time much longer than necessary.
27 * 20ms seems to work for all the HP PCI implementations to date.
28 */
29#define pci_post_reset_delay 50
30
31
32/*
33** pci_hba_data (aka H2P_OBJECT in HP/UX)
34**
35** This is the "common" or "base" data structure which HBA drivers
36** (eg Dino or LBA) are required to place at the top of their own
37** platform_data structure. I've heard this called "C inheritance" too.
38**
39** Data needed by pcibios layer belongs here.
40*/
41struct pci_hba_data {
42 void __iomem *base_addr; /* aka Host Physical Address */
43 const struct parisc_device *dev; /* device from PA bus walk */
44 struct pci_bus *hba_bus; /* primary PCI bus below HBA */
45 int hba_num; /* I/O port space access "key" */
46 struct resource bus_num; /* PCI bus numbers */
47 struct resource io_space; /* PIOP */
48 struct resource lmmio_space; /* bus addresses < 4Gb */
49 struct resource elmmio_space; /* additional bus addresses < 4Gb */
50 struct resource gmmio_space; /* bus addresses > 4Gb */
51
52 /* NOTE: Dino code assumes it can use *all* of the lmmio_space,
53 * elmmio_space and gmmio_space as a contiguous array of
54 * resources. This #define represents the array size */
55 #define DINO_MAX_LMMIO_RESOURCES 3
56
57 unsigned long lmmio_space_offset; /* CPU view - PCI view */
58 void * iommu; /* IOMMU this device is under */
59 /* REVISIT - spinlock to protect resources? */
60
61 #define HBA_NAME_SIZE 16
62 char io_name[HBA_NAME_SIZE];
63 char lmmio_name[HBA_NAME_SIZE];
64 char elmmio_name[HBA_NAME_SIZE];
65 char gmmio_name[HBA_NAME_SIZE];
66};
67
68#define HBA_DATA(d) ((struct pci_hba_data *) (d))
69
70/*
71** We support 2^16 I/O ports per HBA. These are set up in the form
72** 0xbbxxxx, where bb is the bus number and xxxx is the I/O port
73** space address.
74*/
75#define HBA_PORT_SPACE_BITS 16
76
77#define HBA_PORT_BASE(h) ((h) << HBA_PORT_SPACE_BITS)
78#define HBA_PORT_SPACE_SIZE (1UL << HBA_PORT_SPACE_BITS)
79
80#define PCI_PORT_HBA(a) ((a) >> HBA_PORT_SPACE_BITS)
81#define PCI_PORT_ADDR(a) ((a) & (HBA_PORT_SPACE_SIZE - 1))
82
83#ifdef CONFIG_64BIT
84#define PCI_F_EXTEND 0xffffffff00000000UL
85#define PCI_IS_LMMIO(hba,a) pci_is_lmmio(hba,a)
86
87/* We need to know if an address is LMMMIO or GMMIO.
88 * LMMIO requires mangling and GMMIO we must use as-is.
89 */
90static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a)
91{
92 return(((a) & PCI_F_EXTEND) == PCI_F_EXTEND);
93}
94
95/*
96** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses.
97** See pci.c for more conversions used by Generic PCI code.
98**
99** Platform characteristics/firmware guarantee that
100** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO
101** (2) PA_VIEW == IO_VIEW for GMMIO
102*/
103#define PCI_BUS_ADDR(hba,a) (PCI_IS_LMMIO(hba,a) \
104 ? ((a) - hba->lmmio_space_offset) /* mangle LMMIO */ \
105 : (a)) /* GMMIO */
106#define PCI_HOST_ADDR(hba,a) (((a) & PCI_F_EXTEND) == 0 \
107 ? (a) + hba->lmmio_space_offset \
108 : (a))
109
110#else /* !CONFIG_64BIT */
111
112#define PCI_BUS_ADDR(hba,a) (a)
113#define PCI_HOST_ADDR(hba,a) (a)
114#define PCI_F_EXTEND 0UL
115#define PCI_IS_LMMIO(hba,a) (1) /* 32-bit doesn't support GMMIO */
116
117#endif /* !CONFIG_64BIT */
118
119/*
120** KLUGE: linux/pci.h include asm/pci.h BEFORE declaring struct pci_bus
121** (This eliminates some of the warnings).
122*/
123struct pci_bus;
124struct pci_dev;
125
126/*
127 * If the PCI device's view of memory is the same as the CPU's view of memory,
128 * PCI_DMA_BUS_IS_PHYS is true. The networking and block device layers use
129 * this boolean for bounce buffer decisions.
130 */
131#ifdef CONFIG_PA20
132/* All PA-2.0 machines have an IOMMU. */
133#define PCI_DMA_BUS_IS_PHYS 0
134#define parisc_has_iommu() do { } while (0)
135#else
136
137#if defined(CONFIG_IOMMU_CCIO) || defined(CONFIG_IOMMU_SBA)
138extern int parisc_bus_is_phys; /* in arch/parisc/kernel/setup.c */
139#define PCI_DMA_BUS_IS_PHYS parisc_bus_is_phys
140#define parisc_has_iommu() do { parisc_bus_is_phys = 0; } while (0)
141#else
142#define PCI_DMA_BUS_IS_PHYS 1
143#define parisc_has_iommu() do { } while (0)
144#endif
145
146#endif /* !CONFIG_PA20 */
147
148
149/*
150** Most PCI devices (eg Tulip, NCR720) also export the same registers
151** to both MMIO and I/O port space. Due to poor performance of I/O Port
152** access under HP PCI bus adapters, strongly recommend the use of MMIO
153** address space.
154**
155** While I'm at it more PA programming notes:
156**
157** 1) MMIO stores (writes) are posted operations. This means the processor
158** gets an "ACK" before the write actually gets to the device. A read
159** to the same device (or typically the bus adapter above it) will
160** force in-flight write transaction(s) out to the targeted device
161** before the read can complete.
162**
163** 2) The Programmed I/O (PIO) data may not always be strongly ordered with
164** respect to DMA on all platforms. Ie PIO data can reach the processor
165** before in-flight DMA reaches memory. Since most SMP PA platforms
166** are I/O coherent, it generally doesn't matter...but sometimes
167** it does.
168**
169** I've helped device driver writers debug both types of problems.
170*/
171struct pci_port_ops {
172 u8 (*inb) (struct pci_hba_data *hba, u16 port);
173 u16 (*inw) (struct pci_hba_data *hba, u16 port);
174 u32 (*inl) (struct pci_hba_data *hba, u16 port);
175 void (*outb) (struct pci_hba_data *hba, u16 port, u8 data);
176 void (*outw) (struct pci_hba_data *hba, u16 port, u16 data);
177 void (*outl) (struct pci_hba_data *hba, u16 port, u32 data);
178};
179
180
181struct pci_bios_ops {
182 void (*init)(void);
183 void (*fixup_bus)(struct pci_bus *bus);
184};
185
186/* pci_unmap_{single,page} is not a nop, thus... */
187#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
188 dma_addr_t ADDR_NAME;
189#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
190 __u32 LEN_NAME;
191#define pci_unmap_addr(PTR, ADDR_NAME) \
192 ((PTR)->ADDR_NAME)
193#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
194 (((PTR)->ADDR_NAME) = (VAL))
195#define pci_unmap_len(PTR, LEN_NAME) \
196 ((PTR)->LEN_NAME)
197#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
198 (((PTR)->LEN_NAME) = (VAL))
199
200/*
201** Stuff declared in arch/parisc/kernel/pci.c
202*/
203extern struct pci_port_ops *pci_port;
204extern struct pci_bios_ops *pci_bios;
205
206#ifdef CONFIG_PCI
207extern void pcibios_register_hba(struct pci_hba_data *);
208extern void pcibios_set_master(struct pci_dev *);
209#else
210static inline void pcibios_register_hba(struct pci_hba_data *x)
211{
212}
213#endif
214
215/*
216 * pcibios_assign_all_busses() is used in drivers/pci/pci.c:pci_do_scan_bus()
217 * 0 == check if bridge is numbered before re-numbering.
218 * 1 == pci_do_scan_bus() should automatically number all PCI-PCI bridges.
219 *
220 * We *should* set this to zero for "legacy" platforms and one
221 * for PAT platforms.
222 *
223 * But legacy platforms also need to renumber the busses below a Host
224 * Bus controller. Adding a 4-port Tulip card on the first PCI root
225 * bus of a C200 resulted in the secondary bus being numbered as 1.
226 * The second PCI host bus controller's root bus had already been
227 * assigned bus number 1 by firmware and sysfs complained.
228 *
229 * Firmware isn't doing anything wrong here since each controller
230 * is its own PCI domain. It's simpler and easier for us to renumber
231 * the busses rather than treat each Dino as a separate PCI domain.
232 * Eventually, we may want to introduce PCI domains for Superdome or
233 * rp7420/8420 boxes and then revisit this issue.
234 */
235#define pcibios_assign_all_busses() (1)
236#define pcibios_scan_all_fns(a, b) (0)
237
238#define PCIBIOS_MIN_IO 0x10
239#define PCIBIOS_MIN_MEM 0x1000 /* NBPG - but pci/setup-res.c dies */
240
241/* export the pci_ DMA API in terms of the dma_ one */
242#include <asm-generic/pci-dma-compat.h>
243
244#ifdef CONFIG_PCI
245static inline void pci_dma_burst_advice(struct pci_dev *pdev,
246 enum pci_dma_burst_strategy *strat,
247 unsigned long *strategy_parameter)
248{
249 unsigned long cacheline_size;
250 u8 byte;
251
252 pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
253 if (byte == 0)
254 cacheline_size = 1024;
255 else
256 cacheline_size = (int) byte * 4;
257
258 *strat = PCI_DMA_BURST_MULTIPLE;
259 *strategy_parameter = cacheline_size;
260}
261#endif
262
263extern void
264pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
265 struct resource *res);
266
267extern void
268pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
269 struct pci_bus_region *region);
270
271static inline struct resource *
272pcibios_select_root(struct pci_dev *pdev, struct resource *res)
273{
274 struct resource *root = NULL;
275
276 if (res->flags & IORESOURCE_IO)
277 root = &ioport_resource;
278 if (res->flags & IORESOURCE_MEM)
279 root = &iomem_resource;
280
281 return root;
282}
283
284static inline void pcibios_penalize_isa_irq(int irq, int active)
285{
286 /* We don't need to penalize isa irq's */
287}
288
289static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
290{
291 return channel ? 15 : 14;
292}
293
294#endif /* __ASM_PARISC_PCI_H */
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
deleted file mode 100644
index 9eaa794c3e4a..000000000000
--- a/include/asm-parisc/pdc.h
+++ /dev/null
@@ -1,757 +0,0 @@
1#ifndef _PARISC_PDC_H
2#define _PARISC_PDC_H
3
4/*
5 * PDC return values ...
6 * All PDC calls return a subset of these errors.
7 */
8
9#define PDC_WARN 3 /* Call completed with a warning */
10#define PDC_REQ_ERR_1 2 /* See above */
11#define PDC_REQ_ERR_0 1 /* Call would generate a requestor error */
12#define PDC_OK 0 /* Call completed successfully */
13#define PDC_BAD_PROC -1 /* Called non-existent procedure*/
14#define PDC_BAD_OPTION -2 /* Called with non-existent option */
15#define PDC_ERROR -3 /* Call could not complete without an error */
16#define PDC_NE_MOD -5 /* Module not found */
17#define PDC_NE_CELL_MOD -7 /* Cell module not found */
18#define PDC_INVALID_ARG -10 /* Called with an invalid argument */
19#define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */
20#define PDC_NOT_NARROW -17 /* Narrow mode not supported */
21
22/*
23 * PDC entry points...
24 */
25
26#define PDC_POW_FAIL 1 /* perform a power-fail */
27#define PDC_POW_FAIL_PREPARE 0 /* prepare for powerfail */
28
29#define PDC_CHASSIS 2 /* PDC-chassis functions */
30#define PDC_CHASSIS_DISP 0 /* update chassis display */
31#define PDC_CHASSIS_WARN 1 /* return chassis warnings */
32#define PDC_CHASSIS_DISPWARN 2 /* update&return chassis status */
33#define PDC_RETURN_CHASSIS_INFO 128 /* HVERSION dependent: return chassis LED/LCD info */
34
35#define PDC_PIM 3 /* Get PIM data */
36#define PDC_PIM_HPMC 0 /* Transfer HPMC data */
37#define PDC_PIM_RETURN_SIZE 1 /* Get Max buffer needed for PIM*/
38#define PDC_PIM_LPMC 2 /* Transfer HPMC data */
39#define PDC_PIM_SOFT_BOOT 3 /* Transfer Soft Boot data */
40#define PDC_PIM_TOC 4 /* Transfer TOC data */
41
42#define PDC_MODEL 4 /* PDC model information call */
43#define PDC_MODEL_INFO 0 /* returns information */
44#define PDC_MODEL_BOOTID 1 /* set the BOOT_ID */
45#define PDC_MODEL_VERSIONS 2 /* returns cpu-internal versions*/
46#define PDC_MODEL_SYSMODEL 3 /* return system model info */
47#define PDC_MODEL_ENSPEC 4 /* enable specific option */
48#define PDC_MODEL_DISPEC 5 /* disable specific option */
49#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */
50#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */
51/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */
52#define PDC_MODEL_IOPDIR_FDC (1 << 2)
53#define PDC_MODEL_NVA_MASK (3 << 4)
54#define PDC_MODEL_NVA_SUPPORTED (0 << 4)
55#define PDC_MODEL_NVA_SLOW (1 << 4)
56#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4)
57#define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */
58#define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */
59
60#define PA89_INSTRUCTION_SET 0x4 /* capatibilies returned */
61#define PA90_INSTRUCTION_SET 0x8
62
63#define PDC_CACHE 5 /* return/set cache (& TLB) info*/
64#define PDC_CACHE_INFO 0 /* returns information */
65#define PDC_CACHE_SET_COH 1 /* set coherence state */
66#define PDC_CACHE_RET_SPID 2 /* returns space-ID bits */
67
68#define PDC_HPA 6 /* return HPA of processor */
69#define PDC_HPA_PROCESSOR 0
70#define PDC_HPA_MODULES 1
71
72#define PDC_COPROC 7 /* Co-Processor (usually FP unit(s)) */
73#define PDC_COPROC_CFG 0 /* Co-Processor Cfg (FP unit(s) enabled?) */
74
75#define PDC_IODC 8 /* talk to IODC */
76#define PDC_IODC_READ 0 /* read IODC entry point */
77/* PDC_IODC_RI_ * INDEX parameter of PDC_IODC_READ */
78#define PDC_IODC_RI_DATA_BYTES 0 /* IODC Data Bytes */
79/* 1, 2 obsolete - HVERSION dependent*/
80#define PDC_IODC_RI_INIT 3 /* Initialize module */
81#define PDC_IODC_RI_IO 4 /* Module input/output */
82#define PDC_IODC_RI_SPA 5 /* Module input/output */
83#define PDC_IODC_RI_CONFIG 6 /* Module input/output */
84/* 7 obsolete - HVERSION dependent */
85#define PDC_IODC_RI_TEST 8 /* Module input/output */
86#define PDC_IODC_RI_TLB 9 /* Module input/output */
87#define PDC_IODC_NINIT 2 /* non-destructive init */
88#define PDC_IODC_DINIT 3 /* destructive init */
89#define PDC_IODC_MEMERR 4 /* check for memory errors */
90#define PDC_IODC_INDEX_DATA 0 /* get first 16 bytes from mod IODC */
91#define PDC_IODC_BUS_ERROR -4 /* bus error return value */
92#define PDC_IODC_INVALID_INDEX -5 /* invalid index return value */
93#define PDC_IODC_COUNT -6 /* count is too small */
94
95#define PDC_TOD 9 /* time-of-day clock (TOD) */
96#define PDC_TOD_READ 0 /* read TOD */
97#define PDC_TOD_WRITE 1 /* write TOD */
98
99
100#define PDC_STABLE 10 /* stable storage (sprockets) */
101#define PDC_STABLE_READ 0
102#define PDC_STABLE_WRITE 1
103#define PDC_STABLE_RETURN_SIZE 2
104#define PDC_STABLE_VERIFY_CONTENTS 3
105#define PDC_STABLE_INITIALIZE 4
106
107#define PDC_NVOLATILE 11 /* often not implemented */
108
109#define PDC_ADD_VALID 12 /* Memory validation PDC call */
110#define PDC_ADD_VALID_VERIFY 0 /* Make PDC_ADD_VALID verify region */
111
112#define PDC_INSTR 15 /* get instr to invoke PDCE_CHECK() */
113
114#define PDC_PROC 16 /* (sprockets) */
115
116#define PDC_CONFIG 16 /* (sprockets) */
117#define PDC_CONFIG_DECONFIG 0
118#define PDC_CONFIG_DRECONFIG 1
119#define PDC_CONFIG_DRETURN_CONFIG 2
120
121#define PDC_BLOCK_TLB 18 /* manage hardware block-TLB */
122#define PDC_BTLB_INFO 0 /* returns parameter */
123#define PDC_BTLB_INSERT 1 /* insert BTLB entry */
124#define PDC_BTLB_PURGE 2 /* purge BTLB entries */
125#define PDC_BTLB_PURGE_ALL 3 /* purge all BTLB entries */
126
127#define PDC_TLB 19 /* manage hardware TLB miss handling */
128#define PDC_TLB_INFO 0 /* returns parameter */
129#define PDC_TLB_SETUP 1 /* set up miss handling */
130
131#define PDC_MEM 20 /* Manage memory */
132#define PDC_MEM_MEMINFO 0
133#define PDC_MEM_ADD_PAGE 1
134#define PDC_MEM_CLEAR_PDT 2
135#define PDC_MEM_READ_PDT 3
136#define PDC_MEM_RESET_CLEAR 4
137#define PDC_MEM_GOODMEM 5
138#define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */
139#define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE
140#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131
141#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES 132
142#define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133
143
144#define PDC_MEM_RET_SBE_REPLACED 5 /* PDC_MEM return values */
145#define PDC_MEM_RET_DUPLICATE_ENTRY 4
146#define PDC_MEM_RET_BUF_SIZE_SMALL 1
147#define PDC_MEM_RET_PDT_FULL -11
148#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL
149
150#define PDC_PSW 21 /* Get/Set default System Mask */
151#define PDC_PSW_MASK 0 /* Return mask */
152#define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */
153#define PDC_PSW_SET_DEFAULTS 2 /* Set default */
154#define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */
155#define PDC_PSW_WIDE_BIT 2 /* set for wide mode */
156
157#define PDC_SYSTEM_MAP 22 /* find system modules */
158#define PDC_FIND_MODULE 0
159#define PDC_FIND_ADDRESS 1
160#define PDC_TRANSLATE_PATH 2
161
162#define PDC_SOFT_POWER 23 /* soft power switch */
163#define PDC_SOFT_POWER_INFO 0 /* return info about the soft power switch */
164#define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */
165
166
167/* HVERSION dependent */
168
169/* The PDC_MEM_MAP calls */
170#define PDC_MEM_MAP 128 /* on s700: return page info */
171#define PDC_MEM_MAP_HPA 0 /* returns hpa of a module */
172
173#define PDC_EEPROM 129 /* EEPROM access */
174#define PDC_EEPROM_READ_WORD 0
175#define PDC_EEPROM_WRITE_WORD 1
176#define PDC_EEPROM_READ_BYTE 2
177#define PDC_EEPROM_WRITE_BYTE 3
178#define PDC_EEPROM_EEPROM_PASSWORD -1000
179
180#define PDC_NVM 130 /* NVM (non-volatile memory) access */
181#define PDC_NVM_READ_WORD 0
182#define PDC_NVM_WRITE_WORD 1
183#define PDC_NVM_READ_BYTE 2
184#define PDC_NVM_WRITE_BYTE 3
185
186#define PDC_SEED_ERROR 132 /* (sprockets) */
187
188#define PDC_IO 135 /* log error info, reset IO system */
189#define PDC_IO_READ_AND_CLEAR_ERRORS 0
190#define PDC_IO_RESET 1
191#define PDC_IO_RESET_DEVICES 2
192/* sets bits 6&7 (little endian) of the HcControl Register */
193#define PDC_IO_USB_SUSPEND 0xC000000000000000
194#define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */
195#define PDC_IO_NO_SUSPEND -6 /* return value */
196
197#define PDC_BROADCAST_RESET 136 /* reset all processors */
198#define PDC_DO_RESET 0 /* option: perform a broadcast reset */
199#define PDC_DO_FIRM_TEST_RESET 1 /* Do broadcast reset with bitmap */
200#define PDC_BR_RECONFIGURATION 2 /* reset w/reconfiguration */
201#define PDC_FIRM_TEST_MAGIC 0xab9ec36fUL /* for this reboot only */
202
203#define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */
204#define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */
205
206#define PDC_LAN_STATION_ID_SIZE 6
207
208#define PDC_CHECK_RANGES 139 /* (sprockets) */
209
210#define PDC_NV_SECTIONS 141 /* (sprockets) */
211
212#define PDC_PERFORMANCE 142 /* performance monitoring */
213
214#define PDC_SYSTEM_INFO 143 /* system information */
215#define PDC_SYSINFO_RETURN_INFO_SIZE 0
216#define PDC_SYSINFO_RRETURN_SYS_INFO 1
217#define PDC_SYSINFO_RRETURN_ERRORS 2
218#define PDC_SYSINFO_RRETURN_WARNINGS 3
219#define PDC_SYSINFO_RETURN_REVISIONS 4
220#define PDC_SYSINFO_RRETURN_DIAGNOSE 5
221#define PDC_SYSINFO_RRETURN_HV_DIAGNOSE 1005
222
223#define PDC_RDR 144 /* (sprockets) */
224#define PDC_RDR_READ_BUFFER 0
225#define PDC_RDR_READ_SINGLE 1
226#define PDC_RDR_WRITE_SINGLE 2
227
228#define PDC_INTRIGUE 145 /* (sprockets) */
229#define PDC_INTRIGUE_WRITE_BUFFER 0
230#define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1
231#define PDC_INTRIGUE_START_CPU_COUNTERS 2
232#define PDC_INTRIGUE_STOP_CPU_COUNTERS 3
233
234#define PDC_STI 146 /* STI access */
235/* same as PDC_PCI_XXX values (see below) */
236
237/* Legacy PDC definitions for same stuff */
238#define PDC_PCI_INDEX 147
239#define PDC_PCI_INTERFACE_INFO 0
240#define PDC_PCI_SLOT_INFO 1
241#define PDC_PCI_INFLIGHT_BYTES 2
242#define PDC_PCI_READ_CONFIG 3
243#define PDC_PCI_WRITE_CONFIG 4
244#define PDC_PCI_READ_PCI_IO 5
245#define PDC_PCI_WRITE_PCI_IO 6
246#define PDC_PCI_READ_CONFIG_DELAY 7
247#define PDC_PCI_UPDATE_CONFIG_DELAY 8
248#define PDC_PCI_PCI_PATH_TO_PCI_HPA 9
249#define PDC_PCI_PCI_HPA_TO_PCI_PATH 10
250#define PDC_PCI_PCI_PATH_TO_PCI_BUS 11
251#define PDC_PCI_PCI_RESERVED 12
252#define PDC_PCI_PCI_INT_ROUTE_SIZE 13
253#define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE
254#define PDC_PCI_PCI_INT_ROUTE 14
255#define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE
256#define PDC_PCI_READ_MON_TYPE 15
257#define PDC_PCI_WRITE_MON_TYPE 16
258
259
260/* Get SCSI Interface Card info: SDTR, SCSI ID, mode (SE vs LVD) */
261#define PDC_INITIATOR 163
262#define PDC_GET_INITIATOR 0
263#define PDC_SET_INITIATOR 1
264#define PDC_DELETE_INITIATOR 2
265#define PDC_RETURN_TABLE_SIZE 3
266#define PDC_RETURN_TABLE 4
267
268#define PDC_LINK 165 /* (sprockets) */
269#define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */
270#define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */
271
272/* cl_class
273 * page 3-33 of IO-Firmware ARS
274 * IODC ENTRY_INIT(Search first) RET[1]
275 */
276#define CL_NULL 0 /* invalid */
277#define CL_RANDOM 1 /* random access (as disk) */
278#define CL_SEQU 2 /* sequential access (as tape) */
279#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */
280#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */
281#define CL_DISPL 9 /* half-duplex console (display) */
282#define CL_FC 10 /* FiberChannel access media */
283
284/* IODC ENTRY_INIT() */
285#define ENTRY_INIT_SRCH_FRST 2
286#define ENTRY_INIT_SRCH_NEXT 3
287#define ENTRY_INIT_MOD_DEV 4
288#define ENTRY_INIT_DEV 5
289#define ENTRY_INIT_MOD 6
290#define ENTRY_INIT_MSG 9
291
292/* IODC ENTRY_IO() */
293#define ENTRY_IO_BOOTIN 0
294#define ENTRY_IO_BOOTOUT 1
295#define ENTRY_IO_CIN 2
296#define ENTRY_IO_COUT 3
297#define ENTRY_IO_CLOSE 4
298#define ENTRY_IO_GETMSG 9
299#define ENTRY_IO_BBLOCK_IN 16
300#define ENTRY_IO_BBLOCK_OUT 17
301
302/* IODC ENTRY_SPA() */
303
304/* IODC ENTRY_CONFIG() */
305
306/* IODC ENTRY_TEST() */
307
308/* IODC ENTRY_TLB() */
309
310/* constants for OS (NVM...) */
311#define OS_ID_NONE 0 /* Undefined OS ID */
312#define OS_ID_HPUX 1 /* HP-UX OS */
313#define OS_ID_MPEXL 2 /* MPE XL OS */
314#define OS_ID_OSF 3 /* OSF OS */
315#define OS_ID_HPRT 4 /* HP-RT OS */
316#define OS_ID_NOVEL 5 /* NOVELL OS */
317#define OS_ID_LINUX 6 /* Linux */
318
319
320/* constants for PDC_CHASSIS */
321#define OSTAT_OFF 0
322#define OSTAT_FLT 1
323#define OSTAT_TEST 2
324#define OSTAT_INIT 3
325#define OSTAT_SHUT 4
326#define OSTAT_WARN 5
327#define OSTAT_RUN 6
328#define OSTAT_ON 7
329
330/* Page Zero constant offsets used by the HPMC handler */
331#define BOOT_CONSOLE_HPA_OFFSET 0x3c0
332#define BOOT_CONSOLE_SPA_OFFSET 0x3c4
333#define BOOT_CONSOLE_PATH_OFFSET 0x3a8
334
335#if !defined(__ASSEMBLY__)
336#ifdef __KERNEL__
337
338#include <linux/types.h>
339
340extern int pdc_type;
341
342/* Values for pdc_type */
343#define PDC_TYPE_ILLEGAL -1
344#define PDC_TYPE_PAT 0 /* 64-bit PAT-PDC */
345#define PDC_TYPE_SYSTEM_MAP 1 /* 32-bit, but supports PDC_SYSTEM_MAP */
346#define PDC_TYPE_SNAKE 2 /* Doesn't support SYSTEM_MAP */
347
348struct pdc_chassis_info { /* for PDC_CHASSIS_INFO */
349 unsigned long actcnt; /* actual number of bytes returned */
350 unsigned long maxcnt; /* maximum number of bytes that could be returned */
351};
352
353struct pdc_coproc_cfg { /* for PDC_COPROC_CFG */
354 unsigned long ccr_functional;
355 unsigned long ccr_present;
356 unsigned long revision;
357 unsigned long model;
358};
359
360struct pdc_model { /* for PDC_MODEL */
361 unsigned long hversion;
362 unsigned long sversion;
363 unsigned long hw_id;
364 unsigned long boot_id;
365 unsigned long sw_id;
366 unsigned long sw_cap;
367 unsigned long arch_rev;
368 unsigned long pot_key;
369 unsigned long curr_key;
370};
371
372struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */
373 unsigned long
374#ifdef CONFIG_64BIT
375 cc_padW:32,
376#endif
377 cc_alias: 4, /* alias boundaries for virtual addresses */
378 cc_block: 4, /* to determine most efficient stride */
379 cc_line : 3, /* maximum amount written back as a result of store (multiple of 16 bytes) */
380 cc_shift: 2, /* how much to shift cc_block left */
381 cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */
382 cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */
383 cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */
384 cc_pad1 : 10, /* reserved */
385 cc_hv : 3; /* hversion dependent */
386};
387
388struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */
389 unsigned long tc_pad0:12, /* reserved */
390#ifdef CONFIG_64BIT
391 tc_padW:32,
392#endif
393 tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */
394 tc_hv : 1, /* HV */
395 tc_page : 1, /* 0 = 2K page-size-machine, 1 = 4k page size */
396 tc_cst : 3, /* 0 = incoherent operations, else coherent operations */
397 tc_aid : 5, /* ITLB: width of access ids of processor (encoded!) */
398 tc_pad1 : 8; /* ITLB: width of space-registers (encoded) */
399};
400
401struct pdc_cache_info { /* main-PDC_CACHE-structure (caches & TLB's) */
402 /* I-cache */
403 unsigned long ic_size; /* size in bytes */
404 struct pdc_cache_cf ic_conf; /* configuration */
405 unsigned long ic_base; /* base-addr */
406 unsigned long ic_stride;
407 unsigned long ic_count;
408 unsigned long ic_loop;
409 /* D-cache */
410 unsigned long dc_size; /* size in bytes */
411 struct pdc_cache_cf dc_conf; /* configuration */
412 unsigned long dc_base; /* base-addr */
413 unsigned long dc_stride;
414 unsigned long dc_count;
415 unsigned long dc_loop;
416 /* Instruction-TLB */
417 unsigned long it_size; /* number of entries in I-TLB */
418 struct pdc_tlb_cf it_conf; /* I-TLB-configuration */
419 unsigned long it_sp_base;
420 unsigned long it_sp_stride;
421 unsigned long it_sp_count;
422 unsigned long it_off_base;
423 unsigned long it_off_stride;
424 unsigned long it_off_count;
425 unsigned long it_loop;
426 /* data-TLB */
427 unsigned long dt_size; /* number of entries in D-TLB */
428 struct pdc_tlb_cf dt_conf; /* D-TLB-configuration */
429 unsigned long dt_sp_base;
430 unsigned long dt_sp_stride;
431 unsigned long dt_sp_count;
432 unsigned long dt_off_base;
433 unsigned long dt_off_stride;
434 unsigned long dt_off_count;
435 unsigned long dt_loop;
436};
437
438#if 0
439/* If you start using the next struct, you'll have to adjust it to
440 * work with 64-bit firmware I think -PB
441 */
442struct pdc_iodc { /* PDC_IODC */
443 unsigned char hversion_model;
444 unsigned char hversion;
445 unsigned char spa;
446 unsigned char type;
447 unsigned int sversion_rev:4;
448 unsigned int sversion_model:19;
449 unsigned int sversion_opt:8;
450 unsigned char rev;
451 unsigned char dep;
452 unsigned char features;
453 unsigned char pad1;
454 unsigned int checksum:16;
455 unsigned int length:16;
456 unsigned int pad[15];
457} __attribute__((aligned(8))) ;
458#endif
459
460#ifndef CONFIG_PA20
461/* no BLTBs in pa2.0 processors */
462struct pdc_btlb_info_range {
463 __u8 res00;
464 __u8 num_i;
465 __u8 num_d;
466 __u8 num_comb;
467};
468
469struct pdc_btlb_info { /* PDC_BLOCK_TLB, return of PDC_BTLB_INFO */
470 unsigned int min_size; /* minimum size of BTLB in pages */
471 unsigned int max_size; /* maximum size of BTLB in pages */
472 struct pdc_btlb_info_range fixed_range_info;
473 struct pdc_btlb_info_range variable_range_info;
474};
475
476#endif /* !CONFIG_PA20 */
477
478#ifdef CONFIG_64BIT
479struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */
480 unsigned long entries_returned;
481 unsigned long entries_total;
482};
483
484struct pdc_memory_table { /* PDC_MEM/PDC_MEM_TABLE (arguments) */
485 unsigned long paddr;
486 unsigned int pages;
487 unsigned int reserved;
488};
489#endif /* CONFIG_64BIT */
490
491struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */
492 unsigned long mod_addr;
493 unsigned long mod_pgs;
494 unsigned long add_addrs;
495};
496
497struct pdc_system_map_addr_info { /* PDC_SYSTEM_MAP/FIND_ADDRESS */
498 unsigned long mod_addr;
499 unsigned long mod_pgs;
500};
501
502struct pdc_initiator { /* PDC_INITIATOR */
503 int host_id;
504 int factor;
505 int width;
506 int mode;
507};
508
509struct hardware_path {
510 char flags; /* see bit definitions below */
511 char bc[6]; /* Bus Converter routing info to a specific */
512 /* I/O adaptor (< 0 means none, > 63 resvd) */
513 char mod; /* fixed field of specified module */
514};
515
516/*
517 * Device path specifications used by PDC.
518 */
519struct pdc_module_path {
520 struct hardware_path path;
521 unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */
522};
523
524#ifndef CONFIG_PA20
525/* Only used on some pre-PA2.0 boxes */
526struct pdc_memory_map { /* PDC_MEMORY_MAP */
527 unsigned long hpa; /* mod's register set address */
528 unsigned long more_pgs; /* number of additional I/O pgs */
529};
530#endif
531
532struct pdc_tod {
533 unsigned long tod_sec;
534 unsigned long tod_usec;
535};
536
537/* architected results from PDC_PIM/transfer hpmc on a PA1.1 machine */
538
539struct pdc_hpmc_pim_11 { /* PDC_PIM */
540 __u32 gr[32];
541 __u32 cr[32];
542 __u32 sr[8];
543 __u32 iasq_back;
544 __u32 iaoq_back;
545 __u32 check_type;
546 __u32 cpu_state;
547 __u32 rsvd1;
548 __u32 cache_check;
549 __u32 tlb_check;
550 __u32 bus_check;
551 __u32 assists_check;
552 __u32 rsvd2;
553 __u32 assist_state;
554 __u32 responder_addr;
555 __u32 requestor_addr;
556 __u32 path_info;
557 __u64 fr[32];
558};
559
560/*
561 * architected results from PDC_PIM/transfer hpmc on a PA2.0 machine
562 *
563 * Note that PDC_PIM doesn't care whether or not wide mode was enabled
564 * so the results are different on PA1.1 vs. PA2.0 when in narrow mode.
565 *
566 * Note also that there are unarchitected results available, which
567 * are hversion dependent. Do a "ser pim 0 hpmc" after rebooting, since
568 * the firmware is probably the best way of printing hversion dependent
569 * data.
570 */
571
572struct pdc_hpmc_pim_20 { /* PDC_PIM */
573 __u64 gr[32];
574 __u64 cr[32];
575 __u64 sr[8];
576 __u64 iasq_back;
577 __u64 iaoq_back;
578 __u32 check_type;
579 __u32 cpu_state;
580 __u32 cache_check;
581 __u32 tlb_check;
582 __u32 bus_check;
583 __u32 assists_check;
584 __u32 assist_state;
585 __u32 path_info;
586 __u64 responder_addr;
587 __u64 requestor_addr;
588 __u64 fr[32];
589};
590
591void pdc_console_init(void); /* in pdc_console.c */
592void pdc_console_restart(void);
593
594void setup_pdc(void); /* in inventory.c */
595
596/* wrapper-functions from pdc.c */
597
598int pdc_add_valid(unsigned long address);
599int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
600int pdc_chassis_disp(unsigned long disp);
601int pdc_chassis_warn(unsigned long *warn);
602int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info);
603int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
604 void *iodc_data, unsigned int iodc_data_size);
605int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
606 struct pdc_module_path *mod_path, long mod_index);
607int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
608 long mod_index, long addr_index);
609int pdc_model_info(struct pdc_model *model);
610int pdc_model_sysmodel(char *name);
611int pdc_model_cpuid(unsigned long *cpu_id);
612int pdc_model_versions(unsigned long *versions, int id);
613int pdc_model_capabilities(unsigned long *capabilities);
614int pdc_cache_info(struct pdc_cache_info *cache);
615int pdc_spaceid_bits(unsigned long *space_bits);
616#ifndef CONFIG_PA20
617int pdc_btlb_info(struct pdc_btlb_info *btlb);
618int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
619#endif /* !CONFIG_PA20 */
620int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa);
621
622int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count);
623int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count);
624int pdc_stable_get_size(unsigned long *size);
625int pdc_stable_verify_contents(void);
626int pdc_stable_initialize(void);
627
628int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa);
629int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl);
630
631int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *);
632int pdc_tod_read(struct pdc_tod *tod);
633int pdc_tod_set(unsigned long sec, unsigned long usec);
634
635#ifdef CONFIG_64BIT
636int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
637 struct pdc_memory_table *tbl, unsigned long entries);
638#endif
639
640void set_firmware_width(void);
641int pdc_do_firm_test_reset(unsigned long ftc_bitmap);
642int pdc_do_reset(void);
643int pdc_soft_power_info(unsigned long *power_reg);
644int pdc_soft_power_button(int sw_control);
645void pdc_io_reset(void);
646void pdc_io_reset_devices(void);
647int pdc_iodc_getc(void);
648int pdc_iodc_print(const unsigned char *str, unsigned count);
649
650void pdc_emergency_unlock(void);
651int pdc_sti_call(unsigned long func, unsigned long flags,
652 unsigned long inptr, unsigned long outputr,
653 unsigned long glob_cfg);
654
655static inline char * os_id_to_string(u16 os_id) {
656 switch(os_id) {
657 case OS_ID_NONE: return "No OS";
658 case OS_ID_HPUX: return "HP-UX";
659 case OS_ID_MPEXL: return "MPE-iX";
660 case OS_ID_OSF: return "OSF";
661 case OS_ID_HPRT: return "HP-RT";
662 case OS_ID_NOVEL: return "Novell Netware";
663 case OS_ID_LINUX: return "Linux";
664 default: return "Unknown";
665 }
666}
667
668#endif /* __KERNEL__ */
669
670#define PAGE0 ((struct zeropage *)__PAGE_OFFSET)
671
672/* DEFINITION OF THE ZERO-PAGE (PAG0) */
673/* based on work by Jason Eckhardt (jason@equator.com) */
674
675/* flags of the device_path */
676#define PF_AUTOBOOT 0x80
677#define PF_AUTOSEARCH 0x40
678#define PF_TIMER 0x0F
679
680struct device_path { /* page 1-69 */
681 unsigned char flags; /* flags see above! */
682 unsigned char bc[6]; /* bus converter routing info */
683 unsigned char mod;
684 unsigned int layers[6];/* device-specific layer-info */
685} __attribute__((aligned(8))) ;
686
687struct pz_device {
688 struct device_path dp; /* see above */
689 /* struct iomod *hpa; */
690 unsigned int hpa; /* HPA base address */
691 /* char *spa; */
692 unsigned int spa; /* SPA base address */
693 /* int (*iodc_io)(struct iomod*, ...); */
694 unsigned int iodc_io; /* device entry point */
695 short pad; /* reserved */
696 unsigned short cl_class;/* see below */
697} __attribute__((aligned(8))) ;
698
699struct zeropage {
700 /* [0x000] initialize vectors (VEC) */
701 unsigned int vec_special; /* must be zero */
702 /* int (*vec_pow_fail)(void);*/
703 unsigned int vec_pow_fail; /* power failure handler */
704 /* int (*vec_toc)(void); */
705 unsigned int vec_toc;
706 unsigned int vec_toclen;
707 /* int (*vec_rendz)(void); */
708 unsigned int vec_rendz;
709 int vec_pow_fail_flen;
710 int vec_pad[10];
711
712 /* [0x040] reserved processor dependent */
713 int pad0[112];
714
715 /* [0x200] reserved */
716 int pad1[84];
717
718 /* [0x350] memory configuration (MC) */
719 int memc_cont; /* contiguous mem size (bytes) */
720 int memc_phsize; /* physical memory size */
721 int memc_adsize; /* additional mem size, bytes of SPA space used by PDC */
722 unsigned int mem_pdc_hi; /* used for 64-bit */
723
724 /* [0x360] various parameters for the boot-CPU */
725 /* unsigned int *mem_booterr[8]; */
726 unsigned int mem_booterr[8]; /* ptr to boot errors */
727 unsigned int mem_free; /* first location, where OS can be loaded */
728 /* struct iomod *mem_hpa; */
729 unsigned int mem_hpa; /* HPA of the boot-CPU */
730 /* int (*mem_pdc)(int, ...); */
731 unsigned int mem_pdc; /* PDC entry point */
732 unsigned int mem_10msec; /* number of clock ticks in 10msec */
733
734 /* [0x390] initial memory module (IMM) */
735 /* struct iomod *imm_hpa; */
736 unsigned int imm_hpa; /* HPA of the IMM */
737 int imm_soft_boot; /* 0 = was hard boot, 1 = was soft boot */
738 unsigned int imm_spa_size; /* SPA size of the IMM in bytes */
739 unsigned int imm_max_mem; /* bytes of mem in IMM */
740
741 /* [0x3A0] boot console, display device and keyboard */
742 struct pz_device mem_cons; /* description of console device */
743 struct pz_device mem_boot; /* description of boot device */
744 struct pz_device mem_kbd; /* description of keyboard device */
745
746 /* [0x430] reserved */
747 int pad430[116];
748
749 /* [0x600] processor dependent */
750 __u32 pad600[1];
751 __u32 proc_sti; /* pointer to STI ROM */
752 __u32 pad608[126];
753};
754
755#endif /* !defined(__ASSEMBLY__) */
756
757#endif /* _PARISC_PDC_H */
diff --git a/include/asm-parisc/pdc_chassis.h b/include/asm-parisc/pdc_chassis.h
deleted file mode 100644
index a609273dc6bf..000000000000
--- a/include/asm-parisc/pdc_chassis.h
+++ /dev/null
@@ -1,381 +0,0 @@
1/*
2 * include/asm-parisc/pdc_chassis.h
3 *
4 * Copyright (C) 2002 Laurent Canet <canetl@esiee.fr>
5 * Copyright (C) 2002 Thibaut Varene <varenet@parisc-linux.org>
6 *
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License, version 2, as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 *
21 * TODO: - handle processor number on SMP systems (Reporting Entity ID)
22 * - handle message ID
23 * - handle timestamps
24 */
25
26
27#ifndef _PARISC_PDC_CHASSIS_H
28#define _PARISC_PDC_CHASSIS_H
29
30/*
31 * ----------
32 * Prototypes
33 * ----------
34 */
35
36int pdc_chassis_send_status(int message);
37void parisc_pdc_chassis_init(void);
38
39
40/*
41 * -----------------
42 * Direct call names
43 * -----------------
44 * They setup everything for you, the Log message and the corresponding LED state
45 */
46
47#define PDC_CHASSIS_DIRECT_BSTART 0
48#define PDC_CHASSIS_DIRECT_BCOMPLETE 1
49#define PDC_CHASSIS_DIRECT_SHUTDOWN 2
50#define PDC_CHASSIS_DIRECT_PANIC 3
51#define PDC_CHASSIS_DIRECT_HPMC 4
52#define PDC_CHASSIS_DIRECT_LPMC 5
53#define PDC_CHASSIS_DIRECT_DUMP 6 /* not yet implemented */
54#define PDC_CHASSIS_DIRECT_OOPS 7 /* not yet implemented */
55
56
57/*
58 * ------------
59 * LEDs control
60 * ------------
61 * Set the three LEDs -- Run, Attn, and Fault.
62 */
63
64/* Old PDC LED control */
65#define PDC_CHASSIS_DISP_DATA(v) ((unsigned long)(v) << 17)
66
67/*
68 * Available PDC PAT LED states
69 */
70
71#define PDC_CHASSIS_LED_RUN_OFF (0ULL << 4)
72#define PDC_CHASSIS_LED_RUN_FLASH (1ULL << 4)
73#define PDC_CHASSIS_LED_RUN_ON (2ULL << 4)
74#define PDC_CHASSIS_LED_RUN_NC (3ULL << 4)
75#define PDC_CHASSIS_LED_ATTN_OFF (0ULL << 6)
76#define PDC_CHASSIS_LED_ATTN_FLASH (1ULL << 6)
77#define PDC_CHASSIS_LED_ATTN_NC (3ULL << 6) /* ATTN ON is invalid */
78#define PDC_CHASSIS_LED_FAULT_OFF (0ULL << 8)
79#define PDC_CHASSIS_LED_FAULT_FLASH (1ULL << 8)
80#define PDC_CHASSIS_LED_FAULT_ON (2ULL << 8)
81#define PDC_CHASSIS_LED_FAULT_NC (3ULL << 8)
82#define PDC_CHASSIS_LED_VALID (1ULL << 10)
83
84/*
85 * Valid PDC PAT LED states combinations
86 */
87
88/* System running normally */
89#define PDC_CHASSIS_LSTATE_RUN_NORMAL (PDC_CHASSIS_LED_RUN_ON | \
90 PDC_CHASSIS_LED_ATTN_OFF | \
91 PDC_CHASSIS_LED_FAULT_OFF | \
92 PDC_CHASSIS_LED_VALID )
93/* System crashed and rebooted itself successfully */
94#define PDC_CHASSIS_LSTATE_RUN_CRASHREC (PDC_CHASSIS_LED_RUN_ON | \
95 PDC_CHASSIS_LED_ATTN_OFF | \
96 PDC_CHASSIS_LED_FAULT_FLASH | \
97 PDC_CHASSIS_LED_VALID )
98/* There was a system interruption that did not take the system down */
99#define PDC_CHASSIS_LSTATE_RUN_SYSINT (PDC_CHASSIS_LED_RUN_ON | \
100 PDC_CHASSIS_LED_ATTN_FLASH | \
101 PDC_CHASSIS_LED_FAULT_OFF | \
102 PDC_CHASSIS_LED_VALID )
103/* System running and unexpected reboot or non-critical error detected */
104#define PDC_CHASSIS_LSTATE_RUN_NCRIT (PDC_CHASSIS_LED_RUN_ON | \
105 PDC_CHASSIS_LED_ATTN_FLASH | \
106 PDC_CHASSIS_LED_FAULT_FLASH | \
107 PDC_CHASSIS_LED_VALID )
108/* Executing non-OS code */
109#define PDC_CHASSIS_LSTATE_NONOS (PDC_CHASSIS_LED_RUN_FLASH | \
110 PDC_CHASSIS_LED_ATTN_OFF | \
111 PDC_CHASSIS_LED_FAULT_OFF | \
112 PDC_CHASSIS_LED_VALID )
113/* Boot failed - Executing non-OS code */
114#define PDC_CHASSIS_LSTATE_NONOS_BFAIL (PDC_CHASSIS_LED_RUN_FLASH | \
115 PDC_CHASSIS_LED_ATTN_OFF | \
116 PDC_CHASSIS_LED_FAULT_ON | \
117 PDC_CHASSIS_LED_VALID )
118/* Unexpected reboot occurred - Executing non-OS code */
119#define PDC_CHASSIS_LSTATE_NONOS_UNEXP (PDC_CHASSIS_LED_RUN_FLASH | \
120 PDC_CHASSIS_LED_ATTN_OFF | \
121 PDC_CHASSIS_LED_FAULT_FLASH | \
122 PDC_CHASSIS_LED_VALID )
123/* Executing non-OS code - Non-critical error detected */
124#define PDC_CHASSIS_LSTATE_NONOS_NCRIT (PDC_CHASSIS_LED_RUN_FLASH | \
125 PDC_CHASSIS_LED_ATTN_FLASH | \
126 PDC_CHASSIS_LED_FAULT_OFF | \
127 PDC_CHASSIS_LED_VALID )
128/* Boot failed - Executing non-OS code - Non-critical error detected */
129#define PDC_CHASSIS_LSTATE_BFAIL_NCRIT (PDC_CHASSIS_LED_RUN_FLASH | \
130 PDC_CHASSIS_LED_ATTN_FLASH | \
131 PDC_CHASSIS_LED_FAULT_ON | \
132 PDC_CHASSIS_LED_VALID )
133/* Unexpected reboot/recovering - Executing non-OS code - Non-critical error detected */
134#define PDC_CHASSIS_LSTATE_UNEXP_NCRIT (PDC_CHASSIS_LED_RUN_FLASH | \
135 PDC_CHASSIS_LED_ATTN_FLASH | \
136 PDC_CHASSIS_LED_FAULT_FLASH | \
137 PDC_CHASSIS_LED_VALID )
138/* Cannot execute PDC */
139#define PDC_CHASSIS_LSTATE_CANNOT_PDC (PDC_CHASSIS_LED_RUN_OFF | \
140 PDC_CHASSIS_LED_ATTN_OFF | \
141 PDC_CHASSIS_LED_FAULT_OFF | \
142 PDC_CHASSIS_LED_VALID )
143/* Boot failed - OS not up - PDC has detected a failure that prevents boot */
144#define PDC_CHASSIS_LSTATE_FATAL_BFAIL (PDC_CHASSIS_LED_RUN_OFF | \
145 PDC_CHASSIS_LED_ATTN_OFF | \
146 PDC_CHASSIS_LED_FAULT_ON | \
147 PDC_CHASSIS_LED_VALID )
148/* No code running - Non-critical error detected (double fault situation) */
149#define PDC_CHASSIS_LSTATE_NOCODE_NCRIT (PDC_CHASSIS_LED_RUN_OFF | \
150 PDC_CHASSIS_LED_ATTN_FLASH | \
151 PDC_CHASSIS_LED_FAULT_OFF | \
152 PDC_CHASSIS_LED_VALID )
153/* Boot failed - OS not up - Fatal failure detected - Non-critical error detected */
154#define PDC_CHASSIS_LSTATE_FATAL_NCRIT (PDC_CHASSIS_LED_RUN_OFF | \
155 PDC_CHASSIS_LED_ATTN_FLASH | \
156 PDC_CHASSIS_LED_FAULT_ON | \
157 PDC_CHASSIS_LED_VALID )
158/* All other states are invalid */
159
160
161/*
162 * --------------
163 * PDC Log events
164 * --------------
165 * Here follows bits needed to fill up the log event sent to PDC_CHASSIS
166 * The log message contains: Alert level, Source, Source detail,
167 * Source ID, Problem detail, Caller activity, Activity status,
168 * Caller subactivity, Reporting entity type, Reporting entity ID,
169 * Data type, Unique message ID and EOM.
170 */
171
172/* Alert level */
173#define PDC_CHASSIS_ALERT_FORWARD (0ULL << 36) /* no failure detected */
174#define PDC_CHASSIS_ALERT_SERPROC (1ULL << 36) /* service proc - no failure */
175#define PDC_CHASSIS_ALERT_NURGENT (2ULL << 36) /* non-urgent operator attn */
176#define PDC_CHASSIS_ALERT_BLOCKED (3ULL << 36) /* system blocked */
177#define PDC_CHASSIS_ALERT_CONF_CHG (4ULL << 36) /* unexpected configuration change */
178#define PDC_CHASSIS_ALERT_ENV_PB (5ULL << 36) /* boot possible, environmental pb */
179#define PDC_CHASSIS_ALERT_PENDING (6ULL << 36) /* boot possible, pending failure */
180#define PDC_CHASSIS_ALERT_PERF_IMP (8ULL << 36) /* boot possible, performance impaired */
181#define PDC_CHASSIS_ALERT_FUNC_IMP (10ULL << 36) /* boot possible, functionality impaired */
182#define PDC_CHASSIS_ALERT_SOFT_FAIL (12ULL << 36) /* software failure */
183#define PDC_CHASSIS_ALERT_HANG (13ULL << 36) /* system hang */
184#define PDC_CHASSIS_ALERT_ENV_FATAL (14ULL << 36) /* fatal power or environmental pb */
185#define PDC_CHASSIS_ALERT_HW_FATAL (15ULL << 36) /* fatal hardware problem */
186
187/* Source */
188#define PDC_CHASSIS_SRC_NONE (0ULL << 28) /* unknown, no source stated */
189#define PDC_CHASSIS_SRC_PROC (1ULL << 28) /* processor */
190/* For later use ? */
191#define PDC_CHASSIS_SRC_PROC_CACHE (2ULL << 28) /* processor cache*/
192#define PDC_CHASSIS_SRC_PDH (3ULL << 28) /* processor dependent hardware */
193#define PDC_CHASSIS_SRC_PWR (4ULL << 28) /* power */
194#define PDC_CHASSIS_SRC_FAB (5ULL << 28) /* fabric connector */
195#define PDC_CHASSIS_SRC_PLATi (6ULL << 28) /* platform */
196#define PDC_CHASSIS_SRC_MEM (7ULL << 28) /* memory */
197#define PDC_CHASSIS_SRC_IO (8ULL << 28) /* I/O */
198#define PDC_CHASSIS_SRC_CELL (9ULL << 28) /* cell */
199#define PDC_CHASSIS_SRC_PD (10ULL << 28) /* protected domain */
200
201/* Source detail field */
202#define PDC_CHASSIS_SRC_D_PROC (1ULL << 24) /* processor general */
203
204/* Source ID - platform dependent */
205#define PDC_CHASSIS_SRC_ID_UNSPEC (0ULL << 16)
206
207/* Problem detail - problem source dependent */
208#define PDC_CHASSIS_PB_D_PROC_NONE (0ULL << 32) /* no problem detail */
209#define PDC_CHASSIS_PB_D_PROC_TIMEOUT (4ULL << 32) /* timeout */
210
211/* Caller activity */
212#define PDC_CHASSIS_CALL_ACT_HPUX_BL (7ULL << 12) /* Boot Loader */
213#define PDC_CHASSIS_CALL_ACT_HPUX_PD (8ULL << 12) /* SAL_PD activities */
214#define PDC_CHASSIS_CALL_ACT_HPUX_EVENT (9ULL << 12) /* SAL_EVENTS activities */
215#define PDC_CHASSIS_CALL_ACT_HPUX_IO (10ULL << 12) /* SAL_IO activities */
216#define PDC_CHASSIS_CALL_ACT_HPUX_PANIC (11ULL << 12) /* System panic */
217#define PDC_CHASSIS_CALL_ACT_HPUX_INIT (12ULL << 12) /* System initialization */
218#define PDC_CHASSIS_CALL_ACT_HPUX_SHUT (13ULL << 12) /* System shutdown */
219#define PDC_CHASSIS_CALL_ACT_HPUX_WARN (14ULL << 12) /* System warning */
220#define PDC_CHASSIS_CALL_ACT_HPUX_DU (15ULL << 12) /* Display_Activity() update */
221
222/* Activity status - implementation dependent */
223#define PDC_CHASSIS_ACT_STATUS_UNSPEC (0ULL << 0)
224
225/* Caller subactivity - implementation dependent */
226/* FIXME: other subactivities ? */
227#define PDC_CHASSIS_CALL_SACT_UNSPEC (0ULL << 4) /* implementation dependent */
228
229/* Reporting entity type */
230#define PDC_CHASSIS_RET_GENERICOS (12ULL << 52) /* generic OSes */
231#define PDC_CHASSIS_RET_IA64_NT (13ULL << 52) /* IA-64 NT */
232#define PDC_CHASSIS_RET_HPUX (14ULL << 52) /* HP-UX */
233#define PDC_CHASSIS_RET_DIAG (15ULL << 52) /* offline diagnostics & utilities */
234
235/* Reporting entity ID */
236#define PDC_CHASSIS_REID_UNSPEC (0ULL << 44)
237
238/* Data type */
239#define PDC_CHASSIS_DT_NONE (0ULL << 59) /* data field unused */
240/* For later use ? Do we need these ? */
241#define PDC_CHASSIS_DT_PHYS_ADDR (1ULL << 59) /* physical address */
242#define PDC_CHASSIS_DT_DATA_EXPECT (2ULL << 59) /* expected data */
243#define PDC_CHASSIS_DT_ACTUAL (3ULL << 59) /* actual data */
244#define PDC_CHASSIS_DT_PHYS_LOC (4ULL << 59) /* physical location */
245#define PDC_CHASSIS_DT_PHYS_LOC_EXT (5ULL << 59) /* physical location extension */
246#define PDC_CHASSIS_DT_TAG (6ULL << 59) /* tag */
247#define PDC_CHASSIS_DT_SYNDROME (7ULL << 59) /* syndrome */
248#define PDC_CHASSIS_DT_CODE_ADDR (8ULL << 59) /* code address */
249#define PDC_CHASSIS_DT_ASCII_MSG (9ULL << 59) /* ascii message */
250#define PDC_CHASSIS_DT_POST (10ULL << 59) /* POST code */
251#define PDC_CHASSIS_DT_TIMESTAMP (11ULL << 59) /* timestamp */
252#define PDC_CHASSIS_DT_DEV_STAT (12ULL << 59) /* device status */
253#define PDC_CHASSIS_DT_DEV_TYPE (13ULL << 59) /* device type */
254#define PDC_CHASSIS_DT_PB_DET (14ULL << 59) /* problem detail */
255#define PDC_CHASSIS_DT_ACT_LEV (15ULL << 59) /* activity level/timeout */
256#define PDC_CHASSIS_DT_SER_NUM (16ULL << 59) /* serial number */
257#define PDC_CHASSIS_DT_REV_NUM (17ULL << 59) /* revision number */
258#define PDC_CHASSIS_DT_INTERRUPT (18ULL << 59) /* interruption information */
259#define PDC_CHASSIS_DT_TEST_NUM (19ULL << 59) /* test number */
260#define PDC_CHASSIS_DT_STATE_CHG (20ULL << 59) /* major changes in system state */
261#define PDC_CHASSIS_DT_PROC_DEALLOC (21ULL << 59) /* processor deallocate */
262#define PDC_CHASSIS_DT_RESET (30ULL << 59) /* reset type and cause */
263#define PDC_CHASSIS_DT_PA_LEGACY (31ULL << 59) /* legacy PA hex chassis code */
264
265/* System states - part of major changes in system state data field */
266#define PDC_CHASSIS_SYSTATE_BSTART (0ULL << 0) /* boot start */
267#define PDC_CHASSIS_SYSTATE_BCOMP (1ULL << 0) /* boot complete */
268#define PDC_CHASSIS_SYSTATE_CHANGE (2ULL << 0) /* major change */
269#define PDC_CHASSIS_SYSTATE_LED (3ULL << 0) /* LED change */
270#define PDC_CHASSIS_SYSTATE_PANIC (9ULL << 0) /* OS Panic */
271#define PDC_CHASSIS_SYSTATE_DUMP (10ULL << 0) /* memory dump */
272#define PDC_CHASSIS_SYSTATE_HPMC (11ULL << 0) /* processing HPMC */
273#define PDC_CHASSIS_SYSTATE_HALT (15ULL << 0) /* system halted */
274
275/* Message ID */
276#define PDC_CHASSIS_MSG_ID (0ULL << 40) /* we do not handle msg IDs atm */
277
278/* EOM - separates log entries */
279#define PDC_CHASSIS_EOM_CLEAR (0ULL << 43)
280#define PDC_CHASSIS_EOM_SET (1ULL << 43)
281
282/*
283 * Preformated well known messages
284 */
285
286/* Boot started */
287#define PDC_CHASSIS_PMSG_BSTART (PDC_CHASSIS_ALERT_SERPROC | \
288 PDC_CHASSIS_SRC_PROC | \
289 PDC_CHASSIS_SRC_D_PROC | \
290 PDC_CHASSIS_SRC_ID_UNSPEC | \
291 PDC_CHASSIS_PB_D_PROC_NONE | \
292 PDC_CHASSIS_CALL_ACT_HPUX_INIT | \
293 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
294 PDC_CHASSIS_CALL_SACT_UNSPEC | \
295 PDC_CHASSIS_RET_HPUX | \
296 PDC_CHASSIS_REID_UNSPEC | \
297 PDC_CHASSIS_DT_STATE_CHG | \
298 PDC_CHASSIS_SYSTATE_BSTART | \
299 PDC_CHASSIS_MSG_ID | \
300 PDC_CHASSIS_EOM_SET )
301
302/* Boot complete */
303#define PDC_CHASSIS_PMSG_BCOMPLETE (PDC_CHASSIS_ALERT_SERPROC | \
304 PDC_CHASSIS_SRC_PROC | \
305 PDC_CHASSIS_SRC_D_PROC | \
306 PDC_CHASSIS_SRC_ID_UNSPEC | \
307 PDC_CHASSIS_PB_D_PROC_NONE | \
308 PDC_CHASSIS_CALL_ACT_HPUX_INIT | \
309 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
310 PDC_CHASSIS_CALL_SACT_UNSPEC | \
311 PDC_CHASSIS_RET_HPUX | \
312 PDC_CHASSIS_REID_UNSPEC | \
313 PDC_CHASSIS_DT_STATE_CHG | \
314 PDC_CHASSIS_SYSTATE_BCOMP | \
315 PDC_CHASSIS_MSG_ID | \
316 PDC_CHASSIS_EOM_SET )
317
318/* Shutdown */
319#define PDC_CHASSIS_PMSG_SHUTDOWN (PDC_CHASSIS_ALERT_SERPROC | \
320 PDC_CHASSIS_SRC_PROC | \
321 PDC_CHASSIS_SRC_D_PROC | \
322 PDC_CHASSIS_SRC_ID_UNSPEC | \
323 PDC_CHASSIS_PB_D_PROC_NONE | \
324 PDC_CHASSIS_CALL_ACT_HPUX_SHUT | \
325 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
326 PDC_CHASSIS_CALL_SACT_UNSPEC | \
327 PDC_CHASSIS_RET_HPUX | \
328 PDC_CHASSIS_REID_UNSPEC | \
329 PDC_CHASSIS_DT_STATE_CHG | \
330 PDC_CHASSIS_SYSTATE_HALT | \
331 PDC_CHASSIS_MSG_ID | \
332 PDC_CHASSIS_EOM_SET )
333
334/* Panic */
335#define PDC_CHASSIS_PMSG_PANIC (PDC_CHASSIS_ALERT_SOFT_FAIL | \
336 PDC_CHASSIS_SRC_PROC | \
337 PDC_CHASSIS_SRC_D_PROC | \
338 PDC_CHASSIS_SRC_ID_UNSPEC | \
339 PDC_CHASSIS_PB_D_PROC_NONE | \
340 PDC_CHASSIS_CALL_ACT_HPUX_PANIC| \
341 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
342 PDC_CHASSIS_CALL_SACT_UNSPEC | \
343 PDC_CHASSIS_RET_HPUX | \
344 PDC_CHASSIS_REID_UNSPEC | \
345 PDC_CHASSIS_DT_STATE_CHG | \
346 PDC_CHASSIS_SYSTATE_PANIC | \
347 PDC_CHASSIS_MSG_ID | \
348 PDC_CHASSIS_EOM_SET )
349
350// FIXME: extrapolated data
351/* HPMC */
352#define PDC_CHASSIS_PMSG_HPMC (PDC_CHASSIS_ALERT_CONF_CHG /*?*/ | \
353 PDC_CHASSIS_SRC_PROC | \
354 PDC_CHASSIS_SRC_D_PROC | \
355 PDC_CHASSIS_SRC_ID_UNSPEC | \
356 PDC_CHASSIS_PB_D_PROC_NONE | \
357 PDC_CHASSIS_CALL_ACT_HPUX_WARN | \
358 PDC_CHASSIS_RET_HPUX | \
359 PDC_CHASSIS_DT_STATE_CHG | \
360 PDC_CHASSIS_SYSTATE_HPMC | \
361 PDC_CHASSIS_MSG_ID | \
362 PDC_CHASSIS_EOM_SET )
363
364/* LPMC */
365#define PDC_CHASSIS_PMSG_LPMC (PDC_CHASSIS_ALERT_BLOCKED /*?*/| \
366 PDC_CHASSIS_SRC_PROC | \
367 PDC_CHASSIS_SRC_D_PROC | \
368 PDC_CHASSIS_SRC_ID_UNSPEC | \
369 PDC_CHASSIS_PB_D_PROC_NONE | \
370 PDC_CHASSIS_CALL_ACT_HPUX_WARN | \
371 PDC_CHASSIS_ACT_STATUS_UNSPEC | \
372 PDC_CHASSIS_CALL_SACT_UNSPEC | \
373 PDC_CHASSIS_RET_HPUX | \
374 PDC_CHASSIS_REID_UNSPEC | \
375 PDC_CHASSIS_DT_STATE_CHG | \
376 PDC_CHASSIS_SYSTATE_CHANGE | \
377 PDC_CHASSIS_MSG_ID | \
378 PDC_CHASSIS_EOM_SET )
379
380#endif /* _PARISC_PDC_CHASSIS_H */
381/* vim: set ts=8 */
diff --git a/include/asm-parisc/pdcpat.h b/include/asm-parisc/pdcpat.h
deleted file mode 100644
index 47539f117958..000000000000
--- a/include/asm-parisc/pdcpat.h
+++ /dev/null
@@ -1,308 +0,0 @@
1#ifndef __PARISC_PATPDC_H
2#define __PARISC_PATPDC_H
3
4/*
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
8 *
9 * Copyright 2000 (c) Hewlett Packard (Paul Bame <bame()spam.parisc-linux.org>)
10 * Copyright 2000,2004 (c) Grant Grundler <grundler()nahspam.parisc-linux.org>
11 */
12
13
14#define PDC_PAT_CELL 64L /* Interface for gaining and
15 * manipulatin g cell state within PD */
16#define PDC_PAT_CELL_GET_NUMBER 0L /* Return Cell number */
17#define PDC_PAT_CELL_GET_INFO 1L /* Returns info about Cell */
18#define PDC_PAT_CELL_MODULE 2L /* Returns info about Module */
19#define PDC_PAT_CELL_SET_ATTENTION 9L /* Set Cell Attention indicator */
20#define PDC_PAT_CELL_NUMBER_TO_LOC 10L /* Cell Number -> Location */
21#define PDC_PAT_CELL_WALK_FABRIC 11L /* Walk the Fabric */
22#define PDC_PAT_CELL_GET_RDT_SIZE 12L /* Return Route Distance Table Sizes */
23#define PDC_PAT_CELL_GET_RDT 13L /* Return Route Distance Tables */
24#define PDC_PAT_CELL_GET_LOCAL_PDH_SZ 14L /* Read Local PDH Buffer Size */
25#define PDC_PAT_CELL_SET_LOCAL_PDH 15L /* Write Local PDH Buffer */
26#define PDC_PAT_CELL_GET_REMOTE_PDH_SZ 16L /* Return Remote PDH Buffer Size */
27#define PDC_PAT_CELL_GET_REMOTE_PDH 17L /* Read Remote PDH Buffer */
28#define PDC_PAT_CELL_GET_DBG_INFO 128L /* Return DBG Buffer Info */
29#define PDC_PAT_CELL_CHANGE_ALIAS 129L /* Change Non-Equivalent Alias Chacking */
30
31
32/*
33** Arg to PDC_PAT_CELL_MODULE memaddr[4]
34**
35** Addresses on the Merced Bus != all Runway Bus addresses.
36** This is intended for programming SBA/LBA chips range registers.
37*/
38#define IO_VIEW 0UL
39#define PA_VIEW 1UL
40
41/* PDC_PAT_CELL_MODULE entity type values */
42#define PAT_ENTITY_CA 0 /* central agent */
43#define PAT_ENTITY_PROC 1 /* processor */
44#define PAT_ENTITY_MEM 2 /* memory controller */
45#define PAT_ENTITY_SBA 3 /* system bus adapter */
46#define PAT_ENTITY_LBA 4 /* local bus adapter */
47#define PAT_ENTITY_PBC 5 /* processor bus converter */
48#define PAT_ENTITY_XBC 6 /* crossbar fabric connect */
49#define PAT_ENTITY_RC 7 /* fabric interconnect */
50
51/* PDC_PAT_CELL_MODULE address range type values */
52#define PAT_PBNUM 0 /* PCI Bus Number */
53#define PAT_LMMIO 1 /* < 4G MMIO Space */
54#define PAT_GMMIO 2 /* > 4G MMIO Space */
55#define PAT_NPIOP 3 /* Non Postable I/O Port Space */
56#define PAT_PIOP 4 /* Postable I/O Port Space */
57#define PAT_AHPA 5 /* Addional HPA Space */
58#define PAT_UFO 6 /* HPA Space (UFO for Mariposa) */
59#define PAT_GNIP 7 /* GNI Reserved Space */
60
61
62
63/* PDC PAT CHASSIS LOG -- Platform logging & forward progress functions */
64
65#define PDC_PAT_CHASSIS_LOG 65L
66#define PDC_PAT_CHASSIS_WRITE_LOG 0L /* Write Log Entry */
67#define PDC_PAT_CHASSIS_READ_LOG 1L /* Read Log Entry */
68
69
70/* PDC PAT CPU -- CPU configuration within the protection domain */
71
72#define PDC_PAT_CPU 67L
73#define PDC_PAT_CPU_INFO 0L /* Return CPU config info */
74#define PDC_PAT_CPU_DELETE 1L /* Delete CPU */
75#define PDC_PAT_CPU_ADD 2L /* Add CPU */
76#define PDC_PAT_CPU_GET_NUMBER 3L /* Return CPU Number */
77#define PDC_PAT_CPU_GET_HPA 4L /* Return CPU HPA */
78#define PDC_PAT_CPU_STOP 5L /* Stop CPU */
79#define PDC_PAT_CPU_RENDEZVOUS 6L /* Rendezvous CPU */
80#define PDC_PAT_CPU_GET_CLOCK_INFO 7L /* Return CPU Clock info */
81#define PDC_PAT_CPU_GET_RENDEZVOUS_STATE 8L /* Return Rendezvous State */
82#define PDC_PAT_CPU_PLUNGE_FABRIC 128L /* Plunge Fabric */
83#define PDC_PAT_CPU_UPDATE_CACHE_CLEANSING 129L /* Manipulate Cache
84 * Cleansing Mode */
85/* PDC PAT EVENT -- Platform Events */
86
87#define PDC_PAT_EVENT 68L
88#define PDC_PAT_EVENT_GET_CAPS 0L /* Get Capabilities */
89#define PDC_PAT_EVENT_SET_MODE 1L /* Set Notification Mode */
90#define PDC_PAT_EVENT_SCAN 2L /* Scan Event */
91#define PDC_PAT_EVENT_HANDLE 3L /* Handle Event */
92#define PDC_PAT_EVENT_GET_NB_CALL 4L /* Get Non-Blocking call Args */
93
94/* PDC PAT HPMC -- Cause processor to go into spin loop, and wait
95 * for wake up from Monarch Processor.
96 */
97
98#define PDC_PAT_HPMC 70L
99#define PDC_PAT_HPMC_RENDEZ_CPU 0L /* go into spin loop */
100#define PDC_PAT_HPMC_SET_PARAMS 1L /* Allows OS to specify intr which PDC
101 * will use to interrupt OS during
102 * machine check rendezvous */
103
104/* parameters for PDC_PAT_HPMC_SET_PARAMS: */
105#define HPMC_SET_PARAMS_INTR 1L /* Rendezvous Interrupt */
106#define HPMC_SET_PARAMS_WAKE 2L /* Wake up processor */
107
108
109/* PDC PAT IO -- On-line services for I/O modules */
110
111#define PDC_PAT_IO 71L
112#define PDC_PAT_IO_GET_SLOT_STATUS 5L /* Get Slot Status Info*/
113#define PDC_PAT_IO_GET_LOC_FROM_HARDWARE 6L /* Get Physical Location from */
114 /* Hardware Path */
115#define PDC_PAT_IO_GET_HARDWARE_FROM_LOC 7L /* Get Hardware Path from
116 * Physical Location */
117#define PDC_PAT_IO_GET_PCI_CONFIG_FROM_HW 11L /* Get PCI Configuration
118 * Address from Hardware Path */
119#define PDC_PAT_IO_GET_HW_FROM_PCI_CONFIG 12L /* Get Hardware Path
120 * from PCI Configuration Address */
121#define PDC_PAT_IO_READ_HOST_BRIDGE_INFO 13L /* Read Host Bridge State Info */
122#define PDC_PAT_IO_CLEAR_HOST_BRIDGE_INFO 14L /* Clear Host Bridge State Info*/
123#define PDC_PAT_IO_GET_PCI_ROUTING_TABLE_SIZE 15L /* Get PCI INT Routing Table
124 * Size */
125#define PDC_PAT_IO_GET_PCI_ROUTING_TABLE 16L /* Get PCI INT Routing Table */
126#define PDC_PAT_IO_GET_HINT_TABLE_SIZE 17L /* Get Hint Table Size */
127#define PDC_PAT_IO_GET_HINT_TABLE 18L /* Get Hint Table */
128#define PDC_PAT_IO_PCI_CONFIG_READ 19L /* PCI Config Read */
129#define PDC_PAT_IO_PCI_CONFIG_WRITE 20L /* PCI Config Write */
130#define PDC_PAT_IO_GET_NUM_IO_SLOTS 21L /* Get Number of I/O Bay Slots in
131 * Cabinet */
132#define PDC_PAT_IO_GET_LOC_IO_SLOTS 22L /* Get Physical Location of I/O */
133 /* Bay Slots in Cabinet */
134#define PDC_PAT_IO_BAY_STATUS_INFO 28L /* Get I/O Bay Slot Status Info */
135#define PDC_PAT_IO_GET_PROC_VIEW 29L /* Get Processor view of IO address */
136#define PDC_PAT_IO_PROG_SBA_DIR_RANGE 30L /* Program directed range */
137
138
139/* PDC PAT MEM -- Manage memory page deallocation */
140
141#define PDC_PAT_MEM 72L
142#define PDC_PAT_MEM_PD_INFO 0L /* Return PDT info for PD */
143#define PDC_PAT_MEM_PD_CLEAR 1L /* Clear PDT for PD */
144#define PDC_PAT_MEM_PD_READ 2L /* Read PDT entries for PD */
145#define PDC_PAT_MEM_PD_RESET 3L /* Reset clear bit for PD */
146#define PDC_PAT_MEM_CELL_INFO 5L /* Return PDT info For Cell */
147#define PDC_PAT_MEM_CELL_CLEAR 6L /* Clear PDT For Cell */
148#define PDC_PAT_MEM_CELL_READ 7L /* Read PDT entries For Cell */
149#define PDC_PAT_MEM_CELL_RESET 8L /* Reset clear bit For Cell */
150#define PDC_PAT_MEM_SETGM 9L /* Set Golden Memory value */
151#define PDC_PAT_MEM_ADD_PAGE 10L /* ADDs a page to the cell */
152#define PDC_PAT_MEM_ADDRESS 11L /* Get Physical Location From */
153 /* Memory Address */
154#define PDC_PAT_MEM_GET_TXT_SIZE 12L /* Get Formatted Text Size */
155#define PDC_PAT_MEM_GET_PD_TXT 13L /* Get PD Formatted Text */
156#define PDC_PAT_MEM_GET_CELL_TXT 14L /* Get Cell Formatted Text */
157#define PDC_PAT_MEM_RD_STATE_INFO 15L /* Read Mem Module State Info*/
158#define PDC_PAT_MEM_CLR_STATE_INFO 16L /*Clear Mem Module State Info*/
159#define PDC_PAT_MEM_CLEAN_RANGE 128L /*Clean Mem in specific range*/
160#define PDC_PAT_MEM_GET_TBL_SIZE 131L /* Get Memory Table Size */
161#define PDC_PAT_MEM_GET_TBL 132L /* Get Memory Table */
162
163
164/* PDC PAT NVOLATILE -- Access Non-Volatile Memory */
165
166#define PDC_PAT_NVOLATILE 73L
167#define PDC_PAT_NVOLATILE_READ 0L /* Read Non-Volatile Memory */
168#define PDC_PAT_NVOLATILE_WRITE 1L /* Write Non-Volatile Memory */
169#define PDC_PAT_NVOLATILE_GET_SIZE 2L /* Return size of NVM */
170#define PDC_PAT_NVOLATILE_VERIFY 3L /* Verify contents of NVM */
171#define PDC_PAT_NVOLATILE_INIT 4L /* Initialize NVM */
172
173/* PDC PAT PD */
174#define PDC_PAT_PD 74L /* Protection Domain Info */
175#define PDC_PAT_PD_GET_ADDR_MAP 0L /* Get Address Map */
176
177/* PDC_PAT_PD_GET_ADDR_MAP entry types */
178#define PAT_MEMORY_DESCRIPTOR 1
179
180/* PDC_PAT_PD_GET_ADDR_MAP memory types */
181#define PAT_MEMTYPE_MEMORY 0
182#define PAT_MEMTYPE_FIRMWARE 4
183
184/* PDC_PAT_PD_GET_ADDR_MAP memory usage */
185#define PAT_MEMUSE_GENERAL 0
186#define PAT_MEMUSE_GI 128
187#define PAT_MEMUSE_GNI 129
188
189
190#ifndef __ASSEMBLY__
191#include <linux/types.h>
192
193#ifdef CONFIG_64BIT
194#define is_pdc_pat() (PDC_TYPE_PAT == pdc_type)
195extern int pdc_pat_get_irt_size(unsigned long *num_entries, unsigned long cell_num);
196extern int pdc_pat_get_irt(void *r_addr, unsigned long cell_num);
197#else /* ! CONFIG_64BIT */
198/* No PAT support for 32-bit kernels...sorry */
199#define is_pdc_pat() (0)
200#define pdc_pat_get_irt_size(num_entries, cell_numn) PDC_BAD_PROC
201#define pdc_pat_get_irt(r_addr, cell_num) PDC_BAD_PROC
202#endif /* ! CONFIG_64BIT */
203
204
205struct pdc_pat_cell_num {
206 unsigned long cell_num;
207 unsigned long cell_loc;
208};
209
210struct pdc_pat_cpu_num {
211 unsigned long cpu_num;
212 unsigned long cpu_loc;
213};
214
215struct pdc_pat_pd_addr_map_entry {
216 unsigned char entry_type; /* 1 = Memory Descriptor Entry Type */
217 unsigned char reserve1[5];
218 unsigned char memory_type;
219 unsigned char memory_usage;
220 unsigned long paddr;
221 unsigned int pages; /* Length in 4K pages */
222 unsigned int reserve2;
223 unsigned long cell_map;
224};
225
226/********************************************************************
227* PDC_PAT_CELL[Return Cell Module] memaddr[0] conf_base_addr
228* ----------------------------------------------------------
229* Bit 0 to 51 - conf_base_addr
230* Bit 52 to 62 - reserved
231* Bit 63 - endianess bit
232********************************************************************/
233#define PAT_GET_CBA(value) ((value) & 0xfffffffffffff000UL)
234
235/********************************************************************
236* PDC_PAT_CELL[Return Cell Module] memaddr[1] mod_info
237* ----------------------------------------------------
238* Bit 0 to 7 - entity type
239* 0 = central agent, 1 = processor,
240* 2 = memory controller, 3 = system bus adapter,
241* 4 = local bus adapter, 5 = processor bus converter,
242* 6 = crossbar fabric connect, 7 = fabric interconnect,
243* 8 to 254 reserved, 255 = unknown.
244* Bit 8 to 15 - DVI
245* Bit 16 to 23 - IOC functions
246* Bit 24 to 39 - reserved
247* Bit 40 to 63 - mod_pages
248* number of 4K pages a module occupies starting at conf_base_addr
249********************************************************************/
250#define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL)
251#define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL)
252#define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL)
253#define PAT_GET_MOD_PAGES(value) ((value) & 0xffffffUL)
254
255
256/*
257** PDC_PAT_CELL_GET_INFO return block
258*/
259typedef struct pdc_pat_cell_info_rtn_block {
260 unsigned long cpu_info;
261 unsigned long cell_info;
262 unsigned long cell_location;
263 unsigned long reo_location;
264 unsigned long mem_size;
265 unsigned long dimm_status;
266 unsigned long pdc_rev;
267 unsigned long fabric_info0;
268 unsigned long fabric_info1;
269 unsigned long fabric_info2;
270 unsigned long fabric_info3;
271 unsigned long reserved[21];
272} pdc_pat_cell_info_rtn_block_t;
273
274
275/* FIXME: mod[508] should really be a union of the various mod components */
276struct pdc_pat_cell_mod_maddr_block { /* PDC_PAT_CELL_MODULE */
277 unsigned long cba; /* func 0 cfg space address */
278 unsigned long mod_info; /* module information */
279 unsigned long mod_location; /* physical location of the module */
280 struct hardware_path mod_path; /* module path (device path - layers) */
281 unsigned long mod[508]; /* PAT cell module components */
282} __attribute__((aligned(8))) ;
283
284typedef struct pdc_pat_cell_mod_maddr_block pdc_pat_cell_mod_maddr_block_t;
285
286
287extern int pdc_pat_chassis_send_log(unsigned long status, unsigned long data);
288extern int pdc_pat_cell_get_number(struct pdc_pat_cell_num *cell_info);
289extern int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long mod, unsigned long view_type, void *mem_addr);
290extern int pdc_pat_cell_num_to_loc(void *, unsigned long);
291
292extern int pdc_pat_cpu_get_number(struct pdc_pat_cpu_num *cpu_info, void *hpa);
293
294extern int pdc_pat_pd_get_addr_map(unsigned long *actual_len, void *mem_addr, unsigned long count, unsigned long offset);
295
296
297extern int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *val);
298extern int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val);
299
300
301/* Flag to indicate this is a PAT box...don't use this unless you
302** really have to...it might go away some day.
303*/
304extern int pdc_pat; /* arch/parisc/kernel/inventory.c */
305
306#endif /* __ASSEMBLY__ */
307
308#endif /* ! __PARISC_PATPDC_H */
diff --git a/include/asm-parisc/percpu.h b/include/asm-parisc/percpu.h
deleted file mode 100644
index a0dcd1970128..000000000000
--- a/include/asm-parisc/percpu.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _PARISC_PERCPU_H
2#define _PARISC_PERCPU_H
3
4#include <asm-generic/percpu.h>
5
6#endif
7
diff --git a/include/asm-parisc/perf.h b/include/asm-parisc/perf.h
deleted file mode 100644
index a18e11972c09..000000000000
--- a/include/asm-parisc/perf.h
+++ /dev/null
@@ -1,74 +0,0 @@
1#ifndef _ASM_PERF_H_
2#define _ASM_PERF_H_
3
4/* ioctls */
5#define PA_PERF_ON _IO('p', 1)
6#define PA_PERF_OFF _IOR('p', 2, unsigned int)
7#define PA_PERF_VERSION _IOR('p', 3, int)
8
9#define PA_PERF_DEV "perf"
10#define PA_PERF_MINOR 146
11
12/* Interface types */
13#define UNKNOWN_INTF 255
14#define ONYX_INTF 0
15#define CUDA_INTF 1
16
17/* Common Onyx and Cuda images */
18#define CPI 0
19#define BUSUTIL 1
20#define TLBMISS 2
21#define TLBHANDMISS 3
22#define PTKN 4
23#define PNTKN 5
24#define IMISS 6
25#define DMISS 7
26#define DMISS_ACCESS 8
27#define BIG_CPI 9
28#define BIG_LS 10
29#define BR_ABORT 11
30#define ISNT 12
31#define QUADRANT 13
32#define RW_PDFET 14
33#define RW_WDFET 15
34#define SHLIB_CPI 16
35
36/* Cuda only Images */
37#define FLOPS 17
38#define CACHEMISS 18
39#define BRANCHES 19
40#define CRSTACK 20
41#define I_CACHE_SPEC 21
42#define MAX_CUDA_IMAGES 22
43
44/* Onyx only Images */
45#define ADDR_INV_ABORT_ALU 17
46#define BRAD_STALL 18
47#define CNTL_IN_PIPEL 19
48#define DSNT_XFH 20
49#define FET_SIG1 21
50#define FET_SIG2 22
51#define G7_1 23
52#define G7_2 24
53#define G7_3 25
54#define G7_4 26
55#define MPB_LABORT 27
56#define PANIC 28
57#define RARE_INST 29
58#define RW_DFET 30
59#define RW_IFET 31
60#define RW_SDFET 32
61#define SPEC_IFET 33
62#define ST_COND0 34
63#define ST_COND1 35
64#define ST_COND2 36
65#define ST_COND3 37
66#define ST_COND4 38
67#define ST_UNPRED0 39
68#define ST_UNPRED1 40
69#define UNPRED 41
70#define GO_STORE 42
71#define SHLIB_CALL 43
72#define MAX_ONYX_IMAGES 44
73
74#endif
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
deleted file mode 100644
index fc987a1c12a8..000000000000
--- a/include/asm-parisc/pgalloc.h
+++ /dev/null
@@ -1,149 +0,0 @@
1#ifndef _ASM_PGALLOC_H
2#define _ASM_PGALLOC_H
3
4#include <linux/gfp.h>
5#include <linux/mm.h>
6#include <linux/threads.h>
7#include <asm/processor.h>
8#include <asm/fixmap.h>
9
10#include <asm/cache.h>
11
12/* Allocate the top level pgd (page directory)
13 *
14 * Here (for 64 bit kernels) we implement a Hybrid L2/L3 scheme: we
15 * allocate the first pmd adjacent to the pgd. This means that we can
16 * subtract a constant offset to get to it. The pmd and pgd sizes are
17 * arranged so that a single pmd covers 4GB (giving a full 64-bit
18 * process access to 8TB) so our lookups are effectively L2 for the
19 * first 4GB of the kernel (i.e. for all ILP32 processes and all the
20 * kernel for machines with under 4GB of memory) */
21static inline pgd_t *pgd_alloc(struct mm_struct *mm)
22{
23 pgd_t *pgd = (pgd_t *)__get_free_pages(GFP_KERNEL,
24 PGD_ALLOC_ORDER);
25 pgd_t *actual_pgd = pgd;
26
27 if (likely(pgd != NULL)) {
28 memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER);
29#ifdef CONFIG_64BIT
30 actual_pgd += PTRS_PER_PGD;
31 /* Populate first pmd with allocated memory. We mark it
32 * with PxD_FLAG_ATTACHED as a signal to the system that this
33 * pmd entry may not be cleared. */
34 __pgd_val_set(*actual_pgd, (PxD_FLAG_PRESENT |
35 PxD_FLAG_VALID |
36 PxD_FLAG_ATTACHED)
37 + (__u32)(__pa((unsigned long)pgd) >> PxD_VALUE_SHIFT));
38 /* The first pmd entry also is marked with _PAGE_GATEWAY as
39 * a signal that this pmd may not be freed */
40 __pgd_val_set(*pgd, PxD_FLAG_ATTACHED);
41#endif
42 }
43 return actual_pgd;
44}
45
46static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
47{
48#ifdef CONFIG_64BIT
49 pgd -= PTRS_PER_PGD;
50#endif
51 free_pages((unsigned long)pgd, PGD_ALLOC_ORDER);
52}
53
54#if PT_NLEVELS == 3
55
56/* Three Level Page Table Support for pmd's */
57
58static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd)
59{
60 __pgd_val_set(*pgd, (PxD_FLAG_PRESENT | PxD_FLAG_VALID) +
61 (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT));
62}
63
64static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
65{
66 pmd_t *pmd = (pmd_t *)__get_free_pages(GFP_KERNEL|__GFP_REPEAT,
67 PMD_ORDER);
68 if (pmd)
69 memset(pmd, 0, PAGE_SIZE<<PMD_ORDER);
70 return pmd;
71}
72
73static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
74{
75#ifdef CONFIG_64BIT
76 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
77 /* This is the permanent pmd attached to the pgd;
78 * cannot free it */
79 return;
80#endif
81 free_pages((unsigned long)pmd, PMD_ORDER);
82}
83
84#else
85
86/* Two Level Page Table Support for pmd's */
87
88/*
89 * allocating and freeing a pmd is trivial: the 1-entry pmd is
90 * inside the pgd, so has no extra memory associated with it.
91 */
92
93#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *)2); })
94#define pmd_free(mm, x) do { } while (0)
95#define pgd_populate(mm, pmd, pte) BUG()
96
97#endif
98
99static inline void
100pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
101{
102#ifdef CONFIG_64BIT
103 /* preserve the gateway marker if this is the beginning of
104 * the permanent pmd */
105 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
106 __pmd_val_set(*pmd, (PxD_FLAG_PRESENT |
107 PxD_FLAG_VALID |
108 PxD_FLAG_ATTACHED)
109 + (__u32)(__pa((unsigned long)pte) >> PxD_VALUE_SHIFT));
110 else
111#endif
112 __pmd_val_set(*pmd, (PxD_FLAG_PRESENT | PxD_FLAG_VALID)
113 + (__u32)(__pa((unsigned long)pte) >> PxD_VALUE_SHIFT));
114}
115
116#define pmd_populate(mm, pmd, pte_page) \
117 pmd_populate_kernel(mm, pmd, page_address(pte_page))
118#define pmd_pgtable(pmd) pmd_page(pmd)
119
120static inline pgtable_t
121pte_alloc_one(struct mm_struct *mm, unsigned long address)
122{
123 struct page *page = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
124 if (page)
125 pgtable_page_ctor(page);
126 return page;
127}
128
129static inline pte_t *
130pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
131{
132 pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
133 return pte;
134}
135
136static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
137{
138 free_page((unsigned long)pte);
139}
140
141static inline void pte_free(struct mm_struct *mm, struct page *pte)
142{
143 pgtable_page_dtor(pte);
144 pte_free_kernel(mm, page_address(pte));
145}
146
147#define check_pgt_cache() do { } while (0)
148
149#endif
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
deleted file mode 100644
index 470a4b88124d..000000000000
--- a/include/asm-parisc/pgtable.h
+++ /dev/null
@@ -1,508 +0,0 @@
1#ifndef _PARISC_PGTABLE_H
2#define _PARISC_PGTABLE_H
3
4#include <asm-generic/4level-fixup.h>
5
6#include <asm/fixmap.h>
7
8#ifndef __ASSEMBLY__
9/*
10 * we simulate an x86-style page table for the linux mm code
11 */
12
13#include <linux/mm.h> /* for vm_area_struct */
14#include <linux/bitops.h>
15#include <asm/processor.h>
16#include <asm/cache.h>
17
18/*
19 * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
20 * memory. For the return value to be meaningful, ADDR must be >=
21 * PAGE_OFFSET. This operation can be relatively expensive (e.g.,
22 * require a hash-, or multi-level tree-lookup or something of that
23 * sort) but it guarantees to return TRUE only if accessing the page
24 * at that address does not cause an error. Note that there may be
25 * addresses for which kern_addr_valid() returns FALSE even though an
26 * access would not cause an error (e.g., this is typically true for
27 * memory mapped I/O regions.
28 *
29 * XXX Need to implement this for parisc.
30 */
31#define kern_addr_valid(addr) (1)
32
33/* Certain architectures need to do special things when PTEs
34 * within a page table are directly modified. Thus, the following
35 * hook is made available.
36 */
37#define set_pte(pteptr, pteval) \
38 do{ \
39 *(pteptr) = (pteval); \
40 } while(0)
41#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
42
43#endif /* !__ASSEMBLY__ */
44
45#define pte_ERROR(e) \
46 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
47#define pmd_ERROR(e) \
48 printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, (unsigned long)pmd_val(e))
49#define pgd_ERROR(e) \
50 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e))
51
52/* This is the size of the initially mapped kernel memory */
53#ifdef CONFIG_64BIT
54#define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */
55#else
56#define KERNEL_INITIAL_ORDER 23 /* 0 to 1<<23 = 8MB */
57#endif
58#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER)
59
60#if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB)
61#define PT_NLEVELS 3
62#define PGD_ORDER 1 /* Number of pages per pgd */
63#define PMD_ORDER 1 /* Number of pages per pmd */
64#define PGD_ALLOC_ORDER 2 /* first pgd contains pmd */
65#else
66#define PT_NLEVELS 2
67#define PGD_ORDER 1 /* Number of pages per pgd */
68#define PGD_ALLOC_ORDER PGD_ORDER
69#endif
70
71/* Definitions for 3rd level (we use PLD here for Page Lower directory
72 * because PTE_SHIFT is used lower down to mean shift that has to be
73 * done to get usable bits out of the PTE) */
74#define PLD_SHIFT PAGE_SHIFT
75#define PLD_SIZE PAGE_SIZE
76#define BITS_PER_PTE (PAGE_SHIFT - BITS_PER_PTE_ENTRY)
77#define PTRS_PER_PTE (1UL << BITS_PER_PTE)
78
79/* Definitions for 2nd level */
80#define pgtable_cache_init() do { } while (0)
81
82#define PMD_SHIFT (PLD_SHIFT + BITS_PER_PTE)
83#define PMD_SIZE (1UL << PMD_SHIFT)
84#define PMD_MASK (~(PMD_SIZE-1))
85#if PT_NLEVELS == 3
86#define BITS_PER_PMD (PAGE_SHIFT + PMD_ORDER - BITS_PER_PMD_ENTRY)
87#else
88#define BITS_PER_PMD 0
89#endif
90#define PTRS_PER_PMD (1UL << BITS_PER_PMD)
91
92/* Definitions for 1st level */
93#define PGDIR_SHIFT (PMD_SHIFT + BITS_PER_PMD)
94#define BITS_PER_PGD (PAGE_SHIFT + PGD_ORDER - BITS_PER_PGD_ENTRY)
95#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
96#define PGDIR_MASK (~(PGDIR_SIZE-1))
97#define PTRS_PER_PGD (1UL << BITS_PER_PGD)
98#define USER_PTRS_PER_PGD PTRS_PER_PGD
99
100#define MAX_ADDRBITS (PGDIR_SHIFT + BITS_PER_PGD)
101#define MAX_ADDRESS (1UL << MAX_ADDRBITS)
102
103#define SPACEID_SHIFT (MAX_ADDRBITS - 32)
104
105/* This calculates the number of initial pages we need for the initial
106 * page tables */
107#if (KERNEL_INITIAL_ORDER) >= (PMD_SHIFT)
108# define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PMD_SHIFT))
109#else
110# define PT_INITIAL (1) /* all initial PTEs fit into one page */
111#endif
112
113/*
114 * pgd entries used up by user/kernel:
115 */
116
117#define FIRST_USER_ADDRESS 0
118
119/* NB: The tlb miss handlers make certain assumptions about the order */
120/* of the following bits, so be careful (One example, bits 25-31 */
121/* are moved together in one instruction). */
122
123#define _PAGE_READ_BIT 31 /* (0x001) read access allowed */
124#define _PAGE_WRITE_BIT 30 /* (0x002) write access allowed */
125#define _PAGE_EXEC_BIT 29 /* (0x004) execute access allowed */
126#define _PAGE_GATEWAY_BIT 28 /* (0x008) privilege promotion allowed */
127#define _PAGE_DMB_BIT 27 /* (0x010) Data Memory Break enable (B bit) */
128#define _PAGE_DIRTY_BIT 26 /* (0x020) Page Dirty (D bit) */
129#define _PAGE_FILE_BIT _PAGE_DIRTY_BIT /* overload this bit */
130#define _PAGE_REFTRAP_BIT 25 /* (0x040) Page Ref. Trap enable (T bit) */
131#define _PAGE_NO_CACHE_BIT 24 /* (0x080) Uncached Page (U bit) */
132#define _PAGE_ACCESSED_BIT 23 /* (0x100) Software: Page Accessed */
133#define _PAGE_PRESENT_BIT 22 /* (0x200) Software: translation valid */
134#define _PAGE_FLUSH_BIT 21 /* (0x400) Software: translation valid */
135 /* for cache flushing only */
136#define _PAGE_USER_BIT 20 /* (0x800) Software: User accessible page */
137
138/* N.B. The bits are defined in terms of a 32 bit word above, so the */
139/* following macro is ok for both 32 and 64 bit. */
140
141#define xlate_pabit(x) (31 - x)
142
143/* this defines the shift to the usable bits in the PTE it is set so
144 * that the valid bits _PAGE_PRESENT_BIT and _PAGE_USER_BIT are set
145 * to zero */
146#define PTE_SHIFT xlate_pabit(_PAGE_USER_BIT)
147
148/* PFN_PTE_SHIFT defines the shift of a PTE value to access the PFN field */
149#define PFN_PTE_SHIFT 12
150
151
152/* this is how many bits may be used by the file functions */
153#define PTE_FILE_MAX_BITS (BITS_PER_LONG - PTE_SHIFT)
154
155#define pte_to_pgoff(pte) (pte_val(pte) >> PTE_SHIFT)
156#define pgoff_to_pte(off) ((pte_t) { ((off) << PTE_SHIFT) | _PAGE_FILE })
157
158#define _PAGE_READ (1 << xlate_pabit(_PAGE_READ_BIT))
159#define _PAGE_WRITE (1 << xlate_pabit(_PAGE_WRITE_BIT))
160#define _PAGE_RW (_PAGE_READ | _PAGE_WRITE)
161#define _PAGE_EXEC (1 << xlate_pabit(_PAGE_EXEC_BIT))
162#define _PAGE_GATEWAY (1 << xlate_pabit(_PAGE_GATEWAY_BIT))
163#define _PAGE_DMB (1 << xlate_pabit(_PAGE_DMB_BIT))
164#define _PAGE_DIRTY (1 << xlate_pabit(_PAGE_DIRTY_BIT))
165#define _PAGE_REFTRAP (1 << xlate_pabit(_PAGE_REFTRAP_BIT))
166#define _PAGE_NO_CACHE (1 << xlate_pabit(_PAGE_NO_CACHE_BIT))
167#define _PAGE_ACCESSED (1 << xlate_pabit(_PAGE_ACCESSED_BIT))
168#define _PAGE_PRESENT (1 << xlate_pabit(_PAGE_PRESENT_BIT))
169#define _PAGE_FLUSH (1 << xlate_pabit(_PAGE_FLUSH_BIT))
170#define _PAGE_USER (1 << xlate_pabit(_PAGE_USER_BIT))
171#define _PAGE_FILE (1 << xlate_pabit(_PAGE_FILE_BIT))
172
173#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | _PAGE_DIRTY | _PAGE_ACCESSED)
174#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
175#define _PAGE_KERNEL (_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_WRITE | _PAGE_DIRTY | _PAGE_ACCESSED)
176
177/* The pgd/pmd contains a ptr (in phys addr space); since all pgds/pmds
178 * are page-aligned, we don't care about the PAGE_OFFSET bits, except
179 * for a few meta-information bits, so we shift the address to be
180 * able to effectively address 40/42/44-bits of physical address space
181 * depending on 4k/16k/64k PAGE_SIZE */
182#define _PxD_PRESENT_BIT 31
183#define _PxD_ATTACHED_BIT 30
184#define _PxD_VALID_BIT 29
185
186#define PxD_FLAG_PRESENT (1 << xlate_pabit(_PxD_PRESENT_BIT))
187#define PxD_FLAG_ATTACHED (1 << xlate_pabit(_PxD_ATTACHED_BIT))
188#define PxD_FLAG_VALID (1 << xlate_pabit(_PxD_VALID_BIT))
189#define PxD_FLAG_MASK (0xf)
190#define PxD_FLAG_SHIFT (4)
191#define PxD_VALUE_SHIFT (8) /* (PAGE_SHIFT-PxD_FLAG_SHIFT) */
192
193#ifndef __ASSEMBLY__
194
195#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
196#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_ACCESSED)
197/* Others seem to make this executable, I don't know if that's correct
198 or not. The stack is mapped this way though so this is necessary
199 in the short term - dhd@linuxcare.com, 2000-08-08 */
200#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_ACCESSED)
201#define PAGE_WRITEONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_WRITE | _PAGE_ACCESSED)
202#define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
203#define PAGE_COPY PAGE_EXECREAD
204#define PAGE_RWX __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED)
205#define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
206#define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE)
207#define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
208#define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ)
209#define PAGE_FLUSH __pgprot(_PAGE_FLUSH)
210
211
212/*
213 * We could have an execute only page using "gateway - promote to priv
214 * level 3", but that is kind of silly. So, the way things are defined
215 * now, we must always have read permission for pages with execute
216 * permission. For the fun of it we'll go ahead and support write only
217 * pages.
218 */
219
220 /*xwr*/
221#define __P000 PAGE_NONE
222#define __P001 PAGE_READONLY
223#define __P010 __P000 /* copy on write */
224#define __P011 __P001 /* copy on write */
225#define __P100 PAGE_EXECREAD
226#define __P101 PAGE_EXECREAD
227#define __P110 __P100 /* copy on write */
228#define __P111 __P101 /* copy on write */
229
230#define __S000 PAGE_NONE
231#define __S001 PAGE_READONLY
232#define __S010 PAGE_WRITEONLY
233#define __S011 PAGE_SHARED
234#define __S100 PAGE_EXECREAD
235#define __S101 PAGE_EXECREAD
236#define __S110 PAGE_RWX
237#define __S111 PAGE_RWX
238
239
240extern pgd_t swapper_pg_dir[]; /* declared in init_task.c */
241
242/* initial page tables for 0-8MB for kernel */
243
244extern pte_t pg0[];
245
246/* zero page used for uninitialized stuff */
247
248extern unsigned long *empty_zero_page;
249
250/*
251 * ZERO_PAGE is a global shared page that is always zero: used
252 * for zero-mapped memory areas etc..
253 */
254
255#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
256
257#define pte_none(x) ((pte_val(x) == 0) || (pte_val(x) & _PAGE_FLUSH))
258#define pte_present(x) (pte_val(x) & _PAGE_PRESENT)
259#define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0)
260
261#define pmd_flag(x) (pmd_val(x) & PxD_FLAG_MASK)
262#define pmd_address(x) ((unsigned long)(pmd_val(x) &~ PxD_FLAG_MASK) << PxD_VALUE_SHIFT)
263#define pgd_flag(x) (pgd_val(x) & PxD_FLAG_MASK)
264#define pgd_address(x) ((unsigned long)(pgd_val(x) &~ PxD_FLAG_MASK) << PxD_VALUE_SHIFT)
265
266#if PT_NLEVELS == 3
267/* The first entry of the permanent pmd is not there if it contains
268 * the gateway marker */
269#define pmd_none(x) (!pmd_val(x) || pmd_flag(x) == PxD_FLAG_ATTACHED)
270#else
271#define pmd_none(x) (!pmd_val(x))
272#endif
273#define pmd_bad(x) (!(pmd_flag(x) & PxD_FLAG_VALID))
274#define pmd_present(x) (pmd_flag(x) & PxD_FLAG_PRESENT)
275static inline void pmd_clear(pmd_t *pmd) {
276#if PT_NLEVELS == 3
277 if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
278 /* This is the entry pointing to the permanent pmd
279 * attached to the pgd; cannot clear it */
280 __pmd_val_set(*pmd, PxD_FLAG_ATTACHED);
281 else
282#endif
283 __pmd_val_set(*pmd, 0);
284}
285
286
287
288#if PT_NLEVELS == 3
289#define pgd_page_vaddr(pgd) ((unsigned long) __va(pgd_address(pgd)))
290#define pgd_page(pgd) virt_to_page((void *)pgd_page_vaddr(pgd))
291
292/* For 64 bit we have three level tables */
293
294#define pgd_none(x) (!pgd_val(x))
295#define pgd_bad(x) (!(pgd_flag(x) & PxD_FLAG_VALID))
296#define pgd_present(x) (pgd_flag(x) & PxD_FLAG_PRESENT)
297static inline void pgd_clear(pgd_t *pgd) {
298#if PT_NLEVELS == 3
299 if(pgd_flag(*pgd) & PxD_FLAG_ATTACHED)
300 /* This is the permanent pmd attached to the pgd; cannot
301 * free it */
302 return;
303#endif
304 __pgd_val_set(*pgd, 0);
305}
306#else
307/*
308 * The "pgd_xxx()" functions here are trivial for a folded two-level
309 * setup: the pgd is never bad, and a pmd always exists (as it's folded
310 * into the pgd entry)
311 */
312static inline int pgd_none(pgd_t pgd) { return 0; }
313static inline int pgd_bad(pgd_t pgd) { return 0; }
314static inline int pgd_present(pgd_t pgd) { return 1; }
315static inline void pgd_clear(pgd_t * pgdp) { }
316#endif
317
318/*
319 * The following only work if pte_present() is true.
320 * Undefined behaviour if not..
321 */
322static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
323static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
324static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
325static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
326static inline int pte_special(pte_t pte) { return 0; }
327
328static inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
329static inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
330static inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_WRITE; return pte; }
331static inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; }
332static inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
333static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_WRITE; return pte; }
334static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
335
336/*
337 * Conversion functions: convert a page and protection to a page entry,
338 * and a page entry and page directory to the page they refer to.
339 */
340#define __mk_pte(addr,pgprot) \
341({ \
342 pte_t __pte; \
343 \
344 pte_val(__pte) = ((((addr)>>PAGE_SHIFT)<<PFN_PTE_SHIFT) + pgprot_val(pgprot)); \
345 \
346 __pte; \
347})
348
349#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
350
351static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
352{
353 pte_t pte;
354 pte_val(pte) = (pfn << PFN_PTE_SHIFT) | pgprot_val(pgprot);
355 return pte;
356}
357
358static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
359{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
360
361/* Permanent address of a page. On parisc we don't have highmem. */
362
363#define pte_pfn(x) (pte_val(x) >> PFN_PTE_SHIFT)
364
365#define pte_page(pte) (pfn_to_page(pte_pfn(pte)))
366
367#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_address(pmd)))
368
369#define __pmd_page(pmd) ((unsigned long) __va(pmd_address(pmd)))
370#define pmd_page(pmd) virt_to_page((void *)__pmd_page(pmd))
371
372#define pgd_index(address) ((address) >> PGDIR_SHIFT)
373
374/* to find an entry in a page-table-directory */
375#define pgd_offset(mm, address) \
376((mm)->pgd + ((address) >> PGDIR_SHIFT))
377
378/* to find an entry in a kernel page-table-directory */
379#define pgd_offset_k(address) pgd_offset(&init_mm, address)
380
381/* Find an entry in the second-level page table.. */
382
383#if PT_NLEVELS == 3
384#define pmd_offset(dir,address) \
385((pmd_t *) pgd_page_vaddr(*(dir)) + (((address)>>PMD_SHIFT) & (PTRS_PER_PMD-1)))
386#else
387#define pmd_offset(dir,addr) ((pmd_t *) dir)
388#endif
389
390/* Find an entry in the third-level page table.. */
391#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE-1))
392#define pte_offset_kernel(pmd, address) \
393 ((pte_t *) pmd_page_vaddr(*(pmd)) + pte_index(address))
394#define pte_offset_map(pmd, address) pte_offset_kernel(pmd, address)
395#define pte_offset_map_nested(pmd, address) pte_offset_kernel(pmd, address)
396#define pte_unmap(pte) do { } while (0)
397#define pte_unmap_nested(pte) do { } while (0)
398
399#define pte_unmap(pte) do { } while (0)
400#define pte_unmap_nested(pte) do { } while (0)
401
402extern void paging_init (void);
403
404/* Used for deferring calls to flush_dcache_page() */
405
406#define PG_dcache_dirty PG_arch_1
407
408extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
409
410/* Encode and de-code a swap entry */
411
412#define __swp_type(x) ((x).val & 0x1f)
413#define __swp_offset(x) ( (((x).val >> 6) & 0x7) | \
414 (((x).val >> 8) & ~0x7) )
415#define __swp_entry(type, offset) ((swp_entry_t) { (type) | \
416 ((offset & 0x7) << 6) | \
417 ((offset & ~0x7) << 8) })
418#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
419#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
420
421static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep)
422{
423#ifdef CONFIG_SMP
424 if (!pte_young(*ptep))
425 return 0;
426 return test_and_clear_bit(xlate_pabit(_PAGE_ACCESSED_BIT), &pte_val(*ptep));
427#else
428 pte_t pte = *ptep;
429 if (!pte_young(pte))
430 return 0;
431 set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte));
432 return 1;
433#endif
434}
435
436extern spinlock_t pa_dbit_lock;
437
438struct mm_struct;
439static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
440{
441 pte_t old_pte;
442 pte_t pte;
443
444 spin_lock(&pa_dbit_lock);
445 pte = old_pte = *ptep;
446 pte_val(pte) &= ~_PAGE_PRESENT;
447 pte_val(pte) |= _PAGE_FLUSH;
448 set_pte_at(mm,addr,ptep,pte);
449 spin_unlock(&pa_dbit_lock);
450
451 return old_pte;
452}
453
454static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
455{
456#ifdef CONFIG_SMP
457 unsigned long new, old;
458
459 do {
460 old = pte_val(*ptep);
461 new = pte_val(pte_wrprotect(__pte (old)));
462 } while (cmpxchg((unsigned long *) ptep, old, new) != old);
463#else
464 pte_t old_pte = *ptep;
465 set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
466#endif
467}
468
469#define pte_same(A,B) (pte_val(A) == pte_val(B))
470
471#endif /* !__ASSEMBLY__ */
472
473
474/* TLB page size encoding - see table 3-1 in parisc20.pdf */
475#define _PAGE_SIZE_ENCODING_4K 0
476#define _PAGE_SIZE_ENCODING_16K 1
477#define _PAGE_SIZE_ENCODING_64K 2
478#define _PAGE_SIZE_ENCODING_256K 3
479#define _PAGE_SIZE_ENCODING_1M 4
480#define _PAGE_SIZE_ENCODING_4M 5
481#define _PAGE_SIZE_ENCODING_16M 6
482#define _PAGE_SIZE_ENCODING_64M 7
483
484#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
485# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K
486#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
487# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_16K
488#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
489# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_64K
490#endif
491
492
493#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
494 remap_pfn_range(vma, vaddr, pfn, size, prot)
495
496#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_NO_CACHE)
497
498/* We provide our own get_unmapped_area to provide cache coherency */
499
500#define HAVE_ARCH_UNMAPPED_AREA
501
502#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
503#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
504#define __HAVE_ARCH_PTEP_SET_WRPROTECT
505#define __HAVE_ARCH_PTE_SAME
506#include <asm-generic/pgtable.h>
507
508#endif /* _PARISC_PGTABLE_H */
diff --git a/include/asm-parisc/poll.h b/include/asm-parisc/poll.h
deleted file mode 100644
index c98509d3149e..000000000000
--- a/include/asm-parisc/poll.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/poll.h>
diff --git a/include/asm-parisc/posix_types.h b/include/asm-parisc/posix_types.h
deleted file mode 100644
index bb725a6630bb..000000000000
--- a/include/asm-parisc/posix_types.h
+++ /dev/null
@@ -1,129 +0,0 @@
1#ifndef __ARCH_PARISC_POSIX_TYPES_H
2#define __ARCH_PARISC_POSIX_TYPES_H
3
4/*
5 * This file is generally used by user-level software, so you need to
6 * be a little careful about namespace pollution etc. Also, we cannot
7 * assume GCC is being used.
8 */
9typedef unsigned long __kernel_ino_t;
10typedef unsigned short __kernel_mode_t;
11typedef unsigned short __kernel_nlink_t;
12typedef long __kernel_off_t;
13typedef int __kernel_pid_t;
14typedef unsigned short __kernel_ipc_pid_t;
15typedef unsigned int __kernel_uid_t;
16typedef unsigned int __kernel_gid_t;
17typedef int __kernel_suseconds_t;
18typedef long __kernel_clock_t;
19typedef int __kernel_timer_t;
20typedef int __kernel_clockid_t;
21typedef int __kernel_daddr_t;
22/* Note these change from narrow to wide kernels */
23#ifdef CONFIG_64BIT
24typedef unsigned long __kernel_size_t;
25typedef long __kernel_ssize_t;
26typedef long __kernel_ptrdiff_t;
27typedef long __kernel_time_t;
28#else
29typedef unsigned int __kernel_size_t;
30typedef int __kernel_ssize_t;
31typedef int __kernel_ptrdiff_t;
32typedef long __kernel_time_t;
33#endif
34typedef char * __kernel_caddr_t;
35
36typedef unsigned short __kernel_uid16_t;
37typedef unsigned short __kernel_gid16_t;
38typedef unsigned int __kernel_uid32_t;
39typedef unsigned int __kernel_gid32_t;
40
41#ifdef __GNUC__
42typedef long long __kernel_loff_t;
43typedef long long __kernel_off64_t;
44typedef unsigned long long __kernel_ino64_t;
45#endif
46
47typedef unsigned int __kernel_old_dev_t;
48
49typedef struct {
50 int val[2];
51} __kernel_fsid_t;
52
53/* compatibility stuff */
54typedef __kernel_uid_t __kernel_old_uid_t;
55typedef __kernel_gid_t __kernel_old_gid_t;
56
57#if defined(__KERNEL__)
58
59#undef __FD_SET
60static __inline__ void __FD_SET(unsigned long __fd, __kernel_fd_set *__fdsetp)
61{
62 unsigned long __tmp = __fd / __NFDBITS;
63 unsigned long __rem = __fd % __NFDBITS;
64 __fdsetp->fds_bits[__tmp] |= (1UL<<__rem);
65}
66
67#undef __FD_CLR
68static __inline__ void __FD_CLR(unsigned long __fd, __kernel_fd_set *__fdsetp)
69{
70 unsigned long __tmp = __fd / __NFDBITS;
71 unsigned long __rem = __fd % __NFDBITS;
72 __fdsetp->fds_bits[__tmp] &= ~(1UL<<__rem);
73}
74
75#undef __FD_ISSET
76static __inline__ int __FD_ISSET(unsigned long __fd, const __kernel_fd_set *__p)
77{
78 unsigned long __tmp = __fd / __NFDBITS;
79 unsigned long __rem = __fd % __NFDBITS;
80 return (__p->fds_bits[__tmp] & (1UL<<__rem)) != 0;
81}
82
83/*
84 * This will unroll the loop for the normal constant case (8 ints,
85 * for a 256-bit fd_set)
86 */
87#undef __FD_ZERO
88static __inline__ void __FD_ZERO(__kernel_fd_set *__p)
89{
90 unsigned long *__tmp = __p->fds_bits;
91 int __i;
92
93 if (__builtin_constant_p(__FDSET_LONGS)) {
94 switch (__FDSET_LONGS) {
95 case 16:
96 __tmp[ 0] = 0; __tmp[ 1] = 0;
97 __tmp[ 2] = 0; __tmp[ 3] = 0;
98 __tmp[ 4] = 0; __tmp[ 5] = 0;
99 __tmp[ 6] = 0; __tmp[ 7] = 0;
100 __tmp[ 8] = 0; __tmp[ 9] = 0;
101 __tmp[10] = 0; __tmp[11] = 0;
102 __tmp[12] = 0; __tmp[13] = 0;
103 __tmp[14] = 0; __tmp[15] = 0;
104 return;
105
106 case 8:
107 __tmp[ 0] = 0; __tmp[ 1] = 0;
108 __tmp[ 2] = 0; __tmp[ 3] = 0;
109 __tmp[ 4] = 0; __tmp[ 5] = 0;
110 __tmp[ 6] = 0; __tmp[ 7] = 0;
111 return;
112
113 case 4:
114 __tmp[ 0] = 0; __tmp[ 1] = 0;
115 __tmp[ 2] = 0; __tmp[ 3] = 0;
116 return;
117 }
118 }
119 __i = __FDSET_LONGS;
120 while (__i) {
121 __i--;
122 *__tmp = 0;
123 __tmp++;
124 }
125}
126
127#endif /* defined(__KERNEL__) */
128
129#endif
diff --git a/include/asm-parisc/prefetch.h b/include/asm-parisc/prefetch.h
deleted file mode 100644
index c5edc60c059f..000000000000
--- a/include/asm-parisc/prefetch.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-parisc/prefetch.h
3 *
4 * PA 2.0 defines data prefetch instructions on page 6-11 of the Kane book.
5 * In addition, many implementations do hardware prefetching of both
6 * instructions and data.
7 *
8 * PA7300LC (page 14-4 of the ERS) also implements prefetching by a load
9 * to gr0 but not in a way that Linux can use. If the load would cause an
10 * interruption (eg due to prefetching 0), it is suppressed on PA2.0
11 * processors, but not on 7300LC.
12 *
13 */
14
15#ifndef __ASM_PARISC_PREFETCH_H
16#define __ASM_PARISC_PREFETCH_H
17
18#ifndef __ASSEMBLY__
19#ifdef CONFIG_PREFETCH
20
21#define ARCH_HAS_PREFETCH
22static inline void prefetch(const void *addr)
23{
24 __asm__("ldw 0(%0), %%r0" : : "r" (addr));
25}
26
27/* LDD is a PA2.0 addition. */
28#ifdef CONFIG_PA20
29#define ARCH_HAS_PREFETCHW
30static inline void prefetchw(const void *addr)
31{
32 __asm__("ldd 0(%0), %%r0" : : "r" (addr));
33}
34#endif /* CONFIG_PA20 */
35
36#endif /* CONFIG_PREFETCH */
37#endif /* __ASSEMBLY__ */
38
39#endif /* __ASM_PARISC_PROCESSOR_H */
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
deleted file mode 100644
index 3c9d34844c83..000000000000
--- a/include/asm-parisc/processor.h
+++ /dev/null
@@ -1,357 +0,0 @@
1/*
2 * include/asm-parisc/processor.h
3 *
4 * Copyright (C) 1994 Linus Torvalds
5 * Copyright (C) 2001 Grant Grundler
6 */
7
8#ifndef __ASM_PARISC_PROCESSOR_H
9#define __ASM_PARISC_PROCESSOR_H
10
11#ifndef __ASSEMBLY__
12#include <linux/threads.h>
13
14#include <asm/prefetch.h>
15#include <asm/hardware.h>
16#include <asm/pdc.h>
17#include <asm/ptrace.h>
18#include <asm/types.h>
19#include <asm/system.h>
20#endif /* __ASSEMBLY__ */
21
22#define KERNEL_STACK_SIZE (4*PAGE_SIZE)
23
24/*
25 * Default implementation of macro that returns current
26 * instruction pointer ("program counter").
27 */
28#ifdef CONFIG_PA20
29#define current_ia(x) __asm__("mfia %0" : "=r"(x))
30#else /* mfia added in pa2.0 */
31#define current_ia(x) __asm__("blr 0,%0\n\tnop" : "=r"(x))
32#endif
33#define current_text_addr() ({ void *pc; current_ia(pc); pc; })
34
35#define TASK_SIZE_OF(tsk) ((tsk)->thread.task_size)
36#define TASK_SIZE TASK_SIZE_OF(current)
37#define TASK_UNMAPPED_BASE (current->thread.map_base)
38
39#define DEFAULT_TASK_SIZE32 (0xFFF00000UL)
40#define DEFAULT_MAP_BASE32 (0x40000000UL)
41
42#ifdef CONFIG_64BIT
43#define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000)
44#define DEFAULT_MAP_BASE (0x200000000UL)
45#else
46#define DEFAULT_TASK_SIZE DEFAULT_TASK_SIZE32
47#define DEFAULT_MAP_BASE DEFAULT_MAP_BASE32
48#endif
49
50#ifdef __KERNEL__
51
52/* XXX: STACK_TOP actually should be STACK_BOTTOM for parisc.
53 * prumpf */
54
55#define STACK_TOP TASK_SIZE
56#define STACK_TOP_MAX DEFAULT_TASK_SIZE
57
58#endif
59
60#ifndef __ASSEMBLY__
61
62/*
63 * Data detected about CPUs at boot time which is the same for all CPU's.
64 * HP boxes are SMP - ie identical processors.
65 *
66 * FIXME: some CPU rev info may be processor specific...
67 */
68struct system_cpuinfo_parisc {
69 unsigned int cpu_count;
70 unsigned int cpu_hz;
71 unsigned int hversion;
72 unsigned int sversion;
73 enum cpu_type cpu_type;
74
75 struct {
76 struct pdc_model model;
77 unsigned long versions;
78 unsigned long cpuid;
79 unsigned long capabilities;
80 char sys_model_name[81]; /* PDC-ROM returnes this model name */
81 } pdc;
82
83 const char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */
84 const char *family_name; /* e.g. "1.1e" */
85};
86
87
88/* Per CPU data structure - ie varies per CPU. */
89struct cpuinfo_parisc {
90 unsigned long it_value; /* Interval Timer at last timer Intr */
91 unsigned long it_delta; /* Interval delta (tic_10ms / HZ * 100) */
92 unsigned long irq_count; /* number of IRQ's since boot */
93 unsigned long irq_max_cr16; /* longest time to handle a single IRQ */
94 unsigned long cpuid; /* aka slot_number or set to NO_PROC_ID */
95 unsigned long hpa; /* Host Physical address */
96 unsigned long txn_addr; /* MMIO addr of EIR or id_eid */
97#ifdef CONFIG_SMP
98 unsigned long pending_ipi; /* bitmap of type ipi_message_type */
99 unsigned long ipi_count; /* number ipi Interrupts */
100#endif
101 unsigned long bh_count; /* number of times bh was invoked */
102 unsigned long prof_counter; /* per CPU profiling support */
103 unsigned long prof_multiplier; /* per CPU profiling support */
104 unsigned long fp_rev;
105 unsigned long fp_model;
106 unsigned int state;
107 struct parisc_device *dev;
108 unsigned long loops_per_jiffy;
109};
110
111extern struct system_cpuinfo_parisc boot_cpu_data;
112extern struct cpuinfo_parisc cpu_data[NR_CPUS];
113#define current_cpu_data cpu_data[smp_processor_id()]
114
115#define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF)
116
117typedef struct {
118 int seg;
119} mm_segment_t;
120
121#define ARCH_MIN_TASKALIGN 8
122
123struct thread_struct {
124 struct pt_regs regs;
125 unsigned long task_size;
126 unsigned long map_base;
127 unsigned long flags;
128};
129
130/* Thread struct flags. */
131#define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */
132#define PARISC_UAC_SIGBUS (1UL << 1)
133#define PARISC_KERNEL_DEATH (1UL << 31) /* see die_if_kernel()... */
134
135#define PARISC_UAC_SHIFT 0
136#define PARISC_UAC_MASK (PARISC_UAC_NOPRINT|PARISC_UAC_SIGBUS)
137
138#define SET_UNALIGN_CTL(task,value) \
139 ({ \
140 (task)->thread.flags = (((task)->thread.flags & ~PARISC_UAC_MASK) \
141 | (((value) << PARISC_UAC_SHIFT) & \
142 PARISC_UAC_MASK)); \
143 0; \
144 })
145
146#define GET_UNALIGN_CTL(task,addr) \
147 ({ \
148 put_user(((task)->thread.flags & PARISC_UAC_MASK) \
149 >> PARISC_UAC_SHIFT, (int __user *) (addr)); \
150 })
151
152#define INIT_THREAD { \
153 .regs = { .gr = { 0, }, \
154 .fr = { 0, }, \
155 .sr = { 0, }, \
156 .iasq = { 0, }, \
157 .iaoq = { 0, }, \
158 .cr27 = 0, \
159 }, \
160 .task_size = DEFAULT_TASK_SIZE, \
161 .map_base = DEFAULT_MAP_BASE, \
162 .flags = 0 \
163 }
164
165/*
166 * Return saved PC of a blocked thread. This is used by ps mostly.
167 */
168
169unsigned long thread_saved_pc(struct task_struct *t);
170void show_trace(struct task_struct *task, unsigned long *stack);
171
172/*
173 * Start user thread in another space.
174 *
175 * Note that we set both the iaoq and r31 to the new pc. When
176 * the kernel initially calls execve it will return through an
177 * rfi path that will use the values in the iaoq. The execve
178 * syscall path will return through the gateway page, and
179 * that uses r31 to branch to.
180 *
181 * For ELF we clear r23, because the dynamic linker uses it to pass
182 * the address of the finalizer function.
183 *
184 * We also initialize sr3 to an illegal value (illegal for our
185 * implementation, not for the architecture).
186 */
187typedef unsigned int elf_caddr_t;
188
189#define start_thread_som(regs, new_pc, new_sp) do { \
190 unsigned long *sp = (unsigned long *)new_sp; \
191 __u32 spaceid = (__u32)current->mm->context; \
192 unsigned long pc = (unsigned long)new_pc; \
193 /* offset pc for priv. level */ \
194 pc |= 3; \
195 \
196 set_fs(USER_DS); \
197 regs->iasq[0] = spaceid; \
198 regs->iasq[1] = spaceid; \
199 regs->iaoq[0] = pc; \
200 regs->iaoq[1] = pc + 4; \
201 regs->sr[2] = LINUX_GATEWAY_SPACE; \
202 regs->sr[3] = 0xffff; \
203 regs->sr[4] = spaceid; \
204 regs->sr[5] = spaceid; \
205 regs->sr[6] = spaceid; \
206 regs->sr[7] = spaceid; \
207 regs->gr[ 0] = USER_PSW; \
208 regs->gr[30] = ((new_sp)+63)&~63; \
209 regs->gr[31] = pc; \
210 \
211 get_user(regs->gr[26],&sp[0]); \
212 get_user(regs->gr[25],&sp[-1]); \
213 get_user(regs->gr[24],&sp[-2]); \
214 get_user(regs->gr[23],&sp[-3]); \
215} while(0)
216
217/* The ELF abi wants things done a "wee bit" differently than
218 * som does. Supporting this behavior here avoids
219 * having our own version of create_elf_tables.
220 *
221 * Oh, and yes, that is not a typo, we are really passing argc in r25
222 * and argv in r24 (rather than r26 and r25). This is because that's
223 * where __libc_start_main wants them.
224 *
225 * Duplicated from dl-machine.h for the benefit of readers:
226 *
227 * Our initial stack layout is rather different from everyone else's
228 * due to the unique PA-RISC ABI. As far as I know it looks like
229 * this:
230
231 ----------------------------------- (user startup code creates this frame)
232 | 32 bytes of magic |
233 |---------------------------------|
234 | 32 bytes argument/sp save area |
235 |---------------------------------| (bprm->p)
236 | ELF auxiliary info |
237 | (up to 28 words) |
238 |---------------------------------|
239 | NULL |
240 |---------------------------------|
241 | Environment pointers |
242 |---------------------------------|
243 | NULL |
244 |---------------------------------|
245 | Argument pointers |
246 |---------------------------------| <- argv
247 | argc (1 word) |
248 |---------------------------------| <- bprm->exec (HACK!)
249 | N bytes of slack |
250 |---------------------------------|
251 | filename passed to execve |
252 |---------------------------------| (mm->env_end)
253 | env strings |
254 |---------------------------------| (mm->env_start, mm->arg_end)
255 | arg strings |
256 |---------------------------------|
257 | additional faked arg strings if |
258 | we're invoked via binfmt_script |
259 |---------------------------------| (mm->arg_start)
260 stack base is at TASK_SIZE - rlim_max.
261
262on downward growing arches, it looks like this:
263 stack base at TASK_SIZE
264 | filename passed to execve
265 | env strings
266 | arg strings
267 | faked arg strings
268 | slack
269 | ELF
270 | envps
271 | argvs
272 | argc
273
274 * The pleasant part of this is that if we need to skip arguments we
275 * can just decrement argc and move argv, because the stack pointer
276 * is utterly unrelated to the location of the environment and
277 * argument vectors.
278 *
279 * Note that the S/390 people took the easy way out and hacked their
280 * GCC to make the stack grow downwards.
281 *
282 * Final Note: For entry from syscall, the W (wide) bit of the PSW
283 * is stuffed into the lowest bit of the user sp (%r30), so we fill
284 * it in here from the current->personality
285 */
286
287#ifdef CONFIG_64BIT
288#define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT))
289#else
290#define USER_WIDE_MODE 0
291#endif
292
293#define start_thread(regs, new_pc, new_sp) do { \
294 elf_addr_t *sp = (elf_addr_t *)new_sp; \
295 __u32 spaceid = (__u32)current->mm->context; \
296 elf_addr_t pc = (elf_addr_t)new_pc | 3; \
297 elf_caddr_t *argv = (elf_caddr_t *)bprm->exec + 1; \
298 \
299 set_fs(USER_DS); \
300 regs->iasq[0] = spaceid; \
301 regs->iasq[1] = spaceid; \
302 regs->iaoq[0] = pc; \
303 regs->iaoq[1] = pc + 4; \
304 regs->sr[2] = LINUX_GATEWAY_SPACE; \
305 regs->sr[3] = 0xffff; \
306 regs->sr[4] = spaceid; \
307 regs->sr[5] = spaceid; \
308 regs->sr[6] = spaceid; \
309 regs->sr[7] = spaceid; \
310 regs->gr[ 0] = USER_PSW | (USER_WIDE_MODE ? PSW_W : 0); \
311 regs->fr[ 0] = 0LL; \
312 regs->fr[ 1] = 0LL; \
313 regs->fr[ 2] = 0LL; \
314 regs->fr[ 3] = 0LL; \
315 regs->gr[30] = (((unsigned long)sp + 63) &~ 63) | (USER_WIDE_MODE ? 1 : 0); \
316 regs->gr[31] = pc; \
317 \
318 get_user(regs->gr[25], (argv - 1)); \
319 regs->gr[24] = (long) argv; \
320 regs->gr[23] = 0; \
321} while(0)
322
323struct task_struct;
324struct mm_struct;
325
326/* Free all resources held by a thread. */
327extern void release_thread(struct task_struct *);
328extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
329
330/* Prepare to copy thread state - unlazy all lazy status */
331#define prepare_to_copy(tsk) do { } while (0)
332
333extern void map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm);
334
335extern unsigned long get_wchan(struct task_struct *p);
336
337#define KSTK_EIP(tsk) ((tsk)->thread.regs.iaoq[0])
338#define KSTK_ESP(tsk) ((tsk)->thread.regs.gr[30])
339
340#define cpu_relax() barrier()
341
342/* Used as a macro to identify the combined VIPT/PIPT cached
343 * CPUs which require a guarantee of coherency (no inequivalent
344 * aliases with different data, whether clean or not) to operate */
345static inline int parisc_requires_coherency(void)
346{
347#ifdef CONFIG_PA8X00
348 return (boot_cpu_data.cpu_type == mako) ||
349 (boot_cpu_data.cpu_type == mako2);
350#else
351 return 0;
352#endif
353}
354
355#endif /* __ASSEMBLY__ */
356
357#endif /* __ASM_PARISC_PROCESSOR_H */
diff --git a/include/asm-parisc/psw.h b/include/asm-parisc/psw.h
deleted file mode 100644
index 5a3e23c9ce63..000000000000
--- a/include/asm-parisc/psw.h
+++ /dev/null
@@ -1,62 +0,0 @@
1#ifndef _PARISC_PSW_H
2
3
4#define PSW_I 0x00000001
5#define PSW_D 0x00000002
6#define PSW_P 0x00000004
7#define PSW_Q 0x00000008
8
9#define PSW_R 0x00000010
10#define PSW_F 0x00000020
11#define PSW_G 0x00000040 /* PA1.x only */
12#define PSW_O 0x00000080 /* PA2.0 only */
13
14/* ssm/rsm instructions number PSW_W and PSW_E differently */
15#define PSW_SM_I PSW_I /* Enable External Interrupts */
16#define PSW_SM_D PSW_D
17#define PSW_SM_P PSW_P
18#define PSW_SM_Q PSW_Q /* Enable Interrupt State Collection */
19#define PSW_SM_R PSW_R /* Enable Recover Counter Trap */
20#define PSW_SM_W 0x200 /* PA2.0 only : Enable Wide Mode */
21
22#define PSW_SM_QUIET PSW_SM_R+PSW_SM_Q+PSW_SM_P+PSW_SM_D+PSW_SM_I
23
24#define PSW_CB 0x0000ff00
25
26#define PSW_M 0x00010000
27#define PSW_V 0x00020000
28#define PSW_C 0x00040000
29#define PSW_B 0x00080000
30
31#define PSW_X 0x00100000
32#define PSW_N 0x00200000
33#define PSW_L 0x00400000
34#define PSW_H 0x00800000
35
36#define PSW_T 0x01000000
37#define PSW_S 0x02000000
38#define PSW_E 0x04000000
39#define PSW_W 0x08000000 /* PA2.0 only */
40#define PSW_W_BIT 36 /* PA2.0 only */
41
42#define PSW_Z 0x40000000 /* PA1.x only */
43#define PSW_Y 0x80000000 /* PA1.x only */
44
45#ifdef CONFIG_64BIT
46# define PSW_HI_CB 0x000000ff /* PA2.0 only */
47#endif
48
49#ifdef CONFIG_64BIT
50# define USER_PSW_HI_MASK PSW_HI_CB
51# define WIDE_PSW PSW_W
52#else
53# define WIDE_PSW 0
54#endif
55
56/* Used when setting up for rfi */
57#define KERNEL_PSW (WIDE_PSW | PSW_C | PSW_Q | PSW_P | PSW_D)
58#define REAL_MODE_PSW (WIDE_PSW | PSW_Q)
59#define USER_PSW_MASK (WIDE_PSW | PSW_T | PSW_N | PSW_X | PSW_B | PSW_V | PSW_CB)
60#define USER_PSW (PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I)
61
62#endif
diff --git a/include/asm-parisc/ptrace.h b/include/asm-parisc/ptrace.h
deleted file mode 100644
index 3e94c5d85ff5..000000000000
--- a/include/asm-parisc/ptrace.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef _PARISC_PTRACE_H
2#define _PARISC_PTRACE_H
3
4/* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
5** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
6*/
7
8#include <linux/types.h>
9
10/* This struct defines the way the registers are stored on the
11 * stack during a system call.
12 *
13 * N.B. gdb/strace care about the size and offsets within this
14 * structure. If you change things, you may break object compatibility
15 * for those applications.
16 */
17
18struct pt_regs {
19 unsigned long gr[32]; /* PSW is in gr[0] */
20 __u64 fr[32];
21 unsigned long sr[ 8];
22 unsigned long iasq[2];
23 unsigned long iaoq[2];
24 unsigned long cr27;
25 unsigned long pad0; /* available for other uses */
26 unsigned long orig_r28;
27 unsigned long ksp;
28 unsigned long kpc;
29 unsigned long sar; /* CR11 */
30 unsigned long iir; /* CR19 */
31 unsigned long isr; /* CR20 */
32 unsigned long ior; /* CR21 */
33 unsigned long ipsw; /* CR22 */
34};
35
36/*
37 * The numbers chosen here are somewhat arbitrary but absolutely MUST
38 * not overlap with any of the number assigned in <linux/ptrace.h>.
39 *
40 * These ones are taken from IA-64 on the assumption that theirs are
41 * the most correct (and we also want to support PTRACE_SINGLEBLOCK
42 * since we have taken branch traps too)
43 */
44#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */
45
46#ifdef __KERNEL__
47
48#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
49
50/* XXX should we use iaoq[1] or iaoq[0] ? */
51#define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0)
52#define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0)
53#define instruction_pointer(regs) ((regs)->iaoq[0] & ~3)
54unsigned long profile_pc(struct pt_regs *);
55extern void show_regs(struct pt_regs *);
56#endif
57
58#endif
diff --git a/include/asm-parisc/real.h b/include/asm-parisc/real.h
deleted file mode 100644
index 82acb25db395..000000000000
--- a/include/asm-parisc/real.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef _PARISC_REAL_H
2#define _PARISC_REAL_H
3
4
5#endif
diff --git a/include/asm-parisc/resource.h b/include/asm-parisc/resource.h
deleted file mode 100644
index 8b06343b62ed..000000000000
--- a/include/asm-parisc/resource.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_PARISC_RESOURCE_H
2#define _ASM_PARISC_RESOURCE_H
3
4#define _STK_LIM_MAX 10 * _STK_LIM
5#include <asm-generic/resource.h>
6
7#endif
diff --git a/include/asm-parisc/ropes.h b/include/asm-parisc/ropes.h
deleted file mode 100644
index 007a880615eb..000000000000
--- a/include/asm-parisc/ropes.h
+++ /dev/null
@@ -1,322 +0,0 @@
1#ifndef _ASM_PARISC_ROPES_H_
2#define _ASM_PARISC_ROPES_H_
3
4#include <asm-parisc/parisc-device.h>
5
6#ifdef CONFIG_64BIT
7/* "low end" PA8800 machines use ZX1 chipset: PAT PDC and only run 64-bit */
8#define ZX1_SUPPORT
9#endif
10
11#ifdef CONFIG_PROC_FS
12/* depends on proc fs support. But costs CPU performance */
13#undef SBA_COLLECT_STATS
14#endif
15
16/*
17** The number of pdir entries to "free" before issuing
18** a read to PCOM register to flush out PCOM writes.
19** Interacts with allocation granularity (ie 4 or 8 entries
20** allocated and free'd/purged at a time might make this
21** less interesting).
22*/
23#define DELAYED_RESOURCE_CNT 16
24
25#define MAX_IOC 2 /* per Ike. Pluto/Astro only have 1. */
26#define ROPES_PER_IOC 8 /* per Ike half or Pluto/Astro */
27
28struct ioc {
29 void __iomem *ioc_hpa; /* I/O MMU base address */
30 char *res_map; /* resource map, bit == pdir entry */
31 u64 *pdir_base; /* physical base address */
32 unsigned long ibase; /* pdir IOV Space base - shared w/lba_pci */
33 unsigned long imask; /* pdir IOV Space mask - shared w/lba_pci */
34#ifdef ZX1_SUPPORT
35 unsigned long iovp_mask; /* help convert IOVA to IOVP */
36#endif
37 unsigned long *res_hint; /* next avail IOVP - circular search */
38 spinlock_t res_lock;
39 unsigned int res_bitshift; /* from the LEFT! */
40 unsigned int res_size; /* size of resource map in bytes */
41#ifdef SBA_HINT_SUPPORT
42/* FIXME : DMA HINTs not used */
43 unsigned long hint_mask_pdir; /* bits used for DMA hints */
44 unsigned int hint_shift_pdir;
45#endif
46#if DELAYED_RESOURCE_CNT > 0
47 int saved_cnt;
48 struct sba_dma_pair {
49 dma_addr_t iova;
50 size_t size;
51 } saved[DELAYED_RESOURCE_CNT];
52#endif
53
54#ifdef SBA_COLLECT_STATS
55#define SBA_SEARCH_SAMPLE 0x100
56 unsigned long avg_search[SBA_SEARCH_SAMPLE];
57 unsigned long avg_idx; /* current index into avg_search */
58 unsigned long used_pages;
59 unsigned long msingle_calls;
60 unsigned long msingle_pages;
61 unsigned long msg_calls;
62 unsigned long msg_pages;
63 unsigned long usingle_calls;
64 unsigned long usingle_pages;
65 unsigned long usg_calls;
66 unsigned long usg_pages;
67#endif
68 /* STUFF We don't need in performance path */
69 unsigned int pdir_size; /* in bytes, determined by IOV Space size */
70};
71
72struct sba_device {
73 struct sba_device *next; /* list of SBA's in system */
74 struct parisc_device *dev; /* dev found in bus walk */
75 const char *name;
76 void __iomem *sba_hpa; /* base address */
77 spinlock_t sba_lock;
78 unsigned int flags; /* state/functionality enabled */
79 unsigned int hw_rev; /* HW revision of chip */
80
81 struct resource chip_resv; /* MMIO reserved for chip */
82 struct resource iommu_resv; /* MMIO reserved for iommu */
83
84 unsigned int num_ioc; /* number of on-board IOC's */
85 struct ioc ioc[MAX_IOC];
86};
87
88#define ASTRO_RUNWAY_PORT 0x582
89#define IKE_MERCED_PORT 0x803
90#define REO_MERCED_PORT 0x804
91#define REOG_MERCED_PORT 0x805
92#define PLUTO_MCKINLEY_PORT 0x880
93
94static inline int IS_ASTRO(struct parisc_device *d) {
95 return d->id.hversion == ASTRO_RUNWAY_PORT;
96}
97
98static inline int IS_IKE(struct parisc_device *d) {
99 return d->id.hversion == IKE_MERCED_PORT;
100}
101
102static inline int IS_PLUTO(struct parisc_device *d) {
103 return d->id.hversion == PLUTO_MCKINLEY_PORT;
104}
105
106#define PLUTO_IOVA_BASE (1UL*1024*1024*1024) /* 1GB */
107#define PLUTO_IOVA_SIZE (1UL*1024*1024*1024) /* 1GB */
108#define PLUTO_GART_SIZE (PLUTO_IOVA_SIZE / 2)
109
110#define SBA_PDIR_VALID_BIT 0x8000000000000000ULL
111
112#define SBA_AGPGART_COOKIE 0x0000badbadc0ffeeULL
113
114#define SBA_FUNC_ID 0x0000 /* function id */
115#define SBA_FCLASS 0x0008 /* function class, bist, header, rev... */
116
117#define SBA_FUNC_SIZE 4096 /* SBA configuration function reg set */
118
119#define ASTRO_IOC_OFFSET (32 * SBA_FUNC_SIZE)
120#define PLUTO_IOC_OFFSET (1 * SBA_FUNC_SIZE)
121/* Ike's IOC's occupy functions 2 and 3 */
122#define IKE_IOC_OFFSET(p) ((p+2) * SBA_FUNC_SIZE)
123
124#define IOC_CTRL 0x8 /* IOC_CTRL offset */
125#define IOC_CTRL_TC (1 << 0) /* TOC Enable */
126#define IOC_CTRL_CE (1 << 1) /* Coalesce Enable */
127#define IOC_CTRL_DE (1 << 2) /* Dillon Enable */
128#define IOC_CTRL_RM (1 << 8) /* Real Mode */
129#define IOC_CTRL_NC (1 << 9) /* Non Coherent Mode */
130#define IOC_CTRL_D4 (1 << 11) /* Disable 4-byte coalescing */
131#define IOC_CTRL_DD (1 << 13) /* Disable distr. LMMIO range coalescing */
132
133/*
134** Offsets into MBIB (Function 0 on Ike and hopefully Astro)
135** Firmware programs this stuff. Don't touch it.
136*/
137#define LMMIO_DIRECT0_BASE 0x300
138#define LMMIO_DIRECT0_MASK 0x308
139#define LMMIO_DIRECT0_ROUTE 0x310
140
141#define LMMIO_DIST_BASE 0x360
142#define LMMIO_DIST_MASK 0x368
143#define LMMIO_DIST_ROUTE 0x370
144
145#define IOS_DIST_BASE 0x390
146#define IOS_DIST_MASK 0x398
147#define IOS_DIST_ROUTE 0x3A0
148
149#define IOS_DIRECT_BASE 0x3C0
150#define IOS_DIRECT_MASK 0x3C8
151#define IOS_DIRECT_ROUTE 0x3D0
152
153/*
154** Offsets into I/O TLB (Function 2 and 3 on Ike)
155*/
156#define ROPE0_CTL 0x200 /* "regbus pci0" */
157#define ROPE1_CTL 0x208
158#define ROPE2_CTL 0x210
159#define ROPE3_CTL 0x218
160#define ROPE4_CTL 0x220
161#define ROPE5_CTL 0x228
162#define ROPE6_CTL 0x230
163#define ROPE7_CTL 0x238
164
165#define IOC_ROPE0_CFG 0x500 /* pluto only */
166#define IOC_ROPE_AO 0x10 /* Allow "Relaxed Ordering" */
167
168#define HF_ENABLE 0x40
169
170#define IOC_IBASE 0x300 /* IO TLB */
171#define IOC_IMASK 0x308
172#define IOC_PCOM 0x310
173#define IOC_TCNFG 0x318
174#define IOC_PDIR_BASE 0x320
175
176/*
177** IOC supports 4/8/16/64KB page sizes (see TCNFG register)
178** It's safer (avoid memory corruption) to keep DMA page mappings
179** equivalently sized to VM PAGE_SIZE.
180**
181** We really can't avoid generating a new mapping for each
182** page since the Virtual Coherence Index has to be generated
183** and updated for each page.
184**
185** PAGE_SIZE could be greater than IOVP_SIZE. But not the inverse.
186*/
187#define IOVP_SIZE PAGE_SIZE
188#define IOVP_SHIFT PAGE_SHIFT
189#define IOVP_MASK PAGE_MASK
190
191#define SBA_PERF_CFG 0x708 /* Performance Counter stuff */
192#define SBA_PERF_MASK1 0x718
193#define SBA_PERF_MASK2 0x730
194
195/*
196** Offsets into PCI Performance Counters (functions 12 and 13)
197** Controlled by PERF registers in function 2 & 3 respectively.
198*/
199#define SBA_PERF_CNT1 0x200
200#define SBA_PERF_CNT2 0x208
201#define SBA_PERF_CNT3 0x210
202
203/*
204** lba_device: Per instance Elroy data structure
205*/
206struct lba_device {
207 struct pci_hba_data hba;
208
209 spinlock_t lba_lock;
210 void *iosapic_obj;
211
212#ifdef CONFIG_64BIT
213 void __iomem *iop_base; /* PA_VIEW - for IO port accessor funcs */
214#endif
215
216 int flags; /* state/functionality enabled */
217 int hw_rev; /* HW revision of chip */
218};
219
220#define ELROY_HVERS 0x782
221#define MERCURY_HVERS 0x783
222#define QUICKSILVER_HVERS 0x784
223
224static inline int IS_ELROY(struct parisc_device *d) {
225 return (d->id.hversion == ELROY_HVERS);
226}
227
228static inline int IS_MERCURY(struct parisc_device *d) {
229 return (d->id.hversion == MERCURY_HVERS);
230}
231
232static inline int IS_QUICKSILVER(struct parisc_device *d) {
233 return (d->id.hversion == QUICKSILVER_HVERS);
234}
235
236static inline int agp_mode_mercury(void __iomem *hpa) {
237 u64 bus_mode;
238
239 bus_mode = readl(hpa + 0x0620);
240 if (bus_mode & 1)
241 return 1;
242
243 return 0;
244}
245
246/*
247** I/O SAPIC init function
248** Caller knows where an I/O SAPIC is. LBA has an integrated I/O SAPIC.
249** Call setup as part of per instance initialization.
250** (ie *not* init_module() function unless only one is present.)
251** fixup_irq is to initialize PCI IRQ line support and
252** virtualize pcidev->irq value. To be called by pci_fixup_bus().
253*/
254extern void *iosapic_register(unsigned long hpa);
255extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
256
257#define LBA_FUNC_ID 0x0000 /* function id */
258#define LBA_FCLASS 0x0008 /* function class, bist, header, rev... */
259#define LBA_CAPABLE 0x0030 /* capabilities register */
260
261#define LBA_PCI_CFG_ADDR 0x0040 /* poke CFG address here */
262#define LBA_PCI_CFG_DATA 0x0048 /* read or write data here */
263
264#define LBA_PMC_MTLT 0x0050 /* Firmware sets this - read only. */
265#define LBA_FW_SCRATCH 0x0058 /* Firmware writes the PCI bus number here. */
266#define LBA_ERROR_ADDR 0x0070 /* On error, address gets logged here */
267
268#define LBA_ARB_MASK 0x0080 /* bit 0 enable arbitration. PAT/PDC enables */
269#define LBA_ARB_PRI 0x0088 /* firmware sets this. */
270#define LBA_ARB_MODE 0x0090 /* firmware sets this. */
271#define LBA_ARB_MTLT 0x0098 /* firmware sets this. */
272
273#define LBA_MOD_ID 0x0100 /* Module ID. PDC_PAT_CELL reports 4 */
274
275#define LBA_STAT_CTL 0x0108 /* Status & Control */
276#define LBA_BUS_RESET 0x01 /* Deassert PCI Bus Reset Signal */
277#define CLEAR_ERRLOG 0x10 /* "Clear Error Log" cmd */
278#define CLEAR_ERRLOG_ENABLE 0x20 /* "Clear Error Log" Enable */
279#define HF_ENABLE 0x40 /* enable HF mode (default is -1 mode) */
280
281#define LBA_LMMIO_BASE 0x0200 /* < 4GB I/O address range */
282#define LBA_LMMIO_MASK 0x0208
283
284#define LBA_GMMIO_BASE 0x0210 /* > 4GB I/O address range */
285#define LBA_GMMIO_MASK 0x0218
286
287#define LBA_WLMMIO_BASE 0x0220 /* All < 4GB ranges under the same *SBA* */
288#define LBA_WLMMIO_MASK 0x0228
289
290#define LBA_WGMMIO_BASE 0x0230 /* All > 4GB ranges under the same *SBA* */
291#define LBA_WGMMIO_MASK 0x0238
292
293#define LBA_IOS_BASE 0x0240 /* I/O port space for this LBA */
294#define LBA_IOS_MASK 0x0248
295
296#define LBA_ELMMIO_BASE 0x0250 /* Extra LMMIO range */
297#define LBA_ELMMIO_MASK 0x0258
298
299#define LBA_EIOS_BASE 0x0260 /* Extra I/O port space */
300#define LBA_EIOS_MASK 0x0268
301
302#define LBA_GLOBAL_MASK 0x0270 /* Mercury only: Global Address Mask */
303#define LBA_DMA_CTL 0x0278 /* firmware sets this */
304
305#define LBA_IBASE 0x0300 /* SBA DMA support */
306#define LBA_IMASK 0x0308
307
308/* FIXME: ignore DMA Hint stuff until we can measure performance */
309#define LBA_HINT_CFG 0x0310
310#define LBA_HINT_BASE 0x0380 /* 14 registers at every 8 bytes. */
311
312#define LBA_BUS_MODE 0x0620
313
314/* ERROR regs are needed for config cycle kluges */
315#define LBA_ERROR_CONFIG 0x0680
316#define LBA_SMART_MODE 0x20
317#define LBA_ERROR_STATUS 0x0688
318#define LBA_ROPE_CTL 0x06A0
319
320#define LBA_IOSAPIC_BASE 0x800 /* Offset of IRQ logic */
321
322#endif /*_ASM_PARISC_ROPES_H_*/
diff --git a/include/asm-parisc/rt_sigframe.h b/include/asm-parisc/rt_sigframe.h
deleted file mode 100644
index f0dd3b30f6c4..000000000000
--- a/include/asm-parisc/rt_sigframe.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef _ASM_PARISC_RT_SIGFRAME_H
2#define _ASM_PARISC_RT_SIGFRAME_H
3
4#define SIGRETURN_TRAMP 4
5#define SIGRESTARTBLOCK_TRAMP 5
6#define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP)
7
8struct rt_sigframe {
9 /* XXX: Must match trampoline size in arch/parisc/kernel/signal.c
10 Secondary to that it must protect the ERESTART_RESTARTBLOCK
11 trampoline we left on the stack (we were bad and didn't
12 change sp so we could run really fast.) */
13 unsigned int tramp[TRAMP_SIZE];
14 struct siginfo info;
15 struct ucontext uc;
16};
17
18#define SIGFRAME 128
19#define FUNCTIONCALLFRAME 96
20#define PARISC_RT_SIGFRAME_SIZE \
21 (((sizeof(struct rt_sigframe) + FUNCTIONCALLFRAME) + SIGFRAME) & -SIGFRAME)
22
23#endif
diff --git a/include/asm-parisc/rtc.h b/include/asm-parisc/rtc.h
deleted file mode 100644
index 099d641a42c2..000000000000
--- a/include/asm-parisc/rtc.h
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2 * include/asm-parisc/rtc.h
3 *
4 * Copyright 2002 Randolph CHung <tausq@debian.org>
5 *
6 * Based on: include/asm-ppc/rtc.h and the genrtc driver in the
7 * 2.4 parisc linux tree
8 */
9
10#ifndef __ASM_RTC_H__
11#define __ASM_RTC_H__
12
13#ifdef __KERNEL__
14
15#include <linux/rtc.h>
16
17#include <asm/pdc.h>
18
19#define SECS_PER_HOUR (60 * 60)
20#define SECS_PER_DAY (SECS_PER_HOUR * 24)
21
22
23#define RTC_PIE 0x40 /* periodic interrupt enable */
24#define RTC_AIE 0x20 /* alarm interrupt enable */
25#define RTC_UIE 0x10 /* update-finished interrupt enable */
26
27#define RTC_BATT_BAD 0x100 /* battery bad */
28
29/* some dummy definitions */
30#define RTC_SQWE 0x08 /* enable square-wave output */
31#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
32#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
33#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
34
35# define __isleap(year) \
36 ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
37
38/* How many days come before each month (0-12). */
39static const unsigned short int __mon_yday[2][13] =
40{
41 /* Normal years. */
42 { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
43 /* Leap years. */
44 { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
45};
46
47static inline unsigned int get_rtc_time(struct rtc_time *wtime)
48{
49 struct pdc_tod tod_data;
50 long int days, rem, y;
51 const unsigned short int *ip;
52
53 memset(wtime, 0, sizeof(*wtime));
54 if (pdc_tod_read(&tod_data) < 0)
55 return RTC_24H | RTC_BATT_BAD;
56
57 // most of the remainder of this function is:
58// Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
59// This was originally a part of the GNU C Library.
60// It is distributed under the GPL, and was swiped from offtime.c
61
62
63 days = tod_data.tod_sec / SECS_PER_DAY;
64 rem = tod_data.tod_sec % SECS_PER_DAY;
65
66 wtime->tm_hour = rem / SECS_PER_HOUR;
67 rem %= SECS_PER_HOUR;
68 wtime->tm_min = rem / 60;
69 wtime->tm_sec = rem % 60;
70
71 y = 1970;
72
73#define DIV(a, b) ((a) / (b) - ((a) % (b) < 0))
74#define LEAPS_THRU_END_OF(y) (DIV (y, 4) - DIV (y, 100) + DIV (y, 400))
75
76 while (days < 0 || days >= (__isleap (y) ? 366 : 365))
77 {
78 /* Guess a corrected year, assuming 365 days per year. */
79 long int yg = y + days / 365 - (days % 365 < 0);
80
81 /* Adjust DAYS and Y to match the guessed year. */
82 days -= ((yg - y) * 365
83 + LEAPS_THRU_END_OF (yg - 1)
84 - LEAPS_THRU_END_OF (y - 1));
85 y = yg;
86 }
87 wtime->tm_year = y - 1900;
88
89 ip = __mon_yday[__isleap(y)];
90 for (y = 11; days < (long int) ip[y]; --y)
91 continue;
92 days -= ip[y];
93 wtime->tm_mon = y;
94 wtime->tm_mday = days + 1;
95
96 return RTC_24H;
97}
98
99static int set_rtc_time(struct rtc_time *wtime)
100{
101 u_int32_t secs;
102
103 secs = mktime(wtime->tm_year + 1900, wtime->tm_mon + 1, wtime->tm_mday,
104 wtime->tm_hour, wtime->tm_min, wtime->tm_sec);
105
106 if(pdc_tod_set(secs, 0) < 0)
107 return -1;
108 else
109 return 0;
110
111}
112
113static inline unsigned int get_rtc_ss(void)
114{
115 struct rtc_time h;
116
117 get_rtc_time(&h);
118 return h.tm_sec;
119}
120
121static inline int get_rtc_pll(struct rtc_pll_info *pll)
122{
123 return -EINVAL;
124}
125static inline int set_rtc_pll(struct rtc_pll_info *pll)
126{
127 return -EINVAL;
128}
129
130#endif /* __KERNEL__ */
131#endif /* __ASM_RTC_H__ */
diff --git a/include/asm-parisc/runway.h b/include/asm-parisc/runway.h
deleted file mode 100644
index 5bea02da7e22..000000000000
--- a/include/asm-parisc/runway.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_PARISC_RUNWAY_H
2#define ASM_PARISC_RUNWAY_H
3#ifdef __KERNEL__
4
5/* declared in arch/parisc/kernel/setup.c */
6extern struct proc_dir_entry * proc_runway_root;
7
8#define RUNWAY_STATUS 0x10
9#define RUNWAY_DEBUG 0x40
10
11#endif /* __KERNEL__ */
12#endif /* ASM_PARISC_RUNWAY_H */
diff --git a/include/asm-parisc/scatterlist.h b/include/asm-parisc/scatterlist.h
deleted file mode 100644
index 62269b31ebf4..000000000000
--- a/include/asm-parisc/scatterlist.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _ASM_PARISC_SCATTERLIST_H
2#define _ASM_PARISC_SCATTERLIST_H
3
4#include <asm/page.h>
5#include <asm/types.h>
6
7struct scatterlist {
8#ifdef CONFIG_DEBUG_SG
9 unsigned long sg_magic;
10#endif
11 unsigned long page_link;
12 unsigned int offset;
13
14 unsigned int length;
15
16 /* an IOVA can be 64-bits on some PA-Risc platforms. */
17 dma_addr_t iova; /* I/O Virtual Address */
18 __u32 iova_length; /* bytes mapped */
19};
20
21#define sg_virt_addr(sg) ((unsigned long)sg_virt(sg))
22#define sg_dma_address(sg) ((sg)->iova)
23#define sg_dma_len(sg) ((sg)->iova_length)
24
25#define ISA_DMA_THRESHOLD (~0UL)
26
27#endif /* _ASM_PARISC_SCATTERLIST_H */
diff --git a/include/asm-parisc/sections.h b/include/asm-parisc/sections.h
deleted file mode 100644
index 9d13c3507ad6..000000000000
--- a/include/asm-parisc/sections.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _PARISC_SECTIONS_H
2#define _PARISC_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#ifdef CONFIG_64BIT
8#undef dereference_function_descriptor
9void *dereference_function_descriptor(void *);
10#endif
11
12#endif
diff --git a/include/asm-parisc/segment.h b/include/asm-parisc/segment.h
deleted file mode 100644
index 26794ddb6524..000000000000
--- a/include/asm-parisc/segment.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __PARISC_SEGMENT_H
2#define __PARISC_SEGMENT_H
3
4/* Only here because we have some old header files that expect it.. */
5
6#endif
diff --git a/include/asm-parisc/sembuf.h b/include/asm-parisc/sembuf.h
deleted file mode 100644
index 1e59ffd3bd1e..000000000000
--- a/include/asm-parisc/sembuf.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef _PARISC_SEMBUF_H
2#define _PARISC_SEMBUF_H
3
4/*
5 * The semid64_ds structure for parisc architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16#ifndef CONFIG_64BIT
17 unsigned int __pad1;
18#endif
19 __kernel_time_t sem_otime; /* last semop time */
20#ifndef CONFIG_64BIT
21 unsigned int __pad2;
22#endif
23 __kernel_time_t sem_ctime; /* last change time */
24 unsigned int sem_nsems; /* no. of semaphores in array */
25 unsigned int __unused1;
26 unsigned int __unused2;
27};
28
29#endif /* _PARISC_SEMBUF_H */
diff --git a/include/asm-parisc/serial.h b/include/asm-parisc/serial.h
deleted file mode 100644
index d7e3cc60dbc3..000000000000
--- a/include/asm-parisc/serial.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * include/asm-parisc/serial.h
3 */
4
5/*
6 * This is used for 16550-compatible UARTs
7 */
8#define BASE_BAUD ( 1843200 / 16 )
9
10#define SERIAL_PORT_DFNS
diff --git a/include/asm-parisc/setup.h b/include/asm-parisc/setup.h
deleted file mode 100644
index 7da2e5b8747e..000000000000
--- a/include/asm-parisc/setup.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _PARISC_SETUP_H
2#define _PARISC_SETUP_H
3
4#define COMMAND_LINE_SIZE 1024
5
6#endif /* _PARISC_SETUP_H */
diff --git a/include/asm-parisc/shmbuf.h b/include/asm-parisc/shmbuf.h
deleted file mode 100644
index 0a3eada1863b..000000000000
--- a/include/asm-parisc/shmbuf.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef _PARISC_SHMBUF_H
2#define _PARISC_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for parisc architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct shmid64_ds {
15 struct ipc64_perm shm_perm; /* operation perms */
16#ifndef CONFIG_64BIT
17 unsigned int __pad1;
18#endif
19 __kernel_time_t shm_atime; /* last attach time */
20#ifndef CONFIG_64BIT
21 unsigned int __pad2;
22#endif
23 __kernel_time_t shm_dtime; /* last detach time */
24#ifndef CONFIG_64BIT
25 unsigned int __pad3;
26#endif
27 __kernel_time_t shm_ctime; /* last change time */
28#ifndef CONFIG_64BIT
29 unsigned int __pad4;
30#endif
31 size_t shm_segsz; /* size of segment (bytes) */
32 __kernel_pid_t shm_cpid; /* pid of creator */
33 __kernel_pid_t shm_lpid; /* pid of last operator */
34 unsigned int shm_nattch; /* no. of current attaches */
35 unsigned int __unused1;
36 unsigned int __unused2;
37};
38
39#ifdef CONFIG_64BIT
40/* The 'unsigned int' (formerly 'unsigned long') data types below will
41 * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on
42 * a wide kernel, but if some of these values are meant to contain pointers
43 * they may need to be 'long long' instead. -PB XXX FIXME
44 */
45#endif
46struct shminfo64 {
47 unsigned int shmmax;
48 unsigned int shmmin;
49 unsigned int shmmni;
50 unsigned int shmseg;
51 unsigned int shmall;
52 unsigned int __unused1;
53 unsigned int __unused2;
54 unsigned int __unused3;
55 unsigned int __unused4;
56};
57
58#endif /* _PARISC_SHMBUF_H */
diff --git a/include/asm-parisc/shmparam.h b/include/asm-parisc/shmparam.h
deleted file mode 100644
index 628ddc22faa8..000000000000
--- a/include/asm-parisc/shmparam.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASMPARISC_SHMPARAM_H
2#define _ASMPARISC_SHMPARAM_H
3
4#define __ARCH_FORCE_SHMLBA 1
5
6#define SHMLBA 0x00400000 /* attach addr needs to be 4 Mb aligned */
7
8#endif /* _ASMPARISC_SHMPARAM_H */
diff --git a/include/asm-parisc/sigcontext.h b/include/asm-parisc/sigcontext.h
deleted file mode 100644
index 27ef31bb3b6e..000000000000
--- a/include/asm-parisc/sigcontext.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _ASMPARISC_SIGCONTEXT_H
2#define _ASMPARISC_SIGCONTEXT_H
3
4#define PARISC_SC_FLAG_ONSTACK 1<<0
5#define PARISC_SC_FLAG_IN_SYSCALL 1<<1
6
7/* We will add more stuff here as it becomes necessary, until we know
8 it works. */
9struct sigcontext {
10 unsigned long sc_flags;
11
12 unsigned long sc_gr[32]; /* PSW in sc_gr[0] */
13 unsigned long long sc_fr[32]; /* FIXME, do we need other state info? */
14 unsigned long sc_iasq[2];
15 unsigned long sc_iaoq[2];
16 unsigned long sc_sar; /* cr11 */
17};
18
19
20#endif
diff --git a/include/asm-parisc/siginfo.h b/include/asm-parisc/siginfo.h
deleted file mode 100644
index d7034728f377..000000000000
--- a/include/asm-parisc/siginfo.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _PARISC_SIGINFO_H
2#define _PARISC_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#undef NSIGTRAP
7#define NSIGTRAP 4
8
9#endif
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h
deleted file mode 100644
index c20356375d1d..000000000000
--- a/include/asm-parisc/signal.h
+++ /dev/null
@@ -1,153 +0,0 @@
1#ifndef _ASM_PARISC_SIGNAL_H
2#define _ASM_PARISC_SIGNAL_H
3
4#define SIGHUP 1
5#define SIGINT 2
6#define SIGQUIT 3
7#define SIGILL 4
8#define SIGTRAP 5
9#define SIGABRT 6
10#define SIGIOT 6
11#define SIGEMT 7
12#define SIGFPE 8
13#define SIGKILL 9
14#define SIGBUS 10
15#define SIGSEGV 11
16#define SIGSYS 12 /* Linux doesn't use this */
17#define SIGPIPE 13
18#define SIGALRM 14
19#define SIGTERM 15
20#define SIGUSR1 16
21#define SIGUSR2 17
22#define SIGCHLD 18
23#define SIGPWR 19
24#define SIGVTALRM 20
25#define SIGPROF 21
26#define SIGIO 22
27#define SIGPOLL SIGIO
28#define SIGWINCH 23
29#define SIGSTOP 24
30#define SIGTSTP 25
31#define SIGCONT 26
32#define SIGTTIN 27
33#define SIGTTOU 28
34#define SIGURG 29
35#define SIGLOST 30 /* Linux doesn't use this either */
36#define SIGUNUSED 31
37#define SIGRESERVE SIGUNUSED
38
39#define SIGXCPU 33
40#define SIGXFSZ 34
41#define SIGSTKFLT 36
42
43/* These should not be considered constants from userland. */
44#define SIGRTMIN 37
45#define SIGRTMAX _NSIG /* it's 44 under HP/UX */
46
47/*
48 * SA_FLAGS values:
49 *
50 * SA_ONSTACK indicates that a registered stack_t will be used.
51 * SA_RESTART flag to get restarting signals (which were the default long ago)
52 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
53 * SA_RESETHAND clears the handler when the signal is delivered.
54 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
55 * SA_NODEFER prevents the current signal from being masked in the handler.
56 *
57 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
58 * Unix names RESETHAND and NODEFER respectively.
59 */
60#define SA_ONSTACK 0x00000001
61#define SA_RESETHAND 0x00000004
62#define SA_NOCLDSTOP 0x00000008
63#define SA_SIGINFO 0x00000010
64#define SA_NODEFER 0x00000020
65#define SA_RESTART 0x00000040
66#define SA_NOCLDWAIT 0x00000080
67#define _SA_SIGGFAULT 0x00000100 /* HPUX */
68
69#define SA_NOMASK SA_NODEFER
70#define SA_ONESHOT SA_RESETHAND
71
72#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
73
74/*
75 * sigaltstack controls
76 */
77#define SS_ONSTACK 1
78#define SS_DISABLE 2
79
80#define MINSIGSTKSZ 2048
81#define SIGSTKSZ 8192
82
83#ifdef __KERNEL__
84
85#define _NSIG 64
86/* bits-per-word, where word apparently means 'long' not 'int' */
87#define _NSIG_BPW BITS_PER_LONG
88#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
89
90#endif /* __KERNEL__ */
91
92#define SIG_BLOCK 0 /* for blocking signals */
93#define SIG_UNBLOCK 1 /* for unblocking signals */
94#define SIG_SETMASK 2 /* for setting the signal mask */
95
96#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
97#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
98#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
99
100# ifndef __ASSEMBLY__
101
102# include <linux/types.h>
103
104/* Avoid too many header ordering problems. */
105struct siginfo;
106
107/* Type of a signal handler. */
108#ifdef CONFIG_64BIT
109/* function pointers on 64-bit parisc are pointers to little structs and the
110 * compiler doesn't support code which changes or tests the address of
111 * the function in the little struct. This is really ugly -PB
112 */
113typedef char __user *__sighandler_t;
114#else
115typedef void __signalfn_t(int);
116typedef __signalfn_t __user *__sighandler_t;
117#endif
118
119typedef struct sigaltstack {
120 void __user *ss_sp;
121 int ss_flags;
122 size_t ss_size;
123} stack_t;
124
125#ifdef __KERNEL__
126
127/* Most things should be clean enough to redefine this at will, if care
128 is taken to make libc match. */
129
130typedef unsigned long old_sigset_t; /* at least 32 bits */
131
132typedef struct {
133 /* next_signal() assumes this is a long - no choice */
134 unsigned long sig[_NSIG_WORDS];
135} sigset_t;
136
137struct sigaction {
138 __sighandler_t sa_handler;
139 unsigned long sa_flags;
140 sigset_t sa_mask; /* mask last for extensibility */
141};
142
143struct k_sigaction {
144 struct sigaction sa;
145};
146
147#define ptrace_signal_deliver(regs, cookie) do { } while (0)
148
149#include <asm/sigcontext.h>
150
151#endif /* __KERNEL__ */
152#endif /* !__ASSEMBLY */
153#endif /* _ASM_PARISC_SIGNAL_H */
diff --git a/include/asm-parisc/smp.h b/include/asm-parisc/smp.h
deleted file mode 100644
index 398cdbaf4e54..000000000000
--- a/include/asm-parisc/smp.h
+++ /dev/null
@@ -1,68 +0,0 @@
1#ifndef __ASM_SMP_H
2#define __ASM_SMP_H
3
4
5#if defined(CONFIG_SMP)
6
7/* Page Zero Location PDC will look for the address to branch to when we poke
8** slave CPUs still in "Icache loop".
9*/
10#define PDC_OS_BOOT_RENDEZVOUS 0x10
11#define PDC_OS_BOOT_RENDEZVOUS_HI 0x28
12
13#ifndef ASSEMBLY
14#include <linux/bitops.h>
15#include <linux/threads.h> /* for NR_CPUS */
16#include <linux/cpumask.h>
17typedef unsigned long address_t;
18
19extern cpumask_t cpu_online_map;
20
21
22/*
23 * Private routines/data
24 *
25 * physical and logical are equivalent until we support CPU hotplug.
26 */
27#define cpu_number_map(cpu) (cpu)
28#define cpu_logical_map(cpu) (cpu)
29
30extern void smp_send_reschedule(int cpu);
31extern void smp_send_all_nop(void);
32
33extern void arch_send_call_function_single_ipi(int cpu);
34extern void arch_send_call_function_ipi(cpumask_t mask);
35
36#endif /* !ASSEMBLY */
37
38/*
39 * This magic constant controls our willingness to transfer
40 * a process across CPUs. Such a transfer incurs cache and tlb
41 * misses. The current value is inherited from i386. Still needs
42 * to be tuned for parisc.
43 */
44
45#define PROC_CHANGE_PENALTY 15 /* Schedule penalty */
46
47extern unsigned long cpu_present_mask;
48
49#define raw_smp_processor_id() (current_thread_info()->cpu)
50
51#else /* CONFIG_SMP */
52
53static inline void smp_send_all_nop(void) { return; }
54
55#endif
56
57#define NO_PROC_ID 0xFF /* No processor magic marker */
58#define ANY_PROC_ID 0xFF /* Any processor magic marker */
59static inline int __cpu_disable (void) {
60 return 0;
61}
62static inline void __cpu_die (unsigned int cpu) {
63 while(1)
64 ;
65}
66extern int __cpu_up (unsigned int cpu);
67
68#endif /* __ASM_SMP_H */
diff --git a/include/asm-parisc/socket.h b/include/asm-parisc/socket.h
deleted file mode 100644
index fba402c95ac2..000000000000
--- a/include/asm-parisc/socket.h
+++ /dev/null
@@ -1,62 +0,0 @@
1#ifndef _ASM_SOCKET_H
2#define _ASM_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockopt(2) */
7#define SOL_SOCKET 0xffff
8
9#define SO_DEBUG 0x0001
10#define SO_REUSEADDR 0x0004
11#define SO_KEEPALIVE 0x0008
12#define SO_DONTROUTE 0x0010
13#define SO_BROADCAST 0x0020
14#define SO_LINGER 0x0080
15#define SO_OOBINLINE 0x0100
16/* To add :#define SO_REUSEPORT 0x0200 */
17#define SO_SNDBUF 0x1001
18#define SO_RCVBUF 0x1002
19#define SO_SNDBUFFORCE 0x100a
20#define SO_RCVBUFFORCE 0x100b
21#define SO_SNDLOWAT 0x1003
22#define SO_RCVLOWAT 0x1004
23#define SO_SNDTIMEO 0x1005
24#define SO_RCVTIMEO 0x1006
25#define SO_ERROR 0x1007
26#define SO_TYPE 0x1008
27#define SO_PEERNAME 0x2000
28
29#define SO_NO_CHECK 0x400b
30#define SO_PRIORITY 0x400c
31#define SO_BSDCOMPAT 0x400e
32#define SO_PASSCRED 0x4010
33#define SO_PEERCRED 0x4011
34#define SO_TIMESTAMP 0x4012
35#define SCM_TIMESTAMP SO_TIMESTAMP
36#define SO_TIMESTAMPNS 0x4013
37#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
38
39/* Security levels - as per NRL IPv6 - don't actually do anything */
40#define SO_SECURITY_AUTHENTICATION 0x4016
41#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x4017
42#define SO_SECURITY_ENCRYPTION_NETWORK 0x4018
43
44#define SO_BINDTODEVICE 0x4019
45
46/* Socket filtering */
47#define SO_ATTACH_FILTER 0x401a
48#define SO_DETACH_FILTER 0x401b
49
50#define SO_ACCEPTCONN 0x401c
51
52#define SO_PEERSEC 0x401d
53#define SO_PASSSEC 0x401e
54
55#define SO_MARK 0x401f
56
57/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
58 * have to define SOCK_NONBLOCK to a different value here.
59 */
60#define SOCK_NONBLOCK 0x40000000
61
62#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-parisc/sockios.h b/include/asm-parisc/sockios.h
deleted file mode 100644
index dabfbc7483f6..000000000000
--- a/include/asm-parisc/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_PARISC_SOCKIOS__
2#define __ARCH_PARISC_SOCKIOS__
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif
diff --git a/include/asm-parisc/spinlock.h b/include/asm-parisc/spinlock.h
deleted file mode 100644
index f3d2090a18dc..000000000000
--- a/include/asm-parisc/spinlock.h
+++ /dev/null
@@ -1,194 +0,0 @@
1#ifndef __ASM_SPINLOCK_H
2#define __ASM_SPINLOCK_H
3
4#include <asm/system.h>
5#include <asm/processor.h>
6#include <asm/spinlock_types.h>
7
8static inline int __raw_spin_is_locked(raw_spinlock_t *x)
9{
10 volatile unsigned int *a = __ldcw_align(x);
11 return *a == 0;
12}
13
14#define __raw_spin_lock(lock) __raw_spin_lock_flags(lock, 0)
15#define __raw_spin_unlock_wait(x) \
16 do { cpu_relax(); } while (__raw_spin_is_locked(x))
17
18static inline void __raw_spin_lock_flags(raw_spinlock_t *x,
19 unsigned long flags)
20{
21 volatile unsigned int *a;
22
23 mb();
24 a = __ldcw_align(x);
25 while (__ldcw(a) == 0)
26 while (*a == 0)
27 if (flags & PSW_SM_I) {
28 local_irq_enable();
29 cpu_relax();
30 local_irq_disable();
31 } else
32 cpu_relax();
33 mb();
34}
35
36static inline void __raw_spin_unlock(raw_spinlock_t *x)
37{
38 volatile unsigned int *a;
39 mb();
40 a = __ldcw_align(x);
41 *a = 1;
42 mb();
43}
44
45static inline int __raw_spin_trylock(raw_spinlock_t *x)
46{
47 volatile unsigned int *a;
48 int ret;
49
50 mb();
51 a = __ldcw_align(x);
52 ret = __ldcw(a) != 0;
53 mb();
54
55 return ret;
56}
57
58/*
59 * Read-write spinlocks, allowing multiple readers but only one writer.
60 * Linux rwlocks are unfair to writers; they can be starved for an indefinite
61 * time by readers. With care, they can also be taken in interrupt context.
62 *
63 * In the PA-RISC implementation, we have a spinlock and a counter.
64 * Readers use the lock to serialise their access to the counter (which
65 * records how many readers currently hold the lock).
66 * Writers hold the spinlock, preventing any readers or other writers from
67 * grabbing the rwlock.
68 */
69
70/* Note that we have to ensure interrupts are disabled in case we're
71 * interrupted by some other code that wants to grab the same read lock */
72static __inline__ void __raw_read_lock(raw_rwlock_t *rw)
73{
74 unsigned long flags;
75 local_irq_save(flags);
76 __raw_spin_lock_flags(&rw->lock, flags);
77 rw->counter++;
78 __raw_spin_unlock(&rw->lock);
79 local_irq_restore(flags);
80}
81
82/* Note that we have to ensure interrupts are disabled in case we're
83 * interrupted by some other code that wants to grab the same read lock */
84static __inline__ void __raw_read_unlock(raw_rwlock_t *rw)
85{
86 unsigned long flags;
87 local_irq_save(flags);
88 __raw_spin_lock_flags(&rw->lock, flags);
89 rw->counter--;
90 __raw_spin_unlock(&rw->lock);
91 local_irq_restore(flags);
92}
93
94/* Note that we have to ensure interrupts are disabled in case we're
95 * interrupted by some other code that wants to grab the same read lock */
96static __inline__ int __raw_read_trylock(raw_rwlock_t *rw)
97{
98 unsigned long flags;
99 retry:
100 local_irq_save(flags);
101 if (__raw_spin_trylock(&rw->lock)) {
102 rw->counter++;
103 __raw_spin_unlock(&rw->lock);
104 local_irq_restore(flags);
105 return 1;
106 }
107
108 local_irq_restore(flags);
109 /* If write-locked, we fail to acquire the lock */
110 if (rw->counter < 0)
111 return 0;
112
113 /* Wait until we have a realistic chance at the lock */
114 while (__raw_spin_is_locked(&rw->lock) && rw->counter >= 0)
115 cpu_relax();
116
117 goto retry;
118}
119
120/* Note that we have to ensure interrupts are disabled in case we're
121 * interrupted by some other code that wants to read_trylock() this lock */
122static __inline__ void __raw_write_lock(raw_rwlock_t *rw)
123{
124 unsigned long flags;
125retry:
126 local_irq_save(flags);
127 __raw_spin_lock_flags(&rw->lock, flags);
128
129 if (rw->counter != 0) {
130 __raw_spin_unlock(&rw->lock);
131 local_irq_restore(flags);
132
133 while (rw->counter != 0)
134 cpu_relax();
135
136 goto retry;
137 }
138
139 rw->counter = -1; /* mark as write-locked */
140 mb();
141 local_irq_restore(flags);
142}
143
144static __inline__ void __raw_write_unlock(raw_rwlock_t *rw)
145{
146 rw->counter = 0;
147 __raw_spin_unlock(&rw->lock);
148}
149
150/* Note that we have to ensure interrupts are disabled in case we're
151 * interrupted by some other code that wants to read_trylock() this lock */
152static __inline__ int __raw_write_trylock(raw_rwlock_t *rw)
153{
154 unsigned long flags;
155 int result = 0;
156
157 local_irq_save(flags);
158 if (__raw_spin_trylock(&rw->lock)) {
159 if (rw->counter == 0) {
160 rw->counter = -1;
161 result = 1;
162 } else {
163 /* Read-locked. Oh well. */
164 __raw_spin_unlock(&rw->lock);
165 }
166 }
167 local_irq_restore(flags);
168
169 return result;
170}
171
172/*
173 * read_can_lock - would read_trylock() succeed?
174 * @lock: the rwlock in question.
175 */
176static __inline__ int __raw_read_can_lock(raw_rwlock_t *rw)
177{
178 return rw->counter >= 0;
179}
180
181/*
182 * write_can_lock - would write_trylock() succeed?
183 * @lock: the rwlock in question.
184 */
185static __inline__ int __raw_write_can_lock(raw_rwlock_t *rw)
186{
187 return !rw->counter;
188}
189
190#define _raw_spin_relax(lock) cpu_relax()
191#define _raw_read_relax(lock) cpu_relax()
192#define _raw_write_relax(lock) cpu_relax()
193
194#endif /* __ASM_SPINLOCK_H */
diff --git a/include/asm-parisc/spinlock_types.h b/include/asm-parisc/spinlock_types.h
deleted file mode 100644
index 3f72f47cf4b2..000000000000
--- a/include/asm-parisc/spinlock_types.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef __ASM_SPINLOCK_TYPES_H
2#define __ASM_SPINLOCK_TYPES_H
3
4typedef struct {
5#ifdef CONFIG_PA20
6 volatile unsigned int slock;
7# define __RAW_SPIN_LOCK_UNLOCKED { 1 }
8#else
9 volatile unsigned int lock[4];
10# define __RAW_SPIN_LOCK_UNLOCKED { { 1, 1, 1, 1 } }
11#endif
12} raw_spinlock_t;
13
14typedef struct {
15 raw_spinlock_t lock;
16 volatile int counter;
17} raw_rwlock_t;
18
19#define __RAW_RW_LOCK_UNLOCKED { __RAW_SPIN_LOCK_UNLOCKED, 0 }
20
21#endif
diff --git a/include/asm-parisc/stat.h b/include/asm-parisc/stat.h
deleted file mode 100644
index 9d5fbbc5c31f..000000000000
--- a/include/asm-parisc/stat.h
+++ /dev/null
@@ -1,100 +0,0 @@
1#ifndef _PARISC_STAT_H
2#define _PARISC_STAT_H
3
4#include <linux/types.h>
5
6struct stat {
7 unsigned int st_dev; /* dev_t is 32 bits on parisc */
8 ino_t st_ino; /* 32 bits */
9 mode_t st_mode; /* 16 bits */
10 nlink_t st_nlink; /* 16 bits */
11 unsigned short st_reserved1; /* old st_uid */
12 unsigned short st_reserved2; /* old st_gid */
13 unsigned int st_rdev;
14 off_t st_size;
15 time_t st_atime;
16 unsigned int st_atime_nsec;
17 time_t st_mtime;
18 unsigned int st_mtime_nsec;
19 time_t st_ctime;
20 unsigned int st_ctime_nsec;
21 int st_blksize;
22 int st_blocks;
23 unsigned int __unused1; /* ACL stuff */
24 unsigned int __unused2; /* network */
25 ino_t __unused3; /* network */
26 unsigned int __unused4; /* cnodes */
27 unsigned short __unused5; /* netsite */
28 short st_fstype;
29 unsigned int st_realdev;
30 unsigned short st_basemode;
31 unsigned short st_spareshort;
32 uid_t st_uid;
33 gid_t st_gid;
34 unsigned int st_spare4[3];
35};
36
37#define STAT_HAVE_NSEC
38
39typedef __kernel_off64_t off64_t;
40
41struct hpux_stat64 {
42 unsigned int st_dev; /* dev_t is 32 bits on parisc */
43 ino_t st_ino; /* 32 bits */
44 mode_t st_mode; /* 16 bits */
45 nlink_t st_nlink; /* 16 bits */
46 unsigned short st_reserved1; /* old st_uid */
47 unsigned short st_reserved2; /* old st_gid */
48 unsigned int st_rdev;
49 off64_t st_size;
50 time_t st_atime;
51 unsigned int st_spare1;
52 time_t st_mtime;
53 unsigned int st_spare2;
54 time_t st_ctime;
55 unsigned int st_spare3;
56 int st_blksize;
57 __u64 st_blocks;
58 unsigned int __unused1; /* ACL stuff */
59 unsigned int __unused2; /* network */
60 ino_t __unused3; /* network */
61 unsigned int __unused4; /* cnodes */
62 unsigned short __unused5; /* netsite */
63 short st_fstype;
64 unsigned int st_realdev;
65 unsigned short st_basemode;
66 unsigned short st_spareshort;
67 uid_t st_uid;
68 gid_t st_gid;
69 unsigned int st_spare4[3];
70};
71
72/* This is the struct that 32-bit userspace applications are expecting.
73 * How 64-bit apps are going to be compiled, I have no idea. But at least
74 * this way, we don't have a wrapper in the kernel.
75 */
76struct stat64 {
77 unsigned long long st_dev;
78 unsigned int __pad1;
79
80 unsigned int __st_ino; /* Not actually filled in */
81 unsigned int st_mode;
82 unsigned int st_nlink;
83 unsigned int st_uid;
84 unsigned int st_gid;
85 unsigned long long st_rdev;
86 unsigned int __pad2;
87 signed long long st_size;
88 signed int st_blksize;
89
90 signed long long st_blocks;
91 signed int st_atime;
92 unsigned int st_atime_nsec;
93 signed int st_mtime;
94 unsigned int st_mtime_nsec;
95 signed int st_ctime;
96 unsigned int st_ctime_nsec;
97 unsigned long long st_ino;
98};
99
100#endif
diff --git a/include/asm-parisc/statfs.h b/include/asm-parisc/statfs.h
deleted file mode 100644
index 324bea905dc6..000000000000
--- a/include/asm-parisc/statfs.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _PARISC_STATFS_H
2#define _PARISC_STATFS_H
3
4#define __statfs_word long
5#include <asm-generic/statfs.h>
6
7#endif
diff --git a/include/asm-parisc/string.h b/include/asm-parisc/string.h
deleted file mode 100644
index eda01be65e35..000000000000
--- a/include/asm-parisc/string.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef _PA_STRING_H_
2#define _PA_STRING_H_
3
4#define __HAVE_ARCH_MEMSET
5extern void * memset(void *, int, size_t);
6
7#define __HAVE_ARCH_MEMCPY
8void * memcpy(void * dest,const void *src,size_t count);
9
10#endif
diff --git a/include/asm-parisc/superio.h b/include/asm-parisc/superio.h
deleted file mode 100644
index 6598acb4d46d..000000000000
--- a/include/asm-parisc/superio.h
+++ /dev/null
@@ -1,85 +0,0 @@
1#ifndef _PARISC_SUPERIO_H
2#define _PARISC_SUPERIO_H
3
4#define IC_PIC1 0x20 /* PCI I/O address of master 8259 */
5#define IC_PIC2 0xA0 /* PCI I/O address of slave */
6
7/* Config Space Offsets to configuration and base address registers */
8#define SIO_CR 0x5A /* Configuration Register */
9#define SIO_ACPIBAR 0x88 /* ACPI BAR */
10#define SIO_FDCBAR 0x90 /* Floppy Disk Controller BAR */
11#define SIO_SP1BAR 0x94 /* Serial 1 BAR */
12#define SIO_SP2BAR 0x98 /* Serial 2 BAR */
13#define SIO_PPBAR 0x9C /* Parallel BAR */
14
15#define TRIGGER_1 0x67 /* Edge/level trigger register 1 */
16#define TRIGGER_2 0x68 /* Edge/level trigger register 2 */
17
18/* Interrupt Routing Control registers */
19#define CFG_IR_SER 0x69 /* Serial 1 [0:3] and Serial 2 [4:7] */
20#define CFG_IR_PFD 0x6a /* Parallel [0:3] and Floppy [4:7] */
21#define CFG_IR_IDE 0x6b /* IDE1 [0:3] and IDE2 [4:7] */
22#define CFG_IR_INTAB 0x6c /* PCI INTA [0:3] and INT B [4:7] */
23#define CFG_IR_INTCD 0x6d /* PCI INTC [0:3] and INT D [4:7] */
24#define CFG_IR_PS2 0x6e /* PS/2 KBINT [0:3] and Mouse [4:7] */
25#define CFG_IR_FXBUS 0x6f /* FXIRQ[0] [0:3] and FXIRQ[1] [4:7] */
26#define CFG_IR_USB 0x70 /* FXIRQ[2] [0:3] and USB [4:7] */
27#define CFG_IR_ACPI 0x71 /* ACPI SCI [0:3] and reserved [4:7] */
28
29#define CFG_IR_LOW CFG_IR_SER /* Lowest interrupt routing reg */
30#define CFG_IR_HIGH CFG_IR_ACPI /* Highest interrupt routing reg */
31
32/* 8259 operational control words */
33#define OCW2_EOI 0x20 /* Non-specific EOI */
34#define OCW2_SEOI 0x60 /* Specific EOI */
35#define OCW3_IIR 0x0A /* Read request register */
36#define OCW3_ISR 0x0B /* Read service register */
37#define OCW3_POLL 0x0C /* Poll the PIC for an interrupt vector */
38
39/* Interrupt lines. Only PIC1 is used */
40#define USB_IRQ 1 /* USB */
41#define SP1_IRQ 3 /* Serial port 1 */
42#define SP2_IRQ 4 /* Serial port 2 */
43#define PAR_IRQ 5 /* Parallel port */
44#define FDC_IRQ 6 /* Floppy controller */
45#define IDE_IRQ 7 /* IDE (pri+sec) */
46
47/* ACPI registers */
48#define USB_REG_CR 0x1f /* USB Regulator Control Register */
49
50#define SUPERIO_NIRQS 8
51
52struct superio_device {
53 u32 fdc_base;
54 u32 sp1_base;
55 u32 sp2_base;
56 u32 pp_base;
57 u32 acpi_base;
58 int suckyio_irq_enabled;
59 struct pci_dev *lio_pdev; /* pci device for legacy IO (fn 1) */
60 struct pci_dev *usb_pdev; /* pci device for USB (fn 2) */
61};
62
63/*
64 * Does NS make a 87415 based plug in PCI card? If so, because of this
65 * macro we currently don't support it being plugged into a machine
66 * that contains a SuperIO chip AND has CONFIG_SUPERIO enabled.
67 *
68 * This could be fixed by checking to see if function 1 exists, and
69 * if it is SuperIO Legacy IO; but really now, is this combination
70 * going to EVER happen?
71 */
72
73#define SUPERIO_IDE_FN 0 /* Function number of IDE controller */
74#define SUPERIO_LIO_FN 1 /* Function number of Legacy IO controller */
75#define SUPERIO_USB_FN 2 /* Function number of USB controller */
76
77#define is_superio_device(x) \
78 (((x)->vendor == PCI_VENDOR_ID_NS) && \
79 ( ((x)->device == PCI_DEVICE_ID_NS_87415) \
80 || ((x)->device == PCI_DEVICE_ID_NS_87560_LIO) \
81 || ((x)->device == PCI_DEVICE_ID_NS_87560_USB) ) )
82
83extern int superio_fixup_irq(struct pci_dev *pcidev); /* called by iosapic */
84
85#endif /* _PARISC_SUPERIO_H */
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h
deleted file mode 100644
index ee80c920b464..000000000000
--- a/include/asm-parisc/system.h
+++ /dev/null
@@ -1,182 +0,0 @@
1#ifndef __PARISC_SYSTEM_H
2#define __PARISC_SYSTEM_H
3
4#include <asm/psw.h>
5
6/* The program status word as bitfields. */
7struct pa_psw {
8 unsigned int y:1;
9 unsigned int z:1;
10 unsigned int rv:2;
11 unsigned int w:1;
12 unsigned int e:1;
13 unsigned int s:1;
14 unsigned int t:1;
15
16 unsigned int h:1;
17 unsigned int l:1;
18 unsigned int n:1;
19 unsigned int x:1;
20 unsigned int b:1;
21 unsigned int c:1;
22 unsigned int v:1;
23 unsigned int m:1;
24
25 unsigned int cb:8;
26
27 unsigned int o:1;
28 unsigned int g:1;
29 unsigned int f:1;
30 unsigned int r:1;
31 unsigned int q:1;
32 unsigned int p:1;
33 unsigned int d:1;
34 unsigned int i:1;
35};
36
37#ifdef CONFIG_64BIT
38#define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4))
39#else
40#define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW))
41#endif
42
43struct task_struct;
44
45extern struct task_struct *_switch_to(struct task_struct *, struct task_struct *);
46
47#define switch_to(prev, next, last) do { \
48 (last) = _switch_to(prev, next); \
49} while(0)
50
51/* interrupt control */
52#define local_save_flags(x) __asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory")
53#define local_irq_disable() __asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" )
54#define local_irq_enable() __asm__ __volatile__("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory" )
55
56#define local_irq_save(x) \
57 __asm__ __volatile__("rsm %1,%0" : "=r" (x) :"i" (PSW_I) : "memory" )
58#define local_irq_restore(x) \
59 __asm__ __volatile__("mtsm %0" : : "r" (x) : "memory" )
60
61#define irqs_disabled() \
62({ \
63 unsigned long flags; \
64 local_save_flags(flags); \
65 (flags & PSW_I) == 0; \
66})
67
68#define mfctl(reg) ({ \
69 unsigned long cr; \
70 __asm__ __volatile__( \
71 "mfctl " #reg ",%0" : \
72 "=r" (cr) \
73 ); \
74 cr; \
75})
76
77#define mtctl(gr, cr) \
78 __asm__ __volatile__("mtctl %0,%1" \
79 : /* no outputs */ \
80 : "r" (gr), "i" (cr) : "memory")
81
82/* these are here to de-mystefy the calling code, and to provide hooks */
83/* which I needed for debugging EIEM problems -PB */
84#define get_eiem() mfctl(15)
85static inline void set_eiem(unsigned long val)
86{
87 mtctl(val, 15);
88}
89
90#define mfsp(reg) ({ \
91 unsigned long cr; \
92 __asm__ __volatile__( \
93 "mfsp " #reg ",%0" : \
94 "=r" (cr) \
95 ); \
96 cr; \
97})
98
99#define mtsp(gr, cr) \
100 __asm__ __volatile__("mtsp %0,%1" \
101 : /* no outputs */ \
102 : "r" (gr), "i" (cr) : "memory")
103
104
105/*
106** This is simply the barrier() macro from linux/kernel.h but when serial.c
107** uses tqueue.h uses smp_mb() defined using barrier(), linux/kernel.h
108** hasn't yet been included yet so it fails, thus repeating the macro here.
109**
110** PA-RISC architecture allows for weakly ordered memory accesses although
111** none of the processors use it. There is a strong ordered bit that is
112** set in the O-bit of the page directory entry. Operating systems that
113** can not tolerate out of order accesses should set this bit when mapping
114** pages. The O-bit of the PSW should also be set to 1 (I don't believe any
115** of the processor implemented the PSW O-bit). The PCX-W ERS states that
116** the TLB O-bit is not implemented so the page directory does not need to
117** have the O-bit set when mapping pages (section 3.1). This section also
118** states that the PSW Y, Z, G, and O bits are not implemented.
119** So it looks like nothing needs to be done for parisc-linux (yet).
120** (thanks to chada for the above comment -ggg)
121**
122** The __asm__ op below simple prevents gcc/ld from reordering
123** instructions across the mb() "call".
124*/
125#define mb() __asm__ __volatile__("":::"memory") /* barrier() */
126#define rmb() mb()
127#define wmb() mb()
128#define smp_mb() mb()
129#define smp_rmb() mb()
130#define smp_wmb() mb()
131#define smp_read_barrier_depends() do { } while(0)
132#define read_barrier_depends() do { } while(0)
133
134#define set_mb(var, value) do { var = value; mb(); } while (0)
135
136#ifndef CONFIG_PA20
137/* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data,
138 and GCC only guarantees 8-byte alignment for stack locals, we can't
139 be assured of 16-byte alignment for atomic lock data even if we
140 specify "__attribute ((aligned(16)))" in the type declaration. So,
141 we use a struct containing an array of four ints for the atomic lock
142 type and dynamically select the 16-byte aligned int from the array
143 for the semaphore. */
144
145#define __PA_LDCW_ALIGNMENT 16
146#define __ldcw_align(a) ({ \
147 unsigned long __ret = (unsigned long) &(a)->lock[0]; \
148 __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \
149 & ~(__PA_LDCW_ALIGNMENT - 1); \
150 (volatile unsigned int *) __ret; \
151})
152#define __LDCW "ldcw"
153
154#else /*CONFIG_PA20*/
155/* From: "Jim Hull" <jim.hull of hp.com>
156 I've attached a summary of the change, but basically, for PA 2.0, as
157 long as the ",CO" (coherent operation) completer is specified, then the
158 16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
159 they only require "natural" alignment (4-byte for ldcw, 8-byte for
160 ldcd). */
161
162#define __PA_LDCW_ALIGNMENT 4
163#define __ldcw_align(a) ((volatile unsigned int *)a)
164#define __LDCW "ldcw,co"
165
166#endif /*!CONFIG_PA20*/
167
168/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */
169#define __ldcw(a) ({ \
170 unsigned __ret; \
171 __asm__ __volatile__(__LDCW " 0(%1),%0" \
172 : "=r" (__ret) : "r" (a)); \
173 __ret; \
174})
175
176#ifdef CONFIG_SMP
177# define __lock_aligned __attribute__((__section__(".data.lock_aligned")))
178#endif
179
180#define arch_align_stack(x) (x)
181
182#endif
diff --git a/include/asm-parisc/termbits.h b/include/asm-parisc/termbits.h
deleted file mode 100644
index d8bbc73b16b7..000000000000
--- a/include/asm-parisc/termbits.h
+++ /dev/null
@@ -1,200 +0,0 @@
1#ifndef __ARCH_PARISC_TERMBITS_H__
2#define __ARCH_PARISC_TERMBITS_H__
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61
62/* c_iflag bits */
63#define IGNBRK 0000001
64#define BRKINT 0000002
65#define IGNPAR 0000004
66#define PARMRK 0000010
67#define INPCK 0000020
68#define ISTRIP 0000040
69#define INLCR 0000100
70#define IGNCR 0000200
71#define ICRNL 0000400
72#define IUCLC 0001000
73#define IXON 0002000
74#define IXANY 0004000
75#define IXOFF 0010000
76#define IMAXBEL 0040000
77#define IUTF8 0100000
78
79/* c_oflag bits */
80#define OPOST 0000001
81#define OLCUC 0000002
82#define ONLCR 0000004
83#define OCRNL 0000010
84#define ONOCR 0000020
85#define ONLRET 0000040
86#define OFILL 0000100
87#define OFDEL 0000200
88#define NLDLY 0000400
89#define NL0 0000000
90#define NL1 0000400
91#define CRDLY 0003000
92#define CR0 0000000
93#define CR1 0001000
94#define CR2 0002000
95#define CR3 0003000
96#define TABDLY 0014000
97#define TAB0 0000000
98#define TAB1 0004000
99#define TAB2 0010000
100#define TAB3 0014000
101#define XTABS 0014000
102#define BSDLY 0020000
103#define BS0 0000000
104#define BS1 0020000
105#define VTDLY 0040000
106#define VT0 0000000
107#define VT1 0040000
108#define FFDLY 0100000
109#define FF0 0000000
110#define FF1 0100000
111
112/* c_cflag bit meaning */
113#define CBAUD 0010017
114#define B0 0000000 /* hang up */
115#define B50 0000001
116#define B75 0000002
117#define B110 0000003
118#define B134 0000004
119#define B150 0000005
120#define B200 0000006
121#define B300 0000007
122#define B600 0000010
123#define B1200 0000011
124#define B1800 0000012
125#define B2400 0000013
126#define B4800 0000014
127#define B9600 0000015
128#define B19200 0000016
129#define B38400 0000017
130#define EXTA B19200
131#define EXTB B38400
132#define CSIZE 0000060
133#define CS5 0000000
134#define CS6 0000020
135#define CS7 0000040
136#define CS8 0000060
137#define CSTOPB 0000100
138#define CREAD 0000200
139#define PARENB 0000400
140#define PARODD 0001000
141#define HUPCL 0002000
142#define CLOCAL 0004000
143#define CBAUDEX 0010000
144#define BOTHER 0010000
145#define B57600 0010001
146#define B115200 0010002
147#define B230400 0010003
148#define B460800 0010004
149#define B500000 0010005
150#define B576000 0010006
151#define B921600 0010007
152#define B1000000 0010010
153#define B1152000 0010011
154#define B1500000 0010012
155#define B2000000 0010013
156#define B2500000 0010014
157#define B3000000 0010015
158#define B3500000 0010016
159#define B4000000 0010017
160#define CIBAUD 002003600000 /* input baud rate */
161#define CMSPAR 010000000000 /* mark or space (stick) parity */
162#define CRTSCTS 020000000000 /* flow control */
163
164#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
165
166
167/* c_lflag bits */
168#define ISIG 0000001
169#define ICANON 0000002
170#define XCASE 0000004
171#define ECHO 0000010
172#define ECHOE 0000020
173#define ECHOK 0000040
174#define ECHONL 0000100
175#define NOFLSH 0000200
176#define TOSTOP 0000400
177#define ECHOCTL 0001000
178#define ECHOPRT 0002000
179#define ECHOKE 0004000
180#define FLUSHO 0010000
181#define PENDIN 0040000
182#define IEXTEN 0100000
183
184/* tcflow() and TCXONC use these */
185#define TCOOFF 0
186#define TCOON 1
187#define TCIOFF 2
188#define TCION 3
189
190/* tcflush() and TCFLSH use these */
191#define TCIFLUSH 0
192#define TCOFLUSH 1
193#define TCIOFLUSH 2
194
195/* tcsetattr uses these */
196#define TCSANOW 0
197#define TCSADRAIN 1
198#define TCSAFLUSH 2
199
200#endif
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h
deleted file mode 100644
index a2a57a4548af..000000000000
--- a/include/asm-parisc/termios.h
+++ /dev/null
@@ -1,90 +0,0 @@
1#ifndef _PARISC_TERMIOS_H
2#define _PARISC_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42#ifdef __KERNEL__
43
44/* intr=^C quit=^\ erase=del kill=^U
45 eof=^D vtime=\0 vmin=\1 sxtc=\0
46 start=^Q stop=^S susp=^Z eol=\0
47 reprint=^R discard=^U werase=^W lnext=^V
48 eol2=\0
49*/
50#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
51
52/*
53 * Translate a "termio" structure into a "termios". Ugh.
54 */
55#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
56 unsigned short __tmp; \
57 get_user(__tmp,&(termio)->x); \
58 *(unsigned short *) &(termios)->x = __tmp; \
59}
60
61#define user_termio_to_kernel_termios(termios, termio) \
62({ \
63 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
64 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
67 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
68})
69
70/*
71 * Translate a "termios" structure into a "termio". Ugh.
72 */
73#define kernel_termios_to_user_termio(termio, termios) \
74({ \
75 put_user((termios)->c_iflag, &(termio)->c_iflag); \
76 put_user((termios)->c_oflag, &(termio)->c_oflag); \
77 put_user((termios)->c_cflag, &(termio)->c_cflag); \
78 put_user((termios)->c_lflag, &(termio)->c_lflag); \
79 put_user((termios)->c_line, &(termio)->c_line); \
80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
81})
82
83#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
84#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
85#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
86#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
87
88#endif /* __KERNEL__ */
89
90#endif /* _PARISC_TERMIOS_H */
diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h
deleted file mode 100644
index 9f812741c355..000000000000
--- a/include/asm-parisc/thread_info.h
+++ /dev/null
@@ -1,74 +0,0 @@
1#ifndef _ASM_PARISC_THREAD_INFO_H
2#define _ASM_PARISC_THREAD_INFO_H
3
4#ifdef __KERNEL__
5
6#ifndef __ASSEMBLY__
7#include <asm/processor.h>
8
9struct thread_info {
10 struct task_struct *task; /* main task structure */
11 struct exec_domain *exec_domain;/* execution domain */
12 unsigned long flags; /* thread_info flags (see TIF_*) */
13 mm_segment_t addr_limit; /* user-level address space limit */
14 __u32 cpu; /* current CPU */
15 int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */
16 struct restart_block restart_block;
17};
18
19#define INIT_THREAD_INFO(tsk) \
20{ \
21 .task = &tsk, \
22 .exec_domain = &default_exec_domain, \
23 .flags = 0, \
24 .cpu = 0, \
25 .addr_limit = KERNEL_DS, \
26 .preempt_count = 1, \
27 .restart_block = { \
28 .fn = do_no_restart_syscall \
29 } \
30}
31
32#define init_thread_info (init_thread_union.thread_info)
33#define init_stack (init_thread_union.stack)
34
35/* thread information allocation */
36
37#define THREAD_SIZE_ORDER 2
38/* Be sure to hunt all references to this down when you change the size of
39 * the kernel stack */
40#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
41#define THREAD_SHIFT (PAGE_SHIFT + THREAD_SIZE_ORDER)
42
43/* how to get the thread information struct from C */
44#define current_thread_info() ((struct thread_info *)mfctl(30))
45
46#endif /* !__ASSEMBLY */
47
48#define PREEMPT_ACTIVE_BIT 28
49#define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)
50
51/*
52 * thread information flags
53 */
54#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
55#define TIF_SIGPENDING 1 /* signal pending */
56#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
57#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling TIF_NEED_RESCHED */
58#define TIF_32BIT 4 /* 32 bit binary */
59#define TIF_MEMDIE 5
60#define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */
61
62#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
63#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
64#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
65#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
66#define _TIF_32BIT (1 << TIF_32BIT)
67#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
68
69#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | \
70 _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK)
71
72#endif /* __KERNEL__ */
73
74#endif /* _ASM_PARISC_THREAD_INFO_H */
diff --git a/include/asm-parisc/timex.h b/include/asm-parisc/timex.h
deleted file mode 100644
index 3b68d77273d9..000000000000
--- a/include/asm-parisc/timex.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-parisc/timex.h
3 *
4 * PARISC architecture timex specifications
5 */
6#ifndef _ASMPARISC_TIMEX_H
7#define _ASMPARISC_TIMEX_H
8
9#include <asm/system.h>
10
11#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
12
13typedef unsigned long cycles_t;
14
15static inline cycles_t get_cycles (void)
16{
17 return mfctl(16);
18}
19
20#endif
diff --git a/include/asm-parisc/tlb.h b/include/asm-parisc/tlb.h
deleted file mode 100644
index 383b1db310ee..000000000000
--- a/include/asm-parisc/tlb.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _PARISC_TLB_H
2#define _PARISC_TLB_H
3
4#define tlb_flush(tlb) \
5do { if ((tlb)->fullmm) \
6 flush_tlb_mm((tlb)->mm);\
7} while (0)
8
9#define tlb_start_vma(tlb, vma) \
10do { if (!(tlb)->fullmm) \
11 flush_cache_range(vma, vma->vm_start, vma->vm_end); \
12} while (0)
13
14#define tlb_end_vma(tlb, vma) \
15do { if (!(tlb)->fullmm) \
16 flush_tlb_range(vma, vma->vm_start, vma->vm_end); \
17} while (0)
18
19#define __tlb_remove_tlb_entry(tlb, pte, address) \
20 do { } while (0)
21
22#include <asm-generic/tlb.h>
23
24#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
25#define __pte_free_tlb(tlb, pte) pte_free((tlb)->mm, pte)
26
27#endif
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h
deleted file mode 100644
index b72ec66db699..000000000000
--- a/include/asm-parisc/tlbflush.h
+++ /dev/null
@@ -1,80 +0,0 @@
1#ifndef _PARISC_TLBFLUSH_H
2#define _PARISC_TLBFLUSH_H
3
4/* TLB flushing routines.... */
5
6#include <linux/mm.h>
7#include <linux/sched.h>
8#include <asm/mmu_context.h>
9
10
11/* This is for the serialisation of PxTLB broadcasts. At least on the
12 * N class systems, only one PxTLB inter processor broadcast can be
13 * active at any one time on the Merced bus. This tlb purge
14 * synchronisation is fairly lightweight and harmless so we activate
15 * it on all SMP systems not just the N class. We also need to have
16 * preemption disabled on uniprocessor machines, and spin_lock does that
17 * nicely.
18 */
19extern spinlock_t pa_tlb_lock;
20
21#define purge_tlb_start(x) spin_lock(&pa_tlb_lock)
22#define purge_tlb_end(x) spin_unlock(&pa_tlb_lock)
23
24extern void flush_tlb_all(void);
25extern void flush_tlb_all_local(void *);
26
27/*
28 * flush_tlb_mm()
29 *
30 * XXX This code is NOT valid for HP-UX compatibility processes,
31 * (although it will probably work 99% of the time). HP-UX
32 * processes are free to play with the space id's and save them
33 * over long periods of time, etc. so we have to preserve the
34 * space and just flush the entire tlb. We need to check the
35 * personality in order to do that, but the personality is not
36 * currently being set correctly.
37 *
38 * Of course, Linux processes could do the same thing, but
39 * we don't support that (and the compilers, dynamic linker,
40 * etc. do not do that).
41 */
42
43static inline void flush_tlb_mm(struct mm_struct *mm)
44{
45 BUG_ON(mm == &init_mm); /* Should never happen */
46
47#ifdef CONFIG_SMP
48 flush_tlb_all();
49#else
50 if (mm) {
51 if (mm->context != 0)
52 free_sid(mm->context);
53 mm->context = alloc_sid();
54 if (mm == current->active_mm)
55 load_context(mm->context);
56 }
57#endif
58}
59
60static inline void flush_tlb_page(struct vm_area_struct *vma,
61 unsigned long addr)
62{
63 /* For one page, it's not worth testing the split_tlb variable */
64
65 mb();
66 mtsp(vma->vm_mm->context,1);
67 purge_tlb_start();
68 pdtlb(addr);
69 pitlb(addr);
70 purge_tlb_end();
71}
72
73void __flush_tlb_range(unsigned long sid,
74 unsigned long start, unsigned long end);
75
76#define flush_tlb_range(vma,start,end) __flush_tlb_range((vma)->vm_mm->context,start,end)
77
78#define flush_tlb_kernel_range(start, end) __flush_tlb_range(0,start,end)
79
80#endif
diff --git a/include/asm-parisc/topology.h b/include/asm-parisc/topology.h
deleted file mode 100644
index d8133eb0b1e7..000000000000
--- a/include/asm-parisc/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_PARISC_TOPOLOGY_H
2#define _ASM_PARISC_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_PARISC_TOPOLOGY_H */
diff --git a/include/asm-parisc/traps.h b/include/asm-parisc/traps.h
deleted file mode 100644
index 1945f995f2df..000000000000
--- a/include/asm-parisc/traps.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef __ASM_TRAPS_H
2#define __ASM_TRAPS_H
3
4#ifdef __KERNEL__
5struct pt_regs;
6
7/* traps.c */
8void parisc_terminate(char *msg, struct pt_regs *regs,
9 int code, unsigned long offset);
10
11/* mm/fault.c */
12void do_page_fault(struct pt_regs *regs, unsigned long code,
13 unsigned long address);
14#endif
15
16#endif
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h
deleted file mode 100644
index 7f5a39bfb4ce..000000000000
--- a/include/asm-parisc/types.h
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifndef _PARISC_TYPES_H
2#define _PARISC_TYPES_H
3
4#include <asm-generic/int-ll64.h>
5
6#ifndef __ASSEMBLY__
7
8typedef unsigned short umode_t;
9
10#endif /* __ASSEMBLY__ */
11
12/*
13 * These aren't exported outside the kernel to avoid name space clashes
14 */
15#ifdef __KERNEL__
16
17#ifdef CONFIG_64BIT
18#define BITS_PER_LONG 64
19#define SHIFT_PER_LONG 6
20#else
21#define BITS_PER_LONG 32
22#define SHIFT_PER_LONG 5
23#endif
24
25#ifndef __ASSEMBLY__
26
27/* Dma addresses are 32-bits wide. */
28
29typedef u32 dma_addr_t;
30typedef u64 dma64_addr_t;
31
32#endif /* __ASSEMBLY__ */
33
34#endif /* __KERNEL__ */
35
36#endif
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h
deleted file mode 100644
index 4878b9501f24..000000000000
--- a/include/asm-parisc/uaccess.h
+++ /dev/null
@@ -1,244 +0,0 @@
1#ifndef __PARISC_UACCESS_H
2#define __PARISC_UACCESS_H
3
4/*
5 * User space memory access functions
6 */
7#include <asm/page.h>
8#include <asm/system.h>
9#include <asm/cache.h>
10#include <asm-generic/uaccess.h>
11
12#define VERIFY_READ 0
13#define VERIFY_WRITE 1
14
15#define KERNEL_DS ((mm_segment_t){0})
16#define USER_DS ((mm_segment_t){1})
17
18#define segment_eq(a,b) ((a).seg == (b).seg)
19
20#define get_ds() (KERNEL_DS)
21#define get_fs() (current_thread_info()->addr_limit)
22#define set_fs(x) (current_thread_info()->addr_limit = (x))
23
24/*
25 * Note that since kernel addresses are in a separate address space on
26 * parisc, we don't need to do anything for access_ok().
27 * We just let the page fault handler do the right thing. This also means
28 * that put_user is the same as __put_user, etc.
29 */
30
31extern int __get_kernel_bad(void);
32extern int __get_user_bad(void);
33extern int __put_kernel_bad(void);
34extern int __put_user_bad(void);
35
36static inline long access_ok(int type, const void __user * addr,
37 unsigned long size)
38{
39 return 1;
40}
41
42#define put_user __put_user
43#define get_user __get_user
44
45#if !defined(CONFIG_64BIT)
46#define LDD_KERNEL(ptr) __get_kernel_bad();
47#define LDD_USER(ptr) __get_user_bad();
48#define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr)
49#define STD_USER(x, ptr) __put_user_asm64(x,ptr)
50#define ASM_WORD_INSN ".word\t"
51#else
52#define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr)
53#define LDD_USER(ptr) __get_user_asm("ldd",ptr)
54#define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr)
55#define STD_USER(x, ptr) __put_user_asm("std",x,ptr)
56#define ASM_WORD_INSN ".dword\t"
57#endif
58
59/*
60 * The exception table contains two values: the first is an address
61 * for an instruction that is allowed to fault, and the second is
62 * the address to the fixup routine.
63 */
64
65struct exception_table_entry {
66 unsigned long insn; /* address of insn that is allowed to fault. */
67 long fixup; /* fixup routine */
68};
69
70#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr )\
71 ".section __ex_table,\"aw\"\n" \
72 ASM_WORD_INSN #fault_addr ", " #except_addr "\n\t" \
73 ".previous\n"
74
75/*
76 * The page fault handler stores, in a per-cpu area, the following information
77 * if a fixup routine is available.
78 */
79struct exception_data {
80 unsigned long fault_ip;
81 unsigned long fault_space;
82 unsigned long fault_addr;
83};
84
85#define __get_user(x,ptr) \
86({ \
87 register long __gu_err __asm__ ("r8") = 0; \
88 register long __gu_val __asm__ ("r9") = 0; \
89 \
90 if (segment_eq(get_fs(),KERNEL_DS)) { \
91 switch (sizeof(*(ptr))) { \
92 case 1: __get_kernel_asm("ldb",ptr); break; \
93 case 2: __get_kernel_asm("ldh",ptr); break; \
94 case 4: __get_kernel_asm("ldw",ptr); break; \
95 case 8: LDD_KERNEL(ptr); break; \
96 default: __get_kernel_bad(); break; \
97 } \
98 } \
99 else { \
100 switch (sizeof(*(ptr))) { \
101 case 1: __get_user_asm("ldb",ptr); break; \
102 case 2: __get_user_asm("ldh",ptr); break; \
103 case 4: __get_user_asm("ldw",ptr); break; \
104 case 8: LDD_USER(ptr); break; \
105 default: __get_user_bad(); break; \
106 } \
107 } \
108 \
109 (x) = (__typeof__(*(ptr))) __gu_val; \
110 __gu_err; \
111})
112
113#define __get_kernel_asm(ldx,ptr) \
114 __asm__("\n1:\t" ldx "\t0(%2),%0\n\t" \
115 ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_1)\
116 : "=r"(__gu_val), "=r"(__gu_err) \
117 : "r"(ptr), "1"(__gu_err) \
118 : "r1");
119
120#define __get_user_asm(ldx,ptr) \
121 __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n\t" \
122 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_get_user_skip_1)\
123 : "=r"(__gu_val), "=r"(__gu_err) \
124 : "r"(ptr), "1"(__gu_err) \
125 : "r1");
126
127#define __put_user(x,ptr) \
128({ \
129 register long __pu_err __asm__ ("r8") = 0; \
130 __typeof__(*(ptr)) __x = (__typeof__(*(ptr)))(x); \
131 \
132 if (segment_eq(get_fs(),KERNEL_DS)) { \
133 switch (sizeof(*(ptr))) { \
134 case 1: __put_kernel_asm("stb",__x,ptr); break; \
135 case 2: __put_kernel_asm("sth",__x,ptr); break; \
136 case 4: __put_kernel_asm("stw",__x,ptr); break; \
137 case 8: STD_KERNEL(__x,ptr); break; \
138 default: __put_kernel_bad(); break; \
139 } \
140 } \
141 else { \
142 switch (sizeof(*(ptr))) { \
143 case 1: __put_user_asm("stb",__x,ptr); break; \
144 case 2: __put_user_asm("sth",__x,ptr); break; \
145 case 4: __put_user_asm("stw",__x,ptr); break; \
146 case 8: STD_USER(__x,ptr); break; \
147 default: __put_user_bad(); break; \
148 } \
149 } \
150 \
151 __pu_err; \
152})
153
154/*
155 * The "__put_user/kernel_asm()" macros tell gcc they read from memory
156 * instead of writing. This is because they do not write to any memory
157 * gcc knows about, so there are no aliasing issues. These macros must
158 * also be aware that "fixup_put_user_skip_[12]" are executed in the
159 * context of the fault, and any registers used there must be listed
160 * as clobbers. In this case only "r1" is used by the current routines.
161 * r8/r9 are already listed as err/val.
162 */
163
164#define __put_kernel_asm(stx,x,ptr) \
165 __asm__ __volatile__ ( \
166 "\n1:\t" stx "\t%2,0(%1)\n\t" \
167 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\
168 : "=r"(__pu_err) \
169 : "r"(ptr), "r"(x), "0"(__pu_err) \
170 : "r1")
171
172#define __put_user_asm(stx,x,ptr) \
173 __asm__ __volatile__ ( \
174 "\n1:\t" stx "\t%2,0(%%sr3,%1)\n\t" \
175 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\
176 : "=r"(__pu_err) \
177 : "r"(ptr), "r"(x), "0"(__pu_err) \
178 : "r1")
179
180
181#if !defined(CONFIG_64BIT)
182
183#define __put_kernel_asm64(__val,ptr) do { \
184 u64 __val64 = (u64)(__val); \
185 u32 hi = (__val64) >> 32; \
186 u32 lo = (__val64) & 0xffffffff; \
187 __asm__ __volatile__ ( \
188 "\n1:\tstw %2,0(%1)" \
189 "\n2:\tstw %3,4(%1)\n\t" \
190 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\
191 ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\
192 : "=r"(__pu_err) \
193 : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \
194 : "r1"); \
195} while (0)
196
197#define __put_user_asm64(__val,ptr) do { \
198 u64 __val64 = (u64)(__val); \
199 u32 hi = (__val64) >> 32; \
200 u32 lo = (__val64) & 0xffffffff; \
201 __asm__ __volatile__ ( \
202 "\n1:\tstw %2,0(%%sr3,%1)" \
203 "\n2:\tstw %3,4(%%sr3,%1)\n\t" \
204 ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\
205 ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\
206 : "=r"(__pu_err) \
207 : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \
208 : "r1"); \
209} while (0)
210
211#endif /* !defined(CONFIG_64BIT) */
212
213
214/*
215 * Complex access routines -- external declarations
216 */
217
218extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long);
219extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long);
220extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long);
221extern long lstrncpy_from_user(char *, const char __user *, long);
222extern unsigned lclear_user(void __user *,unsigned long);
223extern long lstrnlen_user(const char __user *,long);
224
225/*
226 * Complex access routines -- macros
227 */
228
229#define strncpy_from_user lstrncpy_from_user
230#define strnlen_user lstrnlen_user
231#define strlen_user(str) lstrnlen_user(str, 0x7fffffffL)
232#define clear_user lclear_user
233#define __clear_user lclear_user
234
235unsigned long copy_to_user(void __user *dst, const void *src, unsigned long len);
236#define __copy_to_user copy_to_user
237unsigned long copy_from_user(void *dst, const void __user *src, unsigned long len);
238#define __copy_from_user copy_from_user
239unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned long len);
240#define __copy_in_user copy_in_user
241#define __copy_to_user_inatomic __copy_to_user
242#define __copy_from_user_inatomic __copy_from_user
243
244#endif /* __PARISC_UACCESS_H */
diff --git a/include/asm-parisc/ucontext.h b/include/asm-parisc/ucontext.h
deleted file mode 100644
index 6c8883e4b0bd..000000000000
--- a/include/asm-parisc/ucontext.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_PARISC_UCONTEXT_H
2#define _ASM_PARISC_UCONTEXT_H
3
4struct ucontext {
5 unsigned int uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif /* !_ASM_PARISC_UCONTEXT_H */
diff --git a/include/asm-parisc/unaligned.h b/include/asm-parisc/unaligned.h
deleted file mode 100644
index dfc5d3321a54..000000000000
--- a/include/asm-parisc/unaligned.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef _ASM_PARISC_UNALIGNED_H
2#define _ASM_PARISC_UNALIGNED_H
3
4#include <linux/unaligned/be_struct.h>
5#include <linux/unaligned/le_byteshift.h>
6#include <linux/unaligned/generic.h>
7#define get_unaligned __get_unaligned_be
8#define put_unaligned __put_unaligned_be
9
10#ifdef __KERNEL__
11struct pt_regs;
12void handle_unaligned(struct pt_regs *regs);
13int check_unaligned(struct pt_regs *regs);
14#endif
15
16#endif /* _ASM_PARISC_UNALIGNED_H */
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
deleted file mode 100644
index a7d857f0e4f4..000000000000
--- a/include/asm-parisc/unistd.h
+++ /dev/null
@@ -1,991 +0,0 @@
1#ifndef _ASM_PARISC_UNISTD_H_
2#define _ASM_PARISC_UNISTD_H_
3
4/*
5 * This file contains the system call numbers.
6 */
7
8/*
9 * HP-UX system calls get their native numbers for binary compatibility.
10 */
11
12#define __NR_HPUX_exit 1
13#define __NR_HPUX_fork 2
14#define __NR_HPUX_read 3
15#define __NR_HPUX_write 4
16#define __NR_HPUX_open 5
17#define __NR_HPUX_close 6
18#define __NR_HPUX_wait 7
19#define __NR_HPUX_creat 8
20#define __NR_HPUX_link 9
21#define __NR_HPUX_unlink 10
22#define __NR_HPUX_execv 11
23#define __NR_HPUX_chdir 12
24#define __NR_HPUX_time 13
25#define __NR_HPUX_mknod 14
26#define __NR_HPUX_chmod 15
27#define __NR_HPUX_chown 16
28#define __NR_HPUX_break 17
29#define __NR_HPUX_lchmod 18
30#define __NR_HPUX_lseek 19
31#define __NR_HPUX_getpid 20
32#define __NR_HPUX_mount 21
33#define __NR_HPUX_umount 22
34#define __NR_HPUX_setuid 23
35#define __NR_HPUX_getuid 24
36#define __NR_HPUX_stime 25
37#define __NR_HPUX_ptrace 26
38#define __NR_HPUX_alarm 27
39#define __NR_HPUX_oldfstat 28
40#define __NR_HPUX_pause 29
41#define __NR_HPUX_utime 30
42#define __NR_HPUX_stty 31
43#define __NR_HPUX_gtty 32
44#define __NR_HPUX_access 33
45#define __NR_HPUX_nice 34
46#define __NR_HPUX_ftime 35
47#define __NR_HPUX_sync 36
48#define __NR_HPUX_kill 37
49#define __NR_HPUX_stat 38
50#define __NR_HPUX_setpgrp3 39
51#define __NR_HPUX_lstat 40
52#define __NR_HPUX_dup 41
53#define __NR_HPUX_pipe 42
54#define __NR_HPUX_times 43
55#define __NR_HPUX_profil 44
56#define __NR_HPUX_ki_call 45
57#define __NR_HPUX_setgid 46
58#define __NR_HPUX_getgid 47
59#define __NR_HPUX_sigsys 48
60#define __NR_HPUX_reserved1 49
61#define __NR_HPUX_reserved2 50
62#define __NR_HPUX_acct 51
63#define __NR_HPUX_set_userthreadid 52
64#define __NR_HPUX_oldlock 53
65#define __NR_HPUX_ioctl 54
66#define __NR_HPUX_reboot 55
67#define __NR_HPUX_symlink 56
68#define __NR_HPUX_utssys 57
69#define __NR_HPUX_readlink 58
70#define __NR_HPUX_execve 59
71#define __NR_HPUX_umask 60
72#define __NR_HPUX_chroot 61
73#define __NR_HPUX_fcntl 62
74#define __NR_HPUX_ulimit 63
75#define __NR_HPUX_getpagesize 64
76#define __NR_HPUX_mremap 65
77#define __NR_HPUX_vfork 66
78#define __NR_HPUX_vread 67
79#define __NR_HPUX_vwrite 68
80#define __NR_HPUX_sbrk 69
81#define __NR_HPUX_sstk 70
82#define __NR_HPUX_mmap 71
83#define __NR_HPUX_vadvise 72
84#define __NR_HPUX_munmap 73
85#define __NR_HPUX_mprotect 74
86#define __NR_HPUX_madvise 75
87#define __NR_HPUX_vhangup 76
88#define __NR_HPUX_swapoff 77
89#define __NR_HPUX_mincore 78
90#define __NR_HPUX_getgroups 79
91#define __NR_HPUX_setgroups 80
92#define __NR_HPUX_getpgrp2 81
93#define __NR_HPUX_setpgrp2 82
94#define __NR_HPUX_setitimer 83
95#define __NR_HPUX_wait3 84
96#define __NR_HPUX_swapon 85
97#define __NR_HPUX_getitimer 86
98#define __NR_HPUX_gethostname42 87
99#define __NR_HPUX_sethostname42 88
100#define __NR_HPUX_getdtablesize 89
101#define __NR_HPUX_dup2 90
102#define __NR_HPUX_getdopt 91
103#define __NR_HPUX_fstat 92
104#define __NR_HPUX_select 93
105#define __NR_HPUX_setdopt 94
106#define __NR_HPUX_fsync 95
107#define __NR_HPUX_setpriority 96
108#define __NR_HPUX_socket_old 97
109#define __NR_HPUX_connect_old 98
110#define __NR_HPUX_accept_old 99
111#define __NR_HPUX_getpriority 100
112#define __NR_HPUX_send_old 101
113#define __NR_HPUX_recv_old 102
114#define __NR_HPUX_socketaddr_old 103
115#define __NR_HPUX_bind_old 104
116#define __NR_HPUX_setsockopt_old 105
117#define __NR_HPUX_listen_old 106
118#define __NR_HPUX_vtimes_old 107
119#define __NR_HPUX_sigvector 108
120#define __NR_HPUX_sigblock 109
121#define __NR_HPUX_siggetmask 110
122#define __NR_HPUX_sigpause 111
123#define __NR_HPUX_sigstack 112
124#define __NR_HPUX_recvmsg_old 113
125#define __NR_HPUX_sendmsg_old 114
126#define __NR_HPUX_vtrace_old 115
127#define __NR_HPUX_gettimeofday 116
128#define __NR_HPUX_getrusage 117
129#define __NR_HPUX_getsockopt_old 118
130#define __NR_HPUX_resuba_old 119
131#define __NR_HPUX_readv 120
132#define __NR_HPUX_writev 121
133#define __NR_HPUX_settimeofday 122
134#define __NR_HPUX_fchown 123
135#define __NR_HPUX_fchmod 124
136#define __NR_HPUX_recvfrom_old 125
137#define __NR_HPUX_setresuid 126
138#define __NR_HPUX_setresgid 127
139#define __NR_HPUX_rename 128
140#define __NR_HPUX_truncate 129
141#define __NR_HPUX_ftruncate 130
142#define __NR_HPUX_flock_old 131
143#define __NR_HPUX_sysconf 132
144#define __NR_HPUX_sendto_old 133
145#define __NR_HPUX_shutdown_old 134
146#define __NR_HPUX_socketpair_old 135
147#define __NR_HPUX_mkdir 136
148#define __NR_HPUX_rmdir 137
149#define __NR_HPUX_utimes_old 138
150#define __NR_HPUX_sigcleanup_old 139
151#define __NR_HPUX_setcore 140
152#define __NR_HPUX_getpeername_old 141
153#define __NR_HPUX_gethostid 142
154#define __NR_HPUX_sethostid 143
155#define __NR_HPUX_getrlimit 144
156#define __NR_HPUX_setrlimit 145
157#define __NR_HPUX_killpg_old 146
158#define __NR_HPUX_cachectl 147
159#define __NR_HPUX_quotactl 148
160#define __NR_HPUX_get_sysinfo 149
161#define __NR_HPUX_getsockname_old 150
162#define __NR_HPUX_privgrp 151
163#define __NR_HPUX_rtprio 152
164#define __NR_HPUX_plock 153
165#define __NR_HPUX_reserved3 154
166#define __NR_HPUX_lockf 155
167#define __NR_HPUX_semget 156
168#define __NR_HPUX_osemctl 157
169#define __NR_HPUX_semop 158
170#define __NR_HPUX_msgget 159
171#define __NR_HPUX_omsgctl 160
172#define __NR_HPUX_msgsnd 161
173#define __NR_HPUX_msgrecv 162
174#define __NR_HPUX_shmget 163
175#define __NR_HPUX_oshmctl 164
176#define __NR_HPUX_shmat 165
177#define __NR_HPUX_shmdt 166
178#define __NR_HPUX_m68020_advise 167
179/* [168,189] are for Discless/DUX */
180#define __NR_HPUX_csp 168
181#define __NR_HPUX_cluster 169
182#define __NR_HPUX_mkrnod 170
183#define __NR_HPUX_test 171
184#define __NR_HPUX_unsp_open 172
185#define __NR_HPUX_reserved4 173
186#define __NR_HPUX_getcontext_old 174
187#define __NR_HPUX_osetcontext 175
188#define __NR_HPUX_bigio 176
189#define __NR_HPUX_pipenode 177
190#define __NR_HPUX_lsync 178
191#define __NR_HPUX_getmachineid 179
192#define __NR_HPUX_cnodeid 180
193#define __NR_HPUX_cnodes 181
194#define __NR_HPUX_swapclients 182
195#define __NR_HPUX_rmt_process 183
196#define __NR_HPUX_dskless_stats 184
197#define __NR_HPUX_sigprocmask 185
198#define __NR_HPUX_sigpending 186
199#define __NR_HPUX_sigsuspend 187
200#define __NR_HPUX_sigaction 188
201#define __NR_HPUX_reserved5 189
202#define __NR_HPUX_nfssvc 190
203#define __NR_HPUX_getfh 191
204#define __NR_HPUX_getdomainname 192
205#define __NR_HPUX_setdomainname 193
206#define __NR_HPUX_async_daemon 194
207#define __NR_HPUX_getdirentries 195
208#define __NR_HPUX_statfs 196
209#define __NR_HPUX_fstatfs 197
210#define __NR_HPUX_vfsmount 198
211#define __NR_HPUX_reserved6 199
212#define __NR_HPUX_waitpid 200
213/* 201 - 223 missing */
214#define __NR_HPUX_sigsetreturn 224
215#define __NR_HPUX_sigsetstatemask 225
216/* 226 missing */
217#define __NR_HPUX_cs 227
218#define __NR_HPUX_cds 228
219#define __NR_HPUX_set_no_trunc 229
220#define __NR_HPUX_pathconf 230
221#define __NR_HPUX_fpathconf 231
222/* 232, 233 missing */
223#define __NR_HPUX_nfs_fcntl 234
224#define __NR_HPUX_ogetacl 235
225#define __NR_HPUX_ofgetacl 236
226#define __NR_HPUX_osetacl 237
227#define __NR_HPUX_ofsetacl 238
228#define __NR_HPUX_pstat 239
229#define __NR_HPUX_getaudid 240
230#define __NR_HPUX_setaudid 241
231#define __NR_HPUX_getaudproc 242
232#define __NR_HPUX_setaudproc 243
233#define __NR_HPUX_getevent 244
234#define __NR_HPUX_setevent 245
235#define __NR_HPUX_audwrite 246
236#define __NR_HPUX_audswitch 247
237#define __NR_HPUX_audctl 248
238#define __NR_HPUX_ogetaccess 249
239#define __NR_HPUX_fsctl 250
240/* 251 - 258 missing */
241#define __NR_HPUX_swapfs 259
242#define __NR_HPUX_fss 260
243/* 261 - 266 missing */
244#define __NR_HPUX_tsync 267
245#define __NR_HPUX_getnumfds 268
246#define __NR_HPUX_poll 269
247#define __NR_HPUX_getmsg 270
248#define __NR_HPUX_putmsg 271
249#define __NR_HPUX_fchdir 272
250#define __NR_HPUX_getmount_cnt 273
251#define __NR_HPUX_getmount_entry 274
252#define __NR_HPUX_accept 275
253#define __NR_HPUX_bind 276
254#define __NR_HPUX_connect 277
255#define __NR_HPUX_getpeername 278
256#define __NR_HPUX_getsockname 279
257#define __NR_HPUX_getsockopt 280
258#define __NR_HPUX_listen 281
259#define __NR_HPUX_recv 282
260#define __NR_HPUX_recvfrom 283
261#define __NR_HPUX_recvmsg 284
262#define __NR_HPUX_send 285
263#define __NR_HPUX_sendmsg 286
264#define __NR_HPUX_sendto 287
265#define __NR_HPUX_setsockopt 288
266#define __NR_HPUX_shutdown 289
267#define __NR_HPUX_socket 290
268#define __NR_HPUX_socketpair 291
269#define __NR_HPUX_proc_open 292
270#define __NR_HPUX_proc_close 293
271#define __NR_HPUX_proc_send 294
272#define __NR_HPUX_proc_recv 295
273#define __NR_HPUX_proc_sendrecv 296
274#define __NR_HPUX_proc_syscall 297
275/* 298 - 311 missing */
276#define __NR_HPUX_semctl 312
277#define __NR_HPUX_msgctl 313
278#define __NR_HPUX_shmctl 314
279#define __NR_HPUX_mpctl 315
280#define __NR_HPUX_exportfs 316
281#define __NR_HPUX_getpmsg 317
282#define __NR_HPUX_putpmsg 318
283/* 319 missing */
284#define __NR_HPUX_msync 320
285#define __NR_HPUX_msleep 321
286#define __NR_HPUX_mwakeup 322
287#define __NR_HPUX_msem_init 323
288#define __NR_HPUX_msem_remove 324
289#define __NR_HPUX_adjtime 325
290#define __NR_HPUX_kload 326
291#define __NR_HPUX_fattach 327
292#define __NR_HPUX_fdetach 328
293#define __NR_HPUX_serialize 329
294#define __NR_HPUX_statvfs 330
295#define __NR_HPUX_fstatvfs 331
296#define __NR_HPUX_lchown 332
297#define __NR_HPUX_getsid 333
298#define __NR_HPUX_sysfs 334
299/* 335, 336 missing */
300#define __NR_HPUX_sched_setparam 337
301#define __NR_HPUX_sched_getparam 338
302#define __NR_HPUX_sched_setscheduler 339
303#define __NR_HPUX_sched_getscheduler 340
304#define __NR_HPUX_sched_yield 341
305#define __NR_HPUX_sched_get_priority_max 342
306#define __NR_HPUX_sched_get_priority_min 343
307#define __NR_HPUX_sched_rr_get_interval 344
308#define __NR_HPUX_clock_settime 345
309#define __NR_HPUX_clock_gettime 346
310#define __NR_HPUX_clock_getres 347
311#define __NR_HPUX_timer_create 348
312#define __NR_HPUX_timer_delete 349
313#define __NR_HPUX_timer_settime 350
314#define __NR_HPUX_timer_gettime 351
315#define __NR_HPUX_timer_getoverrun 352
316#define __NR_HPUX_nanosleep 353
317#define __NR_HPUX_toolbox 354
318/* 355 missing */
319#define __NR_HPUX_getdents 356
320#define __NR_HPUX_getcontext 357
321#define __NR_HPUX_sysinfo 358
322#define __NR_HPUX_fcntl64 359
323#define __NR_HPUX_ftruncate64 360
324#define __NR_HPUX_fstat64 361
325#define __NR_HPUX_getdirentries64 362
326#define __NR_HPUX_getrlimit64 363
327#define __NR_HPUX_lockf64 364
328#define __NR_HPUX_lseek64 365
329#define __NR_HPUX_lstat64 366
330#define __NR_HPUX_mmap64 367
331#define __NR_HPUX_setrlimit64 368
332#define __NR_HPUX_stat64 369
333#define __NR_HPUX_truncate64 370
334#define __NR_HPUX_ulimit64 371
335#define __NR_HPUX_pread 372
336#define __NR_HPUX_preadv 373
337#define __NR_HPUX_pwrite 374
338#define __NR_HPUX_pwritev 375
339#define __NR_HPUX_pread64 376
340#define __NR_HPUX_preadv64 377
341#define __NR_HPUX_pwrite64 378
342#define __NR_HPUX_pwritev64 379
343#define __NR_HPUX_setcontext 380
344#define __NR_HPUX_sigaltstack 381
345#define __NR_HPUX_waitid 382
346#define __NR_HPUX_setpgrp 383
347#define __NR_HPUX_recvmsg2 384
348#define __NR_HPUX_sendmsg2 385
349#define __NR_HPUX_socket2 386
350#define __NR_HPUX_socketpair2 387
351#define __NR_HPUX_setregid 388
352#define __NR_HPUX_lwp_create 389
353#define __NR_HPUX_lwp_terminate 390
354#define __NR_HPUX_lwp_wait 391
355#define __NR_HPUX_lwp_suspend 392
356#define __NR_HPUX_lwp_resume 393
357/* 394 missing */
358#define __NR_HPUX_lwp_abort_syscall 395
359#define __NR_HPUX_lwp_info 396
360#define __NR_HPUX_lwp_kill 397
361#define __NR_HPUX_ksleep 398
362#define __NR_HPUX_kwakeup 399
363/* 400 missing */
364#define __NR_HPUX_pstat_getlwp 401
365#define __NR_HPUX_lwp_exit 402
366#define __NR_HPUX_lwp_continue 403
367#define __NR_HPUX_getacl 404
368#define __NR_HPUX_fgetacl 405
369#define __NR_HPUX_setacl 406
370#define __NR_HPUX_fsetacl 407
371#define __NR_HPUX_getaccess 408
372#define __NR_HPUX_lwp_mutex_init 409
373#define __NR_HPUX_lwp_mutex_lock_sys 410
374#define __NR_HPUX_lwp_mutex_unlock 411
375#define __NR_HPUX_lwp_cond_init 412
376#define __NR_HPUX_lwp_cond_signal 413
377#define __NR_HPUX_lwp_cond_broadcast 414
378#define __NR_HPUX_lwp_cond_wait_sys 415
379#define __NR_HPUX_lwp_getscheduler 416
380#define __NR_HPUX_lwp_setscheduler 417
381#define __NR_HPUX_lwp_getstate 418
382#define __NR_HPUX_lwp_setstate 419
383#define __NR_HPUX_lwp_detach 420
384#define __NR_HPUX_mlock 421
385#define __NR_HPUX_munlock 422
386#define __NR_HPUX_mlockall 423
387#define __NR_HPUX_munlockall 424
388#define __NR_HPUX_shm_open 425
389#define __NR_HPUX_shm_unlink 426
390#define __NR_HPUX_sigqueue 427
391#define __NR_HPUX_sigwaitinfo 428
392#define __NR_HPUX_sigtimedwait 429
393#define __NR_HPUX_sigwait 430
394#define __NR_HPUX_aio_read 431
395#define __NR_HPUX_aio_write 432
396#define __NR_HPUX_lio_listio 433
397#define __NR_HPUX_aio_error 434
398#define __NR_HPUX_aio_return 435
399#define __NR_HPUX_aio_cancel 436
400#define __NR_HPUX_aio_suspend 437
401#define __NR_HPUX_aio_fsync 438
402#define __NR_HPUX_mq_open 439
403#define __NR_HPUX_mq_close 440
404#define __NR_HPUX_mq_unlink 441
405#define __NR_HPUX_mq_send 442
406#define __NR_HPUX_mq_receive 443
407#define __NR_HPUX_mq_notify 444
408#define __NR_HPUX_mq_setattr 445
409#define __NR_HPUX_mq_getattr 446
410#define __NR_HPUX_ksem_open 447
411#define __NR_HPUX_ksem_unlink 448
412#define __NR_HPUX_ksem_close 449
413#define __NR_HPUX_ksem_post 450
414#define __NR_HPUX_ksem_wait 451
415#define __NR_HPUX_ksem_read 452
416#define __NR_HPUX_ksem_trywait 453
417#define __NR_HPUX_lwp_rwlock_init 454
418#define __NR_HPUX_lwp_rwlock_destroy 455
419#define __NR_HPUX_lwp_rwlock_rdlock_sys 456
420#define __NR_HPUX_lwp_rwlock_wrlock_sys 457
421#define __NR_HPUX_lwp_rwlock_tryrdlock 458
422#define __NR_HPUX_lwp_rwlock_trywrlock 459
423#define __NR_HPUX_lwp_rwlock_unlock 460
424#define __NR_HPUX_ttrace 461
425#define __NR_HPUX_ttrace_wait 462
426#define __NR_HPUX_lf_wire_mem 463
427#define __NR_HPUX_lf_unwire_mem 464
428#define __NR_HPUX_lf_send_pin_map 465
429#define __NR_HPUX_lf_free_buf 466
430#define __NR_HPUX_lf_wait_nq 467
431#define __NR_HPUX_lf_wakeup_conn_q 468
432#define __NR_HPUX_lf_unused 469
433#define __NR_HPUX_lwp_sema_init 470
434#define __NR_HPUX_lwp_sema_post 471
435#define __NR_HPUX_lwp_sema_wait 472
436#define __NR_HPUX_lwp_sema_trywait 473
437#define __NR_HPUX_lwp_sema_destroy 474
438#define __NR_HPUX_statvfs64 475
439#define __NR_HPUX_fstatvfs64 476
440#define __NR_HPUX_msh_register 477
441#define __NR_HPUX_ptrace64 478
442#define __NR_HPUX_sendfile 479
443#define __NR_HPUX_sendpath 480
444#define __NR_HPUX_sendfile64 481
445#define __NR_HPUX_sendpath64 482
446#define __NR_HPUX_modload 483
447#define __NR_HPUX_moduload 484
448#define __NR_HPUX_modpath 485
449#define __NR_HPUX_getksym 486
450#define __NR_HPUX_modadm 487
451#define __NR_HPUX_modstat 488
452#define __NR_HPUX_lwp_detached_exit 489
453#define __NR_HPUX_crashconf 490
454#define __NR_HPUX_siginhibit 491
455#define __NR_HPUX_sigenable 492
456#define __NR_HPUX_spuctl 493
457#define __NR_HPUX_zerokernelsum 494
458#define __NR_HPUX_nfs_kstat 495
459#define __NR_HPUX_aio_read64 496
460#define __NR_HPUX_aio_write64 497
461#define __NR_HPUX_aio_error64 498
462#define __NR_HPUX_aio_return64 499
463#define __NR_HPUX_aio_cancel64 500
464#define __NR_HPUX_aio_suspend64 501
465#define __NR_HPUX_aio_fsync64 502
466#define __NR_HPUX_lio_listio64 503
467#define __NR_HPUX_recv2 504
468#define __NR_HPUX_recvfrom2 505
469#define __NR_HPUX_send2 506
470#define __NR_HPUX_sendto2 507
471#define __NR_HPUX_acl 508
472#define __NR_HPUX___cnx_p2p_ctl 509
473#define __NR_HPUX___cnx_gsched_ctl 510
474#define __NR_HPUX___cnx_pmon_ctl 511
475
476#define __NR_HPUX_syscalls 512
477
478/*
479 * Linux system call numbers.
480 *
481 * Cary Coutant says that we should just use another syscall gateway
482 * page to avoid clashing with the HPUX space, and I think he's right:
483 * it will would keep a branch out of our syscall entry path, at the
484 * very least. If we decide to change it later, we can ``just'' tweak
485 * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
486 * 1024 or something. Oh, and recompile libc. =)
487 *
488 * 64-bit HPUX binaries get the syscall gateway address passed in a register
489 * from the kernel at startup, which seems a sane strategy.
490 */
491
492#define __NR_Linux 0
493#define __NR_restart_syscall (__NR_Linux + 0)
494#define __NR_exit (__NR_Linux + 1)
495#define __NR_fork (__NR_Linux + 2)
496#define __NR_read (__NR_Linux + 3)
497#define __NR_write (__NR_Linux + 4)
498#define __NR_open (__NR_Linux + 5)
499#define __NR_close (__NR_Linux + 6)
500#define __NR_waitpid (__NR_Linux + 7)
501#define __NR_creat (__NR_Linux + 8)
502#define __NR_link (__NR_Linux + 9)
503#define __NR_unlink (__NR_Linux + 10)
504#define __NR_execve (__NR_Linux + 11)
505#define __NR_chdir (__NR_Linux + 12)
506#define __NR_time (__NR_Linux + 13)
507#define __NR_mknod (__NR_Linux + 14)
508#define __NR_chmod (__NR_Linux + 15)
509#define __NR_lchown (__NR_Linux + 16)
510#define __NR_socket (__NR_Linux + 17)
511#define __NR_stat (__NR_Linux + 18)
512#define __NR_lseek (__NR_Linux + 19)
513#define __NR_getpid (__NR_Linux + 20)
514#define __NR_mount (__NR_Linux + 21)
515#define __NR_bind (__NR_Linux + 22)
516#define __NR_setuid (__NR_Linux + 23)
517#define __NR_getuid (__NR_Linux + 24)
518#define __NR_stime (__NR_Linux + 25)
519#define __NR_ptrace (__NR_Linux + 26)
520#define __NR_alarm (__NR_Linux + 27)
521#define __NR_fstat (__NR_Linux + 28)
522#define __NR_pause (__NR_Linux + 29)
523#define __NR_utime (__NR_Linux + 30)
524#define __NR_connect (__NR_Linux + 31)
525#define __NR_listen (__NR_Linux + 32)
526#define __NR_access (__NR_Linux + 33)
527#define __NR_nice (__NR_Linux + 34)
528#define __NR_accept (__NR_Linux + 35)
529#define __NR_sync (__NR_Linux + 36)
530#define __NR_kill (__NR_Linux + 37)
531#define __NR_rename (__NR_Linux + 38)
532#define __NR_mkdir (__NR_Linux + 39)
533#define __NR_rmdir (__NR_Linux + 40)
534#define __NR_dup (__NR_Linux + 41)
535#define __NR_pipe (__NR_Linux + 42)
536#define __NR_times (__NR_Linux + 43)
537#define __NR_getsockname (__NR_Linux + 44)
538#define __NR_brk (__NR_Linux + 45)
539#define __NR_setgid (__NR_Linux + 46)
540#define __NR_getgid (__NR_Linux + 47)
541#define __NR_signal (__NR_Linux + 48)
542#define __NR_geteuid (__NR_Linux + 49)
543#define __NR_getegid (__NR_Linux + 50)
544#define __NR_acct (__NR_Linux + 51)
545#define __NR_umount2 (__NR_Linux + 52)
546#define __NR_getpeername (__NR_Linux + 53)
547#define __NR_ioctl (__NR_Linux + 54)
548#define __NR_fcntl (__NR_Linux + 55)
549#define __NR_socketpair (__NR_Linux + 56)
550#define __NR_setpgid (__NR_Linux + 57)
551#define __NR_send (__NR_Linux + 58)
552#define __NR_uname (__NR_Linux + 59)
553#define __NR_umask (__NR_Linux + 60)
554#define __NR_chroot (__NR_Linux + 61)
555#define __NR_ustat (__NR_Linux + 62)
556#define __NR_dup2 (__NR_Linux + 63)
557#define __NR_getppid (__NR_Linux + 64)
558#define __NR_getpgrp (__NR_Linux + 65)
559#define __NR_setsid (__NR_Linux + 66)
560#define __NR_pivot_root (__NR_Linux + 67)
561#define __NR_sgetmask (__NR_Linux + 68)
562#define __NR_ssetmask (__NR_Linux + 69)
563#define __NR_setreuid (__NR_Linux + 70)
564#define __NR_setregid (__NR_Linux + 71)
565#define __NR_mincore (__NR_Linux + 72)
566#define __NR_sigpending (__NR_Linux + 73)
567#define __NR_sethostname (__NR_Linux + 74)
568#define __NR_setrlimit (__NR_Linux + 75)
569#define __NR_getrlimit (__NR_Linux + 76)
570#define __NR_getrusage (__NR_Linux + 77)
571#define __NR_gettimeofday (__NR_Linux + 78)
572#define __NR_settimeofday (__NR_Linux + 79)
573#define __NR_getgroups (__NR_Linux + 80)
574#define __NR_setgroups (__NR_Linux + 81)
575#define __NR_sendto (__NR_Linux + 82)
576#define __NR_symlink (__NR_Linux + 83)
577#define __NR_lstat (__NR_Linux + 84)
578#define __NR_readlink (__NR_Linux + 85)
579#define __NR_uselib (__NR_Linux + 86)
580#define __NR_swapon (__NR_Linux + 87)
581#define __NR_reboot (__NR_Linux + 88)
582#define __NR_mmap2 (__NR_Linux + 89)
583#define __NR_mmap (__NR_Linux + 90)
584#define __NR_munmap (__NR_Linux + 91)
585#define __NR_truncate (__NR_Linux + 92)
586#define __NR_ftruncate (__NR_Linux + 93)
587#define __NR_fchmod (__NR_Linux + 94)
588#define __NR_fchown (__NR_Linux + 95)
589#define __NR_getpriority (__NR_Linux + 96)
590#define __NR_setpriority (__NR_Linux + 97)
591#define __NR_recv (__NR_Linux + 98)
592#define __NR_statfs (__NR_Linux + 99)
593#define __NR_fstatfs (__NR_Linux + 100)
594#define __NR_stat64 (__NR_Linux + 101)
595/* #define __NR_socketcall (__NR_Linux + 102) */
596#define __NR_syslog (__NR_Linux + 103)
597#define __NR_setitimer (__NR_Linux + 104)
598#define __NR_getitimer (__NR_Linux + 105)
599#define __NR_capget (__NR_Linux + 106)
600#define __NR_capset (__NR_Linux + 107)
601#define __NR_pread64 (__NR_Linux + 108)
602#define __NR_pwrite64 (__NR_Linux + 109)
603#define __NR_getcwd (__NR_Linux + 110)
604#define __NR_vhangup (__NR_Linux + 111)
605#define __NR_fstat64 (__NR_Linux + 112)
606#define __NR_vfork (__NR_Linux + 113)
607#define __NR_wait4 (__NR_Linux + 114)
608#define __NR_swapoff (__NR_Linux + 115)
609#define __NR_sysinfo (__NR_Linux + 116)
610#define __NR_shutdown (__NR_Linux + 117)
611#define __NR_fsync (__NR_Linux + 118)
612#define __NR_madvise (__NR_Linux + 119)
613#define __NR_clone (__NR_Linux + 120)
614#define __NR_setdomainname (__NR_Linux + 121)
615#define __NR_sendfile (__NR_Linux + 122)
616#define __NR_recvfrom (__NR_Linux + 123)
617#define __NR_adjtimex (__NR_Linux + 124)
618#define __NR_mprotect (__NR_Linux + 125)
619#define __NR_sigprocmask (__NR_Linux + 126)
620#define __NR_create_module (__NR_Linux + 127)
621#define __NR_init_module (__NR_Linux + 128)
622#define __NR_delete_module (__NR_Linux + 129)
623#define __NR_get_kernel_syms (__NR_Linux + 130)
624#define __NR_quotactl (__NR_Linux + 131)
625#define __NR_getpgid (__NR_Linux + 132)
626#define __NR_fchdir (__NR_Linux + 133)
627#define __NR_bdflush (__NR_Linux + 134)
628#define __NR_sysfs (__NR_Linux + 135)
629#define __NR_personality (__NR_Linux + 136)
630#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */
631#define __NR_setfsuid (__NR_Linux + 138)
632#define __NR_setfsgid (__NR_Linux + 139)
633#define __NR__llseek (__NR_Linux + 140)
634#define __NR_getdents (__NR_Linux + 141)
635#define __NR__newselect (__NR_Linux + 142)
636#define __NR_flock (__NR_Linux + 143)
637#define __NR_msync (__NR_Linux + 144)
638#define __NR_readv (__NR_Linux + 145)
639#define __NR_writev (__NR_Linux + 146)
640#define __NR_getsid (__NR_Linux + 147)
641#define __NR_fdatasync (__NR_Linux + 148)
642#define __NR__sysctl (__NR_Linux + 149)
643#define __NR_mlock (__NR_Linux + 150)
644#define __NR_munlock (__NR_Linux + 151)
645#define __NR_mlockall (__NR_Linux + 152)
646#define __NR_munlockall (__NR_Linux + 153)
647#define __NR_sched_setparam (__NR_Linux + 154)
648#define __NR_sched_getparam (__NR_Linux + 155)
649#define __NR_sched_setscheduler (__NR_Linux + 156)
650#define __NR_sched_getscheduler (__NR_Linux + 157)
651#define __NR_sched_yield (__NR_Linux + 158)
652#define __NR_sched_get_priority_max (__NR_Linux + 159)
653#define __NR_sched_get_priority_min (__NR_Linux + 160)
654#define __NR_sched_rr_get_interval (__NR_Linux + 161)
655#define __NR_nanosleep (__NR_Linux + 162)
656#define __NR_mremap (__NR_Linux + 163)
657#define __NR_setresuid (__NR_Linux + 164)
658#define __NR_getresuid (__NR_Linux + 165)
659#define __NR_sigaltstack (__NR_Linux + 166)
660#define __NR_query_module (__NR_Linux + 167)
661#define __NR_poll (__NR_Linux + 168)
662#define __NR_nfsservctl (__NR_Linux + 169)
663#define __NR_setresgid (__NR_Linux + 170)
664#define __NR_getresgid (__NR_Linux + 171)
665#define __NR_prctl (__NR_Linux + 172)
666#define __NR_rt_sigreturn (__NR_Linux + 173)
667#define __NR_rt_sigaction (__NR_Linux + 174)
668#define __NR_rt_sigprocmask (__NR_Linux + 175)
669#define __NR_rt_sigpending (__NR_Linux + 176)
670#define __NR_rt_sigtimedwait (__NR_Linux + 177)
671#define __NR_rt_sigqueueinfo (__NR_Linux + 178)
672#define __NR_rt_sigsuspend (__NR_Linux + 179)
673#define __NR_chown (__NR_Linux + 180)
674#define __NR_setsockopt (__NR_Linux + 181)
675#define __NR_getsockopt (__NR_Linux + 182)
676#define __NR_sendmsg (__NR_Linux + 183)
677#define __NR_recvmsg (__NR_Linux + 184)
678#define __NR_semop (__NR_Linux + 185)
679#define __NR_semget (__NR_Linux + 186)
680#define __NR_semctl (__NR_Linux + 187)
681#define __NR_msgsnd (__NR_Linux + 188)
682#define __NR_msgrcv (__NR_Linux + 189)
683#define __NR_msgget (__NR_Linux + 190)
684#define __NR_msgctl (__NR_Linux + 191)
685#define __NR_shmat (__NR_Linux + 192)
686#define __NR_shmdt (__NR_Linux + 193)
687#define __NR_shmget (__NR_Linux + 194)
688#define __NR_shmctl (__NR_Linux + 195)
689
690#define __NR_getpmsg (__NR_Linux + 196) /* Somebody *wants* streams? */
691#define __NR_putpmsg (__NR_Linux + 197)
692
693#define __NR_lstat64 (__NR_Linux + 198)
694#define __NR_truncate64 (__NR_Linux + 199)
695#define __NR_ftruncate64 (__NR_Linux + 200)
696#define __NR_getdents64 (__NR_Linux + 201)
697#define __NR_fcntl64 (__NR_Linux + 202)
698#define __NR_attrctl (__NR_Linux + 203)
699#define __NR_acl_get (__NR_Linux + 204)
700#define __NR_acl_set (__NR_Linux + 205)
701#define __NR_gettid (__NR_Linux + 206)
702#define __NR_readahead (__NR_Linux + 207)
703#define __NR_tkill (__NR_Linux + 208)
704#define __NR_sendfile64 (__NR_Linux + 209)
705#define __NR_futex (__NR_Linux + 210)
706#define __NR_sched_setaffinity (__NR_Linux + 211)
707#define __NR_sched_getaffinity (__NR_Linux + 212)
708#define __NR_set_thread_area (__NR_Linux + 213)
709#define __NR_get_thread_area (__NR_Linux + 214)
710#define __NR_io_setup (__NR_Linux + 215)
711#define __NR_io_destroy (__NR_Linux + 216)
712#define __NR_io_getevents (__NR_Linux + 217)
713#define __NR_io_submit (__NR_Linux + 218)
714#define __NR_io_cancel (__NR_Linux + 219)
715#define __NR_alloc_hugepages (__NR_Linux + 220)
716#define __NR_free_hugepages (__NR_Linux + 221)
717#define __NR_exit_group (__NR_Linux + 222)
718#define __NR_lookup_dcookie (__NR_Linux + 223)
719#define __NR_epoll_create (__NR_Linux + 224)
720#define __NR_epoll_ctl (__NR_Linux + 225)
721#define __NR_epoll_wait (__NR_Linux + 226)
722#define __NR_remap_file_pages (__NR_Linux + 227)
723#define __NR_semtimedop (__NR_Linux + 228)
724#define __NR_mq_open (__NR_Linux + 229)
725#define __NR_mq_unlink (__NR_Linux + 230)
726#define __NR_mq_timedsend (__NR_Linux + 231)
727#define __NR_mq_timedreceive (__NR_Linux + 232)
728#define __NR_mq_notify (__NR_Linux + 233)
729#define __NR_mq_getsetattr (__NR_Linux + 234)
730#define __NR_waitid (__NR_Linux + 235)
731#define __NR_fadvise64_64 (__NR_Linux + 236)
732#define __NR_set_tid_address (__NR_Linux + 237)
733#define __NR_setxattr (__NR_Linux + 238)
734#define __NR_lsetxattr (__NR_Linux + 239)
735#define __NR_fsetxattr (__NR_Linux + 240)
736#define __NR_getxattr (__NR_Linux + 241)
737#define __NR_lgetxattr (__NR_Linux + 242)
738#define __NR_fgetxattr (__NR_Linux + 243)
739#define __NR_listxattr (__NR_Linux + 244)
740#define __NR_llistxattr (__NR_Linux + 245)
741#define __NR_flistxattr (__NR_Linux + 246)
742#define __NR_removexattr (__NR_Linux + 247)
743#define __NR_lremovexattr (__NR_Linux + 248)
744#define __NR_fremovexattr (__NR_Linux + 249)
745#define __NR_timer_create (__NR_Linux + 250)
746#define __NR_timer_settime (__NR_Linux + 251)
747#define __NR_timer_gettime (__NR_Linux + 252)
748#define __NR_timer_getoverrun (__NR_Linux + 253)
749#define __NR_timer_delete (__NR_Linux + 254)
750#define __NR_clock_settime (__NR_Linux + 255)
751#define __NR_clock_gettime (__NR_Linux + 256)
752#define __NR_clock_getres (__NR_Linux + 257)
753#define __NR_clock_nanosleep (__NR_Linux + 258)
754#define __NR_tgkill (__NR_Linux + 259)
755#define __NR_mbind (__NR_Linux + 260)
756#define __NR_get_mempolicy (__NR_Linux + 261)
757#define __NR_set_mempolicy (__NR_Linux + 262)
758#define __NR_vserver (__NR_Linux + 263)
759#define __NR_add_key (__NR_Linux + 264)
760#define __NR_request_key (__NR_Linux + 265)
761#define __NR_keyctl (__NR_Linux + 266)
762#define __NR_ioprio_set (__NR_Linux + 267)
763#define __NR_ioprio_get (__NR_Linux + 268)
764#define __NR_inotify_init (__NR_Linux + 269)
765#define __NR_inotify_add_watch (__NR_Linux + 270)
766#define __NR_inotify_rm_watch (__NR_Linux + 271)
767#define __NR_migrate_pages (__NR_Linux + 272)
768#define __NR_pselect6 (__NR_Linux + 273)
769#define __NR_ppoll (__NR_Linux + 274)
770#define __NR_openat (__NR_Linux + 275)
771#define __NR_mkdirat (__NR_Linux + 276)
772#define __NR_mknodat (__NR_Linux + 277)
773#define __NR_fchownat (__NR_Linux + 278)
774#define __NR_futimesat (__NR_Linux + 279)
775#define __NR_fstatat64 (__NR_Linux + 280)
776#define __NR_unlinkat (__NR_Linux + 281)
777#define __NR_renameat (__NR_Linux + 282)
778#define __NR_linkat (__NR_Linux + 283)
779#define __NR_symlinkat (__NR_Linux + 284)
780#define __NR_readlinkat (__NR_Linux + 285)
781#define __NR_fchmodat (__NR_Linux + 286)
782#define __NR_faccessat (__NR_Linux + 287)
783#define __NR_unshare (__NR_Linux + 288)
784#define __NR_set_robust_list (__NR_Linux + 289)
785#define __NR_get_robust_list (__NR_Linux + 290)
786#define __NR_splice (__NR_Linux + 291)
787#define __NR_sync_file_range (__NR_Linux + 292)
788#define __NR_tee (__NR_Linux + 293)
789#define __NR_vmsplice (__NR_Linux + 294)
790#define __NR_move_pages (__NR_Linux + 295)
791#define __NR_getcpu (__NR_Linux + 296)
792#define __NR_epoll_pwait (__NR_Linux + 297)
793#define __NR_statfs64 (__NR_Linux + 298)
794#define __NR_fstatfs64 (__NR_Linux + 299)
795#define __NR_kexec_load (__NR_Linux + 300)
796#define __NR_utimensat (__NR_Linux + 301)
797#define __NR_signalfd (__NR_Linux + 302)
798#define __NR_timerfd (__NR_Linux + 303)
799#define __NR_eventfd (__NR_Linux + 304)
800#define __NR_fallocate (__NR_Linux + 305)
801#define __NR_timerfd_create (__NR_Linux + 306)
802#define __NR_timerfd_settime (__NR_Linux + 307)
803#define __NR_timerfd_gettime (__NR_Linux + 308)
804
805#define __NR_Linux_syscalls (__NR_timerfd_gettime + 1)
806
807
808#define __IGNORE_select /* newselect */
809#define __IGNORE_fadvise64 /* fadvise64_64 */
810#define __IGNORE_utimes /* utime */
811
812
813#define HPUX_GATEWAY_ADDR 0xC0000004
814#define LINUX_GATEWAY_ADDR 0x100
815
816#ifdef __KERNEL__
817#ifndef __ASSEMBLY__
818
819#define SYS_ify(syscall_name) __NR_##syscall_name
820
821#ifndef ASM_LINE_SEP
822# define ASM_LINE_SEP ;
823#endif
824
825/* Definition taken from glibc 2.3.3
826 * sysdeps/unix/sysv/linux/hppa/sysdep.h
827 */
828
829#ifdef PIC
830/* WARNING: CANNOT BE USED IN A NOP! */
831# define K_STW_ASM_PIC " copy %%r19, %%r4\n"
832# define K_LDW_ASM_PIC " copy %%r4, %%r19\n"
833# define K_USING_GR4 "%r4",
834#else
835# define K_STW_ASM_PIC " \n"
836# define K_LDW_ASM_PIC " \n"
837# define K_USING_GR4
838#endif
839
840/* GCC has to be warned that a syscall may clobber all the ABI
841 registers listed as "caller-saves", see page 8, Table 2
842 in section 2.2.6 of the PA-RISC RUN-TIME architecture
843 document. However! r28 is the result and will conflict with
844 the clobber list so it is left out. Also the input arguments
845 registers r20 -> r26 will conflict with the list so they
846 are treated specially. Although r19 is clobbered by the syscall
847 we cannot say this because it would violate ABI, thus we say
848 r4 is clobbered and use that register to save/restore r19
849 across the syscall. */
850
851#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \
852 "%r20", "%r29", "%r31"
853
854#undef K_INLINE_SYSCALL
855#define K_INLINE_SYSCALL(name, nr, args...) ({ \
856 long __sys_res; \
857 { \
858 register unsigned long __res __asm__("r28"); \
859 K_LOAD_ARGS_##nr(args) \
860 /* FIXME: HACK stw/ldw r19 around syscall */ \
861 __asm__ volatile( \
862 K_STW_ASM_PIC \
863 " ble 0x100(%%sr2, %%r0)\n" \
864 " ldi %1, %%r20\n" \
865 K_LDW_ASM_PIC \
866 : "=r" (__res) \
867 : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \
868 : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \
869 ); \
870 __sys_res = (long)__res; \
871 } \
872 if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \
873 errno = -__sys_res; \
874 __sys_res = -1; \
875 } \
876 __sys_res; \
877})
878
879#define K_LOAD_ARGS_0()
880#define K_LOAD_ARGS_1(r26) \
881 register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
882 K_LOAD_ARGS_0()
883#define K_LOAD_ARGS_2(r26,r25) \
884 register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
885 K_LOAD_ARGS_1(r26)
886#define K_LOAD_ARGS_3(r26,r25,r24) \
887 register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
888 K_LOAD_ARGS_2(r26,r25)
889#define K_LOAD_ARGS_4(r26,r25,r24,r23) \
890 register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
891 K_LOAD_ARGS_3(r26,r25,r24)
892#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \
893 register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
894 K_LOAD_ARGS_4(r26,r25,r24,r23)
895#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
896 register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
897 K_LOAD_ARGS_5(r26,r25,r24,r23,r22)
898
899/* Even with zero args we use r20 for the syscall number */
900#define K_ASM_ARGS_0
901#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26)
902#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25)
903#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24)
904#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23)
905#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22)
906#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21)
907
908/* The registers not listed as inputs but clobbered */
909#define K_CLOB_ARGS_6
910#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21"
911#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22"
912#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23"
913#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24"
914#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25"
915#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26"
916
917#define _syscall0(type,name) \
918type name(void) \
919{ \
920 return K_INLINE_SYSCALL(name, 0); \
921}
922
923#define _syscall1(type,name,type1,arg1) \
924type name(type1 arg1) \
925{ \
926 return K_INLINE_SYSCALL(name, 1, arg1); \
927}
928
929#define _syscall2(type,name,type1,arg1,type2,arg2) \
930type name(type1 arg1, type2 arg2) \
931{ \
932 return K_INLINE_SYSCALL(name, 2, arg1, arg2); \
933}
934
935#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
936type name(type1 arg1, type2 arg2, type3 arg3) \
937{ \
938 return K_INLINE_SYSCALL(name, 3, arg1, arg2, arg3); \
939}
940
941#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
942type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
943{ \
944 return K_INLINE_SYSCALL(name, 4, arg1, arg2, arg3, arg4); \
945}
946
947/* select takes 5 arguments */
948#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
949type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
950{ \
951 return K_INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \
952}
953
954#define __ARCH_WANT_OLD_READDIR
955#define __ARCH_WANT_STAT64
956#define __ARCH_WANT_SYS_ALARM
957#define __ARCH_WANT_SYS_GETHOSTNAME
958#define __ARCH_WANT_SYS_PAUSE
959#define __ARCH_WANT_SYS_SGETMASK
960#define __ARCH_WANT_SYS_SIGNAL
961#define __ARCH_WANT_SYS_TIME
962#define __ARCH_WANT_COMPAT_SYS_TIME
963#define __ARCH_WANT_SYS_UTIME
964#define __ARCH_WANT_SYS_WAITPID
965#define __ARCH_WANT_SYS_SOCKETCALL
966#define __ARCH_WANT_SYS_FADVISE64
967#define __ARCH_WANT_SYS_GETPGRP
968#define __ARCH_WANT_SYS_LLSEEK
969#define __ARCH_WANT_SYS_NICE
970#define __ARCH_WANT_SYS_OLD_GETRLIMIT
971#define __ARCH_WANT_SYS_OLDUMOUNT
972#define __ARCH_WANT_SYS_SIGPENDING
973#define __ARCH_WANT_SYS_SIGPROCMASK
974#define __ARCH_WANT_SYS_RT_SIGACTION
975#define __ARCH_WANT_SYS_RT_SIGSUSPEND
976#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
977
978#endif /* __ASSEMBLY__ */
979
980#undef STR
981
982/*
983 * "Conditional" syscalls
984 *
985 * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
986 * but it doesn't work on all toolchains, so we just do it by hand
987 */
988#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
989
990#endif /* __KERNEL__ */
991#endif /* _ASM_PARISC_UNISTD_H_ */
diff --git a/include/asm-parisc/unwind.h b/include/asm-parisc/unwind.h
deleted file mode 100644
index 2f7e6e50a158..000000000000
--- a/include/asm-parisc/unwind.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef _UNWIND_H_
2#define _UNWIND_H_
3
4#include <linux/list.h>
5
6/* From ABI specifications */
7struct unwind_table_entry {
8 unsigned int region_start;
9 unsigned int region_end;
10 unsigned int Cannot_unwind:1; /* 0 */
11 unsigned int Millicode:1; /* 1 */
12 unsigned int Millicode_save_sr0:1; /* 2 */
13 unsigned int Region_description:2; /* 3..4 */
14 unsigned int reserved1:1; /* 5 */
15 unsigned int Entry_SR:1; /* 6 */
16 unsigned int Entry_FR:4; /* number saved *//* 7..10 */
17 unsigned int Entry_GR:5; /* number saved *//* 11..15 */
18 unsigned int Args_stored:1; /* 16 */
19 unsigned int Variable_Frame:1; /* 17 */
20 unsigned int Separate_Package_Body:1; /* 18 */
21 unsigned int Frame_Extension_Millicode:1; /* 19 */
22 unsigned int Stack_Overflow_Check:1; /* 20 */
23 unsigned int Two_Instruction_SP_Increment:1; /* 21 */
24 unsigned int Ada_Region:1; /* 22 */
25 unsigned int cxx_info:1; /* 23 */
26 unsigned int cxx_try_catch:1; /* 24 */
27 unsigned int sched_entry_seq:1; /* 25 */
28 unsigned int reserved2:1; /* 26 */
29 unsigned int Save_SP:1; /* 27 */
30 unsigned int Save_RP:1; /* 28 */
31 unsigned int Save_MRP_in_frame:1; /* 29 */
32 unsigned int extn_ptr_defined:1; /* 30 */
33 unsigned int Cleanup_defined:1; /* 31 */
34
35 unsigned int MPE_XL_interrupt_marker:1; /* 0 */
36 unsigned int HP_UX_interrupt_marker:1; /* 1 */
37 unsigned int Large_frame:1; /* 2 */
38 unsigned int Pseudo_SP_Set:1; /* 3 */
39 unsigned int reserved4:1; /* 4 */
40 unsigned int Total_frame_size:27; /* 5..31 */
41};
42
43struct unwind_table {
44 struct list_head list;
45 const char *name;
46 unsigned long gp;
47 unsigned long base_addr;
48 unsigned long start;
49 unsigned long end;
50 const struct unwind_table_entry *table;
51 unsigned long length;
52};
53
54struct unwind_frame_info {
55 struct task_struct *t;
56 /* Eventually we would like to be able to get at any of the registers
57 available; but for now we only try to get the sp and ip for each
58 frame */
59 /* struct pt_regs regs; */
60 unsigned long sp, ip, rp, r31;
61 unsigned long prev_sp, prev_ip;
62};
63
64struct unwind_table *
65unwind_table_add(const char *name, unsigned long base_addr,
66 unsigned long gp, void *start, void *end);
67void
68unwind_table_remove(struct unwind_table *table);
69
70void unwind_frame_init(struct unwind_frame_info *info, struct task_struct *t,
71 struct pt_regs *regs);
72void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info, struct task_struct *t);
73void unwind_frame_init_running(struct unwind_frame_info *info, struct pt_regs *regs);
74int unwind_once(struct unwind_frame_info *info);
75int unwind_to_user(struct unwind_frame_info *info);
76
77#endif
diff --git a/include/asm-parisc/user.h b/include/asm-parisc/user.h
deleted file mode 100644
index 80224753e508..000000000000
--- a/include/asm-parisc/user.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/* This file should not exist, but lots of generic code still includes
2 it. It's a hangover from old a.out days and the traditional core
3 dump format. We are ELF-only, and so are our core dumps. If we
4 need to support HP/UX core format then we'll do it here
5 eventually. */
diff --git a/include/asm-parisc/vga.h b/include/asm-parisc/vga.h
deleted file mode 100644
index 171399a88ca6..000000000000
--- a/include/asm-parisc/vga.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_PARISC_VGA_H__
2#define __ASM_PARISC_VGA_H__
3
4/* nothing */
5
6#endif /* __ASM_PARISC_VGA_H__ */
diff --git a/include/asm-parisc/xor.h b/include/asm-parisc/xor.h
deleted file mode 100644
index c82eb12a5b18..000000000000
--- a/include/asm-parisc/xor.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/xor.h>
diff --git a/include/asm-um/a.out-core.h b/include/asm-um/a.out-core.h
deleted file mode 100644
index 995643b18309..000000000000
--- a/include/asm-um/a.out-core.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/* a.out coredump register dumper
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef __UM_A_OUT_CORE_H
13#define __UM_A_OUT_CORE_H
14
15#ifdef __KERNEL__
16
17#include <linux/user.h>
18
19/*
20 * fill in the user structure for an a.out core dump
21 */
22static inline void aout_dump_thread(struct pt_regs *regs, struct user *u)
23{
24}
25
26#endif /* __KERNEL__ */
27#endif /* __UM_A_OUT_CORE_H */
diff --git a/include/asm-um/a.out.h b/include/asm-um/a.out.h
deleted file mode 100644
index 754181ee8683..000000000000
--- a/include/asm-um/a.out.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_A_OUT_H
7#define __UM_A_OUT_H
8
9#include "asm/arch/a.out.h"
10
11#endif
diff --git a/include/asm-um/alternative-asm.h b/include/asm-um/alternative-asm.h
deleted file mode 100644
index 9aa9fa2402a4..000000000000
--- a/include/asm-um/alternative-asm.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_ALTERNATIVE_ASM_I
2#define __UM_ALTERNATIVE_ASM_I
3
4#include "asm/arch/alternative-asm.h"
5
6#endif
diff --git a/include/asm-um/alternative.h b/include/asm-um/alternative.h
deleted file mode 100644
index b6434396bd42..000000000000
--- a/include/asm-um/alternative.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_ALTERNATIVE_H
2#define __UM_ALTERNATIVE_H
3
4#include "asm/arch/alternative.h"
5
6#endif
diff --git a/include/asm-um/apic.h b/include/asm-um/apic.h
deleted file mode 100644
index 876dee84ab11..000000000000
--- a/include/asm-um/apic.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __UM_APIC_H
2#define __UM_APIC_H
3
4#endif
diff --git a/include/asm-um/archparam-i386.h b/include/asm-um/archparam-i386.h
deleted file mode 100644
index 49e89b8d7e58..000000000000
--- a/include/asm-um/archparam-i386.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_ARCHPARAM_I386_H
7#define __UM_ARCHPARAM_I386_H
8
9/********* Nothing for asm-um/hardirq.h **********/
10
11/********* Nothing for asm-um/hw_irq.h **********/
12
13/********* Nothing for asm-um/string.h **********/
14
15#endif
16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/include/asm-um/archparam-ppc.h b/include/asm-um/archparam-ppc.h
deleted file mode 100644
index 4269d8a37b4f..000000000000
--- a/include/asm-um/archparam-ppc.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef __UM_ARCHPARAM_PPC_H
2#define __UM_ARCHPARAM_PPC_H
3
4/********* Bits for asm-um/string.h **********/
5
6#define __HAVE_ARCH_STRRCHR
7
8#endif
diff --git a/include/asm-um/archparam-x86_64.h b/include/asm-um/archparam-x86_64.h
deleted file mode 100644
index 270ed9586b68..000000000000
--- a/include/asm-um/archparam-x86_64.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_ARCHPARAM_X86_64_H
8#define __UM_ARCHPARAM_X86_64_H
9
10
11/* No user-accessible fixmap addresses, i.e. vsyscall */
12#define FIXADDR_USER_START 0
13#define FIXADDR_USER_END 0
14
15#endif
16
17/*
18 * Overrides for Emacs so that we follow Linus's tabbing style.
19 * Emacs will notice this stuff at the end of the file and automatically
20 * adjust the settings for this buffer only. This must remain at the end
21 * of the file.
22 * ---------------------------------------------------------------------------
23 * Local variables:
24 * c-file-style: "linux"
25 * End:
26 */
diff --git a/include/asm-um/asm.h b/include/asm-um/asm.h
deleted file mode 100644
index af1269a1e9eb..000000000000
--- a/include/asm-um/asm.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_ASM_H
2#define __UM_ASM_H
3
4#include "asm/arch/asm.h"
5
6#endif
diff --git a/include/asm-um/atomic.h b/include/asm-um/atomic.h
deleted file mode 100644
index b683f1034d1e..000000000000
--- a/include/asm-um/atomic.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __UM_ATOMIC_H
2#define __UM_ATOMIC_H
3
4/* The i386 atomic.h calls printk, but doesn't include kernel.h, so we
5 * include it here.
6 */
7#include "linux/kernel.h"
8
9#include "asm/arch/atomic.h"
10
11#endif
diff --git a/include/asm-um/auxvec.h b/include/asm-um/auxvec.h
deleted file mode 100644
index 1e5e1c2fc9b1..000000000000
--- a/include/asm-um/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __UM_AUXVEC_H
2#define __UM_AUXVEC_H
3
4#endif
diff --git a/include/asm-um/bitops.h b/include/asm-um/bitops.h
deleted file mode 100644
index e4d38d437b97..000000000000
--- a/include/asm-um/bitops.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __UM_BITOPS_H
2#define __UM_BITOPS_H
3
4#ifndef _LINUX_BITOPS_H
5#error only <linux/bitops.h> can be included directly
6#endif
7
8#include "asm/arch/bitops.h"
9
10#endif
diff --git a/include/asm-um/boot.h b/include/asm-um/boot.h
deleted file mode 100644
index 09548c3e784e..000000000000
--- a/include/asm-um/boot.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_BOOT_H
2#define __UM_BOOT_H
3
4#include "asm/arch/boot.h"
5
6#endif
diff --git a/include/asm-um/bug.h b/include/asm-um/bug.h
deleted file mode 100644
index 9e33b864c359..000000000000
--- a/include/asm-um/bug.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_BUG_H
2#define __UM_BUG_H
3
4#include <asm-generic/bug.h>
5
6#endif
diff --git a/include/asm-um/bugs.h b/include/asm-um/bugs.h
deleted file mode 100644
index 6a72e240d5fc..000000000000
--- a/include/asm-um/bugs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_BUGS_H
2#define __UM_BUGS_H
3
4void check_bugs(void);
5
6#endif
diff --git a/include/asm-um/byteorder.h b/include/asm-um/byteorder.h
deleted file mode 100644
index eee0a834f447..000000000000
--- a/include/asm-um/byteorder.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_BYTEORDER_H
2#define __UM_BYTEORDER_H
3
4#include "asm/arch/byteorder.h"
5
6#endif
diff --git a/include/asm-um/cache.h b/include/asm-um/cache.h
deleted file mode 100644
index 19e1bdd67416..000000000000
--- a/include/asm-um/cache.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef __UM_CACHE_H
2#define __UM_CACHE_H
3
4
5#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
6# define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
7#elif defined(CONFIG_UML_X86) /* 64-bit */
8# define L1_CACHE_SHIFT 6 /* Should be 7 on Intel */
9#else
10/* XXX: this was taken from x86, now it's completely random. Luckily only
11 * affects SMP padding. */
12# define L1_CACHE_SHIFT 5
13#endif
14
15#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
16
17#endif
diff --git a/include/asm-um/cacheflush.h b/include/asm-um/cacheflush.h
deleted file mode 100644
index 12e9d4b74c8f..000000000000
--- a/include/asm-um/cacheflush.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_CACHEFLUSH_H
2#define __UM_CACHEFLUSH_H
3
4#include "asm/arch/cacheflush.h"
5
6#endif
diff --git a/include/asm-um/calling.h b/include/asm-um/calling.h
deleted file mode 100644
index 0b2384cc99fd..000000000000
--- a/include/asm-um/calling.h
+++ /dev/null
@@ -1,9 +0,0 @@
1# Copyright 2003 - 2004 Pathscale, Inc
2# Released under the GPL
3
4#ifndef __UM_CALLING_H /* XXX x86_64 */
5#define __UM_CALLING_H
6
7#include "asm/arch/calling.h"
8
9#endif
diff --git a/include/asm-um/checksum.h b/include/asm-um/checksum.h
deleted file mode 100644
index 5b501361e361..000000000000
--- a/include/asm-um/checksum.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_CHECKSUM_H
2#define __UM_CHECKSUM_H
3
4#include "sysdep/checksum.h"
5
6#endif
diff --git a/include/asm-um/cmpxchg.h b/include/asm-um/cmpxchg.h
deleted file mode 100644
index 529376a99885..000000000000
--- a/include/asm-um/cmpxchg.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_CMPXCHG_H
2#define __UM_CMPXCHG_H
3
4#include "asm/arch/cmpxchg.h"
5
6#endif
diff --git a/include/asm-um/cobalt.h b/include/asm-um/cobalt.h
deleted file mode 100644
index f813a684be98..000000000000
--- a/include/asm-um/cobalt.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_COBALT_H
2#define __UM_COBALT_H
3
4#include "asm/arch/cobalt.h"
5
6#endif
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S
deleted file mode 100644
index cb0248616d49..000000000000
--- a/include/asm-um/common.lds.S
+++ /dev/null
@@ -1,130 +0,0 @@
1#include <asm-generic/vmlinux.lds.h>
2
3 .fini : { *(.fini) } =0x9090
4 _etext = .;
5 PROVIDE (etext = .);
6
7 . = ALIGN(4096);
8 _sdata = .;
9 PROVIDE (sdata = .);
10
11 RODATA
12
13 .unprotected : { *(.unprotected) }
14 . = ALIGN(4096);
15 PROVIDE (_unprotected_end = .);
16
17 . = ALIGN(4096);
18 .note : { *(.note.*) }
19 __ex_table : {
20 __start___ex_table = .;
21 *(__ex_table)
22 __stop___ex_table = .;
23 }
24
25 BUG_TABLE
26
27 .uml.setup.init : {
28 __uml_setup_start = .;
29 *(.uml.setup.init)
30 __uml_setup_end = .;
31 }
32
33 .uml.help.init : {
34 __uml_help_start = .;
35 *(.uml.help.init)
36 __uml_help_end = .;
37 }
38
39 .uml.postsetup.init : {
40 __uml_postsetup_start = .;
41 *(.uml.postsetup.init)
42 __uml_postsetup_end = .;
43 }
44
45 .init.setup : {
46 __setup_start = .;
47 *(.init.setup)
48 __setup_end = .;
49 }
50
51 . = ALIGN(32);
52 .data.percpu : {
53 __per_cpu_start = . ;
54 *(.data.percpu)
55 __per_cpu_end = . ;
56 }
57
58 .initcall.init : {
59 __initcall_start = .;
60 INITCALLS
61 __initcall_end = .;
62 }
63
64 .con_initcall.init : {
65 __con_initcall_start = .;
66 *(.con_initcall.init)
67 __con_initcall_end = .;
68 }
69
70 .uml.initcall.init : {
71 __uml_initcall_start = .;
72 *(.uml.initcall.init)
73 __uml_initcall_end = .;
74 }
75 __init_end = .;
76
77 SECURITY_INIT
78
79 .exitcall : {
80 __exitcall_begin = .;
81 *(.exitcall.exit)
82 __exitcall_end = .;
83 }
84
85 .uml.exitcall : {
86 __uml_exitcall_begin = .;
87 *(.uml.exitcall.exit)
88 __uml_exitcall_end = .;
89 }
90
91 . = ALIGN(4);
92 .altinstructions : {
93 __alt_instructions = .;
94 *(.altinstructions)
95 __alt_instructions_end = .;
96 }
97 .altinstr_replacement : { *(.altinstr_replacement) }
98 /* .exit.text is discard at runtime, not link time, to deal with references
99 from .altinstructions and .eh_frame */
100 .exit.text : { *(.exit.text) }
101 .exit.data : { *(.exit.data) }
102
103 .preinit_array : {
104 __preinit_array_start = .;
105 *(.preinit_array)
106 __preinit_array_end = .;
107 }
108 .init_array : {
109 __init_array_start = .;
110 *(.init_array)
111 __init_array_end = .;
112 }
113 .fini_array : {
114 __fini_array_start = .;
115 *(.fini_array)
116 __fini_array_end = .;
117 }
118
119 . = ALIGN(4096);
120 .init.ramfs : {
121 __initramfs_start = .;
122 *(.init.ramfs)
123 __initramfs_end = .;
124 }
125
126 /* Sections to be discarded */
127 /DISCARD/ : {
128 *(.exitcall.exit)
129 }
130
diff --git a/include/asm-um/cpufeature.h b/include/asm-um/cpufeature.h
deleted file mode 100644
index fb7bd42a4d96..000000000000
--- a/include/asm-um/cpufeature.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_CPUFEATURE_H
2#define __UM_CPUFEATURE_H
3
4#include "asm/arch/cpufeature.h"
5
6#endif
diff --git a/include/asm-um/cputime.h b/include/asm-um/cputime.h
deleted file mode 100644
index c84acbadfa2f..000000000000
--- a/include/asm-um/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_CPUTIME_H
2#define __UM_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __UM_CPUTIME_H */
diff --git a/include/asm-um/current.h b/include/asm-um/current.h
deleted file mode 100644
index c2191d9aa03d..000000000000
--- a/include/asm-um/current.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_CURRENT_H
7#define __UM_CURRENT_H
8
9#include "linux/thread_info.h"
10
11#define current (current_thread_info()->task)
12
13#endif
diff --git a/include/asm-um/delay.h b/include/asm-um/delay.h
deleted file mode 100644
index c71e32b6741e..000000000000
--- a/include/asm-um/delay.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef __UM_DELAY_H
2#define __UM_DELAY_H
3
4#define MILLION 1000000
5
6/* Undefined on purpose */
7extern void __bad_udelay(void);
8
9extern void __udelay(unsigned long usecs);
10extern void __delay(unsigned long loops);
11
12#define udelay(n) ((__builtin_constant_p(n) && (n) > 20000) ? \
13 __bad_udelay() : __udelay(n))
14
15/* It appears that ndelay is not used at all for UML, and has never been
16 * implemented. */
17extern void __unimplemented_ndelay(void);
18#define ndelay(n) __unimplemented_ndelay()
19
20#endif
diff --git a/include/asm-um/desc.h b/include/asm-um/desc.h
deleted file mode 100644
index 4ec34a51b62c..000000000000
--- a/include/asm-um/desc.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef __UM_DESC_H
2#define __UM_DESC_H
3
4/* Taken from asm-i386/desc.h, it's the only thing we need. The rest wouldn't
5 * compile, and has never been used. */
6#define LDT_empty(info) (\
7 (info)->base_addr == 0 && \
8 (info)->limit == 0 && \
9 (info)->contents == 0 && \
10 (info)->read_exec_only == 1 && \
11 (info)->seg_32bit == 0 && \
12 (info)->limit_in_pages == 0 && \
13 (info)->seg_not_present == 1 && \
14 (info)->useable == 0 )
15
16#endif
diff --git a/include/asm-um/device.h b/include/asm-um/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-um/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-um/div64.h b/include/asm-um/div64.h
deleted file mode 100644
index 1e17f7409cab..000000000000
--- a/include/asm-um/div64.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _UM_DIV64_H
2#define _UM_DIV64_H
3
4#include "asm/arch/div64.h"
5
6#endif
diff --git a/include/asm-um/dma-mapping.h b/include/asm-um/dma-mapping.h
deleted file mode 100644
index 90fc708b320e..000000000000
--- a/include/asm-um/dma-mapping.h
+++ /dev/null
@@ -1,128 +0,0 @@
1#ifndef _ASM_DMA_MAPPING_H
2#define _ASM_DMA_MAPPING_H
3
4#include <asm/scatterlist.h>
5
6static inline int
7dma_supported(struct device *dev, u64 mask)
8{
9 BUG();
10 return(0);
11}
12
13static inline int
14dma_set_mask(struct device *dev, u64 dma_mask)
15{
16 BUG();
17 return(0);
18}
19
20static inline void *
21dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
22 gfp_t flag)
23{
24 BUG();
25 return((void *) 0);
26}
27
28static inline void
29dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
30 dma_addr_t dma_handle)
31{
32 BUG();
33}
34
35static inline dma_addr_t
36dma_map_single(struct device *dev, void *cpu_addr, size_t size,
37 enum dma_data_direction direction)
38{
39 BUG();
40 return(0);
41}
42
43static inline void
44dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
45 enum dma_data_direction direction)
46{
47 BUG();
48}
49
50static inline dma_addr_t
51dma_map_page(struct device *dev, struct page *page,
52 unsigned long offset, size_t size,
53 enum dma_data_direction direction)
54{
55 BUG();
56 return(0);
57}
58
59static inline void
60dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
61 enum dma_data_direction direction)
62{
63 BUG();
64}
65
66static inline int
67dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
68 enum dma_data_direction direction)
69{
70 BUG();
71 return(0);
72}
73
74static inline void
75dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
76 enum dma_data_direction direction)
77{
78 BUG();
79}
80
81static inline void
82dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
83 enum dma_data_direction direction)
84{
85 BUG();
86}
87
88static inline void
89dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems,
90 enum dma_data_direction direction)
91{
92 BUG();
93}
94
95#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
96#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
97#define dma_is_consistent(d, h) (1)
98
99static inline int
100dma_get_cache_alignment(void)
101{
102 BUG();
103 return(0);
104}
105
106static inline void
107dma_sync_single_range(struct device *dev, dma_addr_t dma_handle,
108 unsigned long offset, size_t size,
109 enum dma_data_direction direction)
110{
111 BUG();
112}
113
114static inline void
115dma_cache_sync(struct device *dev, void *vaddr, size_t size,
116 enum dma_data_direction direction)
117{
118 BUG();
119}
120
121static inline int
122dma_mapping_error(struct device *dev, dma_addr_t dma_handle)
123{
124 BUG();
125 return 0;
126}
127
128#endif
diff --git a/include/asm-um/dma.h b/include/asm-um/dma.h
deleted file mode 100644
index 9f6139a8a525..000000000000
--- a/include/asm-um/dma.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __UM_DMA_H
2#define __UM_DMA_H
3
4#include "asm/io.h"
5
6extern unsigned long uml_physmem;
7
8#define MAX_DMA_ADDRESS (uml_physmem)
9
10#endif
diff --git a/include/asm-um/dwarf2.h b/include/asm-um/dwarf2.h
deleted file mode 100644
index d1a02e762931..000000000000
--- a/include/asm-um/dwarf2.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/* Copyright 2003 - 2004 Pathscale, Inc
2 * Released under the GPL
3 */
4
5/* Needed on x86_64 by thunk.S */
6#ifndef __UM_DWARF2_H
7#define __UM_DWARF2_H
8
9#include "asm/arch/dwarf2.h"
10
11#endif
diff --git a/include/asm-um/elf-i386.h b/include/asm-um/elf-i386.h
deleted file mode 100644
index 23d6893e8617..000000000000
--- a/include/asm-um/elf-i386.h
+++ /dev/null
@@ -1,163 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5#ifndef __UM_ELF_I386_H
6#define __UM_ELF_I386_H
7
8#include <asm/user.h>
9#include "skas.h"
10
11#define R_386_NONE 0
12#define R_386_32 1
13#define R_386_PC32 2
14#define R_386_GOT32 3
15#define R_386_PLT32 4
16#define R_386_COPY 5
17#define R_386_GLOB_DAT 6
18#define R_386_JMP_SLOT 7
19#define R_386_RELATIVE 8
20#define R_386_GOTOFF 9
21#define R_386_GOTPC 10
22#define R_386_NUM 11
23
24typedef unsigned long elf_greg_t;
25
26#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
27typedef elf_greg_t elf_gregset_t[ELF_NGREG];
28
29typedef struct user_i387_struct elf_fpregset_t;
30
31/*
32 * This is used to ensure we don't load something for the wrong architecture.
33 */
34#define elf_check_arch(x) \
35 (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
36
37#define ELF_CLASS ELFCLASS32
38#define ELF_DATA ELFDATA2LSB
39#define ELF_ARCH EM_386
40
41#define ELF_PLAT_INIT(regs, load_addr) do { \
42 PT_REGS_EBX(regs) = 0; \
43 PT_REGS_ECX(regs) = 0; \
44 PT_REGS_EDX(regs) = 0; \
45 PT_REGS_ESI(regs) = 0; \
46 PT_REGS_EDI(regs) = 0; \
47 PT_REGS_EBP(regs) = 0; \
48 PT_REGS_EAX(regs) = 0; \
49} while (0)
50
51#define USE_ELF_CORE_DUMP
52#define ELF_EXEC_PAGESIZE 4096
53
54#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
55
56/* Shamelessly stolen from include/asm-i386/elf.h */
57
58#define ELF_CORE_COPY_REGS(pr_reg, regs) do { \
59 pr_reg[0] = PT_REGS_EBX(regs); \
60 pr_reg[1] = PT_REGS_ECX(regs); \
61 pr_reg[2] = PT_REGS_EDX(regs); \
62 pr_reg[3] = PT_REGS_ESI(regs); \
63 pr_reg[4] = PT_REGS_EDI(regs); \
64 pr_reg[5] = PT_REGS_EBP(regs); \
65 pr_reg[6] = PT_REGS_EAX(regs); \
66 pr_reg[7] = PT_REGS_DS(regs); \
67 pr_reg[8] = PT_REGS_ES(regs); \
68 /* fake once used fs and gs selectors? */ \
69 pr_reg[9] = PT_REGS_DS(regs); \
70 pr_reg[10] = PT_REGS_DS(regs); \
71 pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \
72 pr_reg[12] = PT_REGS_IP(regs); \
73 pr_reg[13] = PT_REGS_CS(regs); \
74 pr_reg[14] = PT_REGS_EFLAGS(regs); \
75 pr_reg[15] = PT_REGS_SP(regs); \
76 pr_reg[16] = PT_REGS_SS(regs); \
77} while (0);
78
79extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
80
81#define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu)
82
83extern long elf_aux_hwcap;
84#define ELF_HWCAP (elf_aux_hwcap)
85
86extern char * elf_aux_platform;
87#define ELF_PLATFORM (elf_aux_platform)
88
89#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
90
91extern unsigned long vsyscall_ehdr;
92extern unsigned long vsyscall_end;
93extern unsigned long __kernel_vsyscall;
94
95#define VSYSCALL_BASE vsyscall_ehdr
96#define VSYSCALL_END vsyscall_end
97
98/*
99 * This is the range that is readable by user mode, and things
100 * acting like user mode such as get_user_pages.
101 */
102#define FIXADDR_USER_START VSYSCALL_BASE
103#define FIXADDR_USER_END VSYSCALL_END
104
105/*
106 * Architecture-neutral AT_ values in 0-17, leave some room
107 * for more of them, start the x86-specific ones at 32.
108 */
109#define AT_SYSINFO 32
110#define AT_SYSINFO_EHDR 33
111
112#define ARCH_DLINFO \
113do { \
114 if ( vsyscall_ehdr ) { \
115 NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \
116 NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \
117 } \
118} while (0)
119
120/*
121 * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
122 * extra segments containing the vsyscall DSO contents. Dumping its
123 * contents makes post-mortem fully interpretable later without matching up
124 * the same kernel and hardware config to see what PC values meant.
125 * Dumping its extra ELF program headers includes all the other information
126 * a debugger needs to easily find how the vsyscall DSO was being used.
127 */
128#define ELF_CORE_EXTRA_PHDRS \
129 (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 )
130
131#define ELF_CORE_WRITE_EXTRA_PHDRS \
132if ( vsyscall_ehdr ) { \
133 const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \
134 const struct elf_phdr *const phdrp = \
135 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \
136 int i; \
137 Elf32_Off ofs = 0; \
138 for (i = 0; i < ehdrp->e_phnum; ++i) { \
139 struct elf_phdr phdr = phdrp[i]; \
140 if (phdr.p_type == PT_LOAD) { \
141 ofs = phdr.p_offset = offset; \
142 offset += phdr.p_filesz; \
143 } \
144 else \
145 phdr.p_offset += ofs; \
146 phdr.p_paddr = 0; /* match other core phdrs */ \
147 DUMP_WRITE(&phdr, sizeof(phdr)); \
148 } \
149}
150#define ELF_CORE_WRITE_EXTRA_DATA \
151if ( vsyscall_ehdr ) { \
152 const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \
153 const struct elf_phdr *const phdrp = \
154 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \
155 int i; \
156 for (i = 0; i < ehdrp->e_phnum; ++i) { \
157 if (phdrp[i].p_type == PT_LOAD) \
158 DUMP_WRITE((void *) phdrp[i].p_vaddr, \
159 phdrp[i].p_filesz); \
160 } \
161}
162
163#endif
diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h
deleted file mode 100644
index d3b90b7ac3e9..000000000000
--- a/include/asm-um/elf-ppc.h
+++ /dev/null
@@ -1,53 +0,0 @@
1#ifndef __UM_ELF_PPC_H
2#define __UM_ELF_PPC_H
3
4
5extern long elf_aux_hwcap;
6#define ELF_HWCAP (elf_aux_hwcap)
7
8#define SET_PERSONALITY(ex, ibcs2) do ; while(0)
9
10#define ELF_EXEC_PAGESIZE 4096
11
12#define elf_check_arch(x) (1)
13
14#ifdef CONFIG_64BIT
15#define ELF_CLASS ELFCLASS64
16#else
17#define ELF_CLASS ELFCLASS32
18#endif
19
20#define USE_ELF_CORE_DUMP
21
22#define R_386_NONE 0
23#define R_386_32 1
24#define R_386_PC32 2
25#define R_386_GOT32 3
26#define R_386_PLT32 4
27#define R_386_COPY 5
28#define R_386_GLOB_DAT 6
29#define R_386_JMP_SLOT 7
30#define R_386_RELATIVE 8
31#define R_386_GOTOFF 9
32#define R_386_GOTPC 10
33#define R_386_NUM 11
34
35#define ELF_PLATFORM (0)
36
37#define ELF_ET_DYN_BASE (0x08000000)
38
39/* the following stolen from asm-ppc/elf.h */
40#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */
41#define ELF_NFPREG 33 /* includes fpscr */
42/* General registers */
43typedef unsigned long elf_greg_t;
44typedef elf_greg_t elf_gregset_t[ELF_NGREG];
45
46/* Floating point registers */
47typedef double elf_fpreg_t;
48typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
49
50#define ELF_DATA ELFDATA2MSB
51#define ELF_ARCH EM_PPC
52
53#endif
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h
deleted file mode 100644
index 3b2d5224a7e1..000000000000
--- a/include/asm-um/elf-x86_64.h
+++ /dev/null
@@ -1,119 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 *
5 * Licensed under the GPL
6 */
7#ifndef __UM_ELF_X86_64_H
8#define __UM_ELF_X86_64_H
9
10#include <asm/user.h>
11#include "skas.h"
12
13/* x86-64 relocation types, taken from asm-x86_64/elf.h */
14#define R_X86_64_NONE 0 /* No reloc */
15#define R_X86_64_64 1 /* Direct 64 bit */
16#define R_X86_64_PC32 2 /* PC relative 32 bit signed */
17#define R_X86_64_GOT32 3 /* 32 bit GOT entry */
18#define R_X86_64_PLT32 4 /* 32 bit PLT address */
19#define R_X86_64_COPY 5 /* Copy symbol at runtime */
20#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
21#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */
22#define R_X86_64_RELATIVE 8 /* Adjust by program base */
23#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative
24 offset to GOT */
25#define R_X86_64_32 10 /* Direct 32 bit zero extended */
26#define R_X86_64_32S 11 /* Direct 32 bit sign extended */
27#define R_X86_64_16 12 /* Direct 16 bit zero extended */
28#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
29#define R_X86_64_8 14 /* Direct 8 bit sign extended */
30#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
31
32#define R_X86_64_NUM 16
33
34typedef unsigned long elf_greg_t;
35
36#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
37typedef elf_greg_t elf_gregset_t[ELF_NGREG];
38
39typedef struct user_i387_struct elf_fpregset_t;
40
41/*
42 * This is used to ensure we don't load something for the wrong architecture.
43 */
44#define elf_check_arch(x) \
45 ((x)->e_machine == EM_X86_64)
46
47#define ELF_CLASS ELFCLASS64
48#define ELF_DATA ELFDATA2LSB
49#define ELF_ARCH EM_X86_64
50
51#define ELF_PLAT_INIT(regs, load_addr) do { \
52 PT_REGS_RBX(regs) = 0; \
53 PT_REGS_RCX(regs) = 0; \
54 PT_REGS_RDX(regs) = 0; \
55 PT_REGS_RSI(regs) = 0; \
56 PT_REGS_RDI(regs) = 0; \
57 PT_REGS_RBP(regs) = 0; \
58 PT_REGS_RAX(regs) = 0; \
59 PT_REGS_R8(regs) = 0; \
60 PT_REGS_R9(regs) = 0; \
61 PT_REGS_R10(regs) = 0; \
62 PT_REGS_R11(regs) = 0; \
63 PT_REGS_R12(regs) = 0; \
64 PT_REGS_R13(regs) = 0; \
65 PT_REGS_R14(regs) = 0; \
66 PT_REGS_R15(regs) = 0; \
67} while (0)
68
69#define ELF_CORE_COPY_REGS(pr_reg, regs) \
70 (pr_reg)[0] = (regs)->regs.gp[0]; \
71 (pr_reg)[1] = (regs)->regs.gp[1]; \
72 (pr_reg)[2] = (regs)->regs.gp[2]; \
73 (pr_reg)[3] = (regs)->regs.gp[3]; \
74 (pr_reg)[4] = (regs)->regs.gp[4]; \
75 (pr_reg)[5] = (regs)->regs.gp[5]; \
76 (pr_reg)[6] = (regs)->regs.gp[6]; \
77 (pr_reg)[7] = (regs)->regs.gp[7]; \
78 (pr_reg)[8] = (regs)->regs.gp[8]; \
79 (pr_reg)[9] = (regs)->regs.gp[9]; \
80 (pr_reg)[10] = (regs)->regs.gp[10]; \
81 (pr_reg)[11] = (regs)->regs.gp[11]; \
82 (pr_reg)[12] = (regs)->regs.gp[12]; \
83 (pr_reg)[13] = (regs)->regs.gp[13]; \
84 (pr_reg)[14] = (regs)->regs.gp[14]; \
85 (pr_reg)[15] = (regs)->regs.gp[15]; \
86 (pr_reg)[16] = (regs)->regs.gp[16]; \
87 (pr_reg)[17] = (regs)->regs.gp[17]; \
88 (pr_reg)[18] = (regs)->regs.gp[18]; \
89 (pr_reg)[19] = (regs)->regs.gp[19]; \
90 (pr_reg)[20] = (regs)->regs.gp[20]; \
91 (pr_reg)[21] = current->thread.arch.fs; \
92 (pr_reg)[22] = 0; \
93 (pr_reg)[23] = 0; \
94 (pr_reg)[24] = 0; \
95 (pr_reg)[25] = 0; \
96 (pr_reg)[26] = 0;
97
98extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
99
100#define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu)
101
102#ifdef TIF_IA32 /* XXX */
103#error XXX, indeed
104 clear_thread_flag(TIF_IA32);
105#endif
106
107#define USE_ELF_CORE_DUMP
108#define ELF_EXEC_PAGESIZE 4096
109
110#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
111
112extern long elf_aux_hwcap;
113#define ELF_HWCAP (elf_aux_hwcap)
114
115#define ELF_PLATFORM "x86_64"
116
117#define SET_PERSONALITY(ex, ibcs2) do ; while(0)
118
119#endif
diff --git a/include/asm-um/emergency-restart.h b/include/asm-um/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/include/asm-um/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-um/errno.h b/include/asm-um/errno.h
deleted file mode 100644
index b7a9e37fd8d8..000000000000
--- a/include/asm-um/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_ERRNO_H
2#define __UM_ERRNO_H
3
4#include "asm/arch/errno.h"
5
6#endif
diff --git a/include/asm-um/fcntl.h b/include/asm-um/fcntl.h
deleted file mode 100644
index 812a65446d92..000000000000
--- a/include/asm-um/fcntl.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_FCNTL_H
2#define __UM_FCNTL_H
3
4#include "asm/arch/fcntl.h"
5
6#endif
diff --git a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h
deleted file mode 100644
index 9d2be52b8655..000000000000
--- a/include/asm-um/fixmap.h
+++ /dev/null
@@ -1,98 +0,0 @@
1#ifndef __UM_FIXMAP_H
2#define __UM_FIXMAP_H
3
4#include <asm/processor.h>
5#include <asm/system.h>
6#include <asm/kmap_types.h>
7#include <asm/archparam.h>
8#include <asm/page.h>
9
10/*
11 * Here we define all the compile-time 'special' virtual
12 * addresses. The point is to have a constant address at
13 * compile time, but to set the physical address only
14 * in the boot process. We allocate these special addresses
15 * from the end of virtual memory (0xfffff000) backwards.
16 * Also this lets us do fail-safe vmalloc(), we
17 * can guarantee that these special addresses and
18 * vmalloc()-ed addresses never overlap.
19 *
20 * these 'compile-time allocated' memory buffers are
21 * fixed-size 4k pages. (or larger if used with an increment
22 * highger than 1) use fixmap_set(idx,phys) to associate
23 * physical memory with fixmap indices.
24 *
25 * TLB entries of such buffers will not be flushed across
26 * task switches.
27 */
28
29/*
30 * on UP currently we will have no trace of the fixmap mechanizm,
31 * no page table allocations, etc. This might change in the
32 * future, say framebuffers for the console driver(s) could be
33 * fix-mapped?
34 */
35enum fixed_addresses {
36#ifdef CONFIG_HIGHMEM
37 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
38 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
39#endif
40 __end_of_fixed_addresses
41};
42
43extern void __set_fixmap (enum fixed_addresses idx,
44 unsigned long phys, pgprot_t flags);
45
46#define set_fixmap(idx, phys) \
47 __set_fixmap(idx, phys, PAGE_KERNEL)
48/*
49 * Some hardware wants to get fixmapped without caching.
50 */
51#define set_fixmap_nocache(idx, phys) \
52 __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
53/*
54 * used by vmalloc.c.
55 *
56 * Leave one empty page between vmalloc'ed areas and
57 * the start of the fixmap, and leave one page empty
58 * at the top of mem..
59 */
60
61#define FIXADDR_TOP (TASK_SIZE - 2 * PAGE_SIZE)
62#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
63#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
64
65#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
66#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
67
68extern void __this_fixmap_does_not_exist(void);
69
70/*
71 * 'index to address' translation. If anyone tries to use the idx
72 * directly without tranlation, we catch the bug with a NULL-deference
73 * kernel oops. Illegal ranges of incoming indices are caught too.
74 */
75static inline unsigned long fix_to_virt(const unsigned int idx)
76{
77 /*
78 * this branch gets completely eliminated after inlining,
79 * except when someone tries to use fixaddr indices in an
80 * illegal way. (such as mixing up address types or using
81 * out-of-range indices).
82 *
83 * If it doesn't get removed, the linker will complain
84 * loudly with a reasonably clear error message..
85 */
86 if (idx >= __end_of_fixed_addresses)
87 __this_fixmap_does_not_exist();
88
89 return __fix_to_virt(idx);
90}
91
92static inline unsigned long virt_to_fix(const unsigned long vaddr)
93{
94 BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
95 return __virt_to_fix(vaddr);
96}
97
98#endif
diff --git a/include/asm-um/floppy.h b/include/asm-um/floppy.h
deleted file mode 100644
index 453e7415fb6f..000000000000
--- a/include/asm-um/floppy.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_FLOPPY_H
2#define __UM_FLOPPY_H
3
4#include "asm/arch/floppy.h"
5
6#endif
diff --git a/include/asm-um/frame.h b/include/asm-um/frame.h
deleted file mode 100644
index 8a8c1cb415b4..000000000000
--- a/include/asm-um/frame.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_FRAME_I
2#define __UM_FRAME_I
3
4#include "asm/arch/frame.h"
5
6#endif
diff --git a/include/asm-um/futex.h b/include/asm-um/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/include/asm-um/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/include/asm-um/hardirq.h b/include/asm-um/hardirq.h
deleted file mode 100644
index 313ebb8a2566..000000000000
--- a/include/asm-um/hardirq.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/* (c) 2004 cw@f00f.org, GPLv2 blah blah */
2
3#ifndef __ASM_UM_HARDIRQ_H
4#define __ASM_UM_HARDIRQ_H
5
6#include <linux/threads.h>
7#include <linux/irq.h>
8
9/* NOTE: When SMP works again we might want to make this
10 * ____cacheline_aligned or maybe use per_cpu state? --cw */
11typedef struct {
12 unsigned int __softirq_pending;
13} irq_cpustat_t;
14
15#include <linux/irq_cpustat.h>
16
17/* As this would be very strange for UML to get we BUG() after the
18 * printk. */
19static inline void ack_bad_irq(unsigned int irq)
20{
21 printk(KERN_ERR "unexpected IRQ %02x\n", irq);
22 BUG();
23}
24
25#endif /* __ASM_UM_HARDIRQ_H */
diff --git a/include/asm-um/highmem.h b/include/asm-um/highmem.h
deleted file mode 100644
index 36974cb8abc7..000000000000
--- a/include/asm-um/highmem.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __UM_HIGHMEM_H
2#define __UM_HIGHMEM_H
3
4#include "asm/page.h"
5#include "asm/fixmap.h"
6#include "asm/arch/highmem.h"
7
8#undef PKMAP_BASE
9
10#define PKMAP_BASE ((FIXADDR_START - LAST_PKMAP * PAGE_SIZE) & PMD_MASK)
11
12#endif
diff --git a/include/asm-um/host_ldt-i386.h b/include/asm-um/host_ldt-i386.h
deleted file mode 100644
index b27cb0a9dd30..000000000000
--- a/include/asm-um/host_ldt-i386.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef __ASM_HOST_LDT_I386_H
2#define __ASM_HOST_LDT_I386_H
3
4#include "asm/arch/ldt.h"
5
6/*
7 * macros stolen from include/asm-i386/desc.h
8 */
9#define LDT_entry_a(info) \
10 ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
11
12#define LDT_entry_b(info) \
13 (((info)->base_addr & 0xff000000) | \
14 (((info)->base_addr & 0x00ff0000) >> 16) | \
15 ((info)->limit & 0xf0000) | \
16 (((info)->read_exec_only ^ 1) << 9) | \
17 ((info)->contents << 10) | \
18 (((info)->seg_not_present ^ 1) << 15) | \
19 ((info)->seg_32bit << 22) | \
20 ((info)->limit_in_pages << 23) | \
21 ((info)->useable << 20) | \
22 0x7000)
23
24#define LDT_empty(info) (\
25 (info)->base_addr == 0 && \
26 (info)->limit == 0 && \
27 (info)->contents == 0 && \
28 (info)->read_exec_only == 1 && \
29 (info)->seg_32bit == 0 && \
30 (info)->limit_in_pages == 0 && \
31 (info)->seg_not_present == 1 && \
32 (info)->useable == 0 )
33
34#endif
diff --git a/include/asm-um/host_ldt-x86_64.h b/include/asm-um/host_ldt-x86_64.h
deleted file mode 100644
index 74a63f7d9a90..000000000000
--- a/include/asm-um/host_ldt-x86_64.h
+++ /dev/null
@@ -1,38 +0,0 @@
1#ifndef __ASM_HOST_LDT_X86_64_H
2#define __ASM_HOST_LDT_X86_64_H
3
4#include "asm/arch/ldt.h"
5
6/*
7 * macros stolen from include/asm-x86_64/desc.h
8 */
9#define LDT_entry_a(info) \
10 ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
11
12/* Don't allow setting of the lm bit. It is useless anyways because
13 * 64bit system calls require __USER_CS. */
14#define LDT_entry_b(info) \
15 (((info)->base_addr & 0xff000000) | \
16 (((info)->base_addr & 0x00ff0000) >> 16) | \
17 ((info)->limit & 0xf0000) | \
18 (((info)->read_exec_only ^ 1) << 9) | \
19 ((info)->contents << 10) | \
20 (((info)->seg_not_present ^ 1) << 15) | \
21 ((info)->seg_32bit << 22) | \
22 ((info)->limit_in_pages << 23) | \
23 ((info)->useable << 20) | \
24 /* ((info)->lm << 21) | */ \
25 0x7000)
26
27#define LDT_empty(info) (\
28 (info)->base_addr == 0 && \
29 (info)->limit == 0 && \
30 (info)->contents == 0 && \
31 (info)->read_exec_only == 1 && \
32 (info)->seg_32bit == 0 && \
33 (info)->limit_in_pages == 0 && \
34 (info)->seg_not_present == 1 && \
35 (info)->useable == 0 && \
36 (info)->lm == 0)
37
38#endif
diff --git a/include/asm-um/hw_irq.h b/include/asm-um/hw_irq.h
deleted file mode 100644
index 1cf84cf5f21a..000000000000
--- a/include/asm-um/hw_irq.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_UM_HW_IRQ_H
2#define _ASM_UM_HW_IRQ_H
3
4#include "asm/irq.h"
5#include "asm/archparam.h"
6
7#endif
diff --git a/include/asm-um/ide.h b/include/asm-um/ide.h
deleted file mode 100644
index 3d1ccebcfbaf..000000000000
--- a/include/asm-um/ide.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_IDE_H
2#define __UM_IDE_H
3
4#include "asm/arch/ide.h"
5
6#endif
diff --git a/include/asm-um/io.h b/include/asm-um/io.h
deleted file mode 100644
index 44e8b8c772ae..000000000000
--- a/include/asm-um/io.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef __UM_IO_H
2#define __UM_IO_H
3
4#include "asm/page.h"
5
6#define IO_SPACE_LIMIT 0xdeadbeef /* Sure hope nothing uses this */
7
8static inline int inb(unsigned long i) { return(0); }
9static inline void outb(char c, unsigned long i) { }
10
11/*
12 * Change virtual addresses to physical addresses and vv.
13 * These are pretty trivial
14 */
15static inline unsigned long virt_to_phys(volatile void * address)
16{
17 return __pa((void *) address);
18}
19
20static inline void * phys_to_virt(unsigned long address)
21{
22 return __va(address);
23}
24
25/*
26 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
27 * access
28 */
29#define xlate_dev_mem_ptr(p) __va(p)
30
31/*
32 * Convert a virtual cached pointer to an uncached pointer
33 */
34#define xlate_dev_kmem_ptr(p) p
35
36static inline void writeb(unsigned char b, volatile void __iomem *addr)
37{
38 *(volatile unsigned char __force *) addr = b;
39}
40static inline void writew(unsigned short b, volatile void __iomem *addr)
41{
42 *(volatile unsigned short __force *) addr = b;
43}
44static inline void writel(unsigned int b, volatile void __iomem *addr)
45{
46 *(volatile unsigned int __force *) addr = b;
47}
48static inline void writeq(unsigned int b, volatile void __iomem *addr)
49{
50 *(volatile unsigned long long __force *) addr = b;
51}
52#define __raw_writeb writeb
53#define __raw_writew writew
54#define __raw_writel writel
55#define __raw_writeq writeq
56
57#endif
diff --git a/include/asm-um/ioctl.h b/include/asm-um/ioctl.h
deleted file mode 100644
index cc22157346db..000000000000
--- a/include/asm-um/ioctl.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_IOCTL_H
2#define __UM_IOCTL_H
3
4#include "asm/arch/ioctl.h"
5
6#endif
diff --git a/include/asm-um/ioctls.h b/include/asm-um/ioctls.h
deleted file mode 100644
index 9a1a017de6a7..000000000000
--- a/include/asm-um/ioctls.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_IOCTLS_H
2#define __UM_IOCTLS_H
3
4#include "asm/arch/ioctls.h"
5
6#endif
diff --git a/include/asm-um/ipcbuf.h b/include/asm-um/ipcbuf.h
deleted file mode 100644
index bb2ad31dc434..000000000000
--- a/include/asm-um/ipcbuf.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_IPCBUF_H
2#define __UM_IPCBUF_H
3
4#include "asm/arch/ipcbuf.h"
5
6#endif
diff --git a/include/asm-um/irq.h b/include/asm-um/irq.h
deleted file mode 100644
index 4a2037f8204b..000000000000
--- a/include/asm-um/irq.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef __UM_IRQ_H
2#define __UM_IRQ_H
3
4#define TIMER_IRQ 0
5#define UMN_IRQ 1
6#define CONSOLE_IRQ 2
7#define CONSOLE_WRITE_IRQ 3
8#define UBD_IRQ 4
9#define UM_ETH_IRQ 5
10#define SSL_IRQ 6
11#define SSL_WRITE_IRQ 7
12#define ACCEPT_IRQ 8
13#define MCONSOLE_IRQ 9
14#define WINCH_IRQ 10
15#define SIGIO_WRITE_IRQ 11
16#define TELNETD_IRQ 12
17#define XTERM_IRQ 13
18#define RANDOM_IRQ 14
19
20#define LAST_IRQ RANDOM_IRQ
21#define NR_IRQS (LAST_IRQ + 1)
22
23#endif
diff --git a/include/asm-um/irq_regs.h b/include/asm-um/irq_regs.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-um/irq_regs.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-um/irq_vectors.h b/include/asm-um/irq_vectors.h
deleted file mode 100644
index 62ddba6fc733..000000000000
--- a/include/asm-um/irq_vectors.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_IRQ_VECTORS_H
7#define __UM_IRQ_VECTORS_H
8
9#endif
10
11/*
12 * Overrides for Emacs so that we follow Linus's tabbing style.
13 * Emacs will notice this stuff at the end of the file and automatically
14 * adjust the settings for this buffer only. This must remain at the end
15 * of the file.
16 * ---------------------------------------------------------------------------
17 * Local variables:
18 * c-file-style: "linux"
19 * End:
20 */
diff --git a/include/asm-um/irqflags.h b/include/asm-um/irqflags.h
deleted file mode 100644
index 659b9abdfdba..000000000000
--- a/include/asm-um/irqflags.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_IRQFLAGS_H
2#define __UM_IRQFLAGS_H
3
4/* Empty for now */
5
6#endif
diff --git a/include/asm-um/kdebug.h b/include/asm-um/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-um/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-um/kmap_types.h b/include/asm-um/kmap_types.h
deleted file mode 100644
index 6c03acdb4405..000000000000
--- a/include/asm-um/kmap_types.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_KMAP_TYPES_H
7#define __UM_KMAP_TYPES_H
8
9/* No more #include "asm/arch/kmap_types.h" ! */
10
11enum km_type {
12 KM_BOUNCE_READ,
13 KM_SKB_SUNRPC_DATA,
14 KM_SKB_DATA_SOFTIRQ,
15 KM_USER0,
16 KM_USER1,
17 KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
18 KM_BIO_SRC_IRQ,
19 KM_BIO_DST_IRQ,
20 KM_PTE0,
21 KM_PTE1,
22 KM_IRQ0,
23 KM_IRQ1,
24 KM_SOFTIRQ0,
25 KM_SOFTIRQ1,
26 KM_TYPE_NR
27};
28
29#endif
diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt.h
deleted file mode 100644
index 52af512f5e7d..000000000000
--- a/include/asm-um/ldt.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (C) 2004 Fujitsu Siemens Computers GmbH
3 * Licensed under the GPL
4 *
5 * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
6 */
7
8#ifndef __ASM_LDT_H
9#define __ASM_LDT_H
10
11#include <linux/mutex.h>
12#include "asm/host_ldt.h"
13
14extern void ldt_host_info(void);
15
16#define LDT_PAGES_MAX \
17 ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE)
18#define LDT_ENTRIES_PER_PAGE \
19 (PAGE_SIZE/LDT_ENTRY_SIZE)
20#define LDT_DIRECT_ENTRIES \
21 ((LDT_PAGES_MAX*sizeof(void *))/LDT_ENTRY_SIZE)
22
23struct ldt_entry {
24 __u32 a;
25 __u32 b;
26};
27
28typedef struct uml_ldt {
29 int entry_count;
30 struct mutex lock;
31 union {
32 struct ldt_entry * pages[LDT_PAGES_MAX];
33 struct ldt_entry entries[LDT_DIRECT_ENTRIES];
34 } u;
35} uml_ldt_t;
36
37#endif
diff --git a/include/asm-um/linkage.h b/include/asm-um/linkage.h
deleted file mode 100644
index 7dfce37adc8b..000000000000
--- a/include/asm-um/linkage.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_UM_LINKAGE_H
2#define __ASM_UM_LINKAGE_H
3
4#include "asm/arch/linkage.h"
5
6#endif
diff --git a/include/asm-um/local.h b/include/asm-um/local.h
deleted file mode 100644
index 9a280c5bb609..000000000000
--- a/include/asm-um/local.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_LOCAL_H
2#define __UM_LOCAL_H
3
4#include "asm/arch/local.h"
5
6#endif
diff --git a/include/asm-um/locks.h b/include/asm-um/locks.h
deleted file mode 100644
index f80030a3ef5a..000000000000
--- a/include/asm-um/locks.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_LOCKS_H
2#define __UM_LOCKS_H
3
4#include "asm/arch/locks.h"
5
6#endif
diff --git a/include/asm-um/mca_dma.h b/include/asm-um/mca_dma.h
deleted file mode 100644
index e492e4ec1392..000000000000
--- a/include/asm-um/mca_dma.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef mca___UM_DMA_H
2#define mca___UM_DMA_H
3
4#include "asm/arch/mca_dma.h"
5
6#endif
diff --git a/include/asm-um/mman.h b/include/asm-um/mman.h
deleted file mode 100644
index b09ed523019b..000000000000
--- a/include/asm-um/mman.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_MMAN_H
2#define __UM_MMAN_H
3
4#include "asm/arch/mman.h"
5
6#endif
diff --git a/include/asm-um/mmu.h b/include/asm-um/mmu.h
deleted file mode 100644
index 2cf35c21d694..000000000000
--- a/include/asm-um/mmu.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __MMU_H
7#define __MMU_H
8
9#include "um_mmu.h"
10
11#endif
12
13/*
14 * Overrides for Emacs so that we follow Linus's tabbing style.
15 * Emacs will notice this stuff at the end of the file and automatically
16 * adjust the settings for this buffer only. This must remain at the end
17 * of the file.
18 * ---------------------------------------------------------------------------
19 * Local variables:
20 * c-file-style: "linux"
21 * End:
22 */
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h
deleted file mode 100644
index 54f42e8b0105..000000000000
--- a/include/asm-um/mmu_context.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_MMU_CONTEXT_H
7#define __UM_MMU_CONTEXT_H
8
9#include "linux/sched.h"
10#include "um_mmu.h"
11
12extern void arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);
13extern void arch_exit_mmap(struct mm_struct *mm);
14
15#define get_mmu_context(task) do ; while(0)
16#define activate_context(tsk) do ; while(0)
17
18#define deactivate_mm(tsk,mm) do { } while (0)
19
20extern void force_flush_all(void);
21
22static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
23{
24 /*
25 * This is called by fs/exec.c and sys_unshare()
26 * when the new ->mm is used for the first time.
27 */
28 __switch_mm(&new->context.id);
29 arch_dup_mmap(old, new);
30}
31
32static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
33 struct task_struct *tsk)
34{
35 unsigned cpu = smp_processor_id();
36
37 if(prev != next){
38 cpu_clear(cpu, prev->cpu_vm_mask);
39 cpu_set(cpu, next->cpu_vm_mask);
40 if(next != &init_mm)
41 __switch_mm(&next->context.id);
42 }
43}
44
45static inline void enter_lazy_tlb(struct mm_struct *mm,
46 struct task_struct *tsk)
47{
48}
49
50extern int init_new_context(struct task_struct *task, struct mm_struct *mm);
51
52extern void destroy_context(struct mm_struct *mm);
53
54#endif
diff --git a/include/asm-um/module-generic.h b/include/asm-um/module-generic.h
deleted file mode 100644
index 5a265f56b174..000000000000
--- a/include/asm-um/module-generic.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_MODULE_GENERIC_H
2#define __UM_MODULE_GENERIC_H
3
4#include "asm/arch/module.h"
5
6#endif
diff --git a/include/asm-um/module-i386.h b/include/asm-um/module-i386.h
deleted file mode 100644
index 5ead4a0b2e35..000000000000
--- a/include/asm-um/module-i386.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __UM_MODULE_I386_H
2#define __UM_MODULE_I386_H
3
4/* UML is simple */
5struct mod_arch_specific
6{
7};
8
9#define Elf_Shdr Elf32_Shdr
10#define Elf_Sym Elf32_Sym
11#define Elf_Ehdr Elf32_Ehdr
12
13#endif
diff --git a/include/asm-um/module-x86_64.h b/include/asm-um/module-x86_64.h
deleted file mode 100644
index 35b5491d3e96..000000000000
--- a/include/asm-um/module-x86_64.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_MODULE_X86_64_H
8#define __UM_MODULE_X86_64_H
9
10/* UML is simple */
11struct mod_arch_specific
12{
13};
14
15#define Elf_Shdr Elf64_Shdr
16#define Elf_Sym Elf64_Sym
17#define Elf_Ehdr Elf64_Ehdr
18
19#endif
20
21/*
22 * Overrides for Emacs so that we follow Linus's tabbing style.
23 * Emacs will notice this stuff at the end of the file and automatically
24 * adjust the settings for this buffer only. This must remain at the end
25 * of the file.
26 * ---------------------------------------------------------------------------
27 * Local variables:
28 * c-file-style: "linux"
29 * End:
30 */
diff --git a/include/asm-um/msgbuf.h b/include/asm-um/msgbuf.h
deleted file mode 100644
index 8ce8c30d5377..000000000000
--- a/include/asm-um/msgbuf.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_MSGBUF_H
2#define __UM_MSGBUF_H
3
4#include "asm/arch/msgbuf.h"
5
6#endif
diff --git a/include/asm-um/mtrr.h b/include/asm-um/mtrr.h
deleted file mode 100644
index 5e9cd12c578d..000000000000
--- a/include/asm-um/mtrr.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_MTRR_H
2#define __UM_MTRR_H
3
4#include "asm/arch/mtrr.h"
5
6#endif
diff --git a/include/asm-um/mutex.h b/include/asm-um/mutex.h
deleted file mode 100644
index 458c1f7fbc18..000000000000
--- a/include/asm-um/mutex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-um/nops.h b/include/asm-um/nops.h
deleted file mode 100644
index 814e9bf5dea6..000000000000
--- a/include/asm-um/nops.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_NOPS_H
2#define __UM_NOPS_H
3
4#include "asm/arch/nops.h"
5
6#endif
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
deleted file mode 100644
index a6df1f13d732..000000000000
--- a/include/asm-um/page.h
+++ /dev/null
@@ -1,122 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Copyright 2003 PathScale, Inc.
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PAGE_H
8#define __UM_PAGE_H
9
10#include <linux/const.h>
11
12/* PAGE_SHIFT determines the page size */
13#define PAGE_SHIFT 12
14#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
15#define PAGE_MASK (~(PAGE_SIZE-1))
16
17#ifndef __ASSEMBLY__
18
19struct page;
20
21#include <linux/types.h>
22#include <asm/vm-flags.h>
23
24/*
25 * These are used to make use of C type-checking..
26 */
27
28#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
29#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
30
31#define clear_user_page(page, vaddr, pg) clear_page(page)
32#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
33
34#if defined(CONFIG_3_LEVEL_PGTABLES) && !defined(CONFIG_64BIT)
35
36typedef struct { unsigned long pte_low, pte_high; } pte_t;
37typedef struct { unsigned long pmd; } pmd_t;
38typedef struct { unsigned long pgd; } pgd_t;
39#define pte_val(x) ((x).pte_low | ((unsigned long long) (x).pte_high << 32))
40
41#define pte_get_bits(pte, bits) ((pte).pte_low & (bits))
42#define pte_set_bits(pte, bits) ((pte).pte_low |= (bits))
43#define pte_clear_bits(pte, bits) ((pte).pte_low &= ~(bits))
44#define pte_copy(to, from) ({ (to).pte_high = (from).pte_high; \
45 smp_wmb(); \
46 (to).pte_low = (from).pte_low; })
47#define pte_is_zero(pte) (!((pte).pte_low & ~_PAGE_NEWPAGE) && !(pte).pte_high)
48#define pte_set_val(pte, phys, prot) \
49 ({ (pte).pte_high = (phys) >> 32; \
50 (pte).pte_low = (phys) | pgprot_val(prot); })
51
52#define pmd_val(x) ((x).pmd)
53#define __pmd(x) ((pmd_t) { (x) } )
54
55typedef unsigned long long pfn_t;
56typedef unsigned long long phys_t;
57
58#else
59
60typedef struct { unsigned long pte; } pte_t;
61typedef struct { unsigned long pgd; } pgd_t;
62
63#ifdef CONFIG_3_LEVEL_PGTABLES
64typedef struct { unsigned long pmd; } pmd_t;
65#define pmd_val(x) ((x).pmd)
66#define __pmd(x) ((pmd_t) { (x) } )
67#endif
68
69#define pte_val(x) ((x).pte)
70
71
72#define pte_get_bits(p, bits) ((p).pte & (bits))
73#define pte_set_bits(p, bits) ((p).pte |= (bits))
74#define pte_clear_bits(p, bits) ((p).pte &= ~(bits))
75#define pte_copy(to, from) ((to).pte = (from).pte)
76#define pte_is_zero(p) (!((p).pte & ~_PAGE_NEWPAGE))
77#define pte_set_val(p, phys, prot) (p).pte = (phys | pgprot_val(prot))
78
79typedef unsigned long pfn_t;
80typedef unsigned long phys_t;
81
82#endif
83
84typedef struct { unsigned long pgprot; } pgprot_t;
85
86typedef struct page *pgtable_t;
87
88#define pgd_val(x) ((x).pgd)
89#define pgprot_val(x) ((x).pgprot)
90
91#define __pte(x) ((pte_t) { (x) } )
92#define __pgd(x) ((pgd_t) { (x) } )
93#define __pgprot(x) ((pgprot_t) { (x) } )
94
95extern unsigned long uml_physmem;
96
97#define PAGE_OFFSET (uml_physmem)
98#define KERNELBASE PAGE_OFFSET
99
100#define __va_space (8*1024*1024)
101
102#include "mem.h"
103
104/* Cast to unsigned long before casting to void * to avoid a warning from
105 * mmap_kmem about cutting a long long down to a void *. Not sure that
106 * casting is the right thing, but 32-bit UML can't have 64-bit virtual
107 * addresses
108 */
109#define __pa(virt) to_phys((void *) (unsigned long) (virt))
110#define __va(phys) to_virt((unsigned long) (phys))
111
112#define phys_to_pfn(p) ((pfn_t) ((p) >> PAGE_SHIFT))
113#define pfn_to_phys(pfn) ((phys_t) ((pfn) << PAGE_SHIFT))
114
115#define pfn_valid(pfn) ((pfn) < max_mapnr)
116#define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v)))
117
118#include <asm-generic/memory_model.h>
119#include <asm-generic/page.h>
120
121#endif /* __ASSEMBLY__ */
122#endif /* __UM_PAGE_H */
diff --git a/include/asm-um/page_offset.h b/include/asm-um/page_offset.h
deleted file mode 100644
index 1c168dfbf359..000000000000
--- a/include/asm-um/page_offset.h
+++ /dev/null
@@ -1 +0,0 @@
1#define PAGE_OFFSET_RAW (uml_physmem)
diff --git a/include/asm-um/param.h b/include/asm-um/param.h
deleted file mode 100644
index e44f4e60d16d..000000000000
--- a/include/asm-um/param.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _UM_PARAM_H
2#define _UM_PARAM_H
3
4#define EXEC_PAGESIZE 4096
5
6#ifndef NOGROUP
7#define NOGROUP (-1)
8#endif
9
10#define MAXHOSTNAMELEN 64 /* max length of hostname */
11
12#ifdef __KERNEL__
13#define HZ CONFIG_HZ
14#define USER_HZ 100 /* .. some user interfaces are in "ticks" */
15#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
16#else
17#define HZ 100
18#endif
19
20#endif
diff --git a/include/asm-um/paravirt.h b/include/asm-um/paravirt.h
deleted file mode 100644
index 9d6aaad80b5f..000000000000
--- a/include/asm-um/paravirt.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_PARAVIRT_H
2#define __UM_PARAVIRT_H
3
4#include "asm/arch/paravirt.h"
5
6#endif
diff --git a/include/asm-um/pci.h b/include/asm-um/pci.h
deleted file mode 100644
index 59923199cdc3..000000000000
--- a/include/asm-um/pci.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __UM_PCI_H
2#define __UM_PCI_H
3
4#define PCI_DMA_BUS_IS_PHYS (1)
5#define pcibios_scan_all_fns(a, b) 0
6
7#endif
diff --git a/include/asm-um/pda.h b/include/asm-um/pda.h
deleted file mode 100644
index 0d8bf33ffd42..000000000000
--- a/include/asm-um/pda.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PDA_X86_64_H
8#define __UM_PDA_X86_64_H
9
10/* XXX */
11struct foo {
12 unsigned int __softirq_pending;
13 unsigned int __nmi_count;
14};
15
16extern struct foo me;
17
18#define read_pda(me) (&me)
19
20#endif
21
22/*
23 * Overrides for Emacs so that we follow Linus's tabbing style.
24 * Emacs will notice this stuff at the end of the file and automatically
25 * adjust the settings for this buffer only. This must remain at the end
26 * of the file.
27 * ---------------------------------------------------------------------------
28 * Local variables:
29 * c-file-style: "linux"
30 * End:
31 */
diff --git a/include/asm-um/percpu.h b/include/asm-um/percpu.h
deleted file mode 100644
index 5723e2aab8e7..000000000000
--- a/include/asm-um/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_PERCPU_H
2#define __UM_PERCPU_H
3
4#include "asm/arch/percpu.h"
5
6#endif
diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h
deleted file mode 100644
index 9062a6e72241..000000000000
--- a/include/asm-um/pgalloc.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Copyright 2003 PathScale, Inc.
4 * Derived from include/asm-i386/pgalloc.h and include/asm-i386/pgtable.h
5 * Licensed under the GPL
6 */
7
8#ifndef __UM_PGALLOC_H
9#define __UM_PGALLOC_H
10
11#include "linux/mm.h"
12#include "asm/fixmap.h"
13
14#define pmd_populate_kernel(mm, pmd, pte) \
15 set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) __pa(pte)))
16
17#define pmd_populate(mm, pmd, pte) \
18 set_pmd(pmd, __pmd(_PAGE_TABLE + \
19 ((unsigned long long)page_to_pfn(pte) << \
20 (unsigned long long) PAGE_SHIFT)))
21#define pmd_pgtable(pmd) pmd_page(pmd)
22
23/*
24 * Allocate and free page tables.
25 */
26extern pgd_t *pgd_alloc(struct mm_struct *);
27extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
28
29extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
30extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long);
31
32static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
33{
34 free_page((unsigned long) pte);
35}
36
37static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
38{
39 pgtable_page_dtor(pte);
40 __free_page(pte);
41}
42
43#define __pte_free_tlb(tlb,pte) \
44do { \
45 pgtable_page_dtor(pte); \
46 tlb_remove_page((tlb),(pte)); \
47} while (0)
48
49#ifdef CONFIG_3_LEVEL_PGTABLES
50
51static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
52{
53 free_page((unsigned long)pmd);
54}
55
56#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
57#endif
58
59#define check_pgt_cache() do { } while (0)
60
61#endif
62
63/*
64 * Overrides for Emacs so that we follow Linus's tabbing style.
65 * Emacs will notice this stuff at the end of the file and automatically
66 * adjust the settings for this buffer only. This must remain at the end
67 * of the file.
68 * ---------------------------------------------------------------------------
69 * Local variables:
70 * c-file-style: "linux"
71 * End:
72 */
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h
deleted file mode 100644
index f534b73e753e..000000000000
--- a/include/asm-um/pgtable-2level.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Copyright 2003 PathScale, Inc.
4 * Derived from include/asm-i386/pgtable.h
5 * Licensed under the GPL
6 */
7
8#ifndef __UM_PGTABLE_2LEVEL_H
9#define __UM_PGTABLE_2LEVEL_H
10
11#include <asm-generic/pgtable-nopmd.h>
12
13/* PGDIR_SHIFT determines what a third-level page table entry can map */
14
15#define PGDIR_SHIFT 22
16#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
17#define PGDIR_MASK (~(PGDIR_SIZE-1))
18
19/*
20 * entries per page directory level: the i386 is two-level, so
21 * we don't really have any PMD directory physically.
22 */
23#define PTRS_PER_PTE 1024
24#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
25#define PTRS_PER_PGD 1024
26#define FIRST_USER_ADDRESS 0
27
28#define pte_ERROR(e) \
29 printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), \
30 pte_val(e))
31#define pgd_ERROR(e) \
32 printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), \
33 pgd_val(e))
34
35static inline int pgd_newpage(pgd_t pgd) { return 0; }
36static inline void pgd_mkuptodate(pgd_t pgd) { }
37
38#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
39
40#define pte_pfn(x) phys_to_pfn(pte_val(x))
41#define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot))
42#define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot))
43
44/*
45 * Bits 0 through 4 are taken
46 */
47#define PTE_FILE_MAX_BITS 27
48
49#define pte_to_pgoff(pte) (pte_val(pte) >> 5)
50
51#define pgoff_to_pte(off) ((pte_t) { ((off) << 5) + _PAGE_FILE })
52
53#endif
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h
deleted file mode 100644
index 0446f456b428..000000000000
--- a/include/asm-um/pgtable-3level.h
+++ /dev/null
@@ -1,146 +0,0 @@
1/*
2 * Copyright 2003 PathScale Inc
3 * Derived from include/asm-i386/pgtable.h
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PGTABLE_3LEVEL_H
8#define __UM_PGTABLE_3LEVEL_H
9
10#include <asm-generic/pgtable-nopud.h>
11
12/* PGDIR_SHIFT determines what a third-level page table entry can map */
13
14#ifdef CONFIG_64BIT
15#define PGDIR_SHIFT 30
16#else
17#define PGDIR_SHIFT 31
18#endif
19#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
20#define PGDIR_MASK (~(PGDIR_SIZE-1))
21
22/* PMD_SHIFT determines the size of the area a second-level page table can
23 * map
24 */
25
26#define PMD_SHIFT 21
27#define PMD_SIZE (1UL << PMD_SHIFT)
28#define PMD_MASK (~(PMD_SIZE-1))
29
30/*
31 * entries per page directory level
32 */
33
34#define PTRS_PER_PTE 512
35#ifdef CONFIG_64BIT
36#define PTRS_PER_PMD 512
37#define PTRS_PER_PGD 512
38#else
39#define PTRS_PER_PMD 1024
40#define PTRS_PER_PGD 1024
41#endif
42
43#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
44#define FIRST_USER_ADDRESS 0
45
46#define pte_ERROR(e) \
47 printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), \
48 pte_val(e))
49#define pmd_ERROR(e) \
50 printk("%s:%d: bad pmd %p(%016lx).\n", __FILE__, __LINE__, &(e), \
51 pmd_val(e))
52#define pgd_ERROR(e) \
53 printk("%s:%d: bad pgd %p(%016lx).\n", __FILE__, __LINE__, &(e), \
54 pgd_val(e))
55
56#define pud_none(x) (!(pud_val(x) & ~_PAGE_NEWPAGE))
57#define pud_bad(x) ((pud_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
58#define pud_present(x) (pud_val(x) & _PAGE_PRESENT)
59#define pud_populate(mm, pud, pmd) \
60 set_pud(pud, __pud(_PAGE_TABLE + __pa(pmd)))
61
62#ifdef CONFIG_64BIT
63#define set_pud(pudptr, pudval) set_64bit((phys_t *) (pudptr), pud_val(pudval))
64#else
65#define set_pud(pudptr, pudval) (*(pudptr) = (pudval))
66#endif
67
68static inline int pgd_newpage(pgd_t pgd)
69{
70 return(pgd_val(pgd) & _PAGE_NEWPAGE);
71}
72
73static inline void pgd_mkuptodate(pgd_t pgd) { pgd_val(pgd) &= ~_PAGE_NEWPAGE; }
74
75#ifdef CONFIG_64BIT
76#define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval))
77#else
78#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
79#endif
80
81struct mm_struct;
82extern pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address);
83
84static inline void pud_clear (pud_t *pud)
85{
86 set_pud(pud, __pud(_PAGE_NEWPAGE));
87}
88
89#define pud_page(pud) phys_to_page(pud_val(pud) & PAGE_MASK)
90#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK))
91
92/* Find an entry in the second-level page table.. */
93#define pmd_offset(pud, address) ((pmd_t *) pud_page_vaddr(*(pud)) + \
94 pmd_index(address))
95
96static inline unsigned long pte_pfn(pte_t pte)
97{
98 return phys_to_pfn(pte_val(pte));
99}
100
101static inline pte_t pfn_pte(pfn_t page_nr, pgprot_t pgprot)
102{
103 pte_t pte;
104 phys_t phys = pfn_to_phys(page_nr);
105
106 pte_set_val(pte, phys, pgprot);
107 return pte;
108}
109
110static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
111{
112 return __pmd((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
113}
114
115/*
116 * Bits 0 through 3 are taken in the low part of the pte,
117 * put the 32 bits of offset into the high part.
118 */
119#define PTE_FILE_MAX_BITS 32
120
121#ifdef CONFIG_64BIT
122
123#define pte_to_pgoff(p) ((p).pte >> 32)
124
125#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
126
127#else
128
129#define pte_to_pgoff(pte) ((pte).pte_high)
130
131#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) })
132
133#endif
134
135#endif
136
137/*
138 * Overrides for Emacs so that we follow Linus's tabbing style.
139 * Emacs will notice this stuff at the end of the file and automatically
140 * adjust the settings for this buffer only. This must remain at the end
141 * of the file.
142 * ---------------------------------------------------------------------------
143 * Local variables:
144 * c-file-style: "linux"
145 * End:
146 */
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h
deleted file mode 100644
index 02db81b7b86e..000000000000
--- a/include/asm-um/pgtable.h
+++ /dev/null
@@ -1,358 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Copyright 2003 PathScale, Inc.
4 * Derived from include/asm-i386/pgtable.h
5 * Licensed under the GPL
6 */
7
8#ifndef __UM_PGTABLE_H
9#define __UM_PGTABLE_H
10
11#include <asm/fixmap.h>
12
13#define _PAGE_PRESENT 0x001
14#define _PAGE_NEWPAGE 0x002
15#define _PAGE_NEWPROT 0x004
16#define _PAGE_RW 0x020
17#define _PAGE_USER 0x040
18#define _PAGE_ACCESSED 0x080
19#define _PAGE_DIRTY 0x100
20/* If _PAGE_PRESENT is clear, we use these: */
21#define _PAGE_FILE 0x008 /* nonlinear file mapping, saved PTE; unset:swap */
22#define _PAGE_PROTNONE 0x010 /* if the user mapped it with PROT_NONE;
23 pte_present gives true */
24
25#ifdef CONFIG_3_LEVEL_PGTABLES
26#include "asm/pgtable-3level.h"
27#else
28#include "asm/pgtable-2level.h"
29#endif
30
31extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
32
33/* zero page used for uninitialized stuff */
34extern unsigned long *empty_zero_page;
35
36#define pgtable_cache_init() do ; while (0)
37
38/* Just any arbitrary offset to the start of the vmalloc VM area: the
39 * current 8MB value just means that there will be a 8MB "hole" after the
40 * physical memory until the kernel virtual memory starts. That means that
41 * any out-of-bounds memory accesses will hopefully be caught.
42 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
43 * area for the same reason. ;)
44 */
45
46extern unsigned long end_iomem;
47
48#define VMALLOC_OFFSET (__va_space)
49#define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
50#ifdef CONFIG_HIGHMEM
51# define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE)
52#else
53# define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
54#endif
55
56#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
57#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
58#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
59
60#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
61#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
62#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
63#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
64#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
65
66/*
67 * The i386 can't do page protection for execute, and considers that the same
68 * are read.
69 * Also, write permissions imply read permissions. This is the closest we can
70 * get..
71 */
72#define __P000 PAGE_NONE
73#define __P001 PAGE_READONLY
74#define __P010 PAGE_COPY
75#define __P011 PAGE_COPY
76#define __P100 PAGE_READONLY
77#define __P101 PAGE_READONLY
78#define __P110 PAGE_COPY
79#define __P111 PAGE_COPY
80
81#define __S000 PAGE_NONE
82#define __S001 PAGE_READONLY
83#define __S010 PAGE_SHARED
84#define __S011 PAGE_SHARED
85#define __S100 PAGE_READONLY
86#define __S101 PAGE_READONLY
87#define __S110 PAGE_SHARED
88#define __S111 PAGE_SHARED
89
90/*
91 * ZERO_PAGE is a global shared page that is always zero: used
92 * for zero-mapped memory areas etc..
93 */
94#define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page)
95
96#define pte_clear(mm,addr,xp) pte_set_val(*(xp), (phys_t) 0, __pgprot(_PAGE_NEWPAGE))
97
98#define pmd_none(x) (!((unsigned long)pmd_val(x) & ~_PAGE_NEWPAGE))
99#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
100
101#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
102#define pmd_clear(xp) do { pmd_val(*(xp)) = _PAGE_NEWPAGE; } while (0)
103
104#define pmd_newpage(x) (pmd_val(x) & _PAGE_NEWPAGE)
105#define pmd_mkuptodate(x) (pmd_val(x) &= ~_PAGE_NEWPAGE)
106
107#define pud_newpage(x) (pud_val(x) & _PAGE_NEWPAGE)
108#define pud_mkuptodate(x) (pud_val(x) &= ~_PAGE_NEWPAGE)
109
110#define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK)
111
112#define pte_page(x) pfn_to_page(pte_pfn(x))
113
114#define pte_present(x) pte_get_bits(x, (_PAGE_PRESENT | _PAGE_PROTNONE))
115
116/*
117 * =================================
118 * Flags checking section.
119 * =================================
120 */
121
122static inline int pte_none(pte_t pte)
123{
124 return pte_is_zero(pte);
125}
126
127/*
128 * The following only work if pte_present() is true.
129 * Undefined behaviour if not..
130 */
131static inline int pte_read(pte_t pte)
132{
133 return((pte_get_bits(pte, _PAGE_USER)) &&
134 !(pte_get_bits(pte, _PAGE_PROTNONE)));
135}
136
137static inline int pte_exec(pte_t pte){
138 return((pte_get_bits(pte, _PAGE_USER)) &&
139 !(pte_get_bits(pte, _PAGE_PROTNONE)));
140}
141
142static inline int pte_write(pte_t pte)
143{
144 return((pte_get_bits(pte, _PAGE_RW)) &&
145 !(pte_get_bits(pte, _PAGE_PROTNONE)));
146}
147
148/*
149 * The following only works if pte_present() is not true.
150 */
151static inline int pte_file(pte_t pte)
152{
153 return pte_get_bits(pte, _PAGE_FILE);
154}
155
156static inline int pte_dirty(pte_t pte)
157{
158 return pte_get_bits(pte, _PAGE_DIRTY);
159}
160
161static inline int pte_young(pte_t pte)
162{
163 return pte_get_bits(pte, _PAGE_ACCESSED);
164}
165
166static inline int pte_newpage(pte_t pte)
167{
168 return pte_get_bits(pte, _PAGE_NEWPAGE);
169}
170
171static inline int pte_newprot(pte_t pte)
172{
173 return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT)));
174}
175
176static inline int pte_special(pte_t pte)
177{
178 return 0;
179}
180
181/*
182 * =================================
183 * Flags setting section.
184 * =================================
185 */
186
187static inline pte_t pte_mknewprot(pte_t pte)
188{
189 pte_set_bits(pte, _PAGE_NEWPROT);
190 return(pte);
191}
192
193static inline pte_t pte_mkclean(pte_t pte)
194{
195 pte_clear_bits(pte, _PAGE_DIRTY);
196 return(pte);
197}
198
199static inline pte_t pte_mkold(pte_t pte)
200{
201 pte_clear_bits(pte, _PAGE_ACCESSED);
202 return(pte);
203}
204
205static inline pte_t pte_wrprotect(pte_t pte)
206{
207 pte_clear_bits(pte, _PAGE_RW);
208 return(pte_mknewprot(pte));
209}
210
211static inline pte_t pte_mkread(pte_t pte)
212{
213 pte_set_bits(pte, _PAGE_USER);
214 return(pte_mknewprot(pte));
215}
216
217static inline pte_t pte_mkdirty(pte_t pte)
218{
219 pte_set_bits(pte, _PAGE_DIRTY);
220 return(pte);
221}
222
223static inline pte_t pte_mkyoung(pte_t pte)
224{
225 pte_set_bits(pte, _PAGE_ACCESSED);
226 return(pte);
227}
228
229static inline pte_t pte_mkwrite(pte_t pte)
230{
231 pte_set_bits(pte, _PAGE_RW);
232 return(pte_mknewprot(pte));
233}
234
235static inline pte_t pte_mkuptodate(pte_t pte)
236{
237 pte_clear_bits(pte, _PAGE_NEWPAGE);
238 if(pte_present(pte))
239 pte_clear_bits(pte, _PAGE_NEWPROT);
240 return(pte);
241}
242
243static inline pte_t pte_mknewpage(pte_t pte)
244{
245 pte_set_bits(pte, _PAGE_NEWPAGE);
246 return(pte);
247}
248
249static inline pte_t pte_mkspecial(pte_t pte)
250{
251 return(pte);
252}
253
254static inline void set_pte(pte_t *pteptr, pte_t pteval)
255{
256 pte_copy(*pteptr, pteval);
257
258 /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so
259 * fix_range knows to unmap it. _PAGE_NEWPROT is specific to
260 * mapped pages.
261 */
262
263 *pteptr = pte_mknewpage(*pteptr);
264 if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr);
265}
266#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
267
268/*
269 * Conversion functions: convert a page and protection to a page entry,
270 * and a page entry and page directory to the page they refer to.
271 */
272
273#define phys_to_page(phys) pfn_to_page(phys_to_pfn(phys))
274#define __virt_to_page(virt) phys_to_page(__pa(virt))
275#define page_to_phys(page) pfn_to_phys((pfn_t) page_to_pfn(page))
276#define virt_to_page(addr) __virt_to_page((const unsigned long) addr)
277
278#define mk_pte(page, pgprot) \
279 ({ pte_t pte; \
280 \
281 pte_set_val(pte, page_to_phys(page), (pgprot)); \
282 if (pte_present(pte)) \
283 pte_mknewprot(pte_mknewpage(pte)); \
284 pte;})
285
286static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
287{
288 pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot);
289 return pte;
290}
291
292/*
293 * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
294 *
295 * this macro returns the index of the entry in the pgd page which would
296 * control the given virtual address
297 */
298#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
299
300/*
301 * pgd_offset() returns a (pgd_t *)
302 * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
303 */
304#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
305
306/*
307 * a shortcut which implies the use of the kernel's pgd, instead
308 * of a process's
309 */
310#define pgd_offset_k(address) pgd_offset(&init_mm, address)
311
312/*
313 * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
314 *
315 * this macro returns the index of the entry in the pmd page which would
316 * control the given virtual address
317 */
318#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
319#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
320
321#define pmd_page_vaddr(pmd) \
322 ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
323
324/*
325 * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
326 *
327 * this macro returns the index of the entry in the pte page which would
328 * control the given virtual address
329 */
330#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
331#define pte_offset_kernel(dir, address) \
332 ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address))
333#define pte_offset_map(dir, address) \
334 ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
335#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address)
336#define pte_unmap(pte) do { } while (0)
337#define pte_unmap_nested(pte) do { } while (0)
338
339struct mm_struct;
340extern pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr);
341
342#define update_mmu_cache(vma,address,pte) do ; while (0)
343
344/* Encode and de-code a swap entry */
345#define __swp_type(x) (((x).val >> 4) & 0x3f)
346#define __swp_offset(x) ((x).val >> 11)
347
348#define __swp_entry(type, offset) \
349 ((swp_entry_t) { ((type) << 4) | ((offset) << 11) })
350#define __pte_to_swp_entry(pte) \
351 ((swp_entry_t) { pte_val(pte_mkuptodate(pte)) })
352#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
353
354#define kern_addr_valid(addr) (1)
355
356#include <asm-generic/pgtable.h>
357
358#endif
diff --git a/include/asm-um/poll.h b/include/asm-um/poll.h
deleted file mode 100644
index 1eb4e1bc6383..000000000000
--- a/include/asm-um/poll.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_POLL_H
2#define __UM_POLL_H
3
4#include "asm/arch/poll.h"
5
6#endif
diff --git a/include/asm-um/posix_types.h b/include/asm-um/posix_types.h
deleted file mode 100644
index 32fb4198f644..000000000000
--- a/include/asm-um/posix_types.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_POSIX_TYPES_H
2#define __UM_POSIX_TYPES_H
3
4#include "asm/arch/posix_types.h"
5
6#endif
diff --git a/include/asm-um/prctl.h b/include/asm-um/prctl.h
deleted file mode 100644
index 64b6d099bdd5..000000000000
--- a/include/asm-um/prctl.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_PRCTL_H
2#define __UM_PRCTL_H
3
4#include "asm/arch/prctl.h"
5
6#endif
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h
deleted file mode 100644
index bed668824b5f..000000000000
--- a/include/asm-um/processor-generic.h
+++ /dev/null
@@ -1,136 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PROCESSOR_GENERIC_H
7#define __UM_PROCESSOR_GENERIC_H
8
9struct pt_regs;
10
11struct task_struct;
12
13#include "asm/ptrace.h"
14#include "registers.h"
15#include "sysdep/archsetjmp.h"
16
17struct mm_struct;
18
19struct thread_struct {
20 struct task_struct *saved_task;
21 /*
22 * This flag is set to 1 before calling do_fork (and analyzed in
23 * copy_thread) to mark that we are begin called from userspace (fork /
24 * vfork / clone), and reset to 0 after. It is left to 0 when called
25 * from kernelspace (i.e. kernel_thread() or fork_idle(),
26 * as of 2.6.11).
27 */
28 int forking;
29 struct pt_regs regs;
30 int singlestep_syscall;
31 void *fault_addr;
32 jmp_buf *fault_catcher;
33 struct task_struct *prev_sched;
34 unsigned long temp_stack;
35 jmp_buf *exec_buf;
36 struct arch_thread arch;
37 jmp_buf switch_buf;
38 int mm_count;
39 struct {
40 int op;
41 union {
42 struct {
43 int pid;
44 } fork, exec;
45 struct {
46 int (*proc)(void *);
47 void *arg;
48 } thread;
49 struct {
50 void (*proc)(void *);
51 void *arg;
52 } cb;
53 } u;
54 } request;
55};
56
57#define INIT_THREAD \
58{ \
59 .forking = 0, \
60 .regs = EMPTY_REGS, \
61 .fault_addr = NULL, \
62 .prev_sched = NULL, \
63 .temp_stack = 0, \
64 .exec_buf = NULL, \
65 .arch = INIT_ARCH_THREAD, \
66 .request = { 0 } \
67}
68
69extern struct task_struct *alloc_task_struct(void);
70
71static inline void release_thread(struct task_struct *task)
72{
73}
74
75extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
76
77static inline void prepare_to_copy(struct task_struct *tsk)
78{
79}
80
81
82extern unsigned long thread_saved_pc(struct task_struct *t);
83
84static inline void mm_copy_segments(struct mm_struct *from_mm,
85 struct mm_struct *new_mm)
86{
87}
88
89#define init_stack (init_thread_union.stack)
90
91/*
92 * User space process size: 3GB (default).
93 */
94extern unsigned long task_size;
95
96#define TASK_SIZE (task_size)
97
98#undef STACK_TOP
99#undef STACK_TOP_MAX
100
101extern unsigned long stacksizelim;
102
103#define STACK_ROOM (stacksizelim)
104#define STACK_TOP (TASK_SIZE - 2 * PAGE_SIZE)
105#define STACK_TOP_MAX STACK_TOP
106
107/* This decides where the kernel will search for a free chunk of vm
108 * space during mmap's.
109 */
110#define TASK_UNMAPPED_BASE (0x40000000)
111
112extern void start_thread(struct pt_regs *regs, unsigned long entry,
113 unsigned long stack);
114
115struct cpuinfo_um {
116 unsigned long loops_per_jiffy;
117 int ipi_pipe[2];
118};
119
120extern struct cpuinfo_um boot_cpu_data;
121
122#define my_cpu_data cpu_data[smp_processor_id()]
123
124#ifdef CONFIG_SMP
125extern struct cpuinfo_um cpu_data[];
126#define current_cpu_data cpu_data[smp_processor_id()]
127#else
128#define cpu_data (&boot_cpu_data)
129#define current_cpu_data boot_cpu_data
130#endif
131
132
133#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
134extern unsigned long get_wchan(struct task_struct *p);
135
136#endif
diff --git a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h
deleted file mode 100644
index a2b7fe13fe1e..000000000000
--- a/include/asm-um/processor-i386.h
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PROCESSOR_I386_H
7#define __UM_PROCESSOR_I386_H
8
9#include "linux/string.h"
10#include "asm/host_ldt.h"
11#include "asm/segment.h"
12
13extern int host_has_cmov;
14
15/* include faultinfo structure */
16#include "sysdep/faultinfo.h"
17
18struct uml_tls_struct {
19 struct user_desc tls;
20 unsigned flushed:1;
21 unsigned present:1;
22};
23
24struct arch_thread {
25 struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
26 unsigned long debugregs[8];
27 int debugregs_seq;
28 struct faultinfo faultinfo;
29};
30
31#define INIT_ARCH_THREAD { \
32 .tls_array = { [ 0 ... GDT_ENTRY_TLS_ENTRIES - 1 ] = \
33 { .present = 0, .flushed = 0 } }, \
34 .debugregs = { [ 0 ... 7 ] = 0 }, \
35 .debugregs_seq = 0, \
36 .faultinfo = { 0, 0, 0 } \
37}
38
39static inline void arch_flush_thread(struct arch_thread *thread)
40{
41 /* Clear any TLS still hanging */
42 memset(&thread->tls_array, 0, sizeof(thread->tls_array));
43}
44
45static inline void arch_copy_thread(struct arch_thread *from,
46 struct arch_thread *to)
47{
48 memcpy(&to->tls_array, &from->tls_array, sizeof(from->tls_array));
49}
50
51#include "asm/arch/user.h"
52
53/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
54static inline void rep_nop(void)
55{
56 __asm__ __volatile__("rep;nop": : :"memory");
57}
58
59#define cpu_relax() rep_nop()
60
61/*
62 * Default implementation of macro that returns current
63 * instruction pointer ("program counter"). Stolen
64 * from asm-i386/processor.h
65 */
66#define current_text_addr() \
67 ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
68
69#define ARCH_IS_STACKGROW(address) \
70 (address + 32 >= UPT_SP(&current->thread.regs.regs))
71
72#define KSTK_EIP(tsk) KSTK_REG(tsk, EIP)
73#define KSTK_ESP(tsk) KSTK_REG(tsk, UESP)
74#define KSTK_EBP(tsk) KSTK_REG(tsk, EBP)
75
76#include "asm/processor-generic.h"
77
78#endif
diff --git a/include/asm-um/processor-ppc.h b/include/asm-um/processor-ppc.h
deleted file mode 100644
index 959323151229..000000000000
--- a/include/asm-um/processor-ppc.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef __UM_PROCESSOR_PPC_H
2#define __UM_PROCESSOR_PPC_H
3
4#if defined(__ASSEMBLY__)
5
6#define CONFIG_PPC_MULTIPLATFORM
7#include "arch/processor.h"
8
9#else
10
11#include "asm/processor-generic.h"
12
13#endif
14
15#endif
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h
deleted file mode 100644
index e50933175e91..000000000000
--- a/include/asm-um/processor-x86_64.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PROCESSOR_X86_64_H
8#define __UM_PROCESSOR_X86_64_H
9
10/* include faultinfo structure */
11#include "sysdep/faultinfo.h"
12
13struct arch_thread {
14 unsigned long debugregs[8];
15 int debugregs_seq;
16 unsigned long fs;
17 struct faultinfo faultinfo;
18};
19
20/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
21static inline void rep_nop(void)
22{
23 __asm__ __volatile__("rep;nop": : :"memory");
24}
25
26#define cpu_relax() rep_nop()
27
28#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
29 .debugregs_seq = 0, \
30 .fs = 0, \
31 .faultinfo = { 0, 0, 0 } }
32
33static inline void arch_flush_thread(struct arch_thread *thread)
34{
35}
36
37static inline void arch_copy_thread(struct arch_thread *from,
38 struct arch_thread *to)
39{
40 to->fs = from->fs;
41}
42
43#include "asm/arch/user.h"
44
45#define current_text_addr() \
46 ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
47
48#define ARCH_IS_STACKGROW(address) \
49 (address + 128 >= UPT_SP(&current->thread.regs.regs))
50
51#define KSTK_EIP(tsk) KSTK_REG(tsk, RIP)
52#define KSTK_ESP(tsk) KSTK_REG(tsk, RSP)
53
54#include "asm/processor-generic.h"
55
56#endif
diff --git a/include/asm-um/ptrace-generic.h b/include/asm-um/ptrace-generic.h
deleted file mode 100644
index 315749705ea1..000000000000
--- a/include/asm-um/ptrace-generic.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PTRACE_GENERIC_H
7#define __UM_PTRACE_GENERIC_H
8
9#ifndef __ASSEMBLY__
10
11#include "asm/arch/ptrace-abi.h"
12#include <asm/user.h>
13#include "sysdep/ptrace.h"
14
15struct pt_regs {
16 struct uml_pt_regs regs;
17};
18
19#define EMPTY_REGS { .regs = EMPTY_UML_PT_REGS }
20
21#define PT_REGS_IP(r) UPT_IP(&(r)->regs)
22#define PT_REGS_SP(r) UPT_SP(&(r)->regs)
23
24#define PT_REG(r, reg) UPT_REG(&(r)->regs, reg)
25#define PT_REGS_SET(r, reg, val) UPT_SET(&(r)->regs, reg, val)
26
27#define PT_REGS_SET_SYSCALL_RETURN(r, res) \
28 UPT_SET_SYSCALL_RETURN(&(r)->regs, res)
29#define PT_REGS_RESTART_SYSCALL(r) UPT_RESTART_SYSCALL(&(r)->regs)
30
31#define PT_REGS_SYSCALL_NR(r) UPT_SYSCALL_NR(&(r)->regs)
32
33#define PT_REGS_SC(r) UPT_SC(&(r)->regs)
34
35#define instruction_pointer(regs) PT_REGS_IP(regs)
36
37struct task_struct;
38
39extern long subarch_ptrace(struct task_struct *child, long request, long addr,
40 long data);
41extern unsigned long getreg(struct task_struct *child, int regno);
42extern int putreg(struct task_struct *child, int regno, unsigned long value);
43extern int get_fpregs(struct user_i387_struct __user *buf,
44 struct task_struct *child);
45extern int set_fpregs(struct user_i387_struct __user *buf,
46 struct task_struct *child);
47
48extern void show_regs(struct pt_regs *regs);
49
50extern int arch_copy_tls(struct task_struct *new);
51extern void clear_flushed_tls(struct task_struct *task);
52
53#endif
54
55#endif
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h
deleted file mode 100644
index b2d24c5ea2c3..000000000000
--- a/include/asm-um/ptrace-i386.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PTRACE_I386_H
7#define __UM_PTRACE_I386_H
8
9#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
10
11#include "linux/compiler.h"
12#include "asm/ptrace-generic.h"
13#include <asm/user.h>
14#include "sysdep/ptrace.h"
15
16#define PT_REGS_EAX(r) UPT_EAX(&(r)->regs)
17#define PT_REGS_EBX(r) UPT_EBX(&(r)->regs)
18#define PT_REGS_ECX(r) UPT_ECX(&(r)->regs)
19#define PT_REGS_EDX(r) UPT_EDX(&(r)->regs)
20#define PT_REGS_ESI(r) UPT_ESI(&(r)->regs)
21#define PT_REGS_EDI(r) UPT_EDI(&(r)->regs)
22#define PT_REGS_EBP(r) UPT_EBP(&(r)->regs)
23
24#define PT_REGS_CS(r) UPT_CS(&(r)->regs)
25#define PT_REGS_SS(r) UPT_SS(&(r)->regs)
26#define PT_REGS_DS(r) UPT_DS(&(r)->regs)
27#define PT_REGS_ES(r) UPT_ES(&(r)->regs)
28#define PT_REGS_FS(r) UPT_FS(&(r)->regs)
29#define PT_REGS_GS(r) UPT_GS(&(r)->regs)
30
31#define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
32
33#define PT_REGS_ORIG_SYSCALL(r) PT_REGS_EAX(r)
34#define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r)
35#define PT_FIX_EXEC_STACK(sp) do ; while(0)
36
37/* Cope with a conditional i386 definition. */
38#undef profile_pc
39#define profile_pc(regs) PT_REGS_IP(regs)
40
41#define user_mode(r) UPT_IS_USER(&(r)->regs)
42
43/*
44 * Forward declaration to avoid including sysdep/tls.h, which causes a
45 * circular include, and compilation failures.
46 */
47struct user_desc;
48
49extern int get_fpxregs(struct user_fxsr_struct __user *buf,
50 struct task_struct *child);
51extern int set_fpxregs(struct user_fxsr_struct __user *buf,
52 struct task_struct *tsk);
53
54extern int ptrace_get_thread_area(struct task_struct *child, int idx,
55 struct user_desc __user *user_desc);
56
57extern int ptrace_set_thread_area(struct task_struct *child, int idx,
58 struct user_desc __user *user_desc);
59
60#endif
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h
deleted file mode 100644
index 4c475350dcf0..000000000000
--- a/include/asm-um/ptrace-x86_64.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PTRACE_X86_64_H
8#define __UM_PTRACE_X86_64_H
9
10#include "linux/compiler.h"
11#include "asm/errno.h"
12#include "asm/host_ldt.h"
13
14#define __FRAME_OFFSETS /* Needed to get the R* macros */
15#include "asm/ptrace-generic.h"
16
17#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
18
19/* Also defined in sysdep/ptrace.h, so may already be defined. */
20#ifndef FS_BASE
21#define FS_BASE (21 * sizeof(unsigned long))
22#define GS_BASE (22 * sizeof(unsigned long))
23#define DS (23 * sizeof(unsigned long))
24#define ES (24 * sizeof(unsigned long))
25#define FS (25 * sizeof(unsigned long))
26#define GS (26 * sizeof(unsigned long))
27#endif
28
29#define PT_REGS_RBX(r) UPT_RBX(&(r)->regs)
30#define PT_REGS_RCX(r) UPT_RCX(&(r)->regs)
31#define PT_REGS_RDX(r) UPT_RDX(&(r)->regs)
32#define PT_REGS_RSI(r) UPT_RSI(&(r)->regs)
33#define PT_REGS_RDI(r) UPT_RDI(&(r)->regs)
34#define PT_REGS_RBP(r) UPT_RBP(&(r)->regs)
35#define PT_REGS_RAX(r) UPT_RAX(&(r)->regs)
36#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
37#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
38#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
39#define PT_REGS_R11(r) UPT_R11(&(r)->regs)
40#define PT_REGS_R12(r) UPT_R12(&(r)->regs)
41#define PT_REGS_R13(r) UPT_R13(&(r)->regs)
42#define PT_REGS_R14(r) UPT_R14(&(r)->regs)
43#define PT_REGS_R15(r) UPT_R15(&(r)->regs)
44
45#define PT_REGS_FS(r) UPT_FS(&(r)->regs)
46#define PT_REGS_GS(r) UPT_GS(&(r)->regs)
47#define PT_REGS_DS(r) UPT_DS(&(r)->regs)
48#define PT_REGS_ES(r) UPT_ES(&(r)->regs)
49#define PT_REGS_SS(r) UPT_SS(&(r)->regs)
50#define PT_REGS_CS(r) UPT_CS(&(r)->regs)
51
52#define PT_REGS_ORIG_RAX(r) UPT_ORIG_RAX(&(r)->regs)
53#define PT_REGS_RIP(r) UPT_IP(&(r)->regs)
54#define PT_REGS_RSP(r) UPT_SP(&(r)->regs)
55
56#define PT_REGS_EFLAGS(r) UPT_EFLAGS(&(r)->regs)
57
58/* XXX */
59#define user_mode(r) UPT_IS_USER(&(r)->regs)
60#define PT_REGS_ORIG_SYSCALL(r) PT_REGS_RAX(r)
61#define PT_REGS_SYSCALL_RET(r) PT_REGS_RAX(r)
62
63#define PT_FIX_EXEC_STACK(sp) do ; while(0)
64
65#define profile_pc(regs) PT_REGS_IP(regs)
66
67static inline int ptrace_get_thread_area(struct task_struct *child, int idx,
68 struct user_desc __user *user_desc)
69{
70 return -ENOSYS;
71}
72
73static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
74 struct user_desc __user *user_desc)
75{
76 return -ENOSYS;
77}
78
79extern long arch_prctl(struct task_struct *task, int code,
80 unsigned long __user *addr);
81#endif
diff --git a/include/asm-um/required-features.h b/include/asm-um/required-features.h
deleted file mode 100644
index dfb967b2d2f3..000000000000
--- a/include/asm-um/required-features.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __UM_REQUIRED_FEATURES_H
2#define __UM_REQUIRED_FEATURES_H
3
4/*
5 * Nothing to see, just need something for the i386 and x86_64 asm
6 * headers to include.
7 */
8
9#endif
diff --git a/include/asm-um/resource.h b/include/asm-um/resource.h
deleted file mode 100644
index c9b074001252..000000000000
--- a/include/asm-um/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_RESOURCE_H
2#define __UM_RESOURCE_H
3
4#include "asm/arch/resource.h"
5
6#endif
diff --git a/include/asm-um/rwlock.h b/include/asm-um/rwlock.h
deleted file mode 100644
index ff383aafc9fe..000000000000
--- a/include/asm-um/rwlock.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_RWLOCK_H
2#define __UM_RWLOCK_H
3
4#include "asm/arch/rwlock.h"
5
6#endif
diff --git a/include/asm-um/rwsem.h b/include/asm-um/rwsem.h
deleted file mode 100644
index b5fc449dc86b..000000000000
--- a/include/asm-um/rwsem.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_RWSEM_H__
2#define __UM_RWSEM_H__
3
4#include "asm/arch/rwsem.h"
5
6#endif
diff --git a/include/asm-um/scatterlist.h b/include/asm-um/scatterlist.h
deleted file mode 100644
index e92016aa2079..000000000000
--- a/include/asm-um/scatterlist.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SCATTERLIST_H
2#define __UM_SCATTERLIST_H
3
4#include "asm/arch/scatterlist.h"
5
6#endif
diff --git a/include/asm-um/sections.h b/include/asm-um/sections.h
deleted file mode 100644
index 6b0231eefea8..000000000000
--- a/include/asm-um/sections.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _UM_SECTIONS_H
2#define _UM_SECTIONS_H
3
4/* nothing to see, move along */
5#include <asm-generic/sections.h>
6
7#endif
diff --git a/include/asm-um/segment.h b/include/asm-um/segment.h
deleted file mode 100644
index 45183fcd10b6..000000000000
--- a/include/asm-um/segment.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __UM_SEGMENT_H
2#define __UM_SEGMENT_H
3
4extern int host_gdt_entry_tls_min;
5
6#define GDT_ENTRY_TLS_ENTRIES 3
7#define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min
8#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
9
10#endif
diff --git a/include/asm-um/sembuf.h b/include/asm-um/sembuf.h
deleted file mode 100644
index 1ae82c14ff86..000000000000
--- a/include/asm-um/sembuf.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SEMBUF_H
2#define __UM_SEMBUF_H
3
4#include "asm/arch/sembuf.h"
5
6#endif
diff --git a/include/asm-um/serial.h b/include/asm-um/serial.h
deleted file mode 100644
index 61ad07cfd2d5..000000000000
--- a/include/asm-um/serial.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SERIAL_H
2#define __UM_SERIAL_H
3
4#include "asm/arch/serial.h"
5
6#endif
diff --git a/include/asm-um/setup.h b/include/asm-um/setup.h
deleted file mode 100644
index 99f086301f4c..000000000000
--- a/include/asm-um/setup.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef SETUP_H_INCLUDED
2#define SETUP_H_INCLUDED
3
4/* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the
5 * command line, so this choice is ok.
6 */
7
8#define COMMAND_LINE_SIZE 4096
9
10#endif /* SETUP_H_INCLUDED */
diff --git a/include/asm-um/shmbuf.h b/include/asm-um/shmbuf.h
deleted file mode 100644
index 9684d4a284a6..000000000000
--- a/include/asm-um/shmbuf.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SHMBUF_H
2#define __UM_SHMBUF_H
3
4#include "asm/arch/shmbuf.h"
5
6#endif
diff --git a/include/asm-um/shmparam.h b/include/asm-um/shmparam.h
deleted file mode 100644
index 124c00174f6a..000000000000
--- a/include/asm-um/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SHMPARAM_H
2#define __UM_SHMPARAM_H
3
4#include "asm/arch/shmparam.h"
5
6#endif
diff --git a/include/asm-um/sigcontext-generic.h b/include/asm-um/sigcontext-generic.h
deleted file mode 100644
index 164587014c61..000000000000
--- a/include/asm-um/sigcontext-generic.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SIGCONTEXT_GENERIC_H
2#define __UM_SIGCONTEXT_GENERIC_H
3
4#include "asm/arch/sigcontext.h"
5
6#endif
diff --git a/include/asm-um/sigcontext-i386.h b/include/asm-um/sigcontext-i386.h
deleted file mode 100644
index b88333f488bb..000000000000
--- a/include/asm-um/sigcontext-i386.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SIGCONTEXT_I386_H
2#define __UM_SIGCONTEXT_I386_H
3
4#include "asm/sigcontext-generic.h"
5
6#endif
diff --git a/include/asm-um/sigcontext-ppc.h b/include/asm-um/sigcontext-ppc.h
deleted file mode 100644
index 2467f20eda99..000000000000
--- a/include/asm-um/sigcontext-ppc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef __UM_SIGCONTEXT_PPC_H
2#define __UM_SIGCONTEXT_PPC_H
3
4#define pt_regs sys_pt_regs
5
6#include "asm/sigcontext-generic.h"
7
8#undef pt_regs
9
10#endif
diff --git a/include/asm-um/sigcontext-x86_64.h b/include/asm-um/sigcontext-x86_64.h
deleted file mode 100644
index b600e0b01e48..000000000000
--- a/include/asm-um/sigcontext-x86_64.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/* Copyright 2003 PathScale, Inc.
2 *
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_SIGCONTEXT_X86_64_H
7#define __UM_SIGCONTEXT_X86_64_H
8
9#include "asm/sigcontext-generic.h"
10
11#endif
12
13/*
14 * Overrides for Emacs so that we follow Linus's tabbing style.
15 * Emacs will notice this stuff at the end of the file and automatically
16 * adjust the settings for this buffer only. This must remain at the end
17 * of the file.
18 * ---------------------------------------------------------------------------
19 * Local variables:
20 * c-file-style: "linux"
21 * End:
22 */
diff --git a/include/asm-um/siginfo.h b/include/asm-um/siginfo.h
deleted file mode 100644
index bec6124c36d0..000000000000
--- a/include/asm-um/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SIGINFO_H
2#define __UM_SIGINFO_H
3
4#include "asm/arch/siginfo.h"
5
6#endif
diff --git a/include/asm-um/signal.h b/include/asm-um/signal.h
deleted file mode 100644
index 52ed92cbce4c..000000000000
--- a/include/asm-um/signal.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_SIGNAL_H
7#define __UM_SIGNAL_H
8
9/* Need to kill the do_signal() declaration in the i386 signal.h */
10
11#define do_signal do_signal_renamed
12#include "asm/arch/signal.h"
13#undef do_signal
14#undef ptrace_signal_deliver
15
16#define ptrace_signal_deliver(regs, cookie) do {} while(0)
17
18#endif
19
20/*
21 * Overrides for Emacs so that we follow Linus's tabbing style.
22 * Emacs will notice this stuff at the end of the file and automatically
23 * adjust the settings for this buffer only. This must remain at the end
24 * of the file.
25 * ---------------------------------------------------------------------------
26 * Local variables:
27 * c-file-style: "linux"
28 * End:
29 */
diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h
deleted file mode 100644
index f27a96313174..000000000000
--- a/include/asm-um/smp.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __UM_SMP_H
2#define __UM_SMP_H
3
4#ifdef CONFIG_SMP
5
6#include "linux/bitops.h"
7#include "asm/current.h"
8#include "linux/cpumask.h"
9
10#define raw_smp_processor_id() (current_thread->cpu)
11
12#define cpu_logical_map(n) (n)
13#define cpu_number_map(n) (n)
14#define PROC_CHANGE_PENALTY 15 /* Pick a number, any number */
15extern int hard_smp_processor_id(void);
16#define NO_PROC_ID -1
17
18extern int ncpus;
19
20
21static inline void smp_cpus_done(unsigned int maxcpus)
22{
23}
24
25extern struct task_struct *idle_threads[NR_CPUS];
26
27#else
28
29#define hard_smp_processor_id() 0
30
31#endif
32
33#endif
diff --git a/include/asm-um/socket.h b/include/asm-um/socket.h
deleted file mode 100644
index 67886e42ef04..000000000000
--- a/include/asm-um/socket.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SOCKET_H
2#define __UM_SOCKET_H
3
4#include "asm/arch/socket.h"
5
6#endif
diff --git a/include/asm-um/sockios.h b/include/asm-um/sockios.h
deleted file mode 100644
index 93ee1c55c4d6..000000000000
--- a/include/asm-um/sockios.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SOCKIOS_H
2#define __UM_SOCKIOS_H
3
4#include "asm/arch/sockios.h"
5
6#endif
diff --git a/include/asm-um/spinlock.h b/include/asm-um/spinlock.h
deleted file mode 100644
index f18c82886992..000000000000
--- a/include/asm-um/spinlock.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SPINLOCK_H
2#define __UM_SPINLOCK_H
3
4#include "asm/arch/spinlock.h"
5
6#endif
diff --git a/include/asm-um/spinlock_types.h b/include/asm-um/spinlock_types.h
deleted file mode 100644
index e5a94294bf82..000000000000
--- a/include/asm-um/spinlock_types.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SPINLOCK_TYPES_H
2#define __UM_SPINLOCK_TYPES_H
3
4#include "asm/arch/spinlock_types.h"
5
6#endif
diff --git a/include/asm-um/stat.h b/include/asm-um/stat.h
deleted file mode 100644
index 83ed85ad2539..000000000000
--- a/include/asm-um/stat.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_STAT_H
2#define __UM_STAT_H
3
4#include "asm/arch/stat.h"
5
6#endif
diff --git a/include/asm-um/statfs.h b/include/asm-um/statfs.h
deleted file mode 100644
index ba6fb53e7f87..000000000000
--- a/include/asm-um/statfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _UM_STATFS_H
2#define _UM_STATFS_H
3
4#include "asm/arch/statfs.h"
5
6#endif
diff --git a/include/asm-um/string.h b/include/asm-um/string.h
deleted file mode 100644
index 9a0571f6dd61..000000000000
--- a/include/asm-um/string.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __UM_STRING_H
2#define __UM_STRING_H
3
4#include "asm/arch/string.h"
5#include "asm/archparam.h"
6
7#endif
diff --git a/include/asm-um/suspend.h b/include/asm-um/suspend.h
deleted file mode 100644
index f4e8e007f468..000000000000
--- a/include/asm-um/suspend.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __UM_SUSPEND_H
2#define __UM_SUSPEND_H
3
4#endif
diff --git a/include/asm-um/system-generic.h b/include/asm-um/system-generic.h
deleted file mode 100644
index 5bcfa35e7a22..000000000000
--- a/include/asm-um/system-generic.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef __UM_SYSTEM_GENERIC_H
2#define __UM_SYSTEM_GENERIC_H
3
4#include "asm/arch/system.h"
5
6#undef switch_to
7#undef local_irq_save
8#undef local_irq_restore
9#undef local_irq_disable
10#undef local_irq_enable
11#undef local_save_flags
12#undef local_irq_restore
13#undef local_irq_enable
14#undef local_irq_disable
15#undef local_irq_save
16#undef irqs_disabled
17
18extern void *switch_to(void *prev, void *next, void *last);
19
20extern int get_signals(void);
21extern int set_signals(int enable);
22extern int get_signals(void);
23extern void block_signals(void);
24extern void unblock_signals(void);
25
26#define local_save_flags(flags) do { typecheck(unsigned long, flags); \
27 (flags) = get_signals(); } while(0)
28#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \
29 set_signals(flags); } while(0)
30
31#define local_irq_save(flags) do { local_save_flags(flags); \
32 local_irq_disable(); } while(0)
33
34#define local_irq_enable() unblock_signals()
35#define local_irq_disable() block_signals()
36
37#define irqs_disabled() \
38({ \
39 unsigned long flags; \
40 local_save_flags(flags); \
41 (flags == 0); \
42})
43
44extern void *_switch_to(void *prev, void *next, void *last);
45#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
46
47#endif
diff --git a/include/asm-um/system-i386.h b/include/asm-um/system-i386.h
deleted file mode 100644
index c436263e67ba..000000000000
--- a/include/asm-um/system-i386.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_SYSTEM_I386_H
2#define __UM_SYSTEM_I386_H
3
4#include "asm/system-generic.h"
5
6#endif
diff --git a/include/asm-um/system-ppc.h b/include/asm-um/system-ppc.h
deleted file mode 100644
index 17cde6640bf5..000000000000
--- a/include/asm-um/system-ppc.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __UM_SYSTEM_PPC_H
2#define __UM_SYSTEM_PPC_H
3
4#define _switch_to _ppc_switch_to
5
6#include "asm/arch/system.h"
7
8#undef _switch_to
9
10#include "asm/system-generic.h"
11
12#endif
diff --git a/include/asm-um/system-x86_64.h b/include/asm-um/system-x86_64.h
deleted file mode 100644
index e1b61b580734..000000000000
--- a/include/asm-um/system-x86_64.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_SYSTEM_X86_64_H
8#define __UM_SYSTEM_X86_64_H
9
10#include "asm/system-generic.h"
11
12#endif
13
14/*
15 * Overrides for Emacs so that we follow Linus's tabbing style.
16 * Emacs will notice this stuff at the end of the file and automatically
17 * adjust the settings for this buffer only. This must remain at the end
18 * of the file.
19 * ---------------------------------------------------------------------------
20 * Local variables:
21 * c-file-style: "linux"
22 * End:
23 */
diff --git a/include/asm-um/termbits.h b/include/asm-um/termbits.h
deleted file mode 100644
index 5739c608a2cb..000000000000
--- a/include/asm-um/termbits.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_TERMBITS_H
2#define __UM_TERMBITS_H
3
4#include "asm/arch/termbits.h"
5
6#endif
diff --git a/include/asm-um/termios.h b/include/asm-um/termios.h
deleted file mode 100644
index d9f97b303311..000000000000
--- a/include/asm-um/termios.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_TERMIOS_H
2#define __UM_TERMIOS_H
3
4#include "asm/arch/termios.h"
5
6#endif
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h
deleted file mode 100644
index e07e72846c7a..000000000000
--- a/include/asm-um/thread_info.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_THREAD_INFO_H
7#define __UM_THREAD_INFO_H
8
9#ifndef __ASSEMBLY__
10
11#include <asm/types.h>
12#include <asm/page.h>
13#include <asm/uaccess.h>
14
15struct thread_info {
16 struct task_struct *task; /* main task structure */
17 struct exec_domain *exec_domain; /* execution domain */
18 unsigned long flags; /* low level flags */
19 __u32 cpu; /* current CPU */
20 int preempt_count; /* 0 => preemptable,
21 <0 => BUG */
22 mm_segment_t addr_limit; /* thread address space:
23 0-0xBFFFFFFF for user
24 0-0xFFFFFFFF for kernel */
25 struct restart_block restart_block;
26 struct thread_info *real_thread; /* Points to non-IRQ stack */
27};
28
29#define INIT_THREAD_INFO(tsk) \
30{ \
31 .task = &tsk, \
32 .exec_domain = &default_exec_domain, \
33 .flags = 0, \
34 .cpu = 0, \
35 .preempt_count = 1, \
36 .addr_limit = KERNEL_DS, \
37 .restart_block = { \
38 .fn = do_no_restart_syscall, \
39 }, \
40 .real_thread = NULL, \
41}
42
43#define init_thread_info (init_thread_union.thread_info)
44#define init_stack (init_thread_union.stack)
45
46#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
47/* how to get the thread information struct from C */
48static inline struct thread_info *current_thread_info(void)
49{
50 struct thread_info *ti;
51 unsigned long mask = THREAD_SIZE - 1;
52 ti = (struct thread_info *) (((unsigned long) &ti) & ~mask);
53 return ti;
54}
55
56#define THREAD_SIZE_ORDER CONFIG_KERNEL_STACK_ORDER
57
58#endif
59
60#define PREEMPT_ACTIVE 0x10000000
61
62#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
63#define TIF_SIGPENDING 1 /* signal pending */
64#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
65#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
66 * TIF_NEED_RESCHED
67 */
68#define TIF_RESTART_BLOCK 4
69#define TIF_MEMDIE 5
70#define TIF_SYSCALL_AUDIT 6
71#define TIF_RESTORE_SIGMASK 7
72
73#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
74#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
75#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
76#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
77#define _TIF_MEMDIE (1 << TIF_MEMDIE)
78#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
79#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
80
81#endif
diff --git a/include/asm-um/timex.h b/include/asm-um/timex.h
deleted file mode 100644
index 0f4ada08f748..000000000000
--- a/include/asm-um/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __UM_TIMEX_H
2#define __UM_TIMEX_H
3
4typedef unsigned long cycles_t;
5
6static inline cycles_t get_cycles (void)
7{
8 return 0;
9}
10
11#define CLOCK_TICK_RATE (HZ)
12
13#endif
diff --git a/include/asm-um/tlb.h b/include/asm-um/tlb.h
deleted file mode 100644
index 5240fa1c5e08..000000000000
--- a/include/asm-um/tlb.h
+++ /dev/null
@@ -1,127 +0,0 @@
1#ifndef __UM_TLB_H
2#define __UM_TLB_H
3
4#include <linux/pagemap.h>
5#include <linux/swap.h>
6#include <asm/percpu.h>
7#include <asm/pgalloc.h>
8#include <asm/tlbflush.h>
9
10#define tlb_start_vma(tlb, vma) do { } while (0)
11#define tlb_end_vma(tlb, vma) do { } while (0)
12#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
13
14/* struct mmu_gather is an opaque type used by the mm code for passing around
15 * any data needed by arch specific code for tlb_remove_page.
16 */
17struct mmu_gather {
18 struct mm_struct *mm;
19 unsigned int need_flush; /* Really unmapped some ptes? */
20 unsigned long start;
21 unsigned long end;
22 unsigned int fullmm; /* non-zero means full mm flush */
23};
24
25/* Users of the generic TLB shootdown code must declare this storage space. */
26DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
27
28static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
29 unsigned long address)
30{
31 if (tlb->start > address)
32 tlb->start = address;
33 if (tlb->end < address + PAGE_SIZE)
34 tlb->end = address + PAGE_SIZE;
35}
36
37static inline void init_tlb_gather(struct mmu_gather *tlb)
38{
39 tlb->need_flush = 0;
40
41 tlb->start = TASK_SIZE;
42 tlb->end = 0;
43
44 if (tlb->fullmm) {
45 tlb->start = 0;
46 tlb->end = TASK_SIZE;
47 }
48}
49
50/* tlb_gather_mmu
51 * Return a pointer to an initialized struct mmu_gather.
52 */
53static inline struct mmu_gather *
54tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
55{
56 struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);
57
58 tlb->mm = mm;
59 tlb->fullmm = full_mm_flush;
60
61 init_tlb_gather(tlb);
62
63 return tlb;
64}
65
66extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
67 unsigned long end);
68
69static inline void
70tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
71{
72 if (!tlb->need_flush)
73 return;
74
75 flush_tlb_mm_range(tlb->mm, tlb->start, tlb->end);
76 init_tlb_gather(tlb);
77}
78
79/* tlb_finish_mmu
80 * Called at the end of the shootdown operation to free up any resources
81 * that were required.
82 */
83static inline void
84tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
85{
86 tlb_flush_mmu(tlb, start, end);
87
88 /* keep the page table cache within bounds */
89 check_pgt_cache();
90
91 put_cpu_var(mmu_gathers);
92}
93
94/* tlb_remove_page
95 * Must perform the equivalent to __free_pte(pte_get_and_clear(ptep)),
96 * while handling the additional races in SMP caused by other CPUs
97 * caching valid mappings in their TLBs.
98 */
99static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
100{
101 tlb->need_flush = 1;
102 free_page_and_swap_cache(page);
103 return;
104}
105
106/**
107 * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation.
108 *
109 * Record the fact that pte's were really umapped in ->need_flush, so we can
110 * later optimise away the tlb invalidate. This helps when userspace is
111 * unmapping already-unmapped pages, which happens quite a lot.
112 */
113#define tlb_remove_tlb_entry(tlb, ptep, address) \
114 do { \
115 tlb->need_flush = 1; \
116 __tlb_remove_tlb_entry(tlb, ptep, address); \
117 } while (0)
118
119#define pte_free_tlb(tlb, ptep) __pte_free_tlb(tlb, ptep)
120
121#define pud_free_tlb(tlb, pudp) __pud_free_tlb(tlb, pudp)
122
123#define pmd_free_tlb(tlb, pmdp) __pmd_free_tlb(tlb, pmdp)
124
125#define tlb_migrate_finish(mm) do {} while (0)
126
127#endif
diff --git a/include/asm-um/tlbflush.h b/include/asm-um/tlbflush.h
deleted file mode 100644
index 614f2c091178..000000000000
--- a/include/asm-um/tlbflush.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_TLBFLUSH_H
7#define __UM_TLBFLUSH_H
8
9#include <linux/mm.h>
10
11/*
12 * TLB flushing:
13 *
14 * - flush_tlb() flushes the current mm struct TLBs
15 * - flush_tlb_all() flushes all processes TLBs
16 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
17 * - flush_tlb_page(vma, vmaddr) flushes one page
18 * - flush_tlb_kernel_vm() flushes the kernel vm area
19 * - flush_tlb_range(vma, start, end) flushes a range of pages
20 */
21
22extern void flush_tlb_all(void);
23extern void flush_tlb_mm(struct mm_struct *mm);
24extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
25 unsigned long end);
26extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long address);
27extern void flush_tlb_kernel_vm(void);
28extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
29extern void __flush_tlb_one(unsigned long addr);
30
31#endif
diff --git a/include/asm-um/topology.h b/include/asm-um/topology.h
deleted file mode 100644
index 0905e4f21d42..000000000000
--- a/include/asm-um/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_UM_TOPOLOGY_H
2#define _ASM_UM_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif
diff --git a/include/asm-um/types.h b/include/asm-um/types.h
deleted file mode 100644
index 816e9590fc73..000000000000
--- a/include/asm-um/types.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_TYPES_H
2#define __UM_TYPES_H
3
4#include "asm/arch/types.h"
5
6#endif
diff --git a/include/asm-um/uaccess.h b/include/asm-um/uaccess.h
deleted file mode 100644
index b9a895d6fa1d..000000000000
--- a/include/asm-um/uaccess.h
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_UACCESS_H
7#define __UM_UACCESS_H
8
9#include <asm/errno.h>
10#include <asm/processor.h>
11
12/* thread_info has a mm_segment_t in it, so put the definition up here */
13typedef struct {
14 unsigned long seg;
15} mm_segment_t;
16
17#include "linux/thread_info.h"
18
19#define VERIFY_READ 0
20#define VERIFY_WRITE 1
21
22/*
23 * The fs value determines whether argument validity checking should be
24 * performed or not. If get_fs() == USER_DS, checking is performed, with
25 * get_fs() == KERNEL_DS, checking is bypassed.
26 *
27 * For historical reasons, these macros are grossly misnamed.
28 */
29
30#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
31
32#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF)
33#define USER_DS MAKE_MM_SEG(TASK_SIZE)
34
35#define get_ds() (KERNEL_DS)
36#define get_fs() (current_thread_info()->addr_limit)
37#define set_fs(x) (current_thread_info()->addr_limit = (x))
38
39#define segment_eq(a, b) ((a).seg == (b).seg)
40
41#include "um_uaccess.h"
42
43#define __copy_from_user(to, from, n) copy_from_user(to, from, n)
44
45#define __copy_to_user(to, from, n) copy_to_user(to, from, n)
46
47#define __copy_to_user_inatomic __copy_to_user
48#define __copy_from_user_inatomic __copy_from_user
49
50#define __get_user(x, ptr) \
51({ \
52 const __typeof__(*(ptr)) __user *__private_ptr = (ptr); \
53 __typeof__(x) __private_val; \
54 int __private_ret = -EFAULT; \
55 (x) = (__typeof__(*(__private_ptr)))0; \
56 if (__copy_from_user((__force void *)&__private_val, (__private_ptr),\
57 sizeof(*(__private_ptr))) == 0) { \
58 (x) = (__typeof__(*(__private_ptr))) __private_val; \
59 __private_ret = 0; \
60 } \
61 __private_ret; \
62})
63
64#define get_user(x, ptr) \
65({ \
66 const __typeof__((*(ptr))) __user *private_ptr = (ptr); \
67 (access_ok(VERIFY_READ, private_ptr, sizeof(*private_ptr)) ? \
68 __get_user(x, private_ptr) : ((x) = (__typeof__(*ptr))0, -EFAULT)); \
69})
70
71#define __put_user(x, ptr) \
72({ \
73 __typeof__(*(ptr)) __user *__private_ptr = ptr; \
74 __typeof__(*(__private_ptr)) __private_val; \
75 int __private_ret = -EFAULT; \
76 __private_val = (__typeof__(*(__private_ptr))) (x); \
77 if (__copy_to_user((__private_ptr), &__private_val, \
78 sizeof(*(__private_ptr))) == 0) { \
79 __private_ret = 0; \
80 } \
81 __private_ret; \
82})
83
84#define put_user(x, ptr) \
85({ \
86 __typeof__(*(ptr)) __user *private_ptr = (ptr); \
87 (access_ok(VERIFY_WRITE, private_ptr, sizeof(*private_ptr)) ? \
88 __put_user(x, private_ptr) : -EFAULT); \
89})
90
91#define strlen_user(str) strnlen_user(str, ~0U >> 1)
92
93struct exception_table_entry
94{
95 unsigned long insn;
96 unsigned long fixup;
97};
98
99#endif
diff --git a/include/asm-um/ucontext.h b/include/asm-um/ucontext.h
deleted file mode 100644
index 5c96c0e607f0..000000000000
--- a/include/asm-um/ucontext.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_UM_UCONTEXT_H
2#define _ASM_UM_UCONTEXT_H
3
4#include "asm/arch/ucontext.h"
5
6#endif
diff --git a/include/asm-um/unaligned.h b/include/asm-um/unaligned.h
deleted file mode 100644
index a47196974e39..000000000000
--- a/include/asm-um/unaligned.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_UM_UNALIGNED_H
2#define _ASM_UM_UNALIGNED_H
3
4#include "asm/arch/unaligned.h"
5
6#endif /* _ASM_UM_UNALIGNED_H */
diff --git a/include/asm-um/unistd.h b/include/asm-um/unistd.h
deleted file mode 100644
index 38bd9d94ee46..000000000000
--- a/include/asm-um/unistd.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2004 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef _UM_UNISTD_H_
7#define _UM_UNISTD_H_
8
9#include <linux/syscalls.h>
10#include "linux/resource.h"
11#include "asm/uaccess.h"
12
13extern int um_execve(const char *file, char *const argv[], char *const env[]);
14
15#ifdef __KERNEL__
16/* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */
17#define __ARCH_WANT_OLD_READDIR
18#define __ARCH_WANT_SYS_ALARM
19#define __ARCH_WANT_SYS_GETHOSTNAME
20#define __ARCH_WANT_SYS_PAUSE
21#define __ARCH_WANT_SYS_SGETMASK
22#define __ARCH_WANT_SYS_SIGNAL
23#define __ARCH_WANT_SYS_TIME
24#define __ARCH_WANT_SYS_UTIME
25#define __ARCH_WANT_SYS_WAITPID
26#define __ARCH_WANT_SYS_SOCKETCALL
27#define __ARCH_WANT_SYS_FADVISE64
28#define __ARCH_WANT_SYS_GETPGRP
29#define __ARCH_WANT_SYS_LLSEEK
30#define __ARCH_WANT_SYS_NICE
31#define __ARCH_WANT_SYS_OLD_GETRLIMIT
32#define __ARCH_WANT_SYS_OLDUMOUNT
33#define __ARCH_WANT_SYS_SIGPENDING
34#define __ARCH_WANT_SYS_SIGPROCMASK
35#define __ARCH_WANT_SYS_RT_SIGACTION
36#define __ARCH_WANT_SYS_RT_SIGSUSPEND
37#endif
38
39#include "asm/arch/unistd.h"
40
41#endif /* _UM_UNISTD_H_*/
diff --git a/include/asm-um/user.h b/include/asm-um/user.h
deleted file mode 100644
index aae414ee1f5e..000000000000
--- a/include/asm-um/user.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_USER_H
2#define __UM_USER_H
3
4#include "asm/arch/user.h"
5
6#endif
diff --git a/include/asm-um/vga.h b/include/asm-um/vga.h
deleted file mode 100644
index 903a592b00d0..000000000000
--- a/include/asm-um/vga.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_VGA_H
2#define __UM_VGA_H
3
4#include "asm/arch/vga.h"
5
6#endif
diff --git a/include/asm-um/vm-flags-i386.h b/include/asm-um/vm-flags-i386.h
deleted file mode 100644
index e0d24c568dbc..000000000000
--- a/include/asm-um/vm-flags-i386.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __VM_FLAGS_I386_H
7#define __VM_FLAGS_I386_H
8
9#define VM_DATA_DEFAULT_FLAGS \
10 (VM_READ | VM_WRITE | \
11 ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
12 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
13
14#endif
diff --git a/include/asm-um/vm-flags-x86_64.h b/include/asm-um/vm-flags-x86_64.h
deleted file mode 100644
index 3213edfa7888..000000000000
--- a/include/asm-um/vm-flags-x86_64.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
3 * Copyright 2003 PathScale, Inc.
4 * Licensed under the GPL
5 */
6
7#ifndef __VM_FLAGS_X86_64_H
8#define __VM_FLAGS_X86_64_H
9
10#define __VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
11 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
12#define __VM_STACK_FLAGS (VM_GROWSDOWN | VM_READ | VM_WRITE | \
13 VM_EXEC | VM_MAYREAD | VM_MAYWRITE | \
14 VM_MAYEXEC)
15
16extern unsigned long vm_stack_flags, vm_stack_flags32;
17extern unsigned long vm_data_default_flags, vm_data_default_flags32;
18extern unsigned long vm_force_exec32;
19
20#ifdef TIF_IA32
21#define VM_DATA_DEFAULT_FLAGS \
22 (test_thread_flag(TIF_IA32) ? vm_data_default_flags32 : \
23 vm_data_default_flags)
24
25#define VM_STACK_DEFAULT_FLAGS \
26 (test_thread_flag(TIF_IA32) ? vm_stack_flags32 : vm_stack_flags)
27#endif
28
29#define VM_DATA_DEFAULT_FLAGS vm_data_default_flags
30
31#define VM_STACK_DEFAULT_FLAGS vm_stack_flags
32
33#endif
diff --git a/include/asm-um/vm86.h b/include/asm-um/vm86.h
deleted file mode 100644
index 7801f82de1f4..000000000000
--- a/include/asm-um/vm86.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_VM86_H
2#define __UM_VM86_H
3
4#include "asm/arch/vm86.h"
5
6#endif
diff --git a/include/asm-um/xor.h b/include/asm-um/xor.h
deleted file mode 100644
index a19db3e17241..000000000000
--- a/include/asm-um/xor.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __UM_XOR_H
2#define __UM_XOR_H
3
4#include "asm-generic/xor.h"
5
6#endif
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
deleted file mode 100644
index 4a8e80cdcfa5..000000000000
--- a/include/asm-x86/Kbuild
+++ /dev/null
@@ -1,24 +0,0 @@
1include include/asm-generic/Kbuild.asm
2
3header-y += boot.h
4header-y += bootparam.h
5header-y += debugreg.h
6header-y += ldt.h
7header-y += msr-index.h
8header-y += prctl.h
9header-y += ptrace-abi.h
10header-y += sigcontext32.h
11header-y += ucontext.h
12header-y += processor-flags.h
13
14unifdef-y += e820.h
15unifdef-y += ist.h
16unifdef-y += mce.h
17unifdef-y += msr.h
18unifdef-y += mtrr.h
19unifdef-y += posix_types_32.h
20unifdef-y += posix_types_64.h
21unifdef-y += unistd_32.h
22unifdef-y += unistd_64.h
23unifdef-y += vm86.h
24unifdef-y += vsyscall.h
diff --git a/include/asm-x86/a.out-core.h b/include/asm-x86/a.out-core.h
deleted file mode 100644
index f5705761a37b..000000000000
--- a/include/asm-x86/a.out-core.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/* a.out coredump register dumper
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef ASM_X86__A_OUT_CORE_H
13#define ASM_X86__A_OUT_CORE_H
14
15#ifdef __KERNEL__
16#ifdef CONFIG_X86_32
17
18#include <linux/user.h>
19#include <linux/elfcore.h>
20
21/*
22 * fill in the user structure for an a.out core dump
23 */
24static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
25{
26 u16 gs;
27
28/* changed the size calculations - should hopefully work better. lbt */
29 dump->magic = CMAGIC;
30 dump->start_code = 0;
31 dump->start_stack = regs->sp & ~(PAGE_SIZE - 1);
32 dump->u_tsize = ((unsigned long)current->mm->end_code) >> PAGE_SHIFT;
33 dump->u_dsize = ((unsigned long)(current->mm->brk + (PAGE_SIZE - 1)))
34 >> PAGE_SHIFT;
35 dump->u_dsize -= dump->u_tsize;
36 dump->u_ssize = 0;
37 dump->u_debugreg[0] = current->thread.debugreg0;
38 dump->u_debugreg[1] = current->thread.debugreg1;
39 dump->u_debugreg[2] = current->thread.debugreg2;
40 dump->u_debugreg[3] = current->thread.debugreg3;
41 dump->u_debugreg[4] = 0;
42 dump->u_debugreg[5] = 0;
43 dump->u_debugreg[6] = current->thread.debugreg6;
44 dump->u_debugreg[7] = current->thread.debugreg7;
45
46 if (dump->start_stack < TASK_SIZE)
47 dump->u_ssize = ((unsigned long)(TASK_SIZE - dump->start_stack))
48 >> PAGE_SHIFT;
49
50 dump->regs.bx = regs->bx;
51 dump->regs.cx = regs->cx;
52 dump->regs.dx = regs->dx;
53 dump->regs.si = regs->si;
54 dump->regs.di = regs->di;
55 dump->regs.bp = regs->bp;
56 dump->regs.ax = regs->ax;
57 dump->regs.ds = (u16)regs->ds;
58 dump->regs.es = (u16)regs->es;
59 dump->regs.fs = (u16)regs->fs;
60 savesegment(gs, gs);
61 dump->regs.orig_ax = regs->orig_ax;
62 dump->regs.ip = regs->ip;
63 dump->regs.cs = (u16)regs->cs;
64 dump->regs.flags = regs->flags;
65 dump->regs.sp = regs->sp;
66 dump->regs.ss = (u16)regs->ss;
67
68 dump->u_fpvalid = dump_fpu(regs, &dump->i387);
69}
70
71#endif /* CONFIG_X86_32 */
72#endif /* __KERNEL__ */
73#endif /* ASM_X86__A_OUT_CORE_H */
diff --git a/include/asm-x86/a.out.h b/include/asm-x86/a.out.h
deleted file mode 100644
index 0948748bc69c..000000000000
--- a/include/asm-x86/a.out.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef ASM_X86__A_OUT_H
2#define ASM_X86__A_OUT_H
3
4struct exec
5{
6 unsigned int a_info; /* Use macros N_MAGIC, etc for access */
7 unsigned a_text; /* length of text, in bytes */
8 unsigned a_data; /* length of data, in bytes */
9 unsigned a_bss; /* length of uninitialized data area for file, in bytes */
10 unsigned a_syms; /* length of symbol table data in file, in bytes */
11 unsigned a_entry; /* start address */
12 unsigned a_trsize; /* length of relocation info for text, in bytes */
13 unsigned a_drsize; /* length of relocation info for data, in bytes */
14};
15
16#define N_TRSIZE(a) ((a).a_trsize)
17#define N_DRSIZE(a) ((a).a_drsize)
18#define N_SYMSIZE(a) ((a).a_syms)
19
20#endif /* ASM_X86__A_OUT_H */
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h
deleted file mode 100644
index 392e17336be1..000000000000
--- a/include/asm-x86/acpi.h
+++ /dev/null
@@ -1,178 +0,0 @@
1#ifndef ASM_X86__ACPI_H
2#define ASM_X86__ACPI_H
3
4/*
5 * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
6 * Copyright (C) 2001 Patrick Mochel <mochel@osdl.org>
7 *
8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 */
26#include <acpi/pdc_intel.h>
27
28#include <asm/numa.h>
29#include <asm/processor.h>
30#include <asm/mmu.h>
31#include <asm/mpspec.h>
32
33#define COMPILER_DEPENDENT_INT64 long long
34#define COMPILER_DEPENDENT_UINT64 unsigned long long
35
36/*
37 * Calling conventions:
38 *
39 * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads)
40 * ACPI_EXTERNAL_XFACE - External ACPI interfaces
41 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
42 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
43 */
44#define ACPI_SYSTEM_XFACE
45#define ACPI_EXTERNAL_XFACE
46#define ACPI_INTERNAL_XFACE
47#define ACPI_INTERNAL_VAR_XFACE
48
49/* Asm macros */
50
51#define ACPI_ASM_MACROS
52#define BREAKPOINT3
53#define ACPI_DISABLE_IRQS() local_irq_disable()
54#define ACPI_ENABLE_IRQS() local_irq_enable()
55#define ACPI_FLUSH_CPU_CACHE() wbinvd()
56
57int __acpi_acquire_global_lock(unsigned int *lock);
58int __acpi_release_global_lock(unsigned int *lock);
59
60#define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \
61 ((Acq) = __acpi_acquire_global_lock(&facs->global_lock))
62
63#define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq) \
64 ((Acq) = __acpi_release_global_lock(&facs->global_lock))
65
66/*
67 * Math helper asm macros
68 */
69#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
70 asm("divl %2;" \
71 : "=a"(q32), "=d"(r32) \
72 : "r"(d32), \
73 "0"(n_lo), "1"(n_hi))
74
75
76#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
77 asm("shrl $1,%2 ;" \
78 "rcrl $1,%3;" \
79 : "=r"(n_hi), "=r"(n_lo) \
80 : "0"(n_hi), "1"(n_lo))
81
82#ifdef CONFIG_ACPI
83extern int acpi_lapic;
84extern int acpi_ioapic;
85extern int acpi_noirq;
86extern int acpi_strict;
87extern int acpi_disabled;
88extern int acpi_ht;
89extern int acpi_pci_disabled;
90extern int acpi_skip_timer_override;
91extern int acpi_use_timer_override;
92
93extern u8 acpi_sci_flags;
94extern int acpi_sci_override_gsi;
95void acpi_pic_sci_set_trigger(unsigned int, u16);
96
97static inline void disable_acpi(void)
98{
99 acpi_disabled = 1;
100 acpi_ht = 0;
101 acpi_pci_disabled = 1;
102 acpi_noirq = 1;
103}
104
105/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
106#define FIX_ACPI_PAGES 4
107
108extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
109
110static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
111static inline void acpi_disable_pci(void)
112{
113 acpi_pci_disabled = 1;
114 acpi_noirq_set();
115}
116extern int acpi_irq_balance_set(char *str);
117
118/* routines for saving/restoring kernel state */
119extern int acpi_save_state_mem(void);
120extern void acpi_restore_state_mem(void);
121
122extern unsigned long acpi_wakeup_address;
123
124/* early initialization routine */
125extern void acpi_reserve_bootmem(void);
126
127/*
128 * Check if the CPU can handle C2 and deeper
129 */
130static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
131{
132 /*
133 * Early models (<=5) of AMD Opterons are not supposed to go into
134 * C2 state.
135 *
136 * Steppings 0x0A and later are good
137 */
138 if (boot_cpu_data.x86 == 0x0F &&
139 boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
140 boot_cpu_data.x86_model <= 0x05 &&
141 boot_cpu_data.x86_mask < 0x0A)
142 return 1;
143 else if (boot_cpu_has(X86_FEATURE_AMDC1E))
144 return 1;
145 else
146 return max_cstate;
147}
148
149#else /* !CONFIG_ACPI */
150
151#define acpi_lapic 0
152#define acpi_ioapic 0
153static inline void acpi_noirq_set(void) { }
154static inline void acpi_disable_pci(void) { }
155static inline void disable_acpi(void) { }
156
157#endif /* !CONFIG_ACPI */
158
159#define ARCH_HAS_POWER_INIT 1
160
161struct bootnode;
162
163#ifdef CONFIG_ACPI_NUMA
164extern int acpi_numa;
165extern int acpi_scan_nodes(unsigned long start, unsigned long end);
166#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
167extern void acpi_fake_nodes(const struct bootnode *fake_nodes,
168 int num_nodes);
169#else
170static inline void acpi_fake_nodes(const struct bootnode *fake_nodes,
171 int num_nodes)
172{
173}
174#endif
175
176#define acpi_unlazy_tlb(x) leave_mm(x)
177
178#endif /* ASM_X86__ACPI_H */
diff --git a/include/asm-x86/agp.h b/include/asm-x86/agp.h
deleted file mode 100644
index 3617fd4fcdf9..000000000000
--- a/include/asm-x86/agp.h
+++ /dev/null
@@ -1,35 +0,0 @@
1#ifndef ASM_X86__AGP_H
2#define ASM_X86__AGP_H
3
4#include <asm/pgtable.h>
5#include <asm/cacheflush.h>
6
7/*
8 * Functions to keep the agpgart mappings coherent with the MMU. The
9 * GART gives the CPU a physical alias of pages in memory. The alias
10 * region is mapped uncacheable. Make sure there are no conflicting
11 * mappings with different cachability attributes for the same
12 * page. This avoids data corruption on some CPUs.
13 */
14
15#define map_page_into_agp(page) set_pages_uc(page, 1)
16#define unmap_page_from_agp(page) set_pages_wb(page, 1)
17
18/*
19 * Could use CLFLUSH here if the cpu supports it. But then it would
20 * need to be called for each cacheline of the whole page so it may
21 * not be worth it. Would need a page for it.
22 */
23#define flush_agp_cache() wbinvd()
24
25/* Convert a physical address to an address suitable for the GART. */
26#define phys_to_gart(x) (x)
27#define gart_to_phys(x) (x)
28
29/* GATT allocation. Returns/accepts GATT kernel virtual address. */
30#define alloc_gatt_pages(order) \
31 ((char *)__get_free_pages(GFP_KERNEL, (order)))
32#define free_gatt_pages(table, order) \
33 free_pages((unsigned long)(table), (order))
34
35#endif /* ASM_X86__AGP_H */
diff --git a/include/asm-x86/alternative-asm.h b/include/asm-x86/alternative-asm.h
deleted file mode 100644
index e2077d343c33..000000000000
--- a/include/asm-x86/alternative-asm.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifdef __ASSEMBLY__
2
3#ifdef CONFIG_X86_32
4# define X86_ALIGN .long
5#else
6# define X86_ALIGN .quad
7#endif
8
9#ifdef CONFIG_SMP
10 .macro LOCK_PREFIX
111: lock
12 .section .smp_locks,"a"
13 .align 4
14 X86_ALIGN 1b
15 .previous
16 .endm
17#else
18 .macro LOCK_PREFIX
19 .endm
20#endif
21
22#endif /* __ASSEMBLY__ */
diff --git a/include/asm-x86/alternative.h b/include/asm-x86/alternative.h
deleted file mode 100644
index 22d3c9862bf3..000000000000
--- a/include/asm-x86/alternative.h
+++ /dev/null
@@ -1,183 +0,0 @@
1#ifndef ASM_X86__ALTERNATIVE_H
2#define ASM_X86__ALTERNATIVE_H
3
4#include <linux/types.h>
5#include <linux/stddef.h>
6#include <asm/asm.h>
7
8/*
9 * Alternative inline assembly for SMP.
10 *
11 * The LOCK_PREFIX macro defined here replaces the LOCK and
12 * LOCK_PREFIX macros used everywhere in the source tree.
13 *
14 * SMP alternatives use the same data structures as the other
15 * alternatives and the X86_FEATURE_UP flag to indicate the case of a
16 * UP system running a SMP kernel. The existing apply_alternatives()
17 * works fine for patching a SMP kernel for UP.
18 *
19 * The SMP alternative tables can be kept after boot and contain both
20 * UP and SMP versions of the instructions to allow switching back to
21 * SMP at runtime, when hotplugging in a new CPU, which is especially
22 * useful in virtualized environments.
23 *
24 * The very common lock prefix is handled as special case in a
25 * separate table which is a pure address list without replacement ptr
26 * and size information. That keeps the table sizes small.
27 */
28
29#ifdef CONFIG_SMP
30#define LOCK_PREFIX \
31 ".section .smp_locks,\"a\"\n" \
32 _ASM_ALIGN "\n" \
33 _ASM_PTR "661f\n" /* address */ \
34 ".previous\n" \
35 "661:\n\tlock; "
36
37#else /* ! CONFIG_SMP */
38#define LOCK_PREFIX ""
39#endif
40
41/* This must be included *after* the definition of LOCK_PREFIX */
42#include <asm/cpufeature.h>
43
44struct alt_instr {
45 u8 *instr; /* original instruction */
46 u8 *replacement;
47 u8 cpuid; /* cpuid bit set for replacement */
48 u8 instrlen; /* length of original instruction */
49 u8 replacementlen; /* length of new instruction, <= instrlen */
50 u8 pad1;
51#ifdef CONFIG_X86_64
52 u32 pad2;
53#endif
54};
55
56extern void alternative_instructions(void);
57extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
58
59struct module;
60
61#ifdef CONFIG_SMP
62extern void alternatives_smp_module_add(struct module *mod, char *name,
63 void *locks, void *locks_end,
64 void *text, void *text_end);
65extern void alternatives_smp_module_del(struct module *mod);
66extern void alternatives_smp_switch(int smp);
67#else
68static inline void alternatives_smp_module_add(struct module *mod, char *name,
69 void *locks, void *locks_end,
70 void *text, void *text_end) {}
71static inline void alternatives_smp_module_del(struct module *mod) {}
72static inline void alternatives_smp_switch(int smp) {}
73#endif /* CONFIG_SMP */
74
75const unsigned char *const *find_nop_table(void);
76
77/*
78 * Alternative instructions for different CPU types or capabilities.
79 *
80 * This allows to use optimized instructions even on generic binary
81 * kernels.
82 *
83 * length of oldinstr must be longer or equal the length of newinstr
84 * It can be padded with nops as needed.
85 *
86 * For non barrier like inlines please define new variants
87 * without volatile and memory clobber.
88 */
89#define alternative(oldinstr, newinstr, feature) \
90 asm volatile ("661:\n\t" oldinstr "\n662:\n" \
91 ".section .altinstructions,\"a\"\n" \
92 _ASM_ALIGN "\n" \
93 _ASM_PTR "661b\n" /* label */ \
94 _ASM_PTR "663f\n" /* new instruction */ \
95 " .byte %c0\n" /* feature bit */ \
96 " .byte 662b-661b\n" /* sourcelen */ \
97 " .byte 664f-663f\n" /* replacementlen */ \
98 ".previous\n" \
99 ".section .altinstr_replacement,\"ax\"\n" \
100 "663:\n\t" newinstr "\n664:\n" /* replacement */ \
101 ".previous" :: "i" (feature) : "memory")
102
103/*
104 * Alternative inline assembly with input.
105 *
106 * Pecularities:
107 * No memory clobber here.
108 * Argument numbers start with 1.
109 * Best is to use constraints that are fixed size (like (%1) ... "r")
110 * If you use variable sized constraints like "m" or "g" in the
111 * replacement make sure to pad to the worst case length.
112 */
113#define alternative_input(oldinstr, newinstr, feature, input...) \
114 asm volatile ("661:\n\t" oldinstr "\n662:\n" \
115 ".section .altinstructions,\"a\"\n" \
116 _ASM_ALIGN "\n" \
117 _ASM_PTR "661b\n" /* label */ \
118 _ASM_PTR "663f\n" /* new instruction */ \
119 " .byte %c0\n" /* feature bit */ \
120 " .byte 662b-661b\n" /* sourcelen */ \
121 " .byte 664f-663f\n" /* replacementlen */ \
122 ".previous\n" \
123 ".section .altinstr_replacement,\"ax\"\n" \
124 "663:\n\t" newinstr "\n664:\n" /* replacement */ \
125 ".previous" :: "i" (feature), ##input)
126
127/* Like alternative_input, but with a single output argument */
128#define alternative_io(oldinstr, newinstr, feature, output, input...) \
129 asm volatile ("661:\n\t" oldinstr "\n662:\n" \
130 ".section .altinstructions,\"a\"\n" \
131 _ASM_ALIGN "\n" \
132 _ASM_PTR "661b\n" /* label */ \
133 _ASM_PTR "663f\n" /* new instruction */ \
134 " .byte %c[feat]\n" /* feature bit */ \
135 " .byte 662b-661b\n" /* sourcelen */ \
136 " .byte 664f-663f\n" /* replacementlen */ \
137 ".previous\n" \
138 ".section .altinstr_replacement,\"ax\"\n" \
139 "663:\n\t" newinstr "\n664:\n" /* replacement */ \
140 ".previous" : output : [feat] "i" (feature), ##input)
141
142/*
143 * use this macro(s) if you need more than one output parameter
144 * in alternative_io
145 */
146#define ASM_OUTPUT2(a, b) a, b
147
148struct paravirt_patch_site;
149#ifdef CONFIG_PARAVIRT
150void apply_paravirt(struct paravirt_patch_site *start,
151 struct paravirt_patch_site *end);
152#else
153static inline void apply_paravirt(struct paravirt_patch_site *start,
154 struct paravirt_patch_site *end)
155{}
156#define __parainstructions NULL
157#define __parainstructions_end NULL
158#endif
159
160extern void add_nops(void *insns, unsigned int len);
161
162/*
163 * Clear and restore the kernel write-protection flag on the local CPU.
164 * Allows the kernel to edit read-only pages.
165 * Side-effect: any interrupt handler running between save and restore will have
166 * the ability to write to read-only pages.
167 *
168 * Warning:
169 * Code patching in the UP case is safe if NMIs and MCE handlers are stopped and
170 * no thread can be preempted in the instructions being modified (no iret to an
171 * invalid instruction possible) or if the instructions are changed from a
172 * consistent state to another consistent state atomically.
173 * More care must be taken when modifying code in the SMP case because of
174 * Intel's errata.
175 * On the local CPU you need to be protected again NMI or MCE handlers seeing an
176 * inconsistent instruction while you patch.
177 * The _early version expects the memory to already be RW.
178 */
179
180extern void *text_poke(void *addr, const void *opcode, size_t len);
181extern void *text_poke_early(void *addr, const void *opcode, size_t len);
182
183#endif /* ASM_X86__ALTERNATIVE_H */
diff --git a/include/asm-x86/amd_iommu.h b/include/asm-x86/amd_iommu.h
deleted file mode 100644
index 041d0db7da27..000000000000
--- a/include/asm-x86/amd_iommu.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
3 * Author: Joerg Roedel <joerg.roedel@amd.com>
4 * Leo Duran <leo.duran@amd.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef ASM_X86__AMD_IOMMU_H
21#define ASM_X86__AMD_IOMMU_H
22
23#include <linux/irqreturn.h>
24
25#ifdef CONFIG_AMD_IOMMU
26extern int amd_iommu_init(void);
27extern int amd_iommu_init_dma_ops(void);
28extern void amd_iommu_detect(void);
29extern irqreturn_t amd_iommu_int_handler(int irq, void *data);
30#else
31static inline int amd_iommu_init(void) { return -ENODEV; }
32static inline void amd_iommu_detect(void) { }
33#endif
34
35#endif /* ASM_X86__AMD_IOMMU_H */
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h
deleted file mode 100644
index b3085869a17b..000000000000
--- a/include/asm-x86/amd_iommu_types.h
+++ /dev/null
@@ -1,404 +0,0 @@
1/*
2 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
3 * Author: Joerg Roedel <joerg.roedel@amd.com>
4 * Leo Duran <leo.duran@amd.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef ASM_X86__AMD_IOMMU_TYPES_H
21#define ASM_X86__AMD_IOMMU_TYPES_H
22
23#include <linux/types.h>
24#include <linux/list.h>
25#include <linux/spinlock.h>
26
27/*
28 * some size calculation constants
29 */
30#define DEV_TABLE_ENTRY_SIZE 32
31#define ALIAS_TABLE_ENTRY_SIZE 2
32#define RLOOKUP_TABLE_ENTRY_SIZE (sizeof(void *))
33
34/* Length of the MMIO region for the AMD IOMMU */
35#define MMIO_REGION_LENGTH 0x4000
36
37/* Capability offsets used by the driver */
38#define MMIO_CAP_HDR_OFFSET 0x00
39#define MMIO_RANGE_OFFSET 0x0c
40#define MMIO_MISC_OFFSET 0x10
41
42/* Masks, shifts and macros to parse the device range capability */
43#define MMIO_RANGE_LD_MASK 0xff000000
44#define MMIO_RANGE_FD_MASK 0x00ff0000
45#define MMIO_RANGE_BUS_MASK 0x0000ff00
46#define MMIO_RANGE_LD_SHIFT 24
47#define MMIO_RANGE_FD_SHIFT 16
48#define MMIO_RANGE_BUS_SHIFT 8
49#define MMIO_GET_LD(x) (((x) & MMIO_RANGE_LD_MASK) >> MMIO_RANGE_LD_SHIFT)
50#define MMIO_GET_FD(x) (((x) & MMIO_RANGE_FD_MASK) >> MMIO_RANGE_FD_SHIFT)
51#define MMIO_GET_BUS(x) (((x) & MMIO_RANGE_BUS_MASK) >> MMIO_RANGE_BUS_SHIFT)
52#define MMIO_MSI_NUM(x) ((x) & 0x1f)
53
54/* Flag masks for the AMD IOMMU exclusion range */
55#define MMIO_EXCL_ENABLE_MASK 0x01ULL
56#define MMIO_EXCL_ALLOW_MASK 0x02ULL
57
58/* Used offsets into the MMIO space */
59#define MMIO_DEV_TABLE_OFFSET 0x0000
60#define MMIO_CMD_BUF_OFFSET 0x0008
61#define MMIO_EVT_BUF_OFFSET 0x0010
62#define MMIO_CONTROL_OFFSET 0x0018
63#define MMIO_EXCL_BASE_OFFSET 0x0020
64#define MMIO_EXCL_LIMIT_OFFSET 0x0028
65#define MMIO_CMD_HEAD_OFFSET 0x2000
66#define MMIO_CMD_TAIL_OFFSET 0x2008
67#define MMIO_EVT_HEAD_OFFSET 0x2010
68#define MMIO_EVT_TAIL_OFFSET 0x2018
69#define MMIO_STATUS_OFFSET 0x2020
70
71/* MMIO status bits */
72#define MMIO_STATUS_COM_WAIT_INT_MASK 0x04
73
74/* event logging constants */
75#define EVENT_ENTRY_SIZE 0x10
76#define EVENT_TYPE_SHIFT 28
77#define EVENT_TYPE_MASK 0xf
78#define EVENT_TYPE_ILL_DEV 0x1
79#define EVENT_TYPE_IO_FAULT 0x2
80#define EVENT_TYPE_DEV_TAB_ERR 0x3
81#define EVENT_TYPE_PAGE_TAB_ERR 0x4
82#define EVENT_TYPE_ILL_CMD 0x5
83#define EVENT_TYPE_CMD_HARD_ERR 0x6
84#define EVENT_TYPE_IOTLB_INV_TO 0x7
85#define EVENT_TYPE_INV_DEV_REQ 0x8
86#define EVENT_DEVID_MASK 0xffff
87#define EVENT_DEVID_SHIFT 0
88#define EVENT_DOMID_MASK 0xffff
89#define EVENT_DOMID_SHIFT 0
90#define EVENT_FLAGS_MASK 0xfff
91#define EVENT_FLAGS_SHIFT 0x10
92
93/* feature control bits */
94#define CONTROL_IOMMU_EN 0x00ULL
95#define CONTROL_HT_TUN_EN 0x01ULL
96#define CONTROL_EVT_LOG_EN 0x02ULL
97#define CONTROL_EVT_INT_EN 0x03ULL
98#define CONTROL_COMWAIT_EN 0x04ULL
99#define CONTROL_PASSPW_EN 0x08ULL
100#define CONTROL_RESPASSPW_EN 0x09ULL
101#define CONTROL_COHERENT_EN 0x0aULL
102#define CONTROL_ISOC_EN 0x0bULL
103#define CONTROL_CMDBUF_EN 0x0cULL
104#define CONTROL_PPFLOG_EN 0x0dULL
105#define CONTROL_PPFINT_EN 0x0eULL
106
107/* command specific defines */
108#define CMD_COMPL_WAIT 0x01
109#define CMD_INV_DEV_ENTRY 0x02
110#define CMD_INV_IOMMU_PAGES 0x03
111
112#define CMD_COMPL_WAIT_STORE_MASK 0x01
113#define CMD_COMPL_WAIT_INT_MASK 0x02
114#define CMD_INV_IOMMU_PAGES_SIZE_MASK 0x01
115#define CMD_INV_IOMMU_PAGES_PDE_MASK 0x02
116
117#define CMD_INV_IOMMU_ALL_PAGES_ADDRESS 0x7fffffffffffffffULL
118
119/* macros and definitions for device table entries */
120#define DEV_ENTRY_VALID 0x00
121#define DEV_ENTRY_TRANSLATION 0x01
122#define DEV_ENTRY_IR 0x3d
123#define DEV_ENTRY_IW 0x3e
124#define DEV_ENTRY_NO_PAGE_FAULT 0x62
125#define DEV_ENTRY_EX 0x67
126#define DEV_ENTRY_SYSMGT1 0x68
127#define DEV_ENTRY_SYSMGT2 0x69
128#define DEV_ENTRY_INIT_PASS 0xb8
129#define DEV_ENTRY_EINT_PASS 0xb9
130#define DEV_ENTRY_NMI_PASS 0xba
131#define DEV_ENTRY_LINT0_PASS 0xbe
132#define DEV_ENTRY_LINT1_PASS 0xbf
133#define DEV_ENTRY_MODE_MASK 0x07
134#define DEV_ENTRY_MODE_SHIFT 0x09
135
136/* constants to configure the command buffer */
137#define CMD_BUFFER_SIZE 8192
138#define CMD_BUFFER_ENTRIES 512
139#define MMIO_CMD_SIZE_SHIFT 56
140#define MMIO_CMD_SIZE_512 (0x9ULL << MMIO_CMD_SIZE_SHIFT)
141
142/* constants for event buffer handling */
143#define EVT_BUFFER_SIZE 8192 /* 512 entries */
144#define EVT_LEN_MASK (0x9ULL << 56)
145
146#define PAGE_MODE_1_LEVEL 0x01
147#define PAGE_MODE_2_LEVEL 0x02
148#define PAGE_MODE_3_LEVEL 0x03
149
150#define IOMMU_PDE_NL_0 0x000ULL
151#define IOMMU_PDE_NL_1 0x200ULL
152#define IOMMU_PDE_NL_2 0x400ULL
153#define IOMMU_PDE_NL_3 0x600ULL
154
155#define IOMMU_PTE_L2_INDEX(address) (((address) >> 30) & 0x1ffULL)
156#define IOMMU_PTE_L1_INDEX(address) (((address) >> 21) & 0x1ffULL)
157#define IOMMU_PTE_L0_INDEX(address) (((address) >> 12) & 0x1ffULL)
158
159#define IOMMU_MAP_SIZE_L1 (1ULL << 21)
160#define IOMMU_MAP_SIZE_L2 (1ULL << 30)
161#define IOMMU_MAP_SIZE_L3 (1ULL << 39)
162
163#define IOMMU_PTE_P (1ULL << 0)
164#define IOMMU_PTE_TV (1ULL << 1)
165#define IOMMU_PTE_U (1ULL << 59)
166#define IOMMU_PTE_FC (1ULL << 60)
167#define IOMMU_PTE_IR (1ULL << 61)
168#define IOMMU_PTE_IW (1ULL << 62)
169
170#define IOMMU_L1_PDE(address) \
171 ((address) | IOMMU_PDE_NL_1 | IOMMU_PTE_P | IOMMU_PTE_IR | IOMMU_PTE_IW)
172#define IOMMU_L2_PDE(address) \
173 ((address) | IOMMU_PDE_NL_2 | IOMMU_PTE_P | IOMMU_PTE_IR | IOMMU_PTE_IW)
174
175#define IOMMU_PAGE_MASK (((1ULL << 52) - 1) & ~0xfffULL)
176#define IOMMU_PTE_PRESENT(pte) ((pte) & IOMMU_PTE_P)
177#define IOMMU_PTE_PAGE(pte) (phys_to_virt((pte) & IOMMU_PAGE_MASK))
178#define IOMMU_PTE_MODE(pte) (((pte) >> 9) & 0x07)
179
180#define IOMMU_PROT_MASK 0x03
181#define IOMMU_PROT_IR 0x01
182#define IOMMU_PROT_IW 0x02
183
184/* IOMMU capabilities */
185#define IOMMU_CAP_IOTLB 24
186#define IOMMU_CAP_NPCACHE 26
187
188#define MAX_DOMAIN_ID 65536
189
190/* FIXME: move this macro to <linux/pci.h> */
191#define PCI_BUS(x) (((x) >> 8) & 0xff)
192
193/*
194 * This structure contains generic data for IOMMU protection domains
195 * independent of their use.
196 */
197struct protection_domain {
198 spinlock_t lock; /* mostly used to lock the page table*/
199 u16 id; /* the domain id written to the device table */
200 int mode; /* paging mode (0-6 levels) */
201 u64 *pt_root; /* page table root pointer */
202 void *priv; /* private data */
203};
204
205/*
206 * Data container for a dma_ops specific protection domain
207 */
208struct dma_ops_domain {
209 struct list_head list;
210
211 /* generic protection domain information */
212 struct protection_domain domain;
213
214 /* size of the aperture for the mappings */
215 unsigned long aperture_size;
216
217 /* address we start to search for free addresses */
218 unsigned long next_bit;
219
220 /* address allocation bitmap */
221 unsigned long *bitmap;
222
223 /*
224 * Array of PTE pages for the aperture. In this array we save all the
225 * leaf pages of the domain page table used for the aperture. This way
226 * we don't need to walk the page table to find a specific PTE. We can
227 * just calculate its address in constant time.
228 */
229 u64 **pte_pages;
230
231 /* This will be set to true when TLB needs to be flushed */
232 bool need_flush;
233
234 /*
235 * if this is a preallocated domain, keep the device for which it was
236 * preallocated in this variable
237 */
238 u16 target_dev;
239};
240
241/*
242 * Structure where we save information about one hardware AMD IOMMU in the
243 * system.
244 */
245struct amd_iommu {
246 struct list_head list;
247
248 /* locks the accesses to the hardware */
249 spinlock_t lock;
250
251 /* Pointer to PCI device of this IOMMU */
252 struct pci_dev *dev;
253
254 /*
255 * Capability pointer. There could be more than one IOMMU per PCI
256 * device function if there are more than one AMD IOMMU capability
257 * pointers.
258 */
259 u16 cap_ptr;
260
261 /* physical address of MMIO space */
262 u64 mmio_phys;
263 /* virtual address of MMIO space */
264 u8 *mmio_base;
265
266 /* capabilities of that IOMMU read from ACPI */
267 u32 cap;
268
269 /* pci domain of this IOMMU */
270 u16 pci_seg;
271
272 /* first device this IOMMU handles. read from PCI */
273 u16 first_device;
274 /* last device this IOMMU handles. read from PCI */
275 u16 last_device;
276
277 /* start of exclusion range of that IOMMU */
278 u64 exclusion_start;
279 /* length of exclusion range of that IOMMU */
280 u64 exclusion_length;
281
282 /* command buffer virtual address */
283 u8 *cmd_buf;
284 /* size of command buffer */
285 u32 cmd_buf_size;
286
287 /* event buffer virtual address */
288 u8 *evt_buf;
289 /* size of event buffer */
290 u32 evt_buf_size;
291 /* MSI number for event interrupt */
292 u16 evt_msi_num;
293
294 /* if one, we need to send a completion wait command */
295 int need_sync;
296
297 /* true if interrupts for this IOMMU are already enabled */
298 bool int_enabled;
299
300 /* default dma_ops domain for that IOMMU */
301 struct dma_ops_domain *default_dom;
302};
303
304/*
305 * List with all IOMMUs in the system. This list is not locked because it is
306 * only written and read at driver initialization or suspend time
307 */
308extern struct list_head amd_iommu_list;
309
310/*
311 * Structure defining one entry in the device table
312 */
313struct dev_table_entry {
314 u32 data[8];
315};
316
317/*
318 * One entry for unity mappings parsed out of the ACPI table.
319 */
320struct unity_map_entry {
321 struct list_head list;
322
323 /* starting device id this entry is used for (including) */
324 u16 devid_start;
325 /* end device id this entry is used for (including) */
326 u16 devid_end;
327
328 /* start address to unity map (including) */
329 u64 address_start;
330 /* end address to unity map (including) */
331 u64 address_end;
332
333 /* required protection */
334 int prot;
335};
336
337/*
338 * List of all unity mappings. It is not locked because as runtime it is only
339 * read. It is created at ACPI table parsing time.
340 */
341extern struct list_head amd_iommu_unity_map;
342
343/*
344 * Data structures for device handling
345 */
346
347/*
348 * Device table used by hardware. Read and write accesses by software are
349 * locked with the amd_iommu_pd_table lock.
350 */
351extern struct dev_table_entry *amd_iommu_dev_table;
352
353/*
354 * Alias table to find requestor ids to device ids. Not locked because only
355 * read on runtime.
356 */
357extern u16 *amd_iommu_alias_table;
358
359/*
360 * Reverse lookup table to find the IOMMU which translates a specific device.
361 */
362extern struct amd_iommu **amd_iommu_rlookup_table;
363
364/* size of the dma_ops aperture as power of 2 */
365extern unsigned amd_iommu_aperture_order;
366
367/* largest PCI device id we expect translation requests for */
368extern u16 amd_iommu_last_bdf;
369
370/* data structures for protection domain handling */
371extern struct protection_domain **amd_iommu_pd_table;
372
373/* allocation bitmap for domain ids */
374extern unsigned long *amd_iommu_pd_alloc_bitmap;
375
376/* will be 1 if device isolation is enabled */
377extern int amd_iommu_isolate;
378
379/*
380 * If true, the addresses will be flushed on unmap time, not when
381 * they are reused
382 */
383extern bool amd_iommu_unmap_flush;
384
385/* takes a PCI device id and prints it out in a readable form */
386static inline void print_devid(u16 devid, int nl)
387{
388 int bus = devid >> 8;
389 int dev = devid >> 3 & 0x1f;
390 int fn = devid & 0x07;
391
392 printk("%02x:%02x.%x", bus, dev, fn);
393 if (nl)
394 printk("\n");
395}
396
397/* takes bus and device/function and returns the device id
398 * FIXME: should that be in generic PCI code? */
399static inline u16 calc_devid(u8 bus, u8 devfn)
400{
401 return (((u16)bus) << 8) | devfn;
402}
403
404#endif /* ASM_X86__AMD_IOMMU_TYPES_H */
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
deleted file mode 100644
index d76a0839abe9..000000000000
--- a/include/asm-x86/apic.h
+++ /dev/null
@@ -1,187 +0,0 @@
1#ifndef ASM_X86__APIC_H
2#define ASM_X86__APIC_H
3
4#include <linux/pm.h>
5#include <linux/delay.h>
6
7#include <asm/alternative.h>
8#include <asm/fixmap.h>
9#include <asm/apicdef.h>
10#include <asm/processor.h>
11#include <asm/system.h>
12#include <asm/cpufeature.h>
13#include <asm/msr.h>
14
15#define ARCH_APICTIMER_STOPS_ON_C3 1
16
17/*
18 * Debugging macros
19 */
20#define APIC_QUIET 0
21#define APIC_VERBOSE 1
22#define APIC_DEBUG 2
23
24/*
25 * Define the default level of output to be very little
26 * This can be turned up by using apic=verbose for more
27 * information and apic=debug for _lots_ of information.
28 * apic_verbosity is defined in apic.c
29 */
30#define apic_printk(v, s, a...) do { \
31 if ((v) <= apic_verbosity) \
32 printk(s, ##a); \
33 } while (0)
34
35
36extern void generic_apic_probe(void);
37
38#ifdef CONFIG_X86_LOCAL_APIC
39
40extern unsigned int apic_verbosity;
41extern int local_apic_timer_c2_ok;
42
43extern int ioapic_force;
44
45extern int disable_apic;
46/*
47 * Basic functions accessing APICs.
48 */
49#ifdef CONFIG_PARAVIRT
50#include <asm/paravirt.h>
51#else
52#define setup_boot_clock setup_boot_APIC_clock
53#define setup_secondary_clock setup_secondary_APIC_clock
54#endif
55
56extern int is_vsmp_box(void);
57extern void xapic_wait_icr_idle(void);
58extern u32 safe_xapic_wait_icr_idle(void);
59extern u64 xapic_icr_read(void);
60extern void xapic_icr_write(u32, u32);
61extern int setup_profiling_timer(unsigned int);
62
63static inline void native_apic_mem_write(u32 reg, u32 v)
64{
65 volatile u32 *addr = (volatile u32 *)(APIC_BASE + reg);
66
67 alternative_io("movl %0, %1", "xchgl %0, %1", X86_FEATURE_11AP,
68 ASM_OUTPUT2("=r" (v), "=m" (*addr)),
69 ASM_OUTPUT2("0" (v), "m" (*addr)));
70}
71
72static inline u32 native_apic_mem_read(u32 reg)
73{
74 return *((volatile u32 *)(APIC_BASE + reg));
75}
76
77static inline void native_apic_msr_write(u32 reg, u32 v)
78{
79 if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR ||
80 reg == APIC_LVR)
81 return;
82
83 wrmsr(APIC_BASE_MSR + (reg >> 4), v, 0);
84}
85
86static inline u32 native_apic_msr_read(u32 reg)
87{
88 u32 low, high;
89
90 if (reg == APIC_DFR)
91 return -1;
92
93 rdmsr(APIC_BASE_MSR + (reg >> 4), low, high);
94 return low;
95}
96
97#ifndef CONFIG_X86_32
98extern int x2apic, x2apic_preenabled;
99extern void check_x2apic(void);
100extern void enable_x2apic(void);
101extern void enable_IR_x2apic(void);
102extern void x2apic_icr_write(u32 low, u32 id);
103#endif
104
105struct apic_ops {
106 u32 (*read)(u32 reg);
107 void (*write)(u32 reg, u32 v);
108 u64 (*icr_read)(void);
109 void (*icr_write)(u32 low, u32 high);
110 void (*wait_icr_idle)(void);
111 u32 (*safe_wait_icr_idle)(void);
112};
113
114extern struct apic_ops *apic_ops;
115
116#define apic_read (apic_ops->read)
117#define apic_write (apic_ops->write)
118#define apic_icr_read (apic_ops->icr_read)
119#define apic_icr_write (apic_ops->icr_write)
120#define apic_wait_icr_idle (apic_ops->wait_icr_idle)
121#define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle)
122
123extern int get_physical_broadcast(void);
124
125#ifdef CONFIG_X86_64
126static inline void ack_x2APIC_irq(void)
127{
128 /* Docs say use 0 for future compatibility */
129 native_apic_msr_write(APIC_EOI, 0);
130}
131#endif
132
133
134static inline void ack_APIC_irq(void)
135{
136 /*
137 * ack_APIC_irq() actually gets compiled as a single instruction
138 * ... yummie.
139 */
140
141 /* Docs say use 0 for future compatibility */
142 apic_write(APIC_EOI, 0);
143}
144
145extern int lapic_get_maxlvt(void);
146extern void clear_local_APIC(void);
147extern void connect_bsp_APIC(void);
148extern void disconnect_bsp_APIC(int virt_wire_setup);
149extern void disable_local_APIC(void);
150extern void lapic_shutdown(void);
151extern int verify_local_APIC(void);
152extern void cache_APIC_registers(void);
153extern void sync_Arb_IDs(void);
154extern void init_bsp_APIC(void);
155extern void setup_local_APIC(void);
156extern void end_local_APIC_setup(void);
157extern void init_apic_mappings(void);
158extern void setup_boot_APIC_clock(void);
159extern void setup_secondary_APIC_clock(void);
160extern int APIC_init_uniprocessor(void);
161extern void enable_NMI_through_LVT0(void);
162
163/*
164 * On 32bit this is mach-xxx local
165 */
166#ifdef CONFIG_X86_64
167extern void early_init_lapic_mapping(void);
168extern int apic_is_clustered_box(void);
169#else
170static inline int apic_is_clustered_box(void)
171{
172 return 0;
173}
174#endif
175
176extern u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask);
177extern u8 setup_APIC_eilvt_ibs(u8 vector, u8 msg_type, u8 mask);
178
179
180#else /* !CONFIG_X86_LOCAL_APIC */
181static inline void lapic_shutdown(void) { }
182#define local_apic_timer_c2_ok 1
183static inline void init_apic_mappings(void) { }
184
185#endif /* !CONFIG_X86_LOCAL_APIC */
186
187#endif /* ASM_X86__APIC_H */
diff --git a/include/asm-x86/apicdef.h b/include/asm-x86/apicdef.h
deleted file mode 100644
index b922c85ac91d..000000000000
--- a/include/asm-x86/apicdef.h
+++ /dev/null
@@ -1,417 +0,0 @@
1#ifndef ASM_X86__APICDEF_H
2#define ASM_X86__APICDEF_H
3
4/*
5 * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
6 *
7 * Alan Cox <Alan.Cox@linux.org>, 1995.
8 * Ingo Molnar <mingo@redhat.com>, 1999, 2000
9 */
10
11#define APIC_DEFAULT_PHYS_BASE 0xfee00000
12
13#define APIC_ID 0x20
14
15#define APIC_LVR 0x30
16#define APIC_LVR_MASK 0xFF00FF
17#define GET_APIC_VERSION(x) ((x) & 0xFFu)
18#define GET_APIC_MAXLVT(x) (((x) >> 16) & 0xFFu)
19#ifdef CONFIG_X86_32
20# define APIC_INTEGRATED(x) ((x) & 0xF0u)
21#else
22# define APIC_INTEGRATED(x) (1)
23#endif
24#define APIC_XAPIC(x) ((x) >= 0x14)
25#define APIC_TASKPRI 0x80
26#define APIC_TPRI_MASK 0xFFu
27#define APIC_ARBPRI 0x90
28#define APIC_ARBPRI_MASK 0xFFu
29#define APIC_PROCPRI 0xA0
30#define APIC_EOI 0xB0
31#define APIC_EIO_ACK 0x0
32#define APIC_RRR 0xC0
33#define APIC_LDR 0xD0
34#define APIC_LDR_MASK (0xFFu << 24)
35#define GET_APIC_LOGICAL_ID(x) (((x) >> 24) & 0xFFu)
36#define SET_APIC_LOGICAL_ID(x) (((x) << 24))
37#define APIC_ALL_CPUS 0xFFu
38#define APIC_DFR 0xE0
39#define APIC_DFR_CLUSTER 0x0FFFFFFFul
40#define APIC_DFR_FLAT 0xFFFFFFFFul
41#define APIC_SPIV 0xF0
42#define APIC_SPIV_FOCUS_DISABLED (1 << 9)
43#define APIC_SPIV_APIC_ENABLED (1 << 8)
44#define APIC_ISR 0x100
45#define APIC_ISR_NR 0x8 /* Number of 32 bit ISR registers. */
46#define APIC_TMR 0x180
47#define APIC_IRR 0x200
48#define APIC_ESR 0x280
49#define APIC_ESR_SEND_CS 0x00001
50#define APIC_ESR_RECV_CS 0x00002
51#define APIC_ESR_SEND_ACC 0x00004
52#define APIC_ESR_RECV_ACC 0x00008
53#define APIC_ESR_SENDILL 0x00020
54#define APIC_ESR_RECVILL 0x00040
55#define APIC_ESR_ILLREGA 0x00080
56#define APIC_ICR 0x300
57#define APIC_DEST_SELF 0x40000
58#define APIC_DEST_ALLINC 0x80000
59#define APIC_DEST_ALLBUT 0xC0000
60#define APIC_ICR_RR_MASK 0x30000
61#define APIC_ICR_RR_INVALID 0x00000
62#define APIC_ICR_RR_INPROG 0x10000
63#define APIC_ICR_RR_VALID 0x20000
64#define APIC_INT_LEVELTRIG 0x08000
65#define APIC_INT_ASSERT 0x04000
66#define APIC_ICR_BUSY 0x01000
67#define APIC_DEST_LOGICAL 0x00800
68#define APIC_DEST_PHYSICAL 0x00000
69#define APIC_DM_FIXED 0x00000
70#define APIC_DM_LOWEST 0x00100
71#define APIC_DM_SMI 0x00200
72#define APIC_DM_REMRD 0x00300
73#define APIC_DM_NMI 0x00400
74#define APIC_DM_INIT 0x00500
75#define APIC_DM_STARTUP 0x00600
76#define APIC_DM_EXTINT 0x00700
77#define APIC_VECTOR_MASK 0x000FF
78#define APIC_ICR2 0x310
79#define GET_APIC_DEST_FIELD(x) (((x) >> 24) & 0xFF)
80#define SET_APIC_DEST_FIELD(x) ((x) << 24)
81#define APIC_LVTT 0x320
82#define APIC_LVTTHMR 0x330
83#define APIC_LVTPC 0x340
84#define APIC_LVT0 0x350
85#define APIC_LVT_TIMER_BASE_MASK (0x3 << 18)
86#define GET_APIC_TIMER_BASE(x) (((x) >> 18) & 0x3)
87#define SET_APIC_TIMER_BASE(x) (((x) << 18))
88#define APIC_TIMER_BASE_CLKIN 0x0
89#define APIC_TIMER_BASE_TMBASE 0x1
90#define APIC_TIMER_BASE_DIV 0x2
91#define APIC_LVT_TIMER_PERIODIC (1 << 17)
92#define APIC_LVT_MASKED (1 << 16)
93#define APIC_LVT_LEVEL_TRIGGER (1 << 15)
94#define APIC_LVT_REMOTE_IRR (1 << 14)
95#define APIC_INPUT_POLARITY (1 << 13)
96#define APIC_SEND_PENDING (1 << 12)
97#define APIC_MODE_MASK 0x700
98#define GET_APIC_DELIVERY_MODE(x) (((x) >> 8) & 0x7)
99#define SET_APIC_DELIVERY_MODE(x, y) (((x) & ~0x700) | ((y) << 8))
100#define APIC_MODE_FIXED 0x0
101#define APIC_MODE_NMI 0x4
102#define APIC_MODE_EXTINT 0x7
103#define APIC_LVT1 0x360
104#define APIC_LVTERR 0x370
105#define APIC_TMICT 0x380
106#define APIC_TMCCT 0x390
107#define APIC_TDCR 0x3E0
108#define APIC_SELF_IPI 0x3F0
109#define APIC_TDR_DIV_TMBASE (1 << 2)
110#define APIC_TDR_DIV_1 0xB
111#define APIC_TDR_DIV_2 0x0
112#define APIC_TDR_DIV_4 0x1
113#define APIC_TDR_DIV_8 0x2
114#define APIC_TDR_DIV_16 0x3
115#define APIC_TDR_DIV_32 0x8
116#define APIC_TDR_DIV_64 0x9
117#define APIC_TDR_DIV_128 0xA
118#define APIC_EILVT0 0x500
119#define APIC_EILVT_NR_AMD_K8 1 /* # of extended interrupts */
120#define APIC_EILVT_NR_AMD_10H 4
121#define APIC_EILVT_LVTOFF(x) (((x) >> 4) & 0xF)
122#define APIC_EILVT_MSG_FIX 0x0
123#define APIC_EILVT_MSG_SMI 0x2
124#define APIC_EILVT_MSG_NMI 0x4
125#define APIC_EILVT_MSG_EXT 0x7
126#define APIC_EILVT_MASKED (1 << 16)
127#define APIC_EILVT1 0x510
128#define APIC_EILVT2 0x520
129#define APIC_EILVT3 0x530
130
131#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
132#define APIC_BASE_MSR 0x800
133#define X2APIC_ENABLE (1UL << 10)
134
135#ifdef CONFIG_X86_32
136# define MAX_IO_APICS 64
137#else
138# define MAX_IO_APICS 128
139# define MAX_LOCAL_APIC 32768
140#endif
141
142/*
143 * All x86-64 systems are xAPIC compatible.
144 * In the following, "apicid" is a physical APIC ID.
145 */
146#define XAPIC_DEST_CPUS_SHIFT 4
147#define XAPIC_DEST_CPUS_MASK ((1u << XAPIC_DEST_CPUS_SHIFT) - 1)
148#define XAPIC_DEST_CLUSTER_MASK (XAPIC_DEST_CPUS_MASK << XAPIC_DEST_CPUS_SHIFT)
149#define APIC_CLUSTER(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)
150#define APIC_CLUSTERID(apicid) (APIC_CLUSTER(apicid) >> XAPIC_DEST_CPUS_SHIFT)
151#define APIC_CPUID(apicid) ((apicid) & XAPIC_DEST_CPUS_MASK)
152#define NUM_APIC_CLUSTERS ((BAD_APICID + 1) >> XAPIC_DEST_CPUS_SHIFT)
153
154/*
155 * the local APIC register structure, memory mapped. Not terribly well
156 * tested, but we might eventually use this one in the future - the
157 * problem why we cannot use it right now is the P5 APIC, it has an
158 * errata which cannot take 8-bit reads and writes, only 32-bit ones ...
159 */
160#define u32 unsigned int
161
162struct local_apic {
163
164/*000*/ struct { u32 __reserved[4]; } __reserved_01;
165
166/*010*/ struct { u32 __reserved[4]; } __reserved_02;
167
168/*020*/ struct { /* APIC ID Register */
169 u32 __reserved_1 : 24,
170 phys_apic_id : 4,
171 __reserved_2 : 4;
172 u32 __reserved[3];
173 } id;
174
175/*030*/ const
176 struct { /* APIC Version Register */
177 u32 version : 8,
178 __reserved_1 : 8,
179 max_lvt : 8,
180 __reserved_2 : 8;
181 u32 __reserved[3];
182 } version;
183
184/*040*/ struct { u32 __reserved[4]; } __reserved_03;
185
186/*050*/ struct { u32 __reserved[4]; } __reserved_04;
187
188/*060*/ struct { u32 __reserved[4]; } __reserved_05;
189
190/*070*/ struct { u32 __reserved[4]; } __reserved_06;
191
192/*080*/ struct { /* Task Priority Register */
193 u32 priority : 8,
194 __reserved_1 : 24;
195 u32 __reserved_2[3];
196 } tpr;
197
198/*090*/ const
199 struct { /* Arbitration Priority Register */
200 u32 priority : 8,
201 __reserved_1 : 24;
202 u32 __reserved_2[3];
203 } apr;
204
205/*0A0*/ const
206 struct { /* Processor Priority Register */
207 u32 priority : 8,
208 __reserved_1 : 24;
209 u32 __reserved_2[3];
210 } ppr;
211
212/*0B0*/ struct { /* End Of Interrupt Register */
213 u32 eoi;
214 u32 __reserved[3];
215 } eoi;
216
217/*0C0*/ struct { u32 __reserved[4]; } __reserved_07;
218
219/*0D0*/ struct { /* Logical Destination Register */
220 u32 __reserved_1 : 24,
221 logical_dest : 8;
222 u32 __reserved_2[3];
223 } ldr;
224
225/*0E0*/ struct { /* Destination Format Register */
226 u32 __reserved_1 : 28,
227 model : 4;
228 u32 __reserved_2[3];
229 } dfr;
230
231/*0F0*/ struct { /* Spurious Interrupt Vector Register */
232 u32 spurious_vector : 8,
233 apic_enabled : 1,
234 focus_cpu : 1,
235 __reserved_2 : 22;
236 u32 __reserved_3[3];
237 } svr;
238
239/*100*/ struct { /* In Service Register */
240/*170*/ u32 bitfield;
241 u32 __reserved[3];
242 } isr [8];
243
244/*180*/ struct { /* Trigger Mode Register */
245/*1F0*/ u32 bitfield;
246 u32 __reserved[3];
247 } tmr [8];
248
249/*200*/ struct { /* Interrupt Request Register */
250/*270*/ u32 bitfield;
251 u32 __reserved[3];
252 } irr [8];
253
254/*280*/ union { /* Error Status Register */
255 struct {
256 u32 send_cs_error : 1,
257 receive_cs_error : 1,
258 send_accept_error : 1,
259 receive_accept_error : 1,
260 __reserved_1 : 1,
261 send_illegal_vector : 1,
262 receive_illegal_vector : 1,
263 illegal_register_address : 1,
264 __reserved_2 : 24;
265 u32 __reserved_3[3];
266 } error_bits;
267 struct {
268 u32 errors;
269 u32 __reserved_3[3];
270 } all_errors;
271 } esr;
272
273/*290*/ struct { u32 __reserved[4]; } __reserved_08;
274
275/*2A0*/ struct { u32 __reserved[4]; } __reserved_09;
276
277/*2B0*/ struct { u32 __reserved[4]; } __reserved_10;
278
279/*2C0*/ struct { u32 __reserved[4]; } __reserved_11;
280
281/*2D0*/ struct { u32 __reserved[4]; } __reserved_12;
282
283/*2E0*/ struct { u32 __reserved[4]; } __reserved_13;
284
285/*2F0*/ struct { u32 __reserved[4]; } __reserved_14;
286
287/*300*/ struct { /* Interrupt Command Register 1 */
288 u32 vector : 8,
289 delivery_mode : 3,
290 destination_mode : 1,
291 delivery_status : 1,
292 __reserved_1 : 1,
293 level : 1,
294 trigger : 1,
295 __reserved_2 : 2,
296 shorthand : 2,
297 __reserved_3 : 12;
298 u32 __reserved_4[3];
299 } icr1;
300
301/*310*/ struct { /* Interrupt Command Register 2 */
302 union {
303 u32 __reserved_1 : 24,
304 phys_dest : 4,
305 __reserved_2 : 4;
306 u32 __reserved_3 : 24,
307 logical_dest : 8;
308 } dest;
309 u32 __reserved_4[3];
310 } icr2;
311
312/*320*/ struct { /* LVT - Timer */
313 u32 vector : 8,
314 __reserved_1 : 4,
315 delivery_status : 1,
316 __reserved_2 : 3,
317 mask : 1,
318 timer_mode : 1,
319 __reserved_3 : 14;
320 u32 __reserved_4[3];
321 } lvt_timer;
322
323/*330*/ struct { /* LVT - Thermal Sensor */
324 u32 vector : 8,
325 delivery_mode : 3,
326 __reserved_1 : 1,
327 delivery_status : 1,
328 __reserved_2 : 3,
329 mask : 1,
330 __reserved_3 : 15;
331 u32 __reserved_4[3];
332 } lvt_thermal;
333
334/*340*/ struct { /* LVT - Performance Counter */
335 u32 vector : 8,
336 delivery_mode : 3,
337 __reserved_1 : 1,
338 delivery_status : 1,
339 __reserved_2 : 3,
340 mask : 1,
341 __reserved_3 : 15;
342 u32 __reserved_4[3];
343 } lvt_pc;
344
345/*350*/ struct { /* LVT - LINT0 */
346 u32 vector : 8,
347 delivery_mode : 3,
348 __reserved_1 : 1,
349 delivery_status : 1,
350 polarity : 1,
351 remote_irr : 1,
352 trigger : 1,
353 mask : 1,
354 __reserved_2 : 15;
355 u32 __reserved_3[3];
356 } lvt_lint0;
357
358/*360*/ struct { /* LVT - LINT1 */
359 u32 vector : 8,
360 delivery_mode : 3,
361 __reserved_1 : 1,
362 delivery_status : 1,
363 polarity : 1,
364 remote_irr : 1,
365 trigger : 1,
366 mask : 1,
367 __reserved_2 : 15;
368 u32 __reserved_3[3];
369 } lvt_lint1;
370
371/*370*/ struct { /* LVT - Error */
372 u32 vector : 8,
373 __reserved_1 : 4,
374 delivery_status : 1,
375 __reserved_2 : 3,
376 mask : 1,
377 __reserved_3 : 15;
378 u32 __reserved_4[3];
379 } lvt_error;
380
381/*380*/ struct { /* Timer Initial Count Register */
382 u32 initial_count;
383 u32 __reserved_2[3];
384 } timer_icr;
385
386/*390*/ const
387 struct { /* Timer Current Count Register */
388 u32 curr_count;
389 u32 __reserved_2[3];
390 } timer_ccr;
391
392/*3A0*/ struct { u32 __reserved[4]; } __reserved_16;
393
394/*3B0*/ struct { u32 __reserved[4]; } __reserved_17;
395
396/*3C0*/ struct { u32 __reserved[4]; } __reserved_18;
397
398/*3D0*/ struct { u32 __reserved[4]; } __reserved_19;
399
400/*3E0*/ struct { /* Timer Divide Configuration Register */
401 u32 divisor : 4,
402 __reserved_1 : 28;
403 u32 __reserved_2[3];
404 } timer_dcr;
405
406/*3F0*/ struct { u32 __reserved[4]; } __reserved_20;
407
408} __attribute__ ((packed));
409
410#undef u32
411
412#ifdef CONFIG_X86_32
413 #define BAD_APICID 0xFFu
414#else
415 #define BAD_APICID 0xFFFFu
416#endif
417#endif /* ASM_X86__APICDEF_H */
diff --git a/include/asm-x86/arch_hooks.h b/include/asm-x86/arch_hooks.h
deleted file mode 100644
index de4596b24c23..000000000000
--- a/include/asm-x86/arch_hooks.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef ASM_X86__ARCH_HOOKS_H
2#define ASM_X86__ARCH_HOOKS_H
3
4#include <linux/interrupt.h>
5
6/*
7 * linux/include/asm/arch_hooks.h
8 *
9 * define the architecture specific hooks
10 */
11
12/* these aren't arch hooks, they are generic routines
13 * that can be used by the hooks */
14extern void init_ISA_irqs(void);
15extern irqreturn_t timer_interrupt(int irq, void *dev_id);
16
17/* these are the defined hooks */
18extern void intr_init_hook(void);
19extern void pre_intr_init_hook(void);
20extern void pre_setup_arch_hook(void);
21extern void trap_init_hook(void);
22extern void pre_time_init_hook(void);
23extern void time_init_hook(void);
24extern void mca_nmi_hook(void);
25
26#endif /* ASM_X86__ARCH_HOOKS_H */
diff --git a/include/asm-x86/asm.h b/include/asm-x86/asm.h
deleted file mode 100644
index e1355f44d7c3..000000000000
--- a/include/asm-x86/asm.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef ASM_X86__ASM_H
2#define ASM_X86__ASM_H
3
4#ifdef __ASSEMBLY__
5# define __ASM_FORM(x) x
6# define __ASM_EX_SEC .section __ex_table
7#else
8# define __ASM_FORM(x) " " #x " "
9# define __ASM_EX_SEC " .section __ex_table,\"a\"\n"
10#endif
11
12#ifdef CONFIG_X86_32
13# define __ASM_SEL(a,b) __ASM_FORM(a)
14#else
15# define __ASM_SEL(a,b) __ASM_FORM(b)
16#endif
17
18#define __ASM_SIZE(inst) __ASM_SEL(inst##l, inst##q)
19#define __ASM_REG(reg) __ASM_SEL(e##reg, r##reg)
20
21#define _ASM_PTR __ASM_SEL(.long, .quad)
22#define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8)
23
24#define _ASM_MOV __ASM_SIZE(mov)
25#define _ASM_INC __ASM_SIZE(inc)
26#define _ASM_DEC __ASM_SIZE(dec)
27#define _ASM_ADD __ASM_SIZE(add)
28#define _ASM_SUB __ASM_SIZE(sub)
29#define _ASM_XADD __ASM_SIZE(xadd)
30
31#define _ASM_AX __ASM_REG(ax)
32#define _ASM_BX __ASM_REG(bx)
33#define _ASM_CX __ASM_REG(cx)
34#define _ASM_DX __ASM_REG(dx)
35#define _ASM_SP __ASM_REG(sp)
36#define _ASM_BP __ASM_REG(bp)
37#define _ASM_SI __ASM_REG(si)
38#define _ASM_DI __ASM_REG(di)
39
40/* Exception table entry */
41# define _ASM_EXTABLE(from,to) \
42 __ASM_EX_SEC \
43 _ASM_ALIGN "\n" \
44 _ASM_PTR #from "," #to "\n" \
45 " .previous\n"
46
47#endif /* ASM_X86__ASM_H */
diff --git a/include/asm-x86/atomic.h b/include/asm-x86/atomic.h
deleted file mode 100644
index 4e1b8873c474..000000000000
--- a/include/asm-x86/atomic.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "atomic_32.h"
3#else
4# include "atomic_64.h"
5#endif
diff --git a/include/asm-x86/atomic_32.h b/include/asm-x86/atomic_32.h
deleted file mode 100644
index 14d3f0beb889..000000000000
--- a/include/asm-x86/atomic_32.h
+++ /dev/null
@@ -1,259 +0,0 @@
1#ifndef ASM_X86__ATOMIC_32_H
2#define ASM_X86__ATOMIC_32_H
3
4#include <linux/compiler.h>
5#include <asm/processor.h>
6#include <asm/cmpxchg.h>
7
8/*
9 * Atomic operations that C can't guarantee us. Useful for
10 * resource counting etc..
11 */
12
13/*
14 * Make sure gcc doesn't try to be clever and move things around
15 * on us. We need to use _exactly_ the address the user gave us,
16 * not some alias that contains the same information.
17 */
18typedef struct {
19 int counter;
20} atomic_t;
21
22#define ATOMIC_INIT(i) { (i) }
23
24/**
25 * atomic_read - read atomic variable
26 * @v: pointer of type atomic_t
27 *
28 * Atomically reads the value of @v.
29 */
30#define atomic_read(v) ((v)->counter)
31
32/**
33 * atomic_set - set atomic variable
34 * @v: pointer of type atomic_t
35 * @i: required value
36 *
37 * Atomically sets the value of @v to @i.
38 */
39#define atomic_set(v, i) (((v)->counter) = (i))
40
41/**
42 * atomic_add - add integer to atomic variable
43 * @i: integer value to add
44 * @v: pointer of type atomic_t
45 *
46 * Atomically adds @i to @v.
47 */
48static inline void atomic_add(int i, atomic_t *v)
49{
50 asm volatile(LOCK_PREFIX "addl %1,%0"
51 : "+m" (v->counter)
52 : "ir" (i));
53}
54
55/**
56 * atomic_sub - subtract integer from atomic variable
57 * @i: integer value to subtract
58 * @v: pointer of type atomic_t
59 *
60 * Atomically subtracts @i from @v.
61 */
62static inline void atomic_sub(int i, atomic_t *v)
63{
64 asm volatile(LOCK_PREFIX "subl %1,%0"
65 : "+m" (v->counter)
66 : "ir" (i));
67}
68
69/**
70 * atomic_sub_and_test - subtract value from variable and test result
71 * @i: integer value to subtract
72 * @v: pointer of type atomic_t
73 *
74 * Atomically subtracts @i from @v and returns
75 * true if the result is zero, or false for all
76 * other cases.
77 */
78static inline int atomic_sub_and_test(int i, atomic_t *v)
79{
80 unsigned char c;
81
82 asm volatile(LOCK_PREFIX "subl %2,%0; sete %1"
83 : "+m" (v->counter), "=qm" (c)
84 : "ir" (i) : "memory");
85 return c;
86}
87
88/**
89 * atomic_inc - increment atomic variable
90 * @v: pointer of type atomic_t
91 *
92 * Atomically increments @v by 1.
93 */
94static inline void atomic_inc(atomic_t *v)
95{
96 asm volatile(LOCK_PREFIX "incl %0"
97 : "+m" (v->counter));
98}
99
100/**
101 * atomic_dec - decrement atomic variable
102 * @v: pointer of type atomic_t
103 *
104 * Atomically decrements @v by 1.
105 */
106static inline void atomic_dec(atomic_t *v)
107{
108 asm volatile(LOCK_PREFIX "decl %0"
109 : "+m" (v->counter));
110}
111
112/**
113 * atomic_dec_and_test - decrement and test
114 * @v: pointer of type atomic_t
115 *
116 * Atomically decrements @v by 1 and
117 * returns true if the result is 0, or false for all other
118 * cases.
119 */
120static inline int atomic_dec_and_test(atomic_t *v)
121{
122 unsigned char c;
123
124 asm volatile(LOCK_PREFIX "decl %0; sete %1"
125 : "+m" (v->counter), "=qm" (c)
126 : : "memory");
127 return c != 0;
128}
129
130/**
131 * atomic_inc_and_test - increment and test
132 * @v: pointer of type atomic_t
133 *
134 * Atomically increments @v by 1
135 * and returns true if the result is zero, or false for all
136 * other cases.
137 */
138static inline int atomic_inc_and_test(atomic_t *v)
139{
140 unsigned char c;
141
142 asm volatile(LOCK_PREFIX "incl %0; sete %1"
143 : "+m" (v->counter), "=qm" (c)
144 : : "memory");
145 return c != 0;
146}
147
148/**
149 * atomic_add_negative - add and test if negative
150 * @v: pointer of type atomic_t
151 * @i: integer value to add
152 *
153 * Atomically adds @i to @v and returns true
154 * if the result is negative, or false when
155 * result is greater than or equal to zero.
156 */
157static inline int atomic_add_negative(int i, atomic_t *v)
158{
159 unsigned char c;
160
161 asm volatile(LOCK_PREFIX "addl %2,%0; sets %1"
162 : "+m" (v->counter), "=qm" (c)
163 : "ir" (i) : "memory");
164 return c;
165}
166
167/**
168 * atomic_add_return - add integer and return
169 * @v: pointer of type atomic_t
170 * @i: integer value to add
171 *
172 * Atomically adds @i to @v and returns @i + @v
173 */
174static inline int atomic_add_return(int i, atomic_t *v)
175{
176 int __i;
177#ifdef CONFIG_M386
178 unsigned long flags;
179 if (unlikely(boot_cpu_data.x86 <= 3))
180 goto no_xadd;
181#endif
182 /* Modern 486+ processor */
183 __i = i;
184 asm volatile(LOCK_PREFIX "xaddl %0, %1"
185 : "+r" (i), "+m" (v->counter)
186 : : "memory");
187 return i + __i;
188
189#ifdef CONFIG_M386
190no_xadd: /* Legacy 386 processor */
191 local_irq_save(flags);
192 __i = atomic_read(v);
193 atomic_set(v, i + __i);
194 local_irq_restore(flags);
195 return i + __i;
196#endif
197}
198
199/**
200 * atomic_sub_return - subtract integer and return
201 * @v: pointer of type atomic_t
202 * @i: integer value to subtract
203 *
204 * Atomically subtracts @i from @v and returns @v - @i
205 */
206static inline int atomic_sub_return(int i, atomic_t *v)
207{
208 return atomic_add_return(-i, v);
209}
210
211#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
212#define atomic_xchg(v, new) (xchg(&((v)->counter), (new)))
213
214/**
215 * atomic_add_unless - add unless the number is already a given value
216 * @v: pointer of type atomic_t
217 * @a: the amount to add to v...
218 * @u: ...unless v is equal to u.
219 *
220 * Atomically adds @a to @v, so long as @v was not already @u.
221 * Returns non-zero if @v was not @u, and zero otherwise.
222 */
223static inline int atomic_add_unless(atomic_t *v, int a, int u)
224{
225 int c, old;
226 c = atomic_read(v);
227 for (;;) {
228 if (unlikely(c == (u)))
229 break;
230 old = atomic_cmpxchg((v), c, c + (a));
231 if (likely(old == c))
232 break;
233 c = old;
234 }
235 return c != (u);
236}
237
238#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
239
240#define atomic_inc_return(v) (atomic_add_return(1, v))
241#define atomic_dec_return(v) (atomic_sub_return(1, v))
242
243/* These are x86-specific, used by some header files */
244#define atomic_clear_mask(mask, addr) \
245 asm volatile(LOCK_PREFIX "andl %0,%1" \
246 : : "r" (~(mask)), "m" (*(addr)) : "memory")
247
248#define atomic_set_mask(mask, addr) \
249 asm volatile(LOCK_PREFIX "orl %0,%1" \
250 : : "r" (mask), "m" (*(addr)) : "memory")
251
252/* Atomic operations are already serializing on x86 */
253#define smp_mb__before_atomic_dec() barrier()
254#define smp_mb__after_atomic_dec() barrier()
255#define smp_mb__before_atomic_inc() barrier()
256#define smp_mb__after_atomic_inc() barrier()
257
258#include <asm-generic/atomic.h>
259#endif /* ASM_X86__ATOMIC_32_H */
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h
deleted file mode 100644
index 2cb218c4a356..000000000000
--- a/include/asm-x86/atomic_64.h
+++ /dev/null
@@ -1,473 +0,0 @@
1#ifndef ASM_X86__ATOMIC_64_H
2#define ASM_X86__ATOMIC_64_H
3
4#include <asm/alternative.h>
5#include <asm/cmpxchg.h>
6
7/* atomic_t should be 32 bit signed type */
8
9/*
10 * Atomic operations that C can't guarantee us. Useful for
11 * resource counting etc..
12 */
13
14/*
15 * Make sure gcc doesn't try to be clever and move things around
16 * on us. We need to use _exactly_ the address the user gave us,
17 * not some alias that contains the same information.
18 */
19typedef struct {
20 int counter;
21} atomic_t;
22
23#define ATOMIC_INIT(i) { (i) }
24
25/**
26 * atomic_read - read atomic variable
27 * @v: pointer of type atomic_t
28 *
29 * Atomically reads the value of @v.
30 */
31#define atomic_read(v) ((v)->counter)
32
33/**
34 * atomic_set - set atomic variable
35 * @v: pointer of type atomic_t
36 * @i: required value
37 *
38 * Atomically sets the value of @v to @i.
39 */
40#define atomic_set(v, i) (((v)->counter) = (i))
41
42/**
43 * atomic_add - add integer to atomic variable
44 * @i: integer value to add
45 * @v: pointer of type atomic_t
46 *
47 * Atomically adds @i to @v.
48 */
49static inline void atomic_add(int i, atomic_t *v)
50{
51 asm volatile(LOCK_PREFIX "addl %1,%0"
52 : "=m" (v->counter)
53 : "ir" (i), "m" (v->counter));
54}
55
56/**
57 * atomic_sub - subtract the atomic variable
58 * @i: integer value to subtract
59 * @v: pointer of type atomic_t
60 *
61 * Atomically subtracts @i from @v.
62 */
63static inline void atomic_sub(int i, atomic_t *v)
64{
65 asm volatile(LOCK_PREFIX "subl %1,%0"
66 : "=m" (v->counter)
67 : "ir" (i), "m" (v->counter));
68}
69
70/**
71 * atomic_sub_and_test - subtract value from variable and test result
72 * @i: integer value to subtract
73 * @v: pointer of type atomic_t
74 *
75 * Atomically subtracts @i from @v and returns
76 * true if the result is zero, or false for all
77 * other cases.
78 */
79static inline int atomic_sub_and_test(int i, atomic_t *v)
80{
81 unsigned char c;
82
83 asm volatile(LOCK_PREFIX "subl %2,%0; sete %1"
84 : "=m" (v->counter), "=qm" (c)
85 : "ir" (i), "m" (v->counter) : "memory");
86 return c;
87}
88
89/**
90 * atomic_inc - increment atomic variable
91 * @v: pointer of type atomic_t
92 *
93 * Atomically increments @v by 1.
94 */
95static inline void atomic_inc(atomic_t *v)
96{
97 asm volatile(LOCK_PREFIX "incl %0"
98 : "=m" (v->counter)
99 : "m" (v->counter));
100}
101
102/**
103 * atomic_dec - decrement atomic variable
104 * @v: pointer of type atomic_t
105 *
106 * Atomically decrements @v by 1.
107 */
108static inline void atomic_dec(atomic_t *v)
109{
110 asm volatile(LOCK_PREFIX "decl %0"
111 : "=m" (v->counter)
112 : "m" (v->counter));
113}
114
115/**
116 * atomic_dec_and_test - decrement and test
117 * @v: pointer of type atomic_t
118 *
119 * Atomically decrements @v by 1 and
120 * returns true if the result is 0, or false for all other
121 * cases.
122 */
123static inline int atomic_dec_and_test(atomic_t *v)
124{
125 unsigned char c;
126
127 asm volatile(LOCK_PREFIX "decl %0; sete %1"
128 : "=m" (v->counter), "=qm" (c)
129 : "m" (v->counter) : "memory");
130 return c != 0;
131}
132
133/**
134 * atomic_inc_and_test - increment and test
135 * @v: pointer of type atomic_t
136 *
137 * Atomically increments @v by 1
138 * and returns true if the result is zero, or false for all
139 * other cases.
140 */
141static inline int atomic_inc_and_test(atomic_t *v)
142{
143 unsigned char c;
144
145 asm volatile(LOCK_PREFIX "incl %0; sete %1"
146 : "=m" (v->counter), "=qm" (c)
147 : "m" (v->counter) : "memory");
148 return c != 0;
149}
150
151/**
152 * atomic_add_negative - add and test if negative
153 * @i: integer value to add
154 * @v: pointer of type atomic_t
155 *
156 * Atomically adds @i to @v and returns true
157 * if the result is negative, or false when
158 * result is greater than or equal to zero.
159 */
160static inline int atomic_add_negative(int i, atomic_t *v)
161{
162 unsigned char c;
163
164 asm volatile(LOCK_PREFIX "addl %2,%0; sets %1"
165 : "=m" (v->counter), "=qm" (c)
166 : "ir" (i), "m" (v->counter) : "memory");
167 return c;
168}
169
170/**
171 * atomic_add_return - add and return
172 * @i: integer value to add
173 * @v: pointer of type atomic_t
174 *
175 * Atomically adds @i to @v and returns @i + @v
176 */
177static inline int atomic_add_return(int i, atomic_t *v)
178{
179 int __i = i;
180 asm volatile(LOCK_PREFIX "xaddl %0, %1"
181 : "+r" (i), "+m" (v->counter)
182 : : "memory");
183 return i + __i;
184}
185
186static inline int atomic_sub_return(int i, atomic_t *v)
187{
188 return atomic_add_return(-i, v);
189}
190
191#define atomic_inc_return(v) (atomic_add_return(1, v))
192#define atomic_dec_return(v) (atomic_sub_return(1, v))
193
194/* An 64bit atomic type */
195
196typedef struct {
197 long counter;
198} atomic64_t;
199
200#define ATOMIC64_INIT(i) { (i) }
201
202/**
203 * atomic64_read - read atomic64 variable
204 * @v: pointer of type atomic64_t
205 *
206 * Atomically reads the value of @v.
207 * Doesn't imply a read memory barrier.
208 */
209#define atomic64_read(v) ((v)->counter)
210
211/**
212 * atomic64_set - set atomic64 variable
213 * @v: pointer to type atomic64_t
214 * @i: required value
215 *
216 * Atomically sets the value of @v to @i.
217 */
218#define atomic64_set(v, i) (((v)->counter) = (i))
219
220/**
221 * atomic64_add - add integer to atomic64 variable
222 * @i: integer value to add
223 * @v: pointer to type atomic64_t
224 *
225 * Atomically adds @i to @v.
226 */
227static inline void atomic64_add(long i, atomic64_t *v)
228{
229 asm volatile(LOCK_PREFIX "addq %1,%0"
230 : "=m" (v->counter)
231 : "er" (i), "m" (v->counter));
232}
233
234/**
235 * atomic64_sub - subtract the atomic64 variable
236 * @i: integer value to subtract
237 * @v: pointer to type atomic64_t
238 *
239 * Atomically subtracts @i from @v.
240 */
241static inline void atomic64_sub(long i, atomic64_t *v)
242{
243 asm volatile(LOCK_PREFIX "subq %1,%0"
244 : "=m" (v->counter)
245 : "er" (i), "m" (v->counter));
246}
247
248/**
249 * atomic64_sub_and_test - subtract value from variable and test result
250 * @i: integer value to subtract
251 * @v: pointer to type atomic64_t
252 *
253 * Atomically subtracts @i from @v and returns
254 * true if the result is zero, or false for all
255 * other cases.
256 */
257static inline int atomic64_sub_and_test(long i, atomic64_t *v)
258{
259 unsigned char c;
260
261 asm volatile(LOCK_PREFIX "subq %2,%0; sete %1"
262 : "=m" (v->counter), "=qm" (c)
263 : "er" (i), "m" (v->counter) : "memory");
264 return c;
265}
266
267/**
268 * atomic64_inc - increment atomic64 variable
269 * @v: pointer to type atomic64_t
270 *
271 * Atomically increments @v by 1.
272 */
273static inline void atomic64_inc(atomic64_t *v)
274{
275 asm volatile(LOCK_PREFIX "incq %0"
276 : "=m" (v->counter)
277 : "m" (v->counter));
278}
279
280/**
281 * atomic64_dec - decrement atomic64 variable
282 * @v: pointer to type atomic64_t
283 *
284 * Atomically decrements @v by 1.
285 */
286static inline void atomic64_dec(atomic64_t *v)
287{
288 asm volatile(LOCK_PREFIX "decq %0"
289 : "=m" (v->counter)
290 : "m" (v->counter));
291}
292
293/**
294 * atomic64_dec_and_test - decrement and test
295 * @v: pointer to type atomic64_t
296 *
297 * Atomically decrements @v by 1 and
298 * returns true if the result is 0, or false for all other
299 * cases.
300 */
301static inline int atomic64_dec_and_test(atomic64_t *v)
302{
303 unsigned char c;
304
305 asm volatile(LOCK_PREFIX "decq %0; sete %1"
306 : "=m" (v->counter), "=qm" (c)
307 : "m" (v->counter) : "memory");
308 return c != 0;
309}
310
311/**
312 * atomic64_inc_and_test - increment and test
313 * @v: pointer to type atomic64_t
314 *
315 * Atomically increments @v by 1
316 * and returns true if the result is zero, or false for all
317 * other cases.
318 */
319static inline int atomic64_inc_and_test(atomic64_t *v)
320{
321 unsigned char c;
322
323 asm volatile(LOCK_PREFIX "incq %0; sete %1"
324 : "=m" (v->counter), "=qm" (c)
325 : "m" (v->counter) : "memory");
326 return c != 0;
327}
328
329/**
330 * atomic64_add_negative - add and test if negative
331 * @i: integer value to add
332 * @v: pointer to type atomic64_t
333 *
334 * Atomically adds @i to @v and returns true
335 * if the result is negative, or false when
336 * result is greater than or equal to zero.
337 */
338static inline int atomic64_add_negative(long i, atomic64_t *v)
339{
340 unsigned char c;
341
342 asm volatile(LOCK_PREFIX "addq %2,%0; sets %1"
343 : "=m" (v->counter), "=qm" (c)
344 : "er" (i), "m" (v->counter) : "memory");
345 return c;
346}
347
348/**
349 * atomic64_add_return - add and return
350 * @i: integer value to add
351 * @v: pointer to type atomic64_t
352 *
353 * Atomically adds @i to @v and returns @i + @v
354 */
355static inline long atomic64_add_return(long i, atomic64_t *v)
356{
357 long __i = i;
358 asm volatile(LOCK_PREFIX "xaddq %0, %1;"
359 : "+r" (i), "+m" (v->counter)
360 : : "memory");
361 return i + __i;
362}
363
364static inline long atomic64_sub_return(long i, atomic64_t *v)
365{
366 return atomic64_add_return(-i, v);
367}
368
369#define atomic64_inc_return(v) (atomic64_add_return(1, (v)))
370#define atomic64_dec_return(v) (atomic64_sub_return(1, (v)))
371
372#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
373#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
374
375#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
376#define atomic_xchg(v, new) (xchg(&((v)->counter), (new)))
377
378/**
379 * atomic_add_unless - add unless the number is a given value
380 * @v: pointer of type atomic_t
381 * @a: the amount to add to v...
382 * @u: ...unless v is equal to u.
383 *
384 * Atomically adds @a to @v, so long as it was not @u.
385 * Returns non-zero if @v was not @u, and zero otherwise.
386 */
387static inline int atomic_add_unless(atomic_t *v, int a, int u)
388{
389 int c, old;
390 c = atomic_read(v);
391 for (;;) {
392 if (unlikely(c == (u)))
393 break;
394 old = atomic_cmpxchg((v), c, c + (a));
395 if (likely(old == c))
396 break;
397 c = old;
398 }
399 return c != (u);
400}
401
402#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
403
404/**
405 * atomic64_add_unless - add unless the number is a given value
406 * @v: pointer of type atomic64_t
407 * @a: the amount to add to v...
408 * @u: ...unless v is equal to u.
409 *
410 * Atomically adds @a to @v, so long as it was not @u.
411 * Returns non-zero if @v was not @u, and zero otherwise.
412 */
413static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
414{
415 long c, old;
416 c = atomic64_read(v);
417 for (;;) {
418 if (unlikely(c == (u)))
419 break;
420 old = atomic64_cmpxchg((v), c, c + (a));
421 if (likely(old == c))
422 break;
423 c = old;
424 }
425 return c != (u);
426}
427
428/**
429 * atomic_inc_short - increment of a short integer
430 * @v: pointer to type int
431 *
432 * Atomically adds 1 to @v
433 * Returns the new value of @u
434 */
435static inline short int atomic_inc_short(short int *v)
436{
437 asm(LOCK_PREFIX "addw $1, %0" : "+m" (*v));
438 return *v;
439}
440
441/**
442 * atomic_or_long - OR of two long integers
443 * @v1: pointer to type unsigned long
444 * @v2: pointer to type unsigned long
445 *
446 * Atomically ORs @v1 and @v2
447 * Returns the result of the OR
448 */
449static inline void atomic_or_long(unsigned long *v1, unsigned long v2)
450{
451 asm(LOCK_PREFIX "orq %1, %0" : "+m" (*v1) : "r" (v2));
452}
453
454#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
455
456/* These are x86-specific, used by some header files */
457#define atomic_clear_mask(mask, addr) \
458 asm volatile(LOCK_PREFIX "andl %0,%1" \
459 : : "r" (~(mask)), "m" (*(addr)) : "memory")
460
461#define atomic_set_mask(mask, addr) \
462 asm volatile(LOCK_PREFIX "orl %0,%1" \
463 : : "r" ((unsigned)(mask)), "m" (*(addr)) \
464 : "memory")
465
466/* Atomic operations are already serializing on x86 */
467#define smp_mb__before_atomic_dec() barrier()
468#define smp_mb__after_atomic_dec() barrier()
469#define smp_mb__before_atomic_inc() barrier()
470#define smp_mb__after_atomic_inc() barrier()
471
472#include <asm-generic/atomic.h>
473#endif /* ASM_X86__ATOMIC_64_H */
diff --git a/include/asm-x86/auxvec.h b/include/asm-x86/auxvec.h
deleted file mode 100644
index 12c7cac74202..000000000000
--- a/include/asm-x86/auxvec.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_X86__AUXVEC_H
2#define ASM_X86__AUXVEC_H
3/*
4 * Architecture-neutral AT_ values in 0-17, leave some room
5 * for more of them, start the x86-specific ones at 32.
6 */
7#ifdef __i386__
8#define AT_SYSINFO 32
9#endif
10#define AT_SYSINFO_EHDR 33
11
12#endif /* ASM_X86__AUXVEC_H */
diff --git a/include/asm-x86/bigsmp/apic.h b/include/asm-x86/bigsmp/apic.h
deleted file mode 100644
index 0a9cd7c5ca0c..000000000000
--- a/include/asm-x86/bigsmp/apic.h
+++ /dev/null
@@ -1,144 +0,0 @@
1#ifndef __ASM_MACH_APIC_H
2#define __ASM_MACH_APIC_H
3
4#define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
5#define esr_disable (1)
6
7static inline int apic_id_registered(void)
8{
9 return (1);
10}
11
12/* Round robin the irqs amoung the online cpus */
13static inline cpumask_t target_cpus(void)
14{
15 static unsigned long cpu = NR_CPUS;
16 do {
17 if (cpu >= NR_CPUS)
18 cpu = first_cpu(cpu_online_map);
19 else
20 cpu = next_cpu(cpu, cpu_online_map);
21 } while (cpu >= NR_CPUS);
22 return cpumask_of_cpu(cpu);
23}
24
25#undef APIC_DEST_LOGICAL
26#define APIC_DEST_LOGICAL 0
27#define TARGET_CPUS (target_cpus())
28#define APIC_DFR_VALUE (APIC_DFR_FLAT)
29#define INT_DELIVERY_MODE (dest_Fixed)
30#define INT_DEST_MODE (0) /* phys delivery to target proc */
31#define NO_BALANCE_IRQ (0)
32#define WAKE_SECONDARY_VIA_INIT
33
34
35static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
36{
37 return (0);
38}
39
40static inline unsigned long check_apicid_present(int bit)
41{
42 return (1);
43}
44
45static inline unsigned long calculate_ldr(int cpu)
46{
47 unsigned long val, id;
48 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
49 id = xapic_phys_to_log_apicid(cpu);
50 val |= SET_APIC_LOGICAL_ID(id);
51 return val;
52}
53
54/*
55 * Set up the logical destination ID.
56 *
57 * Intel recommends to set DFR, LDR and TPR before enabling
58 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
59 * document number 292116). So here it goes...
60 */
61static inline void init_apic_ldr(void)
62{
63 unsigned long val;
64 int cpu = smp_processor_id();
65
66 apic_write(APIC_DFR, APIC_DFR_VALUE);
67 val = calculate_ldr(cpu);
68 apic_write(APIC_LDR, val);
69}
70
71static inline void setup_apic_routing(void)
72{
73 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
74 "Physflat", nr_ioapics);
75}
76
77static inline int multi_timer_check(int apic, int irq)
78{
79 return (0);
80}
81
82static inline int apicid_to_node(int logical_apicid)
83{
84 return apicid_2_node[hard_smp_processor_id()];
85}
86
87static inline int cpu_present_to_apicid(int mps_cpu)
88{
89 if (mps_cpu < NR_CPUS)
90 return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
91
92 return BAD_APICID;
93}
94
95static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
96{
97 return physid_mask_of_physid(phys_apicid);
98}
99
100extern u8 cpu_2_logical_apicid[];
101/* Mapping from cpu number to logical apicid */
102static inline int cpu_to_logical_apicid(int cpu)
103{
104 if (cpu >= NR_CPUS)
105 return BAD_APICID;
106 return cpu_physical_id(cpu);
107}
108
109static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
110{
111 /* For clustered we don't have a good way to do this yet - hack */
112 return physids_promote(0xFFL);
113}
114
115static inline void setup_portio_remap(void)
116{
117}
118
119static inline void enable_apic_mode(void)
120{
121}
122
123static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
124{
125 return (1);
126}
127
128/* As we are using single CPU as destination, pick only one CPU here */
129static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
130{
131 int cpu;
132 int apicid;
133
134 cpu = first_cpu(cpumask);
135 apicid = cpu_to_logical_apicid(cpu);
136 return apicid;
137}
138
139static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
140{
141 return cpuid_apic >> index_msb;
142}
143
144#endif /* __ASM_MACH_APIC_H */
diff --git a/include/asm-x86/bigsmp/apicdef.h b/include/asm-x86/bigsmp/apicdef.h
deleted file mode 100644
index 392c3f5ef2fe..000000000000
--- a/include/asm-x86/bigsmp/apicdef.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ASM_MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (((x)>>24)&0xFF);
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/bigsmp/ipi.h b/include/asm-x86/bigsmp/ipi.h
deleted file mode 100644
index 9404c535b7ec..000000000000
--- a/include/asm-x86/bigsmp/ipi.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef __ASM_MACH_IPI_H
2#define __ASM_MACH_IPI_H
3
4void send_IPI_mask_sequence(cpumask_t mask, int vector);
5
6static inline void send_IPI_mask(cpumask_t mask, int vector)
7{
8 send_IPI_mask_sequence(mask, vector);
9}
10
11static inline void send_IPI_allbutself(int vector)
12{
13 cpumask_t mask = cpu_online_map;
14 cpu_clear(smp_processor_id(), mask);
15
16 if (!cpus_empty(mask))
17 send_IPI_mask(mask, vector);
18}
19
20static inline void send_IPI_all(int vector)
21{
22 send_IPI_mask(cpu_online_map, vector);
23}
24
25#endif /* __ASM_MACH_IPI_H */
diff --git a/include/asm-x86/bios_ebda.h b/include/asm-x86/bios_ebda.h
deleted file mode 100644
index 79b4b88505d7..000000000000
--- a/include/asm-x86/bios_ebda.h
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifndef ASM_X86__BIOS_EBDA_H
2#define ASM_X86__BIOS_EBDA_H
3
4#include <asm/io.h>
5
6/*
7 * there is a real-mode segmented pointer pointing to the
8 * 4K EBDA area at 0x40E.
9 */
10static inline unsigned int get_bios_ebda(void)
11{
12 unsigned int address = *(unsigned short *)phys_to_virt(0x40E);
13 address <<= 4;
14 return address; /* 0 means none */
15}
16
17void reserve_ebda_region(void);
18
19#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
20/*
21 * This is obviously not a great place for this, but we want to be
22 * able to scatter it around anywhere in the kernel.
23 */
24void check_for_bios_corruption(void);
25void start_periodic_check_for_corruption(void);
26#else
27static inline void check_for_bios_corruption(void)
28{
29}
30
31static inline void start_periodic_check_for_corruption(void)
32{
33}
34#endif
35
36#endif /* ASM_X86__BIOS_EBDA_H */
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h
deleted file mode 100644
index 451a74762bd4..000000000000
--- a/include/asm-x86/bitops.h
+++ /dev/null
@@ -1,451 +0,0 @@
1#ifndef ASM_X86__BITOPS_H
2#define ASM_X86__BITOPS_H
3
4/*
5 * Copyright 1992, Linus Torvalds.
6 */
7
8#ifndef _LINUX_BITOPS_H
9#error only <linux/bitops.h> can be included directly
10#endif
11
12#include <linux/compiler.h>
13#include <asm/alternative.h>
14
15/*
16 * These have to be done with inline assembly: that way the bit-setting
17 * is guaranteed to be atomic. All bit operations return 0 if the bit
18 * was cleared before the operation and != 0 if it was not.
19 *
20 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
21 */
22
23#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
24/* Technically wrong, but this avoids compilation errors on some gcc
25 versions. */
26#define BITOP_ADDR(x) "=m" (*(volatile long *) (x))
27#else
28#define BITOP_ADDR(x) "+m" (*(volatile long *) (x))
29#endif
30
31#define ADDR BITOP_ADDR(addr)
32
33/*
34 * We do the locked ops that don't return the old value as
35 * a mask operation on a byte.
36 */
37#define IS_IMMEDIATE(nr) (__builtin_constant_p(nr))
38#define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((void *)(addr) + ((nr)>>3))
39#define CONST_MASK(nr) (1 << ((nr) & 7))
40
41/**
42 * set_bit - Atomically set a bit in memory
43 * @nr: the bit to set
44 * @addr: the address to start counting from
45 *
46 * This function is atomic and may not be reordered. See __set_bit()
47 * if you do not require the atomic guarantees.
48 *
49 * Note: there are no guarantees that this function will not be reordered
50 * on non x86 architectures, so if you are writing portable code,
51 * make sure not to rely on its reordering guarantees.
52 *
53 * Note that @nr may be almost arbitrarily large; this function is not
54 * restricted to acting on a single-word quantity.
55 */
56static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
57{
58 if (IS_IMMEDIATE(nr)) {
59 asm volatile(LOCK_PREFIX "orb %1,%0"
60 : CONST_MASK_ADDR(nr, addr)
61 : "iq" ((u8)CONST_MASK(nr))
62 : "memory");
63 } else {
64 asm volatile(LOCK_PREFIX "bts %1,%0"
65 : BITOP_ADDR(addr) : "Ir" (nr) : "memory");
66 }
67}
68
69/**
70 * __set_bit - Set a bit in memory
71 * @nr: the bit to set
72 * @addr: the address to start counting from
73 *
74 * Unlike set_bit(), this function is non-atomic and may be reordered.
75 * If it's called on the same region of memory simultaneously, the effect
76 * may be that only one operation succeeds.
77 */
78static inline void __set_bit(int nr, volatile unsigned long *addr)
79{
80 asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory");
81}
82
83/**
84 * clear_bit - Clears a bit in memory
85 * @nr: Bit to clear
86 * @addr: Address to start counting from
87 *
88 * clear_bit() is atomic and may not be reordered. However, it does
89 * not contain a memory barrier, so if it is used for locking purposes,
90 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
91 * in order to ensure changes are visible on other processors.
92 */
93static inline void clear_bit(int nr, volatile unsigned long *addr)
94{
95 if (IS_IMMEDIATE(nr)) {
96 asm volatile(LOCK_PREFIX "andb %1,%0"
97 : CONST_MASK_ADDR(nr, addr)
98 : "iq" ((u8)~CONST_MASK(nr)));
99 } else {
100 asm volatile(LOCK_PREFIX "btr %1,%0"
101 : BITOP_ADDR(addr)
102 : "Ir" (nr));
103 }
104}
105
106/*
107 * clear_bit_unlock - Clears a bit in memory
108 * @nr: Bit to clear
109 * @addr: Address to start counting from
110 *
111 * clear_bit() is atomic and implies release semantics before the memory
112 * operation. It can be used for an unlock.
113 */
114static inline void clear_bit_unlock(unsigned nr, volatile unsigned long *addr)
115{
116 barrier();
117 clear_bit(nr, addr);
118}
119
120static inline void __clear_bit(int nr, volatile unsigned long *addr)
121{
122 asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
123}
124
125/*
126 * __clear_bit_unlock - Clears a bit in memory
127 * @nr: Bit to clear
128 * @addr: Address to start counting from
129 *
130 * __clear_bit() is non-atomic and implies release semantics before the memory
131 * operation. It can be used for an unlock if no other CPUs can concurrently
132 * modify other bits in the word.
133 *
134 * No memory barrier is required here, because x86 cannot reorder stores past
135 * older loads. Same principle as spin_unlock.
136 */
137static inline void __clear_bit_unlock(unsigned nr, volatile unsigned long *addr)
138{
139 barrier();
140 __clear_bit(nr, addr);
141}
142
143#define smp_mb__before_clear_bit() barrier()
144#define smp_mb__after_clear_bit() barrier()
145
146/**
147 * __change_bit - Toggle a bit in memory
148 * @nr: the bit to change
149 * @addr: the address to start counting from
150 *
151 * Unlike change_bit(), this function is non-atomic and may be reordered.
152 * If it's called on the same region of memory simultaneously, the effect
153 * may be that only one operation succeeds.
154 */
155static inline void __change_bit(int nr, volatile unsigned long *addr)
156{
157 asm volatile("btc %1,%0" : ADDR : "Ir" (nr));
158}
159
160/**
161 * change_bit - Toggle a bit in memory
162 * @nr: Bit to change
163 * @addr: Address to start counting from
164 *
165 * change_bit() is atomic and may not be reordered.
166 * Note that @nr may be almost arbitrarily large; this function is not
167 * restricted to acting on a single-word quantity.
168 */
169static inline void change_bit(int nr, volatile unsigned long *addr)
170{
171 asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr));
172}
173
174/**
175 * test_and_set_bit - Set a bit and return its old value
176 * @nr: Bit to set
177 * @addr: Address to count from
178 *
179 * This operation is atomic and cannot be reordered.
180 * It also implies a memory barrier.
181 */
182static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
183{
184 int oldbit;
185
186 asm volatile(LOCK_PREFIX "bts %2,%1\n\t"
187 "sbb %0,%0" : "=r" (oldbit), ADDR : "Ir" (nr) : "memory");
188
189 return oldbit;
190}
191
192/**
193 * test_and_set_bit_lock - Set a bit and return its old value for lock
194 * @nr: Bit to set
195 * @addr: Address to count from
196 *
197 * This is the same as test_and_set_bit on x86.
198 */
199static inline int test_and_set_bit_lock(int nr, volatile unsigned long *addr)
200{
201 return test_and_set_bit(nr, addr);
202}
203
204/**
205 * __test_and_set_bit - Set a bit and return its old value
206 * @nr: Bit to set
207 * @addr: Address to count from
208 *
209 * This operation is non-atomic and can be reordered.
210 * If two examples of this operation race, one can appear to succeed
211 * but actually fail. You must protect multiple accesses with a lock.
212 */
213static inline int __test_and_set_bit(int nr, volatile unsigned long *addr)
214{
215 int oldbit;
216
217 asm("bts %2,%1\n\t"
218 "sbb %0,%0"
219 : "=r" (oldbit), ADDR
220 : "Ir" (nr));
221 return oldbit;
222}
223
224/**
225 * test_and_clear_bit - Clear a bit and return its old value
226 * @nr: Bit to clear
227 * @addr: Address to count from
228 *
229 * This operation is atomic and cannot be reordered.
230 * It also implies a memory barrier.
231 */
232static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
233{
234 int oldbit;
235
236 asm volatile(LOCK_PREFIX "btr %2,%1\n\t"
237 "sbb %0,%0"
238 : "=r" (oldbit), ADDR : "Ir" (nr) : "memory");
239
240 return oldbit;
241}
242
243/**
244 * __test_and_clear_bit - Clear a bit and return its old value
245 * @nr: Bit to clear
246 * @addr: Address to count from
247 *
248 * This operation is non-atomic and can be reordered.
249 * If two examples of this operation race, one can appear to succeed
250 * but actually fail. You must protect multiple accesses with a lock.
251 */
252static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
253{
254 int oldbit;
255
256 asm volatile("btr %2,%1\n\t"
257 "sbb %0,%0"
258 : "=r" (oldbit), ADDR
259 : "Ir" (nr));
260 return oldbit;
261}
262
263/* WARNING: non atomic and it can be reordered! */
264static inline int __test_and_change_bit(int nr, volatile unsigned long *addr)
265{
266 int oldbit;
267
268 asm volatile("btc %2,%1\n\t"
269 "sbb %0,%0"
270 : "=r" (oldbit), ADDR
271 : "Ir" (nr) : "memory");
272
273 return oldbit;
274}
275
276/**
277 * test_and_change_bit - Change a bit and return its old value
278 * @nr: Bit to change
279 * @addr: Address to count from
280 *
281 * This operation is atomic and cannot be reordered.
282 * It also implies a memory barrier.
283 */
284static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
285{
286 int oldbit;
287
288 asm volatile(LOCK_PREFIX "btc %2,%1\n\t"
289 "sbb %0,%0"
290 : "=r" (oldbit), ADDR : "Ir" (nr) : "memory");
291
292 return oldbit;
293}
294
295static inline int constant_test_bit(int nr, const volatile unsigned long *addr)
296{
297 return ((1UL << (nr % BITS_PER_LONG)) &
298 (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
299}
300
301static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
302{
303 int oldbit;
304
305 asm volatile("bt %2,%1\n\t"
306 "sbb %0,%0"
307 : "=r" (oldbit)
308 : "m" (*(unsigned long *)addr), "Ir" (nr));
309
310 return oldbit;
311}
312
313#if 0 /* Fool kernel-doc since it doesn't do macros yet */
314/**
315 * test_bit - Determine whether a bit is set
316 * @nr: bit number to test
317 * @addr: Address to start counting from
318 */
319static int test_bit(int nr, const volatile unsigned long *addr);
320#endif
321
322#define test_bit(nr, addr) \
323 (__builtin_constant_p((nr)) \
324 ? constant_test_bit((nr), (addr)) \
325 : variable_test_bit((nr), (addr)))
326
327/**
328 * __ffs - find first set bit in word
329 * @word: The word to search
330 *
331 * Undefined if no bit exists, so code should check against 0 first.
332 */
333static inline unsigned long __ffs(unsigned long word)
334{
335 asm("bsf %1,%0"
336 : "=r" (word)
337 : "rm" (word));
338 return word;
339}
340
341/**
342 * ffz - find first zero bit in word
343 * @word: The word to search
344 *
345 * Undefined if no zero exists, so code should check against ~0UL first.
346 */
347static inline unsigned long ffz(unsigned long word)
348{
349 asm("bsf %1,%0"
350 : "=r" (word)
351 : "r" (~word));
352 return word;
353}
354
355/*
356 * __fls: find last set bit in word
357 * @word: The word to search
358 *
359 * Undefined if no set bit exists, so code should check against 0 first.
360 */
361static inline unsigned long __fls(unsigned long word)
362{
363 asm("bsr %1,%0"
364 : "=r" (word)
365 : "rm" (word));
366 return word;
367}
368
369#ifdef __KERNEL__
370/**
371 * ffs - find first set bit in word
372 * @x: the word to search
373 *
374 * This is defined the same way as the libc and compiler builtin ffs
375 * routines, therefore differs in spirit from the other bitops.
376 *
377 * ffs(value) returns 0 if value is 0 or the position of the first
378 * set bit if value is nonzero. The first (least significant) bit
379 * is at position 1.
380 */
381static inline int ffs(int x)
382{
383 int r;
384#ifdef CONFIG_X86_CMOV
385 asm("bsfl %1,%0\n\t"
386 "cmovzl %2,%0"
387 : "=r" (r) : "rm" (x), "r" (-1));
388#else
389 asm("bsfl %1,%0\n\t"
390 "jnz 1f\n\t"
391 "movl $-1,%0\n"
392 "1:" : "=r" (r) : "rm" (x));
393#endif
394 return r + 1;
395}
396
397/**
398 * fls - find last set bit in word
399 * @x: the word to search
400 *
401 * This is defined in a similar way as the libc and compiler builtin
402 * ffs, but returns the position of the most significant set bit.
403 *
404 * fls(value) returns 0 if value is 0 or the position of the last
405 * set bit if value is nonzero. The last (most significant) bit is
406 * at position 32.
407 */
408static inline int fls(int x)
409{
410 int r;
411#ifdef CONFIG_X86_CMOV
412 asm("bsrl %1,%0\n\t"
413 "cmovzl %2,%0"
414 : "=&r" (r) : "rm" (x), "rm" (-1));
415#else
416 asm("bsrl %1,%0\n\t"
417 "jnz 1f\n\t"
418 "movl $-1,%0\n"
419 "1:" : "=r" (r) : "rm" (x));
420#endif
421 return r + 1;
422}
423#endif /* __KERNEL__ */
424
425#undef ADDR
426
427#ifdef __KERNEL__
428
429#include <asm-generic/bitops/sched.h>
430
431#define ARCH_HAS_FAST_MULTIPLIER 1
432
433#include <asm-generic/bitops/hweight.h>
434
435#endif /* __KERNEL__ */
436
437#include <asm-generic/bitops/fls64.h>
438
439#ifdef __KERNEL__
440
441#include <asm-generic/bitops/ext2-non-atomic.h>
442
443#define ext2_set_bit_atomic(lock, nr, addr) \
444 test_and_set_bit((nr), (unsigned long *)(addr))
445#define ext2_clear_bit_atomic(lock, nr, addr) \
446 test_and_clear_bit((nr), (unsigned long *)(addr))
447
448#include <asm-generic/bitops/minix.h>
449
450#endif /* __KERNEL__ */
451#endif /* ASM_X86__BITOPS_H */
diff --git a/include/asm-x86/boot.h b/include/asm-x86/boot.h
deleted file mode 100644
index 1d63bd5d5946..000000000000
--- a/include/asm-x86/boot.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef ASM_X86__BOOT_H
2#define ASM_X86__BOOT_H
3
4/* Don't touch these, unless you really know what you're doing. */
5#define DEF_SYSSEG 0x1000
6#define DEF_SYSSIZE 0x7F00
7
8/* Internal svga startup constants */
9#define NORMAL_VGA 0xffff /* 80x25 mode */
10#define EXTENDED_VGA 0xfffe /* 80x50 mode */
11#define ASK_VGA 0xfffd /* ask for it at bootup */
12
13/* Physical address where kernel should be loaded. */
14#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
15 + (CONFIG_PHYSICAL_ALIGN - 1)) \
16 & ~(CONFIG_PHYSICAL_ALIGN - 1))
17
18#ifdef CONFIG_X86_64
19#define BOOT_HEAP_SIZE 0x7000
20#define BOOT_STACK_SIZE 0x4000
21#else
22#define BOOT_HEAP_SIZE 0x4000
23#define BOOT_STACK_SIZE 0x1000
24#endif
25
26#endif /* ASM_X86__BOOT_H */
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h
deleted file mode 100644
index ccf027e2d97d..000000000000
--- a/include/asm-x86/bootparam.h
+++ /dev/null
@@ -1,111 +0,0 @@
1#ifndef ASM_X86__BOOTPARAM_H
2#define ASM_X86__BOOTPARAM_H
3
4#include <linux/types.h>
5#include <linux/screen_info.h>
6#include <linux/apm_bios.h>
7#include <linux/edd.h>
8#include <asm/e820.h>
9#include <asm/ist.h>
10#include <video/edid.h>
11
12/* setup data types */
13#define SETUP_NONE 0
14#define SETUP_E820_EXT 1
15
16/* extensible setup data list node */
17struct setup_data {
18 __u64 next;
19 __u32 type;
20 __u32 len;
21 __u8 data[0];
22};
23
24struct setup_header {
25 __u8 setup_sects;
26 __u16 root_flags;
27 __u32 syssize;
28 __u16 ram_size;
29#define RAMDISK_IMAGE_START_MASK 0x07FF
30#define RAMDISK_PROMPT_FLAG 0x8000
31#define RAMDISK_LOAD_FLAG 0x4000
32 __u16 vid_mode;
33 __u16 root_dev;
34 __u16 boot_flag;
35 __u16 jump;
36 __u32 header;
37 __u16 version;
38 __u32 realmode_swtch;
39 __u16 start_sys;
40 __u16 kernel_version;
41 __u8 type_of_loader;
42 __u8 loadflags;
43#define LOADED_HIGH (1<<0)
44#define QUIET_FLAG (1<<5)
45#define KEEP_SEGMENTS (1<<6)
46#define CAN_USE_HEAP (1<<7)
47 __u16 setup_move_size;
48 __u32 code32_start;
49 __u32 ramdisk_image;
50 __u32 ramdisk_size;
51 __u32 bootsect_kludge;
52 __u16 heap_end_ptr;
53 __u16 _pad1;
54 __u32 cmd_line_ptr;
55 __u32 initrd_addr_max;
56 __u32 kernel_alignment;
57 __u8 relocatable_kernel;
58 __u8 _pad2[3];
59 __u32 cmdline_size;
60 __u32 hardware_subarch;
61 __u64 hardware_subarch_data;
62 __u32 payload_offset;
63 __u32 payload_length;
64 __u64 setup_data;
65} __attribute__((packed));
66
67struct sys_desc_table {
68 __u16 length;
69 __u8 table[14];
70};
71
72struct efi_info {
73 __u32 efi_loader_signature;
74 __u32 efi_systab;
75 __u32 efi_memdesc_size;
76 __u32 efi_memdesc_version;
77 __u32 efi_memmap;
78 __u32 efi_memmap_size;
79 __u32 efi_systab_hi;
80 __u32 efi_memmap_hi;
81};
82
83/* The so-called "zeropage" */
84struct boot_params {
85 struct screen_info screen_info; /* 0x000 */
86 struct apm_bios_info apm_bios_info; /* 0x040 */
87 __u8 _pad2[12]; /* 0x054 */
88 struct ist_info ist_info; /* 0x060 */
89 __u8 _pad3[16]; /* 0x070 */
90 __u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
91 __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
92 struct sys_desc_table sys_desc_table; /* 0x0a0 */
93 __u8 _pad4[144]; /* 0x0b0 */
94 struct edid_info edid_info; /* 0x140 */
95 struct efi_info efi_info; /* 0x1c0 */
96 __u32 alt_mem_k; /* 0x1e0 */
97 __u32 scratch; /* Scratch field! */ /* 0x1e4 */
98 __u8 e820_entries; /* 0x1e8 */
99 __u8 eddbuf_entries; /* 0x1e9 */
100 __u8 edd_mbr_sig_buf_entries; /* 0x1ea */
101 __u8 _pad6[6]; /* 0x1eb */
102 struct setup_header hdr; /* setup header */ /* 0x1f1 */
103 __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)];
104 __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */
105 struct e820entry e820_map[E820MAX]; /* 0x2d0 */
106 __u8 _pad8[48]; /* 0xcd0 */
107 struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */
108 __u8 _pad9[276]; /* 0xeec */
109} __attribute__((packed));
110
111#endif /* ASM_X86__BOOTPARAM_H */
diff --git a/include/asm-x86/bug.h b/include/asm-x86/bug.h
deleted file mode 100644
index 91ad43a54c47..000000000000
--- a/include/asm-x86/bug.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef ASM_X86__BUG_H
2#define ASM_X86__BUG_H
3
4#ifdef CONFIG_BUG
5#define HAVE_ARCH_BUG
6
7#ifdef CONFIG_DEBUG_BUGVERBOSE
8
9#ifdef CONFIG_X86_32
10# define __BUG_C0 "2:\t.long 1b, %c0\n"
11#else
12# define __BUG_C0 "2:\t.quad 1b, %c0\n"
13#endif
14
15#define BUG() \
16do { \
17 asm volatile("1:\tud2\n" \
18 ".pushsection __bug_table,\"a\"\n" \
19 __BUG_C0 \
20 "\t.word %c1, 0\n" \
21 "\t.org 2b+%c2\n" \
22 ".popsection" \
23 : : "i" (__FILE__), "i" (__LINE__), \
24 "i" (sizeof(struct bug_entry))); \
25 for (;;) ; \
26} while (0)
27
28#else
29#define BUG() \
30do { \
31 asm volatile("ud2"); \
32 for (;;) ; \
33} while (0)
34#endif
35
36#endif /* !CONFIG_BUG */
37
38#include <asm-generic/bug.h>
39#endif /* ASM_X86__BUG_H */
diff --git a/include/asm-x86/bugs.h b/include/asm-x86/bugs.h
deleted file mode 100644
index dc604985f2ad..000000000000
--- a/include/asm-x86/bugs.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_X86__BUGS_H
2#define ASM_X86__BUGS_H
3
4extern void check_bugs(void);
5
6#if defined(CONFIG_CPU_SUP_INTEL) && defined(CONFIG_X86_32)
7int ppro_with_ram_bug(void);
8#else
9static inline int ppro_with_ram_bug(void) { return 0; }
10#endif
11
12#endif /* ASM_X86__BUGS_H */
diff --git a/include/asm-x86/byteorder.h b/include/asm-x86/byteorder.h
deleted file mode 100644
index 722f27d68105..000000000000
--- a/include/asm-x86/byteorder.h
+++ /dev/null
@@ -1,81 +0,0 @@
1#ifndef ASM_X86__BYTEORDER_H
2#define ASM_X86__BYTEORDER_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6
7#ifdef __GNUC__
8
9#ifdef __i386__
10
11static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
12{
13#ifdef CONFIG_X86_BSWAP
14 asm("bswap %0" : "=r" (x) : "0" (x));
15#else
16 asm("xchgb %b0,%h0\n\t" /* swap lower bytes */
17 "rorl $16,%0\n\t" /* swap words */
18 "xchgb %b0,%h0" /* swap higher bytes */
19 : "=q" (x)
20 : "0" (x));
21#endif
22 return x;
23}
24
25static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
26{
27 union {
28 struct {
29 __u32 a;
30 __u32 b;
31 } s;
32 __u64 u;
33 } v;
34 v.u = val;
35#ifdef CONFIG_X86_BSWAP
36 asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
37 : "=r" (v.s.a), "=r" (v.s.b)
38 : "0" (v.s.a), "1" (v.s.b));
39#else
40 v.s.a = ___arch__swab32(v.s.a);
41 v.s.b = ___arch__swab32(v.s.b);
42 asm("xchgl %0,%1"
43 : "=r" (v.s.a), "=r" (v.s.b)
44 : "0" (v.s.a), "1" (v.s.b));
45#endif
46 return v.u;
47}
48
49#else /* __i386__ */
50
51static inline __attribute_const__ __u64 ___arch__swab64(__u64 x)
52{
53 asm("bswapq %0"
54 : "=r" (x)
55 : "0" (x));
56 return x;
57}
58
59static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
60{
61 asm("bswapl %0"
62 : "=r" (x)
63 : "0" (x));
64 return x;
65}
66
67#endif
68
69/* Do not define swab16. Gcc is smart enough to recognize "C" version and
70 convert it into rotation or exhange. */
71
72#define __arch__swab64(x) ___arch__swab64(x)
73#define __arch__swab32(x) ___arch__swab32(x)
74
75#define __BYTEORDER_HAS_U64__
76
77#endif /* __GNUC__ */
78
79#include <linux/byteorder/little_endian.h>
80
81#endif /* ASM_X86__BYTEORDER_H */
diff --git a/include/asm-x86/cache.h b/include/asm-x86/cache.h
deleted file mode 100644
index ea3f1cc06a97..000000000000
--- a/include/asm-x86/cache.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef ASM_X86__CACHE_H
2#define ASM_X86__CACHE_H
3
4/* L1 cache line size */
5#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
6#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
7
8#define __read_mostly __attribute__((__section__(".data.read_mostly")))
9
10#ifdef CONFIG_X86_VSMP
11/* vSMP Internode cacheline shift */
12#define INTERNODE_CACHE_SHIFT (12)
13#ifdef CONFIG_SMP
14#define __cacheline_aligned_in_smp \
15 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
16 __attribute__((__section__(".data.page_aligned")))
17#endif
18#endif
19
20#endif /* ASM_X86__CACHE_H */
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h
deleted file mode 100644
index 68840ef1b35a..000000000000
--- a/include/asm-x86/cacheflush.h
+++ /dev/null
@@ -1,118 +0,0 @@
1#ifndef ASM_X86__CACHEFLUSH_H
2#define ASM_X86__CACHEFLUSH_H
3
4/* Keep includes the same across arches. */
5#include <linux/mm.h>
6
7/* Caches aren't brain-dead on the intel. */
8#define flush_cache_all() do { } while (0)
9#define flush_cache_mm(mm) do { } while (0)
10#define flush_cache_dup_mm(mm) do { } while (0)
11#define flush_cache_range(vma, start, end) do { } while (0)
12#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
13#define flush_dcache_page(page) do { } while (0)
14#define flush_dcache_mmap_lock(mapping) do { } while (0)
15#define flush_dcache_mmap_unlock(mapping) do { } while (0)
16#define flush_icache_range(start, end) do { } while (0)
17#define flush_icache_page(vma, pg) do { } while (0)
18#define flush_icache_user_range(vma, pg, adr, len) do { } while (0)
19#define flush_cache_vmap(start, end) do { } while (0)
20#define flush_cache_vunmap(start, end) do { } while (0)
21
22#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
23 memcpy((dst), (src), (len))
24#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
25 memcpy((dst), (src), (len))
26
27#define PG_non_WB PG_arch_1
28PAGEFLAG(NonWB, non_WB)
29
30/*
31 * The set_memory_* API can be used to change various attributes of a virtual
32 * address range. The attributes include:
33 * Cachability : UnCached, WriteCombining, WriteBack
34 * Executability : eXeutable, NoteXecutable
35 * Read/Write : ReadOnly, ReadWrite
36 * Presence : NotPresent
37 *
38 * Within a catagory, the attributes are mutually exclusive.
39 *
40 * The implementation of this API will take care of various aspects that
41 * are associated with changing such attributes, such as:
42 * - Flushing TLBs
43 * - Flushing CPU caches
44 * - Making sure aliases of the memory behind the mapping don't violate
45 * coherency rules as defined by the CPU in the system.
46 *
47 * What this API does not do:
48 * - Provide exclusion between various callers - including callers that
49 * operation on other mappings of the same physical page
50 * - Restore default attributes when a page is freed
51 * - Guarantee that mappings other than the requested one are
52 * in any state, other than that these do not violate rules for
53 * the CPU you have. Do not depend on any effects on other mappings,
54 * CPUs other than the one you have may have more relaxed rules.
55 * The caller is required to take care of these.
56 */
57
58int _set_memory_uc(unsigned long addr, int numpages);
59int _set_memory_wc(unsigned long addr, int numpages);
60int _set_memory_wb(unsigned long addr, int numpages);
61int set_memory_uc(unsigned long addr, int numpages);
62int set_memory_wc(unsigned long addr, int numpages);
63int set_memory_wb(unsigned long addr, int numpages);
64int set_memory_x(unsigned long addr, int numpages);
65int set_memory_nx(unsigned long addr, int numpages);
66int set_memory_ro(unsigned long addr, int numpages);
67int set_memory_rw(unsigned long addr, int numpages);
68int set_memory_np(unsigned long addr, int numpages);
69int set_memory_4k(unsigned long addr, int numpages);
70
71int set_memory_array_uc(unsigned long *addr, int addrinarray);
72int set_memory_array_wb(unsigned long *addr, int addrinarray);
73
74/*
75 * For legacy compatibility with the old APIs, a few functions
76 * are provided that work on a "struct page".
77 * These functions operate ONLY on the 1:1 kernel mapping of the
78 * memory that the struct page represents, and internally just
79 * call the set_memory_* function. See the description of the
80 * set_memory_* function for more details on conventions.
81 *
82 * These APIs should be considered *deprecated* and are likely going to
83 * be removed in the future.
84 * The reason for this is the implicit operation on the 1:1 mapping only,
85 * making this not a generally useful API.
86 *
87 * Specifically, many users of the old APIs had a virtual address,
88 * called virt_to_page() or vmalloc_to_page() on that address to
89 * get a struct page* that the old API required.
90 * To convert these cases, use set_memory_*() on the original
91 * virtual address, do not use these functions.
92 */
93
94int set_pages_uc(struct page *page, int numpages);
95int set_pages_wb(struct page *page, int numpages);
96int set_pages_x(struct page *page, int numpages);
97int set_pages_nx(struct page *page, int numpages);
98int set_pages_ro(struct page *page, int numpages);
99int set_pages_rw(struct page *page, int numpages);
100
101
102void clflush_cache_range(void *addr, unsigned int size);
103
104#ifdef CONFIG_DEBUG_RODATA
105void mark_rodata_ro(void);
106extern const int rodata_test_data;
107#endif
108
109#ifdef CONFIG_DEBUG_RODATA_TEST
110int rodata_test(void);
111#else
112static inline int rodata_test(void)
113{
114 return 0;
115}
116#endif
117
118#endif /* ASM_X86__CACHEFLUSH_H */
diff --git a/include/asm-x86/calgary.h b/include/asm-x86/calgary.h
deleted file mode 100644
index 933fd272f826..000000000000
--- a/include/asm-x86/calgary.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * Derived from include/asm-powerpc/iommu.h
3 *
4 * Copyright IBM Corporation, 2006-2007
5 *
6 * Author: Jon Mason <jdmason@us.ibm.com>
7 * Author: Muli Ben-Yehuda <muli@il.ibm.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#ifndef ASM_X86__CALGARY_H
25#define ASM_X86__CALGARY_H
26
27#include <linux/spinlock.h>
28#include <linux/device.h>
29#include <linux/dma-mapping.h>
30#include <linux/timer.h>
31#include <asm/types.h>
32
33struct iommu_table {
34 struct cal_chipset_ops *chip_ops; /* chipset specific funcs */
35 unsigned long it_base; /* mapped address of tce table */
36 unsigned long it_hint; /* Hint for next alloc */
37 unsigned long *it_map; /* A simple allocation bitmap for now */
38 void __iomem *bbar; /* Bridge BAR */
39 u64 tar_val; /* Table Address Register */
40 struct timer_list watchdog_timer;
41 spinlock_t it_lock; /* Protects it_map */
42 unsigned int it_size; /* Size of iommu table in entries */
43 unsigned char it_busno; /* Bus number this table belongs to */
44};
45
46struct cal_chipset_ops {
47 void (*handle_quirks)(struct iommu_table *tbl, struct pci_dev *dev);
48 void (*tce_cache_blast)(struct iommu_table *tbl);
49 void (*dump_error_regs)(struct iommu_table *tbl);
50};
51
52#define TCE_TABLE_SIZE_UNSPECIFIED ~0
53#define TCE_TABLE_SIZE_64K 0
54#define TCE_TABLE_SIZE_128K 1
55#define TCE_TABLE_SIZE_256K 2
56#define TCE_TABLE_SIZE_512K 3
57#define TCE_TABLE_SIZE_1M 4
58#define TCE_TABLE_SIZE_2M 5
59#define TCE_TABLE_SIZE_4M 6
60#define TCE_TABLE_SIZE_8M 7
61
62extern int use_calgary;
63
64#ifdef CONFIG_CALGARY_IOMMU
65extern int calgary_iommu_init(void);
66extern void detect_calgary(void);
67#else
68static inline int calgary_iommu_init(void) { return 1; }
69static inline void detect_calgary(void) { return; }
70#endif
71
72#endif /* ASM_X86__CALGARY_H */
diff --git a/include/asm-x86/calling.h b/include/asm-x86/calling.h
deleted file mode 100644
index 2bc162e0ec6e..000000000000
--- a/include/asm-x86/calling.h
+++ /dev/null
@@ -1,170 +0,0 @@
1/*
2 * Some macros to handle stack frames in assembly.
3 */
4
5#define R15 0
6#define R14 8
7#define R13 16
8#define R12 24
9#define RBP 32
10#define RBX 40
11
12/* arguments: interrupts/non tracing syscalls only save upto here*/
13#define R11 48
14#define R10 56
15#define R9 64
16#define R8 72
17#define RAX 80
18#define RCX 88
19#define RDX 96
20#define RSI 104
21#define RDI 112
22#define ORIG_RAX 120 /* + error_code */
23/* end of arguments */
24
25/* cpu exception frame or undefined in case of fast syscall. */
26#define RIP 128
27#define CS 136
28#define EFLAGS 144
29#define RSP 152
30#define SS 160
31
32#define ARGOFFSET R11
33#define SWFRAME ORIG_RAX
34
35 .macro SAVE_ARGS addskip=0, norcx=0, nor891011=0
36 subq $9*8+\addskip, %rsp
37 CFI_ADJUST_CFA_OFFSET 9*8+\addskip
38 movq %rdi, 8*8(%rsp)
39 CFI_REL_OFFSET rdi, 8*8
40 movq %rsi, 7*8(%rsp)
41 CFI_REL_OFFSET rsi, 7*8
42 movq %rdx, 6*8(%rsp)
43 CFI_REL_OFFSET rdx, 6*8
44 .if \norcx
45 .else
46 movq %rcx, 5*8(%rsp)
47 CFI_REL_OFFSET rcx, 5*8
48 .endif
49 movq %rax, 4*8(%rsp)
50 CFI_REL_OFFSET rax, 4*8
51 .if \nor891011
52 .else
53 movq %r8, 3*8(%rsp)
54 CFI_REL_OFFSET r8, 3*8
55 movq %r9, 2*8(%rsp)
56 CFI_REL_OFFSET r9, 2*8
57 movq %r10, 1*8(%rsp)
58 CFI_REL_OFFSET r10, 1*8
59 movq %r11, (%rsp)
60 CFI_REL_OFFSET r11, 0*8
61 .endif
62 .endm
63
64#define ARG_SKIP 9*8
65
66 .macro RESTORE_ARGS skiprax=0, addskip=0, skiprcx=0, skipr11=0, \
67 skipr8910=0, skiprdx=0
68 .if \skipr11
69 .else
70 movq (%rsp), %r11
71 CFI_RESTORE r11
72 .endif
73 .if \skipr8910
74 .else
75 movq 1*8(%rsp), %r10
76 CFI_RESTORE r10
77 movq 2*8(%rsp), %r9
78 CFI_RESTORE r9
79 movq 3*8(%rsp), %r8
80 CFI_RESTORE r8
81 .endif
82 .if \skiprax
83 .else
84 movq 4*8(%rsp), %rax
85 CFI_RESTORE rax
86 .endif
87 .if \skiprcx
88 .else
89 movq 5*8(%rsp), %rcx
90 CFI_RESTORE rcx
91 .endif
92 .if \skiprdx
93 .else
94 movq 6*8(%rsp), %rdx
95 CFI_RESTORE rdx
96 .endif
97 movq 7*8(%rsp), %rsi
98 CFI_RESTORE rsi
99 movq 8*8(%rsp), %rdi
100 CFI_RESTORE rdi
101 .if ARG_SKIP+\addskip > 0
102 addq $ARG_SKIP+\addskip, %rsp
103 CFI_ADJUST_CFA_OFFSET -(ARG_SKIP+\addskip)
104 .endif
105 .endm
106
107 .macro LOAD_ARGS offset, skiprax=0
108 movq \offset(%rsp), %r11
109 movq \offset+8(%rsp), %r10
110 movq \offset+16(%rsp), %r9
111 movq \offset+24(%rsp), %r8
112 movq \offset+40(%rsp), %rcx
113 movq \offset+48(%rsp), %rdx
114 movq \offset+56(%rsp), %rsi
115 movq \offset+64(%rsp), %rdi
116 .if \skiprax
117 .else
118 movq \offset+72(%rsp), %rax
119 .endif
120 .endm
121
122#define REST_SKIP 6*8
123
124 .macro SAVE_REST
125 subq $REST_SKIP, %rsp
126 CFI_ADJUST_CFA_OFFSET REST_SKIP
127 movq %rbx, 5*8(%rsp)
128 CFI_REL_OFFSET rbx, 5*8
129 movq %rbp, 4*8(%rsp)
130 CFI_REL_OFFSET rbp, 4*8
131 movq %r12, 3*8(%rsp)
132 CFI_REL_OFFSET r12, 3*8
133 movq %r13, 2*8(%rsp)
134 CFI_REL_OFFSET r13, 2*8
135 movq %r14, 1*8(%rsp)
136 CFI_REL_OFFSET r14, 1*8
137 movq %r15, (%rsp)
138 CFI_REL_OFFSET r15, 0*8
139 .endm
140
141 .macro RESTORE_REST
142 movq (%rsp), %r15
143 CFI_RESTORE r15
144 movq 1*8(%rsp), %r14
145 CFI_RESTORE r14
146 movq 2*8(%rsp), %r13
147 CFI_RESTORE r13
148 movq 3*8(%rsp), %r12
149 CFI_RESTORE r12
150 movq 4*8(%rsp), %rbp
151 CFI_RESTORE rbp
152 movq 5*8(%rsp), %rbx
153 CFI_RESTORE rbx
154 addq $REST_SKIP, %rsp
155 CFI_ADJUST_CFA_OFFSET -(REST_SKIP)
156 .endm
157
158 .macro SAVE_ALL
159 SAVE_ARGS
160 SAVE_REST
161 .endm
162
163 .macro RESTORE_ALL addskip=0
164 RESTORE_REST
165 RESTORE_ARGS 0, \addskip
166 .endm
167
168 .macro icebp
169 .byte 0xf1
170 .endm
diff --git a/include/asm-x86/checksum.h b/include/asm-x86/checksum.h
deleted file mode 100644
index 848850fd7d62..000000000000
--- a/include/asm-x86/checksum.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "checksum_32.h"
3#else
4# include "checksum_64.h"
5#endif
diff --git a/include/asm-x86/checksum_32.h b/include/asm-x86/checksum_32.h
deleted file mode 100644
index d041e8cda227..000000000000
--- a/include/asm-x86/checksum_32.h
+++ /dev/null
@@ -1,189 +0,0 @@
1#ifndef ASM_X86__CHECKSUM_32_H
2#define ASM_X86__CHECKSUM_32_H
3
4#include <linux/in6.h>
5
6#include <asm/uaccess.h>
7
8/*
9 * computes the checksum of a memory block at buff, length len,
10 * and adds in "sum" (32-bit)
11 *
12 * returns a 32-bit number suitable for feeding into itself
13 * or csum_tcpudp_magic
14 *
15 * this function must be called with even lengths, except
16 * for the last fragment, which may be odd
17 *
18 * it's best to have buff aligned on a 32-bit boundary
19 */
20asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
21
22/*
23 * the same as csum_partial, but copies from src while it
24 * checksums, and handles user-space pointer exceptions correctly, when needed.
25 *
26 * here even more important to align src and dst on a 32-bit (or even
27 * better 64-bit) boundary
28 */
29
30asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst,
31 int len, __wsum sum,
32 int *src_err_ptr, int *dst_err_ptr);
33
34/*
35 * Note: when you get a NULL pointer exception here this means someone
36 * passed in an incorrect kernel address to one of these functions.
37 *
38 * If you use these functions directly please don't forget the
39 * access_ok().
40 */
41static inline __wsum csum_partial_copy_nocheck(const void *src, void *dst,
42 int len, __wsum sum)
43{
44 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL);
45}
46
47static inline __wsum csum_partial_copy_from_user(const void __user *src,
48 void *dst,
49 int len, __wsum sum,
50 int *err_ptr)
51{
52 might_sleep();
53 return csum_partial_copy_generic((__force void *)src, dst,
54 len, sum, err_ptr, NULL);
55}
56
57/*
58 * This is a version of ip_compute_csum() optimized for IP headers,
59 * which always checksum on 4 octet boundaries.
60 *
61 * By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by
62 * Arnt Gulbrandsen.
63 */
64static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
65{
66 unsigned int sum;
67
68 asm volatile("movl (%1), %0 ;\n"
69 "subl $4, %2 ;\n"
70 "jbe 2f ;\n"
71 "addl 4(%1), %0 ;\n"
72 "adcl 8(%1), %0 ;\n"
73 "adcl 12(%1), %0;\n"
74 "1: adcl 16(%1), %0 ;\n"
75 "lea 4(%1), %1 ;\n"
76 "decl %2 ;\n"
77 "jne 1b ;\n"
78 "adcl $0, %0 ;\n"
79 "movl %0, %2 ;\n"
80 "shrl $16, %0 ;\n"
81 "addw %w2, %w0 ;\n"
82 "adcl $0, %0 ;\n"
83 "notl %0 ;\n"
84 "2: ;\n"
85 /* Since the input registers which are loaded with iph and ihl
86 are modified, we must also specify them as outputs, or gcc
87 will assume they contain their original values. */
88 : "=r" (sum), "=r" (iph), "=r" (ihl)
89 : "1" (iph), "2" (ihl)
90 : "memory");
91 return (__force __sum16)sum;
92}
93
94/*
95 * Fold a partial checksum
96 */
97
98static inline __sum16 csum_fold(__wsum sum)
99{
100 asm("addl %1, %0 ;\n"
101 "adcl $0xffff, %0 ;\n"
102 : "=r" (sum)
103 : "r" ((__force u32)sum << 16),
104 "0" ((__force u32)sum & 0xffff0000));
105 return (__force __sum16)(~(__force u32)sum >> 16);
106}
107
108static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
109 unsigned short len,
110 unsigned short proto,
111 __wsum sum)
112{
113 asm("addl %1, %0 ;\n"
114 "adcl %2, %0 ;\n"
115 "adcl %3, %0 ;\n"
116 "adcl $0, %0 ;\n"
117 : "=r" (sum)
118 : "g" (daddr), "g"(saddr),
119 "g" ((len + proto) << 8), "0" (sum));
120 return sum;
121}
122
123/*
124 * computes the checksum of the TCP/UDP pseudo-header
125 * returns a 16-bit checksum, already complemented
126 */
127static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
128 unsigned short len,
129 unsigned short proto,
130 __wsum sum)
131{
132 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
133}
134
135/*
136 * this routine is used for miscellaneous IP-like checksums, mainly
137 * in icmp.c
138 */
139
140static inline __sum16 ip_compute_csum(const void *buff, int len)
141{
142 return csum_fold(csum_partial(buff, len, 0));
143}
144
145#define _HAVE_ARCH_IPV6_CSUM
146static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
147 const struct in6_addr *daddr,
148 __u32 len, unsigned short proto,
149 __wsum sum)
150{
151 asm("addl 0(%1), %0 ;\n"
152 "adcl 4(%1), %0 ;\n"
153 "adcl 8(%1), %0 ;\n"
154 "adcl 12(%1), %0 ;\n"
155 "adcl 0(%2), %0 ;\n"
156 "adcl 4(%2), %0 ;\n"
157 "adcl 8(%2), %0 ;\n"
158 "adcl 12(%2), %0 ;\n"
159 "adcl %3, %0 ;\n"
160 "adcl %4, %0 ;\n"
161 "adcl $0, %0 ;\n"
162 : "=&r" (sum)
163 : "r" (saddr), "r" (daddr),
164 "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
165
166 return csum_fold(sum);
167}
168
169/*
170 * Copy and checksum to user
171 */
172#define HAVE_CSUM_COPY_USER
173static inline __wsum csum_and_copy_to_user(const void *src,
174 void __user *dst,
175 int len, __wsum sum,
176 int *err_ptr)
177{
178 might_sleep();
179 if (access_ok(VERIFY_WRITE, dst, len))
180 return csum_partial_copy_generic(src, (__force void *)dst,
181 len, sum, NULL, err_ptr);
182
183 if (len)
184 *err_ptr = -EFAULT;
185
186 return (__force __wsum)-1; /* invalid checksum */
187}
188
189#endif /* ASM_X86__CHECKSUM_32_H */
diff --git a/include/asm-x86/checksum_64.h b/include/asm-x86/checksum_64.h
deleted file mode 100644
index 110f403beb89..000000000000
--- a/include/asm-x86/checksum_64.h
+++ /dev/null
@@ -1,191 +0,0 @@
1#ifndef ASM_X86__CHECKSUM_64_H
2#define ASM_X86__CHECKSUM_64_H
3
4/*
5 * Checksums for x86-64
6 * Copyright 2002 by Andi Kleen, SuSE Labs
7 * with some code from asm-x86/checksum.h
8 */
9
10#include <linux/compiler.h>
11#include <asm/uaccess.h>
12#include <asm/byteorder.h>
13
14/**
15 * csum_fold - Fold and invert a 32bit checksum.
16 * sum: 32bit unfolded sum
17 *
18 * Fold a 32bit running checksum to 16bit and invert it. This is usually
19 * the last step before putting a checksum into a packet.
20 * Make sure not to mix with 64bit checksums.
21 */
22static inline __sum16 csum_fold(__wsum sum)
23{
24 asm(" addl %1,%0\n"
25 " adcl $0xffff,%0"
26 : "=r" (sum)
27 : "r" ((__force u32)sum << 16),
28 "0" ((__force u32)sum & 0xffff0000));
29 return (__force __sum16)(~(__force u32)sum >> 16);
30}
31
32/*
33 * This is a version of ip_compute_csum() optimized for IP headers,
34 * which always checksum on 4 octet boundaries.
35 *
36 * By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by
37 * Arnt Gulbrandsen.
38 */
39
40/**
41 * ip_fast_csum - Compute the IPv4 header checksum efficiently.
42 * iph: ipv4 header
43 * ihl: length of header / 4
44 */
45static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
46{
47 unsigned int sum;
48
49 asm(" movl (%1), %0\n"
50 " subl $4, %2\n"
51 " jbe 2f\n"
52 " addl 4(%1), %0\n"
53 " adcl 8(%1), %0\n"
54 " adcl 12(%1), %0\n"
55 "1: adcl 16(%1), %0\n"
56 " lea 4(%1), %1\n"
57 " decl %2\n"
58 " jne 1b\n"
59 " adcl $0, %0\n"
60 " movl %0, %2\n"
61 " shrl $16, %0\n"
62 " addw %w2, %w0\n"
63 " adcl $0, %0\n"
64 " notl %0\n"
65 "2:"
66 /* Since the input registers which are loaded with iph and ihl
67 are modified, we must also specify them as outputs, or gcc
68 will assume they contain their original values. */
69 : "=r" (sum), "=r" (iph), "=r" (ihl)
70 : "1" (iph), "2" (ihl)
71 : "memory");
72 return (__force __sum16)sum;
73}
74
75/**
76 * csum_tcpup_nofold - Compute an IPv4 pseudo header checksum.
77 * @saddr: source address
78 * @daddr: destination address
79 * @len: length of packet
80 * @proto: ip protocol of packet
81 * @sum: initial sum to be added in (32bit unfolded)
82 *
83 * Returns the pseudo header checksum the input data. Result is
84 * 32bit unfolded.
85 */
86static inline __wsum
87csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
88 unsigned short proto, __wsum sum)
89{
90 asm(" addl %1, %0\n"
91 " adcl %2, %0\n"
92 " adcl %3, %0\n"
93 " adcl $0, %0\n"
94 : "=r" (sum)
95 : "g" (daddr), "g" (saddr),
96 "g" ((len + proto)<<8), "0" (sum));
97 return sum;
98}
99
100
101/**
102 * csum_tcpup_magic - Compute an IPv4 pseudo header checksum.
103 * @saddr: source address
104 * @daddr: destination address
105 * @len: length of packet
106 * @proto: ip protocol of packet
107 * @sum: initial sum to be added in (32bit unfolded)
108 *
109 * Returns the 16bit pseudo header checksum the input data already
110 * complemented and ready to be filled in.
111 */
112static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
113 unsigned short len,
114 unsigned short proto, __wsum sum)
115{
116 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
117}
118
119/**
120 * csum_partial - Compute an internet checksum.
121 * @buff: buffer to be checksummed
122 * @len: length of buffer.
123 * @sum: initial sum to be added in (32bit unfolded)
124 *
125 * Returns the 32bit unfolded internet checksum of the buffer.
126 * Before filling it in it needs to be csum_fold()'ed.
127 * buff should be aligned to a 64bit boundary if possible.
128 */
129extern __wsum csum_partial(const void *buff, int len, __wsum sum);
130
131#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER 1
132#define HAVE_CSUM_COPY_USER 1
133
134
135/* Do not call this directly. Use the wrappers below */
136extern __wsum csum_partial_copy_generic(const void *src, const void *dst,
137 int len, __wsum sum,
138 int *src_err_ptr, int *dst_err_ptr);
139
140
141extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst,
142 int len, __wsum isum, int *errp);
143extern __wsum csum_partial_copy_to_user(const void *src, void __user *dst,
144 int len, __wsum isum, int *errp);
145extern __wsum csum_partial_copy_nocheck(const void *src, void *dst,
146 int len, __wsum sum);
147
148/* Old names. To be removed. */
149#define csum_and_copy_to_user csum_partial_copy_to_user
150#define csum_and_copy_from_user csum_partial_copy_from_user
151
152/**
153 * ip_compute_csum - Compute an 16bit IP checksum.
154 * @buff: buffer address.
155 * @len: length of buffer.
156 *
157 * Returns the 16bit folded/inverted checksum of the passed buffer.
158 * Ready to fill in.
159 */
160extern __sum16 ip_compute_csum(const void *buff, int len);
161
162/**
163 * csum_ipv6_magic - Compute checksum of an IPv6 pseudo header.
164 * @saddr: source address
165 * @daddr: destination address
166 * @len: length of packet
167 * @proto: protocol of packet
168 * @sum: initial sum (32bit unfolded) to be added in
169 *
170 * Computes an IPv6 pseudo header checksum. This sum is added the checksum
171 * into UDP/TCP packets and contains some link layer information.
172 * Returns the unfolded 32bit checksum.
173 */
174
175struct in6_addr;
176
177#define _HAVE_ARCH_IPV6_CSUM 1
178extern __sum16
179csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr,
180 __u32 len, unsigned short proto, __wsum sum);
181
182static inline unsigned add32_with_carry(unsigned a, unsigned b)
183{
184 asm("addl %2,%0\n\t"
185 "adcl $0,%0"
186 : "=r" (a)
187 : "0" (a), "r" (b));
188 return a;
189}
190
191#endif /* ASM_X86__CHECKSUM_64_H */
diff --git a/include/asm-x86/cmpxchg.h b/include/asm-x86/cmpxchg.h
deleted file mode 100644
index a460fa088d4c..000000000000
--- a/include/asm-x86/cmpxchg.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "cmpxchg_32.h"
3#else
4# include "cmpxchg_64.h"
5#endif
diff --git a/include/asm-x86/cmpxchg_32.h b/include/asm-x86/cmpxchg_32.h
deleted file mode 100644
index 0622e45cdf7c..000000000000
--- a/include/asm-x86/cmpxchg_32.h
+++ /dev/null
@@ -1,344 +0,0 @@
1#ifndef ASM_X86__CMPXCHG_32_H
2#define ASM_X86__CMPXCHG_32_H
3
4#include <linux/bitops.h> /* for LOCK_PREFIX */
5
6/*
7 * Note: if you use set64_bit(), __cmpxchg64(), or their variants, you
8 * you need to test for the feature in boot_cpu_data.
9 */
10
11#define xchg(ptr, v) \
12 ((__typeof__(*(ptr)))__xchg((unsigned long)(v), (ptr), sizeof(*(ptr))))
13
14struct __xchg_dummy {
15 unsigned long a[100];
16};
17#define __xg(x) ((struct __xchg_dummy *)(x))
18
19/*
20 * The semantics of XCHGCMP8B are a bit strange, this is why
21 * there is a loop and the loading of %%eax and %%edx has to
22 * be inside. This inlines well in most cases, the cached
23 * cost is around ~38 cycles. (in the future we might want
24 * to do an SIMD/3DNOW!/MMX/FPU 64-bit store here, but that
25 * might have an implicit FPU-save as a cost, so it's not
26 * clear which path to go.)
27 *
28 * cmpxchg8b must be used with the lock prefix here to allow
29 * the instruction to be executed atomically, see page 3-102
30 * of the instruction set reference 24319102.pdf. We need
31 * the reader side to see the coherent 64bit value.
32 */
33static inline void __set_64bit(unsigned long long *ptr,
34 unsigned int low, unsigned int high)
35{
36 asm volatile("\n1:\t"
37 "movl (%0), %%eax\n\t"
38 "movl 4(%0), %%edx\n\t"
39 LOCK_PREFIX "cmpxchg8b (%0)\n\t"
40 "jnz 1b"
41 : /* no outputs */
42 : "D"(ptr),
43 "b"(low),
44 "c"(high)
45 : "ax", "dx", "memory");
46}
47
48static inline void __set_64bit_constant(unsigned long long *ptr,
49 unsigned long long value)
50{
51 __set_64bit(ptr, (unsigned int)value, (unsigned int)(value >> 32));
52}
53
54#define ll_low(x) *(((unsigned int *)&(x)) + 0)
55#define ll_high(x) *(((unsigned int *)&(x)) + 1)
56
57static inline void __set_64bit_var(unsigned long long *ptr,
58 unsigned long long value)
59{
60 __set_64bit(ptr, ll_low(value), ll_high(value));
61}
62
63#define set_64bit(ptr, value) \
64 (__builtin_constant_p((value)) \
65 ? __set_64bit_constant((ptr), (value)) \
66 : __set_64bit_var((ptr), (value)))
67
68#define _set_64bit(ptr, value) \
69 (__builtin_constant_p(value) \
70 ? __set_64bit(ptr, (unsigned int)(value), \
71 (unsigned int)((value) >> 32)) \
72 : __set_64bit(ptr, ll_low((value)), ll_high((value))))
73
74/*
75 * Note: no "lock" prefix even on SMP: xchg always implies lock anyway
76 * Note 2: xchg has side effect, so that attribute volatile is necessary,
77 * but generally the primitive is invalid, *ptr is output argument. --ANK
78 */
79static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
80 int size)
81{
82 switch (size) {
83 case 1:
84 asm volatile("xchgb %b0,%1"
85 : "=q" (x)
86 : "m" (*__xg(ptr)), "0" (x)
87 : "memory");
88 break;
89 case 2:
90 asm volatile("xchgw %w0,%1"
91 : "=r" (x)
92 : "m" (*__xg(ptr)), "0" (x)
93 : "memory");
94 break;
95 case 4:
96 asm volatile("xchgl %0,%1"
97 : "=r" (x)
98 : "m" (*__xg(ptr)), "0" (x)
99 : "memory");
100 break;
101 }
102 return x;
103}
104
105/*
106 * Atomic compare and exchange. Compare OLD with MEM, if identical,
107 * store NEW in MEM. Return the initial value in MEM. Success is
108 * indicated by comparing RETURN with OLD.
109 */
110
111#ifdef CONFIG_X86_CMPXCHG
112#define __HAVE_ARCH_CMPXCHG 1
113#define cmpxchg(ptr, o, n) \
114 ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \
115 (unsigned long)(n), \
116 sizeof(*(ptr))))
117#define sync_cmpxchg(ptr, o, n) \
118 ((__typeof__(*(ptr)))__sync_cmpxchg((ptr), (unsigned long)(o), \
119 (unsigned long)(n), \
120 sizeof(*(ptr))))
121#define cmpxchg_local(ptr, o, n) \
122 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
123 (unsigned long)(n), \
124 sizeof(*(ptr))))
125#endif
126
127#ifdef CONFIG_X86_CMPXCHG64
128#define cmpxchg64(ptr, o, n) \
129 ((__typeof__(*(ptr)))__cmpxchg64((ptr), (unsigned long long)(o), \
130 (unsigned long long)(n)))
131#define cmpxchg64_local(ptr, o, n) \
132 ((__typeof__(*(ptr)))__cmpxchg64_local((ptr), (unsigned long long)(o), \
133 (unsigned long long)(n)))
134#endif
135
136static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
137 unsigned long new, int size)
138{
139 unsigned long prev;
140 switch (size) {
141 case 1:
142 asm volatile(LOCK_PREFIX "cmpxchgb %b1,%2"
143 : "=a"(prev)
144 : "q"(new), "m"(*__xg(ptr)), "0"(old)
145 : "memory");
146 return prev;
147 case 2:
148 asm volatile(LOCK_PREFIX "cmpxchgw %w1,%2"
149 : "=a"(prev)
150 : "r"(new), "m"(*__xg(ptr)), "0"(old)
151 : "memory");
152 return prev;
153 case 4:
154 asm volatile(LOCK_PREFIX "cmpxchgl %1,%2"
155 : "=a"(prev)
156 : "r"(new), "m"(*__xg(ptr)), "0"(old)
157 : "memory");
158 return prev;
159 }
160 return old;
161}
162
163/*
164 * Always use locked operations when touching memory shared with a
165 * hypervisor, since the system may be SMP even if the guest kernel
166 * isn't.
167 */
168static inline unsigned long __sync_cmpxchg(volatile void *ptr,
169 unsigned long old,
170 unsigned long new, int size)
171{
172 unsigned long prev;
173 switch (size) {
174 case 1:
175 asm volatile("lock; cmpxchgb %b1,%2"
176 : "=a"(prev)
177 : "q"(new), "m"(*__xg(ptr)), "0"(old)
178 : "memory");
179 return prev;
180 case 2:
181 asm volatile("lock; cmpxchgw %w1,%2"
182 : "=a"(prev)
183 : "r"(new), "m"(*__xg(ptr)), "0"(old)
184 : "memory");
185 return prev;
186 case 4:
187 asm volatile("lock; cmpxchgl %1,%2"
188 : "=a"(prev)
189 : "r"(new), "m"(*__xg(ptr)), "0"(old)
190 : "memory");
191 return prev;
192 }
193 return old;
194}
195
196static inline unsigned long __cmpxchg_local(volatile void *ptr,
197 unsigned long old,
198 unsigned long new, int size)
199{
200 unsigned long prev;
201 switch (size) {
202 case 1:
203 asm volatile("cmpxchgb %b1,%2"
204 : "=a"(prev)
205 : "q"(new), "m"(*__xg(ptr)), "0"(old)
206 : "memory");
207 return prev;
208 case 2:
209 asm volatile("cmpxchgw %w1,%2"
210 : "=a"(prev)
211 : "r"(new), "m"(*__xg(ptr)), "0"(old)
212 : "memory");
213 return prev;
214 case 4:
215 asm volatile("cmpxchgl %1,%2"
216 : "=a"(prev)
217 : "r"(new), "m"(*__xg(ptr)), "0"(old)
218 : "memory");
219 return prev;
220 }
221 return old;
222}
223
224static inline unsigned long long __cmpxchg64(volatile void *ptr,
225 unsigned long long old,
226 unsigned long long new)
227{
228 unsigned long long prev;
229 asm volatile(LOCK_PREFIX "cmpxchg8b %3"
230 : "=A"(prev)
231 : "b"((unsigned long)new),
232 "c"((unsigned long)(new >> 32)),
233 "m"(*__xg(ptr)),
234 "0"(old)
235 : "memory");
236 return prev;
237}
238
239static inline unsigned long long __cmpxchg64_local(volatile void *ptr,
240 unsigned long long old,
241 unsigned long long new)
242{
243 unsigned long long prev;
244 asm volatile("cmpxchg8b %3"
245 : "=A"(prev)
246 : "b"((unsigned long)new),
247 "c"((unsigned long)(new >> 32)),
248 "m"(*__xg(ptr)),
249 "0"(old)
250 : "memory");
251 return prev;
252}
253
254#ifndef CONFIG_X86_CMPXCHG
255/*
256 * Building a kernel capable running on 80386. It may be necessary to
257 * simulate the cmpxchg on the 80386 CPU. For that purpose we define
258 * a function for each of the sizes we support.
259 */
260
261extern unsigned long cmpxchg_386_u8(volatile void *, u8, u8);
262extern unsigned long cmpxchg_386_u16(volatile void *, u16, u16);
263extern unsigned long cmpxchg_386_u32(volatile void *, u32, u32);
264
265static inline unsigned long cmpxchg_386(volatile void *ptr, unsigned long old,
266 unsigned long new, int size)
267{
268 switch (size) {
269 case 1:
270 return cmpxchg_386_u8(ptr, old, new);
271 case 2:
272 return cmpxchg_386_u16(ptr, old, new);
273 case 4:
274 return cmpxchg_386_u32(ptr, old, new);
275 }
276 return old;
277}
278
279#define cmpxchg(ptr, o, n) \
280({ \
281 __typeof__(*(ptr)) __ret; \
282 if (likely(boot_cpu_data.x86 > 3)) \
283 __ret = (__typeof__(*(ptr)))__cmpxchg((ptr), \
284 (unsigned long)(o), (unsigned long)(n), \
285 sizeof(*(ptr))); \
286 else \
287 __ret = (__typeof__(*(ptr)))cmpxchg_386((ptr), \
288 (unsigned long)(o), (unsigned long)(n), \
289 sizeof(*(ptr))); \
290 __ret; \
291})
292#define cmpxchg_local(ptr, o, n) \
293({ \
294 __typeof__(*(ptr)) __ret; \
295 if (likely(boot_cpu_data.x86 > 3)) \
296 __ret = (__typeof__(*(ptr)))__cmpxchg_local((ptr), \
297 (unsigned long)(o), (unsigned long)(n), \
298 sizeof(*(ptr))); \
299 else \
300 __ret = (__typeof__(*(ptr)))cmpxchg_386((ptr), \
301 (unsigned long)(o), (unsigned long)(n), \
302 sizeof(*(ptr))); \
303 __ret; \
304})
305#endif
306
307#ifndef CONFIG_X86_CMPXCHG64
308/*
309 * Building a kernel capable running on 80386 and 80486. It may be necessary
310 * to simulate the cmpxchg8b on the 80386 and 80486 CPU.
311 */
312
313extern unsigned long long cmpxchg_486_u64(volatile void *, u64, u64);
314
315#define cmpxchg64(ptr, o, n) \
316({ \
317 __typeof__(*(ptr)) __ret; \
318 if (likely(boot_cpu_data.x86 > 4)) \
319 __ret = (__typeof__(*(ptr)))__cmpxchg64((ptr), \
320 (unsigned long long)(o), \
321 (unsigned long long)(n)); \
322 else \
323 __ret = (__typeof__(*(ptr)))cmpxchg_486_u64((ptr), \
324 (unsigned long long)(o), \
325 (unsigned long long)(n)); \
326 __ret; \
327})
328#define cmpxchg64_local(ptr, o, n) \
329({ \
330 __typeof__(*(ptr)) __ret; \
331 if (likely(boot_cpu_data.x86 > 4)) \
332 __ret = (__typeof__(*(ptr)))__cmpxchg64_local((ptr), \
333 (unsigned long long)(o), \
334 (unsigned long long)(n)); \
335 else \
336 __ret = (__typeof__(*(ptr)))cmpxchg_486_u64((ptr), \
337 (unsigned long long)(o), \
338 (unsigned long long)(n)); \
339 __ret; \
340})
341
342#endif
343
344#endif /* ASM_X86__CMPXCHG_32_H */
diff --git a/include/asm-x86/cmpxchg_64.h b/include/asm-x86/cmpxchg_64.h
deleted file mode 100644
index 63c1a5e61b99..000000000000
--- a/include/asm-x86/cmpxchg_64.h
+++ /dev/null
@@ -1,185 +0,0 @@
1#ifndef ASM_X86__CMPXCHG_64_H
2#define ASM_X86__CMPXCHG_64_H
3
4#include <asm/alternative.h> /* Provides LOCK_PREFIX */
5
6#define xchg(ptr, v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v), \
7 (ptr), sizeof(*(ptr))))
8
9#define __xg(x) ((volatile long *)(x))
10
11static inline void set_64bit(volatile unsigned long *ptr, unsigned long val)
12{
13 *ptr = val;
14}
15
16#define _set_64bit set_64bit
17
18/*
19 * Note: no "lock" prefix even on SMP: xchg always implies lock anyway
20 * Note 2: xchg has side effect, so that attribute volatile is necessary,
21 * but generally the primitive is invalid, *ptr is output argument. --ANK
22 */
23static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
24 int size)
25{
26 switch (size) {
27 case 1:
28 asm volatile("xchgb %b0,%1"
29 : "=q" (x)
30 : "m" (*__xg(ptr)), "0" (x)
31 : "memory");
32 break;
33 case 2:
34 asm volatile("xchgw %w0,%1"
35 : "=r" (x)
36 : "m" (*__xg(ptr)), "0" (x)
37 : "memory");
38 break;
39 case 4:
40 asm volatile("xchgl %k0,%1"
41 : "=r" (x)
42 : "m" (*__xg(ptr)), "0" (x)
43 : "memory");
44 break;
45 case 8:
46 asm volatile("xchgq %0,%1"
47 : "=r" (x)
48 : "m" (*__xg(ptr)), "0" (x)
49 : "memory");
50 break;
51 }
52 return x;
53}
54
55/*
56 * Atomic compare and exchange. Compare OLD with MEM, if identical,
57 * store NEW in MEM. Return the initial value in MEM. Success is
58 * indicated by comparing RETURN with OLD.
59 */
60
61#define __HAVE_ARCH_CMPXCHG 1
62
63static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
64 unsigned long new, int size)
65{
66 unsigned long prev;
67 switch (size) {
68 case 1:
69 asm volatile(LOCK_PREFIX "cmpxchgb %b1,%2"
70 : "=a"(prev)
71 : "q"(new), "m"(*__xg(ptr)), "0"(old)
72 : "memory");
73 return prev;
74 case 2:
75 asm volatile(LOCK_PREFIX "cmpxchgw %w1,%2"
76 : "=a"(prev)
77 : "r"(new), "m"(*__xg(ptr)), "0"(old)
78 : "memory");
79 return prev;
80 case 4:
81 asm volatile(LOCK_PREFIX "cmpxchgl %k1,%2"
82 : "=a"(prev)
83 : "r"(new), "m"(*__xg(ptr)), "0"(old)
84 : "memory");
85 return prev;
86 case 8:
87 asm volatile(LOCK_PREFIX "cmpxchgq %1,%2"
88 : "=a"(prev)
89 : "r"(new), "m"(*__xg(ptr)), "0"(old)
90 : "memory");
91 return prev;
92 }
93 return old;
94}
95
96/*
97 * Always use locked operations when touching memory shared with a
98 * hypervisor, since the system may be SMP even if the guest kernel
99 * isn't.
100 */
101static inline unsigned long __sync_cmpxchg(volatile void *ptr,
102 unsigned long old,
103 unsigned long new, int size)
104{
105 unsigned long prev;
106 switch (size) {
107 case 1:
108 asm volatile("lock; cmpxchgb %b1,%2"
109 : "=a"(prev)
110 : "q"(new), "m"(*__xg(ptr)), "0"(old)
111 : "memory");
112 return prev;
113 case 2:
114 asm volatile("lock; cmpxchgw %w1,%2"
115 : "=a"(prev)
116 : "r"(new), "m"(*__xg(ptr)), "0"(old)
117 : "memory");
118 return prev;
119 case 4:
120 asm volatile("lock; cmpxchgl %1,%2"
121 : "=a"(prev)
122 : "r"(new), "m"(*__xg(ptr)), "0"(old)
123 : "memory");
124 return prev;
125 }
126 return old;
127}
128
129static inline unsigned long __cmpxchg_local(volatile void *ptr,
130 unsigned long old,
131 unsigned long new, int size)
132{
133 unsigned long prev;
134 switch (size) {
135 case 1:
136 asm volatile("cmpxchgb %b1,%2"
137 : "=a"(prev)
138 : "q"(new), "m"(*__xg(ptr)), "0"(old)
139 : "memory");
140 return prev;
141 case 2:
142 asm volatile("cmpxchgw %w1,%2"
143 : "=a"(prev)
144 : "r"(new), "m"(*__xg(ptr)), "0"(old)
145 : "memory");
146 return prev;
147 case 4:
148 asm volatile("cmpxchgl %k1,%2"
149 : "=a"(prev)
150 : "r"(new), "m"(*__xg(ptr)), "0"(old)
151 : "memory");
152 return prev;
153 case 8:
154 asm volatile("cmpxchgq %1,%2"
155 : "=a"(prev)
156 : "r"(new), "m"(*__xg(ptr)), "0"(old)
157 : "memory");
158 return prev;
159 }
160 return old;
161}
162
163#define cmpxchg(ptr, o, n) \
164 ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \
165 (unsigned long)(n), sizeof(*(ptr))))
166#define cmpxchg64(ptr, o, n) \
167({ \
168 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
169 cmpxchg((ptr), (o), (n)); \
170})
171#define cmpxchg_local(ptr, o, n) \
172 ((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
173 (unsigned long)(n), \
174 sizeof(*(ptr))))
175#define sync_cmpxchg(ptr, o, n) \
176 ((__typeof__(*(ptr)))__sync_cmpxchg((ptr), (unsigned long)(o), \
177 (unsigned long)(n), \
178 sizeof(*(ptr))))
179#define cmpxchg64_local(ptr, o, n) \
180({ \
181 BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
182 cmpxchg_local((ptr), (o), (n)); \
183})
184
185#endif /* ASM_X86__CMPXCHG_64_H */
diff --git a/include/asm-x86/compat.h b/include/asm-x86/compat.h
deleted file mode 100644
index 6732b150949e..000000000000
--- a/include/asm-x86/compat.h
+++ /dev/null
@@ -1,218 +0,0 @@
1#ifndef ASM_X86__COMPAT_H
2#define ASM_X86__COMPAT_H
3
4/*
5 * Architecture specific compatibility types
6 */
7#include <linux/types.h>
8#include <linux/sched.h>
9#include <asm/user32.h>
10
11#define COMPAT_USER_HZ 100
12
13typedef u32 compat_size_t;
14typedef s32 compat_ssize_t;
15typedef s32 compat_time_t;
16typedef s32 compat_clock_t;
17typedef s32 compat_pid_t;
18typedef u16 __compat_uid_t;
19typedef u16 __compat_gid_t;
20typedef u32 __compat_uid32_t;
21typedef u32 __compat_gid32_t;
22typedef u16 compat_mode_t;
23typedef u32 compat_ino_t;
24typedef u16 compat_dev_t;
25typedef s32 compat_off_t;
26typedef s64 compat_loff_t;
27typedef u16 compat_nlink_t;
28typedef u16 compat_ipc_pid_t;
29typedef s32 compat_daddr_t;
30typedef u32 compat_caddr_t;
31typedef __kernel_fsid_t compat_fsid_t;
32typedef s32 compat_timer_t;
33typedef s32 compat_key_t;
34
35typedef s32 compat_int_t;
36typedef s32 compat_long_t;
37typedef s64 __attribute__((aligned(4))) compat_s64;
38typedef u32 compat_uint_t;
39typedef u32 compat_ulong_t;
40typedef u64 __attribute__((aligned(4))) compat_u64;
41
42struct compat_timespec {
43 compat_time_t tv_sec;
44 s32 tv_nsec;
45};
46
47struct compat_timeval {
48 compat_time_t tv_sec;
49 s32 tv_usec;
50};
51
52struct compat_stat {
53 compat_dev_t st_dev;
54 u16 __pad1;
55 compat_ino_t st_ino;
56 compat_mode_t st_mode;
57 compat_nlink_t st_nlink;
58 __compat_uid_t st_uid;
59 __compat_gid_t st_gid;
60 compat_dev_t st_rdev;
61 u16 __pad2;
62 u32 st_size;
63 u32 st_blksize;
64 u32 st_blocks;
65 u32 st_atime;
66 u32 st_atime_nsec;
67 u32 st_mtime;
68 u32 st_mtime_nsec;
69 u32 st_ctime;
70 u32 st_ctime_nsec;
71 u32 __unused4;
72 u32 __unused5;
73};
74
75struct compat_flock {
76 short l_type;
77 short l_whence;
78 compat_off_t l_start;
79 compat_off_t l_len;
80 compat_pid_t l_pid;
81};
82
83#define F_GETLK64 12 /* using 'struct flock64' */
84#define F_SETLK64 13
85#define F_SETLKW64 14
86
87/*
88 * IA32 uses 4 byte alignment for 64 bit quantities,
89 * so we need to pack this structure.
90 */
91struct compat_flock64 {
92 short l_type;
93 short l_whence;
94 compat_loff_t l_start;
95 compat_loff_t l_len;
96 compat_pid_t l_pid;
97} __attribute__((packed));
98
99struct compat_statfs {
100 int f_type;
101 int f_bsize;
102 int f_blocks;
103 int f_bfree;
104 int f_bavail;
105 int f_files;
106 int f_ffree;
107 compat_fsid_t f_fsid;
108 int f_namelen; /* SunOS ignores this field. */
109 int f_frsize;
110 int f_spare[5];
111};
112
113#define COMPAT_RLIM_OLD_INFINITY 0x7fffffff
114#define COMPAT_RLIM_INFINITY 0xffffffff
115
116typedef u32 compat_old_sigset_t; /* at least 32 bits */
117
118#define _COMPAT_NSIG 64
119#define _COMPAT_NSIG_BPW 32
120
121typedef u32 compat_sigset_word;
122
123#define COMPAT_OFF_T_MAX 0x7fffffff
124#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
125
126struct compat_ipc64_perm {
127 compat_key_t key;
128 __compat_uid32_t uid;
129 __compat_gid32_t gid;
130 __compat_uid32_t cuid;
131 __compat_gid32_t cgid;
132 unsigned short mode;
133 unsigned short __pad1;
134 unsigned short seq;
135 unsigned short __pad2;
136 compat_ulong_t unused1;
137 compat_ulong_t unused2;
138};
139
140struct compat_semid64_ds {
141 struct compat_ipc64_perm sem_perm;
142 compat_time_t sem_otime;
143 compat_ulong_t __unused1;
144 compat_time_t sem_ctime;
145 compat_ulong_t __unused2;
146 compat_ulong_t sem_nsems;
147 compat_ulong_t __unused3;
148 compat_ulong_t __unused4;
149};
150
151struct compat_msqid64_ds {
152 struct compat_ipc64_perm msg_perm;
153 compat_time_t msg_stime;
154 compat_ulong_t __unused1;
155 compat_time_t msg_rtime;
156 compat_ulong_t __unused2;
157 compat_time_t msg_ctime;
158 compat_ulong_t __unused3;
159 compat_ulong_t msg_cbytes;
160 compat_ulong_t msg_qnum;
161 compat_ulong_t msg_qbytes;
162 compat_pid_t msg_lspid;
163 compat_pid_t msg_lrpid;
164 compat_ulong_t __unused4;
165 compat_ulong_t __unused5;
166};
167
168struct compat_shmid64_ds {
169 struct compat_ipc64_perm shm_perm;
170 compat_size_t shm_segsz;
171 compat_time_t shm_atime;
172 compat_ulong_t __unused1;
173 compat_time_t shm_dtime;
174 compat_ulong_t __unused2;
175 compat_time_t shm_ctime;
176 compat_ulong_t __unused3;
177 compat_pid_t shm_cpid;
178 compat_pid_t shm_lpid;
179 compat_ulong_t shm_nattch;
180 compat_ulong_t __unused4;
181 compat_ulong_t __unused5;
182};
183
184/*
185 * The type of struct elf_prstatus.pr_reg in compatible core dumps.
186 */
187typedef struct user_regs_struct32 compat_elf_gregset_t;
188
189/*
190 * A pointer passed in from user mode. This should not
191 * be used for syscall parameters, just declare them
192 * as pointers because the syscall entry code will have
193 * appropriately converted them already.
194 */
195typedef u32 compat_uptr_t;
196
197static inline void __user *compat_ptr(compat_uptr_t uptr)
198{
199 return (void __user *)(unsigned long)uptr;
200}
201
202static inline compat_uptr_t ptr_to_compat(void __user *uptr)
203{
204 return (u32)(unsigned long)uptr;
205}
206
207static inline void __user *compat_alloc_user_space(long len)
208{
209 struct pt_regs *regs = task_pt_regs(current);
210 return (void __user *)regs->sp - len;
211}
212
213static inline int is_compat_task(void)
214{
215 return current_thread_info()->status & TS_COMPAT;
216}
217
218#endif /* ASM_X86__COMPAT_H */
diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h
deleted file mode 100644
index 83a115083f0d..000000000000
--- a/include/asm-x86/cpu.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef ASM_X86__CPU_H
2#define ASM_X86__CPU_H
3
4#include <linux/device.h>
5#include <linux/cpu.h>
6#include <linux/topology.h>
7#include <linux/nodemask.h>
8#include <linux/percpu.h>
9
10struct x86_cpu {
11 struct cpu cpu;
12};
13
14#ifdef CONFIG_HOTPLUG_CPU
15extern int arch_register_cpu(int num);
16extern void arch_unregister_cpu(int);
17#endif
18
19DECLARE_PER_CPU(int, cpu_state);
20#endif /* ASM_X86__CPU_H */
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
deleted file mode 100644
index adfeae6586e1..000000000000
--- a/include/asm-x86/cpufeature.h
+++ /dev/null
@@ -1,271 +0,0 @@
1/*
2 * Defines x86 CPU feature bits
3 */
4#ifndef ASM_X86__CPUFEATURE_H
5#define ASM_X86__CPUFEATURE_H
6
7#include <asm/required-features.h>
8
9#define NCAPINTS 9 /* N 32-bit words worth of info */
10
11/*
12 * Note: If the comment begins with a quoted string, that string is used
13 * in /proc/cpuinfo instead of the macro name. If the string is "",
14 * this feature bit is not displayed in /proc/cpuinfo at all.
15 */
16
17/* Intel-defined CPU features, CPUID level 0x00000001 (edx), word 0 */
18#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */
19#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */
20#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */
21#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */
22#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */
23#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers */
24#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */
25#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */
26#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */
27#define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */
28#define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */
29#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */
30#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */
31#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */
32#define X86_FEATURE_CMOV (0*32+15) /* CMOV instructions */
33 /* (plus FCMOVcc, FCOMI with FPU) */
34#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */
35#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */
36#define X86_FEATURE_PN (0*32+18) /* Processor serial number */
37#define X86_FEATURE_CLFLSH (0*32+19) /* "clflush" CLFLUSH instruction */
38#define X86_FEATURE_DS (0*32+21) /* "dts" Debug Store */
39#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */
40#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */
41#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE/FXRSTOR, CR4.OSFXSR */
42#define X86_FEATURE_XMM (0*32+25) /* "sse" */
43#define X86_FEATURE_XMM2 (0*32+26) /* "sse2" */
44#define X86_FEATURE_SELFSNOOP (0*32+27) /* "ss" CPU self snoop */
45#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */
46#define X86_FEATURE_ACC (0*32+29) /* "tm" Automatic clock control */
47#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */
48#define X86_FEATURE_PBE (0*32+31) /* Pending Break Enable */
49
50/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */
51/* Don't duplicate feature flags which are redundant with Intel! */
52#define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */
53#define X86_FEATURE_MP (1*32+19) /* MP Capable. */
54#define X86_FEATURE_NX (1*32+20) /* Execute Disable */
55#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */
56#define X86_FEATURE_FXSR_OPT (1*32+25) /* FXSAVE/FXRSTOR optimizations */
57#define X86_FEATURE_GBPAGES (1*32+26) /* "pdpe1gb" GB pages */
58#define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */
59#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */
60#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */
61#define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */
62
63/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */
64#define X86_FEATURE_RECOVERY (2*32+ 0) /* CPU in recovery mode */
65#define X86_FEATURE_LONGRUN (2*32+ 1) /* Longrun power control */
66#define X86_FEATURE_LRTI (2*32+ 3) /* LongRun table interface */
67
68/* Other features, Linux-defined mapping, word 3 */
69/* This range is used for feature bits which conflict or are synthesized */
70#define X86_FEATURE_CXMMX (3*32+ 0) /* Cyrix MMX extensions */
71#define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */
72#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */
73#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */
74/* cpu types for specific tunings: */
75#define X86_FEATURE_K8 (3*32+ 4) /* "" Opteron, Athlon64 */
76#define X86_FEATURE_K7 (3*32+ 5) /* "" Athlon */
77#define X86_FEATURE_P3 (3*32+ 6) /* "" P3 */
78#define X86_FEATURE_P4 (3*32+ 7) /* "" P4 */
79#define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */
80#define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */
81#define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* "" FXSAVE leaks FOP/FIP/FOP */
82#define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */
83#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
84#define X86_FEATURE_PEBS (3*32+12) /* Precise-Event Based Sampling */
85#define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */
86#define X86_FEATURE_SYSCALL32 (3*32+14) /* "" syscall in ia32 userspace */
87#define X86_FEATURE_SYSENTER32 (3*32+15) /* "" sysenter in ia32 userspace */
88#define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well */
89#define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* "" Mfence synchronizes RDTSC */
90#define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* "" Lfence synchronizes RDTSC */
91#define X86_FEATURE_11AP (3*32+19) /* "" Bad local APIC aka 11AP */
92#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
93#define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */
94#define X86_FEATURE_XTOPOLOGY (3*32+21) /* cpu topology enum extensions */
95
96/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
97#define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */
98#define X86_FEATURE_PCLMULQDQ (4*32+ 1) /* PCLMULQDQ instruction */
99#define X86_FEATURE_DTES64 (4*32+ 2) /* 64-bit Debug Store */
100#define X86_FEATURE_MWAIT (4*32+ 3) /* "monitor" Monitor/Mwait support */
101#define X86_FEATURE_DSCPL (4*32+ 4) /* "ds_cpl" CPL Qual. Debug Store */
102#define X86_FEATURE_VMX (4*32+ 5) /* Hardware virtualization */
103#define X86_FEATURE_SMX (4*32+ 6) /* Safer mode */
104#define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */
105#define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */
106#define X86_FEATURE_SSSE3 (4*32+ 9) /* Supplemental SSE-3 */
107#define X86_FEATURE_CID (4*32+10) /* Context ID */
108#define X86_FEATURE_FMA (4*32+12) /* Fused multiply-add */
109#define X86_FEATURE_CX16 (4*32+13) /* CMPXCHG16B */
110#define X86_FEATURE_XTPR (4*32+14) /* Send Task Priority Messages */
111#define X86_FEATURE_PDCM (4*32+15) /* Performance Capabilities */
112#define X86_FEATURE_DCA (4*32+18) /* Direct Cache Access */
113#define X86_FEATURE_XMM4_1 (4*32+19) /* "sse4_1" SSE-4.1 */
114#define X86_FEATURE_XMM4_2 (4*32+20) /* "sse4_2" SSE-4.2 */
115#define X86_FEATURE_X2APIC (4*32+21) /* x2APIC */
116#define X86_FEATURE_AES (4*32+25) /* AES instructions */
117#define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
118#define X86_FEATURE_OSXSAVE (4*32+27) /* "" XSAVE enabled in the OS */
119#define X86_FEATURE_AVX (4*32+28) /* Advanced Vector Extensions */
120
121/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
122#define X86_FEATURE_XSTORE (5*32+ 2) /* "rng" RNG present (xstore) */
123#define X86_FEATURE_XSTORE_EN (5*32+ 3) /* "rng_en" RNG enabled */
124#define X86_FEATURE_XCRYPT (5*32+ 6) /* "ace" on-CPU crypto (xcrypt) */
125#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* "ace_en" on-CPU crypto enabled */
126#define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */
127#define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */
128#define X86_FEATURE_PHE (5*32+10) /* PadLock Hash Engine */
129#define X86_FEATURE_PHE_EN (5*32+11) /* PHE enabled */
130#define X86_FEATURE_PMM (5*32+12) /* PadLock Montgomery Multiplier */
131#define X86_FEATURE_PMM_EN (5*32+13) /* PMM enabled */
132
133/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */
134#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
135#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
136#define X86_FEATURE_SVM (6*32+ 2) /* Secure virtual machine */
137#define X86_FEATURE_EXTAPIC (6*32+ 3) /* Extended APIC space */
138#define X86_FEATURE_CR8_LEGACY (6*32+ 4) /* CR8 in 32-bit mode */
139#define X86_FEATURE_ABM (6*32+ 5) /* Advanced bit manipulation */
140#define X86_FEATURE_SSE4A (6*32+ 6) /* SSE-4A */
141#define X86_FEATURE_MISALIGNSSE (6*32+ 7) /* Misaligned SSE mode */
142#define X86_FEATURE_3DNOWPREFETCH (6*32+ 8) /* 3DNow prefetch instructions */
143#define X86_FEATURE_OSVW (6*32+ 9) /* OS Visible Workaround */
144#define X86_FEATURE_IBS (6*32+10) /* Instruction Based Sampling */
145#define X86_FEATURE_SSE5 (6*32+11) /* SSE-5 */
146#define X86_FEATURE_SKINIT (6*32+12) /* SKINIT/STGI instructions */
147#define X86_FEATURE_WDT (6*32+13) /* Watchdog timer */
148
149/*
150 * Auxiliary flags: Linux defined - For features scattered in various
151 * CPUID levels like 0x6, 0xA etc
152 */
153#define X86_FEATURE_IDA (7*32+ 0) /* Intel Dynamic Acceleration */
154
155/* Virtualization flags: Linux defined */
156#define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */
157#define X86_FEATURE_VNMI (8*32+ 1) /* Intel Virtual NMI */
158#define X86_FEATURE_FLEXPRIORITY (8*32+ 2) /* Intel FlexPriority */
159#define X86_FEATURE_EPT (8*32+ 3) /* Intel Extended Page Table */
160#define X86_FEATURE_VPID (8*32+ 4) /* Intel Virtual Processor ID */
161
162#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
163
164#include <linux/bitops.h>
165
166extern const char * const x86_cap_flags[NCAPINTS*32];
167extern const char * const x86_power_flags[32];
168
169#define test_cpu_cap(c, bit) \
170 test_bit(bit, (unsigned long *)((c)->x86_capability))
171
172#define cpu_has(c, bit) \
173 (__builtin_constant_p(bit) && \
174 ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || \
175 (((bit)>>5)==1 && (1UL<<((bit)&31) & REQUIRED_MASK1)) || \
176 (((bit)>>5)==2 && (1UL<<((bit)&31) & REQUIRED_MASK2)) || \
177 (((bit)>>5)==3 && (1UL<<((bit)&31) & REQUIRED_MASK3)) || \
178 (((bit)>>5)==4 && (1UL<<((bit)&31) & REQUIRED_MASK4)) || \
179 (((bit)>>5)==5 && (1UL<<((bit)&31) & REQUIRED_MASK5)) || \
180 (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) || \
181 (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) ) \
182 ? 1 : \
183 test_cpu_cap(c, bit))
184
185#define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit)
186
187#define set_cpu_cap(c, bit) set_bit(bit, (unsigned long *)((c)->x86_capability))
188#define clear_cpu_cap(c, bit) clear_bit(bit, (unsigned long *)((c)->x86_capability))
189#define setup_clear_cpu_cap(bit) do { \
190 clear_cpu_cap(&boot_cpu_data, bit); \
191 set_bit(bit, (unsigned long *)cleared_cpu_caps); \
192} while (0)
193#define setup_force_cpu_cap(bit) do { \
194 set_cpu_cap(&boot_cpu_data, bit); \
195 clear_bit(bit, (unsigned long *)cleared_cpu_caps); \
196} while (0)
197
198#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
199#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME)
200#define cpu_has_de boot_cpu_has(X86_FEATURE_DE)
201#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
202#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
203#define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE)
204#define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE)
205#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
206#define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP)
207#define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR)
208#define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX)
209#define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR)
210#define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM)
211#define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2)
212#define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3)
213#define cpu_has_ht boot_cpu_has(X86_FEATURE_HT)
214#define cpu_has_mp boot_cpu_has(X86_FEATURE_MP)
215#define cpu_has_nx boot_cpu_has(X86_FEATURE_NX)
216#define cpu_has_k6_mtrr boot_cpu_has(X86_FEATURE_K6_MTRR)
217#define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR)
218#define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR)
219#define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE)
220#define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN)
221#define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT)
222#define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN)
223#define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2)
224#define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN)
225#define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE)
226#define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN)
227#define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM)
228#define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN)
229#define cpu_has_ds boot_cpu_has(X86_FEATURE_DS)
230#define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS)
231#define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH)
232#define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS)
233#define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES)
234#define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
235#define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT)
236#define cpu_has_xmm4_1 boot_cpu_has(X86_FEATURE_XMM4_1)
237#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2)
238#define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC)
239#define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE)
240
241#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
242# define cpu_has_invlpg 1
243#else
244# define cpu_has_invlpg (boot_cpu_data.x86 > 3)
245#endif
246
247#ifdef CONFIG_X86_64
248
249#undef cpu_has_vme
250#define cpu_has_vme 0
251
252#undef cpu_has_pae
253#define cpu_has_pae ___BUG___
254
255#undef cpu_has_mp
256#define cpu_has_mp 1
257
258#undef cpu_has_k6_mtrr
259#define cpu_has_k6_mtrr 0
260
261#undef cpu_has_cyrix_arr
262#define cpu_has_cyrix_arr 0
263
264#undef cpu_has_centaur_mcr
265#define cpu_has_centaur_mcr 0
266
267#endif /* CONFIG_X86_64 */
268
269#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
270
271#endif /* ASM_X86__CPUFEATURE_H */
diff --git a/include/asm-x86/cputime.h b/include/asm-x86/cputime.h
deleted file mode 100644
index 6d68ad7e0ea3..000000000000
--- a/include/asm-x86/cputime.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/cputime.h>
diff --git a/include/asm-x86/current.h b/include/asm-x86/current.h
deleted file mode 100644
index a863ead856f3..000000000000
--- a/include/asm-x86/current.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef ASM_X86__CURRENT_H
2#define ASM_X86__CURRENT_H
3
4#ifdef CONFIG_X86_32
5#include <linux/compiler.h>
6#include <asm/percpu.h>
7
8struct task_struct;
9
10DECLARE_PER_CPU(struct task_struct *, current_task);
11static __always_inline struct task_struct *get_current(void)
12{
13 return x86_read_percpu(current_task);
14}
15
16#else /* X86_32 */
17
18#ifndef __ASSEMBLY__
19#include <asm/pda.h>
20
21struct task_struct;
22
23static __always_inline struct task_struct *get_current(void)
24{
25 return read_pda(pcurrent);
26}
27
28#else /* __ASSEMBLY__ */
29
30#include <asm/asm-offsets.h>
31#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg
32
33#endif /* __ASSEMBLY__ */
34
35#endif /* X86_32 */
36
37#define current get_current()
38
39#endif /* ASM_X86__CURRENT_H */
diff --git a/include/asm-x86/debugreg.h b/include/asm-x86/debugreg.h
deleted file mode 100644
index ecb6907c3ea4..000000000000
--- a/include/asm-x86/debugreg.h
+++ /dev/null
@@ -1,70 +0,0 @@
1#ifndef ASM_X86__DEBUGREG_H
2#define ASM_X86__DEBUGREG_H
3
4
5/* Indicate the register numbers for a number of the specific
6 debug registers. Registers 0-3 contain the addresses we wish to trap on */
7#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */
8#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */
9
10#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */
11#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */
12
13/* Define a few things for the status register. We can use this to determine
14 which debugging register was responsible for the trap. The other bits
15 are either reserved or not of interest to us. */
16
17#define DR_TRAP0 (0x1) /* db0 */
18#define DR_TRAP1 (0x2) /* db1 */
19#define DR_TRAP2 (0x4) /* db2 */
20#define DR_TRAP3 (0x8) /* db3 */
21
22#define DR_STEP (0x4000) /* single-step */
23#define DR_SWITCH (0x8000) /* task switch */
24
25/* Now define a bunch of things for manipulating the control register.
26 The top two bytes of the control register consist of 4 fields of 4
27 bits - each field corresponds to one of the four debug registers,
28 and indicates what types of access we trap on, and how large the data
29 field is that we are looking at */
30
31#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
32#define DR_CONTROL_SIZE 4 /* 4 control bits per register */
33
34#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */
35#define DR_RW_WRITE (0x1)
36#define DR_RW_READ (0x3)
37
38#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
39#define DR_LEN_2 (0x4)
40#define DR_LEN_4 (0xC)
41#define DR_LEN_8 (0x8)
42
43/* The low byte to the control register determine which registers are
44 enabled. There are 4 fields of two bits. One bit is "local", meaning
45 that the processor will reset the bit after a task switch and the other
46 is global meaning that we have to explicitly reset the bit. With linux,
47 you can use either one, since we explicitly zero the register when we enter
48 kernel mode. */
49
50#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */
51#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */
52#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */
53
54#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */
55#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
56
57/* The second byte to the control register has a few special things.
58 We can slow the instruction pipeline for instructions coming via the
59 gdt or the ldt if we want to. I am not sure why this is an advantage */
60
61#ifdef __i386__
62#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
63#else
64#define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL) /* Reserved */
65#endif
66
67#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */
68#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */
69
70#endif /* ASM_X86__DEBUGREG_H */
diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h
deleted file mode 100644
index 8a0da95b4fc5..000000000000
--- a/include/asm-x86/delay.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef ASM_X86__DELAY_H
2#define ASM_X86__DELAY_H
3
4/*
5 * Copyright (C) 1993 Linus Torvalds
6 *
7 * Delay routines calling functions in arch/x86/lib/delay.c
8 */
9
10/* Undefined functions to get compile-time errors */
11extern void __bad_udelay(void);
12extern void __bad_ndelay(void);
13
14extern void __udelay(unsigned long usecs);
15extern void __ndelay(unsigned long nsecs);
16extern void __const_udelay(unsigned long xloops);
17extern void __delay(unsigned long loops);
18
19/* 0x10c7 is 2**32 / 1000000 (rounded up) */
20#define udelay(n) (__builtin_constant_p(n) ? \
21 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
22 __udelay(n))
23
24/* 0x5 is 2**32 / 1000000000 (rounded up) */
25#define ndelay(n) (__builtin_constant_p(n) ? \
26 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
27 __ndelay(n))
28
29void use_tsc_delay(void);
30
31#endif /* ASM_X86__DELAY_H */
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
deleted file mode 100644
index f06adac7938c..000000000000
--- a/include/asm-x86/desc.h
+++ /dev/null
@@ -1,409 +0,0 @@
1#ifndef ASM_X86__DESC_H
2#define ASM_X86__DESC_H
3
4#ifndef __ASSEMBLY__
5#include <asm/desc_defs.h>
6#include <asm/ldt.h>
7#include <asm/mmu.h>
8#include <linux/smp.h>
9
10static inline void fill_ldt(struct desc_struct *desc,
11 const struct user_desc *info)
12{
13 desc->limit0 = info->limit & 0x0ffff;
14 desc->base0 = info->base_addr & 0x0000ffff;
15
16 desc->base1 = (info->base_addr & 0x00ff0000) >> 16;
17 desc->type = (info->read_exec_only ^ 1) << 1;
18 desc->type |= info->contents << 2;
19 desc->s = 1;
20 desc->dpl = 0x3;
21 desc->p = info->seg_not_present ^ 1;
22 desc->limit = (info->limit & 0xf0000) >> 16;
23 desc->avl = info->useable;
24 desc->d = info->seg_32bit;
25 desc->g = info->limit_in_pages;
26 desc->base2 = (info->base_addr & 0xff000000) >> 24;
27 /*
28 * Don't allow setting of the lm bit. It is useless anyway
29 * because 64bit system calls require __USER_CS:
30 */
31 desc->l = 0;
32}
33
34extern struct desc_ptr idt_descr;
35extern gate_desc idt_table[];
36
37struct gdt_page {
38 struct desc_struct gdt[GDT_ENTRIES];
39} __attribute__((aligned(PAGE_SIZE)));
40DECLARE_PER_CPU(struct gdt_page, gdt_page);
41
42static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
43{
44 return per_cpu(gdt_page, cpu).gdt;
45}
46
47#ifdef CONFIG_X86_64
48
49static inline void pack_gate(gate_desc *gate, unsigned type, unsigned long func,
50 unsigned dpl, unsigned ist, unsigned seg)
51{
52 gate->offset_low = PTR_LOW(func);
53 gate->segment = __KERNEL_CS;
54 gate->ist = ist;
55 gate->p = 1;
56 gate->dpl = dpl;
57 gate->zero0 = 0;
58 gate->zero1 = 0;
59 gate->type = type;
60 gate->offset_middle = PTR_MIDDLE(func);
61 gate->offset_high = PTR_HIGH(func);
62}
63
64#else
65static inline void pack_gate(gate_desc *gate, unsigned char type,
66 unsigned long base, unsigned dpl, unsigned flags,
67 unsigned short seg)
68{
69 gate->a = (seg << 16) | (base & 0xffff);
70 gate->b = (base & 0xffff0000) |
71 (((0x80 | type | (dpl << 5)) & 0xff) << 8);
72}
73
74#endif
75
76static inline int desc_empty(const void *ptr)
77{
78 const u32 *desc = ptr;
79 return !(desc[0] | desc[1]);
80}
81
82#ifdef CONFIG_PARAVIRT
83#include <asm/paravirt.h>
84#else
85#define load_TR_desc() native_load_tr_desc()
86#define load_gdt(dtr) native_load_gdt(dtr)
87#define load_idt(dtr) native_load_idt(dtr)
88#define load_tr(tr) asm volatile("ltr %0"::"m" (tr))
89#define load_ldt(ldt) asm volatile("lldt %0"::"m" (ldt))
90
91#define store_gdt(dtr) native_store_gdt(dtr)
92#define store_idt(dtr) native_store_idt(dtr)
93#define store_tr(tr) (tr = native_store_tr())
94#define store_ldt(ldt) asm("sldt %0":"=m" (ldt))
95
96#define load_TLS(t, cpu) native_load_tls(t, cpu)
97#define set_ldt native_set_ldt
98
99#define write_ldt_entry(dt, entry, desc) \
100 native_write_ldt_entry(dt, entry, desc)
101#define write_gdt_entry(dt, entry, desc, type) \
102 native_write_gdt_entry(dt, entry, desc, type)
103#define write_idt_entry(dt, entry, g) \
104 native_write_idt_entry(dt, entry, g)
105
106static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
107{
108}
109
110static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
111{
112}
113#endif /* CONFIG_PARAVIRT */
114
115static inline void native_write_idt_entry(gate_desc *idt, int entry,
116 const gate_desc *gate)
117{
118 memcpy(&idt[entry], gate, sizeof(*gate));
119}
120
121static inline void native_write_ldt_entry(struct desc_struct *ldt, int entry,
122 const void *desc)
123{
124 memcpy(&ldt[entry], desc, 8);
125}
126
127static inline void native_write_gdt_entry(struct desc_struct *gdt, int entry,
128 const void *desc, int type)
129{
130 unsigned int size;
131 switch (type) {
132 case DESC_TSS:
133 size = sizeof(tss_desc);
134 break;
135 case DESC_LDT:
136 size = sizeof(ldt_desc);
137 break;
138 default:
139 size = sizeof(struct desc_struct);
140 break;
141 }
142 memcpy(&gdt[entry], desc, size);
143}
144
145static inline void pack_descriptor(struct desc_struct *desc, unsigned long base,
146 unsigned long limit, unsigned char type,
147 unsigned char flags)
148{
149 desc->a = ((base & 0xffff) << 16) | (limit & 0xffff);
150 desc->b = (base & 0xff000000) | ((base & 0xff0000) >> 16) |
151 (limit & 0x000f0000) | ((type & 0xff) << 8) |
152 ((flags & 0xf) << 20);
153 desc->p = 1;
154}
155
156
157static inline void set_tssldt_descriptor(void *d, unsigned long addr,
158 unsigned type, unsigned size)
159{
160#ifdef CONFIG_X86_64
161 struct ldttss_desc64 *desc = d;
162 memset(desc, 0, sizeof(*desc));
163 desc->limit0 = size & 0xFFFF;
164 desc->base0 = PTR_LOW(addr);
165 desc->base1 = PTR_MIDDLE(addr) & 0xFF;
166 desc->type = type;
167 desc->p = 1;
168 desc->limit1 = (size >> 16) & 0xF;
169 desc->base2 = (PTR_MIDDLE(addr) >> 8) & 0xFF;
170 desc->base3 = PTR_HIGH(addr);
171#else
172 pack_descriptor((struct desc_struct *)d, addr, size, 0x80 | type, 0);
173#endif
174}
175
176static inline void __set_tss_desc(unsigned cpu, unsigned int entry, void *addr)
177{
178 struct desc_struct *d = get_cpu_gdt_table(cpu);
179 tss_desc tss;
180
181 /*
182 * sizeof(unsigned long) coming from an extra "long" at the end
183 * of the iobitmap. See tss_struct definition in processor.h
184 *
185 * -1? seg base+limit should be pointing to the address of the
186 * last valid byte
187 */
188 set_tssldt_descriptor(&tss, (unsigned long)addr, DESC_TSS,
189 IO_BITMAP_OFFSET + IO_BITMAP_BYTES +
190 sizeof(unsigned long) - 1);
191 write_gdt_entry(d, entry, &tss, DESC_TSS);
192}
193
194#define set_tss_desc(cpu, addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)
195
196static inline void native_set_ldt(const void *addr, unsigned int entries)
197{
198 if (likely(entries == 0))
199 asm volatile("lldt %w0"::"q" (0));
200 else {
201 unsigned cpu = smp_processor_id();
202 ldt_desc ldt;
203
204 set_tssldt_descriptor(&ldt, (unsigned long)addr, DESC_LDT,
205 entries * LDT_ENTRY_SIZE - 1);
206 write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT,
207 &ldt, DESC_LDT);
208 asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8));
209 }
210}
211
212static inline void native_load_tr_desc(void)
213{
214 asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8));
215}
216
217static inline void native_load_gdt(const struct desc_ptr *dtr)
218{
219 asm volatile("lgdt %0"::"m" (*dtr));
220}
221
222static inline void native_load_idt(const struct desc_ptr *dtr)
223{
224 asm volatile("lidt %0"::"m" (*dtr));
225}
226
227static inline void native_store_gdt(struct desc_ptr *dtr)
228{
229 asm volatile("sgdt %0":"=m" (*dtr));
230}
231
232static inline void native_store_idt(struct desc_ptr *dtr)
233{
234 asm volatile("sidt %0":"=m" (*dtr));
235}
236
237static inline unsigned long native_store_tr(void)
238{
239 unsigned long tr;
240 asm volatile("str %0":"=r" (tr));
241 return tr;
242}
243
244static inline void native_load_tls(struct thread_struct *t, unsigned int cpu)
245{
246 unsigned int i;
247 struct desc_struct *gdt = get_cpu_gdt_table(cpu);
248
249 for (i = 0; i < GDT_ENTRY_TLS_ENTRIES; i++)
250 gdt[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i];
251}
252
253#define _LDT_empty(info) \
254 ((info)->base_addr == 0 && \
255 (info)->limit == 0 && \
256 (info)->contents == 0 && \
257 (info)->read_exec_only == 1 && \
258 (info)->seg_32bit == 0 && \
259 (info)->limit_in_pages == 0 && \
260 (info)->seg_not_present == 1 && \
261 (info)->useable == 0)
262
263#ifdef CONFIG_X86_64
264#define LDT_empty(info) (_LDT_empty(info) && ((info)->lm == 0))
265#else
266#define LDT_empty(info) (_LDT_empty(info))
267#endif
268
269static inline void clear_LDT(void)
270{
271 set_ldt(NULL, 0);
272}
273
274/*
275 * load one particular LDT into the current CPU
276 */
277static inline void load_LDT_nolock(mm_context_t *pc)
278{
279 set_ldt(pc->ldt, pc->size);
280}
281
282static inline void load_LDT(mm_context_t *pc)
283{
284 preempt_disable();
285 load_LDT_nolock(pc);
286 preempt_enable();
287}
288
289static inline unsigned long get_desc_base(const struct desc_struct *desc)
290{
291 return desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24);
292}
293
294static inline unsigned long get_desc_limit(const struct desc_struct *desc)
295{
296 return desc->limit0 | (desc->limit << 16);
297}
298
299static inline void _set_gate(int gate, unsigned type, void *addr,
300 unsigned dpl, unsigned ist, unsigned seg)
301{
302 gate_desc s;
303 pack_gate(&s, type, (unsigned long)addr, dpl, ist, seg);
304 /*
305 * does not need to be atomic because it is only done once at
306 * setup time
307 */
308 write_idt_entry(idt_table, gate, &s);
309}
310
311/*
312 * This needs to use 'idt_table' rather than 'idt', and
313 * thus use the _nonmapped_ version of the IDT, as the
314 * Pentium F0 0F bugfix can have resulted in the mapped
315 * IDT being write-protected.
316 */
317static inline void set_intr_gate(unsigned int n, void *addr)
318{
319 BUG_ON((unsigned)n > 0xFF);
320 _set_gate(n, GATE_INTERRUPT, addr, 0, 0, __KERNEL_CS);
321}
322
323#define SYS_VECTOR_FREE 0
324#define SYS_VECTOR_ALLOCED 1
325
326extern int first_system_vector;
327extern char system_vectors[];
328
329static inline void alloc_system_vector(int vector)
330{
331 if (system_vectors[vector] == SYS_VECTOR_FREE) {
332 system_vectors[vector] = SYS_VECTOR_ALLOCED;
333 if (first_system_vector > vector)
334 first_system_vector = vector;
335 } else
336 BUG();
337}
338
339static inline void alloc_intr_gate(unsigned int n, void *addr)
340{
341 alloc_system_vector(n);
342 set_intr_gate(n, addr);
343}
344
345/*
346 * This routine sets up an interrupt gate at directory privilege level 3.
347 */
348static inline void set_system_intr_gate(unsigned int n, void *addr)
349{
350 BUG_ON((unsigned)n > 0xFF);
351 _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS);
352}
353
354static inline void set_system_trap_gate(unsigned int n, void *addr)
355{
356 BUG_ON((unsigned)n > 0xFF);
357 _set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS);
358}
359
360static inline void set_trap_gate(unsigned int n, void *addr)
361{
362 BUG_ON((unsigned)n > 0xFF);
363 _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS);
364}
365
366static inline void set_task_gate(unsigned int n, unsigned int gdt_entry)
367{
368 BUG_ON((unsigned)n > 0xFF);
369 _set_gate(n, GATE_TASK, (void *)0, 0, 0, (gdt_entry<<3));
370}
371
372static inline void set_intr_gate_ist(int n, void *addr, unsigned ist)
373{
374 BUG_ON((unsigned)n > 0xFF);
375 _set_gate(n, GATE_INTERRUPT, addr, 0, ist, __KERNEL_CS);
376}
377
378static inline void set_system_intr_gate_ist(int n, void *addr, unsigned ist)
379{
380 BUG_ON((unsigned)n > 0xFF);
381 _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS);
382}
383
384#else
385/*
386 * GET_DESC_BASE reads the descriptor base of the specified segment.
387 *
388 * Args:
389 * idx - descriptor index
390 * gdt - GDT pointer
391 * base - 32bit register to which the base will be written
392 * lo_w - lo word of the "base" register
393 * lo_b - lo byte of the "base" register
394 * hi_b - hi byte of the low word of the "base" register
395 *
396 * Example:
397 * GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah)
398 * Will read the base address of GDT_ENTRY_ESPFIX_SS and put it into %eax.
399 */
400#define GET_DESC_BASE(idx, gdt, base, lo_w, lo_b, hi_b) \
401 movb idx * 8 + 4(gdt), lo_b; \
402 movb idx * 8 + 7(gdt), hi_b; \
403 shll $16, base; \
404 movw idx * 8 + 2(gdt), lo_w;
405
406
407#endif /* __ASSEMBLY__ */
408
409#endif /* ASM_X86__DESC_H */
diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h
deleted file mode 100644
index b881db664b46..000000000000
--- a/include/asm-x86/desc_defs.h
+++ /dev/null
@@ -1,95 +0,0 @@
1/* Written 2000 by Andi Kleen */
2#ifndef ASM_X86__DESC_DEFS_H
3#define ASM_X86__DESC_DEFS_H
4
5/*
6 * Segment descriptor structure definitions, usable from both x86_64 and i386
7 * archs.
8 */
9
10#ifndef __ASSEMBLY__
11
12#include <linux/types.h>
13
14/*
15 * FIXME: Acessing the desc_struct through its fields is more elegant,
16 * and should be the one valid thing to do. However, a lot of open code
17 * still touches the a and b acessors, and doing this allow us to do it
18 * incrementally. We keep the signature as a struct, rather than an union,
19 * so we can get rid of it transparently in the future -- glommer
20 */
21/* 8 byte segment descriptor */
22struct desc_struct {
23 union {
24 struct {
25 unsigned int a;
26 unsigned int b;
27 };
28 struct {
29 u16 limit0;
30 u16 base0;
31 unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1;
32 unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8;
33 };
34 };
35} __attribute__((packed));
36
37enum {
38 GATE_INTERRUPT = 0xE,
39 GATE_TRAP = 0xF,
40 GATE_CALL = 0xC,
41 GATE_TASK = 0x5,
42};
43
44/* 16byte gate */
45struct gate_struct64 {
46 u16 offset_low;
47 u16 segment;
48 unsigned ist : 3, zero0 : 5, type : 5, dpl : 2, p : 1;
49 u16 offset_middle;
50 u32 offset_high;
51 u32 zero1;
52} __attribute__((packed));
53
54#define PTR_LOW(x) ((unsigned long long)(x) & 0xFFFF)
55#define PTR_MIDDLE(x) (((unsigned long long)(x) >> 16) & 0xFFFF)
56#define PTR_HIGH(x) ((unsigned long long)(x) >> 32)
57
58enum {
59 DESC_TSS = 0x9,
60 DESC_LDT = 0x2,
61 DESCTYPE_S = 0x10, /* !system */
62};
63
64/* LDT or TSS descriptor in the GDT. 16 bytes. */
65struct ldttss_desc64 {
66 u16 limit0;
67 u16 base0;
68 unsigned base1 : 8, type : 5, dpl : 2, p : 1;
69 unsigned limit1 : 4, zero0 : 3, g : 1, base2 : 8;
70 u32 base3;
71 u32 zero1;
72} __attribute__((packed));
73
74#ifdef CONFIG_X86_64
75typedef struct gate_struct64 gate_desc;
76typedef struct ldttss_desc64 ldt_desc;
77typedef struct ldttss_desc64 tss_desc;
78#define gate_offset(g) ((g).offset_low | ((unsigned long)(g).offset_middle << 16) | ((unsigned long)(g).offset_high << 32))
79#define gate_segment(g) ((g).segment)
80#else
81typedef struct desc_struct gate_desc;
82typedef struct desc_struct ldt_desc;
83typedef struct desc_struct tss_desc;
84#define gate_offset(g) (((g).b & 0xffff0000) | ((g).a & 0x0000ffff))
85#define gate_segment(g) ((g).a >> 16)
86#endif
87
88struct desc_ptr {
89 unsigned short size;
90 unsigned long address;
91} __attribute__((packed)) ;
92
93#endif /* !__ASSEMBLY__ */
94
95#endif /* ASM_X86__DESC_DEFS_H */
diff --git a/include/asm-x86/device.h b/include/asm-x86/device.h
deleted file mode 100644
index 1bece04c7d9d..000000000000
--- a/include/asm-x86/device.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef ASM_X86__DEVICE_H
2#define ASM_X86__DEVICE_H
3
4struct dev_archdata {
5#ifdef CONFIG_ACPI
6 void *acpi_handle;
7#endif
8#ifdef CONFIG_X86_64
9struct dma_mapping_ops *dma_ops;
10#endif
11#ifdef CONFIG_DMAR
12 void *iommu; /* hook for IOMMU specific extension */
13#endif
14};
15
16#endif /* ASM_X86__DEVICE_H */
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h
deleted file mode 100644
index f9530f23f1d6..000000000000
--- a/include/asm-x86/div64.h
+++ /dev/null
@@ -1,60 +0,0 @@
1#ifndef ASM_X86__DIV64_H
2#define ASM_X86__DIV64_H
3
4#ifdef CONFIG_X86_32
5
6#include <linux/types.h>
7
8/*
9 * do_div() is NOT a C function. It wants to return
10 * two values (the quotient and the remainder), but
11 * since that doesn't work very well in C, what it
12 * does is:
13 *
14 * - modifies the 64-bit dividend _in_place_
15 * - returns the 32-bit remainder
16 *
17 * This ends up being the most efficient "calling
18 * convention" on x86.
19 */
20#define do_div(n, base) \
21({ \
22 unsigned long __upper, __low, __high, __mod, __base; \
23 __base = (base); \
24 asm("":"=a" (__low), "=d" (__high) : "A" (n)); \
25 __upper = __high; \
26 if (__high) { \
27 __upper = __high % (__base); \
28 __high = __high / (__base); \
29 } \
30 asm("divl %2":"=a" (__low), "=d" (__mod) \
31 : "rm" (__base), "0" (__low), "1" (__upper)); \
32 asm("":"=A" (n) : "a" (__low), "d" (__high)); \
33 __mod; \
34})
35
36static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
37{
38 union {
39 u64 v64;
40 u32 v32[2];
41 } d = { dividend };
42 u32 upper;
43
44 upper = d.v32[1];
45 d.v32[1] = 0;
46 if (upper >= divisor) {
47 d.v32[1] = upper / divisor;
48 upper %= divisor;
49 }
50 asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) :
51 "rm" (divisor), "0" (d.v32[0]), "1" (upper));
52 return d.v64;
53}
54#define div_u64_rem div_u64_rem
55
56#else
57# include <asm-generic/div64.h>
58#endif /* CONFIG_X86_32 */
59
60#endif /* ASM_X86__DIV64_H */
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
deleted file mode 100644
index 219c33d6361c..000000000000
--- a/include/asm-x86/dma-mapping.h
+++ /dev/null
@@ -1,308 +0,0 @@
1#ifndef ASM_X86__DMA_MAPPING_H
2#define ASM_X86__DMA_MAPPING_H
3
4/*
5 * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for
6 * documentation.
7 */
8
9#include <linux/scatterlist.h>
10#include <asm/io.h>
11#include <asm/swiotlb.h>
12#include <asm-generic/dma-coherent.h>
13
14extern dma_addr_t bad_dma_address;
15extern int iommu_merge;
16extern struct device x86_dma_fallback_dev;
17extern int panic_on_overflow;
18
19struct dma_mapping_ops {
20 int (*mapping_error)(struct device *dev,
21 dma_addr_t dma_addr);
22 void* (*alloc_coherent)(struct device *dev, size_t size,
23 dma_addr_t *dma_handle, gfp_t gfp);
24 void (*free_coherent)(struct device *dev, size_t size,
25 void *vaddr, dma_addr_t dma_handle);
26 dma_addr_t (*map_single)(struct device *hwdev, phys_addr_t ptr,
27 size_t size, int direction);
28 void (*unmap_single)(struct device *dev, dma_addr_t addr,
29 size_t size, int direction);
30 void (*sync_single_for_cpu)(struct device *hwdev,
31 dma_addr_t dma_handle, size_t size,
32 int direction);
33 void (*sync_single_for_device)(struct device *hwdev,
34 dma_addr_t dma_handle, size_t size,
35 int direction);
36 void (*sync_single_range_for_cpu)(struct device *hwdev,
37 dma_addr_t dma_handle, unsigned long offset,
38 size_t size, int direction);
39 void (*sync_single_range_for_device)(struct device *hwdev,
40 dma_addr_t dma_handle, unsigned long offset,
41 size_t size, int direction);
42 void (*sync_sg_for_cpu)(struct device *hwdev,
43 struct scatterlist *sg, int nelems,
44 int direction);
45 void (*sync_sg_for_device)(struct device *hwdev,
46 struct scatterlist *sg, int nelems,
47 int direction);
48 int (*map_sg)(struct device *hwdev, struct scatterlist *sg,
49 int nents, int direction);
50 void (*unmap_sg)(struct device *hwdev,
51 struct scatterlist *sg, int nents,
52 int direction);
53 int (*dma_supported)(struct device *hwdev, u64 mask);
54 int is_phys;
55};
56
57extern struct dma_mapping_ops *dma_ops;
58
59static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
60{
61#ifdef CONFIG_X86_32
62 return dma_ops;
63#else
64 if (unlikely(!dev) || !dev->archdata.dma_ops)
65 return dma_ops;
66 else
67 return dev->archdata.dma_ops;
68#endif /* ASM_X86__DMA_MAPPING_H */
69}
70
71/* Make sure we keep the same behaviour */
72static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
73{
74#ifdef CONFIG_X86_32
75 return 0;
76#else
77 struct dma_mapping_ops *ops = get_dma_ops(dev);
78 if (ops->mapping_error)
79 return ops->mapping_error(dev, dma_addr);
80
81 return (dma_addr == bad_dma_address);
82#endif
83}
84
85#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
86#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
87#define dma_is_consistent(d, h) (1)
88
89extern int dma_supported(struct device *hwdev, u64 mask);
90extern int dma_set_mask(struct device *dev, u64 mask);
91
92extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
93 dma_addr_t *dma_addr, gfp_t flag);
94
95static inline dma_addr_t
96dma_map_single(struct device *hwdev, void *ptr, size_t size,
97 int direction)
98{
99 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
100
101 BUG_ON(!valid_dma_direction(direction));
102 return ops->map_single(hwdev, virt_to_phys(ptr), size, direction);
103}
104
105static inline void
106dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size,
107 int direction)
108{
109 struct dma_mapping_ops *ops = get_dma_ops(dev);
110
111 BUG_ON(!valid_dma_direction(direction));
112 if (ops->unmap_single)
113 ops->unmap_single(dev, addr, size, direction);
114}
115
116static inline int
117dma_map_sg(struct device *hwdev, struct scatterlist *sg,
118 int nents, int direction)
119{
120 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
121
122 BUG_ON(!valid_dma_direction(direction));
123 return ops->map_sg(hwdev, sg, nents, direction);
124}
125
126static inline void
127dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
128 int direction)
129{
130 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
131
132 BUG_ON(!valid_dma_direction(direction));
133 if (ops->unmap_sg)
134 ops->unmap_sg(hwdev, sg, nents, direction);
135}
136
137static inline void
138dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
139 size_t size, int direction)
140{
141 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
142
143 BUG_ON(!valid_dma_direction(direction));
144 if (ops->sync_single_for_cpu)
145 ops->sync_single_for_cpu(hwdev, dma_handle, size, direction);
146 flush_write_buffers();
147}
148
149static inline void
150dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle,
151 size_t size, int direction)
152{
153 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
154
155 BUG_ON(!valid_dma_direction(direction));
156 if (ops->sync_single_for_device)
157 ops->sync_single_for_device(hwdev, dma_handle, size, direction);
158 flush_write_buffers();
159}
160
161static inline void
162dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
163 unsigned long offset, size_t size, int direction)
164{
165 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
166
167 BUG_ON(!valid_dma_direction(direction));
168 if (ops->sync_single_range_for_cpu)
169 ops->sync_single_range_for_cpu(hwdev, dma_handle, offset,
170 size, direction);
171 flush_write_buffers();
172}
173
174static inline void
175dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
176 unsigned long offset, size_t size,
177 int direction)
178{
179 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
180
181 BUG_ON(!valid_dma_direction(direction));
182 if (ops->sync_single_range_for_device)
183 ops->sync_single_range_for_device(hwdev, dma_handle,
184 offset, size, direction);
185 flush_write_buffers();
186}
187
188static inline void
189dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
190 int nelems, int direction)
191{
192 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
193
194 BUG_ON(!valid_dma_direction(direction));
195 if (ops->sync_sg_for_cpu)
196 ops->sync_sg_for_cpu(hwdev, sg, nelems, direction);
197 flush_write_buffers();
198}
199
200static inline void
201dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
202 int nelems, int direction)
203{
204 struct dma_mapping_ops *ops = get_dma_ops(hwdev);
205
206 BUG_ON(!valid_dma_direction(direction));
207 if (ops->sync_sg_for_device)
208 ops->sync_sg_for_device(hwdev, sg, nelems, direction);
209
210 flush_write_buffers();
211}
212
213static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
214 size_t offset, size_t size,
215 int direction)
216{
217 struct dma_mapping_ops *ops = get_dma_ops(dev);
218
219 BUG_ON(!valid_dma_direction(direction));
220 return ops->map_single(dev, page_to_phys(page) + offset,
221 size, direction);
222}
223
224static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
225 size_t size, int direction)
226{
227 dma_unmap_single(dev, addr, size, direction);
228}
229
230static inline void
231dma_cache_sync(struct device *dev, void *vaddr, size_t size,
232 enum dma_data_direction dir)
233{
234 flush_write_buffers();
235}
236
237static inline int dma_get_cache_alignment(void)
238{
239 /* no easy way to get cache size on all x86, so return the
240 * maximum possible, to be safe */
241 return boot_cpu_data.x86_clflush_size;
242}
243
244static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
245 gfp_t gfp)
246{
247 unsigned long dma_mask = 0;
248
249 dma_mask = dev->coherent_dma_mask;
250 if (!dma_mask)
251 dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK;
252
253 return dma_mask;
254}
255
256static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
257{
258#ifdef CONFIG_X86_64
259 unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);
260
261 if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
262 gfp |= GFP_DMA32;
263#endif
264 return gfp;
265}
266
267static inline void *
268dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
269 gfp_t gfp)
270{
271 struct dma_mapping_ops *ops = get_dma_ops(dev);
272 void *memory;
273
274 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
275
276 if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
277 return memory;
278
279 if (!dev) {
280 dev = &x86_dma_fallback_dev;
281 gfp |= GFP_DMA;
282 }
283
284 if (!is_device_dma_capable(dev))
285 return NULL;
286
287 if (!ops->alloc_coherent)
288 return NULL;
289
290 return ops->alloc_coherent(dev, size, dma_handle,
291 dma_alloc_coherent_gfp_flags(dev, gfp));
292}
293
294static inline void dma_free_coherent(struct device *dev, size_t size,
295 void *vaddr, dma_addr_t bus)
296{
297 struct dma_mapping_ops *ops = get_dma_ops(dev);
298
299 WARN_ON(irqs_disabled()); /* for portability */
300
301 if (dma_release_from_coherent(dev, get_order(size), vaddr))
302 return;
303
304 if (ops->free_coherent)
305 ops->free_coherent(dev, size, vaddr, bus);
306}
307
308#endif
diff --git a/include/asm-x86/dma.h b/include/asm-x86/dma.h
deleted file mode 100644
index c9f7a4eec555..000000000000
--- a/include/asm-x86/dma.h
+++ /dev/null
@@ -1,318 +0,0 @@
1/*
2 * linux/include/asm/dma.h: Defines for using and allocating dma channels.
3 * Written by Hennus Bergman, 1992.
4 * High DMA channel support & info by Hannu Savolainen
5 * and John Boyd, Nov. 1992.
6 */
7
8#ifndef ASM_X86__DMA_H
9#define ASM_X86__DMA_H
10
11#include <linux/spinlock.h> /* And spinlocks */
12#include <asm/io.h> /* need byte IO */
13#include <linux/delay.h>
14
15#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
16#define dma_outb outb_p
17#else
18#define dma_outb outb
19#endif
20
21#define dma_inb inb
22
23/*
24 * NOTES about DMA transfers:
25 *
26 * controller 1: channels 0-3, byte operations, ports 00-1F
27 * controller 2: channels 4-7, word operations, ports C0-DF
28 *
29 * - ALL registers are 8 bits only, regardless of transfer size
30 * - channel 4 is not used - cascades 1 into 2.
31 * - channels 0-3 are byte - addresses/counts are for physical bytes
32 * - channels 5-7 are word - addresses/counts are for physical words
33 * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
34 * - transfer count loaded to registers is 1 less than actual count
35 * - controller 2 offsets are all even (2x offsets for controller 1)
36 * - page registers for 5-7 don't use data bit 0, represent 128K pages
37 * - page registers for 0-3 use bit 0, represent 64K pages
38 *
39 * DMA transfers are limited to the lower 16MB of _physical_ memory.
40 * Note that addresses loaded into registers must be _physical_ addresses,
41 * not logical addresses (which may differ if paging is active).
42 *
43 * Address mapping for channels 0-3:
44 *
45 * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses)
46 * | ... | | ... | | ... |
47 * | ... | | ... | | ... |
48 * | ... | | ... | | ... |
49 * P7 ... P0 A7 ... A0 A7 ... A0
50 * | Page | Addr MSB | Addr LSB | (DMA registers)
51 *
52 * Address mapping for channels 5-7:
53 *
54 * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses)
55 * | ... | \ \ ... \ \ \ ... \ \
56 * | ... | \ \ ... \ \ \ ... \ (not used)
57 * | ... | \ \ ... \ \ \ ... \
58 * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0
59 * | Page | Addr MSB | Addr LSB | (DMA registers)
60 *
61 * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses
62 * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at
63 * the hardware level, so odd-byte transfers aren't possible).
64 *
65 * Transfer count (_not # bytes_) is limited to 64K, represented as actual
66 * count - 1 : 64K => 0xFFFF, 1 => 0x0000. Thus, count is always 1 or more,
67 * and up to 128K bytes may be transferred on channels 5-7 in one operation.
68 *
69 */
70
71#define MAX_DMA_CHANNELS 8
72
73#ifdef CONFIG_X86_32
74
75/* The maximum address that we can perform a DMA transfer to on this platform */
76#define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x1000000)
77
78#else
79
80/* 16MB ISA DMA zone */
81#define MAX_DMA_PFN ((16 * 1024 * 1024) >> PAGE_SHIFT)
82
83/* 4GB broken PCI/AGP hardware bus master zone */
84#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
85
86/* Compat define for old dma zone */
87#define MAX_DMA_ADDRESS ((unsigned long)__va(MAX_DMA_PFN << PAGE_SHIFT))
88
89#endif
90
91/* 8237 DMA controllers */
92#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */
93#define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */
94
95/* DMA controller registers */
96#define DMA1_CMD_REG 0x08 /* command register (w) */
97#define DMA1_STAT_REG 0x08 /* status register (r) */
98#define DMA1_REQ_REG 0x09 /* request register (w) */
99#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */
100#define DMA1_MODE_REG 0x0B /* mode register (w) */
101#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */
102#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */
103#define DMA1_RESET_REG 0x0D /* Master Clear (w) */
104#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */
105#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */
106
107#define DMA2_CMD_REG 0xD0 /* command register (w) */
108#define DMA2_STAT_REG 0xD0 /* status register (r) */
109#define DMA2_REQ_REG 0xD2 /* request register (w) */
110#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */
111#define DMA2_MODE_REG 0xD6 /* mode register (w) */
112#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */
113#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */
114#define DMA2_RESET_REG 0xDA /* Master Clear (w) */
115#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */
116#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */
117
118#define DMA_ADDR_0 0x00 /* DMA address registers */
119#define DMA_ADDR_1 0x02
120#define DMA_ADDR_2 0x04
121#define DMA_ADDR_3 0x06
122#define DMA_ADDR_4 0xC0
123#define DMA_ADDR_5 0xC4
124#define DMA_ADDR_6 0xC8
125#define DMA_ADDR_7 0xCC
126
127#define DMA_CNT_0 0x01 /* DMA count registers */
128#define DMA_CNT_1 0x03
129#define DMA_CNT_2 0x05
130#define DMA_CNT_3 0x07
131#define DMA_CNT_4 0xC2
132#define DMA_CNT_5 0xC6
133#define DMA_CNT_6 0xCA
134#define DMA_CNT_7 0xCE
135
136#define DMA_PAGE_0 0x87 /* DMA page registers */
137#define DMA_PAGE_1 0x83
138#define DMA_PAGE_2 0x81
139#define DMA_PAGE_3 0x82
140#define DMA_PAGE_5 0x8B
141#define DMA_PAGE_6 0x89
142#define DMA_PAGE_7 0x8A
143
144/* I/O to memory, no autoinit, increment, single mode */
145#define DMA_MODE_READ 0x44
146/* memory to I/O, no autoinit, increment, single mode */
147#define DMA_MODE_WRITE 0x48
148/* pass thru DREQ->HRQ, DACK<-HLDA only */
149#define DMA_MODE_CASCADE 0xC0
150
151#define DMA_AUTOINIT 0x10
152
153
154extern spinlock_t dma_spin_lock;
155
156static inline unsigned long claim_dma_lock(void)
157{
158 unsigned long flags;
159 spin_lock_irqsave(&dma_spin_lock, flags);
160 return flags;
161}
162
163static inline void release_dma_lock(unsigned long flags)
164{
165 spin_unlock_irqrestore(&dma_spin_lock, flags);
166}
167
168/* enable/disable a specific DMA channel */
169static inline void enable_dma(unsigned int dmanr)
170{
171 if (dmanr <= 3)
172 dma_outb(dmanr, DMA1_MASK_REG);
173 else
174 dma_outb(dmanr & 3, DMA2_MASK_REG);
175}
176
177static inline void disable_dma(unsigned int dmanr)
178{
179 if (dmanr <= 3)
180 dma_outb(dmanr | 4, DMA1_MASK_REG);
181 else
182 dma_outb((dmanr & 3) | 4, DMA2_MASK_REG);
183}
184
185/* Clear the 'DMA Pointer Flip Flop'.
186 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
187 * Use this once to initialize the FF to a known state.
188 * After that, keep track of it. :-)
189 * --- In order to do that, the DMA routines below should ---
190 * --- only be used while holding the DMA lock ! ---
191 */
192static inline void clear_dma_ff(unsigned int dmanr)
193{
194 if (dmanr <= 3)
195 dma_outb(0, DMA1_CLEAR_FF_REG);
196 else
197 dma_outb(0, DMA2_CLEAR_FF_REG);
198}
199
200/* set mode (above) for a specific DMA channel */
201static inline void set_dma_mode(unsigned int dmanr, char mode)
202{
203 if (dmanr <= 3)
204 dma_outb(mode | dmanr, DMA1_MODE_REG);
205 else
206 dma_outb(mode | (dmanr & 3), DMA2_MODE_REG);
207}
208
209/* Set only the page register bits of the transfer address.
210 * This is used for successive transfers when we know the contents of
211 * the lower 16 bits of the DMA current address register, but a 64k boundary
212 * may have been crossed.
213 */
214static inline void set_dma_page(unsigned int dmanr, char pagenr)
215{
216 switch (dmanr) {
217 case 0:
218 dma_outb(pagenr, DMA_PAGE_0);
219 break;
220 case 1:
221 dma_outb(pagenr, DMA_PAGE_1);
222 break;
223 case 2:
224 dma_outb(pagenr, DMA_PAGE_2);
225 break;
226 case 3:
227 dma_outb(pagenr, DMA_PAGE_3);
228 break;
229 case 5:
230 dma_outb(pagenr & 0xfe, DMA_PAGE_5);
231 break;
232 case 6:
233 dma_outb(pagenr & 0xfe, DMA_PAGE_6);
234 break;
235 case 7:
236 dma_outb(pagenr & 0xfe, DMA_PAGE_7);
237 break;
238 }
239}
240
241
242/* Set transfer address & page bits for specific DMA channel.
243 * Assumes dma flipflop is clear.
244 */
245static inline void set_dma_addr(unsigned int dmanr, unsigned int a)
246{
247 set_dma_page(dmanr, a>>16);
248 if (dmanr <= 3) {
249 dma_outb(a & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE);
250 dma_outb((a >> 8) & 0xff, ((dmanr & 3) << 1) + IO_DMA1_BASE);
251 } else {
252 dma_outb((a >> 1) & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE);
253 dma_outb((a >> 9) & 0xff, ((dmanr & 3) << 2) + IO_DMA2_BASE);
254 }
255}
256
257
258/* Set transfer size (max 64k for DMA0..3, 128k for DMA5..7) for
259 * a specific DMA channel.
260 * You must ensure the parameters are valid.
261 * NOTE: from a manual: "the number of transfers is one more
262 * than the initial word count"! This is taken into account.
263 * Assumes dma flip-flop is clear.
264 * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
265 */
266static inline void set_dma_count(unsigned int dmanr, unsigned int count)
267{
268 count--;
269 if (dmanr <= 3) {
270 dma_outb(count & 0xff, ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE);
271 dma_outb((count >> 8) & 0xff,
272 ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE);
273 } else {
274 dma_outb((count >> 1) & 0xff,
275 ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE);
276 dma_outb((count >> 9) & 0xff,
277 ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE);
278 }
279}
280
281
282/* Get DMA residue count. After a DMA transfer, this
283 * should return zero. Reading this while a DMA transfer is
284 * still in progress will return unpredictable results.
285 * If called before the channel has been used, it may return 1.
286 * Otherwise, it returns the number of _bytes_ left to transfer.
287 *
288 * Assumes DMA flip-flop is clear.
289 */
290static inline int get_dma_residue(unsigned int dmanr)
291{
292 unsigned int io_port;
293 /* using short to get 16-bit wrap around */
294 unsigned short count;
295
296 io_port = (dmanr <= 3) ? ((dmanr & 3) << 1) + 1 + IO_DMA1_BASE
297 : ((dmanr & 3) << 2) + 2 + IO_DMA2_BASE;
298
299 count = 1 + dma_inb(io_port);
300 count += dma_inb(io_port) << 8;
301
302 return (dmanr <= 3) ? count : (count << 1);
303}
304
305
306/* These are in kernel/dma.c: */
307extern int request_dma(unsigned int dmanr, const char *device_id);
308extern void free_dma(unsigned int dmanr);
309
310/* From PCI */
311
312#ifdef CONFIG_PCI
313extern int isa_dma_bridge_buggy;
314#else
315#define isa_dma_bridge_buggy (0)
316#endif
317
318#endif /* ASM_X86__DMA_H */
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
deleted file mode 100644
index 1cff6fe81fa5..000000000000
--- a/include/asm-x86/dmi.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef ASM_X86__DMI_H
2#define ASM_X86__DMI_H
3
4#include <asm/io.h>
5
6#define DMI_MAX_DATA 2048
7
8extern int dmi_alloc_index;
9extern char dmi_alloc_data[DMI_MAX_DATA];
10
11/* This is so early that there is no good way to allocate dynamic memory.
12 Allocate data in an BSS array. */
13static inline void *dmi_alloc(unsigned len)
14{
15 int idx = dmi_alloc_index;
16 if ((dmi_alloc_index + len) > DMI_MAX_DATA)
17 return NULL;
18 dmi_alloc_index += len;
19 return dmi_alloc_data + idx;
20}
21
22/* Use early IO mappings for DMI because it's initialized early */
23#define dmi_ioremap early_ioremap
24#define dmi_iounmap early_iounmap
25
26#endif /* ASM_X86__DMI_H */
diff --git a/include/asm-x86/ds.h b/include/asm-x86/ds.h
deleted file mode 100644
index c3c953a45b21..000000000000
--- a/include/asm-x86/ds.h
+++ /dev/null
@@ -1,238 +0,0 @@
1/*
2 * Debug Store (DS) support
3 *
4 * This provides a low-level interface to the hardware's Debug Store
5 * feature that is used for branch trace store (BTS) and
6 * precise-event based sampling (PEBS).
7 *
8 * It manages:
9 * - per-thread and per-cpu allocation of BTS and PEBS
10 * - buffer memory allocation (optional)
11 * - buffer overflow handling
12 * - buffer access
13 *
14 * It assumes:
15 * - get_task_struct on all parameter tasks
16 * - current is allowed to trace parameter tasks
17 *
18 *
19 * Copyright (C) 2007-2008 Intel Corporation.
20 * Markus Metzger <markus.t.metzger@intel.com>, 2007-2008
21 */
22
23#ifndef ASM_X86__DS_H
24#define ASM_X86__DS_H
25
26#ifdef CONFIG_X86_DS
27
28#include <linux/types.h>
29#include <linux/init.h>
30
31
32struct task_struct;
33
34/*
35 * Request BTS or PEBS
36 *
37 * Due to alignement constraints, the actual buffer may be slightly
38 * smaller than the requested or provided buffer.
39 *
40 * Returns 0 on success; -Eerrno otherwise
41 *
42 * task: the task to request recording for;
43 * NULL for per-cpu recording on the current cpu
44 * base: the base pointer for the (non-pageable) buffer;
45 * NULL if buffer allocation requested
46 * size: the size of the requested or provided buffer
47 * ovfl: pointer to a function to be called on buffer overflow;
48 * NULL if cyclic buffer requested
49 */
50typedef void (*ds_ovfl_callback_t)(struct task_struct *);
51extern int ds_request_bts(struct task_struct *task, void *base, size_t size,
52 ds_ovfl_callback_t ovfl);
53extern int ds_request_pebs(struct task_struct *task, void *base, size_t size,
54 ds_ovfl_callback_t ovfl);
55
56/*
57 * Release BTS or PEBS resources
58 *
59 * Frees buffers allocated on ds_request.
60 *
61 * Returns 0 on success; -Eerrno otherwise
62 *
63 * task: the task to release resources for;
64 * NULL to release resources for the current cpu
65 */
66extern int ds_release_bts(struct task_struct *task);
67extern int ds_release_pebs(struct task_struct *task);
68
69/*
70 * Return the (array) index of the write pointer.
71 * (assuming an array of BTS/PEBS records)
72 *
73 * Returns -Eerrno on error
74 *
75 * task: the task to access;
76 * NULL to access the current cpu
77 * pos (out): if not NULL, will hold the result
78 */
79extern int ds_get_bts_index(struct task_struct *task, size_t *pos);
80extern int ds_get_pebs_index(struct task_struct *task, size_t *pos);
81
82/*
83 * Return the (array) index one record beyond the end of the array.
84 * (assuming an array of BTS/PEBS records)
85 *
86 * Returns -Eerrno on error
87 *
88 * task: the task to access;
89 * NULL to access the current cpu
90 * pos (out): if not NULL, will hold the result
91 */
92extern int ds_get_bts_end(struct task_struct *task, size_t *pos);
93extern int ds_get_pebs_end(struct task_struct *task, size_t *pos);
94
95/*
96 * Provide a pointer to the BTS/PEBS record at parameter index.
97 * (assuming an array of BTS/PEBS records)
98 *
99 * The pointer points directly into the buffer. The user is
100 * responsible for copying the record.
101 *
102 * Returns the size of a single record on success; -Eerrno on error
103 *
104 * task: the task to access;
105 * NULL to access the current cpu
106 * index: the index of the requested record
107 * record (out): pointer to the requested record
108 */
109extern int ds_access_bts(struct task_struct *task,
110 size_t index, const void **record);
111extern int ds_access_pebs(struct task_struct *task,
112 size_t index, const void **record);
113
114/*
115 * Write one or more BTS/PEBS records at the write pointer index and
116 * advance the write pointer.
117 *
118 * If size is not a multiple of the record size, trailing bytes are
119 * zeroed out.
120 *
121 * May result in one or more overflow notifications.
122 *
123 * If called during overflow handling, that is, with index >=
124 * interrupt threshold, the write will wrap around.
125 *
126 * An overflow notification is given if and when the interrupt
127 * threshold is reached during or after the write.
128 *
129 * Returns the number of bytes written or -Eerrno.
130 *
131 * task: the task to access;
132 * NULL to access the current cpu
133 * buffer: the buffer to write
134 * size: the size of the buffer
135 */
136extern int ds_write_bts(struct task_struct *task,
137 const void *buffer, size_t size);
138extern int ds_write_pebs(struct task_struct *task,
139 const void *buffer, size_t size);
140
141/*
142 * Same as ds_write_bts/pebs, but omit ownership checks.
143 *
144 * This is needed to have some other task than the owner of the
145 * BTS/PEBS buffer or the parameter task itself write into the
146 * respective buffer.
147 */
148extern int ds_unchecked_write_bts(struct task_struct *task,
149 const void *buffer, size_t size);
150extern int ds_unchecked_write_pebs(struct task_struct *task,
151 const void *buffer, size_t size);
152
153/*
154 * Reset the write pointer of the BTS/PEBS buffer.
155 *
156 * Returns 0 on success; -Eerrno on error
157 *
158 * task: the task to access;
159 * NULL to access the current cpu
160 */
161extern int ds_reset_bts(struct task_struct *task);
162extern int ds_reset_pebs(struct task_struct *task);
163
164/*
165 * Clear the BTS/PEBS buffer and reset the write pointer.
166 * The entire buffer will be zeroed out.
167 *
168 * Returns 0 on success; -Eerrno on error
169 *
170 * task: the task to access;
171 * NULL to access the current cpu
172 */
173extern int ds_clear_bts(struct task_struct *task);
174extern int ds_clear_pebs(struct task_struct *task);
175
176/*
177 * Provide the PEBS counter reset value.
178 *
179 * Returns 0 on success; -Eerrno on error
180 *
181 * task: the task to access;
182 * NULL to access the current cpu
183 * value (out): the counter reset value
184 */
185extern int ds_get_pebs_reset(struct task_struct *task, u64 *value);
186
187/*
188 * Set the PEBS counter reset value.
189 *
190 * Returns 0 on success; -Eerrno on error
191 *
192 * task: the task to access;
193 * NULL to access the current cpu
194 * value: the new counter reset value
195 */
196extern int ds_set_pebs_reset(struct task_struct *task, u64 value);
197
198/*
199 * Initialization
200 */
201struct cpuinfo_x86;
202extern void __cpuinit ds_init_intel(struct cpuinfo_x86 *);
203
204
205
206/*
207 * The DS context - part of struct thread_struct.
208 */
209struct ds_context {
210 /* pointer to the DS configuration; goes into MSR_IA32_DS_AREA */
211 unsigned char *ds;
212 /* the owner of the BTS and PEBS configuration, respectively */
213 struct task_struct *owner[2];
214 /* buffer overflow notification function for BTS and PEBS */
215 ds_ovfl_callback_t callback[2];
216 /* the original buffer address */
217 void *buffer[2];
218 /* the number of allocated pages for on-request allocated buffers */
219 unsigned int pages[2];
220 /* use count */
221 unsigned long count;
222 /* a pointer to the context location inside the thread_struct
223 * or the per_cpu context array */
224 struct ds_context **this;
225 /* a pointer to the task owning this context, or NULL, if the
226 * context is owned by a cpu */
227 struct task_struct *task;
228};
229
230/* called by exit_thread() to free leftover contexts */
231extern void ds_free(struct ds_context *context);
232
233#else /* CONFIG_X86_DS */
234
235#define ds_init_intel(config) do {} while (0)
236
237#endif /* CONFIG_X86_DS */
238#endif /* ASM_X86__DS_H */
diff --git a/include/asm-x86/dwarf2.h b/include/asm-x86/dwarf2.h
deleted file mode 100644
index 21d1bc32ad7c..000000000000
--- a/include/asm-x86/dwarf2.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef ASM_X86__DWARF2_H
2#define ASM_X86__DWARF2_H
3
4#ifndef __ASSEMBLY__
5#warning "asm/dwarf2.h should be only included in pure assembly files"
6#endif
7
8/*
9 Macros for dwarf2 CFI unwind table entries.
10 See "as.info" for details on these pseudo ops. Unfortunately
11 they are only supported in very new binutils, so define them
12 away for older version.
13 */
14
15#ifdef CONFIG_AS_CFI
16
17#define CFI_STARTPROC .cfi_startproc
18#define CFI_ENDPROC .cfi_endproc
19#define CFI_DEF_CFA .cfi_def_cfa
20#define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register
21#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset
22#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset
23#define CFI_OFFSET .cfi_offset
24#define CFI_REL_OFFSET .cfi_rel_offset
25#define CFI_REGISTER .cfi_register
26#define CFI_RESTORE .cfi_restore
27#define CFI_REMEMBER_STATE .cfi_remember_state
28#define CFI_RESTORE_STATE .cfi_restore_state
29#define CFI_UNDEFINED .cfi_undefined
30
31#ifdef CONFIG_AS_CFI_SIGNAL_FRAME
32#define CFI_SIGNAL_FRAME .cfi_signal_frame
33#else
34#define CFI_SIGNAL_FRAME
35#endif
36
37#else
38
39/* Due to the structure of pre-exisiting code, don't use assembler line
40 comment character # to ignore the arguments. Instead, use a dummy macro. */
41.macro cfi_ignore a=0, b=0, c=0, d=0
42.endm
43
44#define CFI_STARTPROC cfi_ignore
45#define CFI_ENDPROC cfi_ignore
46#define CFI_DEF_CFA cfi_ignore
47#define CFI_DEF_CFA_REGISTER cfi_ignore
48#define CFI_DEF_CFA_OFFSET cfi_ignore
49#define CFI_ADJUST_CFA_OFFSET cfi_ignore
50#define CFI_OFFSET cfi_ignore
51#define CFI_REL_OFFSET cfi_ignore
52#define CFI_REGISTER cfi_ignore
53#define CFI_RESTORE cfi_ignore
54#define CFI_REMEMBER_STATE cfi_ignore
55#define CFI_RESTORE_STATE cfi_ignore
56#define CFI_UNDEFINED cfi_ignore
57#define CFI_SIGNAL_FRAME cfi_ignore
58
59#endif
60
61#endif /* ASM_X86__DWARF2_H */
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h
deleted file mode 100644
index 5abbdec06bd2..000000000000
--- a/include/asm-x86/e820.h
+++ /dev/null
@@ -1,146 +0,0 @@
1#ifndef ASM_X86__E820_H
2#define ASM_X86__E820_H
3#define E820MAP 0x2d0 /* our map */
4#define E820MAX 128 /* number of entries in E820MAP */
5
6/*
7 * Legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the
8 * constrained space in the zeropage. If we have more nodes than
9 * that, and if we've booted off EFI firmware, then the EFI tables
10 * passed us from the EFI firmware can list more nodes. Size our
11 * internal memory map tables to have room for these additional
12 * nodes, based on up to three entries per node for which the
13 * kernel was built: MAX_NUMNODES == (1 << CONFIG_NODES_SHIFT),
14 * plus E820MAX, allowing space for the possible duplicate E820
15 * entries that might need room in the same arrays, prior to the
16 * call to sanitize_e820_map() to remove duplicates. The allowance
17 * of three memory map entries per node is "enough" entries for
18 * the initial hardware platform motivating this mechanism to make
19 * use of additional EFI map entries. Future platforms may want
20 * to allow more than three entries per node or otherwise refine
21 * this size.
22 */
23
24/*
25 * Odd: 'make headers_check' complains about numa.h if I try
26 * to collapse the next two #ifdef lines to a single line:
27 * #if defined(__KERNEL__) && defined(CONFIG_EFI)
28 */
29#ifdef __KERNEL__
30#ifdef CONFIG_EFI
31#include <linux/numa.h>
32#define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
33#else /* ! CONFIG_EFI */
34#define E820_X_MAX E820MAX
35#endif
36#else /* ! __KERNEL__ */
37#define E820_X_MAX E820MAX
38#endif
39
40#define E820NR 0x1e8 /* # entries in E820MAP */
41
42#define E820_RAM 1
43#define E820_RESERVED 2
44#define E820_ACPI 3
45#define E820_NVS 4
46#define E820_UNUSABLE 5
47
48/* reserved RAM used by kernel itself */
49#define E820_RESERVED_KERN 128
50
51#ifndef __ASSEMBLY__
52struct e820entry {
53 __u64 addr; /* start of memory segment */
54 __u64 size; /* size of memory segment */
55 __u32 type; /* type of memory segment */
56} __attribute__((packed));
57
58struct e820map {
59 __u32 nr_map;
60 struct e820entry map[E820_X_MAX];
61};
62
63#ifdef __KERNEL__
64/* see comment in arch/x86/kernel/e820.c */
65extern struct e820map e820;
66extern struct e820map e820_saved;
67
68extern unsigned long pci_mem_start;
69extern int e820_any_mapped(u64 start, u64 end, unsigned type);
70extern int e820_all_mapped(u64 start, u64 end, unsigned type);
71extern void e820_add_region(u64 start, u64 size, int type);
72extern void e820_print_map(char *who);
73extern int
74sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map);
75extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
76 unsigned new_type);
77extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,
78 int checktype);
79extern void update_e820(void);
80extern void e820_setup_gap(void);
81extern int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
82 unsigned long start_addr, unsigned long long end_addr);
83struct setup_data;
84extern void parse_e820_ext(struct setup_data *data, unsigned long pa_data);
85
86#if defined(CONFIG_X86_64) || \
87 (defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION))
88extern void e820_mark_nosave_regions(unsigned long limit_pfn);
89#else
90static inline void e820_mark_nosave_regions(unsigned long limit_pfn)
91{
92}
93#endif
94
95#ifdef CONFIG_MEMTEST
96extern void early_memtest(unsigned long start, unsigned long end);
97#else
98static inline void early_memtest(unsigned long start, unsigned long end)
99{
100}
101#endif
102
103extern unsigned long end_user_pfn;
104
105extern u64 find_e820_area(u64 start, u64 end, u64 size, u64 align);
106extern u64 find_e820_area_size(u64 start, u64 *sizep, u64 align);
107extern void reserve_early(u64 start, u64 end, char *name);
108extern void reserve_early_overlap_ok(u64 start, u64 end, char *name);
109extern void free_early(u64 start, u64 end);
110extern void early_res_to_bootmem(u64 start, u64 end);
111extern u64 early_reserve_e820(u64 startt, u64 sizet, u64 align);
112
113extern unsigned long e820_end_of_ram_pfn(void);
114extern unsigned long e820_end_of_low_ram_pfn(void);
115extern int e820_find_active_region(const struct e820entry *ei,
116 unsigned long start_pfn,
117 unsigned long last_pfn,
118 unsigned long *ei_startpfn,
119 unsigned long *ei_endpfn);
120extern void e820_register_active_regions(int nid, unsigned long start_pfn,
121 unsigned long end_pfn);
122extern u64 e820_hole_size(u64 start, u64 end);
123extern void finish_e820_parsing(void);
124extern void e820_reserve_resources(void);
125extern void e820_reserve_resources_late(void);
126extern void setup_memory_map(void);
127extern char *default_machine_specific_memory_setup(void);
128extern char *machine_specific_memory_setup(void);
129extern char *memory_setup(void);
130#endif /* __KERNEL__ */
131#endif /* __ASSEMBLY__ */
132
133#define ISA_START_ADDRESS 0xa0000
134#define ISA_END_ADDRESS 0x100000
135#define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
136
137#define BIOS_BEGIN 0x000a0000
138#define BIOS_END 0x00100000
139
140#ifdef __KERNEL__
141#include <linux/ioport.h>
142
143#define HIGH_MEMORY (1024*1024)
144#endif /* __KERNEL__ */
145
146#endif /* ASM_X86__E820_H */
diff --git a/include/asm-x86/edac.h b/include/asm-x86/edac.h
deleted file mode 100644
index 9493c5b27bbd..000000000000
--- a/include/asm-x86/edac.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_X86__EDAC_H
2#define ASM_X86__EDAC_H
3
4/* ECC atomic, DMA, SMP and interrupt safe scrub function */
5
6static inline void atomic_scrub(void *va, u32 size)
7{
8 u32 i, *virt_addr = va;
9
10 /*
11 * Very carefully read and write to memory atomically so we
12 * are interrupt, DMA and SMP safe.
13 */
14 for (i = 0; i < size / 4; i++, virt_addr++)
15 asm volatile("lock; addl $0, %0"::"m" (*virt_addr));
16}
17
18#endif /* ASM_X86__EDAC_H */
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h
deleted file mode 100644
index ed2de22e8705..000000000000
--- a/include/asm-x86/efi.h
+++ /dev/null
@@ -1,97 +0,0 @@
1#ifndef ASM_X86__EFI_H
2#define ASM_X86__EFI_H
3
4#ifdef CONFIG_X86_32
5
6extern unsigned long asmlinkage efi_call_phys(void *, ...);
7
8#define efi_call_phys0(f) efi_call_phys(f)
9#define efi_call_phys1(f, a1) efi_call_phys(f, a1)
10#define efi_call_phys2(f, a1, a2) efi_call_phys(f, a1, a2)
11#define efi_call_phys3(f, a1, a2, a3) efi_call_phys(f, a1, a2, a3)
12#define efi_call_phys4(f, a1, a2, a3, a4) \
13 efi_call_phys(f, a1, a2, a3, a4)
14#define efi_call_phys5(f, a1, a2, a3, a4, a5) \
15 efi_call_phys(f, a1, a2, a3, a4, a5)
16#define efi_call_phys6(f, a1, a2, a3, a4, a5, a6) \
17 efi_call_phys(f, a1, a2, a3, a4, a5, a6)
18/*
19 * Wrap all the virtual calls in a way that forces the parameters on the stack.
20 */
21
22#define efi_call_virt(f, args...) \
23 ((efi_##f##_t __attribute__((regparm(0)))*)efi.systab->runtime->f)(args)
24
25#define efi_call_virt0(f) efi_call_virt(f)
26#define efi_call_virt1(f, a1) efi_call_virt(f, a1)
27#define efi_call_virt2(f, a1, a2) efi_call_virt(f, a1, a2)
28#define efi_call_virt3(f, a1, a2, a3) efi_call_virt(f, a1, a2, a3)
29#define efi_call_virt4(f, a1, a2, a3, a4) \
30 efi_call_virt(f, a1, a2, a3, a4)
31#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
32 efi_call_virt(f, a1, a2, a3, a4, a5)
33#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
34 efi_call_virt(f, a1, a2, a3, a4, a5, a6)
35
36#define efi_ioremap(addr, size) ioremap_cache(addr, size)
37
38#else /* !CONFIG_X86_32 */
39
40#define MAX_EFI_IO_PAGES 100
41
42extern u64 efi_call0(void *fp);
43extern u64 efi_call1(void *fp, u64 arg1);
44extern u64 efi_call2(void *fp, u64 arg1, u64 arg2);
45extern u64 efi_call3(void *fp, u64 arg1, u64 arg2, u64 arg3);
46extern u64 efi_call4(void *fp, u64 arg1, u64 arg2, u64 arg3, u64 arg4);
47extern u64 efi_call5(void *fp, u64 arg1, u64 arg2, u64 arg3,
48 u64 arg4, u64 arg5);
49extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
50 u64 arg4, u64 arg5, u64 arg6);
51
52#define efi_call_phys0(f) \
53 efi_call0((void *)(f))
54#define efi_call_phys1(f, a1) \
55 efi_call1((void *)(f), (u64)(a1))
56#define efi_call_phys2(f, a1, a2) \
57 efi_call2((void *)(f), (u64)(a1), (u64)(a2))
58#define efi_call_phys3(f, a1, a2, a3) \
59 efi_call3((void *)(f), (u64)(a1), (u64)(a2), (u64)(a3))
60#define efi_call_phys4(f, a1, a2, a3, a4) \
61 efi_call4((void *)(f), (u64)(a1), (u64)(a2), (u64)(a3), \
62 (u64)(a4))
63#define efi_call_phys5(f, a1, a2, a3, a4, a5) \
64 efi_call5((void *)(f), (u64)(a1), (u64)(a2), (u64)(a3), \
65 (u64)(a4), (u64)(a5))
66#define efi_call_phys6(f, a1, a2, a3, a4, a5, a6) \
67 efi_call6((void *)(f), (u64)(a1), (u64)(a2), (u64)(a3), \
68 (u64)(a4), (u64)(a5), (u64)(a6))
69
70#define efi_call_virt0(f) \
71 efi_call0((void *)(efi.systab->runtime->f))
72#define efi_call_virt1(f, a1) \
73 efi_call1((void *)(efi.systab->runtime->f), (u64)(a1))
74#define efi_call_virt2(f, a1, a2) \
75 efi_call2((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2))
76#define efi_call_virt3(f, a1, a2, a3) \
77 efi_call3((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
78 (u64)(a3))
79#define efi_call_virt4(f, a1, a2, a3, a4) \
80 efi_call4((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
81 (u64)(a3), (u64)(a4))
82#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
83 efi_call5((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
84 (u64)(a3), (u64)(a4), (u64)(a5))
85#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
86 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
87 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
88
89extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size);
90
91#endif /* CONFIG_X86_32 */
92
93extern void efi_reserve_early(void);
94extern void efi_call_phys_prelog(void);
95extern void efi_call_phys_epilog(void);
96
97#endif /* ASM_X86__EFI_H */
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h
deleted file mode 100644
index 5c4745bec906..000000000000
--- a/include/asm-x86/elf.h
+++ /dev/null
@@ -1,336 +0,0 @@
1#ifndef ASM_X86__ELF_H
2#define ASM_X86__ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9#include <asm/user.h>
10#include <asm/auxvec.h>
11
12typedef unsigned long elf_greg_t;
13
14#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
15typedef elf_greg_t elf_gregset_t[ELF_NGREG];
16
17typedef struct user_i387_struct elf_fpregset_t;
18
19#ifdef __i386__
20
21typedef struct user_fxsr_struct elf_fpxregset_t;
22
23#define R_386_NONE 0
24#define R_386_32 1
25#define R_386_PC32 2
26#define R_386_GOT32 3
27#define R_386_PLT32 4
28#define R_386_COPY 5
29#define R_386_GLOB_DAT 6
30#define R_386_JMP_SLOT 7
31#define R_386_RELATIVE 8
32#define R_386_GOTOFF 9
33#define R_386_GOTPC 10
34#define R_386_NUM 11
35
36/*
37 * These are used to set parameters in the core dumps.
38 */
39#define ELF_CLASS ELFCLASS32
40#define ELF_DATA ELFDATA2LSB
41#define ELF_ARCH EM_386
42
43#else
44
45/* x86-64 relocation types */
46#define R_X86_64_NONE 0 /* No reloc */
47#define R_X86_64_64 1 /* Direct 64 bit */
48#define R_X86_64_PC32 2 /* PC relative 32 bit signed */
49#define R_X86_64_GOT32 3 /* 32 bit GOT entry */
50#define R_X86_64_PLT32 4 /* 32 bit PLT address */
51#define R_X86_64_COPY 5 /* Copy symbol at runtime */
52#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
53#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */
54#define R_X86_64_RELATIVE 8 /* Adjust by program base */
55#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative
56 offset to GOT */
57#define R_X86_64_32 10 /* Direct 32 bit zero extended */
58#define R_X86_64_32S 11 /* Direct 32 bit sign extended */
59#define R_X86_64_16 12 /* Direct 16 bit zero extended */
60#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
61#define R_X86_64_8 14 /* Direct 8 bit sign extended */
62#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
63
64#define R_X86_64_NUM 16
65
66/*
67 * These are used to set parameters in the core dumps.
68 */
69#define ELF_CLASS ELFCLASS64
70#define ELF_DATA ELFDATA2LSB
71#define ELF_ARCH EM_X86_64
72
73#endif
74
75#include <asm/vdso.h>
76
77extern unsigned int vdso_enabled;
78
79/*
80 * This is used to ensure we don't load something for the wrong architecture.
81 */
82#define elf_check_arch_ia32(x) \
83 (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
84
85#include <asm/processor.h>
86#include <asm/system.h>
87
88#ifdef CONFIG_X86_32
89#include <asm/desc.h>
90
91#define elf_check_arch(x) elf_check_arch_ia32(x)
92
93/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
94 contains a pointer to a function which might be registered using `atexit'.
95 This provides a mean for the dynamic linker to call DT_FINI functions for
96 shared libraries that have been loaded before the code runs.
97
98 A value of 0 tells we have no such handler.
99
100 We might as well make sure everything else is cleared too (except for %esp),
101 just to make things more deterministic.
102 */
103#define ELF_PLAT_INIT(_r, load_addr) \
104 do { \
105 _r->bx = 0; _r->cx = 0; _r->dx = 0; \
106 _r->si = 0; _r->di = 0; _r->bp = 0; \
107 _r->ax = 0; \
108} while (0)
109
110/*
111 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
112 * now struct_user_regs, they are different)
113 */
114
115#define ELF_CORE_COPY_REGS(pr_reg, regs) \
116do { \
117 pr_reg[0] = regs->bx; \
118 pr_reg[1] = regs->cx; \
119 pr_reg[2] = regs->dx; \
120 pr_reg[3] = regs->si; \
121 pr_reg[4] = regs->di; \
122 pr_reg[5] = regs->bp; \
123 pr_reg[6] = regs->ax; \
124 pr_reg[7] = regs->ds & 0xffff; \
125 pr_reg[8] = regs->es & 0xffff; \
126 pr_reg[9] = regs->fs & 0xffff; \
127 savesegment(gs, pr_reg[10]); \
128 pr_reg[11] = regs->orig_ax; \
129 pr_reg[12] = regs->ip; \
130 pr_reg[13] = regs->cs & 0xffff; \
131 pr_reg[14] = regs->flags; \
132 pr_reg[15] = regs->sp; \
133 pr_reg[16] = regs->ss & 0xffff; \
134} while (0);
135
136#define ELF_PLATFORM (utsname()->machine)
137#define set_personality_64bit() do { } while (0)
138
139#else /* CONFIG_X86_32 */
140
141/*
142 * This is used to ensure we don't load something for the wrong architecture.
143 */
144#define elf_check_arch(x) \
145 ((x)->e_machine == EM_X86_64)
146
147#define compat_elf_check_arch(x) elf_check_arch_ia32(x)
148
149static inline void start_ia32_thread(struct pt_regs *regs, u32 ip, u32 sp)
150{
151 loadsegment(fs, 0);
152 loadsegment(ds, __USER32_DS);
153 loadsegment(es, __USER32_DS);
154 load_gs_index(0);
155 regs->ip = ip;
156 regs->sp = sp;
157 regs->flags = X86_EFLAGS_IF;
158 regs->cs = __USER32_CS;
159 regs->ss = __USER32_DS;
160}
161
162static inline void elf_common_init(struct thread_struct *t,
163 struct pt_regs *regs, const u16 ds)
164{
165 regs->ax = regs->bx = regs->cx = regs->dx = 0;
166 regs->si = regs->di = regs->bp = 0;
167 regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0;
168 regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0;
169 t->fs = t->gs = 0;
170 t->fsindex = t->gsindex = 0;
171 t->ds = t->es = ds;
172}
173
174#define ELF_PLAT_INIT(_r, load_addr) \
175do { \
176 elf_common_init(&current->thread, _r, 0); \
177 clear_thread_flag(TIF_IA32); \
178} while (0)
179
180#define COMPAT_ELF_PLAT_INIT(regs, load_addr) \
181 elf_common_init(&current->thread, regs, __USER_DS)
182
183#define compat_start_thread(regs, ip, sp) \
184do { \
185 start_ia32_thread(regs, ip, sp); \
186 set_fs(USER_DS); \
187} while (0)
188
189#define COMPAT_SET_PERSONALITY(ex, ibcs2) \
190do { \
191 if (test_thread_flag(TIF_IA32)) \
192 clear_thread_flag(TIF_ABI_PENDING); \
193 else \
194 set_thread_flag(TIF_ABI_PENDING); \
195 current->personality |= force_personality32; \
196} while (0)
197
198#define COMPAT_ELF_PLATFORM ("i686")
199
200/*
201 * regs is struct pt_regs, pr_reg is elf_gregset_t (which is
202 * now struct_user_regs, they are different). Assumes current is the process
203 * getting dumped.
204 */
205
206#define ELF_CORE_COPY_REGS(pr_reg, regs) \
207do { \
208 unsigned v; \
209 (pr_reg)[0] = (regs)->r15; \
210 (pr_reg)[1] = (regs)->r14; \
211 (pr_reg)[2] = (regs)->r13; \
212 (pr_reg)[3] = (regs)->r12; \
213 (pr_reg)[4] = (regs)->bp; \
214 (pr_reg)[5] = (regs)->bx; \
215 (pr_reg)[6] = (regs)->r11; \
216 (pr_reg)[7] = (regs)->r10; \
217 (pr_reg)[8] = (regs)->r9; \
218 (pr_reg)[9] = (regs)->r8; \
219 (pr_reg)[10] = (regs)->ax; \
220 (pr_reg)[11] = (regs)->cx; \
221 (pr_reg)[12] = (regs)->dx; \
222 (pr_reg)[13] = (regs)->si; \
223 (pr_reg)[14] = (regs)->di; \
224 (pr_reg)[15] = (regs)->orig_ax; \
225 (pr_reg)[16] = (regs)->ip; \
226 (pr_reg)[17] = (regs)->cs; \
227 (pr_reg)[18] = (regs)->flags; \
228 (pr_reg)[19] = (regs)->sp; \
229 (pr_reg)[20] = (regs)->ss; \
230 (pr_reg)[21] = current->thread.fs; \
231 (pr_reg)[22] = current->thread.gs; \
232 asm("movl %%ds,%0" : "=r" (v)); (pr_reg)[23] = v; \
233 asm("movl %%es,%0" : "=r" (v)); (pr_reg)[24] = v; \
234 asm("movl %%fs,%0" : "=r" (v)); (pr_reg)[25] = v; \
235 asm("movl %%gs,%0" : "=r" (v)); (pr_reg)[26] = v; \
236} while (0);
237
238/* I'm not sure if we can use '-' here */
239#define ELF_PLATFORM ("x86_64")
240extern void set_personality_64bit(void);
241extern unsigned int sysctl_vsyscall32;
242extern int force_personality32;
243
244#endif /* !CONFIG_X86_32 */
245
246#define CORE_DUMP_USE_REGSET
247#define USE_ELF_CORE_DUMP
248#define ELF_EXEC_PAGESIZE 4096
249
250/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
251 use of this is to invoke "./ld.so someprog" to test out a new version of
252 the loader. We need to make sure that it is out of the way of the program
253 that it will "exec", and that there is sufficient room for the brk. */
254
255#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
256
257/* This yields a mask that user programs can use to figure out what
258 instruction set this CPU supports. This could be done in user space,
259 but it's not easy, and we've already done it here. */
260
261#define ELF_HWCAP (boot_cpu_data.x86_capability[0])
262
263/* This yields a string that ld.so will use to load implementation
264 specific libraries for optimization. This is more specific in
265 intent than poking at uname or /proc/cpuinfo.
266
267 For the moment, we have only optimizations for the Intel generations,
268 but that could change... */
269
270#define SET_PERSONALITY(ex, ibcs2) set_personality_64bit()
271
272/*
273 * An executable for which elf_read_implies_exec() returns TRUE will
274 * have the READ_IMPLIES_EXEC personality flag set automatically.
275 */
276#define elf_read_implies_exec(ex, executable_stack) \
277 (executable_stack != EXSTACK_DISABLE_X)
278
279struct task_struct;
280
281#define ARCH_DLINFO_IA32(vdso_enabled) \
282do { \
283 if (vdso_enabled) { \
284 NEW_AUX_ENT(AT_SYSINFO, VDSO_ENTRY); \
285 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_CURRENT_BASE); \
286 } \
287} while (0)
288
289#ifdef CONFIG_X86_32
290
291#define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO))
292
293#define ARCH_DLINFO ARCH_DLINFO_IA32(vdso_enabled)
294
295/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
296
297#else /* CONFIG_X86_32 */
298
299#define VDSO_HIGH_BASE 0xffffe000U /* CONFIG_COMPAT_VDSO address */
300
301/* 1GB for 64bit, 8MB for 32bit */
302#define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff)
303
304#define ARCH_DLINFO \
305do { \
306 if (vdso_enabled) \
307 NEW_AUX_ENT(AT_SYSINFO_EHDR, \
308 (unsigned long)current->mm->context.vdso); \
309} while (0)
310
311#define AT_SYSINFO 32
312
313#define COMPAT_ARCH_DLINFO ARCH_DLINFO_IA32(sysctl_vsyscall32)
314
315#define COMPAT_ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
316
317#endif /* !CONFIG_X86_32 */
318
319#define VDSO_CURRENT_BASE ((unsigned long)current->mm->context.vdso)
320
321#define VDSO_ENTRY \
322 ((unsigned long)VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall))
323
324struct linux_binprm;
325
326#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
327extern int arch_setup_additional_pages(struct linux_binprm *bprm,
328 int executable_stack);
329
330extern int syscall32_setup_pages(struct linux_binprm *, int exstack);
331#define compat_arch_setup_additional_pages syscall32_setup_pages
332
333extern unsigned long arch_randomize_brk(struct mm_struct *mm);
334#define arch_randomize_brk arch_randomize_brk
335
336#endif /* ASM_X86__ELF_H */
diff --git a/include/asm-x86/emergency-restart.h b/include/asm-x86/emergency-restart.h
deleted file mode 100644
index 190d0d8b71e3..000000000000
--- a/include/asm-x86/emergency-restart.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_X86__EMERGENCY_RESTART_H
2#define ASM_X86__EMERGENCY_RESTART_H
3
4enum reboot_type {
5 BOOT_TRIPLE = 't',
6 BOOT_KBD = 'k',
7#ifdef CONFIG_X86_32
8 BOOT_BIOS = 'b',
9#endif
10 BOOT_ACPI = 'a',
11 BOOT_EFI = 'e'
12};
13
14extern enum reboot_type reboot_type;
15
16extern void machine_emergency_restart(void);
17
18#endif /* ASM_X86__EMERGENCY_RESTART_H */
diff --git a/include/asm-x86/errno.h b/include/asm-x86/errno.h
deleted file mode 100644
index 4c82b503d92f..000000000000
--- a/include/asm-x86/errno.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/errno.h>
diff --git a/include/asm-x86/es7000/apic.h b/include/asm-x86/es7000/apic.h
deleted file mode 100644
index bd2c44d1f7ac..000000000000
--- a/include/asm-x86/es7000/apic.h
+++ /dev/null
@@ -1,194 +0,0 @@
1#ifndef __ASM_ES7000_APIC_H
2#define __ASM_ES7000_APIC_H
3
4#define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu)
5#define esr_disable (1)
6
7static inline int apic_id_registered(void)
8{
9 return (1);
10}
11
12static inline cpumask_t target_cpus(void)
13{
14#if defined CONFIG_ES7000_CLUSTERED_APIC
15 return CPU_MASK_ALL;
16#else
17 return cpumask_of_cpu(smp_processor_id());
18#endif
19}
20#define TARGET_CPUS (target_cpus())
21
22#if defined CONFIG_ES7000_CLUSTERED_APIC
23#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
24#define INT_DELIVERY_MODE (dest_LowestPrio)
25#define INT_DEST_MODE (1) /* logical delivery broadcast to all procs */
26#define NO_BALANCE_IRQ (1)
27#undef WAKE_SECONDARY_VIA_INIT
28#define WAKE_SECONDARY_VIA_MIP
29#else
30#define APIC_DFR_VALUE (APIC_DFR_FLAT)
31#define INT_DELIVERY_MODE (dest_Fixed)
32#define INT_DEST_MODE (0) /* phys delivery to target procs */
33#define NO_BALANCE_IRQ (0)
34#undef APIC_DEST_LOGICAL
35#define APIC_DEST_LOGICAL 0x0
36#define WAKE_SECONDARY_VIA_INIT
37#endif
38
39static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
40{
41 return 0;
42}
43static inline unsigned long check_apicid_present(int bit)
44{
45 return physid_isset(bit, phys_cpu_present_map);
46}
47
48#define apicid_cluster(apicid) (apicid & 0xF0)
49
50static inline unsigned long calculate_ldr(int cpu)
51{
52 unsigned long id;
53 id = xapic_phys_to_log_apicid(cpu);
54 return (SET_APIC_LOGICAL_ID(id));
55}
56
57/*
58 * Set up the logical destination ID.
59 *
60 * Intel recommends to set DFR, LdR and TPR before enabling
61 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
62 * document number 292116). So here it goes...
63 */
64static inline void init_apic_ldr(void)
65{
66 unsigned long val;
67 int cpu = smp_processor_id();
68
69 apic_write(APIC_DFR, APIC_DFR_VALUE);
70 val = calculate_ldr(cpu);
71 apic_write(APIC_LDR, val);
72}
73
74#ifndef CONFIG_X86_GENERICARCH
75extern void enable_apic_mode(void);
76#endif
77
78extern int apic_version [MAX_APICS];
79static inline void setup_apic_routing(void)
80{
81 int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
82 printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
83 (apic_version[apic] == 0x14) ?
84 "Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]);
85}
86
87static inline int multi_timer_check(int apic, int irq)
88{
89 return 0;
90}
91
92static inline int apicid_to_node(int logical_apicid)
93{
94 return 0;
95}
96
97
98static inline int cpu_present_to_apicid(int mps_cpu)
99{
100 if (!mps_cpu)
101 return boot_cpu_physical_apicid;
102 else if (mps_cpu < NR_CPUS)
103 return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu);
104 else
105 return BAD_APICID;
106}
107
108static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
109{
110 static int id = 0;
111 physid_mask_t mask;
112 mask = physid_mask_of_physid(id);
113 ++id;
114 return mask;
115}
116
117extern u8 cpu_2_logical_apicid[];
118/* Mapping from cpu number to logical apicid */
119static inline int cpu_to_logical_apicid(int cpu)
120{
121#ifdef CONFIG_SMP
122 if (cpu >= NR_CPUS)
123 return BAD_APICID;
124 return (int)cpu_2_logical_apicid[cpu];
125#else
126 return logical_smp_processor_id();
127#endif
128}
129
130static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
131{
132 /* For clustered we don't have a good way to do this yet - hack */
133 return physids_promote(0xff);
134}
135
136
137static inline void setup_portio_remap(void)
138{
139}
140
141extern unsigned int boot_cpu_physical_apicid;
142static inline int check_phys_apicid_present(int cpu_physical_apicid)
143{
144 boot_cpu_physical_apicid = read_apic_id();
145 return (1);
146}
147
148static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
149{
150 int num_bits_set;
151 int cpus_found = 0;
152 int cpu;
153 int apicid;
154
155 num_bits_set = cpus_weight(cpumask);
156 /* Return id to all */
157 if (num_bits_set == NR_CPUS)
158#if defined CONFIG_ES7000_CLUSTERED_APIC
159 return 0xFF;
160#else
161 return cpu_to_logical_apicid(0);
162#endif
163 /*
164 * The cpus in the mask must all be on the apic cluster. If are not
165 * on the same apicid cluster return default value of TARGET_CPUS.
166 */
167 cpu = first_cpu(cpumask);
168 apicid = cpu_to_logical_apicid(cpu);
169 while (cpus_found < num_bits_set) {
170 if (cpu_isset(cpu, cpumask)) {
171 int new_apicid = cpu_to_logical_apicid(cpu);
172 if (apicid_cluster(apicid) !=
173 apicid_cluster(new_apicid)){
174 printk ("%s: Not a valid mask!\n",__FUNCTION__);
175#if defined CONFIG_ES7000_CLUSTERED_APIC
176 return 0xFF;
177#else
178 return cpu_to_logical_apicid(0);
179#endif
180 }
181 apicid = new_apicid;
182 cpus_found++;
183 }
184 cpu++;
185 }
186 return apicid;
187}
188
189static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
190{
191 return cpuid_apic >> index_msb;
192}
193
194#endif /* __ASM_ES7000_APIC_H */
diff --git a/include/asm-x86/es7000/apicdef.h b/include/asm-x86/es7000/apicdef.h
deleted file mode 100644
index 8b234a3cb851..000000000000
--- a/include/asm-x86/es7000/apicdef.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ASM_ES7000_APICDEF_H
2#define __ASM_ES7000_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (((x)>>24)&0xFF);
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/es7000/ipi.h b/include/asm-x86/es7000/ipi.h
deleted file mode 100644
index 632a955fcc0a..000000000000
--- a/include/asm-x86/es7000/ipi.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef __ASM_ES7000_IPI_H
2#define __ASM_ES7000_IPI_H
3
4void send_IPI_mask_sequence(cpumask_t mask, int vector);
5
6static inline void send_IPI_mask(cpumask_t mask, int vector)
7{
8 send_IPI_mask_sequence(mask, vector);
9}
10
11static inline void send_IPI_allbutself(int vector)
12{
13 cpumask_t mask = cpu_online_map;
14 cpu_clear(smp_processor_id(), mask);
15 if (!cpus_empty(mask))
16 send_IPI_mask(mask, vector);
17}
18
19static inline void send_IPI_all(int vector)
20{
21 send_IPI_mask(cpu_online_map, vector);
22}
23
24#endif /* __ASM_ES7000_IPI_H */
diff --git a/include/asm-x86/es7000/mpparse.h b/include/asm-x86/es7000/mpparse.h
deleted file mode 100644
index ed5a3caae141..000000000000
--- a/include/asm-x86/es7000/mpparse.h
+++ /dev/null
@@ -1,30 +0,0 @@
1#ifndef __ASM_ES7000_MPPARSE_H
2#define __ASM_ES7000_MPPARSE_H
3
4#include <linux/acpi.h>
5
6extern int parse_unisys_oem (char *oemptr);
7extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
8extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
9extern void setup_unisys(void);
10
11#ifndef CONFIG_X86_GENERICARCH
12extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
13extern int mps_oem_check(struct mp_config_table *mpc, char *oem,
14 char *productid);
15#endif
16
17#ifdef CONFIG_ACPI
18
19static inline int es7000_check_dsdt(void)
20{
21 struct acpi_table_header header;
22
23 if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
24 !strncmp(header.oem_id, "UNISYS", 6))
25 return 1;
26 return 0;
27}
28#endif
29
30#endif /* __ASM_MACH_MPPARSE_H */
diff --git a/include/asm-x86/es7000/wakecpu.h b/include/asm-x86/es7000/wakecpu.h
deleted file mode 100644
index 3ffc5a7bf667..000000000000
--- a/include/asm-x86/es7000/wakecpu.h
+++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef __ASM_ES7000_WAKECPU_H
2#define __ASM_ES7000_WAKECPU_H
3
4/*
5 * This file copes with machines that wakeup secondary CPUs by the
6 * INIT, INIT, STARTUP sequence.
7 */
8
9#ifdef CONFIG_ES7000_CLUSTERED_APIC
10#define WAKE_SECONDARY_VIA_MIP
11#else
12#define WAKE_SECONDARY_VIA_INIT
13#endif
14
15#ifdef WAKE_SECONDARY_VIA_MIP
16extern int es7000_start_cpu(int cpu, unsigned long eip);
17static inline int
18wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
19{
20 int boot_error = 0;
21 boot_error = es7000_start_cpu(phys_apicid, start_eip);
22 return boot_error;
23}
24#endif
25
26#define TRAMPOLINE_LOW phys_to_virt(0x467)
27#define TRAMPOLINE_HIGH phys_to_virt(0x469)
28
29#define boot_cpu_apicid boot_cpu_physical_apicid
30
31static inline void wait_for_init_deassert(atomic_t *deassert)
32{
33#ifdef WAKE_SECONDARY_VIA_INIT
34 while (!atomic_read(deassert))
35 cpu_relax();
36#endif
37 return;
38}
39
40/* Nothing to do for most platforms, since cleared by the INIT cycle */
41static inline void smp_callin_clear_local_apic(void)
42{
43}
44
45static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
46{
47}
48
49static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
50{
51}
52
53#if APIC_DEBUG
54 #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
55#else
56 #define inquire_remote_apic(apicid) {}
57#endif
58
59#endif /* __ASM_MACH_WAKECPU_H */
diff --git a/include/asm-x86/fb.h b/include/asm-x86/fb.h
deleted file mode 100644
index aca38dbd9a64..000000000000
--- a/include/asm-x86/fb.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef ASM_X86__FB_H
2#define ASM_X86__FB_H
3
4#include <linux/fb.h>
5#include <linux/fs.h>
6#include <asm/page.h>
7
8static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
9 unsigned long off)
10{
11 if (boot_cpu_data.x86 > 3)
12 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
13}
14
15#ifdef CONFIG_X86_32
16extern int fb_is_primary_device(struct fb_info *info);
17#else
18static inline int fb_is_primary_device(struct fb_info *info) { return 0; }
19#endif
20
21#endif /* ASM_X86__FB_H */
diff --git a/include/asm-x86/fcntl.h b/include/asm-x86/fcntl.h
deleted file mode 100644
index 46ab12db5739..000000000000
--- a/include/asm-x86/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/fcntl.h>
diff --git a/include/asm-x86/fixmap.h b/include/asm-x86/fixmap.h
deleted file mode 100644
index 78e33a1bc591..000000000000
--- a/include/asm-x86/fixmap.h
+++ /dev/null
@@ -1,68 +0,0 @@
1#ifndef ASM_X86__FIXMAP_H
2#define ASM_X86__FIXMAP_H
3
4#ifdef CONFIG_X86_32
5# include "fixmap_32.h"
6#else
7# include "fixmap_64.h"
8#endif
9
10extern int fixmaps_set;
11
12void __native_set_fixmap(enum fixed_addresses idx, pte_t pte);
13void native_set_fixmap(enum fixed_addresses idx,
14 unsigned long phys, pgprot_t flags);
15
16#ifndef CONFIG_PARAVIRT
17static inline void __set_fixmap(enum fixed_addresses idx,
18 unsigned long phys, pgprot_t flags)
19{
20 native_set_fixmap(idx, phys, flags);
21}
22#endif
23
24#define set_fixmap(idx, phys) \
25 __set_fixmap(idx, phys, PAGE_KERNEL)
26
27/*
28 * Some hardware wants to get fixmapped without caching.
29 */
30#define set_fixmap_nocache(idx, phys) \
31 __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
32
33#define clear_fixmap(idx) \
34 __set_fixmap(idx, 0, __pgprot(0))
35
36#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
37#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
38
39extern void __this_fixmap_does_not_exist(void);
40
41/*
42 * 'index to address' translation. If anyone tries to use the idx
43 * directly without translation, we catch the bug with a NULL-deference
44 * kernel oops. Illegal ranges of incoming indices are caught too.
45 */
46static __always_inline unsigned long fix_to_virt(const unsigned int idx)
47{
48 /*
49 * this branch gets completely eliminated after inlining,
50 * except when someone tries to use fixaddr indices in an
51 * illegal way. (such as mixing up address types or using
52 * out-of-range indices).
53 *
54 * If it doesn't get removed, the linker will complain
55 * loudly with a reasonably clear error message..
56 */
57 if (idx >= __end_of_fixed_addresses)
58 __this_fixmap_does_not_exist();
59
60 return __fix_to_virt(idx);
61}
62
63static inline unsigned long virt_to_fix(const unsigned long vaddr)
64{
65 BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
66 return __virt_to_fix(vaddr);
67}
68#endif /* ASM_X86__FIXMAP_H */
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h
deleted file mode 100644
index 8844002da0e0..000000000000
--- a/include/asm-x86/fixmap_32.h
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar
9 *
10 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
11 */
12
13#ifndef ASM_X86__FIXMAP_32_H
14#define ASM_X86__FIXMAP_32_H
15
16
17/* used by vmalloc.c, vsyscall.lds.S.
18 *
19 * Leave one empty page between vmalloc'ed areas and
20 * the start of the fixmap.
21 */
22extern unsigned long __FIXADDR_TOP;
23#define FIXADDR_USER_START __fix_to_virt(FIX_VDSO)
24#define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1)
25
26#ifndef __ASSEMBLY__
27#include <linux/kernel.h>
28#include <asm/acpi.h>
29#include <asm/apicdef.h>
30#include <asm/page.h>
31#ifdef CONFIG_HIGHMEM
32#include <linux/threads.h>
33#include <asm/kmap_types.h>
34#endif
35
36/*
37 * Here we define all the compile-time 'special' virtual
38 * addresses. The point is to have a constant address at
39 * compile time, but to set the physical address only
40 * in the boot process. We allocate these special addresses
41 * from the end of virtual memory (0xfffff000) backwards.
42 * Also this lets us do fail-safe vmalloc(), we
43 * can guarantee that these special addresses and
44 * vmalloc()-ed addresses never overlap.
45 *
46 * these 'compile-time allocated' memory buffers are
47 * fixed-size 4k pages. (or larger if used with an increment
48 * highger than 1) use fixmap_set(idx,phys) to associate
49 * physical memory with fixmap indices.
50 *
51 * TLB entries of such buffers will not be flushed across
52 * task switches.
53 */
54enum fixed_addresses {
55 FIX_HOLE,
56 FIX_VDSO,
57 FIX_DBGP_BASE,
58 FIX_EARLYCON_MEM_BASE,
59#ifdef CONFIG_X86_LOCAL_APIC
60 FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
61#endif
62#ifdef CONFIG_X86_IO_APIC
63 FIX_IO_APIC_BASE_0,
64 FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
65#endif
66#ifdef CONFIG_X86_VISWS_APIC
67 FIX_CO_CPU, /* Cobalt timer */
68 FIX_CO_APIC, /* Cobalt APIC Redirection Table */
69 FIX_LI_PCIA, /* Lithium PCI Bridge A */
70 FIX_LI_PCIB, /* Lithium PCI Bridge B */
71#endif
72#ifdef CONFIG_X86_F00F_BUG
73 FIX_F00F_IDT, /* Virtual mapping for IDT */
74#endif
75#ifdef CONFIG_X86_CYCLONE_TIMER
76 FIX_CYCLONE_TIMER, /*cyclone timer register*/
77#endif
78#ifdef CONFIG_HIGHMEM
79 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
80 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
81#endif
82#ifdef CONFIG_PCI_MMCONFIG
83 FIX_PCIE_MCFG,
84#endif
85#ifdef CONFIG_PARAVIRT
86 FIX_PARAVIRT_BOOTMAP,
87#endif
88 __end_of_permanent_fixed_addresses,
89 /*
90 * 256 temporary boot-time mappings, used by early_ioremap(),
91 * before ioremap() is functional.
92 *
93 * We round it up to the next 256 pages boundary so that we
94 * can have a single pgd entry and a single pte table:
95 */
96#define NR_FIX_BTMAPS 64
97#define FIX_BTMAPS_SLOTS 4
98 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
99 (__end_of_permanent_fixed_addresses & 255),
100 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
101 FIX_WP_TEST,
102#ifdef CONFIG_ACPI
103 FIX_ACPI_BEGIN,
104 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
105#endif
106#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
107 FIX_OHCI1394_BASE,
108#endif
109 __end_of_fixed_addresses
110};
111
112extern void reserve_top_address(unsigned long reserve);
113
114
115#define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP)
116
117#define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
118#define __FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
119#define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE)
120#define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE)
121
122#endif /* !__ASSEMBLY__ */
123#endif /* ASM_X86__FIXMAP_32_H */
diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h
deleted file mode 100644
index dab4751d1307..000000000000
--- a/include/asm-x86/fixmap_64.h
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar
9 */
10
11#ifndef ASM_X86__FIXMAP_64_H
12#define ASM_X86__FIXMAP_64_H
13
14#include <linux/kernel.h>
15#include <asm/acpi.h>
16#include <asm/apicdef.h>
17#include <asm/page.h>
18#include <asm/vsyscall.h>
19#include <asm/efi.h>
20
21/*
22 * Here we define all the compile-time 'special' virtual
23 * addresses. The point is to have a constant address at
24 * compile time, but to set the physical address only
25 * in the boot process.
26 *
27 * These 'compile-time allocated' memory buffers are
28 * fixed-size 4k pages (or larger if used with an increment
29 * higher than 1). Use set_fixmap(idx,phys) to associate
30 * physical memory with fixmap indices.
31 *
32 * TLB entries of such buffers will not be flushed across
33 * task switches.
34 */
35
36enum fixed_addresses {
37 VSYSCALL_LAST_PAGE,
38 VSYSCALL_FIRST_PAGE = VSYSCALL_LAST_PAGE
39 + ((VSYSCALL_END-VSYSCALL_START) >> PAGE_SHIFT) - 1,
40 VSYSCALL_HPET,
41 FIX_DBGP_BASE,
42 FIX_EARLYCON_MEM_BASE,
43 FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
44 FIX_IO_APIC_BASE_0,
45 FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS - 1,
46 FIX_EFI_IO_MAP_LAST_PAGE,
47 FIX_EFI_IO_MAP_FIRST_PAGE = FIX_EFI_IO_MAP_LAST_PAGE
48 + MAX_EFI_IO_PAGES - 1,
49#ifdef CONFIG_PARAVIRT
50 FIX_PARAVIRT_BOOTMAP,
51#endif
52 __end_of_permanent_fixed_addresses,
53#ifdef CONFIG_ACPI
54 FIX_ACPI_BEGIN,
55 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
56#endif
57#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
58 FIX_OHCI1394_BASE,
59#endif
60 /*
61 * 256 temporary boot-time mappings, used by early_ioremap(),
62 * before ioremap() is functional.
63 *
64 * We round it up to the next 256 pages boundary so that we
65 * can have a single pgd entry and a single pte table:
66 */
67#define NR_FIX_BTMAPS 64
68#define FIX_BTMAPS_SLOTS 4
69 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
70 (__end_of_permanent_fixed_addresses & 255),
71 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
72 __end_of_fixed_addresses
73};
74
75#define FIXADDR_TOP (VSYSCALL_END-PAGE_SIZE)
76#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
77#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
78
79/* Only covers 32bit vsyscalls currently. Need another set for 64bit. */
80#define FIXADDR_USER_START ((unsigned long)VSYSCALL32_VSYSCALL)
81#define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE)
82
83#endif /* ASM_X86__FIXMAP_64_H */
diff --git a/include/asm-x86/floppy.h b/include/asm-x86/floppy.h
deleted file mode 100644
index 7d83a3a83e37..000000000000
--- a/include/asm-x86/floppy.h
+++ /dev/null
@@ -1,281 +0,0 @@
1/*
2 * Architecture specific parts of the Floppy driver
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995
9 */
10#ifndef ASM_X86__FLOPPY_H
11#define ASM_X86__FLOPPY_H
12
13#include <linux/vmalloc.h>
14
15/*
16 * The DMA channel used by the floppy controller cannot access data at
17 * addresses >= 16MB
18 *
19 * Went back to the 1MB limit, as some people had problems with the floppy
20 * driver otherwise. It doesn't matter much for performance anyway, as most
21 * floppy accesses go through the track buffer.
22 */
23#define _CROSS_64KB(a, s, vdma) \
24 (!(vdma) && \
25 ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
26
27#define CROSS_64KB(a, s) _CROSS_64KB(a, s, use_virtual_dma & 1)
28
29
30#define SW fd_routine[use_virtual_dma & 1]
31#define CSW fd_routine[can_use_virtual_dma & 1]
32
33
34#define fd_inb(port) inb_p(port)
35#define fd_outb(value, port) outb_p(value, port)
36
37#define fd_request_dma() CSW._request_dma(FLOPPY_DMA, "floppy")
38#define fd_free_dma() CSW._free_dma(FLOPPY_DMA)
39#define fd_enable_irq() enable_irq(FLOPPY_IRQ)
40#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
41#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL)
42#define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA)
43#define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size)
44#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
45
46#define FLOPPY_CAN_FALLBACK_ON_NODMA
47
48static int virtual_dma_count;
49static int virtual_dma_residue;
50static char *virtual_dma_addr;
51static int virtual_dma_mode;
52static int doing_pdma;
53
54static irqreturn_t floppy_hardint(int irq, void *dev_id)
55{
56 unsigned char st;
57
58#undef TRACE_FLPY_INT
59
60#ifdef TRACE_FLPY_INT
61 static int calls;
62 static int bytes;
63 static int dma_wait;
64#endif
65 if (!doing_pdma)
66 return floppy_interrupt(irq, dev_id);
67
68#ifdef TRACE_FLPY_INT
69 if (!calls)
70 bytes = virtual_dma_count;
71#endif
72
73 {
74 int lcount;
75 char *lptr;
76
77 st = 1;
78 for (lcount = virtual_dma_count, lptr = virtual_dma_addr;
79 lcount; lcount--, lptr++) {
80 st = inb(virtual_dma_port + 4) & 0xa0;
81 if (st != 0xa0)
82 break;
83 if (virtual_dma_mode)
84 outb_p(*lptr, virtual_dma_port + 5);
85 else
86 *lptr = inb_p(virtual_dma_port + 5);
87 }
88 virtual_dma_count = lcount;
89 virtual_dma_addr = lptr;
90 st = inb(virtual_dma_port + 4);
91 }
92
93#ifdef TRACE_FLPY_INT
94 calls++;
95#endif
96 if (st == 0x20)
97 return IRQ_HANDLED;
98 if (!(st & 0x20)) {
99 virtual_dma_residue += virtual_dma_count;
100 virtual_dma_count = 0;
101#ifdef TRACE_FLPY_INT
102 printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n",
103 virtual_dma_count, virtual_dma_residue, calls, bytes,
104 dma_wait);
105 calls = 0;
106 dma_wait = 0;
107#endif
108 doing_pdma = 0;
109 floppy_interrupt(irq, dev_id);
110 return IRQ_HANDLED;
111 }
112#ifdef TRACE_FLPY_INT
113 if (!virtual_dma_count)
114 dma_wait++;
115#endif
116 return IRQ_HANDLED;
117}
118
119static void fd_disable_dma(void)
120{
121 if (!(can_use_virtual_dma & 1))
122 disable_dma(FLOPPY_DMA);
123 doing_pdma = 0;
124 virtual_dma_residue += virtual_dma_count;
125 virtual_dma_count = 0;
126}
127
128static int vdma_request_dma(unsigned int dmanr, const char *device_id)
129{
130 return 0;
131}
132
133static void vdma_nop(unsigned int dummy)
134{
135}
136
137
138static int vdma_get_dma_residue(unsigned int dummy)
139{
140 return virtual_dma_count + virtual_dma_residue;
141}
142
143
144static int fd_request_irq(void)
145{
146 if (can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 IRQF_DISABLED, "floppy", NULL);
149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 IRQF_DISABLED, "floppy", NULL);
152}
153
154static unsigned long dma_mem_alloc(unsigned long size)
155{
156 return __get_dma_pages(GFP_KERNEL|__GFP_NORETRY, get_order(size));
157}
158
159
160static unsigned long vdma_mem_alloc(unsigned long size)
161{
162 return (unsigned long)vmalloc(size);
163
164}
165
166#define nodma_mem_alloc(size) vdma_mem_alloc(size)
167
168static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
169{
170 if ((unsigned long)addr >= (unsigned long)high_memory)
171 vfree((void *)addr);
172 else
173 free_pages(addr, get_order(size));
174}
175
176#define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size)
177
178static void _fd_chose_dma_mode(char *addr, unsigned long size)
179{
180 if (can_use_virtual_dma == 2) {
181 if ((unsigned long)addr >= (unsigned long)high_memory ||
182 isa_virt_to_bus(addr) >= 0x1000000 ||
183 _CROSS_64KB(addr, size, 0))
184 use_virtual_dma = 1;
185 else
186 use_virtual_dma = 0;
187 } else {
188 use_virtual_dma = can_use_virtual_dma & 1;
189 }
190}
191
192#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
193
194
195static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
196{
197 doing_pdma = 1;
198 virtual_dma_port = io;
199 virtual_dma_mode = (mode == DMA_MODE_WRITE);
200 virtual_dma_addr = addr;
201 virtual_dma_count = size;
202 virtual_dma_residue = 0;
203 return 0;
204}
205
206static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
207{
208#ifdef FLOPPY_SANITY_CHECK
209 if (CROSS_64KB(addr, size)) {
210 printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
211 return -1;
212 }
213#endif
214 /* actual, physical DMA */
215 doing_pdma = 0;
216 clear_dma_ff(FLOPPY_DMA);
217 set_dma_mode(FLOPPY_DMA, mode);
218 set_dma_addr(FLOPPY_DMA, isa_virt_to_bus(addr));
219 set_dma_count(FLOPPY_DMA, size);
220 enable_dma(FLOPPY_DMA);
221 return 0;
222}
223
224static struct fd_routine_l {
225 int (*_request_dma)(unsigned int dmanr, const char *device_id);
226 void (*_free_dma)(unsigned int dmanr);
227 int (*_get_dma_residue)(unsigned int dummy);
228 unsigned long (*_dma_mem_alloc)(unsigned long size);
229 int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
230} fd_routine[] = {
231 {
232 request_dma,
233 free_dma,
234 get_dma_residue,
235 dma_mem_alloc,
236 hard_dma_setup
237 },
238 {
239 vdma_request_dma,
240 vdma_nop,
241 vdma_get_dma_residue,
242 vdma_mem_alloc,
243 vdma_dma_setup
244 }
245};
246
247
248static int FDC1 = 0x3f0;
249static int FDC2 = -1;
250
251/*
252 * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
253 * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
254 * coincides with another rtc CMOS user. Paul G.
255 */
256#define FLOPPY0_TYPE \
257({ \
258 unsigned long flags; \
259 unsigned char val; \
260 spin_lock_irqsave(&rtc_lock, flags); \
261 val = (CMOS_READ(0x10) >> 4) & 15; \
262 spin_unlock_irqrestore(&rtc_lock, flags); \
263 val; \
264})
265
266#define FLOPPY1_TYPE \
267({ \
268 unsigned long flags; \
269 unsigned char val; \
270 spin_lock_irqsave(&rtc_lock, flags); \
271 val = CMOS_READ(0x10) & 15; \
272 spin_unlock_irqrestore(&rtc_lock, flags); \
273 val; \
274})
275
276#define N_FDC 2
277#define N_DRIVE 8
278
279#define EXTRA_FLOPPY_PARAMS
280
281#endif /* ASM_X86__FLOPPY_H */
diff --git a/include/asm-x86/frame.h b/include/asm-x86/frame.h
deleted file mode 100644
index 06850a7194e1..000000000000
--- a/include/asm-x86/frame.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifdef __ASSEMBLY__
2
3#include <asm/dwarf2.h>
4
5/* The annotation hides the frame from the unwinder and makes it look
6 like a ordinary ebp save/restore. This avoids some special cases for
7 frame pointer later */
8#ifdef CONFIG_FRAME_POINTER
9 .macro FRAME
10 pushl %ebp
11 CFI_ADJUST_CFA_OFFSET 4
12 CFI_REL_OFFSET ebp,0
13 movl %esp,%ebp
14 .endm
15 .macro ENDFRAME
16 popl %ebp
17 CFI_ADJUST_CFA_OFFSET -4
18 CFI_RESTORE ebp
19 .endm
20#else
21 .macro FRAME
22 .endm
23 .macro ENDFRAME
24 .endm
25#endif
26
27#endif /* __ASSEMBLY__ */
diff --git a/include/asm-x86/ftrace.h b/include/asm-x86/ftrace.h
deleted file mode 100644
index be0e004ad148..000000000000
--- a/include/asm-x86/ftrace.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef ASM_X86__FTRACE_H
2#define ASM_X86__FTRACE_H
3
4#ifdef CONFIG_FTRACE
5#define MCOUNT_ADDR ((long)(mcount))
6#define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */
7
8#ifndef __ASSEMBLY__
9extern void mcount(void);
10#endif
11
12#endif /* CONFIG_FTRACE */
13
14#endif /* ASM_X86__FTRACE_H */
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h
deleted file mode 100644
index 06b924ef6fa5..000000000000
--- a/include/asm-x86/futex.h
+++ /dev/null
@@ -1,140 +0,0 @@
1#ifndef ASM_X86__FUTEX_H
2#define ASM_X86__FUTEX_H
3
4#ifdef __KERNEL__
5
6#include <linux/futex.h>
7#include <linux/uaccess.h>
8
9#include <asm/asm.h>
10#include <asm/errno.h>
11#include <asm/processor.h>
12#include <asm/system.h>
13
14#define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \
15 asm volatile("1:\t" insn "\n" \
16 "2:\t.section .fixup,\"ax\"\n" \
17 "3:\tmov\t%3, %1\n" \
18 "\tjmp\t2b\n" \
19 "\t.previous\n" \
20 _ASM_EXTABLE(1b, 3b) \
21 : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
22 : "i" (-EFAULT), "0" (oparg), "1" (0))
23
24#define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \
25 asm volatile("1:\tmovl %2, %0\n" \
26 "\tmovl\t%0, %3\n" \
27 "\t" insn "\n" \
28 "2:\t" LOCK_PREFIX "cmpxchgl %3, %2\n" \
29 "\tjnz\t1b\n" \
30 "3:\t.section .fixup,\"ax\"\n" \
31 "4:\tmov\t%5, %1\n" \
32 "\tjmp\t3b\n" \
33 "\t.previous\n" \
34 _ASM_EXTABLE(1b, 4b) \
35 _ASM_EXTABLE(2b, 4b) \
36 : "=&a" (oldval), "=&r" (ret), \
37 "+m" (*uaddr), "=&r" (tem) \
38 : "r" (oparg), "i" (-EFAULT), "1" (0))
39
40static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
41{
42 int op = (encoded_op >> 28) & 7;
43 int cmp = (encoded_op >> 24) & 15;
44 int oparg = (encoded_op << 8) >> 20;
45 int cmparg = (encoded_op << 20) >> 20;
46 int oldval = 0, ret, tem;
47
48 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
49 oparg = 1 << oparg;
50
51 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
52 return -EFAULT;
53
54#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_BSWAP)
55 /* Real i386 machines can only support FUTEX_OP_SET */
56 if (op != FUTEX_OP_SET && boot_cpu_data.x86 == 3)
57 return -ENOSYS;
58#endif
59
60 pagefault_disable();
61
62 switch (op) {
63 case FUTEX_OP_SET:
64 __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
65 break;
66 case FUTEX_OP_ADD:
67 __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret, oldval,
68 uaddr, oparg);
69 break;
70 case FUTEX_OP_OR:
71 __futex_atomic_op2("orl %4, %3", ret, oldval, uaddr, oparg);
72 break;
73 case FUTEX_OP_ANDN:
74 __futex_atomic_op2("andl %4, %3", ret, oldval, uaddr, ~oparg);
75 break;
76 case FUTEX_OP_XOR:
77 __futex_atomic_op2("xorl %4, %3", ret, oldval, uaddr, oparg);
78 break;
79 default:
80 ret = -ENOSYS;
81 }
82
83 pagefault_enable();
84
85 if (!ret) {
86 switch (cmp) {
87 case FUTEX_OP_CMP_EQ:
88 ret = (oldval == cmparg);
89 break;
90 case FUTEX_OP_CMP_NE:
91 ret = (oldval != cmparg);
92 break;
93 case FUTEX_OP_CMP_LT:
94 ret = (oldval < cmparg);
95 break;
96 case FUTEX_OP_CMP_GE:
97 ret = (oldval >= cmparg);
98 break;
99 case FUTEX_OP_CMP_LE:
100 ret = (oldval <= cmparg);
101 break;
102 case FUTEX_OP_CMP_GT:
103 ret = (oldval > cmparg);
104 break;
105 default:
106 ret = -ENOSYS;
107 }
108 }
109 return ret;
110}
111
112static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval,
113 int newval)
114{
115
116#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_BSWAP)
117 /* Real i386 machines have no cmpxchg instruction */
118 if (boot_cpu_data.x86 == 3)
119 return -ENOSYS;
120#endif
121
122 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
123 return -EFAULT;
124
125 asm volatile("1:\t" LOCK_PREFIX "cmpxchgl %3, %1\n"
126 "2:\t.section .fixup, \"ax\"\n"
127 "3:\tmov %2, %0\n"
128 "\tjmp 2b\n"
129 "\t.previous\n"
130 _ASM_EXTABLE(1b, 3b)
131 : "=a" (oldval), "+m" (*uaddr)
132 : "i" (-EFAULT), "r" (newval), "0" (oldval)
133 : "memory"
134 );
135
136 return oldval;
137}
138
139#endif
140#endif /* ASM_X86__FUTEX_H */
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
deleted file mode 100644
index 605edb39ef9e..000000000000
--- a/include/asm-x86/gart.h
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifndef ASM_X86__GART_H
2#define ASM_X86__GART_H
3
4#include <asm/e820.h>
5
6extern void set_up_gart_resume(u32, u32);
7
8extern int fallback_aper_order;
9extern int fallback_aper_force;
10extern int fix_aperture;
11
12/* PTE bits. */
13#define GPTE_VALID 1
14#define GPTE_COHERENT 2
15
16/* Aperture control register bits. */
17#define GARTEN (1<<0)
18#define DISGARTCPU (1<<4)
19#define DISGARTIO (1<<5)
20
21/* GART cache control register bits. */
22#define INVGART (1<<0)
23#define GARTPTEERR (1<<1)
24
25/* K8 On-cpu GART registers */
26#define AMD64_GARTAPERTURECTL 0x90
27#define AMD64_GARTAPERTUREBASE 0x94
28#define AMD64_GARTTABLEBASE 0x98
29#define AMD64_GARTCACHECTL 0x9c
30#define AMD64_GARTEN (1<<0)
31
32extern int agp_amd64_init(void);
33
34static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)
35{
36 u32 tmp, ctl;
37
38 /* address of the mappings table */
39 addr >>= 12;
40 tmp = (u32) addr<<4;
41 tmp &= ~0xf;
42 pci_write_config_dword(dev, AMD64_GARTTABLEBASE, tmp);
43
44 /* Enable GART translation for this hammer. */
45 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl);
46 ctl |= GARTEN;
47 ctl &= ~(DISGARTCPU | DISGARTIO);
48 pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
49}
50
51static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size)
52{
53 if (!aper_base)
54 return 0;
55
56 if (aper_base + aper_size > 0x100000000ULL) {
57 printk(KERN_INFO "Aperture beyond 4GB. Ignoring.\n");
58 return 0;
59 }
60 if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) {
61 printk(KERN_INFO "Aperture pointing to e820 RAM. Ignoring.\n");
62 return 0;
63 }
64 if (aper_size < min_size) {
65 printk(KERN_INFO "Aperture too small (%d MB) than (%d MB)\n",
66 aper_size>>20, min_size>>20);
67 return 0;
68 }
69
70 return 1;
71}
72
73#endif /* ASM_X86__GART_H */
diff --git a/include/asm-x86/genapic.h b/include/asm-x86/genapic.h
deleted file mode 100644
index d48bee663a6f..000000000000
--- a/include/asm-x86/genapic.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "genapic_32.h"
3#else
4# include "genapic_64.h"
5#endif
diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h
deleted file mode 100644
index 34280f027664..000000000000
--- a/include/asm-x86/genapic_32.h
+++ /dev/null
@@ -1,124 +0,0 @@
1#ifndef ASM_X86__GENAPIC_32_H
2#define ASM_X86__GENAPIC_32_H
3
4#include <asm/mpspec.h>
5
6/*
7 * Generic APIC driver interface.
8 *
9 * An straight forward mapping of the APIC related parts of the
10 * x86 subarchitecture interface to a dynamic object.
11 *
12 * This is used by the "generic" x86 subarchitecture.
13 *
14 * Copyright 2003 Andi Kleen, SuSE Labs.
15 */
16
17struct mpc_config_bus;
18struct mp_config_table;
19struct mpc_config_processor;
20
21struct genapic {
22 char *name;
23 int (*probe)(void);
24
25 int (*apic_id_registered)(void);
26 cpumask_t (*target_cpus)(void);
27 int int_delivery_mode;
28 int int_dest_mode;
29 int ESR_DISABLE;
30 int apic_destination_logical;
31 unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
32 unsigned long (*check_apicid_present)(int apicid);
33 int no_balance_irq;
34 int no_ioapic_check;
35 void (*init_apic_ldr)(void);
36 physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
37
38 void (*setup_apic_routing)(void);
39 int (*multi_timer_check)(int apic, int irq);
40 int (*apicid_to_node)(int logical_apicid);
41 int (*cpu_to_logical_apicid)(int cpu);
42 int (*cpu_present_to_apicid)(int mps_cpu);
43 physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
44 void (*setup_portio_remap)(void);
45 int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
46 void (*enable_apic_mode)(void);
47 u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
48
49 /* mpparse */
50 /* When one of the next two hooks returns 1 the genapic
51 is switched to this. Essentially they are additional probe
52 functions. */
53 int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
54 char *productid);
55 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
56
57 unsigned (*get_apic_id)(unsigned long x);
58 unsigned long apic_id_mask;
59 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
60
61#ifdef CONFIG_SMP
62 /* ipi */
63 void (*send_IPI_mask)(cpumask_t mask, int vector);
64 void (*send_IPI_allbutself)(int vector);
65 void (*send_IPI_all)(int vector);
66#endif
67};
68
69#define APICFUNC(x) .x = x,
70
71/* More functions could be probably marked IPIFUNC and save some space
72 in UP GENERICARCH kernels, but I don't have the nerve right now
73 to untangle this mess. -AK */
74#ifdef CONFIG_SMP
75#define IPIFUNC(x) APICFUNC(x)
76#else
77#define IPIFUNC(x)
78#endif
79
80#define APIC_INIT(aname, aprobe) \
81{ \
82 .name = aname, \
83 .probe = aprobe, \
84 .int_delivery_mode = INT_DELIVERY_MODE, \
85 .int_dest_mode = INT_DEST_MODE, \
86 .no_balance_irq = NO_BALANCE_IRQ, \
87 .ESR_DISABLE = esr_disable, \
88 .apic_destination_logical = APIC_DEST_LOGICAL, \
89 APICFUNC(apic_id_registered) \
90 APICFUNC(target_cpus) \
91 APICFUNC(check_apicid_used) \
92 APICFUNC(check_apicid_present) \
93 APICFUNC(init_apic_ldr) \
94 APICFUNC(ioapic_phys_id_map) \
95 APICFUNC(setup_apic_routing) \
96 APICFUNC(multi_timer_check) \
97 APICFUNC(apicid_to_node) \
98 APICFUNC(cpu_to_logical_apicid) \
99 APICFUNC(cpu_present_to_apicid) \
100 APICFUNC(apicid_to_cpu_present) \
101 APICFUNC(setup_portio_remap) \
102 APICFUNC(check_phys_apicid_present) \
103 APICFUNC(mps_oem_check) \
104 APICFUNC(get_apic_id) \
105 .apic_id_mask = APIC_ID_MASK, \
106 APICFUNC(cpu_mask_to_apicid) \
107 APICFUNC(acpi_madt_oem_check) \
108 IPIFUNC(send_IPI_mask) \
109 IPIFUNC(send_IPI_allbutself) \
110 IPIFUNC(send_IPI_all) \
111 APICFUNC(enable_apic_mode) \
112 APICFUNC(phys_pkg_id) \
113}
114
115extern struct genapic *genapic;
116
117enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
118#define get_uv_system_type() UV_NONE
119#define is_uv_system() 0
120#define uv_wakeup_secondary(a, b) 1
121#define uv_system_init() do {} while (0)
122
123
124#endif /* ASM_X86__GENAPIC_32_H */
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
deleted file mode 100644
index ed6a4886c082..000000000000
--- a/include/asm-x86/genapic_64.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef ASM_X86__GENAPIC_64_H
2#define ASM_X86__GENAPIC_64_H
3
4/*
5 * Copyright 2004 James Cleverdon, IBM.
6 * Subject to the GNU Public License, v.2
7 *
8 * Generic APIC sub-arch data struct.
9 *
10 * Hacked for x86-64 by James Cleverdon from i386 architecture code by
11 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
12 * James Cleverdon.
13 */
14
15struct genapic {
16 char *name;
17 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
18 u32 int_delivery_mode;
19 u32 int_dest_mode;
20 int (*apic_id_registered)(void);
21 cpumask_t (*target_cpus)(void);
22 cpumask_t (*vector_allocation_domain)(int cpu);
23 void (*init_apic_ldr)(void);
24 /* ipi */
25 void (*send_IPI_mask)(cpumask_t mask, int vector);
26 void (*send_IPI_allbutself)(int vector);
27 void (*send_IPI_all)(int vector);
28 void (*send_IPI_self)(int vector);
29 /* */
30 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
31 unsigned int (*phys_pkg_id)(int index_msb);
32 unsigned int (*get_apic_id)(unsigned long x);
33 unsigned long (*set_apic_id)(unsigned int id);
34 unsigned long apic_id_mask;
35};
36
37extern struct genapic *genapic;
38
39extern struct genapic apic_flat;
40extern struct genapic apic_physflat;
41extern struct genapic apic_x2apic_cluster;
42extern struct genapic apic_x2apic_phys;
43extern int acpi_madt_oem_check(char *, char *);
44
45extern void apic_send_IPI_self(int vector);
46enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
47extern enum uv_system_type get_uv_system_type(void);
48extern int is_uv_system(void);
49
50extern struct genapic apic_x2apic_uv_x;
51DECLARE_PER_CPU(int, x2apic_extra_bits);
52extern void uv_cpu_init(void);
53extern void uv_system_init(void);
54extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
55
56extern void setup_apic_routing(void);
57
58#endif /* ASM_X86__GENAPIC_64_H */
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
deleted file mode 100644
index 3f3444be2638..000000000000
--- a/include/asm-x86/geode.h
+++ /dev/null
@@ -1,253 +0,0 @@
1/*
2 * AMD Geode definitions
3 * Copyright (C) 2006, Advanced Micro Devices, Inc.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
8 */
9
10#ifndef ASM_X86__GEODE_H
11#define ASM_X86__GEODE_H
12
13#include <asm/processor.h>
14#include <linux/io.h>
15
16/* Generic southbridge functions */
17
18#define GEODE_DEV_PMS 0
19#define GEODE_DEV_ACPI 1
20#define GEODE_DEV_GPIO 2
21#define GEODE_DEV_MFGPT 3
22
23extern int geode_get_dev_base(unsigned int dev);
24
25/* Useful macros */
26#define geode_pms_base() geode_get_dev_base(GEODE_DEV_PMS)
27#define geode_acpi_base() geode_get_dev_base(GEODE_DEV_ACPI)
28#define geode_gpio_base() geode_get_dev_base(GEODE_DEV_GPIO)
29#define geode_mfgpt_base() geode_get_dev_base(GEODE_DEV_MFGPT)
30
31/* MSRS */
32
33#define MSR_GLIU_P2D_RO0 0x10000029
34
35#define MSR_LX_GLD_MSR_CONFIG 0x48002001
36#define MSR_LX_MSR_PADSEL 0x48002011 /* NOT 0x48000011; the data
37 * sheet has the wrong value */
38#define MSR_GLCP_SYS_RSTPLL 0x4C000014
39#define MSR_GLCP_DOTPLL 0x4C000015
40
41#define MSR_LBAR_SMB 0x5140000B
42#define MSR_LBAR_GPIO 0x5140000C
43#define MSR_LBAR_MFGPT 0x5140000D
44#define MSR_LBAR_ACPI 0x5140000E
45#define MSR_LBAR_PMS 0x5140000F
46
47#define MSR_DIVIL_SOFT_RESET 0x51400017
48
49#define MSR_PIC_YSEL_LOW 0x51400020
50#define MSR_PIC_YSEL_HIGH 0x51400021
51#define MSR_PIC_ZSEL_LOW 0x51400022
52#define MSR_PIC_ZSEL_HIGH 0x51400023
53#define MSR_PIC_IRQM_LPC 0x51400025
54
55#define MSR_MFGPT_IRQ 0x51400028
56#define MSR_MFGPT_NR 0x51400029
57#define MSR_MFGPT_SETUP 0x5140002B
58
59#define MSR_LX_SPARE_MSR 0x80000011 /* DC-specific */
60
61#define MSR_GX_GLD_MSR_CONFIG 0xC0002001
62#define MSR_GX_MSR_PADSEL 0xC0002011
63
64/* Resource Sizes */
65
66#define LBAR_GPIO_SIZE 0xFF
67#define LBAR_MFGPT_SIZE 0x40
68#define LBAR_ACPI_SIZE 0x40
69#define LBAR_PMS_SIZE 0x80
70
71/* ACPI registers (PMS block) */
72
73/*
74 * PM1_EN is only valid when VSA is enabled for 16 bit reads.
75 * When VSA is not enabled, *always* read both PM1_STS and PM1_EN
76 * with a 32 bit read at offset 0x0
77 */
78
79#define PM1_STS 0x00
80#define PM1_EN 0x02
81#define PM1_CNT 0x08
82#define PM2_CNT 0x0C
83#define PM_TMR 0x10
84#define PM_GPE0_STS 0x18
85#define PM_GPE0_EN 0x1C
86
87/* PMC registers (PMS block) */
88
89#define PM_SSD 0x00
90#define PM_SCXA 0x04
91#define PM_SCYA 0x08
92#define PM_OUT_SLPCTL 0x0C
93#define PM_SCLK 0x10
94#define PM_SED 0x1
95#define PM_SCXD 0x18
96#define PM_SCYD 0x1C
97#define PM_IN_SLPCTL 0x20
98#define PM_WKD 0x30
99#define PM_WKXD 0x34
100#define PM_RD 0x38
101#define PM_WKXA 0x3C
102#define PM_FSD 0x40
103#define PM_TSD 0x44
104#define PM_PSD 0x48
105#define PM_NWKD 0x4C
106#define PM_AWKD 0x50
107#define PM_SSC 0x54
108
109/* VSA2 magic values */
110
111#define VSA_VRC_INDEX 0xAC1C
112#define VSA_VRC_DATA 0xAC1E
113#define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */
114#define VSA_VR_SIGNATURE 0x0003
115#define VSA_VR_MEM_SIZE 0x0200
116#define AMD_VSA_SIG 0x4132 /* signature is ascii 'VSA2' */
117#define GSW_VSA_SIG 0x534d /* General Software signature */
118/* GPIO */
119
120#define GPIO_OUTPUT_VAL 0x00
121#define GPIO_OUTPUT_ENABLE 0x04
122#define GPIO_OUTPUT_OPEN_DRAIN 0x08
123#define GPIO_OUTPUT_INVERT 0x0C
124#define GPIO_OUTPUT_AUX1 0x10
125#define GPIO_OUTPUT_AUX2 0x14
126#define GPIO_PULL_UP 0x18
127#define GPIO_PULL_DOWN 0x1C
128#define GPIO_INPUT_ENABLE 0x20
129#define GPIO_INPUT_INVERT 0x24
130#define GPIO_INPUT_FILTER 0x28
131#define GPIO_INPUT_EVENT_COUNT 0x2C
132#define GPIO_READ_BACK 0x30
133#define GPIO_INPUT_AUX1 0x34
134#define GPIO_EVENTS_ENABLE 0x38
135#define GPIO_LOCK_ENABLE 0x3C
136#define GPIO_POSITIVE_EDGE_EN 0x40
137#define GPIO_NEGATIVE_EDGE_EN 0x44
138#define GPIO_POSITIVE_EDGE_STS 0x48
139#define GPIO_NEGATIVE_EDGE_STS 0x4C
140
141#define GPIO_MAP_X 0xE0
142#define GPIO_MAP_Y 0xE4
143#define GPIO_MAP_Z 0xE8
144#define GPIO_MAP_W 0xEC
145
146static inline u32 geode_gpio(unsigned int nr)
147{
148 BUG_ON(nr > 28);
149 return 1 << nr;
150}
151
152extern void geode_gpio_set(u32, unsigned int);
153extern void geode_gpio_clear(u32, unsigned int);
154extern int geode_gpio_isset(u32, unsigned int);
155extern void geode_gpio_setup_event(unsigned int, int, int);
156extern void geode_gpio_set_irq(unsigned int, unsigned int);
157
158static inline void geode_gpio_event_irq(unsigned int gpio, int pair)
159{
160 geode_gpio_setup_event(gpio, pair, 0);
161}
162
163static inline void geode_gpio_event_pme(unsigned int gpio, int pair)
164{
165 geode_gpio_setup_event(gpio, pair, 1);
166}
167
168/* Specific geode tests */
169
170static inline int is_geode_gx(void)
171{
172 return ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC) &&
173 (boot_cpu_data.x86 == 5) &&
174 (boot_cpu_data.x86_model == 5));
175}
176
177static inline int is_geode_lx(void)
178{
179 return ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
180 (boot_cpu_data.x86 == 5) &&
181 (boot_cpu_data.x86_model == 10));
182}
183
184static inline int is_geode(void)
185{
186 return (is_geode_gx() || is_geode_lx());
187}
188
189#ifdef CONFIG_MGEODE_LX
190extern int geode_has_vsa2(void);
191#else
192static inline int geode_has_vsa2(void)
193{
194 return 0;
195}
196#endif
197
198/* MFGPTs */
199
200#define MFGPT_MAX_TIMERS 8
201#define MFGPT_TIMER_ANY (-1)
202
203#define MFGPT_DOMAIN_WORKING 1
204#define MFGPT_DOMAIN_STANDBY 2
205#define MFGPT_DOMAIN_ANY (MFGPT_DOMAIN_WORKING | MFGPT_DOMAIN_STANDBY)
206
207#define MFGPT_CMP1 0
208#define MFGPT_CMP2 1
209
210#define MFGPT_EVENT_IRQ 0
211#define MFGPT_EVENT_NMI 1
212#define MFGPT_EVENT_RESET 3
213
214#define MFGPT_REG_CMP1 0
215#define MFGPT_REG_CMP2 2
216#define MFGPT_REG_COUNTER 4
217#define MFGPT_REG_SETUP 6
218
219#define MFGPT_SETUP_CNTEN (1 << 15)
220#define MFGPT_SETUP_CMP2 (1 << 14)
221#define MFGPT_SETUP_CMP1 (1 << 13)
222#define MFGPT_SETUP_SETUP (1 << 12)
223#define MFGPT_SETUP_STOPEN (1 << 11)
224#define MFGPT_SETUP_EXTEN (1 << 10)
225#define MFGPT_SETUP_REVEN (1 << 5)
226#define MFGPT_SETUP_CLKSEL (1 << 4)
227
228static inline void geode_mfgpt_write(int timer, u16 reg, u16 value)
229{
230 u32 base = geode_get_dev_base(GEODE_DEV_MFGPT);
231 outw(value, base + reg + (timer * 8));
232}
233
234static inline u16 geode_mfgpt_read(int timer, u16 reg)
235{
236 u32 base = geode_get_dev_base(GEODE_DEV_MFGPT);
237 return inw(base + reg + (timer * 8));
238}
239
240extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable);
241extern int geode_mfgpt_set_irq(int timer, int cmp, int *irq, int enable);
242extern int geode_mfgpt_alloc_timer(int timer, int domain);
243
244#define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1)
245#define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0)
246
247#ifdef CONFIG_GEODE_MFGPT_TIMER
248extern int __init mfgpt_timer_setup(void);
249#else
250static inline int mfgpt_timer_setup(void) { return 0; }
251#endif
252
253#endif /* ASM_X86__GEODE_H */
diff --git a/include/asm-x86/gpio.h b/include/asm-x86/gpio.h
deleted file mode 100644
index 497fb980d962..000000000000
--- a/include/asm-x86/gpio.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * Generic GPIO API implementation for x86.
3 *
4 * Derived from the generic GPIO API for powerpc:
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _ASM_I386_GPIO_H
17#define _ASM_I386_GPIO_H
18
19#include <asm-generic/gpio.h>
20
21#ifdef CONFIG_GPIOLIB
22
23/*
24 * Just call gpiolib.
25 */
26static inline int gpio_get_value(unsigned int gpio)
27{
28 return __gpio_get_value(gpio);
29}
30
31static inline void gpio_set_value(unsigned int gpio, int value)
32{
33 __gpio_set_value(gpio, value);
34}
35
36static inline int gpio_cansleep(unsigned int gpio)
37{
38 return __gpio_cansleep(gpio);
39}
40
41/*
42 * Not implemented, yet.
43 */
44static inline int gpio_to_irq(unsigned int gpio)
45{
46 return -ENOSYS;
47}
48
49static inline int irq_to_gpio(unsigned int irq)
50{
51 return -EINVAL;
52}
53
54#endif /* CONFIG_GPIOLIB */
55
56#endif /* ASM_X86__GPIO_H */
diff --git a/include/asm-x86/hardirq.h b/include/asm-x86/hardirq.h
deleted file mode 100644
index 000787df66e6..000000000000
--- a/include/asm-x86/hardirq.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "hardirq_32.h"
3#else
4# include "hardirq_64.h"
5#endif
6
7extern u64 arch_irq_stat_cpu(unsigned int cpu);
8#define arch_irq_stat_cpu arch_irq_stat_cpu
9
10extern u64 arch_irq_stat(void);
11#define arch_irq_stat arch_irq_stat
diff --git a/include/asm-x86/hardirq_32.h b/include/asm-x86/hardirq_32.h
deleted file mode 100644
index 700fe230d919..000000000000
--- a/include/asm-x86/hardirq_32.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef ASM_X86__HARDIRQ_32_H
2#define ASM_X86__HARDIRQ_32_H
3
4#include <linux/threads.h>
5#include <linux/irq.h>
6
7typedef struct {
8 unsigned int __softirq_pending;
9 unsigned long idle_timestamp;
10 unsigned int __nmi_count; /* arch dependent */
11 unsigned int apic_timer_irqs; /* arch dependent */
12 unsigned int irq0_irqs;
13 unsigned int irq_resched_count;
14 unsigned int irq_call_count;
15 unsigned int irq_tlb_count;
16 unsigned int irq_thermal_count;
17 unsigned int irq_spurious_count;
18} ____cacheline_aligned irq_cpustat_t;
19
20DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
21
22#define __ARCH_IRQ_STAT
23#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)
24
25void ack_bad_irq(unsigned int irq);
26#include <linux/irq_cpustat.h>
27
28#endif /* ASM_X86__HARDIRQ_32_H */
diff --git a/include/asm-x86/hardirq_64.h b/include/asm-x86/hardirq_64.h
deleted file mode 100644
index f8bd2919a8ce..000000000000
--- a/include/asm-x86/hardirq_64.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef ASM_X86__HARDIRQ_64_H
2#define ASM_X86__HARDIRQ_64_H
3
4#include <linux/threads.h>
5#include <linux/irq.h>
6#include <asm/pda.h>
7#include <asm/apic.h>
8
9/* We can have at most NR_VECTORS irqs routed to a cpu at a time */
10#define MAX_HARDIRQS_PER_CPU NR_VECTORS
11
12#define __ARCH_IRQ_STAT 1
13
14#define local_softirq_pending() read_pda(__softirq_pending)
15
16#define __ARCH_SET_SOFTIRQ_PENDING 1
17
18#define set_softirq_pending(x) write_pda(__softirq_pending, (x))
19#define or_softirq_pending(x) or_pda(__softirq_pending, (x))
20
21extern void ack_bad_irq(unsigned int irq);
22
23#endif /* ASM_X86__HARDIRQ_64_H */
diff --git a/include/asm-x86/highmem.h b/include/asm-x86/highmem.h
deleted file mode 100644
index bc3f6a280316..000000000000
--- a/include/asm-x86/highmem.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * highmem.h: virtual kernel memory mappings for high memory
3 *
4 * Used in CONFIG_HIGHMEM systems for memory pages which
5 * are not addressable by direct kernel virtual addresses.
6 *
7 * Copyright (C) 1999 Gerhard Wichert, Siemens AG
8 * Gerhard.Wichert@pdb.siemens.de
9 *
10 *
11 * Redesigned the x86 32-bit VM architecture to deal with
12 * up to 16 Terabyte physical memory. With current x86 CPUs
13 * we now support up to 64 Gigabytes physical RAM.
14 *
15 * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
16 */
17
18#ifndef ASM_X86__HIGHMEM_H
19#define ASM_X86__HIGHMEM_H
20
21#ifdef __KERNEL__
22
23#include <linux/interrupt.h>
24#include <linux/threads.h>
25#include <asm/kmap_types.h>
26#include <asm/tlbflush.h>
27#include <asm/paravirt.h>
28
29/* declarations for highmem.c */
30extern unsigned long highstart_pfn, highend_pfn;
31
32extern pte_t *kmap_pte;
33extern pgprot_t kmap_prot;
34extern pte_t *pkmap_page_table;
35
36/*
37 * Right now we initialize only a single pte table. It can be extended
38 * easily, subsequent pte tables have to be allocated in one physical
39 * chunk of RAM.
40 */
41/*
42 * Ordering is:
43 *
44 * FIXADDR_TOP
45 * fixed_addresses
46 * FIXADDR_START
47 * temp fixed addresses
48 * FIXADDR_BOOT_START
49 * Persistent kmap area
50 * PKMAP_BASE
51 * VMALLOC_END
52 * Vmalloc area
53 * VMALLOC_START
54 * high_memory
55 */
56#define LAST_PKMAP_MASK (LAST_PKMAP-1)
57#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
58#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
59
60extern void *kmap_high(struct page *page);
61extern void kunmap_high(struct page *page);
62
63void *kmap(struct page *page);
64void kunmap(struct page *page);
65void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot);
66void *kmap_atomic(struct page *page, enum km_type type);
67void kunmap_atomic(void *kvaddr, enum km_type type);
68void *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
69struct page *kmap_atomic_to_page(void *ptr);
70
71#ifndef CONFIG_PARAVIRT
72#define kmap_atomic_pte(page, type) kmap_atomic(page, type)
73#endif
74
75#define flush_cache_kmaps() do { } while (0)
76
77extern void add_highpages_with_active_regions(int nid, unsigned long start_pfn,
78 unsigned long end_pfn);
79
80#endif /* __KERNEL__ */
81
82#endif /* ASM_X86__HIGHMEM_H */
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h
deleted file mode 100644
index cbbbb6d4dd32..000000000000
--- a/include/asm-x86/hpet.h
+++ /dev/null
@@ -1,93 +0,0 @@
1#ifndef ASM_X86__HPET_H
2#define ASM_X86__HPET_H
3
4#ifdef CONFIG_HPET_TIMER
5
6#define HPET_MMAP_SIZE 1024
7
8#define HPET_ID 0x000
9#define HPET_PERIOD 0x004
10#define HPET_CFG 0x010
11#define HPET_STATUS 0x020
12#define HPET_COUNTER 0x0f0
13#define HPET_T0_CFG 0x100
14#define HPET_T0_CMP 0x108
15#define HPET_T0_ROUTE 0x110
16#define HPET_T1_CFG 0x120
17#define HPET_T1_CMP 0x128
18#define HPET_T1_ROUTE 0x130
19#define HPET_T2_CFG 0x140
20#define HPET_T2_CMP 0x148
21#define HPET_T2_ROUTE 0x150
22
23#define HPET_ID_REV 0x000000ff
24#define HPET_ID_NUMBER 0x00001f00
25#define HPET_ID_64BIT 0x00002000
26#define HPET_ID_LEGSUP 0x00008000
27#define HPET_ID_VENDOR 0xffff0000
28#define HPET_ID_NUMBER_SHIFT 8
29#define HPET_ID_VENDOR_SHIFT 16
30
31#define HPET_ID_VENDOR_8086 0x8086
32
33#define HPET_CFG_ENABLE 0x001
34#define HPET_CFG_LEGACY 0x002
35#define HPET_LEGACY_8254 2
36#define HPET_LEGACY_RTC 8
37
38#define HPET_TN_LEVEL 0x0002
39#define HPET_TN_ENABLE 0x0004
40#define HPET_TN_PERIODIC 0x0008
41#define HPET_TN_PERIODIC_CAP 0x0010
42#define HPET_TN_64BIT_CAP 0x0020
43#define HPET_TN_SETVAL 0x0040
44#define HPET_TN_32BIT 0x0100
45#define HPET_TN_ROUTE 0x3e00
46#define HPET_TN_FSB 0x4000
47#define HPET_TN_FSB_CAP 0x8000
48#define HPET_TN_ROUTE_SHIFT 9
49
50/* Max HPET Period is 10^8 femto sec as in HPET spec */
51#define HPET_MAX_PERIOD 100000000UL
52/*
53 * Min HPET period is 10^5 femto sec just for safety. If it is less than this,
54 * then 32 bit HPET counter wrapsaround in less than 0.5 sec.
55 */
56#define HPET_MIN_PERIOD 100000UL
57
58/* hpet memory map physical address */
59extern unsigned long hpet_address;
60extern unsigned long force_hpet_address;
61extern int hpet_force_user;
62extern int is_hpet_enabled(void);
63extern int hpet_enable(void);
64extern void hpet_disable(void);
65extern unsigned long hpet_readl(unsigned long a);
66extern void force_hpet_resume(void);
67
68#ifdef CONFIG_HPET_EMULATE_RTC
69
70#include <linux/interrupt.h>
71
72typedef irqreturn_t (*rtc_irq_handler)(int interrupt, void *cookie);
73extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask);
74extern int hpet_set_rtc_irq_bit(unsigned long bit_mask);
75extern int hpet_set_alarm_time(unsigned char hrs, unsigned char min,
76 unsigned char sec);
77extern int hpet_set_periodic_freq(unsigned long freq);
78extern int hpet_rtc_dropped_irq(void);
79extern int hpet_rtc_timer_init(void);
80extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id);
81extern int hpet_register_irq_handler(rtc_irq_handler handler);
82extern void hpet_unregister_irq_handler(rtc_irq_handler handler);
83
84#endif /* CONFIG_HPET_EMULATE_RTC */
85
86#else /* CONFIG_HPET_TIMER */
87
88static inline int hpet_enable(void) { return 0; }
89static inline int is_hpet_enabled(void) { return 0; }
90#define hpet_readl(a) 0
91
92#endif
93#endif /* ASM_X86__HPET_H */
diff --git a/include/asm-x86/hugetlb.h b/include/asm-x86/hugetlb.h
deleted file mode 100644
index 0b7ec5dc0884..000000000000
--- a/include/asm-x86/hugetlb.h
+++ /dev/null
@@ -1,93 +0,0 @@
1#ifndef ASM_X86__HUGETLB_H
2#define ASM_X86__HUGETLB_H
3
4#include <asm/page.h>
5
6
7static inline int is_hugepage_only_range(struct mm_struct *mm,
8 unsigned long addr,
9 unsigned long len) {
10 return 0;
11}
12
13/*
14 * If the arch doesn't supply something else, assume that hugepage
15 * size aligned regions are ok without further preparation.
16 */
17static inline int prepare_hugepage_range(struct file *file,
18 unsigned long addr, unsigned long len)
19{
20 struct hstate *h = hstate_file(file);
21 if (len & ~huge_page_mask(h))
22 return -EINVAL;
23 if (addr & ~huge_page_mask(h))
24 return -EINVAL;
25 return 0;
26}
27
28static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) {
29}
30
31static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
32 unsigned long addr, unsigned long end,
33 unsigned long floor,
34 unsigned long ceiling)
35{
36 free_pgd_range(tlb, addr, end, floor, ceiling);
37}
38
39static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
40 pte_t *ptep, pte_t pte)
41{
42 set_pte_at(mm, addr, ptep, pte);
43}
44
45static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
46 unsigned long addr, pte_t *ptep)
47{
48 return ptep_get_and_clear(mm, addr, ptep);
49}
50
51static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
52 unsigned long addr, pte_t *ptep)
53{
54}
55
56static inline int huge_pte_none(pte_t pte)
57{
58 return pte_none(pte);
59}
60
61static inline pte_t huge_pte_wrprotect(pte_t pte)
62{
63 return pte_wrprotect(pte);
64}
65
66static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
67 unsigned long addr, pte_t *ptep)
68{
69 ptep_set_wrprotect(mm, addr, ptep);
70}
71
72static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
73 unsigned long addr, pte_t *ptep,
74 pte_t pte, int dirty)
75{
76 return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
77}
78
79static inline pte_t huge_ptep_get(pte_t *ptep)
80{
81 return *ptep;
82}
83
84static inline int arch_prepare_hugepage(struct page *page)
85{
86 return 0;
87}
88
89static inline void arch_release_hugepage(struct page *page)
90{
91}
92
93#endif /* ASM_X86__HUGETLB_H */
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h
deleted file mode 100644
index 50f6e0316b50..000000000000
--- a/include/asm-x86/hw_irq.h
+++ /dev/null
@@ -1,136 +0,0 @@
1#ifndef ASM_X86__HW_IRQ_H
2#define ASM_X86__HW_IRQ_H
3
4/*
5 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
6 *
7 * moved some of the old arch/i386/kernel/irq.h to here. VY
8 *
9 * IRQ/IPI changes taken from work by Thomas Radke
10 * <tomsoft@informatik.tu-chemnitz.de>
11 *
12 * hacked by Andi Kleen for x86-64.
13 * unified by tglx
14 */
15
16#include <asm/irq_vectors.h>
17
18#ifndef __ASSEMBLY__
19
20#include <linux/percpu.h>
21#include <linux/profile.h>
22#include <linux/smp.h>
23
24#include <asm/atomic.h>
25#include <asm/irq.h>
26#include <asm/sections.h>
27
28#define platform_legacy_irq(irq) ((irq) < 16)
29
30/* Interrupt handlers registered during init_IRQ */
31extern void apic_timer_interrupt(void);
32extern void error_interrupt(void);
33extern void spurious_interrupt(void);
34extern void thermal_interrupt(void);
35extern void reschedule_interrupt(void);
36
37extern void invalidate_interrupt(void);
38extern void invalidate_interrupt0(void);
39extern void invalidate_interrupt1(void);
40extern void invalidate_interrupt2(void);
41extern void invalidate_interrupt3(void);
42extern void invalidate_interrupt4(void);
43extern void invalidate_interrupt5(void);
44extern void invalidate_interrupt6(void);
45extern void invalidate_interrupt7(void);
46
47extern void irq_move_cleanup_interrupt(void);
48extern void threshold_interrupt(void);
49
50extern void call_function_interrupt(void);
51extern void call_function_single_interrupt(void);
52
53/* PIC specific functions */
54extern void disable_8259A_irq(unsigned int irq);
55extern void enable_8259A_irq(unsigned int irq);
56extern int i8259A_irq_pending(unsigned int irq);
57extern void make_8259A_irq(unsigned int irq);
58extern void init_8259A(int aeoi);
59
60/* IOAPIC */
61#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
62extern unsigned long io_apic_irqs;
63
64extern void init_VISWS_APIC_irqs(void);
65extern void setup_IO_APIC(void);
66extern void disable_IO_APIC(void);
67extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
68extern void setup_ioapic_dest(void);
69
70#ifdef CONFIG_X86_64
71extern void enable_IO_APIC(void);
72#endif
73
74/* IPI functions */
75#ifdef CONFIG_X86_32
76extern void send_IPI_self(int vector);
77#endif
78extern void send_IPI(int dest, int vector);
79
80/* Statistics */
81extern atomic_t irq_err_count;
82extern atomic_t irq_mis_count;
83
84/* EISA */
85extern void eisa_set_level_irq(unsigned int irq);
86
87/* Voyager functions */
88extern asmlinkage void vic_cpi_interrupt(void);
89extern asmlinkage void vic_sys_interrupt(void);
90extern asmlinkage void vic_cmn_interrupt(void);
91extern asmlinkage void qic_timer_interrupt(void);
92extern asmlinkage void qic_invalidate_interrupt(void);
93extern asmlinkage void qic_reschedule_interrupt(void);
94extern asmlinkage void qic_enable_irq_interrupt(void);
95extern asmlinkage void qic_call_function_interrupt(void);
96
97/* SMP */
98extern void smp_apic_timer_interrupt(struct pt_regs *);
99#ifdef CONFIG_X86_32
100extern void smp_spurious_interrupt(struct pt_regs *);
101extern void smp_error_interrupt(struct pt_regs *);
102#else
103extern asmlinkage void smp_spurious_interrupt(void);
104extern asmlinkage void smp_error_interrupt(void);
105#endif
106#ifdef CONFIG_X86_SMP
107extern void smp_reschedule_interrupt(struct pt_regs *);
108extern void smp_call_function_interrupt(struct pt_regs *);
109extern void smp_call_function_single_interrupt(struct pt_regs *);
110#ifdef CONFIG_X86_32
111extern void smp_invalidate_interrupt(struct pt_regs *);
112#else
113extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);
114#endif
115#endif
116
117#ifdef CONFIG_X86_32
118extern void (*const interrupt[NR_IRQS])(void);
119#else
120typedef int vector_irq_t[NR_VECTORS];
121DECLARE_PER_CPU(vector_irq_t, vector_irq);
122#endif
123
124#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64)
125extern void lock_vector_lock(void);
126extern void unlock_vector_lock(void);
127extern void __setup_vector_irq(int cpu);
128#else
129static inline void lock_vector_lock(void) {}
130static inline void unlock_vector_lock(void) {}
131static inline void __setup_vector_irq(int cpu) {}
132#endif
133
134#endif /* !ASSEMBLY_ */
135
136#endif /* ASM_X86__HW_IRQ_H */
diff --git a/include/asm-x86/hypertransport.h b/include/asm-x86/hypertransport.h
deleted file mode 100644
index cc011a3bc1c2..000000000000
--- a/include/asm-x86/hypertransport.h
+++ /dev/null
@@ -1,45 +0,0 @@
1#ifndef ASM_X86__HYPERTRANSPORT_H
2#define ASM_X86__HYPERTRANSPORT_H
3
4/*
5 * Constants for x86 Hypertransport Interrupts.
6 */
7
8#define HT_IRQ_LOW_BASE 0xf8000000
9
10#define HT_IRQ_LOW_VECTOR_SHIFT 16
11#define HT_IRQ_LOW_VECTOR_MASK 0x00ff0000
12#define HT_IRQ_LOW_VECTOR(v) \
13 (((v) << HT_IRQ_LOW_VECTOR_SHIFT) & HT_IRQ_LOW_VECTOR_MASK)
14
15#define HT_IRQ_LOW_DEST_ID_SHIFT 8
16#define HT_IRQ_LOW_DEST_ID_MASK 0x0000ff00
17#define HT_IRQ_LOW_DEST_ID(v) \
18 (((v) << HT_IRQ_LOW_DEST_ID_SHIFT) & HT_IRQ_LOW_DEST_ID_MASK)
19
20#define HT_IRQ_LOW_DM_PHYSICAL 0x0000000
21#define HT_IRQ_LOW_DM_LOGICAL 0x0000040
22
23#define HT_IRQ_LOW_RQEOI_EDGE 0x0000000
24#define HT_IRQ_LOW_RQEOI_LEVEL 0x0000020
25
26
27#define HT_IRQ_LOW_MT_FIXED 0x0000000
28#define HT_IRQ_LOW_MT_ARBITRATED 0x0000004
29#define HT_IRQ_LOW_MT_SMI 0x0000008
30#define HT_IRQ_LOW_MT_NMI 0x000000c
31#define HT_IRQ_LOW_MT_INIT 0x0000010
32#define HT_IRQ_LOW_MT_STARTUP 0x0000014
33#define HT_IRQ_LOW_MT_EXTINT 0x0000018
34#define HT_IRQ_LOW_MT_LINT1 0x000008c
35#define HT_IRQ_LOW_MT_LINT0 0x0000098
36
37#define HT_IRQ_LOW_IRQ_MASKED 0x0000001
38
39
40#define HT_IRQ_HIGH_DEST_ID_SHIFT 0
41#define HT_IRQ_HIGH_DEST_ID_MASK 0x00ffffff
42#define HT_IRQ_HIGH_DEST_ID(v) \
43 ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK)
44
45#endif /* ASM_X86__HYPERTRANSPORT_H */
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
deleted file mode 100644
index 9ba862a4eac0..000000000000
--- a/include/asm-x86/i387.h
+++ /dev/null
@@ -1,400 +0,0 @@
1/*
2 * Copyright (C) 1994 Linus Torvalds
3 *
4 * Pentium III FXSR, SSE support
5 * General FPU state handling cleanups
6 * Gareth Hughes <gareth@valinux.com>, May 2000
7 * x86-64 work by Andi Kleen 2002
8 */
9
10#ifndef ASM_X86__I387_H
11#define ASM_X86__I387_H
12
13#include <linux/sched.h>
14#include <linux/kernel_stat.h>
15#include <linux/regset.h>
16#include <linux/hardirq.h>
17#include <asm/asm.h>
18#include <asm/processor.h>
19#include <asm/sigcontext.h>
20#include <asm/user.h>
21#include <asm/uaccess.h>
22#include <asm/xsave.h>
23
24extern unsigned int sig_xstate_size;
25extern void fpu_init(void);
26extern void mxcsr_feature_mask_init(void);
27extern int init_fpu(struct task_struct *child);
28extern asmlinkage void math_state_restore(void);
29extern void init_thread_xstate(void);
30extern int dump_fpu(struct pt_regs *, struct user_i387_struct *);
31
32extern user_regset_active_fn fpregs_active, xfpregs_active;
33extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get;
34extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set;
35
36extern struct _fpx_sw_bytes fx_sw_reserved;
37#ifdef CONFIG_IA32_EMULATION
38extern unsigned int sig_xstate_ia32_size;
39extern struct _fpx_sw_bytes fx_sw_reserved_ia32;
40struct _fpstate_ia32;
41struct _xstate_ia32;
42extern int save_i387_xstate_ia32(void __user *buf);
43extern int restore_i387_xstate_ia32(void __user *buf);
44#endif
45
46#define X87_FSW_ES (1 << 7) /* Exception Summary */
47
48#ifdef CONFIG_X86_64
49
50/* Ignore delayed exceptions from user space */
51static inline void tolerant_fwait(void)
52{
53 asm volatile("1: fwait\n"
54 "2:\n"
55 _ASM_EXTABLE(1b, 2b));
56}
57
58static inline int fxrstor_checking(struct i387_fxsave_struct *fx)
59{
60 int err;
61
62 asm volatile("1: rex64/fxrstor (%[fx])\n\t"
63 "2:\n"
64 ".section .fixup,\"ax\"\n"
65 "3: movl $-1,%[err]\n"
66 " jmp 2b\n"
67 ".previous\n"
68 _ASM_EXTABLE(1b, 3b)
69 : [err] "=r" (err)
70#if 0 /* See comment in __save_init_fpu() below. */
71 : [fx] "r" (fx), "m" (*fx), "0" (0));
72#else
73 : [fx] "cdaSDb" (fx), "m" (*fx), "0" (0));
74#endif
75 return err;
76}
77
78static inline int restore_fpu_checking(struct task_struct *tsk)
79{
80 if (task_thread_info(tsk)->status & TS_XSAVE)
81 return xrstor_checking(&tsk->thread.xstate->xsave);
82 else
83 return fxrstor_checking(&tsk->thread.xstate->fxsave);
84}
85
86/* AMD CPUs don't save/restore FDP/FIP/FOP unless an exception
87 is pending. Clear the x87 state here by setting it to fixed
88 values. The kernel data segment can be sometimes 0 and sometimes
89 new user value. Both should be ok.
90 Use the PDA as safe address because it should be already in L1. */
91static inline void clear_fpu_state(struct task_struct *tsk)
92{
93 struct xsave_struct *xstate = &tsk->thread.xstate->xsave;
94 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
95
96 /*
97 * xsave header may indicate the init state of the FP.
98 */
99 if ((task_thread_info(tsk)->status & TS_XSAVE) &&
100 !(xstate->xsave_hdr.xstate_bv & XSTATE_FP))
101 return;
102
103 if (unlikely(fx->swd & X87_FSW_ES))
104 asm volatile("fnclex");
105 alternative_input(ASM_NOP8 ASM_NOP2,
106 " emms\n" /* clear stack tags */
107 " fildl %%gs:0", /* load to clear state */
108 X86_FEATURE_FXSAVE_LEAK);
109}
110
111static inline int fxsave_user(struct i387_fxsave_struct __user *fx)
112{
113 int err;
114
115 asm volatile("1: rex64/fxsave (%[fx])\n\t"
116 "2:\n"
117 ".section .fixup,\"ax\"\n"
118 "3: movl $-1,%[err]\n"
119 " jmp 2b\n"
120 ".previous\n"
121 _ASM_EXTABLE(1b, 3b)
122 : [err] "=r" (err), "=m" (*fx)
123#if 0 /* See comment in __fxsave_clear() below. */
124 : [fx] "r" (fx), "0" (0));
125#else
126 : [fx] "cdaSDb" (fx), "0" (0));
127#endif
128 if (unlikely(err) &&
129 __clear_user(fx, sizeof(struct i387_fxsave_struct)))
130 err = -EFAULT;
131 /* No need to clear here because the caller clears USED_MATH */
132 return err;
133}
134
135static inline void fxsave(struct task_struct *tsk)
136{
137 /* Using "rex64; fxsave %0" is broken because, if the memory operand
138 uses any extended registers for addressing, a second REX prefix
139 will be generated (to the assembler, rex64 followed by semicolon
140 is a separate instruction), and hence the 64-bitness is lost. */
141#if 0
142 /* Using "fxsaveq %0" would be the ideal choice, but is only supported
143 starting with gas 2.16. */
144 __asm__ __volatile__("fxsaveq %0"
145 : "=m" (tsk->thread.xstate->fxsave));
146#elif 0
147 /* Using, as a workaround, the properly prefixed form below isn't
148 accepted by any binutils version so far released, complaining that
149 the same type of prefix is used twice if an extended register is
150 needed for addressing (fix submitted to mainline 2005-11-21). */
151 __asm__ __volatile__("rex64/fxsave %0"
152 : "=m" (tsk->thread.xstate->fxsave));
153#else
154 /* This, however, we can work around by forcing the compiler to select
155 an addressing mode that doesn't require extended registers. */
156 __asm__ __volatile__("rex64/fxsave (%1)"
157 : "=m" (tsk->thread.xstate->fxsave)
158 : "cdaSDb" (&tsk->thread.xstate->fxsave));
159#endif
160}
161
162static inline void __save_init_fpu(struct task_struct *tsk)
163{
164 if (task_thread_info(tsk)->status & TS_XSAVE)
165 xsave(tsk);
166 else
167 fxsave(tsk);
168
169 clear_fpu_state(tsk);
170 task_thread_info(tsk)->status &= ~TS_USEDFPU;
171}
172
173#else /* CONFIG_X86_32 */
174
175extern void finit(void);
176
177static inline void tolerant_fwait(void)
178{
179 asm volatile("fnclex ; fwait");
180}
181
182static inline void restore_fpu(struct task_struct *tsk)
183{
184 if (task_thread_info(tsk)->status & TS_XSAVE) {
185 xrstor_checking(&tsk->thread.xstate->xsave);
186 return;
187 }
188 /*
189 * The "nop" is needed to make the instructions the same
190 * length.
191 */
192 alternative_input(
193 "nop ; frstor %1",
194 "fxrstor %1",
195 X86_FEATURE_FXSR,
196 "m" (tsk->thread.xstate->fxsave));
197}
198
199/* We need a safe address that is cheap to find and that is already
200 in L1 during context switch. The best choices are unfortunately
201 different for UP and SMP */
202#ifdef CONFIG_SMP
203#define safe_address (__per_cpu_offset[0])
204#else
205#define safe_address (kstat_cpu(0).cpustat.user)
206#endif
207
208/*
209 * These must be called with preempt disabled
210 */
211static inline void __save_init_fpu(struct task_struct *tsk)
212{
213 if (task_thread_info(tsk)->status & TS_XSAVE) {
214 struct xsave_struct *xstate = &tsk->thread.xstate->xsave;
215 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
216
217 xsave(tsk);
218
219 /*
220 * xsave header may indicate the init state of the FP.
221 */
222 if (!(xstate->xsave_hdr.xstate_bv & XSTATE_FP))
223 goto end;
224
225 if (unlikely(fx->swd & X87_FSW_ES))
226 asm volatile("fnclex");
227
228 /*
229 * we can do a simple return here or be paranoid :)
230 */
231 goto clear_state;
232 }
233
234 /* Use more nops than strictly needed in case the compiler
235 varies code */
236 alternative_input(
237 "fnsave %[fx] ;fwait;" GENERIC_NOP8 GENERIC_NOP4,
238 "fxsave %[fx]\n"
239 "bt $7,%[fsw] ; jnc 1f ; fnclex\n1:",
240 X86_FEATURE_FXSR,
241 [fx] "m" (tsk->thread.xstate->fxsave),
242 [fsw] "m" (tsk->thread.xstate->fxsave.swd) : "memory");
243clear_state:
244 /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
245 is pending. Clear the x87 state here by setting it to fixed
246 values. safe_address is a random variable that should be in L1 */
247 alternative_input(
248 GENERIC_NOP8 GENERIC_NOP2,
249 "emms\n\t" /* clear stack tags */
250 "fildl %[addr]", /* set F?P to defined value */
251 X86_FEATURE_FXSAVE_LEAK,
252 [addr] "m" (safe_address));
253end:
254 task_thread_info(tsk)->status &= ~TS_USEDFPU;
255}
256
257#endif /* CONFIG_X86_64 */
258
259/*
260 * Signal frame handlers...
261 */
262extern int save_i387_xstate(void __user *buf);
263extern int restore_i387_xstate(void __user *buf);
264
265static inline void __unlazy_fpu(struct task_struct *tsk)
266{
267 if (task_thread_info(tsk)->status & TS_USEDFPU) {
268 __save_init_fpu(tsk);
269 stts();
270 } else
271 tsk->fpu_counter = 0;
272}
273
274static inline void __clear_fpu(struct task_struct *tsk)
275{
276 if (task_thread_info(tsk)->status & TS_USEDFPU) {
277 tolerant_fwait();
278 task_thread_info(tsk)->status &= ~TS_USEDFPU;
279 stts();
280 }
281}
282
283static inline void kernel_fpu_begin(void)
284{
285 struct thread_info *me = current_thread_info();
286 preempt_disable();
287 if (me->status & TS_USEDFPU)
288 __save_init_fpu(me->task);
289 else
290 clts();
291}
292
293static inline void kernel_fpu_end(void)
294{
295 stts();
296 preempt_enable();
297}
298
299/*
300 * Some instructions like VIA's padlock instructions generate a spurious
301 * DNA fault but don't modify SSE registers. And these instructions
302 * get used from interrupt context aswell. To prevent these kernel instructions
303 * in interrupt context interact wrongly with other user/kernel fpu usage, we
304 * should use them only in the context of irq_ts_save/restore()
305 */
306static inline int irq_ts_save(void)
307{
308 /*
309 * If we are in process context, we are ok to take a spurious DNA fault.
310 * Otherwise, doing clts() in process context require pre-emption to
311 * be disabled or some heavy lifting like kernel_fpu_begin()
312 */
313 if (!in_interrupt())
314 return 0;
315
316 if (read_cr0() & X86_CR0_TS) {
317 clts();
318 return 1;
319 }
320
321 return 0;
322}
323
324static inline void irq_ts_restore(int TS_state)
325{
326 if (TS_state)
327 stts();
328}
329
330#ifdef CONFIG_X86_64
331
332static inline void save_init_fpu(struct task_struct *tsk)
333{
334 __save_init_fpu(tsk);
335 stts();
336}
337
338#define unlazy_fpu __unlazy_fpu
339#define clear_fpu __clear_fpu
340
341#else /* CONFIG_X86_32 */
342
343/*
344 * These disable preemption on their own and are safe
345 */
346static inline void save_init_fpu(struct task_struct *tsk)
347{
348 preempt_disable();
349 __save_init_fpu(tsk);
350 stts();
351 preempt_enable();
352}
353
354static inline void unlazy_fpu(struct task_struct *tsk)
355{
356 preempt_disable();
357 __unlazy_fpu(tsk);
358 preempt_enable();
359}
360
361static inline void clear_fpu(struct task_struct *tsk)
362{
363 preempt_disable();
364 __clear_fpu(tsk);
365 preempt_enable();
366}
367
368#endif /* CONFIG_X86_64 */
369
370/*
371 * i387 state interaction
372 */
373static inline unsigned short get_fpu_cwd(struct task_struct *tsk)
374{
375 if (cpu_has_fxsr) {
376 return tsk->thread.xstate->fxsave.cwd;
377 } else {
378 return (unsigned short)tsk->thread.xstate->fsave.cwd;
379 }
380}
381
382static inline unsigned short get_fpu_swd(struct task_struct *tsk)
383{
384 if (cpu_has_fxsr) {
385 return tsk->thread.xstate->fxsave.swd;
386 } else {
387 return (unsigned short)tsk->thread.xstate->fsave.swd;
388 }
389}
390
391static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk)
392{
393 if (cpu_has_xmm) {
394 return tsk->thread.xstate->fxsave.mxcsr;
395 } else {
396 return MXCSR_DEFAULT;
397 }
398}
399
400#endif /* ASM_X86__I387_H */
diff --git a/include/asm-x86/i8253.h b/include/asm-x86/i8253.h
deleted file mode 100644
index 15a5b530044e..000000000000
--- a/include/asm-x86/i8253.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_X86__I8253_H
2#define ASM_X86__I8253_H
3
4/* i8253A PIT registers */
5#define PIT_MODE 0x43
6#define PIT_CH0 0x40
7#define PIT_CH2 0x42
8
9extern spinlock_t i8253_lock;
10
11extern struct clock_event_device *global_clock_event;
12
13extern void setup_pit_timer(void);
14
15#define inb_pit inb_p
16#define outb_pit outb_p
17
18#endif /* ASM_X86__I8253_H */
diff --git a/include/asm-x86/i8259.h b/include/asm-x86/i8259.h
deleted file mode 100644
index 23c1b3baaecd..000000000000
--- a/include/asm-x86/i8259.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef ASM_X86__I8259_H
2#define ASM_X86__I8259_H
3
4#include <linux/delay.h>
5
6extern unsigned int cached_irq_mask;
7
8#define __byte(x, y) (((unsigned char *)&(y))[x])
9#define cached_master_mask (__byte(0, cached_irq_mask))
10#define cached_slave_mask (__byte(1, cached_irq_mask))
11
12/* i8259A PIC registers */
13#define PIC_MASTER_CMD 0x20
14#define PIC_MASTER_IMR 0x21
15#define PIC_MASTER_ISR PIC_MASTER_CMD
16#define PIC_MASTER_POLL PIC_MASTER_ISR
17#define PIC_MASTER_OCW3 PIC_MASTER_ISR
18#define PIC_SLAVE_CMD 0xa0
19#define PIC_SLAVE_IMR 0xa1
20
21/* i8259A PIC related value */
22#define PIC_CASCADE_IR 2
23#define MASTER_ICW4_DEFAULT 0x01
24#define SLAVE_ICW4_DEFAULT 0x01
25#define PIC_ICW4_AEOI 2
26
27extern spinlock_t i8259A_lock;
28
29extern void init_8259A(int auto_eoi);
30extern void enable_8259A_irq(unsigned int irq);
31extern void disable_8259A_irq(unsigned int irq);
32extern unsigned int startup_8259A_irq(unsigned int irq);
33
34/* the PIC may need a careful delay on some platforms, hence specific calls */
35static inline unsigned char inb_pic(unsigned int port)
36{
37 unsigned char value = inb(port);
38
39 /*
40 * delay for some accesses to PIC on motherboard or in chipset
41 * must be at least one microsecond, so be safe here:
42 */
43 udelay(2);
44
45 return value;
46}
47
48static inline void outb_pic(unsigned char value, unsigned int port)
49{
50 outb(value, port);
51 /*
52 * delay for some accesses to PIC on motherboard or in chipset
53 * must be at least one microsecond, so be safe here:
54 */
55 udelay(2);
56}
57
58extern struct irq_chip i8259A_chip;
59
60extern void mask_8259A(void);
61extern void unmask_8259A(void);
62
63#endif /* ASM_X86__I8259_H */
diff --git a/include/asm-x86/ia32.h b/include/asm-x86/ia32.h
deleted file mode 100644
index f932f7ad51dd..000000000000
--- a/include/asm-x86/ia32.h
+++ /dev/null
@@ -1,170 +0,0 @@
1#ifndef ASM_X86__IA32_H
2#define ASM_X86__IA32_H
3
4
5#ifdef CONFIG_IA32_EMULATION
6
7#include <linux/compat.h>
8
9/*
10 * 32 bit structures for IA32 support.
11 */
12
13#include <asm/sigcontext32.h>
14
15/* signal.h */
16struct sigaction32 {
17 unsigned int sa_handler; /* Really a pointer, but need to deal
18 with 32 bits */
19 unsigned int sa_flags;
20 unsigned int sa_restorer; /* Another 32 bit pointer */
21 compat_sigset_t sa_mask; /* A 32 bit mask */
22};
23
24struct old_sigaction32 {
25 unsigned int sa_handler; /* Really a pointer, but need to deal
26 with 32 bits */
27 compat_old_sigset_t sa_mask; /* A 32 bit mask */
28 unsigned int sa_flags;
29 unsigned int sa_restorer; /* Another 32 bit pointer */
30};
31
32typedef struct sigaltstack_ia32 {
33 unsigned int ss_sp;
34 int ss_flags;
35 unsigned int ss_size;
36} stack_ia32_t;
37
38struct ucontext_ia32 {
39 unsigned int uc_flags;
40 unsigned int uc_link;
41 stack_ia32_t uc_stack;
42 struct sigcontext_ia32 uc_mcontext;
43 compat_sigset_t uc_sigmask; /* mask last for extensibility */
44};
45
46/* This matches struct stat64 in glibc2.2, hence the absolutely
47 * insane amounts of padding around dev_t's.
48 */
49struct stat64 {
50 unsigned long long st_dev;
51 unsigned char __pad0[4];
52
53#define STAT64_HAS_BROKEN_ST_INO 1
54 unsigned int __st_ino;
55
56 unsigned int st_mode;
57 unsigned int st_nlink;
58
59 unsigned int st_uid;
60 unsigned int st_gid;
61
62 unsigned long long st_rdev;
63 unsigned char __pad3[4];
64
65 long long st_size;
66 unsigned int st_blksize;
67
68 long long st_blocks;/* Number 512-byte blocks allocated */
69
70 unsigned st_atime;
71 unsigned st_atime_nsec;
72 unsigned st_mtime;
73 unsigned st_mtime_nsec;
74 unsigned st_ctime;
75 unsigned st_ctime_nsec;
76
77 unsigned long long st_ino;
78} __attribute__((packed));
79
80typedef struct compat_siginfo {
81 int si_signo;
82 int si_errno;
83 int si_code;
84
85 union {
86 int _pad[((128 / sizeof(int)) - 3)];
87
88 /* kill() */
89 struct {
90 unsigned int _pid; /* sender's pid */
91 unsigned int _uid; /* sender's uid */
92 } _kill;
93
94 /* POSIX.1b timers */
95 struct {
96 compat_timer_t _tid; /* timer id */
97 int _overrun; /* overrun count */
98 compat_sigval_t _sigval; /* same as below */
99 int _sys_private; /* not to be passed to user */
100 int _overrun_incr; /* amount to add to overrun */
101 } _timer;
102
103 /* POSIX.1b signals */
104 struct {
105 unsigned int _pid; /* sender's pid */
106 unsigned int _uid; /* sender's uid */
107 compat_sigval_t _sigval;
108 } _rt;
109
110 /* SIGCHLD */
111 struct {
112 unsigned int _pid; /* which child */
113 unsigned int _uid; /* sender's uid */
114 int _status; /* exit code */
115 compat_clock_t _utime;
116 compat_clock_t _stime;
117 } _sigchld;
118
119 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
120 struct {
121 unsigned int _addr; /* faulting insn/memory ref. */
122 } _sigfault;
123
124 /* SIGPOLL */
125 struct {
126 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
127 int _fd;
128 } _sigpoll;
129 } _sifields;
130} compat_siginfo_t;
131
132struct sigframe32 {
133 u32 pretcode;
134 int sig;
135 struct sigcontext_ia32 sc;
136 struct _fpstate_ia32 fpstate;
137 unsigned int extramask[_COMPAT_NSIG_WORDS-1];
138};
139
140struct rt_sigframe32 {
141 u32 pretcode;
142 int sig;
143 u32 pinfo;
144 u32 puc;
145 compat_siginfo_t info;
146 struct ucontext_ia32 uc;
147 struct _fpstate_ia32 fpstate;
148};
149
150struct ustat32 {
151 __u32 f_tfree;
152 compat_ino_t f_tinode;
153 char f_fname[6];
154 char f_fpack[6];
155};
156
157#define IA32_STACK_TOP IA32_PAGE_OFFSET
158
159#ifdef __KERNEL__
160struct linux_binprm;
161extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
162 unsigned long stack_top, int exec_stack);
163struct mm_struct;
164extern void ia32_pick_mmap_layout(struct mm_struct *mm);
165
166#endif
167
168#endif /* !CONFIG_IA32_SUPPORT */
169
170#endif /* ASM_X86__IA32_H */
diff --git a/include/asm-x86/ia32_unistd.h b/include/asm-x86/ia32_unistd.h
deleted file mode 100644
index dbd887d8a5a5..000000000000
--- a/include/asm-x86/ia32_unistd.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_X86__IA32_UNISTD_H
2#define ASM_X86__IA32_UNISTD_H
3
4/*
5 * This file contains the system call numbers of the ia32 port,
6 * this is for the kernel only.
7 * Only add syscalls here where some part of the kernel needs to know
8 * the number. This should be otherwise in sync with asm-x86/unistd_32.h. -AK
9 */
10
11#define __NR_ia32_restart_syscall 0
12#define __NR_ia32_exit 1
13#define __NR_ia32_read 3
14#define __NR_ia32_write 4
15#define __NR_ia32_sigreturn 119
16#define __NR_ia32_rt_sigreturn 173
17
18#endif /* ASM_X86__IA32_UNISTD_H */
diff --git a/include/asm-x86/idle.h b/include/asm-x86/idle.h
deleted file mode 100644
index baa3f783d27d..000000000000
--- a/include/asm-x86/idle.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef ASM_X86__IDLE_H
2#define ASM_X86__IDLE_H
3
4#define IDLE_START 1
5#define IDLE_END 2
6
7struct notifier_block;
8void idle_notifier_register(struct notifier_block *n);
9
10void enter_idle(void);
11void exit_idle(void);
12
13void c1e_remove_cpu(int cpu);
14
15#endif /* ASM_X86__IDLE_H */
diff --git a/include/asm-x86/intel_arch_perfmon.h b/include/asm-x86/intel_arch_perfmon.h
deleted file mode 100644
index 07c03c6c9a16..000000000000
--- a/include/asm-x86/intel_arch_perfmon.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef ASM_X86__INTEL_ARCH_PERFMON_H
2#define ASM_X86__INTEL_ARCH_PERFMON_H
3
4#define MSR_ARCH_PERFMON_PERFCTR0 0xc1
5#define MSR_ARCH_PERFMON_PERFCTR1 0xc2
6
7#define MSR_ARCH_PERFMON_EVENTSEL0 0x186
8#define MSR_ARCH_PERFMON_EVENTSEL1 0x187
9
10#define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22)
11#define ARCH_PERFMON_EVENTSEL_INT (1 << 20)
12#define ARCH_PERFMON_EVENTSEL_OS (1 << 17)
13#define ARCH_PERFMON_EVENTSEL_USR (1 << 16)
14
15#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c)
16#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8)
17#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX (0)
18#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT \
19 (1 << (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX))
20
21union cpuid10_eax {
22 struct {
23 unsigned int version_id:8;
24 unsigned int num_counters:8;
25 unsigned int bit_width:8;
26 unsigned int mask_length:8;
27 } split;
28 unsigned int full;
29};
30
31#endif /* ASM_X86__INTEL_ARCH_PERFMON_H */
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h
deleted file mode 100644
index a233f835e0b5..000000000000
--- a/include/asm-x86/io.h
+++ /dev/null
@@ -1,91 +0,0 @@
1#ifndef ASM_X86__IO_H
2#define ASM_X86__IO_H
3
4#define ARCH_HAS_IOREMAP_WC
5
6#include <linux/compiler.h>
7
8#define build_mmio_read(name, size, type, reg, barrier) \
9static inline type name(const volatile void __iomem *addr) \
10{ type ret; asm volatile("mov" size " %1,%0":reg (ret) \
11:"m" (*(volatile type __force *)addr) barrier); return ret; }
12
13#define build_mmio_write(name, size, type, reg, barrier) \
14static inline void name(type val, volatile void __iomem *addr) \
15{ asm volatile("mov" size " %0,%1": :reg (val), \
16"m" (*(volatile type __force *)addr) barrier); }
17
18build_mmio_read(readb, "b", unsigned char, "=q", :"memory")
19build_mmio_read(readw, "w", unsigned short, "=r", :"memory")
20build_mmio_read(readl, "l", unsigned int, "=r", :"memory")
21
22build_mmio_read(__readb, "b", unsigned char, "=q", )
23build_mmio_read(__readw, "w", unsigned short, "=r", )
24build_mmio_read(__readl, "l", unsigned int, "=r", )
25
26build_mmio_write(writeb, "b", unsigned char, "q", :"memory")
27build_mmio_write(writew, "w", unsigned short, "r", :"memory")
28build_mmio_write(writel, "l", unsigned int, "r", :"memory")
29
30build_mmio_write(__writeb, "b", unsigned char, "q", )
31build_mmio_write(__writew, "w", unsigned short, "r", )
32build_mmio_write(__writel, "l", unsigned int, "r", )
33
34#define readb_relaxed(a) __readb(a)
35#define readw_relaxed(a) __readw(a)
36#define readl_relaxed(a) __readl(a)
37#define __raw_readb __readb
38#define __raw_readw __readw
39#define __raw_readl __readl
40
41#define __raw_writeb __writeb
42#define __raw_writew __writew
43#define __raw_writel __writel
44
45#define mmiowb() barrier()
46
47#ifdef CONFIG_X86_64
48build_mmio_read(readq, "q", unsigned long, "=r", :"memory")
49build_mmio_read(__readq, "q", unsigned long, "=r", )
50build_mmio_write(writeq, "q", unsigned long, "r", :"memory")
51build_mmio_write(__writeq, "q", unsigned long, "r", )
52
53#define readq_relaxed(a) __readq(a)
54#define __raw_readq __readq
55#define __raw_writeq writeq
56
57/* Let people know we have them */
58#define readq readq
59#define writeq writeq
60#endif
61
62extern int iommu_bio_merge;
63
64#ifdef CONFIG_X86_32
65# include "io_32.h"
66#else
67# include "io_64.h"
68#endif
69
70extern void *xlate_dev_mem_ptr(unsigned long phys);
71extern void unxlate_dev_mem_ptr(unsigned long phys, void *addr);
72
73extern int ioremap_change_attr(unsigned long vaddr, unsigned long size,
74 unsigned long prot_val);
75extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size);
76
77/*
78 * early_ioremap() and early_iounmap() are for temporary early boot-time
79 * mappings, before the real ioremap() is functional.
80 * A boot-time mapping is currently limited to at most 16 pages.
81 */
82extern void early_ioremap_init(void);
83extern void early_ioremap_clear(void);
84extern void early_ioremap_reset(void);
85extern void *early_ioremap(unsigned long offset, unsigned long size);
86extern void *early_memremap(unsigned long offset, unsigned long size);
87extern void early_iounmap(void *addr, unsigned long size);
88extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
89
90
91#endif /* ASM_X86__IO_H */
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h
deleted file mode 100644
index 4f7d878bda18..000000000000
--- a/include/asm-x86/io_32.h
+++ /dev/null
@@ -1,284 +0,0 @@
1#ifndef ASM_X86__IO_32_H
2#define ASM_X86__IO_32_H
3
4#include <linux/string.h>
5#include <linux/compiler.h>
6
7/*
8 * This file contains the definitions for the x86 IO instructions
9 * inb/inw/inl/outb/outw/outl and the "string versions" of the same
10 * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing"
11 * versions of the single-IO instructions (inb_p/inw_p/..).
12 *
13 * This file is not meant to be obfuscating: it's just complicated
14 * to (a) handle it all in a way that makes gcc able to optimize it
15 * as well as possible and (b) trying to avoid writing the same thing
16 * over and over again with slight variations and possibly making a
17 * mistake somewhere.
18 */
19
20/*
21 * Thanks to James van Artsdalen for a better timing-fix than
22 * the two short jumps: using outb's to a nonexistent port seems
23 * to guarantee better timings even on fast machines.
24 *
25 * On the other hand, I'd like to be sure of a non-existent port:
26 * I feel a bit unsafe about using 0x80 (should be safe, though)
27 *
28 * Linus
29 */
30
31 /*
32 * Bit simplified and optimized by Jan Hubicka
33 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999.
34 *
35 * isa_memset_io, isa_memcpy_fromio, isa_memcpy_toio added,
36 * isa_read[wl] and isa_write[wl] fixed
37 * - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
38 */
39
40#define IO_SPACE_LIMIT 0xffff
41
42#define XQUAD_PORTIO_BASE 0xfe400000
43#define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */
44
45#ifdef __KERNEL__
46
47#include <asm-generic/iomap.h>
48
49#include <linux/vmalloc.h>
50
51/*
52 * Convert a virtual cached pointer to an uncached pointer
53 */
54#define xlate_dev_kmem_ptr(p) p
55
56/**
57 * virt_to_phys - map virtual addresses to physical
58 * @address: address to remap
59 *
60 * The returned physical address is the physical (CPU) mapping for
61 * the memory address given. It is only valid to use this function on
62 * addresses directly mapped or allocated via kmalloc.
63 *
64 * This function does not give bus mappings for DMA transfers. In
65 * almost all conceivable cases a device driver should not be using
66 * this function
67 */
68
69static inline unsigned long virt_to_phys(volatile void *address)
70{
71 return __pa(address);
72}
73
74/**
75 * phys_to_virt - map physical address to virtual
76 * @address: address to remap
77 *
78 * The returned virtual address is a current CPU mapping for
79 * the memory address given. It is only valid to use this function on
80 * addresses that have a kernel mapping
81 *
82 * This function does not handle bus mappings for DMA transfers. In
83 * almost all conceivable cases a device driver should not be using
84 * this function
85 */
86
87static inline void *phys_to_virt(unsigned long address)
88{
89 return __va(address);
90}
91
92/*
93 * Change "struct page" to physical address.
94 */
95#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
96
97/**
98 * ioremap - map bus memory into CPU space
99 * @offset: bus address of the memory
100 * @size: size of the resource to map
101 *
102 * ioremap performs a platform specific sequence of operations to
103 * make bus memory CPU accessible via the readb/readw/readl/writeb/
104 * writew/writel functions and the other mmio helpers. The returned
105 * address is not guaranteed to be usable directly as a virtual
106 * address.
107 *
108 * If the area you are trying to map is a PCI BAR you should have a
109 * look at pci_iomap().
110 */
111extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
112extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
113extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
114 unsigned long prot_val);
115
116/*
117 * The default ioremap() behavior is non-cached:
118 */
119static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
120{
121 return ioremap_nocache(offset, size);
122}
123
124extern void iounmap(volatile void __iomem *addr);
125
126/*
127 * ISA I/O bus memory addresses are 1:1 with the physical address.
128 */
129#define isa_virt_to_bus virt_to_phys
130#define isa_page_to_bus page_to_phys
131#define isa_bus_to_virt phys_to_virt
132
133/*
134 * However PCI ones are not necessarily 1:1 and therefore these interfaces
135 * are forbidden in portable PCI drivers.
136 *
137 * Allow them on x86 for legacy drivers, though.
138 */
139#define virt_to_bus virt_to_phys
140#define bus_to_virt phys_to_virt
141
142static inline void
143memset_io(volatile void __iomem *addr, unsigned char val, int count)
144{
145 memset((void __force *)addr, val, count);
146}
147
148static inline void
149memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
150{
151 __memcpy(dst, (const void __force *)src, count);
152}
153
154static inline void
155memcpy_toio(volatile void __iomem *dst, const void *src, int count)
156{
157 __memcpy((void __force *)dst, src, count);
158}
159
160/*
161 * ISA space is 'always mapped' on a typical x86 system, no need to
162 * explicitly ioremap() it. The fact that the ISA IO space is mapped
163 * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
164 * are physical addresses. The following constant pointer can be
165 * used as the IO-area pointer (it can be iounmapped as well, so the
166 * analogy with PCI is quite large):
167 */
168#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
169
170/*
171 * Cache management
172 *
173 * This needed for two cases
174 * 1. Out of order aware processors
175 * 2. Accidentally out of order processors (PPro errata #51)
176 */
177
178#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
179
180static inline void flush_write_buffers(void)
181{
182 asm volatile("lock; addl $0,0(%%esp)": : :"memory");
183}
184
185#else
186
187#define flush_write_buffers() do { } while (0)
188
189#endif
190
191#endif /* __KERNEL__ */
192
193extern void native_io_delay(void);
194
195extern int io_delay_type;
196extern void io_delay_init(void);
197
198#if defined(CONFIG_PARAVIRT)
199#include <asm/paravirt.h>
200#else
201
202static inline void slow_down_io(void)
203{
204 native_io_delay();
205#ifdef REALLY_SLOW_IO
206 native_io_delay();
207 native_io_delay();
208 native_io_delay();
209#endif
210}
211
212#endif
213
214#define __BUILDIO(bwl, bw, type) \
215static inline void out##bwl(unsigned type value, int port) \
216{ \
217 out##bwl##_local(value, port); \
218} \
219 \
220static inline unsigned type in##bwl(int port) \
221{ \
222 return in##bwl##_local(port); \
223}
224
225#define BUILDIO(bwl, bw, type) \
226static inline void out##bwl##_local(unsigned type value, int port) \
227{ \
228 asm volatile("out" #bwl " %" #bw "0, %w1" \
229 : : "a"(value), "Nd"(port)); \
230} \
231 \
232static inline unsigned type in##bwl##_local(int port) \
233{ \
234 unsigned type value; \
235 asm volatile("in" #bwl " %w1, %" #bw "0" \
236 : "=a"(value) : "Nd"(port)); \
237 return value; \
238} \
239 \
240static inline void out##bwl##_local_p(unsigned type value, int port) \
241{ \
242 out##bwl##_local(value, port); \
243 slow_down_io(); \
244} \
245 \
246static inline unsigned type in##bwl##_local_p(int port) \
247{ \
248 unsigned type value = in##bwl##_local(port); \
249 slow_down_io(); \
250 return value; \
251} \
252 \
253__BUILDIO(bwl, bw, type) \
254 \
255static inline void out##bwl##_p(unsigned type value, int port) \
256{ \
257 out##bwl(value, port); \
258 slow_down_io(); \
259} \
260 \
261static inline unsigned type in##bwl##_p(int port) \
262{ \
263 unsigned type value = in##bwl(port); \
264 slow_down_io(); \
265 return value; \
266} \
267 \
268static inline void outs##bwl(int port, const void *addr, unsigned long count) \
269{ \
270 asm volatile("rep; outs" #bwl \
271 : "+S"(addr), "+c"(count) : "d"(port)); \
272} \
273 \
274static inline void ins##bwl(int port, void *addr, unsigned long count) \
275{ \
276 asm volatile("rep; ins" #bwl \
277 : "+D"(addr), "+c"(count) : "d"(port)); \
278}
279
280BUILDIO(b, b, char)
281BUILDIO(w, w, short)
282BUILDIO(l, , int)
283
284#endif /* ASM_X86__IO_32_H */
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h
deleted file mode 100644
index ee6e086b7dfe..000000000000
--- a/include/asm-x86/io_64.h
+++ /dev/null
@@ -1,244 +0,0 @@
1#ifndef ASM_X86__IO_64_H
2#define ASM_X86__IO_64_H
3
4
5/*
6 * This file contains the definitions for the x86 IO instructions
7 * inb/inw/inl/outb/outw/outl and the "string versions" of the same
8 * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing"
9 * versions of the single-IO instructions (inb_p/inw_p/..).
10 *
11 * This file is not meant to be obfuscating: it's just complicated
12 * to (a) handle it all in a way that makes gcc able to optimize it
13 * as well as possible and (b) trying to avoid writing the same thing
14 * over and over again with slight variations and possibly making a
15 * mistake somewhere.
16 */
17
18/*
19 * Thanks to James van Artsdalen for a better timing-fix than
20 * the two short jumps: using outb's to a nonexistent port seems
21 * to guarantee better timings even on fast machines.
22 *
23 * On the other hand, I'd like to be sure of a non-existent port:
24 * I feel a bit unsafe about using 0x80 (should be safe, though)
25 *
26 * Linus
27 */
28
29 /*
30 * Bit simplified and optimized by Jan Hubicka
31 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999.
32 *
33 * isa_memset_io, isa_memcpy_fromio, isa_memcpy_toio added,
34 * isa_read[wl] and isa_write[wl] fixed
35 * - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
36 */
37
38extern void native_io_delay(void);
39
40extern int io_delay_type;
41extern void io_delay_init(void);
42
43#if defined(CONFIG_PARAVIRT)
44#include <asm/paravirt.h>
45#else
46
47static inline void slow_down_io(void)
48{
49 native_io_delay();
50#ifdef REALLY_SLOW_IO
51 native_io_delay();
52 native_io_delay();
53 native_io_delay();
54#endif
55}
56#endif
57
58/*
59 * Talk about misusing macros..
60 */
61#define __OUT1(s, x) \
62static inline void out##s(unsigned x value, unsigned short port) {
63
64#define __OUT2(s, s1, s2) \
65asm volatile ("out" #s " %" s1 "0,%" s2 "1"
66
67#ifndef REALLY_SLOW_IO
68#define REALLY_SLOW_IO
69#define UNSET_REALLY_SLOW_IO
70#endif
71
72#define __OUT(s, s1, x) \
73 __OUT1(s, x) __OUT2(s, s1, "w") : : "a" (value), "Nd" (port)); \
74 } \
75 __OUT1(s##_p, x) __OUT2(s, s1, "w") : : "a" (value), "Nd" (port)); \
76 slow_down_io(); \
77}
78
79#define __IN1(s) \
80static inline RETURN_TYPE in##s(unsigned short port) \
81{ \
82 RETURN_TYPE _v;
83
84#define __IN2(s, s1, s2) \
85 asm volatile ("in" #s " %" s2 "1,%" s1 "0"
86
87#define __IN(s, s1, i...) \
88 __IN1(s) __IN2(s, s1, "w") : "=a" (_v) : "Nd" (port), ##i); \
89 return _v; \
90 } \
91 __IN1(s##_p) __IN2(s, s1, "w") : "=a" (_v) : "Nd" (port), ##i); \
92 slow_down_io(); \
93 return _v; }
94
95#ifdef UNSET_REALLY_SLOW_IO
96#undef REALLY_SLOW_IO
97#endif
98
99#define __INS(s) \
100static inline void ins##s(unsigned short port, void *addr, \
101 unsigned long count) \
102{ \
103 asm volatile ("rep ; ins" #s \
104 : "=D" (addr), "=c" (count) \
105 : "d" (port), "0" (addr), "1" (count)); \
106}
107
108#define __OUTS(s) \
109static inline void outs##s(unsigned short port, const void *addr, \
110 unsigned long count) \
111{ \
112 asm volatile ("rep ; outs" #s \
113 : "=S" (addr), "=c" (count) \
114 : "d" (port), "0" (addr), "1" (count)); \
115}
116
117#define RETURN_TYPE unsigned char
118__IN(b, "")
119#undef RETURN_TYPE
120#define RETURN_TYPE unsigned short
121__IN(w, "")
122#undef RETURN_TYPE
123#define RETURN_TYPE unsigned int
124__IN(l, "")
125#undef RETURN_TYPE
126
127__OUT(b, "b", char)
128__OUT(w, "w", short)
129__OUT(l, , int)
130
131__INS(b)
132__INS(w)
133__INS(l)
134
135__OUTS(b)
136__OUTS(w)
137__OUTS(l)
138
139#define IO_SPACE_LIMIT 0xffff
140
141#if defined(__KERNEL__) && defined(__x86_64__)
142
143#include <linux/vmalloc.h>
144
145#ifndef __i386__
146/*
147 * Change virtual addresses to physical addresses and vv.
148 * These are pretty trivial
149 */
150static inline unsigned long virt_to_phys(volatile void *address)
151{
152 return __pa(address);
153}
154
155static inline void *phys_to_virt(unsigned long address)
156{
157 return __va(address);
158}
159#endif
160
161/*
162 * Change "struct page" to physical address.
163 */
164#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
165
166#include <asm-generic/iomap.h>
167
168/*
169 * This one maps high address device memory and turns off caching for that area.
170 * it's useful if some control registers are in such an area and write combining
171 * or read caching is not desirable:
172 */
173extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size);
174extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size);
175extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size,
176 unsigned long prot_val);
177
178/*
179 * The default ioremap() behavior is non-cached:
180 */
181static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
182{
183 return ioremap_nocache(offset, size);
184}
185
186extern void iounmap(volatile void __iomem *addr);
187
188extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
189
190/*
191 * ISA I/O bus memory addresses are 1:1 with the physical address.
192 */
193#define isa_virt_to_bus virt_to_phys
194#define isa_page_to_bus page_to_phys
195#define isa_bus_to_virt phys_to_virt
196
197/*
198 * However PCI ones are not necessarily 1:1 and therefore these interfaces
199 * are forbidden in portable PCI drivers.
200 *
201 * Allow them on x86 for legacy drivers, though.
202 */
203#define virt_to_bus virt_to_phys
204#define bus_to_virt phys_to_virt
205
206void __memcpy_fromio(void *, unsigned long, unsigned);
207void __memcpy_toio(unsigned long, const void *, unsigned);
208
209static inline void memcpy_fromio(void *to, const volatile void __iomem *from,
210 unsigned len)
211{
212 __memcpy_fromio(to, (unsigned long)from, len);
213}
214
215static inline void memcpy_toio(volatile void __iomem *to, const void *from,
216 unsigned len)
217{
218 __memcpy_toio((unsigned long)to, from, len);
219}
220
221void memset_io(volatile void __iomem *a, int b, size_t c);
222
223/*
224 * ISA space is 'always mapped' on a typical x86 system, no need to
225 * explicitly ioremap() it. The fact that the ISA IO space is mapped
226 * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
227 * are physical addresses. The following constant pointer can be
228 * used as the IO-area pointer (it can be iounmapped as well, so the
229 * analogy with PCI is quite large):
230 */
231#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
232
233#define flush_write_buffers()
234
235#define BIO_VMERGE_BOUNDARY iommu_bio_merge
236
237/*
238 * Convert a virtual cached pointer to an uncached pointer
239 */
240#define xlate_dev_kmem_ptr(p) p
241
242#endif /* __KERNEL__ */
243
244#endif /* ASM_X86__IO_64_H */
diff --git a/include/asm-x86/io_apic.h b/include/asm-x86/io_apic.h
deleted file mode 100644
index 8ec68a50cf10..000000000000
--- a/include/asm-x86/io_apic.h
+++ /dev/null
@@ -1,212 +0,0 @@
1#ifndef ASM_X86__IO_APIC_H
2#define ASM_X86__IO_APIC_H
3
4#include <linux/types.h>
5#include <asm/mpspec.h>
6#include <asm/apicdef.h>
7
8/*
9 * Intel IO-APIC support for SMP and UP systems.
10 *
11 * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
12 */
13
14/* I/O Unit Redirection Table */
15#define IO_APIC_REDIR_VECTOR_MASK 0x000FF
16#define IO_APIC_REDIR_DEST_LOGICAL 0x00800
17#define IO_APIC_REDIR_DEST_PHYSICAL 0x00000
18#define IO_APIC_REDIR_SEND_PENDING (1 << 12)
19#define IO_APIC_REDIR_REMOTE_IRR (1 << 14)
20#define IO_APIC_REDIR_LEVEL_TRIGGER (1 << 15)
21#define IO_APIC_REDIR_MASKED (1 << 16)
22
23/*
24 * The structure of the IO-APIC:
25 */
26union IO_APIC_reg_00 {
27 u32 raw;
28 struct {
29 u32 __reserved_2 : 14,
30 LTS : 1,
31 delivery_type : 1,
32 __reserved_1 : 8,
33 ID : 8;
34 } __attribute__ ((packed)) bits;
35};
36
37union IO_APIC_reg_01 {
38 u32 raw;
39 struct {
40 u32 version : 8,
41 __reserved_2 : 7,
42 PRQ : 1,
43 entries : 8,
44 __reserved_1 : 8;
45 } __attribute__ ((packed)) bits;
46};
47
48union IO_APIC_reg_02 {
49 u32 raw;
50 struct {
51 u32 __reserved_2 : 24,
52 arbitration : 4,
53 __reserved_1 : 4;
54 } __attribute__ ((packed)) bits;
55};
56
57union IO_APIC_reg_03 {
58 u32 raw;
59 struct {
60 u32 boot_DT : 1,
61 __reserved_1 : 31;
62 } __attribute__ ((packed)) bits;
63};
64
65enum ioapic_irq_destination_types {
66 dest_Fixed = 0,
67 dest_LowestPrio = 1,
68 dest_SMI = 2,
69 dest__reserved_1 = 3,
70 dest_NMI = 4,
71 dest_INIT = 5,
72 dest__reserved_2 = 6,
73 dest_ExtINT = 7
74};
75
76struct IO_APIC_route_entry {
77 __u32 vector : 8,
78 delivery_mode : 3, /* 000: FIXED
79 * 001: lowest prio
80 * 111: ExtINT
81 */
82 dest_mode : 1, /* 0: physical, 1: logical */
83 delivery_status : 1,
84 polarity : 1,
85 irr : 1,
86 trigger : 1, /* 0: edge, 1: level */
87 mask : 1, /* 0: enabled, 1: disabled */
88 __reserved_2 : 15;
89
90#ifdef CONFIG_X86_32
91 union {
92 struct {
93 __u32 __reserved_1 : 24,
94 physical_dest : 4,
95 __reserved_2 : 4;
96 } physical;
97
98 struct {
99 __u32 __reserved_1 : 24,
100 logical_dest : 8;
101 } logical;
102 } dest;
103#else
104 __u32 __reserved_3 : 24,
105 dest : 8;
106#endif
107
108} __attribute__ ((packed));
109
110struct IR_IO_APIC_route_entry {
111 __u64 vector : 8,
112 zero : 3,
113 index2 : 1,
114 delivery_status : 1,
115 polarity : 1,
116 irr : 1,
117 trigger : 1,
118 mask : 1,
119 reserved : 31,
120 format : 1,
121 index : 15;
122} __attribute__ ((packed));
123
124#ifdef CONFIG_X86_IO_APIC
125
126/*
127 * # of IO-APICs and # of IRQ routing registers
128 */
129extern int nr_ioapics;
130extern int nr_ioapic_registers[MAX_IO_APICS];
131
132/*
133 * MP-BIOS irq configuration table structures:
134 */
135
136#define MP_MAX_IOAPIC_PIN 127
137
138struct mp_config_ioapic {
139 unsigned long mp_apicaddr;
140 unsigned int mp_apicid;
141 unsigned char mp_type;
142 unsigned char mp_apicver;
143 unsigned char mp_flags;
144};
145
146struct mp_config_intsrc {
147 unsigned int mp_dstapic;
148 unsigned char mp_type;
149 unsigned char mp_irqtype;
150 unsigned short mp_irqflag;
151 unsigned char mp_srcbus;
152 unsigned char mp_srcbusirq;
153 unsigned char mp_dstirq;
154};
155
156/* I/O APIC entries */
157extern struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];
158
159/* # of MP IRQ source entries */
160extern int mp_irq_entries;
161
162/* MP IRQ source entries */
163extern struct mp_config_intsrc mp_irqs[MAX_IRQ_SOURCES];
164
165/* non-0 if default (table-less) MP configuration */
166extern int mpc_default_type;
167
168/* Older SiS APIC requires we rewrite the index register */
169extern int sis_apic_bug;
170
171/* 1 if "noapic" boot option passed */
172extern int skip_ioapic_setup;
173
174/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
175extern int timer_through_8259;
176
177static inline void disable_ioapic_setup(void)
178{
179 skip_ioapic_setup = 1;
180}
181
182/*
183 * If we use the IO-APIC for IRQ routing, disable automatic
184 * assignment of PCI IRQ's.
185 */
186#define io_apic_assign_pci_irqs \
187 (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
188
189#ifdef CONFIG_ACPI
190extern int io_apic_get_unique_id(int ioapic, int apic_id);
191extern int io_apic_get_version(int ioapic);
192extern int io_apic_get_redir_entries(int ioapic);
193extern int io_apic_set_pci_routing(int ioapic, int pin, int irq,
194 int edge_level, int active_high_low);
195#endif /* CONFIG_ACPI */
196
197extern int (*ioapic_renumber_irq)(int ioapic, int irq);
198extern void ioapic_init_mappings(void);
199
200#ifdef CONFIG_X86_64
201extern int save_mask_IO_APIC_setup(void);
202extern void restore_IO_APIC_setup(void);
203extern void reinit_intr_remapped_IO_APIC(int);
204#endif
205
206#else /* !CONFIG_X86_IO_APIC */
207#define io_apic_assign_pci_irqs 0
208static const int timer_through_8259 = 0;
209static inline void ioapic_init_mappings(void) { }
210#endif
211
212#endif /* ASM_X86__IO_APIC_H */
diff --git a/include/asm-x86/ioctl.h b/include/asm-x86/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/include/asm-x86/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/include/asm-x86/ioctls.h b/include/asm-x86/ioctls.h
deleted file mode 100644
index 06752a649044..000000000000
--- a/include/asm-x86/ioctls.h
+++ /dev/null
@@ -1,94 +0,0 @@
1#ifndef ASM_X86__IOCTLS_H
2#define ASM_X86__IOCTLS_H
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS 0x5401
9#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
10#define TCSETSW 0x5403
11#define TCSETSF 0x5404
12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TCGETS2 _IOR('T', 0x2A, struct termios2)
51#define TCSETS2 _IOW('T', 0x2B, struct termios2)
52#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
53#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
54#define TIOCGRS485 0x542E
55#define TIOCSRS485 0x542F
56#define TIOCGPTN _IOR('T', 0x30, unsigned int)
57 /* Get Pty Number (of pty-mux device) */
58#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
59#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
60#define TCSETX 0x5433
61#define TCSETXF 0x5434
62#define TCSETXW 0x5435
63
64#define FIONCLEX 0x5450
65#define FIOCLEX 0x5451
66#define FIOASYNC 0x5452
67#define TIOCSERCONFIG 0x5453
68#define TIOCSERGWILD 0x5454
69#define TIOCSERSWILD 0x5455
70#define TIOCGLCKTRMIOS 0x5456
71#define TIOCSLCKTRMIOS 0x5457
72#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
73#define TIOCSERGETLSR 0x5459 /* Get line status register */
74#define TIOCSERGETMULTI 0x545A /* Get multiport config */
75#define TIOCSERSETMULTI 0x545B /* Set multiport config */
76
77#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
78#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
79#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
80#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
81#define FIOQSIZE 0x5460
82
83/* Used for packet mode */
84#define TIOCPKT_DATA 0
85#define TIOCPKT_FLUSHREAD 1
86#define TIOCPKT_FLUSHWRITE 2
87#define TIOCPKT_STOP 4
88#define TIOCPKT_START 8
89#define TIOCPKT_NOSTOP 16
90#define TIOCPKT_DOSTOP 32
91
92#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
93
94#endif /* ASM_X86__IOCTLS_H */
diff --git a/include/asm-x86/iommu.h b/include/asm-x86/iommu.h
deleted file mode 100644
index 546ad3110fea..000000000000
--- a/include/asm-x86/iommu.h
+++ /dev/null
@@ -1,46 +0,0 @@
1#ifndef ASM_X86__IOMMU_H
2#define ASM_X86__IOMMU_H
3
4extern void pci_iommu_shutdown(void);
5extern void no_iommu_init(void);
6extern struct dma_mapping_ops nommu_dma_ops;
7extern int force_iommu, no_iommu;
8extern int iommu_detected;
9extern int dmar_disabled;
10
11extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len);
12
13#ifdef CONFIG_GART_IOMMU
14extern int gart_iommu_aperture;
15extern int gart_iommu_aperture_allowed;
16extern int gart_iommu_aperture_disabled;
17
18extern void early_gart_iommu_check(void);
19extern void gart_iommu_init(void);
20extern void gart_iommu_shutdown(void);
21extern void __init gart_parse_options(char *);
22extern void gart_iommu_hole_init(void);
23
24#else
25#define gart_iommu_aperture 0
26#define gart_iommu_aperture_allowed 0
27#define gart_iommu_aperture_disabled 1
28
29static inline void early_gart_iommu_check(void)
30{
31}
32static inline void gart_iommu_init(void)
33{
34}
35static inline void gart_iommu_shutdown(void)
36{
37}
38static inline void gart_parse_options(char *options)
39{
40}
41static inline void gart_iommu_hole_init(void)
42{
43}
44#endif
45
46#endif /* ASM_X86__IOMMU_H */
diff --git a/include/asm-x86/ipcbuf.h b/include/asm-x86/ipcbuf.h
deleted file mode 100644
index 910304fbdc8f..000000000000
--- a/include/asm-x86/ipcbuf.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef ASM_X86__IPCBUF_H
2#define ASM_X86__IPCBUF_H
3
4/*
5 * The ipc64_perm structure for x86 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm {
15 __kernel_key_t key;
16 __kernel_uid32_t uid;
17 __kernel_gid32_t gid;
18 __kernel_uid32_t cuid;
19 __kernel_gid32_t cgid;
20 __kernel_mode_t mode;
21 unsigned short __pad1;
22 unsigned short seq;
23 unsigned short __pad2;
24 unsigned long __unused1;
25 unsigned long __unused2;
26};
27
28#endif /* ASM_X86__IPCBUF_H */
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h
deleted file mode 100644
index 30a692cfaff8..000000000000
--- a/include/asm-x86/ipi.h
+++ /dev/null
@@ -1,138 +0,0 @@
1#ifndef ASM_X86__IPI_H
2#define ASM_X86__IPI_H
3
4/*
5 * Copyright 2004 James Cleverdon, IBM.
6 * Subject to the GNU Public License, v.2
7 *
8 * Generic APIC InterProcessor Interrupt code.
9 *
10 * Moved to include file by James Cleverdon from
11 * arch/x86-64/kernel/smp.c
12 *
13 * Copyrights from kernel/smp.c:
14 *
15 * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
16 * (c) 1998-99, 2000 Ingo Molnar <mingo@redhat.com>
17 * (c) 2002,2003 Andi Kleen, SuSE Labs.
18 * Subject to the GNU Public License, v.2
19 */
20
21#include <asm/hw_irq.h>
22#include <asm/apic.h>
23#include <asm/smp.h>
24
25/*
26 * the following functions deal with sending IPIs between CPUs.
27 *
28 * We use 'broadcast', CPU->CPU IPIs and self-IPIs too.
29 */
30
31static inline unsigned int __prepare_ICR(unsigned int shortcut, int vector,
32 unsigned int dest)
33{
34 unsigned int icr = shortcut | dest;
35
36 switch (vector) {
37 default:
38 icr |= APIC_DM_FIXED | vector;
39 break;
40 case NMI_VECTOR:
41 icr |= APIC_DM_NMI;
42 break;
43 }
44 return icr;
45}
46
47static inline int __prepare_ICR2(unsigned int mask)
48{
49 return SET_APIC_DEST_FIELD(mask);
50}
51
52static inline void __xapic_wait_icr_idle(void)
53{
54 while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
55 cpu_relax();
56}
57
58static inline void __send_IPI_shortcut(unsigned int shortcut, int vector,
59 unsigned int dest)
60{
61 /*
62 * Subtle. In the case of the 'never do double writes' workaround
63 * we have to lock out interrupts to be safe. As we don't care
64 * of the value read we use an atomic rmw access to avoid costly
65 * cli/sti. Otherwise we use an even cheaper single atomic write
66 * to the APIC.
67 */
68 unsigned int cfg;
69
70 /*
71 * Wait for idle.
72 */
73 __xapic_wait_icr_idle();
74
75 /*
76 * No need to touch the target chip field
77 */
78 cfg = __prepare_ICR(shortcut, vector, dest);
79
80 /*
81 * Send the IPI. The write to APIC_ICR fires this off.
82 */
83 native_apic_mem_write(APIC_ICR, cfg);
84}
85
86/*
87 * This is used to send an IPI with no shorthand notation (the destination is
88 * specified in bits 56 to 63 of the ICR).
89 */
90static inline void __send_IPI_dest_field(unsigned int mask, int vector,
91 unsigned int dest)
92{
93 unsigned long cfg;
94
95 /*
96 * Wait for idle.
97 */
98 if (unlikely(vector == NMI_VECTOR))
99 safe_apic_wait_icr_idle();
100 else
101 __xapic_wait_icr_idle();
102
103 /*
104 * prepare target chip field
105 */
106 cfg = __prepare_ICR2(mask);
107 native_apic_mem_write(APIC_ICR2, cfg);
108
109 /*
110 * program the ICR
111 */
112 cfg = __prepare_ICR(0, vector, dest);
113
114 /*
115 * Send the IPI. The write to APIC_ICR fires this off.
116 */
117 native_apic_mem_write(APIC_ICR, cfg);
118}
119
120static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
121{
122 unsigned long flags;
123 unsigned long query_cpu;
124
125 /*
126 * Hack. The clustered APIC addressing mode doesn't allow us to send
127 * to an arbitrary mask, so I do a unicast to each CPU instead.
128 * - mbligh
129 */
130 local_irq_save(flags);
131 for_each_cpu_mask_nr(query_cpu, mask) {
132 __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu),
133 vector, APIC_DEST_PHYSICAL);
134 }
135 local_irq_restore(flags);
136}
137
138#endif /* ASM_X86__IPI_H */
diff --git a/include/asm-x86/irq.h b/include/asm-x86/irq.h
deleted file mode 100644
index 1e5f2909c1db..000000000000
--- a/include/asm-x86/irq.h
+++ /dev/null
@@ -1,50 +0,0 @@
1#ifndef ASM_X86__IRQ_H
2#define ASM_X86__IRQ_H
3/*
4 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
5 *
6 * IRQ/IPI changes taken from work by Thomas Radke
7 * <tomsoft@informatik.tu-chemnitz.de>
8 */
9
10#include <asm/apicdef.h>
11#include <asm/irq_vectors.h>
12
13static inline int irq_canonicalize(int irq)
14{
15 return ((irq == 2) ? 9 : irq);
16}
17
18#ifdef CONFIG_X86_LOCAL_APIC
19# define ARCH_HAS_NMI_WATCHDOG
20#endif
21
22#ifdef CONFIG_4KSTACKS
23 extern void irq_ctx_init(int cpu);
24 extern void irq_ctx_exit(int cpu);
25# define __ARCH_HAS_DO_SOFTIRQ
26#else
27# define irq_ctx_init(cpu) do { } while (0)
28# define irq_ctx_exit(cpu) do { } while (0)
29# ifdef CONFIG_X86_64
30# define __ARCH_HAS_DO_SOFTIRQ
31# endif
32#endif
33
34#ifdef CONFIG_IRQBALANCE
35extern int irqbalance_disable(char *str);
36#endif
37
38#ifdef CONFIG_HOTPLUG_CPU
39#include <linux/cpumask.h>
40extern void fixup_irqs(cpumask_t map);
41#endif
42
43extern unsigned int do_IRQ(struct pt_regs *regs);
44extern void init_IRQ(void);
45extern void native_init_IRQ(void);
46
47/* Interrupt vector management */
48extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
49
50#endif /* ASM_X86__IRQ_H */
diff --git a/include/asm-x86/irq_regs.h b/include/asm-x86/irq_regs.h
deleted file mode 100644
index 89c898ab298b..000000000000
--- a/include/asm-x86/irq_regs.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "irq_regs_32.h"
3#else
4# include "irq_regs_64.h"
5#endif
diff --git a/include/asm-x86/irq_regs_32.h b/include/asm-x86/irq_regs_32.h
deleted file mode 100644
index 316a3b258871..000000000000
--- a/include/asm-x86/irq_regs_32.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Per-cpu current frame pointer - the location of the last exception frame on
3 * the stack, stored in the per-cpu area.
4 *
5 * Jeremy Fitzhardinge <jeremy@goop.org>
6 */
7#ifndef ASM_X86__IRQ_REGS_32_H
8#define ASM_X86__IRQ_REGS_32_H
9
10#include <asm/percpu.h>
11
12DECLARE_PER_CPU(struct pt_regs *, irq_regs);
13
14static inline struct pt_regs *get_irq_regs(void)
15{
16 return x86_read_percpu(irq_regs);
17}
18
19static inline struct pt_regs *set_irq_regs(struct pt_regs *new_regs)
20{
21 struct pt_regs *old_regs;
22
23 old_regs = get_irq_regs();
24 x86_write_percpu(irq_regs, new_regs);
25
26 return old_regs;
27}
28
29#endif /* ASM_X86__IRQ_REGS_32_H */
diff --git a/include/asm-x86/irq_regs_64.h b/include/asm-x86/irq_regs_64.h
deleted file mode 100644
index 3dd9c0b70270..000000000000
--- a/include/asm-x86/irq_regs_64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/irq_regs.h>
diff --git a/include/asm-x86/irq_remapping.h b/include/asm-x86/irq_remapping.h
deleted file mode 100644
index 78242c6ffa58..000000000000
--- a/include/asm-x86/irq_remapping.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASM_IRQ_REMAPPING_H
2#define _ASM_IRQ_REMAPPING_H
3
4extern int x2apic;
5
6#define IRTE_DEST(dest) ((x2apic) ? dest : dest << 8)
7
8#endif
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h
deleted file mode 100644
index c5d2d767a1f3..000000000000
--- a/include/asm-x86/irq_vectors.h
+++ /dev/null
@@ -1,182 +0,0 @@
1#ifndef ASM_X86__IRQ_VECTORS_H
2#define ASM_X86__IRQ_VECTORS_H
3
4#include <linux/threads.h>
5
6#define NMI_VECTOR 0x02
7
8/*
9 * IDT vectors usable for external interrupt sources start
10 * at 0x20:
11 */
12#define FIRST_EXTERNAL_VECTOR 0x20
13
14#ifdef CONFIG_X86_32
15# define SYSCALL_VECTOR 0x80
16#else
17# define IA32_SYSCALL_VECTOR 0x80
18#endif
19
20/*
21 * Reserve the lowest usable priority level 0x20 - 0x2f for triggering
22 * cleanup after irq migration on 64 bit.
23 */
24#define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR
25
26/*
27 * Vectors 0x20-0x2f are used for ISA interrupts on 32 bit.
28 * Vectors 0x30-0x3f are used for ISA interrupts on 64 bit.
29 */
30#ifdef CONFIG_X86_32
31#define IRQ0_VECTOR (FIRST_EXTERNAL_VECTOR)
32#else
33#define IRQ0_VECTOR (FIRST_EXTERNAL_VECTOR + 0x10)
34#endif
35#define IRQ1_VECTOR (IRQ0_VECTOR + 1)
36#define IRQ2_VECTOR (IRQ0_VECTOR + 2)
37#define IRQ3_VECTOR (IRQ0_VECTOR + 3)
38#define IRQ4_VECTOR (IRQ0_VECTOR + 4)
39#define IRQ5_VECTOR (IRQ0_VECTOR + 5)
40#define IRQ6_VECTOR (IRQ0_VECTOR + 6)
41#define IRQ7_VECTOR (IRQ0_VECTOR + 7)
42#define IRQ8_VECTOR (IRQ0_VECTOR + 8)
43#define IRQ9_VECTOR (IRQ0_VECTOR + 9)
44#define IRQ10_VECTOR (IRQ0_VECTOR + 10)
45#define IRQ11_VECTOR (IRQ0_VECTOR + 11)
46#define IRQ12_VECTOR (IRQ0_VECTOR + 12)
47#define IRQ13_VECTOR (IRQ0_VECTOR + 13)
48#define IRQ14_VECTOR (IRQ0_VECTOR + 14)
49#define IRQ15_VECTOR (IRQ0_VECTOR + 15)
50
51/*
52 * Special IRQ vectors used by the SMP architecture, 0xf0-0xff
53 *
54 * some of the following vectors are 'rare', they are merged
55 * into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
56 * TLB, reschedule and local APIC vectors are performance-critical.
57 *
58 * Vectors 0xf0-0xfa are free (reserved for future Linux use).
59 */
60#ifdef CONFIG_X86_32
61
62# define SPURIOUS_APIC_VECTOR 0xff
63# define ERROR_APIC_VECTOR 0xfe
64# define INVALIDATE_TLB_VECTOR 0xfd
65# define RESCHEDULE_VECTOR 0xfc
66# define CALL_FUNCTION_VECTOR 0xfb
67# define CALL_FUNCTION_SINGLE_VECTOR 0xfa
68# define THERMAL_APIC_VECTOR 0xf0
69
70#else
71
72#define SPURIOUS_APIC_VECTOR 0xff
73#define ERROR_APIC_VECTOR 0xfe
74#define RESCHEDULE_VECTOR 0xfd
75#define CALL_FUNCTION_VECTOR 0xfc
76#define CALL_FUNCTION_SINGLE_VECTOR 0xfb
77#define THERMAL_APIC_VECTOR 0xfa
78#define THRESHOLD_APIC_VECTOR 0xf9
79#define UV_BAU_MESSAGE 0xf8
80#define INVALIDATE_TLB_VECTOR_END 0xf7
81#define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */
82
83#define NUM_INVALIDATE_TLB_VECTORS 8
84
85#endif
86
87/*
88 * Local APIC timer IRQ vector is on a different priority level,
89 * to work around the 'lost local interrupt if more than 2 IRQ
90 * sources per level' errata.
91 */
92#define LOCAL_TIMER_VECTOR 0xef
93
94/*
95 * First APIC vector available to drivers: (vectors 0x30-0xee) we
96 * start at 0x31(0x41) to spread out vectors evenly between priority
97 * levels. (0x80 is the syscall vector)
98 */
99#ifdef CONFIG_X86_32
100# define FIRST_DEVICE_VECTOR 0x31
101#else
102# define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2)
103#endif
104
105#define NR_VECTORS 256
106
107#define FPU_IRQ 13
108
109#define FIRST_VM86_IRQ 3
110#define LAST_VM86_IRQ 15
111#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
112
113#ifdef CONFIG_X86_64
114# if NR_CPUS < MAX_IO_APICS
115# define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
116# else
117# define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
118# endif
119# define NR_IRQ_VECTORS NR_IRQS
120
121#elif !defined(CONFIG_X86_VOYAGER)
122
123# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
124
125# define NR_IRQS 224
126
127# if (224 >= 32 * NR_CPUS)
128# define NR_IRQ_VECTORS NR_IRQS
129# else
130# define NR_IRQ_VECTORS (32 * NR_CPUS)
131# endif
132
133# else /* IO_APIC || PARAVIRT */
134
135# define NR_IRQS 16
136# define NR_IRQ_VECTORS NR_IRQS
137
138# endif
139
140#else /* !VISWS && !VOYAGER */
141
142# define NR_IRQS 224
143# define NR_IRQ_VECTORS NR_IRQS
144
145#endif /* VISWS */
146
147/* Voyager specific defines */
148/* These define the CPIs we use in linux */
149#define VIC_CPI_LEVEL0 0
150#define VIC_CPI_LEVEL1 1
151/* now the fake CPIs */
152#define VIC_TIMER_CPI 2
153#define VIC_INVALIDATE_CPI 3
154#define VIC_RESCHEDULE_CPI 4
155#define VIC_ENABLE_IRQ_CPI 5
156#define VIC_CALL_FUNCTION_CPI 6
157#define VIC_CALL_FUNCTION_SINGLE_CPI 7
158
159/* Now the QIC CPIs: Since we don't need the two initial levels,
160 * these are 2 less than the VIC CPIs */
161#define QIC_CPI_OFFSET 1
162#define QIC_TIMER_CPI (VIC_TIMER_CPI - QIC_CPI_OFFSET)
163#define QIC_INVALIDATE_CPI (VIC_INVALIDATE_CPI - QIC_CPI_OFFSET)
164#define QIC_RESCHEDULE_CPI (VIC_RESCHEDULE_CPI - QIC_CPI_OFFSET)
165#define QIC_ENABLE_IRQ_CPI (VIC_ENABLE_IRQ_CPI - QIC_CPI_OFFSET)
166#define QIC_CALL_FUNCTION_CPI (VIC_CALL_FUNCTION_CPI - QIC_CPI_OFFSET)
167#define QIC_CALL_FUNCTION_SINGLE_CPI (VIC_CALL_FUNCTION_SINGLE_CPI - QIC_CPI_OFFSET)
168
169#define VIC_START_FAKE_CPI VIC_TIMER_CPI
170#define VIC_END_FAKE_CPI VIC_CALL_FUNCTION_SINGLE_CPI
171
172/* this is the SYS_INT CPI. */
173#define VIC_SYS_INT 8
174#define VIC_CMN_INT 15
175
176/* This is the boot CPI for alternate processors. It gets overwritten
177 * by the above once the system has activated all available processors */
178#define VIC_CPU_BOOT_CPI VIC_CPI_LEVEL0
179#define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8)
180
181
182#endif /* ASM_X86__IRQ_VECTORS_H */
diff --git a/include/asm-x86/irqflags.h b/include/asm-x86/irqflags.h
deleted file mode 100644
index 2bdab21f0898..000000000000
--- a/include/asm-x86/irqflags.h
+++ /dev/null
@@ -1,211 +0,0 @@
1#ifndef _X86_IRQFLAGS_H_
2#define _X86_IRQFLAGS_H_
3
4#include <asm/processor-flags.h>
5
6#ifndef __ASSEMBLY__
7/*
8 * Interrupt control:
9 */
10
11static inline unsigned long native_save_fl(void)
12{
13 unsigned long flags;
14
15 asm volatile("# __raw_save_flags\n\t"
16 "pushf ; pop %0"
17 : "=g" (flags)
18 : /* no input */
19 : "memory");
20
21 return flags;
22}
23
24static inline void native_restore_fl(unsigned long flags)
25{
26 asm volatile("push %0 ; popf"
27 : /* no output */
28 :"g" (flags)
29 :"memory", "cc");
30}
31
32static inline void native_irq_disable(void)
33{
34 asm volatile("cli": : :"memory");
35}
36
37static inline void native_irq_enable(void)
38{
39 asm volatile("sti": : :"memory");
40}
41
42static inline void native_safe_halt(void)
43{
44 asm volatile("sti; hlt": : :"memory");
45}
46
47static inline void native_halt(void)
48{
49 asm volatile("hlt": : :"memory");
50}
51
52#endif
53
54#ifdef CONFIG_PARAVIRT
55#include <asm/paravirt.h>
56#else
57#ifndef __ASSEMBLY__
58
59static inline unsigned long __raw_local_save_flags(void)
60{
61 return native_save_fl();
62}
63
64static inline void raw_local_irq_restore(unsigned long flags)
65{
66 native_restore_fl(flags);
67}
68
69static inline void raw_local_irq_disable(void)
70{
71 native_irq_disable();
72}
73
74static inline void raw_local_irq_enable(void)
75{
76 native_irq_enable();
77}
78
79/*
80 * Used in the idle loop; sti takes one instruction cycle
81 * to complete:
82 */
83static inline void raw_safe_halt(void)
84{
85 native_safe_halt();
86}
87
88/*
89 * Used when interrupts are already enabled or to
90 * shutdown the processor:
91 */
92static inline void halt(void)
93{
94 native_halt();
95}
96
97/*
98 * For spinlocks, etc:
99 */
100static inline unsigned long __raw_local_irq_save(void)
101{
102 unsigned long flags = __raw_local_save_flags();
103
104 raw_local_irq_disable();
105
106 return flags;
107}
108#else
109
110#define ENABLE_INTERRUPTS(x) sti
111#define DISABLE_INTERRUPTS(x) cli
112
113#ifdef CONFIG_X86_64
114#define SWAPGS swapgs
115/*
116 * Currently paravirt can't handle swapgs nicely when we
117 * don't have a stack we can rely on (such as a user space
118 * stack). So we either find a way around these or just fault
119 * and emulate if a guest tries to call swapgs directly.
120 *
121 * Either way, this is a good way to document that we don't
122 * have a reliable stack. x86_64 only.
123 */
124#define SWAPGS_UNSAFE_STACK swapgs
125
126#define PARAVIRT_ADJUST_EXCEPTION_FRAME /* */
127
128#define INTERRUPT_RETURN iretq
129#define USERGS_SYSRET64 \
130 swapgs; \
131 sysretq;
132#define USERGS_SYSRET32 \
133 swapgs; \
134 sysretl
135#define ENABLE_INTERRUPTS_SYSEXIT32 \
136 swapgs; \
137 sti; \
138 sysexit
139
140#else
141#define INTERRUPT_RETURN iret
142#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
143#define GET_CR0_INTO_EAX movl %cr0, %eax
144#endif
145
146
147#endif /* __ASSEMBLY__ */
148#endif /* CONFIG_PARAVIRT */
149
150#ifndef __ASSEMBLY__
151#define raw_local_save_flags(flags) \
152 do { (flags) = __raw_local_save_flags(); } while (0)
153
154#define raw_local_irq_save(flags) \
155 do { (flags) = __raw_local_irq_save(); } while (0)
156
157static inline int raw_irqs_disabled_flags(unsigned long flags)
158{
159 return !(flags & X86_EFLAGS_IF);
160}
161
162static inline int raw_irqs_disabled(void)
163{
164 unsigned long flags = __raw_local_save_flags();
165
166 return raw_irqs_disabled_flags(flags);
167}
168
169#else
170
171#ifdef CONFIG_X86_64
172#define ARCH_LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk
173#define ARCH_LOCKDEP_SYS_EXIT_IRQ \
174 TRACE_IRQS_ON; \
175 sti; \
176 SAVE_REST; \
177 LOCKDEP_SYS_EXIT; \
178 RESTORE_REST; \
179 cli; \
180 TRACE_IRQS_OFF;
181
182#else
183#define ARCH_LOCKDEP_SYS_EXIT \
184 pushl %eax; \
185 pushl %ecx; \
186 pushl %edx; \
187 call lockdep_sys_exit; \
188 popl %edx; \
189 popl %ecx; \
190 popl %eax;
191
192#define ARCH_LOCKDEP_SYS_EXIT_IRQ
193#endif
194
195#ifdef CONFIG_TRACE_IRQFLAGS
196# define TRACE_IRQS_ON call trace_hardirqs_on_thunk;
197# define TRACE_IRQS_OFF call trace_hardirqs_off_thunk;
198#else
199# define TRACE_IRQS_ON
200# define TRACE_IRQS_OFF
201#endif
202#ifdef CONFIG_DEBUG_LOCK_ALLOC
203# define LOCKDEP_SYS_EXIT ARCH_LOCKDEP_SYS_EXIT
204# define LOCKDEP_SYS_EXIT_IRQ ARCH_LOCKDEP_SYS_EXIT_IRQ
205# else
206# define LOCKDEP_SYS_EXIT
207# define LOCKDEP_SYS_EXIT_IRQ
208# endif
209
210#endif /* __ASSEMBLY__ */
211#endif
diff --git a/include/asm-x86/ist.h b/include/asm-x86/ist.h
deleted file mode 100644
index 35a2fe9bc921..000000000000
--- a/include/asm-x86/ist.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef ASM_X86__IST_H
2#define ASM_X86__IST_H
3
4/*
5 * Include file for the interface to IST BIOS
6 * Copyright 2002 Andy Grover <andrew.grover@intel.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
11 * later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 */
18
19
20#include <linux/types.h>
21
22struct ist_info {
23 __u32 signature;
24 __u32 command;
25 __u32 event;
26 __u32 perf_level;
27};
28
29#ifdef __KERNEL__
30
31extern struct ist_info ist_info;
32
33#endif /* __KERNEL__ */
34#endif /* ASM_X86__IST_H */
diff --git a/include/asm-x86/k8.h b/include/asm-x86/k8.h
deleted file mode 100644
index 2bbaf4370a55..000000000000
--- a/include/asm-x86/k8.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef ASM_X86__K8_H
2#define ASM_X86__K8_H
3
4#include <linux/pci.h>
5
6extern struct pci_device_id k8_nb_ids[];
7
8extern int early_is_k8_nb(u32 value);
9extern struct pci_dev **k8_northbridges;
10extern int num_k8_northbridges;
11extern int cache_k8_northbridges(void);
12extern void k8_flush_garts(void);
13extern int k8_scan_nodes(unsigned long start, unsigned long end);
14
15#endif /* ASM_X86__K8_H */
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
deleted file mode 100644
index fbbab66ee9df..000000000000
--- a/include/asm-x86/kdebug.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef ASM_X86__KDEBUG_H
2#define ASM_X86__KDEBUG_H
3
4#include <linux/notifier.h>
5
6struct pt_regs;
7
8/* Grossly misnamed. */
9enum die_val {
10 DIE_OOPS = 1,
11 DIE_INT3,
12 DIE_DEBUG,
13 DIE_PANIC,
14 DIE_NMI,
15 DIE_DIE,
16 DIE_NMIWATCHDOG,
17 DIE_KERNELDEBUG,
18 DIE_TRAP,
19 DIE_GPF,
20 DIE_CALL,
21 DIE_NMI_IPI,
22 DIE_PAGE_FAULT,
23 DIE_NMIUNKNOWN,
24};
25
26extern void printk_address(unsigned long address, int reliable);
27extern void die(const char *, struct pt_regs *,long);
28extern int __must_check __die(const char *, struct pt_regs *, long);
29extern void show_registers(struct pt_regs *regs);
30extern void show_trace(struct task_struct *t, struct pt_regs *regs,
31 unsigned long *sp, unsigned long bp);
32extern void __show_regs(struct pt_regs *regs, int all);
33extern void show_regs(struct pt_regs *regs);
34extern unsigned long oops_begin(void);
35extern void oops_end(unsigned long, struct pt_regs *, int signr);
36
37#endif /* ASM_X86__KDEBUG_H */
diff --git a/include/asm-x86/kexec.h b/include/asm-x86/kexec.h
deleted file mode 100644
index ea09600d6129..000000000000
--- a/include/asm-x86/kexec.h
+++ /dev/null
@@ -1,175 +0,0 @@
1#ifndef ASM_X86__KEXEC_H
2#define ASM_X86__KEXEC_H
3
4#ifdef CONFIG_X86_32
5# define PA_CONTROL_PAGE 0
6# define VA_CONTROL_PAGE 1
7# define PA_PGD 2
8# define VA_PGD 3
9# define PA_PTE_0 4
10# define VA_PTE_0 5
11# define PA_PTE_1 6
12# define VA_PTE_1 7
13# define PA_SWAP_PAGE 8
14# ifdef CONFIG_X86_PAE
15# define PA_PMD_0 9
16# define VA_PMD_0 10
17# define PA_PMD_1 11
18# define VA_PMD_1 12
19# define PAGES_NR 13
20# else
21# define PAGES_NR 9
22# endif
23#else
24# define PA_CONTROL_PAGE 0
25# define VA_CONTROL_PAGE 1
26# define PA_PGD 2
27# define VA_PGD 3
28# define PA_PUD_0 4
29# define VA_PUD_0 5
30# define PA_PMD_0 6
31# define VA_PMD_0 7
32# define PA_PTE_0 8
33# define VA_PTE_0 9
34# define PA_PUD_1 10
35# define VA_PUD_1 11
36# define PA_PMD_1 12
37# define VA_PMD_1 13
38# define PA_PTE_1 14
39# define VA_PTE_1 15
40# define PA_TABLE_PAGE 16
41# define PAGES_NR 17
42#endif
43
44#ifdef CONFIG_X86_32
45# define KEXEC_CONTROL_CODE_MAX_SIZE 2048
46#endif
47
48#ifndef __ASSEMBLY__
49
50#include <linux/string.h>
51
52#include <asm/page.h>
53#include <asm/ptrace.h>
54
55/*
56 * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
57 * I.e. Maximum page that is mapped directly into kernel memory,
58 * and kmap is not required.
59 *
60 * So far x86_64 is limited to 40 physical address bits.
61 */
62#ifdef CONFIG_X86_32
63/* Maximum physical address we can use pages from */
64# define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
65/* Maximum address we can reach in physical address mode */
66# define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
67/* Maximum address we can use for the control code buffer */
68# define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
69
70# define KEXEC_CONTROL_PAGE_SIZE 4096
71
72/* The native architecture */
73# define KEXEC_ARCH KEXEC_ARCH_386
74
75/* We can also handle crash dumps from 64 bit kernel. */
76# define vmcore_elf_check_arch_cross(x) ((x)->e_machine == EM_X86_64)
77#else
78/* Maximum physical address we can use pages from */
79# define KEXEC_SOURCE_MEMORY_LIMIT (0xFFFFFFFFFFUL)
80/* Maximum address we can reach in physical address mode */
81# define KEXEC_DESTINATION_MEMORY_LIMIT (0xFFFFFFFFFFUL)
82/* Maximum address we can use for the control pages */
83# define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL)
84
85/* Allocate one page for the pdp and the second for the code */
86# define KEXEC_CONTROL_PAGE_SIZE (4096UL + 4096UL)
87
88/* The native architecture */
89# define KEXEC_ARCH KEXEC_ARCH_X86_64
90#endif
91
92/*
93 * CPU does not save ss and sp on stack if execution is already
94 * running in kernel mode at the time of NMI occurrence. This code
95 * fixes it.
96 */
97static inline void crash_fixup_ss_esp(struct pt_regs *newregs,
98 struct pt_regs *oldregs)
99{
100#ifdef CONFIG_X86_32
101 newregs->sp = (unsigned long)&(oldregs->sp);
102 asm volatile("xorl %%eax, %%eax\n\t"
103 "movw %%ss, %%ax\n\t"
104 :"=a"(newregs->ss));
105#endif
106}
107
108/*
109 * This function is responsible for capturing register states if coming
110 * via panic otherwise just fix up the ss and sp if coming via kernel
111 * mode exception.
112 */
113static inline void crash_setup_regs(struct pt_regs *newregs,
114 struct pt_regs *oldregs)
115{
116 if (oldregs) {
117 memcpy(newregs, oldregs, sizeof(*newregs));
118 crash_fixup_ss_esp(newregs, oldregs);
119 } else {
120#ifdef CONFIG_X86_32
121 asm volatile("movl %%ebx,%0" : "=m"(newregs->bx));
122 asm volatile("movl %%ecx,%0" : "=m"(newregs->cx));
123 asm volatile("movl %%edx,%0" : "=m"(newregs->dx));
124 asm volatile("movl %%esi,%0" : "=m"(newregs->si));
125 asm volatile("movl %%edi,%0" : "=m"(newregs->di));
126 asm volatile("movl %%ebp,%0" : "=m"(newregs->bp));
127 asm volatile("movl %%eax,%0" : "=m"(newregs->ax));
128 asm volatile("movl %%esp,%0" : "=m"(newregs->sp));
129 asm volatile("movl %%ss, %%eax;" :"=a"(newregs->ss));
130 asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs));
131 asm volatile("movl %%ds, %%eax;" :"=a"(newregs->ds));
132 asm volatile("movl %%es, %%eax;" :"=a"(newregs->es));
133 asm volatile("pushfl; popl %0" :"=m"(newregs->flags));
134#else
135 asm volatile("movq %%rbx,%0" : "=m"(newregs->bx));
136 asm volatile("movq %%rcx,%0" : "=m"(newregs->cx));
137 asm volatile("movq %%rdx,%0" : "=m"(newregs->dx));
138 asm volatile("movq %%rsi,%0" : "=m"(newregs->si));
139 asm volatile("movq %%rdi,%0" : "=m"(newregs->di));
140 asm volatile("movq %%rbp,%0" : "=m"(newregs->bp));
141 asm volatile("movq %%rax,%0" : "=m"(newregs->ax));
142 asm volatile("movq %%rsp,%0" : "=m"(newregs->sp));
143 asm volatile("movq %%r8,%0" : "=m"(newregs->r8));
144 asm volatile("movq %%r9,%0" : "=m"(newregs->r9));
145 asm volatile("movq %%r10,%0" : "=m"(newregs->r10));
146 asm volatile("movq %%r11,%0" : "=m"(newregs->r11));
147 asm volatile("movq %%r12,%0" : "=m"(newregs->r12));
148 asm volatile("movq %%r13,%0" : "=m"(newregs->r13));
149 asm volatile("movq %%r14,%0" : "=m"(newregs->r14));
150 asm volatile("movq %%r15,%0" : "=m"(newregs->r15));
151 asm volatile("movl %%ss, %%eax;" :"=a"(newregs->ss));
152 asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs));
153 asm volatile("pushfq; popq %0" :"=m"(newregs->flags));
154#endif
155 newregs->ip = (unsigned long)current_text_addr();
156 }
157}
158
159#ifdef CONFIG_X86_32
160asmlinkage unsigned long
161relocate_kernel(unsigned long indirection_page,
162 unsigned long control_page,
163 unsigned long start_address,
164 unsigned int has_pae,
165 unsigned int preserve_context);
166#else
167NORET_TYPE void
168relocate_kernel(unsigned long indirection_page,
169 unsigned long page_list,
170 unsigned long start_address) ATTRIB_NORET;
171#endif
172
173#endif /* __ASSEMBLY__ */
174
175#endif /* ASM_X86__KEXEC_H */
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h
deleted file mode 100644
index d283863354de..000000000000
--- a/include/asm-x86/kgdb.h
+++ /dev/null
@@ -1,79 +0,0 @@
1#ifndef ASM_X86__KGDB_H
2#define ASM_X86__KGDB_H
3
4/*
5 * Copyright (C) 2001-2004 Amit S. Kale
6 * Copyright (C) 2008 Wind River Systems, Inc.
7 */
8
9/*
10 * BUFMAX defines the maximum number of characters in inbound/outbound
11 * buffers at least NUMREGBYTES*2 are needed for register packets
12 * Longer buffer is needed to list all threads
13 */
14#define BUFMAX 1024
15
16/*
17 * Note that this register image is in a different order than
18 * the register image that Linux produces at interrupt time.
19 *
20 * Linux's register image is defined by struct pt_regs in ptrace.h.
21 * Just why GDB uses a different order is a historical mystery.
22 */
23#ifdef CONFIG_X86_32
24enum regnames {
25 GDB_AX, /* 0 */
26 GDB_CX, /* 1 */
27 GDB_DX, /* 2 */
28 GDB_BX, /* 3 */
29 GDB_SP, /* 4 */
30 GDB_BP, /* 5 */
31 GDB_SI, /* 6 */
32 GDB_DI, /* 7 */
33 GDB_PC, /* 8 also known as eip */
34 GDB_PS, /* 9 also known as eflags */
35 GDB_CS, /* 10 */
36 GDB_SS, /* 11 */
37 GDB_DS, /* 12 */
38 GDB_ES, /* 13 */
39 GDB_FS, /* 14 */
40 GDB_GS, /* 15 */
41};
42#define NUMREGBYTES ((GDB_GS+1)*4)
43#else /* ! CONFIG_X86_32 */
44enum regnames64 {
45 GDB_AX, /* 0 */
46 GDB_BX, /* 1 */
47 GDB_CX, /* 2 */
48 GDB_DX, /* 3 */
49 GDB_SI, /* 4 */
50 GDB_DI, /* 5 */
51 GDB_BP, /* 6 */
52 GDB_SP, /* 7 */
53 GDB_R8, /* 8 */
54 GDB_R9, /* 9 */
55 GDB_R10, /* 10 */
56 GDB_R11, /* 11 */
57 GDB_R12, /* 12 */
58 GDB_R13, /* 13 */
59 GDB_R14, /* 14 */
60 GDB_R15, /* 15 */
61 GDB_PC, /* 16 */
62};
63
64enum regnames32 {
65 GDB_PS = 34,
66 GDB_CS,
67 GDB_SS,
68};
69#define NUMREGBYTES ((GDB_SS+1)*4)
70#endif /* CONFIG_X86_32 */
71
72static inline void arch_kgdb_breakpoint(void)
73{
74 asm(" int $3");
75}
76#define BREAK_INSTR_SIZE 1
77#define CACHE_FLUSH_IS_SAFE 1
78
79#endif /* ASM_X86__KGDB_H */
diff --git a/include/asm-x86/kmap_types.h b/include/asm-x86/kmap_types.h
deleted file mode 100644
index 89f44493e643..000000000000
--- a/include/asm-x86/kmap_types.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef ASM_X86__KMAP_TYPES_H
2#define ASM_X86__KMAP_TYPES_H
3
4#if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM)
5# define D(n) __KM_FENCE_##n ,
6#else
7# define D(n)
8#endif
9
10enum km_type {
11D(0) KM_BOUNCE_READ,
12D(1) KM_SKB_SUNRPC_DATA,
13D(2) KM_SKB_DATA_SOFTIRQ,
14D(3) KM_USER0,
15D(4) KM_USER1,
16D(5) KM_BIO_SRC_IRQ,
17D(6) KM_BIO_DST_IRQ,
18D(7) KM_PTE0,
19D(8) KM_PTE1,
20D(9) KM_IRQ0,
21D(10) KM_IRQ1,
22D(11) KM_SOFTIRQ0,
23D(12) KM_SOFTIRQ1,
24D(13) KM_TYPE_NR
25};
26
27#undef D
28
29#endif /* ASM_X86__KMAP_TYPES_H */
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h
deleted file mode 100644
index 8a0748d01036..000000000000
--- a/include/asm-x86/kprobes.h
+++ /dev/null
@@ -1,88 +0,0 @@
1#ifndef ASM_X86__KPROBES_H
2#define ASM_X86__KPROBES_H
3/*
4 * Kernel Probes (KProbes)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 *
20 * Copyright (C) IBM Corporation, 2002, 2004
21 *
22 * See arch/x86/kernel/kprobes.c for x86 kprobes history.
23 */
24#include <linux/types.h>
25#include <linux/ptrace.h>
26#include <linux/percpu.h>
27
28#define __ARCH_WANT_KPROBES_INSN_SLOT
29
30struct pt_regs;
31struct kprobe;
32
33typedef u8 kprobe_opcode_t;
34#define BREAKPOINT_INSTRUCTION 0xcc
35#define RELATIVEJUMP_INSTRUCTION 0xe9
36#define MAX_INSN_SIZE 16
37#define MAX_STACK_SIZE 64
38#define MIN_STACK_SIZE(ADDR) \
39 (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \
40 THREAD_SIZE - (unsigned long)(ADDR))) \
41 ? (MAX_STACK_SIZE) \
42 : (((unsigned long)current_thread_info()) + \
43 THREAD_SIZE - (unsigned long)(ADDR)))
44
45#define flush_insn_slot(p) do { } while (0)
46
47extern const int kretprobe_blacklist_size;
48
49void arch_remove_kprobe(struct kprobe *p);
50void kretprobe_trampoline(void);
51
52/* Architecture specific copy of original instruction*/
53struct arch_specific_insn {
54 /* copy of the original instruction */
55 kprobe_opcode_t *insn;
56 /*
57 * boostable = -1: This instruction type is not boostable.
58 * boostable = 0: This instruction type is boostable.
59 * boostable = 1: This instruction has been boosted: we have
60 * added a relative jump after the instruction copy in insn,
61 * so no single-step and fixup are needed (unless there's
62 * a post_handler or break_handler).
63 */
64 int boostable;
65};
66
67struct prev_kprobe {
68 struct kprobe *kp;
69 unsigned long status;
70 unsigned long old_flags;
71 unsigned long saved_flags;
72};
73
74/* per-cpu kprobe control block */
75struct kprobe_ctlblk {
76 unsigned long kprobe_status;
77 unsigned long kprobe_old_flags;
78 unsigned long kprobe_saved_flags;
79 unsigned long *jprobe_saved_sp;
80 struct pt_regs jprobe_saved_regs;
81 kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
82 struct prev_kprobe prev_kprobe;
83};
84
85extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
86extern int kprobe_exceptions_notify(struct notifier_block *self,
87 unsigned long val, void *data);
88#endif /* ASM_X86__KPROBES_H */
diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h
deleted file mode 100644
index 78e954db1e7f..000000000000
--- a/include/asm-x86/kvm.h
+++ /dev/null
@@ -1,233 +0,0 @@
1#ifndef ASM_X86__KVM_H
2#define ASM_X86__KVM_H
3
4/*
5 * KVM x86 specific structures and definitions
6 *
7 */
8
9#include <asm/types.h>
10#include <linux/ioctl.h>
11
12/* Architectural interrupt line count. */
13#define KVM_NR_INTERRUPTS 256
14
15struct kvm_memory_alias {
16 __u32 slot; /* this has a different namespace than memory slots */
17 __u32 flags;
18 __u64 guest_phys_addr;
19 __u64 memory_size;
20 __u64 target_phys_addr;
21};
22
23/* for KVM_GET_IRQCHIP and KVM_SET_IRQCHIP */
24struct kvm_pic_state {
25 __u8 last_irr; /* edge detection */
26 __u8 irr; /* interrupt request register */
27 __u8 imr; /* interrupt mask register */
28 __u8 isr; /* interrupt service register */
29 __u8 priority_add; /* highest irq priority */
30 __u8 irq_base;
31 __u8 read_reg_select;
32 __u8 poll;
33 __u8 special_mask;
34 __u8 init_state;
35 __u8 auto_eoi;
36 __u8 rotate_on_auto_eoi;
37 __u8 special_fully_nested_mode;
38 __u8 init4; /* true if 4 byte init */
39 __u8 elcr; /* PIIX edge/trigger selection */
40 __u8 elcr_mask;
41};
42
43#define KVM_IOAPIC_NUM_PINS 24
44struct kvm_ioapic_state {
45 __u64 base_address;
46 __u32 ioregsel;
47 __u32 id;
48 __u32 irr;
49 __u32 pad;
50 union {
51 __u64 bits;
52 struct {
53 __u8 vector;
54 __u8 delivery_mode:3;
55 __u8 dest_mode:1;
56 __u8 delivery_status:1;
57 __u8 polarity:1;
58 __u8 remote_irr:1;
59 __u8 trig_mode:1;
60 __u8 mask:1;
61 __u8 reserve:7;
62 __u8 reserved[4];
63 __u8 dest_id;
64 } fields;
65 } redirtbl[KVM_IOAPIC_NUM_PINS];
66};
67
68#define KVM_IRQCHIP_PIC_MASTER 0
69#define KVM_IRQCHIP_PIC_SLAVE 1
70#define KVM_IRQCHIP_IOAPIC 2
71
72/* for KVM_GET_REGS and KVM_SET_REGS */
73struct kvm_regs {
74 /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
75 __u64 rax, rbx, rcx, rdx;
76 __u64 rsi, rdi, rsp, rbp;
77 __u64 r8, r9, r10, r11;
78 __u64 r12, r13, r14, r15;
79 __u64 rip, rflags;
80};
81
82/* for KVM_GET_LAPIC and KVM_SET_LAPIC */
83#define KVM_APIC_REG_SIZE 0x400
84struct kvm_lapic_state {
85 char regs[KVM_APIC_REG_SIZE];
86};
87
88struct kvm_segment {
89 __u64 base;
90 __u32 limit;
91 __u16 selector;
92 __u8 type;
93 __u8 present, dpl, db, s, l, g, avl;
94 __u8 unusable;
95 __u8 padding;
96};
97
98struct kvm_dtable {
99 __u64 base;
100 __u16 limit;
101 __u16 padding[3];
102};
103
104
105/* for KVM_GET_SREGS and KVM_SET_SREGS */
106struct kvm_sregs {
107 /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */
108 struct kvm_segment cs, ds, es, fs, gs, ss;
109 struct kvm_segment tr, ldt;
110 struct kvm_dtable gdt, idt;
111 __u64 cr0, cr2, cr3, cr4, cr8;
112 __u64 efer;
113 __u64 apic_base;
114 __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64];
115};
116
117/* for KVM_GET_FPU and KVM_SET_FPU */
118struct kvm_fpu {
119 __u8 fpr[8][16];
120 __u16 fcw;
121 __u16 fsw;
122 __u8 ftwx; /* in fxsave format */
123 __u8 pad1;
124 __u16 last_opcode;
125 __u64 last_ip;
126 __u64 last_dp;
127 __u8 xmm[16][16];
128 __u32 mxcsr;
129 __u32 pad2;
130};
131
132struct kvm_msr_entry {
133 __u32 index;
134 __u32 reserved;
135 __u64 data;
136};
137
138/* for KVM_GET_MSRS and KVM_SET_MSRS */
139struct kvm_msrs {
140 __u32 nmsrs; /* number of msrs in entries */
141 __u32 pad;
142
143 struct kvm_msr_entry entries[0];
144};
145
146/* for KVM_GET_MSR_INDEX_LIST */
147struct kvm_msr_list {
148 __u32 nmsrs; /* number of msrs in entries */
149 __u32 indices[0];
150};
151
152
153struct kvm_cpuid_entry {
154 __u32 function;
155 __u32 eax;
156 __u32 ebx;
157 __u32 ecx;
158 __u32 edx;
159 __u32 padding;
160};
161
162/* for KVM_SET_CPUID */
163struct kvm_cpuid {
164 __u32 nent;
165 __u32 padding;
166 struct kvm_cpuid_entry entries[0];
167};
168
169struct kvm_cpuid_entry2 {
170 __u32 function;
171 __u32 index;
172 __u32 flags;
173 __u32 eax;
174 __u32 ebx;
175 __u32 ecx;
176 __u32 edx;
177 __u32 padding[3];
178};
179
180#define KVM_CPUID_FLAG_SIGNIFCANT_INDEX 1
181#define KVM_CPUID_FLAG_STATEFUL_FUNC 2
182#define KVM_CPUID_FLAG_STATE_READ_NEXT 4
183
184/* for KVM_SET_CPUID2 */
185struct kvm_cpuid2 {
186 __u32 nent;
187 __u32 padding;
188 struct kvm_cpuid_entry2 entries[0];
189};
190
191/* for KVM_GET_PIT and KVM_SET_PIT */
192struct kvm_pit_channel_state {
193 __u32 count; /* can be 65536 */
194 __u16 latched_count;
195 __u8 count_latched;
196 __u8 status_latched;
197 __u8 status;
198 __u8 read_state;
199 __u8 write_state;
200 __u8 write_latch;
201 __u8 rw_mode;
202 __u8 mode;
203 __u8 bcd;
204 __u8 gate;
205 __s64 count_load_time;
206};
207
208struct kvm_pit_state {
209 struct kvm_pit_channel_state channels[3];
210};
211
212#define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02)
213#define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03)
214#define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04)
215#define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05)
216#define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06)
217#define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07)
218#define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08)
219#define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09)
220#define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A)
221#define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B)
222#define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C)
223#define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D)
224#define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E)
225#define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F)
226#define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10)
227#define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11)
228#define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12)
229#define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13)
230#define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14)
231#define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15)
232
233#endif /* ASM_X86__KVM_H */
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
deleted file mode 100644
index 69794547f514..000000000000
--- a/include/asm-x86/kvm_host.h
+++ /dev/null
@@ -1,738 +0,0 @@
1/*
2 * Kernel-based Virtual Machine driver for Linux
3 *
4 * This header defines architecture specific interfaces, x86 version
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2. See
7 * the COPYING file in the top-level directory.
8 *
9 */
10
11#ifndef ASM_X86__KVM_HOST_H
12#define ASM_X86__KVM_HOST_H
13
14#include <linux/types.h>
15#include <linux/mm.h>
16#include <linux/mmu_notifier.h>
17
18#include <linux/kvm.h>
19#include <linux/kvm_para.h>
20#include <linux/kvm_types.h>
21
22#include <asm/pvclock-abi.h>
23#include <asm/desc.h>
24
25#define KVM_MAX_VCPUS 16
26#define KVM_MEMORY_SLOTS 32
27/* memory slots that does not exposed to userspace */
28#define KVM_PRIVATE_MEM_SLOTS 4
29
30#define KVM_PIO_PAGE_OFFSET 1
31#define KVM_COALESCED_MMIO_PAGE_OFFSET 2
32
33#define CR3_PAE_RESERVED_BITS ((X86_CR3_PWT | X86_CR3_PCD) - 1)
34#define CR3_NONPAE_RESERVED_BITS ((PAGE_SIZE-1) & ~(X86_CR3_PWT | X86_CR3_PCD))
35#define CR3_L_MODE_RESERVED_BITS (CR3_NONPAE_RESERVED_BITS | \
36 0xFFFFFF0000000000ULL)
37
38#define KVM_GUEST_CR0_MASK \
39 (X86_CR0_PG | X86_CR0_PE | X86_CR0_WP | X86_CR0_NE \
40 | X86_CR0_NW | X86_CR0_CD)
41#define KVM_VM_CR0_ALWAYS_ON \
42 (X86_CR0_PG | X86_CR0_PE | X86_CR0_WP | X86_CR0_NE | X86_CR0_TS \
43 | X86_CR0_MP)
44#define KVM_GUEST_CR4_MASK \
45 (X86_CR4_VME | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_PGE | X86_CR4_VMXE)
46#define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE)
47#define KVM_RMODE_VM_CR4_ALWAYS_ON (X86_CR4_VME | X86_CR4_PAE | X86_CR4_VMXE)
48
49#define INVALID_PAGE (~(hpa_t)0)
50#define UNMAPPED_GVA (~(gpa_t)0)
51
52/* shadow tables are PAE even on non-PAE hosts */
53#define KVM_HPAGE_SHIFT 21
54#define KVM_HPAGE_SIZE (1UL << KVM_HPAGE_SHIFT)
55#define KVM_HPAGE_MASK (~(KVM_HPAGE_SIZE - 1))
56
57#define KVM_PAGES_PER_HPAGE (KVM_HPAGE_SIZE / PAGE_SIZE)
58
59#define DE_VECTOR 0
60#define UD_VECTOR 6
61#define NM_VECTOR 7
62#define DF_VECTOR 8
63#define TS_VECTOR 10
64#define NP_VECTOR 11
65#define SS_VECTOR 12
66#define GP_VECTOR 13
67#define PF_VECTOR 14
68#define MC_VECTOR 18
69
70#define SELECTOR_TI_MASK (1 << 2)
71#define SELECTOR_RPL_MASK 0x03
72
73#define IOPL_SHIFT 12
74
75#define KVM_ALIAS_SLOTS 4
76
77#define KVM_PERMILLE_MMU_PAGES 20
78#define KVM_MIN_ALLOC_MMU_PAGES 64
79#define KVM_MMU_HASH_SHIFT 10
80#define KVM_NUM_MMU_PAGES (1 << KVM_MMU_HASH_SHIFT)
81#define KVM_MIN_FREE_MMU_PAGES 5
82#define KVM_REFILL_PAGES 25
83#define KVM_MAX_CPUID_ENTRIES 40
84#define KVM_NR_VAR_MTRR 8
85
86extern spinlock_t kvm_lock;
87extern struct list_head vm_list;
88
89struct kvm_vcpu;
90struct kvm;
91
92enum {
93 VCPU_REGS_RAX = 0,
94 VCPU_REGS_RCX = 1,
95 VCPU_REGS_RDX = 2,
96 VCPU_REGS_RBX = 3,
97 VCPU_REGS_RSP = 4,
98 VCPU_REGS_RBP = 5,
99 VCPU_REGS_RSI = 6,
100 VCPU_REGS_RDI = 7,
101#ifdef CONFIG_X86_64
102 VCPU_REGS_R8 = 8,
103 VCPU_REGS_R9 = 9,
104 VCPU_REGS_R10 = 10,
105 VCPU_REGS_R11 = 11,
106 VCPU_REGS_R12 = 12,
107 VCPU_REGS_R13 = 13,
108 VCPU_REGS_R14 = 14,
109 VCPU_REGS_R15 = 15,
110#endif
111 NR_VCPU_REGS
112};
113
114enum {
115 VCPU_SREG_ES,
116 VCPU_SREG_CS,
117 VCPU_SREG_SS,
118 VCPU_SREG_DS,
119 VCPU_SREG_FS,
120 VCPU_SREG_GS,
121 VCPU_SREG_TR,
122 VCPU_SREG_LDTR,
123};
124
125#include <asm/kvm_x86_emulate.h>
126
127#define KVM_NR_MEM_OBJS 40
128
129struct kvm_guest_debug {
130 int enabled;
131 unsigned long bp[4];
132 int singlestep;
133};
134
135/*
136 * We don't want allocation failures within the mmu code, so we preallocate
137 * enough memory for a single page fault in a cache.
138 */
139struct kvm_mmu_memory_cache {
140 int nobjs;
141 void *objects[KVM_NR_MEM_OBJS];
142};
143
144#define NR_PTE_CHAIN_ENTRIES 5
145
146struct kvm_pte_chain {
147 u64 *parent_ptes[NR_PTE_CHAIN_ENTRIES];
148 struct hlist_node link;
149};
150
151/*
152 * kvm_mmu_page_role, below, is defined as:
153 *
154 * bits 0:3 - total guest paging levels (2-4, or zero for real mode)
155 * bits 4:7 - page table level for this shadow (1-4)
156 * bits 8:9 - page table quadrant for 2-level guests
157 * bit 16 - "metaphysical" - gfn is not a real page (huge page/real mode)
158 * bits 17:19 - common access permissions for all ptes in this shadow page
159 */
160union kvm_mmu_page_role {
161 unsigned word;
162 struct {
163 unsigned glevels:4;
164 unsigned level:4;
165 unsigned quadrant:2;
166 unsigned pad_for_nice_hex_output:6;
167 unsigned metaphysical:1;
168 unsigned access:3;
169 unsigned invalid:1;
170 };
171};
172
173struct kvm_mmu_page {
174 struct list_head link;
175 struct hlist_node hash_link;
176
177 /*
178 * The following two entries are used to key the shadow page in the
179 * hash table.
180 */
181 gfn_t gfn;
182 union kvm_mmu_page_role role;
183
184 u64 *spt;
185 /* hold the gfn of each spte inside spt */
186 gfn_t *gfns;
187 unsigned long slot_bitmap; /* One bit set per slot which has memory
188 * in this shadow page.
189 */
190 int multimapped; /* More than one parent_pte? */
191 int root_count; /* Currently serving as active root */
192 union {
193 u64 *parent_pte; /* !multimapped */
194 struct hlist_head parent_ptes; /* multimapped, kvm_pte_chain */
195 };
196};
197
198/*
199 * x86 supports 3 paging modes (4-level 64-bit, 3-level 64-bit, and 2-level
200 * 32-bit). The kvm_mmu structure abstracts the details of the current mmu
201 * mode.
202 */
203struct kvm_mmu {
204 void (*new_cr3)(struct kvm_vcpu *vcpu);
205 int (*page_fault)(struct kvm_vcpu *vcpu, gva_t gva, u32 err);
206 void (*free)(struct kvm_vcpu *vcpu);
207 gpa_t (*gva_to_gpa)(struct kvm_vcpu *vcpu, gva_t gva);
208 void (*prefetch_page)(struct kvm_vcpu *vcpu,
209 struct kvm_mmu_page *page);
210 hpa_t root_hpa;
211 int root_level;
212 int shadow_root_level;
213
214 u64 *pae_root;
215};
216
217struct kvm_vcpu_arch {
218 u64 host_tsc;
219 int interrupt_window_open;
220 unsigned long irq_summary; /* bit vector: 1 per word in irq_pending */
221 DECLARE_BITMAP(irq_pending, KVM_NR_INTERRUPTS);
222 unsigned long regs[NR_VCPU_REGS]; /* for rsp: vcpu_load_rsp_rip() */
223 unsigned long rip; /* needs vcpu_load_rsp_rip() */
224
225 unsigned long cr0;
226 unsigned long cr2;
227 unsigned long cr3;
228 unsigned long cr4;
229 unsigned long cr8;
230 u64 pdptrs[4]; /* pae */
231 u64 shadow_efer;
232 u64 apic_base;
233 struct kvm_lapic *apic; /* kernel irqchip context */
234 int mp_state;
235 int sipi_vector;
236 u64 ia32_misc_enable_msr;
237 bool tpr_access_reporting;
238
239 struct kvm_mmu mmu;
240
241 struct kvm_mmu_memory_cache mmu_pte_chain_cache;
242 struct kvm_mmu_memory_cache mmu_rmap_desc_cache;
243 struct kvm_mmu_memory_cache mmu_page_cache;
244 struct kvm_mmu_memory_cache mmu_page_header_cache;
245
246 gfn_t last_pt_write_gfn;
247 int last_pt_write_count;
248 u64 *last_pte_updated;
249 gfn_t last_pte_gfn;
250
251 struct {
252 gfn_t gfn; /* presumed gfn during guest pte update */
253 pfn_t pfn; /* pfn corresponding to that gfn */
254 int largepage;
255 unsigned long mmu_seq;
256 } update_pte;
257
258 struct i387_fxsave_struct host_fx_image;
259 struct i387_fxsave_struct guest_fx_image;
260
261 gva_t mmio_fault_cr2;
262 struct kvm_pio_request pio;
263 void *pio_data;
264
265 struct kvm_queued_exception {
266 bool pending;
267 bool has_error_code;
268 u8 nr;
269 u32 error_code;
270 } exception;
271
272 struct {
273 int active;
274 u8 save_iopl;
275 struct kvm_save_segment {
276 u16 selector;
277 unsigned long base;
278 u32 limit;
279 u32 ar;
280 } tr, es, ds, fs, gs;
281 } rmode;
282 int halt_request; /* real mode on Intel only */
283
284 int cpuid_nent;
285 struct kvm_cpuid_entry2 cpuid_entries[KVM_MAX_CPUID_ENTRIES];
286 /* emulate context */
287
288 struct x86_emulate_ctxt emulate_ctxt;
289
290 gpa_t time;
291 struct pvclock_vcpu_time_info hv_clock;
292 unsigned int hv_clock_tsc_khz;
293 unsigned int time_offset;
294 struct page *time_page;
295
296 bool nmi_pending;
297
298 u64 mtrr[0x100];
299};
300
301struct kvm_mem_alias {
302 gfn_t base_gfn;
303 unsigned long npages;
304 gfn_t target_gfn;
305};
306
307struct kvm_arch{
308 int naliases;
309 struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS];
310
311 unsigned int n_free_mmu_pages;
312 unsigned int n_requested_mmu_pages;
313 unsigned int n_alloc_mmu_pages;
314 struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];
315 /*
316 * Hash table of struct kvm_mmu_page.
317 */
318 struct list_head active_mmu_pages;
319 struct kvm_pic *vpic;
320 struct kvm_ioapic *vioapic;
321 struct kvm_pit *vpit;
322
323 int round_robin_prev_vcpu;
324 unsigned int tss_addr;
325 struct page *apic_access_page;
326
327 gpa_t wall_clock;
328
329 struct page *ept_identity_pagetable;
330 bool ept_identity_pagetable_done;
331};
332
333struct kvm_vm_stat {
334 u32 mmu_shadow_zapped;
335 u32 mmu_pte_write;
336 u32 mmu_pte_updated;
337 u32 mmu_pde_zapped;
338 u32 mmu_flooded;
339 u32 mmu_recycled;
340 u32 mmu_cache_miss;
341 u32 remote_tlb_flush;
342 u32 lpages;
343};
344
345struct kvm_vcpu_stat {
346 u32 pf_fixed;
347 u32 pf_guest;
348 u32 tlb_flush;
349 u32 invlpg;
350
351 u32 exits;
352 u32 io_exits;
353 u32 mmio_exits;
354 u32 signal_exits;
355 u32 irq_window_exits;
356 u32 nmi_window_exits;
357 u32 halt_exits;
358 u32 halt_wakeup;
359 u32 request_irq_exits;
360 u32 irq_exits;
361 u32 host_state_reload;
362 u32 efer_reload;
363 u32 fpu_reload;
364 u32 insn_emulation;
365 u32 insn_emulation_fail;
366 u32 hypercalls;
367};
368
369struct descriptor_table {
370 u16 limit;
371 unsigned long base;
372} __attribute__((packed));
373
374struct kvm_x86_ops {
375 int (*cpu_has_kvm_support)(void); /* __init */
376 int (*disabled_by_bios)(void); /* __init */
377 void (*hardware_enable)(void *dummy); /* __init */
378 void (*hardware_disable)(void *dummy);
379 void (*check_processor_compatibility)(void *rtn);
380 int (*hardware_setup)(void); /* __init */
381 void (*hardware_unsetup)(void); /* __exit */
382 bool (*cpu_has_accelerated_tpr)(void);
383
384 /* Create, but do not attach this VCPU */
385 struct kvm_vcpu *(*vcpu_create)(struct kvm *kvm, unsigned id);
386 void (*vcpu_free)(struct kvm_vcpu *vcpu);
387 int (*vcpu_reset)(struct kvm_vcpu *vcpu);
388
389 void (*prepare_guest_switch)(struct kvm_vcpu *vcpu);
390 void (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu);
391 void (*vcpu_put)(struct kvm_vcpu *vcpu);
392
393 int (*set_guest_debug)(struct kvm_vcpu *vcpu,
394 struct kvm_debug_guest *dbg);
395 void (*guest_debug_pre)(struct kvm_vcpu *vcpu);
396 int (*get_msr)(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata);
397 int (*set_msr)(struct kvm_vcpu *vcpu, u32 msr_index, u64 data);
398 u64 (*get_segment_base)(struct kvm_vcpu *vcpu, int seg);
399 void (*get_segment)(struct kvm_vcpu *vcpu,
400 struct kvm_segment *var, int seg);
401 int (*get_cpl)(struct kvm_vcpu *vcpu);
402 void (*set_segment)(struct kvm_vcpu *vcpu,
403 struct kvm_segment *var, int seg);
404 void (*get_cs_db_l_bits)(struct kvm_vcpu *vcpu, int *db, int *l);
405 void (*decache_cr4_guest_bits)(struct kvm_vcpu *vcpu);
406 void (*set_cr0)(struct kvm_vcpu *vcpu, unsigned long cr0);
407 void (*set_cr3)(struct kvm_vcpu *vcpu, unsigned long cr3);
408 void (*set_cr4)(struct kvm_vcpu *vcpu, unsigned long cr4);
409 void (*set_efer)(struct kvm_vcpu *vcpu, u64 efer);
410 void (*get_idt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
411 void (*set_idt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
412 void (*get_gdt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
413 void (*set_gdt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
414 unsigned long (*get_dr)(struct kvm_vcpu *vcpu, int dr);
415 void (*set_dr)(struct kvm_vcpu *vcpu, int dr, unsigned long value,
416 int *exception);
417 void (*cache_regs)(struct kvm_vcpu *vcpu);
418 void (*decache_regs)(struct kvm_vcpu *vcpu);
419 unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);
420 void (*set_rflags)(struct kvm_vcpu *vcpu, unsigned long rflags);
421
422 void (*tlb_flush)(struct kvm_vcpu *vcpu);
423
424 void (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run);
425 int (*handle_exit)(struct kvm_run *run, struct kvm_vcpu *vcpu);
426 void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu);
427 void (*patch_hypercall)(struct kvm_vcpu *vcpu,
428 unsigned char *hypercall_addr);
429 int (*get_irq)(struct kvm_vcpu *vcpu);
430 void (*set_irq)(struct kvm_vcpu *vcpu, int vec);
431 void (*queue_exception)(struct kvm_vcpu *vcpu, unsigned nr,
432 bool has_error_code, u32 error_code);
433 bool (*exception_injected)(struct kvm_vcpu *vcpu);
434 void (*inject_pending_irq)(struct kvm_vcpu *vcpu);
435 void (*inject_pending_vectors)(struct kvm_vcpu *vcpu,
436 struct kvm_run *run);
437
438 int (*set_tss_addr)(struct kvm *kvm, unsigned int addr);
439 int (*get_tdp_level)(void);
440};
441
442extern struct kvm_x86_ops *kvm_x86_ops;
443
444int kvm_mmu_module_init(void);
445void kvm_mmu_module_exit(void);
446
447void kvm_mmu_destroy(struct kvm_vcpu *vcpu);
448int kvm_mmu_create(struct kvm_vcpu *vcpu);
449int kvm_mmu_setup(struct kvm_vcpu *vcpu);
450void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte);
451void kvm_mmu_set_base_ptes(u64 base_pte);
452void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
453 u64 dirty_mask, u64 nx_mask, u64 x_mask);
454
455int kvm_mmu_reset_context(struct kvm_vcpu *vcpu);
456void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot);
457void kvm_mmu_zap_all(struct kvm *kvm);
458unsigned int kvm_mmu_calculate_mmu_pages(struct kvm *kvm);
459void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages);
460
461int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3);
462
463int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa,
464 const void *val, int bytes);
465int kvm_pv_mmu_op(struct kvm_vcpu *vcpu, unsigned long bytes,
466 gpa_t addr, unsigned long *ret);
467
468extern bool tdp_enabled;
469
470enum emulation_result {
471 EMULATE_DONE, /* no further processing */
472 EMULATE_DO_MMIO, /* kvm_run filled with mmio request */
473 EMULATE_FAIL, /* can't emulate this instruction */
474};
475
476#define EMULTYPE_NO_DECODE (1 << 0)
477#define EMULTYPE_TRAP_UD (1 << 1)
478int emulate_instruction(struct kvm_vcpu *vcpu, struct kvm_run *run,
479 unsigned long cr2, u16 error_code, int emulation_type);
480void kvm_report_emulation_failure(struct kvm_vcpu *cvpu, const char *context);
481void realmode_lgdt(struct kvm_vcpu *vcpu, u16 size, unsigned long address);
482void realmode_lidt(struct kvm_vcpu *vcpu, u16 size, unsigned long address);
483void realmode_lmsw(struct kvm_vcpu *vcpu, unsigned long msw,
484 unsigned long *rflags);
485
486unsigned long realmode_get_cr(struct kvm_vcpu *vcpu, int cr);
487void realmode_set_cr(struct kvm_vcpu *vcpu, int cr, unsigned long value,
488 unsigned long *rflags);
489void kvm_enable_efer_bits(u64);
490int kvm_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *data);
491int kvm_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data);
492
493struct x86_emulate_ctxt;
494
495int kvm_emulate_pio(struct kvm_vcpu *vcpu, struct kvm_run *run, int in,
496 int size, unsigned port);
497int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, struct kvm_run *run, int in,
498 int size, unsigned long count, int down,
499 gva_t address, int rep, unsigned port);
500void kvm_emulate_cpuid(struct kvm_vcpu *vcpu);
501int kvm_emulate_halt(struct kvm_vcpu *vcpu);
502int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address);
503int emulate_clts(struct kvm_vcpu *vcpu);
504int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr,
505 unsigned long *dest);
506int emulator_set_dr(struct x86_emulate_ctxt *ctxt, int dr,
507 unsigned long value);
508
509void kvm_get_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg);
510int kvm_load_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector,
511 int type_bits, int seg);
512
513int kvm_task_switch(struct kvm_vcpu *vcpu, u16 tss_selector, int reason);
514
515void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0);
516void kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3);
517void kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4);
518void kvm_set_cr8(struct kvm_vcpu *vcpu, unsigned long cr8);
519unsigned long kvm_get_cr8(struct kvm_vcpu *vcpu);
520void kvm_lmsw(struct kvm_vcpu *vcpu, unsigned long msw);
521void kvm_get_cs_db_l_bits(struct kvm_vcpu *vcpu, int *db, int *l);
522
523int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata);
524int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data);
525
526void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr);
527void kvm_queue_exception_e(struct kvm_vcpu *vcpu, unsigned nr, u32 error_code);
528void kvm_inject_page_fault(struct kvm_vcpu *vcpu, unsigned long cr2,
529 u32 error_code);
530
531void kvm_inject_nmi(struct kvm_vcpu *vcpu);
532
533void fx_init(struct kvm_vcpu *vcpu);
534
535int emulator_read_std(unsigned long addr,
536 void *val,
537 unsigned int bytes,
538 struct kvm_vcpu *vcpu);
539int emulator_write_emulated(unsigned long addr,
540 const void *val,
541 unsigned int bytes,
542 struct kvm_vcpu *vcpu);
543
544unsigned long segment_base(u16 selector);
545
546void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu);
547void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
548 const u8 *new, int bytes);
549int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva);
550void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);
551int kvm_mmu_load(struct kvm_vcpu *vcpu);
552void kvm_mmu_unload(struct kvm_vcpu *vcpu);
553
554int kvm_emulate_hypercall(struct kvm_vcpu *vcpu);
555
556int kvm_fix_hypercall(struct kvm_vcpu *vcpu);
557
558int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code);
559
560void kvm_enable_tdp(void);
561void kvm_disable_tdp(void);
562
563int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3);
564int complete_pio(struct kvm_vcpu *vcpu);
565
566static inline struct kvm_mmu_page *page_header(hpa_t shadow_page)
567{
568 struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT);
569
570 return (struct kvm_mmu_page *)page_private(page);
571}
572
573static inline u16 kvm_read_fs(void)
574{
575 u16 seg;
576 asm("mov %%fs, %0" : "=g"(seg));
577 return seg;
578}
579
580static inline u16 kvm_read_gs(void)
581{
582 u16 seg;
583 asm("mov %%gs, %0" : "=g"(seg));
584 return seg;
585}
586
587static inline u16 kvm_read_ldt(void)
588{
589 u16 ldt;
590 asm("sldt %0" : "=g"(ldt));
591 return ldt;
592}
593
594static inline void kvm_load_fs(u16 sel)
595{
596 asm("mov %0, %%fs" : : "rm"(sel));
597}
598
599static inline void kvm_load_gs(u16 sel)
600{
601 asm("mov %0, %%gs" : : "rm"(sel));
602}
603
604static inline void kvm_load_ldt(u16 sel)
605{
606 asm("lldt %0" : : "rm"(sel));
607}
608
609static inline void kvm_get_idt(struct descriptor_table *table)
610{
611 asm("sidt %0" : "=m"(*table));
612}
613
614static inline void kvm_get_gdt(struct descriptor_table *table)
615{
616 asm("sgdt %0" : "=m"(*table));
617}
618
619static inline unsigned long kvm_read_tr_base(void)
620{
621 u16 tr;
622 asm("str %0" : "=g"(tr));
623 return segment_base(tr);
624}
625
626#ifdef CONFIG_X86_64
627static inline unsigned long read_msr(unsigned long msr)
628{
629 u64 value;
630
631 rdmsrl(msr, value);
632 return value;
633}
634#endif
635
636static inline void kvm_fx_save(struct i387_fxsave_struct *image)
637{
638 asm("fxsave (%0)":: "r" (image));
639}
640
641static inline void kvm_fx_restore(struct i387_fxsave_struct *image)
642{
643 asm("fxrstor (%0)":: "r" (image));
644}
645
646static inline void kvm_fx_finit(void)
647{
648 asm("finit");
649}
650
651static inline u32 get_rdx_init_val(void)
652{
653 return 0x600; /* P6 family */
654}
655
656static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code)
657{
658 kvm_queue_exception_e(vcpu, GP_VECTOR, error_code);
659}
660
661#define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
662#define ASM_VMX_VMLAUNCH ".byte 0x0f, 0x01, 0xc2"
663#define ASM_VMX_VMRESUME ".byte 0x0f, 0x01, 0xc3"
664#define ASM_VMX_VMPTRLD_RAX ".byte 0x0f, 0xc7, 0x30"
665#define ASM_VMX_VMREAD_RDX_RAX ".byte 0x0f, 0x78, 0xd0"
666#define ASM_VMX_VMWRITE_RAX_RDX ".byte 0x0f, 0x79, 0xd0"
667#define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4"
668#define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4"
669#define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30"
670#define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08"
671#define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08"
672
673#define MSR_IA32_TIME_STAMP_COUNTER 0x010
674
675#define TSS_IOPB_BASE_OFFSET 0x66
676#define TSS_BASE_SIZE 0x68
677#define TSS_IOPB_SIZE (65536 / 8)
678#define TSS_REDIRECTION_SIZE (256 / 8)
679#define RMODE_TSS_SIZE \
680 (TSS_BASE_SIZE + TSS_REDIRECTION_SIZE + TSS_IOPB_SIZE + 1)
681
682enum {
683 TASK_SWITCH_CALL = 0,
684 TASK_SWITCH_IRET = 1,
685 TASK_SWITCH_JMP = 2,
686 TASK_SWITCH_GATE = 3,
687};
688
689#define KVMTRACE_5D(evt, vcpu, d1, d2, d3, d4, d5, name) \
690 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
691 vcpu, 5, d1, d2, d3, d4, d5)
692#define KVMTRACE_4D(evt, vcpu, d1, d2, d3, d4, name) \
693 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
694 vcpu, 4, d1, d2, d3, d4, 0)
695#define KVMTRACE_3D(evt, vcpu, d1, d2, d3, name) \
696 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
697 vcpu, 3, d1, d2, d3, 0, 0)
698#define KVMTRACE_2D(evt, vcpu, d1, d2, name) \
699 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
700 vcpu, 2, d1, d2, 0, 0, 0)
701#define KVMTRACE_1D(evt, vcpu, d1, name) \
702 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
703 vcpu, 1, d1, 0, 0, 0, 0)
704#define KVMTRACE_0D(evt, vcpu, name) \
705 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
706 vcpu, 0, 0, 0, 0, 0, 0)
707
708#ifdef CONFIG_64BIT
709# define KVM_EX_ENTRY ".quad"
710# define KVM_EX_PUSH "pushq"
711#else
712# define KVM_EX_ENTRY ".long"
713# define KVM_EX_PUSH "pushl"
714#endif
715
716/*
717 * Hardware virtualization extension instructions may fault if a
718 * reboot turns off virtualization while processes are running.
719 * Trap the fault and ignore the instruction if that happens.
720 */
721asmlinkage void kvm_handle_fault_on_reboot(void);
722
723#define __kvm_handle_fault_on_reboot(insn) \
724 "666: " insn "\n\t" \
725 ".pushsection .fixup, \"ax\" \n" \
726 "667: \n\t" \
727 KVM_EX_PUSH " $666b \n\t" \
728 "jmp kvm_handle_fault_on_reboot \n\t" \
729 ".popsection \n\t" \
730 ".pushsection __ex_table, \"a\" \n\t" \
731 KVM_EX_ENTRY " 666b, 667b \n\t" \
732 ".popsection"
733
734#define KVM_ARCH_WANT_MMU_NOTIFIER
735int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
736int kvm_age_hva(struct kvm *kvm, unsigned long hva);
737
738#endif /* ASM_X86__KVM_HOST_H */
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h
deleted file mode 100644
index 30054fded4fb..000000000000
--- a/include/asm-x86/kvm_para.h
+++ /dev/null
@@ -1,147 +0,0 @@
1#ifndef ASM_X86__KVM_PARA_H
2#define ASM_X86__KVM_PARA_H
3
4/* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx. It
5 * should be used to determine that a VM is running under KVM.
6 */
7#define KVM_CPUID_SIGNATURE 0x40000000
8
9/* This CPUID returns a feature bitmap in eax. Before enabling a particular
10 * paravirtualization, the appropriate feature bit should be checked.
11 */
12#define KVM_CPUID_FEATURES 0x40000001
13#define KVM_FEATURE_CLOCKSOURCE 0
14#define KVM_FEATURE_NOP_IO_DELAY 1
15#define KVM_FEATURE_MMU_OP 2
16
17#define MSR_KVM_WALL_CLOCK 0x11
18#define MSR_KVM_SYSTEM_TIME 0x12
19
20#define KVM_MAX_MMU_OP_BATCH 32
21
22/* Operations for KVM_HC_MMU_OP */
23#define KVM_MMU_OP_WRITE_PTE 1
24#define KVM_MMU_OP_FLUSH_TLB 2
25#define KVM_MMU_OP_RELEASE_PT 3
26
27/* Payload for KVM_HC_MMU_OP */
28struct kvm_mmu_op_header {
29 __u32 op;
30 __u32 pad;
31};
32
33struct kvm_mmu_op_write_pte {
34 struct kvm_mmu_op_header header;
35 __u64 pte_phys;
36 __u64 pte_val;
37};
38
39struct kvm_mmu_op_flush_tlb {
40 struct kvm_mmu_op_header header;
41};
42
43struct kvm_mmu_op_release_pt {
44 struct kvm_mmu_op_header header;
45 __u64 pt_phys;
46};
47
48#ifdef __KERNEL__
49#include <asm/processor.h>
50
51extern void kvmclock_init(void);
52
53
54/* This instruction is vmcall. On non-VT architectures, it will generate a
55 * trap that we will then rewrite to the appropriate instruction.
56 */
57#define KVM_HYPERCALL ".byte 0x0f,0x01,0xc1"
58
59/* For KVM hypercalls, a three-byte sequence of either the vmrun or the vmmrun
60 * instruction. The hypervisor may replace it with something else but only the
61 * instructions are guaranteed to be supported.
62 *
63 * Up to four arguments may be passed in rbx, rcx, rdx, and rsi respectively.
64 * The hypercall number should be placed in rax and the return value will be
65 * placed in rax. No other registers will be clobbered unless explicited
66 * noted by the particular hypercall.
67 */
68
69static inline long kvm_hypercall0(unsigned int nr)
70{
71 long ret;
72 asm volatile(KVM_HYPERCALL
73 : "=a"(ret)
74 : "a"(nr)
75 : "memory");
76 return ret;
77}
78
79static inline long kvm_hypercall1(unsigned int nr, unsigned long p1)
80{
81 long ret;
82 asm volatile(KVM_HYPERCALL
83 : "=a"(ret)
84 : "a"(nr), "b"(p1)
85 : "memory");
86 return ret;
87}
88
89static inline long kvm_hypercall2(unsigned int nr, unsigned long p1,
90 unsigned long p2)
91{
92 long ret;
93 asm volatile(KVM_HYPERCALL
94 : "=a"(ret)
95 : "a"(nr), "b"(p1), "c"(p2)
96 : "memory");
97 return ret;
98}
99
100static inline long kvm_hypercall3(unsigned int nr, unsigned long p1,
101 unsigned long p2, unsigned long p3)
102{
103 long ret;
104 asm volatile(KVM_HYPERCALL
105 : "=a"(ret)
106 : "a"(nr), "b"(p1), "c"(p2), "d"(p3)
107 : "memory");
108 return ret;
109}
110
111static inline long kvm_hypercall4(unsigned int nr, unsigned long p1,
112 unsigned long p2, unsigned long p3,
113 unsigned long p4)
114{
115 long ret;
116 asm volatile(KVM_HYPERCALL
117 : "=a"(ret)
118 : "a"(nr), "b"(p1), "c"(p2), "d"(p3), "S"(p4)
119 : "memory");
120 return ret;
121}
122
123static inline int kvm_para_available(void)
124{
125 unsigned int eax, ebx, ecx, edx;
126 char signature[13];
127
128 cpuid(KVM_CPUID_SIGNATURE, &eax, &ebx, &ecx, &edx);
129 memcpy(signature + 0, &ebx, 4);
130 memcpy(signature + 4, &ecx, 4);
131 memcpy(signature + 8, &edx, 4);
132 signature[12] = 0;
133
134 if (strcmp(signature, "KVMKVMKVM") == 0)
135 return 1;
136
137 return 0;
138}
139
140static inline unsigned int kvm_arch_para_features(void)
141{
142 return cpuid_eax(KVM_CPUID_FEATURES);
143}
144
145#endif
146
147#endif /* ASM_X86__KVM_PARA_H */
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h
deleted file mode 100644
index e2d9b030c1ac..000000000000
--- a/include/asm-x86/kvm_x86_emulate.h
+++ /dev/null
@@ -1,184 +0,0 @@
1/******************************************************************************
2 * x86_emulate.h
3 *
4 * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
5 *
6 * Copyright (c) 2005 Keir Fraser
7 *
8 * From: xen-unstable 10676:af9809f51f81a3c43f276f00c81a52ef558afda4
9 */
10
11#ifndef ASM_X86__KVM_X86_EMULATE_H
12#define ASM_X86__KVM_X86_EMULATE_H
13
14struct x86_emulate_ctxt;
15
16/*
17 * x86_emulate_ops:
18 *
19 * These operations represent the instruction emulator's interface to memory.
20 * There are two categories of operation: those that act on ordinary memory
21 * regions (*_std), and those that act on memory regions known to require
22 * special treatment or emulation (*_emulated).
23 *
24 * The emulator assumes that an instruction accesses only one 'emulated memory'
25 * location, that this location is the given linear faulting address (cr2), and
26 * that this is one of the instruction's data operands. Instruction fetches and
27 * stack operations are assumed never to access emulated memory. The emulator
28 * automatically deduces which operand of a string-move operation is accessing
29 * emulated memory, and assumes that the other operand accesses normal memory.
30 *
31 * NOTES:
32 * 1. The emulator isn't very smart about emulated vs. standard memory.
33 * 'Emulated memory' access addresses should be checked for sanity.
34 * 'Normal memory' accesses may fault, and the caller must arrange to
35 * detect and handle reentrancy into the emulator via recursive faults.
36 * Accesses may be unaligned and may cross page boundaries.
37 * 2. If the access fails (cannot emulate, or a standard access faults) then
38 * it is up to the memop to propagate the fault to the guest VM via
39 * some out-of-band mechanism, unknown to the emulator. The memop signals
40 * failure by returning X86EMUL_PROPAGATE_FAULT to the emulator, which will
41 * then immediately bail.
42 * 3. Valid access sizes are 1, 2, 4 and 8 bytes. On x86/32 systems only
43 * cmpxchg8b_emulated need support 8-byte accesses.
44 * 4. The emulator cannot handle 64-bit mode emulation on an x86/32 system.
45 */
46/* Access completed successfully: continue emulation as normal. */
47#define X86EMUL_CONTINUE 0
48/* Access is unhandleable: bail from emulation and return error to caller. */
49#define X86EMUL_UNHANDLEABLE 1
50/* Terminate emulation but return success to the caller. */
51#define X86EMUL_PROPAGATE_FAULT 2 /* propagate a generated fault to guest */
52#define X86EMUL_RETRY_INSTR 2 /* retry the instruction for some reason */
53#define X86EMUL_CMPXCHG_FAILED 2 /* cmpxchg did not see expected value */
54struct x86_emulate_ops {
55 /*
56 * read_std: Read bytes of standard (non-emulated/special) memory.
57 * Used for instruction fetch, stack operations, and others.
58 * @addr: [IN ] Linear address from which to read.
59 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
60 * @bytes: [IN ] Number of bytes to read from memory.
61 */
62 int (*read_std)(unsigned long addr, void *val,
63 unsigned int bytes, struct kvm_vcpu *vcpu);
64
65 /*
66 * read_emulated: Read bytes from emulated/special memory area.
67 * @addr: [IN ] Linear address from which to read.
68 * @val: [OUT] Value read from memory, zero-extended to 'u_long'.
69 * @bytes: [IN ] Number of bytes to read from memory.
70 */
71 int (*read_emulated)(unsigned long addr,
72 void *val,
73 unsigned int bytes,
74 struct kvm_vcpu *vcpu);
75
76 /*
77 * write_emulated: Read bytes from emulated/special memory area.
78 * @addr: [IN ] Linear address to which to write.
79 * @val: [IN ] Value to write to memory (low-order bytes used as
80 * required).
81 * @bytes: [IN ] Number of bytes to write to memory.
82 */
83 int (*write_emulated)(unsigned long addr,
84 const void *val,
85 unsigned int bytes,
86 struct kvm_vcpu *vcpu);
87
88 /*
89 * cmpxchg_emulated: Emulate an atomic (LOCKed) CMPXCHG operation on an
90 * emulated/special memory area.
91 * @addr: [IN ] Linear address to access.
92 * @old: [IN ] Value expected to be current at @addr.
93 * @new: [IN ] Value to write to @addr.
94 * @bytes: [IN ] Number of bytes to access using CMPXCHG.
95 */
96 int (*cmpxchg_emulated)(unsigned long addr,
97 const void *old,
98 const void *new,
99 unsigned int bytes,
100 struct kvm_vcpu *vcpu);
101
102};
103
104/* Type, address-of, and value of an instruction's operand. */
105struct operand {
106 enum { OP_REG, OP_MEM, OP_IMM, OP_NONE } type;
107 unsigned int bytes;
108 unsigned long val, orig_val, *ptr;
109};
110
111struct fetch_cache {
112 u8 data[15];
113 unsigned long start;
114 unsigned long end;
115};
116
117struct decode_cache {
118 u8 twobyte;
119 u8 b;
120 u8 lock_prefix;
121 u8 rep_prefix;
122 u8 op_bytes;
123 u8 ad_bytes;
124 u8 rex_prefix;
125 struct operand src;
126 struct operand dst;
127 bool has_seg_override;
128 u8 seg_override;
129 unsigned int d;
130 unsigned long regs[NR_VCPU_REGS];
131 unsigned long eip;
132 /* modrm */
133 u8 modrm;
134 u8 modrm_mod;
135 u8 modrm_reg;
136 u8 modrm_rm;
137 u8 use_modrm_ea;
138 bool rip_relative;
139 unsigned long modrm_ea;
140 void *modrm_ptr;
141 unsigned long modrm_val;
142 struct fetch_cache fetch;
143};
144
145struct x86_emulate_ctxt {
146 /* Register state before/after emulation. */
147 struct kvm_vcpu *vcpu;
148
149 /* Linear faulting address (if emulating a page-faulting instruction) */
150 unsigned long eflags;
151
152 /* Emulated execution mode, represented by an X86EMUL_MODE value. */
153 int mode;
154
155 u32 cs_base;
156
157 /* decode cache */
158
159 struct decode_cache decode;
160};
161
162/* Repeat String Operation Prefix */
163#define REPE_PREFIX 1
164#define REPNE_PREFIX 2
165
166/* Execution mode, passed to the emulator. */
167#define X86EMUL_MODE_REAL 0 /* Real mode. */
168#define X86EMUL_MODE_PROT16 2 /* 16-bit protected mode. */
169#define X86EMUL_MODE_PROT32 4 /* 32-bit protected mode. */
170#define X86EMUL_MODE_PROT64 8 /* 64-bit (long) mode. */
171
172/* Host execution mode. */
173#if defined(__i386__)
174#define X86EMUL_MODE_HOST X86EMUL_MODE_PROT32
175#elif defined(CONFIG_X86_64)
176#define X86EMUL_MODE_HOST X86EMUL_MODE_PROT64
177#endif
178
179int x86_decode_insn(struct x86_emulate_ctxt *ctxt,
180 struct x86_emulate_ops *ops);
181int x86_emulate_insn(struct x86_emulate_ctxt *ctxt,
182 struct x86_emulate_ops *ops);
183
184#endif /* ASM_X86__KVM_X86_EMULATE_H */
diff --git a/include/asm-x86/ldt.h b/include/asm-x86/ldt.h
deleted file mode 100644
index a5228504d867..000000000000
--- a/include/asm-x86/ldt.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * ldt.h
3 *
4 * Definitions of structures used with the modify_ldt system call.
5 */
6#ifndef ASM_X86__LDT_H
7#define ASM_X86__LDT_H
8
9/* Maximum number of LDT entries supported. */
10#define LDT_ENTRIES 8192
11/* The size of each LDT entry. */
12#define LDT_ENTRY_SIZE 8
13
14#ifndef __ASSEMBLY__
15/*
16 * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
17 * not to the default values if you still want to do syscalls. This
18 * call is more for 32bit mode therefore.
19 */
20struct user_desc {
21 unsigned int entry_number;
22 unsigned int base_addr;
23 unsigned int limit;
24 unsigned int seg_32bit:1;
25 unsigned int contents:2;
26 unsigned int read_exec_only:1;
27 unsigned int limit_in_pages:1;
28 unsigned int seg_not_present:1;
29 unsigned int useable:1;
30#ifdef __x86_64__
31 unsigned int lm:1;
32#endif
33};
34
35#define MODIFY_LDT_CONTENTS_DATA 0
36#define MODIFY_LDT_CONTENTS_STACK 1
37#define MODIFY_LDT_CONTENTS_CODE 2
38
39#endif /* !__ASSEMBLY__ */
40#endif /* ASM_X86__LDT_H */
diff --git a/include/asm-x86/lguest.h b/include/asm-x86/lguest.h
deleted file mode 100644
index 7505e947ed27..000000000000
--- a/include/asm-x86/lguest.h
+++ /dev/null
@@ -1,94 +0,0 @@
1#ifndef ASM_X86__LGUEST_H
2#define ASM_X86__LGUEST_H
3
4#define GDT_ENTRY_LGUEST_CS 10
5#define GDT_ENTRY_LGUEST_DS 11
6#define LGUEST_CS (GDT_ENTRY_LGUEST_CS * 8)
7#define LGUEST_DS (GDT_ENTRY_LGUEST_DS * 8)
8
9#ifndef __ASSEMBLY__
10#include <asm/desc.h>
11
12#define GUEST_PL 1
13
14/* Every guest maps the core switcher code. */
15#define SHARED_SWITCHER_PAGES \
16 DIV_ROUND_UP(end_switcher_text - start_switcher_text, PAGE_SIZE)
17/* Pages for switcher itself, then two pages per cpu */
18#define TOTAL_SWITCHER_PAGES (SHARED_SWITCHER_PAGES + 2 * NR_CPUS)
19
20/* We map at -4M for ease of mapping into the guest (one PTE page). */
21#define SWITCHER_ADDR 0xFFC00000
22
23/* Found in switcher.S */
24extern unsigned long default_idt_entries[];
25
26/* Declarations for definitions in lguest_guest.S */
27extern char lguest_noirq_start[], lguest_noirq_end[];
28extern const char lgstart_cli[], lgend_cli[];
29extern const char lgstart_sti[], lgend_sti[];
30extern const char lgstart_popf[], lgend_popf[];
31extern const char lgstart_pushf[], lgend_pushf[];
32extern const char lgstart_iret[], lgend_iret[];
33
34extern void lguest_iret(void);
35extern void lguest_init(void);
36
37struct lguest_regs {
38 /* Manually saved part. */
39 unsigned long eax, ebx, ecx, edx;
40 unsigned long esi, edi, ebp;
41 unsigned long gs;
42 unsigned long fs, ds, es;
43 unsigned long trapnum, errcode;
44 /* Trap pushed part */
45 unsigned long eip;
46 unsigned long cs;
47 unsigned long eflags;
48 unsigned long esp;
49 unsigned long ss;
50};
51
52/* This is a guest-specific page (mapped ro) into the guest. */
53struct lguest_ro_state {
54 /* Host information we need to restore when we switch back. */
55 u32 host_cr3;
56 struct desc_ptr host_idt_desc;
57 struct desc_ptr host_gdt_desc;
58 u32 host_sp;
59
60 /* Fields which are used when guest is running. */
61 struct desc_ptr guest_idt_desc;
62 struct desc_ptr guest_gdt_desc;
63 struct x86_hw_tss guest_tss;
64 struct desc_struct guest_idt[IDT_ENTRIES];
65 struct desc_struct guest_gdt[GDT_ENTRIES];
66};
67
68struct lg_cpu_arch {
69 /* The GDT entries copied into lguest_ro_state when running. */
70 struct desc_struct gdt[GDT_ENTRIES];
71
72 /* The IDT entries: some copied into lguest_ro_state when running. */
73 struct desc_struct idt[IDT_ENTRIES];
74
75 /* The address of the last guest-visible pagefault (ie. cr2). */
76 unsigned long last_pagefault;
77};
78
79static inline void lguest_set_ts(void)
80{
81 u32 cr0;
82
83 cr0 = read_cr0();
84 if (!(cr0 & 8))
85 write_cr0(cr0 | 8);
86}
87
88/* Full 4G segment descriptors, suitable for CS and DS. */
89#define FULL_EXEC_SEGMENT ((struct desc_struct){ { {0x0000ffff, 0x00cf9b00} } })
90#define FULL_SEGMENT ((struct desc_struct){ { {0x0000ffff, 0x00cf9300} } })
91
92#endif /* __ASSEMBLY__ */
93
94#endif /* ASM_X86__LGUEST_H */
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h
deleted file mode 100644
index 8f034ba4b53e..000000000000
--- a/include/asm-x86/lguest_hcall.h
+++ /dev/null
@@ -1,71 +0,0 @@
1/* Architecture specific portion of the lguest hypercalls */
2#ifndef ASM_X86__LGUEST_HCALL_H
3#define ASM_X86__LGUEST_HCALL_H
4
5#define LHCALL_FLUSH_ASYNC 0
6#define LHCALL_LGUEST_INIT 1
7#define LHCALL_SHUTDOWN 2
8#define LHCALL_LOAD_GDT 3
9#define LHCALL_NEW_PGTABLE 4
10#define LHCALL_FLUSH_TLB 5
11#define LHCALL_LOAD_IDT_ENTRY 6
12#define LHCALL_SET_STACK 7
13#define LHCALL_TS 8
14#define LHCALL_SET_CLOCKEVENT 9
15#define LHCALL_HALT 10
16#define LHCALL_SET_PTE 14
17#define LHCALL_SET_PMD 15
18#define LHCALL_LOAD_TLS 16
19#define LHCALL_NOTIFY 17
20
21#define LGUEST_TRAP_ENTRY 0x1F
22
23/* Argument number 3 to LHCALL_LGUEST_SHUTDOWN */
24#define LGUEST_SHUTDOWN_POWEROFF 1
25#define LGUEST_SHUTDOWN_RESTART 2
26
27#ifndef __ASSEMBLY__
28#include <asm/hw_irq.h>
29
30/*G:031 But first, how does our Guest contact the Host to ask for privileged
31 * operations? There are two ways: the direct way is to make a "hypercall",
32 * to make requests of the Host Itself.
33 *
34 * Our hypercall mechanism uses the highest unused trap code (traps 32 and
35 * above are used by real hardware interrupts). Fifteen hypercalls are
36 * available: the hypercall number is put in the %eax register, and the
37 * arguments (when required) are placed in %edx, %ebx and %ecx. If a return
38 * value makes sense, it's returned in %eax.
39 *
40 * Grossly invalid calls result in Sudden Death at the hands of the vengeful
41 * Host, rather than returning failure. This reflects Winston Churchill's
42 * definition of a gentleman: "someone who is only rude intentionally". */
43static inline unsigned long
44hcall(unsigned long call,
45 unsigned long arg1, unsigned long arg2, unsigned long arg3)
46{
47 /* "int" is the Intel instruction to trigger a trap. */
48 asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY)
49 /* The call in %eax (aka "a") might be overwritten */
50 : "=a"(call)
51 /* The arguments are in %eax, %edx, %ebx & %ecx */
52 : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3)
53 /* "memory" means this might write somewhere in memory.
54 * This isn't true for all calls, but it's safe to tell
55 * gcc that it might happen so it doesn't get clever. */
56 : "memory");
57 return call;
58}
59/*:*/
60
61/* Can't use our min() macro here: needs to be a constant */
62#define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32)
63
64#define LHCALL_RING_SIZE 64
65struct hcall_args {
66 /* These map directly onto eax, ebx, ecx, edx in struct lguest_regs */
67 unsigned long arg0, arg2, arg3, arg1;
68};
69
70#endif /* !__ASSEMBLY__ */
71#endif /* ASM_X86__LGUEST_HCALL_H */
diff --git a/include/asm-x86/linkage.h b/include/asm-x86/linkage.h
deleted file mode 100644
index 42d8b62ee8ab..000000000000
--- a/include/asm-x86/linkage.h
+++ /dev/null
@@ -1,61 +0,0 @@
1#ifndef ASM_X86__LINKAGE_H
2#define ASM_X86__LINKAGE_H
3
4#undef notrace
5#define notrace __attribute__((no_instrument_function))
6
7#ifdef CONFIG_X86_64
8#define __ALIGN .p2align 4,,15
9#define __ALIGN_STR ".p2align 4,,15"
10#endif
11
12#ifdef CONFIG_X86_32
13#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
14/*
15 * For 32-bit UML - mark functions implemented in assembly that use
16 * regparm input parameters:
17 */
18#define asmregparm __attribute__((regparm(3)))
19
20/*
21 * Make sure the compiler doesn't do anything stupid with the
22 * arguments on the stack - they are owned by the *caller*, not
23 * the callee. This just fools gcc into not spilling into them,
24 * and keeps it from doing tailcall recursion and/or using the
25 * stack slots for temporaries, since they are live and "used"
26 * all the way to the end of the function.
27 *
28 * NOTE! On x86-64, all the arguments are in registers, so this
29 * only matters on a 32-bit kernel.
30 */
31#define asmlinkage_protect(n, ret, args...) \
32 __asmlinkage_protect##n(ret, ##args)
33#define __asmlinkage_protect_n(ret, args...) \
34 __asm__ __volatile__ ("" : "=r" (ret) : "0" (ret), ##args)
35#define __asmlinkage_protect0(ret) \
36 __asmlinkage_protect_n(ret)
37#define __asmlinkage_protect1(ret, arg1) \
38 __asmlinkage_protect_n(ret, "g" (arg1))
39#define __asmlinkage_protect2(ret, arg1, arg2) \
40 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2))
41#define __asmlinkage_protect3(ret, arg1, arg2, arg3) \
42 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3))
43#define __asmlinkage_protect4(ret, arg1, arg2, arg3, arg4) \
44 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \
45 "g" (arg4))
46#define __asmlinkage_protect5(ret, arg1, arg2, arg3, arg4, arg5) \
47 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \
48 "g" (arg4), "g" (arg5))
49#define __asmlinkage_protect6(ret, arg1, arg2, arg3, arg4, arg5, arg6) \
50 __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \
51 "g" (arg4), "g" (arg5), "g" (arg6))
52
53#endif
54
55#ifdef CONFIG_X86_ALIGNMENT_16
56#define __ALIGN .align 16,0x90
57#define __ALIGN_STR ".align 16,0x90"
58#endif
59
60#endif /* ASM_X86__LINKAGE_H */
61
diff --git a/include/asm-x86/local.h b/include/asm-x86/local.h
deleted file mode 100644
index ae91994fd6c9..000000000000
--- a/include/asm-x86/local.h
+++ /dev/null
@@ -1,235 +0,0 @@
1#ifndef ASM_X86__LOCAL_H
2#define ASM_X86__LOCAL_H
3
4#include <linux/percpu.h>
5
6#include <asm/system.h>
7#include <asm/atomic.h>
8#include <asm/asm.h>
9
10typedef struct {
11 atomic_long_t a;
12} local_t;
13
14#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
15
16#define local_read(l) atomic_long_read(&(l)->a)
17#define local_set(l, i) atomic_long_set(&(l)->a, (i))
18
19static inline void local_inc(local_t *l)
20{
21 asm volatile(_ASM_INC "%0"
22 : "+m" (l->a.counter));
23}
24
25static inline void local_dec(local_t *l)
26{
27 asm volatile(_ASM_DEC "%0"
28 : "+m" (l->a.counter));
29}
30
31static inline void local_add(long i, local_t *l)
32{
33 asm volatile(_ASM_ADD "%1,%0"
34 : "+m" (l->a.counter)
35 : "ir" (i));
36}
37
38static inline void local_sub(long i, local_t *l)
39{
40 asm volatile(_ASM_SUB "%1,%0"
41 : "+m" (l->a.counter)
42 : "ir" (i));
43}
44
45/**
46 * local_sub_and_test - subtract value from variable and test result
47 * @i: integer value to subtract
48 * @l: pointer to type local_t
49 *
50 * Atomically subtracts @i from @l and returns
51 * true if the result is zero, or false for all
52 * other cases.
53 */
54static inline int local_sub_and_test(long i, local_t *l)
55{
56 unsigned char c;
57
58 asm volatile(_ASM_SUB "%2,%0; sete %1"
59 : "+m" (l->a.counter), "=qm" (c)
60 : "ir" (i) : "memory");
61 return c;
62}
63
64/**
65 * local_dec_and_test - decrement and test
66 * @l: pointer to type local_t
67 *
68 * Atomically decrements @l by 1 and
69 * returns true if the result is 0, or false for all other
70 * cases.
71 */
72static inline int local_dec_and_test(local_t *l)
73{
74 unsigned char c;
75
76 asm volatile(_ASM_DEC "%0; sete %1"
77 : "+m" (l->a.counter), "=qm" (c)
78 : : "memory");
79 return c != 0;
80}
81
82/**
83 * local_inc_and_test - increment and test
84 * @l: pointer to type local_t
85 *
86 * Atomically increments @l by 1
87 * and returns true if the result is zero, or false for all
88 * other cases.
89 */
90static inline int local_inc_and_test(local_t *l)
91{
92 unsigned char c;
93
94 asm volatile(_ASM_INC "%0; sete %1"
95 : "+m" (l->a.counter), "=qm" (c)
96 : : "memory");
97 return c != 0;
98}
99
100/**
101 * local_add_negative - add and test if negative
102 * @i: integer value to add
103 * @l: pointer to type local_t
104 *
105 * Atomically adds @i to @l and returns true
106 * if the result is negative, or false when
107 * result is greater than or equal to zero.
108 */
109static inline int local_add_negative(long i, local_t *l)
110{
111 unsigned char c;
112
113 asm volatile(_ASM_ADD "%2,%0; sets %1"
114 : "+m" (l->a.counter), "=qm" (c)
115 : "ir" (i) : "memory");
116 return c;
117}
118
119/**
120 * local_add_return - add and return
121 * @i: integer value to add
122 * @l: pointer to type local_t
123 *
124 * Atomically adds @i to @l and returns @i + @l
125 */
126static inline long local_add_return(long i, local_t *l)
127{
128 long __i;
129#ifdef CONFIG_M386
130 unsigned long flags;
131 if (unlikely(boot_cpu_data.x86 <= 3))
132 goto no_xadd;
133#endif
134 /* Modern 486+ processor */
135 __i = i;
136 asm volatile(_ASM_XADD "%0, %1;"
137 : "+r" (i), "+m" (l->a.counter)
138 : : "memory");
139 return i + __i;
140
141#ifdef CONFIG_M386
142no_xadd: /* Legacy 386 processor */
143 local_irq_save(flags);
144 __i = local_read(l);
145 local_set(l, i + __i);
146 local_irq_restore(flags);
147 return i + __i;
148#endif
149}
150
151static inline long local_sub_return(long i, local_t *l)
152{
153 return local_add_return(-i, l);
154}
155
156#define local_inc_return(l) (local_add_return(1, l))
157#define local_dec_return(l) (local_sub_return(1, l))
158
159#define local_cmpxchg(l, o, n) \
160 (cmpxchg_local(&((l)->a.counter), (o), (n)))
161/* Always has a lock prefix */
162#define local_xchg(l, n) (xchg(&((l)->a.counter), (n)))
163
164/**
165 * local_add_unless - add unless the number is a given value
166 * @l: pointer of type local_t
167 * @a: the amount to add to l...
168 * @u: ...unless l is equal to u.
169 *
170 * Atomically adds @a to @l, so long as it was not @u.
171 * Returns non-zero if @l was not @u, and zero otherwise.
172 */
173#define local_add_unless(l, a, u) \
174({ \
175 long c, old; \
176 c = local_read((l)); \
177 for (;;) { \
178 if (unlikely(c == (u))) \
179 break; \
180 old = local_cmpxchg((l), c, c + (a)); \
181 if (likely(old == c)) \
182 break; \
183 c = old; \
184 } \
185 c != (u); \
186})
187#define local_inc_not_zero(l) local_add_unless((l), 1, 0)
188
189/* On x86_32, these are no better than the atomic variants.
190 * On x86-64 these are better than the atomic variants on SMP kernels
191 * because they dont use a lock prefix.
192 */
193#define __local_inc(l) local_inc(l)
194#define __local_dec(l) local_dec(l)
195#define __local_add(i, l) local_add((i), (l))
196#define __local_sub(i, l) local_sub((i), (l))
197
198/* Use these for per-cpu local_t variables: on some archs they are
199 * much more efficient than these naive implementations. Note they take
200 * a variable, not an address.
201 *
202 * X86_64: This could be done better if we moved the per cpu data directly
203 * after GS.
204 */
205
206/* Need to disable preemption for the cpu local counters otherwise we could
207 still access a variable of a previous CPU in a non atomic way. */
208#define cpu_local_wrap_v(l) \
209({ \
210 local_t res__; \
211 preempt_disable(); \
212 res__ = (l); \
213 preempt_enable(); \
214 res__; \
215})
216#define cpu_local_wrap(l) \
217({ \
218 preempt_disable(); \
219 (l); \
220 preempt_enable(); \
221}) \
222
223#define cpu_local_read(l) cpu_local_wrap_v(local_read(&__get_cpu_var((l))))
224#define cpu_local_set(l, i) cpu_local_wrap(local_set(&__get_cpu_var((l)), (i)))
225#define cpu_local_inc(l) cpu_local_wrap(local_inc(&__get_cpu_var((l))))
226#define cpu_local_dec(l) cpu_local_wrap(local_dec(&__get_cpu_var((l))))
227#define cpu_local_add(i, l) cpu_local_wrap(local_add((i), &__get_cpu_var((l))))
228#define cpu_local_sub(i, l) cpu_local_wrap(local_sub((i), &__get_cpu_var((l))))
229
230#define __cpu_local_inc(l) cpu_local_inc((l))
231#define __cpu_local_dec(l) cpu_local_dec((l))
232#define __cpu_local_add(i, l) cpu_local_add((i), (l))
233#define __cpu_local_sub(i, l) cpu_local_sub((i), (l))
234
235#endif /* ASM_X86__LOCAL_H */
diff --git a/include/asm-x86/mach-default/apm.h b/include/asm-x86/mach-default/apm.h
deleted file mode 100644
index 2aa61b54fbd5..000000000000
--- a/include/asm-x86/mach-default/apm.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * Machine specific APM BIOS functions for generic.
3 * Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp>
4 */
5
6#ifndef ASM_X86__MACH_DEFAULT__APM_H
7#define ASM_X86__MACH_DEFAULT__APM_H
8
9#ifdef APM_ZERO_SEGS
10# define APM_DO_ZERO_SEGS \
11 "pushl %%ds\n\t" \
12 "pushl %%es\n\t" \
13 "xorl %%edx, %%edx\n\t" \
14 "mov %%dx, %%ds\n\t" \
15 "mov %%dx, %%es\n\t" \
16 "mov %%dx, %%fs\n\t" \
17 "mov %%dx, %%gs\n\t"
18# define APM_DO_POP_SEGS \
19 "popl %%es\n\t" \
20 "popl %%ds\n\t"
21#else
22# define APM_DO_ZERO_SEGS
23# define APM_DO_POP_SEGS
24#endif
25
26static inline void apm_bios_call_asm(u32 func, u32 ebx_in, u32 ecx_in,
27 u32 *eax, u32 *ebx, u32 *ecx,
28 u32 *edx, u32 *esi)
29{
30 /*
31 * N.B. We do NOT need a cld after the BIOS call
32 * because we always save and restore the flags.
33 */
34 __asm__ __volatile__(APM_DO_ZERO_SEGS
35 "pushl %%edi\n\t"
36 "pushl %%ebp\n\t"
37 "lcall *%%cs:apm_bios_entry\n\t"
38 "setc %%al\n\t"
39 "popl %%ebp\n\t"
40 "popl %%edi\n\t"
41 APM_DO_POP_SEGS
42 : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx),
43 "=S" (*esi)
44 : "a" (func), "b" (ebx_in), "c" (ecx_in)
45 : "memory", "cc");
46}
47
48static inline u8 apm_bios_call_simple_asm(u32 func, u32 ebx_in,
49 u32 ecx_in, u32 *eax)
50{
51 int cx, dx, si;
52 u8 error;
53
54 /*
55 * N.B. We do NOT need a cld after the BIOS call
56 * because we always save and restore the flags.
57 */
58 __asm__ __volatile__(APM_DO_ZERO_SEGS
59 "pushl %%edi\n\t"
60 "pushl %%ebp\n\t"
61 "lcall *%%cs:apm_bios_entry\n\t"
62 "setc %%bl\n\t"
63 "popl %%ebp\n\t"
64 "popl %%edi\n\t"
65 APM_DO_POP_SEGS
66 : "=a" (*eax), "=b" (error), "=c" (cx), "=d" (dx),
67 "=S" (si)
68 : "a" (func), "b" (ebx_in), "c" (ecx_in)
69 : "memory", "cc");
70 return error;
71}
72
73#endif /* ASM_X86__MACH_DEFAULT__APM_H */
diff --git a/include/asm-x86/mach-default/do_timer.h b/include/asm-x86/mach-default/do_timer.h
deleted file mode 100644
index 23ecda0b28a0..000000000000
--- a/include/asm-x86/mach-default/do_timer.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/* defines for inline arch setup functions */
2#include <linux/clockchips.h>
3
4#include <asm/i8259.h>
5#include <asm/i8253.h>
6
7/**
8 * do_timer_interrupt_hook - hook into timer tick
9 *
10 * Call the pit clock event handler. see asm/i8253.h
11 **/
12
13static inline void do_timer_interrupt_hook(void)
14{
15 global_clock_event->event_handler(global_clock_event);
16}
diff --git a/include/asm-x86/mach-default/entry_arch.h b/include/asm-x86/mach-default/entry_arch.h
deleted file mode 100644
index 9283b60a1dd2..000000000000
--- a/include/asm-x86/mach-default/entry_arch.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * This file is designed to contain the BUILD_INTERRUPT specifications for
3 * all of the extra named interrupt vectors used by the architecture.
4 * Usually this is the Inter Process Interrupts (IPIs)
5 */
6
7/*
8 * The following vectors are part of the Linux architecture, there
9 * is no hardware IRQ pin equivalent for them, they are triggered
10 * through the ICC by us (IPIs)
11 */
12#ifdef CONFIG_X86_SMP
13BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR)
14BUILD_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR)
15BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR)
16BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR)
17#endif
18
19/*
20 * every pentium local APIC has two 'local interrupts', with a
21 * soft-definable vector attached to both interrupts, one of
22 * which is a timer interrupt, the other one is error counter
23 * overflow. Linux uses the local APIC timer interrupt to get
24 * a much simpler SMP time architecture:
25 */
26#ifdef CONFIG_X86_LOCAL_APIC
27BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR)
28BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR)
29BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR)
30
31#ifdef CONFIG_X86_MCE_P4THERMAL
32BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR)
33#endif
34
35#endif
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h
deleted file mode 100644
index 2a330a41b3dd..000000000000
--- a/include/asm-x86/mach-default/mach_apic.h
+++ /dev/null
@@ -1,143 +0,0 @@
1#ifndef ASM_X86__MACH_DEFAULT__MACH_APIC_H
2#define ASM_X86__MACH_DEFAULT__MACH_APIC_H
3
4#ifdef CONFIG_X86_LOCAL_APIC
5
6#include <mach_apicdef.h>
7#include <asm/smp.h>
8
9#define APIC_DFR_VALUE (APIC_DFR_FLAT)
10
11static inline cpumask_t target_cpus(void)
12{
13#ifdef CONFIG_SMP
14 return cpu_online_map;
15#else
16 return cpumask_of_cpu(0);
17#endif
18}
19
20#define NO_BALANCE_IRQ (0)
21#define esr_disable (0)
22
23#ifdef CONFIG_X86_64
24#include <asm/genapic.h>
25#define INT_DELIVERY_MODE (genapic->int_delivery_mode)
26#define INT_DEST_MODE (genapic->int_dest_mode)
27#define TARGET_CPUS (genapic->target_cpus())
28#define apic_id_registered (genapic->apic_id_registered)
29#define init_apic_ldr (genapic->init_apic_ldr)
30#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
31#define phys_pkg_id (genapic->phys_pkg_id)
32#define vector_allocation_domain (genapic->vector_allocation_domain)
33#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
34#define send_IPI_self (genapic->send_IPI_self)
35extern void setup_apic_routing(void);
36#else
37#define INT_DELIVERY_MODE dest_LowestPrio
38#define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */
39#define TARGET_CPUS (target_cpus())
40/*
41 * Set up the logical destination ID.
42 *
43 * Intel recommends to set DFR, LDR and TPR before enabling
44 * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
45 * document number 292116). So here it goes...
46 */
47static inline void init_apic_ldr(void)
48{
49 unsigned long val;
50
51 apic_write(APIC_DFR, APIC_DFR_VALUE);
52 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
53 val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
54 apic_write(APIC_LDR, val);
55}
56
57static inline int apic_id_registered(void)
58{
59 return physid_isset(read_apic_id(), phys_cpu_present_map);
60}
61
62static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
63{
64 return cpus_addr(cpumask)[0];
65}
66
67static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
68{
69 return cpuid_apic >> index_msb;
70}
71
72static inline void setup_apic_routing(void)
73{
74#ifdef CONFIG_X86_IO_APIC
75 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
76 "Flat", nr_ioapics);
77#endif
78}
79
80static inline int apicid_to_node(int logical_apicid)
81{
82#ifdef CONFIG_SMP
83 return apicid_2_node[hard_smp_processor_id()];
84#else
85 return 0;
86#endif
87}
88#endif
89
90static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
91{
92 return physid_isset(apicid, bitmap);
93}
94
95static inline unsigned long check_apicid_present(int bit)
96{
97 return physid_isset(bit, phys_cpu_present_map);
98}
99
100static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
101{
102 return phys_map;
103}
104
105static inline int multi_timer_check(int apic, int irq)
106{
107 return 0;
108}
109
110/* Mapping from cpu number to logical apicid */
111static inline int cpu_to_logical_apicid(int cpu)
112{
113 return 1 << cpu;
114}
115
116static inline int cpu_present_to_apicid(int mps_cpu)
117{
118 if (mps_cpu < NR_CPUS && cpu_present(mps_cpu))
119 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
120 else
121 return BAD_APICID;
122}
123
124static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
125{
126 return physid_mask_of_physid(phys_apicid);
127}
128
129static inline void setup_portio_remap(void)
130{
131}
132
133static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
134{
135 return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
136}
137
138static inline void enable_apic_mode(void)
139{
140}
141
142#endif /* CONFIG_X86_LOCAL_APIC */
143#endif /* ASM_X86__MACH_DEFAULT__MACH_APIC_H */
diff --git a/include/asm-x86/mach-default/mach_apicdef.h b/include/asm-x86/mach-default/mach_apicdef.h
deleted file mode 100644
index 0c2d41c41b20..000000000000
--- a/include/asm-x86/mach-default/mach_apicdef.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef ASM_X86__MACH_DEFAULT__MACH_APICDEF_H
2#define ASM_X86__MACH_DEFAULT__MACH_APICDEF_H
3
4#include <asm/apic.h>
5
6#ifdef CONFIG_X86_64
7#define APIC_ID_MASK (genapic->apic_id_mask)
8#define GET_APIC_ID(x) (genapic->get_apic_id(x))
9#define SET_APIC_ID(x) (genapic->set_apic_id(x))
10#else
11#define APIC_ID_MASK (0xF<<24)
12static inline unsigned get_apic_id(unsigned long x)
13{
14 unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
15 if (APIC_XAPIC(ver))
16 return (((x)>>24)&0xFF);
17 else
18 return (((x)>>24)&0xF);
19}
20
21#define GET_APIC_ID(x) get_apic_id(x)
22#endif
23
24#endif /* ASM_X86__MACH_DEFAULT__MACH_APICDEF_H */
diff --git a/include/asm-x86/mach-default/mach_ipi.h b/include/asm-x86/mach-default/mach_ipi.h
deleted file mode 100644
index 674bc7e50c35..000000000000
--- a/include/asm-x86/mach-default/mach_ipi.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef ASM_X86__MACH_DEFAULT__MACH_IPI_H
2#define ASM_X86__MACH_DEFAULT__MACH_IPI_H
3
4/* Avoid include hell */
5#define NMI_VECTOR 0x02
6
7void send_IPI_mask_bitmask(cpumask_t mask, int vector);
8void __send_IPI_shortcut(unsigned int shortcut, int vector);
9
10extern int no_broadcast;
11
12#ifdef CONFIG_X86_64
13#include <asm/genapic.h>
14#define send_IPI_mask (genapic->send_IPI_mask)
15#else
16static inline void send_IPI_mask(cpumask_t mask, int vector)
17{
18 send_IPI_mask_bitmask(mask, vector);
19}
20#endif
21
22static inline void __local_send_IPI_allbutself(int vector)
23{
24 if (no_broadcast || vector == NMI_VECTOR) {
25 cpumask_t mask = cpu_online_map;
26
27 cpu_clear(smp_processor_id(), mask);
28 send_IPI_mask(mask, vector);
29 } else
30 __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
31}
32
33static inline void __local_send_IPI_all(int vector)
34{
35 if (no_broadcast || vector == NMI_VECTOR)
36 send_IPI_mask(cpu_online_map, vector);
37 else
38 __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
39}
40
41#ifdef CONFIG_X86_64
42#define send_IPI_allbutself (genapic->send_IPI_allbutself)
43#define send_IPI_all (genapic->send_IPI_all)
44#else
45static inline void send_IPI_allbutself(int vector)
46{
47 /*
48 * if there are no other CPUs in the system then we get an APIC send
49 * error if we try to broadcast, thus avoid sending IPIs in this case.
50 */
51 if (!(num_online_cpus() > 1))
52 return;
53
54 __local_send_IPI_allbutself(vector);
55 return;
56}
57
58static inline void send_IPI_all(int vector)
59{
60 __local_send_IPI_all(vector);
61}
62#endif
63
64#endif /* ASM_X86__MACH_DEFAULT__MACH_IPI_H */
diff --git a/include/asm-x86/mach-default/mach_mpparse.h b/include/asm-x86/mach-default/mach_mpparse.h
deleted file mode 100644
index 9c381f2815ac..000000000000
--- a/include/asm-x86/mach-default/mach_mpparse.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H
2#define ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H
3
4static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
5 char *productid)
6{
7 return 0;
8}
9
10/* Hook from generic ACPI tables.c */
11static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
12{
13 return 0;
14}
15
16
17#endif /* ASM_X86__MACH_DEFAULT__MACH_MPPARSE_H */
diff --git a/include/asm-x86/mach-default/mach_mpspec.h b/include/asm-x86/mach-default/mach_mpspec.h
deleted file mode 100644
index d77646f011f1..000000000000
--- a/include/asm-x86/mach-default/mach_mpspec.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H
2#define ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H
3
4#define MAX_IRQ_SOURCES 256
5
6#if CONFIG_BASE_SMALL == 0
7#define MAX_MP_BUSSES 256
8#else
9#define MAX_MP_BUSSES 32
10#endif
11
12#endif /* ASM_X86__MACH_DEFAULT__MACH_MPSPEC_H */
diff --git a/include/asm-x86/mach-default/mach_timer.h b/include/asm-x86/mach-default/mach_timer.h
deleted file mode 100644
index 990b15833834..000000000000
--- a/include/asm-x86/mach-default/mach_timer.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * Machine specific calibrate_tsc() for generic.
3 * Split out from timer_tsc.c by Osamu Tomita <tomita@cinet.co.jp>
4 */
5/* ------ Calibrate the TSC -------
6 * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset().
7 * Too much 64-bit arithmetic here to do this cleanly in C, and for
8 * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2)
9 * output busy loop as low as possible. We avoid reading the CTC registers
10 * directly because of the awkward 8-bit access mechanism of the 82C54
11 * device.
12 */
13#ifndef ASM_X86__MACH_DEFAULT__MACH_TIMER_H
14#define ASM_X86__MACH_DEFAULT__MACH_TIMER_H
15
16#define CALIBRATE_TIME_MSEC 30 /* 30 msecs */
17#define CALIBRATE_LATCH \
18 ((CLOCK_TICK_RATE * CALIBRATE_TIME_MSEC + 1000/2)/1000)
19
20static inline void mach_prepare_counter(void)
21{
22 /* Set the Gate high, disable speaker */
23 outb((inb(0x61) & ~0x02) | 0x01, 0x61);
24
25 /*
26 * Now let's take care of CTC channel 2
27 *
28 * Set the Gate high, program CTC channel 2 for mode 0,
29 * (interrupt on terminal count mode), binary count,
30 * load 5 * LATCH count, (LSB and MSB) to begin countdown.
31 *
32 * Some devices need a delay here.
33 */
34 outb(0xb0, 0x43); /* binary, mode 0, LSB/MSB, Ch 2 */
35 outb_p(CALIBRATE_LATCH & 0xff, 0x42); /* LSB of count */
36 outb_p(CALIBRATE_LATCH >> 8, 0x42); /* MSB of count */
37}
38
39static inline void mach_countup(unsigned long *count_p)
40{
41 unsigned long count = 0;
42 do {
43 count++;
44 } while ((inb_p(0x61) & 0x20) == 0);
45 *count_p = count;
46}
47
48#endif /* ASM_X86__MACH_DEFAULT__MACH_TIMER_H */
diff --git a/include/asm-x86/mach-default/mach_traps.h b/include/asm-x86/mach-default/mach_traps.h
deleted file mode 100644
index ff8778f26b84..000000000000
--- a/include/asm-x86/mach-default/mach_traps.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Machine specific NMI handling for generic.
3 * Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp>
4 */
5#ifndef ASM_X86__MACH_DEFAULT__MACH_TRAPS_H
6#define ASM_X86__MACH_DEFAULT__MACH_TRAPS_H
7
8#include <asm/mc146818rtc.h>
9
10static inline unsigned char get_nmi_reason(void)
11{
12 return inb(0x61);
13}
14
15static inline void reassert_nmi(void)
16{
17 int old_reg = -1;
18
19 if (do_i_have_lock_cmos())
20 old_reg = current_lock_cmos_reg();
21 else
22 lock_cmos(0); /* register doesn't matter here */
23 outb(0x8f, 0x70);
24 inb(0x71); /* dummy */
25 outb(0x0f, 0x70);
26 inb(0x71); /* dummy */
27 if (old_reg >= 0)
28 outb(old_reg, 0x70);
29 else
30 unlock_cmos();
31}
32
33#endif /* ASM_X86__MACH_DEFAULT__MACH_TRAPS_H */
diff --git a/include/asm-x86/mach-default/mach_wakecpu.h b/include/asm-x86/mach-default/mach_wakecpu.h
deleted file mode 100644
index 361b810f5160..000000000000
--- a/include/asm-x86/mach-default/mach_wakecpu.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H
2#define ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H
3
4/*
5 * This file copes with machines that wakeup secondary CPUs by the
6 * INIT, INIT, STARTUP sequence.
7 */
8
9#define WAKE_SECONDARY_VIA_INIT
10
11#define TRAMPOLINE_LOW phys_to_virt(0x467)
12#define TRAMPOLINE_HIGH phys_to_virt(0x469)
13
14#define boot_cpu_apicid boot_cpu_physical_apicid
15
16static inline void wait_for_init_deassert(atomic_t *deassert)
17{
18 while (!atomic_read(deassert))
19 cpu_relax();
20 return;
21}
22
23/* Nothing to do for most platforms, since cleared by the INIT cycle */
24static inline void smp_callin_clear_local_apic(void)
25{
26}
27
28static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
29{
30}
31
32static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
33{
34}
35
36#if APIC_DEBUG
37 #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
38#else
39 #define inquire_remote_apic(apicid) {}
40#endif
41
42#endif /* ASM_X86__MACH_DEFAULT__MACH_WAKECPU_H */
diff --git a/include/asm-x86/mach-default/pci-functions.h b/include/asm-x86/mach-default/pci-functions.h
deleted file mode 100644
index ed0bab427354..000000000000
--- a/include/asm-x86/mach-default/pci-functions.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * PCI BIOS function numbering for conventional PCI BIOS
3 * systems
4 */
5
6#define PCIBIOS_PCI_FUNCTION_ID 0xb1XX
7#define PCIBIOS_PCI_BIOS_PRESENT 0xb101
8#define PCIBIOS_FIND_PCI_DEVICE 0xb102
9#define PCIBIOS_FIND_PCI_CLASS_CODE 0xb103
10#define PCIBIOS_GENERATE_SPECIAL_CYCLE 0xb106
11#define PCIBIOS_READ_CONFIG_BYTE 0xb108
12#define PCIBIOS_READ_CONFIG_WORD 0xb109
13#define PCIBIOS_READ_CONFIG_DWORD 0xb10a
14#define PCIBIOS_WRITE_CONFIG_BYTE 0xb10b
15#define PCIBIOS_WRITE_CONFIG_WORD 0xb10c
16#define PCIBIOS_WRITE_CONFIG_DWORD 0xb10d
17#define PCIBIOS_GET_ROUTING_OPTIONS 0xb10e
18#define PCIBIOS_SET_PCI_HW_INT 0xb10f
19
diff --git a/include/asm-x86/mach-default/setup_arch.h b/include/asm-x86/mach-default/setup_arch.h
deleted file mode 100644
index 38846208b548..000000000000
--- a/include/asm-x86/mach-default/setup_arch.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/* Hook to call BIOS initialisation function */
2
3/* no action for generic */
diff --git a/include/asm-x86/mach-default/smpboot_hooks.h b/include/asm-x86/mach-default/smpboot_hooks.h
deleted file mode 100644
index dbab36d64d48..000000000000
--- a/include/asm-x86/mach-default/smpboot_hooks.h
+++ /dev/null
@@ -1,59 +0,0 @@
1/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
2 * which needs to alter them. */
3
4static inline void smpboot_clear_io_apic_irqs(void)
5{
6#ifdef CONFIG_X86_IO_APIC
7 io_apic_irqs = 0;
8#endif
9}
10
11static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
12{
13 CMOS_WRITE(0xa, 0xf);
14 local_flush_tlb();
15 pr_debug("1.\n");
16 *((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
17 pr_debug("2.\n");
18 *((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
19 pr_debug("3.\n");
20}
21
22static inline void smpboot_restore_warm_reset_vector(void)
23{
24 /*
25 * Install writable page 0 entry to set BIOS data area.
26 */
27 local_flush_tlb();
28
29 /*
30 * Paranoid: Set warm reset code and vector here back
31 * to default values.
32 */
33 CMOS_WRITE(0, 0xf);
34
35 *((volatile long *) phys_to_virt(0x467)) = 0;
36}
37
38static inline void __init smpboot_setup_io_apic(void)
39{
40#ifdef CONFIG_X86_IO_APIC
41 /*
42 * Here we can be sure that there is an IO-APIC in the system. Let's
43 * go and set it up:
44 */
45 if (!skip_ioapic_setup && nr_ioapics)
46 setup_IO_APIC();
47 else {
48 nr_ioapics = 0;
49 localise_nmi_watchdog();
50 }
51#endif
52}
53
54static inline void smpboot_clear_io_apic(void)
55{
56#ifdef CONFIG_X86_IO_APIC
57 nr_ioapics = 0;
58#endif
59}
diff --git a/include/asm-x86/mach-generic/gpio.h b/include/asm-x86/mach-generic/gpio.h
deleted file mode 100644
index 6ce0f7786ef8..000000000000
--- a/include/asm-x86/mach-generic/gpio.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__GPIO_H
2#define ASM_X86__MACH_GENERIC__GPIO_H
3
4int gpio_request(unsigned gpio, const char *label);
5void gpio_free(unsigned gpio);
6int gpio_direction_input(unsigned gpio);
7int gpio_direction_output(unsigned gpio, int value);
8int gpio_get_value(unsigned gpio);
9void gpio_set_value(unsigned gpio, int value);
10int gpio_to_irq(unsigned gpio);
11int irq_to_gpio(unsigned irq);
12
13#include <asm-generic/gpio.h> /* cansleep wrappers */
14
15#endif /* ASM_X86__MACH_GENERIC__GPIO_H */
diff --git a/include/asm-x86/mach-generic/irq_vectors_limits.h b/include/asm-x86/mach-generic/irq_vectors_limits.h
deleted file mode 100644
index f7870e1a220d..000000000000
--- a/include/asm-x86/mach-generic/irq_vectors_limits.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H
2#define ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H
3
4/*
5 * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs,
6 * even with uni-proc kernels, so use a big array.
7 *
8 * This value should be the same in both the generic and summit subarches.
9 * Change one, change 'em both.
10 */
11#define NR_IRQS 224
12#define NR_IRQ_VECTORS 1024
13
14#endif /* ASM_X86__MACH_GENERIC__IRQ_VECTORS_LIMITS_H */
diff --git a/include/asm-x86/mach-generic/mach_apic.h b/include/asm-x86/mach-generic/mach_apic.h
deleted file mode 100644
index 5d010c6881dd..000000000000
--- a/include/asm-x86/mach-generic/mach_apic.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__MACH_APIC_H
2#define ASM_X86__MACH_GENERIC__MACH_APIC_H
3
4#include <asm/genapic.h>
5
6#define esr_disable (genapic->ESR_DISABLE)
7#define NO_BALANCE_IRQ (genapic->no_balance_irq)
8#define INT_DELIVERY_MODE (genapic->int_delivery_mode)
9#define INT_DEST_MODE (genapic->int_dest_mode)
10#undef APIC_DEST_LOGICAL
11#define APIC_DEST_LOGICAL (genapic->apic_destination_logical)
12#define TARGET_CPUS (genapic->target_cpus())
13#define apic_id_registered (genapic->apic_id_registered)
14#define init_apic_ldr (genapic->init_apic_ldr)
15#define ioapic_phys_id_map (genapic->ioapic_phys_id_map)
16#define setup_apic_routing (genapic->setup_apic_routing)
17#define multi_timer_check (genapic->multi_timer_check)
18#define apicid_to_node (genapic->apicid_to_node)
19#define cpu_to_logical_apicid (genapic->cpu_to_logical_apicid)
20#define cpu_present_to_apicid (genapic->cpu_present_to_apicid)
21#define apicid_to_cpu_present (genapic->apicid_to_cpu_present)
22#define setup_portio_remap (genapic->setup_portio_remap)
23#define check_apicid_present (genapic->check_apicid_present)
24#define check_phys_apicid_present (genapic->check_phys_apicid_present)
25#define check_apicid_used (genapic->check_apicid_used)
26#define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid)
27#define enable_apic_mode (genapic->enable_apic_mode)
28#define phys_pkg_id (genapic->phys_pkg_id)
29
30extern void generic_bigsmp_probe(void);
31
32#endif /* ASM_X86__MACH_GENERIC__MACH_APIC_H */
diff --git a/include/asm-x86/mach-generic/mach_apicdef.h b/include/asm-x86/mach-generic/mach_apicdef.h
deleted file mode 100644
index 1657f38b8f27..000000000000
--- a/include/asm-x86/mach-generic/mach_apicdef.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__MACH_APICDEF_H
2#define ASM_X86__MACH_GENERIC__MACH_APICDEF_H
3
4#ifndef APIC_DEFINITION
5#include <asm/genapic.h>
6
7#define GET_APIC_ID (genapic->get_apic_id)
8#define APIC_ID_MASK (genapic->apic_id_mask)
9#endif
10
11#endif /* ASM_X86__MACH_GENERIC__MACH_APICDEF_H */
diff --git a/include/asm-x86/mach-generic/mach_ipi.h b/include/asm-x86/mach-generic/mach_ipi.h
deleted file mode 100644
index f67433dbd65f..000000000000
--- a/include/asm-x86/mach-generic/mach_ipi.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__MACH_IPI_H
2#define ASM_X86__MACH_GENERIC__MACH_IPI_H
3
4#include <asm/genapic.h>
5
6#define send_IPI_mask (genapic->send_IPI_mask)
7#define send_IPI_allbutself (genapic->send_IPI_allbutself)
8#define send_IPI_all (genapic->send_IPI_all)
9
10#endif /* ASM_X86__MACH_GENERIC__MACH_IPI_H */
diff --git a/include/asm-x86/mach-generic/mach_mpparse.h b/include/asm-x86/mach-generic/mach_mpparse.h
deleted file mode 100644
index 3115564e557c..000000000000
--- a/include/asm-x86/mach-generic/mach_mpparse.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__MACH_MPPARSE_H
2#define ASM_X86__MACH_GENERIC__MACH_MPPARSE_H
3
4
5extern int mps_oem_check(struct mp_config_table *mpc, char *oem,
6 char *productid);
7
8extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
9
10#endif /* ASM_X86__MACH_GENERIC__MACH_MPPARSE_H */
diff --git a/include/asm-x86/mach-generic/mach_mpspec.h b/include/asm-x86/mach-generic/mach_mpspec.h
deleted file mode 100644
index 6061b153613e..000000000000
--- a/include/asm-x86/mach-generic/mach_mpspec.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_X86__MACH_GENERIC__MACH_MPSPEC_H
2#define ASM_X86__MACH_GENERIC__MACH_MPSPEC_H
3
4#define MAX_IRQ_SOURCES 256
5
6/* Summit or generic (i.e. installer) kernels need lots of bus entries. */
7/* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */
8#define MAX_MP_BUSSES 260
9
10extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem,
11 char *productid);
12#endif /* ASM_X86__MACH_GENERIC__MACH_MPSPEC_H */
diff --git a/include/asm-x86/mach-rdc321x/gpio.h b/include/asm-x86/mach-rdc321x/gpio.h
deleted file mode 100644
index 94b6cdf532e2..000000000000
--- a/include/asm-x86/mach-rdc321x/gpio.h
+++ /dev/null
@@ -1,60 +0,0 @@
1#ifndef ASM_X86__MACH_RDC321X__GPIO_H
2#define ASM_X86__MACH_RDC321X__GPIO_H
3
4#include <linux/kernel.h>
5
6extern int rdc_gpio_get_value(unsigned gpio);
7extern void rdc_gpio_set_value(unsigned gpio, int value);
8extern int rdc_gpio_direction_input(unsigned gpio);
9extern int rdc_gpio_direction_output(unsigned gpio, int value);
10extern int rdc_gpio_request(unsigned gpio, const char *label);
11extern void rdc_gpio_free(unsigned gpio);
12extern void __init rdc321x_gpio_setup(void);
13
14/* Wrappers for the arch-neutral GPIO API */
15
16static inline int gpio_request(unsigned gpio, const char *label)
17{
18 return rdc_gpio_request(gpio, label);
19}
20
21static inline void gpio_free(unsigned gpio)
22{
23 might_sleep();
24 rdc_gpio_free(gpio);
25}
26
27static inline int gpio_direction_input(unsigned gpio)
28{
29 return rdc_gpio_direction_input(gpio);
30}
31
32static inline int gpio_direction_output(unsigned gpio, int value)
33{
34 return rdc_gpio_direction_output(gpio, value);
35}
36
37static inline int gpio_get_value(unsigned gpio)
38{
39 return rdc_gpio_get_value(gpio);
40}
41
42static inline void gpio_set_value(unsigned gpio, int value)
43{
44 rdc_gpio_set_value(gpio, value);
45}
46
47static inline int gpio_to_irq(unsigned gpio)
48{
49 return gpio;
50}
51
52static inline int irq_to_gpio(unsigned irq)
53{
54 return irq;
55}
56
57/* For cansleep */
58#include <asm-generic/gpio.h>
59
60#endif /* ASM_X86__MACH_RDC321X__GPIO_H */
diff --git a/include/asm-x86/mach-rdc321x/rdc321x_defs.h b/include/asm-x86/mach-rdc321x/rdc321x_defs.h
deleted file mode 100644
index c8e9c8bed3d0..000000000000
--- a/include/asm-x86/mach-rdc321x/rdc321x_defs.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#define PFX "rdc321x: "
2
3/* General purpose configuration and data registers */
4#define RDC3210_CFGREG_ADDR 0x0CF8
5#define RDC3210_CFGREG_DATA 0x0CFC
6
7#define RDC321X_GPIO_CTRL_REG1 0x48
8#define RDC321X_GPIO_CTRL_REG2 0x84
9#define RDC321X_GPIO_DATA_REG1 0x4c
10#define RDC321X_GPIO_DATA_REG2 0x88
11
12#define RDC321X_MAX_GPIO 58
diff --git a/include/asm-x86/mach-voyager/do_timer.h b/include/asm-x86/mach-voyager/do_timer.h
deleted file mode 100644
index 9e5a459fd15b..000000000000
--- a/include/asm-x86/mach-voyager/do_timer.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* defines for inline arch setup functions */
2#include <linux/clockchips.h>
3
4#include <asm/voyager.h>
5#include <asm/i8253.h>
6
7/**
8 * do_timer_interrupt_hook - hook into timer tick
9 *
10 * Call the pit clock event handler. see asm/i8253.h
11 **/
12static inline void do_timer_interrupt_hook(void)
13{
14 global_clock_event->event_handler(global_clock_event);
15 voyager_timer_interrupt();
16}
17
diff --git a/include/asm-x86/mach-voyager/entry_arch.h b/include/asm-x86/mach-voyager/entry_arch.h
deleted file mode 100644
index ae52624b5937..000000000000
--- a/include/asm-x86/mach-voyager/entry_arch.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* -*- mode: c; c-basic-offset: 8 -*- */
2
3/* Copyright (C) 2002
4 *
5 * Author: James.Bottomley@HansenPartnership.com
6 *
7 * linux/arch/i386/voyager/entry_arch.h
8 *
9 * This file builds the VIC and QIC CPI gates
10 */
11
12/* initialise the voyager interrupt gates
13 *
14 * This uses the macros in irq.h to set up assembly jump gates. The
15 * calls are then redirected to the same routine with smp_ prefixed */
16BUILD_INTERRUPT(vic_sys_interrupt, VIC_SYS_INT)
17BUILD_INTERRUPT(vic_cmn_interrupt, VIC_CMN_INT)
18BUILD_INTERRUPT(vic_cpi_interrupt, VIC_CPI_LEVEL0);
19
20/* do all the QIC interrupts */
21BUILD_INTERRUPT(qic_timer_interrupt, QIC_TIMER_CPI);
22BUILD_INTERRUPT(qic_invalidate_interrupt, QIC_INVALIDATE_CPI);
23BUILD_INTERRUPT(qic_reschedule_interrupt, QIC_RESCHEDULE_CPI);
24BUILD_INTERRUPT(qic_enable_irq_interrupt, QIC_ENABLE_IRQ_CPI);
25BUILD_INTERRUPT(qic_call_function_interrupt, QIC_CALL_FUNCTION_CPI);
26BUILD_INTERRUPT(qic_call_function_single_interrupt, QIC_CALL_FUNCTION_SINGLE_CPI);
diff --git a/include/asm-x86/mach-voyager/setup_arch.h b/include/asm-x86/mach-voyager/setup_arch.h
deleted file mode 100644
index 71729ca05cd7..000000000000
--- a/include/asm-x86/mach-voyager/setup_arch.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#include <asm/voyager.h>
2#include <asm/setup.h>
3#define VOYAGER_BIOS_INFO ((struct voyager_bios_info *) \
4 (&boot_params.apm_bios_info))
5
6/* Hook to call BIOS initialisation function */
7
8/* for voyager, pass the voyager BIOS/SUS info area to the detection
9 * routines */
10
11#define ARCH_SETUP voyager_detect(VOYAGER_BIOS_INFO);
12
diff --git a/include/asm-x86/math_emu.h b/include/asm-x86/math_emu.h
deleted file mode 100644
index 5768d8e95c8c..000000000000
--- a/include/asm-x86/math_emu.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef ASM_X86__MATH_EMU_H
2#define ASM_X86__MATH_EMU_H
3
4/* This structure matches the layout of the data saved to the stack
5 following a device-not-present interrupt, part of it saved
6 automatically by the 80386/80486.
7 */
8struct info {
9 long ___orig_eip;
10 long ___ebx;
11 long ___ecx;
12 long ___edx;
13 long ___esi;
14 long ___edi;
15 long ___ebp;
16 long ___eax;
17 long ___ds;
18 long ___es;
19 long ___fs;
20 long ___orig_eax;
21 long ___eip;
22 long ___cs;
23 long ___eflags;
24 long ___esp;
25 long ___ss;
26 long ___vm86_es; /* This and the following only in vm86 mode */
27 long ___vm86_ds;
28 long ___vm86_fs;
29 long ___vm86_gs;
30};
31#endif /* ASM_X86__MATH_EMU_H */
diff --git a/include/asm-x86/mc146818rtc.h b/include/asm-x86/mc146818rtc.h
deleted file mode 100644
index a995f33176cd..000000000000
--- a/include/asm-x86/mc146818rtc.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef ASM_X86__MC146818RTC_H
5#define ASM_X86__MC146818RTC_H
6
7#include <asm/io.h>
8#include <asm/system.h>
9#include <asm/processor.h>
10#include <linux/mc146818rtc.h>
11
12#ifndef RTC_PORT
13#define RTC_PORT(x) (0x70 + (x))
14#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
15#endif
16
17#if defined(CONFIG_X86_32) && defined(__HAVE_ARCH_CMPXCHG)
18/*
19 * This lock provides nmi access to the CMOS/RTC registers. It has some
20 * special properties. It is owned by a CPU and stores the index register
21 * currently being accessed (if owned). The idea here is that it works
22 * like a normal lock (normally). However, in an NMI, the NMI code will
23 * first check to see if its CPU owns the lock, meaning that the NMI
24 * interrupted during the read/write of the device. If it does, it goes ahead
25 * and performs the access and then restores the index register. If it does
26 * not, it locks normally.
27 *
28 * Note that since we are working with NMIs, we need this lock even in
29 * a non-SMP machine just to mark that the lock is owned.
30 *
31 * This only works with compare-and-swap. There is no other way to
32 * atomically claim the lock and set the owner.
33 */
34#include <linux/smp.h>
35extern volatile unsigned long cmos_lock;
36
37/*
38 * All of these below must be called with interrupts off, preempt
39 * disabled, etc.
40 */
41
42static inline void lock_cmos(unsigned char reg)
43{
44 unsigned long new;
45 new = ((smp_processor_id() + 1) << 8) | reg;
46 for (;;) {
47 if (cmos_lock) {
48 cpu_relax();
49 continue;
50 }
51 if (__cmpxchg(&cmos_lock, 0, new, sizeof(cmos_lock)) == 0)
52 return;
53 }
54}
55
56static inline void unlock_cmos(void)
57{
58 cmos_lock = 0;
59}
60
61static inline int do_i_have_lock_cmos(void)
62{
63 return (cmos_lock >> 8) == (smp_processor_id() + 1);
64}
65
66static inline unsigned char current_lock_cmos_reg(void)
67{
68 return cmos_lock & 0xff;
69}
70
71#define lock_cmos_prefix(reg) \
72 do { \
73 unsigned long cmos_flags; \
74 local_irq_save(cmos_flags); \
75 lock_cmos(reg)
76
77#define lock_cmos_suffix(reg) \
78 unlock_cmos(); \
79 local_irq_restore(cmos_flags); \
80 } while (0)
81#else
82#define lock_cmos_prefix(reg) do {} while (0)
83#define lock_cmos_suffix(reg) do {} while (0)
84#define lock_cmos(reg)
85#define unlock_cmos()
86#define do_i_have_lock_cmos() 0
87#define current_lock_cmos_reg() 0
88#endif
89
90/*
91 * The yet supported machines all access the RTC index register via
92 * an ISA port access but the way to access the date register differs ...
93 */
94#define CMOS_READ(addr) rtc_cmos_read(addr)
95#define CMOS_WRITE(val, addr) rtc_cmos_write(val, addr)
96unsigned char rtc_cmos_read(unsigned char addr);
97void rtc_cmos_write(unsigned char val, unsigned char addr);
98
99extern int mach_set_rtc_mmss(unsigned long nowtime);
100extern unsigned long mach_get_cmos_time(void);
101
102#define RTC_IRQ 8
103
104#endif /* ASM_X86__MC146818RTC_H */
diff --git a/include/asm-x86/mca.h b/include/asm-x86/mca.h
deleted file mode 100644
index 60d1ed287b13..000000000000
--- a/include/asm-x86/mca.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/* -*- mode: c; c-basic-offset: 8 -*- */
2
3/* Platform specific MCA defines */
4#ifndef ASM_X86__MCA_H
5#define ASM_X86__MCA_H
6
7/* Maximal number of MCA slots - actually, some machines have less, but
8 * they all have sufficient number of POS registers to cover 8.
9 */
10#define MCA_MAX_SLOT_NR 8
11
12/* Most machines have only one MCA bus. The only multiple bus machines
13 * I know have at most two */
14#define MAX_MCA_BUSSES 2
15
16#define MCA_PRIMARY_BUS 0
17#define MCA_SECONDARY_BUS 1
18
19/* Dummy slot numbers on primary MCA for integrated functions */
20#define MCA_INTEGSCSI (MCA_MAX_SLOT_NR)
21#define MCA_INTEGVIDEO (MCA_MAX_SLOT_NR+1)
22#define MCA_MOTHERBOARD (MCA_MAX_SLOT_NR+2)
23
24/* Dummy POS values for integrated functions */
25#define MCA_DUMMY_POS_START 0x10000
26#define MCA_INTEGSCSI_POS (MCA_DUMMY_POS_START+1)
27#define MCA_INTEGVIDEO_POS (MCA_DUMMY_POS_START+2)
28#define MCA_MOTHERBOARD_POS (MCA_DUMMY_POS_START+3)
29
30/* MCA registers */
31
32#define MCA_MOTHERBOARD_SETUP_REG 0x94
33#define MCA_ADAPTER_SETUP_REG 0x96
34#define MCA_POS_REG(n) (0x100+(n))
35
36#define MCA_ENABLED 0x01 /* POS 2, set if adapter enabled */
37
38/* Max number of adapters, including both slots and various integrated
39 * things.
40 */
41#define MCA_NUMADAPTERS (MCA_MAX_SLOT_NR+3)
42
43#endif /* ASM_X86__MCA_H */
diff --git a/include/asm-x86/mca_dma.h b/include/asm-x86/mca_dma.h
deleted file mode 100644
index 49f22be237d2..000000000000
--- a/include/asm-x86/mca_dma.h
+++ /dev/null
@@ -1,201 +0,0 @@
1#ifndef ASM_X86__MCA_DMA_H
2#define ASM_X86__MCA_DMA_H
3
4#include <asm/io.h>
5#include <linux/ioport.h>
6
7/*
8 * Microchannel specific DMA stuff. DMA on an MCA machine is fairly similar to
9 * standard PC dma, but it certainly has its quirks. DMA register addresses
10 * are in a different place and there are some added functions. Most of this
11 * should be pretty obvious on inspection. Note that the user must divide
12 * count by 2 when using 16-bit dma; that is not handled by these functions.
13 *
14 * Ramen Noodles are yummy.
15 *
16 * 1998 Tymm Twillman <tymm@computer.org>
17 */
18
19/*
20 * Registers that are used by the DMA controller; FN is the function register
21 * (tell the controller what to do) and EXE is the execution register (how
22 * to do it)
23 */
24
25#define MCA_DMA_REG_FN 0x18
26#define MCA_DMA_REG_EXE 0x1A
27
28/*
29 * Functions that the DMA controller can do
30 */
31
32#define MCA_DMA_FN_SET_IO 0x00
33#define MCA_DMA_FN_SET_ADDR 0x20
34#define MCA_DMA_FN_GET_ADDR 0x30
35#define MCA_DMA_FN_SET_COUNT 0x40
36#define MCA_DMA_FN_GET_COUNT 0x50
37#define MCA_DMA_FN_GET_STATUS 0x60
38#define MCA_DMA_FN_SET_MODE 0x70
39#define MCA_DMA_FN_SET_ARBUS 0x80
40#define MCA_DMA_FN_MASK 0x90
41#define MCA_DMA_FN_RESET_MASK 0xA0
42#define MCA_DMA_FN_MASTER_CLEAR 0xD0
43
44/*
45 * Modes (used by setting MCA_DMA_FN_MODE in the function register)
46 *
47 * Note that the MODE_READ is read from memory (write to device), and
48 * MODE_WRITE is vice-versa.
49 */
50
51#define MCA_DMA_MODE_XFER 0x04 /* read by default */
52#define MCA_DMA_MODE_READ 0x04 /* same as XFER */
53#define MCA_DMA_MODE_WRITE 0x08 /* OR with MODE_XFER to use */
54#define MCA_DMA_MODE_IO 0x01 /* DMA from IO register */
55#define MCA_DMA_MODE_16 0x40 /* 16 bit xfers */
56
57
58/**
59 * mca_enable_dma - channel to enable DMA on
60 * @dmanr: DMA channel
61 *
62 * Enable the MCA bus DMA on a channel. This can be called from
63 * IRQ context.
64 */
65
66static inline void mca_enable_dma(unsigned int dmanr)
67{
68 outb(MCA_DMA_FN_RESET_MASK | dmanr, MCA_DMA_REG_FN);
69}
70
71/**
72 * mca_disble_dma - channel to disable DMA on
73 * @dmanr: DMA channel
74 *
75 * Enable the MCA bus DMA on a channel. This can be called from
76 * IRQ context.
77 */
78
79static inline void mca_disable_dma(unsigned int dmanr)
80{
81 outb(MCA_DMA_FN_MASK | dmanr, MCA_DMA_REG_FN);
82}
83
84/**
85 * mca_set_dma_addr - load a 24bit DMA address
86 * @dmanr: DMA channel
87 * @a: 24bit bus address
88 *
89 * Load the address register in the DMA controller. This has a 24bit
90 * limitation (16Mb).
91 */
92
93static inline void mca_set_dma_addr(unsigned int dmanr, unsigned int a)
94{
95 outb(MCA_DMA_FN_SET_ADDR | dmanr, MCA_DMA_REG_FN);
96 outb(a & 0xff, MCA_DMA_REG_EXE);
97 outb((a >> 8) & 0xff, MCA_DMA_REG_EXE);
98 outb((a >> 16) & 0xff, MCA_DMA_REG_EXE);
99}
100
101/**
102 * mca_get_dma_addr - load a 24bit DMA address
103 * @dmanr: DMA channel
104 *
105 * Read the address register in the DMA controller. This has a 24bit
106 * limitation (16Mb). The return is a bus address.
107 */
108
109static inline unsigned int mca_get_dma_addr(unsigned int dmanr)
110{
111 unsigned int addr;
112
113 outb(MCA_DMA_FN_GET_ADDR | dmanr, MCA_DMA_REG_FN);
114 addr = inb(MCA_DMA_REG_EXE);
115 addr |= inb(MCA_DMA_REG_EXE) << 8;
116 addr |= inb(MCA_DMA_REG_EXE) << 16;
117
118 return addr;
119}
120
121/**
122 * mca_set_dma_count - load a 16bit transfer count
123 * @dmanr: DMA channel
124 * @count: count
125 *
126 * Set the DMA count for this channel. This can be up to 64Kbytes.
127 * Setting a count of zero will not do what you expect.
128 */
129
130static inline void mca_set_dma_count(unsigned int dmanr, unsigned int count)
131{
132 count--; /* transfers one more than count -- correct for this */
133
134 outb(MCA_DMA_FN_SET_COUNT | dmanr, MCA_DMA_REG_FN);
135 outb(count & 0xff, MCA_DMA_REG_EXE);
136 outb((count >> 8) & 0xff, MCA_DMA_REG_EXE);
137}
138
139/**
140 * mca_get_dma_residue - get the remaining bytes to transfer
141 * @dmanr: DMA channel
142 *
143 * This function returns the number of bytes left to transfer
144 * on this DMA channel.
145 */
146
147static inline unsigned int mca_get_dma_residue(unsigned int dmanr)
148{
149 unsigned short count;
150
151 outb(MCA_DMA_FN_GET_COUNT | dmanr, MCA_DMA_REG_FN);
152 count = 1 + inb(MCA_DMA_REG_EXE);
153 count += inb(MCA_DMA_REG_EXE) << 8;
154
155 return count;
156}
157
158/**
159 * mca_set_dma_io - set the port for an I/O transfer
160 * @dmanr: DMA channel
161 * @io_addr: an I/O port number
162 *
163 * Unlike the ISA bus DMA controllers the DMA on MCA bus can transfer
164 * with an I/O port target.
165 */
166
167static inline void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr)
168{
169 /*
170 * DMA from a port address -- set the io address
171 */
172
173 outb(MCA_DMA_FN_SET_IO | dmanr, MCA_DMA_REG_FN);
174 outb(io_addr & 0xff, MCA_DMA_REG_EXE);
175 outb((io_addr >> 8) & 0xff, MCA_DMA_REG_EXE);
176}
177
178/**
179 * mca_set_dma_mode - set the DMA mode
180 * @dmanr: DMA channel
181 * @mode: mode to set
182 *
183 * The DMA controller supports several modes. The mode values you can
184 * set are-
185 *
186 * %MCA_DMA_MODE_READ when reading from the DMA device.
187 *
188 * %MCA_DMA_MODE_WRITE to writing to the DMA device.
189 *
190 * %MCA_DMA_MODE_IO to do DMA to or from an I/O port.
191 *
192 * %MCA_DMA_MODE_16 to do 16bit transfers.
193 */
194
195static inline void mca_set_dma_mode(unsigned int dmanr, unsigned int mode)
196{
197 outb(MCA_DMA_FN_SET_MODE | dmanr, MCA_DMA_REG_FN);
198 outb(mode, MCA_DMA_REG_EXE);
199}
200
201#endif /* ASM_X86__MCA_DMA_H */
diff --git a/include/asm-x86/mce.h b/include/asm-x86/mce.h
deleted file mode 100644
index 036133eaf744..000000000000
--- a/include/asm-x86/mce.h
+++ /dev/null
@@ -1,130 +0,0 @@
1#ifndef ASM_X86__MCE_H
2#define ASM_X86__MCE_H
3
4#ifdef __x86_64__
5
6#include <asm/ioctls.h>
7#include <asm/types.h>
8
9/*
10 * Machine Check support for x86
11 */
12
13#define MCG_CTL_P (1UL<<8) /* MCG_CAP register available */
14
15#define MCG_STATUS_RIPV (1UL<<0) /* restart ip valid */
16#define MCG_STATUS_EIPV (1UL<<1) /* ip points to correct instruction */
17#define MCG_STATUS_MCIP (1UL<<2) /* machine check in progress */
18
19#define MCI_STATUS_VAL (1UL<<63) /* valid error */
20#define MCI_STATUS_OVER (1UL<<62) /* previous errors lost */
21#define MCI_STATUS_UC (1UL<<61) /* uncorrected error */
22#define MCI_STATUS_EN (1UL<<60) /* error enabled */
23#define MCI_STATUS_MISCV (1UL<<59) /* misc error reg. valid */
24#define MCI_STATUS_ADDRV (1UL<<58) /* addr reg. valid */
25#define MCI_STATUS_PCC (1UL<<57) /* processor context corrupt */
26
27/* Fields are zero when not available */
28struct mce {
29 __u64 status;
30 __u64 misc;
31 __u64 addr;
32 __u64 mcgstatus;
33 __u64 ip;
34 __u64 tsc; /* cpu time stamp counter */
35 __u64 res1; /* for future extension */
36 __u64 res2; /* dito. */
37 __u8 cs; /* code segment */
38 __u8 bank; /* machine check bank */
39 __u8 cpu; /* cpu that raised the error */
40 __u8 finished; /* entry is valid */
41 __u32 pad;
42};
43
44/*
45 * This structure contains all data related to the MCE log. Also
46 * carries a signature to make it easier to find from external
47 * debugging tools. Each entry is only valid when its finished flag
48 * is set.
49 */
50
51#define MCE_LOG_LEN 32
52
53struct mce_log {
54 char signature[12]; /* "MACHINECHECK" */
55 unsigned len; /* = MCE_LOG_LEN */
56 unsigned next;
57 unsigned flags;
58 unsigned pad0;
59 struct mce entry[MCE_LOG_LEN];
60};
61
62#define MCE_OVERFLOW 0 /* bit 0 in flags means overflow */
63
64#define MCE_LOG_SIGNATURE "MACHINECHECK"
65
66#define MCE_GET_RECORD_LEN _IOR('M', 1, int)
67#define MCE_GET_LOG_LEN _IOR('M', 2, int)
68#define MCE_GETCLEAR_FLAGS _IOR('M', 3, int)
69
70/* Software defined banks */
71#define MCE_EXTENDED_BANK 128
72#define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0
73
74#define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */
75#define K8_MCE_THRESHOLD_BANK_0 (MCE_THRESHOLD_BASE + 0 * 9)
76#define K8_MCE_THRESHOLD_BANK_1 (MCE_THRESHOLD_BASE + 1 * 9)
77#define K8_MCE_THRESHOLD_BANK_2 (MCE_THRESHOLD_BASE + 2 * 9)
78#define K8_MCE_THRESHOLD_BANK_3 (MCE_THRESHOLD_BASE + 3 * 9)
79#define K8_MCE_THRESHOLD_BANK_4 (MCE_THRESHOLD_BASE + 4 * 9)
80#define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9)
81#define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0)
82
83#endif /* __x86_64__ */
84
85#ifdef __KERNEL__
86
87#ifdef CONFIG_X86_32
88extern int mce_disabled;
89#else /* CONFIG_X86_32 */
90
91#include <asm/atomic.h>
92
93void mce_log(struct mce *m);
94DECLARE_PER_CPU(struct sys_device, device_mce);
95extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
96
97#ifdef CONFIG_X86_MCE_INTEL
98void mce_intel_feature_init(struct cpuinfo_x86 *c);
99#else
100static inline void mce_intel_feature_init(struct cpuinfo_x86 *c) { }
101#endif
102
103#ifdef CONFIG_X86_MCE_AMD
104void mce_amd_feature_init(struct cpuinfo_x86 *c);
105#else
106static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
107#endif
108
109void mce_log_therm_throt_event(unsigned int cpu, __u64 status);
110
111extern atomic_t mce_entry;
112
113extern void do_machine_check(struct pt_regs *, long);
114extern int mce_notify_user(void);
115
116#endif /* !CONFIG_X86_32 */
117
118
119
120#ifdef CONFIG_X86_MCE
121extern void mcheck_init(struct cpuinfo_x86 *c);
122#else
123#define mcheck_init(c) do { } while (0)
124#endif
125extern void stop_mce(void);
126extern void restart_mce(void);
127
128#endif /* __KERNEL__ */
129
130#endif /* ASM_X86__MCE_H */
diff --git a/include/asm-x86/microcode.h b/include/asm-x86/microcode.h
deleted file mode 100644
index 62c793bb70ca..000000000000
--- a/include/asm-x86/microcode.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef ASM_X86__MICROCODE_H
2#define ASM_X86__MICROCODE_H
3
4struct cpu_signature {
5 unsigned int sig;
6 unsigned int pf;
7 unsigned int rev;
8};
9
10struct device;
11
12struct microcode_ops {
13 int (*request_microcode_user) (int cpu, const void __user *buf, size_t size);
14 int (*request_microcode_fw) (int cpu, struct device *device);
15
16 void (*apply_microcode) (int cpu);
17
18 int (*collect_cpu_info) (int cpu, struct cpu_signature *csig);
19 void (*microcode_fini_cpu) (int cpu);
20};
21
22struct ucode_cpu_info {
23 struct cpu_signature cpu_sig;
24 int valid;
25 void *mc;
26};
27extern struct ucode_cpu_info ucode_cpu_info[];
28
29#ifdef CONFIG_MICROCODE_INTEL
30extern struct microcode_ops * __init init_intel_microcode(void);
31#else
32static inline struct microcode_ops * __init init_intel_microcode(void)
33{
34 return NULL;
35}
36#endif /* CONFIG_MICROCODE_INTEL */
37
38#ifdef CONFIG_MICROCODE_AMD
39extern struct microcode_ops * __init init_amd_microcode(void);
40#else
41static inline struct microcode_ops * __init init_amd_microcode(void)
42{
43 return NULL;
44}
45#endif
46
47#endif /* ASM_X86__MICROCODE_H */
diff --git a/include/asm-x86/mman.h b/include/asm-x86/mman.h
deleted file mode 100644
index 4ef28e6de383..000000000000
--- a/include/asm-x86/mman.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef ASM_X86__MMAN_H
2#define ASM_X86__MMAN_H
3
4#include <asm-generic/mman.h>
5
6#define MAP_32BIT 0x40 /* only give out 32bit addresses */
7
8#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
9#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
10#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
11#define MAP_LOCKED 0x2000 /* pages are locked */
12#define MAP_NORESERVE 0x4000 /* don't check for reservations */
13#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
14#define MAP_NONBLOCK 0x10000 /* do not block on IO */
15#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
16
17#define MCL_CURRENT 1 /* lock all current mappings */
18#define MCL_FUTURE 2 /* lock all future mappings */
19
20#endif /* ASM_X86__MMAN_H */
diff --git a/include/asm-x86/mmconfig.h b/include/asm-x86/mmconfig.h
deleted file mode 100644
index fb79b1cf5d07..000000000000
--- a/include/asm-x86/mmconfig.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_X86__MMCONFIG_H
2#define ASM_X86__MMCONFIG_H
3
4#ifdef CONFIG_PCI_MMCONFIG
5extern void __cpuinit fam10h_check_enable_mmcfg(void);
6extern void __cpuinit check_enable_amd_mmconf_dmi(void);
7#else
8static inline void fam10h_check_enable_mmcfg(void) { }
9static inline void check_enable_amd_mmconf_dmi(void) { }
10#endif
11
12#endif /* ASM_X86__MMCONFIG_H */
diff --git a/include/asm-x86/mmu.h b/include/asm-x86/mmu.h
deleted file mode 100644
index 9d5aff14334a..000000000000
--- a/include/asm-x86/mmu.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef ASM_X86__MMU_H
2#define ASM_X86__MMU_H
3
4#include <linux/spinlock.h>
5#include <linux/mutex.h>
6
7/*
8 * The x86 doesn't have a mmu context, but
9 * we put the segment information here.
10 */
11typedef struct {
12 void *ldt;
13 int size;
14 struct mutex lock;
15 void *vdso;
16} mm_context_t;
17
18#ifdef CONFIG_SMP
19void leave_mm(int cpu);
20#else
21static inline void leave_mm(int cpu)
22{
23}
24#endif
25
26#endif /* ASM_X86__MMU_H */
diff --git a/include/asm-x86/mmu_context.h b/include/asm-x86/mmu_context.h
deleted file mode 100644
index 8ec940bfd079..000000000000
--- a/include/asm-x86/mmu_context.h
+++ /dev/null
@@ -1,37 +0,0 @@
1#ifndef ASM_X86__MMU_CONTEXT_H
2#define ASM_X86__MMU_CONTEXT_H
3
4#include <asm/desc.h>
5#include <asm/atomic.h>
6#include <asm/pgalloc.h>
7#include <asm/tlbflush.h>
8#include <asm/paravirt.h>
9#ifndef CONFIG_PARAVIRT
10#include <asm-generic/mm_hooks.h>
11
12static inline void paravirt_activate_mm(struct mm_struct *prev,
13 struct mm_struct *next)
14{
15}
16#endif /* !CONFIG_PARAVIRT */
17
18/*
19 * Used for LDT copy/destruction.
20 */
21int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
22void destroy_context(struct mm_struct *mm);
23
24#ifdef CONFIG_X86_32
25# include "mmu_context_32.h"
26#else
27# include "mmu_context_64.h"
28#endif
29
30#define activate_mm(prev, next) \
31do { \
32 paravirt_activate_mm((prev), (next)); \
33 switch_mm((prev), (next), NULL); \
34} while (0);
35
36
37#endif /* ASM_X86__MMU_CONTEXT_H */
diff --git a/include/asm-x86/mmu_context_32.h b/include/asm-x86/mmu_context_32.h
deleted file mode 100644
index cce6f6e4afd6..000000000000
--- a/include/asm-x86/mmu_context_32.h
+++ /dev/null
@@ -1,56 +0,0 @@
1#ifndef ASM_X86__MMU_CONTEXT_32_H
2#define ASM_X86__MMU_CONTEXT_32_H
3
4static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
5{
6#ifdef CONFIG_SMP
7 unsigned cpu = smp_processor_id();
8 if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
9 per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_LAZY;
10#endif
11}
12
13static inline void switch_mm(struct mm_struct *prev,
14 struct mm_struct *next,
15 struct task_struct *tsk)
16{
17 int cpu = smp_processor_id();
18
19 if (likely(prev != next)) {
20 /* stop flush ipis for the previous mm */
21 cpu_clear(cpu, prev->cpu_vm_mask);
22#ifdef CONFIG_SMP
23 per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
24 per_cpu(cpu_tlbstate, cpu).active_mm = next;
25#endif
26 cpu_set(cpu, next->cpu_vm_mask);
27
28 /* Re-load page tables */
29 load_cr3(next->pgd);
30
31 /*
32 * load the LDT, if the LDT is different:
33 */
34 if (unlikely(prev->context.ldt != next->context.ldt))
35 load_LDT_nolock(&next->context);
36 }
37#ifdef CONFIG_SMP
38 else {
39 per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
40 BUG_ON(per_cpu(cpu_tlbstate, cpu).active_mm != next);
41
42 if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) {
43 /* We were in lazy tlb mode and leave_mm disabled
44 * tlb flush IPI delivery. We must reload %cr3.
45 */
46 load_cr3(next->pgd);
47 load_LDT_nolock(&next->context);
48 }
49 }
50#endif
51}
52
53#define deactivate_mm(tsk, mm) \
54 asm("movl %0,%%gs": :"r" (0));
55
56#endif /* ASM_X86__MMU_CONTEXT_32_H */
diff --git a/include/asm-x86/mmu_context_64.h b/include/asm-x86/mmu_context_64.h
deleted file mode 100644
index 26758673c828..000000000000
--- a/include/asm-x86/mmu_context_64.h
+++ /dev/null
@@ -1,54 +0,0 @@
1#ifndef ASM_X86__MMU_CONTEXT_64_H
2#define ASM_X86__MMU_CONTEXT_64_H
3
4#include <asm/pda.h>
5
6static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
7{
8#ifdef CONFIG_SMP
9 if (read_pda(mmu_state) == TLBSTATE_OK)
10 write_pda(mmu_state, TLBSTATE_LAZY);
11#endif
12}
13
14static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
15 struct task_struct *tsk)
16{
17 unsigned cpu = smp_processor_id();
18 if (likely(prev != next)) {
19 /* stop flush ipis for the previous mm */
20 cpu_clear(cpu, prev->cpu_vm_mask);
21#ifdef CONFIG_SMP
22 write_pda(mmu_state, TLBSTATE_OK);
23 write_pda(active_mm, next);
24#endif
25 cpu_set(cpu, next->cpu_vm_mask);
26 load_cr3(next->pgd);
27
28 if (unlikely(next->context.ldt != prev->context.ldt))
29 load_LDT_nolock(&next->context);
30 }
31#ifdef CONFIG_SMP
32 else {
33 write_pda(mmu_state, TLBSTATE_OK);
34 if (read_pda(active_mm) != next)
35 BUG();
36 if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) {
37 /* We were in lazy tlb mode and leave_mm disabled
38 * tlb flush IPI delivery. We must reload CR3
39 * to make sure to use no freed page tables.
40 */
41 load_cr3(next->pgd);
42 load_LDT_nolock(&next->context);
43 }
44 }
45#endif
46}
47
48#define deactivate_mm(tsk, mm) \
49do { \
50 load_gs_index(0); \
51 asm volatile("movl %0,%%fs"::"r"(0)); \
52} while (0)
53
54#endif /* ASM_X86__MMU_CONTEXT_64_H */
diff --git a/include/asm-x86/mmx.h b/include/asm-x86/mmx.h
deleted file mode 100644
index 2e7299bb3653..000000000000
--- a/include/asm-x86/mmx.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef ASM_X86__MMX_H
2#define ASM_X86__MMX_H
3
4/*
5 * MMX 3Dnow! helper operations
6 */
7
8#include <linux/types.h>
9
10extern void *_mmx_memcpy(void *to, const void *from, size_t size);
11extern void mmx_clear_page(void *page);
12extern void mmx_copy_page(void *to, void *from);
13
14#endif /* ASM_X86__MMX_H */
diff --git a/include/asm-x86/mmzone.h b/include/asm-x86/mmzone.h
deleted file mode 100644
index 64217ea16a36..000000000000
--- a/include/asm-x86/mmzone.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "mmzone_32.h"
3#else
4# include "mmzone_64.h"
5#endif
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h
deleted file mode 100644
index 121b65d61d86..000000000000
--- a/include/asm-x86/mmzone_32.h
+++ /dev/null
@@ -1,134 +0,0 @@
1/*
2 * Written by Pat Gaughen (gone@us.ibm.com) Mar 2002
3 *
4 */
5
6#ifndef ASM_X86__MMZONE_32_H
7#define ASM_X86__MMZONE_32_H
8
9#include <asm/smp.h>
10
11#ifdef CONFIG_NUMA
12extern struct pglist_data *node_data[];
13#define NODE_DATA(nid) (node_data[nid])
14
15#include <asm/numaq.h>
16/* summit or generic arch */
17#include <asm/srat.h>
18
19extern int get_memcfg_numa_flat(void);
20/*
21 * This allows any one NUMA architecture to be compiled
22 * for, and still fall back to the flat function if it
23 * fails.
24 */
25static inline void get_memcfg_numa(void)
26{
27
28 if (get_memcfg_numaq())
29 return;
30 if (get_memcfg_from_srat())
31 return;
32 get_memcfg_numa_flat();
33}
34
35extern int early_pfn_to_nid(unsigned long pfn);
36
37#else /* !CONFIG_NUMA */
38
39#define get_memcfg_numa get_memcfg_numa_flat
40
41#endif /* CONFIG_NUMA */
42
43#ifdef CONFIG_DISCONTIGMEM
44
45/*
46 * generic node memory support, the following assumptions apply:
47 *
48 * 1) memory comes in 64Mb contigious chunks which are either present or not
49 * 2) we will not have more than 64Gb in total
50 *
51 * for now assume that 64Gb is max amount of RAM for whole system
52 * 64Gb / 4096bytes/page = 16777216 pages
53 */
54#define MAX_NR_PAGES 16777216
55#define MAX_ELEMENTS 1024
56#define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS)
57
58extern s8 physnode_map[];
59
60static inline int pfn_to_nid(unsigned long pfn)
61{
62#ifdef CONFIG_NUMA
63 return((int) physnode_map[(pfn) / PAGES_PER_ELEMENT]);
64#else
65 return 0;
66#endif
67}
68
69/*
70 * Following are macros that each numa implmentation must define.
71 */
72
73#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
74#define node_end_pfn(nid) \
75({ \
76 pg_data_t *__pgdat = NODE_DATA(nid); \
77 __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \
78})
79
80static inline int pfn_valid(int pfn)
81{
82 int nid = pfn_to_nid(pfn);
83
84 if (nid >= 0)
85 return (pfn < node_end_pfn(nid));
86 return 0;
87}
88
89#endif /* CONFIG_DISCONTIGMEM */
90
91#ifdef CONFIG_NEED_MULTIPLE_NODES
92
93/*
94 * Following are macros that are specific to this numa platform.
95 */
96#define reserve_bootmem(addr, size, flags) \
97 reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags))
98#define alloc_bootmem(x) \
99 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_nopanic(x) \
101 __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), SMP_CACHE_BYTES, \
102 __pa(MAX_DMA_ADDRESS))
103#define alloc_bootmem_low(x) \
104 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0)
105#define alloc_bootmem_pages(x) \
106 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
107#define alloc_bootmem_pages_nopanic(x) \
108 __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), PAGE_SIZE, \
109 __pa(MAX_DMA_ADDRESS))
110#define alloc_bootmem_low_pages(x) \
111 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0)
112#define alloc_bootmem_node(pgdat, x) \
113({ \
114 struct pglist_data __maybe_unused \
115 *__alloc_bootmem_node__pgdat = (pgdat); \
116 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, \
117 __pa(MAX_DMA_ADDRESS)); \
118})
119#define alloc_bootmem_pages_node(pgdat, x) \
120({ \
121 struct pglist_data __maybe_unused \
122 *__alloc_bootmem_node__pgdat = (pgdat); \
123 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, \
124 __pa(MAX_DMA_ADDRESS)); \
125})
126#define alloc_bootmem_low_pages_node(pgdat, x) \
127({ \
128 struct pglist_data __maybe_unused \
129 *__alloc_bootmem_node__pgdat = (pgdat); \
130 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0); \
131})
132#endif /* CONFIG_NEED_MULTIPLE_NODES */
133
134#endif /* ASM_X86__MMZONE_32_H */
diff --git a/include/asm-x86/mmzone_64.h b/include/asm-x86/mmzone_64.h
deleted file mode 100644
index 6480f3333b2a..000000000000
--- a/include/asm-x86/mmzone_64.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/* K8 NUMA support */
2/* Copyright 2002,2003 by Andi Kleen, SuSE Labs */
3/* 2.5 Version loosely based on the NUMAQ Code by Pat Gaughen. */
4#ifndef ASM_X86__MMZONE_64_H
5#define ASM_X86__MMZONE_64_H
6
7
8#ifdef CONFIG_NUMA
9
10#include <linux/mmdebug.h>
11
12#include <asm/smp.h>
13
14/* Simple perfect hash to map physical addresses to node numbers */
15struct memnode {
16 int shift;
17 unsigned int mapsize;
18 s16 *map;
19 s16 embedded_map[64 - 8];
20} ____cacheline_aligned; /* total size = 128 bytes */
21extern struct memnode memnode;
22#define memnode_shift memnode.shift
23#define memnodemap memnode.map
24#define memnodemapsize memnode.mapsize
25
26extern struct pglist_data *node_data[];
27
28static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
29{
30 unsigned nid;
31 VIRTUAL_BUG_ON(!memnodemap);
32 nid = memnodemap[addr >> memnode_shift];
33 VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]);
34 return nid;
35}
36
37#define NODE_DATA(nid) (node_data[nid])
38
39#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
40#define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \
41 NODE_DATA(nid)->node_spanned_pages)
42
43extern int early_pfn_to_nid(unsigned long pfn);
44
45#ifdef CONFIG_NUMA_EMU
46#define FAKE_NODE_MIN_SIZE (64 * 1024 * 1024)
47#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
48#endif
49
50#endif
51#endif /* ASM_X86__MMZONE_64_H */
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h
deleted file mode 100644
index 864f2005fc1d..000000000000
--- a/include/asm-x86/module.h
+++ /dev/null
@@ -1,80 +0,0 @@
1#ifndef ASM_X86__MODULE_H
2#define ASM_X86__MODULE_H
3
4/* x86_32/64 are simple */
5struct mod_arch_specific {};
6
7#ifdef CONFIG_X86_32
8# define Elf_Shdr Elf32_Shdr
9# define Elf_Sym Elf32_Sym
10# define Elf_Ehdr Elf32_Ehdr
11#else
12# define Elf_Shdr Elf64_Shdr
13# define Elf_Sym Elf64_Sym
14# define Elf_Ehdr Elf64_Ehdr
15#endif
16
17#ifdef CONFIG_X86_64
18/* X86_64 does not define MODULE_PROC_FAMILY */
19#elif defined CONFIG_M386
20#define MODULE_PROC_FAMILY "386 "
21#elif defined CONFIG_M486
22#define MODULE_PROC_FAMILY "486 "
23#elif defined CONFIG_M586
24#define MODULE_PROC_FAMILY "586 "
25#elif defined CONFIG_M586TSC
26#define MODULE_PROC_FAMILY "586TSC "
27#elif defined CONFIG_M586MMX
28#define MODULE_PROC_FAMILY "586MMX "
29#elif defined CONFIG_MCORE2
30#define MODULE_PROC_FAMILY "CORE2 "
31#elif defined CONFIG_M686
32#define MODULE_PROC_FAMILY "686 "
33#elif defined CONFIG_MPENTIUMII
34#define MODULE_PROC_FAMILY "PENTIUMII "
35#elif defined CONFIG_MPENTIUMIII
36#define MODULE_PROC_FAMILY "PENTIUMIII "
37#elif defined CONFIG_MPENTIUMM
38#define MODULE_PROC_FAMILY "PENTIUMM "
39#elif defined CONFIG_MPENTIUM4
40#define MODULE_PROC_FAMILY "PENTIUM4 "
41#elif defined CONFIG_MK6
42#define MODULE_PROC_FAMILY "K6 "
43#elif defined CONFIG_MK7
44#define MODULE_PROC_FAMILY "K7 "
45#elif defined CONFIG_MK8
46#define MODULE_PROC_FAMILY "K8 "
47#elif defined CONFIG_X86_ELAN
48#define MODULE_PROC_FAMILY "ELAN "
49#elif defined CONFIG_MCRUSOE
50#define MODULE_PROC_FAMILY "CRUSOE "
51#elif defined CONFIG_MEFFICEON
52#define MODULE_PROC_FAMILY "EFFICEON "
53#elif defined CONFIG_MWINCHIPC6
54#define MODULE_PROC_FAMILY "WINCHIPC6 "
55#elif defined CONFIG_MWINCHIP3D
56#define MODULE_PROC_FAMILY "WINCHIP3D "
57#elif defined CONFIG_MCYRIXIII
58#define MODULE_PROC_FAMILY "CYRIXIII "
59#elif defined CONFIG_MVIAC3_2
60#define MODULE_PROC_FAMILY "VIAC3-2 "
61#elif defined CONFIG_MVIAC7
62#define MODULE_PROC_FAMILY "VIAC7 "
63#elif defined CONFIG_MGEODEGX1
64#define MODULE_PROC_FAMILY "GEODEGX1 "
65#elif defined CONFIG_MGEODE_LX
66#define MODULE_PROC_FAMILY "GEODE "
67#else
68#error unknown processor family
69#endif
70
71#ifdef CONFIG_X86_32
72# ifdef CONFIG_4KSTACKS
73# define MODULE_STACKSIZE "4KSTACKS "
74# else
75# define MODULE_STACKSIZE ""
76# endif
77# define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
78#endif
79
80#endif /* ASM_X86__MODULE_H */
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h
deleted file mode 100644
index be2241a818f1..000000000000
--- a/include/asm-x86/mpspec.h
+++ /dev/null
@@ -1,145 +0,0 @@
1#ifndef ASM_X86__MPSPEC_H
2#define ASM_X86__MPSPEC_H
3
4#include <linux/init.h>
5
6#include <asm/mpspec_def.h>
7
8extern int apic_version[MAX_APICS];
9
10#ifdef CONFIG_X86_32
11#include <mach_mpspec.h>
12
13extern unsigned int def_to_bigsmp;
14extern u8 apicid_2_node[];
15extern int pic_mode;
16
17#ifdef CONFIG_X86_NUMAQ
18extern int mp_bus_id_to_node[MAX_MP_BUSSES];
19extern int mp_bus_id_to_local[MAX_MP_BUSSES];
20extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
21#endif
22
23#define MAX_APICID 256
24
25#else
26
27#define MAX_MP_BUSSES 256
28/* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */
29#define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4)
30
31#endif
32
33extern void early_find_smp_config(void);
34extern void early_get_smp_config(void);
35
36#if defined(CONFIG_MCA) || defined(CONFIG_EISA)
37extern int mp_bus_id_to_type[MAX_MP_BUSSES];
38#endif
39
40extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
41
42extern unsigned int boot_cpu_physical_apicid;
43extern unsigned int max_physical_apicid;
44extern int smp_found_config;
45extern int mpc_default_type;
46extern unsigned long mp_lapic_addr;
47
48extern void find_smp_config(void);
49extern void get_smp_config(void);
50#ifdef CONFIG_X86_MPPARSE
51extern void early_reserve_e820_mpc_new(void);
52#else
53static inline void early_reserve_e820_mpc_new(void) { }
54#endif
55
56void __cpuinit generic_processor_info(int apicid, int version);
57#ifdef CONFIG_ACPI
58extern void mp_register_ioapic(int id, u32 address, u32 gsi_base);
59extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
60 u32 gsi);
61extern void mp_config_acpi_legacy_irqs(void);
62extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low);
63#ifdef CONFIG_X86_IO_APIC
64extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
65 u32 gsi, int triggering, int polarity);
66#else
67static inline int
68mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
69 u32 gsi, int triggering, int polarity)
70{
71 return 0;
72}
73#endif
74#endif /* CONFIG_ACPI */
75
76#define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS)
77
78struct physid_mask {
79 unsigned long mask[PHYSID_ARRAY_SIZE];
80};
81
82typedef struct physid_mask physid_mask_t;
83
84#define physid_set(physid, map) set_bit(physid, (map).mask)
85#define physid_clear(physid, map) clear_bit(physid, (map).mask)
86#define physid_isset(physid, map) test_bit(physid, (map).mask)
87#define physid_test_and_set(physid, map) \
88 test_and_set_bit(physid, (map).mask)
89
90#define physids_and(dst, src1, src2) \
91 bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
92
93#define physids_or(dst, src1, src2) \
94 bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
95
96#define physids_clear(map) \
97 bitmap_zero((map).mask, MAX_APICS)
98
99#define physids_complement(dst, src) \
100 bitmap_complement((dst).mask, (src).mask, MAX_APICS)
101
102#define physids_empty(map) \
103 bitmap_empty((map).mask, MAX_APICS)
104
105#define physids_equal(map1, map2) \
106 bitmap_equal((map1).mask, (map2).mask, MAX_APICS)
107
108#define physids_weight(map) \
109 bitmap_weight((map).mask, MAX_APICS)
110
111#define physids_shift_right(d, s, n) \
112 bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS)
113
114#define physids_shift_left(d, s, n) \
115 bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS)
116
117#define physids_coerce(map) ((map).mask[0])
118
119#define physids_promote(physids) \
120 ({ \
121 physid_mask_t __physid_mask = PHYSID_MASK_NONE; \
122 __physid_mask.mask[0] = physids; \
123 __physid_mask; \
124 })
125
126/* Note: will create very large stack frames if physid_mask_t is big */
127#define physid_mask_of_physid(physid) \
128 ({ \
129 physid_mask_t __physid_mask = PHYSID_MASK_NONE; \
130 physid_set(physid, __physid_mask); \
131 __physid_mask; \
132 })
133
134static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)
135{
136 physids_clear(*map);
137 physid_set(physid, *map);
138}
139
140#define PHYSID_MASK_ALL { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
141#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
142
143extern physid_mask_t phys_cpu_present_map;
144
145#endif /* ASM_X86__MPSPEC_H */
diff --git a/include/asm-x86/mpspec_def.h b/include/asm-x86/mpspec_def.h
deleted file mode 100644
index 79166b048012..000000000000
--- a/include/asm-x86/mpspec_def.h
+++ /dev/null
@@ -1,180 +0,0 @@
1#ifndef ASM_X86__MPSPEC_DEF_H
2#define ASM_X86__MPSPEC_DEF_H
3
4/*
5 * Structure definitions for SMP machines following the
6 * Intel Multiprocessing Specification 1.1 and 1.4.
7 */
8
9/*
10 * This tag identifies where the SMP configuration
11 * information is.
12 */
13
14#define SMP_MAGIC_IDENT (('_'<<24) | ('P'<<16) | ('M'<<8) | '_')
15
16#ifdef CONFIG_X86_32
17# define MAX_MPC_ENTRY 1024
18# define MAX_APICS 256
19#else
20# if NR_CPUS <= 255
21# define MAX_APICS 255
22# else
23# define MAX_APICS 32768
24# endif
25#endif
26
27struct intel_mp_floating {
28 char mpf_signature[4]; /* "_MP_" */
29 unsigned int mpf_physptr; /* Configuration table address */
30 unsigned char mpf_length; /* Our length (paragraphs) */
31 unsigned char mpf_specification;/* Specification version */
32 unsigned char mpf_checksum; /* Checksum (makes sum 0) */
33 unsigned char mpf_feature1; /* Standard or configuration ? */
34 unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */
35 unsigned char mpf_feature3; /* Unused (0) */
36 unsigned char mpf_feature4; /* Unused (0) */
37 unsigned char mpf_feature5; /* Unused (0) */
38};
39
40#define MPC_SIGNATURE "PCMP"
41
42struct mp_config_table {
43 char mpc_signature[4];
44 unsigned short mpc_length; /* Size of table */
45 char mpc_spec; /* 0x01 */
46 char mpc_checksum;
47 char mpc_oem[8];
48 char mpc_productid[12];
49 unsigned int mpc_oemptr; /* 0 if not present */
50 unsigned short mpc_oemsize; /* 0 if not present */
51 unsigned short mpc_oemcount;
52 unsigned int mpc_lapic; /* APIC address */
53 unsigned int reserved;
54};
55
56/* Followed by entries */
57
58#define MP_PROCESSOR 0
59#define MP_BUS 1
60#define MP_IOAPIC 2
61#define MP_INTSRC 3
62#define MP_LINTSRC 4
63/* Used by IBM NUMA-Q to describe node locality */
64#define MP_TRANSLATION 192
65
66#define CPU_ENABLED 1 /* Processor is available */
67#define CPU_BOOTPROCESSOR 2 /* Processor is the BP */
68
69#define CPU_STEPPING_MASK 0x000F
70#define CPU_MODEL_MASK 0x00F0
71#define CPU_FAMILY_MASK 0x0F00
72
73struct mpc_config_processor {
74 unsigned char mpc_type;
75 unsigned char mpc_apicid; /* Local APIC number */
76 unsigned char mpc_apicver; /* Its versions */
77 unsigned char mpc_cpuflag;
78 unsigned int mpc_cpufeature;
79 unsigned int mpc_featureflag; /* CPUID feature value */
80 unsigned int mpc_reserved[2];
81};
82
83struct mpc_config_bus {
84 unsigned char mpc_type;
85 unsigned char mpc_busid;
86 unsigned char mpc_bustype[6];
87};
88
89/* List of Bus Type string values, Intel MP Spec. */
90#define BUSTYPE_EISA "EISA"
91#define BUSTYPE_ISA "ISA"
92#define BUSTYPE_INTERN "INTERN" /* Internal BUS */
93#define BUSTYPE_MCA "MCA"
94#define BUSTYPE_VL "VL" /* Local bus */
95#define BUSTYPE_PCI "PCI"
96#define BUSTYPE_PCMCIA "PCMCIA"
97#define BUSTYPE_CBUS "CBUS"
98#define BUSTYPE_CBUSII "CBUSII"
99#define BUSTYPE_FUTURE "FUTURE"
100#define BUSTYPE_MBI "MBI"
101#define BUSTYPE_MBII "MBII"
102#define BUSTYPE_MPI "MPI"
103#define BUSTYPE_MPSA "MPSA"
104#define BUSTYPE_NUBUS "NUBUS"
105#define BUSTYPE_TC "TC"
106#define BUSTYPE_VME "VME"
107#define BUSTYPE_XPRESS "XPRESS"
108
109#define MPC_APIC_USABLE 0x01
110
111struct mpc_config_ioapic {
112 unsigned char mpc_type;
113 unsigned char mpc_apicid;
114 unsigned char mpc_apicver;
115 unsigned char mpc_flags;
116 unsigned int mpc_apicaddr;
117};
118
119struct mpc_config_intsrc {
120 unsigned char mpc_type;
121 unsigned char mpc_irqtype;
122 unsigned short mpc_irqflag;
123 unsigned char mpc_srcbus;
124 unsigned char mpc_srcbusirq;
125 unsigned char mpc_dstapic;
126 unsigned char mpc_dstirq;
127};
128
129enum mp_irq_source_types {
130 mp_INT = 0,
131 mp_NMI = 1,
132 mp_SMI = 2,
133 mp_ExtINT = 3
134};
135
136#define MP_IRQDIR_DEFAULT 0
137#define MP_IRQDIR_HIGH 1
138#define MP_IRQDIR_LOW 3
139
140#define MP_APIC_ALL 0xFF
141
142struct mpc_config_lintsrc {
143 unsigned char mpc_type;
144 unsigned char mpc_irqtype;
145 unsigned short mpc_irqflag;
146 unsigned char mpc_srcbusid;
147 unsigned char mpc_srcbusirq;
148 unsigned char mpc_destapic;
149 unsigned char mpc_destapiclint;
150};
151
152#define MPC_OEM_SIGNATURE "_OEM"
153
154struct mp_config_oemtable {
155 char oem_signature[4];
156 unsigned short oem_length; /* Size of table */
157 char oem_rev; /* 0x01 */
158 char oem_checksum;
159 char mpc_oem[8];
160};
161
162/*
163 * Default configurations
164 *
165 * 1 2 CPU ISA 82489DX
166 * 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
167 * 3 2 CPU EISA 82489DX
168 * 4 2 CPU MCA 82489DX
169 * 5 2 CPU ISA+PCI
170 * 6 2 CPU EISA+PCI
171 * 7 2 CPU MCA+PCI
172 */
173
174enum mp_bustype {
175 MP_BUS_ISA = 1,
176 MP_BUS_EISA,
177 MP_BUS_PCI,
178 MP_BUS_MCA,
179};
180#endif /* ASM_X86__MPSPEC_DEF_H */
diff --git a/include/asm-x86/msgbuf.h b/include/asm-x86/msgbuf.h
deleted file mode 100644
index 1b538c907a3d..000000000000
--- a/include/asm-x86/msgbuf.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef ASM_X86__MSGBUF_H
2#define ASM_X86__MSGBUF_H
3
4/*
5 * The msqid64_ds structure for i386 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space on i386 is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 *
13 * Pad space on x8664 is left for:
14 * - 2 miscellaneous 64-bit values
15 */
16struct msqid64_ds {
17 struct ipc64_perm msg_perm;
18 __kernel_time_t msg_stime; /* last msgsnd time */
19#ifdef __i386__
20 unsigned long __unused1;
21#endif
22 __kernel_time_t msg_rtime; /* last msgrcv time */
23#ifdef __i386__
24 unsigned long __unused2;
25#endif
26 __kernel_time_t msg_ctime; /* last change time */
27#ifdef __i386__
28 unsigned long __unused3;
29#endif
30 unsigned long msg_cbytes; /* current number of bytes on queue */
31 unsigned long msg_qnum; /* number of messages in queue */
32 unsigned long msg_qbytes; /* max number of bytes on queue */
33 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
34 __kernel_pid_t msg_lrpid; /* last receive pid */
35 unsigned long __unused4;
36 unsigned long __unused5;
37};
38
39#endif /* ASM_X86__MSGBUF_H */
diff --git a/include/asm-x86/msidef.h b/include/asm-x86/msidef.h
deleted file mode 100644
index ed9190246876..000000000000
--- a/include/asm-x86/msidef.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef ASM_X86__MSIDEF_H
2#define ASM_X86__MSIDEF_H
3
4/*
5 * Constants for Intel APIC based MSI messages.
6 */
7
8/*
9 * Shifts for MSI data
10 */
11
12#define MSI_DATA_VECTOR_SHIFT 0
13#define MSI_DATA_VECTOR_MASK 0x000000ff
14#define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & \
15 MSI_DATA_VECTOR_MASK)
16
17#define MSI_DATA_DELIVERY_MODE_SHIFT 8
18#define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT)
19#define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT)
20
21#define MSI_DATA_LEVEL_SHIFT 14
22#define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT)
23#define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT)
24
25#define MSI_DATA_TRIGGER_SHIFT 15
26#define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT)
27#define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT)
28
29/*
30 * Shift/mask fields for msi address
31 */
32
33#define MSI_ADDR_BASE_HI 0
34#define MSI_ADDR_BASE_LO 0xfee00000
35
36#define MSI_ADDR_DEST_MODE_SHIFT 2
37#define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT)
38#define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT)
39
40#define MSI_ADDR_REDIRECTION_SHIFT 3
41#define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT)
42 /* dedicated cpu */
43#define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT)
44 /* lowest priority */
45
46#define MSI_ADDR_DEST_ID_SHIFT 12
47#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
48#define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \
49 MSI_ADDR_DEST_ID_MASK)
50
51#define MSI_ADDR_IR_EXT_INT (1 << 4)
52#define MSI_ADDR_IR_SHV (1 << 3)
53#define MSI_ADDR_IR_INDEX1(index) ((index & 0x8000) >> 13)
54#define MSI_ADDR_IR_INDEX2(index) ((index & 0x7fff) << 5)
55#endif /* ASM_X86__MSIDEF_H */
diff --git a/include/asm-x86/msr-index.h b/include/asm-x86/msr-index.h
deleted file mode 100644
index 0bb43301a202..000000000000
--- a/include/asm-x86/msr-index.h
+++ /dev/null
@@ -1,329 +0,0 @@
1#ifndef ASM_X86__MSR_INDEX_H
2#define ASM_X86__MSR_INDEX_H
3
4/* CPU model specific register (MSR) numbers */
5
6/* x86-64 specific MSRs */
7#define MSR_EFER 0xc0000080 /* extended feature register */
8#define MSR_STAR 0xc0000081 /* legacy mode SYSCALL target */
9#define MSR_LSTAR 0xc0000082 /* long mode SYSCALL target */
10#define MSR_CSTAR 0xc0000083 /* compat mode SYSCALL target */
11#define MSR_SYSCALL_MASK 0xc0000084 /* EFLAGS mask for syscall */
12#define MSR_FS_BASE 0xc0000100 /* 64bit FS base */
13#define MSR_GS_BASE 0xc0000101 /* 64bit GS base */
14#define MSR_KERNEL_GS_BASE 0xc0000102 /* SwapGS GS shadow */
15
16/* EFER bits: */
17#define _EFER_SCE 0 /* SYSCALL/SYSRET */
18#define _EFER_LME 8 /* Long mode enable */
19#define _EFER_LMA 10 /* Long mode active (read-only) */
20#define _EFER_NX 11 /* No execute enable */
21
22#define EFER_SCE (1<<_EFER_SCE)
23#define EFER_LME (1<<_EFER_LME)
24#define EFER_LMA (1<<_EFER_LMA)
25#define EFER_NX (1<<_EFER_NX)
26
27/* Intel MSRs. Some also available on other CPUs */
28#define MSR_IA32_PERFCTR0 0x000000c1
29#define MSR_IA32_PERFCTR1 0x000000c2
30#define MSR_FSB_FREQ 0x000000cd
31
32#define MSR_MTRRcap 0x000000fe
33#define MSR_IA32_BBL_CR_CTL 0x00000119
34
35#define MSR_IA32_SYSENTER_CS 0x00000174
36#define MSR_IA32_SYSENTER_ESP 0x00000175
37#define MSR_IA32_SYSENTER_EIP 0x00000176
38
39#define MSR_IA32_MCG_CAP 0x00000179
40#define MSR_IA32_MCG_STATUS 0x0000017a
41#define MSR_IA32_MCG_CTL 0x0000017b
42
43#define MSR_IA32_PEBS_ENABLE 0x000003f1
44#define MSR_IA32_DS_AREA 0x00000600
45#define MSR_IA32_PERF_CAPABILITIES 0x00000345
46
47#define MSR_MTRRfix64K_00000 0x00000250
48#define MSR_MTRRfix16K_80000 0x00000258
49#define MSR_MTRRfix16K_A0000 0x00000259
50#define MSR_MTRRfix4K_C0000 0x00000268
51#define MSR_MTRRfix4K_C8000 0x00000269
52#define MSR_MTRRfix4K_D0000 0x0000026a
53#define MSR_MTRRfix4K_D8000 0x0000026b
54#define MSR_MTRRfix4K_E0000 0x0000026c
55#define MSR_MTRRfix4K_E8000 0x0000026d
56#define MSR_MTRRfix4K_F0000 0x0000026e
57#define MSR_MTRRfix4K_F8000 0x0000026f
58#define MSR_MTRRdefType 0x000002ff
59
60#define MSR_IA32_CR_PAT 0x00000277
61
62#define MSR_IA32_DEBUGCTLMSR 0x000001d9
63#define MSR_IA32_LASTBRANCHFROMIP 0x000001db
64#define MSR_IA32_LASTBRANCHTOIP 0x000001dc
65#define MSR_IA32_LASTINTFROMIP 0x000001dd
66#define MSR_IA32_LASTINTTOIP 0x000001de
67
68/* DEBUGCTLMSR bits (others vary by model): */
69#define _DEBUGCTLMSR_LBR 0 /* last branch recording */
70#define _DEBUGCTLMSR_BTF 1 /* single-step on branches */
71
72#define DEBUGCTLMSR_LBR (1UL << _DEBUGCTLMSR_LBR)
73#define DEBUGCTLMSR_BTF (1UL << _DEBUGCTLMSR_BTF)
74
75#define MSR_IA32_MC0_CTL 0x00000400
76#define MSR_IA32_MC0_STATUS 0x00000401
77#define MSR_IA32_MC0_ADDR 0x00000402
78#define MSR_IA32_MC0_MISC 0x00000403
79
80#define MSR_P6_PERFCTR0 0x000000c1
81#define MSR_P6_PERFCTR1 0x000000c2
82#define MSR_P6_EVNTSEL0 0x00000186
83#define MSR_P6_EVNTSEL1 0x00000187
84
85/* AMD64 MSRs. Not complete. See the architecture manual for a more
86 complete list. */
87
88#define MSR_AMD64_NB_CFG 0xc001001f
89#define MSR_AMD64_IBSFETCHCTL 0xc0011030
90#define MSR_AMD64_IBSFETCHLINAD 0xc0011031
91#define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032
92#define MSR_AMD64_IBSOPCTL 0xc0011033
93#define MSR_AMD64_IBSOPRIP 0xc0011034
94#define MSR_AMD64_IBSOPDATA 0xc0011035
95#define MSR_AMD64_IBSOPDATA2 0xc0011036
96#define MSR_AMD64_IBSOPDATA3 0xc0011037
97#define MSR_AMD64_IBSDCLINAD 0xc0011038
98#define MSR_AMD64_IBSDCPHYSAD 0xc0011039
99#define MSR_AMD64_IBSCTL 0xc001103a
100
101/* Fam 10h MSRs */
102#define MSR_FAM10H_MMIO_CONF_BASE 0xc0010058
103#define FAM10H_MMIO_CONF_ENABLE (1<<0)
104#define FAM10H_MMIO_CONF_BUSRANGE_MASK 0xf
105#define FAM10H_MMIO_CONF_BUSRANGE_SHIFT 2
106#define FAM10H_MMIO_CONF_BASE_MASK 0xfffffff
107#define FAM10H_MMIO_CONF_BASE_SHIFT 20
108
109/* K8 MSRs */
110#define MSR_K8_TOP_MEM1 0xc001001a
111#define MSR_K8_TOP_MEM2 0xc001001d
112#define MSR_K8_SYSCFG 0xc0010010
113#define MSR_K8_HWCR 0xc0010015
114#define MSR_K8_INT_PENDING_MSG 0xc0010055
115/* C1E active bits in int pending message */
116#define K8_INTP_C1E_ACTIVE_MASK 0x18000000
117#define MSR_K8_TSEG_ADDR 0xc0010112
118#define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */
119#define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */
120#define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */
121
122/* K7 MSRs */
123#define MSR_K7_EVNTSEL0 0xc0010000
124#define MSR_K7_PERFCTR0 0xc0010004
125#define MSR_K7_EVNTSEL1 0xc0010001
126#define MSR_K7_PERFCTR1 0xc0010005
127#define MSR_K7_EVNTSEL2 0xc0010002
128#define MSR_K7_PERFCTR2 0xc0010006
129#define MSR_K7_EVNTSEL3 0xc0010003
130#define MSR_K7_PERFCTR3 0xc0010007
131#define MSR_K7_CLK_CTL 0xc001001b
132#define MSR_K7_HWCR 0xc0010015
133#define MSR_K7_FID_VID_CTL 0xc0010041
134#define MSR_K7_FID_VID_STATUS 0xc0010042
135
136/* K6 MSRs */
137#define MSR_K6_EFER 0xc0000080
138#define MSR_K6_STAR 0xc0000081
139#define MSR_K6_WHCR 0xc0000082
140#define MSR_K6_UWCCR 0xc0000085
141#define MSR_K6_EPMR 0xc0000086
142#define MSR_K6_PSOR 0xc0000087
143#define MSR_K6_PFIR 0xc0000088
144
145/* Centaur-Hauls/IDT defined MSRs. */
146#define MSR_IDT_FCR1 0x00000107
147#define MSR_IDT_FCR2 0x00000108
148#define MSR_IDT_FCR3 0x00000109
149#define MSR_IDT_FCR4 0x0000010a
150
151#define MSR_IDT_MCR0 0x00000110
152#define MSR_IDT_MCR1 0x00000111
153#define MSR_IDT_MCR2 0x00000112
154#define MSR_IDT_MCR3 0x00000113
155#define MSR_IDT_MCR4 0x00000114
156#define MSR_IDT_MCR5 0x00000115
157#define MSR_IDT_MCR6 0x00000116
158#define MSR_IDT_MCR7 0x00000117
159#define MSR_IDT_MCR_CTRL 0x00000120
160
161/* VIA Cyrix defined MSRs*/
162#define MSR_VIA_FCR 0x00001107
163#define MSR_VIA_LONGHAUL 0x0000110a
164#define MSR_VIA_RNG 0x0000110b
165#define MSR_VIA_BCR2 0x00001147
166
167/* Transmeta defined MSRs */
168#define MSR_TMTA_LONGRUN_CTRL 0x80868010
169#define MSR_TMTA_LONGRUN_FLAGS 0x80868011
170#define MSR_TMTA_LRTI_READOUT 0x80868018
171#define MSR_TMTA_LRTI_VOLT_MHZ 0x8086801a
172
173/* Intel defined MSRs. */
174#define MSR_IA32_P5_MC_ADDR 0x00000000
175#define MSR_IA32_P5_MC_TYPE 0x00000001
176#define MSR_IA32_TSC 0x00000010
177#define MSR_IA32_PLATFORM_ID 0x00000017
178#define MSR_IA32_EBL_CR_POWERON 0x0000002a
179#define MSR_IA32_FEATURE_CONTROL 0x0000003a
180
181#define MSR_IA32_APICBASE 0x0000001b
182#define MSR_IA32_APICBASE_BSP (1<<8)
183#define MSR_IA32_APICBASE_ENABLE (1<<11)
184#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
185
186#define MSR_IA32_UCODE_WRITE 0x00000079
187#define MSR_IA32_UCODE_REV 0x0000008b
188
189#define MSR_IA32_PERF_STATUS 0x00000198
190#define MSR_IA32_PERF_CTL 0x00000199
191
192#define MSR_IA32_MPERF 0x000000e7
193#define MSR_IA32_APERF 0x000000e8
194
195#define MSR_IA32_THERM_CONTROL 0x0000019a
196#define MSR_IA32_THERM_INTERRUPT 0x0000019b
197#define MSR_IA32_THERM_STATUS 0x0000019c
198#define MSR_IA32_MISC_ENABLE 0x000001a0
199
200/* Intel Model 6 */
201#define MSR_P6_EVNTSEL0 0x00000186
202#define MSR_P6_EVNTSEL1 0x00000187
203
204/* P4/Xeon+ specific */
205#define MSR_IA32_MCG_EAX 0x00000180
206#define MSR_IA32_MCG_EBX 0x00000181
207#define MSR_IA32_MCG_ECX 0x00000182
208#define MSR_IA32_MCG_EDX 0x00000183
209#define MSR_IA32_MCG_ESI 0x00000184
210#define MSR_IA32_MCG_EDI 0x00000185
211#define MSR_IA32_MCG_EBP 0x00000186
212#define MSR_IA32_MCG_ESP 0x00000187
213#define MSR_IA32_MCG_EFLAGS 0x00000188
214#define MSR_IA32_MCG_EIP 0x00000189
215#define MSR_IA32_MCG_RESERVED 0x0000018a
216
217/* Pentium IV performance counter MSRs */
218#define MSR_P4_BPU_PERFCTR0 0x00000300
219#define MSR_P4_BPU_PERFCTR1 0x00000301
220#define MSR_P4_BPU_PERFCTR2 0x00000302
221#define MSR_P4_BPU_PERFCTR3 0x00000303
222#define MSR_P4_MS_PERFCTR0 0x00000304
223#define MSR_P4_MS_PERFCTR1 0x00000305
224#define MSR_P4_MS_PERFCTR2 0x00000306
225#define MSR_P4_MS_PERFCTR3 0x00000307
226#define MSR_P4_FLAME_PERFCTR0 0x00000308
227#define MSR_P4_FLAME_PERFCTR1 0x00000309
228#define MSR_P4_FLAME_PERFCTR2 0x0000030a
229#define MSR_P4_FLAME_PERFCTR3 0x0000030b
230#define MSR_P4_IQ_PERFCTR0 0x0000030c
231#define MSR_P4_IQ_PERFCTR1 0x0000030d
232#define MSR_P4_IQ_PERFCTR2 0x0000030e
233#define MSR_P4_IQ_PERFCTR3 0x0000030f
234#define MSR_P4_IQ_PERFCTR4 0x00000310
235#define MSR_P4_IQ_PERFCTR5 0x00000311
236#define MSR_P4_BPU_CCCR0 0x00000360
237#define MSR_P4_BPU_CCCR1 0x00000361
238#define MSR_P4_BPU_CCCR2 0x00000362
239#define MSR_P4_BPU_CCCR3 0x00000363
240#define MSR_P4_MS_CCCR0 0x00000364
241#define MSR_P4_MS_CCCR1 0x00000365
242#define MSR_P4_MS_CCCR2 0x00000366
243#define MSR_P4_MS_CCCR3 0x00000367
244#define MSR_P4_FLAME_CCCR0 0x00000368
245#define MSR_P4_FLAME_CCCR1 0x00000369
246#define MSR_P4_FLAME_CCCR2 0x0000036a
247#define MSR_P4_FLAME_CCCR3 0x0000036b
248#define MSR_P4_IQ_CCCR0 0x0000036c
249#define MSR_P4_IQ_CCCR1 0x0000036d
250#define MSR_P4_IQ_CCCR2 0x0000036e
251#define MSR_P4_IQ_CCCR3 0x0000036f
252#define MSR_P4_IQ_CCCR4 0x00000370
253#define MSR_P4_IQ_CCCR5 0x00000371
254#define MSR_P4_ALF_ESCR0 0x000003ca
255#define MSR_P4_ALF_ESCR1 0x000003cb
256#define MSR_P4_BPU_ESCR0 0x000003b2
257#define MSR_P4_BPU_ESCR1 0x000003b3
258#define MSR_P4_BSU_ESCR0 0x000003a0
259#define MSR_P4_BSU_ESCR1 0x000003a1
260#define MSR_P4_CRU_ESCR0 0x000003b8
261#define MSR_P4_CRU_ESCR1 0x000003b9
262#define MSR_P4_CRU_ESCR2 0x000003cc
263#define MSR_P4_CRU_ESCR3 0x000003cd
264#define MSR_P4_CRU_ESCR4 0x000003e0
265#define MSR_P4_CRU_ESCR5 0x000003e1
266#define MSR_P4_DAC_ESCR0 0x000003a8
267#define MSR_P4_DAC_ESCR1 0x000003a9
268#define MSR_P4_FIRM_ESCR0 0x000003a4
269#define MSR_P4_FIRM_ESCR1 0x000003a5
270#define MSR_P4_FLAME_ESCR0 0x000003a6
271#define MSR_P4_FLAME_ESCR1 0x000003a7
272#define MSR_P4_FSB_ESCR0 0x000003a2
273#define MSR_P4_FSB_ESCR1 0x000003a3
274#define MSR_P4_IQ_ESCR0 0x000003ba
275#define MSR_P4_IQ_ESCR1 0x000003bb
276#define MSR_P4_IS_ESCR0 0x000003b4
277#define MSR_P4_IS_ESCR1 0x000003b5
278#define MSR_P4_ITLB_ESCR0 0x000003b6
279#define MSR_P4_ITLB_ESCR1 0x000003b7
280#define MSR_P4_IX_ESCR0 0x000003c8
281#define MSR_P4_IX_ESCR1 0x000003c9
282#define MSR_P4_MOB_ESCR0 0x000003aa
283#define MSR_P4_MOB_ESCR1 0x000003ab
284#define MSR_P4_MS_ESCR0 0x000003c0
285#define MSR_P4_MS_ESCR1 0x000003c1
286#define MSR_P4_PMH_ESCR0 0x000003ac
287#define MSR_P4_PMH_ESCR1 0x000003ad
288#define MSR_P4_RAT_ESCR0 0x000003bc
289#define MSR_P4_RAT_ESCR1 0x000003bd
290#define MSR_P4_SAAT_ESCR0 0x000003ae
291#define MSR_P4_SAAT_ESCR1 0x000003af
292#define MSR_P4_SSU_ESCR0 0x000003be
293#define MSR_P4_SSU_ESCR1 0x000003bf /* guess: not in manual */
294
295#define MSR_P4_TBPU_ESCR0 0x000003c2
296#define MSR_P4_TBPU_ESCR1 0x000003c3
297#define MSR_P4_TC_ESCR0 0x000003c4
298#define MSR_P4_TC_ESCR1 0x000003c5
299#define MSR_P4_U2L_ESCR0 0x000003b0
300#define MSR_P4_U2L_ESCR1 0x000003b1
301
302/* Intel Core-based CPU performance counters */
303#define MSR_CORE_PERF_FIXED_CTR0 0x00000309
304#define MSR_CORE_PERF_FIXED_CTR1 0x0000030a
305#define MSR_CORE_PERF_FIXED_CTR2 0x0000030b
306#define MSR_CORE_PERF_FIXED_CTR_CTRL 0x0000038d
307#define MSR_CORE_PERF_GLOBAL_STATUS 0x0000038e
308#define MSR_CORE_PERF_GLOBAL_CTRL 0x0000038f
309#define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x00000390
310
311/* Geode defined MSRs */
312#define MSR_GEODE_BUSCONT_CONF0 0x00001900
313
314/* Intel VT MSRs */
315#define MSR_IA32_VMX_BASIC 0x00000480
316#define MSR_IA32_VMX_PINBASED_CTLS 0x00000481
317#define MSR_IA32_VMX_PROCBASED_CTLS 0x00000482
318#define MSR_IA32_VMX_EXIT_CTLS 0x00000483
319#define MSR_IA32_VMX_ENTRY_CTLS 0x00000484
320#define MSR_IA32_VMX_MISC 0x00000485
321#define MSR_IA32_VMX_CR0_FIXED0 0x00000486
322#define MSR_IA32_VMX_CR0_FIXED1 0x00000487
323#define MSR_IA32_VMX_CR4_FIXED0 0x00000488
324#define MSR_IA32_VMX_CR4_FIXED1 0x00000489
325#define MSR_IA32_VMX_VMCS_ENUM 0x0000048a
326#define MSR_IA32_VMX_PROCBASED_CTLS2 0x0000048b
327#define MSR_IA32_VMX_EPT_VPID_CAP 0x0000048c
328
329#endif /* ASM_X86__MSR_INDEX_H */
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
deleted file mode 100644
index 530af1f6389e..000000000000
--- a/include/asm-x86/msr.h
+++ /dev/null
@@ -1,247 +0,0 @@
1#ifndef ASM_X86__MSR_H
2#define ASM_X86__MSR_H
3
4#include <asm/msr-index.h>
5
6#ifndef __ASSEMBLY__
7# include <linux/types.h>
8#endif
9
10#ifdef __KERNEL__
11#ifndef __ASSEMBLY__
12
13#include <asm/asm.h>
14#include <asm/errno.h>
15
16static inline unsigned long long native_read_tscp(unsigned int *aux)
17{
18 unsigned long low, high;
19 asm volatile(".byte 0x0f,0x01,0xf9"
20 : "=a" (low), "=d" (high), "=c" (*aux));
21 return low | ((u64)high << 32);
22}
23
24/*
25 * i386 calling convention returns 64-bit value in edx:eax, while
26 * x86_64 returns at rax. Also, the "A" constraint does not really
27 * mean rdx:rax in x86_64, so we need specialized behaviour for each
28 * architecture
29 */
30#ifdef CONFIG_X86_64
31#define DECLARE_ARGS(val, low, high) unsigned low, high
32#define EAX_EDX_VAL(val, low, high) ((low) | ((u64)(high) << 32))
33#define EAX_EDX_ARGS(val, low, high) "a" (low), "d" (high)
34#define EAX_EDX_RET(val, low, high) "=a" (low), "=d" (high)
35#else
36#define DECLARE_ARGS(val, low, high) unsigned long long val
37#define EAX_EDX_VAL(val, low, high) (val)
38#define EAX_EDX_ARGS(val, low, high) "A" (val)
39#define EAX_EDX_RET(val, low, high) "=A" (val)
40#endif
41
42static inline unsigned long long native_read_msr(unsigned int msr)
43{
44 DECLARE_ARGS(val, low, high);
45
46 asm volatile("rdmsr" : EAX_EDX_RET(val, low, high) : "c" (msr));
47 return EAX_EDX_VAL(val, low, high);
48}
49
50static inline unsigned long long native_read_msr_safe(unsigned int msr,
51 int *err)
52{
53 DECLARE_ARGS(val, low, high);
54
55 asm volatile("2: rdmsr ; xor %[err],%[err]\n"
56 "1:\n\t"
57 ".section .fixup,\"ax\"\n\t"
58 "3: mov %[fault],%[err] ; jmp 1b\n\t"
59 ".previous\n\t"
60 _ASM_EXTABLE(2b, 3b)
61 : [err] "=r" (*err), EAX_EDX_RET(val, low, high)
62 : "c" (msr), [fault] "i" (-EFAULT));
63 return EAX_EDX_VAL(val, low, high);
64}
65
66static inline unsigned long long native_read_msr_amd_safe(unsigned int msr,
67 int *err)
68{
69 DECLARE_ARGS(val, low, high);
70
71 asm volatile("2: rdmsr ; xor %0,%0\n"
72 "1:\n\t"
73 ".section .fixup,\"ax\"\n\t"
74 "3: mov %3,%0 ; jmp 1b\n\t"
75 ".previous\n\t"
76 _ASM_EXTABLE(2b, 3b)
77 : "=r" (*err), EAX_EDX_RET(val, low, high)
78 : "c" (msr), "D" (0x9c5a203a), "i" (-EFAULT));
79 return EAX_EDX_VAL(val, low, high);
80}
81
82static inline void native_write_msr(unsigned int msr,
83 unsigned low, unsigned high)
84{
85 asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high) : "memory");
86}
87
88static inline int native_write_msr_safe(unsigned int msr,
89 unsigned low, unsigned high)
90{
91 int err;
92 asm volatile("2: wrmsr ; xor %[err],%[err]\n"
93 "1:\n\t"
94 ".section .fixup,\"ax\"\n\t"
95 "3: mov %[fault],%[err] ; jmp 1b\n\t"
96 ".previous\n\t"
97 _ASM_EXTABLE(2b, 3b)
98 : [err] "=a" (err)
99 : "c" (msr), "0" (low), "d" (high),
100 [fault] "i" (-EFAULT)
101 : "memory");
102 return err;
103}
104
105extern unsigned long long native_read_tsc(void);
106
107static __always_inline unsigned long long __native_read_tsc(void)
108{
109 DECLARE_ARGS(val, low, high);
110
111 rdtsc_barrier();
112 asm volatile("rdtsc" : EAX_EDX_RET(val, low, high));
113 rdtsc_barrier();
114
115 return EAX_EDX_VAL(val, low, high);
116}
117
118static inline unsigned long long native_read_pmc(int counter)
119{
120 DECLARE_ARGS(val, low, high);
121
122 asm volatile("rdpmc" : EAX_EDX_RET(val, low, high) : "c" (counter));
123 return EAX_EDX_VAL(val, low, high);
124}
125
126#ifdef CONFIG_PARAVIRT
127#include <asm/paravirt.h>
128#else
129#include <linux/errno.h>
130/*
131 * Access to machine-specific registers (available on 586 and better only)
132 * Note: the rd* operations modify the parameters directly (without using
133 * pointer indirection), this allows gcc to optimize better
134 */
135
136#define rdmsr(msr, val1, val2) \
137do { \
138 u64 __val = native_read_msr((msr)); \
139 (val1) = (u32)__val; \
140 (val2) = (u32)(__val >> 32); \
141} while (0)
142
143static inline void wrmsr(unsigned msr, unsigned low, unsigned high)
144{
145 native_write_msr(msr, low, high);
146}
147
148#define rdmsrl(msr, val) \
149 ((val) = native_read_msr((msr)))
150
151#define wrmsrl(msr, val) \
152 native_write_msr((msr), (u32)((u64)(val)), (u32)((u64)(val) >> 32))
153
154/* wrmsr with exception handling */
155static inline int wrmsr_safe(unsigned msr, unsigned low, unsigned high)
156{
157 return native_write_msr_safe(msr, low, high);
158}
159
160/* rdmsr with exception handling */
161#define rdmsr_safe(msr, p1, p2) \
162({ \
163 int __err; \
164 u64 __val = native_read_msr_safe((msr), &__err); \
165 (*p1) = (u32)__val; \
166 (*p2) = (u32)(__val >> 32); \
167 __err; \
168})
169
170static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
171{
172 int err;
173
174 *p = native_read_msr_safe(msr, &err);
175 return err;
176}
177static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p)
178{
179 int err;
180
181 *p = native_read_msr_amd_safe(msr, &err);
182 return err;
183}
184
185#define rdtscl(low) \
186 ((low) = (u32)native_read_tsc())
187
188#define rdtscll(val) \
189 ((val) = native_read_tsc())
190
191#define rdpmc(counter, low, high) \
192do { \
193 u64 _l = native_read_pmc((counter)); \
194 (low) = (u32)_l; \
195 (high) = (u32)(_l >> 32); \
196} while (0)
197
198#define rdtscp(low, high, aux) \
199do { \
200 unsigned long long _val = native_read_tscp(&(aux)); \
201 (low) = (u32)_val; \
202 (high) = (u32)(_val >> 32); \
203} while (0)
204
205#define rdtscpll(val, aux) (val) = native_read_tscp(&(aux))
206
207#endif /* !CONFIG_PARAVIRT */
208
209
210#define checking_wrmsrl(msr, val) wrmsr_safe((msr), (u32)(val), \
211 (u32)((val) >> 32))
212
213#define write_tsc(val1, val2) wrmsr(0x10, (val1), (val2))
214
215#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0)
216
217#ifdef CONFIG_SMP
218int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
219int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
220int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);
221int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h);
222#else /* CONFIG_SMP */
223static inline int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
224{
225 rdmsr(msr_no, *l, *h);
226 return 0;
227}
228static inline int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
229{
230 wrmsr(msr_no, l, h);
231 return 0;
232}
233static inline int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no,
234 u32 *l, u32 *h)
235{
236 return rdmsr_safe(msr_no, l, h);
237}
238static inline int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
239{
240 return wrmsr_safe(msr_no, l, h);
241}
242#endif /* CONFIG_SMP */
243#endif /* __ASSEMBLY__ */
244#endif /* __KERNEL__ */
245
246
247#endif /* ASM_X86__MSR_H */
diff --git a/include/asm-x86/mtrr.h b/include/asm-x86/mtrr.h
deleted file mode 100644
index 23a7f83da953..000000000000
--- a/include/asm-x86/mtrr.h
+++ /dev/null
@@ -1,173 +0,0 @@
1/* Generic MTRR (Memory Type Range Register) ioctls.
2
3 Copyright (C) 1997-1999 Richard Gooch
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 Richard Gooch may be reached by email at rgooch@atnf.csiro.au
20 The postal address is:
21 Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
22*/
23#ifndef ASM_X86__MTRR_H
24#define ASM_X86__MTRR_H
25
26#include <linux/ioctl.h>
27#include <linux/errno.h>
28
29#define MTRR_IOCTL_BASE 'M'
30
31struct mtrr_sentry {
32 unsigned long base; /* Base address */
33 unsigned int size; /* Size of region */
34 unsigned int type; /* Type of region */
35};
36
37/* Warning: this structure has a different order from i386
38 on x86-64. The 32bit emulation code takes care of that.
39 But you need to use this for 64bit, otherwise your X server
40 will break. */
41
42#ifdef __i386__
43struct mtrr_gentry {
44 unsigned int regnum; /* Register number */
45 unsigned long base; /* Base address */
46 unsigned int size; /* Size of region */
47 unsigned int type; /* Type of region */
48};
49
50#else /* __i386__ */
51
52struct mtrr_gentry {
53 unsigned long base; /* Base address */
54 unsigned int size; /* Size of region */
55 unsigned int regnum; /* Register number */
56 unsigned int type; /* Type of region */
57};
58#endif /* !__i386__ */
59
60/* These are the various ioctls */
61#define MTRRIOC_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry)
62#define MTRRIOC_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry)
63#define MTRRIOC_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry)
64#define MTRRIOC_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry)
65#define MTRRIOC_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry)
66#define MTRRIOC_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry)
67#define MTRRIOC_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry)
68#define MTRRIOC_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry)
69#define MTRRIOC_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry)
70#define MTRRIOC_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry)
71
72/* These are the region types */
73#define MTRR_TYPE_UNCACHABLE 0
74#define MTRR_TYPE_WRCOMB 1
75/*#define MTRR_TYPE_ 2*/
76/*#define MTRR_TYPE_ 3*/
77#define MTRR_TYPE_WRTHROUGH 4
78#define MTRR_TYPE_WRPROT 5
79#define MTRR_TYPE_WRBACK 6
80#define MTRR_NUM_TYPES 7
81
82#ifdef __KERNEL__
83
84/* The following functions are for use by other drivers */
85# ifdef CONFIG_MTRR
86extern u8 mtrr_type_lookup(u64 addr, u64 end);
87extern void mtrr_save_fixed_ranges(void *);
88extern void mtrr_save_state(void);
89extern int mtrr_add(unsigned long base, unsigned long size,
90 unsigned int type, bool increment);
91extern int mtrr_add_page(unsigned long base, unsigned long size,
92 unsigned int type, bool increment);
93extern int mtrr_del(int reg, unsigned long base, unsigned long size);
94extern int mtrr_del_page(int reg, unsigned long base, unsigned long size);
95extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
96extern void mtrr_ap_init(void);
97extern void mtrr_bp_init(void);
98extern int mtrr_trim_uncached_memory(unsigned long end_pfn);
99extern int amd_special_default_mtrr(void);
100# else
101static inline u8 mtrr_type_lookup(u64 addr, u64 end)
102{
103 /*
104 * Return no-MTRRs:
105 */
106 return 0xff;
107}
108#define mtrr_save_fixed_ranges(arg) do {} while (0)
109#define mtrr_save_state() do {} while (0)
110static inline int mtrr_add(unsigned long base, unsigned long size,
111 unsigned int type, bool increment)
112{
113 return -ENODEV;
114}
115static inline int mtrr_add_page(unsigned long base, unsigned long size,
116 unsigned int type, bool increment)
117{
118 return -ENODEV;
119}
120static inline int mtrr_del(int reg, unsigned long base, unsigned long size)
121{
122 return -ENODEV;
123}
124static inline int mtrr_del_page(int reg, unsigned long base, unsigned long size)
125{
126 return -ENODEV;
127}
128static inline int mtrr_trim_uncached_memory(unsigned long end_pfn)
129{
130 return 0;
131}
132static inline void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi)
133{
134}
135
136#define mtrr_ap_init() do {} while (0)
137#define mtrr_bp_init() do {} while (0)
138# endif
139
140#ifdef CONFIG_COMPAT
141#include <linux/compat.h>
142
143struct mtrr_sentry32 {
144 compat_ulong_t base; /* Base address */
145 compat_uint_t size; /* Size of region */
146 compat_uint_t type; /* Type of region */
147};
148
149struct mtrr_gentry32 {
150 compat_ulong_t regnum; /* Register number */
151 compat_uint_t base; /* Base address */
152 compat_uint_t size; /* Size of region */
153 compat_uint_t type; /* Type of region */
154};
155
156#define MTRR_IOCTL_BASE 'M'
157
158#define MTRRIOC32_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry32)
159#define MTRRIOC32_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry32)
160#define MTRRIOC32_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry32)
161#define MTRRIOC32_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry32)
162#define MTRRIOC32_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry32)
163#define MTRRIOC32_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry32)
164#define MTRRIOC32_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry32)
165#define MTRRIOC32_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry32)
166#define MTRRIOC32_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry32)
167#define MTRRIOC32_KILL_PAGE_ENTRY \
168 _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry32)
169#endif /* CONFIG_COMPAT */
170
171#endif /* __KERNEL__ */
172
173#endif /* ASM_X86__MTRR_H */
diff --git a/include/asm-x86/mutex.h b/include/asm-x86/mutex.h
deleted file mode 100644
index a731b9c573a6..000000000000
--- a/include/asm-x86/mutex.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "mutex_32.h"
3#else
4# include "mutex_64.h"
5#endif
diff --git a/include/asm-x86/mutex_32.h b/include/asm-x86/mutex_32.h
deleted file mode 100644
index 25c16d8ba3c7..000000000000
--- a/include/asm-x86/mutex_32.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 * Assembly implementation of the mutex fastpath, based on atomic
3 * decrement/increment.
4 *
5 * started by Ingo Molnar:
6 *
7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
8 */
9#ifndef ASM_X86__MUTEX_32_H
10#define ASM_X86__MUTEX_32_H
11
12#include <asm/alternative.h>
13
14/**
15 * __mutex_fastpath_lock - try to take the lock by moving the count
16 * from 1 to a 0 value
17 * @count: pointer of type atomic_t
18 * @fn: function to call if the original value was not 1
19 *
20 * Change the count from 1 to a value lower than 1, and call <fn> if it
21 * wasn't 1 originally. This function MUST leave the value lower than 1
22 * even when the "1" assertion wasn't true.
23 */
24#define __mutex_fastpath_lock(count, fail_fn) \
25do { \
26 unsigned int dummy; \
27 \
28 typecheck(atomic_t *, count); \
29 typecheck_fn(void (*)(atomic_t *), fail_fn); \
30 \
31 asm volatile(LOCK_PREFIX " decl (%%eax)\n" \
32 " jns 1f \n" \
33 " call " #fail_fn "\n" \
34 "1:\n" \
35 : "=a" (dummy) \
36 : "a" (count) \
37 : "memory", "ecx", "edx"); \
38} while (0)
39
40
41/**
42 * __mutex_fastpath_lock_retval - try to take the lock by moving the count
43 * from 1 to a 0 value
44 * @count: pointer of type atomic_t
45 * @fail_fn: function to call if the original value was not 1
46 *
47 * Change the count from 1 to a value lower than 1, and call <fail_fn> if it
48 * wasn't 1 originally. This function returns 0 if the fastpath succeeds,
49 * or anything the slow path function returns
50 */
51static inline int __mutex_fastpath_lock_retval(atomic_t *count,
52 int (*fail_fn)(atomic_t *))
53{
54 if (unlikely(atomic_dec_return(count) < 0))
55 return fail_fn(count);
56 else
57 return 0;
58}
59
60/**
61 * __mutex_fastpath_unlock - try to promote the mutex from 0 to 1
62 * @count: pointer of type atomic_t
63 * @fail_fn: function to call if the original value was not 0
64 *
65 * try to promote the mutex from 0 to 1. if it wasn't 0, call <fail_fn>.
66 * In the failure case, this function is allowed to either set the value
67 * to 1, or to set it to a value lower than 1.
68 *
69 * If the implementation sets it to a value of lower than 1, the
70 * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs
71 * to return 0 otherwise.
72 */
73#define __mutex_fastpath_unlock(count, fail_fn) \
74do { \
75 unsigned int dummy; \
76 \
77 typecheck(atomic_t *, count); \
78 typecheck_fn(void (*)(atomic_t *), fail_fn); \
79 \
80 asm volatile(LOCK_PREFIX " incl (%%eax)\n" \
81 " jg 1f\n" \
82 " call " #fail_fn "\n" \
83 "1:\n" \
84 : "=a" (dummy) \
85 : "a" (count) \
86 : "memory", "ecx", "edx"); \
87} while (0)
88
89#define __mutex_slowpath_needs_to_unlock() 1
90
91/**
92 * __mutex_fastpath_trylock - try to acquire the mutex, without waiting
93 *
94 * @count: pointer of type atomic_t
95 * @fail_fn: fallback function
96 *
97 * Change the count from 1 to a value lower than 1, and return 0 (failure)
98 * if it wasn't 1 originally, or return 1 (success) otherwise. This function
99 * MUST leave the value lower than 1 even when the "1" assertion wasn't true.
100 * Additionally, if the value was < 0 originally, this function must not leave
101 * it to 0 on failure.
102 */
103static inline int __mutex_fastpath_trylock(atomic_t *count,
104 int (*fail_fn)(atomic_t *))
105{
106 /*
107 * We have two variants here. The cmpxchg based one is the best one
108 * because it never induce a false contention state. It is included
109 * here because architectures using the inc/dec algorithms over the
110 * xchg ones are much more likely to support cmpxchg natively.
111 *
112 * If not we fall back to the spinlock based variant - that is
113 * just as efficient (and simpler) as a 'destructive' probing of
114 * the mutex state would be.
115 */
116#ifdef __HAVE_ARCH_CMPXCHG
117 if (likely(atomic_cmpxchg(count, 1, 0) == 1))
118 return 1;
119 return 0;
120#else
121 return fail_fn(count);
122#endif
123}
124
125#endif /* ASM_X86__MUTEX_32_H */
diff --git a/include/asm-x86/mutex_64.h b/include/asm-x86/mutex_64.h
deleted file mode 100644
index 918ba21ab9d9..000000000000
--- a/include/asm-x86/mutex_64.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * Assembly implementation of the mutex fastpath, based on atomic
3 * decrement/increment.
4 *
5 * started by Ingo Molnar:
6 *
7 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
8 */
9#ifndef ASM_X86__MUTEX_64_H
10#define ASM_X86__MUTEX_64_H
11
12/**
13 * __mutex_fastpath_lock - decrement and call function if negative
14 * @v: pointer of type atomic_t
15 * @fail_fn: function to call if the result is negative
16 *
17 * Atomically decrements @v and calls <fail_fn> if the result is negative.
18 */
19#define __mutex_fastpath_lock(v, fail_fn) \
20do { \
21 unsigned long dummy; \
22 \
23 typecheck(atomic_t *, v); \
24 typecheck_fn(void (*)(atomic_t *), fail_fn); \
25 \
26 asm volatile(LOCK_PREFIX " decl (%%rdi)\n" \
27 " jns 1f \n" \
28 " call " #fail_fn "\n" \
29 "1:" \
30 : "=D" (dummy) \
31 : "D" (v) \
32 : "rax", "rsi", "rdx", "rcx", \
33 "r8", "r9", "r10", "r11", "memory"); \
34} while (0)
35
36/**
37 * __mutex_fastpath_lock_retval - try to take the lock by moving the count
38 * from 1 to a 0 value
39 * @count: pointer of type atomic_t
40 * @fail_fn: function to call if the original value was not 1
41 *
42 * Change the count from 1 to a value lower than 1, and call <fail_fn> if
43 * it wasn't 1 originally. This function returns 0 if the fastpath succeeds,
44 * or anything the slow path function returns
45 */
46static inline int __mutex_fastpath_lock_retval(atomic_t *count,
47 int (*fail_fn)(atomic_t *))
48{
49 if (unlikely(atomic_dec_return(count) < 0))
50 return fail_fn(count);
51 else
52 return 0;
53}
54
55/**
56 * __mutex_fastpath_unlock - increment and call function if nonpositive
57 * @v: pointer of type atomic_t
58 * @fail_fn: function to call if the result is nonpositive
59 *
60 * Atomically increments @v and calls <fail_fn> if the result is nonpositive.
61 */
62#define __mutex_fastpath_unlock(v, fail_fn) \
63do { \
64 unsigned long dummy; \
65 \
66 typecheck(atomic_t *, v); \
67 typecheck_fn(void (*)(atomic_t *), fail_fn); \
68 \
69 asm volatile(LOCK_PREFIX " incl (%%rdi)\n" \
70 " jg 1f\n" \
71 " call " #fail_fn "\n" \
72 "1:" \
73 : "=D" (dummy) \
74 : "D" (v) \
75 : "rax", "rsi", "rdx", "rcx", \
76 "r8", "r9", "r10", "r11", "memory"); \
77} while (0)
78
79#define __mutex_slowpath_needs_to_unlock() 1
80
81/**
82 * __mutex_fastpath_trylock - try to acquire the mutex, without waiting
83 *
84 * @count: pointer of type atomic_t
85 * @fail_fn: fallback function
86 *
87 * Change the count from 1 to 0 and return 1 (success), or return 0 (failure)
88 * if it wasn't 1 originally. [the fallback function is never used on
89 * x86_64, because all x86_64 CPUs have a CMPXCHG instruction.]
90 */
91static inline int __mutex_fastpath_trylock(atomic_t *count,
92 int (*fail_fn)(atomic_t *))
93{
94 if (likely(atomic_cmpxchg(count, 1, 0) == 1))
95 return 1;
96 else
97 return 0;
98}
99
100#endif /* ASM_X86__MUTEX_64_H */
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
deleted file mode 100644
index a53f829a97c5..000000000000
--- a/include/asm-x86/nmi.h
+++ /dev/null
@@ -1,81 +0,0 @@
1#ifndef ASM_X86__NMI_H
2#define ASM_X86__NMI_H
3
4#include <linux/pm.h>
5#include <asm/irq.h>
6#include <asm/io.h>
7
8#ifdef ARCH_HAS_NMI_WATCHDOG
9
10/**
11 * do_nmi_callback
12 *
13 * Check to see if a callback exists and execute it. Return 1
14 * if the handler exists and was handled successfully.
15 */
16int do_nmi_callback(struct pt_regs *regs, int cpu);
17
18extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
19extern int check_nmi_watchdog(void);
20extern int nmi_watchdog_enabled;
21extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
22extern int avail_to_resrv_perfctr_nmi(unsigned int);
23extern int reserve_perfctr_nmi(unsigned int);
24extern void release_perfctr_nmi(unsigned int);
25extern int reserve_evntsel_nmi(unsigned int);
26extern void release_evntsel_nmi(unsigned int);
27
28extern void setup_apic_nmi_watchdog(void *);
29extern void stop_apic_nmi_watchdog(void *);
30extern void disable_timer_nmi_watchdog(void);
31extern void enable_timer_nmi_watchdog(void);
32extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
33extern void cpu_nmi_set_wd_enabled(void);
34
35extern atomic_t nmi_active;
36extern unsigned int nmi_watchdog;
37#define NMI_NONE 0
38#define NMI_IO_APIC 1
39#define NMI_LOCAL_APIC 2
40#define NMI_INVALID 3
41
42struct ctl_table;
43struct file;
44extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
45 void __user *, size_t *, loff_t *);
46extern int unknown_nmi_panic;
47
48void __trigger_all_cpu_backtrace(void);
49#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
50
51static inline void localise_nmi_watchdog(void)
52{
53 if (nmi_watchdog == NMI_IO_APIC)
54 nmi_watchdog = NMI_LOCAL_APIC;
55}
56
57/* check if nmi_watchdog is active (ie was specified at boot) */
58static inline int nmi_watchdog_active(void)
59{
60 /*
61 * actually it should be:
62 * return (nmi_watchdog == NMI_LOCAL_APIC ||
63 * nmi_watchdog == NMI_IO_APIC)
64 * but since they are power of two we could use a
65 * cheaper way --cvg
66 */
67 return nmi_watchdog & 0x3;
68}
69#endif
70
71void lapic_watchdog_stop(void);
72int lapic_watchdog_init(unsigned nmi_hz);
73int lapic_wd_event(unsigned nmi_hz);
74unsigned lapic_adjust_nmi_hz(unsigned hz);
75int lapic_watchdog_ok(void);
76void disable_lapic_nmi_watchdog(void);
77void enable_lapic_nmi_watchdog(void);
78void stop_nmi(void);
79void restart_nmi(void);
80
81#endif /* ASM_X86__NMI_H */
diff --git a/include/asm-x86/nops.h b/include/asm-x86/nops.h
deleted file mode 100644
index ae742721ae73..000000000000
--- a/include/asm-x86/nops.h
+++ /dev/null
@@ -1,118 +0,0 @@
1#ifndef ASM_X86__NOPS_H
2#define ASM_X86__NOPS_H
3
4/* Define nops for use with alternative() */
5
6/* generic versions from gas
7 1: nop
8 the following instructions are NOT nops in 64-bit mode,
9 for 64-bit mode use K8 or P6 nops instead
10 2: movl %esi,%esi
11 3: leal 0x00(%esi),%esi
12 4: leal 0x00(,%esi,1),%esi
13 6: leal 0x00000000(%esi),%esi
14 7: leal 0x00000000(,%esi,1),%esi
15*/
16#define GENERIC_NOP1 ".byte 0x90\n"
17#define GENERIC_NOP2 ".byte 0x89,0xf6\n"
18#define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n"
19#define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n"
20#define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4
21#define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n"
22#define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n"
23#define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7
24
25/* Opteron 64bit nops
26 1: nop
27 2: osp nop
28 3: osp osp nop
29 4: osp osp osp nop
30*/
31#define K8_NOP1 GENERIC_NOP1
32#define K8_NOP2 ".byte 0x66,0x90\n"
33#define K8_NOP3 ".byte 0x66,0x66,0x90\n"
34#define K8_NOP4 ".byte 0x66,0x66,0x66,0x90\n"
35#define K8_NOP5 K8_NOP3 K8_NOP2
36#define K8_NOP6 K8_NOP3 K8_NOP3
37#define K8_NOP7 K8_NOP4 K8_NOP3
38#define K8_NOP8 K8_NOP4 K8_NOP4
39
40/* K7 nops
41 uses eax dependencies (arbitary choice)
42 1: nop
43 2: movl %eax,%eax
44 3: leal (,%eax,1),%eax
45 4: leal 0x00(,%eax,1),%eax
46 6: leal 0x00000000(%eax),%eax
47 7: leal 0x00000000(,%eax,1),%eax
48*/
49#define K7_NOP1 GENERIC_NOP1
50#define K7_NOP2 ".byte 0x8b,0xc0\n"
51#define K7_NOP3 ".byte 0x8d,0x04,0x20\n"
52#define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n"
53#define K7_NOP5 K7_NOP4 ASM_NOP1
54#define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n"
55#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n"
56#define K7_NOP8 K7_NOP7 ASM_NOP1
57
58/* P6 nops
59 uses eax dependencies (Intel-recommended choice)
60 1: nop
61 2: osp nop
62 3: nopl (%eax)
63 4: nopl 0x00(%eax)
64 5: nopl 0x00(%eax,%eax,1)
65 6: osp nopl 0x00(%eax,%eax,1)
66 7: nopl 0x00000000(%eax)
67 8: nopl 0x00000000(%eax,%eax,1)
68*/
69#define P6_NOP1 GENERIC_NOP1
70#define P6_NOP2 ".byte 0x66,0x90\n"
71#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n"
72#define P6_NOP4 ".byte 0x0f,0x1f,0x40,0\n"
73#define P6_NOP5 ".byte 0x0f,0x1f,0x44,0x00,0\n"
74#define P6_NOP6 ".byte 0x66,0x0f,0x1f,0x44,0x00,0\n"
75#define P6_NOP7 ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
76#define P6_NOP8 ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
77
78#if defined(CONFIG_MK7)
79#define ASM_NOP1 K7_NOP1
80#define ASM_NOP2 K7_NOP2
81#define ASM_NOP3 K7_NOP3
82#define ASM_NOP4 K7_NOP4
83#define ASM_NOP5 K7_NOP5
84#define ASM_NOP6 K7_NOP6
85#define ASM_NOP7 K7_NOP7
86#define ASM_NOP8 K7_NOP8
87#elif defined(CONFIG_X86_P6_NOP)
88#define ASM_NOP1 P6_NOP1
89#define ASM_NOP2 P6_NOP2
90#define ASM_NOP3 P6_NOP3
91#define ASM_NOP4 P6_NOP4
92#define ASM_NOP5 P6_NOP5
93#define ASM_NOP6 P6_NOP6
94#define ASM_NOP7 P6_NOP7
95#define ASM_NOP8 P6_NOP8
96#elif defined(CONFIG_X86_64)
97#define ASM_NOP1 K8_NOP1
98#define ASM_NOP2 K8_NOP2
99#define ASM_NOP3 K8_NOP3
100#define ASM_NOP4 K8_NOP4
101#define ASM_NOP5 K8_NOP5
102#define ASM_NOP6 K8_NOP6
103#define ASM_NOP7 K8_NOP7
104#define ASM_NOP8 K8_NOP8
105#else
106#define ASM_NOP1 GENERIC_NOP1
107#define ASM_NOP2 GENERIC_NOP2
108#define ASM_NOP3 GENERIC_NOP3
109#define ASM_NOP4 GENERIC_NOP4
110#define ASM_NOP5 GENERIC_NOP5
111#define ASM_NOP6 GENERIC_NOP6
112#define ASM_NOP7 GENERIC_NOP7
113#define ASM_NOP8 GENERIC_NOP8
114#endif
115
116#define ASM_NOP_MAX 8
117
118#endif /* ASM_X86__NOPS_H */
diff --git a/include/asm-x86/numa.h b/include/asm-x86/numa.h
deleted file mode 100644
index 27da400d3138..000000000000
--- a/include/asm-x86/numa.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "numa_32.h"
3#else
4# include "numa_64.h"
5#endif
diff --git a/include/asm-x86/numa_32.h b/include/asm-x86/numa_32.h
deleted file mode 100644
index 44cb07855c5b..000000000000
--- a/include/asm-x86/numa_32.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef ASM_X86__NUMA_32_H
2#define ASM_X86__NUMA_32_H
3
4extern int pxm_to_nid(int pxm);
5extern void numa_remove_cpu(int cpu);
6
7#ifdef CONFIG_NUMA
8extern void set_highmem_pages_init(void);
9#endif
10
11#endif /* ASM_X86__NUMA_32_H */
diff --git a/include/asm-x86/numa_64.h b/include/asm-x86/numa_64.h
deleted file mode 100644
index 15c990395b02..000000000000
--- a/include/asm-x86/numa_64.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef ASM_X86__NUMA_64_H
2#define ASM_X86__NUMA_64_H
3
4#include <linux/nodemask.h>
5#include <asm/apicdef.h>
6
7struct bootnode {
8 u64 start;
9 u64 end;
10};
11
12extern int compute_hash_shift(struct bootnode *nodes, int numblks,
13 int *nodeids);
14
15#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
16
17extern void numa_init_array(void);
18extern int numa_off;
19
20extern void srat_reserve_add_area(int nodeid);
21extern int hotadd_percent;
22
23extern s16 apicid_to_node[MAX_LOCAL_APIC];
24
25extern unsigned long numa_free_all_bootmem(void);
26extern void setup_node_bootmem(int nodeid, unsigned long start,
27 unsigned long end);
28
29#ifdef CONFIG_NUMA
30extern void __init init_cpu_to_node(void);
31extern void __cpuinit numa_set_node(int cpu, int node);
32extern void __cpuinit numa_clear_node(int cpu);
33extern void __cpuinit numa_add_cpu(int cpu);
34extern void __cpuinit numa_remove_cpu(int cpu);
35#else
36static inline void init_cpu_to_node(void) { }
37static inline void numa_set_node(int cpu, int node) { }
38static inline void numa_clear_node(int cpu) { }
39static inline void numa_add_cpu(int cpu, int node) { }
40static inline void numa_remove_cpu(int cpu) { }
41#endif
42
43#endif /* ASM_X86__NUMA_64_H */
diff --git a/include/asm-x86/numaq.h b/include/asm-x86/numaq.h
deleted file mode 100644
index 124bf7d4b70a..000000000000
--- a/include/asm-x86/numaq.h
+++ /dev/null
@@ -1,169 +0,0 @@
1/*
2 * Written by: Patricia Gaughen, IBM Corporation
3 *
4 * Copyright (C) 2002, IBM Corp.
5 *
6 * All rights reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 * Send feedback to <gone@us.ibm.com>
24 */
25
26#ifndef ASM_X86__NUMAQ_H
27#define ASM_X86__NUMAQ_H
28
29#ifdef CONFIG_X86_NUMAQ
30
31extern int found_numaq;
32extern int get_memcfg_numaq(void);
33
34/*
35 * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the
36 */
37#define SYS_CFG_DATA_PRIV_ADDR 0x0009d000 /* place for scd in private
38 quad space */
39
40/*
41 * Communication area for each processor on lynxer-processor tests.
42 *
43 * NOTE: If you change the size of this eachproc structure you need
44 * to change the definition for EACH_QUAD_SIZE.
45 */
46struct eachquadmem {
47 unsigned int priv_mem_start; /* Starting address of this */
48 /* quad's private memory. */
49 /* This is always 0. */
50 /* In MB. */
51 unsigned int priv_mem_size; /* Size of this quad's */
52 /* private memory. */
53 /* In MB. */
54 unsigned int low_shrd_mem_strp_start;/* Starting address of this */
55 /* quad's low shared block */
56 /* (untranslated). */
57 /* In MB. */
58 unsigned int low_shrd_mem_start; /* Starting address of this */
59 /* quad's low shared memory */
60 /* (untranslated). */
61 /* In MB. */
62 unsigned int low_shrd_mem_size; /* Size of this quad's low */
63 /* shared memory. */
64 /* In MB. */
65 unsigned int lmmio_copb_start; /* Starting address of this */
66 /* quad's local memory */
67 /* mapped I/O in the */
68 /* compatibility OPB. */
69 /* In MB. */
70 unsigned int lmmio_copb_size; /* Size of this quad's local */
71 /* memory mapped I/O in the */
72 /* compatibility OPB. */
73 /* In MB. */
74 unsigned int lmmio_nopb_start; /* Starting address of this */
75 /* quad's local memory */
76 /* mapped I/O in the */
77 /* non-compatibility OPB. */
78 /* In MB. */
79 unsigned int lmmio_nopb_size; /* Size of this quad's local */
80 /* memory mapped I/O in the */
81 /* non-compatibility OPB. */
82 /* In MB. */
83 unsigned int io_apic_0_start; /* Starting address of I/O */
84 /* APIC 0. */
85 unsigned int io_apic_0_sz; /* Size I/O APIC 0. */
86 unsigned int io_apic_1_start; /* Starting address of I/O */
87 /* APIC 1. */
88 unsigned int io_apic_1_sz; /* Size I/O APIC 1. */
89 unsigned int hi_shrd_mem_start; /* Starting address of this */
90 /* quad's high shared memory.*/
91 /* In MB. */
92 unsigned int hi_shrd_mem_size; /* Size of this quad's high */
93 /* shared memory. */
94 /* In MB. */
95 unsigned int mps_table_addr; /* Address of this quad's */
96 /* MPS tables from BIOS, */
97 /* in system space.*/
98 unsigned int lcl_MDC_pio_addr; /* Port-I/O address for */
99 /* local access of MDC. */
100 unsigned int rmt_MDC_mmpio_addr; /* MM-Port-I/O address for */
101 /* remote access of MDC. */
102 unsigned int mm_port_io_start; /* Starting address of this */
103 /* quad's memory mapped Port */
104 /* I/O space. */
105 unsigned int mm_port_io_size; /* Size of this quad's memory*/
106 /* mapped Port I/O space. */
107 unsigned int mm_rmt_io_apic_start; /* Starting address of this */
108 /* quad's memory mapped */
109 /* remote I/O APIC space. */
110 unsigned int mm_rmt_io_apic_size; /* Size of this quad's memory*/
111 /* mapped remote I/O APIC */
112 /* space. */
113 unsigned int mm_isa_start; /* Starting address of this */
114 /* quad's memory mapped ISA */
115 /* space (contains MDC */
116 /* memory space). */
117 unsigned int mm_isa_size; /* Size of this quad's memory*/
118 /* mapped ISA space (contains*/
119 /* MDC memory space). */
120 unsigned int rmt_qmi_addr; /* Remote addr to access QMI.*/
121 unsigned int lcl_qmi_addr; /* Local addr to access QMI. */
122};
123
124/*
125 * Note: This structure must be NOT be changed unless the multiproc and
126 * OS are changed to reflect the new structure.
127 */
128struct sys_cfg_data {
129 unsigned int quad_id;
130 unsigned int bsp_proc_id; /* Boot Strap Processor in this quad. */
131 unsigned int scd_version; /* Version number of this table. */
132 unsigned int first_quad_id;
133 unsigned int quads_present31_0; /* 1 bit for each quad */
134 unsigned int quads_present63_32; /* 1 bit for each quad */
135 unsigned int config_flags;
136 unsigned int boot_flags;
137 unsigned int csr_start_addr; /* Absolute value (not in MB) */
138 unsigned int csr_size; /* Absolute value (not in MB) */
139 unsigned int lcl_apic_start_addr; /* Absolute value (not in MB) */
140 unsigned int lcl_apic_size; /* Absolute value (not in MB) */
141 unsigned int low_shrd_mem_base; /* 0 or 512MB or 1GB */
142 unsigned int low_shrd_mem_quad_offset; /* 0,128M,256M,512M,1G */
143 /* may not be totally populated */
144 unsigned int split_mem_enbl; /* 0 for no low shared memory */
145 unsigned int mmio_sz; /* Size of total system memory mapped I/O */
146 /* (in MB). */
147 unsigned int quad_spin_lock; /* Spare location used for quad */
148 /* bringup. */
149 unsigned int nonzero55; /* For checksumming. */
150 unsigned int nonzeroaa; /* For checksumming. */
151 unsigned int scd_magic_number;
152 unsigned int system_type;
153 unsigned int checksum;
154 /*
155 * memory configuration area for each quad
156 */
157 struct eachquadmem eq[MAX_NUMNODES]; /* indexed by quad id */
158};
159
160void numaq_tsc_disable(void);
161
162#else
163static inline int get_memcfg_numaq(void)
164{
165 return 0;
166}
167#endif /* CONFIG_X86_NUMAQ */
168#endif /* ASM_X86__NUMAQ_H */
169
diff --git a/include/asm-x86/numaq/apic.h b/include/asm-x86/numaq/apic.h
deleted file mode 100644
index a8344ba6ea15..000000000000
--- a/include/asm-x86/numaq/apic.h
+++ /dev/null
@@ -1,138 +0,0 @@
1#ifndef __ASM_NUMAQ_APIC_H
2#define __ASM_NUMAQ_APIC_H
3
4#include <asm/io.h>
5#include <linux/mmzone.h>
6#include <linux/nodemask.h>
7
8#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
9
10static inline cpumask_t target_cpus(void)
11{
12 return CPU_MASK_ALL;
13}
14
15#define TARGET_CPUS (target_cpus())
16
17#define NO_BALANCE_IRQ (1)
18#define esr_disable (1)
19
20#define INT_DELIVERY_MODE dest_LowestPrio
21#define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */
22
23static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
24{
25 return physid_isset(apicid, bitmap);
26}
27static inline unsigned long check_apicid_present(int bit)
28{
29 return physid_isset(bit, phys_cpu_present_map);
30}
31#define apicid_cluster(apicid) (apicid & 0xF0)
32
33static inline int apic_id_registered(void)
34{
35 return 1;
36}
37
38static inline void init_apic_ldr(void)
39{
40 /* Already done in NUMA-Q firmware */
41}
42
43static inline void setup_apic_routing(void)
44{
45 printk("Enabling APIC mode: %s. Using %d I/O APICs\n",
46 "NUMA-Q", nr_ioapics);
47}
48
49/*
50 * Skip adding the timer int on secondary nodes, which causes
51 * a small but painful rift in the time-space continuum.
52 */
53static inline int multi_timer_check(int apic, int irq)
54{
55 return apic != 0 && irq == 0;
56}
57
58static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
59{
60 /* We don't have a good way to do this yet - hack */
61 return physids_promote(0xFUL);
62}
63
64/* Mapping from cpu number to logical apicid */
65extern u8 cpu_2_logical_apicid[];
66static inline int cpu_to_logical_apicid(int cpu)
67{
68 if (cpu >= NR_CPUS)
69 return BAD_APICID;
70 return (int)cpu_2_logical_apicid[cpu];
71}
72
73/*
74 * Supporting over 60 cpus on NUMA-Q requires a locality-dependent
75 * cpu to APIC ID relation to properly interact with the intelligent
76 * mode of the cluster controller.
77 */
78static inline int cpu_present_to_apicid(int mps_cpu)
79{
80 if (mps_cpu < 60)
81 return ((mps_cpu >> 2) << 4) | (1 << (mps_cpu & 0x3));
82 else
83 return BAD_APICID;
84}
85
86static inline int apicid_to_node(int logical_apicid)
87{
88 return logical_apicid >> 4;
89}
90
91static inline physid_mask_t apicid_to_cpu_present(int logical_apicid)
92{
93 int node = apicid_to_node(logical_apicid);
94 int cpu = __ffs(logical_apicid & 0xf);
95
96 return physid_mask_of_physid(cpu + 4*node);
97}
98
99extern void *xquad_portio;
100
101static inline void setup_portio_remap(void)
102{
103 int num_quads = num_online_nodes();
104
105 if (num_quads <= 1)
106 return;
107
108 printk("Remapping cross-quad port I/O for %d quads\n", num_quads);
109 xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD);
110 printk("xquad_portio vaddr 0x%08lx, len %08lx\n",
111 (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD);
112}
113
114static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
115{
116 return (1);
117}
118
119static inline void enable_apic_mode(void)
120{
121}
122
123/*
124 * We use physical apicids here, not logical, so just return the default
125 * physical broadcast to stop people from breaking us
126 */
127static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
128{
129 return (int) 0xF;
130}
131
132/* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */
133static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
134{
135 return cpuid_apic >> index_msb;
136}
137
138#endif /* __ASM_NUMAQ_APIC_H */
diff --git a/include/asm-x86/numaq/apicdef.h b/include/asm-x86/numaq/apicdef.h
deleted file mode 100644
index e012a46cc22a..000000000000
--- a/include/asm-x86/numaq/apicdef.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef __ASM_NUMAQ_APICDEF_H
2#define __ASM_NUMAQ_APICDEF_H
3
4
5#define APIC_ID_MASK (0xF<<24)
6
7static inline unsigned get_apic_id(unsigned long x)
8{
9 return (((x)>>24)&0x0F);
10}
11
12#define GET_APIC_ID(x) get_apic_id(x)
13
14#endif
diff --git a/include/asm-x86/numaq/ipi.h b/include/asm-x86/numaq/ipi.h
deleted file mode 100644
index 935588d286cf..000000000000
--- a/include/asm-x86/numaq/ipi.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef __ASM_NUMAQ_IPI_H
2#define __ASM_NUMAQ_IPI_H
3
4void send_IPI_mask_sequence(cpumask_t, int vector);
5
6static inline void send_IPI_mask(cpumask_t mask, int vector)
7{
8 send_IPI_mask_sequence(mask, vector);
9}
10
11static inline void send_IPI_allbutself(int vector)
12{
13 cpumask_t mask = cpu_online_map;
14 cpu_clear(smp_processor_id(), mask);
15
16 if (!cpus_empty(mask))
17 send_IPI_mask(mask, vector);
18}
19
20static inline void send_IPI_all(int vector)
21{
22 send_IPI_mask(cpu_online_map, vector);
23}
24
25#endif /* __ASM_NUMAQ_IPI_H */
diff --git a/include/asm-x86/numaq/mpparse.h b/include/asm-x86/numaq/mpparse.h
deleted file mode 100644
index 252292e077b6..000000000000
--- a/include/asm-x86/numaq/mpparse.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_NUMAQ_MPPARSE_H
2#define __ASM_NUMAQ_MPPARSE_H
3
4extern void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem,
5 char *productid);
6
7#endif /* __ASM_NUMAQ_MPPARSE_H */
diff --git a/include/asm-x86/numaq/wakecpu.h b/include/asm-x86/numaq/wakecpu.h
deleted file mode 100644
index c577bda5b1c5..000000000000
--- a/include/asm-x86/numaq/wakecpu.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef __ASM_NUMAQ_WAKECPU_H
2#define __ASM_NUMAQ_WAKECPU_H
3
4/* This file copes with machines that wakeup secondary CPUs by NMIs */
5
6#define WAKE_SECONDARY_VIA_NMI
7
8#define TRAMPOLINE_LOW phys_to_virt(0x8)
9#define TRAMPOLINE_HIGH phys_to_virt(0xa)
10
11#define boot_cpu_apicid boot_cpu_logical_apicid
12
13/* We don't do anything here because we use NMI's to boot instead */
14static inline void wait_for_init_deassert(atomic_t *deassert)
15{
16}
17
18/*
19 * Because we use NMIs rather than the INIT-STARTUP sequence to
20 * bootstrap the CPUs, the APIC may be in a weird state. Kick it.
21 */
22static inline void smp_callin_clear_local_apic(void)
23{
24 clear_local_APIC();
25}
26
27static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
28{
29 printk("Storing NMI vector\n");
30 *high = *((volatile unsigned short *) TRAMPOLINE_HIGH);
31 *low = *((volatile unsigned short *) TRAMPOLINE_LOW);
32}
33
34static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
35{
36 printk("Restoring NMI vector\n");
37 *((volatile unsigned short *) TRAMPOLINE_HIGH) = *high;
38 *((volatile unsigned short *) TRAMPOLINE_LOW) = *low;
39}
40
41#define inquire_remote_apic(apicid) {}
42
43#endif /* __ASM_NUMAQ_WAKECPU_H */
diff --git a/include/asm-x86/olpc.h b/include/asm-x86/olpc.h
deleted file mode 100644
index d7328b1a05c1..000000000000
--- a/include/asm-x86/olpc.h
+++ /dev/null
@@ -1,132 +0,0 @@
1/* OLPC machine specific definitions */
2
3#ifndef ASM_X86__OLPC_H
4#define ASM_X86__OLPC_H
5
6#include <asm/geode.h>
7
8struct olpc_platform_t {
9 int flags;
10 uint32_t boardrev;
11 int ecver;
12};
13
14#define OLPC_F_PRESENT 0x01
15#define OLPC_F_DCON 0x02
16#define OLPC_F_VSA 0x04
17
18#ifdef CONFIG_OLPC
19
20extern struct olpc_platform_t olpc_platform_info;
21
22/*
23 * OLPC board IDs contain the major build number within the mask 0x0ff0,
24 * and the minor build number withing 0x000f. Pre-builds have a minor
25 * number less than 8, and normal builds start at 8. For example, 0x0B10
26 * is a PreB1, and 0x0C18 is a C1.
27 */
28
29static inline uint32_t olpc_board(uint8_t id)
30{
31 return (id << 4) | 0x8;
32}
33
34static inline uint32_t olpc_board_pre(uint8_t id)
35{
36 return id << 4;
37}
38
39static inline int machine_is_olpc(void)
40{
41 return (olpc_platform_info.flags & OLPC_F_PRESENT) ? 1 : 0;
42}
43
44/*
45 * The DCON is OLPC's Display Controller. It has a number of unique
46 * features that we might want to take advantage of..
47 */
48static inline int olpc_has_dcon(void)
49{
50 return (olpc_platform_info.flags & OLPC_F_DCON) ? 1 : 0;
51}
52
53/*
54 * The VSA is software from AMD that typical Geode bioses will include.
55 * It is used to emulate the PCI bus, VGA, etc. OLPC's Open Firmware does
56 * not include the VSA; instead, PCI is emulated by the kernel.
57 *
58 * The VSA is described further in arch/x86/pci/olpc.c.
59 */
60static inline int olpc_has_vsa(void)
61{
62 return (olpc_platform_info.flags & OLPC_F_VSA) ? 1 : 0;
63}
64
65/*
66 * The "Mass Production" version of OLPC's XO is identified as being model
67 * C2. During the prototype phase, the following models (in chronological
68 * order) were created: A1, B1, B2, B3, B4, C1. The A1 through B2 models
69 * were based on Geode GX CPUs, and models after that were based upon
70 * Geode LX CPUs. There were also some hand-assembled models floating
71 * around, referred to as PreB1, PreB2, etc.
72 */
73static inline int olpc_board_at_least(uint32_t rev)
74{
75 return olpc_platform_info.boardrev >= rev;
76}
77
78#else
79
80static inline int machine_is_olpc(void)
81{
82 return 0;
83}
84
85static inline int olpc_has_dcon(void)
86{
87 return 0;
88}
89
90static inline int olpc_has_vsa(void)
91{
92 return 0;
93}
94
95#endif
96
97/* EC related functions */
98
99extern int olpc_ec_cmd(unsigned char cmd, unsigned char *inbuf, size_t inlen,
100 unsigned char *outbuf, size_t outlen);
101
102extern int olpc_ec_mask_set(uint8_t bits);
103extern int olpc_ec_mask_unset(uint8_t bits);
104
105/* EC commands */
106
107#define EC_FIRMWARE_REV 0x08
108
109/* SCI source values */
110
111#define EC_SCI_SRC_EMPTY 0x00
112#define EC_SCI_SRC_GAME 0x01
113#define EC_SCI_SRC_BATTERY 0x02
114#define EC_SCI_SRC_BATSOC 0x04
115#define EC_SCI_SRC_BATERR 0x08
116#define EC_SCI_SRC_EBOOK 0x10
117#define EC_SCI_SRC_WLAN 0x20
118#define EC_SCI_SRC_ACPWR 0x40
119#define EC_SCI_SRC_ALL 0x7F
120
121/* GPIO assignments */
122
123#define OLPC_GPIO_MIC_AC geode_gpio(1)
124#define OLPC_GPIO_DCON_IRQ geode_gpio(7)
125#define OLPC_GPIO_THRM_ALRM geode_gpio(10)
126#define OLPC_GPIO_SMB_CLK geode_gpio(14)
127#define OLPC_GPIO_SMB_DATA geode_gpio(15)
128#define OLPC_GPIO_WORKAUX geode_gpio(24)
129#define OLPC_GPIO_LID geode_gpio(26)
130#define OLPC_GPIO_ECSCI geode_gpio(27)
131
132#endif /* ASM_X86__OLPC_H */
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
deleted file mode 100644
index d4f1d5791fc1..000000000000
--- a/include/asm-x86/page.h
+++ /dev/null
@@ -1,209 +0,0 @@
1#ifndef ASM_X86__PAGE_H
2#define ASM_X86__PAGE_H
3
4#include <linux/const.h>
5
6/* PAGE_SHIFT determines the page size */
7#define PAGE_SHIFT 12
8#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
9#define PAGE_MASK (~(PAGE_SIZE-1))
10
11#ifdef __KERNEL__
12
13#define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1)
14#define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
15
16/* Cast PAGE_MASK to a signed type so that it is sign-extended if
17 virtual addresses are 32-bits but physical addresses are larger
18 (ie, 32-bit PAE). */
19#define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
20
21/* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
22#define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK)
23
24/* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */
25#define PTE_FLAGS_MASK (~PTE_PFN_MASK)
26
27#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT)
28#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1))
29
30#define HPAGE_SHIFT PMD_SHIFT
31#define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT)
32#define HPAGE_MASK (~(HPAGE_SIZE - 1))
33#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
34
35#define HUGE_MAX_HSTATE 2
36
37#ifndef __ASSEMBLY__
38#include <linux/types.h>
39#endif
40
41#ifdef CONFIG_X86_64
42#include <asm/page_64.h>
43#else
44#include <asm/page_32.h>
45#endif /* CONFIG_X86_64 */
46
47#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
48
49#define VM_DATA_DEFAULT_FLAGS \
50 (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
51 VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
52
53
54#ifndef __ASSEMBLY__
55
56typedef struct { pgdval_t pgd; } pgd_t;
57typedef struct { pgprotval_t pgprot; } pgprot_t;
58
59extern int page_is_ram(unsigned long pagenr);
60extern int pagerange_is_ram(unsigned long start, unsigned long end);
61extern int devmem_is_allowed(unsigned long pagenr);
62extern void map_devmem(unsigned long pfn, unsigned long size,
63 pgprot_t vma_prot);
64extern void unmap_devmem(unsigned long pfn, unsigned long size,
65 pgprot_t vma_prot);
66
67extern unsigned long max_low_pfn_mapped;
68extern unsigned long max_pfn_mapped;
69
70struct page;
71
72static inline void clear_user_page(void *page, unsigned long vaddr,
73 struct page *pg)
74{
75 clear_page(page);
76}
77
78static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
79 struct page *topage)
80{
81 copy_page(to, from);
82}
83
84#define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
85 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
86#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
87
88static inline pgd_t native_make_pgd(pgdval_t val)
89{
90 return (pgd_t) { val };
91}
92
93static inline pgdval_t native_pgd_val(pgd_t pgd)
94{
95 return pgd.pgd;
96}
97
98#if PAGETABLE_LEVELS >= 3
99#if PAGETABLE_LEVELS == 4
100typedef struct { pudval_t pud; } pud_t;
101
102static inline pud_t native_make_pud(pmdval_t val)
103{
104 return (pud_t) { val };
105}
106
107static inline pudval_t native_pud_val(pud_t pud)
108{
109 return pud.pud;
110}
111#else /* PAGETABLE_LEVELS == 3 */
112#include <asm-generic/pgtable-nopud.h>
113
114static inline pudval_t native_pud_val(pud_t pud)
115{
116 return native_pgd_val(pud.pgd);
117}
118#endif /* PAGETABLE_LEVELS == 4 */
119
120typedef struct { pmdval_t pmd; } pmd_t;
121
122static inline pmd_t native_make_pmd(pmdval_t val)
123{
124 return (pmd_t) { val };
125}
126
127static inline pmdval_t native_pmd_val(pmd_t pmd)
128{
129 return pmd.pmd;
130}
131#else /* PAGETABLE_LEVELS == 2 */
132#include <asm-generic/pgtable-nopmd.h>
133
134static inline pmdval_t native_pmd_val(pmd_t pmd)
135{
136 return native_pgd_val(pmd.pud.pgd);
137}
138#endif /* PAGETABLE_LEVELS >= 3 */
139
140static inline pte_t native_make_pte(pteval_t val)
141{
142 return (pte_t) { .pte = val };
143}
144
145static inline pteval_t native_pte_val(pte_t pte)
146{
147 return pte.pte;
148}
149
150static inline pteval_t native_pte_flags(pte_t pte)
151{
152 return native_pte_val(pte) & PTE_FLAGS_MASK;
153}
154
155#define pgprot_val(x) ((x).pgprot)
156#define __pgprot(x) ((pgprot_t) { (x) } )
157
158#ifdef CONFIG_PARAVIRT
159#include <asm/paravirt.h>
160#else /* !CONFIG_PARAVIRT */
161
162#define pgd_val(x) native_pgd_val(x)
163#define __pgd(x) native_make_pgd(x)
164
165#ifndef __PAGETABLE_PUD_FOLDED
166#define pud_val(x) native_pud_val(x)
167#define __pud(x) native_make_pud(x)
168#endif
169
170#ifndef __PAGETABLE_PMD_FOLDED
171#define pmd_val(x) native_pmd_val(x)
172#define __pmd(x) native_make_pmd(x)
173#endif
174
175#define pte_val(x) native_pte_val(x)
176#define pte_flags(x) native_pte_flags(x)
177#define __pte(x) native_make_pte(x)
178
179#endif /* CONFIG_PARAVIRT */
180
181#define __pa(x) __phys_addr((unsigned long)(x))
182#define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x))
183/* __pa_symbol should be used for C visible symbols.
184 This seems to be the official gcc blessed way to do such arithmetic. */
185#define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x)))
186
187#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
188
189#define __boot_va(x) __va(x)
190#define __boot_pa(x) __pa(x)
191
192/*
193 * virt_to_page(kaddr) returns a valid pointer if and only if
194 * virt_addr_valid(kaddr) returns true.
195 */
196#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
197#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
198extern bool __virt_addr_valid(unsigned long kaddr);
199#define virt_addr_valid(kaddr) __virt_addr_valid((unsigned long) (kaddr))
200
201#endif /* __ASSEMBLY__ */
202
203#include <asm-generic/memory_model.h>
204#include <asm-generic/page.h>
205
206#define __HAVE_ARCH_GATE_AREA 1
207
208#endif /* __KERNEL__ */
209#endif /* ASM_X86__PAGE_H */
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
deleted file mode 100644
index e8d80d1de237..000000000000
--- a/include/asm-x86/page_32.h
+++ /dev/null
@@ -1,138 +0,0 @@
1#ifndef ASM_X86__PAGE_32_H
2#define ASM_X86__PAGE_32_H
3
4/*
5 * This handles the memory map.
6 *
7 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
8 * a virtual address space of one gigabyte, which limits the
9 * amount of physical memory you can use to about 950MB.
10 *
11 * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
12 * and CONFIG_HIGHMEM64G options in the kernel configuration.
13 */
14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
15
16#ifdef CONFIG_4KSTACKS
17#define THREAD_ORDER 0
18#else
19#define THREAD_ORDER 1
20#endif
21#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
22
23#define STACKFAULT_STACK 0
24#define DOUBLEFAULT_STACK 1
25#define NMI_STACK 0
26#define DEBUG_STACK 0
27#define MCE_STACK 0
28#define N_EXCEPTION_STACKS 1
29
30#ifdef CONFIG_X86_PAE
31/* 44=32+12, the limit we can fit into an unsigned long pfn */
32#define __PHYSICAL_MASK_SHIFT 44
33#define __VIRTUAL_MASK_SHIFT 32
34#define PAGETABLE_LEVELS 3
35
36#ifndef __ASSEMBLY__
37typedef u64 pteval_t;
38typedef u64 pmdval_t;
39typedef u64 pudval_t;
40typedef u64 pgdval_t;
41typedef u64 pgprotval_t;
42typedef u64 phys_addr_t;
43
44typedef union {
45 struct {
46 unsigned long pte_low, pte_high;
47 };
48 pteval_t pte;
49} pte_t;
50#endif /* __ASSEMBLY__
51 */
52#else /* !CONFIG_X86_PAE */
53#define __PHYSICAL_MASK_SHIFT 32
54#define __VIRTUAL_MASK_SHIFT 32
55#define PAGETABLE_LEVELS 2
56
57#ifndef __ASSEMBLY__
58typedef unsigned long pteval_t;
59typedef unsigned long pmdval_t;
60typedef unsigned long pudval_t;
61typedef unsigned long pgdval_t;
62typedef unsigned long pgprotval_t;
63typedef unsigned long phys_addr_t;
64
65typedef union {
66 pteval_t pte;
67 pteval_t pte_low;
68} pte_t;
69
70#endif /* __ASSEMBLY__ */
71#endif /* CONFIG_X86_PAE */
72
73#ifndef __ASSEMBLY__
74typedef struct page *pgtable_t;
75#endif
76
77#ifdef CONFIG_HUGETLB_PAGE
78#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
79#endif
80
81#ifndef __ASSEMBLY__
82#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
83#ifdef CONFIG_DEBUG_VIRTUAL
84extern unsigned long __phys_addr(unsigned long);
85#else
86#define __phys_addr(x) __phys_addr_nodebug(x)
87#endif
88#define __phys_reloc_hide(x) RELOC_HIDE((x), 0)
89
90#ifdef CONFIG_FLATMEM
91#define pfn_valid(pfn) ((pfn) < max_mapnr)
92#endif /* CONFIG_FLATMEM */
93
94extern int nx_enabled;
95
96/*
97 * This much address space is reserved for vmalloc() and iomap()
98 * as well as fixmap mappings.
99 */
100extern unsigned int __VMALLOC_RESERVE;
101extern int sysctl_legacy_va_layout;
102
103extern void find_low_pfn_range(void);
104extern unsigned long init_memory_mapping(unsigned long start,
105 unsigned long end);
106extern void initmem_init(unsigned long, unsigned long);
107extern void free_initmem(void);
108extern void setup_bootmem_allocator(void);
109
110
111#ifdef CONFIG_X86_USE_3DNOW
112#include <asm/mmx.h>
113
114static inline void clear_page(void *page)
115{
116 mmx_clear_page(page);
117}
118
119static inline void copy_page(void *to, void *from)
120{
121 mmx_copy_page(to, from);
122}
123#else /* !CONFIG_X86_USE_3DNOW */
124#include <linux/string.h>
125
126static inline void clear_page(void *page)
127{
128 memset(page, 0, PAGE_SIZE);
129}
130
131static inline void copy_page(void *to, void *from)
132{
133 memcpy(to, from, PAGE_SIZE);
134}
135#endif /* CONFIG_X86_3DNOW */
136#endif /* !__ASSEMBLY__ */
137
138#endif /* ASM_X86__PAGE_32_H */
diff --git a/include/asm-x86/page_64.h b/include/asm-x86/page_64.h
deleted file mode 100644
index 5e64acfed0a4..000000000000
--- a/include/asm-x86/page_64.h
+++ /dev/null
@@ -1,106 +0,0 @@
1#ifndef ASM_X86__PAGE_64_H
2#define ASM_X86__PAGE_64_H
3
4#define PAGETABLE_LEVELS 4
5
6#define THREAD_ORDER 1
7#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
8#define CURRENT_MASK (~(THREAD_SIZE - 1))
9
10#define EXCEPTION_STACK_ORDER 0
11#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
12
13#define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
14#define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
15
16#define IRQSTACK_ORDER 2
17#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER)
18
19#define STACKFAULT_STACK 1
20#define DOUBLEFAULT_STACK 2
21#define NMI_STACK 3
22#define DEBUG_STACK 4
23#define MCE_STACK 5
24#define N_EXCEPTION_STACKS 5 /* hw limit: 7 */
25
26#define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT)
27#define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1))
28
29/*
30 * Set __PAGE_OFFSET to the most negative possible address +
31 * PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a
32 * hypervisor to fit. Choosing 16 slots here is arbitrary, but it's
33 * what Xen requires.
34 */
35#define __PAGE_OFFSET _AC(0xffff880000000000, UL)
36
37#define __PHYSICAL_START CONFIG_PHYSICAL_START
38#define __KERNEL_ALIGN 0x200000
39
40/*
41 * Make sure kernel is aligned to 2MB address. Catching it at compile
42 * time is better. Change your config file and compile the kernel
43 * for a 2MB aligned address (CONFIG_PHYSICAL_START)
44 */
45#if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0
46#error "CONFIG_PHYSICAL_START must be a multiple of 2MB"
47#endif
48
49#define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START)
50#define __START_KERNEL_map _AC(0xffffffff80000000, UL)
51
52/* See Documentation/x86_64/mm.txt for a description of the memory map. */
53#define __PHYSICAL_MASK_SHIFT 46
54#define __VIRTUAL_MASK_SHIFT 48
55
56/*
57 * Kernel image size is limited to 512 MB (see level2_kernel_pgt in
58 * arch/x86/kernel/head_64.S), and it is mapped here:
59 */
60#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
61#define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL)
62
63#ifndef __ASSEMBLY__
64void clear_page(void *page);
65void copy_page(void *to, void *from);
66
67/* duplicated to the one in bootmem.h */
68extern unsigned long max_pfn;
69extern unsigned long phys_base;
70
71extern unsigned long __phys_addr(unsigned long);
72#define __phys_reloc_hide(x) (x)
73
74/*
75 * These are used to make use of C type-checking..
76 */
77typedef unsigned long pteval_t;
78typedef unsigned long pmdval_t;
79typedef unsigned long pudval_t;
80typedef unsigned long pgdval_t;
81typedef unsigned long pgprotval_t;
82typedef unsigned long phys_addr_t;
83
84typedef struct page *pgtable_t;
85
86typedef struct { pteval_t pte; } pte_t;
87
88#define vmemmap ((struct page *)VMEMMAP_START)
89
90extern unsigned long init_memory_mapping(unsigned long start,
91 unsigned long end);
92
93extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn);
94extern void free_initmem(void);
95
96extern void init_extra_mapping_uc(unsigned long phys, unsigned long size);
97extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);
98
99#endif /* !__ASSEMBLY__ */
100
101#ifdef CONFIG_FLATMEM
102#define pfn_valid(pfn) ((pfn) < max_pfn)
103#endif
104
105
106#endif /* ASM_X86__PAGE_64_H */
diff --git a/include/asm-x86/param.h b/include/asm-x86/param.h
deleted file mode 100644
index 0009cfb11a5f..000000000000
--- a/include/asm-x86/param.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef ASM_X86__PARAM_H
2#define ASM_X86__PARAM_H
3
4#ifdef __KERNEL__
5# define HZ CONFIG_HZ /* Internal kernel timer frequency */
6# define USER_HZ 100 /* some user interfaces are */
7# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
8#endif
9
10#ifndef HZ
11#define HZ 100
12#endif
13
14#define EXEC_PAGESIZE 4096
15
16#ifndef NOGROUP
17#define NOGROUP (-1)
18#endif
19
20#define MAXHOSTNAMELEN 64 /* max length of hostname */
21
22#endif /* ASM_X86__PARAM_H */
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
deleted file mode 100644
index 8d6ae2f760d0..000000000000
--- a/include/asm-x86/paravirt.h
+++ /dev/null
@@ -1,1650 +0,0 @@
1#ifndef ASM_X86__PARAVIRT_H
2#define ASM_X86__PARAVIRT_H
3/* Various instructions on x86 need to be replaced for
4 * para-virtualization: those hooks are defined here. */
5
6#ifdef CONFIG_PARAVIRT
7#include <asm/page.h>
8#include <asm/asm.h>
9
10/* Bitmask of what can be clobbered: usually at least eax. */
11#define CLBR_NONE 0
12#define CLBR_EAX (1 << 0)
13#define CLBR_ECX (1 << 1)
14#define CLBR_EDX (1 << 2)
15
16#ifdef CONFIG_X86_64
17#define CLBR_RSI (1 << 3)
18#define CLBR_RDI (1 << 4)
19#define CLBR_R8 (1 << 5)
20#define CLBR_R9 (1 << 6)
21#define CLBR_R10 (1 << 7)
22#define CLBR_R11 (1 << 8)
23#define CLBR_ANY ((1 << 9) - 1)
24#include <asm/desc_defs.h>
25#else
26/* CLBR_ANY should match all regs platform has. For i386, that's just it */
27#define CLBR_ANY ((1 << 3) - 1)
28#endif /* X86_64 */
29
30#ifndef __ASSEMBLY__
31#include <linux/types.h>
32#include <linux/cpumask.h>
33#include <asm/kmap_types.h>
34#include <asm/desc_defs.h>
35
36struct page;
37struct thread_struct;
38struct desc_ptr;
39struct tss_struct;
40struct mm_struct;
41struct desc_struct;
42
43/* general info */
44struct pv_info {
45 unsigned int kernel_rpl;
46 int shared_kernel_pmd;
47 int paravirt_enabled;
48 const char *name;
49};
50
51struct pv_init_ops {
52 /*
53 * Patch may replace one of the defined code sequences with
54 * arbitrary code, subject to the same register constraints.
55 * This generally means the code is not free to clobber any
56 * registers other than EAX. The patch function should return
57 * the number of bytes of code generated, as we nop pad the
58 * rest in generic code.
59 */
60 unsigned (*patch)(u8 type, u16 clobber, void *insnbuf,
61 unsigned long addr, unsigned len);
62
63 /* Basic arch-specific setup */
64 void (*arch_setup)(void);
65 char *(*memory_setup)(void);
66 void (*post_allocator_init)(void);
67
68 /* Print a banner to identify the environment */
69 void (*banner)(void);
70};
71
72
73struct pv_lazy_ops {
74 /* Set deferred update mode, used for batching operations. */
75 void (*enter)(void);
76 void (*leave)(void);
77};
78
79struct pv_time_ops {
80 void (*time_init)(void);
81
82 /* Set and set time of day */
83 unsigned long (*get_wallclock)(void);
84 int (*set_wallclock)(unsigned long);
85
86 unsigned long long (*sched_clock)(void);
87 unsigned long (*get_tsc_khz)(void);
88};
89
90struct pv_cpu_ops {
91 /* hooks for various privileged instructions */
92 unsigned long (*get_debugreg)(int regno);
93 void (*set_debugreg)(int regno, unsigned long value);
94
95 void (*clts)(void);
96
97 unsigned long (*read_cr0)(void);
98 void (*write_cr0)(unsigned long);
99
100 unsigned long (*read_cr4_safe)(void);
101 unsigned long (*read_cr4)(void);
102 void (*write_cr4)(unsigned long);
103
104#ifdef CONFIG_X86_64
105 unsigned long (*read_cr8)(void);
106 void (*write_cr8)(unsigned long);
107#endif
108
109 /* Segment descriptor handling */
110 void (*load_tr_desc)(void);
111 void (*load_gdt)(const struct desc_ptr *);
112 void (*load_idt)(const struct desc_ptr *);
113 void (*store_gdt)(struct desc_ptr *);
114 void (*store_idt)(struct desc_ptr *);
115 void (*set_ldt)(const void *desc, unsigned entries);
116 unsigned long (*store_tr)(void);
117 void (*load_tls)(struct thread_struct *t, unsigned int cpu);
118#ifdef CONFIG_X86_64
119 void (*load_gs_index)(unsigned int idx);
120#endif
121 void (*write_ldt_entry)(struct desc_struct *ldt, int entrynum,
122 const void *desc);
123 void (*write_gdt_entry)(struct desc_struct *,
124 int entrynum, const void *desc, int size);
125 void (*write_idt_entry)(gate_desc *,
126 int entrynum, const gate_desc *gate);
127 void (*alloc_ldt)(struct desc_struct *ldt, unsigned entries);
128 void (*free_ldt)(struct desc_struct *ldt, unsigned entries);
129
130 void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t);
131
132 void (*set_iopl_mask)(unsigned mask);
133
134 void (*wbinvd)(void);
135 void (*io_delay)(void);
136
137 /* cpuid emulation, mostly so that caps bits can be disabled */
138 void (*cpuid)(unsigned int *eax, unsigned int *ebx,
139 unsigned int *ecx, unsigned int *edx);
140
141 /* MSR, PMC and TSR operations.
142 err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */
143 u64 (*read_msr_amd)(unsigned int msr, int *err);
144 u64 (*read_msr)(unsigned int msr, int *err);
145 int (*write_msr)(unsigned int msr, unsigned low, unsigned high);
146
147 u64 (*read_tsc)(void);
148 u64 (*read_pmc)(int counter);
149 unsigned long long (*read_tscp)(unsigned int *aux);
150
151 /*
152 * Atomically enable interrupts and return to userspace. This
153 * is only ever used to return to 32-bit processes; in a
154 * 64-bit kernel, it's used for 32-on-64 compat processes, but
155 * never native 64-bit processes. (Jump, not call.)
156 */
157 void (*irq_enable_sysexit)(void);
158
159 /*
160 * Switch to usermode gs and return to 64-bit usermode using
161 * sysret. Only used in 64-bit kernels to return to 64-bit
162 * processes. Usermode register state, including %rsp, must
163 * already be restored.
164 */
165 void (*usergs_sysret64)(void);
166
167 /*
168 * Switch to usermode gs and return to 32-bit usermode using
169 * sysret. Used to return to 32-on-64 compat processes.
170 * Other usermode register state, including %esp, must already
171 * be restored.
172 */
173 void (*usergs_sysret32)(void);
174
175 /* Normal iret. Jump to this with the standard iret stack
176 frame set up. */
177 void (*iret)(void);
178
179 void (*swapgs)(void);
180
181 struct pv_lazy_ops lazy_mode;
182};
183
184struct pv_irq_ops {
185 void (*init_IRQ)(void);
186
187 /*
188 * Get/set interrupt state. save_fl and restore_fl are only
189 * expected to use X86_EFLAGS_IF; all other bits
190 * returned from save_fl are undefined, and may be ignored by
191 * restore_fl.
192 */
193 unsigned long (*save_fl)(void);
194 void (*restore_fl)(unsigned long);
195 void (*irq_disable)(void);
196 void (*irq_enable)(void);
197 void (*safe_halt)(void);
198 void (*halt)(void);
199
200#ifdef CONFIG_X86_64
201 void (*adjust_exception_frame)(void);
202#endif
203};
204
205struct pv_apic_ops {
206#ifdef CONFIG_X86_LOCAL_APIC
207 void (*setup_boot_clock)(void);
208 void (*setup_secondary_clock)(void);
209
210 void (*startup_ipi_hook)(int phys_apicid,
211 unsigned long start_eip,
212 unsigned long start_esp);
213#endif
214};
215
216struct pv_mmu_ops {
217 /*
218 * Called before/after init_mm pagetable setup. setup_start
219 * may reset %cr3, and may pre-install parts of the pagetable;
220 * pagetable setup is expected to preserve any existing
221 * mapping.
222 */
223 void (*pagetable_setup_start)(pgd_t *pgd_base);
224 void (*pagetable_setup_done)(pgd_t *pgd_base);
225
226 unsigned long (*read_cr2)(void);
227 void (*write_cr2)(unsigned long);
228
229 unsigned long (*read_cr3)(void);
230 void (*write_cr3)(unsigned long);
231
232 /*
233 * Hooks for intercepting the creation/use/destruction of an
234 * mm_struct.
235 */
236 void (*activate_mm)(struct mm_struct *prev,
237 struct mm_struct *next);
238 void (*dup_mmap)(struct mm_struct *oldmm,
239 struct mm_struct *mm);
240 void (*exit_mmap)(struct mm_struct *mm);
241
242
243 /* TLB operations */
244 void (*flush_tlb_user)(void);
245 void (*flush_tlb_kernel)(void);
246 void (*flush_tlb_single)(unsigned long addr);
247 void (*flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm,
248 unsigned long va);
249
250 /* Hooks for allocating and freeing a pagetable top-level */
251 int (*pgd_alloc)(struct mm_struct *mm);
252 void (*pgd_free)(struct mm_struct *mm, pgd_t *pgd);
253
254 /*
255 * Hooks for allocating/releasing pagetable pages when they're
256 * attached to a pagetable
257 */
258 void (*alloc_pte)(struct mm_struct *mm, unsigned long pfn);
259 void (*alloc_pmd)(struct mm_struct *mm, unsigned long pfn);
260 void (*alloc_pmd_clone)(unsigned long pfn, unsigned long clonepfn, unsigned long start, unsigned long count);
261 void (*alloc_pud)(struct mm_struct *mm, unsigned long pfn);
262 void (*release_pte)(unsigned long pfn);
263 void (*release_pmd)(unsigned long pfn);
264 void (*release_pud)(unsigned long pfn);
265
266 /* Pagetable manipulation functions */
267 void (*set_pte)(pte_t *ptep, pte_t pteval);
268 void (*set_pte_at)(struct mm_struct *mm, unsigned long addr,
269 pte_t *ptep, pte_t pteval);
270 void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval);
271 void (*pte_update)(struct mm_struct *mm, unsigned long addr,
272 pte_t *ptep);
273 void (*pte_update_defer)(struct mm_struct *mm,
274 unsigned long addr, pte_t *ptep);
275
276 pte_t (*ptep_modify_prot_start)(struct mm_struct *mm, unsigned long addr,
277 pte_t *ptep);
278 void (*ptep_modify_prot_commit)(struct mm_struct *mm, unsigned long addr,
279 pte_t *ptep, pte_t pte);
280
281 pteval_t (*pte_val)(pte_t);
282 pteval_t (*pte_flags)(pte_t);
283 pte_t (*make_pte)(pteval_t pte);
284
285 pgdval_t (*pgd_val)(pgd_t);
286 pgd_t (*make_pgd)(pgdval_t pgd);
287
288#if PAGETABLE_LEVELS >= 3
289#ifdef CONFIG_X86_PAE
290 void (*set_pte_atomic)(pte_t *ptep, pte_t pteval);
291 void (*set_pte_present)(struct mm_struct *mm, unsigned long addr,
292 pte_t *ptep, pte_t pte);
293 void (*pte_clear)(struct mm_struct *mm, unsigned long addr,
294 pte_t *ptep);
295 void (*pmd_clear)(pmd_t *pmdp);
296
297#endif /* CONFIG_X86_PAE */
298
299 void (*set_pud)(pud_t *pudp, pud_t pudval);
300
301 pmdval_t (*pmd_val)(pmd_t);
302 pmd_t (*make_pmd)(pmdval_t pmd);
303
304#if PAGETABLE_LEVELS == 4
305 pudval_t (*pud_val)(pud_t);
306 pud_t (*make_pud)(pudval_t pud);
307
308 void (*set_pgd)(pgd_t *pudp, pgd_t pgdval);
309#endif /* PAGETABLE_LEVELS == 4 */
310#endif /* PAGETABLE_LEVELS >= 3 */
311
312#ifdef CONFIG_HIGHPTE
313 void *(*kmap_atomic_pte)(struct page *page, enum km_type type);
314#endif
315
316 struct pv_lazy_ops lazy_mode;
317
318 /* dom0 ops */
319
320 /* Sometimes the physical address is a pfn, and sometimes its
321 an mfn. We can tell which is which from the index. */
322 void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
323 unsigned long phys, pgprot_t flags);
324};
325
326struct raw_spinlock;
327struct pv_lock_ops {
328 int (*spin_is_locked)(struct raw_spinlock *lock);
329 int (*spin_is_contended)(struct raw_spinlock *lock);
330 void (*spin_lock)(struct raw_spinlock *lock);
331 void (*spin_lock_flags)(struct raw_spinlock *lock, unsigned long flags);
332 int (*spin_trylock)(struct raw_spinlock *lock);
333 void (*spin_unlock)(struct raw_spinlock *lock);
334};
335
336/* This contains all the paravirt structures: we get a convenient
337 * number for each function using the offset which we use to indicate
338 * what to patch. */
339struct paravirt_patch_template {
340 struct pv_init_ops pv_init_ops;
341 struct pv_time_ops pv_time_ops;
342 struct pv_cpu_ops pv_cpu_ops;
343 struct pv_irq_ops pv_irq_ops;
344 struct pv_apic_ops pv_apic_ops;
345 struct pv_mmu_ops pv_mmu_ops;
346 struct pv_lock_ops pv_lock_ops;
347};
348
349extern struct pv_info pv_info;
350extern struct pv_init_ops pv_init_ops;
351extern struct pv_time_ops pv_time_ops;
352extern struct pv_cpu_ops pv_cpu_ops;
353extern struct pv_irq_ops pv_irq_ops;
354extern struct pv_apic_ops pv_apic_ops;
355extern struct pv_mmu_ops pv_mmu_ops;
356extern struct pv_lock_ops pv_lock_ops;
357
358#define PARAVIRT_PATCH(x) \
359 (offsetof(struct paravirt_patch_template, x) / sizeof(void *))
360
361#define paravirt_type(op) \
362 [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \
363 [paravirt_opptr] "m" (op)
364#define paravirt_clobber(clobber) \
365 [paravirt_clobber] "i" (clobber)
366
367/*
368 * Generate some code, and mark it as patchable by the
369 * apply_paravirt() alternate instruction patcher.
370 */
371#define _paravirt_alt(insn_string, type, clobber) \
372 "771:\n\t" insn_string "\n" "772:\n" \
373 ".pushsection .parainstructions,\"a\"\n" \
374 _ASM_ALIGN "\n" \
375 _ASM_PTR " 771b\n" \
376 " .byte " type "\n" \
377 " .byte 772b-771b\n" \
378 " .short " clobber "\n" \
379 ".popsection\n"
380
381/* Generate patchable code, with the default asm parameters. */
382#define paravirt_alt(insn_string) \
383 _paravirt_alt(insn_string, "%c[paravirt_typenum]", "%c[paravirt_clobber]")
384
385/* Simple instruction patching code. */
386#define DEF_NATIVE(ops, name, code) \
387 extern const char start_##ops##_##name[], end_##ops##_##name[]; \
388 asm("start_" #ops "_" #name ": " code "; end_" #ops "_" #name ":")
389
390unsigned paravirt_patch_nop(void);
391unsigned paravirt_patch_ignore(unsigned len);
392unsigned paravirt_patch_call(void *insnbuf,
393 const void *target, u16 tgt_clobbers,
394 unsigned long addr, u16 site_clobbers,
395 unsigned len);
396unsigned paravirt_patch_jmp(void *insnbuf, const void *target,
397 unsigned long addr, unsigned len);
398unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
399 unsigned long addr, unsigned len);
400
401unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
402 const char *start, const char *end);
403
404unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
405 unsigned long addr, unsigned len);
406
407int paravirt_disable_iospace(void);
408
409/*
410 * This generates an indirect call based on the operation type number.
411 * The type number, computed in PARAVIRT_PATCH, is derived from the
412 * offset into the paravirt_patch_template structure, and can therefore be
413 * freely converted back into a structure offset.
414 */
415#define PARAVIRT_CALL "call *%[paravirt_opptr];"
416
417/*
418 * These macros are intended to wrap calls through one of the paravirt
419 * ops structs, so that they can be later identified and patched at
420 * runtime.
421 *
422 * Normally, a call to a pv_op function is a simple indirect call:
423 * (pv_op_struct.operations)(args...).
424 *
425 * Unfortunately, this is a relatively slow operation for modern CPUs,
426 * because it cannot necessarily determine what the destination
427 * address is. In this case, the address is a runtime constant, so at
428 * the very least we can patch the call to e a simple direct call, or
429 * ideally, patch an inline implementation into the callsite. (Direct
430 * calls are essentially free, because the call and return addresses
431 * are completely predictable.)
432 *
433 * For i386, these macros rely on the standard gcc "regparm(3)" calling
434 * convention, in which the first three arguments are placed in %eax,
435 * %edx, %ecx (in that order), and the remaining arguments are placed
436 * on the stack. All caller-save registers (eax,edx,ecx) are expected
437 * to be modified (either clobbered or used for return values).
438 * X86_64, on the other hand, already specifies a register-based calling
439 * conventions, returning at %rax, with parameteres going on %rdi, %rsi,
440 * %rdx, and %rcx. Note that for this reason, x86_64 does not need any
441 * special handling for dealing with 4 arguments, unlike i386.
442 * However, x86_64 also have to clobber all caller saved registers, which
443 * unfortunately, are quite a bit (r8 - r11)
444 *
445 * The call instruction itself is marked by placing its start address
446 * and size into the .parainstructions section, so that
447 * apply_paravirt() in arch/i386/kernel/alternative.c can do the
448 * appropriate patching under the control of the backend pv_init_ops
449 * implementation.
450 *
451 * Unfortunately there's no way to get gcc to generate the args setup
452 * for the call, and then allow the call itself to be generated by an
453 * inline asm. Because of this, we must do the complete arg setup and
454 * return value handling from within these macros. This is fairly
455 * cumbersome.
456 *
457 * There are 5 sets of PVOP_* macros for dealing with 0-4 arguments.
458 * It could be extended to more arguments, but there would be little
459 * to be gained from that. For each number of arguments, there are
460 * the two VCALL and CALL variants for void and non-void functions.
461 *
462 * When there is a return value, the invoker of the macro must specify
463 * the return type. The macro then uses sizeof() on that type to
464 * determine whether its a 32 or 64 bit value, and places the return
465 * in the right register(s) (just %eax for 32-bit, and %edx:%eax for
466 * 64-bit). For x86_64 machines, it just returns at %rax regardless of
467 * the return value size.
468 *
469 * 64-bit arguments are passed as a pair of adjacent 32-bit arguments
470 * i386 also passes 64-bit arguments as a pair of adjacent 32-bit arguments
471 * in low,high order
472 *
473 * Small structures are passed and returned in registers. The macro
474 * calling convention can't directly deal with this, so the wrapper
475 * functions must do this.
476 *
477 * These PVOP_* macros are only defined within this header. This
478 * means that all uses must be wrapped in inline functions. This also
479 * makes sure the incoming and outgoing types are always correct.
480 */
481#ifdef CONFIG_X86_32
482#define PVOP_VCALL_ARGS unsigned long __eax, __edx, __ecx
483#define PVOP_CALL_ARGS PVOP_VCALL_ARGS
484#define PVOP_VCALL_CLOBBERS "=a" (__eax), "=d" (__edx), \
485 "=c" (__ecx)
486#define PVOP_CALL_CLOBBERS PVOP_VCALL_CLOBBERS
487#define EXTRA_CLOBBERS
488#define VEXTRA_CLOBBERS
489#else
490#define PVOP_VCALL_ARGS unsigned long __edi, __esi, __edx, __ecx
491#define PVOP_CALL_ARGS PVOP_VCALL_ARGS, __eax
492#define PVOP_VCALL_CLOBBERS "=D" (__edi), \
493 "=S" (__esi), "=d" (__edx), \
494 "=c" (__ecx)
495
496#define PVOP_CALL_CLOBBERS PVOP_VCALL_CLOBBERS, "=a" (__eax)
497
498#define EXTRA_CLOBBERS , "r8", "r9", "r10", "r11"
499#define VEXTRA_CLOBBERS , "rax", "r8", "r9", "r10", "r11"
500#endif
501
502#ifdef CONFIG_PARAVIRT_DEBUG
503#define PVOP_TEST_NULL(op) BUG_ON(op == NULL)
504#else
505#define PVOP_TEST_NULL(op) ((void)op)
506#endif
507
508#define __PVOP_CALL(rettype, op, pre, post, ...) \
509 ({ \
510 rettype __ret; \
511 PVOP_CALL_ARGS; \
512 PVOP_TEST_NULL(op); \
513 /* This is 32-bit specific, but is okay in 64-bit */ \
514 /* since this condition will never hold */ \
515 if (sizeof(rettype) > sizeof(unsigned long)) { \
516 asm volatile(pre \
517 paravirt_alt(PARAVIRT_CALL) \
518 post \
519 : PVOP_CALL_CLOBBERS \
520 : paravirt_type(op), \
521 paravirt_clobber(CLBR_ANY), \
522 ##__VA_ARGS__ \
523 : "memory", "cc" EXTRA_CLOBBERS); \
524 __ret = (rettype)((((u64)__edx) << 32) | __eax); \
525 } else { \
526 asm volatile(pre \
527 paravirt_alt(PARAVIRT_CALL) \
528 post \
529 : PVOP_CALL_CLOBBERS \
530 : paravirt_type(op), \
531 paravirt_clobber(CLBR_ANY), \
532 ##__VA_ARGS__ \
533 : "memory", "cc" EXTRA_CLOBBERS); \
534 __ret = (rettype)__eax; \
535 } \
536 __ret; \
537 })
538#define __PVOP_VCALL(op, pre, post, ...) \
539 ({ \
540 PVOP_VCALL_ARGS; \
541 PVOP_TEST_NULL(op); \
542 asm volatile(pre \
543 paravirt_alt(PARAVIRT_CALL) \
544 post \
545 : PVOP_VCALL_CLOBBERS \
546 : paravirt_type(op), \
547 paravirt_clobber(CLBR_ANY), \
548 ##__VA_ARGS__ \
549 : "memory", "cc" VEXTRA_CLOBBERS); \
550 })
551
552#define PVOP_CALL0(rettype, op) \
553 __PVOP_CALL(rettype, op, "", "")
554#define PVOP_VCALL0(op) \
555 __PVOP_VCALL(op, "", "")
556
557#define PVOP_CALL1(rettype, op, arg1) \
558 __PVOP_CALL(rettype, op, "", "", "0" ((unsigned long)(arg1)))
559#define PVOP_VCALL1(op, arg1) \
560 __PVOP_VCALL(op, "", "", "0" ((unsigned long)(arg1)))
561
562#define PVOP_CALL2(rettype, op, arg1, arg2) \
563 __PVOP_CALL(rettype, op, "", "", "0" ((unsigned long)(arg1)), \
564 "1" ((unsigned long)(arg2)))
565#define PVOP_VCALL2(op, arg1, arg2) \
566 __PVOP_VCALL(op, "", "", "0" ((unsigned long)(arg1)), \
567 "1" ((unsigned long)(arg2)))
568
569#define PVOP_CALL3(rettype, op, arg1, arg2, arg3) \
570 __PVOP_CALL(rettype, op, "", "", "0" ((unsigned long)(arg1)), \
571 "1"((unsigned long)(arg2)), "2"((unsigned long)(arg3)))
572#define PVOP_VCALL3(op, arg1, arg2, arg3) \
573 __PVOP_VCALL(op, "", "", "0" ((unsigned long)(arg1)), \
574 "1"((unsigned long)(arg2)), "2"((unsigned long)(arg3)))
575
576/* This is the only difference in x86_64. We can make it much simpler */
577#ifdef CONFIG_X86_32
578#define PVOP_CALL4(rettype, op, arg1, arg2, arg3, arg4) \
579 __PVOP_CALL(rettype, op, \
580 "push %[_arg4];", "lea 4(%%esp),%%esp;", \
581 "0" ((u32)(arg1)), "1" ((u32)(arg2)), \
582 "2" ((u32)(arg3)), [_arg4] "mr" ((u32)(arg4)))
583#define PVOP_VCALL4(op, arg1, arg2, arg3, arg4) \
584 __PVOP_VCALL(op, \
585 "push %[_arg4];", "lea 4(%%esp),%%esp;", \
586 "0" ((u32)(arg1)), "1" ((u32)(arg2)), \
587 "2" ((u32)(arg3)), [_arg4] "mr" ((u32)(arg4)))
588#else
589#define PVOP_CALL4(rettype, op, arg1, arg2, arg3, arg4) \
590 __PVOP_CALL(rettype, op, "", "", "0" ((unsigned long)(arg1)), \
591 "1"((unsigned long)(arg2)), "2"((unsigned long)(arg3)), \
592 "3"((unsigned long)(arg4)))
593#define PVOP_VCALL4(op, arg1, arg2, arg3, arg4) \
594 __PVOP_VCALL(op, "", "", "0" ((unsigned long)(arg1)), \
595 "1"((unsigned long)(arg2)), "2"((unsigned long)(arg3)), \
596 "3"((unsigned long)(arg4)))
597#endif
598
599static inline int paravirt_enabled(void)
600{
601 return pv_info.paravirt_enabled;
602}
603
604static inline void load_sp0(struct tss_struct *tss,
605 struct thread_struct *thread)
606{
607 PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
608}
609
610#define ARCH_SETUP pv_init_ops.arch_setup();
611static inline unsigned long get_wallclock(void)
612{
613 return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
614}
615
616static inline int set_wallclock(unsigned long nowtime)
617{
618 return PVOP_CALL1(int, pv_time_ops.set_wallclock, nowtime);
619}
620
621static inline void (*choose_time_init(void))(void)
622{
623 return pv_time_ops.time_init;
624}
625
626/* The paravirtualized CPUID instruction. */
627static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
628 unsigned int *ecx, unsigned int *edx)
629{
630 PVOP_VCALL4(pv_cpu_ops.cpuid, eax, ebx, ecx, edx);
631}
632
633/*
634 * These special macros can be used to get or set a debugging register
635 */
636static inline unsigned long paravirt_get_debugreg(int reg)
637{
638 return PVOP_CALL1(unsigned long, pv_cpu_ops.get_debugreg, reg);
639}
640#define get_debugreg(var, reg) var = paravirt_get_debugreg(reg)
641static inline void set_debugreg(unsigned long val, int reg)
642{
643 PVOP_VCALL2(pv_cpu_ops.set_debugreg, reg, val);
644}
645
646static inline void clts(void)
647{
648 PVOP_VCALL0(pv_cpu_ops.clts);
649}
650
651static inline unsigned long read_cr0(void)
652{
653 return PVOP_CALL0(unsigned long, pv_cpu_ops.read_cr0);
654}
655
656static inline void write_cr0(unsigned long x)
657{
658 PVOP_VCALL1(pv_cpu_ops.write_cr0, x);
659}
660
661static inline unsigned long read_cr2(void)
662{
663 return PVOP_CALL0(unsigned long, pv_mmu_ops.read_cr2);
664}
665
666static inline void write_cr2(unsigned long x)
667{
668 PVOP_VCALL1(pv_mmu_ops.write_cr2, x);
669}
670
671static inline unsigned long read_cr3(void)
672{
673 return PVOP_CALL0(unsigned long, pv_mmu_ops.read_cr3);
674}
675
676static inline void write_cr3(unsigned long x)
677{
678 PVOP_VCALL1(pv_mmu_ops.write_cr3, x);
679}
680
681static inline unsigned long read_cr4(void)
682{
683 return PVOP_CALL0(unsigned long, pv_cpu_ops.read_cr4);
684}
685static inline unsigned long read_cr4_safe(void)
686{
687 return PVOP_CALL0(unsigned long, pv_cpu_ops.read_cr4_safe);
688}
689
690static inline void write_cr4(unsigned long x)
691{
692 PVOP_VCALL1(pv_cpu_ops.write_cr4, x);
693}
694
695#ifdef CONFIG_X86_64
696static inline unsigned long read_cr8(void)
697{
698 return PVOP_CALL0(unsigned long, pv_cpu_ops.read_cr8);
699}
700
701static inline void write_cr8(unsigned long x)
702{
703 PVOP_VCALL1(pv_cpu_ops.write_cr8, x);
704}
705#endif
706
707static inline void raw_safe_halt(void)
708{
709 PVOP_VCALL0(pv_irq_ops.safe_halt);
710}
711
712static inline void halt(void)
713{
714 PVOP_VCALL0(pv_irq_ops.safe_halt);
715}
716
717static inline void wbinvd(void)
718{
719 PVOP_VCALL0(pv_cpu_ops.wbinvd);
720}
721
722#define get_kernel_rpl() (pv_info.kernel_rpl)
723
724static inline u64 paravirt_read_msr(unsigned msr, int *err)
725{
726 return PVOP_CALL2(u64, pv_cpu_ops.read_msr, msr, err);
727}
728static inline u64 paravirt_read_msr_amd(unsigned msr, int *err)
729{
730 return PVOP_CALL2(u64, pv_cpu_ops.read_msr_amd, msr, err);
731}
732static inline int paravirt_write_msr(unsigned msr, unsigned low, unsigned high)
733{
734 return PVOP_CALL3(int, pv_cpu_ops.write_msr, msr, low, high);
735}
736
737/* These should all do BUG_ON(_err), but our headers are too tangled. */
738#define rdmsr(msr, val1, val2) \
739do { \
740 int _err; \
741 u64 _l = paravirt_read_msr(msr, &_err); \
742 val1 = (u32)_l; \
743 val2 = _l >> 32; \
744} while (0)
745
746#define wrmsr(msr, val1, val2) \
747do { \
748 paravirt_write_msr(msr, val1, val2); \
749} while (0)
750
751#define rdmsrl(msr, val) \
752do { \
753 int _err; \
754 val = paravirt_read_msr(msr, &_err); \
755} while (0)
756
757#define wrmsrl(msr, val) wrmsr(msr, (u32)((u64)(val)), ((u64)(val))>>32)
758#define wrmsr_safe(msr, a, b) paravirt_write_msr(msr, a, b)
759
760/* rdmsr with exception handling */
761#define rdmsr_safe(msr, a, b) \
762({ \
763 int _err; \
764 u64 _l = paravirt_read_msr(msr, &_err); \
765 (*a) = (u32)_l; \
766 (*b) = _l >> 32; \
767 _err; \
768})
769
770static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
771{
772 int err;
773
774 *p = paravirt_read_msr(msr, &err);
775 return err;
776}
777static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p)
778{
779 int err;
780
781 *p = paravirt_read_msr_amd(msr, &err);
782 return err;
783}
784
785static inline u64 paravirt_read_tsc(void)
786{
787 return PVOP_CALL0(u64, pv_cpu_ops.read_tsc);
788}
789
790#define rdtscl(low) \
791do { \
792 u64 _l = paravirt_read_tsc(); \
793 low = (int)_l; \
794} while (0)
795
796#define rdtscll(val) (val = paravirt_read_tsc())
797
798static inline unsigned long long paravirt_sched_clock(void)
799{
800 return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock);
801}
802#define calibrate_tsc() (pv_time_ops.get_tsc_khz())
803
804static inline unsigned long long paravirt_read_pmc(int counter)
805{
806 return PVOP_CALL1(u64, pv_cpu_ops.read_pmc, counter);
807}
808
809#define rdpmc(counter, low, high) \
810do { \
811 u64 _l = paravirt_read_pmc(counter); \
812 low = (u32)_l; \
813 high = _l >> 32; \
814} while (0)
815
816static inline unsigned long long paravirt_rdtscp(unsigned int *aux)
817{
818 return PVOP_CALL1(u64, pv_cpu_ops.read_tscp, aux);
819}
820
821#define rdtscp(low, high, aux) \
822do { \
823 int __aux; \
824 unsigned long __val = paravirt_rdtscp(&__aux); \
825 (low) = (u32)__val; \
826 (high) = (u32)(__val >> 32); \
827 (aux) = __aux; \
828} while (0)
829
830#define rdtscpll(val, aux) \
831do { \
832 unsigned long __aux; \
833 val = paravirt_rdtscp(&__aux); \
834 (aux) = __aux; \
835} while (0)
836
837static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
838{
839 PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries);
840}
841
842static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
843{
844 PVOP_VCALL2(pv_cpu_ops.free_ldt, ldt, entries);
845}
846
847static inline void load_TR_desc(void)
848{
849 PVOP_VCALL0(pv_cpu_ops.load_tr_desc);
850}
851static inline void load_gdt(const struct desc_ptr *dtr)
852{
853 PVOP_VCALL1(pv_cpu_ops.load_gdt, dtr);
854}
855static inline void load_idt(const struct desc_ptr *dtr)
856{
857 PVOP_VCALL1(pv_cpu_ops.load_idt, dtr);
858}
859static inline void set_ldt(const void *addr, unsigned entries)
860{
861 PVOP_VCALL2(pv_cpu_ops.set_ldt, addr, entries);
862}
863static inline void store_gdt(struct desc_ptr *dtr)
864{
865 PVOP_VCALL1(pv_cpu_ops.store_gdt, dtr);
866}
867static inline void store_idt(struct desc_ptr *dtr)
868{
869 PVOP_VCALL1(pv_cpu_ops.store_idt, dtr);
870}
871static inline unsigned long paravirt_store_tr(void)
872{
873 return PVOP_CALL0(unsigned long, pv_cpu_ops.store_tr);
874}
875#define store_tr(tr) ((tr) = paravirt_store_tr())
876static inline void load_TLS(struct thread_struct *t, unsigned cpu)
877{
878 PVOP_VCALL2(pv_cpu_ops.load_tls, t, cpu);
879}
880
881#ifdef CONFIG_X86_64
882static inline void load_gs_index(unsigned int gs)
883{
884 PVOP_VCALL1(pv_cpu_ops.load_gs_index, gs);
885}
886#endif
887
888static inline void write_ldt_entry(struct desc_struct *dt, int entry,
889 const void *desc)
890{
891 PVOP_VCALL3(pv_cpu_ops.write_ldt_entry, dt, entry, desc);
892}
893
894static inline void write_gdt_entry(struct desc_struct *dt, int entry,
895 void *desc, int type)
896{
897 PVOP_VCALL4(pv_cpu_ops.write_gdt_entry, dt, entry, desc, type);
898}
899
900static inline void write_idt_entry(gate_desc *dt, int entry, const gate_desc *g)
901{
902 PVOP_VCALL3(pv_cpu_ops.write_idt_entry, dt, entry, g);
903}
904static inline void set_iopl_mask(unsigned mask)
905{
906 PVOP_VCALL1(pv_cpu_ops.set_iopl_mask, mask);
907}
908
909/* The paravirtualized I/O functions */
910static inline void slow_down_io(void)
911{
912 pv_cpu_ops.io_delay();
913#ifdef REALLY_SLOW_IO
914 pv_cpu_ops.io_delay();
915 pv_cpu_ops.io_delay();
916 pv_cpu_ops.io_delay();
917#endif
918}
919
920#ifdef CONFIG_X86_LOCAL_APIC
921static inline void setup_boot_clock(void)
922{
923 PVOP_VCALL0(pv_apic_ops.setup_boot_clock);
924}
925
926static inline void setup_secondary_clock(void)
927{
928 PVOP_VCALL0(pv_apic_ops.setup_secondary_clock);
929}
930#endif
931
932static inline void paravirt_post_allocator_init(void)
933{
934 if (pv_init_ops.post_allocator_init)
935 (*pv_init_ops.post_allocator_init)();
936}
937
938static inline void paravirt_pagetable_setup_start(pgd_t *base)
939{
940 (*pv_mmu_ops.pagetable_setup_start)(base);
941}
942
943static inline void paravirt_pagetable_setup_done(pgd_t *base)
944{
945 (*pv_mmu_ops.pagetable_setup_done)(base);
946}
947
948#ifdef CONFIG_SMP
949static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip,
950 unsigned long start_esp)
951{
952 PVOP_VCALL3(pv_apic_ops.startup_ipi_hook,
953 phys_apicid, start_eip, start_esp);
954}
955#endif
956
957static inline void paravirt_activate_mm(struct mm_struct *prev,
958 struct mm_struct *next)
959{
960 PVOP_VCALL2(pv_mmu_ops.activate_mm, prev, next);
961}
962
963static inline void arch_dup_mmap(struct mm_struct *oldmm,
964 struct mm_struct *mm)
965{
966 PVOP_VCALL2(pv_mmu_ops.dup_mmap, oldmm, mm);
967}
968
969static inline void arch_exit_mmap(struct mm_struct *mm)
970{
971 PVOP_VCALL1(pv_mmu_ops.exit_mmap, mm);
972}
973
974static inline void __flush_tlb(void)
975{
976 PVOP_VCALL0(pv_mmu_ops.flush_tlb_user);
977}
978static inline void __flush_tlb_global(void)
979{
980 PVOP_VCALL0(pv_mmu_ops.flush_tlb_kernel);
981}
982static inline void __flush_tlb_single(unsigned long addr)
983{
984 PVOP_VCALL1(pv_mmu_ops.flush_tlb_single, addr);
985}
986
987static inline void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
988 unsigned long va)
989{
990 PVOP_VCALL3(pv_mmu_ops.flush_tlb_others, &cpumask, mm, va);
991}
992
993static inline int paravirt_pgd_alloc(struct mm_struct *mm)
994{
995 return PVOP_CALL1(int, pv_mmu_ops.pgd_alloc, mm);
996}
997
998static inline void paravirt_pgd_free(struct mm_struct *mm, pgd_t *pgd)
999{
1000 PVOP_VCALL2(pv_mmu_ops.pgd_free, mm, pgd);
1001}
1002
1003static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn)
1004{
1005 PVOP_VCALL2(pv_mmu_ops.alloc_pte, mm, pfn);
1006}
1007static inline void paravirt_release_pte(unsigned long pfn)
1008{
1009 PVOP_VCALL1(pv_mmu_ops.release_pte, pfn);
1010}
1011
1012static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn)
1013{
1014 PVOP_VCALL2(pv_mmu_ops.alloc_pmd, mm, pfn);
1015}
1016
1017static inline void paravirt_alloc_pmd_clone(unsigned long pfn, unsigned long clonepfn,
1018 unsigned long start, unsigned long count)
1019{
1020 PVOP_VCALL4(pv_mmu_ops.alloc_pmd_clone, pfn, clonepfn, start, count);
1021}
1022static inline void paravirt_release_pmd(unsigned long pfn)
1023{
1024 PVOP_VCALL1(pv_mmu_ops.release_pmd, pfn);
1025}
1026
1027static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn)
1028{
1029 PVOP_VCALL2(pv_mmu_ops.alloc_pud, mm, pfn);
1030}
1031static inline void paravirt_release_pud(unsigned long pfn)
1032{
1033 PVOP_VCALL1(pv_mmu_ops.release_pud, pfn);
1034}
1035
1036#ifdef CONFIG_HIGHPTE
1037static inline void *kmap_atomic_pte(struct page *page, enum km_type type)
1038{
1039 unsigned long ret;
1040 ret = PVOP_CALL2(unsigned long, pv_mmu_ops.kmap_atomic_pte, page, type);
1041 return (void *)ret;
1042}
1043#endif
1044
1045static inline void pte_update(struct mm_struct *mm, unsigned long addr,
1046 pte_t *ptep)
1047{
1048 PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep);
1049}
1050
1051static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr,
1052 pte_t *ptep)
1053{
1054 PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep);
1055}
1056
1057static inline pte_t __pte(pteval_t val)
1058{
1059 pteval_t ret;
1060
1061 if (sizeof(pteval_t) > sizeof(long))
1062 ret = PVOP_CALL2(pteval_t,
1063 pv_mmu_ops.make_pte,
1064 val, (u64)val >> 32);
1065 else
1066 ret = PVOP_CALL1(pteval_t,
1067 pv_mmu_ops.make_pte,
1068 val);
1069
1070 return (pte_t) { .pte = ret };
1071}
1072
1073static inline pteval_t pte_val(pte_t pte)
1074{
1075 pteval_t ret;
1076
1077 if (sizeof(pteval_t) > sizeof(long))
1078 ret = PVOP_CALL2(pteval_t, pv_mmu_ops.pte_val,
1079 pte.pte, (u64)pte.pte >> 32);
1080 else
1081 ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_val,
1082 pte.pte);
1083
1084 return ret;
1085}
1086
1087static inline pteval_t pte_flags(pte_t pte)
1088{
1089 pteval_t ret;
1090
1091 if (sizeof(pteval_t) > sizeof(long))
1092 ret = PVOP_CALL2(pteval_t, pv_mmu_ops.pte_flags,
1093 pte.pte, (u64)pte.pte >> 32);
1094 else
1095 ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
1096 pte.pte);
1097
1098#ifdef CONFIG_PARAVIRT_DEBUG
1099 BUG_ON(ret & PTE_PFN_MASK);
1100#endif
1101 return ret;
1102}
1103
1104static inline pgd_t __pgd(pgdval_t val)
1105{
1106 pgdval_t ret;
1107
1108 if (sizeof(pgdval_t) > sizeof(long))
1109 ret = PVOP_CALL2(pgdval_t, pv_mmu_ops.make_pgd,
1110 val, (u64)val >> 32);
1111 else
1112 ret = PVOP_CALL1(pgdval_t, pv_mmu_ops.make_pgd,
1113 val);
1114
1115 return (pgd_t) { ret };
1116}
1117
1118static inline pgdval_t pgd_val(pgd_t pgd)
1119{
1120 pgdval_t ret;
1121
1122 if (sizeof(pgdval_t) > sizeof(long))
1123 ret = PVOP_CALL2(pgdval_t, pv_mmu_ops.pgd_val,
1124 pgd.pgd, (u64)pgd.pgd >> 32);
1125 else
1126 ret = PVOP_CALL1(pgdval_t, pv_mmu_ops.pgd_val,
1127 pgd.pgd);
1128
1129 return ret;
1130}
1131
1132#define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION
1133static inline pte_t ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr,
1134 pte_t *ptep)
1135{
1136 pteval_t ret;
1137
1138 ret = PVOP_CALL3(pteval_t, pv_mmu_ops.ptep_modify_prot_start,
1139 mm, addr, ptep);
1140
1141 return (pte_t) { .pte = ret };
1142}
1143
1144static inline void ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
1145 pte_t *ptep, pte_t pte)
1146{
1147 if (sizeof(pteval_t) > sizeof(long))
1148 /* 5 arg words */
1149 pv_mmu_ops.ptep_modify_prot_commit(mm, addr, ptep, pte);
1150 else
1151 PVOP_VCALL4(pv_mmu_ops.ptep_modify_prot_commit,
1152 mm, addr, ptep, pte.pte);
1153}
1154
1155static inline void set_pte(pte_t *ptep, pte_t pte)
1156{
1157 if (sizeof(pteval_t) > sizeof(long))
1158 PVOP_VCALL3(pv_mmu_ops.set_pte, ptep,
1159 pte.pte, (u64)pte.pte >> 32);
1160 else
1161 PVOP_VCALL2(pv_mmu_ops.set_pte, ptep,
1162 pte.pte);
1163}
1164
1165static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
1166 pte_t *ptep, pte_t pte)
1167{
1168 if (sizeof(pteval_t) > sizeof(long))
1169 /* 5 arg words */
1170 pv_mmu_ops.set_pte_at(mm, addr, ptep, pte);
1171 else
1172 PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte);
1173}
1174
1175static inline void set_pmd(pmd_t *pmdp, pmd_t pmd)
1176{
1177 pmdval_t val = native_pmd_val(pmd);
1178
1179 if (sizeof(pmdval_t) > sizeof(long))
1180 PVOP_VCALL3(pv_mmu_ops.set_pmd, pmdp, val, (u64)val >> 32);
1181 else
1182 PVOP_VCALL2(pv_mmu_ops.set_pmd, pmdp, val);
1183}
1184
1185#if PAGETABLE_LEVELS >= 3
1186static inline pmd_t __pmd(pmdval_t val)
1187{
1188 pmdval_t ret;
1189
1190 if (sizeof(pmdval_t) > sizeof(long))
1191 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.make_pmd,
1192 val, (u64)val >> 32);
1193 else
1194 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.make_pmd,
1195 val);
1196
1197 return (pmd_t) { ret };
1198}
1199
1200static inline pmdval_t pmd_val(pmd_t pmd)
1201{
1202 pmdval_t ret;
1203
1204 if (sizeof(pmdval_t) > sizeof(long))
1205 ret = PVOP_CALL2(pmdval_t, pv_mmu_ops.pmd_val,
1206 pmd.pmd, (u64)pmd.pmd >> 32);
1207 else
1208 ret = PVOP_CALL1(pmdval_t, pv_mmu_ops.pmd_val,
1209 pmd.pmd);
1210
1211 return ret;
1212}
1213
1214static inline void set_pud(pud_t *pudp, pud_t pud)
1215{
1216 pudval_t val = native_pud_val(pud);
1217
1218 if (sizeof(pudval_t) > sizeof(long))
1219 PVOP_VCALL3(pv_mmu_ops.set_pud, pudp,
1220 val, (u64)val >> 32);
1221 else
1222 PVOP_VCALL2(pv_mmu_ops.set_pud, pudp,
1223 val);
1224}
1225#if PAGETABLE_LEVELS == 4
1226static inline pud_t __pud(pudval_t val)
1227{
1228 pudval_t ret;
1229
1230 if (sizeof(pudval_t) > sizeof(long))
1231 ret = PVOP_CALL2(pudval_t, pv_mmu_ops.make_pud,
1232 val, (u64)val >> 32);
1233 else
1234 ret = PVOP_CALL1(pudval_t, pv_mmu_ops.make_pud,
1235 val);
1236
1237 return (pud_t) { ret };
1238}
1239
1240static inline pudval_t pud_val(pud_t pud)
1241{
1242 pudval_t ret;
1243
1244 if (sizeof(pudval_t) > sizeof(long))
1245 ret = PVOP_CALL2(pudval_t, pv_mmu_ops.pud_val,
1246 pud.pud, (u64)pud.pud >> 32);
1247 else
1248 ret = PVOP_CALL1(pudval_t, pv_mmu_ops.pud_val,
1249 pud.pud);
1250
1251 return ret;
1252}
1253
1254static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
1255{
1256 pgdval_t val = native_pgd_val(pgd);
1257
1258 if (sizeof(pgdval_t) > sizeof(long))
1259 PVOP_VCALL3(pv_mmu_ops.set_pgd, pgdp,
1260 val, (u64)val >> 32);
1261 else
1262 PVOP_VCALL2(pv_mmu_ops.set_pgd, pgdp,
1263 val);
1264}
1265
1266static inline void pgd_clear(pgd_t *pgdp)
1267{
1268 set_pgd(pgdp, __pgd(0));
1269}
1270
1271static inline void pud_clear(pud_t *pudp)
1272{
1273 set_pud(pudp, __pud(0));
1274}
1275
1276#endif /* PAGETABLE_LEVELS == 4 */
1277
1278#endif /* PAGETABLE_LEVELS >= 3 */
1279
1280#ifdef CONFIG_X86_PAE
1281/* Special-case pte-setting operations for PAE, which can't update a
1282 64-bit pte atomically */
1283static inline void set_pte_atomic(pte_t *ptep, pte_t pte)
1284{
1285 PVOP_VCALL3(pv_mmu_ops.set_pte_atomic, ptep,
1286 pte.pte, pte.pte >> 32);
1287}
1288
1289static inline void set_pte_present(struct mm_struct *mm, unsigned long addr,
1290 pte_t *ptep, pte_t pte)
1291{
1292 /* 5 arg words */
1293 pv_mmu_ops.set_pte_present(mm, addr, ptep, pte);
1294}
1295
1296static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
1297 pte_t *ptep)
1298{
1299 PVOP_VCALL3(pv_mmu_ops.pte_clear, mm, addr, ptep);
1300}
1301
1302static inline void pmd_clear(pmd_t *pmdp)
1303{
1304 PVOP_VCALL1(pv_mmu_ops.pmd_clear, pmdp);
1305}
1306#else /* !CONFIG_X86_PAE */
1307static inline void set_pte_atomic(pte_t *ptep, pte_t pte)
1308{
1309 set_pte(ptep, pte);
1310}
1311
1312static inline void set_pte_present(struct mm_struct *mm, unsigned long addr,
1313 pte_t *ptep, pte_t pte)
1314{
1315 set_pte(ptep, pte);
1316}
1317
1318static inline void pte_clear(struct mm_struct *mm, unsigned long addr,
1319 pte_t *ptep)
1320{
1321 set_pte_at(mm, addr, ptep, __pte(0));
1322}
1323
1324static inline void pmd_clear(pmd_t *pmdp)
1325{
1326 set_pmd(pmdp, __pmd(0));
1327}
1328#endif /* CONFIG_X86_PAE */
1329
1330/* Lazy mode for batching updates / context switch */
1331enum paravirt_lazy_mode {
1332 PARAVIRT_LAZY_NONE,
1333 PARAVIRT_LAZY_MMU,
1334 PARAVIRT_LAZY_CPU,
1335};
1336
1337enum paravirt_lazy_mode paravirt_get_lazy_mode(void);
1338void paravirt_enter_lazy_cpu(void);
1339void paravirt_leave_lazy_cpu(void);
1340void paravirt_enter_lazy_mmu(void);
1341void paravirt_leave_lazy_mmu(void);
1342void paravirt_leave_lazy(enum paravirt_lazy_mode mode);
1343
1344#define __HAVE_ARCH_ENTER_LAZY_CPU_MODE
1345static inline void arch_enter_lazy_cpu_mode(void)
1346{
1347 PVOP_VCALL0(pv_cpu_ops.lazy_mode.enter);
1348}
1349
1350static inline void arch_leave_lazy_cpu_mode(void)
1351{
1352 PVOP_VCALL0(pv_cpu_ops.lazy_mode.leave);
1353}
1354
1355static inline void arch_flush_lazy_cpu_mode(void)
1356{
1357 if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU)) {
1358 arch_leave_lazy_cpu_mode();
1359 arch_enter_lazy_cpu_mode();
1360 }
1361}
1362
1363
1364#define __HAVE_ARCH_ENTER_LAZY_MMU_MODE
1365static inline void arch_enter_lazy_mmu_mode(void)
1366{
1367 PVOP_VCALL0(pv_mmu_ops.lazy_mode.enter);
1368}
1369
1370static inline void arch_leave_lazy_mmu_mode(void)
1371{
1372 PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave);
1373}
1374
1375static inline void arch_flush_lazy_mmu_mode(void)
1376{
1377 if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU)) {
1378 arch_leave_lazy_mmu_mode();
1379 arch_enter_lazy_mmu_mode();
1380 }
1381}
1382
1383static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
1384 unsigned long phys, pgprot_t flags)
1385{
1386 pv_mmu_ops.set_fixmap(idx, phys, flags);
1387}
1388
1389void _paravirt_nop(void);
1390#define paravirt_nop ((void *)_paravirt_nop)
1391
1392void paravirt_use_bytelocks(void);
1393
1394#ifdef CONFIG_SMP
1395
1396static inline int __raw_spin_is_locked(struct raw_spinlock *lock)
1397{
1398 return PVOP_CALL1(int, pv_lock_ops.spin_is_locked, lock);
1399}
1400
1401static inline int __raw_spin_is_contended(struct raw_spinlock *lock)
1402{
1403 return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock);
1404}
1405
1406static __always_inline void __raw_spin_lock(struct raw_spinlock *lock)
1407{
1408 PVOP_VCALL1(pv_lock_ops.spin_lock, lock);
1409}
1410
1411static __always_inline void __raw_spin_lock_flags(struct raw_spinlock *lock,
1412 unsigned long flags)
1413{
1414 PVOP_VCALL2(pv_lock_ops.spin_lock_flags, lock, flags);
1415}
1416
1417static __always_inline int __raw_spin_trylock(struct raw_spinlock *lock)
1418{
1419 return PVOP_CALL1(int, pv_lock_ops.spin_trylock, lock);
1420}
1421
1422static __always_inline void __raw_spin_unlock(struct raw_spinlock *lock)
1423{
1424 PVOP_VCALL1(pv_lock_ops.spin_unlock, lock);
1425}
1426
1427#endif
1428
1429/* These all sit in the .parainstructions section to tell us what to patch. */
1430struct paravirt_patch_site {
1431 u8 *instr; /* original instructions */
1432 u8 instrtype; /* type of this instruction */
1433 u8 len; /* length of original instruction */
1434 u16 clobbers; /* what registers you may clobber */
1435};
1436
1437extern struct paravirt_patch_site __parainstructions[],
1438 __parainstructions_end[];
1439
1440#ifdef CONFIG_X86_32
1441#define PV_SAVE_REGS "pushl %%ecx; pushl %%edx;"
1442#define PV_RESTORE_REGS "popl %%edx; popl %%ecx"
1443#define PV_FLAGS_ARG "0"
1444#define PV_EXTRA_CLOBBERS
1445#define PV_VEXTRA_CLOBBERS
1446#else
1447/* We save some registers, but all of them, that's too much. We clobber all
1448 * caller saved registers but the argument parameter */
1449#define PV_SAVE_REGS "pushq %%rdi;"
1450#define PV_RESTORE_REGS "popq %%rdi;"
1451#define PV_EXTRA_CLOBBERS EXTRA_CLOBBERS, "rcx" , "rdx", "rsi"
1452#define PV_VEXTRA_CLOBBERS EXTRA_CLOBBERS, "rdi", "rcx" , "rdx", "rsi"
1453#define PV_FLAGS_ARG "D"
1454#endif
1455
1456static inline unsigned long __raw_local_save_flags(void)
1457{
1458 unsigned long f;
1459
1460 asm volatile(paravirt_alt(PV_SAVE_REGS
1461 PARAVIRT_CALL
1462 PV_RESTORE_REGS)
1463 : "=a"(f)
1464 : paravirt_type(pv_irq_ops.save_fl),
1465 paravirt_clobber(CLBR_EAX)
1466 : "memory", "cc" PV_VEXTRA_CLOBBERS);
1467 return f;
1468}
1469
1470static inline void raw_local_irq_restore(unsigned long f)
1471{
1472 asm volatile(paravirt_alt(PV_SAVE_REGS
1473 PARAVIRT_CALL
1474 PV_RESTORE_REGS)
1475 : "=a"(f)
1476 : PV_FLAGS_ARG(f),
1477 paravirt_type(pv_irq_ops.restore_fl),
1478 paravirt_clobber(CLBR_EAX)
1479 : "memory", "cc" PV_EXTRA_CLOBBERS);
1480}
1481
1482static inline void raw_local_irq_disable(void)
1483{
1484 asm volatile(paravirt_alt(PV_SAVE_REGS
1485 PARAVIRT_CALL
1486 PV_RESTORE_REGS)
1487 :
1488 : paravirt_type(pv_irq_ops.irq_disable),
1489 paravirt_clobber(CLBR_EAX)
1490 : "memory", "eax", "cc" PV_EXTRA_CLOBBERS);
1491}
1492
1493static inline void raw_local_irq_enable(void)
1494{
1495 asm volatile(paravirt_alt(PV_SAVE_REGS
1496 PARAVIRT_CALL
1497 PV_RESTORE_REGS)
1498 :
1499 : paravirt_type(pv_irq_ops.irq_enable),
1500 paravirt_clobber(CLBR_EAX)
1501 : "memory", "eax", "cc" PV_EXTRA_CLOBBERS);
1502}
1503
1504static inline unsigned long __raw_local_irq_save(void)
1505{
1506 unsigned long f;
1507
1508 f = __raw_local_save_flags();
1509 raw_local_irq_disable();
1510 return f;
1511}
1512
1513
1514/* Make sure as little as possible of this mess escapes. */
1515#undef PARAVIRT_CALL
1516#undef __PVOP_CALL
1517#undef __PVOP_VCALL
1518#undef PVOP_VCALL0
1519#undef PVOP_CALL0
1520#undef PVOP_VCALL1
1521#undef PVOP_CALL1
1522#undef PVOP_VCALL2
1523#undef PVOP_CALL2
1524#undef PVOP_VCALL3
1525#undef PVOP_CALL3
1526#undef PVOP_VCALL4
1527#undef PVOP_CALL4
1528
1529#else /* __ASSEMBLY__ */
1530
1531#define _PVSITE(ptype, clobbers, ops, word, algn) \
1532771:; \
1533 ops; \
1534772:; \
1535 .pushsection .parainstructions,"a"; \
1536 .align algn; \
1537 word 771b; \
1538 .byte ptype; \
1539 .byte 772b-771b; \
1540 .short clobbers; \
1541 .popsection
1542
1543
1544#ifdef CONFIG_X86_64
1545#define PV_SAVE_REGS \
1546 push %rax; \
1547 push %rcx; \
1548 push %rdx; \
1549 push %rsi; \
1550 push %rdi; \
1551 push %r8; \
1552 push %r9; \
1553 push %r10; \
1554 push %r11
1555#define PV_RESTORE_REGS \
1556 pop %r11; \
1557 pop %r10; \
1558 pop %r9; \
1559 pop %r8; \
1560 pop %rdi; \
1561 pop %rsi; \
1562 pop %rdx; \
1563 pop %rcx; \
1564 pop %rax
1565#define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 8)
1566#define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .quad, 8)
1567#define PARA_INDIRECT(addr) *addr(%rip)
1568#else
1569#define PV_SAVE_REGS pushl %eax; pushl %edi; pushl %ecx; pushl %edx
1570#define PV_RESTORE_REGS popl %edx; popl %ecx; popl %edi; popl %eax
1571#define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4)
1572#define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
1573#define PARA_INDIRECT(addr) *%cs:addr
1574#endif
1575
1576#define INTERRUPT_RETURN \
1577 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_iret), CLBR_NONE, \
1578 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_iret))
1579
1580#define DISABLE_INTERRUPTS(clobbers) \
1581 PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_irq_disable), clobbers, \
1582 PV_SAVE_REGS; \
1583 call PARA_INDIRECT(pv_irq_ops+PV_IRQ_irq_disable); \
1584 PV_RESTORE_REGS;) \
1585
1586#define ENABLE_INTERRUPTS(clobbers) \
1587 PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_irq_enable), clobbers, \
1588 PV_SAVE_REGS; \
1589 call PARA_INDIRECT(pv_irq_ops+PV_IRQ_irq_enable); \
1590 PV_RESTORE_REGS;)
1591
1592#define USERGS_SYSRET32 \
1593 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret32), \
1594 CLBR_NONE, \
1595 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret32))
1596
1597#ifdef CONFIG_X86_32
1598#define GET_CR0_INTO_EAX \
1599 push %ecx; push %edx; \
1600 call PARA_INDIRECT(pv_cpu_ops+PV_CPU_read_cr0); \
1601 pop %edx; pop %ecx
1602
1603#define ENABLE_INTERRUPTS_SYSEXIT \
1604 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_irq_enable_sysexit), \
1605 CLBR_NONE, \
1606 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_irq_enable_sysexit))
1607
1608
1609#else /* !CONFIG_X86_32 */
1610
1611/*
1612 * If swapgs is used while the userspace stack is still current,
1613 * there's no way to call a pvop. The PV replacement *must* be
1614 * inlined, or the swapgs instruction must be trapped and emulated.
1615 */
1616#define SWAPGS_UNSAFE_STACK \
1617 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_swapgs), CLBR_NONE, \
1618 swapgs)
1619
1620#define SWAPGS \
1621 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_swapgs), CLBR_NONE, \
1622 PV_SAVE_REGS; \
1623 call PARA_INDIRECT(pv_cpu_ops+PV_CPU_swapgs); \
1624 PV_RESTORE_REGS \
1625 )
1626
1627#define GET_CR2_INTO_RCX \
1628 call PARA_INDIRECT(pv_mmu_ops+PV_MMU_read_cr2); \
1629 movq %rax, %rcx; \
1630 xorq %rax, %rax;
1631
1632#define PARAVIRT_ADJUST_EXCEPTION_FRAME \
1633 PARA_SITE(PARA_PATCH(pv_irq_ops, PV_IRQ_adjust_exception_frame), \
1634 CLBR_NONE, \
1635 call PARA_INDIRECT(pv_irq_ops+PV_IRQ_adjust_exception_frame))
1636
1637#define USERGS_SYSRET64 \
1638 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret64), \
1639 CLBR_NONE, \
1640 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret64))
1641
1642#define ENABLE_INTERRUPTS_SYSEXIT32 \
1643 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_irq_enable_sysexit), \
1644 CLBR_NONE, \
1645 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_irq_enable_sysexit))
1646#endif /* CONFIG_X86_32 */
1647
1648#endif /* __ASSEMBLY__ */
1649#endif /* CONFIG_PARAVIRT */
1650#endif /* ASM_X86__PARAVIRT_H */
diff --git a/include/asm-x86/parport.h b/include/asm-x86/parport.h
deleted file mode 100644
index 2e3dda4dc3d9..000000000000
--- a/include/asm-x86/parport.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef ASM_X86__PARPORT_H
2#define ASM_X86__PARPORT_H
3
4static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma);
5static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma)
6{
7 return parport_pc_find_isa_ports(autoirq, autodma);
8}
9
10#endif /* ASM_X86__PARPORT_H */
diff --git a/include/asm-x86/pat.h b/include/asm-x86/pat.h
deleted file mode 100644
index 482c3e3f9879..000000000000
--- a/include/asm-x86/pat.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef ASM_X86__PAT_H
2#define ASM_X86__PAT_H
3
4#include <linux/types.h>
5
6#ifdef CONFIG_X86_PAT
7extern int pat_enabled;
8extern void validate_pat_support(struct cpuinfo_x86 *c);
9#else
10static const int pat_enabled;
11static inline void validate_pat_support(struct cpuinfo_x86 *c) { }
12#endif
13
14extern void pat_init(void);
15
16extern int reserve_memtype(u64 start, u64 end,
17 unsigned long req_type, unsigned long *ret_type);
18extern int free_memtype(u64 start, u64 end);
19
20extern void pat_disable(char *reason);
21
22#endif /* ASM_X86__PAT_H */
diff --git a/include/asm-x86/pci-direct.h b/include/asm-x86/pci-direct.h
deleted file mode 100644
index da42be07b690..000000000000
--- a/include/asm-x86/pci-direct.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef ASM_X86__PCI_DIRECT_H
2#define ASM_X86__PCI_DIRECT_H
3
4#include <linux/types.h>
5
6/* Direct PCI access. This is used for PCI accesses in early boot before
7 the PCI subsystem works. */
8
9extern u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset);
10extern u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset);
11extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset);
12extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val);
13extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val);
14extern void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val);
15
16extern int early_pci_allowed(void);
17
18extern unsigned int pci_early_dump_regs;
19extern void early_dump_pci_device(u8 bus, u8 slot, u8 func);
20extern void early_dump_pci_devices(void);
21#endif /* ASM_X86__PCI_DIRECT_H */
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h
deleted file mode 100644
index 602583192991..000000000000
--- a/include/asm-x86/pci.h
+++ /dev/null
@@ -1,114 +0,0 @@
1#ifndef ASM_X86__PCI_H
2#define ASM_X86__PCI_H
3
4#include <linux/mm.h> /* for struct page */
5#include <linux/types.h>
6#include <linux/slab.h>
7#include <linux/string.h>
8#include <asm/scatterlist.h>
9#include <asm/io.h>
10
11#ifdef __KERNEL__
12
13struct pci_sysdata {
14 int domain; /* PCI domain */
15 int node; /* NUMA node */
16#ifdef CONFIG_X86_64
17 void *iommu; /* IOMMU private data */
18#endif
19};
20
21extern int pci_routeirq;
22
23/* scan a bus after allocating a pci_sysdata for it */
24extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,
25 int node);
26extern struct pci_bus *pci_scan_bus_with_sysdata(int busno);
27
28static inline int pci_domain_nr(struct pci_bus *bus)
29{
30 struct pci_sysdata *sd = bus->sysdata;
31 return sd->domain;
32}
33
34static inline int pci_proc_domain(struct pci_bus *bus)
35{
36 return pci_domain_nr(bus);
37}
38
39
40/* Can be used to override the logic in pci_scan_bus for skipping
41 already-configured bus numbers - to be used for buggy BIOSes
42 or architectures with incomplete PCI setup by the loader */
43
44#ifdef CONFIG_PCI
45extern unsigned int pcibios_assign_all_busses(void);
46#else
47#define pcibios_assign_all_busses() 0
48#endif
49#define pcibios_scan_all_fns(a, b) 0
50
51extern unsigned long pci_mem_start;
52#define PCIBIOS_MIN_IO 0x1000
53#define PCIBIOS_MIN_MEM (pci_mem_start)
54
55#define PCIBIOS_MIN_CARDBUS_IO 0x4000
56
57void pcibios_config_init(void);
58struct pci_bus *pcibios_scan_root(int bus);
59
60void pcibios_set_master(struct pci_dev *dev);
61void pcibios_penalize_isa_irq(int irq, int active);
62struct irq_routing_table *pcibios_get_irq_routing_table(void);
63int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
64
65
66#define HAVE_PCI_MMAP
67extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
68 enum pci_mmap_state mmap_state,
69 int write_combine);
70
71
72#ifdef CONFIG_PCI
73extern void early_quirks(void);
74static inline void pci_dma_burst_advice(struct pci_dev *pdev,
75 enum pci_dma_burst_strategy *strat,
76 unsigned long *strategy_parameter)
77{
78 *strat = PCI_DMA_BURST_INFINITY;
79 *strategy_parameter = ~0UL;
80}
81#else
82static inline void early_quirks(void) { }
83#endif
84
85#endif /* __KERNEL__ */
86
87#ifdef CONFIG_X86_32
88# include "pci_32.h"
89#else
90# include "pci_64.h"
91#endif
92
93/* implement the pci_ DMA API in terms of the generic device dma_ one */
94#include <asm-generic/pci-dma-compat.h>
95
96/* generic pci stuff */
97#include <asm-generic/pci.h>
98
99#ifdef CONFIG_NUMA
100/* Returns the node based on pci bus */
101static inline int __pcibus_to_node(struct pci_bus *bus)
102{
103 struct pci_sysdata *sd = bus->sysdata;
104
105 return sd->node;
106}
107
108static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus)
109{
110 return node_to_cpumask(__pcibus_to_node(bus));
111}
112#endif
113
114#endif /* ASM_X86__PCI_H */
diff --git a/include/asm-x86/pci_32.h b/include/asm-x86/pci_32.h
deleted file mode 100644
index 3f2288207c0c..000000000000
--- a/include/asm-x86/pci_32.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef ASM_X86__PCI_32_H
2#define ASM_X86__PCI_32_H
3
4
5#ifdef __KERNEL__
6
7
8/* Dynamic DMA mapping stuff.
9 * i386 has everything mapped statically.
10 */
11
12struct pci_dev;
13
14/* The PCI address space does equal the physical memory
15 * address space. The networking and block device layers use
16 * this boolean for bounce buffer decisions.
17 */
18#define PCI_DMA_BUS_IS_PHYS (1)
19
20/* pci_unmap_{page,single} is a nop so... */
21#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0];
22#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0];
23#define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME)
24#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
25 do { break; } while (pci_unmap_addr(PTR, ADDR_NAME))
26#define pci_unmap_len(PTR, LEN_NAME) sizeof((PTR)->LEN_NAME)
27#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
28 do { break; } while (pci_unmap_len(PTR, LEN_NAME))
29
30
31#endif /* __KERNEL__ */
32
33
34#endif /* ASM_X86__PCI_32_H */
diff --git a/include/asm-x86/pci_64.h b/include/asm-x86/pci_64.h
deleted file mode 100644
index f72e12d5770e..000000000000
--- a/include/asm-x86/pci_64.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#ifndef ASM_X86__PCI_64_H
2#define ASM_X86__PCI_64_H
3
4#ifdef __KERNEL__
5
6#ifdef CONFIG_CALGARY_IOMMU
7static inline void *pci_iommu(struct pci_bus *bus)
8{
9 struct pci_sysdata *sd = bus->sysdata;
10 return sd->iommu;
11}
12
13static inline void set_pci_iommu(struct pci_bus *bus, void *val)
14{
15 struct pci_sysdata *sd = bus->sysdata;
16 sd->iommu = val;
17}
18#endif /* CONFIG_CALGARY_IOMMU */
19
20extern int (*pci_config_read)(int seg, int bus, int dev, int fn,
21 int reg, int len, u32 *value);
22extern int (*pci_config_write)(int seg, int bus, int dev, int fn,
23 int reg, int len, u32 value);
24
25extern void dma32_reserve_bootmem(void);
26extern void pci_iommu_alloc(void);
27
28/* The PCI address space does equal the physical memory
29 * address space. The networking and block device layers use
30 * this boolean for bounce buffer decisions
31 *
32 * On AMD64 it mostly equals, but we set it to zero if a hardware
33 * IOMMU (gart) of sotware IOMMU (swiotlb) is available.
34 */
35#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
36
37#if defined(CONFIG_GART_IOMMU) || defined(CONFIG_CALGARY_IOMMU)
38
39#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
40 dma_addr_t ADDR_NAME;
41#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
42 __u32 LEN_NAME;
43#define pci_unmap_addr(PTR, ADDR_NAME) \
44 ((PTR)->ADDR_NAME)
45#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
46 (((PTR)->ADDR_NAME) = (VAL))
47#define pci_unmap_len(PTR, LEN_NAME) \
48 ((PTR)->LEN_NAME)
49#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
50 (((PTR)->LEN_NAME) = (VAL))
51
52#else
53/* No IOMMU */
54
55#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
56#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
57#define pci_unmap_addr(PTR, ADDR_NAME) (0)
58#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
59#define pci_unmap_len(PTR, LEN_NAME) (0)
60#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
61
62#endif
63
64#endif /* __KERNEL__ */
65
66#endif /* ASM_X86__PCI_64_H */
diff --git a/include/asm-x86/pda.h b/include/asm-x86/pda.h
deleted file mode 100644
index 45fd2aee8d6a..000000000000
--- a/include/asm-x86/pda.h
+++ /dev/null
@@ -1,137 +0,0 @@
1#ifndef ASM_X86__PDA_H
2#define ASM_X86__PDA_H
3
4#ifndef __ASSEMBLY__
5#include <linux/stddef.h>
6#include <linux/types.h>
7#include <linux/cache.h>
8#include <asm/page.h>
9
10/* Per processor datastructure. %gs points to it while the kernel runs */
11struct x8664_pda {
12 struct task_struct *pcurrent; /* 0 Current process */
13 unsigned long data_offset; /* 8 Per cpu data offset from linker
14 address */
15 unsigned long kernelstack; /* 16 top of kernel stack for current */
16 unsigned long oldrsp; /* 24 user rsp for system call */
17 int irqcount; /* 32 Irq nesting counter. Starts -1 */
18 unsigned int cpunumber; /* 36 Logical CPU number */
19 unsigned long stack_canary; /* 40 stack canary value */
20 /* gcc-ABI: this canary MUST be at
21 offset 40!!! */
22 char *irqstackptr;
23 short nodenumber; /* number of current node (32k max) */
24 short in_bootmem; /* pda lives in bootmem */
25 unsigned int __softirq_pending;
26 unsigned int __nmi_count; /* number of NMI on this CPUs */
27 short mmu_state;
28 short isidle;
29 struct mm_struct *active_mm;
30 unsigned apic_timer_irqs;
31 unsigned irq0_irqs;
32 unsigned irq_resched_count;
33 unsigned irq_call_count;
34 unsigned irq_tlb_count;
35 unsigned irq_thermal_count;
36 unsigned irq_threshold_count;
37 unsigned irq_spurious_count;
38} ____cacheline_aligned_in_smp;
39
40extern struct x8664_pda **_cpu_pda;
41extern void pda_init(int);
42
43#define cpu_pda(i) (_cpu_pda[i])
44
45/*
46 * There is no fast way to get the base address of the PDA, all the accesses
47 * have to mention %fs/%gs. So it needs to be done this Torvaldian way.
48 */
49extern void __bad_pda_field(void) __attribute__((noreturn));
50
51/*
52 * proxy_pda doesn't actually exist, but tell gcc it is accessed for
53 * all PDA accesses so it gets read/write dependencies right.
54 */
55extern struct x8664_pda _proxy_pda;
56
57#define pda_offset(field) offsetof(struct x8664_pda, field)
58
59#define pda_to_op(op, field, val) \
60do { \
61 typedef typeof(_proxy_pda.field) T__; \
62 if (0) { T__ tmp__; tmp__ = (val); } /* type checking */ \
63 switch (sizeof(_proxy_pda.field)) { \
64 case 2: \
65 asm(op "w %1,%%gs:%c2" : \
66 "+m" (_proxy_pda.field) : \
67 "ri" ((T__)val), \
68 "i"(pda_offset(field))); \
69 break; \
70 case 4: \
71 asm(op "l %1,%%gs:%c2" : \
72 "+m" (_proxy_pda.field) : \
73 "ri" ((T__)val), \
74 "i" (pda_offset(field))); \
75 break; \
76 case 8: \
77 asm(op "q %1,%%gs:%c2": \
78 "+m" (_proxy_pda.field) : \
79 "ri" ((T__)val), \
80 "i"(pda_offset(field))); \
81 break; \
82 default: \
83 __bad_pda_field(); \
84 } \
85} while (0)
86
87#define pda_from_op(op, field) \
88({ \
89 typeof(_proxy_pda.field) ret__; \
90 switch (sizeof(_proxy_pda.field)) { \
91 case 2: \
92 asm(op "w %%gs:%c1,%0" : \
93 "=r" (ret__) : \
94 "i" (pda_offset(field)), \
95 "m" (_proxy_pda.field)); \
96 break; \
97 case 4: \
98 asm(op "l %%gs:%c1,%0": \
99 "=r" (ret__): \
100 "i" (pda_offset(field)), \
101 "m" (_proxy_pda.field)); \
102 break; \
103 case 8: \
104 asm(op "q %%gs:%c1,%0": \
105 "=r" (ret__) : \
106 "i" (pda_offset(field)), \
107 "m" (_proxy_pda.field)); \
108 break; \
109 default: \
110 __bad_pda_field(); \
111 } \
112 ret__; \
113})
114
115#define read_pda(field) pda_from_op("mov", field)
116#define write_pda(field, val) pda_to_op("mov", field, val)
117#define add_pda(field, val) pda_to_op("add", field, val)
118#define sub_pda(field, val) pda_to_op("sub", field, val)
119#define or_pda(field, val) pda_to_op("or", field, val)
120
121/* This is not atomic against other CPUs -- CPU preemption needs to be off */
122#define test_and_clear_bit_pda(bit, field) \
123({ \
124 int old__; \
125 asm volatile("btr %2,%%gs:%c3\n\tsbbl %0,%0" \
126 : "=r" (old__), "+m" (_proxy_pda.field) \
127 : "dIr" (bit), "i" (pda_offset(field)) : "memory");\
128 old__; \
129})
130
131#endif
132
133#define PDA_STACKOFFSET (5*8)
134
135#define refresh_stack_canary() write_pda(stack_canary, current->stack_canary)
136
137#endif /* ASM_X86__PDA_H */
diff --git a/include/asm-x86/percpu.h b/include/asm-x86/percpu.h
deleted file mode 100644
index e10a1d0678cf..000000000000
--- a/include/asm-x86/percpu.h
+++ /dev/null
@@ -1,218 +0,0 @@
1#ifndef ASM_X86__PERCPU_H
2#define ASM_X86__PERCPU_H
3
4#ifdef CONFIG_X86_64
5#include <linux/compiler.h>
6
7/* Same as asm-generic/percpu.h, except that we store the per cpu offset
8 in the PDA. Longer term the PDA and every per cpu variable
9 should be just put into a single section and referenced directly
10 from %gs */
11
12#ifdef CONFIG_SMP
13#include <asm/pda.h>
14
15#define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset)
16#define __my_cpu_offset read_pda(data_offset)
17
18#define per_cpu_offset(x) (__per_cpu_offset(x))
19
20#endif
21#include <asm-generic/percpu.h>
22
23DECLARE_PER_CPU(struct x8664_pda, pda);
24
25/*
26 * These are supposed to be implemented as a single instruction which
27 * operates on the per-cpu data base segment. x86-64 doesn't have
28 * that yet, so this is a fairly inefficient workaround for the
29 * meantime. The single instruction is atomic with respect to
30 * preemption and interrupts, so we need to explicitly disable
31 * interrupts here to achieve the same effect. However, because it
32 * can be used from within interrupt-disable/enable, we can't actually
33 * disable interrupts; disabling preemption is enough.
34 */
35#define x86_read_percpu(var) \
36 ({ \
37 typeof(per_cpu_var(var)) __tmp; \
38 preempt_disable(); \
39 __tmp = __get_cpu_var(var); \
40 preempt_enable(); \
41 __tmp; \
42 })
43
44#define x86_write_percpu(var, val) \
45 do { \
46 preempt_disable(); \
47 __get_cpu_var(var) = (val); \
48 preempt_enable(); \
49 } while(0)
50
51#else /* CONFIG_X86_64 */
52
53#ifdef __ASSEMBLY__
54
55/*
56 * PER_CPU finds an address of a per-cpu variable.
57 *
58 * Args:
59 * var - variable name
60 * reg - 32bit register
61 *
62 * The resulting address is stored in the "reg" argument.
63 *
64 * Example:
65 * PER_CPU(cpu_gdt_descr, %ebx)
66 */
67#ifdef CONFIG_SMP
68#define PER_CPU(var, reg) \
69 movl %fs:per_cpu__##this_cpu_off, reg; \
70 lea per_cpu__##var(reg), reg
71#define PER_CPU_VAR(var) %fs:per_cpu__##var
72#else /* ! SMP */
73#define PER_CPU(var, reg) \
74 movl $per_cpu__##var, reg
75#define PER_CPU_VAR(var) per_cpu__##var
76#endif /* SMP */
77
78#else /* ...!ASSEMBLY */
79
80/*
81 * PER_CPU finds an address of a per-cpu variable.
82 *
83 * Args:
84 * var - variable name
85 * cpu - 32bit register containing the current CPU number
86 *
87 * The resulting address is stored in the "cpu" argument.
88 *
89 * Example:
90 * PER_CPU(cpu_gdt_descr, %ebx)
91 */
92#ifdef CONFIG_SMP
93
94#define __my_cpu_offset x86_read_percpu(this_cpu_off)
95
96/* fs segment starts at (positive) offset == __per_cpu_offset[cpu] */
97#define __percpu_seg "%%fs:"
98
99#else /* !SMP */
100
101#define __percpu_seg ""
102
103#endif /* SMP */
104
105#include <asm-generic/percpu.h>
106
107/* We can use this directly for local CPU (faster). */
108DECLARE_PER_CPU(unsigned long, this_cpu_off);
109
110/* For arch-specific code, we can use direct single-insn ops (they
111 * don't give an lvalue though). */
112extern void __bad_percpu_size(void);
113
114#define percpu_to_op(op, var, val) \
115do { \
116 typedef typeof(var) T__; \
117 if (0) { \
118 T__ tmp__; \
119 tmp__ = (val); \
120 } \
121 switch (sizeof(var)) { \
122 case 1: \
123 asm(op "b %1,"__percpu_seg"%0" \
124 : "+m" (var) \
125 : "ri" ((T__)val)); \
126 break; \
127 case 2: \
128 asm(op "w %1,"__percpu_seg"%0" \
129 : "+m" (var) \
130 : "ri" ((T__)val)); \
131 break; \
132 case 4: \
133 asm(op "l %1,"__percpu_seg"%0" \
134 : "+m" (var) \
135 : "ri" ((T__)val)); \
136 break; \
137 default: __bad_percpu_size(); \
138 } \
139} while (0)
140
141#define percpu_from_op(op, var) \
142({ \
143 typeof(var) ret__; \
144 switch (sizeof(var)) { \
145 case 1: \
146 asm(op "b "__percpu_seg"%1,%0" \
147 : "=r" (ret__) \
148 : "m" (var)); \
149 break; \
150 case 2: \
151 asm(op "w "__percpu_seg"%1,%0" \
152 : "=r" (ret__) \
153 : "m" (var)); \
154 break; \
155 case 4: \
156 asm(op "l "__percpu_seg"%1,%0" \
157 : "=r" (ret__) \
158 : "m" (var)); \
159 break; \
160 default: __bad_percpu_size(); \
161 } \
162 ret__; \
163})
164
165#define x86_read_percpu(var) percpu_from_op("mov", per_cpu__##var)
166#define x86_write_percpu(var, val) percpu_to_op("mov", per_cpu__##var, val)
167#define x86_add_percpu(var, val) percpu_to_op("add", per_cpu__##var, val)
168#define x86_sub_percpu(var, val) percpu_to_op("sub", per_cpu__##var, val)
169#define x86_or_percpu(var, val) percpu_to_op("or", per_cpu__##var, val)
170#endif /* !__ASSEMBLY__ */
171#endif /* !CONFIG_X86_64 */
172
173#ifdef CONFIG_SMP
174
175/*
176 * Define the "EARLY_PER_CPU" macros. These are used for some per_cpu
177 * variables that are initialized and accessed before there are per_cpu
178 * areas allocated.
179 */
180
181#define DEFINE_EARLY_PER_CPU(_type, _name, _initvalue) \
182 DEFINE_PER_CPU(_type, _name) = _initvalue; \
183 __typeof__(_type) _name##_early_map[NR_CPUS] __initdata = \
184 { [0 ... NR_CPUS-1] = _initvalue }; \
185 __typeof__(_type) *_name##_early_ptr __refdata = _name##_early_map
186
187#define EXPORT_EARLY_PER_CPU_SYMBOL(_name) \
188 EXPORT_PER_CPU_SYMBOL(_name)
189
190#define DECLARE_EARLY_PER_CPU(_type, _name) \
191 DECLARE_PER_CPU(_type, _name); \
192 extern __typeof__(_type) *_name##_early_ptr; \
193 extern __typeof__(_type) _name##_early_map[]
194
195#define early_per_cpu_ptr(_name) (_name##_early_ptr)
196#define early_per_cpu_map(_name, _idx) (_name##_early_map[_idx])
197#define early_per_cpu(_name, _cpu) \
198 (early_per_cpu_ptr(_name) ? \
199 early_per_cpu_ptr(_name)[_cpu] : \
200 per_cpu(_name, _cpu))
201
202#else /* !CONFIG_SMP */
203#define DEFINE_EARLY_PER_CPU(_type, _name, _initvalue) \
204 DEFINE_PER_CPU(_type, _name) = _initvalue
205
206#define EXPORT_EARLY_PER_CPU_SYMBOL(_name) \
207 EXPORT_PER_CPU_SYMBOL(_name)
208
209#define DECLARE_EARLY_PER_CPU(_type, _name) \
210 DECLARE_PER_CPU(_type, _name)
211
212#define early_per_cpu(_name, _cpu) per_cpu(_name, _cpu)
213#define early_per_cpu_ptr(_name) NULL
214/* no early_per_cpu_map() */
215
216#endif /* !CONFIG_SMP */
217
218#endif /* ASM_X86__PERCPU_H */
diff --git a/include/asm-x86/pgalloc.h b/include/asm-x86/pgalloc.h
deleted file mode 100644
index 3cd23adedae8..000000000000
--- a/include/asm-x86/pgalloc.h
+++ /dev/null
@@ -1,114 +0,0 @@
1#ifndef ASM_X86__PGALLOC_H
2#define ASM_X86__PGALLOC_H
3
4#include <linux/threads.h>
5#include <linux/mm.h> /* for struct page */
6#include <linux/pagemap.h>
7
8static inline int __paravirt_pgd_alloc(struct mm_struct *mm) { return 0; }
9
10#ifdef CONFIG_PARAVIRT
11#include <asm/paravirt.h>
12#else
13#define paravirt_pgd_alloc(mm) __paravirt_pgd_alloc(mm)
14static inline void paravirt_pgd_free(struct mm_struct *mm, pgd_t *pgd) {}
15static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) {}
16static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) {}
17static inline void paravirt_alloc_pmd_clone(unsigned long pfn, unsigned long clonepfn,
18 unsigned long start, unsigned long count) {}
19static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn) {}
20static inline void paravirt_release_pte(unsigned long pfn) {}
21static inline void paravirt_release_pmd(unsigned long pfn) {}
22static inline void paravirt_release_pud(unsigned long pfn) {}
23#endif
24
25/*
26 * Allocate and free page tables.
27 */
28extern pgd_t *pgd_alloc(struct mm_struct *);
29extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
30
31extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
32extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long);
33
34/* Should really implement gc for free page table pages. This could be
35 done with a reference count in struct page. */
36
37static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
38{
39 BUG_ON((unsigned long)pte & (PAGE_SIZE-1));
40 free_page((unsigned long)pte);
41}
42
43static inline void pte_free(struct mm_struct *mm, struct page *pte)
44{
45 __free_page(pte);
46}
47
48extern void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte);
49
50static inline void pmd_populate_kernel(struct mm_struct *mm,
51 pmd_t *pmd, pte_t *pte)
52{
53 paravirt_alloc_pte(mm, __pa(pte) >> PAGE_SHIFT);
54 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
55}
56
57static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
58 struct page *pte)
59{
60 unsigned long pfn = page_to_pfn(pte);
61
62 paravirt_alloc_pte(mm, pfn);
63 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE));
64}
65
66#define pmd_pgtable(pmd) pmd_page(pmd)
67
68#if PAGETABLE_LEVELS > 2
69static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
70{
71 return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
72}
73
74static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
75{
76 BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
77 free_page((unsigned long)pmd);
78}
79
80extern void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd);
81
82#ifdef CONFIG_X86_PAE
83extern void pud_populate(struct mm_struct *mm, pud_t *pudp, pmd_t *pmd);
84#else /* !CONFIG_X86_PAE */
85static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
86{
87 paravirt_alloc_pmd(mm, __pa(pmd) >> PAGE_SHIFT);
88 set_pud(pud, __pud(_PAGE_TABLE | __pa(pmd)));
89}
90#endif /* CONFIG_X86_PAE */
91
92#if PAGETABLE_LEVELS > 3
93static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
94{
95 paravirt_alloc_pud(mm, __pa(pud) >> PAGE_SHIFT);
96 set_pgd(pgd, __pgd(_PAGE_TABLE | __pa(pud)));
97}
98
99static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
100{
101 return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
102}
103
104static inline void pud_free(struct mm_struct *mm, pud_t *pud)
105{
106 BUG_ON((unsigned long)pud & (PAGE_SIZE-1));
107 free_page((unsigned long)pud);
108}
109
110extern void __pud_free_tlb(struct mmu_gather *tlb, pud_t *pud);
111#endif /* PAGETABLE_LEVELS > 3 */
112#endif /* PAGETABLE_LEVELS > 2 */
113
114#endif /* ASM_X86__PGALLOC_H */
diff --git a/include/asm-x86/pgtable-2level-defs.h b/include/asm-x86/pgtable-2level-defs.h
deleted file mode 100644
index 7ec48f4e5347..000000000000
--- a/include/asm-x86/pgtable-2level-defs.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef ASM_X86__PGTABLE_2LEVEL_DEFS_H
2#define ASM_X86__PGTABLE_2LEVEL_DEFS_H
3
4#define SHARED_KERNEL_PMD 0
5
6/*
7 * traditional i386 two-level paging structure:
8 */
9
10#define PGDIR_SHIFT 22
11#define PTRS_PER_PGD 1024
12
13/*
14 * the i386 is two-level, so we don't really have any
15 * PMD directory physically.
16 */
17
18#define PTRS_PER_PTE 1024
19
20#endif /* ASM_X86__PGTABLE_2LEVEL_DEFS_H */
diff --git a/include/asm-x86/pgtable-2level.h b/include/asm-x86/pgtable-2level.h
deleted file mode 100644
index 81762081dcd8..000000000000
--- a/include/asm-x86/pgtable-2level.h
+++ /dev/null
@@ -1,79 +0,0 @@
1#ifndef ASM_X86__PGTABLE_2LEVEL_H
2#define ASM_X86__PGTABLE_2LEVEL_H
3
4#define pte_ERROR(e) \
5 printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
6#define pgd_ERROR(e) \
7 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
8
9/*
10 * Certain architectures need to do special things when PTEs
11 * within a page table are directly modified. Thus, the following
12 * hook is made available.
13 */
14static inline void native_set_pte(pte_t *ptep , pte_t pte)
15{
16 *ptep = pte;
17}
18
19static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
20{
21 *pmdp = pmd;
22}
23
24static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
25{
26 native_set_pte(ptep, pte);
27}
28
29static inline void native_set_pte_present(struct mm_struct *mm,
30 unsigned long addr,
31 pte_t *ptep, pte_t pte)
32{
33 native_set_pte(ptep, pte);
34}
35
36static inline void native_pmd_clear(pmd_t *pmdp)
37{
38 native_set_pmd(pmdp, __pmd(0));
39}
40
41static inline void native_pte_clear(struct mm_struct *mm,
42 unsigned long addr, pte_t *xp)
43{
44 *xp = native_make_pte(0);
45}
46
47#ifdef CONFIG_SMP
48static inline pte_t native_ptep_get_and_clear(pte_t *xp)
49{
50 return __pte(xchg(&xp->pte_low, 0));
51}
52#else
53#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
54#endif
55
56#define pte_none(x) (!(x).pte_low)
57
58/*
59 * Bits 0, 6 and 7 are taken, split up the 29 bits of offset
60 * into this range:
61 */
62#define PTE_FILE_MAX_BITS 29
63
64#define pte_to_pgoff(pte) \
65 ((((pte).pte_low >> 1) & 0x1f) + (((pte).pte_low >> 8) << 5))
66
67#define pgoff_to_pte(off) \
68 ((pte_t) { .pte_low = (((off) & 0x1f) << 1) + \
69 (((off) >> 5) << 8) + _PAGE_FILE })
70
71/* Encode and de-code a swap entry */
72#define __swp_type(x) (((x).val >> 1) & 0x1f)
73#define __swp_offset(x) ((x).val >> 8)
74#define __swp_entry(type, offset) \
75 ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
76#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low })
77#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
78
79#endif /* ASM_X86__PGTABLE_2LEVEL_H */
diff --git a/include/asm-x86/pgtable-3level-defs.h b/include/asm-x86/pgtable-3level-defs.h
deleted file mode 100644
index c05fe6ff3720..000000000000
--- a/include/asm-x86/pgtable-3level-defs.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef ASM_X86__PGTABLE_3LEVEL_DEFS_H
2#define ASM_X86__PGTABLE_3LEVEL_DEFS_H
3
4#ifdef CONFIG_PARAVIRT
5#define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd)
6#else
7#define SHARED_KERNEL_PMD 1
8#endif
9
10/*
11 * PGDIR_SHIFT determines what a top-level page table entry can map
12 */
13#define PGDIR_SHIFT 30
14#define PTRS_PER_PGD 4
15
16/*
17 * PMD_SHIFT determines the size of the area a middle-level
18 * page table can map
19 */
20#define PMD_SHIFT 21
21#define PTRS_PER_PMD 512
22
23/*
24 * entries per page directory level
25 */
26#define PTRS_PER_PTE 512
27
28#endif /* ASM_X86__PGTABLE_3LEVEL_DEFS_H */
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h
deleted file mode 100644
index 75f4276b5ddb..000000000000
--- a/include/asm-x86/pgtable-3level.h
+++ /dev/null
@@ -1,175 +0,0 @@
1#ifndef ASM_X86__PGTABLE_3LEVEL_H
2#define ASM_X86__PGTABLE_3LEVEL_H
3
4/*
5 * Intel Physical Address Extension (PAE) Mode - three-level page
6 * tables on PPro+ CPUs.
7 *
8 * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
9 */
10
11#define pte_ERROR(e) \
12 printk("%s:%d: bad pte %p(%08lx%08lx).\n", \
13 __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low)
14#define pmd_ERROR(e) \
15 printk("%s:%d: bad pmd %p(%016Lx).\n", \
16 __FILE__, __LINE__, &(e), pmd_val(e))
17#define pgd_ERROR(e) \
18 printk("%s:%d: bad pgd %p(%016Lx).\n", \
19 __FILE__, __LINE__, &(e), pgd_val(e))
20
21static inline int pud_none(pud_t pud)
22{
23 return pud_val(pud) == 0;
24}
25
26static inline int pud_bad(pud_t pud)
27{
28 return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
29}
30
31static inline int pud_present(pud_t pud)
32{
33 return pud_val(pud) & _PAGE_PRESENT;
34}
35
36/* Rules for using set_pte: the pte being assigned *must* be
37 * either not present or in a state where the hardware will
38 * not attempt to update the pte. In places where this is
39 * not possible, use pte_get_and_clear to obtain the old pte
40 * value and then use set_pte to update it. -ben
41 */
42static inline void native_set_pte(pte_t *ptep, pte_t pte)
43{
44 ptep->pte_high = pte.pte_high;
45 smp_wmb();
46 ptep->pte_low = pte.pte_low;
47}
48
49/*
50 * Since this is only called on user PTEs, and the page fault handler
51 * must handle the already racy situation of simultaneous page faults,
52 * we are justified in merely clearing the PTE present bit, followed
53 * by a set. The ordering here is important.
54 */
55static inline void native_set_pte_present(struct mm_struct *mm,
56 unsigned long addr,
57 pte_t *ptep, pte_t pte)
58{
59 ptep->pte_low = 0;
60 smp_wmb();
61 ptep->pte_high = pte.pte_high;
62 smp_wmb();
63 ptep->pte_low = pte.pte_low;
64}
65
66static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
67{
68 set_64bit((unsigned long long *)(ptep), native_pte_val(pte));
69}
70
71static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
72{
73 set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd));
74}
75
76static inline void native_set_pud(pud_t *pudp, pud_t pud)
77{
78 set_64bit((unsigned long long *)(pudp), native_pud_val(pud));
79}
80
81/*
82 * For PTEs and PDEs, we must clear the P-bit first when clearing a page table
83 * entry, so clear the bottom half first and enforce ordering with a compiler
84 * barrier.
85 */
86static inline void native_pte_clear(struct mm_struct *mm, unsigned long addr,
87 pte_t *ptep)
88{
89 ptep->pte_low = 0;
90 smp_wmb();
91 ptep->pte_high = 0;
92}
93
94static inline void native_pmd_clear(pmd_t *pmd)
95{
96 u32 *tmp = (u32 *)pmd;
97 *tmp = 0;
98 smp_wmb();
99 *(tmp + 1) = 0;
100}
101
102static inline void pud_clear(pud_t *pudp)
103{
104 unsigned long pgd;
105
106 set_pud(pudp, __pud(0));
107
108 /*
109 * According to Intel App note "TLBs, Paging-Structure Caches,
110 * and Their Invalidation", April 2007, document 317080-001,
111 * section 8.1: in PAE mode we explicitly have to flush the
112 * TLB via cr3 if the top-level pgd is changed...
113 *
114 * Make sure the pud entry we're updating is within the
115 * current pgd to avoid unnecessary TLB flushes.
116 */
117 pgd = read_cr3();
118 if (__pa(pudp) >= pgd && __pa(pudp) <
119 (pgd + sizeof(pgd_t)*PTRS_PER_PGD))
120 write_cr3(pgd);
121}
122
123#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
124
125#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
126
127
128/* Find an entry in the second-level page table.. */
129#define pmd_offset(pud, address) ((pmd_t *)pud_page(*(pud)) + \
130 pmd_index(address))
131
132#ifdef CONFIG_SMP
133static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
134{
135 pte_t res;
136
137 /* xchg acts as a barrier before the setting of the high bits */
138 res.pte_low = xchg(&ptep->pte_low, 0);
139 res.pte_high = ptep->pte_high;
140 ptep->pte_high = 0;
141
142 return res;
143}
144#else
145#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
146#endif
147
148#define __HAVE_ARCH_PTE_SAME
149static inline int pte_same(pte_t a, pte_t b)
150{
151 return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
152}
153
154static inline int pte_none(pte_t pte)
155{
156 return !pte.pte_low && !pte.pte_high;
157}
158
159/*
160 * Bits 0, 6 and 7 are taken in the low part of the pte,
161 * put the 32 bits of offset into the high part.
162 */
163#define pte_to_pgoff(pte) ((pte).pte_high)
164#define pgoff_to_pte(off) \
165 ((pte_t) { { .pte_low = _PAGE_FILE, .pte_high = (off) } })
166#define PTE_FILE_MAX_BITS 32
167
168/* Encode and de-code a swap entry */
169#define __swp_type(x) (((x).val) & 0x1f)
170#define __swp_offset(x) ((x).val >> 5)
171#define __swp_entry(type, offset) ((swp_entry_t){(type) | (offset) << 5})
172#define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high })
173#define __swp_entry_to_pte(x) ((pte_t){ { .pte_high = (x).val } })
174
175#endif /* ASM_X86__PGTABLE_3LEVEL_H */
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
deleted file mode 100644
index 182f9d4c570f..000000000000
--- a/include/asm-x86/pgtable.h
+++ /dev/null
@@ -1,556 +0,0 @@
1#ifndef ASM_X86__PGTABLE_H
2#define ASM_X86__PGTABLE_H
3
4#define FIRST_USER_ADDRESS 0
5
6#define _PAGE_BIT_PRESENT 0 /* is present */
7#define _PAGE_BIT_RW 1 /* writeable */
8#define _PAGE_BIT_USER 2 /* userspace addressable */
9#define _PAGE_BIT_PWT 3 /* page write through */
10#define _PAGE_BIT_PCD 4 /* page cache disabled */
11#define _PAGE_BIT_ACCESSED 5 /* was accessed (raised by CPU) */
12#define _PAGE_BIT_DIRTY 6 /* was written to (raised by CPU) */
13#define _PAGE_BIT_FILE 6
14#define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */
15#define _PAGE_BIT_PAT 7 /* on 4KB pages */
16#define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */
17#define _PAGE_BIT_UNUSED1 9 /* available for programmer */
18#define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */
19#define _PAGE_BIT_UNUSED3 11
20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
21#define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1
22#define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1
23#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
24
25#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
26#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
27#define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER)
28#define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT)
29#define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD)
30#define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
31#define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
32#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
33#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
34#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
35#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP)
36#define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
37#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
38#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
39#define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
40#define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
41#define __HAVE_ARCH_PTE_SPECIAL
42
43#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
44#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
45#else
46#define _PAGE_NX (_AT(pteval_t, 0))
47#endif
48
49/* If _PAGE_PRESENT is clear, we use these: */
50#define _PAGE_FILE _PAGE_DIRTY /* nonlinear file mapping,
51 * saved PTE; unset:swap */
52#define _PAGE_PROTNONE _PAGE_PSE /* if the user mapped it with PROT_NONE;
53 pte_present gives true */
54
55#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
56 _PAGE_ACCESSED | _PAGE_DIRTY)
57#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
58 _PAGE_DIRTY)
59
60/* Set of bits not changed in pte_modify */
61#define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \
62 _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY)
63
64#define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT)
65#define _PAGE_CACHE_WB (0)
66#define _PAGE_CACHE_WC (_PAGE_PWT)
67#define _PAGE_CACHE_UC_MINUS (_PAGE_PCD)
68#define _PAGE_CACHE_UC (_PAGE_PCD | _PAGE_PWT)
69
70#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
71#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \
72 _PAGE_ACCESSED | _PAGE_NX)
73
74#define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | \
75 _PAGE_USER | _PAGE_ACCESSED)
76#define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
77 _PAGE_ACCESSED | _PAGE_NX)
78#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
79 _PAGE_ACCESSED)
80#define PAGE_COPY PAGE_COPY_NOEXEC
81#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | \
82 _PAGE_ACCESSED | _PAGE_NX)
83#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
84 _PAGE_ACCESSED)
85
86#define __PAGE_KERNEL_EXEC \
87 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
88#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
89
90#define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
91#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
92#define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT)
93#define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC)
94#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT)
95#define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD)
96#define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER)
97#define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT)
98#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
99#define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE)
100#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
101
102#define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP)
103#define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP)
104#define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP)
105#define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP)
106
107#define PAGE_KERNEL __pgprot(__PAGE_KERNEL)
108#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO)
109#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)
110#define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX)
111#define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC)
112#define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE)
113#define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS)
114#define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE)
115#define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE)
116#define PAGE_KERNEL_LARGE_NOCACHE __pgprot(__PAGE_KERNEL_LARGE_NOCACHE)
117#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
118#define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL)
119#define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE)
120
121#define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO)
122#define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE)
123#define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS)
124#define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC)
125
126/* xwr */
127#define __P000 PAGE_NONE
128#define __P001 PAGE_READONLY
129#define __P010 PAGE_COPY
130#define __P011 PAGE_COPY
131#define __P100 PAGE_READONLY_EXEC
132#define __P101 PAGE_READONLY_EXEC
133#define __P110 PAGE_COPY_EXEC
134#define __P111 PAGE_COPY_EXEC
135
136#define __S000 PAGE_NONE
137#define __S001 PAGE_READONLY
138#define __S010 PAGE_SHARED
139#define __S011 PAGE_SHARED
140#define __S100 PAGE_READONLY_EXEC
141#define __S101 PAGE_READONLY_EXEC
142#define __S110 PAGE_SHARED_EXEC
143#define __S111 PAGE_SHARED_EXEC
144
145/*
146 * early identity mapping pte attrib macros.
147 */
148#ifdef CONFIG_X86_64
149#define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC
150#else
151#define PTE_IDENT_ATTR 0x003 /* PRESENT+RW */
152#define PDE_IDENT_ATTR 0x063 /* PRESENT+RW+DIRTY+ACCESSED */
153#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
154#endif
155
156#ifndef __ASSEMBLY__
157
158/*
159 * ZERO_PAGE is a global shared page that is always zero: used
160 * for zero-mapped memory areas etc..
161 */
162extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
163#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
164
165extern spinlock_t pgd_lock;
166extern struct list_head pgd_list;
167
168/*
169 * The following only work if pte_present() is true.
170 * Undefined behaviour if not..
171 */
172static inline int pte_dirty(pte_t pte)
173{
174 return pte_flags(pte) & _PAGE_DIRTY;
175}
176
177static inline int pte_young(pte_t pte)
178{
179 return pte_flags(pte) & _PAGE_ACCESSED;
180}
181
182static inline int pte_write(pte_t pte)
183{
184 return pte_flags(pte) & _PAGE_RW;
185}
186
187static inline int pte_file(pte_t pte)
188{
189 return pte_flags(pte) & _PAGE_FILE;
190}
191
192static inline int pte_huge(pte_t pte)
193{
194 return pte_flags(pte) & _PAGE_PSE;
195}
196
197static inline int pte_global(pte_t pte)
198{
199 return pte_flags(pte) & _PAGE_GLOBAL;
200}
201
202static inline int pte_exec(pte_t pte)
203{
204 return !(pte_flags(pte) & _PAGE_NX);
205}
206
207static inline int pte_special(pte_t pte)
208{
209 return pte_flags(pte) & _PAGE_SPECIAL;
210}
211
212static inline unsigned long pte_pfn(pte_t pte)
213{
214 return (pte_val(pte) & PTE_PFN_MASK) >> PAGE_SHIFT;
215}
216
217#define pte_page(pte) pfn_to_page(pte_pfn(pte))
218
219static inline int pmd_large(pmd_t pte)
220{
221 return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
222 (_PAGE_PSE | _PAGE_PRESENT);
223}
224
225static inline pte_t pte_mkclean(pte_t pte)
226{
227 return __pte(pte_val(pte) & ~_PAGE_DIRTY);
228}
229
230static inline pte_t pte_mkold(pte_t pte)
231{
232 return __pte(pte_val(pte) & ~_PAGE_ACCESSED);
233}
234
235static inline pte_t pte_wrprotect(pte_t pte)
236{
237 return __pte(pte_val(pte) & ~_PAGE_RW);
238}
239
240static inline pte_t pte_mkexec(pte_t pte)
241{
242 return __pte(pte_val(pte) & ~_PAGE_NX);
243}
244
245static inline pte_t pte_mkdirty(pte_t pte)
246{
247 return __pte(pte_val(pte) | _PAGE_DIRTY);
248}
249
250static inline pte_t pte_mkyoung(pte_t pte)
251{
252 return __pte(pte_val(pte) | _PAGE_ACCESSED);
253}
254
255static inline pte_t pte_mkwrite(pte_t pte)
256{
257 return __pte(pte_val(pte) | _PAGE_RW);
258}
259
260static inline pte_t pte_mkhuge(pte_t pte)
261{
262 return __pte(pte_val(pte) | _PAGE_PSE);
263}
264
265static inline pte_t pte_clrhuge(pte_t pte)
266{
267 return __pte(pte_val(pte) & ~_PAGE_PSE);
268}
269
270static inline pte_t pte_mkglobal(pte_t pte)
271{
272 return __pte(pte_val(pte) | _PAGE_GLOBAL);
273}
274
275static inline pte_t pte_clrglobal(pte_t pte)
276{
277 return __pte(pte_val(pte) & ~_PAGE_GLOBAL);
278}
279
280static inline pte_t pte_mkspecial(pte_t pte)
281{
282 return __pte(pte_val(pte) | _PAGE_SPECIAL);
283}
284
285extern pteval_t __supported_pte_mask;
286
287static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
288{
289 return __pte((((phys_addr_t)page_nr << PAGE_SHIFT) |
290 pgprot_val(pgprot)) & __supported_pte_mask);
291}
292
293static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
294{
295 return __pmd((((phys_addr_t)page_nr << PAGE_SHIFT) |
296 pgprot_val(pgprot)) & __supported_pte_mask);
297}
298
299static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
300{
301 pteval_t val = pte_val(pte);
302
303 /*
304 * Chop off the NX bit (if present), and add the NX portion of
305 * the newprot (if present):
306 */
307 val &= _PAGE_CHG_MASK;
308 val |= pgprot_val(newprot) & (~_PAGE_CHG_MASK) & __supported_pte_mask;
309
310 return __pte(val);
311}
312
313/* mprotect needs to preserve PAT bits when updating vm_page_prot */
314#define pgprot_modify pgprot_modify
315static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
316{
317 pgprotval_t preservebits = pgprot_val(oldprot) & _PAGE_CHG_MASK;
318 pgprotval_t addbits = pgprot_val(newprot);
319 return __pgprot(preservebits | addbits);
320}
321
322#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
323
324#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
325
326#ifndef __ASSEMBLY__
327#define __HAVE_PHYS_MEM_ACCESS_PROT
328struct file;
329pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
330 unsigned long size, pgprot_t vma_prot);
331int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
332 unsigned long size, pgprot_t *vma_prot);
333#endif
334
335/* Install a pte for a particular vaddr in kernel space. */
336void set_pte_vaddr(unsigned long vaddr, pte_t pte);
337
338#ifdef CONFIG_X86_32
339extern void native_pagetable_setup_start(pgd_t *base);
340extern void native_pagetable_setup_done(pgd_t *base);
341#else
342static inline void native_pagetable_setup_start(pgd_t *base) {}
343static inline void native_pagetable_setup_done(pgd_t *base) {}
344#endif
345
346extern int arch_report_meminfo(char *page);
347
348#ifdef CONFIG_PARAVIRT
349#include <asm/paravirt.h>
350#else /* !CONFIG_PARAVIRT */
351#define set_pte(ptep, pte) native_set_pte(ptep, pte)
352#define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte)
353
354#define set_pte_present(mm, addr, ptep, pte) \
355 native_set_pte_present(mm, addr, ptep, pte)
356#define set_pte_atomic(ptep, pte) \
357 native_set_pte_atomic(ptep, pte)
358
359#define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd)
360
361#ifndef __PAGETABLE_PUD_FOLDED
362#define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd)
363#define pgd_clear(pgd) native_pgd_clear(pgd)
364#endif
365
366#ifndef set_pud
367# define set_pud(pudp, pud) native_set_pud(pudp, pud)
368#endif
369
370#ifndef __PAGETABLE_PMD_FOLDED
371#define pud_clear(pud) native_pud_clear(pud)
372#endif
373
374#define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep)
375#define pmd_clear(pmd) native_pmd_clear(pmd)
376
377#define pte_update(mm, addr, ptep) do { } while (0)
378#define pte_update_defer(mm, addr, ptep) do { } while (0)
379
380static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
381{
382 native_pagetable_setup_start(base);
383}
384
385static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
386{
387 native_pagetable_setup_done(base);
388}
389#endif /* CONFIG_PARAVIRT */
390
391#endif /* __ASSEMBLY__ */
392
393#ifdef CONFIG_X86_32
394# include "pgtable_32.h"
395#else
396# include "pgtable_64.h"
397#endif
398
399/*
400 * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
401 *
402 * this macro returns the index of the entry in the pgd page which would
403 * control the given virtual address
404 */
405#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
406
407/*
408 * pgd_offset() returns a (pgd_t *)
409 * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
410 */
411#define pgd_offset(mm, address) ((mm)->pgd + pgd_index((address)))
412/*
413 * a shortcut which implies the use of the kernel's pgd, instead
414 * of a process's
415 */
416#define pgd_offset_k(address) pgd_offset(&init_mm, (address))
417
418
419#define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)
420#define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
421
422#ifndef __ASSEMBLY__
423
424enum {
425 PG_LEVEL_NONE,
426 PG_LEVEL_4K,
427 PG_LEVEL_2M,
428 PG_LEVEL_1G,
429 PG_LEVEL_NUM
430};
431
432#ifdef CONFIG_PROC_FS
433extern void update_page_count(int level, unsigned long pages);
434#else
435static inline void update_page_count(int level, unsigned long pages) { }
436#endif
437
438/*
439 * Helper function that returns the kernel pagetable entry controlling
440 * the virtual address 'address'. NULL means no pagetable entry present.
441 * NOTE: the return type is pte_t but if the pmd is PSE then we return it
442 * as a pte too.
443 */
444extern pte_t *lookup_address(unsigned long address, unsigned int *level);
445
446/* local pte updates need not use xchg for locking */
447static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
448{
449 pte_t res = *ptep;
450
451 /* Pure native function needs no input for mm, addr */
452 native_pte_clear(NULL, 0, ptep);
453 return res;
454}
455
456static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr,
457 pte_t *ptep , pte_t pte)
458{
459 native_set_pte(ptep, pte);
460}
461
462#ifndef CONFIG_PARAVIRT
463/*
464 * Rules for using pte_update - it must be called after any PTE update which
465 * has not been done using the set_pte / clear_pte interfaces. It is used by
466 * shadow mode hypervisors to resynchronize the shadow page tables. Kernel PTE
467 * updates should either be sets, clears, or set_pte_atomic for P->P
468 * transitions, which means this hook should only be called for user PTEs.
469 * This hook implies a P->P protection or access change has taken place, which
470 * requires a subsequent TLB flush. The notification can optionally be delayed
471 * until the TLB flush event by using the pte_update_defer form of the
472 * interface, but care must be taken to assure that the flush happens while
473 * still holding the same page table lock so that the shadow and primary pages
474 * do not become out of sync on SMP.
475 */
476#define pte_update(mm, addr, ptep) do { } while (0)
477#define pte_update_defer(mm, addr, ptep) do { } while (0)
478#endif
479
480/*
481 * We only update the dirty/accessed state if we set
482 * the dirty bit by hand in the kernel, since the hardware
483 * will do the accessed bit for us, and we don't want to
484 * race with other CPU's that might be updating the dirty
485 * bit at the same time.
486 */
487struct vm_area_struct;
488
489#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
490extern int ptep_set_access_flags(struct vm_area_struct *vma,
491 unsigned long address, pte_t *ptep,
492 pte_t entry, int dirty);
493
494#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
495extern int ptep_test_and_clear_young(struct vm_area_struct *vma,
496 unsigned long addr, pte_t *ptep);
497
498#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
499extern int ptep_clear_flush_young(struct vm_area_struct *vma,
500 unsigned long address, pte_t *ptep);
501
502#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
503static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
504 pte_t *ptep)
505{
506 pte_t pte = native_ptep_get_and_clear(ptep);
507 pte_update(mm, addr, ptep);
508 return pte;
509}
510
511#define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
512static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm,
513 unsigned long addr, pte_t *ptep,
514 int full)
515{
516 pte_t pte;
517 if (full) {
518 /*
519 * Full address destruction in progress; paravirt does not
520 * care about updates and native needs no locking
521 */
522 pte = native_local_ptep_get_and_clear(ptep);
523 } else {
524 pte = ptep_get_and_clear(mm, addr, ptep);
525 }
526 return pte;
527}
528
529#define __HAVE_ARCH_PTEP_SET_WRPROTECT
530static inline void ptep_set_wrprotect(struct mm_struct *mm,
531 unsigned long addr, pte_t *ptep)
532{
533 clear_bit(_PAGE_BIT_RW, (unsigned long *)&ptep->pte);
534 pte_update(mm, addr, ptep);
535}
536
537/*
538 * clone_pgd_range(pgd_t *dst, pgd_t *src, int count);
539 *
540 * dst - pointer to pgd range anwhere on a pgd page
541 * src - ""
542 * count - the number of pgds to copy.
543 *
544 * dst and src can be on the same page, but the range must not overlap,
545 * and must not cross a page boundary.
546 */
547static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count)
548{
549 memcpy(dst, src, count * sizeof(pgd_t));
550}
551
552
553#include <asm-generic/pgtable.h>
554#endif /* __ASSEMBLY__ */
555
556#endif /* ASM_X86__PGTABLE_H */
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
deleted file mode 100644
index 8de702dc7d62..000000000000
--- a/include/asm-x86/pgtable_32.h
+++ /dev/null
@@ -1,191 +0,0 @@
1#ifndef ASM_X86__PGTABLE_32_H
2#define ASM_X86__PGTABLE_32_H
3
4
5/*
6 * The Linux memory management assumes a three-level page table setup. On
7 * the i386, we use that, but "fold" the mid level into the top-level page
8 * table, so that we physically have the same two-level page table as the
9 * i386 mmu expects.
10 *
11 * This file contains the functions and defines necessary to modify and use
12 * the i386 page table tree.
13 */
14#ifndef __ASSEMBLY__
15#include <asm/processor.h>
16#include <asm/fixmap.h>
17#include <linux/threads.h>
18#include <asm/paravirt.h>
19
20#include <linux/bitops.h>
21#include <linux/slab.h>
22#include <linux/list.h>
23#include <linux/spinlock.h>
24
25struct mm_struct;
26struct vm_area_struct;
27
28extern pgd_t swapper_pg_dir[1024];
29
30static inline void pgtable_cache_init(void) { }
31static inline void check_pgt_cache(void) { }
32void paging_init(void);
33
34extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
35
36/*
37 * The Linux x86 paging architecture is 'compile-time dual-mode', it
38 * implements both the traditional 2-level x86 page tables and the
39 * newer 3-level PAE-mode page tables.
40 */
41#ifdef CONFIG_X86_PAE
42# include <asm/pgtable-3level-defs.h>
43# define PMD_SIZE (1UL << PMD_SHIFT)
44# define PMD_MASK (~(PMD_SIZE - 1))
45#else
46# include <asm/pgtable-2level-defs.h>
47#endif
48
49#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
50#define PGDIR_MASK (~(PGDIR_SIZE - 1))
51
52/* Just any arbitrary offset to the start of the vmalloc VM area: the
53 * current 8MB value just means that there will be a 8MB "hole" after the
54 * physical memory until the kernel virtual memory starts. That means that
55 * any out-of-bounds memory accesses will hopefully be caught.
56 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
57 * area for the same reason. ;)
58 */
59#define VMALLOC_OFFSET (8 * 1024 * 1024)
60#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
61#ifdef CONFIG_X86_PAE
62#define LAST_PKMAP 512
63#else
64#define LAST_PKMAP 1024
65#endif
66
67#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \
68 & PMD_MASK)
69
70#ifdef CONFIG_HIGHMEM
71# define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)
72#else
73# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE)
74#endif
75
76#define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)
77
78/*
79 * Define this if things work differently on an i386 and an i486:
80 * it will (on an i486) warn about kernel memory accesses that are
81 * done without a 'access_ok(VERIFY_WRITE,..)'
82 */
83#undef TEST_ACCESS_OK
84
85/* The boot page tables (all created as a single array) */
86extern unsigned long pg0[];
87
88#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
89
90/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
91#define pmd_none(x) (!(unsigned long)pmd_val((x)))
92#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT)
93#define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
94
95#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
96
97#ifdef CONFIG_X86_PAE
98# include <asm/pgtable-3level.h>
99#else
100# include <asm/pgtable-2level.h>
101#endif
102
103/*
104 * Macro to mark a page protection value as "uncacheable".
105 * On processors which do not support it, this is a no-op.
106 */
107#define pgprot_noncached(prot) \
108 ((boot_cpu_data.x86 > 3) \
109 ? (__pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT)) \
110 : (prot))
111
112/*
113 * Conversion functions: convert a page and protection to a page entry,
114 * and a page entry and page directory to the page they refer to.
115 */
116#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
117
118
119static inline int pud_large(pud_t pud) { return 0; }
120
121/*
122 * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD]
123 *
124 * this macro returns the index of the entry in the pmd page which would
125 * control the given virtual address
126 */
127#define pmd_index(address) \
128 (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
129
130/*
131 * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
132 *
133 * this macro returns the index of the entry in the pte page which would
134 * control the given virtual address
135 */
136#define pte_index(address) \
137 (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
138#define pte_offset_kernel(dir, address) \
139 ((pte_t *)pmd_page_vaddr(*(dir)) + pte_index((address)))
140
141#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
142
143#define pmd_page_vaddr(pmd) \
144 ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK))
145
146#if defined(CONFIG_HIGHPTE)
147#define pte_offset_map(dir, address) \
148 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \
149 pte_index((address)))
150#define pte_offset_map_nested(dir, address) \
151 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE1) + \
152 pte_index((address)))
153#define pte_unmap(pte) kunmap_atomic((pte), KM_PTE0)
154#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1)
155#else
156#define pte_offset_map(dir, address) \
157 ((pte_t *)page_address(pmd_page(*(dir))) + pte_index((address)))
158#define pte_offset_map_nested(dir, address) pte_offset_map((dir), (address))
159#define pte_unmap(pte) do { } while (0)
160#define pte_unmap_nested(pte) do { } while (0)
161#endif
162
163/* Clear a kernel PTE and flush it from the TLB */
164#define kpte_clear_flush(ptep, vaddr) \
165do { \
166 pte_clear(&init_mm, (vaddr), (ptep)); \
167 __flush_tlb_one((vaddr)); \
168} while (0)
169
170/*
171 * The i386 doesn't have any external MMU info: the kernel page
172 * tables contain all the necessary information.
173 */
174#define update_mmu_cache(vma, address, pte) do { } while (0)
175
176#endif /* !__ASSEMBLY__ */
177
178/*
179 * kern_addr_valid() is (1) for FLATMEM and (0) for
180 * SPARSEMEM and DISCONTIGMEM
181 */
182#ifdef CONFIG_FLATMEM
183#define kern_addr_valid(addr) (1)
184#else
185#define kern_addr_valid(kaddr) (0)
186#endif
187
188#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
189 remap_pfn_range(vma, vaddr, pfn, size, prot)
190
191#endif /* ASM_X86__PGTABLE_32_H */
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
deleted file mode 100644
index fde9770e53d1..000000000000
--- a/include/asm-x86/pgtable_64.h
+++ /dev/null
@@ -1,285 +0,0 @@
1#ifndef ASM_X86__PGTABLE_64_H
2#define ASM_X86__PGTABLE_64_H
3
4#include <linux/const.h>
5#ifndef __ASSEMBLY__
6
7/*
8 * This file contains the functions and defines necessary to modify and use
9 * the x86-64 page table tree.
10 */
11#include <asm/processor.h>
12#include <linux/bitops.h>
13#include <linux/threads.h>
14#include <asm/pda.h>
15
16extern pud_t level3_kernel_pgt[512];
17extern pud_t level3_ident_pgt[512];
18extern pmd_t level2_kernel_pgt[512];
19extern pmd_t level2_fixmap_pgt[512];
20extern pmd_t level2_ident_pgt[512];
21extern pgd_t init_level4_pgt[];
22
23#define swapper_pg_dir init_level4_pgt
24
25extern void paging_init(void);
26
27#endif /* !__ASSEMBLY__ */
28
29#define SHARED_KERNEL_PMD 0
30
31/*
32 * PGDIR_SHIFT determines what a top-level page table entry can map
33 */
34#define PGDIR_SHIFT 39
35#define PTRS_PER_PGD 512
36
37/*
38 * 3rd level page
39 */
40#define PUD_SHIFT 30
41#define PTRS_PER_PUD 512
42
43/*
44 * PMD_SHIFT determines the size of the area a middle-level
45 * page table can map
46 */
47#define PMD_SHIFT 21
48#define PTRS_PER_PMD 512
49
50/*
51 * entries per page directory level
52 */
53#define PTRS_PER_PTE 512
54
55#ifndef __ASSEMBLY__
56
57#define pte_ERROR(e) \
58 printk("%s:%d: bad pte %p(%016lx).\n", \
59 __FILE__, __LINE__, &(e), pte_val(e))
60#define pmd_ERROR(e) \
61 printk("%s:%d: bad pmd %p(%016lx).\n", \
62 __FILE__, __LINE__, &(e), pmd_val(e))
63#define pud_ERROR(e) \
64 printk("%s:%d: bad pud %p(%016lx).\n", \
65 __FILE__, __LINE__, &(e), pud_val(e))
66#define pgd_ERROR(e) \
67 printk("%s:%d: bad pgd %p(%016lx).\n", \
68 __FILE__, __LINE__, &(e), pgd_val(e))
69
70#define pgd_none(x) (!pgd_val(x))
71#define pud_none(x) (!pud_val(x))
72
73struct mm_struct;
74
75void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte);
76
77
78static inline void native_pte_clear(struct mm_struct *mm, unsigned long addr,
79 pte_t *ptep)
80{
81 *ptep = native_make_pte(0);
82}
83
84static inline void native_set_pte(pte_t *ptep, pte_t pte)
85{
86 *ptep = pte;
87}
88
89static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte)
90{
91 native_set_pte(ptep, pte);
92}
93
94static inline pte_t native_ptep_get_and_clear(pte_t *xp)
95{
96#ifdef CONFIG_SMP
97 return native_make_pte(xchg(&xp->pte, 0));
98#else
99 /* native_local_ptep_get_and_clear,
100 but duplicated because of cyclic dependency */
101 pte_t ret = *xp;
102 native_pte_clear(NULL, 0, xp);
103 return ret;
104#endif
105}
106
107static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd)
108{
109 *pmdp = pmd;
110}
111
112static inline void native_pmd_clear(pmd_t *pmd)
113{
114 native_set_pmd(pmd, native_make_pmd(0));
115}
116
117static inline void native_set_pud(pud_t *pudp, pud_t pud)
118{
119 *pudp = pud;
120}
121
122static inline void native_pud_clear(pud_t *pud)
123{
124 native_set_pud(pud, native_make_pud(0));
125}
126
127static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd)
128{
129 *pgdp = pgd;
130}
131
132static inline void native_pgd_clear(pgd_t *pgd)
133{
134 native_set_pgd(pgd, native_make_pgd(0));
135}
136
137#define pte_same(a, b) ((a).pte == (b).pte)
138
139#endif /* !__ASSEMBLY__ */
140
141#define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
142#define PMD_MASK (~(PMD_SIZE - 1))
143#define PUD_SIZE (_AC(1, UL) << PUD_SHIFT)
144#define PUD_MASK (~(PUD_SIZE - 1))
145#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
146#define PGDIR_MASK (~(PGDIR_SIZE - 1))
147
148
149#define MAXMEM _AC(0x00003fffffffffff, UL)
150#define VMALLOC_START _AC(0xffffc20000000000, UL)
151#define VMALLOC_END _AC(0xffffe1ffffffffff, UL)
152#define VMEMMAP_START _AC(0xffffe20000000000, UL)
153#define MODULES_VADDR _AC(0xffffffffa0000000, UL)
154#define MODULES_END _AC(0xffffffffff000000, UL)
155#define MODULES_LEN (MODULES_END - MODULES_VADDR)
156
157#ifndef __ASSEMBLY__
158
159static inline int pgd_bad(pgd_t pgd)
160{
161 return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
162}
163
164static inline int pud_bad(pud_t pud)
165{
166 return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
167}
168
169static inline int pmd_bad(pmd_t pmd)
170{
171 return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
172}
173
174#define pte_none(x) (!pte_val((x)))
175#define pte_present(x) (pte_val((x)) & (_PAGE_PRESENT | _PAGE_PROTNONE))
176
177#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) /* FIXME: is this right? */
178
179/*
180 * Macro to mark a page protection value as "uncacheable".
181 */
182#define pgprot_noncached(prot) \
183 (__pgprot(pgprot_val((prot)) | _PAGE_PCD | _PAGE_PWT))
184
185/*
186 * Conversion functions: convert a page and protection to a page entry,
187 * and a page entry and page directory to the page they refer to.
188 */
189
190/*
191 * Level 4 access.
192 */
193#define pgd_page_vaddr(pgd) \
194 ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_PFN_MASK))
195#define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT))
196#define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT)
197static inline int pgd_large(pgd_t pgd) { return 0; }
198#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)
199
200/* PUD - Level3 access */
201/* to find an entry in a page-table-directory. */
202#define pud_page_vaddr(pud) \
203 ((unsigned long)__va(pud_val((pud)) & PHYSICAL_PAGE_MASK))
204#define pud_page(pud) (pfn_to_page(pud_val((pud)) >> PAGE_SHIFT))
205#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
206#define pud_offset(pgd, address) \
207 ((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address)))
208#define pud_present(pud) (pud_val((pud)) & _PAGE_PRESENT)
209
210static inline int pud_large(pud_t pte)
211{
212 return (pud_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
213 (_PAGE_PSE | _PAGE_PRESENT);
214}
215
216/* PMD - Level 2 access */
217#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK))
218#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
219
220#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
221#define pmd_offset(dir, address) ((pmd_t *)pud_page_vaddr(*(dir)) + \
222 pmd_index(address))
223#define pmd_none(x) (!pmd_val((x)))
224#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT)
225#define pfn_pmd(nr, prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val((prot))))
226#define pmd_pfn(x) ((pmd_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT)
227
228#define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
229#define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \
230 _PAGE_FILE })
231#define PTE_FILE_MAX_BITS __PHYSICAL_MASK_SHIFT
232
233/* PTE - Level 1 access. */
234
235/* page, protection -> pte */
236#define mk_pte(page, pgprot) pfn_pte(page_to_pfn((page)), (pgprot))
237
238#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
239#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \
240 pte_index((address)))
241
242/* x86-64 always has all page tables mapped. */
243#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
244#define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address))
245#define pte_unmap(pte) /* NOP */
246#define pte_unmap_nested(pte) /* NOP */
247
248#define update_mmu_cache(vma, address, pte) do { } while (0)
249
250extern int direct_gbpages;
251
252/* Encode and de-code a swap entry */
253#define __swp_type(x) (((x).val >> 1) & 0x3f)
254#define __swp_offset(x) ((x).val >> 8)
255#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | \
256 ((offset) << 8) })
257#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val((pte)) })
258#define __swp_entry_to_pte(x) ((pte_t) { .pte = (x).val })
259
260extern int kern_addr_valid(unsigned long addr);
261extern void cleanup_highmap(void);
262
263#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
264 remap_pfn_range(vma, vaddr, pfn, size, prot)
265
266#define HAVE_ARCH_UNMAPPED_AREA
267#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
268
269#define pgtable_cache_init() do { } while (0)
270#define check_pgt_cache() do { } while (0)
271
272#define PAGE_AGP PAGE_KERNEL_NOCACHE
273#define HAVE_PAGE_AGP 1
274
275/* fs/proc/kcore.c */
276#define kc_vaddr_to_offset(v) ((v) & __VIRTUAL_MASK)
277#define kc_offset_to_vaddr(o) \
278 (((o) & (1UL << (__VIRTUAL_MASK_SHIFT - 1))) \
279 ? ((o) | ~__VIRTUAL_MASK) \
280 : (o))
281
282#define __HAVE_ARCH_PTE_SAME
283#endif /* !__ASSEMBLY__ */
284
285#endif /* ASM_X86__PGTABLE_64_H */
diff --git a/include/asm-x86/poll.h b/include/asm-x86/poll.h
deleted file mode 100644
index c98509d3149e..000000000000
--- a/include/asm-x86/poll.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/poll.h>
diff --git a/include/asm-x86/posix_types.h b/include/asm-x86/posix_types.h
deleted file mode 100644
index bb7133dc155d..000000000000
--- a/include/asm-x86/posix_types.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifdef __KERNEL__
2# ifdef CONFIG_X86_32
3# include "posix_types_32.h"
4# else
5# include "posix_types_64.h"
6# endif
7#else
8# ifdef __i386__
9# include "posix_types_32.h"
10# else
11# include "posix_types_64.h"
12# endif
13#endif
diff --git a/include/asm-x86/posix_types_32.h b/include/asm-x86/posix_types_32.h
deleted file mode 100644
index 70cf2bb05939..000000000000
--- a/include/asm-x86/posix_types_32.h
+++ /dev/null
@@ -1,85 +0,0 @@
1#ifndef ASM_X86__POSIX_TYPES_32_H
2#define ASM_X86__POSIX_TYPES_32_H
3
4/*
5 * This file is generally used by user-level software, so you need to
6 * be a little careful about namespace pollution etc. Also, we cannot
7 * assume GCC is being used.
8 */
9
10typedef unsigned long __kernel_ino_t;
11typedef unsigned short __kernel_mode_t;
12typedef unsigned short __kernel_nlink_t;
13typedef long __kernel_off_t;
14typedef int __kernel_pid_t;
15typedef unsigned short __kernel_ipc_pid_t;
16typedef unsigned short __kernel_uid_t;
17typedef unsigned short __kernel_gid_t;
18typedef unsigned int __kernel_size_t;
19typedef int __kernel_ssize_t;
20typedef int __kernel_ptrdiff_t;
21typedef long __kernel_time_t;
22typedef long __kernel_suseconds_t;
23typedef long __kernel_clock_t;
24typedef int __kernel_timer_t;
25typedef int __kernel_clockid_t;
26typedef int __kernel_daddr_t;
27typedef char * __kernel_caddr_t;
28typedef unsigned short __kernel_uid16_t;
29typedef unsigned short __kernel_gid16_t;
30typedef unsigned int __kernel_uid32_t;
31typedef unsigned int __kernel_gid32_t;
32
33typedef unsigned short __kernel_old_uid_t;
34typedef unsigned short __kernel_old_gid_t;
35typedef unsigned short __kernel_old_dev_t;
36
37#ifdef __GNUC__
38typedef long long __kernel_loff_t;
39#endif
40
41typedef struct {
42 int val[2];
43} __kernel_fsid_t;
44
45#if defined(__KERNEL__)
46
47#undef __FD_SET
48#define __FD_SET(fd,fdsetp) \
49 asm volatile("btsl %1,%0": \
50 "+m" (*(__kernel_fd_set *)(fdsetp)) \
51 : "r" ((int)(fd)))
52
53#undef __FD_CLR
54#define __FD_CLR(fd,fdsetp) \
55 asm volatile("btrl %1,%0": \
56 "+m" (*(__kernel_fd_set *)(fdsetp)) \
57 : "r" ((int) (fd)))
58
59#undef __FD_ISSET
60#define __FD_ISSET(fd,fdsetp) \
61 (__extension__ \
62 ({ \
63 unsigned char __result; \
64 asm volatile("btl %1,%2 ; setb %0" \
65 : "=q" (__result) \
66 : "r" ((int)(fd)), \
67 "m" (*(__kernel_fd_set *)(fdsetp))); \
68 __result; \
69}))
70
71#undef __FD_ZERO
72#define __FD_ZERO(fdsetp) \
73do { \
74 int __d0, __d1; \
75 asm volatile("cld ; rep ; stosl" \
76 : "=m" (*(__kernel_fd_set *)(fdsetp)), \
77 "=&c" (__d0), "=&D" (__d1) \
78 : "a" (0), "1" (__FDSET_LONGS), \
79 "2" ((__kernel_fd_set *)(fdsetp)) \
80 : "memory"); \
81} while (0)
82
83#endif /* defined(__KERNEL__) */
84
85#endif /* ASM_X86__POSIX_TYPES_32_H */
diff --git a/include/asm-x86/posix_types_64.h b/include/asm-x86/posix_types_64.h
deleted file mode 100644
index 388b4e7f4a44..000000000000
--- a/include/asm-x86/posix_types_64.h
+++ /dev/null
@@ -1,119 +0,0 @@
1#ifndef ASM_X86__POSIX_TYPES_64_H
2#define ASM_X86__POSIX_TYPES_64_H
3
4/*
5 * This file is generally used by user-level software, so you need to
6 * be a little careful about namespace pollution etc. Also, we cannot
7 * assume GCC is being used.
8 */
9
10typedef unsigned long __kernel_ino_t;
11typedef unsigned int __kernel_mode_t;
12typedef unsigned long __kernel_nlink_t;
13typedef long __kernel_off_t;
14typedef int __kernel_pid_t;
15typedef int __kernel_ipc_pid_t;
16typedef unsigned int __kernel_uid_t;
17typedef unsigned int __kernel_gid_t;
18typedef unsigned long __kernel_size_t;
19typedef long __kernel_ssize_t;
20typedef long __kernel_ptrdiff_t;
21typedef long __kernel_time_t;
22typedef long __kernel_suseconds_t;
23typedef long __kernel_clock_t;
24typedef int __kernel_timer_t;
25typedef int __kernel_clockid_t;
26typedef int __kernel_daddr_t;
27typedef char * __kernel_caddr_t;
28typedef unsigned short __kernel_uid16_t;
29typedef unsigned short __kernel_gid16_t;
30
31#ifdef __GNUC__
32typedef long long __kernel_loff_t;
33#endif
34
35typedef struct {
36 int val[2];
37} __kernel_fsid_t;
38
39typedef unsigned short __kernel_old_uid_t;
40typedef unsigned short __kernel_old_gid_t;
41typedef __kernel_uid_t __kernel_uid32_t;
42typedef __kernel_gid_t __kernel_gid32_t;
43
44typedef unsigned long __kernel_old_dev_t;
45
46#ifdef __KERNEL__
47
48#undef __FD_SET
49static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
50{
51 unsigned long _tmp = fd / __NFDBITS;
52 unsigned long _rem = fd % __NFDBITS;
53 fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
54}
55
56#undef __FD_CLR
57static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
58{
59 unsigned long _tmp = fd / __NFDBITS;
60 unsigned long _rem = fd % __NFDBITS;
61 fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
62}
63
64#undef __FD_ISSET
65static inline int __FD_ISSET(unsigned long fd, __const__ __kernel_fd_set *p)
66{
67 unsigned long _tmp = fd / __NFDBITS;
68 unsigned long _rem = fd % __NFDBITS;
69 return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
70}
71
72/*
73 * This will unroll the loop for the normal constant cases (8 or 32 longs,
74 * for 256 and 1024-bit fd_sets respectively)
75 */
76#undef __FD_ZERO
77static inline void __FD_ZERO(__kernel_fd_set *p)
78{
79 unsigned long *tmp = p->fds_bits;
80 int i;
81
82 if (__builtin_constant_p(__FDSET_LONGS)) {
83 switch (__FDSET_LONGS) {
84 case 32:
85 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
86 tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
87 tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
88 tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
89 tmp[16] = 0; tmp[17] = 0; tmp[18] = 0; tmp[19] = 0;
90 tmp[20] = 0; tmp[21] = 0; tmp[22] = 0; tmp[23] = 0;
91 tmp[24] = 0; tmp[25] = 0; tmp[26] = 0; tmp[27] = 0;
92 tmp[28] = 0; tmp[29] = 0; tmp[30] = 0; tmp[31] = 0;
93 return;
94 case 16:
95 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
96 tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
97 tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0;
98 tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0;
99 return;
100 case 8:
101 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
102 tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0;
103 return;
104 case 4:
105 tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0;
106 return;
107 }
108 }
109 i = __FDSET_LONGS;
110 while (i) {
111 i--;
112 *tmp = 0;
113 tmp++;
114 }
115}
116
117#endif /* defined(__KERNEL__) */
118
119#endif /* ASM_X86__POSIX_TYPES_64_H */
diff --git a/include/asm-x86/prctl.h b/include/asm-x86/prctl.h
deleted file mode 100644
index e7ae34eb4103..000000000000
--- a/include/asm-x86/prctl.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef ASM_X86__PRCTL_H
2#define ASM_X86__PRCTL_H
3
4#define ARCH_SET_GS 0x1001
5#define ARCH_SET_FS 0x1002
6#define ARCH_GET_FS 0x1003
7#define ARCH_GET_GS 0x1004
8
9
10#endif /* ASM_X86__PRCTL_H */
diff --git a/include/asm-x86/processor-cyrix.h b/include/asm-x86/processor-cyrix.h
deleted file mode 100644
index 1198f2a0e42c..000000000000
--- a/include/asm-x86/processor-cyrix.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * NSC/Cyrix CPU indexed register access. Must be inlined instead of
3 * macros to ensure correct access ordering
4 * Access order is always 0x22 (=offset), 0x23 (=value)
5 *
6 * When using the old macros a line like
7 * setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
8 * gets expanded to:
9 * do {
10 * outb((CX86_CCR2), 0x22);
11 * outb((({
12 * outb((CX86_CCR2), 0x22);
13 * inb(0x23);
14 * }) | 0x88), 0x23);
15 * } while (0);
16 *
17 * which in fact violates the access order (= 0x22, 0x22, 0x23, 0x23).
18 */
19
20static inline u8 getCx86(u8 reg)
21{
22 outb(reg, 0x22);
23 return inb(0x23);
24}
25
26static inline void setCx86(u8 reg, u8 data)
27{
28 outb(reg, 0x22);
29 outb(data, 0x23);
30}
31
32#define getCx86_old(reg) ({ outb((reg), 0x22); inb(0x23); })
33
34#define setCx86_old(reg, data) do { \
35 outb((reg), 0x22); \
36 outb((data), 0x23); \
37} while (0)
38
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h
deleted file mode 100644
index dc5f0712f9fa..000000000000
--- a/include/asm-x86/processor-flags.h
+++ /dev/null
@@ -1,100 +0,0 @@
1#ifndef ASM_X86__PROCESSOR_FLAGS_H
2#define ASM_X86__PROCESSOR_FLAGS_H
3/* Various flags defined: can be included from assembler. */
4
5/*
6 * EFLAGS bits
7 */
8#define X86_EFLAGS_CF 0x00000001 /* Carry Flag */
9#define X86_EFLAGS_PF 0x00000004 /* Parity Flag */
10#define X86_EFLAGS_AF 0x00000010 /* Auxillary carry Flag */
11#define X86_EFLAGS_ZF 0x00000040 /* Zero Flag */
12#define X86_EFLAGS_SF 0x00000080 /* Sign Flag */
13#define X86_EFLAGS_TF 0x00000100 /* Trap Flag */
14#define X86_EFLAGS_IF 0x00000200 /* Interrupt Flag */
15#define X86_EFLAGS_DF 0x00000400 /* Direction Flag */
16#define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */
17#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */
18#define X86_EFLAGS_NT 0x00004000 /* Nested Task */
19#define X86_EFLAGS_RF 0x00010000 /* Resume Flag */
20#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
21#define X86_EFLAGS_AC 0x00040000 /* Alignment Check */
22#define X86_EFLAGS_VIF 0x00080000 /* Virtual Interrupt Flag */
23#define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */
24#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
25
26/*
27 * Basic CPU control in CR0
28 */
29#define X86_CR0_PE 0x00000001 /* Protection Enable */
30#define X86_CR0_MP 0x00000002 /* Monitor Coprocessor */
31#define X86_CR0_EM 0x00000004 /* Emulation */
32#define X86_CR0_TS 0x00000008 /* Task Switched */
33#define X86_CR0_ET 0x00000010 /* Extension Type */
34#define X86_CR0_NE 0x00000020 /* Numeric Error */
35#define X86_CR0_WP 0x00010000 /* Write Protect */
36#define X86_CR0_AM 0x00040000 /* Alignment Mask */
37#define X86_CR0_NW 0x20000000 /* Not Write-through */
38#define X86_CR0_CD 0x40000000 /* Cache Disable */
39#define X86_CR0_PG 0x80000000 /* Paging */
40
41/*
42 * Paging options in CR3
43 */
44#define X86_CR3_PWT 0x00000008 /* Page Write Through */
45#define X86_CR3_PCD 0x00000010 /* Page Cache Disable */
46
47/*
48 * Intel CPU features in CR4
49 */
50#define X86_CR4_VME 0x00000001 /* enable vm86 extensions */
51#define X86_CR4_PVI 0x00000002 /* virtual interrupts flag enable */
52#define X86_CR4_TSD 0x00000004 /* disable time stamp at ipl 3 */
53#define X86_CR4_DE 0x00000008 /* enable debugging extensions */
54#define X86_CR4_PSE 0x00000010 /* enable page size extensions */
55#define X86_CR4_PAE 0x00000020 /* enable physical address extensions */
56#define X86_CR4_MCE 0x00000040 /* Machine check enable */
57#define X86_CR4_PGE 0x00000080 /* enable global pages */
58#define X86_CR4_PCE 0x00000100 /* enable performance counters at ipl 3 */
59#define X86_CR4_OSFXSR 0x00000200 /* enable fast FPU save and restore */
60#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable unmasked SSE exceptions */
61#define X86_CR4_VMXE 0x00002000 /* enable VMX virtualization */
62#define X86_CR4_OSXSAVE 0x00040000 /* enable xsave and xrestore */
63
64/*
65 * x86-64 Task Priority Register, CR8
66 */
67#define X86_CR8_TPR 0x0000000F /* task priority register */
68
69/*
70 * AMD and Transmeta use MSRs for configuration; see <asm/msr-index.h>
71 */
72
73/*
74 * NSC/Cyrix CPU configuration register indexes
75 */
76#define CX86_PCR0 0x20
77#define CX86_GCR 0xb8
78#define CX86_CCR0 0xc0
79#define CX86_CCR1 0xc1
80#define CX86_CCR2 0xc2
81#define CX86_CCR3 0xc3
82#define CX86_CCR4 0xe8
83#define CX86_CCR5 0xe9
84#define CX86_CCR6 0xea
85#define CX86_CCR7 0xeb
86#define CX86_PCR1 0xf0
87#define CX86_DIR0 0xfe
88#define CX86_DIR1 0xff
89#define CX86_ARR_BASE 0xc4
90#define CX86_RCR_BASE 0xdc
91
92#ifdef __KERNEL__
93#ifdef CONFIG_VM86
94#define X86_VM_MASK X86_EFLAGS_VM
95#else
96#define X86_VM_MASK 0 /* No VM86 support */
97#endif
98#endif
99
100#endif /* ASM_X86__PROCESSOR_FLAGS_H */
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
deleted file mode 100644
index ee7cbb30773a..000000000000
--- a/include/asm-x86/processor.h
+++ /dev/null
@@ -1,936 +0,0 @@
1#ifndef ASM_X86__PROCESSOR_H
2#define ASM_X86__PROCESSOR_H
3
4#include <asm/processor-flags.h>
5
6/* Forward declaration, a strange C thing */
7struct task_struct;
8struct mm_struct;
9
10#include <asm/vm86.h>
11#include <asm/math_emu.h>
12#include <asm/segment.h>
13#include <asm/types.h>
14#include <asm/sigcontext.h>
15#include <asm/current.h>
16#include <asm/cpufeature.h>
17#include <asm/system.h>
18#include <asm/page.h>
19#include <asm/percpu.h>
20#include <asm/msr.h>
21#include <asm/desc_defs.h>
22#include <asm/nops.h>
23#include <asm/ds.h>
24
25#include <linux/personality.h>
26#include <linux/cpumask.h>
27#include <linux/cache.h>
28#include <linux/threads.h>
29#include <linux/init.h>
30
31/*
32 * Default implementation of macro that returns current
33 * instruction pointer ("program counter").
34 */
35static inline void *current_text_addr(void)
36{
37 void *pc;
38
39 asm volatile("mov $1f, %0; 1:":"=r" (pc));
40
41 return pc;
42}
43
44#ifdef CONFIG_X86_VSMP
45# define ARCH_MIN_TASKALIGN (1 << INTERNODE_CACHE_SHIFT)
46# define ARCH_MIN_MMSTRUCT_ALIGN (1 << INTERNODE_CACHE_SHIFT)
47#else
48# define ARCH_MIN_TASKALIGN 16
49# define ARCH_MIN_MMSTRUCT_ALIGN 0
50#endif
51
52/*
53 * CPU type and hardware bug flags. Kept separately for each CPU.
54 * Members of this structure are referenced in head.S, so think twice
55 * before touching them. [mj]
56 */
57
58struct cpuinfo_x86 {
59 __u8 x86; /* CPU family */
60 __u8 x86_vendor; /* CPU vendor */
61 __u8 x86_model;
62 __u8 x86_mask;
63#ifdef CONFIG_X86_32
64 char wp_works_ok; /* It doesn't on 386's */
65
66 /* Problems on some 486Dx4's and old 386's: */
67 char hlt_works_ok;
68 char hard_math;
69 char rfu;
70 char fdiv_bug;
71 char f00f_bug;
72 char coma_bug;
73 char pad0;
74#else
75 /* Number of 4K pages in DTLB/ITLB combined(in pages): */
76 int x86_tlbsize;
77 __u8 x86_virt_bits;
78 __u8 x86_phys_bits;
79#endif
80 /* CPUID returned core id bits: */
81 __u8 x86_coreid_bits;
82 /* Max extended CPUID function supported: */
83 __u32 extended_cpuid_level;
84 /* Maximum supported CPUID level, -1=no CPUID: */
85 int cpuid_level;
86 __u32 x86_capability[NCAPINTS];
87 char x86_vendor_id[16];
88 char x86_model_id[64];
89 /* in KB - valid for CPUS which support this call: */
90 int x86_cache_size;
91 int x86_cache_alignment; /* In bytes */
92 int x86_power;
93 unsigned long loops_per_jiffy;
94#ifdef CONFIG_SMP
95 /* cpus sharing the last level cache: */
96 cpumask_t llc_shared_map;
97#endif
98 /* cpuid returned max cores value: */
99 u16 x86_max_cores;
100 u16 apicid;
101 u16 initial_apicid;
102 u16 x86_clflush_size;
103#ifdef CONFIG_SMP
104 /* number of cores as seen by the OS: */
105 u16 booted_cores;
106 /* Physical processor id: */
107 u16 phys_proc_id;
108 /* Core id: */
109 u16 cpu_core_id;
110 /* Index into per_cpu list: */
111 u16 cpu_index;
112#endif
113} __attribute__((__aligned__(SMP_CACHE_BYTES)));
114
115#define X86_VENDOR_INTEL 0
116#define X86_VENDOR_CYRIX 1
117#define X86_VENDOR_AMD 2
118#define X86_VENDOR_UMC 3
119#define X86_VENDOR_CENTAUR 5
120#define X86_VENDOR_TRANSMETA 7
121#define X86_VENDOR_NSC 8
122#define X86_VENDOR_NUM 9
123
124#define X86_VENDOR_UNKNOWN 0xff
125
126/*
127 * capabilities of CPUs
128 */
129extern struct cpuinfo_x86 boot_cpu_data;
130extern struct cpuinfo_x86 new_cpu_data;
131
132extern struct tss_struct doublefault_tss;
133extern __u32 cleared_cpu_caps[NCAPINTS];
134
135#ifdef CONFIG_SMP
136DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
137#define cpu_data(cpu) per_cpu(cpu_info, cpu)
138#define current_cpu_data __get_cpu_var(cpu_info)
139#else
140#define cpu_data(cpu) boot_cpu_data
141#define current_cpu_data boot_cpu_data
142#endif
143
144extern const struct seq_operations cpuinfo_op;
145
146static inline int hlt_works(int cpu)
147{
148#ifdef CONFIG_X86_32
149 return cpu_data(cpu).hlt_works_ok;
150#else
151 return 1;
152#endif
153}
154
155#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
156
157extern void cpu_detect(struct cpuinfo_x86 *c);
158
159extern struct pt_regs *idle_regs(struct pt_regs *);
160
161extern void early_cpu_init(void);
162extern void identify_boot_cpu(void);
163extern void identify_secondary_cpu(struct cpuinfo_x86 *);
164extern void print_cpu_info(struct cpuinfo_x86 *);
165extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
166extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
167extern unsigned short num_cache_leaves;
168
169extern void detect_extended_topology(struct cpuinfo_x86 *c);
170extern void detect_ht(struct cpuinfo_x86 *c);
171
172static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
173 unsigned int *ecx, unsigned int *edx)
174{
175 /* ecx is often an input as well as an output. */
176 asm("cpuid"
177 : "=a" (*eax),
178 "=b" (*ebx),
179 "=c" (*ecx),
180 "=d" (*edx)
181 : "0" (*eax), "2" (*ecx));
182}
183
184static inline void load_cr3(pgd_t *pgdir)
185{
186 write_cr3(__pa(pgdir));
187}
188
189#ifdef CONFIG_X86_32
190/* This is the TSS defined by the hardware. */
191struct x86_hw_tss {
192 unsigned short back_link, __blh;
193 unsigned long sp0;
194 unsigned short ss0, __ss0h;
195 unsigned long sp1;
196 /* ss1 caches MSR_IA32_SYSENTER_CS: */
197 unsigned short ss1, __ss1h;
198 unsigned long sp2;
199 unsigned short ss2, __ss2h;
200 unsigned long __cr3;
201 unsigned long ip;
202 unsigned long flags;
203 unsigned long ax;
204 unsigned long cx;
205 unsigned long dx;
206 unsigned long bx;
207 unsigned long sp;
208 unsigned long bp;
209 unsigned long si;
210 unsigned long di;
211 unsigned short es, __esh;
212 unsigned short cs, __csh;
213 unsigned short ss, __ssh;
214 unsigned short ds, __dsh;
215 unsigned short fs, __fsh;
216 unsigned short gs, __gsh;
217 unsigned short ldt, __ldth;
218 unsigned short trace;
219 unsigned short io_bitmap_base;
220
221} __attribute__((packed));
222#else
223struct x86_hw_tss {
224 u32 reserved1;
225 u64 sp0;
226 u64 sp1;
227 u64 sp2;
228 u64 reserved2;
229 u64 ist[7];
230 u32 reserved3;
231 u32 reserved4;
232 u16 reserved5;
233 u16 io_bitmap_base;
234
235} __attribute__((packed)) ____cacheline_aligned;
236#endif
237
238/*
239 * IO-bitmap sizes:
240 */
241#define IO_BITMAP_BITS 65536
242#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
243#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
244#define IO_BITMAP_OFFSET offsetof(struct tss_struct, io_bitmap)
245#define INVALID_IO_BITMAP_OFFSET 0x8000
246#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
247
248struct tss_struct {
249 /*
250 * The hardware state:
251 */
252 struct x86_hw_tss x86_tss;
253
254 /*
255 * The extra 1 is there because the CPU will access an
256 * additional byte beyond the end of the IO permission
257 * bitmap. The extra byte must be all 1 bits, and must
258 * be within the limit.
259 */
260 unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
261 /*
262 * Cache the current maximum and the last task that used the bitmap:
263 */
264 unsigned long io_bitmap_max;
265 struct thread_struct *io_bitmap_owner;
266
267 /*
268 * .. and then another 0x100 bytes for the emergency kernel stack:
269 */
270 unsigned long stack[64];
271
272} ____cacheline_aligned;
273
274DECLARE_PER_CPU(struct tss_struct, init_tss);
275
276/*
277 * Save the original ist values for checking stack pointers during debugging
278 */
279struct orig_ist {
280 unsigned long ist[7];
281};
282
283#define MXCSR_DEFAULT 0x1f80
284
285struct i387_fsave_struct {
286 u32 cwd; /* FPU Control Word */
287 u32 swd; /* FPU Status Word */
288 u32 twd; /* FPU Tag Word */
289 u32 fip; /* FPU IP Offset */
290 u32 fcs; /* FPU IP Selector */
291 u32 foo; /* FPU Operand Pointer Offset */
292 u32 fos; /* FPU Operand Pointer Selector */
293
294 /* 8*10 bytes for each FP-reg = 80 bytes: */
295 u32 st_space[20];
296
297 /* Software status information [not touched by FSAVE ]: */
298 u32 status;
299};
300
301struct i387_fxsave_struct {
302 u16 cwd; /* Control Word */
303 u16 swd; /* Status Word */
304 u16 twd; /* Tag Word */
305 u16 fop; /* Last Instruction Opcode */
306 union {
307 struct {
308 u64 rip; /* Instruction Pointer */
309 u64 rdp; /* Data Pointer */
310 };
311 struct {
312 u32 fip; /* FPU IP Offset */
313 u32 fcs; /* FPU IP Selector */
314 u32 foo; /* FPU Operand Offset */
315 u32 fos; /* FPU Operand Selector */
316 };
317 };
318 u32 mxcsr; /* MXCSR Register State */
319 u32 mxcsr_mask; /* MXCSR Mask */
320
321 /* 8*16 bytes for each FP-reg = 128 bytes: */
322 u32 st_space[32];
323
324 /* 16*16 bytes for each XMM-reg = 256 bytes: */
325 u32 xmm_space[64];
326
327 u32 padding[12];
328
329 union {
330 u32 padding1[12];
331 u32 sw_reserved[12];
332 };
333
334} __attribute__((aligned(16)));
335
336struct i387_soft_struct {
337 u32 cwd;
338 u32 swd;
339 u32 twd;
340 u32 fip;
341 u32 fcs;
342 u32 foo;
343 u32 fos;
344 /* 8*10 bytes for each FP-reg = 80 bytes: */
345 u32 st_space[20];
346 u8 ftop;
347 u8 changed;
348 u8 lookahead;
349 u8 no_update;
350 u8 rm;
351 u8 alimit;
352 struct info *info;
353 u32 entry_eip;
354};
355
356struct xsave_hdr_struct {
357 u64 xstate_bv;
358 u64 reserved1[2];
359 u64 reserved2[5];
360} __attribute__((packed));
361
362struct xsave_struct {
363 struct i387_fxsave_struct i387;
364 struct xsave_hdr_struct xsave_hdr;
365 /* new processor state extensions will go here */
366} __attribute__ ((packed, aligned (64)));
367
368union thread_xstate {
369 struct i387_fsave_struct fsave;
370 struct i387_fxsave_struct fxsave;
371 struct i387_soft_struct soft;
372 struct xsave_struct xsave;
373};
374
375#ifdef CONFIG_X86_64
376DECLARE_PER_CPU(struct orig_ist, orig_ist);
377#endif
378
379extern void print_cpu_info(struct cpuinfo_x86 *);
380extern unsigned int xstate_size;
381extern void free_thread_xstate(struct task_struct *);
382extern struct kmem_cache *task_xstate_cachep;
383extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
384extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
385extern unsigned short num_cache_leaves;
386
387struct thread_struct {
388 /* Cached TLS descriptors: */
389 struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
390 unsigned long sp0;
391 unsigned long sp;
392#ifdef CONFIG_X86_32
393 unsigned long sysenter_cs;
394#else
395 unsigned long usersp; /* Copy from PDA */
396 unsigned short es;
397 unsigned short ds;
398 unsigned short fsindex;
399 unsigned short gsindex;
400#endif
401 unsigned long ip;
402 unsigned long fs;
403 unsigned long gs;
404 /* Hardware debugging registers: */
405 unsigned long debugreg0;
406 unsigned long debugreg1;
407 unsigned long debugreg2;
408 unsigned long debugreg3;
409 unsigned long debugreg6;
410 unsigned long debugreg7;
411 /* Fault info: */
412 unsigned long cr2;
413 unsigned long trap_no;
414 unsigned long error_code;
415 /* floating point and extended processor state */
416 union thread_xstate *xstate;
417#ifdef CONFIG_X86_32
418 /* Virtual 86 mode info */
419 struct vm86_struct __user *vm86_info;
420 unsigned long screen_bitmap;
421 unsigned long v86flags;
422 unsigned long v86mask;
423 unsigned long saved_sp0;
424 unsigned int saved_fs;
425 unsigned int saved_gs;
426#endif
427 /* IO permissions: */
428 unsigned long *io_bitmap_ptr;
429 unsigned long iopl;
430 /* Max allowed port in the bitmap, in bytes: */
431 unsigned io_bitmap_max;
432/* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */
433 unsigned long debugctlmsr;
434#ifdef CONFIG_X86_DS
435/* Debug Store context; see include/asm-x86/ds.h; goes into MSR_IA32_DS_AREA */
436 struct ds_context *ds_ctx;
437#endif /* CONFIG_X86_DS */
438#ifdef CONFIG_X86_PTRACE_BTS
439/* the signal to send on a bts buffer overflow */
440 unsigned int bts_ovfl_signal;
441#endif /* CONFIG_X86_PTRACE_BTS */
442};
443
444static inline unsigned long native_get_debugreg(int regno)
445{
446 unsigned long val = 0; /* Damn you, gcc! */
447
448 switch (regno) {
449 case 0:
450 asm("mov %%db0, %0" :"=r" (val));
451 break;
452 case 1:
453 asm("mov %%db1, %0" :"=r" (val));
454 break;
455 case 2:
456 asm("mov %%db2, %0" :"=r" (val));
457 break;
458 case 3:
459 asm("mov %%db3, %0" :"=r" (val));
460 break;
461 case 6:
462 asm("mov %%db6, %0" :"=r" (val));
463 break;
464 case 7:
465 asm("mov %%db7, %0" :"=r" (val));
466 break;
467 default:
468 BUG();
469 }
470 return val;
471}
472
473static inline void native_set_debugreg(int regno, unsigned long value)
474{
475 switch (regno) {
476 case 0:
477 asm("mov %0, %%db0" ::"r" (value));
478 break;
479 case 1:
480 asm("mov %0, %%db1" ::"r" (value));
481 break;
482 case 2:
483 asm("mov %0, %%db2" ::"r" (value));
484 break;
485 case 3:
486 asm("mov %0, %%db3" ::"r" (value));
487 break;
488 case 6:
489 asm("mov %0, %%db6" ::"r" (value));
490 break;
491 case 7:
492 asm("mov %0, %%db7" ::"r" (value));
493 break;
494 default:
495 BUG();
496 }
497}
498
499/*
500 * Set IOPL bits in EFLAGS from given mask
501 */
502static inline void native_set_iopl_mask(unsigned mask)
503{
504#ifdef CONFIG_X86_32
505 unsigned int reg;
506
507 asm volatile ("pushfl;"
508 "popl %0;"
509 "andl %1, %0;"
510 "orl %2, %0;"
511 "pushl %0;"
512 "popfl"
513 : "=&r" (reg)
514 : "i" (~X86_EFLAGS_IOPL), "r" (mask));
515#endif
516}
517
518static inline void
519native_load_sp0(struct tss_struct *tss, struct thread_struct *thread)
520{
521 tss->x86_tss.sp0 = thread->sp0;
522#ifdef CONFIG_X86_32
523 /* Only happens when SEP is enabled, no need to test "SEP"arately: */
524 if (unlikely(tss->x86_tss.ss1 != thread->sysenter_cs)) {
525 tss->x86_tss.ss1 = thread->sysenter_cs;
526 wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0);
527 }
528#endif
529}
530
531static inline void native_swapgs(void)
532{
533#ifdef CONFIG_X86_64
534 asm volatile("swapgs" ::: "memory");
535#endif
536}
537
538#ifdef CONFIG_PARAVIRT
539#include <asm/paravirt.h>
540#else
541#define __cpuid native_cpuid
542#define paravirt_enabled() 0
543
544/*
545 * These special macros can be used to get or set a debugging register
546 */
547#define get_debugreg(var, register) \
548 (var) = native_get_debugreg(register)
549#define set_debugreg(value, register) \
550 native_set_debugreg(register, value)
551
552static inline void load_sp0(struct tss_struct *tss,
553 struct thread_struct *thread)
554{
555 native_load_sp0(tss, thread);
556}
557
558#define set_iopl_mask native_set_iopl_mask
559#endif /* CONFIG_PARAVIRT */
560
561/*
562 * Save the cr4 feature set we're using (ie
563 * Pentium 4MB enable and PPro Global page
564 * enable), so that any CPU's that boot up
565 * after us can get the correct flags.
566 */
567extern unsigned long mmu_cr4_features;
568
569static inline void set_in_cr4(unsigned long mask)
570{
571 unsigned cr4;
572
573 mmu_cr4_features |= mask;
574 cr4 = read_cr4();
575 cr4 |= mask;
576 write_cr4(cr4);
577}
578
579static inline void clear_in_cr4(unsigned long mask)
580{
581 unsigned cr4;
582
583 mmu_cr4_features &= ~mask;
584 cr4 = read_cr4();
585 cr4 &= ~mask;
586 write_cr4(cr4);
587}
588
589typedef struct {
590 unsigned long seg;
591} mm_segment_t;
592
593
594/*
595 * create a kernel thread without removing it from tasklists
596 */
597extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
598
599/* Free all resources held by a thread. */
600extern void release_thread(struct task_struct *);
601
602/* Prepare to copy thread state - unlazy all lazy state */
603extern void prepare_to_copy(struct task_struct *tsk);
604
605unsigned long get_wchan(struct task_struct *p);
606
607/*
608 * Generic CPUID function
609 * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
610 * resulting in stale register contents being returned.
611 */
612static inline void cpuid(unsigned int op,
613 unsigned int *eax, unsigned int *ebx,
614 unsigned int *ecx, unsigned int *edx)
615{
616 *eax = op;
617 *ecx = 0;
618 __cpuid(eax, ebx, ecx, edx);
619}
620
621/* Some CPUID calls want 'count' to be placed in ecx */
622static inline void cpuid_count(unsigned int op, int count,
623 unsigned int *eax, unsigned int *ebx,
624 unsigned int *ecx, unsigned int *edx)
625{
626 *eax = op;
627 *ecx = count;
628 __cpuid(eax, ebx, ecx, edx);
629}
630
631/*
632 * CPUID functions returning a single datum
633 */
634static inline unsigned int cpuid_eax(unsigned int op)
635{
636 unsigned int eax, ebx, ecx, edx;
637
638 cpuid(op, &eax, &ebx, &ecx, &edx);
639
640 return eax;
641}
642
643static inline unsigned int cpuid_ebx(unsigned int op)
644{
645 unsigned int eax, ebx, ecx, edx;
646
647 cpuid(op, &eax, &ebx, &ecx, &edx);
648
649 return ebx;
650}
651
652static inline unsigned int cpuid_ecx(unsigned int op)
653{
654 unsigned int eax, ebx, ecx, edx;
655
656 cpuid(op, &eax, &ebx, &ecx, &edx);
657
658 return ecx;
659}
660
661static inline unsigned int cpuid_edx(unsigned int op)
662{
663 unsigned int eax, ebx, ecx, edx;
664
665 cpuid(op, &eax, &ebx, &ecx, &edx);
666
667 return edx;
668}
669
670/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
671static inline void rep_nop(void)
672{
673 asm volatile("rep; nop" ::: "memory");
674}
675
676static inline void cpu_relax(void)
677{
678 rep_nop();
679}
680
681/* Stop speculative execution: */
682static inline void sync_core(void)
683{
684 int tmp;
685
686 asm volatile("cpuid" : "=a" (tmp) : "0" (1)
687 : "ebx", "ecx", "edx", "memory");
688}
689
690static inline void __monitor(const void *eax, unsigned long ecx,
691 unsigned long edx)
692{
693 /* "monitor %eax, %ecx, %edx;" */
694 asm volatile(".byte 0x0f, 0x01, 0xc8;"
695 :: "a" (eax), "c" (ecx), "d"(edx));
696}
697
698static inline void __mwait(unsigned long eax, unsigned long ecx)
699{
700 /* "mwait %eax, %ecx;" */
701 asm volatile(".byte 0x0f, 0x01, 0xc9;"
702 :: "a" (eax), "c" (ecx));
703}
704
705static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
706{
707 trace_hardirqs_on();
708 /* "mwait %eax, %ecx;" */
709 asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
710 :: "a" (eax), "c" (ecx));
711}
712
713extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx);
714
715extern void select_idle_routine(const struct cpuinfo_x86 *c);
716
717extern unsigned long boot_option_idle_override;
718extern unsigned long idle_halt;
719extern unsigned long idle_nomwait;
720
721/*
722 * on systems with caches, caches must be flashed as the absolute
723 * last instruction before going into a suspended halt. Otherwise,
724 * dirty data can linger in the cache and become stale on resume,
725 * leading to strange errors.
726 *
727 * perform a variety of operations to guarantee that the compiler
728 * will not reorder instructions. wbinvd itself is serializing
729 * so the processor will not reorder.
730 *
731 * Systems without cache can just go into halt.
732 */
733static inline void wbinvd_halt(void)
734{
735 mb();
736 /* check for clflush to determine if wbinvd is legal */
737 if (cpu_has_clflush)
738 asm volatile("cli; wbinvd; 1: hlt; jmp 1b" : : : "memory");
739 else
740 while (1)
741 halt();
742}
743
744extern void enable_sep_cpu(void);
745extern int sysenter_setup(void);
746
747/* Defined in head.S */
748extern struct desc_ptr early_gdt_descr;
749
750extern void cpu_set_gdt(int);
751extern void switch_to_new_gdt(void);
752extern void cpu_init(void);
753extern void init_gdt(int cpu);
754
755static inline void update_debugctlmsr(unsigned long debugctlmsr)
756{
757#ifndef CONFIG_X86_DEBUGCTLMSR
758 if (boot_cpu_data.x86 < 6)
759 return;
760#endif
761 wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr);
762}
763
764/*
765 * from system description table in BIOS. Mostly for MCA use, but
766 * others may find it useful:
767 */
768extern unsigned int machine_id;
769extern unsigned int machine_submodel_id;
770extern unsigned int BIOS_revision;
771
772/* Boot loader type from the setup header: */
773extern int bootloader_type;
774
775extern char ignore_fpu_irq;
776
777#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
778#define ARCH_HAS_PREFETCHW
779#define ARCH_HAS_SPINLOCK_PREFETCH
780
781#ifdef CONFIG_X86_32
782# define BASE_PREFETCH ASM_NOP4
783# define ARCH_HAS_PREFETCH
784#else
785# define BASE_PREFETCH "prefetcht0 (%1)"
786#endif
787
788/*
789 * Prefetch instructions for Pentium III (+) and AMD Athlon (+)
790 *
791 * It's not worth to care about 3dnow prefetches for the K6
792 * because they are microcoded there and very slow.
793 */
794static inline void prefetch(const void *x)
795{
796 alternative_input(BASE_PREFETCH,
797 "prefetchnta (%1)",
798 X86_FEATURE_XMM,
799 "r" (x));
800}
801
802/*
803 * 3dnow prefetch to get an exclusive cache line.
804 * Useful for spinlocks to avoid one state transition in the
805 * cache coherency protocol:
806 */
807static inline void prefetchw(const void *x)
808{
809 alternative_input(BASE_PREFETCH,
810 "prefetchw (%1)",
811 X86_FEATURE_3DNOW,
812 "r" (x));
813}
814
815static inline void spin_lock_prefetch(const void *x)
816{
817 prefetchw(x);
818}
819
820#ifdef CONFIG_X86_32
821/*
822 * User space process size: 3GB (default).
823 */
824#define TASK_SIZE PAGE_OFFSET
825#define STACK_TOP TASK_SIZE
826#define STACK_TOP_MAX STACK_TOP
827
828#define INIT_THREAD { \
829 .sp0 = sizeof(init_stack) + (long)&init_stack, \
830 .vm86_info = NULL, \
831 .sysenter_cs = __KERNEL_CS, \
832 .io_bitmap_ptr = NULL, \
833 .fs = __KERNEL_PERCPU, \
834}
835
836/*
837 * Note that the .io_bitmap member must be extra-big. This is because
838 * the CPU will access an additional byte beyond the end of the IO
839 * permission bitmap. The extra byte must be all 1 bits, and must
840 * be within the limit.
841 */
842#define INIT_TSS { \
843 .x86_tss = { \
844 .sp0 = sizeof(init_stack) + (long)&init_stack, \
845 .ss0 = __KERNEL_DS, \
846 .ss1 = __KERNEL_CS, \
847 .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \
848 }, \
849 .io_bitmap = { [0 ... IO_BITMAP_LONGS] = ~0 }, \
850}
851
852extern unsigned long thread_saved_pc(struct task_struct *tsk);
853
854#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
855#define KSTK_TOP(info) \
856({ \
857 unsigned long *__ptr = (unsigned long *)(info); \
858 (unsigned long)(&__ptr[THREAD_SIZE_LONGS]); \
859})
860
861/*
862 * The below -8 is to reserve 8 bytes on top of the ring0 stack.
863 * This is necessary to guarantee that the entire "struct pt_regs"
864 * is accessable even if the CPU haven't stored the SS/ESP registers
865 * on the stack (interrupt gate does not save these registers
866 * when switching to the same priv ring).
867 * Therefore beware: accessing the ss/esp fields of the
868 * "struct pt_regs" is possible, but they may contain the
869 * completely wrong values.
870 */
871#define task_pt_regs(task) \
872({ \
873 struct pt_regs *__regs__; \
874 __regs__ = (struct pt_regs *)(KSTK_TOP(task_stack_page(task))-8); \
875 __regs__ - 1; \
876})
877
878#define KSTK_ESP(task) (task_pt_regs(task)->sp)
879
880#else
881/*
882 * User space process size. 47bits minus one guard page.
883 */
884#define TASK_SIZE64 ((1UL << 47) - PAGE_SIZE)
885
886/* This decides where the kernel will search for a free chunk of vm
887 * space during mmap's.
888 */
889#define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? \
890 0xc0000000 : 0xFFFFe000)
891
892#define TASK_SIZE (test_thread_flag(TIF_IA32) ? \
893 IA32_PAGE_OFFSET : TASK_SIZE64)
894#define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? \
895 IA32_PAGE_OFFSET : TASK_SIZE64)
896
897#define STACK_TOP TASK_SIZE
898#define STACK_TOP_MAX TASK_SIZE64
899
900#define INIT_THREAD { \
901 .sp0 = (unsigned long)&init_stack + sizeof(init_stack) \
902}
903
904#define INIT_TSS { \
905 .x86_tss.sp0 = (unsigned long)&init_stack + sizeof(init_stack) \
906}
907
908/*
909 * Return saved PC of a blocked thread.
910 * What is this good for? it will be always the scheduler or ret_from_fork.
911 */
912#define thread_saved_pc(t) (*(unsigned long *)((t)->thread.sp - 8))
913
914#define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1)
915#define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
916#endif /* CONFIG_X86_64 */
917
918extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
919 unsigned long new_sp);
920
921/*
922 * This decides where the kernel will search for a free chunk of vm
923 * space during mmap's.
924 */
925#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
926
927#define KSTK_EIP(task) (task_pt_regs(task)->ip)
928
929/* Get/set a process' ability to use the timestamp counter instruction */
930#define GET_TSC_CTL(adr) get_tsc_mode((adr))
931#define SET_TSC_CTL(val) set_tsc_mode((val))
932
933extern int get_tsc_mode(unsigned long adr);
934extern int set_tsc_mode(unsigned int val);
935
936#endif /* ASM_X86__PROCESSOR_H */
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h
deleted file mode 100644
index 6e89e8b4de0e..000000000000
--- a/include/asm-x86/proto.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef ASM_X86__PROTO_H
2#define ASM_X86__PROTO_H
3
4#include <asm/ldt.h>
5
6/* misc architecture specific prototypes */
7
8extern void early_idt_handler(void);
9
10extern void system_call(void);
11extern void syscall_init(void);
12
13extern void ia32_syscall(void);
14extern void ia32_cstar_target(void);
15extern void ia32_sysenter_target(void);
16
17extern void syscall32_cpu_init(void);
18
19extern void check_efer(void);
20
21#ifdef CONFIG_X86_BIOS_REBOOT
22extern int reboot_force;
23#else
24static const int reboot_force = 0;
25#endif
26
27long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);
28
29#define round_up(x, y) (((x) + (y) - 1) & ~((y) - 1))
30#define round_down(x, y) ((x) & ~((y) - 1))
31
32#endif /* ASM_X86__PROTO_H */
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h
deleted file mode 100644
index 4298b8882a78..000000000000
--- a/include/asm-x86/ptrace-abi.h
+++ /dev/null
@@ -1,145 +0,0 @@
1#ifndef ASM_X86__PTRACE_ABI_H
2#define ASM_X86__PTRACE_ABI_H
3
4#ifdef __i386__
5
6#define EBX 0
7#define ECX 1
8#define EDX 2
9#define ESI 3
10#define EDI 4
11#define EBP 5
12#define EAX 6
13#define DS 7
14#define ES 8
15#define FS 9
16#define GS 10
17#define ORIG_EAX 11
18#define EIP 12
19#define CS 13
20#define EFL 14
21#define UESP 15
22#define SS 16
23#define FRAME_SIZE 17
24
25#else /* __i386__ */
26
27#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
28#define R15 0
29#define R14 8
30#define R13 16
31#define R12 24
32#define RBP 32
33#define RBX 40
34/* arguments: interrupts/non tracing syscalls only save upto here*/
35#define R11 48
36#define R10 56
37#define R9 64
38#define R8 72
39#define RAX 80
40#define RCX 88
41#define RDX 96
42#define RSI 104
43#define RDI 112
44#define ORIG_RAX 120 /* = ERROR */
45/* end of arguments */
46/* cpu exception frame or undefined in case of fast syscall. */
47#define RIP 128
48#define CS 136
49#define EFLAGS 144
50#define RSP 152
51#define SS 160
52#define ARGOFFSET R11
53#endif /* __ASSEMBLY__ */
54
55/* top of stack page */
56#define FRAME_SIZE 168
57
58#endif /* !__i386__ */
59
60/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
61#define PTRACE_GETREGS 12
62#define PTRACE_SETREGS 13
63#define PTRACE_GETFPREGS 14
64#define PTRACE_SETFPREGS 15
65#define PTRACE_GETFPXREGS 18
66#define PTRACE_SETFPXREGS 19
67
68#define PTRACE_OLDSETOPTIONS 21
69
70/* only useful for access 32bit programs / kernels */
71#define PTRACE_GET_THREAD_AREA 25
72#define PTRACE_SET_THREAD_AREA 26
73
74#ifdef __x86_64__
75# define PTRACE_ARCH_PRCTL 30
76#endif
77
78#define PTRACE_SYSEMU 31
79#define PTRACE_SYSEMU_SINGLESTEP 32
80
81#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */
82
83#ifdef CONFIG_X86_PTRACE_BTS
84
85#ifndef __ASSEMBLY__
86#include <asm/types.h>
87
88/* configuration/status structure used in PTRACE_BTS_CONFIG and
89 PTRACE_BTS_STATUS commands.
90*/
91struct ptrace_bts_config {
92 /* requested or actual size of BTS buffer in bytes */
93 __u32 size;
94 /* bitmask of below flags */
95 __u32 flags;
96 /* buffer overflow signal */
97 __u32 signal;
98 /* actual size of bts_struct in bytes */
99 __u32 bts_size;
100};
101#endif /* __ASSEMBLY__ */
102
103#define PTRACE_BTS_O_TRACE 0x1 /* branch trace */
104#define PTRACE_BTS_O_SCHED 0x2 /* scheduling events w/ jiffies */
105#define PTRACE_BTS_O_SIGNAL 0x4 /* send SIG<signal> on buffer overflow
106 instead of wrapping around */
107#define PTRACE_BTS_O_ALLOC 0x8 /* (re)allocate buffer */
108
109#define PTRACE_BTS_CONFIG 40
110/* Configure branch trace recording.
111 ADDR points to a struct ptrace_bts_config.
112 DATA gives the size of that buffer.
113 A new buffer is allocated, if requested in the flags.
114 An overflow signal may only be requested for new buffers.
115 Returns the number of bytes read.
116*/
117#define PTRACE_BTS_STATUS 41
118/* Return the current configuration in a struct ptrace_bts_config
119 pointed to by ADDR; DATA gives the size of that buffer.
120 Returns the number of bytes written.
121*/
122#define PTRACE_BTS_SIZE 42
123/* Return the number of available BTS records for draining.
124 DATA and ADDR are ignored.
125*/
126#define PTRACE_BTS_GET 43
127/* Get a single BTS record.
128 DATA defines the index into the BTS array, where 0 is the newest
129 entry, and higher indices refer to older entries.
130 ADDR is pointing to struct bts_struct (see asm/ds.h).
131*/
132#define PTRACE_BTS_CLEAR 44
133/* Clear the BTS buffer.
134 DATA and ADDR are ignored.
135*/
136#define PTRACE_BTS_DRAIN 45
137/* Read all available BTS records and clear the buffer.
138 ADDR points to an array of struct bts_struct.
139 DATA gives the size of that buffer.
140 BTS records are read from oldest to newest.
141 Returns number of BTS records drained.
142*/
143#endif /* CONFIG_X86_PTRACE_BTS */
144
145#endif /* ASM_X86__PTRACE_ABI_H */
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
deleted file mode 100644
index a2025525a15a..000000000000
--- a/include/asm-x86/ptrace.h
+++ /dev/null
@@ -1,280 +0,0 @@
1#ifndef ASM_X86__PTRACE_H
2#define ASM_X86__PTRACE_H
3
4#include <linux/compiler.h> /* For __user */
5#include <asm/ptrace-abi.h>
6#include <asm/processor-flags.h>
7
8#ifdef __KERNEL__
9#include <asm/ds.h> /* the DS BTS struct is used for ptrace too */
10#include <asm/segment.h>
11#endif
12
13#ifndef __ASSEMBLY__
14
15#ifdef __i386__
16/* this struct defines the way the registers are stored on the
17 stack during a system call. */
18
19#ifndef __KERNEL__
20
21struct pt_regs {
22 long ebx;
23 long ecx;
24 long edx;
25 long esi;
26 long edi;
27 long ebp;
28 long eax;
29 int xds;
30 int xes;
31 int xfs;
32 /* int gs; */
33 long orig_eax;
34 long eip;
35 int xcs;
36 long eflags;
37 long esp;
38 int xss;
39};
40
41#else /* __KERNEL__ */
42
43struct pt_regs {
44 unsigned long bx;
45 unsigned long cx;
46 unsigned long dx;
47 unsigned long si;
48 unsigned long di;
49 unsigned long bp;
50 unsigned long ax;
51 unsigned long ds;
52 unsigned long es;
53 unsigned long fs;
54 /* int gs; */
55 unsigned long orig_ax;
56 unsigned long ip;
57 unsigned long cs;
58 unsigned long flags;
59 unsigned long sp;
60 unsigned long ss;
61};
62
63#endif /* __KERNEL__ */
64
65#else /* __i386__ */
66
67#ifndef __KERNEL__
68
69struct pt_regs {
70 unsigned long r15;
71 unsigned long r14;
72 unsigned long r13;
73 unsigned long r12;
74 unsigned long rbp;
75 unsigned long rbx;
76/* arguments: non interrupts/non tracing syscalls only save upto here*/
77 unsigned long r11;
78 unsigned long r10;
79 unsigned long r9;
80 unsigned long r8;
81 unsigned long rax;
82 unsigned long rcx;
83 unsigned long rdx;
84 unsigned long rsi;
85 unsigned long rdi;
86 unsigned long orig_rax;
87/* end of arguments */
88/* cpu exception frame or undefined */
89 unsigned long rip;
90 unsigned long cs;
91 unsigned long eflags;
92 unsigned long rsp;
93 unsigned long ss;
94/* top of stack page */
95};
96
97#else /* __KERNEL__ */
98
99struct pt_regs {
100 unsigned long r15;
101 unsigned long r14;
102 unsigned long r13;
103 unsigned long r12;
104 unsigned long bp;
105 unsigned long bx;
106/* arguments: non interrupts/non tracing syscalls only save upto here*/
107 unsigned long r11;
108 unsigned long r10;
109 unsigned long r9;
110 unsigned long r8;
111 unsigned long ax;
112 unsigned long cx;
113 unsigned long dx;
114 unsigned long si;
115 unsigned long di;
116 unsigned long orig_ax;
117/* end of arguments */
118/* cpu exception frame or undefined */
119 unsigned long ip;
120 unsigned long cs;
121 unsigned long flags;
122 unsigned long sp;
123 unsigned long ss;
124/* top of stack page */
125};
126
127#endif /* __KERNEL__ */
128#endif /* !__i386__ */
129
130
131#ifdef CONFIG_X86_PTRACE_BTS
132/* a branch trace record entry
133 *
134 * In order to unify the interface between various processor versions,
135 * we use the below data structure for all processors.
136 */
137enum bts_qualifier {
138 BTS_INVALID = 0,
139 BTS_BRANCH,
140 BTS_TASK_ARRIVES,
141 BTS_TASK_DEPARTS
142};
143
144struct bts_struct {
145 __u64 qualifier;
146 union {
147 /* BTS_BRANCH */
148 struct {
149 __u64 from_ip;
150 __u64 to_ip;
151 } lbr;
152 /* BTS_TASK_ARRIVES or
153 BTS_TASK_DEPARTS */
154 __u64 jiffies;
155 } variant;
156};
157#endif /* CONFIG_X86_PTRACE_BTS */
158
159#ifdef __KERNEL__
160
161#include <linux/init.h>
162
163struct cpuinfo_x86;
164struct task_struct;
165
166#ifdef CONFIG_X86_PTRACE_BTS
167extern void __cpuinit ptrace_bts_init_intel(struct cpuinfo_x86 *);
168extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier);
169#else
170#define ptrace_bts_init_intel(config) do {} while (0)
171#endif /* CONFIG_X86_PTRACE_BTS */
172
173extern unsigned long profile_pc(struct pt_regs *regs);
174
175extern unsigned long
176convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
177extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
178 int error_code, int si_code);
179void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
180
181extern long syscall_trace_enter(struct pt_regs *);
182extern void syscall_trace_leave(struct pt_regs *);
183
184static inline unsigned long regs_return_value(struct pt_regs *regs)
185{
186 return regs->ax;
187}
188
189/*
190 * user_mode_vm(regs) determines whether a register set came from user mode.
191 * This is true if V8086 mode was enabled OR if the register set was from
192 * protected mode with RPL-3 CS value. This tricky test checks that with
193 * one comparison. Many places in the kernel can bypass this full check
194 * if they have already ruled out V8086 mode, so user_mode(regs) can be used.
195 */
196static inline int user_mode(struct pt_regs *regs)
197{
198#ifdef CONFIG_X86_32
199 return (regs->cs & SEGMENT_RPL_MASK) == USER_RPL;
200#else
201 return !!(regs->cs & 3);
202#endif
203}
204
205static inline int user_mode_vm(struct pt_regs *regs)
206{
207#ifdef CONFIG_X86_32
208 return ((regs->cs & SEGMENT_RPL_MASK) | (regs->flags & X86_VM_MASK)) >=
209 USER_RPL;
210#else
211 return user_mode(regs);
212#endif
213}
214
215static inline int v8086_mode(struct pt_regs *regs)
216{
217#ifdef CONFIG_X86_32
218 return (regs->flags & X86_VM_MASK);
219#else
220 return 0; /* No V86 mode support in long mode */
221#endif
222}
223
224/*
225 * X86_32 CPUs don't save ss and esp if the CPU is already in kernel mode
226 * when it traps. So regs will be the current sp.
227 *
228 * This is valid only for kernel mode traps.
229 */
230static inline unsigned long kernel_trap_sp(struct pt_regs *regs)
231{
232#ifdef CONFIG_X86_32
233 return (unsigned long)regs;
234#else
235 return regs->sp;
236#endif
237}
238
239static inline unsigned long instruction_pointer(struct pt_regs *regs)
240{
241 return regs->ip;
242}
243
244static inline unsigned long frame_pointer(struct pt_regs *regs)
245{
246 return regs->bp;
247}
248
249static inline unsigned long user_stack_pointer(struct pt_regs *regs)
250{
251 return regs->sp;
252}
253
254/*
255 * These are defined as per linux/ptrace.h, which see.
256 */
257#define arch_has_single_step() (1)
258extern void user_enable_single_step(struct task_struct *);
259extern void user_disable_single_step(struct task_struct *);
260
261extern void user_enable_block_step(struct task_struct *);
262#ifdef CONFIG_X86_DEBUGCTLMSR
263#define arch_has_block_step() (1)
264#else
265#define arch_has_block_step() (boot_cpu_data.x86 >= 6)
266#endif
267
268struct user_desc;
269extern int do_get_thread_area(struct task_struct *p, int idx,
270 struct user_desc __user *info);
271extern int do_set_thread_area(struct task_struct *p, int idx,
272 struct user_desc __user *info, int can_allocate);
273
274#define __ARCH_WANT_COMPAT_SYS_PTRACE
275
276#endif /* __KERNEL__ */
277
278#endif /* !__ASSEMBLY__ */
279
280#endif /* ASM_X86__PTRACE_H */
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h
deleted file mode 100644
index edb3b4ecfc81..000000000000
--- a/include/asm-x86/pvclock-abi.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef ASM_X86__PVCLOCK_ABI_H
2#define ASM_X86__PVCLOCK_ABI_H
3#ifndef __ASSEMBLY__
4
5/*
6 * These structs MUST NOT be changed.
7 * They are the ABI between hypervisor and guest OS.
8 * Both Xen and KVM are using this.
9 *
10 * pvclock_vcpu_time_info holds the system time and the tsc timestamp
11 * of the last update. So the guest can use the tsc delta to get a
12 * more precise system time. There is one per virtual cpu.
13 *
14 * pvclock_wall_clock references the point in time when the system
15 * time was zero (usually boot time), thus the guest calculates the
16 * current wall clock by adding the system time.
17 *
18 * Protocol for the "version" fields is: hypervisor raises it (making
19 * it uneven) before it starts updating the fields and raises it again
20 * (making it even) when it is done. Thus the guest can make sure the
21 * time values it got are consistent by checking the version before
22 * and after reading them.
23 */
24
25struct pvclock_vcpu_time_info {
26 u32 version;
27 u32 pad0;
28 u64 tsc_timestamp;
29 u64 system_time;
30 u32 tsc_to_system_mul;
31 s8 tsc_shift;
32 u8 pad[3];
33} __attribute__((__packed__)); /* 32 bytes */
34
35struct pvclock_wall_clock {
36 u32 version;
37 u32 sec;
38 u32 nsec;
39} __attribute__((__packed__));
40
41#endif /* __ASSEMBLY__ */
42#endif /* ASM_X86__PVCLOCK_ABI_H */
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h
deleted file mode 100644
index 1a38f6834800..000000000000
--- a/include/asm-x86/pvclock.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef ASM_X86__PVCLOCK_H
2#define ASM_X86__PVCLOCK_H
3
4#include <linux/clocksource.h>
5#include <asm/pvclock-abi.h>
6
7/* some helper functions for xen and kvm pv clock sources */
8cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
9void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
10 struct pvclock_vcpu_time_info *vcpu,
11 struct timespec *ts);
12
13#endif /* ASM_X86__PVCLOCK_H */
diff --git a/include/asm-x86/reboot.h b/include/asm-x86/reboot.h
deleted file mode 100644
index 1c2f0ce9e31e..000000000000
--- a/include/asm-x86/reboot.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef ASM_X86__REBOOT_H
2#define ASM_X86__REBOOT_H
3
4struct pt_regs;
5
6struct machine_ops {
7 void (*restart)(char *cmd);
8 void (*halt)(void);
9 void (*power_off)(void);
10 void (*shutdown)(void);
11 void (*crash_shutdown)(struct pt_regs *);
12 void (*emergency_restart)(void);
13};
14
15extern struct machine_ops machine_ops;
16
17void native_machine_crash_shutdown(struct pt_regs *regs);
18void native_machine_shutdown(void);
19void machine_real_restart(const unsigned char *code, int length);
20
21#endif /* ASM_X86__REBOOT_H */
diff --git a/include/asm-x86/reboot_fixups.h b/include/asm-x86/reboot_fixups.h
deleted file mode 100644
index 2c2987d97570..000000000000
--- a/include/asm-x86/reboot_fixups.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef ASM_X86__REBOOT_FIXUPS_H
2#define ASM_X86__REBOOT_FIXUPS_H
3
4extern void mach_reboot_fixups(void);
5
6#endif /* ASM_X86__REBOOT_FIXUPS_H */
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h
deleted file mode 100644
index a01c4e376331..000000000000
--- a/include/asm-x86/required-features.h
+++ /dev/null
@@ -1,82 +0,0 @@
1#ifndef ASM_X86__REQUIRED_FEATURES_H
2#define ASM_X86__REQUIRED_FEATURES_H
3
4/* Define minimum CPUID feature set for kernel These bits are checked
5 really early to actually display a visible error message before the
6 kernel dies. Make sure to assign features to the proper mask!
7
8 Some requirements that are not in CPUID yet are also in the
9 CONFIG_X86_MINIMUM_CPU_FAMILY which is checked too.
10
11 The real information is in arch/x86/Kconfig.cpu, this just converts
12 the CONFIGs into a bitmask */
13
14#ifndef CONFIG_MATH_EMULATION
15# define NEED_FPU (1<<(X86_FEATURE_FPU & 31))
16#else
17# define NEED_FPU 0
18#endif
19
20#if defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64)
21# define NEED_PAE (1<<(X86_FEATURE_PAE & 31))
22#else
23# define NEED_PAE 0
24#endif
25
26#ifdef CONFIG_X86_CMPXCHG64
27# define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31))
28#else
29# define NEED_CX8 0
30#endif
31
32#if defined(CONFIG_X86_CMOV) || defined(CONFIG_X86_64)
33# define NEED_CMOV (1<<(X86_FEATURE_CMOV & 31))
34#else
35# define NEED_CMOV 0
36#endif
37
38#ifdef CONFIG_X86_USE_3DNOW
39# define NEED_3DNOW (1<<(X86_FEATURE_3DNOW & 31))
40#else
41# define NEED_3DNOW 0
42#endif
43
44#if defined(CONFIG_X86_P6_NOP) || defined(CONFIG_X86_64)
45# define NEED_NOPL (1<<(X86_FEATURE_NOPL & 31))
46#else
47# define NEED_NOPL 0
48#endif
49
50#ifdef CONFIG_X86_64
51#define NEED_PSE 0
52#define NEED_MSR (1<<(X86_FEATURE_MSR & 31))
53#define NEED_PGE (1<<(X86_FEATURE_PGE & 31))
54#define NEED_FXSR (1<<(X86_FEATURE_FXSR & 31))
55#define NEED_XMM (1<<(X86_FEATURE_XMM & 31))
56#define NEED_XMM2 (1<<(X86_FEATURE_XMM2 & 31))
57#define NEED_LM (1<<(X86_FEATURE_LM & 31))
58#else
59#define NEED_PSE 0
60#define NEED_MSR 0
61#define NEED_PGE 0
62#define NEED_FXSR 0
63#define NEED_XMM 0
64#define NEED_XMM2 0
65#define NEED_LM 0
66#endif
67
68#define REQUIRED_MASK0 (NEED_FPU|NEED_PSE|NEED_MSR|NEED_PAE|\
69 NEED_CX8|NEED_PGE|NEED_FXSR|NEED_CMOV|\
70 NEED_XMM|NEED_XMM2)
71#define SSE_MASK (NEED_XMM|NEED_XMM2)
72
73#define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW)
74
75#define REQUIRED_MASK2 0
76#define REQUIRED_MASK3 (NEED_NOPL)
77#define REQUIRED_MASK4 0
78#define REQUIRED_MASK5 0
79#define REQUIRED_MASK6 0
80#define REQUIRED_MASK7 0
81
82#endif /* ASM_X86__REQUIRED_FEATURES_H */
diff --git a/include/asm-x86/resource.h b/include/asm-x86/resource.h
deleted file mode 100644
index 04bc4db8921b..000000000000
--- a/include/asm-x86/resource.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/resource.h>
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h
deleted file mode 100644
index e39376d7de50..000000000000
--- a/include/asm-x86/resume-trace.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef ASM_X86__RESUME_TRACE_H
2#define ASM_X86__RESUME_TRACE_H
3
4#include <asm/asm.h>
5
6#define TRACE_RESUME(user) \
7do { \
8 if (pm_trace_enabled) { \
9 const void *tracedata; \
10 asm volatile(_ASM_MOV " $1f,%0\n" \
11 ".section .tracedata,\"a\"\n" \
12 "1:\t.word %c1\n\t" \
13 _ASM_PTR " %c2\n" \
14 ".previous" \
15 :"=r" (tracedata) \
16 : "i" (__LINE__), "i" (__FILE__)); \
17 generate_resume_trace(tracedata, user); \
18 } \
19} while (0)
20
21#endif /* ASM_X86__RESUME_TRACE_H */
diff --git a/include/asm-x86/rio.h b/include/asm-x86/rio.h
deleted file mode 100644
index 5e1256bdee83..000000000000
--- a/include/asm-x86/rio.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Derived from include/asm-x86/mach-summit/mach_mpparse.h
3 * and include/asm-x86/mach-default/bios_ebda.h
4 *
5 * Author: Laurent Vivier <Laurent.Vivier@bull.net>
6 */
7
8#ifndef ASM_X86__RIO_H
9#define ASM_X86__RIO_H
10
11#define RIO_TABLE_VERSION 3
12
13struct rio_table_hdr {
14 u8 version; /* Version number of this data structure */
15 u8 num_scal_dev; /* # of Scalability devices */
16 u8 num_rio_dev; /* # of RIO I/O devices */
17} __attribute__((packed));
18
19struct scal_detail {
20 u8 node_id; /* Scalability Node ID */
21 u32 CBAR; /* Address of 1MB register space */
22 u8 port0node; /* Node ID port connected to: 0xFF=None */
23 u8 port0port; /* Port num port connected to: 0,1,2, or */
24 /* 0xFF=None */
25 u8 port1node; /* Node ID port connected to: 0xFF = None */
26 u8 port1port; /* Port num port connected to: 0,1,2, or */
27 /* 0xFF=None */
28 u8 port2node; /* Node ID port connected to: 0xFF = None */
29 u8 port2port; /* Port num port connected to: 0,1,2, or */
30 /* 0xFF=None */
31 u8 chassis_num; /* 1 based Chassis number (1 = boot node) */
32} __attribute__((packed));
33
34struct rio_detail {
35 u8 node_id; /* RIO Node ID */
36 u32 BBAR; /* Address of 1MB register space */
37 u8 type; /* Type of device */
38 u8 owner_id; /* Node ID of Hurricane that owns this */
39 /* node */
40 u8 port0node; /* Node ID port connected to: 0xFF=None */
41 u8 port0port; /* Port num port connected to: 0,1,2, or */
42 /* 0xFF=None */
43 u8 port1node; /* Node ID port connected to: 0xFF=None */
44 u8 port1port; /* Port num port connected to: 0,1,2, or */
45 /* 0xFF=None */
46 u8 first_slot; /* Lowest slot number below this Calgary */
47 u8 status; /* Bit 0 = 1 : the XAPIC is used */
48 /* = 0 : the XAPIC is not used, ie: */
49 /* ints fwded to another XAPIC */
50 /* Bits1:7 Reserved */
51 u8 WP_index; /* instance index - lower ones have */
52 /* lower slot numbers/PCI bus numbers */
53 u8 chassis_num; /* 1 based Chassis number */
54} __attribute__((packed));
55
56enum {
57 HURR_SCALABILTY = 0, /* Hurricane Scalability info */
58 HURR_RIOIB = 2, /* Hurricane RIOIB info */
59 COMPAT_CALGARY = 4, /* Compatibility Calgary */
60 ALT_CALGARY = 5, /* Second Planar Calgary */
61};
62
63#endif /* ASM_X86__RIO_H */
diff --git a/include/asm-x86/rtc.h b/include/asm-x86/rtc.h
deleted file mode 100644
index f71c3b0ed360..000000000000
--- a/include/asm-x86/rtc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/rtc.h>
diff --git a/include/asm-x86/rwlock.h b/include/asm-x86/rwlock.h
deleted file mode 100644
index 48a3109e1a7d..000000000000
--- a/include/asm-x86/rwlock.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef ASM_X86__RWLOCK_H
2#define ASM_X86__RWLOCK_H
3
4#define RW_LOCK_BIAS 0x01000000
5
6/* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */
7
8#endif /* ASM_X86__RWLOCK_H */
diff --git a/include/asm-x86/rwsem.h b/include/asm-x86/rwsem.h
deleted file mode 100644
index 3ff3015b71a8..000000000000
--- a/include/asm-x86/rwsem.h
+++ /dev/null
@@ -1,265 +0,0 @@
1/* rwsem.h: R/W semaphores implemented using XADD/CMPXCHG for i486+
2 *
3 * Written by David Howells (dhowells@redhat.com).
4 *
5 * Derived from asm-x86/semaphore.h
6 *
7 *
8 * The MSW of the count is the negated number of active writers and waiting
9 * lockers, and the LSW is the total number of active locks
10 *
11 * The lock count is initialized to 0 (no active and no waiting lockers).
12 *
13 * When a writer subtracts WRITE_BIAS, it'll get 0xffff0001 for the case of an
14 * uncontended lock. This can be determined because XADD returns the old value.
15 * Readers increment by 1 and see a positive value when uncontended, negative
16 * if there are writers (and maybe) readers waiting (in which case it goes to
17 * sleep).
18 *
19 * The value of WAITING_BIAS supports up to 32766 waiting processes. This can
20 * be extended to 65534 by manually checking the whole MSW rather than relying
21 * on the S flag.
22 *
23 * The value of ACTIVE_BIAS supports up to 65535 active processes.
24 *
25 * This should be totally fair - if anything is waiting, a process that wants a
26 * lock will go to the back of the queue. When the currently active lock is
27 * released, if there's a writer at the front of the queue, then that and only
28 * that will be woken up; if there's a bunch of consequtive readers at the
29 * front, then they'll all be woken up, but no other readers will be.
30 */
31
32#ifndef ASM_X86__RWSEM_H
33#define ASM_X86__RWSEM_H
34
35#ifndef _LINUX_RWSEM_H
36#error "please don't include asm/rwsem.h directly, use linux/rwsem.h instead"
37#endif
38
39#ifdef __KERNEL__
40
41#include <linux/list.h>
42#include <linux/spinlock.h>
43#include <linux/lockdep.h>
44
45struct rwsem_waiter;
46
47extern asmregparm struct rw_semaphore *
48 rwsem_down_read_failed(struct rw_semaphore *sem);
49extern asmregparm struct rw_semaphore *
50 rwsem_down_write_failed(struct rw_semaphore *sem);
51extern asmregparm struct rw_semaphore *
52 rwsem_wake(struct rw_semaphore *);
53extern asmregparm struct rw_semaphore *
54 rwsem_downgrade_wake(struct rw_semaphore *sem);
55
56/*
57 * the semaphore definition
58 */
59
60#define RWSEM_UNLOCKED_VALUE 0x00000000
61#define RWSEM_ACTIVE_BIAS 0x00000001
62#define RWSEM_ACTIVE_MASK 0x0000ffff
63#define RWSEM_WAITING_BIAS (-0x00010000)
64#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
65#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
66
67struct rw_semaphore {
68 signed long count;
69 spinlock_t wait_lock;
70 struct list_head wait_list;
71#ifdef CONFIG_DEBUG_LOCK_ALLOC
72 struct lockdep_map dep_map;
73#endif
74};
75
76#ifdef CONFIG_DEBUG_LOCK_ALLOC
77# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname }
78#else
79# define __RWSEM_DEP_MAP_INIT(lockname)
80#endif
81
82
83#define __RWSEM_INITIALIZER(name) \
84{ \
85 RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
86 LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) \
87}
88
89#define DECLARE_RWSEM(name) \
90 struct rw_semaphore name = __RWSEM_INITIALIZER(name)
91
92extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
93 struct lock_class_key *key);
94
95#define init_rwsem(sem) \
96do { \
97 static struct lock_class_key __key; \
98 \
99 __init_rwsem((sem), #sem, &__key); \
100} while (0)
101
102/*
103 * lock for reading
104 */
105static inline void __down_read(struct rw_semaphore *sem)
106{
107 asm volatile("# beginning down_read\n\t"
108 LOCK_PREFIX " incl (%%eax)\n\t"
109 /* adds 0x00000001, returns the old value */
110 " jns 1f\n"
111 " call call_rwsem_down_read_failed\n"
112 "1:\n\t"
113 "# ending down_read\n\t"
114 : "+m" (sem->count)
115 : "a" (sem)
116 : "memory", "cc");
117}
118
119/*
120 * trylock for reading -- returns 1 if successful, 0 if contention
121 */
122static inline int __down_read_trylock(struct rw_semaphore *sem)
123{
124 __s32 result, tmp;
125 asm volatile("# beginning __down_read_trylock\n\t"
126 " movl %0,%1\n\t"
127 "1:\n\t"
128 " movl %1,%2\n\t"
129 " addl %3,%2\n\t"
130 " jle 2f\n\t"
131 LOCK_PREFIX " cmpxchgl %2,%0\n\t"
132 " jnz 1b\n\t"
133 "2:\n\t"
134 "# ending __down_read_trylock\n\t"
135 : "+m" (sem->count), "=&a" (result), "=&r" (tmp)
136 : "i" (RWSEM_ACTIVE_READ_BIAS)
137 : "memory", "cc");
138 return result >= 0 ? 1 : 0;
139}
140
141/*
142 * lock for writing
143 */
144static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
145{
146 int tmp;
147
148 tmp = RWSEM_ACTIVE_WRITE_BIAS;
149 asm volatile("# beginning down_write\n\t"
150 LOCK_PREFIX " xadd %%edx,(%%eax)\n\t"
151 /* subtract 0x0000ffff, returns the old value */
152 " testl %%edx,%%edx\n\t"
153 /* was the count 0 before? */
154 " jz 1f\n"
155 " call call_rwsem_down_write_failed\n"
156 "1:\n"
157 "# ending down_write"
158 : "+m" (sem->count), "=d" (tmp)
159 : "a" (sem), "1" (tmp)
160 : "memory", "cc");
161}
162
163static inline void __down_write(struct rw_semaphore *sem)
164{
165 __down_write_nested(sem, 0);
166}
167
168/*
169 * trylock for writing -- returns 1 if successful, 0 if contention
170 */
171static inline int __down_write_trylock(struct rw_semaphore *sem)
172{
173 signed long ret = cmpxchg(&sem->count,
174 RWSEM_UNLOCKED_VALUE,
175 RWSEM_ACTIVE_WRITE_BIAS);
176 if (ret == RWSEM_UNLOCKED_VALUE)
177 return 1;
178 return 0;
179}
180
181/*
182 * unlock after reading
183 */
184static inline void __up_read(struct rw_semaphore *sem)
185{
186 __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
187 asm volatile("# beginning __up_read\n\t"
188 LOCK_PREFIX " xadd %%edx,(%%eax)\n\t"
189 /* subtracts 1, returns the old value */
190 " jns 1f\n\t"
191 " call call_rwsem_wake\n"
192 "1:\n"
193 "# ending __up_read\n"
194 : "+m" (sem->count), "=d" (tmp)
195 : "a" (sem), "1" (tmp)
196 : "memory", "cc");
197}
198
199/*
200 * unlock after writing
201 */
202static inline void __up_write(struct rw_semaphore *sem)
203{
204 asm volatile("# beginning __up_write\n\t"
205 " movl %2,%%edx\n\t"
206 LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t"
207 /* tries to transition
208 0xffff0001 -> 0x00000000 */
209 " jz 1f\n"
210 " call call_rwsem_wake\n"
211 "1:\n\t"
212 "# ending __up_write\n"
213 : "+m" (sem->count)
214 : "a" (sem), "i" (-RWSEM_ACTIVE_WRITE_BIAS)
215 : "memory", "cc", "edx");
216}
217
218/*
219 * downgrade write lock to read lock
220 */
221static inline void __downgrade_write(struct rw_semaphore *sem)
222{
223 asm volatile("# beginning __downgrade_write\n\t"
224 LOCK_PREFIX " addl %2,(%%eax)\n\t"
225 /* transitions 0xZZZZ0001 -> 0xYYYY0001 */
226 " jns 1f\n\t"
227 " call call_rwsem_downgrade_wake\n"
228 "1:\n\t"
229 "# ending __downgrade_write\n"
230 : "+m" (sem->count)
231 : "a" (sem), "i" (-RWSEM_WAITING_BIAS)
232 : "memory", "cc");
233}
234
235/*
236 * implement atomic add functionality
237 */
238static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
239{
240 asm volatile(LOCK_PREFIX "addl %1,%0"
241 : "+m" (sem->count)
242 : "ir" (delta));
243}
244
245/*
246 * implement exchange and add functionality
247 */
248static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
249{
250 int tmp = delta;
251
252 asm volatile(LOCK_PREFIX "xadd %0,%1"
253 : "+r" (tmp), "+m" (sem->count)
254 : : "memory");
255
256 return tmp + delta;
257}
258
259static inline int rwsem_is_locked(struct rw_semaphore *sem)
260{
261 return (sem->count != 0);
262}
263
264#endif /* __KERNEL__ */
265#endif /* ASM_X86__RWSEM_H */
diff --git a/include/asm-x86/scatterlist.h b/include/asm-x86/scatterlist.h
deleted file mode 100644
index ee48f880005d..000000000000
--- a/include/asm-x86/scatterlist.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef ASM_X86__SCATTERLIST_H
2#define ASM_X86__SCATTERLIST_H
3
4#include <asm/types.h>
5
6struct scatterlist {
7#ifdef CONFIG_DEBUG_SG
8 unsigned long sg_magic;
9#endif
10 unsigned long page_link;
11 unsigned int offset;
12 unsigned int length;
13 dma_addr_t dma_address;
14 unsigned int dma_length;
15};
16
17#define ARCH_HAS_SG_CHAIN
18#define ISA_DMA_THRESHOLD (0x00ffffff)
19
20/*
21 * These macros should be used after a pci_map_sg call has been done
22 * to get bus addresses of each of the SG entries and their lengths.
23 * You should only work with the number of sg entries pci_map_sg
24 * returns.
25 */
26#define sg_dma_address(sg) ((sg)->dma_address)
27#ifdef CONFIG_X86_32
28# define sg_dma_len(sg) ((sg)->length)
29#else
30# define sg_dma_len(sg) ((sg)->dma_length)
31#endif
32
33#endif /* ASM_X86__SCATTERLIST_H */
diff --git a/include/asm-x86/seccomp.h b/include/asm-x86/seccomp.h
deleted file mode 100644
index c62e58a5a90d..000000000000
--- a/include/asm-x86/seccomp.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "seccomp_32.h"
3#else
4# include "seccomp_64.h"
5#endif
diff --git a/include/asm-x86/seccomp_32.h b/include/asm-x86/seccomp_32.h
deleted file mode 100644
index cf9ab2dbcef1..000000000000
--- a/include/asm-x86/seccomp_32.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef ASM_X86__SECCOMP_32_H
2#define ASM_X86__SECCOMP_32_H
3
4#include <linux/thread_info.h>
5
6#ifdef TIF_32BIT
7#error "unexpected TIF_32BIT on i386"
8#endif
9
10#include <linux/unistd.h>
11
12#define __NR_seccomp_read __NR_read
13#define __NR_seccomp_write __NR_write
14#define __NR_seccomp_exit __NR_exit
15#define __NR_seccomp_sigreturn __NR_sigreturn
16
17#endif /* ASM_X86__SECCOMP_32_H */
diff --git a/include/asm-x86/seccomp_64.h b/include/asm-x86/seccomp_64.h
deleted file mode 100644
index 03274cea751f..000000000000
--- a/include/asm-x86/seccomp_64.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef ASM_X86__SECCOMP_64_H
2#define ASM_X86__SECCOMP_64_H
3
4#include <linux/thread_info.h>
5
6#ifdef TIF_32BIT
7#error "unexpected TIF_32BIT on x86_64"
8#else
9#define TIF_32BIT TIF_IA32
10#endif
11
12#include <linux/unistd.h>
13#include <asm/ia32_unistd.h>
14
15#define __NR_seccomp_read __NR_read
16#define __NR_seccomp_write __NR_write
17#define __NR_seccomp_exit __NR_exit
18#define __NR_seccomp_sigreturn __NR_rt_sigreturn
19
20#define __NR_seccomp_read_32 __NR_ia32_read
21#define __NR_seccomp_write_32 __NR_ia32_write
22#define __NR_seccomp_exit_32 __NR_ia32_exit
23#define __NR_seccomp_sigreturn_32 __NR_ia32_sigreturn
24
25#endif /* ASM_X86__SECCOMP_64_H */
diff --git a/include/asm-x86/sections.h b/include/asm-x86/sections.h
deleted file mode 100644
index 2b8c5160388f..000000000000
--- a/include/asm-x86/sections.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/sections.h>
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h
deleted file mode 100644
index 5d6e69454891..000000000000
--- a/include/asm-x86/segment.h
+++ /dev/null
@@ -1,209 +0,0 @@
1#ifndef ASM_X86__SEGMENT_H
2#define ASM_X86__SEGMENT_H
3
4/* Constructor for a conventional segment GDT (or LDT) entry */
5/* This is a macro so it can be used in initializers */
6#define GDT_ENTRY(flags, base, limit) \
7 ((((base) & 0xff000000ULL) << (56-24)) | \
8 (((flags) & 0x0000f0ffULL) << 40) | \
9 (((limit) & 0x000f0000ULL) << (48-16)) | \
10 (((base) & 0x00ffffffULL) << 16) | \
11 (((limit) & 0x0000ffffULL)))
12
13/* Simple and small GDT entries for booting only */
14
15#define GDT_ENTRY_BOOT_CS 2
16#define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
17
18#define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
19#define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
20
21#define GDT_ENTRY_BOOT_TSS (GDT_ENTRY_BOOT_CS + 2)
22#define __BOOT_TSS (GDT_ENTRY_BOOT_TSS * 8)
23
24#ifdef CONFIG_X86_32
25/*
26 * The layout of the per-CPU GDT under Linux:
27 *
28 * 0 - null
29 * 1 - reserved
30 * 2 - reserved
31 * 3 - reserved
32 *
33 * 4 - unused <==== new cacheline
34 * 5 - unused
35 *
36 * ------- start of TLS (Thread-Local Storage) segments:
37 *
38 * 6 - TLS segment #1 [ glibc's TLS segment ]
39 * 7 - TLS segment #2 [ Wine's %fs Win32 segment ]
40 * 8 - TLS segment #3
41 * 9 - reserved
42 * 10 - reserved
43 * 11 - reserved
44 *
45 * ------- start of kernel segments:
46 *
47 * 12 - kernel code segment <==== new cacheline
48 * 13 - kernel data segment
49 * 14 - default user CS
50 * 15 - default user DS
51 * 16 - TSS
52 * 17 - LDT
53 * 18 - PNPBIOS support (16->32 gate)
54 * 19 - PNPBIOS support
55 * 20 - PNPBIOS support
56 * 21 - PNPBIOS support
57 * 22 - PNPBIOS support
58 * 23 - APM BIOS support
59 * 24 - APM BIOS support
60 * 25 - APM BIOS support
61 *
62 * 26 - ESPFIX small SS
63 * 27 - per-cpu [ offset to per-cpu data area ]
64 * 28 - unused
65 * 29 - unused
66 * 30 - unused
67 * 31 - TSS for double fault handler
68 */
69#define GDT_ENTRY_TLS_MIN 6
70#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
71
72#define GDT_ENTRY_DEFAULT_USER_CS 14
73
74#define GDT_ENTRY_DEFAULT_USER_DS 15
75
76#define GDT_ENTRY_KERNEL_BASE 12
77
78#define GDT_ENTRY_KERNEL_CS (GDT_ENTRY_KERNEL_BASE + 0)
79
80#define GDT_ENTRY_KERNEL_DS (GDT_ENTRY_KERNEL_BASE + 1)
81
82#define GDT_ENTRY_TSS (GDT_ENTRY_KERNEL_BASE + 4)
83#define GDT_ENTRY_LDT (GDT_ENTRY_KERNEL_BASE + 5)
84
85#define GDT_ENTRY_PNPBIOS_BASE (GDT_ENTRY_KERNEL_BASE + 6)
86#define GDT_ENTRY_APMBIOS_BASE (GDT_ENTRY_KERNEL_BASE + 11)
87
88#define GDT_ENTRY_ESPFIX_SS (GDT_ENTRY_KERNEL_BASE + 14)
89#define __ESPFIX_SS (GDT_ENTRY_ESPFIX_SS * 8)
90
91#define GDT_ENTRY_PERCPU (GDT_ENTRY_KERNEL_BASE + 15)
92#ifdef CONFIG_SMP
93#define __KERNEL_PERCPU (GDT_ENTRY_PERCPU * 8)
94#else
95#define __KERNEL_PERCPU 0
96#endif
97
98#define GDT_ENTRY_DOUBLEFAULT_TSS 31
99
100/*
101 * The GDT has 32 entries
102 */
103#define GDT_ENTRIES 32
104
105/* The PnP BIOS entries in the GDT */
106#define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0)
107#define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1)
108#define GDT_ENTRY_PNPBIOS_DS (GDT_ENTRY_PNPBIOS_BASE + 2)
109#define GDT_ENTRY_PNPBIOS_TS1 (GDT_ENTRY_PNPBIOS_BASE + 3)
110#define GDT_ENTRY_PNPBIOS_TS2 (GDT_ENTRY_PNPBIOS_BASE + 4)
111
112/* The PnP BIOS selectors */
113#define PNP_CS32 (GDT_ENTRY_PNPBIOS_CS32 * 8) /* segment for calling fn */
114#define PNP_CS16 (GDT_ENTRY_PNPBIOS_CS16 * 8) /* code segment for BIOS */
115#define PNP_DS (GDT_ENTRY_PNPBIOS_DS * 8) /* data segment for BIOS */
116#define PNP_TS1 (GDT_ENTRY_PNPBIOS_TS1 * 8) /* transfer data segment */
117#define PNP_TS2 (GDT_ENTRY_PNPBIOS_TS2 * 8) /* another data segment */
118
119/* Bottom two bits of selector give the ring privilege level */
120#define SEGMENT_RPL_MASK 0x3
121/* Bit 2 is table indicator (LDT/GDT) */
122#define SEGMENT_TI_MASK 0x4
123
124/* User mode is privilege level 3 */
125#define USER_RPL 0x3
126/* LDT segment has TI set, GDT has it cleared */
127#define SEGMENT_LDT 0x4
128#define SEGMENT_GDT 0x0
129
130/*
131 * Matching rules for certain types of segments.
132 */
133
134/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */
135#define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8)
136
137
138#else
139#include <asm/cache.h>
140
141#define GDT_ENTRY_KERNEL32_CS 1
142#define GDT_ENTRY_KERNEL_CS 2
143#define GDT_ENTRY_KERNEL_DS 3
144
145#define __KERNEL32_CS (GDT_ENTRY_KERNEL32_CS * 8)
146
147/*
148 * we cannot use the same code segment descriptor for user and kernel
149 * -- not even in the long flat mode, because of different DPL /kkeil
150 * The segment offset needs to contain a RPL. Grr. -AK
151 * GDT layout to get 64bit syscall right (sysret hardcodes gdt offsets)
152 */
153#define GDT_ENTRY_DEFAULT_USER32_CS 4
154#define GDT_ENTRY_DEFAULT_USER_DS 5
155#define GDT_ENTRY_DEFAULT_USER_CS 6
156#define __USER32_CS (GDT_ENTRY_DEFAULT_USER32_CS * 8 + 3)
157#define __USER32_DS __USER_DS
158
159#define GDT_ENTRY_TSS 8 /* needs two entries */
160#define GDT_ENTRY_LDT 10 /* needs two entries */
161#define GDT_ENTRY_TLS_MIN 12
162#define GDT_ENTRY_TLS_MAX 14
163
164#define GDT_ENTRY_PER_CPU 15 /* Abused to load per CPU data from limit */
165#define __PER_CPU_SEG (GDT_ENTRY_PER_CPU * 8 + 3)
166
167/* TLS indexes for 64bit - hardcoded in arch_prctl */
168#define FS_TLS 0
169#define GS_TLS 1
170
171#define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3)
172#define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3)
173
174#define GDT_ENTRIES 16
175
176#endif
177
178#define __KERNEL_CS (GDT_ENTRY_KERNEL_CS * 8)
179#define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8)
180#define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS* 8 + 3)
181#define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS* 8 + 3)
182#ifndef CONFIG_PARAVIRT
183#define get_kernel_rpl() 0
184#endif
185
186/* User mode is privilege level 3 */
187#define USER_RPL 0x3
188/* LDT segment has TI set, GDT has it cleared */
189#define SEGMENT_LDT 0x4
190#define SEGMENT_GDT 0x0
191
192/* Bottom two bits of selector give the ring privilege level */
193#define SEGMENT_RPL_MASK 0x3
194/* Bit 2 is table indicator (LDT/GDT) */
195#define SEGMENT_TI_MASK 0x4
196
197#define IDT_ENTRIES 256
198#define NUM_EXCEPTION_VECTORS 32
199#define GDT_SIZE (GDT_ENTRIES * 8)
200#define GDT_ENTRY_TLS_ENTRIES 3
201#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
202
203#ifdef __KERNEL__
204#ifndef __ASSEMBLY__
205extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][10];
206#endif
207#endif
208
209#endif /* ASM_X86__SEGMENT_H */
diff --git a/include/asm-x86/sembuf.h b/include/asm-x86/sembuf.h
deleted file mode 100644
index 81f06b7e5a3f..000000000000
--- a/include/asm-x86/sembuf.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef ASM_X86__SEMBUF_H
2#define ASM_X86__SEMBUF_H
3
4/*
5 * The semid64_ds structure for x86 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13struct semid64_ds {
14 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
15 __kernel_time_t sem_otime; /* last semop time */
16 unsigned long __unused1;
17 __kernel_time_t sem_ctime; /* last change time */
18 unsigned long __unused2;
19 unsigned long sem_nsems; /* no. of semaphores in array */
20 unsigned long __unused3;
21 unsigned long __unused4;
22};
23
24#endif /* ASM_X86__SEMBUF_H */
diff --git a/include/asm-x86/serial.h b/include/asm-x86/serial.h
deleted file mode 100644
index 303660b671e5..000000000000
--- a/include/asm-x86/serial.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef ASM_X86__SERIAL_H
2#define ASM_X86__SERIAL_H
3
4/*
5 * This assumes you have a 1.8432 MHz clock for your UART.
6 *
7 * It'd be nice if someone built a serial card with a 24.576 MHz
8 * clock, since the 16550A is capable of handling a top speed of 1.5
9 * megabits/second; but this requires the faster clock.
10 */
11#define BASE_BAUD ( 1843200 / 16 )
12
13/* Standard COM flags (except for COM4, because of the 8514 problem) */
14#ifdef CONFIG_SERIAL_DETECT_IRQ
15#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
16#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
17#else
18#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
19#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
20#endif
21
22#define SERIAL_PORT_DFNS \
23 /* UART CLK PORT IRQ FLAGS */ \
24 { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \
25 { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \
26 { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \
27 { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */
28
29#endif /* ASM_X86__SERIAL_H */
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h
deleted file mode 100644
index 11b6cc14b289..000000000000
--- a/include/asm-x86/setup.h
+++ /dev/null
@@ -1,105 +0,0 @@
1#ifndef ASM_X86__SETUP_H
2#define ASM_X86__SETUP_H
3
4#define COMMAND_LINE_SIZE 2048
5
6#ifndef __ASSEMBLY__
7
8/* Interrupt control for vSMPowered x86_64 systems */
9void vsmp_init(void);
10
11#ifdef CONFIG_X86_VISWS
12extern void visws_early_detect(void);
13extern int is_visws_box(void);
14#else
15static inline void visws_early_detect(void) { }
16static inline int is_visws_box(void) { return 0; }
17#endif
18
19/*
20 * Any setup quirks to be performed?
21 */
22struct mpc_config_processor;
23struct mpc_config_bus;
24struct mp_config_oemtable;
25struct x86_quirks {
26 int (*arch_pre_time_init)(void);
27 int (*arch_time_init)(void);
28 int (*arch_pre_intr_init)(void);
29 int (*arch_intr_init)(void);
30 int (*arch_trap_init)(void);
31 char * (*arch_memory_setup)(void);
32 int (*mach_get_smp_config)(unsigned int early);
33 int (*mach_find_smp_config)(unsigned int reserve);
34
35 int *mpc_record;
36 int (*mpc_apic_id)(struct mpc_config_processor *m);
37 void (*mpc_oem_bus_info)(struct mpc_config_bus *m, char *name);
38 void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
39 void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
40 unsigned short oemsize);
41 int (*setup_ioapic_ids)(void);
42};
43
44extern struct x86_quirks *x86_quirks;
45extern unsigned long saved_video_mode;
46
47#ifndef CONFIG_PARAVIRT
48#define paravirt_post_allocator_init() do {} while (0)
49#endif
50#endif /* __ASSEMBLY__ */
51
52#ifdef __KERNEL__
53
54#ifdef __i386__
55
56#include <linux/pfn.h>
57/*
58 * Reserved space for vmalloc and iomap - defined in asm/page.h
59 */
60#define MAXMEM_PFN PFN_DOWN(MAXMEM)
61#define MAX_NONPAE_PFN (1 << 20)
62
63#endif /* __i386__ */
64
65#define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
66
67#define OLD_CL_MAGIC 0xA33F
68#define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
69#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
70
71#ifndef __ASSEMBLY__
72#include <asm/bootparam.h>
73
74#ifndef _SETUP
75
76/*
77 * This is set up by the setup-routine at boot-time
78 */
79extern struct boot_params boot_params;
80
81/*
82 * Do NOT EVER look at the BIOS memory size location.
83 * It does not work on many machines.
84 */
85#define LOWMEMSIZE() (0x9f000)
86
87#ifdef __i386__
88
89void __init i386_start_kernel(void);
90extern void probe_roms(void);
91
92extern unsigned long init_pg_tables_start;
93extern unsigned long init_pg_tables_end;
94
95#else
96void __init x86_64_init_pda(void);
97void __init x86_64_start_kernel(char *real_mode);
98void __init x86_64_start_reservations(char *real_mode_data);
99
100#endif /* __i386__ */
101#endif /* _SETUP */
102#endif /* __ASSEMBLY__ */
103#endif /* __KERNEL__ */
104
105#endif /* ASM_X86__SETUP_H */
diff --git a/include/asm-x86/shmbuf.h b/include/asm-x86/shmbuf.h
deleted file mode 100644
index f51aec2298e9..000000000000
--- a/include/asm-x86/shmbuf.h
+++ /dev/null
@@ -1,51 +0,0 @@
1#ifndef ASM_X86__SHMBUF_H
2#define ASM_X86__SHMBUF_H
3
4/*
5 * The shmid64_ds structure for x86 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space on 32 bit is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 *
13 * Pad space on 64 bit is left for:
14 * - 2 miscellaneous 64-bit values
15 */
16
17struct shmid64_ds {
18 struct ipc64_perm shm_perm; /* operation perms */
19 size_t shm_segsz; /* size of segment (bytes) */
20 __kernel_time_t shm_atime; /* last attach time */
21#ifdef __i386__
22 unsigned long __unused1;
23#endif
24 __kernel_time_t shm_dtime; /* last detach time */
25#ifdef __i386__
26 unsigned long __unused2;
27#endif
28 __kernel_time_t shm_ctime; /* last change time */
29#ifdef __i386__
30 unsigned long __unused3;
31#endif
32 __kernel_pid_t shm_cpid; /* pid of creator */
33 __kernel_pid_t shm_lpid; /* pid of last operator */
34 unsigned long shm_nattch; /* no. of current attaches */
35 unsigned long __unused4;
36 unsigned long __unused5;
37};
38
39struct shminfo64 {
40 unsigned long shmmax;
41 unsigned long shmmin;
42 unsigned long shmmni;
43 unsigned long shmseg;
44 unsigned long shmall;
45 unsigned long __unused1;
46 unsigned long __unused2;
47 unsigned long __unused3;
48 unsigned long __unused4;
49};
50
51#endif /* ASM_X86__SHMBUF_H */
diff --git a/include/asm-x86/shmparam.h b/include/asm-x86/shmparam.h
deleted file mode 100644
index a83a1fd96a0e..000000000000
--- a/include/asm-x86/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef ASM_X86__SHMPARAM_H
2#define ASM_X86__SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* ASM_X86__SHMPARAM_H */
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h
deleted file mode 100644
index ee813f4fe5d5..000000000000
--- a/include/asm-x86/sigcontext.h
+++ /dev/null
@@ -1,284 +0,0 @@
1#ifndef ASM_X86__SIGCONTEXT_H
2#define ASM_X86__SIGCONTEXT_H
3
4#include <linux/compiler.h>
5#include <asm/types.h>
6
7#define FP_XSTATE_MAGIC1 0x46505853U
8#define FP_XSTATE_MAGIC2 0x46505845U
9#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
10
11/*
12 * bytes 464..511 in the current 512byte layout of fxsave/fxrstor frame
13 * are reserved for SW usage. On cpu's supporting xsave/xrstor, these bytes
14 * are used to extended the fpstate pointer in the sigcontext, which now
15 * includes the extended state information along with fpstate information.
16 *
17 * Presence of FP_XSTATE_MAGIC1 at the beginning of this SW reserved
18 * area and FP_XSTATE_MAGIC2 at the end of memory layout
19 * (extended_size - FP_XSTATE_MAGIC2_SIZE) indicates the presence of the
20 * extended state information in the memory layout pointed by the fpstate
21 * pointer in sigcontext.
22 */
23struct _fpx_sw_bytes {
24 __u32 magic1; /* FP_XSTATE_MAGIC1 */
25 __u32 extended_size; /* total size of the layout referred by
26 * fpstate pointer in the sigcontext.
27 */
28 __u64 xstate_bv;
29 /* feature bit mask (including fp/sse/extended
30 * state) that is present in the memory
31 * layout.
32 */
33 __u32 xstate_size; /* actual xsave state size, based on the
34 * features saved in the layout.
35 * 'extended_size' will be greater than
36 * 'xstate_size'.
37 */
38 __u32 padding[7]; /* for future use. */
39};
40
41#ifdef __i386__
42/*
43 * As documented in the iBCS2 standard..
44 *
45 * The first part of "struct _fpstate" is just the normal i387
46 * hardware setup, the extra "status" word is used to save the
47 * coprocessor status word before entering the handler.
48 *
49 * Pentium III FXSR, SSE support
50 * Gareth Hughes <gareth@valinux.com>, May 2000
51 *
52 * The FPU state data structure has had to grow to accommodate the
53 * extended FPU state required by the Streaming SIMD Extensions.
54 * There is no documented standard to accomplish this at the moment.
55 */
56struct _fpreg {
57 unsigned short significand[4];
58 unsigned short exponent;
59};
60
61struct _fpxreg {
62 unsigned short significand[4];
63 unsigned short exponent;
64 unsigned short padding[3];
65};
66
67struct _xmmreg {
68 unsigned long element[4];
69};
70
71struct _fpstate {
72 /* Regular FPU environment */
73 unsigned long cw;
74 unsigned long sw;
75 unsigned long tag;
76 unsigned long ipoff;
77 unsigned long cssel;
78 unsigned long dataoff;
79 unsigned long datasel;
80 struct _fpreg _st[8];
81 unsigned short status;
82 unsigned short magic; /* 0xffff = regular FPU data only */
83
84 /* FXSR FPU environment */
85 unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
86 unsigned long mxcsr;
87 unsigned long reserved;
88 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
89 struct _xmmreg _xmm[8];
90 unsigned long padding1[44];
91
92 union {
93 unsigned long padding2[12];
94 struct _fpx_sw_bytes sw_reserved; /* represents the extended
95 * state info */
96 };
97};
98
99#define X86_FXSR_MAGIC 0x0000
100
101#ifdef __KERNEL__
102struct sigcontext {
103 unsigned short gs, __gsh;
104 unsigned short fs, __fsh;
105 unsigned short es, __esh;
106 unsigned short ds, __dsh;
107 unsigned long di;
108 unsigned long si;
109 unsigned long bp;
110 unsigned long sp;
111 unsigned long bx;
112 unsigned long dx;
113 unsigned long cx;
114 unsigned long ax;
115 unsigned long trapno;
116 unsigned long err;
117 unsigned long ip;
118 unsigned short cs, __csh;
119 unsigned long flags;
120 unsigned long sp_at_signal;
121 unsigned short ss, __ssh;
122
123 /*
124 * fpstate is really (struct _fpstate *) or (struct _xstate *)
125 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
126 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
127 * of extended memory layout. See comments at the defintion of
128 * (struct _fpx_sw_bytes)
129 */
130 void __user *fpstate; /* zero when no FPU/extended context */
131 unsigned long oldmask;
132 unsigned long cr2;
133};
134#else /* __KERNEL__ */
135/*
136 * User-space might still rely on the old definition:
137 */
138struct sigcontext {
139 unsigned short gs, __gsh;
140 unsigned short fs, __fsh;
141 unsigned short es, __esh;
142 unsigned short ds, __dsh;
143 unsigned long edi;
144 unsigned long esi;
145 unsigned long ebp;
146 unsigned long esp;
147 unsigned long ebx;
148 unsigned long edx;
149 unsigned long ecx;
150 unsigned long eax;
151 unsigned long trapno;
152 unsigned long err;
153 unsigned long eip;
154 unsigned short cs, __csh;
155 unsigned long eflags;
156 unsigned long esp_at_signal;
157 unsigned short ss, __ssh;
158 struct _fpstate __user *fpstate;
159 unsigned long oldmask;
160 unsigned long cr2;
161};
162#endif /* !__KERNEL__ */
163
164#else /* __i386__ */
165
166/* FXSAVE frame */
167/* Note: reserved1/2 may someday contain valuable data. Always save/restore
168 them when you change signal frames. */
169struct _fpstate {
170 __u16 cwd;
171 __u16 swd;
172 __u16 twd; /* Note this is not the same as the
173 32bit/x87/FSAVE twd */
174 __u16 fop;
175 __u64 rip;
176 __u64 rdp;
177 __u32 mxcsr;
178 __u32 mxcsr_mask;
179 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */
180 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */
181 __u32 reserved2[12];
182 union {
183 __u32 reserved3[12];
184 struct _fpx_sw_bytes sw_reserved; /* represents the extended
185 * state information */
186 };
187};
188
189#ifdef __KERNEL__
190struct sigcontext {
191 unsigned long r8;
192 unsigned long r9;
193 unsigned long r10;
194 unsigned long r11;
195 unsigned long r12;
196 unsigned long r13;
197 unsigned long r14;
198 unsigned long r15;
199 unsigned long di;
200 unsigned long si;
201 unsigned long bp;
202 unsigned long bx;
203 unsigned long dx;
204 unsigned long ax;
205 unsigned long cx;
206 unsigned long sp;
207 unsigned long ip;
208 unsigned long flags;
209 unsigned short cs;
210 unsigned short gs;
211 unsigned short fs;
212 unsigned short __pad0;
213 unsigned long err;
214 unsigned long trapno;
215 unsigned long oldmask;
216 unsigned long cr2;
217
218 /*
219 * fpstate is really (struct _fpstate *) or (struct _xstate *)
220 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
221 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
222 * of extended memory layout. See comments at the defintion of
223 * (struct _fpx_sw_bytes)
224 */
225 void __user *fpstate; /* zero when no FPU/extended context */
226 unsigned long reserved1[8];
227};
228#else /* __KERNEL__ */
229/*
230 * User-space might still rely on the old definition:
231 */
232struct sigcontext {
233 unsigned long r8;
234 unsigned long r9;
235 unsigned long r10;
236 unsigned long r11;
237 unsigned long r12;
238 unsigned long r13;
239 unsigned long r14;
240 unsigned long r15;
241 unsigned long rdi;
242 unsigned long rsi;
243 unsigned long rbp;
244 unsigned long rbx;
245 unsigned long rdx;
246 unsigned long rax;
247 unsigned long rcx;
248 unsigned long rsp;
249 unsigned long rip;
250 unsigned long eflags; /* RFLAGS */
251 unsigned short cs;
252 unsigned short gs;
253 unsigned short fs;
254 unsigned short __pad0;
255 unsigned long err;
256 unsigned long trapno;
257 unsigned long oldmask;
258 unsigned long cr2;
259 struct _fpstate __user *fpstate; /* zero when no FPU context */
260 unsigned long reserved1[8];
261};
262#endif /* !__KERNEL__ */
263
264#endif /* !__i386__ */
265
266struct _xsave_hdr {
267 __u64 xstate_bv;
268 __u64 reserved1[2];
269 __u64 reserved2[5];
270};
271
272/*
273 * Extended state pointed by the fpstate pointer in the sigcontext.
274 * In addition to the fpstate, information encoded in the xstate_hdr
275 * indicates the presence of other extended state information
276 * supported by the processor and OS.
277 */
278struct _xstate {
279 struct _fpstate fpstate;
280 struct _xsave_hdr xstate_hdr;
281 /* new processor state extensions go here */
282};
283
284#endif /* ASM_X86__SIGCONTEXT_H */
diff --git a/include/asm-x86/sigcontext32.h b/include/asm-x86/sigcontext32.h
deleted file mode 100644
index 8c347032c2f2..000000000000
--- a/include/asm-x86/sigcontext32.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef ASM_X86__SIGCONTEXT32_H
2#define ASM_X86__SIGCONTEXT32_H
3
4/* signal context for 32bit programs. */
5
6#define X86_FXSR_MAGIC 0x0000
7
8struct _fpreg {
9 unsigned short significand[4];
10 unsigned short exponent;
11};
12
13struct _fpxreg {
14 unsigned short significand[4];
15 unsigned short exponent;
16 unsigned short padding[3];
17};
18
19struct _xmmreg {
20 __u32 element[4];
21};
22
23/* FSAVE frame with extensions */
24struct _fpstate_ia32 {
25 /* Regular FPU environment */
26 __u32 cw;
27 __u32 sw;
28 __u32 tag; /* not compatible to 64bit twd */
29 __u32 ipoff;
30 __u32 cssel;
31 __u32 dataoff;
32 __u32 datasel;
33 struct _fpreg _st[8];
34 unsigned short status;
35 unsigned short magic; /* 0xffff = regular FPU data only */
36
37 /* FXSR FPU environment */
38 __u32 _fxsr_env[6];
39 __u32 mxcsr;
40 __u32 reserved;
41 struct _fpxreg _fxsr_st[8];
42 struct _xmmreg _xmm[8]; /* It's actually 16 */
43 __u32 padding[44];
44 union {
45 __u32 padding2[12];
46 struct _fpx_sw_bytes sw_reserved;
47 };
48};
49
50struct sigcontext_ia32 {
51 unsigned short gs, __gsh;
52 unsigned short fs, __fsh;
53 unsigned short es, __esh;
54 unsigned short ds, __dsh;
55 unsigned int di;
56 unsigned int si;
57 unsigned int bp;
58 unsigned int sp;
59 unsigned int bx;
60 unsigned int dx;
61 unsigned int cx;
62 unsigned int ax;
63 unsigned int trapno;
64 unsigned int err;
65 unsigned int ip;
66 unsigned short cs, __csh;
67 unsigned int flags;
68 unsigned int sp_at_signal;
69 unsigned short ss, __ssh;
70 unsigned int fpstate; /* really (struct _fpstate_ia32 *) */
71 unsigned int oldmask;
72 unsigned int cr2;
73};
74
75#endif /* ASM_X86__SIGCONTEXT32_H */
diff --git a/include/asm-x86/siginfo.h b/include/asm-x86/siginfo.h
deleted file mode 100644
index 808bdfb2958c..000000000000
--- a/include/asm-x86/siginfo.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef ASM_X86__SIGINFO_H
2#define ASM_X86__SIGINFO_H
3
4#ifdef __x86_64__
5# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
6#endif
7
8#include <asm-generic/siginfo.h>
9
10#endif /* ASM_X86__SIGINFO_H */
diff --git a/include/asm-x86/signal.h b/include/asm-x86/signal.h
deleted file mode 100644
index 65acc82d267a..000000000000
--- a/include/asm-x86/signal.h
+++ /dev/null
@@ -1,262 +0,0 @@
1#ifndef ASM_X86__SIGNAL_H
2#define ASM_X86__SIGNAL_H
3
4#ifndef __ASSEMBLY__
5#include <linux/types.h>
6#include <linux/time.h>
7#include <linux/compiler.h>
8
9/* Avoid too many header ordering problems. */
10struct siginfo;
11
12#ifdef __KERNEL__
13#include <linux/linkage.h>
14
15/* Most things should be clean enough to redefine this at will, if care
16 is taken to make libc match. */
17
18#define _NSIG 64
19
20#ifdef __i386__
21# define _NSIG_BPW 32
22#else
23# define _NSIG_BPW 64
24#endif
25
26#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
27
28typedef unsigned long old_sigset_t; /* at least 32 bits */
29
30typedef struct {
31 unsigned long sig[_NSIG_WORDS];
32} sigset_t;
33
34#else
35/* Here we must cater to libcs that poke about in kernel headers. */
36
37#define NSIG 32
38typedef unsigned long sigset_t;
39
40#endif /* __KERNEL__ */
41#endif /* __ASSEMBLY__ */
42
43#define SIGHUP 1
44#define SIGINT 2
45#define SIGQUIT 3
46#define SIGILL 4
47#define SIGTRAP 5
48#define SIGABRT 6
49#define SIGIOT 6
50#define SIGBUS 7
51#define SIGFPE 8
52#define SIGKILL 9
53#define SIGUSR1 10
54#define SIGSEGV 11
55#define SIGUSR2 12
56#define SIGPIPE 13
57#define SIGALRM 14
58#define SIGTERM 15
59#define SIGSTKFLT 16
60#define SIGCHLD 17
61#define SIGCONT 18
62#define SIGSTOP 19
63#define SIGTSTP 20
64#define SIGTTIN 21
65#define SIGTTOU 22
66#define SIGURG 23
67#define SIGXCPU 24
68#define SIGXFSZ 25
69#define SIGVTALRM 26
70#define SIGPROF 27
71#define SIGWINCH 28
72#define SIGIO 29
73#define SIGPOLL SIGIO
74/*
75#define SIGLOST 29
76*/
77#define SIGPWR 30
78#define SIGSYS 31
79#define SIGUNUSED 31
80
81/* These should not be considered constants from userland. */
82#define SIGRTMIN 32
83#define SIGRTMAX _NSIG
84
85/*
86 * SA_FLAGS values:
87 *
88 * SA_ONSTACK indicates that a registered stack_t will be used.
89 * SA_RESTART flag to get restarting signals (which were the default long ago)
90 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
91 * SA_RESETHAND clears the handler when the signal is delivered.
92 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
93 * SA_NODEFER prevents the current signal from being masked in the handler.
94 *
95 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
96 * Unix names RESETHAND and NODEFER respectively.
97 */
98#define SA_NOCLDSTOP 0x00000001u
99#define SA_NOCLDWAIT 0x00000002u
100#define SA_SIGINFO 0x00000004u
101#define SA_ONSTACK 0x08000000u
102#define SA_RESTART 0x10000000u
103#define SA_NODEFER 0x40000000u
104#define SA_RESETHAND 0x80000000u
105
106#define SA_NOMASK SA_NODEFER
107#define SA_ONESHOT SA_RESETHAND
108
109#define SA_RESTORER 0x04000000
110
111/*
112 * sigaltstack controls
113 */
114#define SS_ONSTACK 1
115#define SS_DISABLE 2
116
117#define MINSIGSTKSZ 2048
118#define SIGSTKSZ 8192
119
120#include <asm-generic/signal.h>
121
122#ifndef __ASSEMBLY__
123
124#ifdef __i386__
125# ifdef __KERNEL__
126struct old_sigaction {
127 __sighandler_t sa_handler;
128 old_sigset_t sa_mask;
129 unsigned long sa_flags;
130 __sigrestore_t sa_restorer;
131};
132
133struct sigaction {
134 __sighandler_t sa_handler;
135 unsigned long sa_flags;
136 __sigrestore_t sa_restorer;
137 sigset_t sa_mask; /* mask last for extensibility */
138};
139
140struct k_sigaction {
141 struct sigaction sa;
142};
143
144extern void do_notify_resume(struct pt_regs *, void *, __u32);
145
146# else /* __KERNEL__ */
147/* Here we must cater to libcs that poke about in kernel headers. */
148
149struct sigaction {
150 union {
151 __sighandler_t _sa_handler;
152 void (*_sa_sigaction)(int, struct siginfo *, void *);
153 } _u;
154 sigset_t sa_mask;
155 unsigned long sa_flags;
156 void (*sa_restorer)(void);
157};
158
159#define sa_handler _u._sa_handler
160#define sa_sigaction _u._sa_sigaction
161
162# endif /* ! __KERNEL__ */
163#else /* __i386__ */
164
165struct sigaction {
166 __sighandler_t sa_handler;
167 unsigned long sa_flags;
168 __sigrestore_t sa_restorer;
169 sigset_t sa_mask; /* mask last for extensibility */
170};
171
172struct k_sigaction {
173 struct sigaction sa;
174};
175
176#endif /* !__i386__ */
177
178typedef struct sigaltstack {
179 void __user *ss_sp;
180 int ss_flags;
181 size_t ss_size;
182} stack_t;
183
184#ifdef __KERNEL__
185#include <asm/sigcontext.h>
186
187#ifdef __i386__
188
189#define __HAVE_ARCH_SIG_BITOPS
190
191#define sigaddset(set,sig) \
192 (__builtin_constant_p(sig) \
193 ? __const_sigaddset((set), (sig)) \
194 : __gen_sigaddset((set), (sig)))
195
196static inline void __gen_sigaddset(sigset_t *set, int _sig)
197{
198 asm("btsl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc");
199}
200
201static inline void __const_sigaddset(sigset_t *set, int _sig)
202{
203 unsigned long sig = _sig - 1;
204 set->sig[sig / _NSIG_BPW] |= 1 << (sig % _NSIG_BPW);
205}
206
207#define sigdelset(set, sig) \
208 (__builtin_constant_p(sig) \
209 ? __const_sigdelset((set), (sig)) \
210 : __gen_sigdelset((set), (sig)))
211
212
213static inline void __gen_sigdelset(sigset_t *set, int _sig)
214{
215 asm("btrl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc");
216}
217
218static inline void __const_sigdelset(sigset_t *set, int _sig)
219{
220 unsigned long sig = _sig - 1;
221 set->sig[sig / _NSIG_BPW] &= ~(1 << (sig % _NSIG_BPW));
222}
223
224static inline int __const_sigismember(sigset_t *set, int _sig)
225{
226 unsigned long sig = _sig - 1;
227 return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
228}
229
230static inline int __gen_sigismember(sigset_t *set, int _sig)
231{
232 int ret;
233 asm("btl %2,%1\n\tsbbl %0,%0"
234 : "=r"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
235 return ret;
236}
237
238#define sigismember(set, sig) \
239 (__builtin_constant_p(sig) \
240 ? __const_sigismember((set), (sig)) \
241 : __gen_sigismember((set), (sig)))
242
243static inline int sigfindinword(unsigned long word)
244{
245 asm("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc");
246 return word;
247}
248
249struct pt_regs;
250
251#else /* __i386__ */
252
253#undef __HAVE_ARCH_SIG_BITOPS
254
255#endif /* !__i386__ */
256
257#define ptrace_signal_deliver(regs, cookie) do { } while (0)
258
259#endif /* __KERNEL__ */
260#endif /* __ASSEMBLY__ */
261
262#endif /* ASM_X86__SIGNAL_H */
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
deleted file mode 100644
index a6afc29f2dd9..000000000000
--- a/include/asm-x86/smp.h
+++ /dev/null
@@ -1,229 +0,0 @@
1#ifndef ASM_X86__SMP_H
2#define ASM_X86__SMP_H
3#ifndef __ASSEMBLY__
4#include <linux/cpumask.h>
5#include <linux/init.h>
6#include <asm/percpu.h>
7
8/*
9 * We need the APIC definitions automatically as part of 'smp.h'
10 */
11#ifdef CONFIG_X86_LOCAL_APIC
12# include <asm/mpspec.h>
13# include <asm/apic.h>
14# ifdef CONFIG_X86_IO_APIC
15# include <asm/io_apic.h>
16# endif
17#endif
18#include <asm/pda.h>
19#include <asm/thread_info.h>
20
21extern cpumask_t cpu_callout_map;
22extern cpumask_t cpu_initialized;
23extern cpumask_t cpu_callin_map;
24
25extern void (*mtrr_hook)(void);
26extern void zap_low_mappings(void);
27
28extern int __cpuinit get_local_pda(int cpu);
29
30extern int smp_num_siblings;
31extern unsigned int num_processors;
32extern cpumask_t cpu_initialized;
33
34DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
35DECLARE_PER_CPU(cpumask_t, cpu_core_map);
36DECLARE_PER_CPU(u16, cpu_llc_id);
37#ifdef CONFIG_X86_32
38DECLARE_PER_CPU(int, cpu_number);
39#endif
40
41DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
42DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
43
44/* Static state in head.S used to set up a CPU */
45extern struct {
46 void *sp;
47 unsigned short ss;
48} stack_start;
49
50struct smp_ops {
51 void (*smp_prepare_boot_cpu)(void);
52 void (*smp_prepare_cpus)(unsigned max_cpus);
53 void (*smp_cpus_done)(unsigned max_cpus);
54
55 void (*smp_send_stop)(void);
56 void (*smp_send_reschedule)(int cpu);
57
58 int (*cpu_up)(unsigned cpu);
59 int (*cpu_disable)(void);
60 void (*cpu_die)(unsigned int cpu);
61 void (*play_dead)(void);
62
63 void (*send_call_func_ipi)(cpumask_t mask);
64 void (*send_call_func_single_ipi)(int cpu);
65};
66
67/* Globals due to paravirt */
68extern void set_cpu_sibling_map(int cpu);
69
70#ifdef CONFIG_SMP
71#ifndef CONFIG_PARAVIRT
72#define startup_ipi_hook(phys_apicid, start_eip, start_esp) do { } while (0)
73#endif
74extern struct smp_ops smp_ops;
75
76static inline void smp_send_stop(void)
77{
78 smp_ops.smp_send_stop();
79}
80
81static inline void smp_prepare_boot_cpu(void)
82{
83 smp_ops.smp_prepare_boot_cpu();
84}
85
86static inline void smp_prepare_cpus(unsigned int max_cpus)
87{
88 smp_ops.smp_prepare_cpus(max_cpus);
89}
90
91static inline void smp_cpus_done(unsigned int max_cpus)
92{
93 smp_ops.smp_cpus_done(max_cpus);
94}
95
96static inline int __cpu_up(unsigned int cpu)
97{
98 return smp_ops.cpu_up(cpu);
99}
100
101static inline int __cpu_disable(void)
102{
103 return smp_ops.cpu_disable();
104}
105
106static inline void __cpu_die(unsigned int cpu)
107{
108 smp_ops.cpu_die(cpu);
109}
110
111static inline void play_dead(void)
112{
113 smp_ops.play_dead();
114}
115
116static inline void smp_send_reschedule(int cpu)
117{
118 smp_ops.smp_send_reschedule(cpu);
119}
120
121static inline void arch_send_call_function_single_ipi(int cpu)
122{
123 smp_ops.send_call_func_single_ipi(cpu);
124}
125
126static inline void arch_send_call_function_ipi(cpumask_t mask)
127{
128 smp_ops.send_call_func_ipi(mask);
129}
130
131void cpu_disable_common(void);
132void native_smp_prepare_boot_cpu(void);
133void native_smp_prepare_cpus(unsigned int max_cpus);
134void native_smp_cpus_done(unsigned int max_cpus);
135int native_cpu_up(unsigned int cpunum);
136int native_cpu_disable(void);
137void native_cpu_die(unsigned int cpu);
138void native_play_dead(void);
139void play_dead_common(void);
140
141void native_send_call_func_ipi(cpumask_t mask);
142void native_send_call_func_single_ipi(int cpu);
143
144extern void prefill_possible_map(void);
145
146void smp_store_cpu_info(int id);
147#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
148
149/* We don't mark CPUs online until __cpu_up(), so we need another measure */
150static inline int num_booting_cpus(void)
151{
152 return cpus_weight(cpu_callout_map);
153}
154#else
155static inline void prefill_possible_map(void)
156{
157}
158#endif /* CONFIG_SMP */
159
160extern unsigned disabled_cpus __cpuinitdata;
161
162#ifdef CONFIG_X86_32_SMP
163/*
164 * This function is needed by all SMP systems. It must _always_ be valid
165 * from the initial startup. We map APIC_BASE very early in page_setup(),
166 * so this is correct in the x86 case.
167 */
168#define raw_smp_processor_id() (x86_read_percpu(cpu_number))
169extern int safe_smp_processor_id(void);
170
171#elif defined(CONFIG_X86_64_SMP)
172#define raw_smp_processor_id() read_pda(cpunumber)
173
174#define stack_smp_processor_id() \
175({ \
176 struct thread_info *ti; \
177 __asm__("andq %%rsp,%0; ":"=r" (ti) : "0" (CURRENT_MASK)); \
178 ti->cpu; \
179})
180#define safe_smp_processor_id() smp_processor_id()
181
182#else /* !CONFIG_X86_32_SMP && !CONFIG_X86_64_SMP */
183#define cpu_physical_id(cpu) boot_cpu_physical_apicid
184#define safe_smp_processor_id() 0
185#define stack_smp_processor_id() 0
186#endif
187
188#ifdef CONFIG_X86_LOCAL_APIC
189
190#ifndef CONFIG_X86_64
191static inline int logical_smp_processor_id(void)
192{
193 /* we don't want to mark this access volatile - bad code generation */
194 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
195}
196
197#include <mach_apicdef.h>
198static inline unsigned int read_apic_id(void)
199{
200 unsigned int reg;
201
202 reg = *(u32 *)(APIC_BASE + APIC_ID);
203
204 return GET_APIC_ID(reg);
205}
206#endif
207
208
209# if defined(APIC_DEFINITION) || defined(CONFIG_X86_64)
210extern int hard_smp_processor_id(void);
211# else
212#include <mach_apicdef.h>
213static inline int hard_smp_processor_id(void)
214{
215 /* we don't want to mark this access volatile - bad code generation */
216 return read_apic_id();
217}
218# endif /* APIC_DEFINITION */
219
220#else /* CONFIG_X86_LOCAL_APIC */
221
222# ifndef CONFIG_SMP
223# define hard_smp_processor_id() 0
224# endif
225
226#endif /* CONFIG_X86_LOCAL_APIC */
227
228#endif /* __ASSEMBLY__ */
229#endif /* ASM_X86__SMP_H */
diff --git a/include/asm-x86/socket.h b/include/asm-x86/socket.h
deleted file mode 100644
index db73274c83c3..000000000000
--- a/include/asm-x86/socket.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef ASM_X86__SOCKET_H
2#define ASM_X86__SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockopt(2) */
7#define SOL_SOCKET 1
8
9#define SO_DEBUG 1
10#define SO_REUSEADDR 2
11#define SO_TYPE 3
12#define SO_ERROR 4
13#define SO_DONTROUTE 5
14#define SO_BROADCAST 6
15#define SO_SNDBUF 7
16#define SO_RCVBUF 8
17#define SO_SNDBUFFORCE 32
18#define SO_RCVBUFFORCE 33
19#define SO_KEEPALIVE 9
20#define SO_OOBINLINE 10
21#define SO_NO_CHECK 11
22#define SO_PRIORITY 12
23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */
26#define SO_PASSCRED 16
27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18
29#define SO_SNDLOWAT 19
30#define SO_RCVTIMEO 20
31#define SO_SNDTIMEO 21
32
33/* Security levels - as per NRL IPv6 - don't actually do anything */
34#define SO_SECURITY_AUTHENTICATION 22
35#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
36#define SO_SECURITY_ENCRYPTION_NETWORK 24
37
38#define SO_BINDTODEVICE 25
39
40/* Socket filtering */
41#define SO_ATTACH_FILTER 26
42#define SO_DETACH_FILTER 27
43
44#define SO_PEERNAME 28
45#define SO_TIMESTAMP 29
46#define SCM_TIMESTAMP SO_TIMESTAMP
47
48#define SO_ACCEPTCONN 30
49
50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54
55#define SO_MARK 36
56
57#endif /* ASM_X86__SOCKET_H */
diff --git a/include/asm-x86/sockios.h b/include/asm-x86/sockios.h
deleted file mode 100644
index a006704fdc84..000000000000
--- a/include/asm-x86/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef ASM_X86__SOCKIOS_H
2#define ASM_X86__SOCKIOS_H
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif /* ASM_X86__SOCKIOS_H */
diff --git a/include/asm-x86/sparsemem.h b/include/asm-x86/sparsemem.h
deleted file mode 100644
index 38f8e6bc3186..000000000000
--- a/include/asm-x86/sparsemem.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef ASM_X86__SPARSEMEM_H
2#define ASM_X86__SPARSEMEM_H
3
4#ifdef CONFIG_SPARSEMEM
5/*
6 * generic non-linear memory support:
7 *
8 * 1) we will not split memory into more chunks than will fit into the flags
9 * field of the struct page
10 *
11 * SECTION_SIZE_BITS 2^n: size of each section
12 * MAX_PHYSADDR_BITS 2^n: max size of physical address space
13 * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space
14 *
15 */
16
17#ifdef CONFIG_X86_32
18# ifdef CONFIG_X86_PAE
19# define SECTION_SIZE_BITS 29
20# define MAX_PHYSADDR_BITS 36
21# define MAX_PHYSMEM_BITS 36
22# else
23# define SECTION_SIZE_BITS 26
24# define MAX_PHYSADDR_BITS 32
25# define MAX_PHYSMEM_BITS 32
26# endif
27#else /* CONFIG_X86_32 */
28# define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */
29# define MAX_PHYSADDR_BITS 44
30# define MAX_PHYSMEM_BITS 44
31#endif
32
33#endif /* CONFIG_SPARSEMEM */
34#endif /* ASM_X86__SPARSEMEM_H */
diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h
deleted file mode 100644
index 157ff7fab97a..000000000000
--- a/include/asm-x86/spinlock.h
+++ /dev/null
@@ -1,364 +0,0 @@
1#ifndef ASM_X86__SPINLOCK_H
2#define ASM_X86__SPINLOCK_H
3
4#include <asm/atomic.h>
5#include <asm/rwlock.h>
6#include <asm/page.h>
7#include <asm/processor.h>
8#include <linux/compiler.h>
9#include <asm/paravirt.h>
10/*
11 * Your basic SMP spinlocks, allowing only a single CPU anywhere
12 *
13 * Simple spin lock operations. There are two variants, one clears IRQ's
14 * on the local processor, one does not.
15 *
16 * These are fair FIFO ticket locks, which are currently limited to 256
17 * CPUs.
18 *
19 * (the type definitions are in asm/spinlock_types.h)
20 */
21
22#ifdef CONFIG_X86_32
23# define LOCK_PTR_REG "a"
24# define REG_PTR_MODE "k"
25#else
26# define LOCK_PTR_REG "D"
27# define REG_PTR_MODE "q"
28#endif
29
30#if defined(CONFIG_X86_32) && \
31 (defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE))
32/*
33 * On PPro SMP or if we are using OOSTORE, we use a locked operation to unlock
34 * (PPro errata 66, 92)
35 */
36# define UNLOCK_LOCK_PREFIX LOCK_PREFIX
37#else
38# define UNLOCK_LOCK_PREFIX
39#endif
40
41/*
42 * Ticket locks are conceptually two parts, one indicating the current head of
43 * the queue, and the other indicating the current tail. The lock is acquired
44 * by atomically noting the tail and incrementing it by one (thus adding
45 * ourself to the queue and noting our position), then waiting until the head
46 * becomes equal to the the initial value of the tail.
47 *
48 * We use an xadd covering *both* parts of the lock, to increment the tail and
49 * also load the position of the head, which takes care of memory ordering
50 * issues and should be optimal for the uncontended case. Note the tail must be
51 * in the high part, because a wide xadd increment of the low part would carry
52 * up and contaminate the high part.
53 *
54 * With fewer than 2^8 possible CPUs, we can use x86's partial registers to
55 * save some instructions and make the code more elegant. There really isn't
56 * much between them in performance though, especially as locks are out of line.
57 */
58#if (NR_CPUS < 256)
59#define TICKET_SHIFT 8
60
61static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
62{
63 short inc = 0x0100;
64
65 asm volatile (
66 LOCK_PREFIX "xaddw %w0, %1\n"
67 "1:\t"
68 "cmpb %h0, %b0\n\t"
69 "je 2f\n\t"
70 "rep ; nop\n\t"
71 "movb %1, %b0\n\t"
72 /* don't need lfence here, because loads are in-order */
73 "jmp 1b\n"
74 "2:"
75 : "+Q" (inc), "+m" (lock->slock)
76 :
77 : "memory", "cc");
78}
79
80static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
81{
82 int tmp, new;
83
84 asm volatile("movzwl %2, %0\n\t"
85 "cmpb %h0,%b0\n\t"
86 "leal 0x100(%" REG_PTR_MODE "0), %1\n\t"
87 "jne 1f\n\t"
88 LOCK_PREFIX "cmpxchgw %w1,%2\n\t"
89 "1:"
90 "sete %b1\n\t"
91 "movzbl %b1,%0\n\t"
92 : "=&a" (tmp), "=&q" (new), "+m" (lock->slock)
93 :
94 : "memory", "cc");
95
96 return tmp;
97}
98
99static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock)
100{
101 asm volatile(UNLOCK_LOCK_PREFIX "incb %0"
102 : "+m" (lock->slock)
103 :
104 : "memory", "cc");
105}
106#else
107#define TICKET_SHIFT 16
108
109static __always_inline void __ticket_spin_lock(raw_spinlock_t *lock)
110{
111 int inc = 0x00010000;
112 int tmp;
113
114 asm volatile(LOCK_PREFIX "xaddl %0, %1\n"
115 "movzwl %w0, %2\n\t"
116 "shrl $16, %0\n\t"
117 "1:\t"
118 "cmpl %0, %2\n\t"
119 "je 2f\n\t"
120 "rep ; nop\n\t"
121 "movzwl %1, %2\n\t"
122 /* don't need lfence here, because loads are in-order */
123 "jmp 1b\n"
124 "2:"
125 : "+r" (inc), "+m" (lock->slock), "=&r" (tmp)
126 :
127 : "memory", "cc");
128}
129
130static __always_inline int __ticket_spin_trylock(raw_spinlock_t *lock)
131{
132 int tmp;
133 int new;
134
135 asm volatile("movl %2,%0\n\t"
136 "movl %0,%1\n\t"
137 "roll $16, %0\n\t"
138 "cmpl %0,%1\n\t"
139 "leal 0x00010000(%" REG_PTR_MODE "0), %1\n\t"
140 "jne 1f\n\t"
141 LOCK_PREFIX "cmpxchgl %1,%2\n\t"
142 "1:"
143 "sete %b1\n\t"
144 "movzbl %b1,%0\n\t"
145 : "=&a" (tmp), "=&q" (new), "+m" (lock->slock)
146 :
147 : "memory", "cc");
148
149 return tmp;
150}
151
152static __always_inline void __ticket_spin_unlock(raw_spinlock_t *lock)
153{
154 asm volatile(UNLOCK_LOCK_PREFIX "incw %0"
155 : "+m" (lock->slock)
156 :
157 : "memory", "cc");
158}
159#endif
160
161static inline int __ticket_spin_is_locked(raw_spinlock_t *lock)
162{
163 int tmp = ACCESS_ONCE(lock->slock);
164
165 return !!(((tmp >> TICKET_SHIFT) ^ tmp) & ((1 << TICKET_SHIFT) - 1));
166}
167
168static inline int __ticket_spin_is_contended(raw_spinlock_t *lock)
169{
170 int tmp = ACCESS_ONCE(lock->slock);
171
172 return (((tmp >> TICKET_SHIFT) - tmp) & ((1 << TICKET_SHIFT) - 1)) > 1;
173}
174
175#ifdef CONFIG_PARAVIRT
176/*
177 * Define virtualization-friendly old-style lock byte lock, for use in
178 * pv_lock_ops if desired.
179 *
180 * This differs from the pre-2.6.24 spinlock by always using xchgb
181 * rather than decb to take the lock; this allows it to use a
182 * zero-initialized lock structure. It also maintains a 1-byte
183 * contention counter, so that we can implement
184 * __byte_spin_is_contended.
185 */
186struct __byte_spinlock {
187 s8 lock;
188 s8 spinners;
189};
190
191static inline int __byte_spin_is_locked(raw_spinlock_t *lock)
192{
193 struct __byte_spinlock *bl = (struct __byte_spinlock *)lock;
194 return bl->lock != 0;
195}
196
197static inline int __byte_spin_is_contended(raw_spinlock_t *lock)
198{
199 struct __byte_spinlock *bl = (struct __byte_spinlock *)lock;
200 return bl->spinners != 0;
201}
202
203static inline void __byte_spin_lock(raw_spinlock_t *lock)
204{
205 struct __byte_spinlock *bl = (struct __byte_spinlock *)lock;
206 s8 val = 1;
207
208 asm("1: xchgb %1, %0\n"
209 " test %1,%1\n"
210 " jz 3f\n"
211 " " LOCK_PREFIX "incb %2\n"
212 "2: rep;nop\n"
213 " cmpb $1, %0\n"
214 " je 2b\n"
215 " " LOCK_PREFIX "decb %2\n"
216 " jmp 1b\n"
217 "3:"
218 : "+m" (bl->lock), "+q" (val), "+m" (bl->spinners): : "memory");
219}
220
221static inline int __byte_spin_trylock(raw_spinlock_t *lock)
222{
223 struct __byte_spinlock *bl = (struct __byte_spinlock *)lock;
224 u8 old = 1;
225
226 asm("xchgb %1,%0"
227 : "+m" (bl->lock), "+q" (old) : : "memory");
228
229 return old == 0;
230}
231
232static inline void __byte_spin_unlock(raw_spinlock_t *lock)
233{
234 struct __byte_spinlock *bl = (struct __byte_spinlock *)lock;
235 smp_wmb();
236 bl->lock = 0;
237}
238#else /* !CONFIG_PARAVIRT */
239static inline int __raw_spin_is_locked(raw_spinlock_t *lock)
240{
241 return __ticket_spin_is_locked(lock);
242}
243
244static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
245{
246 return __ticket_spin_is_contended(lock);
247}
248
249static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
250{
251 __ticket_spin_lock(lock);
252}
253
254static __always_inline int __raw_spin_trylock(raw_spinlock_t *lock)
255{
256 return __ticket_spin_trylock(lock);
257}
258
259static __always_inline void __raw_spin_unlock(raw_spinlock_t *lock)
260{
261 __ticket_spin_unlock(lock);
262}
263
264static __always_inline void __raw_spin_lock_flags(raw_spinlock_t *lock,
265 unsigned long flags)
266{
267 __raw_spin_lock(lock);
268}
269
270#endif /* CONFIG_PARAVIRT */
271
272static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock)
273{
274 while (__raw_spin_is_locked(lock))
275 cpu_relax();
276}
277
278/*
279 * Read-write spinlocks, allowing multiple readers
280 * but only one writer.
281 *
282 * NOTE! it is quite common to have readers in interrupts
283 * but no interrupt writers. For those circumstances we
284 * can "mix" irq-safe locks - any writer needs to get a
285 * irq-safe write-lock, but readers can get non-irqsafe
286 * read-locks.
287 *
288 * On x86, we implement read-write locks as a 32-bit counter
289 * with the high bit (sign) being the "contended" bit.
290 */
291
292/**
293 * read_can_lock - would read_trylock() succeed?
294 * @lock: the rwlock in question.
295 */
296static inline int __raw_read_can_lock(raw_rwlock_t *lock)
297{
298 return (int)(lock)->lock > 0;
299}
300
301/**
302 * write_can_lock - would write_trylock() succeed?
303 * @lock: the rwlock in question.
304 */
305static inline int __raw_write_can_lock(raw_rwlock_t *lock)
306{
307 return (lock)->lock == RW_LOCK_BIAS;
308}
309
310static inline void __raw_read_lock(raw_rwlock_t *rw)
311{
312 asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t"
313 "jns 1f\n"
314 "call __read_lock_failed\n\t"
315 "1:\n"
316 ::LOCK_PTR_REG (rw) : "memory");
317}
318
319static inline void __raw_write_lock(raw_rwlock_t *rw)
320{
321 asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t"
322 "jz 1f\n"
323 "call __write_lock_failed\n\t"
324 "1:\n"
325 ::LOCK_PTR_REG (rw), "i" (RW_LOCK_BIAS) : "memory");
326}
327
328static inline int __raw_read_trylock(raw_rwlock_t *lock)
329{
330 atomic_t *count = (atomic_t *)lock;
331
332 atomic_dec(count);
333 if (atomic_read(count) >= 0)
334 return 1;
335 atomic_inc(count);
336 return 0;
337}
338
339static inline int __raw_write_trylock(raw_rwlock_t *lock)
340{
341 atomic_t *count = (atomic_t *)lock;
342
343 if (atomic_sub_and_test(RW_LOCK_BIAS, count))
344 return 1;
345 atomic_add(RW_LOCK_BIAS, count);
346 return 0;
347}
348
349static inline void __raw_read_unlock(raw_rwlock_t *rw)
350{
351 asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory");
352}
353
354static inline void __raw_write_unlock(raw_rwlock_t *rw)
355{
356 asm volatile(LOCK_PREFIX "addl %1, %0"
357 : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
358}
359
360#define _raw_spin_relax(lock) cpu_relax()
361#define _raw_read_relax(lock) cpu_relax()
362#define _raw_write_relax(lock) cpu_relax()
363
364#endif /* ASM_X86__SPINLOCK_H */
diff --git a/include/asm-x86/spinlock_types.h b/include/asm-x86/spinlock_types.h
deleted file mode 100644
index 6aa9b562c508..000000000000
--- a/include/asm-x86/spinlock_types.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef ASM_X86__SPINLOCK_TYPES_H
2#define ASM_X86__SPINLOCK_TYPES_H
3
4#ifndef __LINUX_SPINLOCK_TYPES_H
5# error "please don't include this file directly"
6#endif
7
8typedef struct raw_spinlock {
9 unsigned int slock;
10} raw_spinlock_t;
11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
13
14typedef struct {
15 unsigned int lock;
16} raw_rwlock_t;
17
18#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
19
20#endif /* ASM_X86__SPINLOCK_TYPES_H */
diff --git a/include/asm-x86/srat.h b/include/asm-x86/srat.h
deleted file mode 100644
index 5363e4f7e1cd..000000000000
--- a/include/asm-x86/srat.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * Some of the code in this file has been gleaned from the 64 bit
3 * discontigmem support code base.
4 *
5 * Copyright (C) 2002, IBM Corp.
6 *
7 * All rights reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
17 * NON INFRINGEMENT. See the GNU General Public License for more
18 * details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 * Send feedback to Pat Gaughen <gone@us.ibm.com>
25 */
26
27#ifndef ASM_X86__SRAT_H
28#define ASM_X86__SRAT_H
29
30#ifdef CONFIG_ACPI_NUMA
31extern int get_memcfg_from_srat(void);
32#else
33static inline int get_memcfg_from_srat(void)
34{
35 return 0;
36}
37#endif
38
39#endif /* ASM_X86__SRAT_H */
diff --git a/include/asm-x86/stacktrace.h b/include/asm-x86/stacktrace.h
deleted file mode 100644
index f43517e28532..000000000000
--- a/include/asm-x86/stacktrace.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef ASM_X86__STACKTRACE_H
2#define ASM_X86__STACKTRACE_H
3
4extern int kstack_depth_to_print;
5
6/* Generic stack tracer with callbacks */
7
8struct stacktrace_ops {
9 void (*warning)(void *data, char *msg);
10 /* msg must contain %s for the symbol */
11 void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
12 void (*address)(void *data, unsigned long address, int reliable);
13 /* On negative return stop dumping */
14 int (*stack)(void *data, char *name);
15};
16
17void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
18 unsigned long *stack, unsigned long bp,
19 const struct stacktrace_ops *ops, void *data);
20
21#endif /* ASM_X86__STACKTRACE_H */
diff --git a/include/asm-x86/stat.h b/include/asm-x86/stat.h
deleted file mode 100644
index 1e120f628905..000000000000
--- a/include/asm-x86/stat.h
+++ /dev/null
@@ -1,114 +0,0 @@
1#ifndef ASM_X86__STAT_H
2#define ASM_X86__STAT_H
3
4#define STAT_HAVE_NSEC 1
5
6#ifdef __i386__
7struct stat {
8 unsigned long st_dev;
9 unsigned long st_ino;
10 unsigned short st_mode;
11 unsigned short st_nlink;
12 unsigned short st_uid;
13 unsigned short st_gid;
14 unsigned long st_rdev;
15 unsigned long st_size;
16 unsigned long st_blksize;
17 unsigned long st_blocks;
18 unsigned long st_atime;
19 unsigned long st_atime_nsec;
20 unsigned long st_mtime;
21 unsigned long st_mtime_nsec;
22 unsigned long st_ctime;
23 unsigned long st_ctime_nsec;
24 unsigned long __unused4;
25 unsigned long __unused5;
26};
27
28#define STAT64_HAS_BROKEN_ST_INO 1
29
30/* This matches struct stat64 in glibc2.1, hence the absolutely
31 * insane amounts of padding around dev_t's.
32 */
33struct stat64 {
34 unsigned long long st_dev;
35 unsigned char __pad0[4];
36
37 unsigned long __st_ino;
38
39 unsigned int st_mode;
40 unsigned int st_nlink;
41
42 unsigned long st_uid;
43 unsigned long st_gid;
44
45 unsigned long long st_rdev;
46 unsigned char __pad3[4];
47
48 long long st_size;
49 unsigned long st_blksize;
50
51 /* Number 512-byte blocks allocated. */
52 unsigned long long st_blocks;
53
54 unsigned long st_atime;
55 unsigned long st_atime_nsec;
56
57 unsigned long st_mtime;
58 unsigned int st_mtime_nsec;
59
60 unsigned long st_ctime;
61 unsigned long st_ctime_nsec;
62
63 unsigned long long st_ino;
64};
65
66#else /* __i386__ */
67
68struct stat {
69 unsigned long st_dev;
70 unsigned long st_ino;
71 unsigned long st_nlink;
72
73 unsigned int st_mode;
74 unsigned int st_uid;
75 unsigned int st_gid;
76 unsigned int __pad0;
77 unsigned long st_rdev;
78 long st_size;
79 long st_blksize;
80 long st_blocks; /* Number 512-byte blocks allocated. */
81
82 unsigned long st_atime;
83 unsigned long st_atime_nsec;
84 unsigned long st_mtime;
85 unsigned long st_mtime_nsec;
86 unsigned long st_ctime;
87 unsigned long st_ctime_nsec;
88 long __unused[3];
89};
90#endif
91
92/* for 32bit emulation and 32 bit kernels */
93struct __old_kernel_stat {
94 unsigned short st_dev;
95 unsigned short st_ino;
96 unsigned short st_mode;
97 unsigned short st_nlink;
98 unsigned short st_uid;
99 unsigned short st_gid;
100 unsigned short st_rdev;
101#ifdef __i386__
102 unsigned long st_size;
103 unsigned long st_atime;
104 unsigned long st_mtime;
105 unsigned long st_ctime;
106#else
107 unsigned int st_size;
108 unsigned int st_atime;
109 unsigned int st_mtime;
110 unsigned int st_ctime;
111#endif
112};
113
114#endif /* ASM_X86__STAT_H */
diff --git a/include/asm-x86/statfs.h b/include/asm-x86/statfs.h
deleted file mode 100644
index ca5dc19dd461..000000000000
--- a/include/asm-x86/statfs.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef ASM_X86__STATFS_H
2#define ASM_X86__STATFS_H
3
4/*
5 * We need compat_statfs64 to be packed, because the i386 ABI won't
6 * add padding at the end to bring it to a multiple of 8 bytes, but
7 * the x86_64 ABI will.
8 */
9#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4)))
10
11#include <asm-generic/statfs.h>
12#endif /* ASM_X86__STATFS_H */
diff --git a/include/asm-x86/string.h b/include/asm-x86/string.h
deleted file mode 100644
index 6dfd6d9373a0..000000000000
--- a/include/asm-x86/string.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "string_32.h"
3#else
4# include "string_64.h"
5#endif
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h
deleted file mode 100644
index 487843ed245a..000000000000
--- a/include/asm-x86/string_32.h
+++ /dev/null
@@ -1,326 +0,0 @@
1#ifndef ASM_X86__STRING_32_H
2#define ASM_X86__STRING_32_H
3
4#ifdef __KERNEL__
5
6/* Let gcc decide whether to inline or use the out of line functions */
7
8#define __HAVE_ARCH_STRCPY
9extern char *strcpy(char *dest, const char *src);
10
11#define __HAVE_ARCH_STRNCPY
12extern char *strncpy(char *dest, const char *src, size_t count);
13
14#define __HAVE_ARCH_STRCAT
15extern char *strcat(char *dest, const char *src);
16
17#define __HAVE_ARCH_STRNCAT
18extern char *strncat(char *dest, const char *src, size_t count);
19
20#define __HAVE_ARCH_STRCMP
21extern int strcmp(const char *cs, const char *ct);
22
23#define __HAVE_ARCH_STRNCMP
24extern int strncmp(const char *cs, const char *ct, size_t count);
25
26#define __HAVE_ARCH_STRCHR
27extern char *strchr(const char *s, int c);
28
29#define __HAVE_ARCH_STRLEN
30extern size_t strlen(const char *s);
31
32static __always_inline void *__memcpy(void *to, const void *from, size_t n)
33{
34 int d0, d1, d2;
35 asm volatile("rep ; movsl\n\t"
36 "movl %4,%%ecx\n\t"
37 "andl $3,%%ecx\n\t"
38 "jz 1f\n\t"
39 "rep ; movsb\n\t"
40 "1:"
41 : "=&c" (d0), "=&D" (d1), "=&S" (d2)
42 : "0" (n / 4), "g" (n), "1" ((long)to), "2" ((long)from)
43 : "memory");
44 return to;
45}
46
47/*
48 * This looks ugly, but the compiler can optimize it totally,
49 * as the count is constant.
50 */
51static __always_inline void *__constant_memcpy(void *to, const void *from,
52 size_t n)
53{
54 long esi, edi;
55 if (!n)
56 return to;
57
58 switch (n) {
59 case 1:
60 *(char *)to = *(char *)from;
61 return to;
62 case 2:
63 *(short *)to = *(short *)from;
64 return to;
65 case 4:
66 *(int *)to = *(int *)from;
67 return to;
68
69 case 3:
70 *(short *)to = *(short *)from;
71 *((char *)to + 2) = *((char *)from + 2);
72 return to;
73 case 5:
74 *(int *)to = *(int *)from;
75 *((char *)to + 4) = *((char *)from + 4);
76 return to;
77 case 6:
78 *(int *)to = *(int *)from;
79 *((short *)to + 2) = *((short *)from + 2);
80 return to;
81 case 8:
82 *(int *)to = *(int *)from;
83 *((int *)to + 1) = *((int *)from + 1);
84 return to;
85 }
86
87 esi = (long)from;
88 edi = (long)to;
89 if (n >= 5 * 4) {
90 /* large block: use rep prefix */
91 int ecx;
92 asm volatile("rep ; movsl"
93 : "=&c" (ecx), "=&D" (edi), "=&S" (esi)
94 : "0" (n / 4), "1" (edi), "2" (esi)
95 : "memory"
96 );
97 } else {
98 /* small block: don't clobber ecx + smaller code */
99 if (n >= 4 * 4)
100 asm volatile("movsl"
101 : "=&D"(edi), "=&S"(esi)
102 : "0"(edi), "1"(esi)
103 : "memory");
104 if (n >= 3 * 4)
105 asm volatile("movsl"
106 : "=&D"(edi), "=&S"(esi)
107 : "0"(edi), "1"(esi)
108 : "memory");
109 if (n >= 2 * 4)
110 asm volatile("movsl"
111 : "=&D"(edi), "=&S"(esi)
112 : "0"(edi), "1"(esi)
113 : "memory");
114 if (n >= 1 * 4)
115 asm volatile("movsl"
116 : "=&D"(edi), "=&S"(esi)
117 : "0"(edi), "1"(esi)
118 : "memory");
119 }
120 switch (n % 4) {
121 /* tail */
122 case 0:
123 return to;
124 case 1:
125 asm volatile("movsb"
126 : "=&D"(edi), "=&S"(esi)
127 : "0"(edi), "1"(esi)
128 : "memory");
129 return to;
130 case 2:
131 asm volatile("movsw"
132 : "=&D"(edi), "=&S"(esi)
133 : "0"(edi), "1"(esi)
134 : "memory");
135 return to;
136 default:
137 asm volatile("movsw\n\tmovsb"
138 : "=&D"(edi), "=&S"(esi)
139 : "0"(edi), "1"(esi)
140 : "memory");
141 return to;
142 }
143}
144
145#define __HAVE_ARCH_MEMCPY
146
147#ifdef CONFIG_X86_USE_3DNOW
148
149#include <asm/mmx.h>
150
151/*
152 * This CPU favours 3DNow strongly (eg AMD Athlon)
153 */
154
155static inline void *__constant_memcpy3d(void *to, const void *from, size_t len)
156{
157 if (len < 512)
158 return __constant_memcpy(to, from, len);
159 return _mmx_memcpy(to, from, len);
160}
161
162static inline void *__memcpy3d(void *to, const void *from, size_t len)
163{
164 if (len < 512)
165 return __memcpy(to, from, len);
166 return _mmx_memcpy(to, from, len);
167}
168
169#define memcpy(t, f, n) \
170 (__builtin_constant_p((n)) \
171 ? __constant_memcpy3d((t), (f), (n)) \
172 : __memcpy3d((t), (f), (n)))
173
174#else
175
176/*
177 * No 3D Now!
178 */
179
180#define memcpy(t, f, n) \
181 (__builtin_constant_p((n)) \
182 ? __constant_memcpy((t), (f), (n)) \
183 : __memcpy((t), (f), (n)))
184
185#endif
186
187#define __HAVE_ARCH_MEMMOVE
188void *memmove(void *dest, const void *src, size_t n);
189
190#define memcmp __builtin_memcmp
191
192#define __HAVE_ARCH_MEMCHR
193extern void *memchr(const void *cs, int c, size_t count);
194
195static inline void *__memset_generic(void *s, char c, size_t count)
196{
197 int d0, d1;
198 asm volatile("rep\n\t"
199 "stosb"
200 : "=&c" (d0), "=&D" (d1)
201 : "a" (c), "1" (s), "0" (count)
202 : "memory");
203 return s;
204}
205
206/* we might want to write optimized versions of these later */
207#define __constant_count_memset(s, c, count) __memset_generic((s), (c), (count))
208
209/*
210 * memset(x, 0, y) is a reasonably common thing to do, so we want to fill
211 * things 32 bits at a time even when we don't know the size of the
212 * area at compile-time..
213 */
214static __always_inline
215void *__constant_c_memset(void *s, unsigned long c, size_t count)
216{
217 int d0, d1;
218 asm volatile("rep ; stosl\n\t"
219 "testb $2,%b3\n\t"
220 "je 1f\n\t"
221 "stosw\n"
222 "1:\ttestb $1,%b3\n\t"
223 "je 2f\n\t"
224 "stosb\n"
225 "2:"
226 : "=&c" (d0), "=&D" (d1)
227 : "a" (c), "q" (count), "0" (count/4), "1" ((long)s)
228 : "memory");
229 return s;
230}
231
232/* Added by Gertjan van Wingerde to make minix and sysv module work */
233#define __HAVE_ARCH_STRNLEN
234extern size_t strnlen(const char *s, size_t count);
235/* end of additional stuff */
236
237#define __HAVE_ARCH_STRSTR
238extern char *strstr(const char *cs, const char *ct);
239
240/*
241 * This looks horribly ugly, but the compiler can optimize it totally,
242 * as we by now know that both pattern and count is constant..
243 */
244static __always_inline
245void *__constant_c_and_count_memset(void *s, unsigned long pattern,
246 size_t count)
247{
248 switch (count) {
249 case 0:
250 return s;
251 case 1:
252 *(unsigned char *)s = pattern & 0xff;
253 return s;
254 case 2:
255 *(unsigned short *)s = pattern & 0xffff;
256 return s;
257 case 3:
258 *(unsigned short *)s = pattern & 0xffff;
259 *((unsigned char *)s + 2) = pattern & 0xff;
260 return s;
261 case 4:
262 *(unsigned long *)s = pattern;
263 return s;
264 }
265
266#define COMMON(x) \
267 asm volatile("rep ; stosl" \
268 x \
269 : "=&c" (d0), "=&D" (d1) \
270 : "a" (eax), "0" (count/4), "1" ((long)s) \
271 : "memory")
272
273 {
274 int d0, d1;
275#if __GNUC__ == 4 && __GNUC_MINOR__ == 0
276 /* Workaround for broken gcc 4.0 */
277 register unsigned long eax asm("%eax") = pattern;
278#else
279 unsigned long eax = pattern;
280#endif
281
282 switch (count % 4) {
283 case 0:
284 COMMON("");
285 return s;
286 case 1:
287 COMMON("\n\tstosb");
288 return s;
289 case 2:
290 COMMON("\n\tstosw");
291 return s;
292 default:
293 COMMON("\n\tstosw\n\tstosb");
294 return s;
295 }
296 }
297
298#undef COMMON
299}
300
301#define __constant_c_x_memset(s, c, count) \
302 (__builtin_constant_p(count) \
303 ? __constant_c_and_count_memset((s), (c), (count)) \
304 : __constant_c_memset((s), (c), (count)))
305
306#define __memset(s, c, count) \
307 (__builtin_constant_p(count) \
308 ? __constant_count_memset((s), (c), (count)) \
309 : __memset_generic((s), (c), (count)))
310
311#define __HAVE_ARCH_MEMSET
312#define memset(s, c, count) \
313 (__builtin_constant_p(c) \
314 ? __constant_c_x_memset((s), (0x01010101UL * (unsigned char)(c)), \
315 (count)) \
316 : __memset((s), (c), (count)))
317
318/*
319 * find the first occurrence of byte 'c', or 1 past the area if none
320 */
321#define __HAVE_ARCH_MEMSCAN
322extern void *memscan(void *addr, int c, size_t size);
323
324#endif /* __KERNEL__ */
325
326#endif /* ASM_X86__STRING_32_H */
diff --git a/include/asm-x86/string_64.h b/include/asm-x86/string_64.h
deleted file mode 100644
index a2add11d3b66..000000000000
--- a/include/asm-x86/string_64.h
+++ /dev/null
@@ -1,60 +0,0 @@
1#ifndef ASM_X86__STRING_64_H
2#define ASM_X86__STRING_64_H
3
4#ifdef __KERNEL__
5
6/* Written 2002 by Andi Kleen */
7
8/* Only used for special circumstances. Stolen from i386/string.h */
9static __always_inline void *__inline_memcpy(void *to, const void *from, size_t n)
10{
11 unsigned long d0, d1, d2;
12 asm volatile("rep ; movsl\n\t"
13 "testb $2,%b4\n\t"
14 "je 1f\n\t"
15 "movsw\n"
16 "1:\ttestb $1,%b4\n\t"
17 "je 2f\n\t"
18 "movsb\n"
19 "2:"
20 : "=&c" (d0), "=&D" (d1), "=&S" (d2)
21 : "0" (n / 4), "q" (n), "1" ((long)to), "2" ((long)from)
22 : "memory");
23 return to;
24}
25
26/* Even with __builtin_ the compiler may decide to use the out of line
27 function. */
28
29#define __HAVE_ARCH_MEMCPY 1
30#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
31extern void *memcpy(void *to, const void *from, size_t len);
32#else
33extern void *__memcpy(void *to, const void *from, size_t len);
34#define memcpy(dst, src, len) \
35({ \
36 size_t __len = (len); \
37 void *__ret; \
38 if (__builtin_constant_p(len) && __len >= 64) \
39 __ret = __memcpy((dst), (src), __len); \
40 else \
41 __ret = __builtin_memcpy((dst), (src), __len); \
42 __ret; \
43})
44#endif
45
46#define __HAVE_ARCH_MEMSET
47void *memset(void *s, int c, size_t n);
48
49#define __HAVE_ARCH_MEMMOVE
50void *memmove(void *dest, const void *src, size_t count);
51
52int memcmp(const void *cs, const void *ct, size_t count);
53size_t strlen(const char *s);
54char *strcpy(char *dest, const char *src);
55char *strcat(char *dest, const char *src);
56int strcmp(const char *cs, const char *ct);
57
58#endif /* __KERNEL__ */
59
60#endif /* ASM_X86__STRING_64_H */
diff --git a/include/asm-x86/summit/apic.h b/include/asm-x86/summit/apic.h
deleted file mode 100644
index c5b2e4b10358..000000000000
--- a/include/asm-x86/summit/apic.h
+++ /dev/null
@@ -1,185 +0,0 @@
1#ifndef __ASM_SUMMIT_APIC_H
2#define __ASM_SUMMIT_APIC_H
3
4#include <asm/smp.h>
5
6#define esr_disable (1)
7#define NO_BALANCE_IRQ (0)
8
9/* In clustered mode, the high nibble of APIC ID is a cluster number.
10 * The low nibble is a 4-bit bitmap. */
11#define XAPIC_DEST_CPUS_SHIFT 4
12#define XAPIC_DEST_CPUS_MASK ((1u << XAPIC_DEST_CPUS_SHIFT) - 1)
13#define XAPIC_DEST_CLUSTER_MASK (XAPIC_DEST_CPUS_MASK << XAPIC_DEST_CPUS_SHIFT)
14
15#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
16
17static inline cpumask_t target_cpus(void)
18{
19 /* CPU_MASK_ALL (0xff) has undefined behaviour with
20 * dest_LowestPrio mode logical clustered apic interrupt routing
21 * Just start on cpu 0. IRQ balancing will spread load
22 */
23 return cpumask_of_cpu(0);
24}
25#define TARGET_CPUS (target_cpus())
26
27#define INT_DELIVERY_MODE (dest_LowestPrio)
28#define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */
29
30static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
31{
32 return 0;
33}
34
35/* we don't use the phys_cpu_present_map to indicate apicid presence */
36static inline unsigned long check_apicid_present(int bit)
37{
38 return 1;
39}
40
41#define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)
42
43extern u8 cpu_2_logical_apicid[];
44
45static inline void init_apic_ldr(void)
46{
47 unsigned long val, id;
48 int count = 0;
49 u8 my_id = (u8)hard_smp_processor_id();
50 u8 my_cluster = (u8)apicid_cluster(my_id);
51#ifdef CONFIG_SMP
52 u8 lid;
53 int i;
54
55 /* Create logical APIC IDs by counting CPUs already in cluster. */
56 for (count = 0, i = NR_CPUS; --i >= 0; ) {
57 lid = cpu_2_logical_apicid[i];
58 if (lid != BAD_APICID && apicid_cluster(lid) == my_cluster)
59 ++count;
60 }
61#endif
62 /* We only have a 4 wide bitmap in cluster mode. If a deranged
63 * BIOS puts 5 CPUs in one APIC cluster, we're hosed. */
64 BUG_ON(count >= XAPIC_DEST_CPUS_SHIFT);
65 id = my_cluster | (1UL << count);
66 apic_write(APIC_DFR, APIC_DFR_VALUE);
67 val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
68 val |= SET_APIC_LOGICAL_ID(id);
69 apic_write(APIC_LDR, val);
70}
71
72static inline int multi_timer_check(int apic, int irq)
73{
74 return 0;
75}
76
77static inline int apic_id_registered(void)
78{
79 return 1;
80}
81
82static inline void setup_apic_routing(void)
83{
84 printk("Enabling APIC mode: Summit. Using %d I/O APICs\n",
85 nr_ioapics);
86}
87
88static inline int apicid_to_node(int logical_apicid)
89{
90#ifdef CONFIG_SMP
91 return apicid_2_node[hard_smp_processor_id()];
92#else
93 return 0;
94#endif
95}
96
97/* Mapping from cpu number to logical apicid */
98static inline int cpu_to_logical_apicid(int cpu)
99{
100#ifdef CONFIG_SMP
101 if (cpu >= NR_CPUS)
102 return BAD_APICID;
103 return (int)cpu_2_logical_apicid[cpu];
104#else
105 return logical_smp_processor_id();
106#endif
107}
108
109static inline int cpu_present_to_apicid(int mps_cpu)
110{
111 if (mps_cpu < NR_CPUS)
112 return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
113 else
114 return BAD_APICID;
115}
116
117static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_id_map)
118{
119 /* For clustered we don't have a good way to do this yet - hack */
120 return physids_promote(0x0F);
121}
122
123static inline physid_mask_t apicid_to_cpu_present(int apicid)
124{
125 return physid_mask_of_physid(0);
126}
127
128static inline void setup_portio_remap(void)
129{
130}
131
132static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
133{
134 return 1;
135}
136
137static inline void enable_apic_mode(void)
138{
139}
140
141static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
142{
143 int num_bits_set;
144 int cpus_found = 0;
145 int cpu;
146 int apicid;
147
148 num_bits_set = cpus_weight(cpumask);
149 /* Return id to all */
150 if (num_bits_set == NR_CPUS)
151 return (int) 0xFF;
152 /*
153 * The cpus in the mask must all be on the apic cluster. If are not
154 * on the same apicid cluster return default value of TARGET_CPUS.
155 */
156 cpu = first_cpu(cpumask);
157 apicid = cpu_to_logical_apicid(cpu);
158 while (cpus_found < num_bits_set) {
159 if (cpu_isset(cpu, cpumask)) {
160 int new_apicid = cpu_to_logical_apicid(cpu);
161 if (apicid_cluster(apicid) !=
162 apicid_cluster(new_apicid)){
163 printk ("%s: Not a valid mask!\n",__FUNCTION__);
164 return 0xFF;
165 }
166 apicid = apicid | new_apicid;
167 cpus_found++;
168 }
169 cpu++;
170 }
171 return apicid;
172}
173
174/* cpuid returns the value latched in the HW at reset, not the APIC ID
175 * register's value. For any box whose BIOS changes APIC IDs, like
176 * clustered APIC systems, we must use hard_smp_processor_id.
177 *
178 * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID.
179 */
180static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
181{
182 return hard_smp_processor_id() >> index_msb;
183}
184
185#endif /* __ASM_SUMMIT_APIC_H */
diff --git a/include/asm-x86/summit/apicdef.h b/include/asm-x86/summit/apicdef.h
deleted file mode 100644
index f3fbca1f61c1..000000000000
--- a/include/asm-x86/summit/apicdef.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ASM_SUMMIT_APICDEF_H
2#define __ASM_SUMMIT_APICDEF_H
3
4#define APIC_ID_MASK (0xFF<<24)
5
6static inline unsigned get_apic_id(unsigned long x)
7{
8 return (x>>24)&0xFF;
9}
10
11#define GET_APIC_ID(x) get_apic_id(x)
12
13#endif
diff --git a/include/asm-x86/summit/ipi.h b/include/asm-x86/summit/ipi.h
deleted file mode 100644
index 53bd1e7bd7b4..000000000000
--- a/include/asm-x86/summit/ipi.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef __ASM_SUMMIT_IPI_H
2#define __ASM_SUMMIT_IPI_H
3
4void send_IPI_mask_sequence(cpumask_t mask, int vector);
5
6static inline void send_IPI_mask(cpumask_t mask, int vector)
7{
8 send_IPI_mask_sequence(mask, vector);
9}
10
11static inline void send_IPI_allbutself(int vector)
12{
13 cpumask_t mask = cpu_online_map;
14 cpu_clear(smp_processor_id(), mask);
15
16 if (!cpus_empty(mask))
17 send_IPI_mask(mask, vector);
18}
19
20static inline void send_IPI_all(int vector)
21{
22 send_IPI_mask(cpu_online_map, vector);
23}
24
25#endif /* __ASM_SUMMIT_IPI_H */
diff --git a/include/asm-x86/summit/irq_vectors_limits.h b/include/asm-x86/summit/irq_vectors_limits.h
deleted file mode 100644
index 890ce3f5e09a..000000000000
--- a/include/asm-x86/summit/irq_vectors_limits.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef _ASM_IRQ_VECTORS_LIMITS_H
2#define _ASM_IRQ_VECTORS_LIMITS_H
3
4/*
5 * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs,
6 * even with uni-proc kernels, so use a big array.
7 *
8 * This value should be the same in both the generic and summit subarches.
9 * Change one, change 'em both.
10 */
11#define NR_IRQS 224
12#define NR_IRQ_VECTORS 1024
13
14#endif /* _ASM_IRQ_VECTORS_LIMITS_H */
diff --git a/include/asm-x86/summit/mpparse.h b/include/asm-x86/summit/mpparse.h
deleted file mode 100644
index 013ce6fab2d5..000000000000
--- a/include/asm-x86/summit/mpparse.h
+++ /dev/null
@@ -1,109 +0,0 @@
1#ifndef __ASM_SUMMIT_MPPARSE_H
2#define __ASM_SUMMIT_MPPARSE_H
3
4#include <asm/tsc.h>
5
6extern int use_cyclone;
7
8#ifdef CONFIG_X86_SUMMIT_NUMA
9extern void setup_summit(void);
10#else
11#define setup_summit() {}
12#endif
13
14static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
15 char *productid)
16{
17 if (!strncmp(oem, "IBM ENSW", 8) &&
18 (!strncmp(productid, "VIGIL SMP", 9)
19 || !strncmp(productid, "EXA", 3)
20 || !strncmp(productid, "RUTHLESS SMP", 12))){
21 mark_tsc_unstable("Summit based system");
22 use_cyclone = 1; /*enable cyclone-timer*/
23 setup_summit();
24 return 1;
25 }
26 return 0;
27}
28
29/* Hook from generic ACPI tables.c */
30static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
31{
32 if (!strncmp(oem_id, "IBM", 3) &&
33 (!strncmp(oem_table_id, "SERVIGIL", 8)
34 || !strncmp(oem_table_id, "EXA", 3))){
35 mark_tsc_unstable("Summit based system");
36 use_cyclone = 1; /*enable cyclone-timer*/
37 setup_summit();
38 return 1;
39 }
40 return 0;
41}
42
43struct rio_table_hdr {
44 unsigned char version; /* Version number of this data structure */
45 /* Version 3 adds chassis_num & WP_index */
46 unsigned char num_scal_dev; /* # of Scalability devices (Twisters for Vigil) */
47 unsigned char num_rio_dev; /* # of RIO I/O devices (Cyclones and Winnipegs) */
48} __attribute__((packed));
49
50struct scal_detail {
51 unsigned char node_id; /* Scalability Node ID */
52 unsigned long CBAR; /* Address of 1MB register space */
53 unsigned char port0node; /* Node ID port connected to: 0xFF=None */
54 unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */
55 unsigned char port1node; /* Node ID port connected to: 0xFF = None */
56 unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */
57 unsigned char port2node; /* Node ID port connected to: 0xFF = None */
58 unsigned char port2port; /* Port num port connected to: 0,1,2, or 0xFF=None */
59 unsigned char chassis_num; /* 1 based Chassis number (1 = boot node) */
60} __attribute__((packed));
61
62struct rio_detail {
63 unsigned char node_id; /* RIO Node ID */
64 unsigned long BBAR; /* Address of 1MB register space */
65 unsigned char type; /* Type of device */
66 unsigned char owner_id; /* For WPEG: Node ID of Cyclone that owns this WPEG*/
67 /* For CYC: Node ID of Twister that owns this CYC */
68 unsigned char port0node; /* Node ID port connected to: 0xFF=None */
69 unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */
70 unsigned char port1node; /* Node ID port connected to: 0xFF=None */
71 unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */
72 unsigned char first_slot; /* For WPEG: Lowest slot number below this WPEG */
73 /* For CYC: 0 */
74 unsigned char status; /* For WPEG: Bit 0 = 1 : the XAPIC is used */
75 /* = 0 : the XAPIC is not used, ie:*/
76 /* ints fwded to another XAPIC */
77 /* Bits1:7 Reserved */
78 /* For CYC: Bits0:7 Reserved */
79 unsigned char WP_index; /* For WPEG: WPEG instance index - lower ones have */
80 /* lower slot numbers/PCI bus numbers */
81 /* For CYC: No meaning */
82 unsigned char chassis_num; /* 1 based Chassis number */
83 /* For LookOut WPEGs this field indicates the */
84 /* Expansion Chassis #, enumerated from Boot */
85 /* Node WPEG external port, then Boot Node CYC */
86 /* external port, then Next Vigil chassis WPEG */
87 /* external port, etc. */
88 /* Shared Lookouts have only 1 chassis number (the */
89 /* first one assigned) */
90} __attribute__((packed));
91
92
93typedef enum {
94 CompatTwister = 0, /* Compatibility Twister */
95 AltTwister = 1, /* Alternate Twister of internal 8-way */
96 CompatCyclone = 2, /* Compatibility Cyclone */
97 AltCyclone = 3, /* Alternate Cyclone of internal 8-way */
98 CompatWPEG = 4, /* Compatibility WPEG */
99 AltWPEG = 5, /* Second Planar WPEG */
100 LookOutAWPEG = 6, /* LookOut WPEG */
101 LookOutBWPEG = 7, /* LookOut WPEG */
102} node_type;
103
104static inline int is_WPEG(struct rio_detail *rio){
105 return (rio->type == CompatWPEG || rio->type == AltWPEG ||
106 rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
107}
108
109#endif /* __ASM_SUMMIT_MPPARSE_H */
diff --git a/include/asm-x86/suspend.h b/include/asm-x86/suspend.h
deleted file mode 100644
index 9bd521fe4570..000000000000
--- a/include/asm-x86/suspend.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "suspend_32.h"
3#else
4# include "suspend_64.h"
5#endif
diff --git a/include/asm-x86/suspend_32.h b/include/asm-x86/suspend_32.h
deleted file mode 100644
index acb6d4d491f4..000000000000
--- a/include/asm-x86/suspend_32.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
3 * Based on code
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5 */
6#ifndef ASM_X86__SUSPEND_32_H
7#define ASM_X86__SUSPEND_32_H
8
9#include <asm/desc.h>
10#include <asm/i387.h>
11
12static inline int arch_prepare_suspend(void) { return 0; }
13
14/* image of the saved processor state */
15struct saved_context {
16 u16 es, fs, gs, ss;
17 unsigned long cr0, cr2, cr3, cr4;
18 struct desc_ptr gdt;
19 struct desc_ptr idt;
20 u16 ldt;
21 u16 tss;
22 unsigned long tr;
23 unsigned long safety;
24 unsigned long return_address;
25} __attribute__((packed));
26
27#ifdef CONFIG_ACPI
28extern unsigned long saved_eip;
29extern unsigned long saved_esp;
30extern unsigned long saved_ebp;
31extern unsigned long saved_ebx;
32extern unsigned long saved_esi;
33extern unsigned long saved_edi;
34
35static inline void acpi_save_register_state(unsigned long return_point)
36{
37 saved_eip = return_point;
38 asm volatile("movl %%esp,%0" : "=m" (saved_esp));
39 asm volatile("movl %%ebp,%0" : "=m" (saved_ebp));
40 asm volatile("movl %%ebx,%0" : "=m" (saved_ebx));
41 asm volatile("movl %%edi,%0" : "=m" (saved_edi));
42 asm volatile("movl %%esi,%0" : "=m" (saved_esi));
43}
44
45#define acpi_restore_register_state() do {} while (0)
46
47/* routines for saving/restoring kernel state */
48extern int acpi_save_state_mem(void);
49#endif
50
51#endif /* ASM_X86__SUSPEND_32_H */
diff --git a/include/asm-x86/suspend_64.h b/include/asm-x86/suspend_64.h
deleted file mode 100644
index cf821dd310e8..000000000000
--- a/include/asm-x86/suspend_64.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * Copyright 2001-2003 Pavel Machek <pavel@suse.cz>
3 * Based on code
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5 */
6#ifndef ASM_X86__SUSPEND_64_H
7#define ASM_X86__SUSPEND_64_H
8
9#include <asm/desc.h>
10#include <asm/i387.h>
11
12static inline int arch_prepare_suspend(void)
13{
14 return 0;
15}
16
17/*
18 * Image of the saved processor state, used by the low level ACPI suspend to
19 * RAM code and by the low level hibernation code.
20 *
21 * If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that
22 * __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c,
23 * still work as required.
24 */
25struct saved_context {
26 struct pt_regs regs;
27 u16 ds, es, fs, gs, ss;
28 unsigned long gs_base, gs_kernel_base, fs_base;
29 unsigned long cr0, cr2, cr3, cr4, cr8;
30 unsigned long efer;
31 u16 gdt_pad;
32 u16 gdt_limit;
33 unsigned long gdt_base;
34 u16 idt_pad;
35 u16 idt_limit;
36 unsigned long idt_base;
37 u16 ldt;
38 u16 tss;
39 unsigned long tr;
40 unsigned long safety;
41 unsigned long return_address;
42} __attribute__((packed));
43
44#define loaddebug(thread,register) \
45 set_debugreg((thread)->debugreg##register, register)
46
47/* routines for saving/restoring kernel state */
48extern int acpi_save_state_mem(void);
49extern char core_restore_code;
50extern char restore_registers;
51
52#endif /* ASM_X86__SUSPEND_64_H */
diff --git a/include/asm-x86/swiotlb.h b/include/asm-x86/swiotlb.h
deleted file mode 100644
index 1e20adbcad4b..000000000000
--- a/include/asm-x86/swiotlb.h
+++ /dev/null
@@ -1,58 +0,0 @@
1#ifndef ASM_X86__SWIOTLB_H
2#define ASM_X86__SWIOTLB_H
3
4#include <asm/dma-mapping.h>
5
6/* SWIOTLB interface */
7
8extern dma_addr_t swiotlb_map_single(struct device *hwdev, void *ptr,
9 size_t size, int dir);
10extern void *swiotlb_alloc_coherent(struct device *hwdev, size_t size,
11 dma_addr_t *dma_handle, gfp_t flags);
12extern void swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
13 size_t size, int dir);
14extern void swiotlb_sync_single_for_cpu(struct device *hwdev,
15 dma_addr_t dev_addr,
16 size_t size, int dir);
17extern void swiotlb_sync_single_for_device(struct device *hwdev,
18 dma_addr_t dev_addr,
19 size_t size, int dir);
20extern void swiotlb_sync_single_range_for_cpu(struct device *hwdev,
21 dma_addr_t dev_addr,
22 unsigned long offset,
23 size_t size, int dir);
24extern void swiotlb_sync_single_range_for_device(struct device *hwdev,
25 dma_addr_t dev_addr,
26 unsigned long offset,
27 size_t size, int dir);
28extern void swiotlb_sync_sg_for_cpu(struct device *hwdev,
29 struct scatterlist *sg, int nelems,
30 int dir);
31extern void swiotlb_sync_sg_for_device(struct device *hwdev,
32 struct scatterlist *sg, int nelems,
33 int dir);
34extern int swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg,
35 int nents, int direction);
36extern void swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg,
37 int nents, int direction);
38extern int swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr);
39extern void swiotlb_free_coherent(struct device *hwdev, size_t size,
40 void *vaddr, dma_addr_t dma_handle);
41extern int swiotlb_dma_supported(struct device *hwdev, u64 mask);
42extern void swiotlb_init(void);
43
44extern int swiotlb_force;
45
46#ifdef CONFIG_SWIOTLB
47extern int swiotlb;
48extern void pci_swiotlb_init(void);
49#else
50#define swiotlb 0
51static inline void pci_swiotlb_init(void)
52{
53}
54#endif
55
56static inline void dma_mark_clean(void *addr, size_t size) {}
57
58#endif /* ASM_X86__SWIOTLB_H */
diff --git a/include/asm-x86/sync_bitops.h b/include/asm-x86/sync_bitops.h
deleted file mode 100644
index b689bee71104..000000000000
--- a/include/asm-x86/sync_bitops.h
+++ /dev/null
@@ -1,130 +0,0 @@
1#ifndef ASM_X86__SYNC_BITOPS_H
2#define ASM_X86__SYNC_BITOPS_H
3
4/*
5 * Copyright 1992, Linus Torvalds.
6 */
7
8/*
9 * These have to be done with inline assembly: that way the bit-setting
10 * is guaranteed to be atomic. All bit operations return 0 if the bit
11 * was cleared before the operation and != 0 if it was not.
12 *
13 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
14 */
15
16#define ADDR (*(volatile long *)addr)
17
18/**
19 * sync_set_bit - Atomically set a bit in memory
20 * @nr: the bit to set
21 * @addr: the address to start counting from
22 *
23 * This function is atomic and may not be reordered. See __set_bit()
24 * if you do not require the atomic guarantees.
25 *
26 * Note that @nr may be almost arbitrarily large; this function is not
27 * restricted to acting on a single-word quantity.
28 */
29static inline void sync_set_bit(int nr, volatile unsigned long *addr)
30{
31 asm volatile("lock; btsl %1,%0"
32 : "+m" (ADDR)
33 : "Ir" (nr)
34 : "memory");
35}
36
37/**
38 * sync_clear_bit - Clears a bit in memory
39 * @nr: Bit to clear
40 * @addr: Address to start counting from
41 *
42 * sync_clear_bit() is atomic and may not be reordered. However, it does
43 * not contain a memory barrier, so if it is used for locking purposes,
44 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
45 * in order to ensure changes are visible on other processors.
46 */
47static inline void sync_clear_bit(int nr, volatile unsigned long *addr)
48{
49 asm volatile("lock; btrl %1,%0"
50 : "+m" (ADDR)
51 : "Ir" (nr)
52 : "memory");
53}
54
55/**
56 * sync_change_bit - Toggle a bit in memory
57 * @nr: Bit to change
58 * @addr: Address to start counting from
59 *
60 * sync_change_bit() is atomic and may not be reordered.
61 * Note that @nr may be almost arbitrarily large; this function is not
62 * restricted to acting on a single-word quantity.
63 */
64static inline void sync_change_bit(int nr, volatile unsigned long *addr)
65{
66 asm volatile("lock; btcl %1,%0"
67 : "+m" (ADDR)
68 : "Ir" (nr)
69 : "memory");
70}
71
72/**
73 * sync_test_and_set_bit - Set a bit and return its old value
74 * @nr: Bit to set
75 * @addr: Address to count from
76 *
77 * This operation is atomic and cannot be reordered.
78 * It also implies a memory barrier.
79 */
80static inline int sync_test_and_set_bit(int nr, volatile unsigned long *addr)
81{
82 int oldbit;
83
84 asm volatile("lock; btsl %2,%1\n\tsbbl %0,%0"
85 : "=r" (oldbit), "+m" (ADDR)
86 : "Ir" (nr) : "memory");
87 return oldbit;
88}
89
90/**
91 * sync_test_and_clear_bit - Clear a bit and return its old value
92 * @nr: Bit to clear
93 * @addr: Address to count from
94 *
95 * This operation is atomic and cannot be reordered.
96 * It also implies a memory barrier.
97 */
98static inline int sync_test_and_clear_bit(int nr, volatile unsigned long *addr)
99{
100 int oldbit;
101
102 asm volatile("lock; btrl %2,%1\n\tsbbl %0,%0"
103 : "=r" (oldbit), "+m" (ADDR)
104 : "Ir" (nr) : "memory");
105 return oldbit;
106}
107
108/**
109 * sync_test_and_change_bit - Change a bit and return its old value
110 * @nr: Bit to change
111 * @addr: Address to count from
112 *
113 * This operation is atomic and cannot be reordered.
114 * It also implies a memory barrier.
115 */
116static inline int sync_test_and_change_bit(int nr, volatile unsigned long *addr)
117{
118 int oldbit;
119
120 asm volatile("lock; btcl %2,%1\n\tsbbl %0,%0"
121 : "=r" (oldbit), "+m" (ADDR)
122 : "Ir" (nr) : "memory");
123 return oldbit;
124}
125
126#define sync_test_bit(nr, addr) test_bit(nr, addr)
127
128#undef ADDR
129
130#endif /* ASM_X86__SYNC_BITOPS_H */
diff --git a/include/asm-x86/syscall.h b/include/asm-x86/syscall.h
deleted file mode 100644
index 04c47dc5597c..000000000000
--- a/include/asm-x86/syscall.h
+++ /dev/null
@@ -1,211 +0,0 @@
1/*
2 * Access to user system call parameters and results
3 *
4 * Copyright (C) 2008 Red Hat, Inc. All rights reserved.
5 *
6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions
8 * of the GNU General Public License v.2.
9 *
10 * See asm-generic/syscall.h for descriptions of what we must do here.
11 */
12
13#ifndef _ASM_SYSCALL_H
14#define _ASM_SYSCALL_H 1
15
16#include <linux/sched.h>
17#include <linux/err.h>
18
19static inline long syscall_get_nr(struct task_struct *task,
20 struct pt_regs *regs)
21{
22 /*
23 * We always sign-extend a -1 value being set here,
24 * so this is always either -1L or a syscall number.
25 */
26 return regs->orig_ax;
27}
28
29static inline void syscall_rollback(struct task_struct *task,
30 struct pt_regs *regs)
31{
32 regs->ax = regs->orig_ax;
33}
34
35static inline long syscall_get_error(struct task_struct *task,
36 struct pt_regs *regs)
37{
38 unsigned long error = regs->ax;
39#ifdef CONFIG_IA32_EMULATION
40 /*
41 * TS_COMPAT is set for 32-bit syscall entries and then
42 * remains set until we return to user mode.
43 */
44 if (task_thread_info(task)->status & TS_COMPAT)
45 /*
46 * Sign-extend the value so (int)-EFOO becomes (long)-EFOO
47 * and will match correctly in comparisons.
48 */
49 error = (long) (int) error;
50#endif
51 return IS_ERR_VALUE(error) ? error : 0;
52}
53
54static inline long syscall_get_return_value(struct task_struct *task,
55 struct pt_regs *regs)
56{
57 return regs->ax;
58}
59
60static inline void syscall_set_return_value(struct task_struct *task,
61 struct pt_regs *regs,
62 int error, long val)
63{
64 regs->ax = (long) error ?: val;
65}
66
67#ifdef CONFIG_X86_32
68
69static inline void syscall_get_arguments(struct task_struct *task,
70 struct pt_regs *regs,
71 unsigned int i, unsigned int n,
72 unsigned long *args)
73{
74 BUG_ON(i + n > 6);
75 memcpy(args, &regs->bx + i, n * sizeof(args[0]));
76}
77
78static inline void syscall_set_arguments(struct task_struct *task,
79 struct pt_regs *regs,
80 unsigned int i, unsigned int n,
81 const unsigned long *args)
82{
83 BUG_ON(i + n > 6);
84 memcpy(&regs->bx + i, args, n * sizeof(args[0]));
85}
86
87#else /* CONFIG_X86_64 */
88
89static inline void syscall_get_arguments(struct task_struct *task,
90 struct pt_regs *regs,
91 unsigned int i, unsigned int n,
92 unsigned long *args)
93{
94# ifdef CONFIG_IA32_EMULATION
95 if (task_thread_info(task)->status & TS_COMPAT)
96 switch (i + n) {
97 case 6:
98 if (!n--) break;
99 *args++ = regs->bp;
100 case 5:
101 if (!n--) break;
102 *args++ = regs->di;
103 case 4:
104 if (!n--) break;
105 *args++ = regs->si;
106 case 3:
107 if (!n--) break;
108 *args++ = regs->dx;
109 case 2:
110 if (!n--) break;
111 *args++ = regs->cx;
112 case 1:
113 if (!n--) break;
114 *args++ = regs->bx;
115 case 0:
116 if (!n--) break;
117 default:
118 BUG();
119 break;
120 }
121 else
122# endif
123 switch (i + n) {
124 case 6:
125 if (!n--) break;
126 *args++ = regs->r9;
127 case 5:
128 if (!n--) break;
129 *args++ = regs->r8;
130 case 4:
131 if (!n--) break;
132 *args++ = regs->r10;
133 case 3:
134 if (!n--) break;
135 *args++ = regs->dx;
136 case 2:
137 if (!n--) break;
138 *args++ = regs->si;
139 case 1:
140 if (!n--) break;
141 *args++ = regs->di;
142 case 0:
143 if (!n--) break;
144 default:
145 BUG();
146 break;
147 }
148}
149
150static inline void syscall_set_arguments(struct task_struct *task,
151 struct pt_regs *regs,
152 unsigned int i, unsigned int n,
153 const unsigned long *args)
154{
155# ifdef CONFIG_IA32_EMULATION
156 if (task_thread_info(task)->status & TS_COMPAT)
157 switch (i + n) {
158 case 6:
159 if (!n--) break;
160 regs->bp = *args++;
161 case 5:
162 if (!n--) break;
163 regs->di = *args++;
164 case 4:
165 if (!n--) break;
166 regs->si = *args++;
167 case 3:
168 if (!n--) break;
169 regs->dx = *args++;
170 case 2:
171 if (!n--) break;
172 regs->cx = *args++;
173 case 1:
174 if (!n--) break;
175 regs->bx = *args++;
176 case 0:
177 if (!n--) break;
178 default:
179 BUG();
180 }
181 else
182# endif
183 switch (i + n) {
184 case 6:
185 if (!n--) break;
186 regs->r9 = *args++;
187 case 5:
188 if (!n--) break;
189 regs->r8 = *args++;
190 case 4:
191 if (!n--) break;
192 regs->r10 = *args++;
193 case 3:
194 if (!n--) break;
195 regs->dx = *args++;
196 case 2:
197 if (!n--) break;
198 regs->si = *args++;
199 case 1:
200 if (!n--) break;
201 regs->di = *args++;
202 case 0:
203 if (!n--) break;
204 default:
205 BUG();
206 }
207}
208
209#endif /* CONFIG_X86_32 */
210
211#endif /* _ASM_SYSCALL_H */
diff --git a/include/asm-x86/syscalls.h b/include/asm-x86/syscalls.h
deleted file mode 100644
index 87803da44010..000000000000
--- a/include/asm-x86/syscalls.h
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 * syscalls.h - Linux syscall interfaces (arch-specific)
3 *
4 * Copyright (c) 2008 Jaswinder Singh
5 *
6 * This file is released under the GPLv2.
7 * See the file COPYING for more details.
8 */
9
10#ifndef _ASM_X86_SYSCALLS_H
11#define _ASM_X86_SYSCALLS_H
12
13#include <linux/compiler.h>
14#include <linux/linkage.h>
15#include <linux/types.h>
16#include <linux/signal.h>
17
18/* Common in X86_32 and X86_64 */
19/* kernel/ioport.c */
20asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
21
22/* X86_32 only */
23#ifdef CONFIG_X86_32
24/* kernel/process_32.c */
25asmlinkage int sys_fork(struct pt_regs);
26asmlinkage int sys_clone(struct pt_regs);
27asmlinkage int sys_vfork(struct pt_regs);
28asmlinkage int sys_execve(struct pt_regs);
29
30/* kernel/signal_32.c */
31asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
32asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
33 struct old_sigaction __user *);
34asmlinkage int sys_sigaltstack(unsigned long);
35asmlinkage unsigned long sys_sigreturn(unsigned long);
36asmlinkage int sys_rt_sigreturn(unsigned long);
37
38/* kernel/ioport.c */
39asmlinkage long sys_iopl(unsigned long);
40
41/* kernel/ldt.c */
42asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
43
44/* kernel/sys_i386_32.c */
45asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
46 unsigned long, unsigned long, unsigned long);
47struct mmap_arg_struct;
48asmlinkage int old_mmap(struct mmap_arg_struct __user *);
49struct sel_arg_struct;
50asmlinkage int old_select(struct sel_arg_struct __user *);
51asmlinkage int sys_ipc(uint, int, int, int, void __user *, long);
52struct old_utsname;
53asmlinkage int sys_uname(struct old_utsname __user *);
54struct oldold_utsname;
55asmlinkage int sys_olduname(struct oldold_utsname __user *);
56
57/* kernel/tls.c */
58asmlinkage int sys_set_thread_area(struct user_desc __user *);
59asmlinkage int sys_get_thread_area(struct user_desc __user *);
60
61/* kernel/vm86_32.c */
62asmlinkage int sys_vm86old(struct pt_regs);
63asmlinkage int sys_vm86(struct pt_regs);
64
65#else /* CONFIG_X86_32 */
66
67/* X86_64 only */
68/* kernel/process_64.c */
69asmlinkage long sys_fork(struct pt_regs *);
70asmlinkage long sys_clone(unsigned long, unsigned long,
71 void __user *, void __user *,
72 struct pt_regs *);
73asmlinkage long sys_vfork(struct pt_regs *);
74asmlinkage long sys_execve(char __user *, char __user * __user *,
75 char __user * __user *,
76 struct pt_regs *);
77
78/* kernel/ioport.c */
79asmlinkage long sys_iopl(unsigned int, struct pt_regs *);
80
81/* kernel/signal_64.c */
82asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *,
83 struct pt_regs *);
84asmlinkage long sys_rt_sigreturn(struct pt_regs *);
85
86/* kernel/sys_x86_64.c */
87asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
88 unsigned long, unsigned long, unsigned long);
89struct new_utsname;
90asmlinkage long sys_uname(struct new_utsname __user *);
91
92#endif /* CONFIG_X86_32 */
93#endif /* _ASM_X86_SYSCALLS_H */
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
deleted file mode 100644
index d79fa4a9ee64..000000000000
--- a/include/asm-x86/system.h
+++ /dev/null
@@ -1,429 +0,0 @@
1#ifndef ASM_X86__SYSTEM_H
2#define ASM_X86__SYSTEM_H
3
4#include <asm/asm.h>
5#include <asm/segment.h>
6#include <asm/cpufeature.h>
7#include <asm/cmpxchg.h>
8#include <asm/nops.h>
9
10#include <linux/kernel.h>
11#include <linux/irqflags.h>
12
13/* entries in ARCH_DLINFO: */
14#ifdef CONFIG_IA32_EMULATION
15# define AT_VECTOR_SIZE_ARCH 2
16#else
17# define AT_VECTOR_SIZE_ARCH 1
18#endif
19
20#ifdef CONFIG_X86_32
21
22struct task_struct; /* one of the stranger aspects of C forward declarations */
23struct task_struct *__switch_to(struct task_struct *prev,
24 struct task_struct *next);
25
26/*
27 * Saving eflags is important. It switches not only IOPL between tasks,
28 * it also protects other tasks from NT leaking through sysenter etc.
29 */
30#define switch_to(prev, next, last) \
31do { \
32 /* \
33 * Context-switching clobbers all registers, so we clobber \
34 * them explicitly, via unused output variables. \
35 * (EAX and EBP is not listed because EBP is saved/restored \
36 * explicitly for wchan access and EAX is the return value of \
37 * __switch_to()) \
38 */ \
39 unsigned long ebx, ecx, edx, esi, edi; \
40 \
41 asm volatile("pushfl\n\t" /* save flags */ \
42 "pushl %%ebp\n\t" /* save EBP */ \
43 "movl %%esp,%[prev_sp]\n\t" /* save ESP */ \
44 "movl %[next_sp],%%esp\n\t" /* restore ESP */ \
45 "movl $1f,%[prev_ip]\n\t" /* save EIP */ \
46 "pushl %[next_ip]\n\t" /* restore EIP */ \
47 "jmp __switch_to\n" /* regparm call */ \
48 "1:\t" \
49 "popl %%ebp\n\t" /* restore EBP */ \
50 "popfl\n" /* restore flags */ \
51 \
52 /* output parameters */ \
53 : [prev_sp] "=m" (prev->thread.sp), \
54 [prev_ip] "=m" (prev->thread.ip), \
55 "=a" (last), \
56 \
57 /* clobbered output registers: */ \
58 "=b" (ebx), "=c" (ecx), "=d" (edx), \
59 "=S" (esi), "=D" (edi) \
60 \
61 /* input parameters: */ \
62 : [next_sp] "m" (next->thread.sp), \
63 [next_ip] "m" (next->thread.ip), \
64 \
65 /* regparm parameters for __switch_to(): */ \
66 [prev] "a" (prev), \
67 [next] "d" (next) \
68 \
69 : /* reloaded segment registers */ \
70 "memory"); \
71} while (0)
72
73/*
74 * disable hlt during certain critical i/o operations
75 */
76#define HAVE_DISABLE_HLT
77#else
78#define __SAVE(reg, offset) "movq %%" #reg ",(14-" #offset ")*8(%%rsp)\n\t"
79#define __RESTORE(reg, offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
80
81/* frame pointer must be last for get_wchan */
82#define SAVE_CONTEXT "pushf ; pushq %%rbp ; movq %%rsi,%%rbp\n\t"
83#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popf\t"
84
85#define __EXTRA_CLOBBER \
86 , "rcx", "rbx", "rdx", "r8", "r9", "r10", "r11", \
87 "r12", "r13", "r14", "r15"
88
89/* Save restore flags to clear handle leaking NT */
90#define switch_to(prev, next, last) \
91 asm volatile(SAVE_CONTEXT \
92 "movq %%rsp,%P[threadrsp](%[prev])\n\t" /* save RSP */ \
93 "movq %P[threadrsp](%[next]),%%rsp\n\t" /* restore RSP */ \
94 "call __switch_to\n\t" \
95 ".globl thread_return\n" \
96 "thread_return:\n\t" \
97 "movq %%gs:%P[pda_pcurrent],%%rsi\n\t" \
98 "movq %P[task_canary](%%rsi),%%r8\n\t" \
99 "movq %%r8,%%gs:%P[pda_canary]\n\t" \
100 "movq %P[thread_info](%%rsi),%%r8\n\t" \
101 LOCK_PREFIX "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \
102 "movq %%rax,%%rdi\n\t" \
103 "jc ret_from_fork\n\t" \
104 RESTORE_CONTEXT \
105 : "=a" (last) \
106 : [next] "S" (next), [prev] "D" (prev), \
107 [threadrsp] "i" (offsetof(struct task_struct, thread.sp)), \
108 [ti_flags] "i" (offsetof(struct thread_info, flags)), \
109 [tif_fork] "i" (TIF_FORK), \
110 [thread_info] "i" (offsetof(struct task_struct, stack)), \
111 [task_canary] "i" (offsetof(struct task_struct, stack_canary)),\
112 [pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)), \
113 [pda_canary] "i" (offsetof(struct x8664_pda, stack_canary))\
114 : "memory", "cc" __EXTRA_CLOBBER)
115#endif
116
117#ifdef __KERNEL__
118#define _set_base(addr, base) do { unsigned long __pr; \
119__asm__ __volatile__ ("movw %%dx,%1\n\t" \
120 "rorl $16,%%edx\n\t" \
121 "movb %%dl,%2\n\t" \
122 "movb %%dh,%3" \
123 :"=&d" (__pr) \
124 :"m" (*((addr)+2)), \
125 "m" (*((addr)+4)), \
126 "m" (*((addr)+7)), \
127 "0" (base) \
128 ); } while (0)
129
130#define _set_limit(addr, limit) do { unsigned long __lr; \
131__asm__ __volatile__ ("movw %%dx,%1\n\t" \
132 "rorl $16,%%edx\n\t" \
133 "movb %2,%%dh\n\t" \
134 "andb $0xf0,%%dh\n\t" \
135 "orb %%dh,%%dl\n\t" \
136 "movb %%dl,%2" \
137 :"=&d" (__lr) \
138 :"m" (*(addr)), \
139 "m" (*((addr)+6)), \
140 "0" (limit) \
141 ); } while (0)
142
143#define set_base(ldt, base) _set_base(((char *)&(ldt)) , (base))
144#define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1))
145
146extern void native_load_gs_index(unsigned);
147
148/*
149 * Load a segment. Fall back on loading the zero
150 * segment if something goes wrong..
151 */
152#define loadsegment(seg, value) \
153 asm volatile("\n" \
154 "1:\t" \
155 "movl %k0,%%" #seg "\n" \
156 "2:\n" \
157 ".section .fixup,\"ax\"\n" \
158 "3:\t" \
159 "movl %k1, %%" #seg "\n\t" \
160 "jmp 2b\n" \
161 ".previous\n" \
162 _ASM_EXTABLE(1b,3b) \
163 : :"r" (value), "r" (0) : "memory")
164
165
166/*
167 * Save a segment register away
168 */
169#define savesegment(seg, value) \
170 asm("mov %%" #seg ",%0":"=r" (value) : : "memory")
171
172static inline unsigned long get_limit(unsigned long segment)
173{
174 unsigned long __limit;
175 asm("lsll %1,%0" : "=r" (__limit) : "r" (segment));
176 return __limit + 1;
177}
178
179static inline void native_clts(void)
180{
181 asm volatile("clts");
182}
183
184/*
185 * Volatile isn't enough to prevent the compiler from reordering the
186 * read/write functions for the control registers and messing everything up.
187 * A memory clobber would solve the problem, but would prevent reordering of
188 * all loads stores around it, which can hurt performance. Solution is to
189 * use a variable and mimic reads and writes to it to enforce serialization
190 */
191static unsigned long __force_order;
192
193static inline unsigned long native_read_cr0(void)
194{
195 unsigned long val;
196 asm volatile("mov %%cr0,%0\n\t" : "=r" (val), "=m" (__force_order));
197 return val;
198}
199
200static inline void native_write_cr0(unsigned long val)
201{
202 asm volatile("mov %0,%%cr0": : "r" (val), "m" (__force_order));
203}
204
205static inline unsigned long native_read_cr2(void)
206{
207 unsigned long val;
208 asm volatile("mov %%cr2,%0\n\t" : "=r" (val), "=m" (__force_order));
209 return val;
210}
211
212static inline void native_write_cr2(unsigned long val)
213{
214 asm volatile("mov %0,%%cr2": : "r" (val), "m" (__force_order));
215}
216
217static inline unsigned long native_read_cr3(void)
218{
219 unsigned long val;
220 asm volatile("mov %%cr3,%0\n\t" : "=r" (val), "=m" (__force_order));
221 return val;
222}
223
224static inline void native_write_cr3(unsigned long val)
225{
226 asm volatile("mov %0,%%cr3": : "r" (val), "m" (__force_order));
227}
228
229static inline unsigned long native_read_cr4(void)
230{
231 unsigned long val;
232 asm volatile("mov %%cr4,%0\n\t" : "=r" (val), "=m" (__force_order));
233 return val;
234}
235
236static inline unsigned long native_read_cr4_safe(void)
237{
238 unsigned long val;
239 /* This could fault if %cr4 does not exist. In x86_64, a cr4 always
240 * exists, so it will never fail. */
241#ifdef CONFIG_X86_32
242 asm volatile("1: mov %%cr4, %0\n"
243 "2:\n"
244 _ASM_EXTABLE(1b, 2b)
245 : "=r" (val), "=m" (__force_order) : "0" (0));
246#else
247 val = native_read_cr4();
248#endif
249 return val;
250}
251
252static inline void native_write_cr4(unsigned long val)
253{
254 asm volatile("mov %0,%%cr4": : "r" (val), "m" (__force_order));
255}
256
257#ifdef CONFIG_X86_64
258static inline unsigned long native_read_cr8(void)
259{
260 unsigned long cr8;
261 asm volatile("movq %%cr8,%0" : "=r" (cr8));
262 return cr8;
263}
264
265static inline void native_write_cr8(unsigned long val)
266{
267 asm volatile("movq %0,%%cr8" :: "r" (val) : "memory");
268}
269#endif
270
271static inline void native_wbinvd(void)
272{
273 asm volatile("wbinvd": : :"memory");
274}
275
276#ifdef CONFIG_PARAVIRT
277#include <asm/paravirt.h>
278#else
279#define read_cr0() (native_read_cr0())
280#define write_cr0(x) (native_write_cr0(x))
281#define read_cr2() (native_read_cr2())
282#define write_cr2(x) (native_write_cr2(x))
283#define read_cr3() (native_read_cr3())
284#define write_cr3(x) (native_write_cr3(x))
285#define read_cr4() (native_read_cr4())
286#define read_cr4_safe() (native_read_cr4_safe())
287#define write_cr4(x) (native_write_cr4(x))
288#define wbinvd() (native_wbinvd())
289#ifdef CONFIG_X86_64
290#define read_cr8() (native_read_cr8())
291#define write_cr8(x) (native_write_cr8(x))
292#define load_gs_index native_load_gs_index
293#endif
294
295/* Clear the 'TS' bit */
296#define clts() (native_clts())
297
298#endif/* CONFIG_PARAVIRT */
299
300#define stts() write_cr0(read_cr0() | X86_CR0_TS)
301
302#endif /* __KERNEL__ */
303
304static inline void clflush(volatile void *__p)
305{
306 asm volatile("clflush %0" : "+m" (*(volatile char __force *)__p));
307}
308
309#define nop() asm volatile ("nop")
310
311void disable_hlt(void);
312void enable_hlt(void);
313
314void cpu_idle_wait(void);
315
316extern unsigned long arch_align_stack(unsigned long sp);
317extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
318
319void default_idle(void);
320
321/*
322 * Force strict CPU ordering.
323 * And yes, this is required on UP too when we're talking
324 * to devices.
325 */
326#ifdef CONFIG_X86_32
327/*
328 * Some non-Intel clones support out of order store. wmb() ceases to be a
329 * nop for these.
330 */
331#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
332#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
333#define wmb() alternative("lock; addl $0,0(%%esp)", "sfence", X86_FEATURE_XMM)
334#else
335#define mb() asm volatile("mfence":::"memory")
336#define rmb() asm volatile("lfence":::"memory")
337#define wmb() asm volatile("sfence" ::: "memory")
338#endif
339
340/**
341 * read_barrier_depends - Flush all pending reads that subsequents reads
342 * depend on.
343 *
344 * No data-dependent reads from memory-like regions are ever reordered
345 * over this barrier. All reads preceding this primitive are guaranteed
346 * to access memory (but not necessarily other CPUs' caches) before any
347 * reads following this primitive that depend on the data return by
348 * any of the preceding reads. This primitive is much lighter weight than
349 * rmb() on most CPUs, and is never heavier weight than is
350 * rmb().
351 *
352 * These ordering constraints are respected by both the local CPU
353 * and the compiler.
354 *
355 * Ordering is not guaranteed by anything other than these primitives,
356 * not even by data dependencies. See the documentation for
357 * memory_barrier() for examples and URLs to more information.
358 *
359 * For example, the following code would force ordering (the initial
360 * value of "a" is zero, "b" is one, and "p" is "&a"):
361 *
362 * <programlisting>
363 * CPU 0 CPU 1
364 *
365 * b = 2;
366 * memory_barrier();
367 * p = &b; q = p;
368 * read_barrier_depends();
369 * d = *q;
370 * </programlisting>
371 *
372 * because the read of "*q" depends on the read of "p" and these
373 * two reads are separated by a read_barrier_depends(). However,
374 * the following code, with the same initial values for "a" and "b":
375 *
376 * <programlisting>
377 * CPU 0 CPU 1
378 *
379 * a = 2;
380 * memory_barrier();
381 * b = 3; y = b;
382 * read_barrier_depends();
383 * x = a;
384 * </programlisting>
385 *
386 * does not enforce ordering, since there is no data dependency between
387 * the read of "a" and the read of "b". Therefore, on some CPUs, such
388 * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb()
389 * in cases like this where there are no data dependencies.
390 **/
391
392#define read_barrier_depends() do { } while (0)
393
394#ifdef CONFIG_SMP
395#define smp_mb() mb()
396#ifdef CONFIG_X86_PPRO_FENCE
397# define smp_rmb() rmb()
398#else
399# define smp_rmb() barrier()
400#endif
401#ifdef CONFIG_X86_OOSTORE
402# define smp_wmb() wmb()
403#else
404# define smp_wmb() barrier()
405#endif
406#define smp_read_barrier_depends() read_barrier_depends()
407#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
408#else
409#define smp_mb() barrier()
410#define smp_rmb() barrier()
411#define smp_wmb() barrier()
412#define smp_read_barrier_depends() do { } while (0)
413#define set_mb(var, value) do { var = value; barrier(); } while (0)
414#endif
415
416/*
417 * Stop RDTSC speculation. This is needed when you need to use RDTSC
418 * (or get_cycles or vread that possibly accesses the TSC) in a defined
419 * code region.
420 *
421 * (Could use an alternative three way for this if there was one.)
422 */
423static inline void rdtsc_barrier(void)
424{
425 alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
426 alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
427}
428
429#endif /* ASM_X86__SYSTEM_H */
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h
deleted file mode 100644
index 5aedb8bffc5a..000000000000
--- a/include/asm-x86/system_64.h
+++ /dev/null
@@ -1,22 +0,0 @@
1#ifndef ASM_X86__SYSTEM_64_H
2#define ASM_X86__SYSTEM_64_H
3
4#include <asm/segment.h>
5#include <asm/cmpxchg.h>
6
7
8static inline unsigned long read_cr8(void)
9{
10 unsigned long cr8;
11 asm volatile("movq %%cr8,%0" : "=r" (cr8));
12 return cr8;
13}
14
15static inline void write_cr8(unsigned long val)
16{
17 asm volatile("movq %0,%%cr8" :: "r" (val) : "memory");
18}
19
20#include <linux/irqflags.h>
21
22#endif /* ASM_X86__SYSTEM_64_H */
diff --git a/include/asm-x86/tce.h b/include/asm-x86/tce.h
deleted file mode 100644
index e7932d7fbbab..000000000000
--- a/include/asm-x86/tce.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * This file is derived from asm-powerpc/tce.h.
3 *
4 * Copyright (C) IBM Corporation, 2006
5 *
6 * Author: Muli Ben-Yehuda <muli@il.ibm.com>
7 * Author: Jon Mason <jdmason@us.ibm.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#ifndef ASM_X86__TCE_H
25#define ASM_X86__TCE_H
26
27extern unsigned int specified_table_size;
28struct iommu_table;
29
30#define TCE_ENTRY_SIZE 8 /* in bytes */
31
32#define TCE_READ_SHIFT 0
33#define TCE_WRITE_SHIFT 1
34#define TCE_HUBID_SHIFT 2 /* unused */
35#define TCE_RSVD_SHIFT 8 /* unused */
36#define TCE_RPN_SHIFT 12
37#define TCE_UNUSED_SHIFT 48 /* unused */
38
39#define TCE_RPN_MASK 0x0000fffffffff000ULL
40
41extern void tce_build(struct iommu_table *tbl, unsigned long index,
42 unsigned int npages, unsigned long uaddr, int direction);
43extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages);
44extern void * __init alloc_tce_table(void);
45extern void __init free_tce_table(void *tbl);
46extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar);
47
48#endif /* ASM_X86__TCE_H */
diff --git a/include/asm-x86/termbits.h b/include/asm-x86/termbits.h
deleted file mode 100644
index 3d00dc5e0c71..000000000000
--- a/include/asm-x86/termbits.h
+++ /dev/null
@@ -1,198 +0,0 @@
1#ifndef ASM_X86__TERMBITS_H
2#define ASM_X86__TERMBITS_H
3
4#include <linux/posix_types.h>
5
6typedef unsigned char cc_t;
7typedef unsigned int speed_t;
8typedef unsigned int tcflag_t;
9
10#define NCCS 19
11struct termios {
12 tcflag_t c_iflag; /* input mode flags */
13 tcflag_t c_oflag; /* output mode flags */
14 tcflag_t c_cflag; /* control mode flags */
15 tcflag_t c_lflag; /* local mode flags */
16 cc_t c_line; /* line discipline */
17 cc_t c_cc[NCCS]; /* control characters */
18};
19
20struct termios2 {
21 tcflag_t c_iflag; /* input mode flags */
22 tcflag_t c_oflag; /* output mode flags */
23 tcflag_t c_cflag; /* control mode flags */
24 tcflag_t c_lflag; /* local mode flags */
25 cc_t c_line; /* line discipline */
26 cc_t c_cc[NCCS]; /* control characters */
27 speed_t c_ispeed; /* input speed */
28 speed_t c_ospeed; /* output speed */
29};
30
31struct ktermios {
32 tcflag_t c_iflag; /* input mode flags */
33 tcflag_t c_oflag; /* output mode flags */
34 tcflag_t c_cflag; /* control mode flags */
35 tcflag_t c_lflag; /* local mode flags */
36 cc_t c_line; /* line discipline */
37 cc_t c_cc[NCCS]; /* control characters */
38 speed_t c_ispeed; /* input speed */
39 speed_t c_ospeed; /* output speed */
40};
41
42/* c_cc characters */
43#define VINTR 0
44#define VQUIT 1
45#define VERASE 2
46#define VKILL 3
47#define VEOF 4
48#define VTIME 5
49#define VMIN 6
50#define VSWTC 7
51#define VSTART 8
52#define VSTOP 9
53#define VSUSP 10
54#define VEOL 11
55#define VREPRINT 12
56#define VDISCARD 13
57#define VWERASE 14
58#define VLNEXT 15
59#define VEOL2 16
60
61/* c_iflag bits */
62#define IGNBRK 0000001
63#define BRKINT 0000002
64#define IGNPAR 0000004
65#define PARMRK 0000010
66#define INPCK 0000020
67#define ISTRIP 0000040
68#define INLCR 0000100
69#define IGNCR 0000200
70#define ICRNL 0000400
71#define IUCLC 0001000
72#define IXON 0002000
73#define IXANY 0004000
74#define IXOFF 0010000
75#define IMAXBEL 0020000
76#define IUTF8 0040000
77
78/* c_oflag bits */
79#define OPOST 0000001
80#define OLCUC 0000002
81#define ONLCR 0000004
82#define OCRNL 0000010
83#define ONOCR 0000020
84#define ONLRET 0000040
85#define OFILL 0000100
86#define OFDEL 0000200
87#define NLDLY 0000400
88#define NL0 0000000
89#define NL1 0000400
90#define CRDLY 0003000
91#define CR0 0000000
92#define CR1 0001000
93#define CR2 0002000
94#define CR3 0003000
95#define TABDLY 0014000
96#define TAB0 0000000
97#define TAB1 0004000
98#define TAB2 0010000
99#define TAB3 0014000
100#define XTABS 0014000
101#define BSDLY 0020000
102#define BS0 0000000
103#define BS1 0020000
104#define VTDLY 0040000
105#define VT0 0000000
106#define VT1 0040000
107#define FFDLY 0100000
108#define FF0 0000000
109#define FF1 0100000
110
111/* c_cflag bit meaning */
112#define CBAUD 0010017
113#define B0 0000000 /* hang up */
114#define B50 0000001
115#define B75 0000002
116#define B110 0000003
117#define B134 0000004
118#define B150 0000005
119#define B200 0000006
120#define B300 0000007
121#define B600 0000010
122#define B1200 0000011
123#define B1800 0000012
124#define B2400 0000013
125#define B4800 0000014
126#define B9600 0000015
127#define B19200 0000016
128#define B38400 0000017
129#define EXTA B19200
130#define EXTB B38400
131#define CSIZE 0000060
132#define CS5 0000000
133#define CS6 0000020
134#define CS7 0000040
135#define CS8 0000060
136#define CSTOPB 0000100
137#define CREAD 0000200
138#define PARENB 0000400
139#define PARODD 0001000
140#define HUPCL 0002000
141#define CLOCAL 0004000
142#define CBAUDEX 0010000
143#define BOTHER 0010000 /* non standard rate */
144#define B57600 0010001
145#define B115200 0010002
146#define B230400 0010003
147#define B460800 0010004
148#define B500000 0010005
149#define B576000 0010006
150#define B921600 0010007
151#define B1000000 0010010
152#define B1152000 0010011
153#define B1500000 0010012
154#define B2000000 0010013
155#define B2500000 0010014
156#define B3000000 0010015
157#define B3500000 0010016
158#define B4000000 0010017
159#define CIBAUD 002003600000 /* input baud rate */
160#define CMSPAR 010000000000 /* mark or space (stick) parity */
161#define CRTSCTS 020000000000 /* flow control */
162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
165/* c_lflag bits */
166#define ISIG 0000001
167#define ICANON 0000002
168#define XCASE 0000004
169#define ECHO 0000010
170#define ECHOE 0000020
171#define ECHOK 0000040
172#define ECHONL 0000100
173#define NOFLSH 0000200
174#define TOSTOP 0000400
175#define ECHOCTL 0001000
176#define ECHOPRT 0002000
177#define ECHOKE 0004000
178#define FLUSHO 0010000
179#define PENDIN 0040000
180#define IEXTEN 0100000
181
182/* tcflow() and TCXONC use these */
183#define TCOOFF 0
184#define TCOON 1
185#define TCIOFF 2
186#define TCION 3
187
188/* tcflush() and TCFLSH use these */
189#define TCIFLUSH 0
190#define TCOFLUSH 1
191#define TCIOFLUSH 2
192
193/* tcsetattr uses these */
194#define TCSANOW 0
195#define TCSADRAIN 1
196#define TCSAFLUSH 2
197
198#endif /* ASM_X86__TERMBITS_H */
diff --git a/include/asm-x86/termios.h b/include/asm-x86/termios.h
deleted file mode 100644
index e235db248071..000000000000
--- a/include/asm-x86/termios.h
+++ /dev/null
@@ -1,113 +0,0 @@
1#ifndef ASM_X86__TERMIOS_H
2#define ASM_X86__TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24/* modem lines */
25#define TIOCM_LE 0x001
26#define TIOCM_DTR 0x002
27#define TIOCM_RTS 0x004
28#define TIOCM_ST 0x008
29#define TIOCM_SR 0x010
30#define TIOCM_CTS 0x020
31#define TIOCM_CAR 0x040
32#define TIOCM_RNG 0x080
33#define TIOCM_DSR 0x100
34#define TIOCM_CD TIOCM_CAR
35#define TIOCM_RI TIOCM_RNG
36#define TIOCM_OUT1 0x2000
37#define TIOCM_OUT2 0x4000
38#define TIOCM_LOOP 0x8000
39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41
42#ifdef __KERNEL__
43
44#include <asm/uaccess.h>
45
46/* intr=^C quit=^\ erase=del kill=^U
47 eof=^D vtime=\0 vmin=\1 sxtc=\0
48 start=^Q stop=^S susp=^Z eol=\0
49 reprint=^R discard=^U werase=^W lnext=^V
50 eol2=\0
51*/
52#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
53
54/*
55 * Translate a "termio" structure into a "termios". Ugh.
56 */
57#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
58 unsigned short __tmp; \
59 get_user(__tmp,&(termio)->x); \
60 *(unsigned short *) &(termios)->x = __tmp; \
61}
62
63static inline int user_termio_to_kernel_termios(struct ktermios *termios,
64 struct termio __user *termio)
65{
66 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag);
67 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag);
68 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag);
69 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag);
70 return copy_from_user(termios->c_cc, termio->c_cc, NCC);
71}
72
73/*
74 * Translate a "termios" structure into a "termio". Ugh.
75 */
76static inline int kernel_termios_to_user_termio(struct termio __user *termio,
77 struct ktermios *termios)
78{
79 put_user((termios)->c_iflag, &(termio)->c_iflag);
80 put_user((termios)->c_oflag, &(termio)->c_oflag);
81 put_user((termios)->c_cflag, &(termio)->c_cflag);
82 put_user((termios)->c_lflag, &(termio)->c_lflag);
83 put_user((termios)->c_line, &(termio)->c_line);
84 return copy_to_user((termio)->c_cc, (termios)->c_cc, NCC);
85}
86
87static inline int user_termios_to_kernel_termios(struct ktermios *k,
88 struct termios2 __user *u)
89{
90 return copy_from_user(k, u, sizeof(struct termios2));
91}
92
93static inline int kernel_termios_to_user_termios(struct termios2 __user *u,
94 struct ktermios *k)
95{
96 return copy_to_user(u, k, sizeof(struct termios2));
97}
98
99static inline int user_termios_to_kernel_termios_1(struct ktermios *k,
100 struct termios __user *u)
101{
102 return copy_from_user(k, u, sizeof(struct termios));
103}
104
105static inline int kernel_termios_to_user_termios_1(struct termios __user *u,
106 struct ktermios *k)
107{
108 return copy_to_user(u, k, sizeof(struct termios));
109}
110
111#endif /* __KERNEL__ */
112
113#endif /* ASM_X86__TERMIOS_H */
diff --git a/include/asm-x86/therm_throt.h b/include/asm-x86/therm_throt.h
deleted file mode 100644
index 1c7f57b6b66e..000000000000
--- a/include/asm-x86/therm_throt.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef ASM_X86__THERM_THROT_H
2#define ASM_X86__THERM_THROT_H
3
4#include <asm/atomic.h>
5
6extern atomic_t therm_throt_en;
7int therm_throt_process(int curr);
8
9#endif /* ASM_X86__THERM_THROT_H */
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h
deleted file mode 100644
index 3f4e52bb77f5..000000000000
--- a/include/asm-x86/thread_info.h
+++ /dev/null
@@ -1,264 +0,0 @@
1/* thread_info.h: low-level thread information
2 *
3 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 */
6
7#ifndef ASM_X86__THREAD_INFO_H
8#define ASM_X86__THREAD_INFO_H
9
10#include <linux/compiler.h>
11#include <asm/page.h>
12#include <asm/types.h>
13
14/*
15 * low level task data that entry.S needs immediate access to
16 * - this struct should fit entirely inside of one cache line
17 * - this struct shares the supervisor stack pages
18 */
19#ifndef __ASSEMBLY__
20struct task_struct;
21struct exec_domain;
22#include <asm/processor.h>
23
24struct thread_info {
25 struct task_struct *task; /* main task structure */
26 struct exec_domain *exec_domain; /* execution domain */
27 unsigned long flags; /* low level flags */
28 __u32 status; /* thread synchronous flags */
29 __u32 cpu; /* current CPU */
30 int preempt_count; /* 0 => preemptable,
31 <0 => BUG */
32 mm_segment_t addr_limit;
33 struct restart_block restart_block;
34 void __user *sysenter_return;
35#ifdef CONFIG_X86_32
36 unsigned long previous_esp; /* ESP of the previous stack in
37 case of nested (IRQ) stacks
38 */
39 __u8 supervisor_stack[0];
40#endif
41};
42
43#define INIT_THREAD_INFO(tsk) \
44{ \
45 .task = &tsk, \
46 .exec_domain = &default_exec_domain, \
47 .flags = 0, \
48 .cpu = 0, \
49 .preempt_count = 1, \
50 .addr_limit = KERNEL_DS, \
51 .restart_block = { \
52 .fn = do_no_restart_syscall, \
53 }, \
54}
55
56#define init_thread_info (init_thread_union.thread_info)
57#define init_stack (init_thread_union.stack)
58
59#else /* !__ASSEMBLY__ */
60
61#include <asm/asm-offsets.h>
62
63#endif
64
65/*
66 * thread information flags
67 * - these are process state flags that various assembly files
68 * may need to access
69 * - pending work-to-be-done flags are in LSW
70 * - other flags in MSW
71 * Warning: layout of LSW is hardcoded in entry.S
72 */
73#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
74#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
75#define TIF_SIGPENDING 2 /* signal pending */
76#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
77#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
78#define TIF_IRET 5 /* force IRET */
79#define TIF_SYSCALL_EMU 6 /* syscall emulation active */
80#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
81#define TIF_SECCOMP 8 /* secure computing */
82#define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */
83#define TIF_NOTSC 16 /* TSC is not accessible in userland */
84#define TIF_IA32 17 /* 32bit process */
85#define TIF_FORK 18 /* ret_from_fork */
86#define TIF_ABI_PENDING 19
87#define TIF_MEMDIE 20
88#define TIF_DEBUG 21 /* uses debug registers */
89#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
90#define TIF_FREEZE 23 /* is freezing for suspend */
91#define TIF_FORCED_TF 24 /* true if TF in eflags artificially */
92#define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */
93#define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */
94#define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */
95
96#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
97#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
98#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
99#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
100#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
101#define _TIF_IRET (1 << TIF_IRET)
102#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
103#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
104#define _TIF_SECCOMP (1 << TIF_SECCOMP)
105#define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY)
106#define _TIF_NOTSC (1 << TIF_NOTSC)
107#define _TIF_IA32 (1 << TIF_IA32)
108#define _TIF_FORK (1 << TIF_FORK)
109#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
110#define _TIF_DEBUG (1 << TIF_DEBUG)
111#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
112#define _TIF_FREEZE (1 << TIF_FREEZE)
113#define _TIF_FORCED_TF (1 << TIF_FORCED_TF)
114#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
115#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
116#define _TIF_BTS_TRACE_TS (1 << TIF_BTS_TRACE_TS)
117
118/* work to do in syscall_trace_enter() */
119#define _TIF_WORK_SYSCALL_ENTRY \
120 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU | \
121 _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | _TIF_SINGLESTEP)
122
123/* work to do in syscall_trace_leave() */
124#define _TIF_WORK_SYSCALL_EXIT \
125 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP)
126
127/* work to do on interrupt/exception return */
128#define _TIF_WORK_MASK \
129 (0x0000FFFF & \
130 ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT| \
131 _TIF_SINGLESTEP|_TIF_SECCOMP|_TIF_SYSCALL_EMU))
132
133/* work to do on any return to user space */
134#define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP)
135
136/* Only used for 64 bit */
137#define _TIF_DO_NOTIFY_MASK \
138 (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_NOTIFY_RESUME)
139
140/* flags to check in __switch_to() */
141#define _TIF_WORK_CTXSW \
142 (_TIF_IO_BITMAP|_TIF_DEBUGCTLMSR|_TIF_DS_AREA_MSR|_TIF_BTS_TRACE_TS| \
143 _TIF_NOTSC)
144
145#define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
146#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)
147
148#define PREEMPT_ACTIVE 0x10000000
149
150/* thread information allocation */
151#ifdef CONFIG_DEBUG_STACK_USAGE
152#define THREAD_FLAGS (GFP_KERNEL | __GFP_ZERO)
153#else
154#define THREAD_FLAGS GFP_KERNEL
155#endif
156
157#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
158
159#define alloc_thread_info(tsk) \
160 ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER))
161
162#ifdef CONFIG_X86_32
163
164#define STACK_WARN (THREAD_SIZE/8)
165/*
166 * macros/functions for gaining access to the thread information structure
167 *
168 * preempt_count needs to be 1 initially, until the scheduler is functional.
169 */
170#ifndef __ASSEMBLY__
171
172
173/* how to get the current stack pointer from C */
174register unsigned long current_stack_pointer asm("esp") __used;
175
176/* how to get the thread information struct from C */
177static inline struct thread_info *current_thread_info(void)
178{
179 return (struct thread_info *)
180 (current_stack_pointer & ~(THREAD_SIZE - 1));
181}
182
183#else /* !__ASSEMBLY__ */
184
185/* how to get the thread information struct from ASM */
186#define GET_THREAD_INFO(reg) \
187 movl $-THREAD_SIZE, reg; \
188 andl %esp, reg
189
190/* use this one if reg already contains %esp */
191#define GET_THREAD_INFO_WITH_ESP(reg) \
192 andl $-THREAD_SIZE, reg
193
194#endif
195
196#else /* X86_32 */
197
198#include <asm/pda.h>
199
200/*
201 * macros/functions for gaining access to the thread information structure
202 * preempt_count needs to be 1 initially, until the scheduler is functional.
203 */
204#ifndef __ASSEMBLY__
205static inline struct thread_info *current_thread_info(void)
206{
207 struct thread_info *ti;
208 ti = (void *)(read_pda(kernelstack) + PDA_STACKOFFSET - THREAD_SIZE);
209 return ti;
210}
211
212/* do not use in interrupt context */
213static inline struct thread_info *stack_thread_info(void)
214{
215 struct thread_info *ti;
216 asm("andq %%rsp,%0; " : "=r" (ti) : "0" (~(THREAD_SIZE - 1)));
217 return ti;
218}
219
220#else /* !__ASSEMBLY__ */
221
222/* how to get the thread information struct from ASM */
223#define GET_THREAD_INFO(reg) \
224 movq %gs:pda_kernelstack,reg ; \
225 subq $(THREAD_SIZE-PDA_STACKOFFSET),reg
226
227#endif
228
229#endif /* !X86_32 */
230
231/*
232 * Thread-synchronous status.
233 *
234 * This is different from the flags in that nobody else
235 * ever touches our thread-synchronous status, so we don't
236 * have to worry about atomic accesses.
237 */
238#define TS_USEDFPU 0x0001 /* FPU was used by this task
239 this quantum (SMP) */
240#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
241#define TS_POLLING 0x0004 /* true if in idle loop
242 and not sleeping */
243#define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */
244#define TS_XSAVE 0x0010 /* Use xsave/xrstor */
245
246#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
247
248#ifndef __ASSEMBLY__
249#define HAVE_SET_RESTORE_SIGMASK 1
250static inline void set_restore_sigmask(void)
251{
252 struct thread_info *ti = current_thread_info();
253 ti->status |= TS_RESTORE_SIGMASK;
254 set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
255}
256#endif /* !__ASSEMBLY__ */
257
258#ifndef __ASSEMBLY__
259extern void arch_task_cache_init(void);
260extern void free_thread_info(struct thread_info *ti);
261extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src);
262#define arch_task_cache_init arch_task_cache_init
263#endif
264#endif /* ASM_X86__THREAD_INFO_H */
diff --git a/include/asm-x86/time.h b/include/asm-x86/time.h
deleted file mode 100644
index 3e724eef7ac4..000000000000
--- a/include/asm-x86/time.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef ASM_X86__TIME_H
2#define ASM_X86__TIME_H
3
4extern void hpet_time_init(void);
5
6#include <asm/mc146818rtc.h>
7#ifdef CONFIG_X86_32
8#include <linux/efi.h>
9
10static inline unsigned long native_get_wallclock(void)
11{
12 unsigned long retval;
13
14 if (efi_enabled)
15 retval = efi_get_time();
16 else
17 retval = mach_get_cmos_time();
18
19 return retval;
20}
21
22static inline int native_set_wallclock(unsigned long nowtime)
23{
24 int retval;
25
26 if (efi_enabled)
27 retval = efi_set_rtc_mmss(nowtime);
28 else
29 retval = mach_set_rtc_mmss(nowtime);
30
31 return retval;
32}
33
34#else
35extern void native_time_init_hook(void);
36
37static inline unsigned long native_get_wallclock(void)
38{
39 return mach_get_cmos_time();
40}
41
42static inline int native_set_wallclock(unsigned long nowtime)
43{
44 return mach_set_rtc_mmss(nowtime);
45}
46
47#endif
48
49extern void time_init(void);
50
51#ifdef CONFIG_PARAVIRT
52#include <asm/paravirt.h>
53#else /* !CONFIG_PARAVIRT */
54
55#define get_wallclock() native_get_wallclock()
56#define set_wallclock(x) native_set_wallclock(x)
57#define choose_time_init() hpet_time_init
58
59#endif /* CONFIG_PARAVIRT */
60
61extern unsigned long __init calibrate_cpu(void);
62
63#endif /* ASM_X86__TIME_H */
diff --git a/include/asm-x86/timer.h b/include/asm-x86/timer.h
deleted file mode 100644
index d0babce4b47a..000000000000
--- a/include/asm-x86/timer.h
+++ /dev/null
@@ -1,66 +0,0 @@
1#ifndef ASM_X86__TIMER_H
2#define ASM_X86__TIMER_H
3#include <linux/init.h>
4#include <linux/pm.h>
5#include <linux/percpu.h>
6
7#define TICK_SIZE (tick_nsec / 1000)
8
9unsigned long long native_sched_clock(void);
10unsigned long native_calibrate_tsc(void);
11
12#ifdef CONFIG_X86_32
13extern int timer_ack;
14extern int recalibrate_cpu_khz(void);
15#endif /* CONFIG_X86_32 */
16
17extern int no_timer_check;
18
19#ifndef CONFIG_PARAVIRT
20#define calibrate_tsc() native_calibrate_tsc()
21#endif
22
23/* Accelerators for sched_clock()
24 * convert from cycles(64bits) => nanoseconds (64bits)
25 * basic equation:
26 * ns = cycles / (freq / ns_per_sec)
27 * ns = cycles * (ns_per_sec / freq)
28 * ns = cycles * (10^9 / (cpu_khz * 10^3))
29 * ns = cycles * (10^6 / cpu_khz)
30 *
31 * Then we use scaling math (suggested by george@mvista.com) to get:
32 * ns = cycles * (10^6 * SC / cpu_khz) / SC
33 * ns = cycles * cyc2ns_scale / SC
34 *
35 * And since SC is a constant power of two, we can convert the div
36 * into a shift.
37 *
38 * We can use khz divisor instead of mhz to keep a better precision, since
39 * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits.
40 * (mathieu.desnoyers@polymtl.ca)
41 *
42 * -johnstul@us.ibm.com "math is hard, lets go shopping!"
43 */
44
45DECLARE_PER_CPU(unsigned long, cyc2ns);
46
47#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
48
49static inline unsigned long long __cycles_2_ns(unsigned long long cyc)
50{
51 return cyc * per_cpu(cyc2ns, smp_processor_id()) >> CYC2NS_SCALE_FACTOR;
52}
53
54static inline unsigned long long cycles_2_ns(unsigned long long cyc)
55{
56 unsigned long long ns;
57 unsigned long flags;
58
59 local_irq_save(flags);
60 ns = __cycles_2_ns(cyc);
61 local_irq_restore(flags);
62
63 return ns;
64}
65
66#endif /* ASM_X86__TIMER_H */
diff --git a/include/asm-x86/timex.h b/include/asm-x86/timex.h
deleted file mode 100644
index d1ce2416a5da..000000000000
--- a/include/asm-x86/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* x86 architecture timex specifications */
2#ifndef ASM_X86__TIMEX_H
3#define ASM_X86__TIMEX_H
4
5#include <asm/processor.h>
6#include <asm/tsc.h>
7
8#ifdef CONFIG_X86_ELAN
9# define PIT_TICK_RATE 1189200 /* AMD Elan has different frequency! */
10#elif defined(CONFIG_X86_RDC321X)
11# define PIT_TICK_RATE 1041667 /* Underlying HZ for R8610 */
12#else
13# define PIT_TICK_RATE 1193182 /* Underlying HZ */
14#endif
15#define CLOCK_TICK_RATE PIT_TICK_RATE
16
17#define ARCH_HAS_READ_CURRENT_TIMER
18
19#endif /* ASM_X86__TIMEX_H */
diff --git a/include/asm-x86/tlb.h b/include/asm-x86/tlb.h
deleted file mode 100644
index db36e9e89e87..000000000000
--- a/include/asm-x86/tlb.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef ASM_X86__TLB_H
2#define ASM_X86__TLB_H
3
4#define tlb_start_vma(tlb, vma) do { } while (0)
5#define tlb_end_vma(tlb, vma) do { } while (0)
6#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
7#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
8
9#include <asm-generic/tlb.h>
10
11#endif /* ASM_X86__TLB_H */
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h
deleted file mode 100644
index 3cdd08b5bdb7..000000000000
--- a/include/asm-x86/tlbflush.h
+++ /dev/null
@@ -1,178 +0,0 @@
1#ifndef ASM_X86__TLBFLUSH_H
2#define ASM_X86__TLBFLUSH_H
3
4#include <linux/mm.h>
5#include <linux/sched.h>
6
7#include <asm/processor.h>
8#include <asm/system.h>
9
10#ifdef CONFIG_PARAVIRT
11#include <asm/paravirt.h>
12#else
13#define __flush_tlb() __native_flush_tlb()
14#define __flush_tlb_global() __native_flush_tlb_global()
15#define __flush_tlb_single(addr) __native_flush_tlb_single(addr)
16#endif
17
18static inline void __native_flush_tlb(void)
19{
20 write_cr3(read_cr3());
21}
22
23static inline void __native_flush_tlb_global(void)
24{
25 unsigned long flags;
26 unsigned long cr4;
27
28 /*
29 * Read-modify-write to CR4 - protect it from preemption and
30 * from interrupts. (Use the raw variant because this code can
31 * be called from deep inside debugging code.)
32 */
33 raw_local_irq_save(flags);
34
35 cr4 = read_cr4();
36 /* clear PGE */
37 write_cr4(cr4 & ~X86_CR4_PGE);
38 /* write old PGE again and flush TLBs */
39 write_cr4(cr4);
40
41 raw_local_irq_restore(flags);
42}
43
44static inline void __native_flush_tlb_single(unsigned long addr)
45{
46 asm volatile("invlpg (%0)" ::"r" (addr) : "memory");
47}
48
49static inline void __flush_tlb_all(void)
50{
51 if (cpu_has_pge)
52 __flush_tlb_global();
53 else
54 __flush_tlb();
55}
56
57static inline void __flush_tlb_one(unsigned long addr)
58{
59 if (cpu_has_invlpg)
60 __flush_tlb_single(addr);
61 else
62 __flush_tlb();
63}
64
65#ifdef CONFIG_X86_32
66# define TLB_FLUSH_ALL 0xffffffff
67#else
68# define TLB_FLUSH_ALL -1ULL
69#endif
70
71/*
72 * TLB flushing:
73 *
74 * - flush_tlb() flushes the current mm struct TLBs
75 * - flush_tlb_all() flushes all processes TLBs
76 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
77 * - flush_tlb_page(vma, vmaddr) flushes one page
78 * - flush_tlb_range(vma, start, end) flushes a range of pages
79 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
80 * - flush_tlb_others(cpumask, mm, va) flushes TLBs on other cpus
81 *
82 * ..but the i386 has somewhat limited tlb flushing capabilities,
83 * and page-granular flushes are available only on i486 and up.
84 *
85 * x86-64 can only flush individual pages or full VMs. For a range flush
86 * we always do the full VM. Might be worth trying if for a small
87 * range a few INVLPGs in a row are a win.
88 */
89
90#ifndef CONFIG_SMP
91
92#define flush_tlb() __flush_tlb()
93#define flush_tlb_all() __flush_tlb_all()
94#define local_flush_tlb() __flush_tlb()
95
96static inline void flush_tlb_mm(struct mm_struct *mm)
97{
98 if (mm == current->active_mm)
99 __flush_tlb();
100}
101
102static inline void flush_tlb_page(struct vm_area_struct *vma,
103 unsigned long addr)
104{
105 if (vma->vm_mm == current->active_mm)
106 __flush_tlb_one(addr);
107}
108
109static inline void flush_tlb_range(struct vm_area_struct *vma,
110 unsigned long start, unsigned long end)
111{
112 if (vma->vm_mm == current->active_mm)
113 __flush_tlb();
114}
115
116static inline void native_flush_tlb_others(const cpumask_t *cpumask,
117 struct mm_struct *mm,
118 unsigned long va)
119{
120}
121
122static inline void reset_lazy_tlbstate(void)
123{
124}
125
126#else /* SMP */
127
128#include <asm/smp.h>
129
130#define local_flush_tlb() __flush_tlb()
131
132extern void flush_tlb_all(void);
133extern void flush_tlb_current_task(void);
134extern void flush_tlb_mm(struct mm_struct *);
135extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
136
137#define flush_tlb() flush_tlb_current_task()
138
139static inline void flush_tlb_range(struct vm_area_struct *vma,
140 unsigned long start, unsigned long end)
141{
142 flush_tlb_mm(vma->vm_mm);
143}
144
145void native_flush_tlb_others(const cpumask_t *cpumask, struct mm_struct *mm,
146 unsigned long va);
147
148#define TLBSTATE_OK 1
149#define TLBSTATE_LAZY 2
150
151#ifdef CONFIG_X86_32
152struct tlb_state {
153 struct mm_struct *active_mm;
154 int state;
155 char __cacheline_padding[L1_CACHE_BYTES-8];
156};
157DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate);
158
159void reset_lazy_tlbstate(void);
160#else
161static inline void reset_lazy_tlbstate(void)
162{
163}
164#endif
165
166#endif /* SMP */
167
168#ifndef CONFIG_PARAVIRT
169#define flush_tlb_others(mask, mm, va) native_flush_tlb_others(&mask, mm, va)
170#endif
171
172static inline void flush_tlb_kernel_range(unsigned long start,
173 unsigned long end)
174{
175 flush_tlb_all();
176}
177
178#endif /* ASM_X86__TLBFLUSH_H */
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
deleted file mode 100644
index 7eca9bc022b2..000000000000
--- a/include/asm-x86/topology.h
+++ /dev/null
@@ -1,258 +0,0 @@
1/*
2 * Written by: Matthew Dobson, IBM Corporation
3 *
4 * Copyright (C) 2002, IBM Corp.
5 *
6 * All rights reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
16 * NON INFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 * Send feedback to <colpatch@us.ibm.com>
24 */
25#ifndef ASM_X86__TOPOLOGY_H
26#define ASM_X86__TOPOLOGY_H
27
28#ifdef CONFIG_X86_32
29# ifdef CONFIG_X86_HT
30# define ENABLE_TOPO_DEFINES
31# endif
32#else
33# ifdef CONFIG_SMP
34# define ENABLE_TOPO_DEFINES
35# endif
36#endif
37
38/* Node not present */
39#define NUMA_NO_NODE (-1)
40
41#ifdef CONFIG_NUMA
42#include <linux/cpumask.h>
43#include <asm/mpspec.h>
44
45#ifdef CONFIG_X86_32
46
47/* Mappings between node number and cpus on that node. */
48extern cpumask_t node_to_cpumask_map[];
49
50/* Mappings between logical cpu number and node number */
51extern int cpu_to_node_map[];
52
53/* Returns the number of the node containing CPU 'cpu' */
54static inline int cpu_to_node(int cpu)
55{
56 return cpu_to_node_map[cpu];
57}
58#define early_cpu_to_node(cpu) cpu_to_node(cpu)
59
60/* Returns a bitmask of CPUs on Node 'node'.
61 *
62 * Side note: this function creates the returned cpumask on the stack
63 * so with a high NR_CPUS count, excessive stack space is used. The
64 * node_to_cpumask_ptr function should be used whenever possible.
65 */
66static inline cpumask_t node_to_cpumask(int node)
67{
68 return node_to_cpumask_map[node];
69}
70
71#else /* CONFIG_X86_64 */
72
73/* Mappings between node number and cpus on that node. */
74extern cpumask_t *node_to_cpumask_map;
75
76/* Mappings between logical cpu number and node number */
77DECLARE_EARLY_PER_CPU(int, x86_cpu_to_node_map);
78
79/* Returns the number of the current Node. */
80#define numa_node_id() read_pda(nodenumber)
81
82#ifdef CONFIG_DEBUG_PER_CPU_MAPS
83extern int cpu_to_node(int cpu);
84extern int early_cpu_to_node(int cpu);
85extern const cpumask_t *_node_to_cpumask_ptr(int node);
86extern cpumask_t node_to_cpumask(int node);
87
88#else /* !CONFIG_DEBUG_PER_CPU_MAPS */
89
90/* Returns the number of the node containing CPU 'cpu' */
91static inline int cpu_to_node(int cpu)
92{
93 return per_cpu(x86_cpu_to_node_map, cpu);
94}
95
96/* Same function but used if called before per_cpu areas are setup */
97static inline int early_cpu_to_node(int cpu)
98{
99 if (early_per_cpu_ptr(x86_cpu_to_node_map))
100 return early_per_cpu_ptr(x86_cpu_to_node_map)[cpu];
101
102 return per_cpu(x86_cpu_to_node_map, cpu);
103}
104
105/* Returns a pointer to the cpumask of CPUs on Node 'node'. */
106static inline const cpumask_t *_node_to_cpumask_ptr(int node)
107{
108 return &node_to_cpumask_map[node];
109}
110
111/* Returns a bitmask of CPUs on Node 'node'. */
112static inline cpumask_t node_to_cpumask(int node)
113{
114 return node_to_cpumask_map[node];
115}
116
117#endif /* !CONFIG_DEBUG_PER_CPU_MAPS */
118
119/* Replace default node_to_cpumask_ptr with optimized version */
120#define node_to_cpumask_ptr(v, node) \
121 const cpumask_t *v = _node_to_cpumask_ptr(node)
122
123#define node_to_cpumask_ptr_next(v, node) \
124 v = _node_to_cpumask_ptr(node)
125
126#endif /* CONFIG_X86_64 */
127
128/*
129 * Returns the number of the node containing Node 'node'. This
130 * architecture is flat, so it is a pretty simple function!
131 */
132#define parent_node(node) (node)
133
134#define pcibus_to_node(bus) __pcibus_to_node(bus)
135#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus)
136
137#ifdef CONFIG_X86_32
138extern unsigned long node_start_pfn[];
139extern unsigned long node_end_pfn[];
140extern unsigned long node_remap_size[];
141#define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid])
142
143# define SD_CACHE_NICE_TRIES 1
144# define SD_IDLE_IDX 1
145# define SD_NEWIDLE_IDX 2
146# define SD_FORKEXEC_IDX 0
147
148#else
149
150# define SD_CACHE_NICE_TRIES 2
151# define SD_IDLE_IDX 2
152# define SD_NEWIDLE_IDX 2
153# define SD_FORKEXEC_IDX 1
154
155#endif
156
157/* sched_domains SD_NODE_INIT for NUMAQ machines */
158#define SD_NODE_INIT (struct sched_domain) { \
159 .min_interval = 8, \
160 .max_interval = 32, \
161 .busy_factor = 32, \
162 .imbalance_pct = 125, \
163 .cache_nice_tries = SD_CACHE_NICE_TRIES, \
164 .busy_idx = 3, \
165 .idle_idx = SD_IDLE_IDX, \
166 .newidle_idx = SD_NEWIDLE_IDX, \
167 .wake_idx = 1, \
168 .forkexec_idx = SD_FORKEXEC_IDX, \
169 .flags = SD_LOAD_BALANCE \
170 | SD_BALANCE_EXEC \
171 | SD_BALANCE_FORK \
172 | SD_SERIALIZE \
173 | SD_WAKE_BALANCE, \
174 .last_balance = jiffies, \
175 .balance_interval = 1, \
176}
177
178#ifdef CONFIG_X86_64_ACPI_NUMA
179extern int __node_distance(int, int);
180#define node_distance(a, b) __node_distance(a, b)
181#endif
182
183#else /* !CONFIG_NUMA */
184
185#define numa_node_id() 0
186#define cpu_to_node(cpu) 0
187#define early_cpu_to_node(cpu) 0
188
189static inline const cpumask_t *_node_to_cpumask_ptr(int node)
190{
191 return &cpu_online_map;
192}
193static inline cpumask_t node_to_cpumask(int node)
194{
195 return cpu_online_map;
196}
197static inline int node_to_first_cpu(int node)
198{
199 return first_cpu(cpu_online_map);
200}
201
202/* Replace default node_to_cpumask_ptr with optimized version */
203#define node_to_cpumask_ptr(v, node) \
204 const cpumask_t *v = _node_to_cpumask_ptr(node)
205
206#define node_to_cpumask_ptr_next(v, node) \
207 v = _node_to_cpumask_ptr(node)
208#endif
209
210#include <asm-generic/topology.h>
211
212#ifdef CONFIG_NUMA
213/* Returns the number of the first CPU on Node 'node'. */
214static inline int node_to_first_cpu(int node)
215{
216 node_to_cpumask_ptr(mask, node);
217 return first_cpu(*mask);
218}
219#endif
220
221extern cpumask_t cpu_coregroup_map(int cpu);
222
223#ifdef ENABLE_TOPO_DEFINES
224#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
225#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
226#define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu))
227#define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu))
228
229/* indicates that pointers to the topology cpumask_t maps are valid */
230#define arch_provides_topology_pointers yes
231#endif
232
233static inline void arch_fix_phys_package_id(int num, u32 slot)
234{
235}
236
237struct pci_bus;
238void set_pci_bus_resources_arch_default(struct pci_bus *b);
239
240#ifdef CONFIG_SMP
241#define mc_capable() (boot_cpu_data.x86_max_cores > 1)
242#define smt_capable() (smp_num_siblings > 1)
243#endif
244
245#ifdef CONFIG_NUMA
246extern int get_mp_bus_to_node(int busnum);
247extern void set_mp_bus_to_node(int busnum, int node);
248#else
249static inline int get_mp_bus_to_node(int busnum)
250{
251 return 0;
252}
253static inline void set_mp_bus_to_node(int busnum, int node)
254{
255}
256#endif
257
258#endif /* ASM_X86__TOPOLOGY_H */
diff --git a/include/asm-x86/trampoline.h b/include/asm-x86/trampoline.h
deleted file mode 100644
index 0406bbd898a9..000000000000
--- a/include/asm-x86/trampoline.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef ASM_X86__TRAMPOLINE_H
2#define ASM_X86__TRAMPOLINE_H
3
4#ifndef __ASSEMBLY__
5
6/*
7 * Trampoline 80x86 program as an array.
8 */
9extern const unsigned char trampoline_data [];
10extern const unsigned char trampoline_end [];
11extern unsigned char *trampoline_base;
12
13extern unsigned long init_rsp;
14extern unsigned long initial_code;
15
16#define TRAMPOLINE_BASE 0x6000
17extern unsigned long setup_trampoline(void);
18
19#endif /* __ASSEMBLY__ */
20
21#endif /* ASM_X86__TRAMPOLINE_H */
diff --git a/include/asm-x86/traps.h b/include/asm-x86/traps.h
deleted file mode 100644
index 6c3dc2c65751..000000000000
--- a/include/asm-x86/traps.h
+++ /dev/null
@@ -1,81 +0,0 @@
1#ifndef ASM_X86__TRAPS_H
2#define ASM_X86__TRAPS_H
3
4#include <asm/debugreg.h>
5
6#ifdef CONFIG_X86_32
7#define dotraplinkage
8#else
9#define dotraplinkage asmlinkage
10#endif
11
12asmlinkage void divide_error(void);
13asmlinkage void debug(void);
14asmlinkage void nmi(void);
15asmlinkage void int3(void);
16asmlinkage void overflow(void);
17asmlinkage void bounds(void);
18asmlinkage void invalid_op(void);
19asmlinkage void device_not_available(void);
20#ifdef CONFIG_X86_64
21asmlinkage void double_fault(void);
22#endif
23asmlinkage void coprocessor_segment_overrun(void);
24asmlinkage void invalid_TSS(void);
25asmlinkage void segment_not_present(void);
26asmlinkage void stack_segment(void);
27asmlinkage void general_protection(void);
28asmlinkage void page_fault(void);
29asmlinkage void spurious_interrupt_bug(void);
30asmlinkage void coprocessor_error(void);
31asmlinkage void alignment_check(void);
32#ifdef CONFIG_X86_MCE
33asmlinkage void machine_check(void);
34#endif /* CONFIG_X86_MCE */
35asmlinkage void simd_coprocessor_error(void);
36
37dotraplinkage void do_divide_error(struct pt_regs *, long);
38dotraplinkage void do_debug(struct pt_regs *, long);
39dotraplinkage void do_nmi(struct pt_regs *, long);
40dotraplinkage void do_int3(struct pt_regs *, long);
41dotraplinkage void do_overflow(struct pt_regs *, long);
42dotraplinkage void do_bounds(struct pt_regs *, long);
43dotraplinkage void do_invalid_op(struct pt_regs *, long);
44dotraplinkage void do_device_not_available(struct pt_regs *, long);
45dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long);
46dotraplinkage void do_invalid_TSS(struct pt_regs *, long);
47dotraplinkage void do_segment_not_present(struct pt_regs *, long);
48dotraplinkage void do_stack_segment(struct pt_regs *, long);
49dotraplinkage void do_general_protection(struct pt_regs *, long);
50dotraplinkage void do_page_fault(struct pt_regs *, unsigned long);
51dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long);
52dotraplinkage void do_coprocessor_error(struct pt_regs *, long);
53dotraplinkage void do_alignment_check(struct pt_regs *, long);
54#ifdef CONFIG_X86_MCE
55dotraplinkage void do_machine_check(struct pt_regs *, long);
56#endif
57dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long);
58#ifdef CONFIG_X86_32
59dotraplinkage void do_iret_error(struct pt_regs *, long);
60#endif
61
62static inline int get_si_code(unsigned long condition)
63{
64 if (condition & DR_STEP)
65 return TRAP_TRACE;
66 else if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3))
67 return TRAP_HWBKPT;
68 else
69 return TRAP_BRKPT;
70}
71
72extern int panic_on_unrecovered_nmi;
73extern int kstack_depth_to_print;
74
75#ifdef CONFIG_X86_32
76void math_error(void __user *);
77unsigned long patch_espfix_desc(unsigned long, unsigned long);
78asmlinkage void math_emulate(long);
79#endif
80
81#endif /* ASM_X86__TRAPS_H */
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h
deleted file mode 100644
index ad0f5c41e78c..000000000000
--- a/include/asm-x86/tsc.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * x86 TSC related functions
3 */
4#ifndef ASM_X86__TSC_H
5#define ASM_X86__TSC_H
6
7#include <asm/processor.h>
8
9#define NS_SCALE 10 /* 2^10, carefully chosen */
10#define US_SCALE 32 /* 2^32, arbitralrily chosen */
11
12/*
13 * Standard way to access the cycle counter.
14 */
15typedef unsigned long long cycles_t;
16
17extern unsigned int cpu_khz;
18extern unsigned int tsc_khz;
19
20extern void disable_TSC(void);
21
22static inline cycles_t get_cycles(void)
23{
24 unsigned long long ret = 0;
25
26#ifndef CONFIG_X86_TSC
27 if (!cpu_has_tsc)
28 return 0;
29#endif
30 rdtscll(ret);
31
32 return ret;
33}
34
35static __always_inline cycles_t vget_cycles(void)
36{
37 /*
38 * We only do VDSOs on TSC capable CPUs, so this shouldnt
39 * access boot_cpu_data (which is not VDSO-safe):
40 */
41#ifndef CONFIG_X86_TSC
42 if (!cpu_has_tsc)
43 return 0;
44#endif
45 return (cycles_t)__native_read_tsc();
46}
47
48extern void tsc_init(void);
49extern void mark_tsc_unstable(char *reason);
50extern int unsynchronized_tsc(void);
51int check_tsc_unstable(void);
52
53/*
54 * Boot-time check whether the TSCs are synchronized across
55 * all CPUs/cores:
56 */
57extern void check_tsc_sync_source(int cpu);
58extern void check_tsc_sync_target(void);
59
60extern int notsc_setup(char *);
61
62#endif /* ASM_X86__TSC_H */
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h
deleted file mode 100644
index e78b52e17444..000000000000
--- a/include/asm-x86/types.h
+++ /dev/null
@@ -1,36 +0,0 @@
1#ifndef ASM_X86__TYPES_H
2#define ASM_X86__TYPES_H
3
4#include <asm-generic/int-ll64.h>
5
6#ifndef __ASSEMBLY__
7
8typedef unsigned short umode_t;
9
10#endif /* __ASSEMBLY__ */
11
12/*
13 * These aren't exported outside the kernel to avoid name space clashes
14 */
15#ifdef __KERNEL__
16
17#ifdef CONFIG_X86_32
18# define BITS_PER_LONG 32
19#else
20# define BITS_PER_LONG 64
21#endif
22
23#ifndef __ASSEMBLY__
24
25typedef u64 dma64_addr_t;
26#if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G)
27/* DMA addresses come in 32-bit and 64-bit flavours. */
28typedef u64 dma_addr_t;
29#else
30typedef u32 dma_addr_t;
31#endif
32
33#endif /* __ASSEMBLY__ */
34#endif /* __KERNEL__ */
35
36#endif /* ASM_X86__TYPES_H */
diff --git a/include/asm-x86/uaccess.h b/include/asm-x86/uaccess.h
deleted file mode 100644
index 48ebc0ad40ec..000000000000
--- a/include/asm-x86/uaccess.h
+++ /dev/null
@@ -1,454 +0,0 @@
1#ifndef ASM_X86__UACCESS_H
2#define ASM_X86__UACCESS_H
3/*
4 * User space memory access functions
5 */
6#include <linux/errno.h>
7#include <linux/compiler.h>
8#include <linux/thread_info.h>
9#include <linux/prefetch.h>
10#include <linux/string.h>
11#include <asm/asm.h>
12#include <asm/page.h>
13
14#define VERIFY_READ 0
15#define VERIFY_WRITE 1
16
17/*
18 * The fs value determines whether argument validity checking should be
19 * performed or not. If get_fs() == USER_DS, checking is performed, with
20 * get_fs() == KERNEL_DS, checking is bypassed.
21 *
22 * For historical reasons, these macros are grossly misnamed.
23 */
24
25#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
26
27#define KERNEL_DS MAKE_MM_SEG(-1UL)
28#define USER_DS MAKE_MM_SEG(PAGE_OFFSET)
29
30#define get_ds() (KERNEL_DS)
31#define get_fs() (current_thread_info()->addr_limit)
32#define set_fs(x) (current_thread_info()->addr_limit = (x))
33
34#define segment_eq(a, b) ((a).seg == (b).seg)
35
36#define __addr_ok(addr) \
37 ((unsigned long __force)(addr) < \
38 (current_thread_info()->addr_limit.seg))
39
40/*
41 * Test whether a block of memory is a valid user space address.
42 * Returns 0 if the range is valid, nonzero otherwise.
43 *
44 * This is equivalent to the following test:
45 * (u33)addr + (u33)size >= (u33)current->addr_limit.seg (u65 for x86_64)
46 *
47 * This needs 33-bit (65-bit for x86_64) arithmetic. We have a carry...
48 */
49
50#define __range_not_ok(addr, size) \
51({ \
52 unsigned long flag, roksum; \
53 __chk_user_ptr(addr); \
54 asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" \
55 : "=&r" (flag), "=r" (roksum) \
56 : "1" (addr), "g" ((long)(size)), \
57 "rm" (current_thread_info()->addr_limit.seg)); \
58 flag; \
59})
60
61/**
62 * access_ok: - Checks if a user space pointer is valid
63 * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that
64 * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe
65 * to write to a block, it is always safe to read from it.
66 * @addr: User space pointer to start of block to check
67 * @size: Size of block to check
68 *
69 * Context: User context only. This function may sleep.
70 *
71 * Checks if a pointer to a block of memory in user space is valid.
72 *
73 * Returns true (nonzero) if the memory block may be valid, false (zero)
74 * if it is definitely invalid.
75 *
76 * Note that, depending on architecture, this function probably just
77 * checks that the pointer is in the user space range - after calling
78 * this function, memory access functions may still return -EFAULT.
79 */
80#define access_ok(type, addr, size) (likely(__range_not_ok(addr, size) == 0))
81
82/*
83 * The exception table consists of pairs of addresses: the first is the
84 * address of an instruction that is allowed to fault, and the second is
85 * the address at which the program should continue. No registers are
86 * modified, so it is entirely up to the continuation code to figure out
87 * what to do.
88 *
89 * All the routines below use bits of fixup code that are out of line
90 * with the main instruction path. This means when everything is well,
91 * we don't even have to jump over them. Further, they do not intrude
92 * on our cache or tlb entries.
93 */
94
95struct exception_table_entry {
96 unsigned long insn, fixup;
97};
98
99extern int fixup_exception(struct pt_regs *regs);
100
101/*
102 * These are the main single-value transfer routines. They automatically
103 * use the right size if we just have the right pointer type.
104 *
105 * This gets kind of ugly. We want to return _two_ values in "get_user()"
106 * and yet we don't want to do any pointers, because that is too much
107 * of a performance impact. Thus we have a few rather ugly macros here,
108 * and hide all the ugliness from the user.
109 *
110 * The "__xxx" versions of the user access functions are versions that
111 * do not verify the address space, that must have been done previously
112 * with a separate "access_ok()" call (this is used when we do multiple
113 * accesses to the same area of user memory).
114 */
115
116extern int __get_user_1(void);
117extern int __get_user_2(void);
118extern int __get_user_4(void);
119extern int __get_user_8(void);
120extern int __get_user_bad(void);
121
122#define __get_user_x(size, ret, x, ptr) \
123 asm volatile("call __get_user_" #size \
124 : "=a" (ret),"=d" (x) \
125 : "0" (ptr)) \
126
127/* Careful: we have to cast the result to the type of the pointer
128 * for sign reasons */
129
130/**
131 * get_user: - Get a simple variable from user space.
132 * @x: Variable to store result.
133 * @ptr: Source address, in user space.
134 *
135 * Context: User context only. This function may sleep.
136 *
137 * This macro copies a single simple variable from user space to kernel
138 * space. It supports simple types like char and int, but not larger
139 * data types like structures or arrays.
140 *
141 * @ptr must have pointer-to-simple-variable type, and the result of
142 * dereferencing @ptr must be assignable to @x without a cast.
143 *
144 * Returns zero on success, or -EFAULT on error.
145 * On error, the variable @x is set to zero.
146 */
147#ifdef CONFIG_X86_32
148#define __get_user_8(__ret_gu, __val_gu, ptr) \
149 __get_user_x(X, __ret_gu, __val_gu, ptr)
150#else
151#define __get_user_8(__ret_gu, __val_gu, ptr) \
152 __get_user_x(8, __ret_gu, __val_gu, ptr)
153#endif
154
155#define get_user(x, ptr) \
156({ \
157 int __ret_gu; \
158 unsigned long __val_gu; \
159 __chk_user_ptr(ptr); \
160 switch (sizeof(*(ptr))) { \
161 case 1: \
162 __get_user_x(1, __ret_gu, __val_gu, ptr); \
163 break; \
164 case 2: \
165 __get_user_x(2, __ret_gu, __val_gu, ptr); \
166 break; \
167 case 4: \
168 __get_user_x(4, __ret_gu, __val_gu, ptr); \
169 break; \
170 case 8: \
171 __get_user_8(__ret_gu, __val_gu, ptr); \
172 break; \
173 default: \
174 __get_user_x(X, __ret_gu, __val_gu, ptr); \
175 break; \
176 } \
177 (x) = (__typeof__(*(ptr)))__val_gu; \
178 __ret_gu; \
179})
180
181#define __put_user_x(size, x, ptr, __ret_pu) \
182 asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
183 :"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
184
185
186
187#ifdef CONFIG_X86_32
188#define __put_user_u64(x, addr, err) \
189 asm volatile("1: movl %%eax,0(%2)\n" \
190 "2: movl %%edx,4(%2)\n" \
191 "3:\n" \
192 ".section .fixup,\"ax\"\n" \
193 "4: movl %3,%0\n" \
194 " jmp 3b\n" \
195 ".previous\n" \
196 _ASM_EXTABLE(1b, 4b) \
197 _ASM_EXTABLE(2b, 4b) \
198 : "=r" (err) \
199 : "A" (x), "r" (addr), "i" (-EFAULT), "0" (err))
200
201#define __put_user_x8(x, ptr, __ret_pu) \
202 asm volatile("call __put_user_8" : "=a" (__ret_pu) \
203 : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
204#else
205#define __put_user_u64(x, ptr, retval) \
206 __put_user_asm(x, ptr, retval, "q", "", "Zr", -EFAULT)
207#define __put_user_x8(x, ptr, __ret_pu) __put_user_x(8, x, ptr, __ret_pu)
208#endif
209
210extern void __put_user_bad(void);
211
212/*
213 * Strange magic calling convention: pointer in %ecx,
214 * value in %eax(:%edx), return value in %eax. clobbers %rbx
215 */
216extern void __put_user_1(void);
217extern void __put_user_2(void);
218extern void __put_user_4(void);
219extern void __put_user_8(void);
220
221#ifdef CONFIG_X86_WP_WORKS_OK
222
223/**
224 * put_user: - Write a simple value into user space.
225 * @x: Value to copy to user space.
226 * @ptr: Destination address, in user space.
227 *
228 * Context: User context only. This function may sleep.
229 *
230 * This macro copies a single simple value from kernel space to user
231 * space. It supports simple types like char and int, but not larger
232 * data types like structures or arrays.
233 *
234 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
235 * to the result of dereferencing @ptr.
236 *
237 * Returns zero on success, or -EFAULT on error.
238 */
239#define put_user(x, ptr) \
240({ \
241 int __ret_pu; \
242 __typeof__(*(ptr)) __pu_val; \
243 __chk_user_ptr(ptr); \
244 __pu_val = x; \
245 switch (sizeof(*(ptr))) { \
246 case 1: \
247 __put_user_x(1, __pu_val, ptr, __ret_pu); \
248 break; \
249 case 2: \
250 __put_user_x(2, __pu_val, ptr, __ret_pu); \
251 break; \
252 case 4: \
253 __put_user_x(4, __pu_val, ptr, __ret_pu); \
254 break; \
255 case 8: \
256 __put_user_x8(__pu_val, ptr, __ret_pu); \
257 break; \
258 default: \
259 __put_user_x(X, __pu_val, ptr, __ret_pu); \
260 break; \
261 } \
262 __ret_pu; \
263})
264
265#define __put_user_size(x, ptr, size, retval, errret) \
266do { \
267 retval = 0; \
268 __chk_user_ptr(ptr); \
269 switch (size) { \
270 case 1: \
271 __put_user_asm(x, ptr, retval, "b", "b", "iq", errret); \
272 break; \
273 case 2: \
274 __put_user_asm(x, ptr, retval, "w", "w", "ir", errret); \
275 break; \
276 case 4: \
277 __put_user_asm(x, ptr, retval, "l", "k", "ir", errret);\
278 break; \
279 case 8: \
280 __put_user_u64((__typeof__(*ptr))(x), ptr, retval); \
281 break; \
282 default: \
283 __put_user_bad(); \
284 } \
285} while (0)
286
287#else
288
289#define __put_user_size(x, ptr, size, retval, errret) \
290do { \
291 __typeof__(*(ptr))__pus_tmp = x; \
292 retval = 0; \
293 \
294 if (unlikely(__copy_to_user_ll(ptr, &__pus_tmp, size) != 0)) \
295 retval = errret; \
296} while (0)
297
298#define put_user(x, ptr) \
299({ \
300 int __ret_pu; \
301 __typeof__(*(ptr))__pus_tmp = x; \
302 __ret_pu = 0; \
303 if (unlikely(__copy_to_user_ll(ptr, &__pus_tmp, \
304 sizeof(*(ptr))) != 0)) \
305 __ret_pu = -EFAULT; \
306 __ret_pu; \
307})
308#endif
309
310#ifdef CONFIG_X86_32
311#define __get_user_asm_u64(x, ptr, retval, errret) (x) = __get_user_bad()
312#else
313#define __get_user_asm_u64(x, ptr, retval, errret) \
314 __get_user_asm(x, ptr, retval, "q", "", "=r", errret)
315#endif
316
317#define __get_user_size(x, ptr, size, retval, errret) \
318do { \
319 retval = 0; \
320 __chk_user_ptr(ptr); \
321 switch (size) { \
322 case 1: \
323 __get_user_asm(x, ptr, retval, "b", "b", "=q", errret); \
324 break; \
325 case 2: \
326 __get_user_asm(x, ptr, retval, "w", "w", "=r", errret); \
327 break; \
328 case 4: \
329 __get_user_asm(x, ptr, retval, "l", "k", "=r", errret); \
330 break; \
331 case 8: \
332 __get_user_asm_u64(x, ptr, retval, errret); \
333 break; \
334 default: \
335 (x) = __get_user_bad(); \
336 } \
337} while (0)
338
339#define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
340 asm volatile("1: mov"itype" %2,%"rtype"1\n" \
341 "2:\n" \
342 ".section .fixup,\"ax\"\n" \
343 "3: mov %3,%0\n" \
344 " xor"itype" %"rtype"1,%"rtype"1\n" \
345 " jmp 2b\n" \
346 ".previous\n" \
347 _ASM_EXTABLE(1b, 3b) \
348 : "=r" (err), ltype(x) \
349 : "m" (__m(addr)), "i" (errret), "0" (err))
350
351#define __put_user_nocheck(x, ptr, size) \
352({ \
353 long __pu_err; \
354 __put_user_size((x), (ptr), (size), __pu_err, -EFAULT); \
355 __pu_err; \
356})
357
358#define __get_user_nocheck(x, ptr, size) \
359({ \
360 long __gu_err; \
361 unsigned long __gu_val; \
362 __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
363 (x) = (__force __typeof__(*(ptr)))__gu_val; \
364 __gu_err; \
365})
366
367/* FIXME: this hack is definitely wrong -AK */
368struct __large_struct { unsigned long buf[100]; };
369#define __m(x) (*(struct __large_struct __user *)(x))
370
371/*
372 * Tell gcc we read from memory instead of writing: this is because
373 * we do not write to any memory gcc knows about, so there are no
374 * aliasing issues.
375 */
376#define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
377 asm volatile("1: mov"itype" %"rtype"1,%2\n" \
378 "2:\n" \
379 ".section .fixup,\"ax\"\n" \
380 "3: mov %3,%0\n" \
381 " jmp 2b\n" \
382 ".previous\n" \
383 _ASM_EXTABLE(1b, 3b) \
384 : "=r"(err) \
385 : ltype(x), "m" (__m(addr)), "i" (errret), "0" (err))
386/**
387 * __get_user: - Get a simple variable from user space, with less checking.
388 * @x: Variable to store result.
389 * @ptr: Source address, in user space.
390 *
391 * Context: User context only. This function may sleep.
392 *
393 * This macro copies a single simple variable from user space to kernel
394 * space. It supports simple types like char and int, but not larger
395 * data types like structures or arrays.
396 *
397 * @ptr must have pointer-to-simple-variable type, and the result of
398 * dereferencing @ptr must be assignable to @x without a cast.
399 *
400 * Caller must check the pointer with access_ok() before calling this
401 * function.
402 *
403 * Returns zero on success, or -EFAULT on error.
404 * On error, the variable @x is set to zero.
405 */
406
407#define __get_user(x, ptr) \
408 __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
409/**
410 * __put_user: - Write a simple value into user space, with less checking.
411 * @x: Value to copy to user space.
412 * @ptr: Destination address, in user space.
413 *
414 * Context: User context only. This function may sleep.
415 *
416 * This macro copies a single simple value from kernel space to user
417 * space. It supports simple types like char and int, but not larger
418 * data types like structures or arrays.
419 *
420 * @ptr must have pointer-to-simple-variable type, and @x must be assignable
421 * to the result of dereferencing @ptr.
422 *
423 * Caller must check the pointer with access_ok() before calling this
424 * function.
425 *
426 * Returns zero on success, or -EFAULT on error.
427 */
428
429#define __put_user(x, ptr) \
430 __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
431
432#define __get_user_unaligned __get_user
433#define __put_user_unaligned __put_user
434
435/*
436 * movsl can be slow when source and dest are not both 8-byte aligned
437 */
438#ifdef CONFIG_X86_INTEL_USERCOPY
439extern struct movsl_mask {
440 int mask;
441} ____cacheline_aligned_in_smp movsl_mask;
442#endif
443
444#define ARCH_HAS_NOCACHE_UACCESS 1
445
446#ifdef CONFIG_X86_32
447# include "uaccess_32.h"
448#else
449# define ARCH_HAS_SEARCH_EXTABLE
450# include "uaccess_64.h"
451#endif
452
453#endif /* ASM_X86__UACCESS_H */
454
diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h
deleted file mode 100644
index 6b5b57d9c6d1..000000000000
--- a/include/asm-x86/uaccess_32.h
+++ /dev/null
@@ -1,218 +0,0 @@
1#ifndef ASM_X86__UACCESS_32_H
2#define ASM_X86__UACCESS_32_H
3
4/*
5 * User space memory access functions
6 */
7#include <linux/errno.h>
8#include <linux/thread_info.h>
9#include <linux/prefetch.h>
10#include <linux/string.h>
11#include <asm/asm.h>
12#include <asm/page.h>
13
14unsigned long __must_check __copy_to_user_ll
15 (void __user *to, const void *from, unsigned long n);
16unsigned long __must_check __copy_from_user_ll
17 (void *to, const void __user *from, unsigned long n);
18unsigned long __must_check __copy_from_user_ll_nozero
19 (void *to, const void __user *from, unsigned long n);
20unsigned long __must_check __copy_from_user_ll_nocache
21 (void *to, const void __user *from, unsigned long n);
22unsigned long __must_check __copy_from_user_ll_nocache_nozero
23 (void *to, const void __user *from, unsigned long n);
24
25/**
26 * __copy_to_user_inatomic: - Copy a block of data into user space, with less checking.
27 * @to: Destination address, in user space.
28 * @from: Source address, in kernel space.
29 * @n: Number of bytes to copy.
30 *
31 * Context: User context only.
32 *
33 * Copy data from kernel space to user space. Caller must check
34 * the specified block with access_ok() before calling this function.
35 * The caller should also make sure he pins the user space address
36 * so that the we don't result in page fault and sleep.
37 *
38 * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault
39 * we return the initial request size (1, 2 or 4), as copy_*_user should do.
40 * If a store crosses a page boundary and gets a fault, the x86 will not write
41 * anything, so this is accurate.
42 */
43
44static __always_inline unsigned long __must_check
45__copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
46{
47 if (__builtin_constant_p(n)) {
48 unsigned long ret;
49
50 switch (n) {
51 case 1:
52 __put_user_size(*(u8 *)from, (u8 __user *)to,
53 1, ret, 1);
54 return ret;
55 case 2:
56 __put_user_size(*(u16 *)from, (u16 __user *)to,
57 2, ret, 2);
58 return ret;
59 case 4:
60 __put_user_size(*(u32 *)from, (u32 __user *)to,
61 4, ret, 4);
62 return ret;
63 }
64 }
65 return __copy_to_user_ll(to, from, n);
66}
67
68/**
69 * __copy_to_user: - Copy a block of data into user space, with less checking.
70 * @to: Destination address, in user space.
71 * @from: Source address, in kernel space.
72 * @n: Number of bytes to copy.
73 *
74 * Context: User context only. This function may sleep.
75 *
76 * Copy data from kernel space to user space. Caller must check
77 * the specified block with access_ok() before calling this function.
78 *
79 * Returns number of bytes that could not be copied.
80 * On success, this will be zero.
81 */
82static __always_inline unsigned long __must_check
83__copy_to_user(void __user *to, const void *from, unsigned long n)
84{
85 might_sleep();
86 return __copy_to_user_inatomic(to, from, n);
87}
88
89static __always_inline unsigned long
90__copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
91{
92 /* Avoid zeroing the tail if the copy fails..
93 * If 'n' is constant and 1, 2, or 4, we do still zero on a failure,
94 * but as the zeroing behaviour is only significant when n is not
95 * constant, that shouldn't be a problem.
96 */
97 if (__builtin_constant_p(n)) {
98 unsigned long ret;
99
100 switch (n) {
101 case 1:
102 __get_user_size(*(u8 *)to, from, 1, ret, 1);
103 return ret;
104 case 2:
105 __get_user_size(*(u16 *)to, from, 2, ret, 2);
106 return ret;
107 case 4:
108 __get_user_size(*(u32 *)to, from, 4, ret, 4);
109 return ret;
110 }
111 }
112 return __copy_from_user_ll_nozero(to, from, n);
113}
114
115/**
116 * __copy_from_user: - Copy a block of data from user space, with less checking.
117 * @to: Destination address, in kernel space.
118 * @from: Source address, in user space.
119 * @n: Number of bytes to copy.
120 *
121 * Context: User context only. This function may sleep.
122 *
123 * Copy data from user space to kernel space. Caller must check
124 * the specified block with access_ok() before calling this function.
125 *
126 * Returns number of bytes that could not be copied.
127 * On success, this will be zero.
128 *
129 * If some data could not be copied, this function will pad the copied
130 * data to the requested size using zero bytes.
131 *
132 * An alternate version - __copy_from_user_inatomic() - may be called from
133 * atomic context and will fail rather than sleep. In this case the
134 * uncopied bytes will *NOT* be padded with zeros. See fs/filemap.h
135 * for explanation of why this is needed.
136 */
137static __always_inline unsigned long
138__copy_from_user(void *to, const void __user *from, unsigned long n)
139{
140 might_sleep();
141 if (__builtin_constant_p(n)) {
142 unsigned long ret;
143
144 switch (n) {
145 case 1:
146 __get_user_size(*(u8 *)to, from, 1, ret, 1);
147 return ret;
148 case 2:
149 __get_user_size(*(u16 *)to, from, 2, ret, 2);
150 return ret;
151 case 4:
152 __get_user_size(*(u32 *)to, from, 4, ret, 4);
153 return ret;
154 }
155 }
156 return __copy_from_user_ll(to, from, n);
157}
158
159static __always_inline unsigned long __copy_from_user_nocache(void *to,
160 const void __user *from, unsigned long n)
161{
162 might_sleep();
163 if (__builtin_constant_p(n)) {
164 unsigned long ret;
165
166 switch (n) {
167 case 1:
168 __get_user_size(*(u8 *)to, from, 1, ret, 1);
169 return ret;
170 case 2:
171 __get_user_size(*(u16 *)to, from, 2, ret, 2);
172 return ret;
173 case 4:
174 __get_user_size(*(u32 *)to, from, 4, ret, 4);
175 return ret;
176 }
177 }
178 return __copy_from_user_ll_nocache(to, from, n);
179}
180
181static __always_inline unsigned long
182__copy_from_user_inatomic_nocache(void *to, const void __user *from,
183 unsigned long n)
184{
185 return __copy_from_user_ll_nocache_nozero(to, from, n);
186}
187
188unsigned long __must_check copy_to_user(void __user *to,
189 const void *from, unsigned long n);
190unsigned long __must_check copy_from_user(void *to,
191 const void __user *from,
192 unsigned long n);
193long __must_check strncpy_from_user(char *dst, const char __user *src,
194 long count);
195long __must_check __strncpy_from_user(char *dst,
196 const char __user *src, long count);
197
198/**
199 * strlen_user: - Get the size of a string in user space.
200 * @str: The string to measure.
201 *
202 * Context: User context only. This function may sleep.
203 *
204 * Get the size of a NUL-terminated string in user space.
205 *
206 * Returns the size of the string INCLUDING the terminating NUL.
207 * On exception, returns 0.
208 *
209 * If there is a limit on the length of a valid string, you may wish to
210 * consider using strnlen_user() instead.
211 */
212#define strlen_user(str) strnlen_user(str, LONG_MAX)
213
214long strnlen_user(const char __user *str, long n);
215unsigned long __must_check clear_user(void __user *mem, unsigned long len);
216unsigned long __must_check __clear_user(void __user *mem, unsigned long len);
217
218#endif /* ASM_X86__UACCESS_32_H */
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
deleted file mode 100644
index c96c1f5d07a2..000000000000
--- a/include/asm-x86/uaccess_64.h
+++ /dev/null
@@ -1,202 +0,0 @@
1#ifndef ASM_X86__UACCESS_64_H
2#define ASM_X86__UACCESS_64_H
3
4/*
5 * User space memory access functions
6 */
7#include <linux/compiler.h>
8#include <linux/errno.h>
9#include <linux/prefetch.h>
10#include <linux/lockdep.h>
11#include <asm/page.h>
12
13/*
14 * Copy To/From Userspace
15 */
16
17/* Handles exceptions in both to and from, but doesn't do access_ok */
18__must_check unsigned long
19copy_user_generic(void *to, const void *from, unsigned len);
20
21__must_check unsigned long
22copy_to_user(void __user *to, const void *from, unsigned len);
23__must_check unsigned long
24copy_from_user(void *to, const void __user *from, unsigned len);
25__must_check unsigned long
26copy_in_user(void __user *to, const void __user *from, unsigned len);
27
28static __always_inline __must_check
29int __copy_from_user(void *dst, const void __user *src, unsigned size)
30{
31 int ret = 0;
32 if (!__builtin_constant_p(size))
33 return copy_user_generic(dst, (__force void *)src, size);
34 switch (size) {
35 case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src,
36 ret, "b", "b", "=q", 1);
37 return ret;
38 case 2:__get_user_asm(*(u16 *)dst, (u16 __user *)src,
39 ret, "w", "w", "=r", 2);
40 return ret;
41 case 4:__get_user_asm(*(u32 *)dst, (u32 __user *)src,
42 ret, "l", "k", "=r", 4);
43 return ret;
44 case 8:__get_user_asm(*(u64 *)dst, (u64 __user *)src,
45 ret, "q", "", "=r", 8);
46 return ret;
47 case 10:
48 __get_user_asm(*(u64 *)dst, (u64 __user *)src,
49 ret, "q", "", "=r", 16);
50 if (unlikely(ret))
51 return ret;
52 __get_user_asm(*(u16 *)(8 + (char *)dst),
53 (u16 __user *)(8 + (char __user *)src),
54 ret, "w", "w", "=r", 2);
55 return ret;
56 case 16:
57 __get_user_asm(*(u64 *)dst, (u64 __user *)src,
58 ret, "q", "", "=r", 16);
59 if (unlikely(ret))
60 return ret;
61 __get_user_asm(*(u64 *)(8 + (char *)dst),
62 (u64 __user *)(8 + (char __user *)src),
63 ret, "q", "", "=r", 8);
64 return ret;
65 default:
66 return copy_user_generic(dst, (__force void *)src, size);
67 }
68}
69
70static __always_inline __must_check
71int __copy_to_user(void __user *dst, const void *src, unsigned size)
72{
73 int ret = 0;
74 if (!__builtin_constant_p(size))
75 return copy_user_generic((__force void *)dst, src, size);
76 switch (size) {
77 case 1:__put_user_asm(*(u8 *)src, (u8 __user *)dst,
78 ret, "b", "b", "iq", 1);
79 return ret;
80 case 2:__put_user_asm(*(u16 *)src, (u16 __user *)dst,
81 ret, "w", "w", "ir", 2);
82 return ret;
83 case 4:__put_user_asm(*(u32 *)src, (u32 __user *)dst,
84 ret, "l", "k", "ir", 4);
85 return ret;
86 case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst,
87 ret, "q", "", "ir", 8);
88 return ret;
89 case 10:
90 __put_user_asm(*(u64 *)src, (u64 __user *)dst,
91 ret, "q", "", "ir", 10);
92 if (unlikely(ret))
93 return ret;
94 asm("":::"memory");
95 __put_user_asm(4[(u16 *)src], 4 + (u16 __user *)dst,
96 ret, "w", "w", "ir", 2);
97 return ret;
98 case 16:
99 __put_user_asm(*(u64 *)src, (u64 __user *)dst,
100 ret, "q", "", "ir", 16);
101 if (unlikely(ret))
102 return ret;
103 asm("":::"memory");
104 __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst,
105 ret, "q", "", "ir", 8);
106 return ret;
107 default:
108 return copy_user_generic((__force void *)dst, src, size);
109 }
110}
111
112static __always_inline __must_check
113int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
114{
115 int ret = 0;
116 if (!__builtin_constant_p(size))
117 return copy_user_generic((__force void *)dst,
118 (__force void *)src, size);
119 switch (size) {
120 case 1: {
121 u8 tmp;
122 __get_user_asm(tmp, (u8 __user *)src,
123 ret, "b", "b", "=q", 1);
124 if (likely(!ret))
125 __put_user_asm(tmp, (u8 __user *)dst,
126 ret, "b", "b", "iq", 1);
127 return ret;
128 }
129 case 2: {
130 u16 tmp;
131 __get_user_asm(tmp, (u16 __user *)src,
132 ret, "w", "w", "=r", 2);
133 if (likely(!ret))
134 __put_user_asm(tmp, (u16 __user *)dst,
135 ret, "w", "w", "ir", 2);
136 return ret;
137 }
138
139 case 4: {
140 u32 tmp;
141 __get_user_asm(tmp, (u32 __user *)src,
142 ret, "l", "k", "=r", 4);
143 if (likely(!ret))
144 __put_user_asm(tmp, (u32 __user *)dst,
145 ret, "l", "k", "ir", 4);
146 return ret;
147 }
148 case 8: {
149 u64 tmp;
150 __get_user_asm(tmp, (u64 __user *)src,
151 ret, "q", "", "=r", 8);
152 if (likely(!ret))
153 __put_user_asm(tmp, (u64 __user *)dst,
154 ret, "q", "", "ir", 8);
155 return ret;
156 }
157 default:
158 return copy_user_generic((__force void *)dst,
159 (__force void *)src, size);
160 }
161}
162
163__must_check long
164strncpy_from_user(char *dst, const char __user *src, long count);
165__must_check long
166__strncpy_from_user(char *dst, const char __user *src, long count);
167__must_check long strnlen_user(const char __user *str, long n);
168__must_check long __strnlen_user(const char __user *str, long n);
169__must_check long strlen_user(const char __user *str);
170__must_check unsigned long clear_user(void __user *mem, unsigned long len);
171__must_check unsigned long __clear_user(void __user *mem, unsigned long len);
172
173__must_check long __copy_from_user_inatomic(void *dst, const void __user *src,
174 unsigned size);
175
176static __must_check __always_inline int
177__copy_to_user_inatomic(void __user *dst, const void *src, unsigned size)
178{
179 return copy_user_generic((__force void *)dst, src, size);
180}
181
182extern long __copy_user_nocache(void *dst, const void __user *src,
183 unsigned size, int zerorest);
184
185static inline int __copy_from_user_nocache(void *dst, const void __user *src,
186 unsigned size)
187{
188 might_sleep();
189 return __copy_user_nocache(dst, src, size, 1);
190}
191
192static inline int __copy_from_user_inatomic_nocache(void *dst,
193 const void __user *src,
194 unsigned size)
195{
196 return __copy_user_nocache(dst, src, size, 0);
197}
198
199unsigned long
200copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest);
201
202#endif /* ASM_X86__UACCESS_64_H */
diff --git a/include/asm-x86/ucontext.h b/include/asm-x86/ucontext.h
deleted file mode 100644
index 89eaa5456a7e..000000000000
--- a/include/asm-x86/ucontext.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef ASM_X86__UCONTEXT_H
2#define ASM_X86__UCONTEXT_H
3
4#define UC_FP_XSTATE 0x1 /* indicates the presence of extended state
5 * information in the memory layout pointed
6 * by the fpstate pointer in the ucontext's
7 * sigcontext struct (uc_mcontext).
8 */
9
10struct ucontext {
11 unsigned long uc_flags;
12 struct ucontext *uc_link;
13 stack_t uc_stack;
14 struct sigcontext uc_mcontext;
15 sigset_t uc_sigmask; /* mask last for extensibility */
16};
17
18#endif /* ASM_X86__UCONTEXT_H */
diff --git a/include/asm-x86/unaligned.h b/include/asm-x86/unaligned.h
deleted file mode 100644
index 59dcdec37160..000000000000
--- a/include/asm-x86/unaligned.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef ASM_X86__UNALIGNED_H
2#define ASM_X86__UNALIGNED_H
3
4/*
5 * The x86 can do unaligned accesses itself.
6 */
7
8#include <linux/unaligned/access_ok.h>
9#include <linux/unaligned/generic.h>
10
11#define get_unaligned __get_unaligned_le
12#define put_unaligned __put_unaligned_le
13
14#endif /* ASM_X86__UNALIGNED_H */
diff --git a/include/asm-x86/unistd.h b/include/asm-x86/unistd.h
deleted file mode 100644
index 2a58ed3e51d8..000000000000
--- a/include/asm-x86/unistd.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifdef __KERNEL__
2# ifdef CONFIG_X86_32
3# include "unistd_32.h"
4# else
5# include "unistd_64.h"
6# endif
7#else
8# ifdef __i386__
9# include "unistd_32.h"
10# else
11# include "unistd_64.h"
12# endif
13#endif
diff --git a/include/asm-x86/unistd_32.h b/include/asm-x86/unistd_32.h
deleted file mode 100644
index 017f4a87c913..000000000000
--- a/include/asm-x86/unistd_32.h
+++ /dev/null
@@ -1,379 +0,0 @@
1#ifndef ASM_X86__UNISTD_32_H
2#define ASM_X86__UNISTD_32_H
3
4/*
5 * This file contains the system call numbers.
6 */
7
8#define __NR_restart_syscall 0
9#define __NR_exit 1
10#define __NR_fork 2
11#define __NR_read 3
12#define __NR_write 4
13#define __NR_open 5
14#define __NR_close 6
15#define __NR_waitpid 7
16#define __NR_creat 8
17#define __NR_link 9
18#define __NR_unlink 10
19#define __NR_execve 11
20#define __NR_chdir 12
21#define __NR_time 13
22#define __NR_mknod 14
23#define __NR_chmod 15
24#define __NR_lchown 16
25#define __NR_break 17
26#define __NR_oldstat 18
27#define __NR_lseek 19
28#define __NR_getpid 20
29#define __NR_mount 21
30#define __NR_umount 22
31#define __NR_setuid 23
32#define __NR_getuid 24
33#define __NR_stime 25
34#define __NR_ptrace 26
35#define __NR_alarm 27
36#define __NR_oldfstat 28
37#define __NR_pause 29
38#define __NR_utime 30
39#define __NR_stty 31
40#define __NR_gtty 32
41#define __NR_access 33
42#define __NR_nice 34
43#define __NR_ftime 35
44#define __NR_sync 36
45#define __NR_kill 37
46#define __NR_rename 38
47#define __NR_mkdir 39
48#define __NR_rmdir 40
49#define __NR_dup 41
50#define __NR_pipe 42
51#define __NR_times 43
52#define __NR_prof 44
53#define __NR_brk 45
54#define __NR_setgid 46
55#define __NR_getgid 47
56#define __NR_signal 48
57#define __NR_geteuid 49
58#define __NR_getegid 50
59#define __NR_acct 51
60#define __NR_umount2 52
61#define __NR_lock 53
62#define __NR_ioctl 54
63#define __NR_fcntl 55
64#define __NR_mpx 56
65#define __NR_setpgid 57
66#define __NR_ulimit 58
67#define __NR_oldolduname 59
68#define __NR_umask 60
69#define __NR_chroot 61
70#define __NR_ustat 62
71#define __NR_dup2 63
72#define __NR_getppid 64
73#define __NR_getpgrp 65
74#define __NR_setsid 66
75#define __NR_sigaction 67
76#define __NR_sgetmask 68
77#define __NR_ssetmask 69
78#define __NR_setreuid 70
79#define __NR_setregid 71
80#define __NR_sigsuspend 72
81#define __NR_sigpending 73
82#define __NR_sethostname 74
83#define __NR_setrlimit 75
84#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
85#define __NR_getrusage 77
86#define __NR_gettimeofday 78
87#define __NR_settimeofday 79
88#define __NR_getgroups 80
89#define __NR_setgroups 81
90#define __NR_select 82
91#define __NR_symlink 83
92#define __NR_oldlstat 84
93#define __NR_readlink 85
94#define __NR_uselib 86
95#define __NR_swapon 87
96#define __NR_reboot 88
97#define __NR_readdir 89
98#define __NR_mmap 90
99#define __NR_munmap 91
100#define __NR_truncate 92
101#define __NR_ftruncate 93
102#define __NR_fchmod 94
103#define __NR_fchown 95
104#define __NR_getpriority 96
105#define __NR_setpriority 97
106#define __NR_profil 98
107#define __NR_statfs 99
108#define __NR_fstatfs 100
109#define __NR_ioperm 101
110#define __NR_socketcall 102
111#define __NR_syslog 103
112#define __NR_setitimer 104
113#define __NR_getitimer 105
114#define __NR_stat 106
115#define __NR_lstat 107
116#define __NR_fstat 108
117#define __NR_olduname 109
118#define __NR_iopl 110
119#define __NR_vhangup 111
120#define __NR_idle 112
121#define __NR_vm86old 113
122#define __NR_wait4 114
123#define __NR_swapoff 115
124#define __NR_sysinfo 116
125#define __NR_ipc 117
126#define __NR_fsync 118
127#define __NR_sigreturn 119
128#define __NR_clone 120
129#define __NR_setdomainname 121
130#define __NR_uname 122
131#define __NR_modify_ldt 123
132#define __NR_adjtimex 124
133#define __NR_mprotect 125
134#define __NR_sigprocmask 126
135#define __NR_create_module 127
136#define __NR_init_module 128
137#define __NR_delete_module 129
138#define __NR_get_kernel_syms 130
139#define __NR_quotactl 131
140#define __NR_getpgid 132
141#define __NR_fchdir 133
142#define __NR_bdflush 134
143#define __NR_sysfs 135
144#define __NR_personality 136
145#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
146#define __NR_setfsuid 138
147#define __NR_setfsgid 139
148#define __NR__llseek 140
149#define __NR_getdents 141
150#define __NR__newselect 142
151#define __NR_flock 143
152#define __NR_msync 144
153#define __NR_readv 145
154#define __NR_writev 146
155#define __NR_getsid 147
156#define __NR_fdatasync 148
157#define __NR__sysctl 149
158#define __NR_mlock 150
159#define __NR_munlock 151
160#define __NR_mlockall 152
161#define __NR_munlockall 153
162#define __NR_sched_setparam 154
163#define __NR_sched_getparam 155
164#define __NR_sched_setscheduler 156
165#define __NR_sched_getscheduler 157
166#define __NR_sched_yield 158
167#define __NR_sched_get_priority_max 159
168#define __NR_sched_get_priority_min 160
169#define __NR_sched_rr_get_interval 161
170#define __NR_nanosleep 162
171#define __NR_mremap 163
172#define __NR_setresuid 164
173#define __NR_getresuid 165
174#define __NR_vm86 166
175#define __NR_query_module 167
176#define __NR_poll 168
177#define __NR_nfsservctl 169
178#define __NR_setresgid 170
179#define __NR_getresgid 171
180#define __NR_prctl 172
181#define __NR_rt_sigreturn 173
182#define __NR_rt_sigaction 174
183#define __NR_rt_sigprocmask 175
184#define __NR_rt_sigpending 176
185#define __NR_rt_sigtimedwait 177
186#define __NR_rt_sigqueueinfo 178
187#define __NR_rt_sigsuspend 179
188#define __NR_pread64 180
189#define __NR_pwrite64 181
190#define __NR_chown 182
191#define __NR_getcwd 183
192#define __NR_capget 184
193#define __NR_capset 185
194#define __NR_sigaltstack 186
195#define __NR_sendfile 187
196#define __NR_getpmsg 188 /* some people actually want streams */
197#define __NR_putpmsg 189 /* some people actually want streams */
198#define __NR_vfork 190
199#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */
200#define __NR_mmap2 192
201#define __NR_truncate64 193
202#define __NR_ftruncate64 194
203#define __NR_stat64 195
204#define __NR_lstat64 196
205#define __NR_fstat64 197
206#define __NR_lchown32 198
207#define __NR_getuid32 199
208#define __NR_getgid32 200
209#define __NR_geteuid32 201
210#define __NR_getegid32 202
211#define __NR_setreuid32 203
212#define __NR_setregid32 204
213#define __NR_getgroups32 205
214#define __NR_setgroups32 206
215#define __NR_fchown32 207
216#define __NR_setresuid32 208
217#define __NR_getresuid32 209
218#define __NR_setresgid32 210
219#define __NR_getresgid32 211
220#define __NR_chown32 212
221#define __NR_setuid32 213
222#define __NR_setgid32 214
223#define __NR_setfsuid32 215
224#define __NR_setfsgid32 216
225#define __NR_pivot_root 217
226#define __NR_mincore 218
227#define __NR_madvise 219
228#define __NR_madvise1 219 /* delete when C lib stub is removed */
229#define __NR_getdents64 220
230#define __NR_fcntl64 221
231/* 223 is unused */
232#define __NR_gettid 224
233#define __NR_readahead 225
234#define __NR_setxattr 226
235#define __NR_lsetxattr 227
236#define __NR_fsetxattr 228
237#define __NR_getxattr 229
238#define __NR_lgetxattr 230
239#define __NR_fgetxattr 231
240#define __NR_listxattr 232
241#define __NR_llistxattr 233
242#define __NR_flistxattr 234
243#define __NR_removexattr 235
244#define __NR_lremovexattr 236
245#define __NR_fremovexattr 237
246#define __NR_tkill 238
247#define __NR_sendfile64 239
248#define __NR_futex 240
249#define __NR_sched_setaffinity 241
250#define __NR_sched_getaffinity 242
251#define __NR_set_thread_area 243
252#define __NR_get_thread_area 244
253#define __NR_io_setup 245
254#define __NR_io_destroy 246
255#define __NR_io_getevents 247
256#define __NR_io_submit 248
257#define __NR_io_cancel 249
258#define __NR_fadvise64 250
259/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */
260#define __NR_exit_group 252
261#define __NR_lookup_dcookie 253
262#define __NR_epoll_create 254
263#define __NR_epoll_ctl 255
264#define __NR_epoll_wait 256
265#define __NR_remap_file_pages 257
266#define __NR_set_tid_address 258
267#define __NR_timer_create 259
268#define __NR_timer_settime (__NR_timer_create+1)
269#define __NR_timer_gettime (__NR_timer_create+2)
270#define __NR_timer_getoverrun (__NR_timer_create+3)
271#define __NR_timer_delete (__NR_timer_create+4)
272#define __NR_clock_settime (__NR_timer_create+5)
273#define __NR_clock_gettime (__NR_timer_create+6)
274#define __NR_clock_getres (__NR_timer_create+7)
275#define __NR_clock_nanosleep (__NR_timer_create+8)
276#define __NR_statfs64 268
277#define __NR_fstatfs64 269
278#define __NR_tgkill 270
279#define __NR_utimes 271
280#define __NR_fadvise64_64 272
281#define __NR_vserver 273
282#define __NR_mbind 274
283#define __NR_get_mempolicy 275
284#define __NR_set_mempolicy 276
285#define __NR_mq_open 277
286#define __NR_mq_unlink (__NR_mq_open+1)
287#define __NR_mq_timedsend (__NR_mq_open+2)
288#define __NR_mq_timedreceive (__NR_mq_open+3)
289#define __NR_mq_notify (__NR_mq_open+4)
290#define __NR_mq_getsetattr (__NR_mq_open+5)
291#define __NR_kexec_load 283
292#define __NR_waitid 284
293/* #define __NR_sys_setaltroot 285 */
294#define __NR_add_key 286
295#define __NR_request_key 287
296#define __NR_keyctl 288
297#define __NR_ioprio_set 289
298#define __NR_ioprio_get 290
299#define __NR_inotify_init 291
300#define __NR_inotify_add_watch 292
301#define __NR_inotify_rm_watch 293
302#define __NR_migrate_pages 294
303#define __NR_openat 295
304#define __NR_mkdirat 296
305#define __NR_mknodat 297
306#define __NR_fchownat 298
307#define __NR_futimesat 299
308#define __NR_fstatat64 300
309#define __NR_unlinkat 301
310#define __NR_renameat 302
311#define __NR_linkat 303
312#define __NR_symlinkat 304
313#define __NR_readlinkat 305
314#define __NR_fchmodat 306
315#define __NR_faccessat 307
316#define __NR_pselect6 308
317#define __NR_ppoll 309
318#define __NR_unshare 310
319#define __NR_set_robust_list 311
320#define __NR_get_robust_list 312
321#define __NR_splice 313
322#define __NR_sync_file_range 314
323#define __NR_tee 315
324#define __NR_vmsplice 316
325#define __NR_move_pages 317
326#define __NR_getcpu 318
327#define __NR_epoll_pwait 319
328#define __NR_utimensat 320
329#define __NR_signalfd 321
330#define __NR_timerfd_create 322
331#define __NR_eventfd 323
332#define __NR_fallocate 324
333#define __NR_timerfd_settime 325
334#define __NR_timerfd_gettime 326
335#define __NR_signalfd4 327
336#define __NR_eventfd2 328
337#define __NR_epoll_create1 329
338#define __NR_dup3 330
339#define __NR_pipe2 331
340#define __NR_inotify_init1 332
341
342#ifdef __KERNEL__
343
344#define __ARCH_WANT_IPC_PARSE_VERSION
345#define __ARCH_WANT_OLD_READDIR
346#define __ARCH_WANT_OLD_STAT
347#define __ARCH_WANT_STAT64
348#define __ARCH_WANT_SYS_ALARM
349#define __ARCH_WANT_SYS_GETHOSTNAME
350#define __ARCH_WANT_SYS_PAUSE
351#define __ARCH_WANT_SYS_SGETMASK
352#define __ARCH_WANT_SYS_SIGNAL
353#define __ARCH_WANT_SYS_TIME
354#define __ARCH_WANT_SYS_UTIME
355#define __ARCH_WANT_SYS_WAITPID
356#define __ARCH_WANT_SYS_SOCKETCALL
357#define __ARCH_WANT_SYS_FADVISE64
358#define __ARCH_WANT_SYS_GETPGRP
359#define __ARCH_WANT_SYS_LLSEEK
360#define __ARCH_WANT_SYS_NICE
361#define __ARCH_WANT_SYS_OLD_GETRLIMIT
362#define __ARCH_WANT_SYS_OLDUMOUNT
363#define __ARCH_WANT_SYS_SIGPENDING
364#define __ARCH_WANT_SYS_SIGPROCMASK
365#define __ARCH_WANT_SYS_RT_SIGACTION
366#define __ARCH_WANT_SYS_RT_SIGSUSPEND
367
368/*
369 * "Conditional" syscalls
370 *
371 * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
372 * but it doesn't work on all toolchains, so we just do it by hand
373 */
374#ifndef cond_syscall
375#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
376#endif
377
378#endif /* __KERNEL__ */
379#endif /* ASM_X86__UNISTD_32_H */
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h
deleted file mode 100644
index ace83f1f6787..000000000000
--- a/include/asm-x86/unistd_64.h
+++ /dev/null
@@ -1,693 +0,0 @@
1#ifndef ASM_X86__UNISTD_64_H
2#define ASM_X86__UNISTD_64_H
3
4#ifndef __SYSCALL
5#define __SYSCALL(a, b)
6#endif
7
8/*
9 * This file contains the system call numbers.
10 *
11 * Note: holes are not allowed.
12 */
13
14/* at least 8 syscall per cacheline */
15#define __NR_read 0
16__SYSCALL(__NR_read, sys_read)
17#define __NR_write 1
18__SYSCALL(__NR_write, sys_write)
19#define __NR_open 2
20__SYSCALL(__NR_open, sys_open)
21#define __NR_close 3
22__SYSCALL(__NR_close, sys_close)
23#define __NR_stat 4
24__SYSCALL(__NR_stat, sys_newstat)
25#define __NR_fstat 5
26__SYSCALL(__NR_fstat, sys_newfstat)
27#define __NR_lstat 6
28__SYSCALL(__NR_lstat, sys_newlstat)
29#define __NR_poll 7
30__SYSCALL(__NR_poll, sys_poll)
31
32#define __NR_lseek 8
33__SYSCALL(__NR_lseek, sys_lseek)
34#define __NR_mmap 9
35__SYSCALL(__NR_mmap, sys_mmap)
36#define __NR_mprotect 10
37__SYSCALL(__NR_mprotect, sys_mprotect)
38#define __NR_munmap 11
39__SYSCALL(__NR_munmap, sys_munmap)
40#define __NR_brk 12
41__SYSCALL(__NR_brk, sys_brk)
42#define __NR_rt_sigaction 13
43__SYSCALL(__NR_rt_sigaction, sys_rt_sigaction)
44#define __NR_rt_sigprocmask 14
45__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
46#define __NR_rt_sigreturn 15
47__SYSCALL(__NR_rt_sigreturn, stub_rt_sigreturn)
48
49#define __NR_ioctl 16
50__SYSCALL(__NR_ioctl, sys_ioctl)
51#define __NR_pread64 17
52__SYSCALL(__NR_pread64, sys_pread64)
53#define __NR_pwrite64 18
54__SYSCALL(__NR_pwrite64, sys_pwrite64)
55#define __NR_readv 19
56__SYSCALL(__NR_readv, sys_readv)
57#define __NR_writev 20
58__SYSCALL(__NR_writev, sys_writev)
59#define __NR_access 21
60__SYSCALL(__NR_access, sys_access)
61#define __NR_pipe 22
62__SYSCALL(__NR_pipe, sys_pipe)
63#define __NR_select 23
64__SYSCALL(__NR_select, sys_select)
65
66#define __NR_sched_yield 24
67__SYSCALL(__NR_sched_yield, sys_sched_yield)
68#define __NR_mremap 25
69__SYSCALL(__NR_mremap, sys_mremap)
70#define __NR_msync 26
71__SYSCALL(__NR_msync, sys_msync)
72#define __NR_mincore 27
73__SYSCALL(__NR_mincore, sys_mincore)
74#define __NR_madvise 28
75__SYSCALL(__NR_madvise, sys_madvise)
76#define __NR_shmget 29
77__SYSCALL(__NR_shmget, sys_shmget)
78#define __NR_shmat 30
79__SYSCALL(__NR_shmat, sys_shmat)
80#define __NR_shmctl 31
81__SYSCALL(__NR_shmctl, sys_shmctl)
82
83#define __NR_dup 32
84__SYSCALL(__NR_dup, sys_dup)
85#define __NR_dup2 33
86__SYSCALL(__NR_dup2, sys_dup2)
87#define __NR_pause 34
88__SYSCALL(__NR_pause, sys_pause)
89#define __NR_nanosleep 35
90__SYSCALL(__NR_nanosleep, sys_nanosleep)
91#define __NR_getitimer 36
92__SYSCALL(__NR_getitimer, sys_getitimer)
93#define __NR_alarm 37
94__SYSCALL(__NR_alarm, sys_alarm)
95#define __NR_setitimer 38
96__SYSCALL(__NR_setitimer, sys_setitimer)
97#define __NR_getpid 39
98__SYSCALL(__NR_getpid, sys_getpid)
99
100#define __NR_sendfile 40
101__SYSCALL(__NR_sendfile, sys_sendfile64)
102#define __NR_socket 41
103__SYSCALL(__NR_socket, sys_socket)
104#define __NR_connect 42
105__SYSCALL(__NR_connect, sys_connect)
106#define __NR_accept 43
107__SYSCALL(__NR_accept, sys_accept)
108#define __NR_sendto 44
109__SYSCALL(__NR_sendto, sys_sendto)
110#define __NR_recvfrom 45
111__SYSCALL(__NR_recvfrom, sys_recvfrom)
112#define __NR_sendmsg 46
113__SYSCALL(__NR_sendmsg, sys_sendmsg)
114#define __NR_recvmsg 47
115__SYSCALL(__NR_recvmsg, sys_recvmsg)
116
117#define __NR_shutdown 48
118__SYSCALL(__NR_shutdown, sys_shutdown)
119#define __NR_bind 49
120__SYSCALL(__NR_bind, sys_bind)
121#define __NR_listen 50
122__SYSCALL(__NR_listen, sys_listen)
123#define __NR_getsockname 51
124__SYSCALL(__NR_getsockname, sys_getsockname)
125#define __NR_getpeername 52
126__SYSCALL(__NR_getpeername, sys_getpeername)
127#define __NR_socketpair 53
128__SYSCALL(__NR_socketpair, sys_socketpair)
129#define __NR_setsockopt 54
130__SYSCALL(__NR_setsockopt, sys_setsockopt)
131#define __NR_getsockopt 55
132__SYSCALL(__NR_getsockopt, sys_getsockopt)
133
134#define __NR_clone 56
135__SYSCALL(__NR_clone, stub_clone)
136#define __NR_fork 57
137__SYSCALL(__NR_fork, stub_fork)
138#define __NR_vfork 58
139__SYSCALL(__NR_vfork, stub_vfork)
140#define __NR_execve 59
141__SYSCALL(__NR_execve, stub_execve)
142#define __NR_exit 60
143__SYSCALL(__NR_exit, sys_exit)
144#define __NR_wait4 61
145__SYSCALL(__NR_wait4, sys_wait4)
146#define __NR_kill 62
147__SYSCALL(__NR_kill, sys_kill)
148#define __NR_uname 63
149__SYSCALL(__NR_uname, sys_uname)
150
151#define __NR_semget 64
152__SYSCALL(__NR_semget, sys_semget)
153#define __NR_semop 65
154__SYSCALL(__NR_semop, sys_semop)
155#define __NR_semctl 66
156__SYSCALL(__NR_semctl, sys_semctl)
157#define __NR_shmdt 67
158__SYSCALL(__NR_shmdt, sys_shmdt)
159#define __NR_msgget 68
160__SYSCALL(__NR_msgget, sys_msgget)
161#define __NR_msgsnd 69
162__SYSCALL(__NR_msgsnd, sys_msgsnd)
163#define __NR_msgrcv 70
164__SYSCALL(__NR_msgrcv, sys_msgrcv)
165#define __NR_msgctl 71
166__SYSCALL(__NR_msgctl, sys_msgctl)
167
168#define __NR_fcntl 72
169__SYSCALL(__NR_fcntl, sys_fcntl)
170#define __NR_flock 73
171__SYSCALL(__NR_flock, sys_flock)
172#define __NR_fsync 74
173__SYSCALL(__NR_fsync, sys_fsync)
174#define __NR_fdatasync 75
175__SYSCALL(__NR_fdatasync, sys_fdatasync)
176#define __NR_truncate 76
177__SYSCALL(__NR_truncate, sys_truncate)
178#define __NR_ftruncate 77
179__SYSCALL(__NR_ftruncate, sys_ftruncate)
180#define __NR_getdents 78
181__SYSCALL(__NR_getdents, sys_getdents)
182#define __NR_getcwd 79
183__SYSCALL(__NR_getcwd, sys_getcwd)
184
185#define __NR_chdir 80
186__SYSCALL(__NR_chdir, sys_chdir)
187#define __NR_fchdir 81
188__SYSCALL(__NR_fchdir, sys_fchdir)
189#define __NR_rename 82
190__SYSCALL(__NR_rename, sys_rename)
191#define __NR_mkdir 83
192__SYSCALL(__NR_mkdir, sys_mkdir)
193#define __NR_rmdir 84
194__SYSCALL(__NR_rmdir, sys_rmdir)
195#define __NR_creat 85
196__SYSCALL(__NR_creat, sys_creat)
197#define __NR_link 86
198__SYSCALL(__NR_link, sys_link)
199#define __NR_unlink 87
200__SYSCALL(__NR_unlink, sys_unlink)
201
202#define __NR_symlink 88
203__SYSCALL(__NR_symlink, sys_symlink)
204#define __NR_readlink 89
205__SYSCALL(__NR_readlink, sys_readlink)
206#define __NR_chmod 90
207__SYSCALL(__NR_chmod, sys_chmod)
208#define __NR_fchmod 91
209__SYSCALL(__NR_fchmod, sys_fchmod)
210#define __NR_chown 92
211__SYSCALL(__NR_chown, sys_chown)
212#define __NR_fchown 93
213__SYSCALL(__NR_fchown, sys_fchown)
214#define __NR_lchown 94
215__SYSCALL(__NR_lchown, sys_lchown)
216#define __NR_umask 95
217__SYSCALL(__NR_umask, sys_umask)
218
219#define __NR_gettimeofday 96
220__SYSCALL(__NR_gettimeofday, sys_gettimeofday)
221#define __NR_getrlimit 97
222__SYSCALL(__NR_getrlimit, sys_getrlimit)
223#define __NR_getrusage 98
224__SYSCALL(__NR_getrusage, sys_getrusage)
225#define __NR_sysinfo 99
226__SYSCALL(__NR_sysinfo, sys_sysinfo)
227#define __NR_times 100
228__SYSCALL(__NR_times, sys_times)
229#define __NR_ptrace 101
230__SYSCALL(__NR_ptrace, sys_ptrace)
231#define __NR_getuid 102
232__SYSCALL(__NR_getuid, sys_getuid)
233#define __NR_syslog 103
234__SYSCALL(__NR_syslog, sys_syslog)
235
236/* at the very end the stuff that never runs during the benchmarks */
237#define __NR_getgid 104
238__SYSCALL(__NR_getgid, sys_getgid)
239#define __NR_setuid 105
240__SYSCALL(__NR_setuid, sys_setuid)
241#define __NR_setgid 106
242__SYSCALL(__NR_setgid, sys_setgid)
243#define __NR_geteuid 107
244__SYSCALL(__NR_geteuid, sys_geteuid)
245#define __NR_getegid 108
246__SYSCALL(__NR_getegid, sys_getegid)
247#define __NR_setpgid 109
248__SYSCALL(__NR_setpgid, sys_setpgid)
249#define __NR_getppid 110
250__SYSCALL(__NR_getppid, sys_getppid)
251#define __NR_getpgrp 111
252__SYSCALL(__NR_getpgrp, sys_getpgrp)
253
254#define __NR_setsid 112
255__SYSCALL(__NR_setsid, sys_setsid)
256#define __NR_setreuid 113
257__SYSCALL(__NR_setreuid, sys_setreuid)
258#define __NR_setregid 114
259__SYSCALL(__NR_setregid, sys_setregid)
260#define __NR_getgroups 115
261__SYSCALL(__NR_getgroups, sys_getgroups)
262#define __NR_setgroups 116
263__SYSCALL(__NR_setgroups, sys_setgroups)
264#define __NR_setresuid 117
265__SYSCALL(__NR_setresuid, sys_setresuid)
266#define __NR_getresuid 118
267__SYSCALL(__NR_getresuid, sys_getresuid)
268#define __NR_setresgid 119
269__SYSCALL(__NR_setresgid, sys_setresgid)
270
271#define __NR_getresgid 120
272__SYSCALL(__NR_getresgid, sys_getresgid)
273#define __NR_getpgid 121
274__SYSCALL(__NR_getpgid, sys_getpgid)
275#define __NR_setfsuid 122
276__SYSCALL(__NR_setfsuid, sys_setfsuid)
277#define __NR_setfsgid 123
278__SYSCALL(__NR_setfsgid, sys_setfsgid)
279#define __NR_getsid 124
280__SYSCALL(__NR_getsid, sys_getsid)
281#define __NR_capget 125
282__SYSCALL(__NR_capget, sys_capget)
283#define __NR_capset 126
284__SYSCALL(__NR_capset, sys_capset)
285
286#define __NR_rt_sigpending 127
287__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
288#define __NR_rt_sigtimedwait 128
289__SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait)
290#define __NR_rt_sigqueueinfo 129
291__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo)
292#define __NR_rt_sigsuspend 130
293__SYSCALL(__NR_rt_sigsuspend, sys_rt_sigsuspend)
294#define __NR_sigaltstack 131
295__SYSCALL(__NR_sigaltstack, stub_sigaltstack)
296#define __NR_utime 132
297__SYSCALL(__NR_utime, sys_utime)
298#define __NR_mknod 133
299__SYSCALL(__NR_mknod, sys_mknod)
300
301/* Only needed for a.out */
302#define __NR_uselib 134
303__SYSCALL(__NR_uselib, sys_ni_syscall)
304#define __NR_personality 135
305__SYSCALL(__NR_personality, sys_personality)
306
307#define __NR_ustat 136
308__SYSCALL(__NR_ustat, sys_ustat)
309#define __NR_statfs 137
310__SYSCALL(__NR_statfs, sys_statfs)
311#define __NR_fstatfs 138
312__SYSCALL(__NR_fstatfs, sys_fstatfs)
313#define __NR_sysfs 139
314__SYSCALL(__NR_sysfs, sys_sysfs)
315
316#define __NR_getpriority 140
317__SYSCALL(__NR_getpriority, sys_getpriority)
318#define __NR_setpriority 141
319__SYSCALL(__NR_setpriority, sys_setpriority)
320#define __NR_sched_setparam 142
321__SYSCALL(__NR_sched_setparam, sys_sched_setparam)
322#define __NR_sched_getparam 143
323__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
324#define __NR_sched_setscheduler 144
325__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
326#define __NR_sched_getscheduler 145
327__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
328#define __NR_sched_get_priority_max 146
329__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
330#define __NR_sched_get_priority_min 147
331__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
332#define __NR_sched_rr_get_interval 148
333__SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval)
334
335#define __NR_mlock 149
336__SYSCALL(__NR_mlock, sys_mlock)
337#define __NR_munlock 150
338__SYSCALL(__NR_munlock, sys_munlock)
339#define __NR_mlockall 151
340__SYSCALL(__NR_mlockall, sys_mlockall)
341#define __NR_munlockall 152
342__SYSCALL(__NR_munlockall, sys_munlockall)
343
344#define __NR_vhangup 153
345__SYSCALL(__NR_vhangup, sys_vhangup)
346
347#define __NR_modify_ldt 154
348__SYSCALL(__NR_modify_ldt, sys_modify_ldt)
349
350#define __NR_pivot_root 155
351__SYSCALL(__NR_pivot_root, sys_pivot_root)
352
353#define __NR__sysctl 156
354__SYSCALL(__NR__sysctl, sys_sysctl)
355
356#define __NR_prctl 157
357__SYSCALL(__NR_prctl, sys_prctl)
358#define __NR_arch_prctl 158
359__SYSCALL(__NR_arch_prctl, sys_arch_prctl)
360
361#define __NR_adjtimex 159
362__SYSCALL(__NR_adjtimex, sys_adjtimex)
363
364#define __NR_setrlimit 160
365__SYSCALL(__NR_setrlimit, sys_setrlimit)
366
367#define __NR_chroot 161
368__SYSCALL(__NR_chroot, sys_chroot)
369
370#define __NR_sync 162
371__SYSCALL(__NR_sync, sys_sync)
372
373#define __NR_acct 163
374__SYSCALL(__NR_acct, sys_acct)
375
376#define __NR_settimeofday 164
377__SYSCALL(__NR_settimeofday, sys_settimeofday)
378
379#define __NR_mount 165
380__SYSCALL(__NR_mount, sys_mount)
381#define __NR_umount2 166
382__SYSCALL(__NR_umount2, sys_umount)
383
384#define __NR_swapon 167
385__SYSCALL(__NR_swapon, sys_swapon)
386#define __NR_swapoff 168
387__SYSCALL(__NR_swapoff, sys_swapoff)
388
389#define __NR_reboot 169
390__SYSCALL(__NR_reboot, sys_reboot)
391
392#define __NR_sethostname 170
393__SYSCALL(__NR_sethostname, sys_sethostname)
394#define __NR_setdomainname 171
395__SYSCALL(__NR_setdomainname, sys_setdomainname)
396
397#define __NR_iopl 172
398__SYSCALL(__NR_iopl, stub_iopl)
399#define __NR_ioperm 173
400__SYSCALL(__NR_ioperm, sys_ioperm)
401
402#define __NR_create_module 174
403__SYSCALL(__NR_create_module, sys_ni_syscall)
404#define __NR_init_module 175
405__SYSCALL(__NR_init_module, sys_init_module)
406#define __NR_delete_module 176
407__SYSCALL(__NR_delete_module, sys_delete_module)
408#define __NR_get_kernel_syms 177
409__SYSCALL(__NR_get_kernel_syms, sys_ni_syscall)
410#define __NR_query_module 178
411__SYSCALL(__NR_query_module, sys_ni_syscall)
412
413#define __NR_quotactl 179
414__SYSCALL(__NR_quotactl, sys_quotactl)
415
416#define __NR_nfsservctl 180
417__SYSCALL(__NR_nfsservctl, sys_nfsservctl)
418
419/* reserved for LiS/STREAMS */
420#define __NR_getpmsg 181
421__SYSCALL(__NR_getpmsg, sys_ni_syscall)
422#define __NR_putpmsg 182
423__SYSCALL(__NR_putpmsg, sys_ni_syscall)
424
425/* reserved for AFS */
426#define __NR_afs_syscall 183
427__SYSCALL(__NR_afs_syscall, sys_ni_syscall)
428
429/* reserved for tux */
430#define __NR_tuxcall 184
431__SYSCALL(__NR_tuxcall, sys_ni_syscall)
432
433#define __NR_security 185
434__SYSCALL(__NR_security, sys_ni_syscall)
435
436#define __NR_gettid 186
437__SYSCALL(__NR_gettid, sys_gettid)
438
439#define __NR_readahead 187
440__SYSCALL(__NR_readahead, sys_readahead)
441#define __NR_setxattr 188
442__SYSCALL(__NR_setxattr, sys_setxattr)
443#define __NR_lsetxattr 189
444__SYSCALL(__NR_lsetxattr, sys_lsetxattr)
445#define __NR_fsetxattr 190
446__SYSCALL(__NR_fsetxattr, sys_fsetxattr)
447#define __NR_getxattr 191
448__SYSCALL(__NR_getxattr, sys_getxattr)
449#define __NR_lgetxattr 192
450__SYSCALL(__NR_lgetxattr, sys_lgetxattr)
451#define __NR_fgetxattr 193
452__SYSCALL(__NR_fgetxattr, sys_fgetxattr)
453#define __NR_listxattr 194
454__SYSCALL(__NR_listxattr, sys_listxattr)
455#define __NR_llistxattr 195
456__SYSCALL(__NR_llistxattr, sys_llistxattr)
457#define __NR_flistxattr 196
458__SYSCALL(__NR_flistxattr, sys_flistxattr)
459#define __NR_removexattr 197
460__SYSCALL(__NR_removexattr, sys_removexattr)
461#define __NR_lremovexattr 198
462__SYSCALL(__NR_lremovexattr, sys_lremovexattr)
463#define __NR_fremovexattr 199
464__SYSCALL(__NR_fremovexattr, sys_fremovexattr)
465#define __NR_tkill 200
466__SYSCALL(__NR_tkill, sys_tkill)
467#define __NR_time 201
468__SYSCALL(__NR_time, sys_time)
469#define __NR_futex 202
470__SYSCALL(__NR_futex, sys_futex)
471#define __NR_sched_setaffinity 203
472__SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity)
473#define __NR_sched_getaffinity 204
474__SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity)
475#define __NR_set_thread_area 205
476__SYSCALL(__NR_set_thread_area, sys_ni_syscall) /* use arch_prctl */
477#define __NR_io_setup 206
478__SYSCALL(__NR_io_setup, sys_io_setup)
479#define __NR_io_destroy 207
480__SYSCALL(__NR_io_destroy, sys_io_destroy)
481#define __NR_io_getevents 208
482__SYSCALL(__NR_io_getevents, sys_io_getevents)
483#define __NR_io_submit 209
484__SYSCALL(__NR_io_submit, sys_io_submit)
485#define __NR_io_cancel 210
486__SYSCALL(__NR_io_cancel, sys_io_cancel)
487#define __NR_get_thread_area 211
488__SYSCALL(__NR_get_thread_area, sys_ni_syscall) /* use arch_prctl */
489#define __NR_lookup_dcookie 212
490__SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie)
491#define __NR_epoll_create 213
492__SYSCALL(__NR_epoll_create, sys_epoll_create)
493#define __NR_epoll_ctl_old 214
494__SYSCALL(__NR_epoll_ctl_old, sys_ni_syscall)
495#define __NR_epoll_wait_old 215
496__SYSCALL(__NR_epoll_wait_old, sys_ni_syscall)
497#define __NR_remap_file_pages 216
498__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
499#define __NR_getdents64 217
500__SYSCALL(__NR_getdents64, sys_getdents64)
501#define __NR_set_tid_address 218
502__SYSCALL(__NR_set_tid_address, sys_set_tid_address)
503#define __NR_restart_syscall 219
504__SYSCALL(__NR_restart_syscall, sys_restart_syscall)
505#define __NR_semtimedop 220
506__SYSCALL(__NR_semtimedop, sys_semtimedop)
507#define __NR_fadvise64 221
508__SYSCALL(__NR_fadvise64, sys_fadvise64)
509#define __NR_timer_create 222
510__SYSCALL(__NR_timer_create, sys_timer_create)
511#define __NR_timer_settime 223
512__SYSCALL(__NR_timer_settime, sys_timer_settime)
513#define __NR_timer_gettime 224
514__SYSCALL(__NR_timer_gettime, sys_timer_gettime)
515#define __NR_timer_getoverrun 225
516__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
517#define __NR_timer_delete 226
518__SYSCALL(__NR_timer_delete, sys_timer_delete)
519#define __NR_clock_settime 227
520__SYSCALL(__NR_clock_settime, sys_clock_settime)
521#define __NR_clock_gettime 228
522__SYSCALL(__NR_clock_gettime, sys_clock_gettime)
523#define __NR_clock_getres 229
524__SYSCALL(__NR_clock_getres, sys_clock_getres)
525#define __NR_clock_nanosleep 230
526__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep)
527#define __NR_exit_group 231
528__SYSCALL(__NR_exit_group, sys_exit_group)
529#define __NR_epoll_wait 232
530__SYSCALL(__NR_epoll_wait, sys_epoll_wait)
531#define __NR_epoll_ctl 233
532__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
533#define __NR_tgkill 234
534__SYSCALL(__NR_tgkill, sys_tgkill)
535#define __NR_utimes 235
536__SYSCALL(__NR_utimes, sys_utimes)
537#define __NR_vserver 236
538__SYSCALL(__NR_vserver, sys_ni_syscall)
539#define __NR_mbind 237
540__SYSCALL(__NR_mbind, sys_mbind)
541#define __NR_set_mempolicy 238
542__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy)
543#define __NR_get_mempolicy 239
544__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy)
545#define __NR_mq_open 240
546__SYSCALL(__NR_mq_open, sys_mq_open)
547#define __NR_mq_unlink 241
548__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
549#define __NR_mq_timedsend 242
550__SYSCALL(__NR_mq_timedsend, sys_mq_timedsend)
551#define __NR_mq_timedreceive 243
552__SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive)
553#define __NR_mq_notify 244
554__SYSCALL(__NR_mq_notify, sys_mq_notify)
555#define __NR_mq_getsetattr 245
556__SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr)
557#define __NR_kexec_load 246
558__SYSCALL(__NR_kexec_load, sys_kexec_load)
559#define __NR_waitid 247
560__SYSCALL(__NR_waitid, sys_waitid)
561#define __NR_add_key 248
562__SYSCALL(__NR_add_key, sys_add_key)
563#define __NR_request_key 249
564__SYSCALL(__NR_request_key, sys_request_key)
565#define __NR_keyctl 250
566__SYSCALL(__NR_keyctl, sys_keyctl)
567#define __NR_ioprio_set 251
568__SYSCALL(__NR_ioprio_set, sys_ioprio_set)
569#define __NR_ioprio_get 252
570__SYSCALL(__NR_ioprio_get, sys_ioprio_get)
571#define __NR_inotify_init 253
572__SYSCALL(__NR_inotify_init, sys_inotify_init)
573#define __NR_inotify_add_watch 254
574__SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch)
575#define __NR_inotify_rm_watch 255
576__SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
577#define __NR_migrate_pages 256
578__SYSCALL(__NR_migrate_pages, sys_migrate_pages)
579#define __NR_openat 257
580__SYSCALL(__NR_openat, sys_openat)
581#define __NR_mkdirat 258
582__SYSCALL(__NR_mkdirat, sys_mkdirat)
583#define __NR_mknodat 259
584__SYSCALL(__NR_mknodat, sys_mknodat)
585#define __NR_fchownat 260
586__SYSCALL(__NR_fchownat, sys_fchownat)
587#define __NR_futimesat 261
588__SYSCALL(__NR_futimesat, sys_futimesat)
589#define __NR_newfstatat 262
590__SYSCALL(__NR_newfstatat, sys_newfstatat)
591#define __NR_unlinkat 263
592__SYSCALL(__NR_unlinkat, sys_unlinkat)
593#define __NR_renameat 264
594__SYSCALL(__NR_renameat, sys_renameat)
595#define __NR_linkat 265
596__SYSCALL(__NR_linkat, sys_linkat)
597#define __NR_symlinkat 266
598__SYSCALL(__NR_symlinkat, sys_symlinkat)
599#define __NR_readlinkat 267
600__SYSCALL(__NR_readlinkat, sys_readlinkat)
601#define __NR_fchmodat 268
602__SYSCALL(__NR_fchmodat, sys_fchmodat)
603#define __NR_faccessat 269
604__SYSCALL(__NR_faccessat, sys_faccessat)
605#define __NR_pselect6 270
606__SYSCALL(__NR_pselect6, sys_pselect6)
607#define __NR_ppoll 271
608__SYSCALL(__NR_ppoll, sys_ppoll)
609#define __NR_unshare 272
610__SYSCALL(__NR_unshare, sys_unshare)
611#define __NR_set_robust_list 273
612__SYSCALL(__NR_set_robust_list, sys_set_robust_list)
613#define __NR_get_robust_list 274
614__SYSCALL(__NR_get_robust_list, sys_get_robust_list)
615#define __NR_splice 275
616__SYSCALL(__NR_splice, sys_splice)
617#define __NR_tee 276
618__SYSCALL(__NR_tee, sys_tee)
619#define __NR_sync_file_range 277
620__SYSCALL(__NR_sync_file_range, sys_sync_file_range)
621#define __NR_vmsplice 278
622__SYSCALL(__NR_vmsplice, sys_vmsplice)
623#define __NR_move_pages 279
624__SYSCALL(__NR_move_pages, sys_move_pages)
625#define __NR_utimensat 280
626__SYSCALL(__NR_utimensat, sys_utimensat)
627#define __IGNORE_getcpu /* implemented as a vsyscall */
628#define __NR_epoll_pwait 281
629__SYSCALL(__NR_epoll_pwait, sys_epoll_pwait)
630#define __NR_signalfd 282
631__SYSCALL(__NR_signalfd, sys_signalfd)
632#define __NR_timerfd_create 283
633__SYSCALL(__NR_timerfd_create, sys_timerfd_create)
634#define __NR_eventfd 284
635__SYSCALL(__NR_eventfd, sys_eventfd)
636#define __NR_fallocate 285
637__SYSCALL(__NR_fallocate, sys_fallocate)
638#define __NR_timerfd_settime 286
639__SYSCALL(__NR_timerfd_settime, sys_timerfd_settime)
640#define __NR_timerfd_gettime 287
641__SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime)
642#define __NR_paccept 288
643__SYSCALL(__NR_paccept, sys_paccept)
644#define __NR_signalfd4 289
645__SYSCALL(__NR_signalfd4, sys_signalfd4)
646#define __NR_eventfd2 290
647__SYSCALL(__NR_eventfd2, sys_eventfd2)
648#define __NR_epoll_create1 291
649__SYSCALL(__NR_epoll_create1, sys_epoll_create1)
650#define __NR_dup3 292
651__SYSCALL(__NR_dup3, sys_dup3)
652#define __NR_pipe2 293
653__SYSCALL(__NR_pipe2, sys_pipe2)
654#define __NR_inotify_init1 294
655__SYSCALL(__NR_inotify_init1, sys_inotify_init1)
656
657
658#ifndef __NO_STUBS
659#define __ARCH_WANT_OLD_READDIR
660#define __ARCH_WANT_OLD_STAT
661#define __ARCH_WANT_SYS_ALARM
662#define __ARCH_WANT_SYS_GETHOSTNAME
663#define __ARCH_WANT_SYS_PAUSE
664#define __ARCH_WANT_SYS_SGETMASK
665#define __ARCH_WANT_SYS_SIGNAL
666#define __ARCH_WANT_SYS_UTIME
667#define __ARCH_WANT_SYS_WAITPID
668#define __ARCH_WANT_SYS_SOCKETCALL
669#define __ARCH_WANT_SYS_FADVISE64
670#define __ARCH_WANT_SYS_GETPGRP
671#define __ARCH_WANT_SYS_LLSEEK
672#define __ARCH_WANT_SYS_NICE
673#define __ARCH_WANT_SYS_OLD_GETRLIMIT
674#define __ARCH_WANT_SYS_OLDUMOUNT
675#define __ARCH_WANT_SYS_SIGPENDING
676#define __ARCH_WANT_SYS_SIGPROCMASK
677#define __ARCH_WANT_SYS_RT_SIGACTION
678#define __ARCH_WANT_SYS_RT_SIGSUSPEND
679#define __ARCH_WANT_SYS_TIME
680#define __ARCH_WANT_COMPAT_SYS_TIME
681#endif /* __NO_STUBS */
682
683#ifdef __KERNEL__
684/*
685 * "Conditional" syscalls
686 *
687 * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
688 * but it doesn't work on all toolchains, so we just do it by hand
689 */
690#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
691#endif /* __KERNEL__ */
692
693#endif /* ASM_X86__UNISTD_64_H */
diff --git a/include/asm-x86/unwind.h b/include/asm-x86/unwind.h
deleted file mode 100644
index a2151567db44..000000000000
--- a/include/asm-x86/unwind.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef ASM_X86__UNWIND_H
2#define ASM_X86__UNWIND_H
3
4#define UNW_PC(frame) ((void)(frame), 0UL)
5#define UNW_SP(frame) ((void)(frame), 0UL)
6#define UNW_FP(frame) ((void)(frame), 0UL)
7
8static inline int arch_unw_user_mode(const void *info)
9{
10 return 0;
11}
12
13#endif /* ASM_X86__UNWIND_H */
diff --git a/include/asm-x86/user.h b/include/asm-x86/user.h
deleted file mode 100644
index 999873b22e7f..000000000000
--- a/include/asm-x86/user.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "user_32.h"
3#else
4# include "user_64.h"
5#endif
diff --git a/include/asm-x86/user32.h b/include/asm-x86/user32.h
deleted file mode 100644
index aa66c1857f06..000000000000
--- a/include/asm-x86/user32.h
+++ /dev/null
@@ -1,70 +0,0 @@
1#ifndef ASM_X86__USER32_H
2#define ASM_X86__USER32_H
3
4/* IA32 compatible user structures for ptrace.
5 * These should be used for 32bit coredumps too. */
6
7struct user_i387_ia32_struct {
8 u32 cwd;
9 u32 swd;
10 u32 twd;
11 u32 fip;
12 u32 fcs;
13 u32 foo;
14 u32 fos;
15 u32 st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
16};
17
18/* FSAVE frame with extensions */
19struct user32_fxsr_struct {
20 unsigned short cwd;
21 unsigned short swd;
22 unsigned short twd; /* not compatible to 64bit twd */
23 unsigned short fop;
24 int fip;
25 int fcs;
26 int foo;
27 int fos;
28 int mxcsr;
29 int reserved;
30 int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
31 int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
32 int padding[56];
33};
34
35struct user_regs_struct32 {
36 __u32 ebx, ecx, edx, esi, edi, ebp, eax;
37 unsigned short ds, __ds, es, __es;
38 unsigned short fs, __fs, gs, __gs;
39 __u32 orig_eax, eip;
40 unsigned short cs, __cs;
41 __u32 eflags, esp;
42 unsigned short ss, __ss;
43};
44
45struct user32 {
46 struct user_regs_struct32 regs; /* Where the registers are actually stored */
47 int u_fpvalid; /* True if math co-processor being used. */
48 /* for this mess. Not yet used. */
49 struct user_i387_ia32_struct i387; /* Math Co-processor registers. */
50/* The rest of this junk is to help gdb figure out what goes where */
51 __u32 u_tsize; /* Text segment size (pages). */
52 __u32 u_dsize; /* Data segment size (pages). */
53 __u32 u_ssize; /* Stack segment size (pages). */
54 __u32 start_code; /* Starting virtual address of text. */
55 __u32 start_stack; /* Starting virtual address of stack area.
56 This is actually the bottom of the stack,
57 the top of the stack is always found in the
58 esp register. */
59 __u32 signal; /* Signal that caused the core dump. */
60 int reserved; /* No __u32er used */
61 __u32 u_ar0; /* Used by gdb to help find the values for */
62 /* the registers. */
63 __u32 u_fpstate; /* Math Co-processor pointer. */
64 __u32 magic; /* To uniquely identify a core file */
65 char u_comm[32]; /* User command that was responsible */
66 int u_debugreg[8];
67};
68
69
70#endif /* ASM_X86__USER32_H */
diff --git a/include/asm-x86/user_32.h b/include/asm-x86/user_32.h
deleted file mode 100644
index e0fe2f55f1a6..000000000000
--- a/include/asm-x86/user_32.h
+++ /dev/null
@@ -1,131 +0,0 @@
1#ifndef ASM_X86__USER_32_H
2#define ASM_X86__USER_32_H
3
4#include <asm/page.h>
5/* Core file format: The core file is written in such a way that gdb
6 can understand it and provide useful information to the user (under
7 linux we use the 'trad-core' bfd). There are quite a number of
8 obstacles to being able to view the contents of the floating point
9 registers, and until these are solved you will not be able to view the
10 contents of them. Actually, you can read in the core file and look at
11 the contents of the user struct to find out what the floating point
12 registers contain.
13 The actual file contents are as follows:
14 UPAGE: 1 page consisting of a user struct that tells gdb what is present
15 in the file. Directly after this is a copy of the task_struct, which
16 is currently not used by gdb, but it may come in useful at some point.
17 All of the registers are stored as part of the upage. The upage should
18 always be only one page.
19 DATA: The data area is stored. We use current->end_text to
20 current->brk to pick up all of the user variables, plus any memory
21 that may have been malloced. No attempt is made to determine if a page
22 is demand-zero or if a page is totally unused, we just cover the entire
23 range. All of the addresses are rounded in such a way that an integral
24 number of pages is written.
25 STACK: We need the stack information in order to get a meaningful
26 backtrace. We need to write the data from (esp) to
27 current->start_stack, so we round each of these off in order to be able
28 to write an integer number of pages.
29 The minimum core file size is 3 pages, or 12288 bytes.
30*/
31
32/*
33 * Pentium III FXSR, SSE support
34 * Gareth Hughes <gareth@valinux.com>, May 2000
35 *
36 * Provide support for the GDB 5.0+ PTRACE_{GET|SET}FPXREGS requests for
37 * interacting with the FXSR-format floating point environment. Floating
38 * point data can be accessed in the regular format in the usual manner,
39 * and both the standard and SIMD floating point data can be accessed via
40 * the new ptrace requests. In either case, changes to the FPU environment
41 * will be reflected in the task's state as expected.
42 */
43
44struct user_i387_struct {
45 long cwd;
46 long swd;
47 long twd;
48 long fip;
49 long fcs;
50 long foo;
51 long fos;
52 long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
53};
54
55struct user_fxsr_struct {
56 unsigned short cwd;
57 unsigned short swd;
58 unsigned short twd;
59 unsigned short fop;
60 long fip;
61 long fcs;
62 long foo;
63 long fos;
64 long mxcsr;
65 long reserved;
66 long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
67 long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
68 long padding[56];
69};
70
71/*
72 * This is the old layout of "struct pt_regs", and
73 * is still the layout used by user mode (the new
74 * pt_regs doesn't have all registers as the kernel
75 * doesn't use the extra segment registers)
76 */
77struct user_regs_struct {
78 unsigned long bx;
79 unsigned long cx;
80 unsigned long dx;
81 unsigned long si;
82 unsigned long di;
83 unsigned long bp;
84 unsigned long ax;
85 unsigned long ds;
86 unsigned long es;
87 unsigned long fs;
88 unsigned long gs;
89 unsigned long orig_ax;
90 unsigned long ip;
91 unsigned long cs;
92 unsigned long flags;
93 unsigned long sp;
94 unsigned long ss;
95};
96
97/* When the kernel dumps core, it starts by dumping the user struct -
98 this will be used by gdb to figure out where the data and stack segments
99 are within the file, and what virtual addresses to use. */
100struct user{
101/* We start with the registers, to mimic the way that "memory" is returned
102 from the ptrace(3,...) function. */
103 struct user_regs_struct regs; /* Where the registers are actually stored */
104/* ptrace does not yet supply these. Someday.... */
105 int u_fpvalid; /* True if math co-processor being used. */
106 /* for this mess. Not yet used. */
107 struct user_i387_struct i387; /* Math Co-processor registers. */
108/* The rest of this junk is to help gdb figure out what goes where */
109 unsigned long int u_tsize; /* Text segment size (pages). */
110 unsigned long int u_dsize; /* Data segment size (pages). */
111 unsigned long int u_ssize; /* Stack segment size (pages). */
112 unsigned long start_code; /* Starting virtual address of text. */
113 unsigned long start_stack; /* Starting virtual address of stack area.
114 This is actually the bottom of the stack,
115 the top of the stack is always found in the
116 esp register. */
117 long int signal; /* Signal that caused the core dump. */
118 int reserved; /* No longer used */
119 unsigned long u_ar0; /* Used by gdb to help find the values for */
120 /* the registers. */
121 struct user_i387_struct *u_fpstate; /* Math Co-processor pointer. */
122 unsigned long magic; /* To uniquely identify a core file */
123 char u_comm[32]; /* User command that was responsible */
124 int u_debugreg[8];
125};
126#define NBPG PAGE_SIZE
127#define UPAGES 1
128#define HOST_TEXT_START_ADDR (u.start_code)
129#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
130
131#endif /* ASM_X86__USER_32_H */
diff --git a/include/asm-x86/user_64.h b/include/asm-x86/user_64.h
deleted file mode 100644
index 38b5799863b4..000000000000
--- a/include/asm-x86/user_64.h
+++ /dev/null
@@ -1,137 +0,0 @@
1#ifndef ASM_X86__USER_64_H
2#define ASM_X86__USER_64_H
3
4#include <asm/types.h>
5#include <asm/page.h>
6/* Core file format: The core file is written in such a way that gdb
7 can understand it and provide useful information to the user.
8 There are quite a number of obstacles to being able to view the
9 contents of the floating point registers, and until these are
10 solved you will not be able to view the contents of them.
11 Actually, you can read in the core file and look at the contents of
12 the user struct to find out what the floating point registers
13 contain.
14
15 The actual file contents are as follows:
16 UPAGE: 1 page consisting of a user struct that tells gdb what is present
17 in the file. Directly after this is a copy of the task_struct, which
18 is currently not used by gdb, but it may come in useful at some point.
19 All of the registers are stored as part of the upage. The upage should
20 always be only one page.
21 DATA: The data area is stored. We use current->end_text to
22 current->brk to pick up all of the user variables, plus any memory
23 that may have been malloced. No attempt is made to determine if a page
24 is demand-zero or if a page is totally unused, we just cover the entire
25 range. All of the addresses are rounded in such a way that an integral
26 number of pages is written.
27 STACK: We need the stack information in order to get a meaningful
28 backtrace. We need to write the data from (esp) to
29 current->start_stack, so we round each of these off in order to be able
30 to write an integer number of pages.
31 The minimum core file size is 3 pages, or 12288 bytes. */
32
33/*
34 * Pentium III FXSR, SSE support
35 * Gareth Hughes <gareth@valinux.com>, May 2000
36 *
37 * Provide support for the GDB 5.0+ PTRACE_{GET|SET}FPXREGS requests for
38 * interacting with the FXSR-format floating point environment. Floating
39 * point data can be accessed in the regular format in the usual manner,
40 * and both the standard and SIMD floating point data can be accessed via
41 * the new ptrace requests. In either case, changes to the FPU environment
42 * will be reflected in the task's state as expected.
43 *
44 * x86-64 support by Andi Kleen.
45 */
46
47/* This matches the 64bit FXSAVE format as defined by AMD. It is the same
48 as the 32bit format defined by Intel, except that the selector:offset pairs
49 for data and eip are replaced with flat 64bit pointers. */
50struct user_i387_struct {
51 unsigned short cwd;
52 unsigned short swd;
53 unsigned short twd; /* Note this is not the same as
54 the 32bit/x87/FSAVE twd */
55 unsigned short fop;
56 __u64 rip;
57 __u64 rdp;
58 __u32 mxcsr;
59 __u32 mxcsr_mask;
60 __u32 st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
61 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */
62 __u32 padding[24];
63};
64
65/*
66 * Segment register layout in coredumps.
67 */
68struct user_regs_struct {
69 unsigned long r15;
70 unsigned long r14;
71 unsigned long r13;
72 unsigned long r12;
73 unsigned long bp;
74 unsigned long bx;
75 unsigned long r11;
76 unsigned long r10;
77 unsigned long r9;
78 unsigned long r8;
79 unsigned long ax;
80 unsigned long cx;
81 unsigned long dx;
82 unsigned long si;
83 unsigned long di;
84 unsigned long orig_ax;
85 unsigned long ip;
86 unsigned long cs;
87 unsigned long flags;
88 unsigned long sp;
89 unsigned long ss;
90 unsigned long fs_base;
91 unsigned long gs_base;
92 unsigned long ds;
93 unsigned long es;
94 unsigned long fs;
95 unsigned long gs;
96};
97
98/* When the kernel dumps core, it starts by dumping the user struct -
99 this will be used by gdb to figure out where the data and stack segments
100 are within the file, and what virtual addresses to use. */
101
102struct user {
103/* We start with the registers, to mimic the way that "memory" is returned
104 from the ptrace(3,...) function. */
105 struct user_regs_struct regs; /* Where the registers are actually stored */
106/* ptrace does not yet supply these. Someday.... */
107 int u_fpvalid; /* True if math co-processor being used. */
108 /* for this mess. Not yet used. */
109 int pad0;
110 struct user_i387_struct i387; /* Math Co-processor registers. */
111/* The rest of this junk is to help gdb figure out what goes where */
112 unsigned long int u_tsize; /* Text segment size (pages). */
113 unsigned long int u_dsize; /* Data segment size (pages). */
114 unsigned long int u_ssize; /* Stack segment size (pages). */
115 unsigned long start_code; /* Starting virtual address of text. */
116 unsigned long start_stack; /* Starting virtual address of stack area.
117 This is actually the bottom of the stack,
118 the top of the stack is always found in the
119 esp register. */
120 long int signal; /* Signal that caused the core dump. */
121 int reserved; /* No longer used */
122 int pad1;
123 unsigned long u_ar0; /* Used by gdb to help find the values for */
124 /* the registers. */
125 struct user_i387_struct *u_fpstate; /* Math Co-processor pointer. */
126 unsigned long magic; /* To uniquely identify a core file */
127 char u_comm[32]; /* User command that was responsible */
128 unsigned long u_debugreg[8];
129 unsigned long error_code; /* CPU error code or 0 */
130 unsigned long fault_address; /* CR3 or 0 */
131};
132#define NBPG PAGE_SIZE
133#define UPAGES 1
134#define HOST_TEXT_START_ADDR (u.start_code)
135#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
136
137#endif /* ASM_X86__USER_64_H */
diff --git a/include/asm-x86/uv/bios.h b/include/asm-x86/uv/bios.h
deleted file mode 100644
index 7cd6d7ec1308..000000000000
--- a/include/asm-x86/uv/bios.h
+++ /dev/null
@@ -1,68 +0,0 @@
1#ifndef ASM_X86__UV__BIOS_H
2#define ASM_X86__UV__BIOS_H
3
4/*
5 * BIOS layer definitions.
6 *
7 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/rtc.h>
25
26#define BIOS_FREQ_BASE 0x01000001
27
28enum {
29 BIOS_FREQ_BASE_PLATFORM = 0,
30 BIOS_FREQ_BASE_INTERVAL_TIMER = 1,
31 BIOS_FREQ_BASE_REALTIME_CLOCK = 2
32};
33
34# define BIOS_CALL(result, a0, a1, a2, a3, a4, a5, a6, a7) \
35 do { \
36 /* XXX - the real call goes here */ \
37 result.status = BIOS_STATUS_UNIMPLEMENTED; \
38 isrv.v0 = 0; \
39 isrv.v1 = 0; \
40 } while (0)
41
42enum {
43 BIOS_STATUS_SUCCESS = 0,
44 BIOS_STATUS_UNIMPLEMENTED = -1,
45 BIOS_STATUS_EINVAL = -2,
46 BIOS_STATUS_ERROR = -3
47};
48
49struct uv_bios_retval {
50 /*
51 * A zero status value indicates call completed without error.
52 * A negative status value indicates reason of call failure.
53 * A positive status value indicates success but an
54 * informational value should be printed (e.g., "reboot for
55 * change to take effect").
56 */
57 s64 status;
58 u64 v0;
59 u64 v1;
60 u64 v2;
61};
62
63extern long
64x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
65 unsigned long *drift_info);
66extern const char *x86_bios_strerror(long status);
67
68#endif /* ASM_X86__UV__BIOS_H */
diff --git a/include/asm-x86/uv/uv_bau.h b/include/asm-x86/uv/uv_bau.h
deleted file mode 100644
index 77153fb18f5e..000000000000
--- a/include/asm-x86/uv/uv_bau.h
+++ /dev/null
@@ -1,332 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * SGI UV Broadcast Assist Unit definitions
7 *
8 * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved.
9 */
10
11#ifndef ASM_X86__UV__UV_BAU_H
12#define ASM_X86__UV__UV_BAU_H
13
14#include <linux/bitmap.h>
15#define BITSPERBYTE 8
16
17/*
18 * Broadcast Assist Unit messaging structures
19 *
20 * Selective Broadcast activations are induced by software action
21 * specifying a particular 8-descriptor "set" via a 6-bit index written
22 * to an MMR.
23 * Thus there are 64 unique 512-byte sets of SB descriptors - one set for
24 * each 6-bit index value. These descriptor sets are mapped in sequence
25 * starting with set 0 located at the address specified in the
26 * BAU_SB_DESCRIPTOR_BASE register, set 1 is located at BASE + 512,
27 * set 2 is at BASE + 2*512, set 3 at BASE + 3*512, and so on.
28 *
29 * We will use 31 sets, one for sending BAU messages from each of the 32
30 * cpu's on the node.
31 *
32 * TLB shootdown will use the first of the 8 descriptors of each set.
33 * Each of the descriptors is 64 bytes in size (8*64 = 512 bytes in a set).
34 */
35
36#define UV_ITEMS_PER_DESCRIPTOR 8
37#define UV_CPUS_PER_ACT_STATUS 32
38#define UV_ACT_STATUS_MASK 0x3
39#define UV_ACT_STATUS_SIZE 2
40#define UV_ACTIVATION_DESCRIPTOR_SIZE 32
41#define UV_DISTRIBUTION_SIZE 256
42#define UV_SW_ACK_NPENDING 8
43#define UV_NET_ENDPOINT_INTD 0x38
44#define UV_DESC_BASE_PNODE_SHIFT 49
45#define UV_PAYLOADQ_PNODE_SHIFT 49
46#define UV_PTC_BASENAME "sgi_uv/ptc_statistics"
47#define uv_physnodeaddr(x) ((__pa((unsigned long)(x)) & uv_mmask))
48
49/*
50 * bits in UVH_LB_BAU_SB_ACTIVATION_STATUS_0/1
51 */
52#define DESC_STATUS_IDLE 0
53#define DESC_STATUS_ACTIVE 1
54#define DESC_STATUS_DESTINATION_TIMEOUT 2
55#define DESC_STATUS_SOURCE_TIMEOUT 3
56
57/*
58 * source side threshholds at which message retries print a warning
59 */
60#define SOURCE_TIMEOUT_LIMIT 20
61#define DESTINATION_TIMEOUT_LIMIT 20
62
63/*
64 * number of entries in the destination side payload queue
65 */
66#define DEST_Q_SIZE 17
67/*
68 * number of destination side software ack resources
69 */
70#define DEST_NUM_RESOURCES 8
71#define MAX_CPUS_PER_NODE 32
72/*
73 * completion statuses for sending a TLB flush message
74 */
75#define FLUSH_RETRY 1
76#define FLUSH_GIVEUP 2
77#define FLUSH_COMPLETE 3
78
79/*
80 * Distribution: 32 bytes (256 bits) (bytes 0-0x1f of descriptor)
81 * If the 'multilevel' flag in the header portion of the descriptor
82 * has been set to 0, then endpoint multi-unicast mode is selected.
83 * The distribution specification (32 bytes) is interpreted as a 256-bit
84 * distribution vector. Adjacent bits correspond to consecutive even numbered
85 * nodeIDs. The result of adding the index of a given bit to the 15-bit
86 * 'base_dest_nodeid' field of the header corresponds to the
87 * destination nodeID associated with that specified bit.
88 */
89struct bau_target_nodemask {
90 unsigned long bits[BITS_TO_LONGS(256)];
91};
92
93/*
94 * mask of cpu's on a node
95 * (during initialization we need to check that unsigned long has
96 * enough bits for max. cpu's per node)
97 */
98struct bau_local_cpumask {
99 unsigned long bits;
100};
101
102/*
103 * Payload: 16 bytes (128 bits) (bytes 0x20-0x2f of descriptor)
104 * only 12 bytes (96 bits) of the payload area are usable.
105 * An additional 3 bytes (bits 27:4) of the header address are carried
106 * to the next bytes of the destination payload queue.
107 * And an additional 2 bytes of the header Suppl_A field are also
108 * carried to the destination payload queue.
109 * But the first byte of the Suppl_A becomes bits 127:120 (the 16th byte)
110 * of the destination payload queue, which is written by the hardware
111 * with the s/w ack resource bit vector.
112 * [ effective message contents (16 bytes (128 bits) maximum), not counting
113 * the s/w ack bit vector ]
114 */
115
116/*
117 * The payload is software-defined for INTD transactions
118 */
119struct bau_msg_payload {
120 unsigned long address; /* signifies a page or all TLB's
121 of the cpu */
122 /* 64 bits */
123 unsigned short sending_cpu; /* filled in by sender */
124 /* 16 bits */
125 unsigned short acknowledge_count;/* filled in by destination */
126 /* 16 bits */
127 unsigned int reserved1:32; /* not usable */
128};
129
130
131/*
132 * Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
133 * see table 4.2.3.0.1 in broacast_assist spec.
134 */
135struct bau_msg_header {
136 int dest_subnodeid:6; /* must be zero */
137 /* bits 5:0 */
138 int base_dest_nodeid:15; /* nasid>>1 (pnode) of first bit in node_map */
139 /* bits 20:6 */
140 int command:8; /* message type */
141 /* bits 28:21 */
142 /* 0x38: SN3net EndPoint Message */
143 int rsvd_1:3; /* must be zero */
144 /* bits 31:29 */
145 /* int will align on 32 bits */
146 int rsvd_2:9; /* must be zero */
147 /* bits 40:32 */
148 /* Suppl_A is 56-41 */
149 int payload_2a:8; /* becomes byte 16 of msg */
150 /* bits 48:41 */ /* not currently using */
151 int payload_2b:8; /* becomes byte 17 of msg */
152 /* bits 56:49 */ /* not currently using */
153 /* Address field (96:57) is never used as an
154 address (these are address bits 42:3) */
155 int rsvd_3:1; /* must be zero */
156 /* bit 57 */
157 /* address bits 27:4 are payload */
158 /* these 24 bits become bytes 12-14 of msg */
159 int replied_to:1; /* sent as 0 by the source to byte 12 */
160 /* bit 58 */
161
162 int payload_1a:5; /* not currently used */
163 /* bits 63:59 */
164 int payload_1b:8; /* not currently used */
165 /* bits 71:64 */
166 int payload_1c:8; /* not currently used */
167 /* bits 79:72 */
168 int payload_1d:2; /* not currently used */
169 /* bits 81:80 */
170
171 int rsvd_4:7; /* must be zero */
172 /* bits 88:82 */
173 int sw_ack_flag:1; /* software acknowledge flag */
174 /* bit 89 */
175 /* INTD trasactions at destination are to
176 wait for software acknowledge */
177 int rsvd_5:6; /* must be zero */
178 /* bits 95:90 */
179 int rsvd_6:5; /* must be zero */
180 /* bits 100:96 */
181 int int_both:1; /* if 1, interrupt both sockets on the blade */
182 /* bit 101*/
183 int fairness:3; /* usually zero */
184 /* bits 104:102 */
185 int multilevel:1; /* multi-level multicast format */
186 /* bit 105 */
187 /* 0 for TLB: endpoint multi-unicast messages */
188 int chaining:1; /* next descriptor is part of this activation*/
189 /* bit 106 */
190 int rsvd_7:21; /* must be zero */
191 /* bits 127:107 */
192};
193
194/*
195 * The activation descriptor:
196 * The format of the message to send, plus all accompanying control
197 * Should be 64 bytes
198 */
199struct bau_desc {
200 struct bau_target_nodemask distribution;
201 /*
202 * message template, consisting of header and payload:
203 */
204 struct bau_msg_header header;
205 struct bau_msg_payload payload;
206};
207/*
208 * -payload-- ---------header------
209 * bytes 0-11 bits 41-56 bits 58-81
210 * A B (2) C (3)
211 *
212 * A/B/C are moved to:
213 * A C B
214 * bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector)
215 * ------------payload queue-----------
216 */
217
218/*
219 * The payload queue on the destination side is an array of these.
220 * With BAU_MISC_CONTROL set for software acknowledge mode, the messages
221 * are 32 bytes (2 micropackets) (256 bits) in length, but contain only 17
222 * bytes of usable data, including the sw ack vector in byte 15 (bits 127:120)
223 * (12 bytes come from bau_msg_payload, 3 from payload_1, 2 from
224 * sw_ack_vector and payload_2)
225 * "Enabling Software Acknowledgment mode (see Section 4.3.3 Software
226 * Acknowledge Processing) also selects 32 byte (17 bytes usable) payload
227 * operation."
228 */
229struct bau_payload_queue_entry {
230 unsigned long address; /* signifies a page or all TLB's
231 of the cpu */
232 /* 64 bits, bytes 0-7 */
233
234 unsigned short sending_cpu; /* cpu that sent the message */
235 /* 16 bits, bytes 8-9 */
236
237 unsigned short acknowledge_count; /* filled in by destination */
238 /* 16 bits, bytes 10-11 */
239
240 unsigned short replied_to:1; /* sent as 0 by the source */
241 /* 1 bit */
242 unsigned short unused1:7; /* not currently using */
243 /* 7 bits: byte 12) */
244
245 unsigned char unused2[2]; /* not currently using */
246 /* bytes 13-14 */
247
248 unsigned char sw_ack_vector; /* filled in by the hardware */
249 /* byte 15 (bits 127:120) */
250
251 unsigned char unused4[3]; /* not currently using bytes 17-19 */
252 /* bytes 17-19 */
253
254 int number_of_cpus; /* filled in at destination */
255 /* 32 bits, bytes 20-23 (aligned) */
256
257 unsigned char unused5[8]; /* not using */
258 /* bytes 24-31 */
259};
260
261/*
262 * one for every slot in the destination payload queue
263 */
264struct bau_msg_status {
265 struct bau_local_cpumask seen_by; /* map of cpu's */
266};
267
268/*
269 * one for every slot in the destination software ack resources
270 */
271struct bau_sw_ack_status {
272 struct bau_payload_queue_entry *msg; /* associated message */
273 int watcher; /* cpu monitoring, or -1 */
274};
275
276/*
277 * one on every node and per-cpu; to locate the software tables
278 */
279struct bau_control {
280 struct bau_desc *descriptor_base;
281 struct bau_payload_queue_entry *bau_msg_head;
282 struct bau_payload_queue_entry *va_queue_first;
283 struct bau_payload_queue_entry *va_queue_last;
284 struct bau_msg_status *msg_statuses;
285 int *watching; /* pointer to array */
286};
287
288/*
289 * This structure is allocated per_cpu for UV TLB shootdown statistics.
290 */
291struct ptc_stats {
292 unsigned long ptc_i; /* number of IPI-style flushes */
293 unsigned long requestor; /* number of nodes this cpu sent to */
294 unsigned long requestee; /* times cpu was remotely requested */
295 unsigned long alltlb; /* times all tlb's on this cpu were flushed */
296 unsigned long onetlb; /* times just one tlb on this cpu was flushed */
297 unsigned long s_retry; /* retries on source side timeouts */
298 unsigned long d_retry; /* retries on destination side timeouts */
299 unsigned long sflush; /* cycles spent in uv_flush_tlb_others */
300 unsigned long dflush; /* cycles spent on destination side */
301 unsigned long retriesok; /* successes on retries */
302 unsigned long nomsg; /* interrupts with no message */
303 unsigned long multmsg; /* interrupts with multiple messages */
304 unsigned long ntargeted;/* nodes targeted */
305};
306
307static inline int bau_node_isset(int node, struct bau_target_nodemask *dstp)
308{
309 return constant_test_bit(node, &dstp->bits[0]);
310}
311static inline void bau_node_set(int node, struct bau_target_nodemask *dstp)
312{
313 __set_bit(node, &dstp->bits[0]);
314}
315static inline void bau_nodes_clear(struct bau_target_nodemask *dstp, int nbits)
316{
317 bitmap_zero(&dstp->bits[0], nbits);
318}
319
320static inline void bau_cpubits_clear(struct bau_local_cpumask *dstp, int nbits)
321{
322 bitmap_zero(&dstp->bits, nbits);
323}
324
325#define cpubit_isset(cpu, bau_local_cpumask) \
326 test_bit((cpu), (bau_local_cpumask).bits)
327
328extern int uv_flush_tlb_others(cpumask_t *, struct mm_struct *, unsigned long);
329extern void uv_bau_message_intr1(void);
330extern void uv_bau_timeout_intr1(void);
331
332#endif /* ASM_X86__UV__UV_BAU_H */
diff --git a/include/asm-x86/uv/uv_hub.h b/include/asm-x86/uv/uv_hub.h
deleted file mode 100644
index bdb5b01afbf5..000000000000
--- a/include/asm-x86/uv/uv_hub.h
+++ /dev/null
@@ -1,354 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * SGI UV architectural definitions
7 *
8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
9 */
10
11#ifndef ASM_X86__UV__UV_HUB_H
12#define ASM_X86__UV__UV_HUB_H
13
14#include <linux/numa.h>
15#include <linux/percpu.h>
16#include <asm/types.h>
17#include <asm/percpu.h>
18
19
20/*
21 * Addressing Terminology
22 *
23 * M - The low M bits of a physical address represent the offset
24 * into the blade local memory. RAM memory on a blade is physically
25 * contiguous (although various IO spaces may punch holes in
26 * it)..
27 *
28 * N - Number of bits in the node portion of a socket physical
29 * address.
30 *
31 * NASID - network ID of a router, Mbrick or Cbrick. Nasid values of
32 * routers always have low bit of 1, C/MBricks have low bit
33 * equal to 0. Most addressing macros that target UV hub chips
34 * right shift the NASID by 1 to exclude the always-zero bit.
35 * NASIDs contain up to 15 bits.
36 *
37 * GNODE - NASID right shifted by 1 bit. Most mmrs contain gnodes instead
38 * of nasids.
39 *
40 * PNODE - the low N bits of the GNODE. The PNODE is the most useful variant
41 * of the nasid for socket usage.
42 *
43 *
44 * NumaLink Global Physical Address Format:
45 * +--------------------------------+---------------------+
46 * |00..000| GNODE | NodeOffset |
47 * +--------------------------------+---------------------+
48 * |<-------53 - M bits --->|<--------M bits ----->
49 *
50 * M - number of node offset bits (35 .. 40)
51 *
52 *
53 * Memory/UV-HUB Processor Socket Address Format:
54 * +----------------+---------------+---------------------+
55 * |00..000000000000| PNODE | NodeOffset |
56 * +----------------+---------------+---------------------+
57 * <--- N bits --->|<--------M bits ----->
58 *
59 * M - number of node offset bits (35 .. 40)
60 * N - number of PNODE bits (0 .. 10)
61 *
62 * Note: M + N cannot currently exceed 44 (x86_64) or 46 (IA64).
63 * The actual values are configuration dependent and are set at
64 * boot time. M & N values are set by the hardware/BIOS at boot.
65 *
66 *
67 * APICID format
68 * NOTE!!!!!! This is the current format of the APICID. However, code
69 * should assume that this will change in the future. Use functions
70 * in this file for all APICID bit manipulations and conversion.
71 *
72 * 1111110000000000
73 * 5432109876543210
74 * pppppppppplc0cch
75 * sssssssssss
76 *
77 * p = pnode bits
78 * l = socket number on board
79 * c = core
80 * h = hyperthread
81 * s = bits that are in the SOCKET_ID CSR
82 *
83 * Note: Processor only supports 12 bits in the APICID register. The ACPI
84 * tables hold all 16 bits. Software needs to be aware of this.
85 *
86 * Unless otherwise specified, all references to APICID refer to
87 * the FULL value contained in ACPI tables, not the subset in the
88 * processor APICID register.
89 */
90
91
92/*
93 * Maximum number of bricks in all partitions and in all coherency domains.
94 * This is the total number of bricks accessible in the numalink fabric. It
95 * includes all C & M bricks. Routers are NOT included.
96 *
97 * This value is also the value of the maximum number of non-router NASIDs
98 * in the numalink fabric.
99 *
100 * NOTE: a brick may contain 1 or 2 OS nodes. Don't get these confused.
101 */
102#define UV_MAX_NUMALINK_BLADES 16384
103
104/*
105 * Maximum number of C/Mbricks within a software SSI (hardware may support
106 * more).
107 */
108#define UV_MAX_SSI_BLADES 256
109
110/*
111 * The largest possible NASID of a C or M brick (+ 2)
112 */
113#define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_NODES * 2)
114
115/*
116 * The following defines attributes of the HUB chip. These attributes are
117 * frequently referenced and are kept in the per-cpu data areas of each cpu.
118 * They are kept together in a struct to minimize cache misses.
119 */
120struct uv_hub_info_s {
121 unsigned long global_mmr_base;
122 unsigned long gpa_mask;
123 unsigned long gnode_upper;
124 unsigned long lowmem_remap_top;
125 unsigned long lowmem_remap_base;
126 unsigned short pnode;
127 unsigned short pnode_mask;
128 unsigned short coherency_domain_number;
129 unsigned short numa_blade_id;
130 unsigned char blade_processor_id;
131 unsigned char m_val;
132 unsigned char n_val;
133};
134DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
135#define uv_hub_info (&__get_cpu_var(__uv_hub_info))
136#define uv_cpu_hub_info(cpu) (&per_cpu(__uv_hub_info, cpu))
137
138/*
139 * Local & Global MMR space macros.
140 * Note: macros are intended to be used ONLY by inline functions
141 * in this file - not by other kernel code.
142 * n - NASID (full 15-bit global nasid)
143 * g - GNODE (full 15-bit global nasid, right shifted 1)
144 * p - PNODE (local part of nsids, right shifted 1)
145 */
146#define UV_NASID_TO_PNODE(n) (((n) >> 1) & uv_hub_info->pnode_mask)
147#define UV_PNODE_TO_NASID(p) (((p) << 1) | uv_hub_info->gnode_upper)
148
149#define UV_LOCAL_MMR_BASE 0xf4000000UL
150#define UV_GLOBAL_MMR32_BASE 0xf8000000UL
151#define UV_GLOBAL_MMR64_BASE (uv_hub_info->global_mmr_base)
152#define UV_LOCAL_MMR_SIZE (64UL * 1024 * 1024)
153#define UV_GLOBAL_MMR32_SIZE (64UL * 1024 * 1024)
154
155#define UV_GLOBAL_MMR32_PNODE_SHIFT 15
156#define UV_GLOBAL_MMR64_PNODE_SHIFT 26
157
158#define UV_GLOBAL_MMR32_PNODE_BITS(p) ((p) << (UV_GLOBAL_MMR32_PNODE_SHIFT))
159
160#define UV_GLOBAL_MMR64_PNODE_BITS(p) \
161 ((unsigned long)(p) << UV_GLOBAL_MMR64_PNODE_SHIFT)
162
163#define UV_APIC_PNODE_SHIFT 6
164
165/*
166 * Macros for converting between kernel virtual addresses, socket local physical
167 * addresses, and UV global physical addresses.
168 * Note: use the standard __pa() & __va() macros for converting
169 * between socket virtual and socket physical addresses.
170 */
171
172/* socket phys RAM --> UV global physical address */
173static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr)
174{
175 if (paddr < uv_hub_info->lowmem_remap_top)
176 paddr += uv_hub_info->lowmem_remap_base;
177 return paddr | uv_hub_info->gnode_upper;
178}
179
180
181/* socket virtual --> UV global physical address */
182static inline unsigned long uv_gpa(void *v)
183{
184 return __pa(v) | uv_hub_info->gnode_upper;
185}
186
187/* socket virtual --> UV global physical address */
188static inline void *uv_vgpa(void *v)
189{
190 return (void *)uv_gpa(v);
191}
192
193/* UV global physical address --> socket virtual */
194static inline void *uv_va(unsigned long gpa)
195{
196 return __va(gpa & uv_hub_info->gpa_mask);
197}
198
199/* pnode, offset --> socket virtual */
200static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset)
201{
202 return __va(((unsigned long)pnode << uv_hub_info->m_val) | offset);
203}
204
205
206/*
207 * Extract a PNODE from an APICID (full apicid, not processor subset)
208 */
209static inline int uv_apicid_to_pnode(int apicid)
210{
211 return (apicid >> UV_APIC_PNODE_SHIFT);
212}
213
214/*
215 * Access global MMRs using the low memory MMR32 space. This region supports
216 * faster MMR access but not all MMRs are accessible in this space.
217 */
218static inline unsigned long *uv_global_mmr32_address(int pnode,
219 unsigned long offset)
220{
221 return __va(UV_GLOBAL_MMR32_BASE |
222 UV_GLOBAL_MMR32_PNODE_BITS(pnode) | offset);
223}
224
225static inline void uv_write_global_mmr32(int pnode, unsigned long offset,
226 unsigned long val)
227{
228 *uv_global_mmr32_address(pnode, offset) = val;
229}
230
231static inline unsigned long uv_read_global_mmr32(int pnode,
232 unsigned long offset)
233{
234 return *uv_global_mmr32_address(pnode, offset);
235}
236
237/*
238 * Access Global MMR space using the MMR space located at the top of physical
239 * memory.
240 */
241static inline unsigned long *uv_global_mmr64_address(int pnode,
242 unsigned long offset)
243{
244 return __va(UV_GLOBAL_MMR64_BASE |
245 UV_GLOBAL_MMR64_PNODE_BITS(pnode) | offset);
246}
247
248static inline void uv_write_global_mmr64(int pnode, unsigned long offset,
249 unsigned long val)
250{
251 *uv_global_mmr64_address(pnode, offset) = val;
252}
253
254static inline unsigned long uv_read_global_mmr64(int pnode,
255 unsigned long offset)
256{
257 return *uv_global_mmr64_address(pnode, offset);
258}
259
260/*
261 * Access hub local MMRs. Faster than using global space but only local MMRs
262 * are accessible.
263 */
264static inline unsigned long *uv_local_mmr_address(unsigned long offset)
265{
266 return __va(UV_LOCAL_MMR_BASE | offset);
267}
268
269static inline unsigned long uv_read_local_mmr(unsigned long offset)
270{
271 return *uv_local_mmr_address(offset);
272}
273
274static inline void uv_write_local_mmr(unsigned long offset, unsigned long val)
275{
276 *uv_local_mmr_address(offset) = val;
277}
278
279/*
280 * Structures and definitions for converting between cpu, node, pnode, and blade
281 * numbers.
282 */
283struct uv_blade_info {
284 unsigned short nr_possible_cpus;
285 unsigned short nr_online_cpus;
286 unsigned short pnode;
287};
288extern struct uv_blade_info *uv_blade_info;
289extern short *uv_node_to_blade;
290extern short *uv_cpu_to_blade;
291extern short uv_possible_blades;
292
293/* Blade-local cpu number of current cpu. Numbered 0 .. <# cpus on the blade> */
294static inline int uv_blade_processor_id(void)
295{
296 return uv_hub_info->blade_processor_id;
297}
298
299/* Blade number of current cpu. Numnbered 0 .. <#blades -1> */
300static inline int uv_numa_blade_id(void)
301{
302 return uv_hub_info->numa_blade_id;
303}
304
305/* Convert a cpu number to the the UV blade number */
306static inline int uv_cpu_to_blade_id(int cpu)
307{
308 return uv_cpu_to_blade[cpu];
309}
310
311/* Convert linux node number to the UV blade number */
312static inline int uv_node_to_blade_id(int nid)
313{
314 return uv_node_to_blade[nid];
315}
316
317/* Convert a blade id to the PNODE of the blade */
318static inline int uv_blade_to_pnode(int bid)
319{
320 return uv_blade_info[bid].pnode;
321}
322
323/* Determine the number of possible cpus on a blade */
324static inline int uv_blade_nr_possible_cpus(int bid)
325{
326 return uv_blade_info[bid].nr_possible_cpus;
327}
328
329/* Determine the number of online cpus on a blade */
330static inline int uv_blade_nr_online_cpus(int bid)
331{
332 return uv_blade_info[bid].nr_online_cpus;
333}
334
335/* Convert a cpu id to the PNODE of the blade containing the cpu */
336static inline int uv_cpu_to_pnode(int cpu)
337{
338 return uv_blade_info[uv_cpu_to_blade_id(cpu)].pnode;
339}
340
341/* Convert a linux node number to the PNODE of the blade */
342static inline int uv_node_to_pnode(int nid)
343{
344 return uv_blade_info[uv_node_to_blade_id(nid)].pnode;
345}
346
347/* Maximum possible number of blades */
348static inline int uv_num_possible_blades(void)
349{
350 return uv_possible_blades;
351}
352
353#endif /* ASM_X86__UV__UV_HUB_H */
354
diff --git a/include/asm-x86/uv/uv_mmrs.h b/include/asm-x86/uv/uv_mmrs.h
deleted file mode 100644
index 8b03d89d2459..000000000000
--- a/include/asm-x86/uv/uv_mmrs.h
+++ /dev/null
@@ -1,1295 +0,0 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * SGI UV MMR definitions
7 *
8 * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
9 */
10
11#ifndef ASM_X86__UV__UV_MMRS_H
12#define ASM_X86__UV__UV_MMRS_H
13
14#define UV_MMR_ENABLE (1UL << 63)
15
16/* ========================================================================= */
17/* UVH_BAU_DATA_CONFIG */
18/* ========================================================================= */
19#define UVH_BAU_DATA_CONFIG 0x61680UL
20#define UVH_BAU_DATA_CONFIG_32 0x0438
21
22#define UVH_BAU_DATA_CONFIG_VECTOR_SHFT 0
23#define UVH_BAU_DATA_CONFIG_VECTOR_MASK 0x00000000000000ffUL
24#define UVH_BAU_DATA_CONFIG_DM_SHFT 8
25#define UVH_BAU_DATA_CONFIG_DM_MASK 0x0000000000000700UL
26#define UVH_BAU_DATA_CONFIG_DESTMODE_SHFT 11
27#define UVH_BAU_DATA_CONFIG_DESTMODE_MASK 0x0000000000000800UL
28#define UVH_BAU_DATA_CONFIG_STATUS_SHFT 12
29#define UVH_BAU_DATA_CONFIG_STATUS_MASK 0x0000000000001000UL
30#define UVH_BAU_DATA_CONFIG_P_SHFT 13
31#define UVH_BAU_DATA_CONFIG_P_MASK 0x0000000000002000UL
32#define UVH_BAU_DATA_CONFIG_T_SHFT 15
33#define UVH_BAU_DATA_CONFIG_T_MASK 0x0000000000008000UL
34#define UVH_BAU_DATA_CONFIG_M_SHFT 16
35#define UVH_BAU_DATA_CONFIG_M_MASK 0x0000000000010000UL
36#define UVH_BAU_DATA_CONFIG_APIC_ID_SHFT 32
37#define UVH_BAU_DATA_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
38
39union uvh_bau_data_config_u {
40 unsigned long v;
41 struct uvh_bau_data_config_s {
42 unsigned long vector_ : 8; /* RW */
43 unsigned long dm : 3; /* RW */
44 unsigned long destmode : 1; /* RW */
45 unsigned long status : 1; /* RO */
46 unsigned long p : 1; /* RO */
47 unsigned long rsvd_14 : 1; /* */
48 unsigned long t : 1; /* RO */
49 unsigned long m : 1; /* RW */
50 unsigned long rsvd_17_31: 15; /* */
51 unsigned long apic_id : 32; /* RW */
52 } s;
53};
54
55/* ========================================================================= */
56/* UVH_EVENT_OCCURRED0 */
57/* ========================================================================= */
58#define UVH_EVENT_OCCURRED0 0x70000UL
59#define UVH_EVENT_OCCURRED0_32 0x005e8
60
61#define UVH_EVENT_OCCURRED0_LB_HCERR_SHFT 0
62#define UVH_EVENT_OCCURRED0_LB_HCERR_MASK 0x0000000000000001UL
63#define UVH_EVENT_OCCURRED0_GR0_HCERR_SHFT 1
64#define UVH_EVENT_OCCURRED0_GR0_HCERR_MASK 0x0000000000000002UL
65#define UVH_EVENT_OCCURRED0_GR1_HCERR_SHFT 2
66#define UVH_EVENT_OCCURRED0_GR1_HCERR_MASK 0x0000000000000004UL
67#define UVH_EVENT_OCCURRED0_LH_HCERR_SHFT 3
68#define UVH_EVENT_OCCURRED0_LH_HCERR_MASK 0x0000000000000008UL
69#define UVH_EVENT_OCCURRED0_RH_HCERR_SHFT 4
70#define UVH_EVENT_OCCURRED0_RH_HCERR_MASK 0x0000000000000010UL
71#define UVH_EVENT_OCCURRED0_XN_HCERR_SHFT 5
72#define UVH_EVENT_OCCURRED0_XN_HCERR_MASK 0x0000000000000020UL
73#define UVH_EVENT_OCCURRED0_SI_HCERR_SHFT 6
74#define UVH_EVENT_OCCURRED0_SI_HCERR_MASK 0x0000000000000040UL
75#define UVH_EVENT_OCCURRED0_LB_AOERR0_SHFT 7
76#define UVH_EVENT_OCCURRED0_LB_AOERR0_MASK 0x0000000000000080UL
77#define UVH_EVENT_OCCURRED0_GR0_AOERR0_SHFT 8
78#define UVH_EVENT_OCCURRED0_GR0_AOERR0_MASK 0x0000000000000100UL
79#define UVH_EVENT_OCCURRED0_GR1_AOERR0_SHFT 9
80#define UVH_EVENT_OCCURRED0_GR1_AOERR0_MASK 0x0000000000000200UL
81#define UVH_EVENT_OCCURRED0_LH_AOERR0_SHFT 10
82#define UVH_EVENT_OCCURRED0_LH_AOERR0_MASK 0x0000000000000400UL
83#define UVH_EVENT_OCCURRED0_RH_AOERR0_SHFT 11
84#define UVH_EVENT_OCCURRED0_RH_AOERR0_MASK 0x0000000000000800UL
85#define UVH_EVENT_OCCURRED0_XN_AOERR0_SHFT 12
86#define UVH_EVENT_OCCURRED0_XN_AOERR0_MASK 0x0000000000001000UL
87#define UVH_EVENT_OCCURRED0_SI_AOERR0_SHFT 13
88#define UVH_EVENT_OCCURRED0_SI_AOERR0_MASK 0x0000000000002000UL
89#define UVH_EVENT_OCCURRED0_LB_AOERR1_SHFT 14
90#define UVH_EVENT_OCCURRED0_LB_AOERR1_MASK 0x0000000000004000UL
91#define UVH_EVENT_OCCURRED0_GR0_AOERR1_SHFT 15
92#define UVH_EVENT_OCCURRED0_GR0_AOERR1_MASK 0x0000000000008000UL
93#define UVH_EVENT_OCCURRED0_GR1_AOERR1_SHFT 16
94#define UVH_EVENT_OCCURRED0_GR1_AOERR1_MASK 0x0000000000010000UL
95#define UVH_EVENT_OCCURRED0_LH_AOERR1_SHFT 17
96#define UVH_EVENT_OCCURRED0_LH_AOERR1_MASK 0x0000000000020000UL
97#define UVH_EVENT_OCCURRED0_RH_AOERR1_SHFT 18
98#define UVH_EVENT_OCCURRED0_RH_AOERR1_MASK 0x0000000000040000UL
99#define UVH_EVENT_OCCURRED0_XN_AOERR1_SHFT 19
100#define UVH_EVENT_OCCURRED0_XN_AOERR1_MASK 0x0000000000080000UL
101#define UVH_EVENT_OCCURRED0_SI_AOERR1_SHFT 20
102#define UVH_EVENT_OCCURRED0_SI_AOERR1_MASK 0x0000000000100000UL
103#define UVH_EVENT_OCCURRED0_RH_VPI_INT_SHFT 21
104#define UVH_EVENT_OCCURRED0_RH_VPI_INT_MASK 0x0000000000200000UL
105#define UVH_EVENT_OCCURRED0_SYSTEM_SHUTDOWN_INT_SHFT 22
106#define UVH_EVENT_OCCURRED0_SYSTEM_SHUTDOWN_INT_MASK 0x0000000000400000UL
107#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_0_SHFT 23
108#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_0_MASK 0x0000000000800000UL
109#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_1_SHFT 24
110#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_1_MASK 0x0000000001000000UL
111#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_2_SHFT 25
112#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_2_MASK 0x0000000002000000UL
113#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_3_SHFT 26
114#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_3_MASK 0x0000000004000000UL
115#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_4_SHFT 27
116#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_4_MASK 0x0000000008000000UL
117#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_5_SHFT 28
118#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_5_MASK 0x0000000010000000UL
119#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_6_SHFT 29
120#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_6_MASK 0x0000000020000000UL
121#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_7_SHFT 30
122#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_7_MASK 0x0000000040000000UL
123#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_8_SHFT 31
124#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_8_MASK 0x0000000080000000UL
125#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_9_SHFT 32
126#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_9_MASK 0x0000000100000000UL
127#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_10_SHFT 33
128#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_10_MASK 0x0000000200000000UL
129#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_11_SHFT 34
130#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_11_MASK 0x0000000400000000UL
131#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_12_SHFT 35
132#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_12_MASK 0x0000000800000000UL
133#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_13_SHFT 36
134#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_13_MASK 0x0000001000000000UL
135#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_14_SHFT 37
136#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_14_MASK 0x0000002000000000UL
137#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_15_SHFT 38
138#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_15_MASK 0x0000004000000000UL
139#define UVH_EVENT_OCCURRED0_L1_NMI_INT_SHFT 39
140#define UVH_EVENT_OCCURRED0_L1_NMI_INT_MASK 0x0000008000000000UL
141#define UVH_EVENT_OCCURRED0_STOP_CLOCK_SHFT 40
142#define UVH_EVENT_OCCURRED0_STOP_CLOCK_MASK 0x0000010000000000UL
143#define UVH_EVENT_OCCURRED0_ASIC_TO_L1_SHFT 41
144#define UVH_EVENT_OCCURRED0_ASIC_TO_L1_MASK 0x0000020000000000UL
145#define UVH_EVENT_OCCURRED0_L1_TO_ASIC_SHFT 42
146#define UVH_EVENT_OCCURRED0_L1_TO_ASIC_MASK 0x0000040000000000UL
147#define UVH_EVENT_OCCURRED0_LTC_INT_SHFT 43
148#define UVH_EVENT_OCCURRED0_LTC_INT_MASK 0x0000080000000000UL
149#define UVH_EVENT_OCCURRED0_LA_SEQ_TRIGGER_SHFT 44
150#define UVH_EVENT_OCCURRED0_LA_SEQ_TRIGGER_MASK 0x0000100000000000UL
151#define UVH_EVENT_OCCURRED0_IPI_INT_SHFT 45
152#define UVH_EVENT_OCCURRED0_IPI_INT_MASK 0x0000200000000000UL
153#define UVH_EVENT_OCCURRED0_EXTIO_INT0_SHFT 46
154#define UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK 0x0000400000000000UL
155#define UVH_EVENT_OCCURRED0_EXTIO_INT1_SHFT 47
156#define UVH_EVENT_OCCURRED0_EXTIO_INT1_MASK 0x0000800000000000UL
157#define UVH_EVENT_OCCURRED0_EXTIO_INT2_SHFT 48
158#define UVH_EVENT_OCCURRED0_EXTIO_INT2_MASK 0x0001000000000000UL
159#define UVH_EVENT_OCCURRED0_EXTIO_INT3_SHFT 49
160#define UVH_EVENT_OCCURRED0_EXTIO_INT3_MASK 0x0002000000000000UL
161#define UVH_EVENT_OCCURRED0_PROFILE_INT_SHFT 50
162#define UVH_EVENT_OCCURRED0_PROFILE_INT_MASK 0x0004000000000000UL
163#define UVH_EVENT_OCCURRED0_RTC0_SHFT 51
164#define UVH_EVENT_OCCURRED0_RTC0_MASK 0x0008000000000000UL
165#define UVH_EVENT_OCCURRED0_RTC1_SHFT 52
166#define UVH_EVENT_OCCURRED0_RTC1_MASK 0x0010000000000000UL
167#define UVH_EVENT_OCCURRED0_RTC2_SHFT 53
168#define UVH_EVENT_OCCURRED0_RTC2_MASK 0x0020000000000000UL
169#define UVH_EVENT_OCCURRED0_RTC3_SHFT 54
170#define UVH_EVENT_OCCURRED0_RTC3_MASK 0x0040000000000000UL
171#define UVH_EVENT_OCCURRED0_BAU_DATA_SHFT 55
172#define UVH_EVENT_OCCURRED0_BAU_DATA_MASK 0x0080000000000000UL
173#define UVH_EVENT_OCCURRED0_POWER_MANAGEMENT_REQ_SHFT 56
174#define UVH_EVENT_OCCURRED0_POWER_MANAGEMENT_REQ_MASK 0x0100000000000000UL
175union uvh_event_occurred0_u {
176 unsigned long v;
177 struct uvh_event_occurred0_s {
178 unsigned long lb_hcerr : 1; /* RW, W1C */
179 unsigned long gr0_hcerr : 1; /* RW, W1C */
180 unsigned long gr1_hcerr : 1; /* RW, W1C */
181 unsigned long lh_hcerr : 1; /* RW, W1C */
182 unsigned long rh_hcerr : 1; /* RW, W1C */
183 unsigned long xn_hcerr : 1; /* RW, W1C */
184 unsigned long si_hcerr : 1; /* RW, W1C */
185 unsigned long lb_aoerr0 : 1; /* RW, W1C */
186 unsigned long gr0_aoerr0 : 1; /* RW, W1C */
187 unsigned long gr1_aoerr0 : 1; /* RW, W1C */
188 unsigned long lh_aoerr0 : 1; /* RW, W1C */
189 unsigned long rh_aoerr0 : 1; /* RW, W1C */
190 unsigned long xn_aoerr0 : 1; /* RW, W1C */
191 unsigned long si_aoerr0 : 1; /* RW, W1C */
192 unsigned long lb_aoerr1 : 1; /* RW, W1C */
193 unsigned long gr0_aoerr1 : 1; /* RW, W1C */
194 unsigned long gr1_aoerr1 : 1; /* RW, W1C */
195 unsigned long lh_aoerr1 : 1; /* RW, W1C */
196 unsigned long rh_aoerr1 : 1; /* RW, W1C */
197 unsigned long xn_aoerr1 : 1; /* RW, W1C */
198 unsigned long si_aoerr1 : 1; /* RW, W1C */
199 unsigned long rh_vpi_int : 1; /* RW, W1C */
200 unsigned long system_shutdown_int : 1; /* RW, W1C */
201 unsigned long lb_irq_int_0 : 1; /* RW, W1C */
202 unsigned long lb_irq_int_1 : 1; /* RW, W1C */
203 unsigned long lb_irq_int_2 : 1; /* RW, W1C */
204 unsigned long lb_irq_int_3 : 1; /* RW, W1C */
205 unsigned long lb_irq_int_4 : 1; /* RW, W1C */
206 unsigned long lb_irq_int_5 : 1; /* RW, W1C */
207 unsigned long lb_irq_int_6 : 1; /* RW, W1C */
208 unsigned long lb_irq_int_7 : 1; /* RW, W1C */
209 unsigned long lb_irq_int_8 : 1; /* RW, W1C */
210 unsigned long lb_irq_int_9 : 1; /* RW, W1C */
211 unsigned long lb_irq_int_10 : 1; /* RW, W1C */
212 unsigned long lb_irq_int_11 : 1; /* RW, W1C */
213 unsigned long lb_irq_int_12 : 1; /* RW, W1C */
214 unsigned long lb_irq_int_13 : 1; /* RW, W1C */
215 unsigned long lb_irq_int_14 : 1; /* RW, W1C */
216 unsigned long lb_irq_int_15 : 1; /* RW, W1C */
217 unsigned long l1_nmi_int : 1; /* RW, W1C */
218 unsigned long stop_clock : 1; /* RW, W1C */
219 unsigned long asic_to_l1 : 1; /* RW, W1C */
220 unsigned long l1_to_asic : 1; /* RW, W1C */
221 unsigned long ltc_int : 1; /* RW, W1C */
222 unsigned long la_seq_trigger : 1; /* RW, W1C */
223 unsigned long ipi_int : 1; /* RW, W1C */
224 unsigned long extio_int0 : 1; /* RW, W1C */
225 unsigned long extio_int1 : 1; /* RW, W1C */
226 unsigned long extio_int2 : 1; /* RW, W1C */
227 unsigned long extio_int3 : 1; /* RW, W1C */
228 unsigned long profile_int : 1; /* RW, W1C */
229 unsigned long rtc0 : 1; /* RW, W1C */
230 unsigned long rtc1 : 1; /* RW, W1C */
231 unsigned long rtc2 : 1; /* RW, W1C */
232 unsigned long rtc3 : 1; /* RW, W1C */
233 unsigned long bau_data : 1; /* RW, W1C */
234 unsigned long power_management_req : 1; /* RW, W1C */
235 unsigned long rsvd_57_63 : 7; /* */
236 } s;
237};
238
239/* ========================================================================= */
240/* UVH_EVENT_OCCURRED0_ALIAS */
241/* ========================================================================= */
242#define UVH_EVENT_OCCURRED0_ALIAS 0x0000000000070008UL
243#define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0
244
245/* ========================================================================= */
246/* UVH_INT_CMPB */
247/* ========================================================================= */
248#define UVH_INT_CMPB 0x22080UL
249
250#define UVH_INT_CMPB_REAL_TIME_CMPB_SHFT 0
251#define UVH_INT_CMPB_REAL_TIME_CMPB_MASK 0x00ffffffffffffffUL
252
253union uvh_int_cmpb_u {
254 unsigned long v;
255 struct uvh_int_cmpb_s {
256 unsigned long real_time_cmpb : 56; /* RW */
257 unsigned long rsvd_56_63 : 8; /* */
258 } s;
259};
260
261/* ========================================================================= */
262/* UVH_INT_CMPC */
263/* ========================================================================= */
264#define UVH_INT_CMPC 0x22100UL
265
266#define UVH_INT_CMPC_REAL_TIME_CMPC_SHFT 0
267#define UVH_INT_CMPC_REAL_TIME_CMPC_MASK 0x00ffffffffffffffUL
268
269union uvh_int_cmpc_u {
270 unsigned long v;
271 struct uvh_int_cmpc_s {
272 unsigned long real_time_cmpc : 56; /* RW */
273 unsigned long rsvd_56_63 : 8; /* */
274 } s;
275};
276
277/* ========================================================================= */
278/* UVH_INT_CMPD */
279/* ========================================================================= */
280#define UVH_INT_CMPD 0x22180UL
281
282#define UVH_INT_CMPD_REAL_TIME_CMPD_SHFT 0
283#define UVH_INT_CMPD_REAL_TIME_CMPD_MASK 0x00ffffffffffffffUL
284
285union uvh_int_cmpd_u {
286 unsigned long v;
287 struct uvh_int_cmpd_s {
288 unsigned long real_time_cmpd : 56; /* RW */
289 unsigned long rsvd_56_63 : 8; /* */
290 } s;
291};
292
293/* ========================================================================= */
294/* UVH_IPI_INT */
295/* ========================================================================= */
296#define UVH_IPI_INT 0x60500UL
297#define UVH_IPI_INT_32 0x0348
298
299#define UVH_IPI_INT_VECTOR_SHFT 0
300#define UVH_IPI_INT_VECTOR_MASK 0x00000000000000ffUL
301#define UVH_IPI_INT_DELIVERY_MODE_SHFT 8
302#define UVH_IPI_INT_DELIVERY_MODE_MASK 0x0000000000000700UL
303#define UVH_IPI_INT_DESTMODE_SHFT 11
304#define UVH_IPI_INT_DESTMODE_MASK 0x0000000000000800UL
305#define UVH_IPI_INT_APIC_ID_SHFT 16
306#define UVH_IPI_INT_APIC_ID_MASK 0x0000ffffffff0000UL
307#define UVH_IPI_INT_SEND_SHFT 63
308#define UVH_IPI_INT_SEND_MASK 0x8000000000000000UL
309
310union uvh_ipi_int_u {
311 unsigned long v;
312 struct uvh_ipi_int_s {
313 unsigned long vector_ : 8; /* RW */
314 unsigned long delivery_mode : 3; /* RW */
315 unsigned long destmode : 1; /* RW */
316 unsigned long rsvd_12_15 : 4; /* */
317 unsigned long apic_id : 32; /* RW */
318 unsigned long rsvd_48_62 : 15; /* */
319 unsigned long send : 1; /* WP */
320 } s;
321};
322
323/* ========================================================================= */
324/* UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST */
325/* ========================================================================= */
326#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST 0x320050UL
327#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST_32 0x009c0
328
329#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST_ADDRESS_SHFT 4
330#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST_ADDRESS_MASK 0x000007fffffffff0UL
331#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST_NODE_ID_SHFT 49
332#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_FIRST_NODE_ID_MASK 0x7ffe000000000000UL
333
334union uvh_lb_bau_intd_payload_queue_first_u {
335 unsigned long v;
336 struct uvh_lb_bau_intd_payload_queue_first_s {
337 unsigned long rsvd_0_3: 4; /* */
338 unsigned long address : 39; /* RW */
339 unsigned long rsvd_43_48: 6; /* */
340 unsigned long node_id : 14; /* RW */
341 unsigned long rsvd_63 : 1; /* */
342 } s;
343};
344
345/* ========================================================================= */
346/* UVH_LB_BAU_INTD_PAYLOAD_QUEUE_LAST */
347/* ========================================================================= */
348#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_LAST 0x320060UL
349#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_LAST_32 0x009c8
350
351#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_LAST_ADDRESS_SHFT 4
352#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_LAST_ADDRESS_MASK 0x000007fffffffff0UL
353
354union uvh_lb_bau_intd_payload_queue_last_u {
355 unsigned long v;
356 struct uvh_lb_bau_intd_payload_queue_last_s {
357 unsigned long rsvd_0_3: 4; /* */
358 unsigned long address : 39; /* RW */
359 unsigned long rsvd_43_63: 21; /* */
360 } s;
361};
362
363/* ========================================================================= */
364/* UVH_LB_BAU_INTD_PAYLOAD_QUEUE_TAIL */
365/* ========================================================================= */
366#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_TAIL 0x320070UL
367#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_TAIL_32 0x009d0
368
369#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_TAIL_ADDRESS_SHFT 4
370#define UVH_LB_BAU_INTD_PAYLOAD_QUEUE_TAIL_ADDRESS_MASK 0x000007fffffffff0UL
371
372union uvh_lb_bau_intd_payload_queue_tail_u {
373 unsigned long v;
374 struct uvh_lb_bau_intd_payload_queue_tail_s {
375 unsigned long rsvd_0_3: 4; /* */
376 unsigned long address : 39; /* RW */
377 unsigned long rsvd_43_63: 21; /* */
378 } s;
379};
380
381/* ========================================================================= */
382/* UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE */
383/* ========================================================================= */
384#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE 0x320080UL
385#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_32 0x0a68
386
387#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_0_SHFT 0
388#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_0_MASK 0x0000000000000001UL
389#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_1_SHFT 1
390#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_1_MASK 0x0000000000000002UL
391#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_2_SHFT 2
392#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_2_MASK 0x0000000000000004UL
393#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_3_SHFT 3
394#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_3_MASK 0x0000000000000008UL
395#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_4_SHFT 4
396#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_4_MASK 0x0000000000000010UL
397#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_5_SHFT 5
398#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_5_MASK 0x0000000000000020UL
399#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_6_SHFT 6
400#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_6_MASK 0x0000000000000040UL
401#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_7_SHFT 7
402#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_PENDING_7_MASK 0x0000000000000080UL
403#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_0_SHFT 8
404#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_0_MASK 0x0000000000000100UL
405#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_1_SHFT 9
406#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_1_MASK 0x0000000000000200UL
407#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_2_SHFT 10
408#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_2_MASK 0x0000000000000400UL
409#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_3_SHFT 11
410#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_3_MASK 0x0000000000000800UL
411#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_4_SHFT 12
412#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_4_MASK 0x0000000000001000UL
413#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_5_SHFT 13
414#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_5_MASK 0x0000000000002000UL
415#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_6_SHFT 14
416#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_6_MASK 0x0000000000004000UL
417#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_7_SHFT 15
418#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_TIMEOUT_7_MASK 0x0000000000008000UL
419union uvh_lb_bau_intd_software_acknowledge_u {
420 unsigned long v;
421 struct uvh_lb_bau_intd_software_acknowledge_s {
422 unsigned long pending_0 : 1; /* RW, W1C */
423 unsigned long pending_1 : 1; /* RW, W1C */
424 unsigned long pending_2 : 1; /* RW, W1C */
425 unsigned long pending_3 : 1; /* RW, W1C */
426 unsigned long pending_4 : 1; /* RW, W1C */
427 unsigned long pending_5 : 1; /* RW, W1C */
428 unsigned long pending_6 : 1; /* RW, W1C */
429 unsigned long pending_7 : 1; /* RW, W1C */
430 unsigned long timeout_0 : 1; /* RW, W1C */
431 unsigned long timeout_1 : 1; /* RW, W1C */
432 unsigned long timeout_2 : 1; /* RW, W1C */
433 unsigned long timeout_3 : 1; /* RW, W1C */
434 unsigned long timeout_4 : 1; /* RW, W1C */
435 unsigned long timeout_5 : 1; /* RW, W1C */
436 unsigned long timeout_6 : 1; /* RW, W1C */
437 unsigned long timeout_7 : 1; /* RW, W1C */
438 unsigned long rsvd_16_63: 48; /* */
439 } s;
440};
441
442/* ========================================================================= */
443/* UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS */
444/* ========================================================================= */
445#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS 0x0000000000320088UL
446#define UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS_32 0x0a70
447
448/* ========================================================================= */
449/* UVH_LB_BAU_SB_ACTIVATION_CONTROL */
450/* ========================================================================= */
451#define UVH_LB_BAU_SB_ACTIVATION_CONTROL 0x320020UL
452#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_32 0x009a8
453
454#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_INDEX_SHFT 0
455#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_INDEX_MASK 0x000000000000003fUL
456#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_PUSH_SHFT 62
457#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_PUSH_MASK 0x4000000000000000UL
458#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_INIT_SHFT 63
459#define UVH_LB_BAU_SB_ACTIVATION_CONTROL_INIT_MASK 0x8000000000000000UL
460
461union uvh_lb_bau_sb_activation_control_u {
462 unsigned long v;
463 struct uvh_lb_bau_sb_activation_control_s {
464 unsigned long index : 6; /* RW */
465 unsigned long rsvd_6_61: 56; /* */
466 unsigned long push : 1; /* WP */
467 unsigned long init : 1; /* WP */
468 } s;
469};
470
471/* ========================================================================= */
472/* UVH_LB_BAU_SB_ACTIVATION_STATUS_0 */
473/* ========================================================================= */
474#define UVH_LB_BAU_SB_ACTIVATION_STATUS_0 0x320030UL
475#define UVH_LB_BAU_SB_ACTIVATION_STATUS_0_32 0x009b0
476
477#define UVH_LB_BAU_SB_ACTIVATION_STATUS_0_STATUS_SHFT 0
478#define UVH_LB_BAU_SB_ACTIVATION_STATUS_0_STATUS_MASK 0xffffffffffffffffUL
479
480union uvh_lb_bau_sb_activation_status_0_u {
481 unsigned long v;
482 struct uvh_lb_bau_sb_activation_status_0_s {
483 unsigned long status : 64; /* RW */
484 } s;
485};
486
487/* ========================================================================= */
488/* UVH_LB_BAU_SB_ACTIVATION_STATUS_1 */
489/* ========================================================================= */
490#define UVH_LB_BAU_SB_ACTIVATION_STATUS_1 0x320040UL
491#define UVH_LB_BAU_SB_ACTIVATION_STATUS_1_32 0x009b8
492
493#define UVH_LB_BAU_SB_ACTIVATION_STATUS_1_STATUS_SHFT 0
494#define UVH_LB_BAU_SB_ACTIVATION_STATUS_1_STATUS_MASK 0xffffffffffffffffUL
495
496union uvh_lb_bau_sb_activation_status_1_u {
497 unsigned long v;
498 struct uvh_lb_bau_sb_activation_status_1_s {
499 unsigned long status : 64; /* RW */
500 } s;
501};
502
503/* ========================================================================= */
504/* UVH_LB_BAU_SB_DESCRIPTOR_BASE */
505/* ========================================================================= */
506#define UVH_LB_BAU_SB_DESCRIPTOR_BASE 0x320010UL
507#define UVH_LB_BAU_SB_DESCRIPTOR_BASE_32 0x009a0
508
509#define UVH_LB_BAU_SB_DESCRIPTOR_BASE_PAGE_ADDRESS_SHFT 12
510#define UVH_LB_BAU_SB_DESCRIPTOR_BASE_PAGE_ADDRESS_MASK 0x000007fffffff000UL
511#define UVH_LB_BAU_SB_DESCRIPTOR_BASE_NODE_ID_SHFT 49
512#define UVH_LB_BAU_SB_DESCRIPTOR_BASE_NODE_ID_MASK 0x7ffe000000000000UL
513
514union uvh_lb_bau_sb_descriptor_base_u {
515 unsigned long v;
516 struct uvh_lb_bau_sb_descriptor_base_s {
517 unsigned long rsvd_0_11 : 12; /* */
518 unsigned long page_address : 31; /* RW */
519 unsigned long rsvd_43_48 : 6; /* */
520 unsigned long node_id : 14; /* RW */
521 unsigned long rsvd_63 : 1; /* */
522 } s;
523};
524
525/* ========================================================================= */
526/* UVH_LB_MCAST_AOERR0_RPT_ENABLE */
527/* ========================================================================= */
528#define UVH_LB_MCAST_AOERR0_RPT_ENABLE 0x50b20UL
529
530#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_OBESE_MSG_SHFT 0
531#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_OBESE_MSG_MASK 0x0000000000000001UL
532#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_DATA_SB_ERR_SHFT 1
533#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_DATA_SB_ERR_MASK 0x0000000000000002UL
534#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_NACK_BUFF_PARITY_SHFT 2
535#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_NACK_BUFF_PARITY_MASK 0x0000000000000004UL
536#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_TIMEOUT_SHFT 3
537#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_TIMEOUT_MASK 0x0000000000000008UL
538#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_INACTIVE_REPLY_SHFT 4
539#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_INACTIVE_REPLY_MASK 0x0000000000000010UL
540#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_UPGRADE_ERROR_SHFT 5
541#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_UPGRADE_ERROR_MASK 0x0000000000000020UL
542#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_REG_COUNT_UNDERFLOW_SHFT 6
543#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_REG_COUNT_UNDERFLOW_MASK 0x0000000000000040UL
544#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_REP_OBESE_MSG_SHFT 7
545#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MCAST_REP_OBESE_MSG_MASK 0x0000000000000080UL
546#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REQ_RUNT_MSG_SHFT 8
547#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REQ_RUNT_MSG_MASK 0x0000000000000100UL
548#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REQ_OBESE_MSG_SHFT 9
549#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REQ_OBESE_MSG_MASK 0x0000000000000200UL
550#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REQ_DATA_SB_ERR_SHFT 10
551#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REQ_DATA_SB_ERR_MASK 0x0000000000000400UL
552#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_RUNT_MSG_SHFT 11
553#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_RUNT_MSG_MASK 0x0000000000000800UL
554#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_OBESE_MSG_SHFT 12
555#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_OBESE_MSG_MASK 0x0000000000001000UL
556#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_DATA_SB_ERR_SHFT 13
557#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_DATA_SB_ERR_MASK 0x0000000000002000UL
558#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_COMMAND_ERR_SHFT 14
559#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_REP_COMMAND_ERR_MASK 0x0000000000004000UL
560#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_PEND_TIMEOUT_SHFT 15
561#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_UCACHE_PEND_TIMEOUT_MASK 0x0000000000008000UL
562#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REQ_RUNT_MSG_SHFT 16
563#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REQ_RUNT_MSG_MASK 0x0000000000010000UL
564#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REQ_OBESE_MSG_SHFT 17
565#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REQ_OBESE_MSG_MASK 0x0000000000020000UL
566#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REQ_DATA_SB_ERR_SHFT 18
567#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REQ_DATA_SB_ERR_MASK 0x0000000000040000UL
568#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REP_RUNT_MSG_SHFT 19
569#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REP_RUNT_MSG_MASK 0x0000000000080000UL
570#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REP_OBESE_MSG_SHFT 20
571#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REP_OBESE_MSG_MASK 0x0000000000100000UL
572#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REP_DATA_SB_ERR_SHFT 21
573#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_REP_DATA_SB_ERR_MASK 0x0000000000200000UL
574#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_AMO_TIMEOUT_SHFT 22
575#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_AMO_TIMEOUT_MASK 0x0000000000400000UL
576#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_PUT_TIMEOUT_SHFT 23
577#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_PUT_TIMEOUT_MASK 0x0000000000800000UL
578#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_SPURIOUS_EVENT_SHFT 24
579#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_MACC_SPURIOUS_EVENT_MASK 0x0000000001000000UL
580#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_IOH_DESTINATION_TABLE_PARITY_SHFT 25
581#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_IOH_DESTINATION_TABLE_PARITY_MASK 0x0000000002000000UL
582#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_GET_HAD_ERROR_REPLY_SHFT 26
583#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_GET_HAD_ERROR_REPLY_MASK 0x0000000004000000UL
584#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_GET_TIMEOUT_SHFT 27
585#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_GET_TIMEOUT_MASK 0x0000000008000000UL
586#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_LOCK_MANAGER_HAD_ERROR_REPLY_SHFT 28
587#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_LOCK_MANAGER_HAD_ERROR_REPLY_MASK 0x0000000010000000UL
588#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_PUT_HAD_ERROR_REPLY_SHFT 29
589#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_PUT_HAD_ERROR_REPLY_MASK 0x0000000020000000UL
590#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_PUT_TIMEOUT_SHFT 30
591#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_PUT_TIMEOUT_MASK 0x0000000040000000UL
592#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_SB_ACTIVATION_OVERRUN_SHFT 31
593#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_SB_ACTIVATION_OVERRUN_MASK 0x0000000080000000UL
594#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_COMPLETED_GB_ACTIVATION_HAD_ERROR_REPLY_SHFT 32
595#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_COMPLETED_GB_ACTIVATION_HAD_ERROR_REPLY_MASK 0x0000000100000000UL
596#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_COMPLETED_GB_ACTIVATION_TIMEOUT_SHFT 33
597#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_COMPLETED_GB_ACTIVATION_TIMEOUT_MASK 0x0000000200000000UL
598#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_DESCRIPTOR_BUFFER_0_PARITY_SHFT 34
599#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_DESCRIPTOR_BUFFER_0_PARITY_MASK 0x0000000400000000UL
600#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_DESCRIPTOR_BUFFER_1_PARITY_SHFT 35
601#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_DESCRIPTOR_BUFFER_1_PARITY_MASK 0x0000000800000000UL
602#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_SOCKET_DESTINATION_TABLE_PARITY_SHFT 36
603#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_SOCKET_DESTINATION_TABLE_PARITY_MASK 0x0000001000000000UL
604#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_BAU_REPLY_PAYLOAD_CORRUPTION_SHFT 37
605#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_BAU_REPLY_PAYLOAD_CORRUPTION_MASK 0x0000002000000000UL
606#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_IO_PORT_DESTINATION_TABLE_PARITY_SHFT 38
607#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_IO_PORT_DESTINATION_TABLE_PARITY_MASK 0x0000004000000000UL
608#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INTD_SOFT_ACK_TIMEOUT_SHFT 39
609#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INTD_SOFT_ACK_TIMEOUT_MASK 0x0000008000000000UL
610#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INT_REP_OBESE_MSG_SHFT 40
611#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INT_REP_OBESE_MSG_MASK 0x0000010000000000UL
612#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INT_REP_COMMAND_ERR_SHFT 41
613#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INT_REP_COMMAND_ERR_MASK 0x0000020000000000UL
614#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INT_TIMEOUT_SHFT 42
615#define UVH_LB_MCAST_AOERR0_RPT_ENABLE_INT_TIMEOUT_MASK 0x0000040000000000UL
616
617union uvh_lb_mcast_aoerr0_rpt_enable_u {
618 unsigned long v;
619 struct uvh_lb_mcast_aoerr0_rpt_enable_s {
620 unsigned long mcast_obese_msg : 1; /* RW */
621 unsigned long mcast_data_sb_err : 1; /* RW */
622 unsigned long mcast_nack_buff_parity : 1; /* RW */
623 unsigned long mcast_timeout : 1; /* RW */
624 unsigned long mcast_inactive_reply : 1; /* RW */
625 unsigned long mcast_upgrade_error : 1; /* RW */
626 unsigned long mcast_reg_count_underflow : 1; /* RW */
627 unsigned long mcast_rep_obese_msg : 1; /* RW */
628 unsigned long ucache_req_runt_msg : 1; /* RW */
629 unsigned long ucache_req_obese_msg : 1; /* RW */
630 unsigned long ucache_req_data_sb_err : 1; /* RW */
631 unsigned long ucache_rep_runt_msg : 1; /* RW */
632 unsigned long ucache_rep_obese_msg : 1; /* RW */
633 unsigned long ucache_rep_data_sb_err : 1; /* RW */
634 unsigned long ucache_rep_command_err : 1; /* RW */
635 unsigned long ucache_pend_timeout : 1; /* RW */
636 unsigned long macc_req_runt_msg : 1; /* RW */
637 unsigned long macc_req_obese_msg : 1; /* RW */
638 unsigned long macc_req_data_sb_err : 1; /* RW */
639 unsigned long macc_rep_runt_msg : 1; /* RW */
640 unsigned long macc_rep_obese_msg : 1; /* RW */
641 unsigned long macc_rep_data_sb_err : 1; /* RW */
642 unsigned long macc_amo_timeout : 1; /* RW */
643 unsigned long macc_put_timeout : 1; /* RW */
644 unsigned long macc_spurious_event : 1; /* RW */
645 unsigned long ioh_destination_table_parity : 1; /* RW */
646 unsigned long get_had_error_reply : 1; /* RW */
647 unsigned long get_timeout : 1; /* RW */
648 unsigned long lock_manager_had_error_reply : 1; /* RW */
649 unsigned long put_had_error_reply : 1; /* RW */
650 unsigned long put_timeout : 1; /* RW */
651 unsigned long sb_activation_overrun : 1; /* RW */
652 unsigned long completed_gb_activation_had_error_reply : 1; /* RW */
653 unsigned long completed_gb_activation_timeout : 1; /* RW */
654 unsigned long descriptor_buffer_0_parity : 1; /* RW */
655 unsigned long descriptor_buffer_1_parity : 1; /* RW */
656 unsigned long socket_destination_table_parity : 1; /* RW */
657 unsigned long bau_reply_payload_corruption : 1; /* RW */
658 unsigned long io_port_destination_table_parity : 1; /* RW */
659 unsigned long intd_soft_ack_timeout : 1; /* RW */
660 unsigned long int_rep_obese_msg : 1; /* RW */
661 unsigned long int_rep_command_err : 1; /* RW */
662 unsigned long int_timeout : 1; /* RW */
663 unsigned long rsvd_43_63 : 21; /* */
664 } s;
665};
666
667/* ========================================================================= */
668/* UVH_LOCAL_INT0_CONFIG */
669/* ========================================================================= */
670#define UVH_LOCAL_INT0_CONFIG 0x61000UL
671
672#define UVH_LOCAL_INT0_CONFIG_VECTOR_SHFT 0
673#define UVH_LOCAL_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
674#define UVH_LOCAL_INT0_CONFIG_DM_SHFT 8
675#define UVH_LOCAL_INT0_CONFIG_DM_MASK 0x0000000000000700UL
676#define UVH_LOCAL_INT0_CONFIG_DESTMODE_SHFT 11
677#define UVH_LOCAL_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
678#define UVH_LOCAL_INT0_CONFIG_STATUS_SHFT 12
679#define UVH_LOCAL_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
680#define UVH_LOCAL_INT0_CONFIG_P_SHFT 13
681#define UVH_LOCAL_INT0_CONFIG_P_MASK 0x0000000000002000UL
682#define UVH_LOCAL_INT0_CONFIG_T_SHFT 15
683#define UVH_LOCAL_INT0_CONFIG_T_MASK 0x0000000000008000UL
684#define UVH_LOCAL_INT0_CONFIG_M_SHFT 16
685#define UVH_LOCAL_INT0_CONFIG_M_MASK 0x0000000000010000UL
686#define UVH_LOCAL_INT0_CONFIG_APIC_ID_SHFT 32
687#define UVH_LOCAL_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
688
689union uvh_local_int0_config_u {
690 unsigned long v;
691 struct uvh_local_int0_config_s {
692 unsigned long vector_ : 8; /* RW */
693 unsigned long dm : 3; /* RW */
694 unsigned long destmode : 1; /* RW */
695 unsigned long status : 1; /* RO */
696 unsigned long p : 1; /* RO */
697 unsigned long rsvd_14 : 1; /* */
698 unsigned long t : 1; /* RO */
699 unsigned long m : 1; /* RW */
700 unsigned long rsvd_17_31: 15; /* */
701 unsigned long apic_id : 32; /* RW */
702 } s;
703};
704
705/* ========================================================================= */
706/* UVH_LOCAL_INT0_ENABLE */
707/* ========================================================================= */
708#define UVH_LOCAL_INT0_ENABLE 0x65000UL
709
710#define UVH_LOCAL_INT0_ENABLE_LB_HCERR_SHFT 0
711#define UVH_LOCAL_INT0_ENABLE_LB_HCERR_MASK 0x0000000000000001UL
712#define UVH_LOCAL_INT0_ENABLE_GR0_HCERR_SHFT 1
713#define UVH_LOCAL_INT0_ENABLE_GR0_HCERR_MASK 0x0000000000000002UL
714#define UVH_LOCAL_INT0_ENABLE_GR1_HCERR_SHFT 2
715#define UVH_LOCAL_INT0_ENABLE_GR1_HCERR_MASK 0x0000000000000004UL
716#define UVH_LOCAL_INT0_ENABLE_LH_HCERR_SHFT 3
717#define UVH_LOCAL_INT0_ENABLE_LH_HCERR_MASK 0x0000000000000008UL
718#define UVH_LOCAL_INT0_ENABLE_RH_HCERR_SHFT 4
719#define UVH_LOCAL_INT0_ENABLE_RH_HCERR_MASK 0x0000000000000010UL
720#define UVH_LOCAL_INT0_ENABLE_XN_HCERR_SHFT 5
721#define UVH_LOCAL_INT0_ENABLE_XN_HCERR_MASK 0x0000000000000020UL
722#define UVH_LOCAL_INT0_ENABLE_SI_HCERR_SHFT 6
723#define UVH_LOCAL_INT0_ENABLE_SI_HCERR_MASK 0x0000000000000040UL
724#define UVH_LOCAL_INT0_ENABLE_LB_AOERR0_SHFT 7
725#define UVH_LOCAL_INT0_ENABLE_LB_AOERR0_MASK 0x0000000000000080UL
726#define UVH_LOCAL_INT0_ENABLE_GR0_AOERR0_SHFT 8
727#define UVH_LOCAL_INT0_ENABLE_GR0_AOERR0_MASK 0x0000000000000100UL
728#define UVH_LOCAL_INT0_ENABLE_GR1_AOERR0_SHFT 9
729#define UVH_LOCAL_INT0_ENABLE_GR1_AOERR0_MASK 0x0000000000000200UL
730#define UVH_LOCAL_INT0_ENABLE_LH_AOERR0_SHFT 10
731#define UVH_LOCAL_INT0_ENABLE_LH_AOERR0_MASK 0x0000000000000400UL
732#define UVH_LOCAL_INT0_ENABLE_RH_AOERR0_SHFT 11
733#define UVH_LOCAL_INT0_ENABLE_RH_AOERR0_MASK 0x0000000000000800UL
734#define UVH_LOCAL_INT0_ENABLE_XN_AOERR0_SHFT 12
735#define UVH_LOCAL_INT0_ENABLE_XN_AOERR0_MASK 0x0000000000001000UL
736#define UVH_LOCAL_INT0_ENABLE_SI_AOERR0_SHFT 13
737#define UVH_LOCAL_INT0_ENABLE_SI_AOERR0_MASK 0x0000000000002000UL
738#define UVH_LOCAL_INT0_ENABLE_LB_AOERR1_SHFT 14
739#define UVH_LOCAL_INT0_ENABLE_LB_AOERR1_MASK 0x0000000000004000UL
740#define UVH_LOCAL_INT0_ENABLE_GR0_AOERR1_SHFT 15
741#define UVH_LOCAL_INT0_ENABLE_GR0_AOERR1_MASK 0x0000000000008000UL
742#define UVH_LOCAL_INT0_ENABLE_GR1_AOERR1_SHFT 16
743#define UVH_LOCAL_INT0_ENABLE_GR1_AOERR1_MASK 0x0000000000010000UL
744#define UVH_LOCAL_INT0_ENABLE_LH_AOERR1_SHFT 17
745#define UVH_LOCAL_INT0_ENABLE_LH_AOERR1_MASK 0x0000000000020000UL
746#define UVH_LOCAL_INT0_ENABLE_RH_AOERR1_SHFT 18
747#define UVH_LOCAL_INT0_ENABLE_RH_AOERR1_MASK 0x0000000000040000UL
748#define UVH_LOCAL_INT0_ENABLE_XN_AOERR1_SHFT 19
749#define UVH_LOCAL_INT0_ENABLE_XN_AOERR1_MASK 0x0000000000080000UL
750#define UVH_LOCAL_INT0_ENABLE_SI_AOERR1_SHFT 20
751#define UVH_LOCAL_INT0_ENABLE_SI_AOERR1_MASK 0x0000000000100000UL
752#define UVH_LOCAL_INT0_ENABLE_RH_VPI_INT_SHFT 21
753#define UVH_LOCAL_INT0_ENABLE_RH_VPI_INT_MASK 0x0000000000200000UL
754#define UVH_LOCAL_INT0_ENABLE_SYSTEM_SHUTDOWN_INT_SHFT 22
755#define UVH_LOCAL_INT0_ENABLE_SYSTEM_SHUTDOWN_INT_MASK 0x0000000000400000UL
756#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_0_SHFT 23
757#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_0_MASK 0x0000000000800000UL
758#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_1_SHFT 24
759#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_1_MASK 0x0000000001000000UL
760#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_2_SHFT 25
761#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_2_MASK 0x0000000002000000UL
762#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_3_SHFT 26
763#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_3_MASK 0x0000000004000000UL
764#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_4_SHFT 27
765#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_4_MASK 0x0000000008000000UL
766#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_5_SHFT 28
767#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_5_MASK 0x0000000010000000UL
768#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_6_SHFT 29
769#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_6_MASK 0x0000000020000000UL
770#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_7_SHFT 30
771#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_7_MASK 0x0000000040000000UL
772#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_8_SHFT 31
773#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_8_MASK 0x0000000080000000UL
774#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_9_SHFT 32
775#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_9_MASK 0x0000000100000000UL
776#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_10_SHFT 33
777#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_10_MASK 0x0000000200000000UL
778#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_11_SHFT 34
779#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_11_MASK 0x0000000400000000UL
780#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_12_SHFT 35
781#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_12_MASK 0x0000000800000000UL
782#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_13_SHFT 36
783#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_13_MASK 0x0000001000000000UL
784#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_14_SHFT 37
785#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_14_MASK 0x0000002000000000UL
786#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_15_SHFT 38
787#define UVH_LOCAL_INT0_ENABLE_LB_IRQ_INT_15_MASK 0x0000004000000000UL
788#define UVH_LOCAL_INT0_ENABLE_L1_NMI_INT_SHFT 39
789#define UVH_LOCAL_INT0_ENABLE_L1_NMI_INT_MASK 0x0000008000000000UL
790#define UVH_LOCAL_INT0_ENABLE_STOP_CLOCK_SHFT 40
791#define UVH_LOCAL_INT0_ENABLE_STOP_CLOCK_MASK 0x0000010000000000UL
792#define UVH_LOCAL_INT0_ENABLE_ASIC_TO_L1_SHFT 41
793#define UVH_LOCAL_INT0_ENABLE_ASIC_TO_L1_MASK 0x0000020000000000UL
794#define UVH_LOCAL_INT0_ENABLE_L1_TO_ASIC_SHFT 42
795#define UVH_LOCAL_INT0_ENABLE_L1_TO_ASIC_MASK 0x0000040000000000UL
796#define UVH_LOCAL_INT0_ENABLE_LTC_INT_SHFT 43
797#define UVH_LOCAL_INT0_ENABLE_LTC_INT_MASK 0x0000080000000000UL
798#define UVH_LOCAL_INT0_ENABLE_LA_SEQ_TRIGGER_SHFT 44
799#define UVH_LOCAL_INT0_ENABLE_LA_SEQ_TRIGGER_MASK 0x0000100000000000UL
800
801union uvh_local_int0_enable_u {
802 unsigned long v;
803 struct uvh_local_int0_enable_s {
804 unsigned long lb_hcerr : 1; /* RW */
805 unsigned long gr0_hcerr : 1; /* RW */
806 unsigned long gr1_hcerr : 1; /* RW */
807 unsigned long lh_hcerr : 1; /* RW */
808 unsigned long rh_hcerr : 1; /* RW */
809 unsigned long xn_hcerr : 1; /* RW */
810 unsigned long si_hcerr : 1; /* RW */
811 unsigned long lb_aoerr0 : 1; /* RW */
812 unsigned long gr0_aoerr0 : 1; /* RW */
813 unsigned long gr1_aoerr0 : 1; /* RW */
814 unsigned long lh_aoerr0 : 1; /* RW */
815 unsigned long rh_aoerr0 : 1; /* RW */
816 unsigned long xn_aoerr0 : 1; /* RW */
817 unsigned long si_aoerr0 : 1; /* RW */
818 unsigned long lb_aoerr1 : 1; /* RW */
819 unsigned long gr0_aoerr1 : 1; /* RW */
820 unsigned long gr1_aoerr1 : 1; /* RW */
821 unsigned long lh_aoerr1 : 1; /* RW */
822 unsigned long rh_aoerr1 : 1; /* RW */
823 unsigned long xn_aoerr1 : 1; /* RW */
824 unsigned long si_aoerr1 : 1; /* RW */
825 unsigned long rh_vpi_int : 1; /* RW */
826 unsigned long system_shutdown_int : 1; /* RW */
827 unsigned long lb_irq_int_0 : 1; /* RW */
828 unsigned long lb_irq_int_1 : 1; /* RW */
829 unsigned long lb_irq_int_2 : 1; /* RW */
830 unsigned long lb_irq_int_3 : 1; /* RW */
831 unsigned long lb_irq_int_4 : 1; /* RW */
832 unsigned long lb_irq_int_5 : 1; /* RW */
833 unsigned long lb_irq_int_6 : 1; /* RW */
834 unsigned long lb_irq_int_7 : 1; /* RW */
835 unsigned long lb_irq_int_8 : 1; /* RW */
836 unsigned long lb_irq_int_9 : 1; /* RW */
837 unsigned long lb_irq_int_10 : 1; /* RW */
838 unsigned long lb_irq_int_11 : 1; /* RW */
839 unsigned long lb_irq_int_12 : 1; /* RW */
840 unsigned long lb_irq_int_13 : 1; /* RW */
841 unsigned long lb_irq_int_14 : 1; /* RW */
842 unsigned long lb_irq_int_15 : 1; /* RW */
843 unsigned long l1_nmi_int : 1; /* RW */
844 unsigned long stop_clock : 1; /* RW */
845 unsigned long asic_to_l1 : 1; /* RW */
846 unsigned long l1_to_asic : 1; /* RW */
847 unsigned long ltc_int : 1; /* RW */
848 unsigned long la_seq_trigger : 1; /* RW */
849 unsigned long rsvd_45_63 : 19; /* */
850 } s;
851};
852
853/* ========================================================================= */
854/* UVH_NODE_ID */
855/* ========================================================================= */
856#define UVH_NODE_ID 0x0UL
857
858#define UVH_NODE_ID_FORCE1_SHFT 0
859#define UVH_NODE_ID_FORCE1_MASK 0x0000000000000001UL
860#define UVH_NODE_ID_MANUFACTURER_SHFT 1
861#define UVH_NODE_ID_MANUFACTURER_MASK 0x0000000000000ffeUL
862#define UVH_NODE_ID_PART_NUMBER_SHFT 12
863#define UVH_NODE_ID_PART_NUMBER_MASK 0x000000000ffff000UL
864#define UVH_NODE_ID_REVISION_SHFT 28
865#define UVH_NODE_ID_REVISION_MASK 0x00000000f0000000UL
866#define UVH_NODE_ID_NODE_ID_SHFT 32
867#define UVH_NODE_ID_NODE_ID_MASK 0x00007fff00000000UL
868#define UVH_NODE_ID_NODES_PER_BIT_SHFT 48
869#define UVH_NODE_ID_NODES_PER_BIT_MASK 0x007f000000000000UL
870#define UVH_NODE_ID_NI_PORT_SHFT 56
871#define UVH_NODE_ID_NI_PORT_MASK 0x0f00000000000000UL
872
873union uvh_node_id_u {
874 unsigned long v;
875 struct uvh_node_id_s {
876 unsigned long force1 : 1; /* RO */
877 unsigned long manufacturer : 11; /* RO */
878 unsigned long part_number : 16; /* RO */
879 unsigned long revision : 4; /* RO */
880 unsigned long node_id : 15; /* RW */
881 unsigned long rsvd_47 : 1; /* */
882 unsigned long nodes_per_bit : 7; /* RW */
883 unsigned long rsvd_55 : 1; /* */
884 unsigned long ni_port : 4; /* RO */
885 unsigned long rsvd_60_63 : 4; /* */
886 } s;
887};
888
889/* ========================================================================= */
890/* UVH_NODE_PRESENT_TABLE */
891/* ========================================================================= */
892#define UVH_NODE_PRESENT_TABLE 0x1400UL
893#define UVH_NODE_PRESENT_TABLE_DEPTH 16
894
895#define UVH_NODE_PRESENT_TABLE_NODES_SHFT 0
896#define UVH_NODE_PRESENT_TABLE_NODES_MASK 0xffffffffffffffffUL
897
898union uvh_node_present_table_u {
899 unsigned long v;
900 struct uvh_node_present_table_s {
901 unsigned long nodes : 64; /* RW */
902 } s;
903};
904
905/* ========================================================================= */
906/* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR */
907/* ========================================================================= */
908#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR 0x16000d0UL
909
910#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_SHFT 24
911#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_MASK 0x00003fffff000000UL
912
913union uvh_rh_gam_alias210_redirect_config_0_mmr_u {
914 unsigned long v;
915 struct uvh_rh_gam_alias210_redirect_config_0_mmr_s {
916 unsigned long rsvd_0_23 : 24; /* */
917 unsigned long dest_base : 22; /* RW */
918 unsigned long rsvd_46_63: 18; /* */
919 } s;
920};
921
922/* ========================================================================= */
923/* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR */
924/* ========================================================================= */
925#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR 0x16000e0UL
926
927#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_SHFT 24
928#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_MASK 0x00003fffff000000UL
929
930union uvh_rh_gam_alias210_redirect_config_1_mmr_u {
931 unsigned long v;
932 struct uvh_rh_gam_alias210_redirect_config_1_mmr_s {
933 unsigned long rsvd_0_23 : 24; /* */
934 unsigned long dest_base : 22; /* RW */
935 unsigned long rsvd_46_63: 18; /* */
936 } s;
937};
938
939/* ========================================================================= */
940/* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR */
941/* ========================================================================= */
942#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR 0x16000f0UL
943
944#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_SHFT 24
945#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_MASK 0x00003fffff000000UL
946
947union uvh_rh_gam_alias210_redirect_config_2_mmr_u {
948 unsigned long v;
949 struct uvh_rh_gam_alias210_redirect_config_2_mmr_s {
950 unsigned long rsvd_0_23 : 24; /* */
951 unsigned long dest_base : 22; /* RW */
952 unsigned long rsvd_46_63: 18; /* */
953 } s;
954};
955
956/* ========================================================================= */
957/* UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR */
958/* ========================================================================= */
959#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR 0x1600020UL
960
961#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_BASE_SHFT 26
962#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffffc000000UL
963#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
964#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
965
966union uvh_rh_gam_cfg_overlay_config_mmr_u {
967 unsigned long v;
968 struct uvh_rh_gam_cfg_overlay_config_mmr_s {
969 unsigned long rsvd_0_25: 26; /* */
970 unsigned long base : 20; /* RW */
971 unsigned long rsvd_46_62: 17; /* */
972 unsigned long enable : 1; /* RW */
973 } s;
974};
975
976/* ========================================================================= */
977/* UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR */
978/* ========================================================================= */
979#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR 0x1600010UL
980
981#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_SHFT 28
982#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffff0000000UL
983#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_SHFT 48
984#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_MASK 0x0001000000000000UL
985#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_SHFT 52
986#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_MASK 0x00f0000000000000UL
987#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
988#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
989
990union uvh_rh_gam_gru_overlay_config_mmr_u {
991 unsigned long v;
992 struct uvh_rh_gam_gru_overlay_config_mmr_s {
993 unsigned long rsvd_0_27: 28; /* */
994 unsigned long base : 18; /* RW */
995 unsigned long rsvd_46_47: 2; /* */
996 unsigned long gr4 : 1; /* RW */
997 unsigned long rsvd_49_51: 3; /* */
998 unsigned long n_gru : 4; /* RW */
999 unsigned long rsvd_56_62: 7; /* */
1000 unsigned long enable : 1; /* RW */
1001 } s;
1002};
1003
1004/* ========================================================================= */
1005/* UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR */
1006/* ========================================================================= */
1007#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR 0x1600030UL
1008
1009#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_BASE_SHFT 30
1010#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003fffc0000000UL
1011#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_M_IO_SHFT 46
1012#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_M_IO_MASK 0x000fc00000000000UL
1013#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_N_IO_SHFT 52
1014#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_N_IO_MASK 0x00f0000000000000UL
1015#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
1016#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
1017
1018union uvh_rh_gam_mmioh_overlay_config_mmr_u {
1019 unsigned long v;
1020 struct uvh_rh_gam_mmioh_overlay_config_mmr_s {
1021 unsigned long rsvd_0_29: 30; /* */
1022 unsigned long base : 16; /* RW */
1023 unsigned long m_io : 6; /* RW */
1024 unsigned long n_io : 4; /* RW */
1025 unsigned long rsvd_56_62: 7; /* */
1026 unsigned long enable : 1; /* RW */
1027 } s;
1028};
1029
1030/* ========================================================================= */
1031/* UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR */
1032/* ========================================================================= */
1033#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR 0x1600028UL
1034
1035#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_SHFT 26
1036#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffffc000000UL
1037#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_SHFT 46
1038#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_MASK 0x0000400000000000UL
1039#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
1040#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
1041
1042union uvh_rh_gam_mmr_overlay_config_mmr_u {
1043 unsigned long v;
1044 struct uvh_rh_gam_mmr_overlay_config_mmr_s {
1045 unsigned long rsvd_0_25: 26; /* */
1046 unsigned long base : 20; /* RW */
1047 unsigned long dual_hub : 1; /* RW */
1048 unsigned long rsvd_47_62: 16; /* */
1049 unsigned long enable : 1; /* RW */
1050 } s;
1051};
1052
1053/* ========================================================================= */
1054/* UVH_RTC */
1055/* ========================================================================= */
1056#define UVH_RTC 0x340000UL
1057
1058#define UVH_RTC_REAL_TIME_CLOCK_SHFT 0
1059#define UVH_RTC_REAL_TIME_CLOCK_MASK 0x00ffffffffffffffUL
1060
1061union uvh_rtc_u {
1062 unsigned long v;
1063 struct uvh_rtc_s {
1064 unsigned long real_time_clock : 56; /* RW */
1065 unsigned long rsvd_56_63 : 8; /* */
1066 } s;
1067};
1068
1069/* ========================================================================= */
1070/* UVH_RTC1_INT_CONFIG */
1071/* ========================================================================= */
1072#define UVH_RTC1_INT_CONFIG 0x615c0UL
1073
1074#define UVH_RTC1_INT_CONFIG_VECTOR_SHFT 0
1075#define UVH_RTC1_INT_CONFIG_VECTOR_MASK 0x00000000000000ffUL
1076#define UVH_RTC1_INT_CONFIG_DM_SHFT 8
1077#define UVH_RTC1_INT_CONFIG_DM_MASK 0x0000000000000700UL
1078#define UVH_RTC1_INT_CONFIG_DESTMODE_SHFT 11
1079#define UVH_RTC1_INT_CONFIG_DESTMODE_MASK 0x0000000000000800UL
1080#define UVH_RTC1_INT_CONFIG_STATUS_SHFT 12
1081#define UVH_RTC1_INT_CONFIG_STATUS_MASK 0x0000000000001000UL
1082#define UVH_RTC1_INT_CONFIG_P_SHFT 13
1083#define UVH_RTC1_INT_CONFIG_P_MASK 0x0000000000002000UL
1084#define UVH_RTC1_INT_CONFIG_T_SHFT 15
1085#define UVH_RTC1_INT_CONFIG_T_MASK 0x0000000000008000UL
1086#define UVH_RTC1_INT_CONFIG_M_SHFT 16
1087#define UVH_RTC1_INT_CONFIG_M_MASK 0x0000000000010000UL
1088#define UVH_RTC1_INT_CONFIG_APIC_ID_SHFT 32
1089#define UVH_RTC1_INT_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
1090
1091union uvh_rtc1_int_config_u {
1092 unsigned long v;
1093 struct uvh_rtc1_int_config_s {
1094 unsigned long vector_ : 8; /* RW */
1095 unsigned long dm : 3; /* RW */
1096 unsigned long destmode : 1; /* RW */
1097 unsigned long status : 1; /* RO */
1098 unsigned long p : 1; /* RO */
1099 unsigned long rsvd_14 : 1; /* */
1100 unsigned long t : 1; /* RO */
1101 unsigned long m : 1; /* RW */
1102 unsigned long rsvd_17_31: 15; /* */
1103 unsigned long apic_id : 32; /* RW */
1104 } s;
1105};
1106
1107/* ========================================================================= */
1108/* UVH_RTC2_INT_CONFIG */
1109/* ========================================================================= */
1110#define UVH_RTC2_INT_CONFIG 0x61600UL
1111
1112#define UVH_RTC2_INT_CONFIG_VECTOR_SHFT 0
1113#define UVH_RTC2_INT_CONFIG_VECTOR_MASK 0x00000000000000ffUL
1114#define UVH_RTC2_INT_CONFIG_DM_SHFT 8
1115#define UVH_RTC2_INT_CONFIG_DM_MASK 0x0000000000000700UL
1116#define UVH_RTC2_INT_CONFIG_DESTMODE_SHFT 11
1117#define UVH_RTC2_INT_CONFIG_DESTMODE_MASK 0x0000000000000800UL
1118#define UVH_RTC2_INT_CONFIG_STATUS_SHFT 12
1119#define UVH_RTC2_INT_CONFIG_STATUS_MASK 0x0000000000001000UL
1120#define UVH_RTC2_INT_CONFIG_P_SHFT 13
1121#define UVH_RTC2_INT_CONFIG_P_MASK 0x0000000000002000UL
1122#define UVH_RTC2_INT_CONFIG_T_SHFT 15
1123#define UVH_RTC2_INT_CONFIG_T_MASK 0x0000000000008000UL
1124#define UVH_RTC2_INT_CONFIG_M_SHFT 16
1125#define UVH_RTC2_INT_CONFIG_M_MASK 0x0000000000010000UL
1126#define UVH_RTC2_INT_CONFIG_APIC_ID_SHFT 32
1127#define UVH_RTC2_INT_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
1128
1129union uvh_rtc2_int_config_u {
1130 unsigned long v;
1131 struct uvh_rtc2_int_config_s {
1132 unsigned long vector_ : 8; /* RW */
1133 unsigned long dm : 3; /* RW */
1134 unsigned long destmode : 1; /* RW */
1135 unsigned long status : 1; /* RO */
1136 unsigned long p : 1; /* RO */
1137 unsigned long rsvd_14 : 1; /* */
1138 unsigned long t : 1; /* RO */
1139 unsigned long m : 1; /* RW */
1140 unsigned long rsvd_17_31: 15; /* */
1141 unsigned long apic_id : 32; /* RW */
1142 } s;
1143};
1144
1145/* ========================================================================= */
1146/* UVH_RTC3_INT_CONFIG */
1147/* ========================================================================= */
1148#define UVH_RTC3_INT_CONFIG 0x61640UL
1149
1150#define UVH_RTC3_INT_CONFIG_VECTOR_SHFT 0
1151#define UVH_RTC3_INT_CONFIG_VECTOR_MASK 0x00000000000000ffUL
1152#define UVH_RTC3_INT_CONFIG_DM_SHFT 8
1153#define UVH_RTC3_INT_CONFIG_DM_MASK 0x0000000000000700UL
1154#define UVH_RTC3_INT_CONFIG_DESTMODE_SHFT 11
1155#define UVH_RTC3_INT_CONFIG_DESTMODE_MASK 0x0000000000000800UL
1156#define UVH_RTC3_INT_CONFIG_STATUS_SHFT 12
1157#define UVH_RTC3_INT_CONFIG_STATUS_MASK 0x0000000000001000UL
1158#define UVH_RTC3_INT_CONFIG_P_SHFT 13
1159#define UVH_RTC3_INT_CONFIG_P_MASK 0x0000000000002000UL
1160#define UVH_RTC3_INT_CONFIG_T_SHFT 15
1161#define UVH_RTC3_INT_CONFIG_T_MASK 0x0000000000008000UL
1162#define UVH_RTC3_INT_CONFIG_M_SHFT 16
1163#define UVH_RTC3_INT_CONFIG_M_MASK 0x0000000000010000UL
1164#define UVH_RTC3_INT_CONFIG_APIC_ID_SHFT 32
1165#define UVH_RTC3_INT_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
1166
1167union uvh_rtc3_int_config_u {
1168 unsigned long v;
1169 struct uvh_rtc3_int_config_s {
1170 unsigned long vector_ : 8; /* RW */
1171 unsigned long dm : 3; /* RW */
1172 unsigned long destmode : 1; /* RW */
1173 unsigned long status : 1; /* RO */
1174 unsigned long p : 1; /* RO */
1175 unsigned long rsvd_14 : 1; /* */
1176 unsigned long t : 1; /* RO */
1177 unsigned long m : 1; /* RW */
1178 unsigned long rsvd_17_31: 15; /* */
1179 unsigned long apic_id : 32; /* RW */
1180 } s;
1181};
1182
1183/* ========================================================================= */
1184/* UVH_RTC_INC_RATIO */
1185/* ========================================================================= */
1186#define UVH_RTC_INC_RATIO 0x350000UL
1187
1188#define UVH_RTC_INC_RATIO_FRACTION_SHFT 0
1189#define UVH_RTC_INC_RATIO_FRACTION_MASK 0x00000000000fffffUL
1190#define UVH_RTC_INC_RATIO_RATIO_SHFT 20
1191#define UVH_RTC_INC_RATIO_RATIO_MASK 0x0000000000700000UL
1192
1193union uvh_rtc_inc_ratio_u {
1194 unsigned long v;
1195 struct uvh_rtc_inc_ratio_s {
1196 unsigned long fraction : 20; /* RW */
1197 unsigned long ratio : 3; /* RW */
1198 unsigned long rsvd_23_63: 41; /* */
1199 } s;
1200};
1201
1202/* ========================================================================= */
1203/* UVH_SI_ADDR_MAP_CONFIG */
1204/* ========================================================================= */
1205#define UVH_SI_ADDR_MAP_CONFIG 0xc80000UL
1206
1207#define UVH_SI_ADDR_MAP_CONFIG_M_SKT_SHFT 0
1208#define UVH_SI_ADDR_MAP_CONFIG_M_SKT_MASK 0x000000000000003fUL
1209#define UVH_SI_ADDR_MAP_CONFIG_N_SKT_SHFT 8
1210#define UVH_SI_ADDR_MAP_CONFIG_N_SKT_MASK 0x0000000000000f00UL
1211
1212union uvh_si_addr_map_config_u {
1213 unsigned long v;
1214 struct uvh_si_addr_map_config_s {
1215 unsigned long m_skt : 6; /* RW */
1216 unsigned long rsvd_6_7: 2; /* */
1217 unsigned long n_skt : 4; /* RW */
1218 unsigned long rsvd_12_63: 52; /* */
1219 } s;
1220};
1221
1222/* ========================================================================= */
1223/* UVH_SI_ALIAS0_OVERLAY_CONFIG */
1224/* ========================================================================= */
1225#define UVH_SI_ALIAS0_OVERLAY_CONFIG 0xc80008UL
1226
1227#define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_SHFT 24
1228#define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL
1229#define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_SHFT 48
1230#define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL
1231#define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_SHFT 63
1232#define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL
1233
1234union uvh_si_alias0_overlay_config_u {
1235 unsigned long v;
1236 struct uvh_si_alias0_overlay_config_s {
1237 unsigned long rsvd_0_23: 24; /* */
1238 unsigned long base : 8; /* RW */
1239 unsigned long rsvd_32_47: 16; /* */
1240 unsigned long m_alias : 5; /* RW */
1241 unsigned long rsvd_53_62: 10; /* */
1242 unsigned long enable : 1; /* RW */
1243 } s;
1244};
1245
1246/* ========================================================================= */
1247/* UVH_SI_ALIAS1_OVERLAY_CONFIG */
1248/* ========================================================================= */
1249#define UVH_SI_ALIAS1_OVERLAY_CONFIG 0xc80010UL
1250
1251#define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_SHFT 24
1252#define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL
1253#define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_SHFT 48
1254#define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL
1255#define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_SHFT 63
1256#define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL
1257
1258union uvh_si_alias1_overlay_config_u {
1259 unsigned long v;
1260 struct uvh_si_alias1_overlay_config_s {
1261 unsigned long rsvd_0_23: 24; /* */
1262 unsigned long base : 8; /* RW */
1263 unsigned long rsvd_32_47: 16; /* */
1264 unsigned long m_alias : 5; /* RW */
1265 unsigned long rsvd_53_62: 10; /* */
1266 unsigned long enable : 1; /* RW */
1267 } s;
1268};
1269
1270/* ========================================================================= */
1271/* UVH_SI_ALIAS2_OVERLAY_CONFIG */
1272/* ========================================================================= */
1273#define UVH_SI_ALIAS2_OVERLAY_CONFIG 0xc80018UL
1274
1275#define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_SHFT 24
1276#define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL
1277#define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_SHFT 48
1278#define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL
1279#define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_SHFT 63
1280#define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL
1281
1282union uvh_si_alias2_overlay_config_u {
1283 unsigned long v;
1284 struct uvh_si_alias2_overlay_config_s {
1285 unsigned long rsvd_0_23: 24; /* */
1286 unsigned long base : 8; /* RW */
1287 unsigned long rsvd_32_47: 16; /* */
1288 unsigned long m_alias : 5; /* RW */
1289 unsigned long rsvd_53_62: 10; /* */
1290 unsigned long enable : 1; /* RW */
1291 } s;
1292};
1293
1294
1295#endif /* ASM_X86__UV__UV_MMRS_H */
diff --git a/include/asm-x86/vdso.h b/include/asm-x86/vdso.h
deleted file mode 100644
index 4ab320913ea3..000000000000
--- a/include/asm-x86/vdso.h
+++ /dev/null
@@ -1,47 +0,0 @@
1#ifndef ASM_X86__VDSO_H
2#define ASM_X86__VDSO_H
3
4#ifdef CONFIG_X86_64
5extern const char VDSO64_PRELINK[];
6
7/*
8 * Given a pointer to the vDSO image, find the pointer to VDSO64_name
9 * as that symbol is defined in the vDSO sources or linker script.
10 */
11#define VDSO64_SYMBOL(base, name) \
12({ \
13 extern const char VDSO64_##name[]; \
14 (void *)(VDSO64_##name - VDSO64_PRELINK + (unsigned long)(base)); \
15})
16#endif
17
18#if defined CONFIG_X86_32 || defined CONFIG_COMPAT
19extern const char VDSO32_PRELINK[];
20
21/*
22 * Given a pointer to the vDSO image, find the pointer to VDSO32_name
23 * as that symbol is defined in the vDSO sources or linker script.
24 */
25#define VDSO32_SYMBOL(base, name) \
26({ \
27 extern const char VDSO32_##name[]; \
28 (void *)(VDSO32_##name - VDSO32_PRELINK + (unsigned long)(base)); \
29})
30#endif
31
32/*
33 * These symbols are defined with the addresses in the vsyscall page.
34 * See vsyscall-sigreturn.S.
35 */
36extern void __user __kernel_sigreturn;
37extern void __user __kernel_rt_sigreturn;
38
39/*
40 * These symbols are defined by vdso32.S to mark the bounds
41 * of the ELF DSO images included therein.
42 */
43extern const char vdso32_int80_start, vdso32_int80_end;
44extern const char vdso32_syscall_start, vdso32_syscall_end;
45extern const char vdso32_sysenter_start, vdso32_sysenter_end;
46
47#endif /* ASM_X86__VDSO_H */
diff --git a/include/asm-x86/vga.h b/include/asm-x86/vga.h
deleted file mode 100644
index b9e493d07d07..000000000000
--- a/include/asm-x86/vga.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * Access to VGA videoram
3 *
4 * (c) 1998 Martin Mares <mj@ucw.cz>
5 */
6
7#ifndef ASM_X86__VGA_H
8#define ASM_X86__VGA_H
9
10/*
11 * On the PC, we can just recalculate addresses and then
12 * access the videoram directly without any black magic.
13 */
14
15#define VGA_MAP_MEM(x, s) (unsigned long)phys_to_virt(x)
16
17#define vga_readb(x) (*(x))
18#define vga_writeb(x, y) (*(y) = (x))
19
20#endif /* ASM_X86__VGA_H */
diff --git a/include/asm-x86/vgtod.h b/include/asm-x86/vgtod.h
deleted file mode 100644
index 38fd13364021..000000000000
--- a/include/asm-x86/vgtod.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef ASM_X86__VGTOD_H
2#define ASM_X86__VGTOD_H
3
4#include <asm/vsyscall.h>
5#include <linux/clocksource.h>
6
7struct vsyscall_gtod_data {
8 seqlock_t lock;
9
10 /* open coded 'struct timespec' */
11 time_t wall_time_sec;
12 u32 wall_time_nsec;
13
14 int sysctl_enabled;
15 struct timezone sys_tz;
16 struct { /* extract of a clocksource struct */
17 cycle_t (*vread)(void);
18 cycle_t cycle_last;
19 cycle_t mask;
20 u32 mult;
21 u32 shift;
22 } clock;
23 struct timespec wall_to_monotonic;
24};
25extern struct vsyscall_gtod_data __vsyscall_gtod_data
26__section_vsyscall_gtod_data;
27extern struct vsyscall_gtod_data vsyscall_gtod_data;
28
29#endif /* ASM_X86__VGTOD_H */
diff --git a/include/asm-x86/vic.h b/include/asm-x86/vic.h
deleted file mode 100644
index 53100f353612..000000000000
--- a/include/asm-x86/vic.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/* Copyright (C) 1999,2001
2 *
3 * Author: J.E.J.Bottomley@HansenPartnership.com
4 *
5 * Standard include definitions for the NCR Voyager Interrupt Controller */
6
7/* The eight CPI vectors. To activate a CPI, you write a bit mask
8 * corresponding to the processor set to be interrupted into the
9 * relevant register. That set of CPUs will then be interrupted with
10 * the CPI */
11static const int VIC_CPI_Registers[] =
12 {0xFC00, 0xFC01, 0xFC08, 0xFC09,
13 0xFC10, 0xFC11, 0xFC18, 0xFC19 };
14
15#define VIC_PROC_WHO_AM_I 0xfc29
16# define QUAD_IDENTIFIER 0xC0
17# define EIGHT_SLOT_IDENTIFIER 0xE0
18#define QIC_EXTENDED_PROCESSOR_SELECT 0xFC72
19#define VIC_CPI_BASE_REGISTER 0xFC41
20#define VIC_PROCESSOR_ID 0xFC21
21# define VIC_CPU_MASQUERADE_ENABLE 0x8
22
23#define VIC_CLAIM_REGISTER_0 0xFC38
24#define VIC_CLAIM_REGISTER_1 0xFC39
25#define VIC_REDIRECT_REGISTER_0 0xFC60
26#define VIC_REDIRECT_REGISTER_1 0xFC61
27#define VIC_PRIORITY_REGISTER 0xFC20
28
29#define VIC_PRIMARY_MC_BASE 0xFC48
30#define VIC_SECONDARY_MC_BASE 0xFC49
31
32#define QIC_PROCESSOR_ID 0xFC71
33# define QIC_CPUID_ENABLE 0x08
34
35#define QIC_VIC_CPI_BASE_REGISTER 0xFC79
36#define QIC_CPI_BASE_REGISTER 0xFC7A
37
38#define QIC_MASK_REGISTER0 0xFC80
39/* NOTE: these are masked high, enabled low */
40# define QIC_PERF_TIMER 0x01
41# define QIC_LPE 0x02
42# define QIC_SYS_INT 0x04
43# define QIC_CMN_INT 0x08
44/* at the moment, just enable CMN_INT, disable SYS_INT */
45# define QIC_DEFAULT_MASK0 (~(QIC_CMN_INT /* | VIC_SYS_INT */))
46#define QIC_MASK_REGISTER1 0xFC81
47# define QIC_BOOT_CPI_MASK 0xFE
48/* Enable CPI's 1-6 inclusive */
49# define QIC_CPI_ENABLE 0x81
50
51#define QIC_INTERRUPT_CLEAR0 0xFC8A
52#define QIC_INTERRUPT_CLEAR1 0xFC8B
53
54/* this is where we place the CPI vectors */
55#define VIC_DEFAULT_CPI_BASE 0xC0
56/* this is where we place the QIC CPI vectors */
57#define QIC_DEFAULT_CPI_BASE 0xD0
58
59#define VIC_BOOT_INTERRUPT_MASK 0xfe
60
61extern void smp_vic_timer_interrupt(void);
diff --git a/include/asm-x86/visws/cobalt.h b/include/asm-x86/visws/cobalt.h
deleted file mode 100644
index 9627a8fe84e9..000000000000
--- a/include/asm-x86/visws/cobalt.h
+++ /dev/null
@@ -1,125 +0,0 @@
1#ifndef ASM_X86__VISWS__COBALT_H
2#define ASM_X86__VISWS__COBALT_H
3
4#include <asm/fixmap.h>
5
6/*
7 * Cobalt SGI Visual Workstation system ASIC
8 */
9
10#define CO_CPU_NUM_PHYS 0x1e00
11#define CO_CPU_TAB_PHYS (CO_CPU_NUM_PHYS + 2)
12
13#define CO_CPU_MAX 4
14
15#define CO_CPU_PHYS 0xc2000000
16#define CO_APIC_PHYS 0xc4000000
17
18/* see set_fixmap() and asm/fixmap.h */
19#define CO_CPU_VADDR (fix_to_virt(FIX_CO_CPU))
20#define CO_APIC_VADDR (fix_to_virt(FIX_CO_APIC))
21
22/* Cobalt CPU registers -- relative to CO_CPU_VADDR, use co_cpu_*() */
23#define CO_CPU_REV 0x08
24#define CO_CPU_CTRL 0x10
25#define CO_CPU_STAT 0x20
26#define CO_CPU_TIMEVAL 0x30
27
28/* CO_CPU_CTRL bits */
29#define CO_CTRL_TIMERUN 0x04 /* 0 == disabled */
30#define CO_CTRL_TIMEMASK 0x08 /* 0 == unmasked */
31
32/* CO_CPU_STATUS bits */
33#define CO_STAT_TIMEINTR 0x02 /* (r) 1 == int pend, (w) 0 == clear */
34
35/* CO_CPU_TIMEVAL value */
36#define CO_TIME_HZ 100000000 /* Cobalt core rate */
37
38/* Cobalt APIC registers -- relative to CO_APIC_VADDR, use co_apic_*() */
39#define CO_APIC_HI(n) (((n) * 0x10) + 4)
40#define CO_APIC_LO(n) ((n) * 0x10)
41#define CO_APIC_ID 0x0ffc
42
43/* CO_APIC_ID bits */
44#define CO_APIC_ENABLE 0x00000100
45
46/* CO_APIC_LO bits */
47#define CO_APIC_MASK 0x00010000 /* 0 = enabled */
48#define CO_APIC_LEVEL 0x00008000 /* 0 = edge */
49
50/*
51 * Where things are physically wired to Cobalt
52 * #defines with no board _<type>_<rev>_ are common to all (thus far)
53 */
54#define CO_APIC_IDE0 4
55#define CO_APIC_IDE1 2 /* Only on 320 */
56
57#define CO_APIC_8259 12 /* serial, floppy, par-l-l */
58
59/* Lithium PCI Bridge A -- "the one with 82557 Ethernet" */
60#define CO_APIC_PCIA_BASE0 0 /* and 1 */ /* slot 0, line 0 */
61#define CO_APIC_PCIA_BASE123 5 /* and 6 */ /* slot 0, line 1 */
62
63#define CO_APIC_PIIX4_USB 7 /* this one is weird */
64
65/* Lithium PCI Bridge B -- "the one with PIIX4" */
66#define CO_APIC_PCIB_BASE0 8 /* and 9-12 *//* slot 0, line 0 */
67#define CO_APIC_PCIB_BASE123 13 /* 14.15 */ /* slot 0, line 1 */
68
69#define CO_APIC_VIDOUT0 16
70#define CO_APIC_VIDOUT1 17
71#define CO_APIC_VIDIN0 18
72#define CO_APIC_VIDIN1 19
73
74#define CO_APIC_LI_AUDIO 22
75
76#define CO_APIC_AS 24
77#define CO_APIC_RE 25
78
79#define CO_APIC_CPU 28 /* Timer and Cache interrupt */
80#define CO_APIC_NMI 29
81#define CO_APIC_LAST CO_APIC_NMI
82
83/*
84 * This is how irqs are assigned on the Visual Workstation.
85 * Legacy devices get irq's 1-15 (system clock is 0 and is CO_APIC_CPU).
86 * All other devices (including PCI) go to Cobalt and are irq's 16 on up.
87 */
88#define CO_IRQ_APIC0 16 /* irq of apic entry 0 */
89#define IS_CO_APIC(irq) ((irq) >= CO_IRQ_APIC0)
90#define CO_IRQ(apic) (CO_IRQ_APIC0 + (apic)) /* apic ent to irq */
91#define CO_APIC(irq) ((irq) - CO_IRQ_APIC0) /* irq to apic ent */
92#define CO_IRQ_IDE0 14 /* knowledge of... */
93#define CO_IRQ_IDE1 15 /* ... ide driver defaults! */
94#define CO_IRQ_8259 CO_IRQ(CO_APIC_8259)
95
96#ifdef CONFIG_X86_VISWS_APIC
97static inline void co_cpu_write(unsigned long reg, unsigned long v)
98{
99 *((volatile unsigned long *)(CO_CPU_VADDR+reg))=v;
100}
101
102static inline unsigned long co_cpu_read(unsigned long reg)
103{
104 return *((volatile unsigned long *)(CO_CPU_VADDR+reg));
105}
106
107static inline void co_apic_write(unsigned long reg, unsigned long v)
108{
109 *((volatile unsigned long *)(CO_APIC_VADDR+reg))=v;
110}
111
112static inline unsigned long co_apic_read(unsigned long reg)
113{
114 return *((volatile unsigned long *)(CO_APIC_VADDR+reg));
115}
116#endif
117
118extern char visws_board_type;
119
120#define VISWS_320 0
121#define VISWS_540 1
122
123extern char visws_board_rev;
124
125#endif /* ASM_X86__VISWS__COBALT_H */
diff --git a/include/asm-x86/visws/lithium.h b/include/asm-x86/visws/lithium.h
deleted file mode 100644
index b36d3b378c63..000000000000
--- a/include/asm-x86/visws/lithium.h
+++ /dev/null
@@ -1,53 +0,0 @@
1#ifndef ASM_X86__VISWS__LITHIUM_H
2#define ASM_X86__VISWS__LITHIUM_H
3
4#include <asm/fixmap.h>
5
6/*
7 * Lithium is the SGI Visual Workstation I/O ASIC
8 */
9
10#define LI_PCI_A_PHYS 0xfc000000 /* Enet is dev 3 */
11#define LI_PCI_B_PHYS 0xfd000000 /* PIIX4 is here */
12
13/* see set_fixmap() and asm/fixmap.h */
14#define LI_PCIA_VADDR (fix_to_virt(FIX_LI_PCIA))
15#define LI_PCIB_VADDR (fix_to_virt(FIX_LI_PCIB))
16
17/* Not a standard PCI? (not in linux/pci.h) */
18#define LI_PCI_BUSNUM 0x44 /* lo8: primary, hi8: sub */
19#define LI_PCI_INTEN 0x46
20
21/* LI_PCI_INTENT bits */
22#define LI_INTA_0 0x0001
23#define LI_INTA_1 0x0002
24#define LI_INTA_2 0x0004
25#define LI_INTA_3 0x0008
26#define LI_INTA_4 0x0010
27#define LI_INTB 0x0020
28#define LI_INTC 0x0040
29#define LI_INTD 0x0080
30
31/* More special purpose macros... */
32static inline void li_pcia_write16(unsigned long reg, unsigned short v)
33{
34 *((volatile unsigned short *)(LI_PCIA_VADDR+reg))=v;
35}
36
37static inline unsigned short li_pcia_read16(unsigned long reg)
38{
39 return *((volatile unsigned short *)(LI_PCIA_VADDR+reg));
40}
41
42static inline void li_pcib_write16(unsigned long reg, unsigned short v)
43{
44 *((volatile unsigned short *)(LI_PCIB_VADDR+reg))=v;
45}
46
47static inline unsigned short li_pcib_read16(unsigned long reg)
48{
49 return *((volatile unsigned short *)(LI_PCIB_VADDR+reg));
50}
51
52#endif /* ASM_X86__VISWS__LITHIUM_H */
53
diff --git a/include/asm-x86/visws/piix4.h b/include/asm-x86/visws/piix4.h
deleted file mode 100644
index 61c938045ec9..000000000000
--- a/include/asm-x86/visws/piix4.h
+++ /dev/null
@@ -1,107 +0,0 @@
1#ifndef ASM_X86__VISWS__PIIX4_H
2#define ASM_X86__VISWS__PIIX4_H
3
4/*
5 * PIIX4 as used on SGI Visual Workstations
6 */
7
8#define PIIX_PM_START 0x0F80
9
10#define SIO_GPIO_START 0x0FC0
11
12#define SIO_PM_START 0x0FC8
13
14#define PMBASE PIIX_PM_START
15#define GPIREG0 (PMBASE+0x30)
16#define GPIREG(x) (GPIREG0+((x)/8))
17#define GPIBIT(x) (1 << ((x)%8))
18
19#define PIIX_GPI_BD_ID1 18
20#define PIIX_GPI_BD_ID2 19
21#define PIIX_GPI_BD_ID3 20
22#define PIIX_GPI_BD_ID4 21
23#define PIIX_GPI_BD_REG GPIREG(PIIX_GPI_BD_ID1)
24#define PIIX_GPI_BD_MASK (GPIBIT(PIIX_GPI_BD_ID1) | \
25 GPIBIT(PIIX_GPI_BD_ID2) | \
26 GPIBIT(PIIX_GPI_BD_ID3) | \
27 GPIBIT(PIIX_GPI_BD_ID4) )
28
29#define PIIX_GPI_BD_SHIFT (PIIX_GPI_BD_ID1 % 8)
30
31#define SIO_INDEX 0x2e
32#define SIO_DATA 0x2f
33
34#define SIO_DEV_SEL 0x7
35#define SIO_DEV_ENB 0x30
36#define SIO_DEV_MSB 0x60
37#define SIO_DEV_LSB 0x61
38
39#define SIO_GP_DEV 0x7
40
41#define SIO_GP_BASE SIO_GPIO_START
42#define SIO_GP_MSB (SIO_GP_BASE>>8)
43#define SIO_GP_LSB (SIO_GP_BASE&0xff)
44
45#define SIO_GP_DATA1 (SIO_GP_BASE+0)
46
47#define SIO_PM_DEV 0x8
48
49#define SIO_PM_BASE SIO_PM_START
50#define SIO_PM_MSB (SIO_PM_BASE>>8)
51#define SIO_PM_LSB (SIO_PM_BASE&0xff)
52#define SIO_PM_INDEX (SIO_PM_BASE+0)
53#define SIO_PM_DATA (SIO_PM_BASE+1)
54
55#define SIO_PM_FER2 0x1
56
57#define SIO_PM_GP_EN 0x80
58
59
60
61/*
62 * This is the dev/reg where generating a config cycle will
63 * result in a PCI special cycle.
64 */
65#define SPECIAL_DEV 0xff
66#define SPECIAL_REG 0x00
67
68/*
69 * PIIX4 needs to see a special cycle with the following data
70 * to be convinced the processor has gone into the stop grant
71 * state. PIIX4 insists on seeing this before it will power
72 * down a system.
73 */
74#define PIIX_SPECIAL_STOP 0x00120002
75
76#define PIIX4_RESET_PORT 0xcf9
77#define PIIX4_RESET_VAL 0x6
78
79#define PMSTS_PORT 0xf80 // 2 bytes PM Status
80#define PMEN_PORT 0xf82 // 2 bytes PM Enable
81#define PMCNTRL_PORT 0xf84 // 2 bytes PM Control
82
83#define PM_SUSPEND_ENABLE 0x2000 // start sequence to suspend state
84
85/*
86 * PMSTS and PMEN I/O bit definitions.
87 * (Bits are the same in both registers)
88 */
89#define PM_STS_RSM (1<<15) // Resume Status
90#define PM_STS_PWRBTNOR (1<<11) // Power Button Override
91#define PM_STS_RTC (1<<10) // RTC status
92#define PM_STS_PWRBTN (1<<8) // Power Button Pressed?
93#define PM_STS_GBL (1<<5) // Global Status
94#define PM_STS_BM (1<<4) // Bus Master Status
95#define PM_STS_TMROF (1<<0) // Timer Overflow Status.
96
97/*
98 * Stop clock GPI register
99 */
100#define PIIX_GPIREG0 (0xf80 + 0x30)
101
102/*
103 * Stop clock GPI bit in GPIREG0
104 */
105#define PIIX_GPI_STPCLK 0x4 // STPCLK signal routed back in
106
107#endif /* ASM_X86__VISWS__PIIX4_H */
diff --git a/include/asm-x86/visws/sgivw.h b/include/asm-x86/visws/sgivw.h
deleted file mode 100644
index 5fbf63e1003c..000000000000
--- a/include/asm-x86/visws/sgivw.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * Frame buffer position and size:
3 */
4extern unsigned long sgivwfb_mem_phys;
5extern unsigned long sgivwfb_mem_size;
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h
deleted file mode 100644
index 998bd18eb737..000000000000
--- a/include/asm-x86/vm86.h
+++ /dev/null
@@ -1,208 +0,0 @@
1#ifndef ASM_X86__VM86_H
2#define ASM_X86__VM86_H
3
4/*
5 * I'm guessing at the VIF/VIP flag usage, but hope that this is how
6 * the Pentium uses them. Linux will return from vm86 mode when both
7 * VIF and VIP is set.
8 *
9 * On a Pentium, we could probably optimize the virtual flags directly
10 * in the eflags register instead of doing it "by hand" in vflags...
11 *
12 * Linus
13 */
14
15#include <asm/processor-flags.h>
16
17#define BIOSSEG 0x0f000
18
19#define CPU_086 0
20#define CPU_186 1
21#define CPU_286 2
22#define CPU_386 3
23#define CPU_486 4
24#define CPU_586 5
25
26/*
27 * Return values for the 'vm86()' system call
28 */
29#define VM86_TYPE(retval) ((retval) & 0xff)
30#define VM86_ARG(retval) ((retval) >> 8)
31
32#define VM86_SIGNAL 0 /* return due to signal */
33#define VM86_UNKNOWN 1 /* unhandled GP fault
34 - IO-instruction or similar */
35#define VM86_INTx 2 /* int3/int x instruction (ARG = x) */
36#define VM86_STI 3 /* sti/popf/iret instruction enabled
37 virtual interrupts */
38
39/*
40 * Additional return values when invoking new vm86()
41 */
42#define VM86_PICRETURN 4 /* return due to pending PIC request */
43#define VM86_TRAP 6 /* return due to DOS-debugger request */
44
45/*
46 * function codes when invoking new vm86()
47 */
48#define VM86_PLUS_INSTALL_CHECK 0
49#define VM86_ENTER 1
50#define VM86_ENTER_NO_BYPASS 2
51#define VM86_REQUEST_IRQ 3
52#define VM86_FREE_IRQ 4
53#define VM86_GET_IRQ_BITS 5
54#define VM86_GET_AND_RESET_IRQ 6
55
56/*
57 * This is the stack-layout seen by the user space program when we have
58 * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout
59 * is 'kernel_vm86_regs' (see below).
60 */
61
62struct vm86_regs {
63/*
64 * normal regs, with special meaning for the segment descriptors..
65 */
66 long ebx;
67 long ecx;
68 long edx;
69 long esi;
70 long edi;
71 long ebp;
72 long eax;
73 long __null_ds;
74 long __null_es;
75 long __null_fs;
76 long __null_gs;
77 long orig_eax;
78 long eip;
79 unsigned short cs, __csh;
80 long eflags;
81 long esp;
82 unsigned short ss, __ssh;
83/*
84 * these are specific to v86 mode:
85 */
86 unsigned short es, __esh;
87 unsigned short ds, __dsh;
88 unsigned short fs, __fsh;
89 unsigned short gs, __gsh;
90};
91
92struct revectored_struct {
93 unsigned long __map[8]; /* 256 bits */
94};
95
96struct vm86_struct {
97 struct vm86_regs regs;
98 unsigned long flags;
99 unsigned long screen_bitmap;
100 unsigned long cpu_type;
101 struct revectored_struct int_revectored;
102 struct revectored_struct int21_revectored;
103};
104
105/*
106 * flags masks
107 */
108#define VM86_SCREEN_BITMAP 0x0001
109
110struct vm86plus_info_struct {
111 unsigned long force_return_for_pic:1;
112 unsigned long vm86dbg_active:1; /* for debugger */
113 unsigned long vm86dbg_TFpendig:1; /* for debugger */
114 unsigned long unused:28;
115 unsigned long is_vm86pus:1; /* for vm86 internal use */
116 unsigned char vm86dbg_intxxtab[32]; /* for debugger */
117};
118struct vm86plus_struct {
119 struct vm86_regs regs;
120 unsigned long flags;
121 unsigned long screen_bitmap;
122 unsigned long cpu_type;
123 struct revectored_struct int_revectored;
124 struct revectored_struct int21_revectored;
125 struct vm86plus_info_struct vm86plus;
126};
127
128#ifdef __KERNEL__
129
130#include <asm/ptrace.h>
131
132/*
133 * This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86
134 * mode - the main change is that the old segment descriptors aren't
135 * useful any more and are forced to be zero by the kernel (and the
136 * hardware when a trap occurs), and the real segment descriptors are
137 * at the end of the structure. Look at ptrace.h to see the "normal"
138 * setup. For user space layout see 'struct vm86_regs' above.
139 */
140
141struct kernel_vm86_regs {
142/*
143 * normal regs, with special meaning for the segment descriptors..
144 */
145 struct pt_regs pt;
146/*
147 * these are specific to v86 mode:
148 */
149 unsigned short es, __esh;
150 unsigned short ds, __dsh;
151 unsigned short fs, __fsh;
152 unsigned short gs, __gsh;
153};
154
155struct kernel_vm86_struct {
156 struct kernel_vm86_regs regs;
157/*
158 * the below part remains on the kernel stack while we are in VM86 mode.
159 * 'tss.esp0' then contains the address of VM86_TSS_ESP0 below, and when we
160 * get forced back from VM86, the CPU and "SAVE_ALL" will restore the above
161 * 'struct kernel_vm86_regs' with the then actual values.
162 * Therefore, pt_regs in fact points to a complete 'kernel_vm86_struct'
163 * in kernelspace, hence we need not reget the data from userspace.
164 */
165#define VM86_TSS_ESP0 flags
166 unsigned long flags;
167 unsigned long screen_bitmap;
168 unsigned long cpu_type;
169 struct revectored_struct int_revectored;
170 struct revectored_struct int21_revectored;
171 struct vm86plus_info_struct vm86plus;
172 struct pt_regs *regs32; /* here we save the pointer to the old regs */
173/*
174 * The below is not part of the structure, but the stack layout continues
175 * this way. In front of 'return-eip' may be some data, depending on
176 * compilation, so we don't rely on this and save the pointer to 'oldregs'
177 * in 'regs32' above.
178 * However, with GCC-2.7.2 and the current CFLAGS you see exactly this:
179
180 long return-eip; from call to vm86()
181 struct pt_regs oldregs; user space registers as saved by syscall
182 */
183};
184
185#ifdef CONFIG_VM86
186
187void handle_vm86_fault(struct kernel_vm86_regs *, long);
188int handle_vm86_trap(struct kernel_vm86_regs *, long, int);
189struct pt_regs *save_v86_state(struct kernel_vm86_regs *);
190
191struct task_struct;
192void release_vm86_irqs(struct task_struct *);
193
194#else
195
196#define handle_vm86_fault(a, b)
197#define release_vm86_irqs(a)
198
199static inline int handle_vm86_trap(struct kernel_vm86_regs *a, long b, int c)
200{
201 return 0;
202}
203
204#endif /* CONFIG_VM86 */
205
206#endif /* __KERNEL__ */
207
208#endif /* ASM_X86__VM86_H */
diff --git a/include/asm-x86/vmi.h b/include/asm-x86/vmi.h
deleted file mode 100644
index b7c0dea119fe..000000000000
--- a/include/asm-x86/vmi.h
+++ /dev/null
@@ -1,263 +0,0 @@
1/*
2 * VMI interface definition
3 *
4 * Copyright (C) 2005, VMware, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 *
21 * Maintained by: Zachary Amsden zach@vmware.com
22 *
23 */
24#include <linux/types.h>
25
26/*
27 *---------------------------------------------------------------------
28 *
29 * VMI Option ROM API
30 *
31 *---------------------------------------------------------------------
32 */
33#define VMI_SIGNATURE 0x696d5663 /* "cVmi" */
34
35#define PCI_VENDOR_ID_VMWARE 0x15AD
36#define PCI_DEVICE_ID_VMWARE_VMI 0x0801
37
38/*
39 * We use two version numbers for compatibility, with the major
40 * number signifying interface breakages, and the minor number
41 * interface extensions.
42 */
43#define VMI_API_REV_MAJOR 3
44#define VMI_API_REV_MINOR 0
45
46#define VMI_CALL_CPUID 0
47#define VMI_CALL_WRMSR 1
48#define VMI_CALL_RDMSR 2
49#define VMI_CALL_SetGDT 3
50#define VMI_CALL_SetLDT 4
51#define VMI_CALL_SetIDT 5
52#define VMI_CALL_SetTR 6
53#define VMI_CALL_GetGDT 7
54#define VMI_CALL_GetLDT 8
55#define VMI_CALL_GetIDT 9
56#define VMI_CALL_GetTR 10
57#define VMI_CALL_WriteGDTEntry 11
58#define VMI_CALL_WriteLDTEntry 12
59#define VMI_CALL_WriteIDTEntry 13
60#define VMI_CALL_UpdateKernelStack 14
61#define VMI_CALL_SetCR0 15
62#define VMI_CALL_SetCR2 16
63#define VMI_CALL_SetCR3 17
64#define VMI_CALL_SetCR4 18
65#define VMI_CALL_GetCR0 19
66#define VMI_CALL_GetCR2 20
67#define VMI_CALL_GetCR3 21
68#define VMI_CALL_GetCR4 22
69#define VMI_CALL_WBINVD 23
70#define VMI_CALL_SetDR 24
71#define VMI_CALL_GetDR 25
72#define VMI_CALL_RDPMC 26
73#define VMI_CALL_RDTSC 27
74#define VMI_CALL_CLTS 28
75#define VMI_CALL_EnableInterrupts 29
76#define VMI_CALL_DisableInterrupts 30
77#define VMI_CALL_GetInterruptMask 31
78#define VMI_CALL_SetInterruptMask 32
79#define VMI_CALL_IRET 33
80#define VMI_CALL_SYSEXIT 34
81#define VMI_CALL_Halt 35
82#define VMI_CALL_Reboot 36
83#define VMI_CALL_Shutdown 37
84#define VMI_CALL_SetPxE 38
85#define VMI_CALL_SetPxELong 39
86#define VMI_CALL_UpdatePxE 40
87#define VMI_CALL_UpdatePxELong 41
88#define VMI_CALL_MachineToPhysical 42
89#define VMI_CALL_PhysicalToMachine 43
90#define VMI_CALL_AllocatePage 44
91#define VMI_CALL_ReleasePage 45
92#define VMI_CALL_InvalPage 46
93#define VMI_CALL_FlushTLB 47
94#define VMI_CALL_SetLinearMapping 48
95
96#define VMI_CALL_SetIOPLMask 61
97#define VMI_CALL_SetInitialAPState 62
98#define VMI_CALL_APICWrite 63
99#define VMI_CALL_APICRead 64
100#define VMI_CALL_IODelay 65
101#define VMI_CALL_SetLazyMode 73
102
103/*
104 *---------------------------------------------------------------------
105 *
106 * MMU operation flags
107 *
108 *---------------------------------------------------------------------
109 */
110
111/* Flags used by VMI_{Allocate|Release}Page call */
112#define VMI_PAGE_PAE 0x10 /* Allocate PAE shadow */
113#define VMI_PAGE_CLONE 0x20 /* Clone from another shadow */
114#define VMI_PAGE_ZEROED 0x40 /* Page is pre-zeroed */
115
116
117/* Flags shared by Allocate|Release Page and PTE updates */
118#define VMI_PAGE_PT 0x01
119#define VMI_PAGE_PD 0x02
120#define VMI_PAGE_PDP 0x04
121#define VMI_PAGE_PML4 0x08
122
123#define VMI_PAGE_NORMAL 0x00 /* for debugging */
124
125/* Flags used by PTE updates */
126#define VMI_PAGE_CURRENT_AS 0x10 /* implies VMI_PAGE_VA_MASK is valid */
127#define VMI_PAGE_DEFER 0x20 /* may queue update until TLB inval */
128#define VMI_PAGE_VA_MASK 0xfffff000
129
130#ifdef CONFIG_X86_PAE
131#define VMI_PAGE_L1 (VMI_PAGE_PT | VMI_PAGE_PAE | VMI_PAGE_ZEROED)
132#define VMI_PAGE_L2 (VMI_PAGE_PD | VMI_PAGE_PAE | VMI_PAGE_ZEROED)
133#else
134#define VMI_PAGE_L1 (VMI_PAGE_PT | VMI_PAGE_ZEROED)
135#define VMI_PAGE_L2 (VMI_PAGE_PD | VMI_PAGE_ZEROED)
136#endif
137
138/* Flags used by VMI_FlushTLB call */
139#define VMI_FLUSH_TLB 0x01
140#define VMI_FLUSH_GLOBAL 0x02
141
142/*
143 *---------------------------------------------------------------------
144 *
145 * VMI relocation definitions for ROM call get_reloc
146 *
147 *---------------------------------------------------------------------
148 */
149
150/* VMI Relocation types */
151#define VMI_RELOCATION_NONE 0
152#define VMI_RELOCATION_CALL_REL 1
153#define VMI_RELOCATION_JUMP_REL 2
154#define VMI_RELOCATION_NOP 3
155
156#ifndef __ASSEMBLY__
157struct vmi_relocation_info {
158 unsigned char *eip;
159 unsigned char type;
160 unsigned char reserved[3];
161};
162#endif
163
164
165/*
166 *---------------------------------------------------------------------
167 *
168 * Generic ROM structures and definitions
169 *
170 *---------------------------------------------------------------------
171 */
172
173#ifndef __ASSEMBLY__
174
175struct vrom_header {
176 u16 rom_signature; /* option ROM signature */
177 u8 rom_length; /* ROM length in 512 byte chunks */
178 u8 rom_entry[4]; /* 16-bit code entry point */
179 u8 rom_pad0; /* 4-byte align pad */
180 u32 vrom_signature; /* VROM identification signature */
181 u8 api_version_min;/* Minor version of API */
182 u8 api_version_maj;/* Major version of API */
183 u8 jump_slots; /* Number of jump slots */
184 u8 reserved1; /* Reserved for expansion */
185 u32 virtual_top; /* Hypervisor virtual address start */
186 u16 reserved2; /* Reserved for expansion */
187 u16 license_offs; /* Offset to License string */
188 u16 pci_header_offs;/* Offset to PCI OPROM header */
189 u16 pnp_header_offs;/* Offset to PnP OPROM header */
190 u32 rom_pad3; /* PnP reserverd / VMI reserved */
191 u8 reserved[96]; /* Reserved for headers */
192 char vmi_init[8]; /* VMI_Init jump point */
193 char get_reloc[8]; /* VMI_GetRelocationInfo jump point */
194} __attribute__((packed));
195
196struct pnp_header {
197 char sig[4];
198 char rev;
199 char size;
200 short next;
201 short res;
202 long devID;
203 unsigned short manufacturer_offset;
204 unsigned short product_offset;
205} __attribute__((packed));
206
207struct pci_header {
208 char sig[4];
209 short vendorID;
210 short deviceID;
211 short vpdData;
212 short size;
213 char rev;
214 char class;
215 char subclass;
216 char interface;
217 short chunks;
218 char rom_version_min;
219 char rom_version_maj;
220 char codetype;
221 char lastRom;
222 short reserved;
223} __attribute__((packed));
224
225/* Function prototypes for bootstrapping */
226extern void vmi_init(void);
227extern void vmi_bringup(void);
228extern void vmi_apply_boot_page_allocations(void);
229
230/* State needed to start an application processor in an SMP system. */
231struct vmi_ap_state {
232 u32 cr0;
233 u32 cr2;
234 u32 cr3;
235 u32 cr4;
236
237 u64 efer;
238
239 u32 eip;
240 u32 eflags;
241 u32 eax;
242 u32 ebx;
243 u32 ecx;
244 u32 edx;
245 u32 esp;
246 u32 ebp;
247 u32 esi;
248 u32 edi;
249 u16 cs;
250 u16 ss;
251 u16 ds;
252 u16 es;
253 u16 fs;
254 u16 gs;
255 u16 ldtr;
256
257 u16 gdtr_limit;
258 u32 gdtr_base;
259 u32 idtr_base;
260 u16 idtr_limit;
261};
262
263#endif
diff --git a/include/asm-x86/vmi_time.h b/include/asm-x86/vmi_time.h
deleted file mode 100644
index b2d39e6a08b7..000000000000
--- a/include/asm-x86/vmi_time.h
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * VMI Time wrappers
3 *
4 * Copyright (C) 2006, VMware, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 *
21 * Send feedback to dhecht@vmware.com
22 *
23 */
24
25#ifndef ASM_X86__VMI_TIME_H
26#define ASM_X86__VMI_TIME_H
27
28/*
29 * Raw VMI call indices for timer functions
30 */
31#define VMI_CALL_GetCycleFrequency 66
32#define VMI_CALL_GetCycleCounter 67
33#define VMI_CALL_SetAlarm 68
34#define VMI_CALL_CancelAlarm 69
35#define VMI_CALL_GetWallclockTime 70
36#define VMI_CALL_WallclockUpdated 71
37
38/* Cached VMI timer operations */
39extern struct vmi_timer_ops {
40 u64 (*get_cycle_frequency)(void);
41 u64 (*get_cycle_counter)(int);
42 u64 (*get_wallclock)(void);
43 int (*wallclock_updated)(void);
44 void (*set_alarm)(u32 flags, u64 expiry, u64 period);
45 void (*cancel_alarm)(u32 flags);
46} vmi_timer_ops;
47
48/* Prototypes */
49extern void __init vmi_time_init(void);
50extern unsigned long vmi_get_wallclock(void);
51extern int vmi_set_wallclock(unsigned long now);
52extern unsigned long long vmi_sched_clock(void);
53extern unsigned long vmi_tsc_khz(void);
54
55#ifdef CONFIG_X86_LOCAL_APIC
56extern void __devinit vmi_time_bsp_init(void);
57extern void __devinit vmi_time_ap_init(void);
58#endif
59
60/*
61 * When run under a hypervisor, a vcpu is always in one of three states:
62 * running, halted, or ready. The vcpu is in the 'running' state if it
63 * is executing. When the vcpu executes the halt interface, the vcpu
64 * enters the 'halted' state and remains halted until there is some work
65 * pending for the vcpu (e.g. an alarm expires, host I/O completes on
66 * behalf of virtual I/O). At this point, the vcpu enters the 'ready'
67 * state (waiting for the hypervisor to reschedule it). Finally, at any
68 * time when the vcpu is not in the 'running' state nor the 'halted'
69 * state, it is in the 'ready' state.
70 *
71 * Real time is advances while the vcpu is 'running', 'ready', or
72 * 'halted'. Stolen time is the time in which the vcpu is in the
73 * 'ready' state. Available time is the remaining time -- the vcpu is
74 * either 'running' or 'halted'.
75 *
76 * All three views of time are accessible through the VMI cycle
77 * counters.
78 */
79
80/* The cycle counters. */
81#define VMI_CYCLES_REAL 0
82#define VMI_CYCLES_AVAILABLE 1
83#define VMI_CYCLES_STOLEN 2
84
85/* The alarm interface 'flags' bits */
86#define VMI_ALARM_COUNTERS 2
87
88#define VMI_ALARM_COUNTER_MASK 0x000000ff
89
90#define VMI_ALARM_WIRED_IRQ0 0x00000000
91#define VMI_ALARM_WIRED_LVTT 0x00010000
92
93#define VMI_ALARM_IS_ONESHOT 0x00000000
94#define VMI_ALARM_IS_PERIODIC 0x00000100
95
96#define CONFIG_VMI_ALARM_HZ 100
97
98#endif /* ASM_X86__VMI_TIME_H */
diff --git a/include/asm-x86/voyager.h b/include/asm-x86/voyager.h
deleted file mode 100644
index 9c811d2e6f91..000000000000
--- a/include/asm-x86/voyager.h
+++ /dev/null
@@ -1,528 +0,0 @@
1/* Copyright (C) 1999,2001
2 *
3 * Author: J.E.J.Bottomley@HansenPartnership.com
4 *
5 * Standard include definitions for the NCR Voyager system */
6
7#undef VOYAGER_DEBUG
8#undef VOYAGER_CAT_DEBUG
9
10#ifdef VOYAGER_DEBUG
11#define VDEBUG(x) printk x
12#else
13#define VDEBUG(x)
14#endif
15
16/* There are three levels of voyager machine: 3,4 and 5. The rule is
17 * if it's less than 3435 it's a Level 3 except for a 3360 which is
18 * a level 4. A 3435 or above is a Level 5 */
19#define VOYAGER_LEVEL5_AND_ABOVE 0x3435
20#define VOYAGER_LEVEL4 0x3360
21
22/* The L4 DINO ASIC */
23#define VOYAGER_DINO 0x43
24
25/* voyager ports in standard I/O space */
26#define VOYAGER_MC_SETUP 0x96
27
28
29#define VOYAGER_CAT_CONFIG_PORT 0x97
30# define VOYAGER_CAT_DESELECT 0xff
31#define VOYAGER_SSPB_RELOCATION_PORT 0x98
32
33/* Valid CAT controller commands */
34/* start instruction register cycle */
35#define VOYAGER_CAT_IRCYC 0x01
36/* start data register cycle */
37#define VOYAGER_CAT_DRCYC 0x02
38/* move to execute state */
39#define VOYAGER_CAT_RUN 0x0F
40/* end operation */
41#define VOYAGER_CAT_END 0x80
42/* hold in idle state */
43#define VOYAGER_CAT_HOLD 0x90
44/* single step an "intest" vector */
45#define VOYAGER_CAT_STEP 0xE0
46/* return cat controller to CLEMSON mode */
47#define VOYAGER_CAT_CLEMSON 0xFF
48
49/* the default cat command header */
50#define VOYAGER_CAT_HEADER 0x7F
51
52/* the range of possible CAT module ids in the system */
53#define VOYAGER_MIN_MODULE 0x10
54#define VOYAGER_MAX_MODULE 0x1f
55
56/* The voyager registers per asic */
57#define VOYAGER_ASIC_ID_REG 0x00
58#define VOYAGER_ASIC_TYPE_REG 0x01
59/* the sub address registers can be made auto incrementing on reads */
60#define VOYAGER_AUTO_INC_REG 0x02
61# define VOYAGER_AUTO_INC 0x04
62# define VOYAGER_NO_AUTO_INC 0xfb
63#define VOYAGER_SUBADDRDATA 0x03
64#define VOYAGER_SCANPATH 0x05
65# define VOYAGER_CONNECT_ASIC 0x01
66# define VOYAGER_DISCONNECT_ASIC 0xfe
67#define VOYAGER_SUBADDRLO 0x06
68#define VOYAGER_SUBADDRHI 0x07
69#define VOYAGER_SUBMODSELECT 0x08
70#define VOYAGER_SUBMODPRESENT 0x09
71
72#define VOYAGER_SUBADDR_LO 0xff
73#define VOYAGER_SUBADDR_HI 0xffff
74
75/* the maximum size of a scan path -- used to form instructions */
76#define VOYAGER_MAX_SCAN_PATH 0x100
77/* the biggest possible register size (in bytes) */
78#define VOYAGER_MAX_REG_SIZE 4
79
80/* Total number of possible modules (including submodules) */
81#define VOYAGER_MAX_MODULES 16
82/* Largest number of asics per module */
83#define VOYAGER_MAX_ASICS_PER_MODULE 7
84
85/* the CAT asic of each module is always the first one */
86#define VOYAGER_CAT_ID 0
87#define VOYAGER_PSI 0x1a
88
89/* voyager instruction operations and registers */
90#define VOYAGER_READ_CONFIG 0x1
91#define VOYAGER_WRITE_CONFIG 0x2
92#define VOYAGER_BYPASS 0xff
93
94typedef struct voyager_asic {
95 __u8 asic_addr; /* ASIC address; Level 4 */
96 __u8 asic_type; /* ASIC type */
97 __u8 asic_id; /* ASIC id */
98 __u8 jtag_id[4]; /* JTAG id */
99 __u8 asic_location; /* Location within scan path; start w/ 0 */
100 __u8 bit_location; /* Location within bit stream; start w/ 0 */
101 __u8 ireg_length; /* Instruction register length */
102 __u16 subaddr; /* Amount of sub address space */
103 struct voyager_asic *next; /* Next asic in linked list */
104} voyager_asic_t;
105
106typedef struct voyager_module {
107 __u8 module_addr; /* Module address */
108 __u8 scan_path_connected; /* Scan path connected */
109 __u16 ee_size; /* Size of the EEPROM */
110 __u16 num_asics; /* Number of Asics */
111 __u16 inst_bits; /* Instruction bits in the scan path */
112 __u16 largest_reg; /* Largest register in the scan path */
113 __u16 smallest_reg; /* Smallest register in the scan path */
114 voyager_asic_t *asic; /* First ASIC in scan path (CAT_I) */
115 struct voyager_module *submodule; /* Submodule pointer */
116 struct voyager_module *next; /* Next module in linked list */
117} voyager_module_t;
118
119typedef struct voyager_eeprom_hdr {
120 __u8 module_id[4];
121 __u8 version_id;
122 __u8 config_id;
123 __u16 boundry_id; /* boundary scan id */
124 __u16 ee_size; /* size of EEPROM */
125 __u8 assembly[11]; /* assembly # */
126 __u8 assembly_rev; /* assembly rev */
127 __u8 tracer[4]; /* tracer number */
128 __u16 assembly_cksum; /* asm checksum */
129 __u16 power_consump; /* pwr requirements */
130 __u16 num_asics; /* number of asics */
131 __u16 bist_time; /* min. bist time */
132 __u16 err_log_offset; /* error log offset */
133 __u16 scan_path_offset;/* scan path offset */
134 __u16 cct_offset;
135 __u16 log_length; /* length of err log */
136 __u16 xsum_end; /* offset to end of
137 checksum */
138 __u8 reserved[4];
139 __u8 sflag; /* starting sentinal */
140 __u8 part_number[13]; /* prom part number */
141 __u8 version[10]; /* version number */
142 __u8 signature[8];
143 __u16 eeprom_chksum;
144 __u32 data_stamp_offset;
145 __u8 eflag ; /* ending sentinal */
146} __attribute__((packed)) voyager_eprom_hdr_t;
147
148
149
150#define VOYAGER_EPROM_SIZE_OFFSET \
151 ((__u16)(&(((voyager_eprom_hdr_t *)0)->ee_size)))
152#define VOYAGER_XSUM_END_OFFSET 0x2a
153
154/* the following three definitions are for internal table layouts
155 * in the module EPROMs. We really only care about the IDs and
156 * offsets */
157typedef struct voyager_sp_table {
158 __u8 asic_id;
159 __u8 bypass_flag;
160 __u16 asic_data_offset;
161 __u16 config_data_offset;
162} __attribute__((packed)) voyager_sp_table_t;
163
164typedef struct voyager_jtag_table {
165 __u8 icode[4];
166 __u8 runbist[4];
167 __u8 intest[4];
168 __u8 samp_preld[4];
169 __u8 ireg_len;
170} __attribute__((packed)) voyager_jtt_t;
171
172typedef struct voyager_asic_data_table {
173 __u8 jtag_id[4];
174 __u16 length_bsr;
175 __u16 length_bist_reg;
176 __u32 bist_clk;
177 __u16 subaddr_bits;
178 __u16 seed_bits;
179 __u16 sig_bits;
180 __u16 jtag_offset;
181} __attribute__((packed)) voyager_at_t;
182
183/* Voyager Interrupt Controller (VIC) registers */
184
185/* Base to add to Cross Processor Interrupts (CPIs) when triggering
186 * the CPU IRQ line */
187/* register defines for the WCBICs (one per processor) */
188#define VOYAGER_WCBIC0 0x41 /* bus A node P1 processor 0 */
189#define VOYAGER_WCBIC1 0x49 /* bus A node P1 processor 1 */
190#define VOYAGER_WCBIC2 0x51 /* bus A node P2 processor 0 */
191#define VOYAGER_WCBIC3 0x59 /* bus A node P2 processor 1 */
192#define VOYAGER_WCBIC4 0x61 /* bus B node P1 processor 0 */
193#define VOYAGER_WCBIC5 0x69 /* bus B node P1 processor 1 */
194#define VOYAGER_WCBIC6 0x71 /* bus B node P2 processor 0 */
195#define VOYAGER_WCBIC7 0x79 /* bus B node P2 processor 1 */
196
197
198/* top of memory registers */
199#define VOYAGER_WCBIC_TOM_L 0x4
200#define VOYAGER_WCBIC_TOM_H 0x5
201
202/* register defines for Voyager Memory Contol (VMC)
203 * these are present on L4 machines only */
204#define VOYAGER_VMC1 0x81
205#define VOYAGER_VMC2 0x91
206#define VOYAGER_VMC3 0xa1
207#define VOYAGER_VMC4 0xb1
208
209/* VMC Ports */
210#define VOYAGER_VMC_MEMORY_SETUP 0x9
211# define VMC_Interleaving 0x01
212# define VMC_4Way 0x02
213# define VMC_EvenCacheLines 0x04
214# define VMC_HighLine 0x08
215# define VMC_Start0_Enable 0x20
216# define VMC_Start1_Enable 0x40
217# define VMC_Vremap 0x80
218#define VOYAGER_VMC_BANK_DENSITY 0xa
219# define VMC_BANK_EMPTY 0
220# define VMC_BANK_4MB 1
221# define VMC_BANK_16MB 2
222# define VMC_BANK_64MB 3
223# define VMC_BANK0_MASK 0x03
224# define VMC_BANK1_MASK 0x0C
225# define VMC_BANK2_MASK 0x30
226# define VMC_BANK3_MASK 0xC0
227
228/* Magellan Memory Controller (MMC) defines - present on L5 */
229#define VOYAGER_MMC_ASIC_ID 1
230/* the two memory modules corresponding to memory cards in the system */
231#define VOYAGER_MMC_MEMORY0_MODULE 0x14
232#define VOYAGER_MMC_MEMORY1_MODULE 0x15
233/* the Magellan Memory Address (MMA) defines */
234#define VOYAGER_MMA_ASIC_ID 2
235
236/* Submodule number for the Quad Baseboard */
237#define VOYAGER_QUAD_BASEBOARD 1
238
239/* ASIC defines for the Quad Baseboard */
240#define VOYAGER_QUAD_QDATA0 1
241#define VOYAGER_QUAD_QDATA1 2
242#define VOYAGER_QUAD_QABC 3
243
244/* Useful areas in extended CMOS */
245#define VOYAGER_PROCESSOR_PRESENT_MASK 0x88a
246#define VOYAGER_MEMORY_CLICKMAP 0xa23
247#define VOYAGER_DUMP_LOCATION 0xb1a
248
249/* SUS In Control bit - used to tell SUS that we don't need to be
250 * babysat anymore */
251#define VOYAGER_SUS_IN_CONTROL_PORT 0x3ff
252# define VOYAGER_IN_CONTROL_FLAG 0x80
253
254/* Voyager PSI defines */
255#define VOYAGER_PSI_STATUS_REG 0x08
256# define PSI_DC_FAIL 0x01
257# define PSI_MON 0x02
258# define PSI_FAULT 0x04
259# define PSI_ALARM 0x08
260# define PSI_CURRENT 0x10
261# define PSI_DVM 0x20
262# define PSI_PSCFAULT 0x40
263# define PSI_STAT_CHG 0x80
264
265#define VOYAGER_PSI_SUPPLY_REG 0x8000
266 /* read */
267# define PSI_FAIL_DC 0x01
268# define PSI_FAIL_AC 0x02
269# define PSI_MON_INT 0x04
270# define PSI_SWITCH_OFF 0x08
271# define PSI_HX_OFF 0x10
272# define PSI_SECURITY 0x20
273# define PSI_CMOS_BATT_LOW 0x40
274# define PSI_CMOS_BATT_FAIL 0x80
275 /* write */
276# define PSI_CLR_SWITCH_OFF 0x13
277# define PSI_CLR_HX_OFF 0x14
278# define PSI_CLR_CMOS_BATT_FAIL 0x17
279
280#define VOYAGER_PSI_MASK 0x8001
281# define PSI_MASK_MASK 0x10
282
283#define VOYAGER_PSI_AC_FAIL_REG 0x8004
284#define AC_FAIL_STAT_CHANGE 0x80
285
286#define VOYAGER_PSI_GENERAL_REG 0x8007
287 /* read */
288# define PSI_SWITCH_ON 0x01
289# define PSI_SWITCH_ENABLED 0x02
290# define PSI_ALARM_ENABLED 0x08
291# define PSI_SECURE_ENABLED 0x10
292# define PSI_COLD_RESET 0x20
293# define PSI_COLD_START 0x80
294 /* write */
295# define PSI_POWER_DOWN 0x10
296# define PSI_SWITCH_DISABLE 0x01
297# define PSI_SWITCH_ENABLE 0x11
298# define PSI_CLEAR 0x12
299# define PSI_ALARM_DISABLE 0x03
300# define PSI_ALARM_ENABLE 0x13
301# define PSI_CLEAR_COLD_RESET 0x05
302# define PSI_SET_COLD_RESET 0x15
303# define PSI_CLEAR_COLD_START 0x07
304# define PSI_SET_COLD_START 0x17
305
306
307
308struct voyager_bios_info {
309 __u8 len;
310 __u8 major;
311 __u8 minor;
312 __u8 debug;
313 __u8 num_classes;
314 __u8 class_1;
315 __u8 class_2;
316};
317
318/* The following structures and definitions are for the Kernel/SUS
319 * interface these are needed to find out how SUS initialised any Quad
320 * boards in the system */
321
322#define NUMBER_OF_MC_BUSSES 2
323#define SLOTS_PER_MC_BUS 8
324#define MAX_CPUS 16 /* 16 way CPU system */
325#define MAX_PROCESSOR_BOARDS 4 /* 4 processor slot system */
326#define MAX_CACHE_LEVELS 4 /* # of cache levels supported */
327#define MAX_SHARED_CPUS 4 /* # of CPUs that can share a LARC */
328#define NUMBER_OF_POS_REGS 8
329
330typedef struct {
331 __u8 MC_Slot;
332 __u8 POS_Values[NUMBER_OF_POS_REGS];
333} __attribute__((packed)) MC_SlotInformation_t;
334
335struct QuadDescription {
336 __u8 Type; /* for type 0 (DYADIC or MONADIC) all fields
337 * will be zero except for slot */
338 __u8 StructureVersion;
339 __u32 CPI_BaseAddress;
340 __u32 LARC_BankSize;
341 __u32 LocalMemoryStateBits;
342 __u8 Slot; /* Processor slots 1 - 4 */
343} __attribute__((packed));
344
345struct ProcBoardInfo {
346 __u8 Type;
347 __u8 StructureVersion;
348 __u8 NumberOfBoards;
349 struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS];
350} __attribute__((packed));
351
352struct CacheDescription {
353 __u8 Level;
354 __u32 TotalSize;
355 __u16 LineSize;
356 __u8 Associativity;
357 __u8 CacheType;
358 __u8 WriteType;
359 __u8 Number_CPUs_SharedBy;
360 __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS];
361
362} __attribute__((packed));
363
364struct CPU_Description {
365 __u8 CPU_HardwareId;
366 char *FRU_String;
367 __u8 NumberOfCacheLevels;
368 struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS];
369} __attribute__((packed));
370
371struct CPU_Info {
372 __u8 Type;
373 __u8 StructureVersion;
374 __u8 NumberOf_CPUs;
375 struct CPU_Description CPU_Data[MAX_CPUS];
376} __attribute__((packed));
377
378
379/*
380 * This structure will be used by SUS and the OS.
381 * The assumption about this structure is that no blank space is
382 * packed in it by our friend the compiler.
383 */
384typedef struct {
385 __u8 Mailbox_SUS; /* Written to by SUS to give
386 commands/response to the OS */
387 __u8 Mailbox_OS; /* Written to by the OS to give
388 commands/response to SUS */
389 __u8 SUS_MailboxVersion; /* Tells the OS which iteration of the
390 interface SUS supports */
391 __u8 OS_MailboxVersion; /* Tells SUS which iteration of the
392 interface the OS supports */
393 __u32 OS_Flags; /* Flags set by the OS as info for
394 SUS */
395 __u32 SUS_Flags; /* Flags set by SUS as info
396 for the OS */
397 __u32 WatchDogPeriod; /* Watchdog period (in seconds) which
398 the DP uses to see if the OS
399 is dead */
400 __u32 WatchDogCount; /* Updated by the OS on every tic. */
401 __u32 MemoryFor_SUS_ErrorLog; /* Flat 32 bit address which tells SUS
402 where to stuff the SUS error log
403 on a dump */
404 MC_SlotInformation_t MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS];
405 /* Storage for MCA POS data */
406 /* All new SECOND_PASS_INTERFACE fields added from this point */
407 struct ProcBoardInfo *BoardData;
408 struct CPU_Info *CPU_Data;
409 /* All new fields must be added from this point */
410} Voyager_KernelSUS_Mbox_t;
411
412/* structure for finding the right memory address to send a QIC CPI to */
413struct voyager_qic_cpi {
414 /* Each cache line (32 bytes) can trigger a cpi. The cpi
415 * read/write may occur anywhere in the cache line---pick the
416 * middle to be safe */
417 struct {
418 __u32 pad1[3];
419 __u32 cpi;
420 __u32 pad2[4];
421 } qic_cpi[8];
422};
423
424struct voyager_status {
425 __u32 power_fail:1;
426 __u32 switch_off:1;
427 __u32 request_from_kernel:1;
428};
429
430struct voyager_psi_regs {
431 __u8 cat_id;
432 __u8 cat_dev;
433 __u8 cat_control;
434 __u8 subaddr;
435 __u8 dummy4;
436 __u8 checkbit;
437 __u8 subaddr_low;
438 __u8 subaddr_high;
439 __u8 intstatus;
440 __u8 stat1;
441 __u8 stat3;
442 __u8 fault;
443 __u8 tms;
444 __u8 gen;
445 __u8 sysconf;
446 __u8 dummy15;
447};
448
449struct voyager_psi_subregs {
450 __u8 supply;
451 __u8 mask;
452 __u8 present;
453 __u8 DCfail;
454 __u8 ACfail;
455 __u8 fail;
456 __u8 UPSfail;
457 __u8 genstatus;
458};
459
460struct voyager_psi {
461 struct voyager_psi_regs regs;
462 struct voyager_psi_subregs subregs;
463};
464
465struct voyager_SUS {
466#define VOYAGER_DUMP_BUTTON_NMI 0x1
467#define VOYAGER_SUS_VALID 0x2
468#define VOYAGER_SYSINT_COMPLETE 0x3
469 __u8 SUS_mbox;
470#define VOYAGER_NO_COMMAND 0x0
471#define VOYAGER_IGNORE_DUMP 0x1
472#define VOYAGER_DO_DUMP 0x2
473#define VOYAGER_SYSINT_HANDSHAKE 0x3
474#define VOYAGER_DO_MEM_DUMP 0x4
475#define VOYAGER_SYSINT_WAS_RECOVERED 0x5
476 __u8 kernel_mbox;
477#define VOYAGER_MAILBOX_VERSION 0x10
478 __u8 SUS_version;
479 __u8 kernel_version;
480#define VOYAGER_OS_HAS_SYSINT 0x1
481#define VOYAGER_OS_IN_PROGRESS 0x2
482#define VOYAGER_UPDATING_WDPERIOD 0x4
483 __u32 kernel_flags;
484#define VOYAGER_SUS_BOOTING 0x1
485#define VOYAGER_SUS_IN_PROGRESS 0x2
486 __u32 SUS_flags;
487 __u32 watchdog_period;
488 __u32 watchdog_count;
489 __u32 SUS_errorlog;
490 /* lots of system configuration stuff under here */
491};
492
493/* Variables exported by voyager_smp */
494extern __u32 voyager_extended_vic_processors;
495extern __u32 voyager_allowed_boot_processors;
496extern __u32 voyager_quad_processors;
497extern struct voyager_qic_cpi *voyager_quad_cpi_addr[NR_CPUS];
498extern struct voyager_SUS *voyager_SUS;
499
500/* variables exported always */
501extern struct task_struct *voyager_thread;
502extern int voyager_level;
503extern struct voyager_status voyager_status;
504
505/* functions exported by the voyager and voyager_smp modules */
506extern int voyager_cat_readb(__u8 module, __u8 asic, int reg);
507extern void voyager_cat_init(void);
508extern void voyager_detect(struct voyager_bios_info *);
509extern void voyager_trap_init(void);
510extern void voyager_setup_irqs(void);
511extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length);
512extern void voyager_smp_intr_init(void);
513extern __u8 voyager_extended_cmos_read(__u16 cmos_address);
514extern void voyager_smp_dump(void);
515extern void voyager_timer_interrupt(void);
516extern void smp_local_timer_interrupt(void);
517extern void voyager_power_off(void);
518extern void smp_voyager_power_off(void *dummy);
519extern void voyager_restart(void);
520extern void voyager_cat_power_off(void);
521extern void voyager_cat_do_common_interrupt(void);
522extern void voyager_handle_nmi(void);
523/* Commands for the following are */
524#define VOYAGER_PSI_READ 0
525#define VOYAGER_PSI_WRITE 1
526#define VOYAGER_PSI_SUBREAD 2
527#define VOYAGER_PSI_SUBWRITE 3
528extern void voyager_cat_psi(__u8, __u16, __u8 *);
diff --git a/include/asm-x86/vsyscall.h b/include/asm-x86/vsyscall.h
deleted file mode 100644
index dcd4682413de..000000000000
--- a/include/asm-x86/vsyscall.h
+++ /dev/null
@@ -1,44 +0,0 @@
1#ifndef ASM_X86__VSYSCALL_H
2#define ASM_X86__VSYSCALL_H
3
4enum vsyscall_num {
5 __NR_vgettimeofday,
6 __NR_vtime,
7 __NR_vgetcpu,
8};
9
10#define VSYSCALL_START (-10UL << 20)
11#define VSYSCALL_SIZE 1024
12#define VSYSCALL_END (-2UL << 20)
13#define VSYSCALL_MAPPED_PAGES 1
14#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))
15
16#ifdef __KERNEL__
17#include <linux/seqlock.h>
18
19#define __section_vgetcpu_mode __attribute__ ((unused, __section__ (".vgetcpu_mode"), aligned(16)))
20#define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16)))
21
22/* Definitions for CONFIG_GENERIC_TIME definitions */
23#define __section_vsyscall_gtod_data __attribute__ \
24 ((unused, __section__ (".vsyscall_gtod_data"),aligned(16)))
25#define __section_vsyscall_clock __attribute__ \
26 ((unused, __section__ (".vsyscall_clock"),aligned(16)))
27#define __vsyscall_fn \
28 __attribute__ ((unused, __section__(".vsyscall_fn"))) notrace
29
30#define VGETCPU_RDTSCP 1
31#define VGETCPU_LSL 2
32
33extern int __vgetcpu_mode;
34extern volatile unsigned long __jiffies;
35
36/* kernel space (writeable) */
37extern int vgetcpu_mode;
38extern struct timezone sys_tz;
39
40extern void map_vsyscall(void);
41
42#endif /* __KERNEL__ */
43
44#endif /* ASM_X86__VSYSCALL_H */
diff --git a/include/asm-x86/xcr.h b/include/asm-x86/xcr.h
deleted file mode 100644
index f2cba4e79a23..000000000000
--- a/include/asm-x86/xcr.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * Copyright 2008 rPath, Inc. - All Rights Reserved
4 *
5 * This file is part of the Linux kernel, and is made available under
6 * the terms of the GNU General Public License version 2 or (at your
7 * option) any later version; incorporated herein by reference.
8 *
9 * ----------------------------------------------------------------------- */
10
11/*
12 * asm-x86/xcr.h
13 *
14 * Definitions for the eXtended Control Register instructions
15 */
16
17#ifndef _ASM_X86_XCR_H
18#define _ASM_X86_XCR_H
19
20#define XCR_XFEATURE_ENABLED_MASK 0x00000000
21
22#ifdef __KERNEL__
23# ifndef __ASSEMBLY__
24
25#include <linux/types.h>
26
27static inline u64 xgetbv(u32 index)
28{
29 u32 eax, edx;
30
31 asm volatile(".byte 0x0f,0x01,0xd0" /* xgetbv */
32 : "=a" (eax), "=d" (edx)
33 : "c" (index));
34 return eax + ((u64)edx << 32);
35}
36
37static inline void xsetbv(u32 index, u64 value)
38{
39 u32 eax = value;
40 u32 edx = value >> 32;
41
42 asm volatile(".byte 0x0f,0x01,0xd1" /* xsetbv */
43 : : "a" (eax), "d" (edx), "c" (index));
44}
45
46# endif /* __ASSEMBLY__ */
47#endif /* __KERNEL__ */
48
49#endif /* _ASM_X86_XCR_H */
diff --git a/include/asm-x86/xen/events.h b/include/asm-x86/xen/events.h
deleted file mode 100644
index 8151f5b8b6cb..000000000000
--- a/include/asm-x86/xen/events.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef ASM_X86__XEN__EVENTS_H
2#define ASM_X86__XEN__EVENTS_H
3
4enum ipi_vector {
5 XEN_RESCHEDULE_VECTOR,
6 XEN_CALL_FUNCTION_VECTOR,
7 XEN_CALL_FUNCTION_SINGLE_VECTOR,
8 XEN_SPIN_UNLOCK_VECTOR,
9
10 XEN_NR_IPIS,
11};
12
13static inline int xen_irqs_disabled(struct pt_regs *regs)
14{
15 return raw_irqs_disabled_flags(regs->flags);
16}
17
18static inline void xen_do_IRQ(int irq, struct pt_regs *regs)
19{
20 regs->orig_ax = ~irq;
21 do_IRQ(regs);
22}
23
24#endif /* ASM_X86__XEN__EVENTS_H */
diff --git a/include/asm-x86/xen/grant_table.h b/include/asm-x86/xen/grant_table.h
deleted file mode 100644
index c4baab4d2b68..000000000000
--- a/include/asm-x86/xen/grant_table.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef ASM_X86__XEN__GRANT_TABLE_H
2#define ASM_X86__XEN__GRANT_TABLE_H
3
4#define xen_alloc_vm_area(size) alloc_vm_area(size)
5#define xen_free_vm_area(area) free_vm_area(area)
6
7#endif /* ASM_X86__XEN__GRANT_TABLE_H */
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
deleted file mode 100644
index 44f4259bee3f..000000000000
--- a/include/asm-x86/xen/hypercall.h
+++ /dev/null
@@ -1,527 +0,0 @@
1/******************************************************************************
2 * hypercall.h
3 *
4 * Linux-specific hypervisor handling.
5 *
6 * Copyright (c) 2002-2004, K A Fraser
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation; or, when distributed
11 * separately from the Linux kernel or incorporated into other
12 * software packages, subject to the following license:
13 *
14 * Permission is hereby granted, free of charge, to any person obtaining a copy
15 * of this source file (the "Software"), to deal in the Software without
16 * restriction, including without limitation the rights to use, copy, modify,
17 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
18 * and to permit persons to whom the Software is furnished to do so, subject to
19 * the following conditions:
20 *
21 * The above copyright notice and this permission notice shall be included in
22 * all copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
30 * IN THE SOFTWARE.
31 */
32
33#ifndef ASM_X86__XEN__HYPERCALL_H
34#define ASM_X86__XEN__HYPERCALL_H
35
36#include <linux/errno.h>
37#include <linux/string.h>
38
39#include <xen/interface/xen.h>
40#include <xen/interface/sched.h>
41#include <xen/interface/physdev.h>
42
43/*
44 * The hypercall asms have to meet several constraints:
45 * - Work on 32- and 64-bit.
46 * The two architectures put their arguments in different sets of
47 * registers.
48 *
49 * - Work around asm syntax quirks
50 * It isn't possible to specify one of the rNN registers in a
51 * constraint, so we use explicit register variables to get the
52 * args into the right place.
53 *
54 * - Mark all registers as potentially clobbered
55 * Even unused parameters can be clobbered by the hypervisor, so we
56 * need to make sure gcc knows it.
57 *
58 * - Avoid compiler bugs.
59 * This is the tricky part. Because x86_32 has such a constrained
60 * register set, gcc versions below 4.3 have trouble generating
61 * code when all the arg registers and memory are trashed by the
62 * asm. There are syntactically simpler ways of achieving the
63 * semantics below, but they cause the compiler to crash.
64 *
65 * The only combination I found which works is:
66 * - assign the __argX variables first
67 * - list all actually used parameters as "+r" (__argX)
68 * - clobber the rest
69 *
70 * The result certainly isn't pretty, and it really shows up cpp's
71 * weakness as as macro language. Sorry. (But let's just give thanks
72 * there aren't more than 5 arguments...)
73 */
74
75extern struct { char _entry[32]; } hypercall_page[];
76
77#define __HYPERCALL "call hypercall_page+%c[offset]"
78#define __HYPERCALL_ENTRY(x) \
79 [offset] "i" (__HYPERVISOR_##x * sizeof(hypercall_page[0]))
80
81#ifdef CONFIG_X86_32
82#define __HYPERCALL_RETREG "eax"
83#define __HYPERCALL_ARG1REG "ebx"
84#define __HYPERCALL_ARG2REG "ecx"
85#define __HYPERCALL_ARG3REG "edx"
86#define __HYPERCALL_ARG4REG "esi"
87#define __HYPERCALL_ARG5REG "edi"
88#else
89#define __HYPERCALL_RETREG "rax"
90#define __HYPERCALL_ARG1REG "rdi"
91#define __HYPERCALL_ARG2REG "rsi"
92#define __HYPERCALL_ARG3REG "rdx"
93#define __HYPERCALL_ARG4REG "r10"
94#define __HYPERCALL_ARG5REG "r8"
95#endif
96
97#define __HYPERCALL_DECLS \
98 register unsigned long __res asm(__HYPERCALL_RETREG); \
99 register unsigned long __arg1 asm(__HYPERCALL_ARG1REG) = __arg1; \
100 register unsigned long __arg2 asm(__HYPERCALL_ARG2REG) = __arg2; \
101 register unsigned long __arg3 asm(__HYPERCALL_ARG3REG) = __arg3; \
102 register unsigned long __arg4 asm(__HYPERCALL_ARG4REG) = __arg4; \
103 register unsigned long __arg5 asm(__HYPERCALL_ARG5REG) = __arg5;
104
105#define __HYPERCALL_0PARAM "=r" (__res)
106#define __HYPERCALL_1PARAM __HYPERCALL_0PARAM, "+r" (__arg1)
107#define __HYPERCALL_2PARAM __HYPERCALL_1PARAM, "+r" (__arg2)
108#define __HYPERCALL_3PARAM __HYPERCALL_2PARAM, "+r" (__arg3)
109#define __HYPERCALL_4PARAM __HYPERCALL_3PARAM, "+r" (__arg4)
110#define __HYPERCALL_5PARAM __HYPERCALL_4PARAM, "+r" (__arg5)
111
112#define __HYPERCALL_0ARG()
113#define __HYPERCALL_1ARG(a1) \
114 __HYPERCALL_0ARG() __arg1 = (unsigned long)(a1);
115#define __HYPERCALL_2ARG(a1,a2) \
116 __HYPERCALL_1ARG(a1) __arg2 = (unsigned long)(a2);
117#define __HYPERCALL_3ARG(a1,a2,a3) \
118 __HYPERCALL_2ARG(a1,a2) __arg3 = (unsigned long)(a3);
119#define __HYPERCALL_4ARG(a1,a2,a3,a4) \
120 __HYPERCALL_3ARG(a1,a2,a3) __arg4 = (unsigned long)(a4);
121#define __HYPERCALL_5ARG(a1,a2,a3,a4,a5) \
122 __HYPERCALL_4ARG(a1,a2,a3,a4) __arg5 = (unsigned long)(a5);
123
124#define __HYPERCALL_CLOBBER5 "memory"
125#define __HYPERCALL_CLOBBER4 __HYPERCALL_CLOBBER5, __HYPERCALL_ARG5REG
126#define __HYPERCALL_CLOBBER3 __HYPERCALL_CLOBBER4, __HYPERCALL_ARG4REG
127#define __HYPERCALL_CLOBBER2 __HYPERCALL_CLOBBER3, __HYPERCALL_ARG3REG
128#define __HYPERCALL_CLOBBER1 __HYPERCALL_CLOBBER2, __HYPERCALL_ARG2REG
129#define __HYPERCALL_CLOBBER0 __HYPERCALL_CLOBBER1, __HYPERCALL_ARG1REG
130
131#define _hypercall0(type, name) \
132({ \
133 __HYPERCALL_DECLS; \
134 __HYPERCALL_0ARG(); \
135 asm volatile (__HYPERCALL \
136 : __HYPERCALL_0PARAM \
137 : __HYPERCALL_ENTRY(name) \
138 : __HYPERCALL_CLOBBER0); \
139 (type)__res; \
140})
141
142#define _hypercall1(type, name, a1) \
143({ \
144 __HYPERCALL_DECLS; \
145 __HYPERCALL_1ARG(a1); \
146 asm volatile (__HYPERCALL \
147 : __HYPERCALL_1PARAM \
148 : __HYPERCALL_ENTRY(name) \
149 : __HYPERCALL_CLOBBER1); \
150 (type)__res; \
151})
152
153#define _hypercall2(type, name, a1, a2) \
154({ \
155 __HYPERCALL_DECLS; \
156 __HYPERCALL_2ARG(a1, a2); \
157 asm volatile (__HYPERCALL \
158 : __HYPERCALL_2PARAM \
159 : __HYPERCALL_ENTRY(name) \
160 : __HYPERCALL_CLOBBER2); \
161 (type)__res; \
162})
163
164#define _hypercall3(type, name, a1, a2, a3) \
165({ \
166 __HYPERCALL_DECLS; \
167 __HYPERCALL_3ARG(a1, a2, a3); \
168 asm volatile (__HYPERCALL \
169 : __HYPERCALL_3PARAM \
170 : __HYPERCALL_ENTRY(name) \
171 : __HYPERCALL_CLOBBER3); \
172 (type)__res; \
173})
174
175#define _hypercall4(type, name, a1, a2, a3, a4) \
176({ \
177 __HYPERCALL_DECLS; \
178 __HYPERCALL_4ARG(a1, a2, a3, a4); \
179 asm volatile (__HYPERCALL \
180 : __HYPERCALL_4PARAM \
181 : __HYPERCALL_ENTRY(name) \
182 : __HYPERCALL_CLOBBER4); \
183 (type)__res; \
184})
185
186#define _hypercall5(type, name, a1, a2, a3, a4, a5) \
187({ \
188 __HYPERCALL_DECLS; \
189 __HYPERCALL_5ARG(a1, a2, a3, a4, a5); \
190 asm volatile (__HYPERCALL \
191 : __HYPERCALL_5PARAM \
192 : __HYPERCALL_ENTRY(name) \
193 : __HYPERCALL_CLOBBER5); \
194 (type)__res; \
195})
196
197static inline int
198HYPERVISOR_set_trap_table(struct trap_info *table)
199{
200 return _hypercall1(int, set_trap_table, table);
201}
202
203static inline int
204HYPERVISOR_mmu_update(struct mmu_update *req, int count,
205 int *success_count, domid_t domid)
206{
207 return _hypercall4(int, mmu_update, req, count, success_count, domid);
208}
209
210static inline int
211HYPERVISOR_mmuext_op(struct mmuext_op *op, int count,
212 int *success_count, domid_t domid)
213{
214 return _hypercall4(int, mmuext_op, op, count, success_count, domid);
215}
216
217static inline int
218HYPERVISOR_set_gdt(unsigned long *frame_list, int entries)
219{
220 return _hypercall2(int, set_gdt, frame_list, entries);
221}
222
223static inline int
224HYPERVISOR_stack_switch(unsigned long ss, unsigned long esp)
225{
226 return _hypercall2(int, stack_switch, ss, esp);
227}
228
229#ifdef CONFIG_X86_32
230static inline int
231HYPERVISOR_set_callbacks(unsigned long event_selector,
232 unsigned long event_address,
233 unsigned long failsafe_selector,
234 unsigned long failsafe_address)
235{
236 return _hypercall4(int, set_callbacks,
237 event_selector, event_address,
238 failsafe_selector, failsafe_address);
239}
240#else /* CONFIG_X86_64 */
241static inline int
242HYPERVISOR_set_callbacks(unsigned long event_address,
243 unsigned long failsafe_address,
244 unsigned long syscall_address)
245{
246 return _hypercall3(int, set_callbacks,
247 event_address, failsafe_address,
248 syscall_address);
249}
250#endif /* CONFIG_X86_{32,64} */
251
252static inline int
253HYPERVISOR_callback_op(int cmd, void *arg)
254{
255 return _hypercall2(int, callback_op, cmd, arg);
256}
257
258static inline int
259HYPERVISOR_fpu_taskswitch(int set)
260{
261 return _hypercall1(int, fpu_taskswitch, set);
262}
263
264static inline int
265HYPERVISOR_sched_op(int cmd, void *arg)
266{
267 return _hypercall2(int, sched_op_new, cmd, arg);
268}
269
270static inline long
271HYPERVISOR_set_timer_op(u64 timeout)
272{
273 unsigned long timeout_hi = (unsigned long)(timeout>>32);
274 unsigned long timeout_lo = (unsigned long)timeout;
275 return _hypercall2(long, set_timer_op, timeout_lo, timeout_hi);
276}
277
278static inline int
279HYPERVISOR_set_debugreg(int reg, unsigned long value)
280{
281 return _hypercall2(int, set_debugreg, reg, value);
282}
283
284static inline unsigned long
285HYPERVISOR_get_debugreg(int reg)
286{
287 return _hypercall1(unsigned long, get_debugreg, reg);
288}
289
290static inline int
291HYPERVISOR_update_descriptor(u64 ma, u64 desc)
292{
293 return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
294}
295
296static inline int
297HYPERVISOR_memory_op(unsigned int cmd, void *arg)
298{
299 return _hypercall2(int, memory_op, cmd, arg);
300}
301
302static inline int
303HYPERVISOR_multicall(void *call_list, int nr_calls)
304{
305 return _hypercall2(int, multicall, call_list, nr_calls);
306}
307
308static inline int
309HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val,
310 unsigned long flags)
311{
312 if (sizeof(new_val) == sizeof(long))
313 return _hypercall3(int, update_va_mapping, va,
314 new_val.pte, flags);
315 else
316 return _hypercall4(int, update_va_mapping, va,
317 new_val.pte, new_val.pte >> 32, flags);
318}
319
320static inline int
321HYPERVISOR_event_channel_op(int cmd, void *arg)
322{
323 int rc = _hypercall2(int, event_channel_op, cmd, arg);
324 if (unlikely(rc == -ENOSYS)) {
325 struct evtchn_op op;
326 op.cmd = cmd;
327 memcpy(&op.u, arg, sizeof(op.u));
328 rc = _hypercall1(int, event_channel_op_compat, &op);
329 memcpy(arg, &op.u, sizeof(op.u));
330 }
331 return rc;
332}
333
334static inline int
335HYPERVISOR_xen_version(int cmd, void *arg)
336{
337 return _hypercall2(int, xen_version, cmd, arg);
338}
339
340static inline int
341HYPERVISOR_console_io(int cmd, int count, char *str)
342{
343 return _hypercall3(int, console_io, cmd, count, str);
344}
345
346static inline int
347HYPERVISOR_physdev_op(int cmd, void *arg)
348{
349 int rc = _hypercall2(int, physdev_op, cmd, arg);
350 if (unlikely(rc == -ENOSYS)) {
351 struct physdev_op op;
352 op.cmd = cmd;
353 memcpy(&op.u, arg, sizeof(op.u));
354 rc = _hypercall1(int, physdev_op_compat, &op);
355 memcpy(arg, &op.u, sizeof(op.u));
356 }
357 return rc;
358}
359
360static inline int
361HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count)
362{
363 return _hypercall3(int, grant_table_op, cmd, uop, count);
364}
365
366static inline int
367HYPERVISOR_update_va_mapping_otherdomain(unsigned long va, pte_t new_val,
368 unsigned long flags, domid_t domid)
369{
370 if (sizeof(new_val) == sizeof(long))
371 return _hypercall4(int, update_va_mapping_otherdomain, va,
372 new_val.pte, flags, domid);
373 else
374 return _hypercall5(int, update_va_mapping_otherdomain, va,
375 new_val.pte, new_val.pte >> 32,
376 flags, domid);
377}
378
379static inline int
380HYPERVISOR_vm_assist(unsigned int cmd, unsigned int type)
381{
382 return _hypercall2(int, vm_assist, cmd, type);
383}
384
385static inline int
386HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args)
387{
388 return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args);
389}
390
391#ifdef CONFIG_X86_64
392static inline int
393HYPERVISOR_set_segment_base(int reg, unsigned long value)
394{
395 return _hypercall2(int, set_segment_base, reg, value);
396}
397#endif
398
399static inline int
400HYPERVISOR_suspend(unsigned long srec)
401{
402 return _hypercall3(int, sched_op, SCHEDOP_shutdown,
403 SHUTDOWN_suspend, srec);
404}
405
406static inline int
407HYPERVISOR_nmi_op(unsigned long op, unsigned long arg)
408{
409 return _hypercall2(int, nmi_op, op, arg);
410}
411
412static inline void
413MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set)
414{
415 mcl->op = __HYPERVISOR_fpu_taskswitch;
416 mcl->args[0] = set;
417}
418
419static inline void
420MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
421 pte_t new_val, unsigned long flags)
422{
423 mcl->op = __HYPERVISOR_update_va_mapping;
424 mcl->args[0] = va;
425 if (sizeof(new_val) == sizeof(long)) {
426 mcl->args[1] = new_val.pte;
427 mcl->args[2] = flags;
428 } else {
429 mcl->args[1] = new_val.pte;
430 mcl->args[2] = new_val.pte >> 32;
431 mcl->args[3] = flags;
432 }
433}
434
435static inline void
436MULTI_grant_table_op(struct multicall_entry *mcl, unsigned int cmd,
437 void *uop, unsigned int count)
438{
439 mcl->op = __HYPERVISOR_grant_table_op;
440 mcl->args[0] = cmd;
441 mcl->args[1] = (unsigned long)uop;
442 mcl->args[2] = count;
443}
444
445static inline void
446MULTI_update_va_mapping_otherdomain(struct multicall_entry *mcl, unsigned long va,
447 pte_t new_val, unsigned long flags,
448 domid_t domid)
449{
450 mcl->op = __HYPERVISOR_update_va_mapping_otherdomain;
451 mcl->args[0] = va;
452 if (sizeof(new_val) == sizeof(long)) {
453 mcl->args[1] = new_val.pte;
454 mcl->args[2] = flags;
455 mcl->args[3] = domid;
456 } else {
457 mcl->args[1] = new_val.pte;
458 mcl->args[2] = new_val.pte >> 32;
459 mcl->args[3] = flags;
460 mcl->args[4] = domid;
461 }
462}
463
464static inline void
465MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
466 struct desc_struct desc)
467{
468 mcl->op = __HYPERVISOR_update_descriptor;
469 if (sizeof(maddr) == sizeof(long)) {
470 mcl->args[0] = maddr;
471 mcl->args[1] = *(unsigned long *)&desc;
472 } else {
473 mcl->args[0] = maddr;
474 mcl->args[1] = maddr >> 32;
475 mcl->args[2] = desc.a;
476 mcl->args[3] = desc.b;
477 }
478}
479
480static inline void
481MULTI_memory_op(struct multicall_entry *mcl, unsigned int cmd, void *arg)
482{
483 mcl->op = __HYPERVISOR_memory_op;
484 mcl->args[0] = cmd;
485 mcl->args[1] = (unsigned long)arg;
486}
487
488static inline void
489MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req,
490 int count, int *success_count, domid_t domid)
491{
492 mcl->op = __HYPERVISOR_mmu_update;
493 mcl->args[0] = (unsigned long)req;
494 mcl->args[1] = count;
495 mcl->args[2] = (unsigned long)success_count;
496 mcl->args[3] = domid;
497}
498
499static inline void
500MULTI_mmuext_op(struct multicall_entry *mcl, struct mmuext_op *op, int count,
501 int *success_count, domid_t domid)
502{
503 mcl->op = __HYPERVISOR_mmuext_op;
504 mcl->args[0] = (unsigned long)op;
505 mcl->args[1] = count;
506 mcl->args[2] = (unsigned long)success_count;
507 mcl->args[3] = domid;
508}
509
510static inline void
511MULTI_set_gdt(struct multicall_entry *mcl, unsigned long *frames, int entries)
512{
513 mcl->op = __HYPERVISOR_set_gdt;
514 mcl->args[0] = (unsigned long)frames;
515 mcl->args[1] = entries;
516}
517
518static inline void
519MULTI_stack_switch(struct multicall_entry *mcl,
520 unsigned long ss, unsigned long esp)
521{
522 mcl->op = __HYPERVISOR_stack_switch;
523 mcl->args[0] = ss;
524 mcl->args[1] = esp;
525}
526
527#endif /* ASM_X86__XEN__HYPERCALL_H */
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h
deleted file mode 100644
index 445a24759560..000000000000
--- a/include/asm-x86/xen/hypervisor.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/******************************************************************************
2 * hypervisor.h
3 *
4 * Linux-specific hypervisor handling.
5 *
6 * Copyright (c) 2002-2004, K A Fraser
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation; or, when distributed
11 * separately from the Linux kernel or incorporated into other
12 * software packages, subject to the following license:
13 *
14 * Permission is hereby granted, free of charge, to any person obtaining a copy
15 * of this source file (the "Software"), to deal in the Software without
16 * restriction, including without limitation the rights to use, copy, modify,
17 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
18 * and to permit persons to whom the Software is furnished to do so, subject to
19 * the following conditions:
20 *
21 * The above copyright notice and this permission notice shall be included in
22 * all copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
30 * IN THE SOFTWARE.
31 */
32
33#ifndef ASM_X86__XEN__HYPERVISOR_H
34#define ASM_X86__XEN__HYPERVISOR_H
35
36#include <linux/types.h>
37#include <linux/kernel.h>
38
39#include <xen/interface/xen.h>
40#include <xen/interface/version.h>
41
42#include <asm/ptrace.h>
43#include <asm/page.h>
44#include <asm/desc.h>
45#if defined(__i386__)
46# ifdef CONFIG_X86_PAE
47# include <asm-generic/pgtable-nopud.h>
48# else
49# include <asm-generic/pgtable-nopmd.h>
50# endif
51#endif
52#include <asm/xen/hypercall.h>
53
54/* arch/i386/kernel/setup.c */
55extern struct shared_info *HYPERVISOR_shared_info;
56extern struct start_info *xen_start_info;
57
58/* arch/i386/mach-xen/evtchn.c */
59/* Force a proper event-channel callback from Xen. */
60extern void force_evtchn_callback(void);
61
62/* Turn jiffies into Xen system time. */
63u64 jiffies_to_st(unsigned long jiffies);
64
65
66#define MULTI_UVMFLAGS_INDEX 3
67#define MULTI_UVMDOMID_INDEX 4
68
69enum xen_domain_type {
70 XEN_NATIVE,
71 XEN_PV_DOMAIN,
72 XEN_HVM_DOMAIN,
73};
74
75extern enum xen_domain_type xen_domain_type;
76
77#define xen_domain() (xen_domain_type != XEN_NATIVE)
78#define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN)
79#define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN)
80#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN)
81
82#endif /* ASM_X86__XEN__HYPERVISOR_H */
diff --git a/include/asm-x86/xen/interface.h b/include/asm-x86/xen/interface.h
deleted file mode 100644
index d077bba96da9..000000000000
--- a/include/asm-x86/xen/interface.h
+++ /dev/null
@@ -1,175 +0,0 @@
1/******************************************************************************
2 * arch-x86_32.h
3 *
4 * Guest OS interface to x86 Xen.
5 *
6 * Copyright (c) 2004, K A Fraser
7 */
8
9#ifndef ASM_X86__XEN__INTERFACE_H
10#define ASM_X86__XEN__INTERFACE_H
11
12#ifdef __XEN__
13#define __DEFINE_GUEST_HANDLE(name, type) \
14 typedef struct { type *p; } __guest_handle_ ## name
15#else
16#define __DEFINE_GUEST_HANDLE(name, type) \
17 typedef type * __guest_handle_ ## name
18#endif
19
20#define DEFINE_GUEST_HANDLE_STRUCT(name) \
21 __DEFINE_GUEST_HANDLE(name, struct name)
22#define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name)
23#define GUEST_HANDLE(name) __guest_handle_ ## name
24
25#ifdef __XEN__
26#if defined(__i386__)
27#define set_xen_guest_handle(hnd, val) \
28 do { \
29 if (sizeof(hnd) == 8) \
30 *(uint64_t *)&(hnd) = 0; \
31 (hnd).p = val; \
32 } while (0)
33#elif defined(__x86_64__)
34#define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0)
35#endif
36#else
37#if defined(__i386__)
38#define set_xen_guest_handle(hnd, val) \
39 do { \
40 if (sizeof(hnd) == 8) \
41 *(uint64_t *)&(hnd) = 0; \
42 (hnd) = val; \
43 } while (0)
44#elif defined(__x86_64__)
45#define set_xen_guest_handle(hnd, val) do { (hnd) = val; } while (0)
46#endif
47#endif
48
49#ifndef __ASSEMBLY__
50/* Guest handles for primitive C types. */
51__DEFINE_GUEST_HANDLE(uchar, unsigned char);
52__DEFINE_GUEST_HANDLE(uint, unsigned int);
53__DEFINE_GUEST_HANDLE(ulong, unsigned long);
54DEFINE_GUEST_HANDLE(char);
55DEFINE_GUEST_HANDLE(int);
56DEFINE_GUEST_HANDLE(long);
57DEFINE_GUEST_HANDLE(void);
58#endif
59
60#ifndef HYPERVISOR_VIRT_START
61#define HYPERVISOR_VIRT_START mk_unsigned_long(__HYPERVISOR_VIRT_START)
62#endif
63
64#ifndef machine_to_phys_mapping
65#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
66#endif
67
68/* Maximum number of virtual CPUs in multi-processor guests. */
69#define MAX_VIRT_CPUS 32
70
71/*
72 * SEGMENT DESCRIPTOR TABLES
73 */
74/*
75 * A number of GDT entries are reserved by Xen. These are not situated at the
76 * start of the GDT because some stupid OSes export hard-coded selector values
77 * in their ABI. These hard-coded values are always near the start of the GDT,
78 * so Xen places itself out of the way, at the far end of the GDT.
79 */
80#define FIRST_RESERVED_GDT_PAGE 14
81#define FIRST_RESERVED_GDT_BYTE (FIRST_RESERVED_GDT_PAGE * 4096)
82#define FIRST_RESERVED_GDT_ENTRY (FIRST_RESERVED_GDT_BYTE / 8)
83
84/*
85 * Send an array of these to HYPERVISOR_set_trap_table()
86 * The privilege level specifies which modes may enter a trap via a software
87 * interrupt. On x86/64, since rings 1 and 2 are unavailable, we allocate
88 * privilege levels as follows:
89 * Level == 0: Noone may enter
90 * Level == 1: Kernel may enter
91 * Level == 2: Kernel may enter
92 * Level == 3: Everyone may enter
93 */
94#define TI_GET_DPL(_ti) ((_ti)->flags & 3)
95#define TI_GET_IF(_ti) ((_ti)->flags & 4)
96#define TI_SET_DPL(_ti, _dpl) ((_ti)->flags |= (_dpl))
97#define TI_SET_IF(_ti, _if) ((_ti)->flags |= ((!!(_if))<<2))
98
99#ifndef __ASSEMBLY__
100struct trap_info {
101 uint8_t vector; /* exception vector */
102 uint8_t flags; /* 0-3: privilege level; 4: clear event enable? */
103 uint16_t cs; /* code selector */
104 unsigned long address; /* code offset */
105};
106DEFINE_GUEST_HANDLE_STRUCT(trap_info);
107
108struct arch_shared_info {
109 unsigned long max_pfn; /* max pfn that appears in table */
110 /* Frame containing list of mfns containing list of mfns containing p2m. */
111 unsigned long pfn_to_mfn_frame_list_list;
112 unsigned long nmi_reason;
113};
114#endif /* !__ASSEMBLY__ */
115
116#ifdef CONFIG_X86_32
117#include "interface_32.h"
118#else
119#include "interface_64.h"
120#endif
121
122#ifndef __ASSEMBLY__
123/*
124 * The following is all CPU context. Note that the fpu_ctxt block is filled
125 * in by FXSAVE if the CPU has feature FXSR; otherwise FSAVE is used.
126 */
127struct vcpu_guest_context {
128 /* FPU registers come first so they can be aligned for FXSAVE/FXRSTOR. */
129 struct { char x[512]; } fpu_ctxt; /* User-level FPU registers */
130#define VGCF_I387_VALID (1<<0)
131#define VGCF_HVM_GUEST (1<<1)
132#define VGCF_IN_KERNEL (1<<2)
133 unsigned long flags; /* VGCF_* flags */
134 struct cpu_user_regs user_regs; /* User-level CPU registers */
135 struct trap_info trap_ctxt[256]; /* Virtual IDT */
136 unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */
137 unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
138 unsigned long kernel_ss, kernel_sp; /* Virtual TSS (only SS1/SP1) */
139 /* NB. User pagetable on x86/64 is placed in ctrlreg[1]. */
140 unsigned long ctrlreg[8]; /* CR0-CR7 (control registers) */
141 unsigned long debugreg[8]; /* DB0-DB7 (debug registers) */
142#ifdef __i386__
143 unsigned long event_callback_cs; /* CS:EIP of event callback */
144 unsigned long event_callback_eip;
145 unsigned long failsafe_callback_cs; /* CS:EIP of failsafe callback */
146 unsigned long failsafe_callback_eip;
147#else
148 unsigned long event_callback_eip;
149 unsigned long failsafe_callback_eip;
150 unsigned long syscall_callback_eip;
151#endif
152 unsigned long vm_assist; /* VMASST_TYPE_* bitmap */
153#ifdef __x86_64__
154 /* Segment base addresses. */
155 uint64_t fs_base;
156 uint64_t gs_base_kernel;
157 uint64_t gs_base_user;
158#endif
159};
160DEFINE_GUEST_HANDLE_STRUCT(vcpu_guest_context);
161#endif /* !__ASSEMBLY__ */
162
163/*
164 * Prefix forces emulation of some non-trapping instructions.
165 * Currently only CPUID.
166 */
167#ifdef __ASSEMBLY__
168#define XEN_EMULATE_PREFIX .byte 0x0f,0x0b,0x78,0x65,0x6e ;
169#define XEN_CPUID XEN_EMULATE_PREFIX cpuid
170#else
171#define XEN_EMULATE_PREFIX ".byte 0x0f,0x0b,0x78,0x65,0x6e ; "
172#define XEN_CPUID XEN_EMULATE_PREFIX "cpuid"
173#endif
174
175#endif /* ASM_X86__XEN__INTERFACE_H */
diff --git a/include/asm-x86/xen/interface_32.h b/include/asm-x86/xen/interface_32.h
deleted file mode 100644
index 08167e19fc66..000000000000
--- a/include/asm-x86/xen/interface_32.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/******************************************************************************
2 * arch-x86_32.h
3 *
4 * Guest OS interface to x86 32-bit Xen.
5 *
6 * Copyright (c) 2004, K A Fraser
7 */
8
9#ifndef ASM_X86__XEN__INTERFACE_32_H
10#define ASM_X86__XEN__INTERFACE_32_H
11
12
13/*
14 * These flat segments are in the Xen-private section of every GDT. Since these
15 * are also present in the initial GDT, many OSes will be able to avoid
16 * installing their own GDT.
17 */
18#define FLAT_RING1_CS 0xe019 /* GDT index 259 */
19#define FLAT_RING1_DS 0xe021 /* GDT index 260 */
20#define FLAT_RING1_SS 0xe021 /* GDT index 260 */
21#define FLAT_RING3_CS 0xe02b /* GDT index 261 */
22#define FLAT_RING3_DS 0xe033 /* GDT index 262 */
23#define FLAT_RING3_SS 0xe033 /* GDT index 262 */
24
25#define FLAT_KERNEL_CS FLAT_RING1_CS
26#define FLAT_KERNEL_DS FLAT_RING1_DS
27#define FLAT_KERNEL_SS FLAT_RING1_SS
28#define FLAT_USER_CS FLAT_RING3_CS
29#define FLAT_USER_DS FLAT_RING3_DS
30#define FLAT_USER_SS FLAT_RING3_SS
31
32/* And the trap vector is... */
33#define TRAP_INSTR "int $0x82"
34
35/*
36 * Virtual addresses beyond this are not modifiable by guest OSes. The
37 * machine->physical mapping table starts at this address, read-only.
38 */
39#define __HYPERVISOR_VIRT_START 0xF5800000
40
41#ifndef __ASSEMBLY__
42
43struct cpu_user_regs {
44 uint32_t ebx;
45 uint32_t ecx;
46 uint32_t edx;
47 uint32_t esi;
48 uint32_t edi;
49 uint32_t ebp;
50 uint32_t eax;
51 uint16_t error_code; /* private */
52 uint16_t entry_vector; /* private */
53 uint32_t eip;
54 uint16_t cs;
55 uint8_t saved_upcall_mask;
56 uint8_t _pad0;
57 uint32_t eflags; /* eflags.IF == !saved_upcall_mask */
58 uint32_t esp;
59 uint16_t ss, _pad1;
60 uint16_t es, _pad2;
61 uint16_t ds, _pad3;
62 uint16_t fs, _pad4;
63 uint16_t gs, _pad5;
64};
65DEFINE_GUEST_HANDLE_STRUCT(cpu_user_regs);
66
67typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
68
69struct arch_vcpu_info {
70 unsigned long cr2;
71 unsigned long pad[5]; /* sizeof(struct vcpu_info) == 64 */
72};
73
74struct xen_callback {
75 unsigned long cs;
76 unsigned long eip;
77};
78typedef struct xen_callback xen_callback_t;
79
80#define XEN_CALLBACK(__cs, __eip) \
81 ((struct xen_callback){ .cs = (__cs), .eip = (unsigned long)(__eip) })
82#endif /* !__ASSEMBLY__ */
83
84
85/*
86 * Page-directory addresses above 4GB do not fit into architectural %cr3.
87 * When accessing %cr3, or equivalent field in vcpu_guest_context, guests
88 * must use the following accessor macros to pack/unpack valid MFNs.
89 *
90 * Note that Xen is using the fact that the pagetable base is always
91 * page-aligned, and putting the 12 MSB of the address into the 12 LSB
92 * of cr3.
93 */
94#define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20))
95#define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20))
96
97#endif /* ASM_X86__XEN__INTERFACE_32_H */
diff --git a/include/asm-x86/xen/interface_64.h b/include/asm-x86/xen/interface_64.h
deleted file mode 100644
index 046c0f1e01d4..000000000000
--- a/include/asm-x86/xen/interface_64.h
+++ /dev/null
@@ -1,159 +0,0 @@
1#ifndef ASM_X86__XEN__INTERFACE_64_H
2#define ASM_X86__XEN__INTERFACE_64_H
3
4/*
5 * 64-bit segment selectors
6 * These flat segments are in the Xen-private section of every GDT. Since these
7 * are also present in the initial GDT, many OSes will be able to avoid
8 * installing their own GDT.
9 */
10
11#define FLAT_RING3_CS32 0xe023 /* GDT index 260 */
12#define FLAT_RING3_CS64 0xe033 /* GDT index 261 */
13#define FLAT_RING3_DS32 0xe02b /* GDT index 262 */
14#define FLAT_RING3_DS64 0x0000 /* NULL selector */
15#define FLAT_RING3_SS32 0xe02b /* GDT index 262 */
16#define FLAT_RING3_SS64 0xe02b /* GDT index 262 */
17
18#define FLAT_KERNEL_DS64 FLAT_RING3_DS64
19#define FLAT_KERNEL_DS32 FLAT_RING3_DS32
20#define FLAT_KERNEL_DS FLAT_KERNEL_DS64
21#define FLAT_KERNEL_CS64 FLAT_RING3_CS64
22#define FLAT_KERNEL_CS32 FLAT_RING3_CS32
23#define FLAT_KERNEL_CS FLAT_KERNEL_CS64
24#define FLAT_KERNEL_SS64 FLAT_RING3_SS64
25#define FLAT_KERNEL_SS32 FLAT_RING3_SS32
26#define FLAT_KERNEL_SS FLAT_KERNEL_SS64
27
28#define FLAT_USER_DS64 FLAT_RING3_DS64
29#define FLAT_USER_DS32 FLAT_RING3_DS32
30#define FLAT_USER_DS FLAT_USER_DS64
31#define FLAT_USER_CS64 FLAT_RING3_CS64
32#define FLAT_USER_CS32 FLAT_RING3_CS32
33#define FLAT_USER_CS FLAT_USER_CS64
34#define FLAT_USER_SS64 FLAT_RING3_SS64
35#define FLAT_USER_SS32 FLAT_RING3_SS32
36#define FLAT_USER_SS FLAT_USER_SS64
37
38#define __HYPERVISOR_VIRT_START 0xFFFF800000000000
39#define __HYPERVISOR_VIRT_END 0xFFFF880000000000
40#define __MACH2PHYS_VIRT_START 0xFFFF800000000000
41#define __MACH2PHYS_VIRT_END 0xFFFF804000000000
42
43#ifndef HYPERVISOR_VIRT_START
44#define HYPERVISOR_VIRT_START mk_unsigned_long(__HYPERVISOR_VIRT_START)
45#define HYPERVISOR_VIRT_END mk_unsigned_long(__HYPERVISOR_VIRT_END)
46#endif
47
48#define MACH2PHYS_VIRT_START mk_unsigned_long(__MACH2PHYS_VIRT_START)
49#define MACH2PHYS_VIRT_END mk_unsigned_long(__MACH2PHYS_VIRT_END)
50#define MACH2PHYS_NR_ENTRIES ((MACH2PHYS_VIRT_END-MACH2PHYS_VIRT_START)>>3)
51#ifndef machine_to_phys_mapping
52#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
53#endif
54
55/*
56 * int HYPERVISOR_set_segment_base(unsigned int which, unsigned long base)
57 * @which == SEGBASE_* ; @base == 64-bit base address
58 * Returns 0 on success.
59 */
60#define SEGBASE_FS 0
61#define SEGBASE_GS_USER 1
62#define SEGBASE_GS_KERNEL 2
63#define SEGBASE_GS_USER_SEL 3 /* Set user %gs specified in base[15:0] */
64
65/*
66 * int HYPERVISOR_iret(void)
67 * All arguments are on the kernel stack, in the following format.
68 * Never returns if successful. Current kernel context is lost.
69 * The saved CS is mapped as follows:
70 * RING0 -> RING3 kernel mode.
71 * RING1 -> RING3 kernel mode.
72 * RING2 -> RING3 kernel mode.
73 * RING3 -> RING3 user mode.
74 * However RING0 indicates that the guest kernel should return to iteself
75 * directly with
76 * orb $3,1*8(%rsp)
77 * iretq
78 * If flags contains VGCF_in_syscall:
79 * Restore RAX, RIP, RFLAGS, RSP.
80 * Discard R11, RCX, CS, SS.
81 * Otherwise:
82 * Restore RAX, R11, RCX, CS:RIP, RFLAGS, SS:RSP.
83 * All other registers are saved on hypercall entry and restored to user.
84 */
85/* Guest exited in SYSCALL context? Return to guest with SYSRET? */
86#define _VGCF_in_syscall 8
87#define VGCF_in_syscall (1<<_VGCF_in_syscall)
88#define VGCF_IN_SYSCALL VGCF_in_syscall
89
90#ifndef __ASSEMBLY__
91
92struct iret_context {
93 /* Top of stack (%rsp at point of hypercall). */
94 uint64_t rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
95 /* Bottom of iret stack frame. */
96};
97
98#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
99/* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
100#define __DECL_REG(name) union { \
101 uint64_t r ## name, e ## name; \
102 uint32_t _e ## name; \
103}
104#else
105/* Non-gcc sources must always use the proper 64-bit name (e.g., rax). */
106#define __DECL_REG(name) uint64_t r ## name
107#endif
108
109struct cpu_user_regs {
110 uint64_t r15;
111 uint64_t r14;
112 uint64_t r13;
113 uint64_t r12;
114 __DECL_REG(bp);
115 __DECL_REG(bx);
116 uint64_t r11;
117 uint64_t r10;
118 uint64_t r9;
119 uint64_t r8;
120 __DECL_REG(ax);
121 __DECL_REG(cx);
122 __DECL_REG(dx);
123 __DECL_REG(si);
124 __DECL_REG(di);
125 uint32_t error_code; /* private */
126 uint32_t entry_vector; /* private */
127 __DECL_REG(ip);
128 uint16_t cs, _pad0[1];
129 uint8_t saved_upcall_mask;
130 uint8_t _pad1[3];
131 __DECL_REG(flags); /* rflags.IF == !saved_upcall_mask */
132 __DECL_REG(sp);
133 uint16_t ss, _pad2[3];
134 uint16_t es, _pad3[3];
135 uint16_t ds, _pad4[3];
136 uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base. */
137 uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */
138};
139DEFINE_GUEST_HANDLE_STRUCT(cpu_user_regs);
140
141#undef __DECL_REG
142
143#define xen_pfn_to_cr3(pfn) ((unsigned long)(pfn) << 12)
144#define xen_cr3_to_pfn(cr3) ((unsigned long)(cr3) >> 12)
145
146struct arch_vcpu_info {
147 unsigned long cr2;
148 unsigned long pad; /* sizeof(vcpu_info_t) == 64 */
149};
150
151typedef unsigned long xen_callback_t;
152
153#define XEN_CALLBACK(__cs, __rip) \
154 ((unsigned long)(__rip))
155
156#endif /* !__ASSEMBLY__ */
157
158
159#endif /* ASM_X86__XEN__INTERFACE_64_H */
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h
deleted file mode 100644
index c50185dccec1..000000000000
--- a/include/asm-x86/xen/page.h
+++ /dev/null
@@ -1,165 +0,0 @@
1#ifndef ASM_X86__XEN__PAGE_H
2#define ASM_X86__XEN__PAGE_H
3
4#include <linux/pfn.h>
5
6#include <asm/uaccess.h>
7#include <asm/pgtable.h>
8
9#include <xen/features.h>
10
11/* Xen machine address */
12typedef struct xmaddr {
13 phys_addr_t maddr;
14} xmaddr_t;
15
16/* Xen pseudo-physical address */
17typedef struct xpaddr {
18 phys_addr_t paddr;
19} xpaddr_t;
20
21#define XMADDR(x) ((xmaddr_t) { .maddr = (x) })
22#define XPADDR(x) ((xpaddr_t) { .paddr = (x) })
23
24/**** MACHINE <-> PHYSICAL CONVERSION MACROS ****/
25#define INVALID_P2M_ENTRY (~0UL)
26#define FOREIGN_FRAME_BIT (1UL<<31)
27#define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT)
28
29/* Maximum amount of memory we can handle in a domain in pages */
30#define MAX_DOMAIN_PAGES \
31 ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE))
32
33
34extern unsigned long get_phys_to_machine(unsigned long pfn);
35extern void set_phys_to_machine(unsigned long pfn, unsigned long mfn);
36
37static inline unsigned long pfn_to_mfn(unsigned long pfn)
38{
39 if (xen_feature(XENFEAT_auto_translated_physmap))
40 return pfn;
41
42 return get_phys_to_machine(pfn) & ~FOREIGN_FRAME_BIT;
43}
44
45static inline int phys_to_machine_mapping_valid(unsigned long pfn)
46{
47 if (xen_feature(XENFEAT_auto_translated_physmap))
48 return 1;
49
50 return get_phys_to_machine(pfn) != INVALID_P2M_ENTRY;
51}
52
53static inline unsigned long mfn_to_pfn(unsigned long mfn)
54{
55 unsigned long pfn;
56
57 if (xen_feature(XENFEAT_auto_translated_physmap))
58 return mfn;
59
60#if 0
61 if (unlikely((mfn >> machine_to_phys_order) != 0))
62 return max_mapnr;
63#endif
64
65 pfn = 0;
66 /*
67 * The array access can fail (e.g., device space beyond end of RAM).
68 * In such cases it doesn't matter what we return (we return garbage),
69 * but we must handle the fault without crashing!
70 */
71 __get_user(pfn, &machine_to_phys_mapping[mfn]);
72
73 return pfn;
74}
75
76static inline xmaddr_t phys_to_machine(xpaddr_t phys)
77{
78 unsigned offset = phys.paddr & ~PAGE_MASK;
79 return XMADDR(PFN_PHYS((u64)pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset);
80}
81
82static inline xpaddr_t machine_to_phys(xmaddr_t machine)
83{
84 unsigned offset = machine.maddr & ~PAGE_MASK;
85 return XPADDR(PFN_PHYS((u64)mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset);
86}
87
88/*
89 * We detect special mappings in one of two ways:
90 * 1. If the MFN is an I/O page then Xen will set the m2p entry
91 * to be outside our maximum possible pseudophys range.
92 * 2. If the MFN belongs to a different domain then we will certainly
93 * not have MFN in our p2m table. Conversely, if the page is ours,
94 * then we'll have p2m(m2p(MFN))==MFN.
95 * If we detect a special mapping then it doesn't have a 'struct page'.
96 * We force !pfn_valid() by returning an out-of-range pointer.
97 *
98 * NB. These checks require that, for any MFN that is not in our reservation,
99 * there is no PFN such that p2m(PFN) == MFN. Otherwise we can get confused if
100 * we are foreign-mapping the MFN, and the other domain as m2p(MFN) == PFN.
101 * Yikes! Various places must poke in INVALID_P2M_ENTRY for safety.
102 *
103 * NB2. When deliberately mapping foreign pages into the p2m table, you *must*
104 * use FOREIGN_FRAME(). This will cause pte_pfn() to choke on it, as we
105 * require. In all the cases we care about, the FOREIGN_FRAME bit is
106 * masked (e.g., pfn_to_mfn()) so behaviour there is correct.
107 */
108static inline unsigned long mfn_to_local_pfn(unsigned long mfn)
109{
110 extern unsigned long max_mapnr;
111 unsigned long pfn = mfn_to_pfn(mfn);
112 if ((pfn < max_mapnr)
113 && !xen_feature(XENFEAT_auto_translated_physmap)
114 && (get_phys_to_machine(pfn) != mfn))
115 return max_mapnr; /* force !pfn_valid() */
116 /* XXX fixme; not true with sparsemem */
117 return pfn;
118}
119
120/* VIRT <-> MACHINE conversion */
121#define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v))))
122#define virt_to_mfn(v) (pfn_to_mfn(PFN_DOWN(__pa(v))))
123#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
124
125static inline unsigned long pte_mfn(pte_t pte)
126{
127 return (pte.pte & PTE_PFN_MASK) >> PAGE_SHIFT;
128}
129
130static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
131{
132 pte_t pte;
133
134 pte.pte = ((phys_addr_t)page_nr << PAGE_SHIFT) |
135 (pgprot_val(pgprot) & __supported_pte_mask);
136
137 return pte;
138}
139
140static inline pteval_t pte_val_ma(pte_t pte)
141{
142 return pte.pte;
143}
144
145static inline pte_t __pte_ma(pteval_t x)
146{
147 return (pte_t) { .pte = x };
148}
149
150#define pmd_val_ma(v) ((v).pmd)
151#ifdef __PAGETABLE_PUD_FOLDED
152#define pud_val_ma(v) ((v).pgd.pgd)
153#else
154#define pud_val_ma(v) ((v).pud)
155#endif
156#define __pmd_ma(x) ((pmd_t) { (x) } )
157
158#define pgd_val_ma(x) ((x).pgd)
159
160
161xmaddr_t arbitrary_virt_to_machine(void *address);
162void make_lowmem_page_readonly(void *vaddr);
163void make_lowmem_page_readwrite(void *vaddr);
164
165#endif /* ASM_X86__XEN__PAGE_H */
diff --git a/include/asm-x86/xor.h b/include/asm-x86/xor.h
deleted file mode 100644
index 11b3bb86e17b..000000000000
--- a/include/asm-x86/xor.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifdef CONFIG_X86_32
2# include "xor_32.h"
3#else
4# include "xor_64.h"
5#endif
diff --git a/include/asm-x86/xor_32.h b/include/asm-x86/xor_32.h
deleted file mode 100644
index 921b45840449..000000000000
--- a/include/asm-x86/xor_32.h
+++ /dev/null
@@ -1,888 +0,0 @@
1#ifndef ASM_X86__XOR_32_H
2#define ASM_X86__XOR_32_H
3
4/*
5 * Optimized RAID-5 checksumming functions for MMX and SSE.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * You should have received a copy of the GNU General Public License
13 * (for example /usr/src/linux/COPYING); if not, write to the Free
14 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17/*
18 * High-speed RAID5 checksumming functions utilizing MMX instructions.
19 * Copyright (C) 1998 Ingo Molnar.
20 */
21
22#define LD(x, y) " movq 8*("#x")(%1), %%mm"#y" ;\n"
23#define ST(x, y) " movq %%mm"#y", 8*("#x")(%1) ;\n"
24#define XO1(x, y) " pxor 8*("#x")(%2), %%mm"#y" ;\n"
25#define XO2(x, y) " pxor 8*("#x")(%3), %%mm"#y" ;\n"
26#define XO3(x, y) " pxor 8*("#x")(%4), %%mm"#y" ;\n"
27#define XO4(x, y) " pxor 8*("#x")(%5), %%mm"#y" ;\n"
28
29#include <asm/i387.h>
30
31static void
32xor_pII_mmx_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
33{
34 unsigned long lines = bytes >> 7;
35
36 kernel_fpu_begin();
37
38 asm volatile(
39#undef BLOCK
40#define BLOCK(i) \
41 LD(i, 0) \
42 LD(i + 1, 1) \
43 LD(i + 2, 2) \
44 LD(i + 3, 3) \
45 XO1(i, 0) \
46 ST(i, 0) \
47 XO1(i+1, 1) \
48 ST(i+1, 1) \
49 XO1(i + 2, 2) \
50 ST(i + 2, 2) \
51 XO1(i + 3, 3) \
52 ST(i + 3, 3)
53
54 " .align 32 ;\n"
55 " 1: ;\n"
56
57 BLOCK(0)
58 BLOCK(4)
59 BLOCK(8)
60 BLOCK(12)
61
62 " addl $128, %1 ;\n"
63 " addl $128, %2 ;\n"
64 " decl %0 ;\n"
65 " jnz 1b ;\n"
66 : "+r" (lines),
67 "+r" (p1), "+r" (p2)
68 :
69 : "memory");
70
71 kernel_fpu_end();
72}
73
74static void
75xor_pII_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
76 unsigned long *p3)
77{
78 unsigned long lines = bytes >> 7;
79
80 kernel_fpu_begin();
81
82 asm volatile(
83#undef BLOCK
84#define BLOCK(i) \
85 LD(i, 0) \
86 LD(i + 1, 1) \
87 LD(i + 2, 2) \
88 LD(i + 3, 3) \
89 XO1(i, 0) \
90 XO1(i + 1, 1) \
91 XO1(i + 2, 2) \
92 XO1(i + 3, 3) \
93 XO2(i, 0) \
94 ST(i, 0) \
95 XO2(i + 1, 1) \
96 ST(i + 1, 1) \
97 XO2(i + 2, 2) \
98 ST(i + 2, 2) \
99 XO2(i + 3, 3) \
100 ST(i + 3, 3)
101
102 " .align 32 ;\n"
103 " 1: ;\n"
104
105 BLOCK(0)
106 BLOCK(4)
107 BLOCK(8)
108 BLOCK(12)
109
110 " addl $128, %1 ;\n"
111 " addl $128, %2 ;\n"
112 " addl $128, %3 ;\n"
113 " decl %0 ;\n"
114 " jnz 1b ;\n"
115 : "+r" (lines),
116 "+r" (p1), "+r" (p2), "+r" (p3)
117 :
118 : "memory");
119
120 kernel_fpu_end();
121}
122
123static void
124xor_pII_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
125 unsigned long *p3, unsigned long *p4)
126{
127 unsigned long lines = bytes >> 7;
128
129 kernel_fpu_begin();
130
131 asm volatile(
132#undef BLOCK
133#define BLOCK(i) \
134 LD(i, 0) \
135 LD(i + 1, 1) \
136 LD(i + 2, 2) \
137 LD(i + 3, 3) \
138 XO1(i, 0) \
139 XO1(i + 1, 1) \
140 XO1(i + 2, 2) \
141 XO1(i + 3, 3) \
142 XO2(i, 0) \
143 XO2(i + 1, 1) \
144 XO2(i + 2, 2) \
145 XO2(i + 3, 3) \
146 XO3(i, 0) \
147 ST(i, 0) \
148 XO3(i + 1, 1) \
149 ST(i + 1, 1) \
150 XO3(i + 2, 2) \
151 ST(i + 2, 2) \
152 XO3(i + 3, 3) \
153 ST(i + 3, 3)
154
155 " .align 32 ;\n"
156 " 1: ;\n"
157
158 BLOCK(0)
159 BLOCK(4)
160 BLOCK(8)
161 BLOCK(12)
162
163 " addl $128, %1 ;\n"
164 " addl $128, %2 ;\n"
165 " addl $128, %3 ;\n"
166 " addl $128, %4 ;\n"
167 " decl %0 ;\n"
168 " jnz 1b ;\n"
169 : "+r" (lines),
170 "+r" (p1), "+r" (p2), "+r" (p3), "+r" (p4)
171 :
172 : "memory");
173
174 kernel_fpu_end();
175}
176
177
178static void
179xor_pII_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
180 unsigned long *p3, unsigned long *p4, unsigned long *p5)
181{
182 unsigned long lines = bytes >> 7;
183
184 kernel_fpu_begin();
185
186 /* Make sure GCC forgets anything it knows about p4 or p5,
187 such that it won't pass to the asm volatile below a
188 register that is shared with any other variable. That's
189 because we modify p4 and p5 there, but we can't mark them
190 as read/write, otherwise we'd overflow the 10-asm-operands
191 limit of GCC < 3.1. */
192 asm("" : "+r" (p4), "+r" (p5));
193
194 asm volatile(
195#undef BLOCK
196#define BLOCK(i) \
197 LD(i, 0) \
198 LD(i + 1, 1) \
199 LD(i + 2, 2) \
200 LD(i + 3, 3) \
201 XO1(i, 0) \
202 XO1(i + 1, 1) \
203 XO1(i + 2, 2) \
204 XO1(i + 3, 3) \
205 XO2(i, 0) \
206 XO2(i + 1, 1) \
207 XO2(i + 2, 2) \
208 XO2(i + 3, 3) \
209 XO3(i, 0) \
210 XO3(i + 1, 1) \
211 XO3(i + 2, 2) \
212 XO3(i + 3, 3) \
213 XO4(i, 0) \
214 ST(i, 0) \
215 XO4(i + 1, 1) \
216 ST(i + 1, 1) \
217 XO4(i + 2, 2) \
218 ST(i + 2, 2) \
219 XO4(i + 3, 3) \
220 ST(i + 3, 3)
221
222 " .align 32 ;\n"
223 " 1: ;\n"
224
225 BLOCK(0)
226 BLOCK(4)
227 BLOCK(8)
228 BLOCK(12)
229
230 " addl $128, %1 ;\n"
231 " addl $128, %2 ;\n"
232 " addl $128, %3 ;\n"
233 " addl $128, %4 ;\n"
234 " addl $128, %5 ;\n"
235 " decl %0 ;\n"
236 " jnz 1b ;\n"
237 : "+r" (lines),
238 "+r" (p1), "+r" (p2), "+r" (p3)
239 : "r" (p4), "r" (p5)
240 : "memory");
241
242 /* p4 and p5 were modified, and now the variables are dead.
243 Clobber them just to be sure nobody does something stupid
244 like assuming they have some legal value. */
245 asm("" : "=r" (p4), "=r" (p5));
246
247 kernel_fpu_end();
248}
249
250#undef LD
251#undef XO1
252#undef XO2
253#undef XO3
254#undef XO4
255#undef ST
256#undef BLOCK
257
258static void
259xor_p5_mmx_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
260{
261 unsigned long lines = bytes >> 6;
262
263 kernel_fpu_begin();
264
265 asm volatile(
266 " .align 32 ;\n"
267 " 1: ;\n"
268 " movq (%1), %%mm0 ;\n"
269 " movq 8(%1), %%mm1 ;\n"
270 " pxor (%2), %%mm0 ;\n"
271 " movq 16(%1), %%mm2 ;\n"
272 " movq %%mm0, (%1) ;\n"
273 " pxor 8(%2), %%mm1 ;\n"
274 " movq 24(%1), %%mm3 ;\n"
275 " movq %%mm1, 8(%1) ;\n"
276 " pxor 16(%2), %%mm2 ;\n"
277 " movq 32(%1), %%mm4 ;\n"
278 " movq %%mm2, 16(%1) ;\n"
279 " pxor 24(%2), %%mm3 ;\n"
280 " movq 40(%1), %%mm5 ;\n"
281 " movq %%mm3, 24(%1) ;\n"
282 " pxor 32(%2), %%mm4 ;\n"
283 " movq 48(%1), %%mm6 ;\n"
284 " movq %%mm4, 32(%1) ;\n"
285 " pxor 40(%2), %%mm5 ;\n"
286 " movq 56(%1), %%mm7 ;\n"
287 " movq %%mm5, 40(%1) ;\n"
288 " pxor 48(%2), %%mm6 ;\n"
289 " pxor 56(%2), %%mm7 ;\n"
290 " movq %%mm6, 48(%1) ;\n"
291 " movq %%mm7, 56(%1) ;\n"
292
293 " addl $64, %1 ;\n"
294 " addl $64, %2 ;\n"
295 " decl %0 ;\n"
296 " jnz 1b ;\n"
297 : "+r" (lines),
298 "+r" (p1), "+r" (p2)
299 :
300 : "memory");
301
302 kernel_fpu_end();
303}
304
305static void
306xor_p5_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
307 unsigned long *p3)
308{
309 unsigned long lines = bytes >> 6;
310
311 kernel_fpu_begin();
312
313 asm volatile(
314 " .align 32,0x90 ;\n"
315 " 1: ;\n"
316 " movq (%1), %%mm0 ;\n"
317 " movq 8(%1), %%mm1 ;\n"
318 " pxor (%2), %%mm0 ;\n"
319 " movq 16(%1), %%mm2 ;\n"
320 " pxor 8(%2), %%mm1 ;\n"
321 " pxor (%3), %%mm0 ;\n"
322 " pxor 16(%2), %%mm2 ;\n"
323 " movq %%mm0, (%1) ;\n"
324 " pxor 8(%3), %%mm1 ;\n"
325 " pxor 16(%3), %%mm2 ;\n"
326 " movq 24(%1), %%mm3 ;\n"
327 " movq %%mm1, 8(%1) ;\n"
328 " movq 32(%1), %%mm4 ;\n"
329 " movq 40(%1), %%mm5 ;\n"
330 " pxor 24(%2), %%mm3 ;\n"
331 " movq %%mm2, 16(%1) ;\n"
332 " pxor 32(%2), %%mm4 ;\n"
333 " pxor 24(%3), %%mm3 ;\n"
334 " pxor 40(%2), %%mm5 ;\n"
335 " movq %%mm3, 24(%1) ;\n"
336 " pxor 32(%3), %%mm4 ;\n"
337 " pxor 40(%3), %%mm5 ;\n"
338 " movq 48(%1), %%mm6 ;\n"
339 " movq %%mm4, 32(%1) ;\n"
340 " movq 56(%1), %%mm7 ;\n"
341 " pxor 48(%2), %%mm6 ;\n"
342 " movq %%mm5, 40(%1) ;\n"
343 " pxor 56(%2), %%mm7 ;\n"
344 " pxor 48(%3), %%mm6 ;\n"
345 " pxor 56(%3), %%mm7 ;\n"
346 " movq %%mm6, 48(%1) ;\n"
347 " movq %%mm7, 56(%1) ;\n"
348
349 " addl $64, %1 ;\n"
350 " addl $64, %2 ;\n"
351 " addl $64, %3 ;\n"
352 " decl %0 ;\n"
353 " jnz 1b ;\n"
354 : "+r" (lines),
355 "+r" (p1), "+r" (p2), "+r" (p3)
356 :
357 : "memory" );
358
359 kernel_fpu_end();
360}
361
362static void
363xor_p5_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
364 unsigned long *p3, unsigned long *p4)
365{
366 unsigned long lines = bytes >> 6;
367
368 kernel_fpu_begin();
369
370 asm volatile(
371 " .align 32,0x90 ;\n"
372 " 1: ;\n"
373 " movq (%1), %%mm0 ;\n"
374 " movq 8(%1), %%mm1 ;\n"
375 " pxor (%2), %%mm0 ;\n"
376 " movq 16(%1), %%mm2 ;\n"
377 " pxor 8(%2), %%mm1 ;\n"
378 " pxor (%3), %%mm0 ;\n"
379 " pxor 16(%2), %%mm2 ;\n"
380 " pxor 8(%3), %%mm1 ;\n"
381 " pxor (%4), %%mm0 ;\n"
382 " movq 24(%1), %%mm3 ;\n"
383 " pxor 16(%3), %%mm2 ;\n"
384 " pxor 8(%4), %%mm1 ;\n"
385 " movq %%mm0, (%1) ;\n"
386 " movq 32(%1), %%mm4 ;\n"
387 " pxor 24(%2), %%mm3 ;\n"
388 " pxor 16(%4), %%mm2 ;\n"
389 " movq %%mm1, 8(%1) ;\n"
390 " movq 40(%1), %%mm5 ;\n"
391 " pxor 32(%2), %%mm4 ;\n"
392 " pxor 24(%3), %%mm3 ;\n"
393 " movq %%mm2, 16(%1) ;\n"
394 " pxor 40(%2), %%mm5 ;\n"
395 " pxor 32(%3), %%mm4 ;\n"
396 " pxor 24(%4), %%mm3 ;\n"
397 " movq %%mm3, 24(%1) ;\n"
398 " movq 56(%1), %%mm7 ;\n"
399 " movq 48(%1), %%mm6 ;\n"
400 " pxor 40(%3), %%mm5 ;\n"
401 " pxor 32(%4), %%mm4 ;\n"
402 " pxor 48(%2), %%mm6 ;\n"
403 " movq %%mm4, 32(%1) ;\n"
404 " pxor 56(%2), %%mm7 ;\n"
405 " pxor 40(%4), %%mm5 ;\n"
406 " pxor 48(%3), %%mm6 ;\n"
407 " pxor 56(%3), %%mm7 ;\n"
408 " movq %%mm5, 40(%1) ;\n"
409 " pxor 48(%4), %%mm6 ;\n"
410 " pxor 56(%4), %%mm7 ;\n"
411 " movq %%mm6, 48(%1) ;\n"
412 " movq %%mm7, 56(%1) ;\n"
413
414 " addl $64, %1 ;\n"
415 " addl $64, %2 ;\n"
416 " addl $64, %3 ;\n"
417 " addl $64, %4 ;\n"
418 " decl %0 ;\n"
419 " jnz 1b ;\n"
420 : "+r" (lines),
421 "+r" (p1), "+r" (p2), "+r" (p3), "+r" (p4)
422 :
423 : "memory");
424
425 kernel_fpu_end();
426}
427
428static void
429xor_p5_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
430 unsigned long *p3, unsigned long *p4, unsigned long *p5)
431{
432 unsigned long lines = bytes >> 6;
433
434 kernel_fpu_begin();
435
436 /* Make sure GCC forgets anything it knows about p4 or p5,
437 such that it won't pass to the asm volatile below a
438 register that is shared with any other variable. That's
439 because we modify p4 and p5 there, but we can't mark them
440 as read/write, otherwise we'd overflow the 10-asm-operands
441 limit of GCC < 3.1. */
442 asm("" : "+r" (p4), "+r" (p5));
443
444 asm volatile(
445 " .align 32,0x90 ;\n"
446 " 1: ;\n"
447 " movq (%1), %%mm0 ;\n"
448 " movq 8(%1), %%mm1 ;\n"
449 " pxor (%2), %%mm0 ;\n"
450 " pxor 8(%2), %%mm1 ;\n"
451 " movq 16(%1), %%mm2 ;\n"
452 " pxor (%3), %%mm0 ;\n"
453 " pxor 8(%3), %%mm1 ;\n"
454 " pxor 16(%2), %%mm2 ;\n"
455 " pxor (%4), %%mm0 ;\n"
456 " pxor 8(%4), %%mm1 ;\n"
457 " pxor 16(%3), %%mm2 ;\n"
458 " movq 24(%1), %%mm3 ;\n"
459 " pxor (%5), %%mm0 ;\n"
460 " pxor 8(%5), %%mm1 ;\n"
461 " movq %%mm0, (%1) ;\n"
462 " pxor 16(%4), %%mm2 ;\n"
463 " pxor 24(%2), %%mm3 ;\n"
464 " movq %%mm1, 8(%1) ;\n"
465 " pxor 16(%5), %%mm2 ;\n"
466 " pxor 24(%3), %%mm3 ;\n"
467 " movq 32(%1), %%mm4 ;\n"
468 " movq %%mm2, 16(%1) ;\n"
469 " pxor 24(%4), %%mm3 ;\n"
470 " pxor 32(%2), %%mm4 ;\n"
471 " movq 40(%1), %%mm5 ;\n"
472 " pxor 24(%5), %%mm3 ;\n"
473 " pxor 32(%3), %%mm4 ;\n"
474 " pxor 40(%2), %%mm5 ;\n"
475 " movq %%mm3, 24(%1) ;\n"
476 " pxor 32(%4), %%mm4 ;\n"
477 " pxor 40(%3), %%mm5 ;\n"
478 " movq 48(%1), %%mm6 ;\n"
479 " movq 56(%1), %%mm7 ;\n"
480 " pxor 32(%5), %%mm4 ;\n"
481 " pxor 40(%4), %%mm5 ;\n"
482 " pxor 48(%2), %%mm6 ;\n"
483 " pxor 56(%2), %%mm7 ;\n"
484 " movq %%mm4, 32(%1) ;\n"
485 " pxor 48(%3), %%mm6 ;\n"
486 " pxor 56(%3), %%mm7 ;\n"
487 " pxor 40(%5), %%mm5 ;\n"
488 " pxor 48(%4), %%mm6 ;\n"
489 " pxor 56(%4), %%mm7 ;\n"
490 " movq %%mm5, 40(%1) ;\n"
491 " pxor 48(%5), %%mm6 ;\n"
492 " pxor 56(%5), %%mm7 ;\n"
493 " movq %%mm6, 48(%1) ;\n"
494 " movq %%mm7, 56(%1) ;\n"
495
496 " addl $64, %1 ;\n"
497 " addl $64, %2 ;\n"
498 " addl $64, %3 ;\n"
499 " addl $64, %4 ;\n"
500 " addl $64, %5 ;\n"
501 " decl %0 ;\n"
502 " jnz 1b ;\n"
503 : "+r" (lines),
504 "+r" (p1), "+r" (p2), "+r" (p3)
505 : "r" (p4), "r" (p5)
506 : "memory");
507
508 /* p4 and p5 were modified, and now the variables are dead.
509 Clobber them just to be sure nobody does something stupid
510 like assuming they have some legal value. */
511 asm("" : "=r" (p4), "=r" (p5));
512
513 kernel_fpu_end();
514}
515
516static struct xor_block_template xor_block_pII_mmx = {
517 .name = "pII_mmx",
518 .do_2 = xor_pII_mmx_2,
519 .do_3 = xor_pII_mmx_3,
520 .do_4 = xor_pII_mmx_4,
521 .do_5 = xor_pII_mmx_5,
522};
523
524static struct xor_block_template xor_block_p5_mmx = {
525 .name = "p5_mmx",
526 .do_2 = xor_p5_mmx_2,
527 .do_3 = xor_p5_mmx_3,
528 .do_4 = xor_p5_mmx_4,
529 .do_5 = xor_p5_mmx_5,
530};
531
532/*
533 * Cache avoiding checksumming functions utilizing KNI instructions
534 * Copyright (C) 1999 Zach Brown (with obvious credit due Ingo)
535 */
536
537#define XMMS_SAVE \
538do { \
539 preempt_disable(); \
540 cr0 = read_cr0(); \
541 clts(); \
542 asm volatile( \
543 "movups %%xmm0,(%0) ;\n\t" \
544 "movups %%xmm1,0x10(%0) ;\n\t" \
545 "movups %%xmm2,0x20(%0) ;\n\t" \
546 "movups %%xmm3,0x30(%0) ;\n\t" \
547 : \
548 : "r" (xmm_save) \
549 : "memory"); \
550} while (0)
551
552#define XMMS_RESTORE \
553do { \
554 asm volatile( \
555 "sfence ;\n\t" \
556 "movups (%0),%%xmm0 ;\n\t" \
557 "movups 0x10(%0),%%xmm1 ;\n\t" \
558 "movups 0x20(%0),%%xmm2 ;\n\t" \
559 "movups 0x30(%0),%%xmm3 ;\n\t" \
560 : \
561 : "r" (xmm_save) \
562 : "memory"); \
563 write_cr0(cr0); \
564 preempt_enable(); \
565} while (0)
566
567#define ALIGN16 __attribute__((aligned(16)))
568
569#define OFFS(x) "16*("#x")"
570#define PF_OFFS(x) "256+16*("#x")"
571#define PF0(x) " prefetchnta "PF_OFFS(x)"(%1) ;\n"
572#define LD(x, y) " movaps "OFFS(x)"(%1), %%xmm"#y" ;\n"
573#define ST(x, y) " movaps %%xmm"#y", "OFFS(x)"(%1) ;\n"
574#define PF1(x) " prefetchnta "PF_OFFS(x)"(%2) ;\n"
575#define PF2(x) " prefetchnta "PF_OFFS(x)"(%3) ;\n"
576#define PF3(x) " prefetchnta "PF_OFFS(x)"(%4) ;\n"
577#define PF4(x) " prefetchnta "PF_OFFS(x)"(%5) ;\n"
578#define PF5(x) " prefetchnta "PF_OFFS(x)"(%6) ;\n"
579#define XO1(x, y) " xorps "OFFS(x)"(%2), %%xmm"#y" ;\n"
580#define XO2(x, y) " xorps "OFFS(x)"(%3), %%xmm"#y" ;\n"
581#define XO3(x, y) " xorps "OFFS(x)"(%4), %%xmm"#y" ;\n"
582#define XO4(x, y) " xorps "OFFS(x)"(%5), %%xmm"#y" ;\n"
583#define XO5(x, y) " xorps "OFFS(x)"(%6), %%xmm"#y" ;\n"
584
585
586static void
587xor_sse_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
588{
589 unsigned long lines = bytes >> 8;
590 char xmm_save[16*4] ALIGN16;
591 int cr0;
592
593 XMMS_SAVE;
594
595 asm volatile(
596#undef BLOCK
597#define BLOCK(i) \
598 LD(i, 0) \
599 LD(i + 1, 1) \
600 PF1(i) \
601 PF1(i + 2) \
602 LD(i + 2, 2) \
603 LD(i + 3, 3) \
604 PF0(i + 4) \
605 PF0(i + 6) \
606 XO1(i, 0) \
607 XO1(i + 1, 1) \
608 XO1(i + 2, 2) \
609 XO1(i + 3, 3) \
610 ST(i, 0) \
611 ST(i + 1, 1) \
612 ST(i + 2, 2) \
613 ST(i + 3, 3) \
614
615
616 PF0(0)
617 PF0(2)
618
619 " .align 32 ;\n"
620 " 1: ;\n"
621
622 BLOCK(0)
623 BLOCK(4)
624 BLOCK(8)
625 BLOCK(12)
626
627 " addl $256, %1 ;\n"
628 " addl $256, %2 ;\n"
629 " decl %0 ;\n"
630 " jnz 1b ;\n"
631 : "+r" (lines),
632 "+r" (p1), "+r" (p2)
633 :
634 : "memory");
635
636 XMMS_RESTORE;
637}
638
639static void
640xor_sse_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
641 unsigned long *p3)
642{
643 unsigned long lines = bytes >> 8;
644 char xmm_save[16*4] ALIGN16;
645 int cr0;
646
647 XMMS_SAVE;
648
649 asm volatile(
650#undef BLOCK
651#define BLOCK(i) \
652 PF1(i) \
653 PF1(i + 2) \
654 LD(i,0) \
655 LD(i + 1, 1) \
656 LD(i + 2, 2) \
657 LD(i + 3, 3) \
658 PF2(i) \
659 PF2(i + 2) \
660 PF0(i + 4) \
661 PF0(i + 6) \
662 XO1(i,0) \
663 XO1(i + 1, 1) \
664 XO1(i + 2, 2) \
665 XO1(i + 3, 3) \
666 XO2(i,0) \
667 XO2(i + 1, 1) \
668 XO2(i + 2, 2) \
669 XO2(i + 3, 3) \
670 ST(i,0) \
671 ST(i + 1, 1) \
672 ST(i + 2, 2) \
673 ST(i + 3, 3) \
674
675
676 PF0(0)
677 PF0(2)
678
679 " .align 32 ;\n"
680 " 1: ;\n"
681
682 BLOCK(0)
683 BLOCK(4)
684 BLOCK(8)
685 BLOCK(12)
686
687 " addl $256, %1 ;\n"
688 " addl $256, %2 ;\n"
689 " addl $256, %3 ;\n"
690 " decl %0 ;\n"
691 " jnz 1b ;\n"
692 : "+r" (lines),
693 "+r" (p1), "+r"(p2), "+r"(p3)
694 :
695 : "memory" );
696
697 XMMS_RESTORE;
698}
699
700static void
701xor_sse_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
702 unsigned long *p3, unsigned long *p4)
703{
704 unsigned long lines = bytes >> 8;
705 char xmm_save[16*4] ALIGN16;
706 int cr0;
707
708 XMMS_SAVE;
709
710 asm volatile(
711#undef BLOCK
712#define BLOCK(i) \
713 PF1(i) \
714 PF1(i + 2) \
715 LD(i,0) \
716 LD(i + 1, 1) \
717 LD(i + 2, 2) \
718 LD(i + 3, 3) \
719 PF2(i) \
720 PF2(i + 2) \
721 XO1(i,0) \
722 XO1(i + 1, 1) \
723 XO1(i + 2, 2) \
724 XO1(i + 3, 3) \
725 PF3(i) \
726 PF3(i + 2) \
727 PF0(i + 4) \
728 PF0(i + 6) \
729 XO2(i,0) \
730 XO2(i + 1, 1) \
731 XO2(i + 2, 2) \
732 XO2(i + 3, 3) \
733 XO3(i,0) \
734 XO3(i + 1, 1) \
735 XO3(i + 2, 2) \
736 XO3(i + 3, 3) \
737 ST(i,0) \
738 ST(i + 1, 1) \
739 ST(i + 2, 2) \
740 ST(i + 3, 3) \
741
742
743 PF0(0)
744 PF0(2)
745
746 " .align 32 ;\n"
747 " 1: ;\n"
748
749 BLOCK(0)
750 BLOCK(4)
751 BLOCK(8)
752 BLOCK(12)
753
754 " addl $256, %1 ;\n"
755 " addl $256, %2 ;\n"
756 " addl $256, %3 ;\n"
757 " addl $256, %4 ;\n"
758 " decl %0 ;\n"
759 " jnz 1b ;\n"
760 : "+r" (lines),
761 "+r" (p1), "+r" (p2), "+r" (p3), "+r" (p4)
762 :
763 : "memory" );
764
765 XMMS_RESTORE;
766}
767
768static void
769xor_sse_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
770 unsigned long *p3, unsigned long *p4, unsigned long *p5)
771{
772 unsigned long lines = bytes >> 8;
773 char xmm_save[16*4] ALIGN16;
774 int cr0;
775
776 XMMS_SAVE;
777
778 /* Make sure GCC forgets anything it knows about p4 or p5,
779 such that it won't pass to the asm volatile below a
780 register that is shared with any other variable. That's
781 because we modify p4 and p5 there, but we can't mark them
782 as read/write, otherwise we'd overflow the 10-asm-operands
783 limit of GCC < 3.1. */
784 asm("" : "+r" (p4), "+r" (p5));
785
786 asm volatile(
787#undef BLOCK
788#define BLOCK(i) \
789 PF1(i) \
790 PF1(i + 2) \
791 LD(i,0) \
792 LD(i + 1, 1) \
793 LD(i + 2, 2) \
794 LD(i + 3, 3) \
795 PF2(i) \
796 PF2(i + 2) \
797 XO1(i,0) \
798 XO1(i + 1, 1) \
799 XO1(i + 2, 2) \
800 XO1(i + 3, 3) \
801 PF3(i) \
802 PF3(i + 2) \
803 XO2(i,0) \
804 XO2(i + 1, 1) \
805 XO2(i + 2, 2) \
806 XO2(i + 3, 3) \
807 PF4(i) \
808 PF4(i + 2) \
809 PF0(i + 4) \
810 PF0(i + 6) \
811 XO3(i,0) \
812 XO3(i + 1, 1) \
813 XO3(i + 2, 2) \
814 XO3(i + 3, 3) \
815 XO4(i,0) \
816 XO4(i + 1, 1) \
817 XO4(i + 2, 2) \
818 XO4(i + 3, 3) \
819 ST(i,0) \
820 ST(i + 1, 1) \
821 ST(i + 2, 2) \
822 ST(i + 3, 3) \
823
824
825 PF0(0)
826 PF0(2)
827
828 " .align 32 ;\n"
829 " 1: ;\n"
830
831 BLOCK(0)
832 BLOCK(4)
833 BLOCK(8)
834 BLOCK(12)
835
836 " addl $256, %1 ;\n"
837 " addl $256, %2 ;\n"
838 " addl $256, %3 ;\n"
839 " addl $256, %4 ;\n"
840 " addl $256, %5 ;\n"
841 " decl %0 ;\n"
842 " jnz 1b ;\n"
843 : "+r" (lines),
844 "+r" (p1), "+r" (p2), "+r" (p3)
845 : "r" (p4), "r" (p5)
846 : "memory");
847
848 /* p4 and p5 were modified, and now the variables are dead.
849 Clobber them just to be sure nobody does something stupid
850 like assuming they have some legal value. */
851 asm("" : "=r" (p4), "=r" (p5));
852
853 XMMS_RESTORE;
854}
855
856static struct xor_block_template xor_block_pIII_sse = {
857 .name = "pIII_sse",
858 .do_2 = xor_sse_2,
859 .do_3 = xor_sse_3,
860 .do_4 = xor_sse_4,
861 .do_5 = xor_sse_5,
862};
863
864/* Also try the generic routines. */
865#include <asm-generic/xor.h>
866
867#undef XOR_TRY_TEMPLATES
868#define XOR_TRY_TEMPLATES \
869do { \
870 xor_speed(&xor_block_8regs); \
871 xor_speed(&xor_block_8regs_p); \
872 xor_speed(&xor_block_32regs); \
873 xor_speed(&xor_block_32regs_p); \
874 if (cpu_has_xmm) \
875 xor_speed(&xor_block_pIII_sse); \
876 if (cpu_has_mmx) { \
877 xor_speed(&xor_block_pII_mmx); \
878 xor_speed(&xor_block_p5_mmx); \
879 } \
880} while (0)
881
882/* We force the use of the SSE xor block because it can write around L2.
883 We may also be able to load into the L1 only depending on how the cpu
884 deals with a load to a line that is being prefetched. */
885#define XOR_SELECT_TEMPLATE(FASTEST) \
886 (cpu_has_xmm ? &xor_block_pIII_sse : FASTEST)
887
888#endif /* ASM_X86__XOR_32_H */
diff --git a/include/asm-x86/xor_64.h b/include/asm-x86/xor_64.h
deleted file mode 100644
index 2d3a18de295b..000000000000
--- a/include/asm-x86/xor_64.h
+++ /dev/null
@@ -1,361 +0,0 @@
1#ifndef ASM_X86__XOR_64_H
2#define ASM_X86__XOR_64_H
3
4/*
5 * Optimized RAID-5 checksumming functions for MMX and SSE.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * You should have received a copy of the GNU General Public License
13 * (for example /usr/src/linux/COPYING); if not, write to the Free
14 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17
18/*
19 * Cache avoiding checksumming functions utilizing KNI instructions
20 * Copyright (C) 1999 Zach Brown (with obvious credit due Ingo)
21 */
22
23/*
24 * Based on
25 * High-speed RAID5 checksumming functions utilizing SSE instructions.
26 * Copyright (C) 1998 Ingo Molnar.
27 */
28
29/*
30 * x86-64 changes / gcc fixes from Andi Kleen.
31 * Copyright 2002 Andi Kleen, SuSE Labs.
32 *
33 * This hasn't been optimized for the hammer yet, but there are likely
34 * no advantages to be gotten from x86-64 here anyways.
35 */
36
37typedef struct {
38 unsigned long a, b;
39} __attribute__((aligned(16))) xmm_store_t;
40
41/* Doesn't use gcc to save the XMM registers, because there is no easy way to
42 tell it to do a clts before the register saving. */
43#define XMMS_SAVE \
44do { \
45 preempt_disable(); \
46 asm volatile( \
47 "movq %%cr0,%0 ;\n\t" \
48 "clts ;\n\t" \
49 "movups %%xmm0,(%1) ;\n\t" \
50 "movups %%xmm1,0x10(%1) ;\n\t" \
51 "movups %%xmm2,0x20(%1) ;\n\t" \
52 "movups %%xmm3,0x30(%1) ;\n\t" \
53 : "=&r" (cr0) \
54 : "r" (xmm_save) \
55 : "memory"); \
56} while (0)
57
58#define XMMS_RESTORE \
59do { \
60 asm volatile( \
61 "sfence ;\n\t" \
62 "movups (%1),%%xmm0 ;\n\t" \
63 "movups 0x10(%1),%%xmm1 ;\n\t" \
64 "movups 0x20(%1),%%xmm2 ;\n\t" \
65 "movups 0x30(%1),%%xmm3 ;\n\t" \
66 "movq %0,%%cr0 ;\n\t" \
67 : \
68 : "r" (cr0), "r" (xmm_save) \
69 : "memory"); \
70 preempt_enable(); \
71} while (0)
72
73#define OFFS(x) "16*("#x")"
74#define PF_OFFS(x) "256+16*("#x")"
75#define PF0(x) " prefetchnta "PF_OFFS(x)"(%[p1]) ;\n"
76#define LD(x, y) " movaps "OFFS(x)"(%[p1]), %%xmm"#y" ;\n"
77#define ST(x, y) " movaps %%xmm"#y", "OFFS(x)"(%[p1]) ;\n"
78#define PF1(x) " prefetchnta "PF_OFFS(x)"(%[p2]) ;\n"
79#define PF2(x) " prefetchnta "PF_OFFS(x)"(%[p3]) ;\n"
80#define PF3(x) " prefetchnta "PF_OFFS(x)"(%[p4]) ;\n"
81#define PF4(x) " prefetchnta "PF_OFFS(x)"(%[p5]) ;\n"
82#define PF5(x) " prefetchnta "PF_OFFS(x)"(%[p6]) ;\n"
83#define XO1(x, y) " xorps "OFFS(x)"(%[p2]), %%xmm"#y" ;\n"
84#define XO2(x, y) " xorps "OFFS(x)"(%[p3]), %%xmm"#y" ;\n"
85#define XO3(x, y) " xorps "OFFS(x)"(%[p4]), %%xmm"#y" ;\n"
86#define XO4(x, y) " xorps "OFFS(x)"(%[p5]), %%xmm"#y" ;\n"
87#define XO5(x, y) " xorps "OFFS(x)"(%[p6]), %%xmm"#y" ;\n"
88
89
90static void
91xor_sse_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
92{
93 unsigned int lines = bytes >> 8;
94 unsigned long cr0;
95 xmm_store_t xmm_save[4];
96
97 XMMS_SAVE;
98
99 asm volatile(
100#undef BLOCK
101#define BLOCK(i) \
102 LD(i, 0) \
103 LD(i + 1, 1) \
104 PF1(i) \
105 PF1(i + 2) \
106 LD(i + 2, 2) \
107 LD(i + 3, 3) \
108 PF0(i + 4) \
109 PF0(i + 6) \
110 XO1(i, 0) \
111 XO1(i + 1, 1) \
112 XO1(i + 2, 2) \
113 XO1(i + 3, 3) \
114 ST(i, 0) \
115 ST(i + 1, 1) \
116 ST(i + 2, 2) \
117 ST(i + 3, 3) \
118
119
120 PF0(0)
121 PF0(2)
122
123 " .align 32 ;\n"
124 " 1: ;\n"
125
126 BLOCK(0)
127 BLOCK(4)
128 BLOCK(8)
129 BLOCK(12)
130
131 " addq %[inc], %[p1] ;\n"
132 " addq %[inc], %[p2] ;\n"
133 " decl %[cnt] ; jnz 1b"
134 : [p1] "+r" (p1), [p2] "+r" (p2), [cnt] "+r" (lines)
135 : [inc] "r" (256UL)
136 : "memory");
137
138 XMMS_RESTORE;
139}
140
141static void
142xor_sse_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
143 unsigned long *p3)
144{
145 unsigned int lines = bytes >> 8;
146 xmm_store_t xmm_save[4];
147 unsigned long cr0;
148
149 XMMS_SAVE;
150
151 asm volatile(
152#undef BLOCK
153#define BLOCK(i) \
154 PF1(i) \
155 PF1(i + 2) \
156 LD(i, 0) \
157 LD(i + 1, 1) \
158 LD(i + 2, 2) \
159 LD(i + 3, 3) \
160 PF2(i) \
161 PF2(i + 2) \
162 PF0(i + 4) \
163 PF0(i + 6) \
164 XO1(i, 0) \
165 XO1(i + 1, 1) \
166 XO1(i + 2, 2) \
167 XO1(i + 3, 3) \
168 XO2(i, 0) \
169 XO2(i + 1, 1) \
170 XO2(i + 2, 2) \
171 XO2(i + 3, 3) \
172 ST(i, 0) \
173 ST(i + 1, 1) \
174 ST(i + 2, 2) \
175 ST(i + 3, 3) \
176
177
178 PF0(0)
179 PF0(2)
180
181 " .align 32 ;\n"
182 " 1: ;\n"
183
184 BLOCK(0)
185 BLOCK(4)
186 BLOCK(8)
187 BLOCK(12)
188
189 " addq %[inc], %[p1] ;\n"
190 " addq %[inc], %[p2] ;\n"
191 " addq %[inc], %[p3] ;\n"
192 " decl %[cnt] ; jnz 1b"
193 : [cnt] "+r" (lines),
194 [p1] "+r" (p1), [p2] "+r" (p2), [p3] "+r" (p3)
195 : [inc] "r" (256UL)
196 : "memory");
197 XMMS_RESTORE;
198}
199
200static void
201xor_sse_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
202 unsigned long *p3, unsigned long *p4)
203{
204 unsigned int lines = bytes >> 8;
205 xmm_store_t xmm_save[4];
206 unsigned long cr0;
207
208 XMMS_SAVE;
209
210 asm volatile(
211#undef BLOCK
212#define BLOCK(i) \
213 PF1(i) \
214 PF1(i + 2) \
215 LD(i, 0) \
216 LD(i + 1, 1) \
217 LD(i + 2, 2) \
218 LD(i + 3, 3) \
219 PF2(i) \
220 PF2(i + 2) \
221 XO1(i, 0) \
222 XO1(i + 1, 1) \
223 XO1(i + 2, 2) \
224 XO1(i + 3, 3) \
225 PF3(i) \
226 PF3(i + 2) \
227 PF0(i + 4) \
228 PF0(i + 6) \
229 XO2(i, 0) \
230 XO2(i + 1, 1) \
231 XO2(i + 2, 2) \
232 XO2(i + 3, 3) \
233 XO3(i, 0) \
234 XO3(i + 1, 1) \
235 XO3(i + 2, 2) \
236 XO3(i + 3, 3) \
237 ST(i, 0) \
238 ST(i + 1, 1) \
239 ST(i + 2, 2) \
240 ST(i + 3, 3) \
241
242
243 PF0(0)
244 PF0(2)
245
246 " .align 32 ;\n"
247 " 1: ;\n"
248
249 BLOCK(0)
250 BLOCK(4)
251 BLOCK(8)
252 BLOCK(12)
253
254 " addq %[inc], %[p1] ;\n"
255 " addq %[inc], %[p2] ;\n"
256 " addq %[inc], %[p3] ;\n"
257 " addq %[inc], %[p4] ;\n"
258 " decl %[cnt] ; jnz 1b"
259 : [cnt] "+c" (lines),
260 [p1] "+r" (p1), [p2] "+r" (p2), [p3] "+r" (p3), [p4] "+r" (p4)
261 : [inc] "r" (256UL)
262 : "memory" );
263
264 XMMS_RESTORE;
265}
266
267static void
268xor_sse_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
269 unsigned long *p3, unsigned long *p4, unsigned long *p5)
270{
271 unsigned int lines = bytes >> 8;
272 xmm_store_t xmm_save[4];
273 unsigned long cr0;
274
275 XMMS_SAVE;
276
277 asm volatile(
278#undef BLOCK
279#define BLOCK(i) \
280 PF1(i) \
281 PF1(i + 2) \
282 LD(i, 0) \
283 LD(i + 1, 1) \
284 LD(i + 2, 2) \
285 LD(i + 3, 3) \
286 PF2(i) \
287 PF2(i + 2) \
288 XO1(i, 0) \
289 XO1(i + 1, 1) \
290 XO1(i + 2, 2) \
291 XO1(i + 3, 3) \
292 PF3(i) \
293 PF3(i + 2) \
294 XO2(i, 0) \
295 XO2(i + 1, 1) \
296 XO2(i + 2, 2) \
297 XO2(i + 3, 3) \
298 PF4(i) \
299 PF4(i + 2) \
300 PF0(i + 4) \
301 PF0(i + 6) \
302 XO3(i, 0) \
303 XO3(i + 1, 1) \
304 XO3(i + 2, 2) \
305 XO3(i + 3, 3) \
306 XO4(i, 0) \
307 XO4(i + 1, 1) \
308 XO4(i + 2, 2) \
309 XO4(i + 3, 3) \
310 ST(i, 0) \
311 ST(i + 1, 1) \
312 ST(i + 2, 2) \
313 ST(i + 3, 3) \
314
315
316 PF0(0)
317 PF0(2)
318
319 " .align 32 ;\n"
320 " 1: ;\n"
321
322 BLOCK(0)
323 BLOCK(4)
324 BLOCK(8)
325 BLOCK(12)
326
327 " addq %[inc], %[p1] ;\n"
328 " addq %[inc], %[p2] ;\n"
329 " addq %[inc], %[p3] ;\n"
330 " addq %[inc], %[p4] ;\n"
331 " addq %[inc], %[p5] ;\n"
332 " decl %[cnt] ; jnz 1b"
333 : [cnt] "+c" (lines),
334 [p1] "+r" (p1), [p2] "+r" (p2), [p3] "+r" (p3), [p4] "+r" (p4),
335 [p5] "+r" (p5)
336 : [inc] "r" (256UL)
337 : "memory");
338
339 XMMS_RESTORE;
340}
341
342static struct xor_block_template xor_block_sse = {
343 .name = "generic_sse",
344 .do_2 = xor_sse_2,
345 .do_3 = xor_sse_3,
346 .do_4 = xor_sse_4,
347 .do_5 = xor_sse_5,
348};
349
350#undef XOR_TRY_TEMPLATES
351#define XOR_TRY_TEMPLATES \
352do { \
353 xor_speed(&xor_block_sse); \
354} while (0)
355
356/* We force the use of the SSE xor block because it can write around L2.
357 We may also be able to load into the L1 only depending on how the cpu
358 deals with a load to a line that is being prefetched. */
359#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
360
361#endif /* ASM_X86__XOR_64_H */
diff --git a/include/asm-x86/xsave.h b/include/asm-x86/xsave.h
deleted file mode 100644
index 08e9a1ac07a9..000000000000
--- a/include/asm-x86/xsave.h
+++ /dev/null
@@ -1,118 +0,0 @@
1#ifndef __ASM_X86_XSAVE_H
2#define __ASM_X86_XSAVE_H
3
4#include <linux/types.h>
5#include <asm/processor.h>
6#include <asm/i387.h>
7
8#define XSTATE_FP 0x1
9#define XSTATE_SSE 0x2
10
11#define XSTATE_FPSSE (XSTATE_FP | XSTATE_SSE)
12
13#define FXSAVE_SIZE 512
14
15/*
16 * These are the features that the OS can handle currently.
17 */
18#define XCNTXT_MASK (XSTATE_FP | XSTATE_SSE)
19
20#ifdef CONFIG_X86_64
21#define REX_PREFIX "0x48, "
22#else
23#define REX_PREFIX
24#endif
25
26extern unsigned int xstate_size;
27extern u64 pcntxt_mask;
28extern struct xsave_struct *init_xstate_buf;
29
30extern void xsave_cntxt_init(void);
31extern void xsave_init(void);
32extern int init_fpu(struct task_struct *child);
33extern int check_for_xstate(struct i387_fxsave_struct __user *buf,
34 void __user *fpstate,
35 struct _fpx_sw_bytes *sw);
36
37static inline int xrstor_checking(struct xsave_struct *fx)
38{
39 int err;
40
41 asm volatile("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n\t"
42 "2:\n"
43 ".section .fixup,\"ax\"\n"
44 "3: movl $-1,%[err]\n"
45 " jmp 2b\n"
46 ".previous\n"
47 _ASM_EXTABLE(1b, 3b)
48 : [err] "=r" (err)
49 : "D" (fx), "m" (*fx), "a" (-1), "d" (-1), "0" (0)
50 : "memory");
51
52 return err;
53}
54
55static inline int xsave_user(struct xsave_struct __user *buf)
56{
57 int err;
58 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x27\n"
59 "2:\n"
60 ".section .fixup,\"ax\"\n"
61 "3: movl $-1,%[err]\n"
62 " jmp 2b\n"
63 ".previous\n"
64 ".section __ex_table,\"a\"\n"
65 _ASM_ALIGN "\n"
66 _ASM_PTR "1b,3b\n"
67 ".previous"
68 : [err] "=r" (err)
69 : "D" (buf), "a" (-1), "d" (-1), "0" (0)
70 : "memory");
71 if (unlikely(err) && __clear_user(buf, xstate_size))
72 err = -EFAULT;
73 /* No need to clear here because the caller clears USED_MATH */
74 return err;
75}
76
77static inline int xrestore_user(struct xsave_struct __user *buf, u64 mask)
78{
79 int err;
80 struct xsave_struct *xstate = ((__force struct xsave_struct *)buf);
81 u32 lmask = mask;
82 u32 hmask = mask >> 32;
83
84 __asm__ __volatile__("1: .byte " REX_PREFIX "0x0f,0xae,0x2f\n"
85 "2:\n"
86 ".section .fixup,\"ax\"\n"
87 "3: movl $-1,%[err]\n"
88 " jmp 2b\n"
89 ".previous\n"
90 ".section __ex_table,\"a\"\n"
91 _ASM_ALIGN "\n"
92 _ASM_PTR "1b,3b\n"
93 ".previous"
94 : [err] "=r" (err)
95 : "D" (xstate), "a" (lmask), "d" (hmask), "0" (0)
96 : "memory"); /* memory required? */
97 return err;
98}
99
100static inline void xrstor_state(struct xsave_struct *fx, u64 mask)
101{
102 u32 lmask = mask;
103 u32 hmask = mask >> 32;
104
105 asm volatile(".byte " REX_PREFIX "0x0f,0xae,0x2f\n\t"
106 : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
107 : "memory");
108}
109
110static inline void xsave(struct task_struct *tsk)
111{
112 /* This, however, we can work around by forcing the compiler to select
113 an addressing mode that doesn't require extended registers. */
114 __asm__ __volatile__(".byte " REX_PREFIX "0x0f,0xae,0x27"
115 : : "D" (&(tsk->thread.xstate->xsave)),
116 "a" (-1), "d"(-1) : "memory");
117}
118#endif
diff --git a/include/asm-xtensa/elf.h b/include/asm-xtensa/elf.h
index ca6e5101a2cb..c3f53e755ca5 100644
--- a/include/asm-xtensa/elf.h
+++ b/include/asm-xtensa/elf.h
@@ -189,7 +189,7 @@ typedef struct {
189#endif 189#endif
190} elf_xtregs_t; 190} elf_xtregs_t;
191 191
192#define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 192#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT)
193 193
194struct task_struct; 194struct task_struct;
195 195
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h
index 47c3616ea9ac..07b7299dab20 100644
--- a/include/asm-xtensa/io.h
+++ b/include/asm-xtensa/io.h
@@ -18,10 +18,12 @@
18 18
19#include <linux/types.h> 19#include <linux/types.h>
20 20
21#define XCHAL_KIO_CACHED_VADDR 0xf0000000 21#define XCHAL_KIO_CACHED_VADDR 0xe0000000
22#define XCHAL_KIO_BYPASS_VADDR 0xf8000000 22#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
23#define XCHAL_KIO_PADDR 0xf0000000 23#define XCHAL_KIO_PADDR 0xf0000000
24#define XCHAL_KIO_SIZE 0x08000000 24#define XCHAL_KIO_SIZE 0x10000000
25
26#define IOADDR(x) (XCHAL_KIO_BYPASS_VADDR + (x))
25 27
26/* 28/*
27 * swap functions to change byte order from little-endian to big-endian and 29 * swap functions to change byte order from little-endian to big-endian and
diff --git a/include/asm-xtensa/rwsem.h b/include/asm-xtensa/rwsem.h
index 0aad3a587551..e39edf5c86f2 100644
--- a/include/asm-xtensa/rwsem.h
+++ b/include/asm-xtensa/rwsem.h
@@ -13,6 +13,10 @@
13#ifndef _XTENSA_RWSEM_H 13#ifndef _XTENSA_RWSEM_H
14#define _XTENSA_RWSEM_H 14#define _XTENSA_RWSEM_H
15 15
16#ifndef _LINUX_RWSEM_H
17#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
18#endif
19
16#include <linux/list.h> 20#include <linux/list.h>
17#include <linux/spinlock.h> 21#include <linux/spinlock.h>
18#include <asm/atomic.h> 22#include <asm/atomic.h>
diff --git a/include/asm-xtensa/thread_info.h b/include/asm-xtensa/thread_info.h
index 7e4131dd546c..0f4fe1faf9ba 100644
--- a/include/asm-xtensa/thread_info.h
+++ b/include/asm-xtensa/thread_info.h
@@ -134,6 +134,7 @@ static inline struct thread_info *current_thread_info(void)
134#define TIF_MEMDIE 5 134#define TIF_MEMDIE 5
135#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ 135#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
136#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 136#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
137#define TIF_FREEZE 17 /* is freezing for suspend */
137 138
138#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 139#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
139#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 140#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
@@ -142,6 +143,7 @@ static inline struct thread_info *current_thread_info(void)
142#define _TIF_IRET (1<<TIF_IRET) 143#define _TIF_IRET (1<<TIF_IRET)
143#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 144#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
144#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 145#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
146#define _TIF_FREEZE (1<<TIF_FREEZE)
145 147
146#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 148#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
147#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 149#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
diff --git a/include/asm-xtensa/variant-dc232b/core.h b/include/asm-xtensa/variant-dc232b/core.h
new file mode 100644
index 000000000000..525bd3d90154
--- /dev/null
+++ b/include/asm-xtensa/variant-dc232b/core.h
@@ -0,0 +1,424 @@
1/*
2 * Xtensa processor core configuration information.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (c) 1999-2007 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_CORE_CONFIGURATION_H
12#define _XTENSA_CORE_CONFIGURATION_H
13
14
15/****************************************************************************
16 Parameters Useful for Any Code, USER or PRIVILEGED
17 ****************************************************************************/
18
19/*
20 * Note: Macros of the form XCHAL_HAVE_*** have a value of 1 if the option is
21 * configured, and a value of 0 otherwise. These macros are always defined.
22 */
23
24
25/*----------------------------------------------------------------------
26 ISA
27 ----------------------------------------------------------------------*/
28
29#define XCHAL_HAVE_BE 0 /* big-endian byte ordering */
30#define XCHAL_HAVE_WINDOWED 1 /* windowed registers option */
31#define XCHAL_NUM_AREGS 32 /* num of physical addr regs */
32#define XCHAL_NUM_AREGS_LOG2 5 /* log2(XCHAL_NUM_AREGS) */
33#define XCHAL_MAX_INSTRUCTION_SIZE 3 /* max instr bytes (3..8) */
34#define XCHAL_HAVE_DEBUG 1 /* debug option */
35#define XCHAL_HAVE_DENSITY 1 /* 16-bit instructions */
36#define XCHAL_HAVE_LOOPS 1 /* zero-overhead loops */
37#define XCHAL_HAVE_NSA 1 /* NSA/NSAU instructions */
38#define XCHAL_HAVE_MINMAX 1 /* MIN/MAX instructions */
39#define XCHAL_HAVE_SEXT 1 /* SEXT instruction */
40#define XCHAL_HAVE_CLAMPS 1 /* CLAMPS instruction */
41#define XCHAL_HAVE_MUL16 1 /* MUL16S/MUL16U instructions */
42#define XCHAL_HAVE_MUL32 1 /* MULL instruction */
43#define XCHAL_HAVE_MUL32_HIGH 0 /* MULUH/MULSH instructions */
44#define XCHAL_HAVE_DIV32 1 /* QUOS/QUOU/REMS/REMU instructions */
45#define XCHAL_HAVE_L32R 1 /* L32R instruction */
46#define XCHAL_HAVE_ABSOLUTE_LITERALS 1 /* non-PC-rel (extended) L32R */
47#define XCHAL_HAVE_CONST16 0 /* CONST16 instruction */
48#define XCHAL_HAVE_ADDX 1 /* ADDX#/SUBX# instructions */
49#define XCHAL_HAVE_WIDE_BRANCHES 0 /* B*.W18 or B*.W15 instr's */
50#define XCHAL_HAVE_PREDICTED_BRANCHES 0 /* B[EQ/EQZ/NE/NEZ]T instr's */
51#define XCHAL_HAVE_CALL4AND12 1 /* (obsolete option) */
52#define XCHAL_HAVE_ABS 1 /* ABS instruction */
53/*#define XCHAL_HAVE_POPC 0*/ /* POPC instruction */
54/*#define XCHAL_HAVE_CRC 0*/ /* CRC instruction */
55#define XCHAL_HAVE_RELEASE_SYNC 1 /* L32AI/S32RI instructions */
56#define XCHAL_HAVE_S32C1I 1 /* S32C1I instruction */
57#define XCHAL_HAVE_SPECULATION 0 /* speculation */
58#define XCHAL_HAVE_FULL_RESET 1 /* all regs/state reset */
59#define XCHAL_NUM_CONTEXTS 1 /* */
60#define XCHAL_NUM_MISC_REGS 2 /* num of scratch regs (0..4) */
61#define XCHAL_HAVE_TAP_MASTER 0 /* JTAG TAP control instr's */
62#define XCHAL_HAVE_PRID 1 /* processor ID register */
63#define XCHAL_HAVE_THREADPTR 1 /* THREADPTR register */
64#define XCHAL_HAVE_BOOLEANS 0 /* boolean registers */
65#define XCHAL_HAVE_CP 1 /* CPENABLE reg (coprocessor) */
66#define XCHAL_CP_MAXCFG 8 /* max allowed cp id plus one */
67#define XCHAL_HAVE_MAC16 1 /* MAC16 package */
68#define XCHAL_HAVE_VECTORFPU2005 0 /* vector floating-point pkg */
69#define XCHAL_HAVE_FP 0 /* floating point pkg */
70#define XCHAL_HAVE_VECTRA1 0 /* Vectra I pkg */
71#define XCHAL_HAVE_VECTRALX 0 /* Vectra LX pkg */
72#define XCHAL_HAVE_HIFI2 0 /* HiFi2 Audio Engine pkg */
73
74
75/*----------------------------------------------------------------------
76 MISC
77 ----------------------------------------------------------------------*/
78
79#define XCHAL_NUM_WRITEBUFFER_ENTRIES 8 /* size of write buffer */
80#define XCHAL_INST_FETCH_WIDTH 4 /* instr-fetch width in bytes */
81#define XCHAL_DATA_WIDTH 4 /* data width in bytes */
82/* In T1050, applies to selected core load and store instructions (see ISA): */
83#define XCHAL_UNALIGNED_LOAD_EXCEPTION 1 /* unaligned loads cause exc. */
84#define XCHAL_UNALIGNED_STORE_EXCEPTION 1 /* unaligned stores cause exc.*/
85
86#define XCHAL_SW_VERSION 701001 /* sw version of this header */
87
88#define XCHAL_CORE_ID "dc232b" /* alphanum core name
89 (CoreID) set in the Xtensa
90 Processor Generator */
91
92#define XCHAL_CORE_DESCRIPTION "Diamond 232L Standard Core Rev.B (LE)"
93#define XCHAL_BUILD_UNIQUE_ID 0x0000BEEF /* 22-bit sw build ID */
94
95/*
96 * These definitions describe the hardware targeted by this software.
97 */
98#define XCHAL_HW_CONFIGID0 0xC56307FE /* ConfigID hi 32 bits*/
99#define XCHAL_HW_CONFIGID1 0x0D40BEEF /* ConfigID lo 32 bits*/
100#define XCHAL_HW_VERSION_NAME "LX2.1.1" /* full version name */
101#define XCHAL_HW_VERSION_MAJOR 2210 /* major ver# of targeted hw */
102#define XCHAL_HW_VERSION_MINOR 1 /* minor ver# of targeted hw */
103#define XCHAL_HW_VERSION 221001 /* major*100+minor */
104#define XCHAL_HW_REL_LX2 1
105#define XCHAL_HW_REL_LX2_1 1
106#define XCHAL_HW_REL_LX2_1_1 1
107#define XCHAL_HW_CONFIGID_RELIABLE 1
108/* If software targets a *range* of hardware versions, these are the bounds: */
109#define XCHAL_HW_MIN_VERSION_MAJOR 2210 /* major v of earliest tgt hw */
110#define XCHAL_HW_MIN_VERSION_MINOR 1 /* minor v of earliest tgt hw */
111#define XCHAL_HW_MIN_VERSION 221001 /* earliest targeted hw */
112#define XCHAL_HW_MAX_VERSION_MAJOR 2210 /* major v of latest tgt hw */
113#define XCHAL_HW_MAX_VERSION_MINOR 1 /* minor v of latest tgt hw */
114#define XCHAL_HW_MAX_VERSION 221001 /* latest targeted hw */
115
116
117/*----------------------------------------------------------------------
118 CACHE
119 ----------------------------------------------------------------------*/
120
121#define XCHAL_ICACHE_LINESIZE 32 /* I-cache line size in bytes */
122#define XCHAL_DCACHE_LINESIZE 32 /* D-cache line size in bytes */
123#define XCHAL_ICACHE_LINEWIDTH 5 /* log2(I line size in bytes) */
124#define XCHAL_DCACHE_LINEWIDTH 5 /* log2(D line size in bytes) */
125
126#define XCHAL_ICACHE_SIZE 16384 /* I-cache size in bytes or 0 */
127#define XCHAL_DCACHE_SIZE 16384 /* D-cache size in bytes or 0 */
128
129#define XCHAL_DCACHE_IS_WRITEBACK 1 /* writeback feature */
130
131
132
133
134/****************************************************************************
135 Parameters Useful for PRIVILEGED (Supervisory or Non-Virtualized) Code
136 ****************************************************************************/
137
138
139#ifndef XTENSA_HAL_NON_PRIVILEGED_ONLY
140
141/*----------------------------------------------------------------------
142 CACHE
143 ----------------------------------------------------------------------*/
144
145#define XCHAL_HAVE_PIF 1 /* any outbound PIF present */
146
147/* If present, cache size in bytes == (ways * 2^(linewidth + setwidth)). */
148
149/* Number of cache sets in log2(lines per way): */
150#define XCHAL_ICACHE_SETWIDTH 7
151#define XCHAL_DCACHE_SETWIDTH 7
152
153/* Cache set associativity (number of ways): */
154#define XCHAL_ICACHE_WAYS 4
155#define XCHAL_DCACHE_WAYS 4
156
157/* Cache features: */
158#define XCHAL_ICACHE_LINE_LOCKABLE 1
159#define XCHAL_DCACHE_LINE_LOCKABLE 1
160#define XCHAL_ICACHE_ECC_PARITY 0
161#define XCHAL_DCACHE_ECC_PARITY 0
162
163/* Number of encoded cache attr bits (see <xtensa/hal.h> for decoded bits): */
164#define XCHAL_CA_BITS 4
165
166
167/*----------------------------------------------------------------------
168 INTERNAL I/D RAM/ROMs and XLMI
169 ----------------------------------------------------------------------*/
170
171#define XCHAL_NUM_INSTROM 0 /* number of core instr. ROMs */
172#define XCHAL_NUM_INSTRAM 0 /* number of core instr. RAMs */
173#define XCHAL_NUM_DATAROM 0 /* number of core data ROMs */
174#define XCHAL_NUM_DATARAM 0 /* number of core data RAMs */
175#define XCHAL_NUM_URAM 0 /* number of core unified RAMs*/
176#define XCHAL_NUM_XLMI 0 /* number of core XLMI ports */
177
178
179/*----------------------------------------------------------------------
180 INTERRUPTS and TIMERS
181 ----------------------------------------------------------------------*/
182
183#define XCHAL_HAVE_INTERRUPTS 1 /* interrupt option */
184#define XCHAL_HAVE_HIGHPRI_INTERRUPTS 1 /* med/high-pri. interrupts */
185#define XCHAL_HAVE_NMI 1 /* non-maskable interrupt */
186#define XCHAL_HAVE_CCOUNT 1 /* CCOUNT reg. (timer option) */
187#define XCHAL_NUM_TIMERS 3 /* number of CCOMPAREn regs */
188#define XCHAL_NUM_INTERRUPTS 22 /* number of interrupts */
189#define XCHAL_NUM_INTERRUPTS_LOG2 5 /* ceil(log2(NUM_INTERRUPTS)) */
190#define XCHAL_NUM_EXTINTERRUPTS 17 /* num of external interrupts */
191#define XCHAL_NUM_INTLEVELS 6 /* number of interrupt levels
192 (not including level zero) */
193#define XCHAL_EXCM_LEVEL 3 /* level masked by PS.EXCM */
194 /* (always 1 in XEA1; levels 2 .. EXCM_LEVEL are "medium priority") */
195
196/* Masks of interrupts at each interrupt level: */
197#define XCHAL_INTLEVEL1_MASK 0x001F80FF
198#define XCHAL_INTLEVEL2_MASK 0x00000100
199#define XCHAL_INTLEVEL3_MASK 0x00200E00
200#define XCHAL_INTLEVEL4_MASK 0x00001000
201#define XCHAL_INTLEVEL5_MASK 0x00002000
202#define XCHAL_INTLEVEL6_MASK 0x00000000
203#define XCHAL_INTLEVEL7_MASK 0x00004000
204
205/* Masks of interrupts at each range 1..n of interrupt levels: */
206#define XCHAL_INTLEVEL1_ANDBELOW_MASK 0x001F80FF
207#define XCHAL_INTLEVEL2_ANDBELOW_MASK 0x001F81FF
208#define XCHAL_INTLEVEL3_ANDBELOW_MASK 0x003F8FFF
209#define XCHAL_INTLEVEL4_ANDBELOW_MASK 0x003F9FFF
210#define XCHAL_INTLEVEL5_ANDBELOW_MASK 0x003FBFFF
211#define XCHAL_INTLEVEL6_ANDBELOW_MASK 0x003FBFFF
212#define XCHAL_INTLEVEL7_ANDBELOW_MASK 0x003FFFFF
213
214/* Level of each interrupt: */
215#define XCHAL_INT0_LEVEL 1
216#define XCHAL_INT1_LEVEL 1
217#define XCHAL_INT2_LEVEL 1
218#define XCHAL_INT3_LEVEL 1
219#define XCHAL_INT4_LEVEL 1
220#define XCHAL_INT5_LEVEL 1
221#define XCHAL_INT6_LEVEL 1
222#define XCHAL_INT7_LEVEL 1
223#define XCHAL_INT8_LEVEL 2
224#define XCHAL_INT9_LEVEL 3
225#define XCHAL_INT10_LEVEL 3
226#define XCHAL_INT11_LEVEL 3
227#define XCHAL_INT12_LEVEL 4
228#define XCHAL_INT13_LEVEL 5
229#define XCHAL_INT14_LEVEL 7
230#define XCHAL_INT15_LEVEL 1
231#define XCHAL_INT16_LEVEL 1
232#define XCHAL_INT17_LEVEL 1
233#define XCHAL_INT18_LEVEL 1
234#define XCHAL_INT19_LEVEL 1
235#define XCHAL_INT20_LEVEL 1
236#define XCHAL_INT21_LEVEL 3
237#define XCHAL_DEBUGLEVEL 6 /* debug interrupt level */
238#define XCHAL_HAVE_DEBUG_EXTERN_INT 1 /* OCD external db interrupt */
239#define XCHAL_NMILEVEL 7 /* NMI "level" (for use with
240 EXCSAVE/EPS/EPC_n, RFI n) */
241
242/* Type of each interrupt: */
243#define XCHAL_INT0_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
244#define XCHAL_INT1_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
245#define XCHAL_INT2_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
246#define XCHAL_INT3_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
247#define XCHAL_INT4_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
248#define XCHAL_INT5_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
249#define XCHAL_INT6_TYPE XTHAL_INTTYPE_TIMER
250#define XCHAL_INT7_TYPE XTHAL_INTTYPE_SOFTWARE
251#define XCHAL_INT8_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
252#define XCHAL_INT9_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
253#define XCHAL_INT10_TYPE XTHAL_INTTYPE_TIMER
254#define XCHAL_INT11_TYPE XTHAL_INTTYPE_SOFTWARE
255#define XCHAL_INT12_TYPE XTHAL_INTTYPE_EXTERN_LEVEL
256#define XCHAL_INT13_TYPE XTHAL_INTTYPE_TIMER
257#define XCHAL_INT14_TYPE XTHAL_INTTYPE_NMI
258#define XCHAL_INT15_TYPE XTHAL_INTTYPE_EXTERN_EDGE
259#define XCHAL_INT16_TYPE XTHAL_INTTYPE_EXTERN_EDGE
260#define XCHAL_INT17_TYPE XTHAL_INTTYPE_EXTERN_EDGE
261#define XCHAL_INT18_TYPE XTHAL_INTTYPE_EXTERN_EDGE
262#define XCHAL_INT19_TYPE XTHAL_INTTYPE_EXTERN_EDGE
263#define XCHAL_INT20_TYPE XTHAL_INTTYPE_EXTERN_EDGE
264#define XCHAL_INT21_TYPE XTHAL_INTTYPE_EXTERN_EDGE
265
266/* Masks of interrupts for each type of interrupt: */
267#define XCHAL_INTTYPE_MASK_UNCONFIGURED 0xFFC00000
268#define XCHAL_INTTYPE_MASK_SOFTWARE 0x00000880
269#define XCHAL_INTTYPE_MASK_EXTERN_EDGE 0x003F8000
270#define XCHAL_INTTYPE_MASK_EXTERN_LEVEL 0x0000133F
271#define XCHAL_INTTYPE_MASK_TIMER 0x00002440
272#define XCHAL_INTTYPE_MASK_NMI 0x00004000
273#define XCHAL_INTTYPE_MASK_WRITE_ERROR 0x00000000
274
275/* Interrupt numbers assigned to specific interrupt sources: */
276#define XCHAL_TIMER0_INTERRUPT 6 /* CCOMPARE0 */
277#define XCHAL_TIMER1_INTERRUPT 10 /* CCOMPARE1 */
278#define XCHAL_TIMER2_INTERRUPT 13 /* CCOMPARE2 */
279#define XCHAL_TIMER3_INTERRUPT XTHAL_TIMER_UNCONFIGURED
280#define XCHAL_NMI_INTERRUPT 14 /* non-maskable interrupt */
281
282/* Interrupt numbers for levels at which only one interrupt is configured: */
283#define XCHAL_INTLEVEL2_NUM 8
284#define XCHAL_INTLEVEL4_NUM 12
285#define XCHAL_INTLEVEL5_NUM 13
286#define XCHAL_INTLEVEL7_NUM 14
287/* (There are many interrupts each at level(s) 1, 3.) */
288
289
290/*
291 * External interrupt vectors/levels.
292 * These macros describe how Xtensa processor interrupt numbers
293 * (as numbered internally, eg. in INTERRUPT and INTENABLE registers)
294 * map to external BInterrupt<n> pins, for those interrupts
295 * configured as external (level-triggered, edge-triggered, or NMI).
296 * See the Xtensa processor databook for more details.
297 */
298
299/* Core interrupt numbers mapped to each EXTERNAL interrupt number: */
300#define XCHAL_EXTINT0_NUM 0 /* (intlevel 1) */
301#define XCHAL_EXTINT1_NUM 1 /* (intlevel 1) */
302#define XCHAL_EXTINT2_NUM 2 /* (intlevel 1) */
303#define XCHAL_EXTINT3_NUM 3 /* (intlevel 1) */
304#define XCHAL_EXTINT4_NUM 4 /* (intlevel 1) */
305#define XCHAL_EXTINT5_NUM 5 /* (intlevel 1) */
306#define XCHAL_EXTINT6_NUM 8 /* (intlevel 2) */
307#define XCHAL_EXTINT7_NUM 9 /* (intlevel 3) */
308#define XCHAL_EXTINT8_NUM 12 /* (intlevel 4) */
309#define XCHAL_EXTINT9_NUM 14 /* (intlevel 7) */
310#define XCHAL_EXTINT10_NUM 15 /* (intlevel 1) */
311#define XCHAL_EXTINT11_NUM 16 /* (intlevel 1) */
312#define XCHAL_EXTINT12_NUM 17 /* (intlevel 1) */
313#define XCHAL_EXTINT13_NUM 18 /* (intlevel 1) */
314#define XCHAL_EXTINT14_NUM 19 /* (intlevel 1) */
315#define XCHAL_EXTINT15_NUM 20 /* (intlevel 1) */
316#define XCHAL_EXTINT16_NUM 21 /* (intlevel 3) */
317
318
319/*----------------------------------------------------------------------
320 EXCEPTIONS and VECTORS
321 ----------------------------------------------------------------------*/
322
323#define XCHAL_XEA_VERSION 2 /* Xtensa Exception Architecture
324 number: 1 == XEA1 (old)
325 2 == XEA2 (new)
326 0 == XEAX (extern) */
327#define XCHAL_HAVE_XEA1 0 /* Exception Architecture 1 */
328#define XCHAL_HAVE_XEA2 1 /* Exception Architecture 2 */
329#define XCHAL_HAVE_XEAX 0 /* External Exception Arch. */
330#define XCHAL_HAVE_EXCEPTIONS 1 /* exception option */
331#define XCHAL_HAVE_MEM_ECC_PARITY 0 /* local memory ECC/parity */
332#define XCHAL_HAVE_VECTOR_SELECT 1 /* relocatable vectors */
333#define XCHAL_HAVE_VECBASE 1 /* relocatable vectors */
334#define XCHAL_VECBASE_RESET_VADDR 0xD0000000 /* VECBASE reset value */
335#define XCHAL_VECBASE_RESET_PADDR 0x00000000
336#define XCHAL_RESET_VECBASE_OVERLAP 0
337
338#define XCHAL_RESET_VECTOR0_VADDR 0xFE000000
339#define XCHAL_RESET_VECTOR0_PADDR 0xFE000000
340#define XCHAL_RESET_VECTOR1_VADDR 0xD8000500
341#define XCHAL_RESET_VECTOR1_PADDR 0x00000500
342#define XCHAL_RESET_VECTOR_VADDR 0xFE000000
343#define XCHAL_RESET_VECTOR_PADDR 0xFE000000
344#define XCHAL_USER_VECOFS 0x00000340
345#define XCHAL_USER_VECTOR_VADDR 0xD0000340
346#define XCHAL_USER_VECTOR_PADDR 0x00000340
347#define XCHAL_KERNEL_VECOFS 0x00000300
348#define XCHAL_KERNEL_VECTOR_VADDR 0xD0000300
349#define XCHAL_KERNEL_VECTOR_PADDR 0x00000300
350#define XCHAL_DOUBLEEXC_VECOFS 0x000003C0
351#define XCHAL_DOUBLEEXC_VECTOR_VADDR 0xD00003C0
352#define XCHAL_DOUBLEEXC_VECTOR_PADDR 0x000003C0
353#define XCHAL_WINDOW_OF4_VECOFS 0x00000000
354#define XCHAL_WINDOW_UF4_VECOFS 0x00000040
355#define XCHAL_WINDOW_OF8_VECOFS 0x00000080
356#define XCHAL_WINDOW_UF8_VECOFS 0x000000C0
357#define XCHAL_WINDOW_OF12_VECOFS 0x00000100
358#define XCHAL_WINDOW_UF12_VECOFS 0x00000140
359#define XCHAL_WINDOW_VECTORS_VADDR 0xD0000000
360#define XCHAL_WINDOW_VECTORS_PADDR 0x00000000
361#define XCHAL_INTLEVEL2_VECOFS 0x00000180
362#define XCHAL_INTLEVEL2_VECTOR_VADDR 0xD0000180
363#define XCHAL_INTLEVEL2_VECTOR_PADDR 0x00000180
364#define XCHAL_INTLEVEL3_VECOFS 0x000001C0
365#define XCHAL_INTLEVEL3_VECTOR_VADDR 0xD00001C0
366#define XCHAL_INTLEVEL3_VECTOR_PADDR 0x000001C0
367#define XCHAL_INTLEVEL4_VECOFS 0x00000200
368#define XCHAL_INTLEVEL4_VECTOR_VADDR 0xD0000200
369#define XCHAL_INTLEVEL4_VECTOR_PADDR 0x00000200
370#define XCHAL_INTLEVEL5_VECOFS 0x00000240
371#define XCHAL_INTLEVEL5_VECTOR_VADDR 0xD0000240
372#define XCHAL_INTLEVEL5_VECTOR_PADDR 0x00000240
373#define XCHAL_INTLEVEL6_VECOFS 0x00000280
374#define XCHAL_INTLEVEL6_VECTOR_VADDR 0xD0000280
375#define XCHAL_INTLEVEL6_VECTOR_PADDR 0x00000280
376#define XCHAL_DEBUG_VECOFS XCHAL_INTLEVEL6_VECOFS
377#define XCHAL_DEBUG_VECTOR_VADDR XCHAL_INTLEVEL6_VECTOR_VADDR
378#define XCHAL_DEBUG_VECTOR_PADDR XCHAL_INTLEVEL6_VECTOR_PADDR
379#define XCHAL_NMI_VECOFS 0x000002C0
380#define XCHAL_NMI_VECTOR_VADDR 0xD00002C0
381#define XCHAL_NMI_VECTOR_PADDR 0x000002C0
382#define XCHAL_INTLEVEL7_VECOFS XCHAL_NMI_VECOFS
383#define XCHAL_INTLEVEL7_VECTOR_VADDR XCHAL_NMI_VECTOR_VADDR
384#define XCHAL_INTLEVEL7_VECTOR_PADDR XCHAL_NMI_VECTOR_PADDR
385
386
387/*----------------------------------------------------------------------
388 DEBUG
389 ----------------------------------------------------------------------*/
390
391#define XCHAL_HAVE_OCD 1 /* OnChipDebug option */
392#define XCHAL_NUM_IBREAK 2 /* number of IBREAKn regs */
393#define XCHAL_NUM_DBREAK 2 /* number of DBREAKn regs */
394#define XCHAL_HAVE_OCD_DIR_ARRAY 1 /* faster OCD option */
395
396
397/*----------------------------------------------------------------------
398 MMU
399 ----------------------------------------------------------------------*/
400
401/* See core-matmap.h header file for more details. */
402
403#define XCHAL_HAVE_TLBS 1 /* inverse of HAVE_CACHEATTR */
404#define XCHAL_HAVE_SPANNING_WAY 0 /* one way maps I+D 4GB vaddr */
405#define XCHAL_HAVE_IDENTITY_MAP 0 /* vaddr == paddr always */
406#define XCHAL_HAVE_CACHEATTR 0 /* CACHEATTR register present */
407#define XCHAL_HAVE_MIMIC_CACHEATTR 0 /* region protection */
408#define XCHAL_HAVE_XLT_CACHEATTR 0 /* region prot. w/translation */
409#define XCHAL_HAVE_PTP_MMU 1 /* full MMU (with page table
410 [autorefill] and protection)
411 usable for an MMU-based OS */
412/* If none of the above last 4 are set, it's a custom TLB configuration. */
413#define XCHAL_ITLB_ARF_ENTRIES_LOG2 2 /* log2(autorefill way size) */
414#define XCHAL_DTLB_ARF_ENTRIES_LOG2 2 /* log2(autorefill way size) */
415
416#define XCHAL_MMU_ASID_BITS 8 /* number of bits in ASIDs */
417#define XCHAL_MMU_RINGS 4 /* number of rings (1..4) */
418#define XCHAL_MMU_RING_BITS 2 /* num of bits in RING field */
419
420#endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
421
422
423#endif /* _XTENSA_CORE_CONFIGURATION_H */
424
diff --git a/include/asm-xtensa/variant-dc232b/tie-asm.h b/include/asm-xtensa/variant-dc232b/tie-asm.h
new file mode 100644
index 000000000000..ed4f53f529db
--- /dev/null
+++ b/include/asm-xtensa/variant-dc232b/tie-asm.h
@@ -0,0 +1,122 @@
1/*
2 * This header file contains assembly-language definitions (assembly
3 * macros, etc.) for this specific Xtensa processor's TIE extensions
4 * and options. It is customized to this Xtensa processor configuration.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1999-2007 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_CORE_TIE_ASM_H
14#define _XTENSA_CORE_TIE_ASM_H
15
16/* Selection parameter values for save-area save/restore macros: */
17/* Option vs. TIE: */
18#define XTHAL_SAS_TIE 0x0001 /* custom extension or coprocessor */
19#define XTHAL_SAS_OPT 0x0002 /* optional (and not a coprocessor) */
20/* Whether used automatically by compiler: */
21#define XTHAL_SAS_NOCC 0x0004 /* not used by compiler w/o special opts/code */
22#define XTHAL_SAS_CC 0x0008 /* used by compiler without special opts/code */
23/* ABI handling across function calls: */
24#define XTHAL_SAS_CALR 0x0010 /* caller-saved */
25#define XTHAL_SAS_CALE 0x0020 /* callee-saved */
26#define XTHAL_SAS_GLOB 0x0040 /* global across function calls (in thread) */
27/* Misc */
28#define XTHAL_SAS_ALL 0xFFFF /* include all default NCP contents */
29
30
31
32/* Macro to save all non-coprocessor (extra) custom TIE and optional state
33 * (not including zero-overhead loop registers).
34 * Save area ptr (clobbered): ptr (1 byte aligned)
35 * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)
36 */
37 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
38 xchal_sa_start \continue, \ofs
39 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~\select
40 xchal_sa_align \ptr, 0, 1024-8, 4, 4
41 rsr \at1, ACCLO // MAC16 accumulator
42 rsr \at2, ACCHI
43 s32i \at1, \ptr, .Lxchal_ofs_ + 0
44 s32i \at2, \ptr, .Lxchal_ofs_ + 4
45 .set .Lxchal_ofs_, .Lxchal_ofs_ + 8
46 .endif
47 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
48 xchal_sa_align \ptr, 0, 1024-16, 4, 4
49 rsr \at1, M0 // MAC16 registers
50 rsr \at2, M1
51 s32i \at1, \ptr, .Lxchal_ofs_ + 0
52 s32i \at2, \ptr, .Lxchal_ofs_ + 4
53 rsr \at1, M2
54 rsr \at2, M3
55 s32i \at1, \ptr, .Lxchal_ofs_ + 8
56 s32i \at2, \ptr, .Lxchal_ofs_ + 12
57 .set .Lxchal_ofs_, .Lxchal_ofs_ + 16
58 .endif
59 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
60 xchal_sa_align \ptr, 0, 1024-4, 4, 4
61 rsr \at1, SCOMPARE1 // conditional store option
62 s32i \at1, \ptr, .Lxchal_ofs_ + 0
63 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
64 .endif
65 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
66 xchal_sa_align \ptr, 0, 1024-4, 4, 4
67 rur \at1, THREADPTR // threadptr option
68 s32i \at1, \ptr, .Lxchal_ofs_ + 0
69 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
70 .endif
71 .endm // xchal_ncp_store
72
73/* Macro to save all non-coprocessor (extra) custom TIE and optional state
74 * (not including zero-overhead loop registers).
75 * Save area ptr (clobbered): ptr (1 byte aligned)
76 * Scratch regs (clobbered): at1..at4 (only first XCHAL_NCP_NUM_ATMPS needed)
77 */
78 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
79 xchal_sa_start \continue, \ofs
80 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~\select
81 xchal_sa_align \ptr, 0, 1024-8, 4, 4
82 l32i \at1, \ptr, .Lxchal_ofs_ + 0
83 l32i \at2, \ptr, .Lxchal_ofs_ + 4
84 wsr \at1, ACCLO // MAC16 accumulator
85 wsr \at2, ACCHI
86 .set .Lxchal_ofs_, .Lxchal_ofs_ + 8
87 .endif
88 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
89 xchal_sa_align \ptr, 0, 1024-16, 4, 4
90 l32i \at1, \ptr, .Lxchal_ofs_ + 0
91 l32i \at2, \ptr, .Lxchal_ofs_ + 4
92 wsr \at1, M0 // MAC16 registers
93 wsr \at2, M1
94 l32i \at1, \ptr, .Lxchal_ofs_ + 8
95 l32i \at2, \ptr, .Lxchal_ofs_ + 12
96 wsr \at1, M2
97 wsr \at2, M3
98 .set .Lxchal_ofs_, .Lxchal_ofs_ + 16
99 .endif
100 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~\select
101 xchal_sa_align \ptr, 0, 1024-4, 4, 4
102 l32i \at1, \ptr, .Lxchal_ofs_ + 0
103 wsr \at1, SCOMPARE1 // conditional store option
104 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
105 .endif
106 .ifeq (XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~\select
107 xchal_sa_align \ptr, 0, 1024-4, 4, 4
108 l32i \at1, \ptr, .Lxchal_ofs_ + 0
109 wur \at1, THREADPTR // threadptr option
110 .set .Lxchal_ofs_, .Lxchal_ofs_ + 4
111 .endif
112 .endm // xchal_ncp_load
113
114
115
116#define XCHAL_NCP_NUM_ATMPS 2
117
118
119#define XCHAL_SA_NUM_ATMPS 2
120
121#endif /*_XTENSA_CORE_TIE_ASM_H*/
122
diff --git a/include/asm-xtensa/variant-dc232b/tie.h b/include/asm-xtensa/variant-dc232b/tie.h
new file mode 100644
index 000000000000..018e81af4393
--- /dev/null
+++ b/include/asm-xtensa/variant-dc232b/tie.h
@@ -0,0 +1,131 @@
1/*
2 * This header file describes this specific Xtensa processor's TIE extensions
3 * that extend basic Xtensa core functionality. It is customized to this
4 * Xtensa processor configuration.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1999-2007 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_CORE_TIE_H
14#define _XTENSA_CORE_TIE_H
15
16#define XCHAL_CP_NUM 1 /* number of coprocessors */
17#define XCHAL_CP_MAX 8 /* max CP ID + 1 (0 if none) */
18#define XCHAL_CP_MASK 0x80 /* bitmask of all CPs by ID */
19#define XCHAL_CP_PORT_MASK 0x80 /* bitmask of only port CPs */
20
21/* Basic parameters of each coprocessor: */
22#define XCHAL_CP7_NAME "XTIOP"
23#define XCHAL_CP7_IDENT XTIOP
24#define XCHAL_CP7_SA_SIZE 0 /* size of state save area */
25#define XCHAL_CP7_SA_ALIGN 1 /* min alignment of save area */
26#define XCHAL_CP_ID_XTIOP 7 /* coprocessor ID (0..7) */
27
28/* Filler info for unassigned coprocessors, to simplify arrays etc: */
29#define XCHAL_CP0_SA_SIZE 0
30#define XCHAL_CP0_SA_ALIGN 1
31#define XCHAL_CP1_SA_SIZE 0
32#define XCHAL_CP1_SA_ALIGN 1
33#define XCHAL_CP2_SA_SIZE 0
34#define XCHAL_CP2_SA_ALIGN 1
35#define XCHAL_CP3_SA_SIZE 0
36#define XCHAL_CP3_SA_ALIGN 1
37#define XCHAL_CP4_SA_SIZE 0
38#define XCHAL_CP4_SA_ALIGN 1
39#define XCHAL_CP5_SA_SIZE 0
40#define XCHAL_CP5_SA_ALIGN 1
41#define XCHAL_CP6_SA_SIZE 0
42#define XCHAL_CP6_SA_ALIGN 1
43
44/* Save area for non-coprocessor optional and custom (TIE) state: */
45#define XCHAL_NCP_SA_SIZE 32
46#define XCHAL_NCP_SA_ALIGN 4
47
48/* Total save area for optional and custom state (NCP + CPn): */
49#define XCHAL_TOTAL_SA_SIZE 32 /* with 16-byte align padding */
50#define XCHAL_TOTAL_SA_ALIGN 4 /* actual minimum alignment */
51
52/*
53 * Detailed contents of save areas.
54 * NOTE: caller must define the XCHAL_SA_REG macro (not defined here)
55 * before expanding the XCHAL_xxx_SA_LIST() macros.
56 *
57 * XCHAL_SA_REG(s,ccused,abikind,kind,opt,name,galign,align,asize,
58 * dbnum,base,regnum,bitsz,gapsz,reset,x...)
59 *
60 * s = passed from XCHAL_*_LIST(s), eg. to select how to expand
61 * ccused = set if used by compiler without special options or code
62 * abikind = 0 (caller-saved), 1 (callee-saved), or 2 (thread-global)
63 * kind = 0 (special reg), 1 (TIE user reg), or 2 (TIE regfile reg)
64 * opt = 0 (custom TIE extension or coprocessor), or 1 (optional reg)
65 * name = lowercase reg name (no quotes)
66 * galign = group byte alignment (power of 2) (galign >= align)
67 * align = register byte alignment (power of 2)
68 * asize = allocated size in bytes (asize*8 == bitsz + gapsz + padsz)
69 * (not including any pad bytes required to galign this or next reg)
70 * dbnum = unique target number f/debug (see <xtensa-libdb-macros.h>)
71 * base = reg shortname w/o index (or sr=special, ur=TIE user reg)
72 * regnum = reg index in regfile, or special/TIE-user reg number
73 * bitsz = number of significant bits (regfile width, or ur/sr mask bits)
74 * gapsz = intervening bits, if bitsz bits not stored contiguously
75 * (padsz = pad bits at end [TIE regfile] or at msbits [ur,sr] of asize)
76 * reset = register reset value (or 0 if undefined at reset)
77 * x = reserved for future use (0 until then)
78 *
79 * To filter out certain registers, e.g. to expand only the non-global
80 * registers used by the compiler, you can do something like this:
81 *
82 * #define XCHAL_SA_REG(s,ccused,p...) SELCC##ccused(p)
83 * #define SELCC0(p...)
84 * #define SELCC1(abikind,p...) SELAK##abikind(p)
85 * #define SELAK0(p...) REG(p)
86 * #define SELAK1(p...) REG(p)
87 * #define SELAK2(p...)
88 * #define REG(kind,tie,name,galn,aln,asz,csz,dbnum,base,rnum,bsz,rst,x...) \
89 * ...what you want to expand...
90 */
91
92#define XCHAL_NCP_SA_NUM 8
93#define XCHAL_NCP_SA_LIST(s) \
94 XCHAL_SA_REG(s,1,0,0,1, acclo, 4, 4, 4,0x0210, sr,16 , 32,0,0,0) \
95 XCHAL_SA_REG(s,1,0,0,1, acchi, 4, 4, 4,0x0211, sr,17 , 8,0,0,0) \
96 XCHAL_SA_REG(s,0,0,0,1, m0, 4, 4, 4,0x0220, sr,32 , 32,0,0,0) \
97 XCHAL_SA_REG(s,0,0,0,1, m1, 4, 4, 4,0x0221, sr,33 , 32,0,0,0) \
98 XCHAL_SA_REG(s,0,0,0,1, m2, 4, 4, 4,0x0222, sr,34 , 32,0,0,0) \
99 XCHAL_SA_REG(s,0,0,0,1, m3, 4, 4, 4,0x0223, sr,35 , 32,0,0,0) \
100 XCHAL_SA_REG(s,0,0,0,1, scompare1, 4, 4, 4,0x020C, sr,12 , 32,0,0,0) \
101 XCHAL_SA_REG(s,1,2,1,1, threadptr, 4, 4, 4,0x03E7, ur,231, 32,0,0,0)
102
103#define XCHAL_CP0_SA_NUM 0
104#define XCHAL_CP0_SA_LIST(s) /* empty */
105
106#define XCHAL_CP1_SA_NUM 0
107#define XCHAL_CP1_SA_LIST(s) /* empty */
108
109#define XCHAL_CP2_SA_NUM 0
110#define XCHAL_CP2_SA_LIST(s) /* empty */
111
112#define XCHAL_CP3_SA_NUM 0
113#define XCHAL_CP3_SA_LIST(s) /* empty */
114
115#define XCHAL_CP4_SA_NUM 0
116#define XCHAL_CP4_SA_LIST(s) /* empty */
117
118#define XCHAL_CP5_SA_NUM 0
119#define XCHAL_CP5_SA_LIST(s) /* empty */
120
121#define XCHAL_CP6_SA_NUM 0
122#define XCHAL_CP6_SA_LIST(s) /* empty */
123
124#define XCHAL_CP7_SA_NUM 0
125#define XCHAL_CP7_SA_LIST(s) /* empty */
126
127/* Byte length of instruction from its first nibble (op0 field), per FLIX. */
128#define XCHAL_OP0_FORMAT_LENGTHS 3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3
129
130#endif /*_XTENSA_CORE_TIE_H*/
131
diff --git a/include/crypto/aes.h b/include/crypto/aes.h
index 40008d67ee3d..656a4c66a568 100644
--- a/include/crypto/aes.h
+++ b/include/crypto/aes.h
@@ -23,10 +23,10 @@ struct crypto_aes_ctx {
23 u32 key_dec[AES_MAX_KEYLENGTH_U32]; 23 u32 key_dec[AES_MAX_KEYLENGTH_U32];
24}; 24};
25 25
26extern u32 crypto_ft_tab[4][256]; 26extern const u32 crypto_ft_tab[4][256];
27extern u32 crypto_fl_tab[4][256]; 27extern const u32 crypto_fl_tab[4][256];
28extern u32 crypto_it_tab[4][256]; 28extern const u32 crypto_it_tab[4][256];
29extern u32 crypto_il_tab[4][256]; 29extern const u32 crypto_il_tab[4][256];
30 30
31int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, 31int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
32 unsigned int key_len); 32 unsigned int key_len);
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 60d06e784be3..010545436efa 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -22,9 +22,18 @@ struct seq_file;
22 22
23struct crypto_type { 23struct crypto_type {
24 unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); 24 unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
25 unsigned int (*extsize)(struct crypto_alg *alg,
26 const struct crypto_type *frontend);
25 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); 27 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
26 void (*exit)(struct crypto_tfm *tfm); 28 int (*init_tfm)(struct crypto_tfm *tfm,
29 const struct crypto_type *frontend);
27 void (*show)(struct seq_file *m, struct crypto_alg *alg); 30 void (*show)(struct seq_file *m, struct crypto_alg *alg);
31 struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask);
32
33 unsigned int type;
34 unsigned int maskclear;
35 unsigned int maskset;
36 unsigned int tfmsize;
28}; 37};
29 38
30struct crypto_instance { 39struct crypto_instance {
@@ -239,6 +248,11 @@ static inline struct crypto_hash *crypto_spawn_hash(struct crypto_spawn *spawn)
239 return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask)); 248 return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask));
240} 249}
241 250
251static inline void *crypto_hash_ctx(struct crypto_hash *tfm)
252{
253 return crypto_tfm_ctx(&tfm->base);
254}
255
242static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm) 256static inline void *crypto_hash_ctx_aligned(struct crypto_hash *tfm)
243{ 257{
244 return crypto_tfm_ctx_aligned(&tfm->base); 258 return crypto_tfm_ctx_aligned(&tfm->base);
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index ee48ef8fb2ea..cd16d6e668ce 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -15,10 +15,40 @@
15 15
16#include <linux/crypto.h> 16#include <linux/crypto.h>
17 17
18struct shash_desc {
19 struct crypto_shash *tfm;
20 u32 flags;
21
22 void *__ctx[] CRYPTO_MINALIGN_ATTR;
23};
24
25struct shash_alg {
26 int (*init)(struct shash_desc *desc);
27 int (*reinit)(struct shash_desc *desc);
28 int (*update)(struct shash_desc *desc, const u8 *data,
29 unsigned int len);
30 int (*final)(struct shash_desc *desc, u8 *out);
31 int (*finup)(struct shash_desc *desc, const u8 *data,
32 unsigned int len, u8 *out);
33 int (*digest)(struct shash_desc *desc, const u8 *data,
34 unsigned int len, u8 *out);
35 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
36 unsigned int keylen);
37
38 unsigned int descsize;
39 unsigned int digestsize;
40
41 struct crypto_alg base;
42};
43
18struct crypto_ahash { 44struct crypto_ahash {
19 struct crypto_tfm base; 45 struct crypto_tfm base;
20}; 46};
21 47
48struct crypto_shash {
49 struct crypto_tfm base;
50};
51
22static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) 52static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm)
23{ 53{
24 return (struct crypto_ahash *)tfm; 54 return (struct crypto_ahash *)tfm;
@@ -87,6 +117,11 @@ static inline unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm)
87 return crypto_ahash_crt(tfm)->reqsize; 117 return crypto_ahash_crt(tfm)->reqsize;
88} 118}
89 119
120static inline void *ahash_request_ctx(struct ahash_request *req)
121{
122 return req->__ctx;
123}
124
90static inline int crypto_ahash_setkey(struct crypto_ahash *tfm, 125static inline int crypto_ahash_setkey(struct crypto_ahash *tfm,
91 const u8 *key, unsigned int keylen) 126 const u8 *key, unsigned int keylen)
92{ 127{
@@ -101,6 +136,14 @@ static inline int crypto_ahash_digest(struct ahash_request *req)
101 return crt->digest(req); 136 return crt->digest(req);
102} 137}
103 138
139static inline void crypto_ahash_export(struct ahash_request *req, u8 *out)
140{
141 memcpy(out, ahash_request_ctx(req),
142 crypto_ahash_reqsize(crypto_ahash_reqtfm(req)));
143}
144
145int crypto_ahash_import(struct ahash_request *req, const u8 *in);
146
104static inline int crypto_ahash_init(struct ahash_request *req) 147static inline int crypto_ahash_init(struct ahash_request *req)
105{ 148{
106 struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req)); 149 struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req));
@@ -169,4 +212,86 @@ static inline void ahash_request_set_crypt(struct ahash_request *req,
169 req->result = result; 212 req->result = result;
170} 213}
171 214
215struct crypto_shash *crypto_alloc_shash(const char *alg_name, u32 type,
216 u32 mask);
217
218static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)
219{
220 return &tfm->base;
221}
222
223static inline void crypto_free_shash(struct crypto_shash *tfm)
224{
225 crypto_free_tfm(crypto_shash_tfm(tfm));
226}
227
228static inline unsigned int crypto_shash_alignmask(
229 struct crypto_shash *tfm)
230{
231 return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm));
232}
233
234static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg)
235{
236 return container_of(alg, struct shash_alg, base);
237}
238
239static inline struct shash_alg *crypto_shash_alg(struct crypto_shash *tfm)
240{
241 return __crypto_shash_alg(crypto_shash_tfm(tfm)->__crt_alg);
242}
243
244static inline unsigned int crypto_shash_digestsize(struct crypto_shash *tfm)
245{
246 return crypto_shash_alg(tfm)->digestsize;
247}
248
249static inline u32 crypto_shash_get_flags(struct crypto_shash *tfm)
250{
251 return crypto_tfm_get_flags(crypto_shash_tfm(tfm));
252}
253
254static inline void crypto_shash_set_flags(struct crypto_shash *tfm, u32 flags)
255{
256 crypto_tfm_set_flags(crypto_shash_tfm(tfm), flags);
257}
258
259static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags)
260{
261 crypto_tfm_clear_flags(crypto_shash_tfm(tfm), flags);
262}
263
264static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm)
265{
266 return crypto_shash_alg(tfm)->descsize;
267}
268
269static inline void *shash_desc_ctx(struct shash_desc *desc)
270{
271 return desc->__ctx;
272}
273
274int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key,
275 unsigned int keylen);
276int crypto_shash_digest(struct shash_desc *desc, const u8 *data,
277 unsigned int len, u8 *out);
278
279static inline void crypto_shash_export(struct shash_desc *desc, u8 *out)
280{
281 memcpy(out, shash_desc_ctx(desc), crypto_shash_descsize(desc->tfm));
282}
283
284int crypto_shash_import(struct shash_desc *desc, const u8 *in);
285
286static inline int crypto_shash_init(struct shash_desc *desc)
287{
288 return crypto_shash_alg(desc->tfm)->init(desc);
289}
290
291int crypto_shash_update(struct shash_desc *desc, const u8 *data,
292 unsigned int len);
293int crypto_shash_final(struct shash_desc *desc, u8 *out);
294int crypto_shash_finup(struct shash_desc *desc, const u8 *data,
295 unsigned int len, u8 *out);
296
172#endif /* _CRYPTO_HASH_H */ 297#endif /* _CRYPTO_HASH_H */
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index 917ae57bad4a..82b70564bcab 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -39,6 +39,12 @@ extern const struct crypto_type crypto_ahash_type;
39int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err); 39int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err);
40int crypto_hash_walk_first(struct ahash_request *req, 40int crypto_hash_walk_first(struct ahash_request *req,
41 struct crypto_hash_walk *walk); 41 struct crypto_hash_walk *walk);
42int crypto_hash_walk_first_compat(struct hash_desc *hdesc,
43 struct crypto_hash_walk *walk,
44 struct scatterlist *sg, unsigned int len);
45
46int crypto_register_shash(struct shash_alg *alg);
47int crypto_unregister_shash(struct shash_alg *alg);
42 48
43static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) 49static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm)
44{ 50{
@@ -63,16 +69,16 @@ static inline struct ahash_request *ahash_dequeue_request(
63 return ahash_request_cast(crypto_dequeue_request(queue)); 69 return ahash_request_cast(crypto_dequeue_request(queue));
64} 70}
65 71
66static inline void *ahash_request_ctx(struct ahash_request *req)
67{
68 return req->__ctx;
69}
70
71static inline int ahash_tfm_in_queue(struct crypto_queue *queue, 72static inline int ahash_tfm_in_queue(struct crypto_queue *queue,
72 struct crypto_ahash *tfm) 73 struct crypto_ahash *tfm)
73{ 74{
74 return crypto_tfm_in_queue(queue, crypto_ahash_tfm(tfm)); 75 return crypto_tfm_in_queue(queue, crypto_ahash_tfm(tfm));
75} 76}
76 77
78static inline void *crypto_shash_ctx(struct crypto_shash *tfm)
79{
80 return crypto_tfm_ctx(&tfm->base);
81}
82
77#endif /* _CRYPTO_INTERNAL_HASH_H */ 83#endif /* _CRYPTO_INTERNAL_HASH_H */
78 84
diff --git a/include/drm/Kbuild b/include/drm/Kbuild
index 82b6983b7fbb..b940fdfa3b25 100644
--- a/include/drm/Kbuild
+++ b/include/drm/Kbuild
@@ -1,4 +1,4 @@
1unifdef-y += drm.h drm_sarea.h 1unifdef-y += drm.h drm_sarea.h drm_mode.h
2unifdef-y += i810_drm.h 2unifdef-y += i810_drm.h
3unifdef-y += i830_drm.h 3unifdef-y += i830_drm.h
4unifdef-y += i915_drm.h 4unifdef-y += i915_drm.h
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 38d3c6b8276a..32e5096554e9 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -36,7 +36,6 @@
36#ifndef _DRM_H_ 36#ifndef _DRM_H_
37#define _DRM_H_ 37#define _DRM_H_
38 38
39#if defined(__linux__)
40#if defined(__KERNEL__) 39#if defined(__KERNEL__)
41#endif 40#endif
42#include <asm/ioctl.h> /* For _IO* macros */ 41#include <asm/ioctl.h> /* For _IO* macros */
@@ -46,22 +45,6 @@
46#define DRM_IOC_WRITE _IOC_WRITE 45#define DRM_IOC_WRITE _IOC_WRITE
47#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE 46#define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE
48#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) 47#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
49#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
50#if defined(__FreeBSD__) && defined(IN_MODULE)
51/* Prevent name collision when including sys/ioccom.h */
52#undef ioctl
53#include <sys/ioccom.h>
54#define ioctl(a,b,c) xf86ioctl(a,b,c)
55#else
56#include <sys/ioccom.h>
57#endif /* __FreeBSD__ && xf86ioctl */
58#define DRM_IOCTL_NR(n) ((n) & 0xff)
59#define DRM_IOC_VOID IOC_VOID
60#define DRM_IOC_READ IOC_OUT
61#define DRM_IOC_WRITE IOC_IN
62#define DRM_IOC_READWRITE IOC_INOUT
63#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
64#endif
65 48
66#define DRM_MAJOR 226 49#define DRM_MAJOR 226
67#define DRM_MAX_MINOR 15 50#define DRM_MAX_MINOR 15
@@ -190,6 +173,7 @@ enum drm_map_type {
190 _DRM_AGP = 3, /**< AGP/GART */ 173 _DRM_AGP = 3, /**< AGP/GART */
191 _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ 174 _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */
192 _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */ 175 _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */
176 _DRM_GEM = 6, /**< GEM object */
193}; 177};
194 178
195/** 179/**
@@ -471,6 +455,7 @@ struct drm_irq_busid {
471enum drm_vblank_seq_type { 455enum drm_vblank_seq_type {
472 _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ 456 _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
473 _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ 457 _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
458 _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
474 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ 459 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
475 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ 460 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
476 _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ 461 _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */
@@ -503,6 +488,19 @@ union drm_wait_vblank {
503 struct drm_wait_vblank_reply reply; 488 struct drm_wait_vblank_reply reply;
504}; 489};
505 490
491#define _DRM_PRE_MODESET 1
492#define _DRM_POST_MODESET 2
493
494/**
495 * DRM_IOCTL_MODESET_CTL ioctl argument type
496 *
497 * \sa drmModesetCtl().
498 */
499struct drm_modeset_ctl {
500 uint32_t crtc;
501 uint32_t cmd;
502};
503
506/** 504/**
507 * DRM_IOCTL_AGP_ENABLE ioctl argument type. 505 * DRM_IOCTL_AGP_ENABLE ioctl argument type.
508 * 506 *
@@ -573,6 +571,36 @@ struct drm_set_version {
573 int drm_dd_minor; 571 int drm_dd_minor;
574}; 572};
575 573
574/** DRM_IOCTL_GEM_CLOSE ioctl argument type */
575struct drm_gem_close {
576 /** Handle of the object to be closed. */
577 uint32_t handle;
578 uint32_t pad;
579};
580
581/** DRM_IOCTL_GEM_FLINK ioctl argument type */
582struct drm_gem_flink {
583 /** Handle for the object being named */
584 uint32_t handle;
585
586 /** Returned global name */
587 uint32_t name;
588};
589
590/** DRM_IOCTL_GEM_OPEN ioctl argument type */
591struct drm_gem_open {
592 /** Name of object being opened */
593 uint32_t name;
594
595 /** Returned handle for the object */
596 uint32_t handle;
597
598 /** Returned size of the object */
599 uint64_t size;
600};
601
602#include "drm_mode.h"
603
576#define DRM_IOCTL_BASE 'd' 604#define DRM_IOCTL_BASE 'd'
577#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) 605#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
578#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) 606#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
@@ -587,6 +615,10 @@ struct drm_set_version {
587#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) 615#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
588#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) 616#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
589#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) 617#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
618#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
619#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close)
620#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)
621#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)
590 622
591#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) 623#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
592#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) 624#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
@@ -605,6 +637,9 @@ struct drm_set_version {
605#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map) 637#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map)
606#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) 638#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map)
607 639
640#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e)
641#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f)
642
608#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) 643#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx)
609#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) 644#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx)
610#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx) 645#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx)
@@ -635,6 +670,24 @@ struct drm_set_version {
635 670
636#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) 671#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
637 672
673#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
674#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
675#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc)
676#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor)
677#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
678#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
679#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
680#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
681#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd)
682#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
683
684#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
685#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
686#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
687#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
688#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
689#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
690
638/** 691/**
639 * Device specific ioctls should only be in their respective headers 692 * Device specific ioctls should only be in their respective headers
640 * The device specific ioctl range is from 0x40 to 0x99. 693 * The device specific ioctl range is from 0x40 to 0x99.
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1c1b13e29223..afb7858c068d 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -104,6 +104,8 @@ struct drm_device;
104#define DRIVER_DMA_QUEUE 0x200 104#define DRIVER_DMA_QUEUE 0x200
105#define DRIVER_FB_DMA 0x400 105#define DRIVER_FB_DMA 0x400
106#define DRIVER_IRQ_VBL2 0x800 106#define DRIVER_IRQ_VBL2 0x800
107#define DRIVER_GEM 0x1000
108#define DRIVER_MODESET 0x2000
107 109
108/***********************************************************************/ 110/***********************************************************************/
109/** \name Begin the DRM... */ 111/** \name Begin the DRM... */
@@ -237,11 +239,11 @@ struct drm_device;
237 */ 239 */
238#define LOCK_TEST_WITH_RETURN( dev, file_priv ) \ 240#define LOCK_TEST_WITH_RETURN( dev, file_priv ) \
239do { \ 241do { \
240 if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ 242 if (!_DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock) || \
241 dev->lock.file_priv != file_priv ) { \ 243 file_priv->master->lock.file_priv != file_priv) { \
242 DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\ 244 DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\
243 __func__, _DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ),\ 245 __func__, _DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock),\
244 dev->lock.file_priv, file_priv ); \ 246 file_priv->master->lock.file_priv, file_priv); \
245 return -EINVAL; \ 247 return -EINVAL; \
246 } \ 248 } \
247} while (0) 249} while (0)
@@ -275,6 +277,7 @@ typedef int drm_ioctl_compat_t(struct file *filp, unsigned int cmd,
275#define DRM_AUTH 0x1 277#define DRM_AUTH 0x1
276#define DRM_MASTER 0x2 278#define DRM_MASTER 0x2
277#define DRM_ROOT_ONLY 0x4 279#define DRM_ROOT_ONLY 0x4
280#define DRM_CONTROL_ALLOW 0x8
278 281
279struct drm_ioctl_desc { 282struct drm_ioctl_desc {
280 unsigned int cmd; 283 unsigned int cmd;
@@ -378,17 +381,26 @@ struct drm_buf_entry {
378/** File private data */ 381/** File private data */
379struct drm_file { 382struct drm_file {
380 int authenticated; 383 int authenticated;
381 int master;
382 pid_t pid; 384 pid_t pid;
383 uid_t uid; 385 uid_t uid;
384 drm_magic_t magic; 386 drm_magic_t magic;
385 unsigned long ioctl_count; 387 unsigned long ioctl_count;
386 struct list_head lhead; 388 struct list_head lhead;
387 struct drm_minor *minor; 389 struct drm_minor *minor;
388 int remove_auth_on_close;
389 unsigned long lock_count; 390 unsigned long lock_count;
391
392 /** Mapping of mm object handles to object pointers. */
393 struct idr object_idr;
394 /** Lock for synchronization of access to object_idr. */
395 spinlock_t table_lock;
396
390 struct file *filp; 397 struct file *filp;
391 void *driver_priv; 398 void *driver_priv;
399
400 int is_master; /* this file private is a master for a minor */
401 struct drm_master *master; /* master this node is currently associated with
402 N.B. not always minor->master */
403 struct list_head fbs;
392}; 404};
393 405
394/** Wait queue */ 406/** Wait queue */
@@ -518,6 +530,8 @@ struct drm_map_list {
518 struct drm_hash_item hash; 530 struct drm_hash_item hash;
519 struct drm_map *map; /**< mapping */ 531 struct drm_map *map; /**< mapping */
520 uint64_t user_token; 532 uint64_t user_token;
533 struct drm_master *master;
534 struct drm_mm_node *file_offset_node; /**< fake offset */
521}; 535};
522 536
523typedef struct drm_map drm_local_map_t; 537typedef struct drm_map drm_local_map_t;
@@ -558,6 +572,94 @@ struct drm_ati_pcigart_info {
558}; 572};
559 573
560/** 574/**
575 * GEM specific mm private for tracking GEM objects
576 */
577struct drm_gem_mm {
578 struct drm_mm offset_manager; /**< Offset mgmt for buffer objects */
579 struct drm_open_hash offset_hash; /**< User token hash table for maps */
580};
581
582/**
583 * This structure defines the drm_mm memory object, which will be used by the
584 * DRM for its buffer objects.
585 */
586struct drm_gem_object {
587 /** Reference count of this object */
588 struct kref refcount;
589
590 /** Handle count of this object. Each handle also holds a reference */
591 struct kref handlecount;
592
593 /** Related drm device */
594 struct drm_device *dev;
595
596 /** File representing the shmem storage */
597 struct file *filp;
598
599 /* Mapping info for this object */
600 struct drm_map_list map_list;
601
602 /**
603 * Size of the object, in bytes. Immutable over the object's
604 * lifetime.
605 */
606 size_t size;
607
608 /**
609 * Global name for this object, starts at 1. 0 means unnamed.
610 * Access is covered by the object_name_lock in the related drm_device
611 */
612 int name;
613
614 /**
615 * Memory domains. These monitor which caches contain read/write data
616 * related to the object. When transitioning from one set of domains
617 * to another, the driver is called to ensure that caches are suitably
618 * flushed and invalidated
619 */
620 uint32_t read_domains;
621 uint32_t write_domain;
622
623 /**
624 * While validating an exec operation, the
625 * new read/write domain values are computed here.
626 * They will be transferred to the above values
627 * at the point that any cache flushing occurs
628 */
629 uint32_t pending_read_domains;
630 uint32_t pending_write_domain;
631
632 void *driver_private;
633};
634
635#include "drm_crtc.h"
636
637/* per-master structure */
638struct drm_master {
639
640 struct kref refcount; /* refcount for this master */
641
642 struct list_head head; /**< each minor contains a list of masters */
643 struct drm_minor *minor; /**< link back to minor we are a master for */
644
645 char *unique; /**< Unique identifier: e.g., busid */
646 int unique_len; /**< Length of unique field */
647 int unique_size; /**< amount allocated */
648
649 int blocked; /**< Blocked due to VC switch? */
650
651 /** \name Authentication */
652 /*@{ */
653 struct drm_open_hash magiclist;
654 struct list_head magicfree;
655 /*@} */
656
657 struct drm_lock_data lock; /**< Information on hardware lock */
658
659 void *driver_priv; /**< Private structure for driver to use */
660};
661
662/**
561 * DRM driver structure. This structure represent the common code for 663 * DRM driver structure. This structure represent the common code for
562 * a family of cards. There will one drm_device for each card present 664 * a family of cards. There will one drm_device for each card present
563 * in this family 665 * in this family
@@ -580,11 +682,54 @@ struct drm_driver {
580 int (*kernel_context_switch) (struct drm_device *dev, int old, 682 int (*kernel_context_switch) (struct drm_device *dev, int old,
581 int new); 683 int new);
582 void (*kernel_context_switch_unlock) (struct drm_device *dev); 684 void (*kernel_context_switch_unlock) (struct drm_device *dev);
583 int (*vblank_wait) (struct drm_device *dev, unsigned int *sequence);
584 int (*vblank_wait2) (struct drm_device *dev, unsigned int *sequence);
585 int (*dri_library_name) (struct drm_device *dev, char *buf); 685 int (*dri_library_name) (struct drm_device *dev, char *buf);
586 686
587 /** 687 /**
688 * get_vblank_counter - get raw hardware vblank counter
689 * @dev: DRM device
690 * @crtc: counter to fetch
691 *
692 * Driver callback for fetching a raw hardware vblank counter
693 * for @crtc. If a device doesn't have a hardware counter, the
694 * driver can simply return the value of drm_vblank_count and
695 * make the enable_vblank() and disable_vblank() hooks into no-ops,
696 * leaving interrupts enabled at all times.
697 *
698 * Wraparound handling and loss of events due to modesetting is dealt
699 * with in the DRM core code.
700 *
701 * RETURNS
702 * Raw vblank counter value.
703 */
704 u32 (*get_vblank_counter) (struct drm_device *dev, int crtc);
705
706 /**
707 * enable_vblank - enable vblank interrupt events
708 * @dev: DRM device
709 * @crtc: which irq to enable
710 *
711 * Enable vblank interrupts for @crtc. If the device doesn't have
712 * a hardware vblank counter, this routine should be a no-op, since
713 * interrupts will have to stay on to keep the count accurate.
714 *
715 * RETURNS
716 * Zero on success, appropriate errno if the given @crtc's vblank
717 * interrupt cannot be enabled.
718 */
719 int (*enable_vblank) (struct drm_device *dev, int crtc);
720
721 /**
722 * disable_vblank - disable vblank interrupt events
723 * @dev: DRM device
724 * @crtc: which irq to enable
725 *
726 * Disable vblank interrupts for @crtc. If the device doesn't have
727 * a hardware vblank counter, this routine should be a no-op, since
728 * interrupts will have to stay on to keep the count accurate.
729 */
730 void (*disable_vblank) (struct drm_device *dev, int crtc);
731
732 /**
588 * Called by \c drm_device_is_agp. Typically used to determine if a 733 * Called by \c drm_device_is_agp. Typically used to determine if a
589 * card is really attached to AGP or not. 734 * card is really attached to AGP or not.
590 * 735 *
@@ -601,7 +746,7 @@ struct drm_driver {
601 746
602 irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); 747 irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
603 void (*irq_preinstall) (struct drm_device *dev); 748 void (*irq_preinstall) (struct drm_device *dev);
604 void (*irq_postinstall) (struct drm_device *dev); 749 int (*irq_postinstall) (struct drm_device *dev);
605 void (*irq_uninstall) (struct drm_device *dev); 750 void (*irq_uninstall) (struct drm_device *dev);
606 void (*reclaim_buffers) (struct drm_device *dev, 751 void (*reclaim_buffers) (struct drm_device *dev,
607 struct drm_file * file_priv); 752 struct drm_file * file_priv);
@@ -614,6 +759,25 @@ struct drm_driver {
614 void (*set_version) (struct drm_device *dev, 759 void (*set_version) (struct drm_device *dev,
615 struct drm_set_version *sv); 760 struct drm_set_version *sv);
616 761
762 /* Master routines */
763 int (*master_create)(struct drm_device *dev, struct drm_master *master);
764 void (*master_destroy)(struct drm_device *dev, struct drm_master *master);
765
766 int (*proc_init)(struct drm_minor *minor);
767 void (*proc_cleanup)(struct drm_minor *minor);
768
769 /**
770 * Driver-specific constructor for drm_gem_objects, to set up
771 * obj->driver_private.
772 *
773 * Returns 0 on success.
774 */
775 int (*gem_init_object) (struct drm_gem_object *obj);
776 void (*gem_free_object) (struct drm_gem_object *obj);
777
778 /* Driver private ops for this object */
779 struct vm_operations_struct *gem_vm_ops;
780
617 int major; 781 int major;
618 int minor; 782 int minor;
619 int patchlevel; 783 int patchlevel;
@@ -627,10 +791,14 @@ struct drm_driver {
627 int num_ioctls; 791 int num_ioctls;
628 struct file_operations fops; 792 struct file_operations fops;
629 struct pci_driver pci_driver; 793 struct pci_driver pci_driver;
794 /* List of devices hanging off this driver */
795 struct list_head device_list;
630}; 796};
631 797
632#define DRM_MINOR_UNASSIGNED 0 798#define DRM_MINOR_UNASSIGNED 0
633#define DRM_MINOR_LEGACY 1 799#define DRM_MINOR_LEGACY 1
800#define DRM_MINOR_CONTROL 2
801#define DRM_MINOR_RENDER 3
634 802
635/** 803/**
636 * DRM minor structure. This structure represents a drm minor number. 804 * DRM minor structure. This structure represents a drm minor number.
@@ -642,6 +810,9 @@ struct drm_minor {
642 struct device kdev; /**< Linux device */ 810 struct device kdev; /**< Linux device */
643 struct drm_device *dev; 811 struct drm_device *dev;
644 struct proc_dir_entry *dev_root; /**< proc directory entry */ 812 struct proc_dir_entry *dev_root; /**< proc directory entry */
813 struct drm_master *master; /* currently active master for this node */
814 struct list_head master_list;
815 struct drm_mode_group mode_group;
645}; 816};
646 817
647/** 818/**
@@ -649,13 +820,10 @@ struct drm_minor {
649 * may contain multiple heads. 820 * may contain multiple heads.
650 */ 821 */
651struct drm_device { 822struct drm_device {
652 char *unique; /**< Unique identifier: e.g., busid */ 823 struct list_head driver_item; /**< list of devices per driver */
653 int unique_len; /**< Length of unique field */
654 char *devname; /**< For /proc/interrupts */ 824 char *devname; /**< For /proc/interrupts */
655 int if_version; /**< Highest interface version set */ 825 int if_version; /**< Highest interface version set */
656 826
657 int blocked; /**< Blocked due to VC switch? */
658
659 /** \name Locks */ 827 /** \name Locks */
660 /*@{ */ 828 /*@{ */
661 spinlock_t count_lock; /**< For inuse, drm_device::open_count, drm_device::buf_use */ 829 spinlock_t count_lock; /**< For inuse, drm_device::open_count, drm_device::buf_use */
@@ -678,12 +846,7 @@ struct drm_device {
678 atomic_t counts[15]; 846 atomic_t counts[15];
679 /*@} */ 847 /*@} */
680 848
681 /** \name Authentication */
682 /*@{ */
683 struct list_head filelist; 849 struct list_head filelist;
684 struct drm_open_hash magiclist; /**< magic hash table */
685 struct list_head magicfree;
686 /*@} */
687 850
688 /** \name Memory management */ 851 /** \name Memory management */
689 /*@{ */ 852 /*@{ */
@@ -700,7 +863,7 @@ struct drm_device {
700 struct idr ctx_idr; 863 struct idr ctx_idr;
701 864
702 struct list_head vmalist; /**< List of vmas (for debugging) */ 865 struct list_head vmalist; /**< List of vmas (for debugging) */
703 struct drm_lock_data lock; /**< Information on hardware lock */ 866
704 /*@} */ 867 /*@} */
705 868
706 /** \name DMA queues (contexts) */ 869 /** \name DMA queues (contexts) */
@@ -714,7 +877,6 @@ struct drm_device {
714 877
715 /** \name Context support */ 878 /** \name Context support */
716 /*@{ */ 879 /*@{ */
717 int irq; /**< Interrupt used by board */
718 int irq_enabled; /**< True if irq handler is enabled */ 880 int irq_enabled; /**< True if irq handler is enabled */
719 __volatile__ long context_flag; /**< Context swapping flag */ 881 __volatile__ long context_flag; /**< Context swapping flag */
720 __volatile__ long interrupt_flag; /**< Interruption handler flag */ 882 __volatile__ long interrupt_flag; /**< Interruption handler flag */
@@ -730,15 +892,29 @@ struct drm_device {
730 /** \name VBLANK IRQ support */ 892 /** \name VBLANK IRQ support */
731 /*@{ */ 893 /*@{ */
732 894
733 wait_queue_head_t vbl_queue; /**< VBLANK wait queue */ 895 /*
734 atomic_t vbl_received; 896 * At load time, disabling the vblank interrupt won't be allowed since
735 atomic_t vbl_received2; /**< number of secondary VBLANK interrupts */ 897 * old clients may not call the modeset ioctl and therefore misbehave.
898 * Once the modeset ioctl *has* been called though, we can safely
899 * disable them when unused.
900 */
901 int vblank_disable_allowed;
902
903 wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */
904 atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */
736 spinlock_t vbl_lock; 905 spinlock_t vbl_lock;
737 struct list_head vbl_sigs; /**< signal list to send on VBLANK */ 906 struct list_head *vbl_sigs; /**< signal list to send on VBLANK */
738 struct list_head vbl_sigs2; /**< signals to send on secondary VBLANK */ 907 atomic_t vbl_signal_pending; /* number of signals pending on all crtcs*/
739 unsigned int vbl_pending; 908 atomic_t *vblank_refcount; /* number of users of vblank interruptsper crtc */
740 spinlock_t tasklet_lock; /**< For drm_locked_tasklet */ 909 u32 *last_vblank; /* protected by dev->vbl_lock, used */
741 void (*locked_tasklet_func)(struct drm_device *dev); 910 /* for wraparound handling */
911 int *vblank_enabled; /* so we don't call enable more than
912 once per disable */
913 int *vblank_inmodeset; /* Display driver is setting mode */
914 u32 *last_vblank_wait; /* Last vblank seqno waited per CRTC */
915 struct timer_list vblank_disable_timer;
916
917 u32 max_vblank_count; /**< size of vblank counter register */
742 918
743 /*@} */ 919 /*@} */
744 cycles_t ctx_start; 920 cycles_t ctx_start;
@@ -757,13 +933,17 @@ struct drm_device {
757 struct pci_controller *hose; 933 struct pci_controller *hose;
758#endif 934#endif
759 struct drm_sg_mem *sg; /**< Scatter gather memory */ 935 struct drm_sg_mem *sg; /**< Scatter gather memory */
936 int num_crtcs; /**< Number of CRTCs on this device */
760 void *dev_private; /**< device private data */ 937 void *dev_private; /**< device private data */
938 void *mm_private;
939 struct address_space *dev_mapping;
761 struct drm_sigdata sigdata; /**< For block_all_signals */ 940 struct drm_sigdata sigdata; /**< For block_all_signals */
762 sigset_t sigmask; 941 sigset_t sigmask;
763 942
764 struct drm_driver *driver; 943 struct drm_driver *driver;
765 drm_local_map_t *agp_buffer_map; 944 drm_local_map_t *agp_buffer_map;
766 unsigned int agp_buffer_token; 945 unsigned int agp_buffer_token;
946 struct drm_minor *control; /**< Control node for card */
767 struct drm_minor *primary; /**< render type primary screen head */ 947 struct drm_minor *primary; /**< render type primary screen head */
768 948
769 /** \name Drawable information */ 949 /** \name Drawable information */
@@ -771,8 +951,31 @@ struct drm_device {
771 spinlock_t drw_lock; 951 spinlock_t drw_lock;
772 struct idr drw_idr; 952 struct idr drw_idr;
773 /*@} */ 953 /*@} */
954
955 struct drm_mode_config mode_config; /**< Current mode config */
956
957 /** \name GEM information */
958 /*@{ */
959 spinlock_t object_name_lock;
960 struct idr object_name_idr;
961 atomic_t object_count;
962 atomic_t object_memory;
963 atomic_t pin_count;
964 atomic_t pin_memory;
965 atomic_t gtt_count;
966 atomic_t gtt_memory;
967 uint32_t gtt_total;
968 uint32_t invalidate_domains; /* domains pending invalidation */
969 uint32_t flush_domains; /* domains pending flush */
970 /*@} */
971
774}; 972};
775 973
974static inline int drm_dev_to_irq(struct drm_device *dev)
975{
976 return dev->pdev->irq;
977}
978
776static __inline__ int drm_core_check_feature(struct drm_device *dev, 979static __inline__ int drm_core_check_feature(struct drm_device *dev,
777 int feature) 980 int feature)
778{ 981{
@@ -853,6 +1056,8 @@ extern int drm_release(struct inode *inode, struct file *filp);
853 1056
854 /* Mapping support (drm_vm.h) */ 1057 /* Mapping support (drm_vm.h) */
855extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); 1058extern int drm_mmap(struct file *filp, struct vm_area_struct *vma);
1059extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma);
1060extern void drm_vm_open_locked(struct vm_area_struct *vma);
856extern unsigned long drm_core_get_map_ofs(struct drm_map * map); 1061extern unsigned long drm_core_get_map_ofs(struct drm_map * map);
857extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev); 1062extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev);
858extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); 1063extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
@@ -867,6 +1072,11 @@ extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area);
867extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type); 1072extern DRM_AGP_MEM *drm_alloc_agp(struct drm_device *dev, int pages, u32 type);
868extern int drm_free_agp(DRM_AGP_MEM * handle, int pages); 1073extern int drm_free_agp(DRM_AGP_MEM * handle, int pages);
869extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start); 1074extern int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
1075extern DRM_AGP_MEM *drm_agp_bind_pages(struct drm_device *dev,
1076 struct page **pages,
1077 unsigned long num_pages,
1078 uint32_t gtt_offset,
1079 uint32_t type);
870extern int drm_unbind_agp(DRM_AGP_MEM * handle); 1080extern int drm_unbind_agp(DRM_AGP_MEM * handle);
871 1081
872 /* Misc. IOCTL support (drm_ioctl.h) */ 1082 /* Misc. IOCTL support (drm_ioctl.h) */
@@ -929,6 +1139,9 @@ extern int drm_getmagic(struct drm_device *dev, void *data,
929extern int drm_authmagic(struct drm_device *dev, void *data, 1139extern int drm_authmagic(struct drm_device *dev, void *data,
930 struct drm_file *file_priv); 1140 struct drm_file *file_priv);
931 1141
1142/* Cache management (drm_cache.c) */
1143void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
1144
932 /* Locking IOCTL support (drm_lock.h) */ 1145 /* Locking IOCTL support (drm_lock.h) */
933extern int drm_lock(struct drm_device *dev, void *data, 1146extern int drm_lock(struct drm_device *dev, void *data,
934 struct drm_file *file_priv); 1147 struct drm_file *file_priv);
@@ -985,16 +1198,26 @@ extern void drm_core_reclaim_buffers(struct drm_device *dev,
985extern int drm_control(struct drm_device *dev, void *data, 1198extern int drm_control(struct drm_device *dev, void *data,
986 struct drm_file *file_priv); 1199 struct drm_file *file_priv);
987extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS); 1200extern irqreturn_t drm_irq_handler(DRM_IRQ_ARGS);
1201extern int drm_irq_install(struct drm_device *dev);
988extern int drm_irq_uninstall(struct drm_device *dev); 1202extern int drm_irq_uninstall(struct drm_device *dev);
989extern void drm_driver_irq_preinstall(struct drm_device *dev); 1203extern void drm_driver_irq_preinstall(struct drm_device *dev);
990extern void drm_driver_irq_postinstall(struct drm_device *dev); 1204extern void drm_driver_irq_postinstall(struct drm_device *dev);
991extern void drm_driver_irq_uninstall(struct drm_device *dev); 1205extern void drm_driver_irq_uninstall(struct drm_device *dev);
992 1206
1207extern int drm_vblank_init(struct drm_device *dev, int num_crtcs);
993extern int drm_wait_vblank(struct drm_device *dev, void *data, 1208extern int drm_wait_vblank(struct drm_device *dev, void *data,
994 struct drm_file *file_priv); 1209 struct drm_file *filp);
995extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); 1210extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq);
996extern void drm_vbl_send_signals(struct drm_device *dev); 1211extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
997extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); 1212extern void drm_handle_vblank(struct drm_device *dev, int crtc);
1213extern int drm_vblank_get(struct drm_device *dev, int crtc);
1214extern void drm_vblank_put(struct drm_device *dev, int crtc);
1215extern void drm_vblank_cleanup(struct drm_device *dev);
1216/* Modesetting support */
1217extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
1218extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
1219extern int drm_modeset_ctl(struct drm_device *dev, void *data,
1220 struct drm_file *file_priv);
998 1221
999 /* AGP/GART support (drm_agpsupport.h) */ 1222 /* AGP/GART support (drm_agpsupport.h) */
1000extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); 1223extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
@@ -1026,8 +1249,16 @@ extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size
1026extern int drm_agp_free_memory(DRM_AGP_MEM * handle); 1249extern int drm_agp_free_memory(DRM_AGP_MEM * handle);
1027extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start); 1250extern int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start);
1028extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle); 1251extern int drm_agp_unbind_memory(DRM_AGP_MEM * handle);
1252extern void drm_agp_chipset_flush(struct drm_device *dev);
1029 1253
1030 /* Stub support (drm_stub.h) */ 1254 /* Stub support (drm_stub.h) */
1255extern int drm_setmaster_ioctl(struct drm_device *dev, void *data,
1256 struct drm_file *file_priv);
1257extern int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
1258 struct drm_file *file_priv);
1259struct drm_master *drm_master_create(struct drm_minor *minor);
1260extern struct drm_master *drm_master_get(struct drm_master *master);
1261extern void drm_master_put(struct drm_master **master);
1031extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, 1262extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
1032 struct drm_driver *driver); 1263 struct drm_driver *driver);
1033extern int drm_put_dev(struct drm_device *dev); 1264extern int drm_put_dev(struct drm_device *dev);
@@ -1070,7 +1301,11 @@ struct drm_sysfs_class;
1070extern struct class *drm_sysfs_create(struct module *owner, char *name); 1301extern struct class *drm_sysfs_create(struct module *owner, char *name);
1071extern void drm_sysfs_destroy(void); 1302extern void drm_sysfs_destroy(void);
1072extern int drm_sysfs_device_add(struct drm_minor *minor); 1303extern int drm_sysfs_device_add(struct drm_minor *minor);
1304extern void drm_sysfs_hotplug_event(struct drm_device *dev);
1073extern void drm_sysfs_device_remove(struct drm_minor *minor); 1305extern void drm_sysfs_device_remove(struct drm_minor *minor);
1306extern char *drm_get_connector_status_name(enum drm_connector_status status);
1307extern int drm_sysfs_connector_add(struct drm_connector *connector);
1308extern void drm_sysfs_connector_remove(struct drm_connector *connector);
1074 1309
1075/* 1310/*
1076 * Basic memory manager support (drm_mm.c) 1311 * Basic memory manager support (drm_mm.c)
@@ -1088,6 +1323,68 @@ extern unsigned long drm_mm_tail_space(struct drm_mm *mm);
1088extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size); 1323extern int drm_mm_remove_space_from_tail(struct drm_mm *mm, unsigned long size);
1089extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size); 1324extern int drm_mm_add_space_to_tail(struct drm_mm *mm, unsigned long size);
1090 1325
1326/* Graphics Execution Manager library functions (drm_gem.c) */
1327int drm_gem_init(struct drm_device *dev);
1328void drm_gem_destroy(struct drm_device *dev);
1329void drm_gem_object_free(struct kref *kref);
1330struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev,
1331 size_t size);
1332void drm_gem_object_handle_free(struct kref *kref);
1333int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
1334
1335static inline void
1336drm_gem_object_reference(struct drm_gem_object *obj)
1337{
1338 kref_get(&obj->refcount);
1339}
1340
1341static inline void
1342drm_gem_object_unreference(struct drm_gem_object *obj)
1343{
1344 if (obj == NULL)
1345 return;
1346
1347 kref_put(&obj->refcount, drm_gem_object_free);
1348}
1349
1350int drm_gem_handle_create(struct drm_file *file_priv,
1351 struct drm_gem_object *obj,
1352 int *handlep);
1353
1354static inline void
1355drm_gem_object_handle_reference(struct drm_gem_object *obj)
1356{
1357 drm_gem_object_reference(obj);
1358 kref_get(&obj->handlecount);
1359}
1360
1361static inline void
1362drm_gem_object_handle_unreference(struct drm_gem_object *obj)
1363{
1364 if (obj == NULL)
1365 return;
1366
1367 /*
1368 * Must bump handle count first as this may be the last
1369 * ref, in which case the object would disappear before we
1370 * checked for a name
1371 */
1372 kref_put(&obj->handlecount, drm_gem_object_handle_free);
1373 drm_gem_object_unreference(obj);
1374}
1375
1376struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev,
1377 struct drm_file *filp,
1378 int handle);
1379int drm_gem_close_ioctl(struct drm_device *dev, void *data,
1380 struct drm_file *file_priv);
1381int drm_gem_flink_ioctl(struct drm_device *dev, void *data,
1382 struct drm_file *file_priv);
1383int drm_gem_open_ioctl(struct drm_device *dev, void *data,
1384 struct drm_file *file_priv);
1385void drm_gem_open(struct drm_device *dev, struct drm_file *file_private);
1386void drm_gem_release(struct drm_device *dev, struct drm_file *file_private);
1387
1091extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev); 1388extern void drm_core_ioremap(struct drm_map *map, struct drm_device *dev);
1092extern void drm_core_ioremap_wc(struct drm_map *map, struct drm_device *dev); 1389extern void drm_core_ioremap_wc(struct drm_map *map, struct drm_device *dev);
1093extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev); 1390extern void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
new file mode 100644
index 000000000000..0acb07f31fa4
--- /dev/null
+++ b/include/drm/drm_crtc.h
@@ -0,0 +1,733 @@
1/*
2 * Copyright © 2006 Keith Packard
3 * Copyright © 2007-2008 Dave Airlie
4 * Copyright © 2007-2008 Intel Corporation
5 * Jesse Barnes <jesse.barnes@intel.com>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */
25#ifndef __DRM_CRTC_H__
26#define __DRM_CRTC_H__
27
28#include <linux/i2c.h>
29#include <linux/spinlock.h>
30#include <linux/types.h>
31#include <linux/idr.h>
32
33#include <linux/fb.h>
34
35struct drm_device;
36struct drm_mode_set;
37struct drm_framebuffer;
38
39
40#define DRM_MODE_OBJECT_CRTC 0xcccccccc
41#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0
42#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0
43#define DRM_MODE_OBJECT_MODE 0xdededede
44#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0
45#define DRM_MODE_OBJECT_FB 0xfbfbfbfb
46#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
47
48struct drm_mode_object {
49 uint32_t id;
50 uint32_t type;
51};
52
53/*
54 * Note on terminology: here, for brevity and convenience, we refer to connector
55 * control chips as 'CRTCs'. They can control any type of connector, VGA, LVDS,
56 * DVI, etc. And 'screen' refers to the whole of the visible display, which
57 * may span multiple monitors (and therefore multiple CRTC and connector
58 * structures).
59 */
60
61enum drm_mode_status {
62 MODE_OK = 0, /* Mode OK */
63 MODE_HSYNC, /* hsync out of range */
64 MODE_VSYNC, /* vsync out of range */
65 MODE_H_ILLEGAL, /* mode has illegal horizontal timings */
66 MODE_V_ILLEGAL, /* mode has illegal horizontal timings */
67 MODE_BAD_WIDTH, /* requires an unsupported linepitch */
68 MODE_NOMODE, /* no mode with a maching name */
69 MODE_NO_INTERLACE, /* interlaced mode not supported */
70 MODE_NO_DBLESCAN, /* doublescan mode not supported */
71 MODE_NO_VSCAN, /* multiscan mode not supported */
72 MODE_MEM, /* insufficient video memory */
73 MODE_VIRTUAL_X, /* mode width too large for specified virtual size */
74 MODE_VIRTUAL_Y, /* mode height too large for specified virtual size */
75 MODE_MEM_VIRT, /* insufficient video memory given virtual size */
76 MODE_NOCLOCK, /* no fixed clock available */
77 MODE_CLOCK_HIGH, /* clock required is too high */
78 MODE_CLOCK_LOW, /* clock required is too low */
79 MODE_CLOCK_RANGE, /* clock/mode isn't in a ClockRange */
80 MODE_BAD_HVALUE, /* horizontal timing was out of range */
81 MODE_BAD_VVALUE, /* vertical timing was out of range */
82 MODE_BAD_VSCAN, /* VScan value out of range */
83 MODE_HSYNC_NARROW, /* horizontal sync too narrow */
84 MODE_HSYNC_WIDE, /* horizontal sync too wide */
85 MODE_HBLANK_NARROW, /* horizontal blanking too narrow */
86 MODE_HBLANK_WIDE, /* horizontal blanking too wide */
87 MODE_VSYNC_NARROW, /* vertical sync too narrow */
88 MODE_VSYNC_WIDE, /* vertical sync too wide */
89 MODE_VBLANK_NARROW, /* vertical blanking too narrow */
90 MODE_VBLANK_WIDE, /* vertical blanking too wide */
91 MODE_PANEL, /* exceeds panel dimensions */
92 MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
93 MODE_ONE_WIDTH, /* only one width is supported */
94 MODE_ONE_HEIGHT, /* only one height is supported */
95 MODE_ONE_SIZE, /* only one resolution is supported */
96 MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */
97 MODE_UNVERIFIED = -3, /* mode needs to reverified */
98 MODE_BAD = -2, /* unspecified reason */
99 MODE_ERROR = -1 /* error condition */
100};
101
102#define DRM_MODE_TYPE_CLOCK_CRTC_C (DRM_MODE_TYPE_CLOCK_C | \
103 DRM_MODE_TYPE_CRTC_C)
104
105#define DRM_MODE(nm, t, c, hd, hss, hse, ht, hsk, vd, vss, vse, vt, vs, f) \
106 .name = nm, .status = 0, .type = (t), .clock = (c), \
107 .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
108 .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
109 .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
110 .vscan = (vs), .flags = (f), .vrefresh = 0
111
112#define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */
113
114struct drm_display_mode {
115 /* Header */
116 struct list_head head;
117 struct drm_mode_object base;
118
119 char name[DRM_DISPLAY_MODE_LEN];
120
121 int connector_count;
122 enum drm_mode_status status;
123 int type;
124
125 /* Proposed mode values */
126 int clock;
127 int hdisplay;
128 int hsync_start;
129 int hsync_end;
130 int htotal;
131 int hskew;
132 int vdisplay;
133 int vsync_start;
134 int vsync_end;
135 int vtotal;
136 int vscan;
137 unsigned int flags;
138
139 /* Addressable image size (may be 0 for projectors, etc.) */
140 int width_mm;
141 int height_mm;
142
143 /* Actual mode we give to hw */
144 int clock_index;
145 int synth_clock;
146 int crtc_hdisplay;
147 int crtc_hblank_start;
148 int crtc_hblank_end;
149 int crtc_hsync_start;
150 int crtc_hsync_end;
151 int crtc_htotal;
152 int crtc_hskew;
153 int crtc_vdisplay;
154 int crtc_vblank_start;
155 int crtc_vblank_end;
156 int crtc_vsync_start;
157 int crtc_vsync_end;
158 int crtc_vtotal;
159 int crtc_hadjusted;
160 int crtc_vadjusted;
161
162 /* Driver private mode info */
163 int private_size;
164 int *private;
165 int private_flags;
166
167 int vrefresh;
168 float hsync;
169};
170
171enum drm_connector_status {
172 connector_status_connected = 1,
173 connector_status_disconnected = 2,
174 connector_status_unknown = 3,
175};
176
177enum subpixel_order {
178 SubPixelUnknown = 0,
179 SubPixelHorizontalRGB,
180 SubPixelHorizontalBGR,
181 SubPixelVerticalRGB,
182 SubPixelVerticalBGR,
183 SubPixelNone,
184};
185
186
187/*
188 * Describes a given display (e.g. CRT or flat panel) and its limitations.
189 */
190struct drm_display_info {
191 char name[DRM_DISPLAY_INFO_LEN];
192 /* Input info */
193 bool serration_vsync;
194 bool sync_on_green;
195 bool composite_sync;
196 bool separate_syncs;
197 bool blank_to_black;
198 unsigned char video_level;
199 bool digital;
200 /* Physical size */
201 unsigned int width_mm;
202 unsigned int height_mm;
203
204 /* Display parameters */
205 unsigned char gamma; /* FIXME: storage format */
206 bool gtf_supported;
207 bool standard_color;
208 enum {
209 monochrome = 0,
210 rgb,
211 other,
212 unknown,
213 } display_type;
214 bool active_off_supported;
215 bool suspend_supported;
216 bool standby_supported;
217
218 /* Color info FIXME: storage format */
219 unsigned short redx, redy;
220 unsigned short greenx, greeny;
221 unsigned short bluex, bluey;
222 unsigned short whitex, whitey;
223
224 /* Clock limits FIXME: storage format */
225 unsigned int min_vfreq, max_vfreq;
226 unsigned int min_hfreq, max_hfreq;
227 unsigned int pixel_clock;
228
229 /* White point indices FIXME: storage format */
230 unsigned int wpx1, wpy1;
231 unsigned int wpgamma1;
232 unsigned int wpx2, wpy2;
233 unsigned int wpgamma2;
234
235 enum subpixel_order subpixel_order;
236
237 char *raw_edid; /* if any */
238};
239
240struct drm_framebuffer_funcs {
241 void (*destroy)(struct drm_framebuffer *framebuffer);
242 int (*create_handle)(struct drm_framebuffer *fb,
243 struct drm_file *file_priv,
244 unsigned int *handle);
245};
246
247struct drm_framebuffer {
248 struct drm_device *dev;
249 struct list_head head;
250 struct drm_mode_object base;
251 const struct drm_framebuffer_funcs *funcs;
252 unsigned int pitch;
253 unsigned int width;
254 unsigned int height;
255 /* depth can be 15 or 16 */
256 unsigned int depth;
257 int bits_per_pixel;
258 int flags;
259 void *fbdev;
260 u32 pseudo_palette[17];
261 struct list_head filp_head;
262};
263
264struct drm_property_blob {
265 struct drm_mode_object base;
266 struct list_head head;
267 unsigned int length;
268 void *data;
269};
270
271struct drm_property_enum {
272 uint64_t value;
273 struct list_head head;
274 char name[DRM_PROP_NAME_LEN];
275};
276
277struct drm_property {
278 struct list_head head;
279 struct drm_mode_object base;
280 uint32_t flags;
281 char name[DRM_PROP_NAME_LEN];
282 uint32_t num_values;
283 uint64_t *values;
284
285 struct list_head enum_blob_list;
286};
287
288struct drm_crtc;
289struct drm_connector;
290struct drm_encoder;
291
292/**
293 * drm_crtc_funcs - control CRTCs for a given device
294 * @dpms: control display power levels
295 * @save: save CRTC state
296 * @resore: restore CRTC state
297 * @lock: lock the CRTC
298 * @unlock: unlock the CRTC
299 * @shadow_allocate: allocate shadow pixmap
300 * @shadow_create: create shadow pixmap for rotation support
301 * @shadow_destroy: free shadow pixmap
302 * @mode_fixup: fixup proposed mode
303 * @mode_set: set the desired mode on the CRTC
304 * @gamma_set: specify color ramp for CRTC
305 * @destroy: deinit and free object.
306 *
307 * The drm_crtc_funcs structure is the central CRTC management structure
308 * in the DRM. Each CRTC controls one or more connectors (note that the name
309 * CRTC is simply historical, a CRTC may control LVDS, VGA, DVI, TV out, etc.
310 * connectors, not just CRTs).
311 *
312 * Each driver is responsible for filling out this structure at startup time,
313 * in addition to providing other modesetting features, like i2c and DDC
314 * bus accessors.
315 */
316struct drm_crtc_funcs {
317 /* Save CRTC state */
318 void (*save)(struct drm_crtc *crtc); /* suspend? */
319 /* Restore CRTC state */
320 void (*restore)(struct drm_crtc *crtc); /* resume? */
321
322 /* cursor controls */
323 int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv,
324 uint32_t handle, uint32_t width, uint32_t height);
325 int (*cursor_move)(struct drm_crtc *crtc, int x, int y);
326
327 /* Set gamma on the CRTC */
328 void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
329 uint32_t size);
330 /* Object destroy routine */
331 void (*destroy)(struct drm_crtc *crtc);
332
333 int (*set_config)(struct drm_mode_set *set);
334};
335
336/**
337 * drm_crtc - central CRTC control structure
338 * @enabled: is this CRTC enabled?
339 * @x: x position on screen
340 * @y: y position on screen
341 * @desired_mode: new desired mode
342 * @desired_x: desired x for desired_mode
343 * @desired_y: desired y for desired_mode
344 * @funcs: CRTC control functions
345 *
346 * Each CRTC may have one or more connectors associated with it. This structure
347 * allows the CRTC to be controlled.
348 */
349struct drm_crtc {
350 struct drm_device *dev;
351 struct list_head head;
352
353 struct drm_mode_object base;
354
355 /* framebuffer the connector is currently bound to */
356 struct drm_framebuffer *fb;
357
358 bool enabled;
359
360 struct drm_display_mode mode;
361
362 int x, y;
363 struct drm_display_mode *desired_mode;
364 int desired_x, desired_y;
365 const struct drm_crtc_funcs *funcs;
366
367 /* CRTC gamma size for reporting to userspace */
368 uint32_t gamma_size;
369 uint16_t *gamma_store;
370
371 /* if you are using the helper */
372 void *helper_private;
373};
374
375
376/**
377 * drm_connector_funcs - control connectors on a given device
378 * @dpms: set power state (see drm_crtc_funcs above)
379 * @save: save connector state
380 * @restore: restore connector state
381 * @mode_valid: is this mode valid on the given connector?
382 * @mode_fixup: try to fixup proposed mode for this connector
383 * @mode_set: set this mode
384 * @detect: is this connector active?
385 * @get_modes: get mode list for this connector
386 * @set_property: property for this connector may need update
387 * @destroy: make object go away
388 *
389 * Each CRTC may have one or more connectors attached to it. The functions
390 * below allow the core DRM code to control connectors, enumerate available modes,
391 * etc.
392 */
393struct drm_connector_funcs {
394 void (*dpms)(struct drm_connector *connector, int mode);
395 void (*save)(struct drm_connector *connector);
396 void (*restore)(struct drm_connector *connector);
397 enum drm_connector_status (*detect)(struct drm_connector *connector);
398 void (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
399 int (*set_property)(struct drm_connector *connector, struct drm_property *property,
400 uint64_t val);
401 void (*destroy)(struct drm_connector *connector);
402};
403
404struct drm_encoder_funcs {
405 void (*destroy)(struct drm_encoder *encoder);
406};
407
408#define DRM_CONNECTOR_MAX_UMODES 16
409#define DRM_CONNECTOR_MAX_PROPERTY 16
410#define DRM_CONNECTOR_LEN 32
411#define DRM_CONNECTOR_MAX_ENCODER 2
412
413/**
414 * drm_encoder - central DRM encoder structure
415 */
416struct drm_encoder {
417 struct drm_device *dev;
418 struct list_head head;
419
420 struct drm_mode_object base;
421 int encoder_type;
422 uint32_t possible_crtcs;
423 uint32_t possible_clones;
424
425 struct drm_crtc *crtc;
426 const struct drm_encoder_funcs *funcs;
427 void *helper_private;
428};
429
430/**
431 * drm_connector - central DRM connector control structure
432 * @crtc: CRTC this connector is currently connected to, NULL if none
433 * @interlace_allowed: can this connector handle interlaced modes?
434 * @doublescan_allowed: can this connector handle doublescan?
435 * @available_modes: modes available on this connector (from get_modes() + user)
436 * @initial_x: initial x position for this connector
437 * @initial_y: initial y position for this connector
438 * @status: connector connected?
439 * @funcs: connector control functions
440 *
441 * Each connector may be connected to one or more CRTCs, or may be clonable by
442 * another connector if they can share a CRTC. Each connector also has a specific
443 * position in the broader display (referred to as a 'screen' though it could
444 * span multiple monitors).
445 */
446struct drm_connector {
447 struct drm_device *dev;
448 struct device kdev;
449 struct device_attribute *attr;
450 struct list_head head;
451
452 struct drm_mode_object base;
453
454 int connector_type;
455 int connector_type_id;
456 bool interlace_allowed;
457 bool doublescan_allowed;
458 struct list_head modes; /* list of modes on this connector */
459
460 int initial_x, initial_y;
461 enum drm_connector_status status;
462
463 /* these are modes added by probing with DDC or the BIOS */
464 struct list_head probed_modes;
465
466 struct drm_display_info display_info;
467 const struct drm_connector_funcs *funcs;
468
469 struct list_head user_modes;
470 struct drm_property_blob *edid_blob_ptr;
471 u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY];
472 uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY];
473
474 void *helper_private;
475
476 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
477 uint32_t force_encoder_id;
478 struct drm_encoder *encoder; /* currently active encoder */
479};
480
481/**
482 * struct drm_mode_set
483 *
484 * Represents a single crtc the connectors that it drives with what mode
485 * and from which framebuffer it scans out from.
486 *
487 * This is used to set modes.
488 */
489struct drm_mode_set {
490 struct list_head head;
491
492 struct drm_framebuffer *fb;
493 struct drm_crtc *crtc;
494 struct drm_display_mode *mode;
495
496 uint32_t x;
497 uint32_t y;
498
499 struct drm_connector **connectors;
500 size_t num_connectors;
501};
502
503/**
504 * struct drm_mode_config_funcs - configure CRTCs for a given screen layout
505 * @resize: adjust CRTCs as necessary for the proposed layout
506 *
507 * Currently only a resize hook is available. DRM will call back into the
508 * driver with a new screen width and height. If the driver can't support
509 * the proposed size, it can return false. Otherwise it should adjust
510 * the CRTC<->connector mappings as needed and update its view of the screen.
511 */
512struct drm_mode_config_funcs {
513 struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd);
514 int (*fb_changed)(struct drm_device *dev);
515};
516
517struct drm_mode_group {
518 uint32_t num_crtcs;
519 uint32_t num_encoders;
520 uint32_t num_connectors;
521
522 /* list of object IDs for this group */
523 uint32_t *id_list;
524};
525
526/**
527 * drm_mode_config - Mode configuration control structure
528 *
529 */
530struct drm_mode_config {
531 struct mutex mutex; /* protects configuration and IDR */
532 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */
533 /* this is limited to one for now */
534 int num_fb;
535 struct list_head fb_list;
536 int num_connector;
537 struct list_head connector_list;
538 int num_encoder;
539 struct list_head encoder_list;
540
541 int num_crtc;
542 struct list_head crtc_list;
543
544 struct list_head property_list;
545
546 /* in-kernel framebuffers - hung of filp_head in drm_framebuffer */
547 struct list_head fb_kernel_list;
548
549 int min_width, min_height;
550 int max_width, max_height;
551 struct drm_mode_config_funcs *funcs;
552 unsigned long fb_base;
553
554 /* pointers to standard properties */
555 struct list_head property_blob_list;
556 struct drm_property *edid_property;
557 struct drm_property *dpms_property;
558
559 /* DVI-I properties */
560 struct drm_property *dvi_i_subconnector_property;
561 struct drm_property *dvi_i_select_subconnector_property;
562
563 /* TV properties */
564 struct drm_property *tv_subconnector_property;
565 struct drm_property *tv_select_subconnector_property;
566 struct drm_property *tv_mode_property;
567 struct drm_property *tv_left_margin_property;
568 struct drm_property *tv_right_margin_property;
569 struct drm_property *tv_top_margin_property;
570 struct drm_property *tv_bottom_margin_property;
571
572 /* Optional properties */
573 struct drm_property *scaling_mode_property;
574 struct drm_property *dithering_mode_property;
575};
576
577#define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
578#define obj_to_connector(x) container_of(x, struct drm_connector, base)
579#define obj_to_encoder(x) container_of(x, struct drm_encoder, base)
580#define obj_to_mode(x) container_of(x, struct drm_display_mode, base)
581#define obj_to_fb(x) container_of(x, struct drm_framebuffer, base)
582#define obj_to_property(x) container_of(x, struct drm_property, base)
583#define obj_to_blob(x) container_of(x, struct drm_property_blob, base)
584
585
586extern void drm_crtc_init(struct drm_device *dev,
587 struct drm_crtc *crtc,
588 const struct drm_crtc_funcs *funcs);
589extern void drm_crtc_cleanup(struct drm_crtc *crtc);
590
591extern void drm_connector_init(struct drm_device *dev,
592 struct drm_connector *connector,
593 const struct drm_connector_funcs *funcs,
594 int connector_type);
595
596extern void drm_connector_cleanup(struct drm_connector *connector);
597
598extern void drm_encoder_init(struct drm_device *dev,
599 struct drm_encoder *encoder,
600 const struct drm_encoder_funcs *funcs,
601 int encoder_type);
602
603extern void drm_encoder_cleanup(struct drm_encoder *encoder);
604
605extern char *drm_get_connector_name(struct drm_connector *connector);
606extern char *drm_get_dpms_name(int val);
607extern char *drm_get_dvi_i_subconnector_name(int val);
608extern char *drm_get_dvi_i_select_name(int val);
609extern char *drm_get_tv_subconnector_name(int val);
610extern char *drm_get_tv_select_name(int val);
611extern void drm_fb_release(struct file *filp);
612extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
613extern struct edid *drm_get_edid(struct drm_connector *connector,
614 struct i2c_adapter *adapter);
615extern unsigned char *drm_do_probe_ddc_edid(struct i2c_adapter *adapter);
616extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
617extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
618extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode);
619extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
620 struct drm_display_mode *mode);
621extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
622extern void drm_mode_config_init(struct drm_device *dev);
623extern void drm_mode_config_cleanup(struct drm_device *dev);
624extern void drm_mode_set_name(struct drm_display_mode *mode);
625extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2);
626extern int drm_mode_width(struct drm_display_mode *mode);
627extern int drm_mode_height(struct drm_display_mode *mode);
628
629/* for us by fb module */
630extern int drm_mode_attachmode_crtc(struct drm_device *dev,
631 struct drm_crtc *crtc,
632 struct drm_display_mode *mode);
633extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode);
634
635extern struct drm_display_mode *drm_mode_create(struct drm_device *dev);
636extern void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
637extern void drm_mode_list_concat(struct list_head *head,
638 struct list_head *new);
639extern void drm_mode_validate_size(struct drm_device *dev,
640 struct list_head *mode_list,
641 int maxX, int maxY, int maxPitch);
642extern void drm_mode_prune_invalid(struct drm_device *dev,
643 struct list_head *mode_list, bool verbose);
644extern void drm_mode_sort(struct list_head *mode_list);
645extern int drm_mode_vrefresh(struct drm_display_mode *mode);
646extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
647 int adjust_flags);
648extern void drm_mode_connector_list_update(struct drm_connector *connector);
649extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
650 struct edid *edid);
651extern int drm_connector_property_set_value(struct drm_connector *connector,
652 struct drm_property *property,
653 uint64_t value);
654extern int drm_connector_property_get_value(struct drm_connector *connector,
655 struct drm_property *property,
656 uint64_t *value);
657extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev);
658extern void drm_framebuffer_set_object(struct drm_device *dev,
659 unsigned long handle);
660extern int drm_framebuffer_init(struct drm_device *dev,
661 struct drm_framebuffer *fb,
662 const struct drm_framebuffer_funcs *funcs);
663extern void drm_framebuffer_cleanup(struct drm_framebuffer *fb);
664extern int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
665extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
666extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY);
667extern bool drm_crtc_in_use(struct drm_crtc *crtc);
668
669extern int drm_connector_attach_property(struct drm_connector *connector,
670 struct drm_property *property, uint64_t init_val);
671extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
672 const char *name, int num_values);
673extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
674extern int drm_property_add_enum(struct drm_property *property, int index,
675 uint64_t value, const char *name);
676extern int drm_mode_create_dvi_i_properties(struct drm_device *dev);
677extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats,
678 char *formats[]);
679extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
680extern int drm_mode_create_dithering_property(struct drm_device *dev);
681extern char *drm_get_encoder_name(struct drm_encoder *encoder);
682
683extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
684 struct drm_encoder *encoder);
685extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
686 struct drm_encoder *encoder);
687extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
688 int gamma_size);
689extern void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type);
690/* IOCTLs */
691extern int drm_mode_getresources(struct drm_device *dev,
692 void *data, struct drm_file *file_priv);
693
694extern int drm_mode_getcrtc(struct drm_device *dev,
695 void *data, struct drm_file *file_priv);
696extern int drm_mode_getconnector(struct drm_device *dev,
697 void *data, struct drm_file *file_priv);
698extern int drm_mode_setcrtc(struct drm_device *dev,
699 void *data, struct drm_file *file_priv);
700extern int drm_mode_cursor_ioctl(struct drm_device *dev,
701 void *data, struct drm_file *file_priv);
702extern int drm_mode_addfb(struct drm_device *dev,
703 void *data, struct drm_file *file_priv);
704extern int drm_mode_rmfb(struct drm_device *dev,
705 void *data, struct drm_file *file_priv);
706extern int drm_mode_getfb(struct drm_device *dev,
707 void *data, struct drm_file *file_priv);
708extern int drm_mode_addmode_ioctl(struct drm_device *dev,
709 void *data, struct drm_file *file_priv);
710extern int drm_mode_rmmode_ioctl(struct drm_device *dev,
711 void *data, struct drm_file *file_priv);
712extern int drm_mode_attachmode_ioctl(struct drm_device *dev,
713 void *data, struct drm_file *file_priv);
714extern int drm_mode_detachmode_ioctl(struct drm_device *dev,
715 void *data, struct drm_file *file_priv);
716
717extern int drm_mode_getproperty_ioctl(struct drm_device *dev,
718 void *data, struct drm_file *file_priv);
719extern int drm_mode_getblob_ioctl(struct drm_device *dev,
720 void *data, struct drm_file *file_priv);
721extern int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
722 void *data, struct drm_file *file_priv);
723extern int drm_mode_hotplug_ioctl(struct drm_device *dev,
724 void *data, struct drm_file *file_priv);
725extern int drm_mode_replacefb(struct drm_device *dev,
726 void *data, struct drm_file *file_priv);
727extern int drm_mode_getencoder(struct drm_device *dev,
728 void *data, struct drm_file *file_priv);
729extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
730 void *data, struct drm_file *file_priv);
731extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
732 void *data, struct drm_file *file_priv);
733#endif /* __DRM_CRTC_H__ */
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
new file mode 100644
index 000000000000..4bc04cf460a7
--- /dev/null
+++ b/include/drm/drm_crtc_helper.h
@@ -0,0 +1,124 @@
1/*
2 * Copyright © 2006 Keith Packard
3 * Copyright © 2007-2008 Dave Airlie
4 * Copyright © 2007-2008 Intel Corporation
5 * Jesse Barnes <jesse.barnes@intel.com>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26/*
27 * The DRM mode setting helper functions are common code for drivers to use if
28 * they wish. Drivers are not forced to use this code in their
29 * implementations but it would be useful if they code they do use at least
30 * provides a consistent interface and operation to userspace
31 */
32
33#ifndef __DRM_CRTC_HELPER_H__
34#define __DRM_CRTC_HELPER_H__
35
36#include <linux/i2c.h>
37#include <linux/spinlock.h>
38#include <linux/types.h>
39#include <linux/idr.h>
40
41#include <linux/fb.h>
42
43struct drm_crtc_helper_funcs {
44 /*
45 * Control power levels on the CRTC. If the mode passed in is
46 * unsupported, the provider must use the next lowest power level.
47 */
48 void (*dpms)(struct drm_crtc *crtc, int mode);
49 void (*prepare)(struct drm_crtc *crtc);
50 void (*commit)(struct drm_crtc *crtc);
51
52 /* Provider can fixup or change mode timings before modeset occurs */
53 bool (*mode_fixup)(struct drm_crtc *crtc,
54 struct drm_display_mode *mode,
55 struct drm_display_mode *adjusted_mode);
56 /* Actually set the mode */
57 void (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,
58 struct drm_display_mode *adjusted_mode, int x, int y,
59 struct drm_framebuffer *old_fb);
60
61 /* Move the crtc on the current fb to the given position *optional* */
62 void (*mode_set_base)(struct drm_crtc *crtc, int x, int y,
63 struct drm_framebuffer *old_fb);
64};
65
66struct drm_encoder_helper_funcs {
67 void (*dpms)(struct drm_encoder *encoder, int mode);
68 void (*save)(struct drm_encoder *encoder);
69 void (*restore)(struct drm_encoder *encoder);
70
71 bool (*mode_fixup)(struct drm_encoder *encoder,
72 struct drm_display_mode *mode,
73 struct drm_display_mode *adjusted_mode);
74 void (*prepare)(struct drm_encoder *encoder);
75 void (*commit)(struct drm_encoder *encoder);
76 void (*mode_set)(struct drm_encoder *encoder,
77 struct drm_display_mode *mode,
78 struct drm_display_mode *adjusted_mode);
79 /* detect for DAC style encoders */
80 enum drm_connector_status (*detect)(struct drm_encoder *encoder,
81 struct drm_connector *connector);
82};
83
84struct drm_connector_helper_funcs {
85 int (*get_modes)(struct drm_connector *connector);
86 int (*mode_valid)(struct drm_connector *connector,
87 struct drm_display_mode *mode);
88 struct drm_encoder *(*best_encoder)(struct drm_connector *connector);
89};
90
91extern void drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY);
92extern void drm_helper_disable_unused_functions(struct drm_device *dev);
93extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
94extern bool drm_helper_initial_config(struct drm_device *dev, bool can_grow);
95extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
96extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
97 struct drm_display_mode *mode,
98 int x, int y,
99 struct drm_framebuffer *old_fb);
100extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
101
102extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
103 struct drm_mode_fb_cmd *mode_cmd);
104
105static inline void drm_crtc_helper_add(struct drm_crtc *crtc,
106 const struct drm_crtc_helper_funcs *funcs)
107{
108 crtc->helper_private = (void *)funcs;
109}
110
111static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
112 const struct drm_encoder_helper_funcs *funcs)
113{
114 encoder->helper_private = (void *)funcs;
115}
116
117static inline void drm_connector_helper_add(struct drm_connector *connector,
118 const struct drm_connector_helper_funcs *funcs)
119{
120 connector->helper_private = (void *)funcs;
121}
122
123extern int drm_helper_resume_force_mode(struct drm_device *dev);
124#endif
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
new file mode 100644
index 000000000000..c707c15f5164
--- /dev/null
+++ b/include/drm/drm_edid.h
@@ -0,0 +1,202 @@
1/*
2 * Copyright © 2007-2008 Intel Corporation
3 * Jesse Barnes <jesse.barnes@intel.com>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23#ifndef __DRM_EDID_H__
24#define __DRM_EDID_H__
25
26#include <linux/types.h>
27
28#define EDID_LENGTH 128
29#define DDC_ADDR 0x50
30
31#ifdef BIG_ENDIAN
32#error "EDID structure is little endian, need big endian versions"
33#else
34
35struct est_timings {
36 u8 t1;
37 u8 t2;
38 u8 mfg_rsvd;
39} __attribute__((packed));
40
41struct std_timing {
42 u8 hsize; /* need to multiply by 8 then add 248 */
43 u8 vfreq:6; /* need to add 60 */
44 u8 aspect_ratio:2; /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */
45} __attribute__((packed));
46
47/* If detailed data is pixel timing */
48struct detailed_pixel_timing {
49 u8 hactive_lo;
50 u8 hblank_lo;
51 u8 hblank_hi:4;
52 u8 hactive_hi:4;
53 u8 vactive_lo;
54 u8 vblank_lo;
55 u8 vblank_hi:4;
56 u8 vactive_hi:4;
57 u8 hsync_offset_lo;
58 u8 hsync_pulse_width_lo;
59 u8 vsync_pulse_width_lo:4;
60 u8 vsync_offset_lo:4;
61 u8 hsync_pulse_width_hi:2;
62 u8 hsync_offset_hi:2;
63 u8 vsync_pulse_width_hi:2;
64 u8 vsync_offset_hi:2;
65 u8 width_mm_lo;
66 u8 height_mm_lo;
67 u8 height_mm_hi:4;
68 u8 width_mm_hi:4;
69 u8 hborder;
70 u8 vborder;
71 u8 unknown0:1;
72 u8 vsync_positive:1;
73 u8 hsync_positive:1;
74 u8 separate_sync:2;
75 u8 stereo:1;
76 u8 unknown6:1;
77 u8 interlaced:1;
78} __attribute__((packed));
79
80/* If it's not pixel timing, it'll be one of the below */
81struct detailed_data_string {
82 u8 str[13];
83} __attribute__((packed));
84
85struct detailed_data_monitor_range {
86 u8 min_vfreq;
87 u8 max_vfreq;
88 u8 min_hfreq_khz;
89 u8 max_hfreq_khz;
90 u8 pixel_clock_mhz; /* need to multiply by 10 */
91 u16 sec_gtf_toggle; /* A000=use above, 20=use below */ /* FIXME: byte order */
92 u8 hfreq_start_khz; /* need to multiply by 2 */
93 u8 c; /* need to divide by 2 */
94 u16 m; /* FIXME: byte order */
95 u8 k;
96 u8 j; /* need to divide by 2 */
97} __attribute__((packed));
98
99struct detailed_data_wpindex {
100 u8 white_y_lo:2;
101 u8 white_x_lo:2;
102 u8 pad:4;
103 u8 white_x_hi;
104 u8 white_y_hi;
105 u8 gamma; /* need to divide by 100 then add 1 */
106} __attribute__((packed));
107
108struct detailed_data_color_point {
109 u8 windex1;
110 u8 wpindex1[3];
111 u8 windex2;
112 u8 wpindex2[3];
113} __attribute__((packed));
114
115struct detailed_non_pixel {
116 u8 pad1;
117 u8 type; /* ff=serial, fe=string, fd=monitor range, fc=monitor name
118 fb=color point data, fa=standard timing data,
119 f9=undefined, f8=mfg. reserved */
120 u8 pad2;
121 union {
122 struct detailed_data_string str;
123 struct detailed_data_monitor_range range;
124 struct detailed_data_wpindex color;
125 struct std_timing timings[5];
126 } data;
127} __attribute__((packed));
128
129#define EDID_DETAIL_STD_MODES 0xfa
130#define EDID_DETAIL_MONITOR_CPDATA 0xfb
131#define EDID_DETAIL_MONITOR_NAME 0xfc
132#define EDID_DETAIL_MONITOR_RANGE 0xfd
133#define EDID_DETAIL_MONITOR_STRING 0xfe
134#define EDID_DETAIL_MONITOR_SERIAL 0xff
135
136struct detailed_timing {
137 u16 pixel_clock; /* need to multiply by 10 KHz */ /* FIXME: byte order */
138 union {
139 struct detailed_pixel_timing pixel_data;
140 struct detailed_non_pixel other_data;
141 } data;
142} __attribute__((packed));
143
144struct edid {
145 u8 header[8];
146 /* Vendor & product info */
147 u8 mfg_id[2];
148 u8 prod_code[2];
149 u32 serial; /* FIXME: byte order */
150 u8 mfg_week;
151 u8 mfg_year;
152 /* EDID version */
153 u8 version;
154 u8 revision;
155 /* Display info: */
156 /* input definition */
157 u8 serration_vsync:1;
158 u8 sync_on_green:1;
159 u8 composite_sync:1;
160 u8 separate_syncs:1;
161 u8 blank_to_black:1;
162 u8 video_level:2;
163 u8 digital:1; /* bits below must be zero if set */
164 u8 width_cm;
165 u8 height_cm;
166 u8 gamma;
167 /* feature support */
168 u8 default_gtf:1;
169 u8 preferred_timing:1;
170 u8 standard_color:1;
171 u8 display_type:2; /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */
172 u8 pm_active_off:1;
173 u8 pm_suspend:1;
174 u8 pm_standby:1;
175 /* Color characteristics */
176 u8 red_green_lo;
177 u8 black_white_lo;
178 u8 red_x;
179 u8 red_y;
180 u8 green_x;
181 u8 green_y;
182 u8 blue_x;
183 u8 blue_y;
184 u8 white_x;
185 u8 white_y;
186 /* Est. timings and mfg rsvd timings*/
187 struct est_timings established_timings;
188 /* Standard timings 1-8*/
189 struct std_timing standard_timings[8];
190 /* Detailing timings 1-4 */
191 struct detailed_timing detailed_timings[4];
192 /* Number of 128 byte ext. blocks */
193 u8 extensions;
194 /* Checksum */
195 u8 checksum;
196} __attribute__((packed));
197
198#endif /* little endian structs */
199
200#define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8))
201
202#endif /* __DRM_EDID_H__ */
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
new file mode 100644
index 000000000000..601d2bd839f6
--- /dev/null
+++ b/include/drm/drm_mode.h
@@ -0,0 +1,271 @@
1/*
2 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
3 * Copyright (c) 2007 Jakob Bornecrantz <wallbraker@gmail.com>
4 * Copyright (c) 2008 Red Hat Inc.
5 * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA
6 * Copyright (c) 2007-2008 Intel Corporation
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 * IN THE SOFTWARE.
25 */
26
27#ifndef _DRM_MODE_H
28#define _DRM_MODE_H
29
30#if !defined(__KERNEL__) && !defined(_KERNEL)
31#include <stdint.h>
32#else
33#include <linux/kernel.h>
34#endif
35
36#define DRM_DISPLAY_INFO_LEN 32
37#define DRM_CONNECTOR_NAME_LEN 32
38#define DRM_DISPLAY_MODE_LEN 32
39#define DRM_PROP_NAME_LEN 32
40
41#define DRM_MODE_TYPE_BUILTIN (1<<0)
42#define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN)
43#define DRM_MODE_TYPE_CRTC_C ((1<<2) | DRM_MODE_TYPE_BUILTIN)
44#define DRM_MODE_TYPE_PREFERRED (1<<3)
45#define DRM_MODE_TYPE_DEFAULT (1<<4)
46#define DRM_MODE_TYPE_USERDEF (1<<5)
47#define DRM_MODE_TYPE_DRIVER (1<<6)
48
49/* Video mode flags */
50/* bit compatible with the xorg definitions. */
51#define DRM_MODE_FLAG_PHSYNC (1<<0)
52#define DRM_MODE_FLAG_NHSYNC (1<<1)
53#define DRM_MODE_FLAG_PVSYNC (1<<2)
54#define DRM_MODE_FLAG_NVSYNC (1<<3)
55#define DRM_MODE_FLAG_INTERLACE (1<<4)
56#define DRM_MODE_FLAG_DBLSCAN (1<<5)
57#define DRM_MODE_FLAG_CSYNC (1<<6)
58#define DRM_MODE_FLAG_PCSYNC (1<<7)
59#define DRM_MODE_FLAG_NCSYNC (1<<8)
60#define DRM_MODE_FLAG_HSKEW (1<<9) /* hskew provided */
61#define DRM_MODE_FLAG_BCAST (1<<10)
62#define DRM_MODE_FLAG_PIXMUX (1<<11)
63#define DRM_MODE_FLAG_DBLCLK (1<<12)
64#define DRM_MODE_FLAG_CLKDIV2 (1<<13)
65
66/* DPMS flags */
67/* bit compatible with the xorg definitions. */
68#define DRM_MODE_DPMS_ON 0
69#define DRM_MODE_DPMS_STANDBY 1
70#define DRM_MODE_DPMS_SUSPEND 2
71#define DRM_MODE_DPMS_OFF 3
72
73/* Scaling mode options */
74#define DRM_MODE_SCALE_NON_GPU 0
75#define DRM_MODE_SCALE_FULLSCREEN 1
76#define DRM_MODE_SCALE_NO_SCALE 2
77#define DRM_MODE_SCALE_ASPECT 3
78
79/* Dithering mode options */
80#define DRM_MODE_DITHERING_OFF 0
81#define DRM_MODE_DITHERING_ON 1
82
83struct drm_mode_modeinfo {
84 uint32_t clock;
85 uint16_t hdisplay, hsync_start, hsync_end, htotal, hskew;
86 uint16_t vdisplay, vsync_start, vsync_end, vtotal, vscan;
87
88 uint32_t vrefresh; /* vertical refresh * 1000 */
89
90 uint32_t flags;
91 uint32_t type;
92 char name[DRM_DISPLAY_MODE_LEN];
93};
94
95struct drm_mode_card_res {
96 uint64_t fb_id_ptr;
97 uint64_t crtc_id_ptr;
98 uint64_t connector_id_ptr;
99 uint64_t encoder_id_ptr;
100 uint32_t count_fbs;
101 uint32_t count_crtcs;
102 uint32_t count_connectors;
103 uint32_t count_encoders;
104 uint32_t min_width, max_width;
105 uint32_t min_height, max_height;
106};
107
108struct drm_mode_crtc {
109 uint64_t set_connectors_ptr;
110 uint32_t count_connectors;
111
112 uint32_t crtc_id; /**< Id */
113 uint32_t fb_id; /**< Id of framebuffer */
114
115 uint32_t x, y; /**< Position on the frameuffer */
116
117 uint32_t gamma_size;
118 uint32_t mode_valid;
119 struct drm_mode_modeinfo mode;
120};
121
122#define DRM_MODE_ENCODER_NONE 0
123#define DRM_MODE_ENCODER_DAC 1
124#define DRM_MODE_ENCODER_TMDS 2
125#define DRM_MODE_ENCODER_LVDS 3
126#define DRM_MODE_ENCODER_TVDAC 4
127
128struct drm_mode_get_encoder {
129 uint32_t encoder_id;
130 uint32_t encoder_type;
131
132 uint32_t crtc_id; /**< Id of crtc */
133
134 uint32_t possible_crtcs;
135 uint32_t possible_clones;
136};
137
138/* This is for connectors with multiple signal types. */
139/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
140#define DRM_MODE_SUBCONNECTOR_Automatic 0
141#define DRM_MODE_SUBCONNECTOR_Unknown 0
142#define DRM_MODE_SUBCONNECTOR_DVID 3
143#define DRM_MODE_SUBCONNECTOR_DVIA 4
144#define DRM_MODE_SUBCONNECTOR_Composite 5
145#define DRM_MODE_SUBCONNECTOR_SVIDEO 6
146#define DRM_MODE_SUBCONNECTOR_Component 8
147
148#define DRM_MODE_CONNECTOR_Unknown 0
149#define DRM_MODE_CONNECTOR_VGA 1
150#define DRM_MODE_CONNECTOR_DVII 2
151#define DRM_MODE_CONNECTOR_DVID 3
152#define DRM_MODE_CONNECTOR_DVIA 4
153#define DRM_MODE_CONNECTOR_Composite 5
154#define DRM_MODE_CONNECTOR_SVIDEO 6
155#define DRM_MODE_CONNECTOR_LVDS 7
156#define DRM_MODE_CONNECTOR_Component 8
157#define DRM_MODE_CONNECTOR_9PinDIN 9
158#define DRM_MODE_CONNECTOR_DisplayPort 10
159#define DRM_MODE_CONNECTOR_HDMIA 11
160#define DRM_MODE_CONNECTOR_HDMIB 12
161
162struct drm_mode_get_connector {
163
164 uint64_t encoders_ptr;
165 uint64_t modes_ptr;
166 uint64_t props_ptr;
167 uint64_t prop_values_ptr;
168
169 uint32_t count_modes;
170 uint32_t count_props;
171 uint32_t count_encoders;
172
173 uint32_t encoder_id; /**< Current Encoder */
174 uint32_t connector_id; /**< Id */
175 uint32_t connector_type;
176 uint32_t connector_type_id;
177
178 uint32_t connection;
179 uint32_t mm_width, mm_height; /**< HxW in millimeters */
180 uint32_t subpixel;
181};
182
183#define DRM_MODE_PROP_PENDING (1<<0)
184#define DRM_MODE_PROP_RANGE (1<<1)
185#define DRM_MODE_PROP_IMMUTABLE (1<<2)
186#define DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text strings */
187#define DRM_MODE_PROP_BLOB (1<<4)
188
189struct drm_mode_property_enum {
190 uint64_t value;
191 char name[DRM_PROP_NAME_LEN];
192};
193
194struct drm_mode_get_property {
195 uint64_t values_ptr; /* values and blob lengths */
196 uint64_t enum_blob_ptr; /* enum and blob id ptrs */
197
198 uint32_t prop_id;
199 uint32_t flags;
200 char name[DRM_PROP_NAME_LEN];
201
202 uint32_t count_values;
203 uint32_t count_enum_blobs;
204};
205
206struct drm_mode_connector_set_property {
207 uint64_t value;
208 uint32_t prop_id;
209 uint32_t connector_id;
210};
211
212struct drm_mode_get_blob {
213 uint32_t blob_id;
214 uint32_t length;
215 uint64_t data;
216};
217
218struct drm_mode_fb_cmd {
219 uint32_t fb_id;
220 uint32_t width, height;
221 uint32_t pitch;
222 uint32_t bpp;
223 uint32_t depth;
224 /* driver specific handle */
225 uint32_t handle;
226};
227
228struct drm_mode_mode_cmd {
229 uint32_t connector_id;
230 struct drm_mode_modeinfo mode;
231};
232
233#define DRM_MODE_CURSOR_BO (1<<0)
234#define DRM_MODE_CURSOR_MOVE (1<<1)
235
236/*
237 * depending on the value in flags diffrent members are used.
238 *
239 * CURSOR_BO uses
240 * crtc
241 * width
242 * height
243 * handle - if 0 turns the cursor of
244 *
245 * CURSOR_MOVE uses
246 * crtc
247 * x
248 * y
249 */
250struct drm_mode_cursor {
251 uint32_t flags;
252 uint32_t crtc_id;
253 int32_t x;
254 int32_t y;
255 uint32_t width;
256 uint32_t height;
257 /* driver specific handle */
258 uint32_t handle;
259};
260
261struct drm_mode_crtc_lut {
262 uint32_t crtc_id;
263 uint32_t gamma_size;
264
265 /* pointers to arrays */
266 uint64_t red;
267 uint64_t green;
268 uint64_t blue;
269};
270
271#endif
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 135bd19499fc..5165f240aa68 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -84,18 +84,18 @@
84 {0x1002, 0x5462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ 84 {0x1002, 0x5462, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \
85 {0x1002, 0x5464, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ 85 {0x1002, 0x5464, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \
86 {0x1002, 0x5657, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 86 {0x1002, 0x5657, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
87 {0x1002, 0x5548, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 87 {0x1002, 0x5548, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
88 {0x1002, 0x5549, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 88 {0x1002, 0x5549, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
89 {0x1002, 0x554A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 89 {0x1002, 0x554A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
90 {0x1002, 0x554B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 90 {0x1002, 0x554B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
91 {0x1002, 0x554C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 91 {0x1002, 0x554C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
92 {0x1002, 0x554D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 92 {0x1002, 0x554D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
93 {0x1002, 0x554E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 93 {0x1002, 0x554E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
94 {0x1002, 0x554F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 94 {0x1002, 0x554F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
95 {0x1002, 0x5550, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 95 {0x1002, 0x5550, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
96 {0x1002, 0x5551, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 96 {0x1002, 0x5551, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
97 {0x1002, 0x5552, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 97 {0x1002, 0x5552, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
98 {0x1002, 0x5554, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 98 {0x1002, 0x5554, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
99 {0x1002, 0x564A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 99 {0x1002, 0x564A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
100 {0x1002, 0x564B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 100 {0x1002, 0x564B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
101 {0x1002, 0x564F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 101 {0x1002, 0x564F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
@@ -113,8 +113,10 @@
113 {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 113 {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
114 {0x1002, 0x5965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 114 {0x1002, 0x5965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
115 {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ 115 {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \
116 {0x1002, 0x5a61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 116 {0x1002, 0x5a41, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART}, \
117 {0x1002, 0x5a62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 117 {0x1002, 0x5a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
118 {0x1002, 0x5a61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART}, \
119 {0x1002, 0x5a62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
118 {0x1002, 0x5b60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 120 {0x1002, 0x5b60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
119 {0x1002, 0x5b62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 121 {0x1002, 0x5b62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
120 {0x1002, 0x5b63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 122 {0x1002, 0x5b63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
@@ -122,16 +124,16 @@
122 {0x1002, 0x5b65, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 124 {0x1002, 0x5b65, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
123 {0x1002, 0x5c61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \ 125 {0x1002, 0x5c61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \
124 {0x1002, 0x5c63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \ 126 {0x1002, 0x5c63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280|RADEON_IS_MOBILITY}, \
125 {0x1002, 0x5d48, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 127 {0x1002, 0x5d48, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
126 {0x1002, 0x5d49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 128 {0x1002, 0x5d49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
127 {0x1002, 0x5d4a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 129 {0x1002, 0x5d4a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
128 {0x1002, 0x5d4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 130 {0x1002, 0x5d4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
129 {0x1002, 0x5d4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 131 {0x1002, 0x5d4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
130 {0x1002, 0x5d4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 132 {0x1002, 0x5d4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
131 {0x1002, 0x5d4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 133 {0x1002, 0x5d4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
132 {0x1002, 0x5d50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 134 {0x1002, 0x5d50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
133 {0x1002, 0x5d52, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 135 {0x1002, 0x5d52, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
134 {0x1002, 0x5d57, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ 136 {0x1002, 0x5d57, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R423|RADEON_NEW_MEMMAP}, \
135 {0x1002, 0x5e48, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ 137 {0x1002, 0x5e48, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \
136 {0x1002, 0x5e4a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ 138 {0x1002, 0x5e4a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \
137 {0x1002, 0x5e4b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ 139 {0x1002, 0x5e4b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \
@@ -237,6 +239,10 @@
237 {0x1002, 0x7835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 239 {0x1002, 0x7835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
238 {0x1002, 0x791e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \ 240 {0x1002, 0x791e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
239 {0x1002, 0x791f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \ 241 {0x1002, 0x791f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
242 {0x1002, 0x796c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
243 {0x1002, 0x796d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
244 {0x1002, 0x796e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
245 {0x1002, 0x796f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART}, \
240 {0, 0, 0} 246 {0, 0, 0}
241 247
242#define r128_PCI_IDS \ 248#define r128_PCI_IDS \
@@ -389,27 +395,27 @@
389 {0, 0, 0} 395 {0, 0, 0}
390 396
391#define i915_PCI_IDS \ 397#define i915_PCI_IDS \
392 {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 398 {0x8086, 0x3577, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
393 {0x8086, 0x2562, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 399 {0x8086, 0x2562, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
394 {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 400 {0x8086, 0x3582, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
395 {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 401 {0x8086, 0x2572, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
396 {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 402 {0x8086, 0x2582, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
397 {0x8086, 0x258a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 403 {0x8086, 0x258a, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
398 {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 404 {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
399 {0x8086, 0x2772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 405 {0x8086, 0x2772, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
400 {0x8086, 0x27a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 406 {0x8086, 0x27a2, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
401 {0x8086, 0x27ae, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 407 {0x8086, 0x27ae, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
402 {0x8086, 0x2972, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 408 {0x8086, 0x2972, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
403 {0x8086, 0x2982, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 409 {0x8086, 0x2982, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
404 {0x8086, 0x2992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 410 {0x8086, 0x2992, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
405 {0x8086, 0x29a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 411 {0x8086, 0x29a2, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
406 {0x8086, 0x29b2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 412 {0x8086, 0x29b2, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
407 {0x8086, 0x29c2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 413 {0x8086, 0x29c2, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
408 {0x8086, 0x29d2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 414 {0x8086, 0x29d2, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
409 {0x8086, 0x2a02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 415 {0x8086, 0x2a02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
410 {0x8086, 0x2a12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 416 {0x8086, 0x2a12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
411 {0x8086, 0x2a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 417 {0x8086, 0x2a42, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
412 {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 418 {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
413 {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 419 {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
414 {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 420 {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \
415 {0, 0, 0} 421 {0, 0, 0}
diff --git a/include/drm/drm_sarea.h b/include/drm/drm_sarea.h
index 480037331e4e..ee5389d22c64 100644
--- a/include/drm/drm_sarea.h
+++ b/include/drm/drm_sarea.h
@@ -36,12 +36,12 @@
36 36
37/* SAREA area needs to be at least a page */ 37/* SAREA area needs to be at least a page */
38#if defined(__alpha__) 38#if defined(__alpha__)
39#define SAREA_MAX 0x2000 39#define SAREA_MAX 0x2000U
40#elif defined(__ia64__) 40#elif defined(__ia64__)
41#define SAREA_MAX 0x10000 /* 64kB */ 41#define SAREA_MAX 0x10000U /* 64kB */
42#else 42#else
43/* Intel 830M driver needs at least 8k SAREA */ 43/* Intel 830M driver needs at least 8k SAREA */
44#define SAREA_MAX 0x2000 44#define SAREA_MAX 0x2000U
45#endif 45#endif
46 46
47/** Maximum number of drawables in the SAREA */ 47/** Maximum number of drawables in the SAREA */
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 05c66cf03a9e..b3bcf72dc656 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -113,8 +113,31 @@ typedef struct _drm_i915_sarea {
113 int pipeB_y; 113 int pipeB_y;
114 int pipeB_w; 114 int pipeB_w;
115 int pipeB_h; 115 int pipeB_h;
116
117 /* fill out some space for old userspace triple buffer */
118 drm_handle_t unused_handle;
119 uint32_t unused1, unused2, unused3;
120
121 /* buffer object handles for static buffers. May change
122 * over the lifetime of the client.
123 */
124 uint32_t front_bo_handle;
125 uint32_t back_bo_handle;
126 uint32_t unused_bo_handle;
127 uint32_t depth_bo_handle;
128
116} drm_i915_sarea_t; 129} drm_i915_sarea_t;
117 130
131/* due to userspace building against these headers we need some compat here */
132#define planeA_x pipeA_x
133#define planeA_y pipeA_y
134#define planeA_w pipeA_w
135#define planeA_h pipeA_h
136#define planeB_x pipeB_x
137#define planeB_y pipeB_y
138#define planeB_w pipeB_w
139#define planeB_h pipeB_h
140
118/* Flags for perf_boxes 141/* Flags for perf_boxes
119 */ 142 */
120#define I915_BOX_RING_EMPTY 0x1 143#define I915_BOX_RING_EMPTY 0x1
@@ -143,6 +166,24 @@ typedef struct _drm_i915_sarea {
143#define DRM_I915_GET_VBLANK_PIPE 0x0e 166#define DRM_I915_GET_VBLANK_PIPE 0x0e
144#define DRM_I915_VBLANK_SWAP 0x0f 167#define DRM_I915_VBLANK_SWAP 0x0f
145#define DRM_I915_HWS_ADDR 0x11 168#define DRM_I915_HWS_ADDR 0x11
169#define DRM_I915_GEM_INIT 0x13
170#define DRM_I915_GEM_EXECBUFFER 0x14
171#define DRM_I915_GEM_PIN 0x15
172#define DRM_I915_GEM_UNPIN 0x16
173#define DRM_I915_GEM_BUSY 0x17
174#define DRM_I915_GEM_THROTTLE 0x18
175#define DRM_I915_GEM_ENTERVT 0x19
176#define DRM_I915_GEM_LEAVEVT 0x1a
177#define DRM_I915_GEM_CREATE 0x1b
178#define DRM_I915_GEM_PREAD 0x1c
179#define DRM_I915_GEM_PWRITE 0x1d
180#define DRM_I915_GEM_MMAP 0x1e
181#define DRM_I915_GEM_SET_DOMAIN 0x1f
182#define DRM_I915_GEM_SW_FINISH 0x20
183#define DRM_I915_GEM_SET_TILING 0x21
184#define DRM_I915_GEM_GET_TILING 0x22
185#define DRM_I915_GEM_GET_APERTURE 0x23
186#define DRM_I915_GEM_MMAP_GTT 0x24
146 187
147#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 188#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
148#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 189#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -160,11 +201,29 @@ typedef struct _drm_i915_sarea {
160#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t) 201#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
161#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) 202#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t)
162#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) 203#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t)
204#define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init)
205#define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer)
206#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
207#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin)
208#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
209#define DRM_IOCTL_I915_GEM_THROTTLE DRM_IO ( DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE)
210#define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT)
211#define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT)
212#define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create)
213#define DRM_IOCTL_I915_GEM_PREAD DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread)
214#define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite)
215#define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap)
216#define DRM_IOCTL_I915_GEM_MMAP_GTT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt)
217#define DRM_IOCTL_I915_GEM_SET_DOMAIN DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain)
218#define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish)
219#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
220#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling)
221#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)
163 222
164/* Allow drivers to submit batchbuffers directly to hardware, relying 223/* Allow drivers to submit batchbuffers directly to hardware, relying
165 * on the security mechanisms provided by hardware. 224 * on the security mechanisms provided by hardware.
166 */ 225 */
167typedef struct _drm_i915_batchbuffer { 226typedef struct drm_i915_batchbuffer {
168 int start; /* agp offset */ 227 int start; /* agp offset */
169 int used; /* nr bytes in use */ 228 int used; /* nr bytes in use */
170 int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */ 229 int DR1; /* hw flags for GFX_OP_DRAWRECT_INFO */
@@ -200,6 +259,8 @@ typedef struct drm_i915_irq_wait {
200#define I915_PARAM_IRQ_ACTIVE 1 259#define I915_PARAM_IRQ_ACTIVE 1
201#define I915_PARAM_ALLOW_BATCHBUFFER 2 260#define I915_PARAM_ALLOW_BATCHBUFFER 2
202#define I915_PARAM_LAST_DISPATCH 3 261#define I915_PARAM_LAST_DISPATCH 3
262#define I915_PARAM_CHIPSET_ID 4
263#define I915_PARAM_HAS_GEM 5
203 264
204typedef struct drm_i915_getparam { 265typedef struct drm_i915_getparam {
205 int param; 266 int param;
@@ -267,4 +328,328 @@ typedef struct drm_i915_hws_addr {
267 uint64_t addr; 328 uint64_t addr;
268} drm_i915_hws_addr_t; 329} drm_i915_hws_addr_t;
269 330
331struct drm_i915_gem_init {
332 /**
333 * Beginning offset in the GTT to be managed by the DRM memory
334 * manager.
335 */
336 uint64_t gtt_start;
337 /**
338 * Ending offset in the GTT to be managed by the DRM memory
339 * manager.
340 */
341 uint64_t gtt_end;
342};
343
344struct drm_i915_gem_create {
345 /**
346 * Requested size for the object.
347 *
348 * The (page-aligned) allocated size for the object will be returned.
349 */
350 uint64_t size;
351 /**
352 * Returned handle for the object.
353 *
354 * Object handles are nonzero.
355 */
356 uint32_t handle;
357 uint32_t pad;
358};
359
360struct drm_i915_gem_pread {
361 /** Handle for the object being read. */
362 uint32_t handle;
363 uint32_t pad;
364 /** Offset into the object to read from */
365 uint64_t offset;
366 /** Length of data to read */
367 uint64_t size;
368 /**
369 * Pointer to write the data into.
370 *
371 * This is a fixed-size type for 32/64 compatibility.
372 */
373 uint64_t data_ptr;
374};
375
376struct drm_i915_gem_pwrite {
377 /** Handle for the object being written to. */
378 uint32_t handle;
379 uint32_t pad;
380 /** Offset into the object to write to */
381 uint64_t offset;
382 /** Length of data to write */
383 uint64_t size;
384 /**
385 * Pointer to read the data from.
386 *
387 * This is a fixed-size type for 32/64 compatibility.
388 */
389 uint64_t data_ptr;
390};
391
392struct drm_i915_gem_mmap {
393 /** Handle for the object being mapped. */
394 uint32_t handle;
395 uint32_t pad;
396 /** Offset in the object to map. */
397 uint64_t offset;
398 /**
399 * Length of data to map.
400 *
401 * The value will be page-aligned.
402 */
403 uint64_t size;
404 /**
405 * Returned pointer the data was mapped at.
406 *
407 * This is a fixed-size type for 32/64 compatibility.
408 */
409 uint64_t addr_ptr;
410};
411
412struct drm_i915_gem_mmap_gtt {
413 /** Handle for the object being mapped. */
414 uint32_t handle;
415 uint32_t pad;
416 /**
417 * Fake offset to use for subsequent mmap call
418 *
419 * This is a fixed-size type for 32/64 compatibility.
420 */
421 uint64_t offset;
422};
423
424struct drm_i915_gem_set_domain {
425 /** Handle for the object */
426 uint32_t handle;
427
428 /** New read domains */
429 uint32_t read_domains;
430
431 /** New write domain */
432 uint32_t write_domain;
433};
434
435struct drm_i915_gem_sw_finish {
436 /** Handle for the object */
437 uint32_t handle;
438};
439
440struct drm_i915_gem_relocation_entry {
441 /**
442 * Handle of the buffer being pointed to by this relocation entry.
443 *
444 * It's appealing to make this be an index into the mm_validate_entry
445 * list to refer to the buffer, but this allows the driver to create
446 * a relocation list for state buffers and not re-write it per
447 * exec using the buffer.
448 */
449 uint32_t target_handle;
450
451 /**
452 * Value to be added to the offset of the target buffer to make up
453 * the relocation entry.
454 */
455 uint32_t delta;
456
457 /** Offset in the buffer the relocation entry will be written into */
458 uint64_t offset;
459
460 /**
461 * Offset value of the target buffer that the relocation entry was last
462 * written as.
463 *
464 * If the buffer has the same offset as last time, we can skip syncing
465 * and writing the relocation. This value is written back out by
466 * the execbuffer ioctl when the relocation is written.
467 */
468 uint64_t presumed_offset;
469
470 /**
471 * Target memory domains read by this operation.
472 */
473 uint32_t read_domains;
474
475 /**
476 * Target memory domains written by this operation.
477 *
478 * Note that only one domain may be written by the whole
479 * execbuffer operation, so that where there are conflicts,
480 * the application will get -EINVAL back.
481 */
482 uint32_t write_domain;
483};
484
485/** @{
486 * Intel memory domains
487 *
488 * Most of these just align with the various caches in
489 * the system and are used to flush and invalidate as
490 * objects end up cached in different domains.
491 */
492/** CPU cache */
493#define I915_GEM_DOMAIN_CPU 0x00000001
494/** Render cache, used by 2D and 3D drawing */
495#define I915_GEM_DOMAIN_RENDER 0x00000002
496/** Sampler cache, used by texture engine */
497#define I915_GEM_DOMAIN_SAMPLER 0x00000004
498/** Command queue, used to load batch buffers */
499#define I915_GEM_DOMAIN_COMMAND 0x00000008
500/** Instruction cache, used by shader programs */
501#define I915_GEM_DOMAIN_INSTRUCTION 0x00000010
502/** Vertex address cache */
503#define I915_GEM_DOMAIN_VERTEX 0x00000020
504/** GTT domain - aperture and scanout */
505#define I915_GEM_DOMAIN_GTT 0x00000040
506/** @} */
507
508struct drm_i915_gem_exec_object {
509 /**
510 * User's handle for a buffer to be bound into the GTT for this
511 * operation.
512 */
513 uint32_t handle;
514
515 /** Number of relocations to be performed on this buffer */
516 uint32_t relocation_count;
517 /**
518 * Pointer to array of struct drm_i915_gem_relocation_entry containing
519 * the relocations to be performed in this buffer.
520 */
521 uint64_t relocs_ptr;
522
523 /** Required alignment in graphics aperture */
524 uint64_t alignment;
525
526 /**
527 * Returned value of the updated offset of the object, for future
528 * presumed_offset writes.
529 */
530 uint64_t offset;
531};
532
533struct drm_i915_gem_execbuffer {
534 /**
535 * List of buffers to be validated with their relocations to be
536 * performend on them.
537 *
538 * This is a pointer to an array of struct drm_i915_gem_validate_entry.
539 *
540 * These buffers must be listed in an order such that all relocations
541 * a buffer is performing refer to buffers that have already appeared
542 * in the validate list.
543 */
544 uint64_t buffers_ptr;
545 uint32_t buffer_count;
546
547 /** Offset in the batchbuffer to start execution from. */
548 uint32_t batch_start_offset;
549 /** Bytes used in batchbuffer from batch_start_offset */
550 uint32_t batch_len;
551 uint32_t DR1;
552 uint32_t DR4;
553 uint32_t num_cliprects;
554 /** This is a struct drm_clip_rect *cliprects */
555 uint64_t cliprects_ptr;
556};
557
558struct drm_i915_gem_pin {
559 /** Handle of the buffer to be pinned. */
560 uint32_t handle;
561 uint32_t pad;
562
563 /** alignment required within the aperture */
564 uint64_t alignment;
565
566 /** Returned GTT offset of the buffer. */
567 uint64_t offset;
568};
569
570struct drm_i915_gem_unpin {
571 /** Handle of the buffer to be unpinned. */
572 uint32_t handle;
573 uint32_t pad;
574};
575
576struct drm_i915_gem_busy {
577 /** Handle of the buffer to check for busy */
578 uint32_t handle;
579
580 /** Return busy status (1 if busy, 0 if idle) */
581 uint32_t busy;
582};
583
584#define I915_TILING_NONE 0
585#define I915_TILING_X 1
586#define I915_TILING_Y 2
587
588#define I915_BIT_6_SWIZZLE_NONE 0
589#define I915_BIT_6_SWIZZLE_9 1
590#define I915_BIT_6_SWIZZLE_9_10 2
591#define I915_BIT_6_SWIZZLE_9_11 3
592#define I915_BIT_6_SWIZZLE_9_10_11 4
593/* Not seen by userland */
594#define I915_BIT_6_SWIZZLE_UNKNOWN 5
595
596struct drm_i915_gem_set_tiling {
597 /** Handle of the buffer to have its tiling state updated */
598 uint32_t handle;
599
600 /**
601 * Tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
602 * I915_TILING_Y).
603 *
604 * This value is to be set on request, and will be updated by the
605 * kernel on successful return with the actual chosen tiling layout.
606 *
607 * The tiling mode may be demoted to I915_TILING_NONE when the system
608 * has bit 6 swizzling that can't be managed correctly by GEM.
609 *
610 * Buffer contents become undefined when changing tiling_mode.
611 */
612 uint32_t tiling_mode;
613
614 /**
615 * Stride in bytes for the object when in I915_TILING_X or
616 * I915_TILING_Y.
617 */
618 uint32_t stride;
619
620 /**
621 * Returned address bit 6 swizzling required for CPU access through
622 * mmap mapping.
623 */
624 uint32_t swizzle_mode;
625};
626
627struct drm_i915_gem_get_tiling {
628 /** Handle of the buffer to get tiling state for. */
629 uint32_t handle;
630
631 /**
632 * Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
633 * I915_TILING_Y).
634 */
635 uint32_t tiling_mode;
636
637 /**
638 * Returned address bit 6 swizzling required for CPU access through
639 * mmap mapping.
640 */
641 uint32_t swizzle_mode;
642};
643
644struct drm_i915_gem_get_aperture {
645 /** Total size of the aperture used by i915_gem_execbuffer, in bytes */
646 uint64_t aper_size;
647
648 /**
649 * Available space in the aperture used by i915_gem_execbuffer, in
650 * bytes
651 */
652 uint64_t aper_available_size;
653};
654
270#endif /* _I915_DRM_H_ */ 655#endif /* _I915_DRM_H_ */
diff --git a/include/keys/keyring-type.h b/include/keys/keyring-type.h
new file mode 100644
index 000000000000..843f872a4b63
--- /dev/null
+++ b/include/keys/keyring-type.h
@@ -0,0 +1,31 @@
1/* Keyring key type
2 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#ifndef _KEYS_KEYRING_TYPE_H
13#define _KEYS_KEYRING_TYPE_H
14
15#include <linux/key.h>
16#include <linux/rcupdate.h>
17
18/*
19 * the keyring payload contains a list of the keys to which the keyring is
20 * subscribed
21 */
22struct keyring_list {
23 struct rcu_head rcu; /* RCU deletion hook */
24 unsigned short maxkeys; /* max keys this list can hold */
25 unsigned short nkeys; /* number of keys currently held */
26 unsigned short delkey; /* key to be unlinked by RCU */
27 struct key *keys[0];
28};
29
30
31#endif /* _KEYS_KEYRING_TYPE_H */
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 282a504bd1db..95ac82340c3b 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -107,6 +107,7 @@ header-y += keyctl.h
107header-y += limits.h 107header-y += limits.h
108header-y += magic.h 108header-y += magic.h
109header-y += major.h 109header-y += major.h
110header-y += map_to_7segment.h
110header-y += matroxfb.h 111header-y += matroxfb.h
111header-y += meye.h 112header-y += meye.h
112header-y += minix_fs.h 113header-y += minix_fs.h
@@ -182,6 +183,7 @@ unifdef-y += auto_fs.h
182unifdef-y += auxvec.h 183unifdef-y += auxvec.h
183unifdef-y += binfmts.h 184unifdef-y += binfmts.h
184unifdef-y += blktrace_api.h 185unifdef-y += blktrace_api.h
186unifdef-y += byteorder.h
185unifdef-y += capability.h 187unifdef-y += capability.h
186unifdef-y += capi.h 188unifdef-y += capi.h
187unifdef-y += cciss_ioctl.h 189unifdef-y += cciss_ioctl.h
@@ -311,6 +313,7 @@ unifdef-y += ptrace.h
311unifdef-y += qnx4_fs.h 313unifdef-y += qnx4_fs.h
312unifdef-y += quota.h 314unifdef-y += quota.h
313unifdef-y += random.h 315unifdef-y += random.h
316unifdef-y += irqnr.h
314unifdef-y += reboot.h 317unifdef-y += reboot.h
315unifdef-y += reiserfs_fs.h 318unifdef-y += reiserfs_fs.h
316unifdef-y += reiserfs_xattr.h 319unifdef-y += reiserfs_xattr.h
@@ -339,6 +342,7 @@ unifdef-y += soundcard.h
339unifdef-y += stat.h 342unifdef-y += stat.h
340unifdef-y += stddef.h 343unifdef-y += stddef.h
341unifdef-y += string.h 344unifdef-y += string.h
345unifdef-y += swab.h
342unifdef-y += synclink.h 346unifdef-y += synclink.h
343unifdef-y += sysctl.h 347unifdef-y += sysctl.h
344unifdef-y += tcp.h 348unifdef-y += tcp.h
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 702f79dad16a..fba8051fb297 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -94,18 +94,10 @@ int acpi_parse_mcfg (struct acpi_table_header *header);
94void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); 94void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
95 95
96/* the following four functions are architecture-dependent */ 96/* the following four functions are architecture-dependent */
97#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
98#define NR_NODE_MEMBLKS MAX_NUMNODES
99#define acpi_numa_slit_init(slit) do {} while (0)
100#define acpi_numa_processor_affinity_init(pa) do {} while (0)
101#define acpi_numa_memory_affinity_init(ma) do {} while (0)
102#define acpi_numa_arch_fixup() do {} while (0)
103#else
104void acpi_numa_slit_init (struct acpi_table_slit *slit); 97void acpi_numa_slit_init (struct acpi_table_slit *slit);
105void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); 98void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
106void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); 99void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
107void acpi_numa_arch_fixup(void); 100void acpi_numa_arch_fixup(void);
108#endif
109 101
110#ifdef CONFIG_ACPI_HOTPLUG_CPU 102#ifdef CONFIG_ACPI_HOTPLUG_CPU
111/* Arch dependent functions for cpu hotplug support */ 103/* Arch dependent functions for cpu hotplug support */
@@ -171,8 +163,6 @@ struct acpi_pci_driver {
171int acpi_pci_register_driver(struct acpi_pci_driver *driver); 163int acpi_pci_register_driver(struct acpi_pci_driver *driver);
172void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); 164void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
173 165
174#ifdef CONFIG_ACPI_EC
175
176extern int ec_read(u8 addr, u8 *val); 166extern int ec_read(u8 addr, u8 *val);
177extern int ec_write(u8 addr, u8 val); 167extern int ec_write(u8 addr, u8 val);
178extern int ec_transaction(u8 command, 168extern int ec_transaction(u8 command,
@@ -180,8 +170,6 @@ extern int ec_transaction(u8 command,
180 u8 *rdata, unsigned rdata_len, 170 u8 *rdata, unsigned rdata_len,
181 int force_poll); 171 int force_poll);
182 172
183#endif /*CONFIG_ACPI_EC*/
184
185#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) 173#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
186 174
187typedef void (*wmi_notify_handler) (u32 value, void *context); 175typedef void (*wmi_notify_handler) (u32 value, void *context);
@@ -202,6 +190,50 @@ extern bool wmi_has_guid(const char *guid);
202 190
203#endif /* CONFIG_ACPI_WMI */ 191#endif /* CONFIG_ACPI_WMI */
204 192
193#define ACPI_VIDEO_OUTPUT_SWITCHING 0x0001
194#define ACPI_VIDEO_DEVICE_POSTING 0x0002
195#define ACPI_VIDEO_ROM_AVAILABLE 0x0004
196#define ACPI_VIDEO_BACKLIGHT 0x0008
197#define ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR 0x0010
198#define ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO 0x0020
199#define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR 0x0040
200#define ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO 0x0080
201#define ACPI_VIDEO_BACKLIGHT_DMI_VENDOR 0x0100
202#define ACPI_VIDEO_BACKLIGHT_DMI_VIDEO 0x0200
203#define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR 0x0400
204#define ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO 0x0800
205
206#if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE)
207
208extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle);
209extern long acpi_is_video_device(struct acpi_device *device);
210extern int acpi_video_backlight_support(void);
211extern int acpi_video_display_switch_support(void);
212
213#else
214
215static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle)
216{
217 return 0;
218}
219
220static inline long acpi_is_video_device(struct acpi_device *device)
221{
222 return 0;
223}
224
225static inline int acpi_video_backlight_support(void)
226{
227 return 0;
228}
229
230static inline int acpi_video_display_switch_support(void)
231{
232 return 0;
233}
234
235#endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */
236
205extern int acpi_blacklisted(void); 237extern int acpi_blacklisted(void);
206#ifdef CONFIG_DMI 238#ifdef CONFIG_DMI
207extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); 239extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
diff --git a/include/linux/aer.h b/include/linux/aer.h
index f2518141de88..f7df1eefc107 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -10,7 +10,6 @@
10#if defined(CONFIG_PCIEAER) 10#if defined(CONFIG_PCIEAER)
11/* pci-e port driver needs this function to enable aer */ 11/* pci-e port driver needs this function to enable aer */
12extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); 12extern int pci_enable_pcie_error_reporting(struct pci_dev *dev);
13extern int pci_find_aer_capability(struct pci_dev *dev);
14extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); 13extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
15extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); 14extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
16#else 15#else
@@ -18,10 +17,6 @@ static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev)
18{ 17{
19 return -EINVAL; 18 return -EINVAL;
20} 19}
21static inline int pci_find_aer_capability(struct pci_dev *dev)
22{
23 return 0;
24}
25static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) 20static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev)
26{ 21{
27 return -EINVAL; 22 return -EINVAL;
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 09b276c35227..b16a957030f8 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -5,6 +5,7 @@
5#include <linux/workqueue.h> 5#include <linux/workqueue.h>
6#include <linux/aio_abi.h> 6#include <linux/aio_abi.h>
7#include <linux/uio.h> 7#include <linux/uio.h>
8#include <linux/rcupdate.h>
8 9
9#include <asm/atomic.h> 10#include <asm/atomic.h>
10 11
@@ -183,7 +184,7 @@ struct kioctx {
183 184
184 /* This needs improving */ 185 /* This needs improving */
185 unsigned long user_id; 186 unsigned long user_id;
186 struct kioctx *next; 187 struct hlist_node list;
187 188
188 wait_queue_head_t wait; 189 wait_queue_head_t wait;
189 190
@@ -199,17 +200,28 @@ struct kioctx {
199 struct aio_ring_info ring_info; 200 struct aio_ring_info ring_info;
200 201
201 struct delayed_work wq; 202 struct delayed_work wq;
203
204 struct rcu_head rcu_head;
202}; 205};
203 206
204/* prototypes */ 207/* prototypes */
205extern unsigned aio_max_size; 208extern unsigned aio_max_size;
206 209
210#ifdef CONFIG_AIO
207extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); 211extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
208extern int aio_put_req(struct kiocb *iocb); 212extern int aio_put_req(struct kiocb *iocb);
209extern void kick_iocb(struct kiocb *iocb); 213extern void kick_iocb(struct kiocb *iocb);
210extern int aio_complete(struct kiocb *iocb, long res, long res2); 214extern int aio_complete(struct kiocb *iocb, long res, long res2);
211struct mm_struct; 215struct mm_struct;
212extern void exit_aio(struct mm_struct *mm); 216extern void exit_aio(struct mm_struct *mm);
217#else
218static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; }
219static inline int aio_put_req(struct kiocb *iocb) { return 0; }
220static inline void kick_iocb(struct kiocb *iocb) { }
221static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; }
222struct mm_struct;
223static inline void exit_aio(struct mm_struct *mm) { }
224#endif /* CONFIG_AIO */
213 225
214#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) 226#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
215 227
diff --git a/include/linux/atm.h b/include/linux/atm.h
index c791ddd96939..d3b292174aeb 100644
--- a/include/linux/atm.h
+++ b/include/linux/atm.h
@@ -231,10 +231,21 @@ static __inline__ int atmpvc_addr_in_use(struct sockaddr_atmpvc addr)
231 */ 231 */
232 232
233struct atmif_sioc { 233struct atmif_sioc {
234 int number; 234 int number;
235 int length; 235 int length;
236 void __user *arg; 236 void __user *arg;
237}; 237};
238 238
239#ifdef __KERNEL__
240#ifdef CONFIG_COMPAT
241#include <linux/compat.h>
242struct compat_atmif_sioc {
243 int number;
244 int length;
245 compat_uptr_t arg;
246};
247#endif
248#endif
249
239typedef unsigned short atm_backend_t; 250typedef unsigned short atm_backend_t;
240#endif 251#endif
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index a3d07c29d16c..086e5c362d3a 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -100,6 +100,10 @@ struct atm_dev_stats {
100 /* use backend to make new if */ 100 /* use backend to make new if */
101#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf) 101#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
102 /* add party to p2mp call */ 102 /* add party to p2mp call */
103#ifdef CONFIG_COMPAT
104/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
105#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf)
106#endif
103#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int) 107#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
104 /* drop party from p2mp call */ 108 /* drop party from p2mp call */
105 109
@@ -224,6 +228,13 @@ struct atm_cirange {
224extern struct proc_dir_entry *atm_proc_root; 228extern struct proc_dir_entry *atm_proc_root;
225#endif 229#endif
226 230
231#ifdef CONFIG_COMPAT
232#include <linux/compat.h>
233struct compat_atm_iobuf {
234 int length;
235 compat_uptr_t buffer;
236};
237#endif
227 238
228struct k_atm_aal_stats { 239struct k_atm_aal_stats {
229#define __HANDLE_ITEM(i) atomic_t i 240#define __HANDLE_ITEM(i) atomic_t i
@@ -379,6 +390,10 @@ struct atmdev_ops { /* only send is required */
379 int (*open)(struct atm_vcc *vcc); 390 int (*open)(struct atm_vcc *vcc);
380 void (*close)(struct atm_vcc *vcc); 391 void (*close)(struct atm_vcc *vcc);
381 int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg); 392 int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg);
393#ifdef CONFIG_COMPAT
394 int (*compat_ioctl)(struct atm_dev *dev,unsigned int cmd,
395 void __user *arg);
396#endif
382 int (*getsockopt)(struct atm_vcc *vcc,int level,int optname, 397 int (*getsockopt)(struct atm_vcc *vcc,int level,int optname,
383 void __user *optval,int optlen); 398 void __user *optval,int optlen);
384 int (*setsockopt)(struct atm_vcc *vcc,int level,int optname, 399 int (*setsockopt)(struct atm_vcc *vcc,int level,int optname,
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 6272a395d43c..26c4f6f65a46 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -99,6 +99,8 @@
99#define AUDIT_OBJ_PID 1318 /* ptrace target */ 99#define AUDIT_OBJ_PID 1318 /* ptrace target */
100#define AUDIT_TTY 1319 /* Input on an administrative TTY */ 100#define AUDIT_TTY 1319 /* Input on an administrative TTY */
101#define AUDIT_EOE 1320 /* End of multi-record event */ 101#define AUDIT_EOE 1320 /* End of multi-record event */
102#define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */
103#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */
102 104
103#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ 105#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
104#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ 106#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
@@ -391,6 +393,7 @@ extern int audit_classify_arch(int arch);
391#ifdef CONFIG_AUDITSYSCALL 393#ifdef CONFIG_AUDITSYSCALL
392/* These are defined in auditsc.c */ 394/* These are defined in auditsc.c */
393 /* Public API */ 395 /* Public API */
396extern void audit_finish_fork(struct task_struct *child);
394extern int audit_alloc(struct task_struct *task); 397extern int audit_alloc(struct task_struct *task);
395extern void audit_free(struct task_struct *task); 398extern void audit_free(struct task_struct *task);
396extern void audit_syscall_entry(int arch, 399extern void audit_syscall_entry(int arch,
@@ -434,7 +437,7 @@ static inline void audit_ptrace(struct task_struct *t)
434 437
435 /* Private API (for audit.c only) */ 438 /* Private API (for audit.c only) */
436extern unsigned int audit_serial(void); 439extern unsigned int audit_serial(void);
437extern void auditsc_get_stamp(struct audit_context *ctx, 440extern int auditsc_get_stamp(struct audit_context *ctx,
438 struct timespec *t, unsigned int *serial); 441 struct timespec *t, unsigned int *serial);
439extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); 442extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
440#define audit_get_loginuid(t) ((t)->loginuid) 443#define audit_get_loginuid(t) ((t)->loginuid)
@@ -452,6 +455,10 @@ extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_pr
452extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); 455extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout);
453extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); 456extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification);
454extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); 457extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
458extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
459 const struct cred *new,
460 const struct cred *old);
461extern int __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old);
455 462
456static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) 463static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp)
457{ 464{
@@ -501,9 +508,28 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
501 return __audit_mq_getsetattr(mqdes, mqstat); 508 return __audit_mq_getsetattr(mqdes, mqstat);
502 return 0; 509 return 0;
503} 510}
511
512static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
513 const struct cred *new,
514 const struct cred *old)
515{
516 if (unlikely(!audit_dummy_context()))
517 return __audit_log_bprm_fcaps(bprm, new, old);
518 return 0;
519}
520
521static inline int audit_log_capset(pid_t pid, const struct cred *new,
522 const struct cred *old)
523{
524 if (unlikely(!audit_dummy_context()))
525 return __audit_log_capset(pid, new, old);
526 return 0;
527}
528
504extern int audit_n_rules; 529extern int audit_n_rules;
505extern int audit_signals; 530extern int audit_signals;
506#else 531#else
532#define audit_finish_fork(t)
507#define audit_alloc(t) ({ 0; }) 533#define audit_alloc(t) ({ 0; })
508#define audit_free(t) do { ; } while (0) 534#define audit_free(t) do { ; } while (0)
509#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) 535#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
@@ -516,7 +542,7 @@ extern int audit_signals;
516#define audit_inode(n,d) do { ; } while (0) 542#define audit_inode(n,d) do { ; } while (0)
517#define audit_inode_child(d,i,p) do { ; } while (0) 543#define audit_inode_child(d,i,p) do { ; } while (0)
518#define audit_core_dumps(i) do { ; } while (0) 544#define audit_core_dumps(i) do { ; } while (0)
519#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) 545#define auditsc_get_stamp(c,t,s) (0)
520#define audit_get_loginuid(t) (-1) 546#define audit_get_loginuid(t) (-1)
521#define audit_get_sessionid(t) (-1) 547#define audit_get_sessionid(t) (-1)
522#define audit_log_task_context(b) do { ; } while (0) 548#define audit_log_task_context(b) do { ; } while (0)
@@ -532,6 +558,8 @@ extern int audit_signals;
532#define audit_mq_timedreceive(d,l,p,t) ({ 0; }) 558#define audit_mq_timedreceive(d,l,p,t) ({ 0; })
533#define audit_mq_notify(d,n) ({ 0; }) 559#define audit_mq_notify(d,n) ({ 0; })
534#define audit_mq_getsetattr(d,s) ({ 0; }) 560#define audit_mq_getsetattr(d,s) ({ 0; })
561#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
562#define audit_log_capset(pid, ncr, ocr) ({ 0; })
535#define audit_ptrace(t) ((void)0) 563#define audit_ptrace(t) ((void)0)
536#define audit_n_rules 0 564#define audit_n_rules 0
537#define audit_signals 0 565#define audit_signals 0
diff --git a/include/linux/auto_dev-ioctl.h b/include/linux/auto_dev-ioctl.h
new file mode 100644
index 000000000000..f4d05ccd731f
--- /dev/null
+++ b/include/linux/auto_dev-ioctl.h
@@ -0,0 +1,157 @@
1/*
2 * Copyright 2008 Red Hat, Inc. All rights reserved.
3 * Copyright 2008 Ian Kent <raven@themaw.net>
4 *
5 * This file is part of the Linux kernel and is made available under
6 * the terms of the GNU General Public License, version 2, or at your
7 * option, any later version, incorporated herein by reference.
8 */
9
10#ifndef _LINUX_AUTO_DEV_IOCTL_H
11#define _LINUX_AUTO_DEV_IOCTL_H
12
13#include <linux/types.h>
14
15#define AUTOFS_DEVICE_NAME "autofs"
16
17#define AUTOFS_DEV_IOCTL_VERSION_MAJOR 1
18#define AUTOFS_DEV_IOCTL_VERSION_MINOR 0
19
20#define AUTOFS_DEVID_LEN 16
21
22#define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl)
23
24/*
25 * An ioctl interface for autofs mount point control.
26 */
27
28/*
29 * All the ioctls use this structure.
30 * When sending a path size must account for the total length
31 * of the chunk of memory otherwise is is the size of the
32 * structure.
33 */
34
35struct autofs_dev_ioctl {
36 __u32 ver_major;
37 __u32 ver_minor;
38 __u32 size; /* total size of data passed in
39 * including this struct */
40 __s32 ioctlfd; /* automount command fd */
41
42 __u32 arg1; /* Command parameters */
43 __u32 arg2;
44
45 char path[0];
46};
47
48static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in)
49{
50 in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR;
51 in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR;
52 in->size = sizeof(struct autofs_dev_ioctl);
53 in->ioctlfd = -1;
54 in->arg1 = 0;
55 in->arg2 = 0;
56 return;
57}
58
59/*
60 * If you change this make sure you make the corresponding change
61 * to autofs-dev-ioctl.c:lookup_ioctl()
62 */
63enum {
64 /* Get various version info */
65 AUTOFS_DEV_IOCTL_VERSION_CMD = 0x71,
66 AUTOFS_DEV_IOCTL_PROTOVER_CMD,
67 AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD,
68
69 /* Open mount ioctl fd */
70 AUTOFS_DEV_IOCTL_OPENMOUNT_CMD,
71
72 /* Close mount ioctl fd */
73 AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD,
74
75 /* Mount/expire status returns */
76 AUTOFS_DEV_IOCTL_READY_CMD,
77 AUTOFS_DEV_IOCTL_FAIL_CMD,
78
79 /* Activate/deactivate autofs mount */
80 AUTOFS_DEV_IOCTL_SETPIPEFD_CMD,
81 AUTOFS_DEV_IOCTL_CATATONIC_CMD,
82
83 /* Expiry timeout */
84 AUTOFS_DEV_IOCTL_TIMEOUT_CMD,
85
86 /* Get mount last requesting uid and gid */
87 AUTOFS_DEV_IOCTL_REQUESTER_CMD,
88
89 /* Check for eligible expire candidates */
90 AUTOFS_DEV_IOCTL_EXPIRE_CMD,
91
92 /* Request busy status */
93 AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD,
94
95 /* Check if path is a mountpoint */
96 AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD,
97};
98
99#define AUTOFS_IOCTL 0x93
100
101#define AUTOFS_DEV_IOCTL_VERSION \
102 _IOWR(AUTOFS_IOCTL, \
103 AUTOFS_DEV_IOCTL_VERSION_CMD, struct autofs_dev_ioctl)
104
105#define AUTOFS_DEV_IOCTL_PROTOVER \
106 _IOWR(AUTOFS_IOCTL, \
107 AUTOFS_DEV_IOCTL_PROTOVER_CMD, struct autofs_dev_ioctl)
108
109#define AUTOFS_DEV_IOCTL_PROTOSUBVER \
110 _IOWR(AUTOFS_IOCTL, \
111 AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD, struct autofs_dev_ioctl)
112
113#define AUTOFS_DEV_IOCTL_OPENMOUNT \
114 _IOWR(AUTOFS_IOCTL, \
115 AUTOFS_DEV_IOCTL_OPENMOUNT_CMD, struct autofs_dev_ioctl)
116
117#define AUTOFS_DEV_IOCTL_CLOSEMOUNT \
118 _IOWR(AUTOFS_IOCTL, \
119 AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD, struct autofs_dev_ioctl)
120
121#define AUTOFS_DEV_IOCTL_READY \
122 _IOWR(AUTOFS_IOCTL, \
123 AUTOFS_DEV_IOCTL_READY_CMD, struct autofs_dev_ioctl)
124
125#define AUTOFS_DEV_IOCTL_FAIL \
126 _IOWR(AUTOFS_IOCTL, \
127 AUTOFS_DEV_IOCTL_FAIL_CMD, struct autofs_dev_ioctl)
128
129#define AUTOFS_DEV_IOCTL_SETPIPEFD \
130 _IOWR(AUTOFS_IOCTL, \
131 AUTOFS_DEV_IOCTL_SETPIPEFD_CMD, struct autofs_dev_ioctl)
132
133#define AUTOFS_DEV_IOCTL_CATATONIC \
134 _IOWR(AUTOFS_IOCTL, \
135 AUTOFS_DEV_IOCTL_CATATONIC_CMD, struct autofs_dev_ioctl)
136
137#define AUTOFS_DEV_IOCTL_TIMEOUT \
138 _IOWR(AUTOFS_IOCTL, \
139 AUTOFS_DEV_IOCTL_TIMEOUT_CMD, struct autofs_dev_ioctl)
140
141#define AUTOFS_DEV_IOCTL_REQUESTER \
142 _IOWR(AUTOFS_IOCTL, \
143 AUTOFS_DEV_IOCTL_REQUESTER_CMD, struct autofs_dev_ioctl)
144
145#define AUTOFS_DEV_IOCTL_EXPIRE \
146 _IOWR(AUTOFS_IOCTL, \
147 AUTOFS_DEV_IOCTL_EXPIRE_CMD, struct autofs_dev_ioctl)
148
149#define AUTOFS_DEV_IOCTL_ASKUMOUNT \
150 _IOWR(AUTOFS_IOCTL, \
151 AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD, struct autofs_dev_ioctl)
152
153#define AUTOFS_DEV_IOCTL_ISMOUNTPOINT \
154 _IOWR(AUTOFS_IOCTL, \
155 AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, struct autofs_dev_ioctl)
156
157#endif /* _LINUX_AUTO_DEV_IOCTL_H */
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h
index b785c6f8644d..2253716d4b92 100644
--- a/include/linux/auto_fs4.h
+++ b/include/linux/auto_fs4.h
@@ -23,12 +23,17 @@
23#define AUTOFS_MIN_PROTO_VERSION 3 23#define AUTOFS_MIN_PROTO_VERSION 3
24#define AUTOFS_MAX_PROTO_VERSION 5 24#define AUTOFS_MAX_PROTO_VERSION 5
25 25
26#define AUTOFS_PROTO_SUBVERSION 0 26#define AUTOFS_PROTO_SUBVERSION 1
27 27
28/* Mask for expire behaviour */ 28/* Mask for expire behaviour */
29#define AUTOFS_EXP_IMMEDIATE 1 29#define AUTOFS_EXP_IMMEDIATE 1
30#define AUTOFS_EXP_LEAVES 2 30#define AUTOFS_EXP_LEAVES 2
31 31
32#define AUTOFS_TYPE_ANY 0x0000
33#define AUTOFS_TYPE_INDIRECT 0x0001
34#define AUTOFS_TYPE_DIRECT 0x0002
35#define AUTOFS_TYPE_OFFSET 0x0004
36
32/* Daemon notification packet types */ 37/* Daemon notification packet types */
33enum autofs_notify { 38enum autofs_notify {
34 NFY_NONE, 39 NFY_NONE,
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 0a24d5550eb3..bee52abb8a4d 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -175,6 +175,8 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
175 * BDI_CAP_READ_MAP: Can be mapped for reading 175 * BDI_CAP_READ_MAP: Can be mapped for reading
176 * BDI_CAP_WRITE_MAP: Can be mapped for writing 176 * BDI_CAP_WRITE_MAP: Can be mapped for writing
177 * BDI_CAP_EXEC_MAP: Can be mapped for execution 177 * BDI_CAP_EXEC_MAP: Can be mapped for execution
178 *
179 * BDI_CAP_SWAP_BACKED: Count shmem/tmpfs objects as swap-backed.
178 */ 180 */
179#define BDI_CAP_NO_ACCT_DIRTY 0x00000001 181#define BDI_CAP_NO_ACCT_DIRTY 0x00000001
180#define BDI_CAP_NO_WRITEBACK 0x00000002 182#define BDI_CAP_NO_WRITEBACK 0x00000002
@@ -184,6 +186,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
184#define BDI_CAP_WRITE_MAP 0x00000020 186#define BDI_CAP_WRITE_MAP 0x00000020
185#define BDI_CAP_EXEC_MAP 0x00000040 187#define BDI_CAP_EXEC_MAP 0x00000040
186#define BDI_CAP_NO_ACCT_WB 0x00000080 188#define BDI_CAP_NO_ACCT_WB 0x00000080
189#define BDI_CAP_SWAP_BACKED 0x00000100
187 190
188#define BDI_CAP_VMFLAGS \ 191#define BDI_CAP_VMFLAGS \
189 (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP) 192 (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
@@ -248,6 +251,11 @@ static inline bool bdi_cap_account_writeback(struct backing_dev_info *bdi)
248 BDI_CAP_NO_WRITEBACK)); 251 BDI_CAP_NO_WRITEBACK));
249} 252}
250 253
254static inline bool bdi_cap_swap_backed(struct backing_dev_info *bdi)
255{
256 return bdi->capabilities & BDI_CAP_SWAP_BACKED;
257}
258
251static inline bool mapping_cap_writeback_dirty(struct address_space *mapping) 259static inline bool mapping_cap_writeback_dirty(struct address_space *mapping)
252{ 260{
253 return bdi_cap_writeback_dirty(mapping->backing_dev_info); 261 return bdi_cap_writeback_dirty(mapping->backing_dev_info);
@@ -258,4 +266,9 @@ static inline bool mapping_cap_account_dirty(struct address_space *mapping)
258 return bdi_cap_account_dirty(mapping->backing_dev_info); 266 return bdi_cap_account_dirty(mapping->backing_dev_info);
259} 267}
260 268
269static inline bool mapping_cap_swap_backed(struct address_space *mapping)
270{
271 return bdi_cap_swap_backed(mapping->backing_dev_info);
272}
273
261#endif /* _LINUX_BACKING_DEV_H */ 274#endif /* _LINUX_BACKING_DEV_H */
diff --git a/include/linux/bcd.h b/include/linux/bcd.h
index 7ac518e3c152..22ea563ba3eb 100644
--- a/include/linux/bcd.h
+++ b/include/linux/bcd.h
@@ -1,12 +1,3 @@
1/* Permission is hereby granted to copy, modify and redistribute this code
2 * in terms of the GNU Library General Public License, Version 2 or later,
3 * at your option.
4 */
5
6/* macros to translate to/from binary and binary-coded decimal (frequently
7 * found in RTC chips).
8 */
9
10#ifndef _BCD_H 1#ifndef _BCD_H
11#define _BCD_H 2#define _BCD_H
12 3
@@ -15,11 +6,4 @@
15unsigned bcd2bin(unsigned char val) __attribute_const__; 6unsigned bcd2bin(unsigned char val) __attribute_const__;
16unsigned char bin2bcd(unsigned val) __attribute_const__; 7unsigned char bin2bcd(unsigned val) __attribute_const__;
17 8
18#define BCD2BIN(val) bcd2bin(val)
19#define BIN2BCD(val) bin2bcd(val)
20
21/* backwards compat */
22#define BCD_TO_BIN(val) ((val)=BCD2BIN(val))
23#define BIN_TO_BCD(val) ((val)=BIN2BCD(val))
24
25#endif /* _BCD_H */ 9#endif /* _BCD_H */
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 826f62350805..6cbfbe297180 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -35,12 +35,20 @@ struct linux_binprm{
35 struct mm_struct *mm; 35 struct mm_struct *mm;
36 unsigned long p; /* current top of mem */ 36 unsigned long p; /* current top of mem */
37 unsigned int sh_bang:1, 37 unsigned int sh_bang:1,
38 misc_bang:1; 38 misc_bang:1,
39 cred_prepared:1,/* true if creds already prepared (multiple
40 * preps happen for interpreters) */
41 cap_effective:1;/* true if has elevated effective capabilities,
42 * false if not; except for init which inherits
43 * its parent's caps anyway */
44#ifdef __alpha__
45 unsigned int taso:1;
46#endif
47 unsigned int recursion_depth;
39 struct file * file; 48 struct file * file;
40 int e_uid, e_gid; 49 struct cred *cred; /* new credentials */
41 kernel_cap_t cap_post_exec_permitted; 50 int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */
42 bool cap_effective; 51 unsigned int per_clear; /* bits to clear in current->personality */
43 void *security;
44 int argc, envc; 52 int argc, envc;
45 char * filename; /* Name of binary as seen by procps */ 53 char * filename; /* Name of binary as seen by procps */
46 char * interp; /* Name of the binary really executed. Most 54 char * interp; /* Name of the binary really executed. Most
@@ -58,6 +66,7 @@ struct linux_binprm{
58#define BINPRM_FLAGS_EXECFD_BIT 1 66#define BINPRM_FLAGS_EXECFD_BIT 1
59#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT) 67#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
60 68
69#define BINPRM_MAX_RECURSION 4
61 70
62/* 71/*
63 * This structure defines the functions that are used to load the binary formats that 72 * This structure defines the functions that are used to load the binary formats that
@@ -96,7 +105,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
96 int executable_stack); 105 int executable_stack);
97extern int bprm_mm_init(struct linux_binprm *bprm); 106extern int bprm_mm_init(struct linux_binprm *bprm);
98extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); 107extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
99extern void compute_creds(struct linux_binprm *binprm); 108extern void install_exec_creds(struct linux_binprm *bprm);
100extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); 109extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
101extern int set_binfmt(struct linux_binfmt *new); 110extern int set_binfmt(struct linux_binfmt *new);
102extern void free_bprm(struct linux_binprm *); 111extern void free_bprm(struct linux_binprm *);
diff --git a/include/linux/bio.h b/include/linux/bio.h
index ff5b4cf9e2da..18462c5b8fff 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -79,14 +79,22 @@ struct bio {
79 79
80 unsigned int bi_size; /* residual I/O count */ 80 unsigned int bi_size; /* residual I/O count */
81 81
82 /*
83 * To keep track of the max segment size, we account for the
84 * sizes of the first and last mergeable segments in this bio.
85 */
86 unsigned int bi_seg_front_size;
87 unsigned int bi_seg_back_size;
88
82 unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ 89 unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
83 90
84 unsigned int bi_comp_cpu; /* completion CPU */ 91 unsigned int bi_comp_cpu; /* completion CPU */
85 92
93 atomic_t bi_cnt; /* pin count */
94
86 struct bio_vec *bi_io_vec; /* the actual vec list */ 95 struct bio_vec *bi_io_vec; /* the actual vec list */
87 96
88 bio_end_io_t *bi_end_io; 97 bio_end_io_t *bi_end_io;
89 atomic_t bi_cnt; /* pin count */
90 98
91 void *bi_private; 99 void *bi_private;
92#if defined(CONFIG_BLK_DEV_INTEGRITY) 100#if defined(CONFIG_BLK_DEV_INTEGRITY)
@@ -94,6 +102,13 @@ struct bio {
94#endif 102#endif
95 103
96 bio_destructor_t *bi_destructor; /* destructor */ 104 bio_destructor_t *bi_destructor; /* destructor */
105
106 /*
107 * We can inline a number of vecs at the end of the bio, to avoid
108 * double allocations for a small number of bio_vecs. This member
109 * MUST obviously be kept at the very end of the bio.
110 */
111 struct bio_vec bi_inline_vecs[0];
97}; 112};
98 113
99/* 114/*
@@ -110,6 +125,7 @@ struct bio {
110#define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */ 125#define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */
111#define BIO_NULL_MAPPED 9 /* contains invalid user pages */ 126#define BIO_NULL_MAPPED 9 /* contains invalid user pages */
112#define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */ 127#define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
128#define BIO_QUIET 11 /* Make BIO Quiet */
113#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) 129#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
114 130
115/* 131/*
@@ -129,25 +145,30 @@ struct bio {
129 * bit 2 -- barrier 145 * bit 2 -- barrier
130 * Insert a serialization point in the IO queue, forcing previously 146 * Insert a serialization point in the IO queue, forcing previously
131 * submitted IO to be completed before this oen is issued. 147 * submitted IO to be completed before this oen is issued.
132 * bit 3 -- fail fast, don't want low level driver retries 148 * bit 3 -- synchronous I/O hint: the block layer will unplug immediately
133 * bit 4 -- synchronous I/O hint: the block layer will unplug immediately
134 * Note that this does NOT indicate that the IO itself is sync, just 149 * Note that this does NOT indicate that the IO itself is sync, just
135 * that the block layer will not postpone issue of this IO by plugging. 150 * that the block layer will not postpone issue of this IO by plugging.
136 * bit 5 -- metadata request 151 * bit 4 -- metadata request
137 * Used for tracing to differentiate metadata and data IO. May also 152 * Used for tracing to differentiate metadata and data IO. May also
138 * get some preferential treatment in the IO scheduler 153 * get some preferential treatment in the IO scheduler
139 * bit 6 -- discard sectors 154 * bit 5 -- discard sectors
140 * Informs the lower level device that this range of sectors is no longer 155 * Informs the lower level device that this range of sectors is no longer
141 * used by the file system and may thus be freed by the device. Used 156 * used by the file system and may thus be freed by the device. Used
142 * for flash based storage. 157 * for flash based storage.
158 * bit 6 -- fail fast device errors
159 * bit 7 -- fail fast transport errors
160 * bit 8 -- fail fast driver errors
161 * Don't want driver retries for any fast fail whatever the reason.
143 */ 162 */
144#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ 163#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
145#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ 164#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
146#define BIO_RW_BARRIER 2 165#define BIO_RW_BARRIER 2
147#define BIO_RW_FAILFAST 3 166#define BIO_RW_SYNC 3
148#define BIO_RW_SYNC 4 167#define BIO_RW_META 4
149#define BIO_RW_META 5 168#define BIO_RW_DISCARD 5
150#define BIO_RW_DISCARD 6 169#define BIO_RW_FAILFAST_DEV 6
170#define BIO_RW_FAILFAST_TRANSPORT 7
171#define BIO_RW_FAILFAST_DRIVER 8
151 172
152/* 173/*
153 * upper 16 bits of bi_rw define the io priority of this bio 174 * upper 16 bits of bi_rw define the io priority of this bio
@@ -174,7 +195,10 @@ struct bio {
174#define bio_sectors(bio) ((bio)->bi_size >> 9) 195#define bio_sectors(bio) ((bio)->bi_size >> 9)
175#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) 196#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
176#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) 197#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
177#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) 198#define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV))
199#define bio_failfast_transport(bio) \
200 ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT))
201#define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER))
178#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) 202#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
179#define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) 203#define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META))
180#define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) 204#define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD))
@@ -196,6 +220,11 @@ static inline void *bio_data(struct bio *bio)
196 return NULL; 220 return NULL;
197} 221}
198 222
223static inline int bio_has_allocated_vec(struct bio *bio)
224{
225 return bio->bi_io_vec && bio->bi_io_vec != bio->bi_inline_vecs;
226}
227
199/* 228/*
200 * will die 229 * will die
201 */ 230 */
@@ -221,12 +250,16 @@ static inline void *bio_data(struct bio *bio)
221#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1) 250#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
222#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx) 251#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
223 252
253/* Default implementation of BIOVEC_PHYS_MERGEABLE */
254#define __BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
255 ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
256
224/* 257/*
225 * allow arch override, for eg virtualized architectures (put in asm/io.h) 258 * allow arch override, for eg virtualized architectures (put in asm/io.h)
226 */ 259 */
227#ifndef BIOVEC_PHYS_MERGEABLE 260#ifndef BIOVEC_PHYS_MERGEABLE
228#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ 261#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
229 ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) 262 __BIOVEC_PHYS_MERGEABLE(vec1, vec2)
230#endif 263#endif
231 264
232#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \ 265#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
@@ -313,7 +346,7 @@ struct bio_pair {
313extern struct bio_pair *bio_split(struct bio *bi, int first_sectors); 346extern struct bio_pair *bio_split(struct bio *bi, int first_sectors);
314extern void bio_pair_release(struct bio_pair *dbio); 347extern void bio_pair_release(struct bio_pair *dbio);
315 348
316extern struct bio_set *bioset_create(int, int); 349extern struct bio_set *bioset_create(unsigned int, unsigned int);
317extern void bioset_free(struct bio_set *); 350extern void bioset_free(struct bio_set *);
318 351
319extern struct bio *bio_alloc(gfp_t, int); 352extern struct bio *bio_alloc(gfp_t, int);
@@ -358,6 +391,7 @@ extern struct bio *bio_copy_user_iov(struct request_queue *,
358extern int bio_uncopy_user(struct bio *); 391extern int bio_uncopy_user(struct bio *);
359void zero_fill_bio(struct bio *bio); 392void zero_fill_bio(struct bio *bio);
360extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *); 393extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set *);
394extern void bvec_free_bs(struct bio_set *, struct bio_vec *, unsigned int);
361extern unsigned int bvec_nr_vecs(unsigned short idx); 395extern unsigned int bvec_nr_vecs(unsigned short idx);
362 396
363/* 397/*
@@ -376,13 +410,17 @@ static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
376 */ 410 */
377#define BIO_POOL_SIZE 2 411#define BIO_POOL_SIZE 2
378#define BIOVEC_NR_POOLS 6 412#define BIOVEC_NR_POOLS 6
413#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1)
379 414
380struct bio_set { 415struct bio_set {
416 struct kmem_cache *bio_slab;
417 unsigned int front_pad;
418
381 mempool_t *bio_pool; 419 mempool_t *bio_pool;
382#if defined(CONFIG_BLK_DEV_INTEGRITY) 420#if defined(CONFIG_BLK_DEV_INTEGRITY)
383 mempool_t *bio_integrity_pool; 421 mempool_t *bio_integrity_pool;
384#endif 422#endif
385 mempool_t *bvec_pools[BIOVEC_NR_POOLS]; 423 mempool_t *bvec_pool;
386}; 424};
387 425
388struct biovec_slab { 426struct biovec_slab {
@@ -392,6 +430,7 @@ struct biovec_slab {
392}; 430};
393 431
394extern struct bio_set *fs_bio_set; 432extern struct bio_set *fs_bio_set;
433extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly;
395 434
396/* 435/*
397 * a small number of entries is fine, not going to be performance critical. 436 * a small number of entries is fine, not going to be performance critical.
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 89781fd48859..a08c33a26ca9 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -110,7 +110,6 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits);
110 110
111extern int bitmap_scnprintf(char *buf, unsigned int len, 111extern int bitmap_scnprintf(char *buf, unsigned int len,
112 const unsigned long *src, int nbits); 112 const unsigned long *src, int nbits);
113extern int bitmap_scnprintf_len(unsigned int nr_bits);
114extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, 113extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
115 unsigned long *dst, int nbits); 114 unsigned long *dst, int nbits);
116extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, 115extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,
@@ -130,6 +129,7 @@ extern void bitmap_fold(unsigned long *dst, const unsigned long *orig,
130extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); 129extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
131extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); 130extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
132extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); 131extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
132extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits);
133 133
134#define BITMAP_LAST_WORD_MASK(nbits) \ 134#define BITMAP_LAST_WORD_MASK(nbits) \
135( \ 135( \
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index a92d9e4ea96e..7035cec583b6 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -26,7 +26,6 @@ struct scsi_ioctl_command;
26 26
27struct request_queue; 27struct request_queue;
28struct elevator_queue; 28struct elevator_queue;
29typedef struct elevator_queue elevator_t;
30struct request_pm_state; 29struct request_pm_state;
31struct blk_trace; 30struct blk_trace;
32struct request; 31struct request;
@@ -87,7 +86,9 @@ enum {
87 */ 86 */
88enum rq_flag_bits { 87enum rq_flag_bits {
89 __REQ_RW, /* not set, read. set, write */ 88 __REQ_RW, /* not set, read. set, write */
90 __REQ_FAILFAST, /* no low level driver retries */ 89 __REQ_FAILFAST_DEV, /* no driver retries of device errors */
90 __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
91 __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */
91 __REQ_DISCARD, /* request to discard sectors */ 92 __REQ_DISCARD, /* request to discard sectors */
92 __REQ_SORTED, /* elevator knows about this request */ 93 __REQ_SORTED, /* elevator knows about this request */
93 __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ 94 __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
@@ -111,8 +112,10 @@ enum rq_flag_bits {
111}; 112};
112 113
113#define REQ_RW (1 << __REQ_RW) 114#define REQ_RW (1 << __REQ_RW)
115#define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV)
116#define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT)
117#define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER)
114#define REQ_DISCARD (1 << __REQ_DISCARD) 118#define REQ_DISCARD (1 << __REQ_DISCARD)
115#define REQ_FAILFAST (1 << __REQ_FAILFAST)
116#define REQ_SORTED (1 << __REQ_SORTED) 119#define REQ_SORTED (1 << __REQ_SORTED)
117#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) 120#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
118#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) 121#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
@@ -309,7 +312,7 @@ struct request_queue
309 */ 312 */
310 struct list_head queue_head; 313 struct list_head queue_head;
311 struct request *last_merge; 314 struct request *last_merge;
312 elevator_t *elevator; 315 struct elevator_queue *elevator;
313 316
314 /* 317 /*
315 * the queue request freelist, one for reads and one for writes 318 * the queue request freelist, one for reads and one for writes
@@ -445,6 +448,7 @@ struct request_queue
445#define QUEUE_FLAG_FAIL_IO 12 /* fake timeout */ 448#define QUEUE_FLAG_FAIL_IO 12 /* fake timeout */
446#define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ 449#define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */
447#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ 450#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */
451#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */
448 452
449static inline int queue_is_locked(struct request_queue *q) 453static inline int queue_is_locked(struct request_queue *q)
450{ 454{
@@ -518,22 +522,32 @@ enum {
518 * TAG_FLUSH : ordering by tag w/ pre and post flushes 522 * TAG_FLUSH : ordering by tag w/ pre and post flushes
519 * TAG_FUA : ordering by tag w/ pre flush and FUA write 523 * TAG_FUA : ordering by tag w/ pre flush and FUA write
520 */ 524 */
521 QUEUE_ORDERED_NONE = 0x00, 525 QUEUE_ORDERED_BY_DRAIN = 0x01,
522 QUEUE_ORDERED_DRAIN = 0x01, 526 QUEUE_ORDERED_BY_TAG = 0x02,
523 QUEUE_ORDERED_TAG = 0x02, 527 QUEUE_ORDERED_DO_PREFLUSH = 0x10,
524 528 QUEUE_ORDERED_DO_BAR = 0x20,
525 QUEUE_ORDERED_PREFLUSH = 0x10, 529 QUEUE_ORDERED_DO_POSTFLUSH = 0x40,
526 QUEUE_ORDERED_POSTFLUSH = 0x20, 530 QUEUE_ORDERED_DO_FUA = 0x80,
527 QUEUE_ORDERED_FUA = 0x40, 531
528 532 QUEUE_ORDERED_NONE = 0x00,
529 QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN | 533
530 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH, 534 QUEUE_ORDERED_DRAIN = QUEUE_ORDERED_BY_DRAIN |
531 QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN | 535 QUEUE_ORDERED_DO_BAR,
532 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA, 536 QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
533 QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG | 537 QUEUE_ORDERED_DO_PREFLUSH |
534 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH, 538 QUEUE_ORDERED_DO_POSTFLUSH,
535 QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG | 539 QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
536 QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA, 540 QUEUE_ORDERED_DO_PREFLUSH |
541 QUEUE_ORDERED_DO_FUA,
542
543 QUEUE_ORDERED_TAG = QUEUE_ORDERED_BY_TAG |
544 QUEUE_ORDERED_DO_BAR,
545 QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
546 QUEUE_ORDERED_DO_PREFLUSH |
547 QUEUE_ORDERED_DO_POSTFLUSH,
548 QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
549 QUEUE_ORDERED_DO_PREFLUSH |
550 QUEUE_ORDERED_DO_FUA,
537 551
538 /* 552 /*
539 * Ordered operation sequence 553 * Ordered operation sequence
@@ -560,7 +574,12 @@ enum {
560#define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL) 574#define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL)
561#define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE) 575#define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE)
562 576
563#define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST) 577#define blk_failfast_dev(rq) ((rq)->cmd_flags & REQ_FAILFAST_DEV)
578#define blk_failfast_transport(rq) ((rq)->cmd_flags & REQ_FAILFAST_TRANSPORT)
579#define blk_failfast_driver(rq) ((rq)->cmd_flags & REQ_FAILFAST_DRIVER)
580#define blk_noretry_request(rq) (blk_failfast_dev(rq) || \
581 blk_failfast_transport(rq) || \
582 blk_failfast_driver(rq))
564#define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) 583#define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED)
565 584
566#define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq))) 585#define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq)))
@@ -576,7 +595,6 @@ enum {
576#define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) 595#define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA)
577#define blk_discard_rq(rq) ((rq)->cmd_flags & REQ_DISCARD) 596#define blk_discard_rq(rq) ((rq)->cmd_flags & REQ_DISCARD)
578#define blk_bidi_rq(rq) ((rq)->next_rq != NULL) 597#define blk_bidi_rq(rq) ((rq)->next_rq != NULL)
579#define blk_empty_barrier(rq) (blk_barrier_rq(rq) && blk_fs_request(rq) && !(rq)->hard_nr_sectors)
580/* rq->queuelist of dequeued request must be list_empty() */ 598/* rq->queuelist of dequeued request must be list_empty() */
581#define blk_queued_rq(rq) (!list_empty(&(rq)->queuelist)) 599#define blk_queued_rq(rq) (!list_empty(&(rq)->queuelist))
582 600
@@ -653,6 +671,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn;
653 * default timeout for SG_IO if none specified 671 * default timeout for SG_IO if none specified
654 */ 672 */
655#define BLK_DEFAULT_SG_TIMEOUT (60 * HZ) 673#define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
674#define BLK_MIN_SG_TIMEOUT (7 * HZ)
656 675
657#ifdef CONFIG_BOUNCE 676#ifdef CONFIG_BOUNCE
658extern int init_emergency_isa_pool(void); 677extern int init_emergency_isa_pool(void);
@@ -708,10 +727,10 @@ extern void blk_plug_device(struct request_queue *);
708extern void blk_plug_device_unlocked(struct request_queue *); 727extern void blk_plug_device_unlocked(struct request_queue *);
709extern int blk_remove_plug(struct request_queue *); 728extern int blk_remove_plug(struct request_queue *);
710extern void blk_recount_segments(struct request_queue *, struct bio *); 729extern void blk_recount_segments(struct request_queue *, struct bio *);
711extern int scsi_cmd_ioctl(struct file *, struct request_queue *, 730extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t,
712 struct gendisk *, unsigned int, void __user *); 731 unsigned int, void __user *);
713extern int sg_scsi_ioctl(struct file *, struct request_queue *, 732extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t,
714 struct gendisk *, struct scsi_ioctl_command __user *); 733 struct scsi_ioctl_command __user *);
715 734
716/* 735/*
717 * Temporary export, until SCSI gets fixed up. 736 * Temporary export, until SCSI gets fixed up.
@@ -777,6 +796,8 @@ static inline void blk_run_address_space(struct address_space *mapping)
777 blk_run_backing_dev(mapping->backing_dev_info, NULL); 796 blk_run_backing_dev(mapping->backing_dev_info, NULL);
778} 797}
779 798
799extern void blkdev_dequeue_request(struct request *req);
800
780/* 801/*
781 * blk_end_request() and friends. 802 * blk_end_request() and friends.
782 * __blk_end_request() and end_request() must be called with 803 * __blk_end_request() and end_request() must be called with
@@ -811,11 +832,6 @@ extern void blk_update_request(struct request *rq, int error,
811extern unsigned int blk_rq_bytes(struct request *rq); 832extern unsigned int blk_rq_bytes(struct request *rq);
812extern unsigned int blk_rq_cur_bytes(struct request *rq); 833extern unsigned int blk_rq_cur_bytes(struct request *rq);
813 834
814static inline void blkdev_dequeue_request(struct request *req)
815{
816 elv_dequeue_request(req->q, req);
817}
818
819/* 835/*
820 * Access functions for manipulating queue properties 836 * Access functions for manipulating queue properties
821 */ 837 */
@@ -848,15 +864,14 @@ extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *);
848extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); 864extern void blk_queue_rq_timeout(struct request_queue *, unsigned int);
849extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); 865extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
850extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *); 866extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *);
851extern int blk_do_ordered(struct request_queue *, struct request **); 867extern bool blk_do_ordered(struct request_queue *, struct request **);
852extern unsigned blk_ordered_cur_seq(struct request_queue *); 868extern unsigned blk_ordered_cur_seq(struct request_queue *);
853extern unsigned blk_ordered_req_seq(struct request *); 869extern unsigned blk_ordered_req_seq(struct request *);
854extern void blk_ordered_complete_seq(struct request_queue *, unsigned, int); 870extern bool blk_ordered_complete_seq(struct request_queue *, unsigned, int);
855 871
856extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); 872extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *);
857extern void blk_dump_rq_flags(struct request *, char *); 873extern void blk_dump_rq_flags(struct request *, char *);
858extern void generic_unplug_device(struct request_queue *); 874extern void generic_unplug_device(struct request_queue *);
859extern void __generic_unplug_device(struct request_queue *);
860extern long nr_blockdev_pages(void); 875extern long nr_blockdev_pages(void);
861 876
862int blk_get_queue(struct request_queue *); 877int blk_get_queue(struct request_queue *);
@@ -902,7 +917,8 @@ static inline int sb_issue_discard(struct super_block *sb,
902* command filter functions 917* command filter functions
903*/ 918*/
904extern int blk_verify_command(struct blk_cmd_filter *filter, 919extern int blk_verify_command(struct blk_cmd_filter *filter,
905 unsigned char *cmd, int has_write_perm); 920 unsigned char *cmd, fmode_t has_write_perm);
921extern void blk_unregister_filter(struct gendisk *disk);
906extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); 922extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
907 923
908#define MAX_PHYS_SEGMENTS 128 924#define MAX_PHYS_SEGMENTS 128
@@ -912,6 +928,8 @@ extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
912 928
913#define MAX_SEGMENT_SIZE 65536 929#define MAX_SEGMENT_SIZE 65536
914 930
931#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL
932
915#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) 933#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
916 934
917static inline int queue_hardsect_size(struct request_queue *q) 935static inline int queue_hardsect_size(struct request_queue *q)
@@ -968,7 +986,6 @@ static inline void put_dev_sector(Sector p)
968 986
969struct work_struct; 987struct work_struct;
970int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); 988int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
971void kblockd_flush_work(struct work_struct *work);
972 989
973#define MODULE_ALIAS_BLOCKDEV(major,minor) \ 990#define MODULE_ALIAS_BLOCKDEV(major,minor) \
974 MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) 991 MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
@@ -1048,6 +1065,22 @@ static inline int blk_integrity_rq(struct request *rq)
1048 1065
1049#endif /* CONFIG_BLK_DEV_INTEGRITY */ 1066#endif /* CONFIG_BLK_DEV_INTEGRITY */
1050 1067
1068struct block_device_operations {
1069 int (*open) (struct block_device *, fmode_t);
1070 int (*release) (struct gendisk *, fmode_t);
1071 int (*locked_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
1072 int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
1073 int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
1074 int (*direct_access) (struct block_device *, sector_t,
1075 void **, unsigned long *);
1076 int (*media_changed) (struct gendisk *);
1077 int (*revalidate_disk) (struct gendisk *);
1078 int (*getgeo)(struct block_device *, struct hd_geometry *);
1079 struct module *owner;
1080};
1081
1082extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int,
1083 unsigned long);
1051#else /* CONFIG_BLOCK */ 1084#else /* CONFIG_BLOCK */
1052/* 1085/*
1053 * stubs for when the block layer is configured out 1086 * stubs for when the block layer is configured out
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 3a31eb506164..1dba3493d520 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -24,6 +24,7 @@ enum blktrace_cat {
24 BLK_TC_AHEAD = 1 << 11, /* readahead */ 24 BLK_TC_AHEAD = 1 << 11, /* readahead */
25 BLK_TC_META = 1 << 12, /* metadata */ 25 BLK_TC_META = 1 << 12, /* metadata */
26 BLK_TC_DISCARD = 1 << 13, /* discard requests */ 26 BLK_TC_DISCARD = 1 << 13, /* discard requests */
27 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */
27 28
28 BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ 29 BLK_TC_END = 1 << 15, /* only 16-bits, reminder */
29}; 30};
@@ -51,6 +52,7 @@ enum blktrace_act {
51 __BLK_TA_BOUNCE, /* bio was bounced */ 52 __BLK_TA_BOUNCE, /* bio was bounced */
52 __BLK_TA_REMAP, /* bio was remapped */ 53 __BLK_TA_REMAP, /* bio was remapped */
53 __BLK_TA_ABORT, /* request aborted */ 54 __BLK_TA_ABORT, /* request aborted */
55 __BLK_TA_DRV_DATA, /* driver-specific binary data */
54}; 56};
55 57
56/* 58/*
@@ -82,6 +84,7 @@ enum blktrace_notify {
82#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE) 84#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
83#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE)) 85#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
84#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE)) 86#define BLK_TA_ABORT (__BLK_TA_ABORT | BLK_TC_ACT(BLK_TC_QUEUE))
87#define BLK_TA_DRV_DATA (__BLK_TA_DRV_DATA | BLK_TC_ACT(BLK_TC_DRV_DATA))
85 88
86#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) 89#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
87#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) 90#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
@@ -157,7 +160,6 @@ struct blk_trace {
157 160
158extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); 161extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
159extern void blk_trace_shutdown(struct request_queue *); 162extern void blk_trace_shutdown(struct request_queue *);
160extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
161extern int do_blk_trace_setup(struct request_queue *q, 163extern int do_blk_trace_setup(struct request_queue *q,
162 char *name, dev_t dev, struct blk_user_trace_setup *buts); 164 char *name, dev_t dev, struct blk_user_trace_setup *buts);
163extern void __trace_note_message(struct blk_trace *, const char *fmt, ...); 165extern void __trace_note_message(struct blk_trace *, const char *fmt, ...);
@@ -183,140 +185,8 @@ extern void __trace_note_message(struct blk_trace *, const char *fmt, ...);
183 } while (0) 185 } while (0)
184#define BLK_TN_MAX_MSG 128 186#define BLK_TN_MAX_MSG 128
185 187
186/** 188extern void blk_add_driver_data(struct request_queue *q, struct request *rq,
187 * blk_add_trace_rq - Add a trace for a request oriented action 189 void *data, size_t len);
188 * @q: queue the io is for
189 * @rq: the source request
190 * @what: the action
191 *
192 * Description:
193 * Records an action against a request. Will log the bio offset + size.
194 *
195 **/
196static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq,
197 u32 what)
198{
199 struct blk_trace *bt = q->blk_trace;
200 int rw = rq->cmd_flags & 0x03;
201
202 if (likely(!bt))
203 return;
204
205 if (blk_discard_rq(rq))
206 rw |= (1 << BIO_RW_DISCARD);
207
208 if (blk_pc_request(rq)) {
209 what |= BLK_TC_ACT(BLK_TC_PC);
210 __blk_add_trace(bt, 0, rq->data_len, rw, what, rq->errors, sizeof(rq->cmd), rq->cmd);
211 } else {
212 what |= BLK_TC_ACT(BLK_TC_FS);
213 __blk_add_trace(bt, rq->hard_sector, rq->hard_nr_sectors << 9, rw, what, rq->errors, 0, NULL);
214 }
215}
216
217/**
218 * blk_add_trace_bio - Add a trace for a bio oriented action
219 * @q: queue the io is for
220 * @bio: the source bio
221 * @what: the action
222 *
223 * Description:
224 * Records an action against a bio. Will log the bio offset + size.
225 *
226 **/
227static inline void blk_add_trace_bio(struct request_queue *q, struct bio *bio,
228 u32 what)
229{
230 struct blk_trace *bt = q->blk_trace;
231
232 if (likely(!bt))
233 return;
234
235 __blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw, what, !bio_flagged(bio, BIO_UPTODATE), 0, NULL);
236}
237
238/**
239 * blk_add_trace_generic - Add a trace for a generic action
240 * @q: queue the io is for
241 * @bio: the source bio
242 * @rw: the data direction
243 * @what: the action
244 *
245 * Description:
246 * Records a simple trace
247 *
248 **/
249static inline void blk_add_trace_generic(struct request_queue *q,
250 struct bio *bio, int rw, u32 what)
251{
252 struct blk_trace *bt = q->blk_trace;
253
254 if (likely(!bt))
255 return;
256
257 if (bio)
258 blk_add_trace_bio(q, bio, what);
259 else
260 __blk_add_trace(bt, 0, 0, rw, what, 0, 0, NULL);
261}
262
263/**
264 * blk_add_trace_pdu_int - Add a trace for a bio with an integer payload
265 * @q: queue the io is for
266 * @what: the action
267 * @bio: the source bio
268 * @pdu: the integer payload
269 *
270 * Description:
271 * Adds a trace with some integer payload. This might be an unplug
272 * option given as the action, with the depth at unplug time given
273 * as the payload
274 *
275 **/
276static inline void blk_add_trace_pdu_int(struct request_queue *q, u32 what,
277 struct bio *bio, unsigned int pdu)
278{
279 struct blk_trace *bt = q->blk_trace;
280 __be64 rpdu = cpu_to_be64(pdu);
281
282 if (likely(!bt))
283 return;
284
285 if (bio)
286 __blk_add_trace(bt, bio->bi_sector, bio->bi_size, bio->bi_rw, what, !bio_flagged(bio, BIO_UPTODATE), sizeof(rpdu), &rpdu);
287 else
288 __blk_add_trace(bt, 0, 0, 0, what, 0, sizeof(rpdu), &rpdu);
289}
290
291/**
292 * blk_add_trace_remap - Add a trace for a remap operation
293 * @q: queue the io is for
294 * @bio: the source bio
295 * @dev: target device
296 * @from: source sector
297 * @to: target sector
298 *
299 * Description:
300 * Device mapper or raid target sometimes need to split a bio because
301 * it spans a stripe (or similar). Add a trace for that action.
302 *
303 **/
304static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
305 dev_t dev, sector_t from, sector_t to)
306{
307 struct blk_trace *bt = q->blk_trace;
308 struct blk_io_trace_remap r;
309
310 if (likely(!bt))
311 return;
312
313 r.device = cpu_to_be32(dev);
314 r.device_from = cpu_to_be32(bio->bi_bdev->bd_dev);
315 r.sector = cpu_to_be64(to);
316
317 __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
318}
319
320extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev, 190extern int blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
321 char __user *arg); 191 char __user *arg);
322extern int blk_trace_startstop(struct request_queue *q, int start); 192extern int blk_trace_startstop(struct request_queue *q, int start);
@@ -325,12 +195,8 @@ extern int blk_trace_remove(struct request_queue *q);
325#else /* !CONFIG_BLK_DEV_IO_TRACE */ 195#else /* !CONFIG_BLK_DEV_IO_TRACE */
326#define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY) 196#define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY)
327#define blk_trace_shutdown(q) do { } while (0) 197#define blk_trace_shutdown(q) do { } while (0)
328#define blk_add_trace_rq(q, rq, what) do { } while (0)
329#define blk_add_trace_bio(q, rq, what) do { } while (0)
330#define blk_add_trace_generic(q, rq, rw, what) do { } while (0)
331#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0)
332#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0)
333#define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY) 198#define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY)
199#define blk_add_driver_data(q, rq, data, len) do {} while (0)
334#define blk_trace_setup(q, name, dev, arg) (-ENOTTY) 200#define blk_trace_setup(q, name, dev, arg) (-ENOTTY)
335#define blk_trace_startstop(q, start) (-ENOTTY) 201#define blk_trace_startstop(q, start) (-ENOTTY)
336#define blk_trace_remove(q) (-ENOTTY) 202#define blk_trace_remove(q) (-ENOTTY)
diff --git a/include/linux/bottom_half.h b/include/linux/bottom_half.h
index 777dbf695d44..27b1bcffe408 100644
--- a/include/linux/bottom_half.h
+++ b/include/linux/bottom_half.h
@@ -2,7 +2,6 @@
2#define _LINUX_BH_H 2#define _LINUX_BH_H
3 3
4extern void local_bh_disable(void); 4extern void local_bh_disable(void);
5extern void __local_bh_enable(void);
6extern void _local_bh_enable(void); 5extern void _local_bh_enable(void);
7extern void local_bh_enable(void); 6extern void local_bh_enable(void);
8extern void local_bh_enable_ip(unsigned long ip); 7extern void local_bh_enable_ip(unsigned long ip);
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index eadaab44015f..8605f8a74df9 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -35,6 +35,7 @@ enum bh_state_bits {
35 BH_Ordered, /* ordered write */ 35 BH_Ordered, /* ordered write */
36 BH_Eopnotsupp, /* operation not supported (barrier) */ 36 BH_Eopnotsupp, /* operation not supported (barrier) */
37 BH_Unwritten, /* Buffer is allocated on disk but not written */ 37 BH_Unwritten, /* Buffer is allocated on disk but not written */
38 BH_Quiet, /* Buffer Error Prinks to be quiet */
38 39
39 BH_PrivateStart,/* not a state bit, but the first bit available 40 BH_PrivateStart,/* not a state bit, but the first bit available
40 * for private allocation by other entities 41 * for private allocation by other entities
@@ -322,7 +323,7 @@ static inline void wait_on_buffer(struct buffer_head *bh)
322 323
323static inline int trylock_buffer(struct buffer_head *bh) 324static inline int trylock_buffer(struct buffer_head *bh)
324{ 325{
325 return likely(!test_and_set_bit(BH_Lock, &bh->b_state)); 326 return likely(!test_and_set_bit_lock(BH_Lock, &bh->b_state));
326} 327}
327 328
328static inline void lock_buffer(struct buffer_head *bh) 329static inline void lock_buffer(struct buffer_head *bh)
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
index 1133d5f9d818..fbaa7f9cee32 100644
--- a/include/linux/byteorder/Kbuild
+++ b/include/linux/byteorder/Kbuild
@@ -1,3 +1,4 @@
1unifdef-y += big_endian.h 1unifdef-y += big_endian.h
2unifdef-y += little_endian.h 2unifdef-y += little_endian.h
3unifdef-y += swab.h 3unifdef-y += swab.h
4unifdef-y += swabb.h
diff --git a/include/linux/byteorder/big_endian.h b/include/linux/byteorder/big_endian.h
index 44f95b92393b..1cba3f3efe5f 100644
--- a/include/linux/byteorder/big_endian.h
+++ b/include/linux/byteorder/big_endian.h
@@ -10,6 +10,7 @@
10 10
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/byteorder/swab.h> 12#include <linux/byteorder/swab.h>
13#include <linux/byteorder/swabb.h>
13 14
14#define __constant_htonl(x) ((__force __be32)(__u32)(x)) 15#define __constant_htonl(x) ((__force __be32)(__u32)(x))
15#define __constant_ntohl(x) ((__force __u32)(__be32)(x)) 16#define __constant_ntohl(x) ((__force __u32)(__be32)(x))
diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h
index 4cc170a31762..cedc1b5a289c 100644
--- a/include/linux/byteorder/little_endian.h
+++ b/include/linux/byteorder/little_endian.h
@@ -10,6 +10,7 @@
10 10
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/byteorder/swab.h> 12#include <linux/byteorder/swab.h>
13#include <linux/byteorder/swabb.h>
13 14
14#define __constant_htonl(x) ((__force __be32)___constant_swab32((x))) 15#define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
15#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) 16#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
diff --git a/include/linux/c2port.h b/include/linux/c2port.h
new file mode 100644
index 000000000000..7b5a2388ba67
--- /dev/null
+++ b/include/linux/c2port.h
@@ -0,0 +1,65 @@
1/*
2 * Silicon Labs C2 port Linux support
3 *
4 * Copyright (c) 2007 Rodolfo Giometti <giometti@linux.it>
5 * Copyright (c) 2007 Eurotech S.p.A. <info@eurotech.it>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation
10 */
11
12#include <linux/device.h>
13
14#define C2PORT_NAME_LEN 32
15
16/*
17 * C2 port basic structs
18 */
19
20/* Main struct */
21struct c2port_ops;
22struct c2port_device {
23 unsigned int access:1;
24 unsigned int flash_access:1;
25
26 int id;
27 char name[C2PORT_NAME_LEN];
28 struct c2port_ops *ops;
29 struct mutex mutex; /* prevent races during read/write */
30
31 struct device *dev;
32
33 void *private_data;
34};
35
36/* Basic operations */
37struct c2port_ops {
38 /* Flash layout */
39 unsigned short block_size; /* flash block size in bytes */
40 unsigned short blocks_num; /* flash blocks number */
41
42 /* Enable or disable the access to C2 port */
43 void (*access)(struct c2port_device *dev, int status);
44
45 /* Set C2D data line as input/output */
46 void (*c2d_dir)(struct c2port_device *dev, int dir);
47
48 /* Read/write C2D data line */
49 int (*c2d_get)(struct c2port_device *dev);
50 void (*c2d_set)(struct c2port_device *dev, int status);
51
52 /* Write C2CK clock line */
53 void (*c2ck_set)(struct c2port_device *dev, int status);
54};
55
56/*
57 * Exported functions
58 */
59
60#define to_class_dev(obj) container_of((obj), struct class_device, kobj)
61#define to_c2port_device(obj) container_of((obj), struct c2port_device, class)
62
63extern struct c2port_device *c2port_device_register(char *name,
64 struct c2port_ops *ops, void *devdata);
65extern void c2port_device_unregister(struct c2port_device *dev);
diff --git a/include/linux/can/core.h b/include/linux/can/core.h
index e9ca210ffa5b..f50785ad4781 100644
--- a/include/linux/can/core.h
+++ b/include/linux/can/core.h
@@ -19,7 +19,7 @@
19#include <linux/skbuff.h> 19#include <linux/skbuff.h>
20#include <linux/netdevice.h> 20#include <linux/netdevice.h>
21 21
22#define CAN_VERSION "20071116" 22#define CAN_VERSION "20081130"
23 23
24/* increment this number each time you change some user-space interface */ 24/* increment this number each time you change some user-space interface */
25#define CAN_ABI_VERSION "8" 25#define CAN_ABI_VERSION "8"
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 9d1fe30b6f6c..e22f48c2a46f 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -53,6 +53,7 @@ typedef struct __user_cap_data_struct {
53#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX 53#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX
54 54
55#define VFS_CAP_REVISION_MASK 0xFF000000 55#define VFS_CAP_REVISION_MASK 0xFF000000
56#define VFS_CAP_REVISION_SHIFT 24
56#define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK 57#define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK
57#define VFS_CAP_FLAGS_EFFECTIVE 0x000001 58#define VFS_CAP_FLAGS_EFFECTIVE 0x000001
58 59
@@ -68,6 +69,9 @@ typedef struct __user_cap_data_struct {
68#define VFS_CAP_U32 VFS_CAP_U32_2 69#define VFS_CAP_U32 VFS_CAP_U32_2
69#define VFS_CAP_REVISION VFS_CAP_REVISION_2 70#define VFS_CAP_REVISION VFS_CAP_REVISION_2
70 71
72#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
73extern int file_caps_enabled;
74#endif
71 75
72struct vfs_cap_data { 76struct vfs_cap_data {
73 __le32 magic_etc; /* Little endian */ 77 __le32 magic_etc; /* Little endian */
@@ -96,6 +100,13 @@ typedef struct kernel_cap_struct {
96 __u32 cap[_KERNEL_CAPABILITY_U32S]; 100 __u32 cap[_KERNEL_CAPABILITY_U32S];
97} kernel_cap_t; 101} kernel_cap_t;
98 102
103/* exact same as vfs_cap_data but in cpu endian and always filled completely */
104struct cpu_vfs_cap_data {
105 __u32 magic_etc;
106 kernel_cap_t permitted;
107 kernel_cap_t inheritable;
108};
109
99#define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) 110#define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct))
100#define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) 111#define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t))
101 112
@@ -454,6 +465,13 @@ static inline int cap_isclear(const kernel_cap_t a)
454 return 1; 465 return 1;
455} 466}
456 467
468/*
469 * Check if "a" is a subset of "set".
470 * return 1 if ALL of the capabilities in "a" are also in "set"
471 * cap_issubset(0101, 1111) will return 1
472 * return 0 if ANY of the capabilities in "a" are not in "set"
473 * cap_issubset(1111, 0101) will return 0
474 */
457static inline int cap_issubset(const kernel_cap_t a, const kernel_cap_t set) 475static inline int cap_issubset(const kernel_cap_t a, const kernel_cap_t set)
458{ 476{
459 kernel_cap_t dest; 477 kernel_cap_t dest;
@@ -501,8 +519,6 @@ extern const kernel_cap_t __cap_empty_set;
501extern const kernel_cap_t __cap_full_set; 519extern const kernel_cap_t __cap_full_set;
502extern const kernel_cap_t __cap_init_eff_set; 520extern const kernel_cap_t __cap_init_eff_set;
503 521
504kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
505
506/** 522/**
507 * has_capability - Determine if a task has a superior capability available 523 * has_capability - Determine if a task has a superior capability available
508 * @t: The task in question 524 * @t: The task in question
@@ -514,9 +530,14 @@ kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
514 * Note that this does not set PF_SUPERPRIV on the task. 530 * Note that this does not set PF_SUPERPRIV on the task.
515 */ 531 */
516#define has_capability(t, cap) (security_capable((t), (cap)) == 0) 532#define has_capability(t, cap) (security_capable((t), (cap)) == 0)
533#define has_capability_noaudit(t, cap) (security_capable_noaudit((t), (cap)) == 0)
517 534
518extern int capable(int cap); 535extern int capable(int cap);
519 536
537/* audit system wants to get cap info from files as well */
538struct dentry;
539extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
540
520#endif /* __KERNEL__ */ 541#endif /* __KERNEL__ */
521 542
522#endif /* !_LINUX_CAPABILITY_H */ 543#endif /* !_LINUX_CAPABILITY_H */
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 5db265ea60f6..0b49e08d3cb0 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -987,11 +987,11 @@ struct cdrom_device_ops {
987}; 987};
988 988
989/* the general block_device operations structure: */ 989/* the general block_device operations structure: */
990extern int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, 990extern int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev,
991 struct file *fp); 991 fmode_t mode);
992extern int cdrom_release(struct cdrom_device_info *cdi, struct file *fp); 992extern void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode);
993extern int cdrom_ioctl(struct file *file, struct cdrom_device_info *cdi, 993extern int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
994 struct inode *ip, unsigned int cmd, unsigned long arg); 994 fmode_t mode, unsigned int cmd, unsigned long arg);
995extern int cdrom_media_changed(struct cdrom_device_info *); 995extern int cdrom_media_changed(struct cdrom_device_info *);
996 996
997extern int register_cdrom(struct cdrom_device_info *cdi); 997extern int register_cdrom(struct cdrom_device_info *cdi);
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c98dd7cb7076..1164963c3a85 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -9,12 +9,12 @@
9 */ 9 */
10 10
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/kref.h>
13#include <linux/cpumask.h> 12#include <linux/cpumask.h>
14#include <linux/nodemask.h> 13#include <linux/nodemask.h>
15#include <linux/rcupdate.h> 14#include <linux/rcupdate.h>
16#include <linux/cgroupstats.h> 15#include <linux/cgroupstats.h>
17#include <linux/prio_heap.h> 16#include <linux/prio_heap.h>
17#include <linux/rwsem.h>
18 18
19#ifdef CONFIG_CGROUPS 19#ifdef CONFIG_CGROUPS
20 20
@@ -25,7 +25,6 @@ struct cgroup;
25 25
26extern int cgroup_init_early(void); 26extern int cgroup_init_early(void);
27extern int cgroup_init(void); 27extern int cgroup_init(void);
28extern void cgroup_init_smp(void);
29extern void cgroup_lock(void); 28extern void cgroup_lock(void);
30extern bool cgroup_lock_live_group(struct cgroup *cgrp); 29extern bool cgroup_lock_live_group(struct cgroup *cgrp);
31extern void cgroup_unlock(void); 30extern void cgroup_unlock(void);
@@ -137,6 +136,15 @@ struct cgroup {
137 * release_list_lock 136 * release_list_lock
138 */ 137 */
139 struct list_head release_list; 138 struct list_head release_list;
139
140 /* pids_mutex protects the fields below */
141 struct rw_semaphore pids_mutex;
142 /* Array of process ids in the cgroup */
143 pid_t *tasks_pids;
144 /* How many files are using the current tasks_pids array */
145 int pids_use_count;
146 /* Length of the current tasks_pids array */
147 int pids_length;
140}; 148};
141 149
142/* A css_set is a structure holding pointers to a set of 150/* A css_set is a structure holding pointers to a set of
@@ -149,7 +157,7 @@ struct cgroup {
149struct css_set { 157struct css_set {
150 158
151 /* Reference count */ 159 /* Reference count */
152 struct kref ref; 160 atomic_t refcount;
153 161
154 /* 162 /*
155 * List running through all cgroup groups in the same hash 163 * List running through all cgroup groups in the same hash
@@ -326,7 +334,8 @@ struct cgroup_subsys {
326 */ 334 */
327 void (*mm_owner_changed)(struct cgroup_subsys *ss, 335 void (*mm_owner_changed)(struct cgroup_subsys *ss,
328 struct cgroup *old, 336 struct cgroup *old,
329 struct cgroup *new); 337 struct cgroup *new,
338 struct task_struct *p);
330 int subsys_id; 339 int subsys_id;
331 int active; 340 int active;
332 int disabled; 341 int disabled;
@@ -338,8 +347,6 @@ struct cgroup_subsys {
338 struct cgroupfs_root *root; 347 struct cgroupfs_root *root;
339 348
340 struct list_head sibling; 349 struct list_head sibling;
341
342 void *private;
343}; 350};
344 351
345#define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; 352#define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
@@ -393,11 +400,13 @@ void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it);
393int cgroup_scan_tasks(struct cgroup_scanner *scan); 400int cgroup_scan_tasks(struct cgroup_scanner *scan);
394int cgroup_attach_task(struct cgroup *, struct task_struct *); 401int cgroup_attach_task(struct cgroup *, struct task_struct *);
395 402
403void cgroup_mm_owner_callbacks(struct task_struct *old,
404 struct task_struct *new);
405
396#else /* !CONFIG_CGROUPS */ 406#else /* !CONFIG_CGROUPS */
397 407
398static inline int cgroup_init_early(void) { return 0; } 408static inline int cgroup_init_early(void) { return 0; }
399static inline int cgroup_init(void) { return 0; } 409static inline int cgroup_init(void) { return 0; }
400static inline void cgroup_init_smp(void) {}
401static inline void cgroup_fork(struct task_struct *p) {} 410static inline void cgroup_fork(struct task_struct *p) {}
402static inline void cgroup_fork_callbacks(struct task_struct *p) {} 411static inline void cgroup_fork_callbacks(struct task_struct *p) {}
403static inline void cgroup_post_fork(struct task_struct *p) {} 412static inline void cgroup_post_fork(struct task_struct *p) {}
@@ -411,15 +420,9 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
411 return -EINVAL; 420 return -EINVAL;
412} 421}
413 422
423static inline void cgroup_mm_owner_callbacks(struct task_struct *old,
424 struct task_struct *new) {}
425
414#endif /* !CONFIG_CGROUPS */ 426#endif /* !CONFIG_CGROUPS */
415 427
416#ifdef CONFIG_MM_OWNER
417extern void
418cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new);
419#else /* !CONFIG_MM_OWNER */
420static inline void
421cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new)
422{
423}
424#endif /* CONFIG_MM_OWNER */
425#endif /* _LINUX_CGROUP_H */ 428#endif /* _LINUX_CGROUP_H */
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index e2877454ec82..9c8d31bacf46 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -48,3 +48,15 @@ SUBSYS(devices)
48#endif 48#endif
49 49
50/* */ 50/* */
51
52#ifdef CONFIG_CGROUP_FREEZER
53SUBSYS(freezer)
54#endif
55
56/* */
57
58#ifdef CONFIG_NET_CLS_CGROUP
59SUBSYS(net_cls)
60#endif
61
62/* */
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 5ca8c6fddb56..778777316ea4 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -35,6 +35,8 @@ struct clk;
35 * clk_get may return different clock producers depending on @dev.) 35 * clk_get may return different clock producers depending on @dev.)
36 * 36 *
37 * Drivers must assume that the clock source is not enabled. 37 * Drivers must assume that the clock source is not enabled.
38 *
39 * clk_get should not be called from within interrupt context.
38 */ 40 */
39struct clk *clk_get(struct device *dev, const char *id); 41struct clk *clk_get(struct device *dev, const char *id);
40 42
@@ -76,6 +78,8 @@ unsigned long clk_get_rate(struct clk *clk);
76 * Note: drivers must ensure that all clk_enable calls made on this 78 * Note: drivers must ensure that all clk_enable calls made on this
77 * clock source are balanced by clk_disable calls prior to calling 79 * clock source are balanced by clk_disable calls prior to calling
78 * this function. 80 * this function.
81 *
82 * clk_put should not be called from within interrupt context.
79 */ 83 */
80void clk_put(struct clk *clk); 84void clk_put(struct clk *clk);
81 85
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 55e434feec99..f88d32f8ff7c 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -45,7 +45,8 @@ struct clocksource;
45 * @read: returns a cycle value 45 * @read: returns a cycle value
46 * @mask: bitmask for two's complement 46 * @mask: bitmask for two's complement
47 * subtraction of non 64 bit counters 47 * subtraction of non 64 bit counters
48 * @mult: cycle to nanosecond multiplier 48 * @mult: cycle to nanosecond multiplier (adjusted by NTP)
49 * @mult_orig: cycle to nanosecond multiplier (unadjusted by NTP)
49 * @shift: cycle to nanosecond divisor (power of two) 50 * @shift: cycle to nanosecond divisor (power of two)
50 * @flags: flags describing special properties 51 * @flags: flags describing special properties
51 * @vread: vsyscall based read 52 * @vread: vsyscall based read
@@ -63,6 +64,7 @@ struct clocksource {
63 cycle_t (*read)(void); 64 cycle_t (*read)(void);
64 cycle_t mask; 65 cycle_t mask;
65 u32 mult; 66 u32 mult;
67 u32 mult_orig;
66 u32 shift; 68 u32 shift;
67 unsigned long flags; 69 unsigned long flags;
68 cycle_t (*vread)(void); 70 cycle_t (*vread)(void);
@@ -77,6 +79,7 @@ struct clocksource {
77 /* timekeeping specific data, ignore */ 79 /* timekeeping specific data, ignore */
78 cycle_t cycle_interval; 80 cycle_t cycle_interval;
79 u64 xtime_interval; 81 u64 xtime_interval;
82 u32 raw_interval;
80 /* 83 /*
81 * Second part is written at each timer interrupt 84 * Second part is written at each timer interrupt
82 * Keep it in a different cache line to dirty no 85 * Keep it in a different cache line to dirty no
@@ -85,6 +88,7 @@ struct clocksource {
85 cycle_t cycle_last ____cacheline_aligned_in_smp; 88 cycle_t cycle_last ____cacheline_aligned_in_smp;
86 u64 xtime_nsec; 89 u64 xtime_nsec;
87 s64 error; 90 s64 error;
91 struct timespec raw_time;
88 92
89#ifdef CONFIG_CLOCKSOURCE_WATCHDOG 93#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
90 /* Watchdog related data, used by the framework */ 94 /* Watchdog related data, used by the framework */
@@ -201,17 +205,19 @@ static inline void clocksource_calculate_interval(struct clocksource *c,
201{ 205{
202 u64 tmp; 206 u64 tmp;
203 207
204 /* XXX - All of this could use a whole lot of optimization */ 208 /* Do the ns -> cycle conversion first, using original mult */
205 tmp = length_nsec; 209 tmp = length_nsec;
206 tmp <<= c->shift; 210 tmp <<= c->shift;
207 tmp += c->mult/2; 211 tmp += c->mult_orig/2;
208 do_div(tmp, c->mult); 212 do_div(tmp, c->mult_orig);
209 213
210 c->cycle_interval = (cycle_t)tmp; 214 c->cycle_interval = (cycle_t)tmp;
211 if (c->cycle_interval == 0) 215 if (c->cycle_interval == 0)
212 c->cycle_interval = 1; 216 c->cycle_interval = 1;
213 217
218 /* Go back from cycles -> shifted ns, this time use ntp adjused mult */
214 c->xtime_interval = (u64)c->cycle_interval * c->mult; 219 c->xtime_interval = (u64)c->cycle_interval * c->mult;
220 c->raw_interval = ((u64)c->cycle_interval * c->mult_orig) >> c->shift;
215} 221}
216 222
217 223
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h
index 8c0f9505b48c..7605fdd1eb65 100644
--- a/include/linux/cnt32_to_63.h
+++ b/include/linux/cnt32_to_63.h
@@ -16,6 +16,7 @@
16#include <linux/compiler.h> 16#include <linux/compiler.h>
17#include <linux/types.h> 17#include <linux/types.h>
18#include <asm/byteorder.h> 18#include <asm/byteorder.h>
19#include <asm/system.h>
19 20
20/* this is used only to give gcc a clue about good code generation */ 21/* this is used only to give gcc a clue about good code generation */
21union cnt32_to_63 { 22union cnt32_to_63 {
@@ -53,11 +54,19 @@ union cnt32_to_63 {
53 * needed increment. And any race in updating the value in memory is harmless 54 * needed increment. And any race in updating the value in memory is harmless
54 * as the same value would simply be stored more than once. 55 * as the same value would simply be stored more than once.
55 * 56 *
56 * The only restriction for the algorithm to work properly is that this 57 * The restrictions for the algorithm to work properly are:
57 * code must be executed at least once per each half period of the 32-bit 58 *
58 * counter to properly update the state bit in memory. This is usually not a 59 * 1) this code must be called at least once per each half period of the
59 * problem in practice, but if it is then a kernel timer could be scheduled 60 * 32-bit counter;
60 * to manage for this code to be executed often enough. 61 *
62 * 2) this code must not be preempted for a duration longer than the
63 * 32-bit counter half period minus the longest period between two
64 * calls to this code.
65 *
66 * Those requirements ensure proper update to the state bit in memory.
67 * This is usually not a problem in practice, but if it is then a kernel
68 * timer should be scheduled to manage for this code to be executed often
69 * enough.
61 * 70 *
62 * Note that the top bit (bit 63) in the returned value should be considered 71 * Note that the top bit (bit 63) in the returned value should be considered
63 * as garbage. It is not cleared here because callers are likely to use a 72 * as garbage. It is not cleared here because callers are likely to use a
@@ -68,9 +77,10 @@ union cnt32_to_63 {
68 */ 77 */
69#define cnt32_to_63(cnt_lo) \ 78#define cnt32_to_63(cnt_lo) \
70({ \ 79({ \
71 static volatile u32 __m_cnt_hi; \ 80 static u32 __m_cnt_hi; \
72 union cnt32_to_63 __x; \ 81 union cnt32_to_63 __x; \
73 __x.hi = __m_cnt_hi; \ 82 __x.hi = __m_cnt_hi; \
83 smp_rmb(); \
74 __x.lo = (cnt_lo); \ 84 __x.lo = (cnt_lo); \
75 if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ 85 if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \
76 __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ 86 __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \
diff --git a/include/linux/compat.h b/include/linux/compat.h
index cf8d11cad5ae..e88f3ecf38b4 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -78,7 +78,6 @@ typedef struct {
78 compat_sigset_word sig[_COMPAT_NSIG_WORDS]; 78 compat_sigset_word sig[_COMPAT_NSIG_WORDS];
79} compat_sigset_t; 79} compat_sigset_t;
80 80
81extern int cp_compat_stat(struct kstat *, struct compat_stat __user *);
82extern int get_compat_timespec(struct timespec *, const struct compat_timespec __user *); 81extern int get_compat_timespec(struct timespec *, const struct compat_timespec __user *);
83extern int put_compat_timespec(const struct timespec *, struct compat_timespec __user *); 82extern int put_compat_timespec(const struct timespec *, struct compat_timespec __user *);
84 83
@@ -235,6 +234,11 @@ extern int get_compat_itimerspec(struct itimerspec *dst,
235extern int put_compat_itimerspec(struct compat_itimerspec __user *dst, 234extern int put_compat_itimerspec(struct compat_itimerspec __user *dst,
236 const struct itimerspec *src); 235 const struct itimerspec *src);
237 236
237asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv,
238 struct timezone __user *tz);
239asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv,
240 struct timezone __user *tz);
241
238asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); 242asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
239 243
240extern int compat_printk(const char *fmt, ...); 244extern int compat_printk(const char *fmt, ...);
@@ -248,12 +252,10 @@ extern int compat_ptrace_request(struct task_struct *child,
248 compat_long_t request, 252 compat_long_t request,
249 compat_ulong_t addr, compat_ulong_t data); 253 compat_ulong_t addr, compat_ulong_t data);
250 254
251#ifdef __ARCH_WANT_COMPAT_SYS_PTRACE
252extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request, 255extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
253 compat_ulong_t addr, compat_ulong_t data); 256 compat_ulong_t addr, compat_ulong_t data);
254asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, 257asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
255 compat_long_t addr, compat_long_t data); 258 compat_long_t addr, compat_long_t data);
256#endif /* __ARCH_WANT_COMPAT_SYS_PTRACE */
257 259
258/* 260/*
259 * epoll (fs/eventpoll.c) compat bits follow ... 261 * epoll (fs/eventpoll.c) compat bits follow ...
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 8322141ee480..ea7c6be354b7 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -44,6 +44,8 @@ extern void __chk_io_ptr(const volatile void __iomem *);
44# error Sorry, your compiler is too old/not recognized. 44# error Sorry, your compiler is too old/not recognized.
45#endif 45#endif
46 46
47#define notrace __attribute__((no_instrument_function))
48
47/* Intel compiler defines __GNUC__. So we will overwrite implementations 49/* Intel compiler defines __GNUC__. So we will overwrite implementations
48 * coming from above header files here 50 * coming from above header files here
49 */ 51 */
@@ -57,8 +59,88 @@ extern void __chk_io_ptr(const volatile void __iomem *);
57 * specific implementations come from the above header files 59 * specific implementations come from the above header files
58 */ 60 */
59 61
60#define likely(x) __builtin_expect(!!(x), 1) 62struct ftrace_branch_data {
61#define unlikely(x) __builtin_expect(!!(x), 0) 63 const char *func;
64 const char *file;
65 unsigned line;
66 union {
67 struct {
68 unsigned long correct;
69 unsigned long incorrect;
70 };
71 struct {
72 unsigned long miss;
73 unsigned long hit;
74 };
75 };
76};
77
78/*
79 * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
80 * to disable branch tracing on a per file basis.
81 */
82#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING)
83void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
84
85#define likely_notrace(x) __builtin_expect(!!(x), 1)
86#define unlikely_notrace(x) __builtin_expect(!!(x), 0)
87
88#define __branch_check__(x, expect) ({ \
89 int ______r; \
90 static struct ftrace_branch_data \
91 __attribute__((__aligned__(4))) \
92 __attribute__((section("_ftrace_annotated_branch"))) \
93 ______f = { \
94 .func = __func__, \
95 .file = __FILE__, \
96 .line = __LINE__, \
97 }; \
98 ______r = likely_notrace(x); \
99 ftrace_likely_update(&______f, ______r, expect); \
100 ______r; \
101 })
102
103/*
104 * Using __builtin_constant_p(x) to ignore cases where the return
105 * value is always the same. This idea is taken from a similar patch
106 * written by Daniel Walker.
107 */
108# ifndef likely
109# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
110# endif
111# ifndef unlikely
112# define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0))
113# endif
114
115#ifdef CONFIG_PROFILE_ALL_BRANCHES
116/*
117 * "Define 'is'", Bill Clinton
118 * "Define 'if'", Steven Rostedt
119 */
120#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
121 ({ \
122 int ______r; \
123 static struct ftrace_branch_data \
124 __attribute__((__aligned__(4))) \
125 __attribute__((section("_ftrace_branch"))) \
126 ______f = { \
127 .func = __func__, \
128 .file = __FILE__, \
129 .line = __LINE__, \
130 }; \
131 ______r = !!(cond); \
132 if (______r) \
133 ______f.hit++; \
134 else \
135 ______f.miss++; \
136 ______r; \
137 }))
138#endif /* CONFIG_PROFILE_ALL_BRANCHES */
139
140#else
141# define likely(x) __builtin_expect(!!(x), 1)
142# define unlikely(x) __builtin_expect(!!(x), 0)
143#endif
62 144
63/* Optimization barrier */ 145/* Optimization barrier */
64#ifndef barrier 146#ifndef barrier
diff --git a/include/linux/console.h b/include/linux/console.h
index 248e6e3b9b73..a67a90cf8268 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -153,4 +153,8 @@ void vcs_remove_sysfs(struct tty_struct *tty);
153#define VESA_HSYNC_SUSPEND 2 153#define VESA_HSYNC_SUSPEND 2
154#define VESA_POWERDOWN 3 154#define VESA_POWERDOWN 3
155 155
156#ifdef CONFIG_VGA_CONSOLE
157extern bool vgacon_text_force(void);
158#endif
159
156#endif /* _LINUX_CONSOLE_H */ 160#endif /* _LINUX_CONSOLE_H */
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index d3219d73f8e6..21e1dd43e52a 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -5,6 +5,9 @@
5 * Cpumasks provide a bitmap suitable for representing the 5 * Cpumasks provide a bitmap suitable for representing the
6 * set of CPU's in a system, one bit position per CPU number. 6 * set of CPU's in a system, one bit position per CPU number.
7 * 7 *
8 * The new cpumask_ ops take a "struct cpumask *"; the old ones
9 * use cpumask_t.
10 *
8 * See detailed comments in the file linux/bitmap.h describing the 11 * See detailed comments in the file linux/bitmap.h describing the
9 * data type on which these cpumasks are based. 12 * data type on which these cpumasks are based.
10 * 13 *
@@ -31,7 +34,7 @@
31 * will span the entire range of NR_CPUS. 34 * will span the entire range of NR_CPUS.
32 * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33 * 36 *
34 * The available cpumask operations are: 37 * The obsolescent cpumask operations are:
35 * 38 *
36 * void cpu_set(cpu, mask) turn on bit 'cpu' in mask 39 * void cpu_set(cpu, mask) turn on bit 'cpu' in mask
37 * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask 40 * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask
@@ -138,7 +141,7 @@
138#include <linux/threads.h> 141#include <linux/threads.h>
139#include <linux/bitmap.h> 142#include <linux/bitmap.h>
140 143
141typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; 144typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
142extern cpumask_t _unused_cpumask_arg_; 145extern cpumask_t _unused_cpumask_arg_;
143 146
144#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) 147#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
@@ -527,4 +530,556 @@ extern cpumask_t cpu_active_map;
527#define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) 530#define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map)
528#define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) 531#define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map)
529 532
533/* These are the new versions of the cpumask operators: passed by pointer.
534 * The older versions will be implemented in terms of these, then deleted. */
535#define cpumask_bits(maskp) ((maskp)->bits)
536
537#if NR_CPUS <= BITS_PER_LONG
538#define CPU_BITS_ALL \
539{ \
540 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
541}
542
543/* This produces more efficient code. */
544#define nr_cpumask_bits NR_CPUS
545
546#else /* NR_CPUS > BITS_PER_LONG */
547
548#define CPU_BITS_ALL \
549{ \
550 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
551 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
552}
553
554#define nr_cpumask_bits nr_cpu_ids
555#endif /* NR_CPUS > BITS_PER_LONG */
556
557/* verify cpu argument to cpumask_* operators */
558static inline unsigned int cpumask_check(unsigned int cpu)
559{
560#ifdef CONFIG_DEBUG_PER_CPU_MAPS
561 WARN_ON_ONCE(cpu >= nr_cpumask_bits);
562#endif /* CONFIG_DEBUG_PER_CPU_MAPS */
563 return cpu;
564}
565
566#if NR_CPUS == 1
567/* Uniprocessor. Assume all masks are "1". */
568static inline unsigned int cpumask_first(const struct cpumask *srcp)
569{
570 return 0;
571}
572
573/* Valid inputs for n are -1 and 0. */
574static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
575{
576 return n+1;
577}
578
579static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
580{
581 return n+1;
582}
583
584static inline unsigned int cpumask_next_and(int n,
585 const struct cpumask *srcp,
586 const struct cpumask *andp)
587{
588 return n+1;
589}
590
591/* cpu must be a valid cpu, ie 0, so there's no other choice. */
592static inline unsigned int cpumask_any_but(const struct cpumask *mask,
593 unsigned int cpu)
594{
595 return 1;
596}
597
598#define for_each_cpu(cpu, mask) \
599 for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
600#define for_each_cpu_and(cpu, mask, and) \
601 for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
602#else
603/**
604 * cpumask_first - get the first cpu in a cpumask
605 * @srcp: the cpumask pointer
606 *
607 * Returns >= nr_cpu_ids if no cpus set.
608 */
609static inline unsigned int cpumask_first(const struct cpumask *srcp)
610{
611 return find_first_bit(cpumask_bits(srcp), nr_cpumask_bits);
612}
613
614/**
615 * cpumask_next - get the next cpu in a cpumask
616 * @n: the cpu prior to the place to search (ie. return will be > @n)
617 * @srcp: the cpumask pointer
618 *
619 * Returns >= nr_cpu_ids if no further cpus set.
620 */
621static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
622{
623 /* -1 is a legal arg here. */
624 if (n != -1)
625 cpumask_check(n);
626 return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1);
627}
628
629/**
630 * cpumask_next_zero - get the next unset cpu in a cpumask
631 * @n: the cpu prior to the place to search (ie. return will be > @n)
632 * @srcp: the cpumask pointer
633 *
634 * Returns >= nr_cpu_ids if no further cpus unset.
635 */
636static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
637{
638 /* -1 is a legal arg here. */
639 if (n != -1)
640 cpumask_check(n);
641 return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1);
642}
643
644int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *);
645int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
646
647/**
648 * for_each_cpu - iterate over every cpu in a mask
649 * @cpu: the (optionally unsigned) integer iterator
650 * @mask: the cpumask pointer
651 *
652 * After the loop, cpu is >= nr_cpu_ids.
653 */
654#define for_each_cpu(cpu, mask) \
655 for ((cpu) = -1; \
656 (cpu) = cpumask_next((cpu), (mask)), \
657 (cpu) < nr_cpu_ids;)
658
659/**
660 * for_each_cpu_and - iterate over every cpu in both masks
661 * @cpu: the (optionally unsigned) integer iterator
662 * @mask: the first cpumask pointer
663 * @and: the second cpumask pointer
664 *
665 * This saves a temporary CPU mask in many places. It is equivalent to:
666 * struct cpumask tmp;
667 * cpumask_and(&tmp, &mask, &and);
668 * for_each_cpu(cpu, &tmp)
669 * ...
670 *
671 * After the loop, cpu is >= nr_cpu_ids.
672 */
673#define for_each_cpu_and(cpu, mask, and) \
674 for ((cpu) = -1; \
675 (cpu) = cpumask_next_and((cpu), (mask), (and)), \
676 (cpu) < nr_cpu_ids;)
677#endif /* SMP */
678
679#define CPU_BITS_NONE \
680{ \
681 [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \
682}
683
684#define CPU_BITS_CPU0 \
685{ \
686 [0] = 1UL \
687}
688
689/**
690 * cpumask_set_cpu - set a cpu in a cpumask
691 * @cpu: cpu number (< nr_cpu_ids)
692 * @dstp: the cpumask pointer
693 */
694static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
695{
696 set_bit(cpumask_check(cpu), cpumask_bits(dstp));
697}
698
699/**
700 * cpumask_clear_cpu - clear a cpu in a cpumask
701 * @cpu: cpu number (< nr_cpu_ids)
702 * @dstp: the cpumask pointer
703 */
704static inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp)
705{
706 clear_bit(cpumask_check(cpu), cpumask_bits(dstp));
707}
708
709/**
710 * cpumask_test_cpu - test for a cpu in a cpumask
711 * @cpu: cpu number (< nr_cpu_ids)
712 * @cpumask: the cpumask pointer
713 *
714 * No static inline type checking - see Subtlety (1) above.
715 */
716#define cpumask_test_cpu(cpu, cpumask) \
717 test_bit(cpumask_check(cpu), (cpumask)->bits)
718
719/**
720 * cpumask_test_and_set_cpu - atomically test and set a cpu in a cpumask
721 * @cpu: cpu number (< nr_cpu_ids)
722 * @cpumask: the cpumask pointer
723 *
724 * test_and_set_bit wrapper for cpumasks.
725 */
726static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask)
727{
728 return test_and_set_bit(cpumask_check(cpu), cpumask_bits(cpumask));
729}
730
731/**
732 * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask
733 * @dstp: the cpumask pointer
734 */
735static inline void cpumask_setall(struct cpumask *dstp)
736{
737 bitmap_fill(cpumask_bits(dstp), nr_cpumask_bits);
738}
739
740/**
741 * cpumask_clear - clear all cpus (< nr_cpu_ids) in a cpumask
742 * @dstp: the cpumask pointer
743 */
744static inline void cpumask_clear(struct cpumask *dstp)
745{
746 bitmap_zero(cpumask_bits(dstp), nr_cpumask_bits);
747}
748
749/**
750 * cpumask_and - *dstp = *src1p & *src2p
751 * @dstp: the cpumask result
752 * @src1p: the first input
753 * @src2p: the second input
754 */
755static inline void cpumask_and(struct cpumask *dstp,
756 const struct cpumask *src1p,
757 const struct cpumask *src2p)
758{
759 bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p),
760 cpumask_bits(src2p), nr_cpumask_bits);
761}
762
763/**
764 * cpumask_or - *dstp = *src1p | *src2p
765 * @dstp: the cpumask result
766 * @src1p: the first input
767 * @src2p: the second input
768 */
769static inline void cpumask_or(struct cpumask *dstp, const struct cpumask *src1p,
770 const struct cpumask *src2p)
771{
772 bitmap_or(cpumask_bits(dstp), cpumask_bits(src1p),
773 cpumask_bits(src2p), nr_cpumask_bits);
774}
775
776/**
777 * cpumask_xor - *dstp = *src1p ^ *src2p
778 * @dstp: the cpumask result
779 * @src1p: the first input
780 * @src2p: the second input
781 */
782static inline void cpumask_xor(struct cpumask *dstp,
783 const struct cpumask *src1p,
784 const struct cpumask *src2p)
785{
786 bitmap_xor(cpumask_bits(dstp), cpumask_bits(src1p),
787 cpumask_bits(src2p), nr_cpumask_bits);
788}
789
790/**
791 * cpumask_andnot - *dstp = *src1p & ~*src2p
792 * @dstp: the cpumask result
793 * @src1p: the first input
794 * @src2p: the second input
795 */
796static inline void cpumask_andnot(struct cpumask *dstp,
797 const struct cpumask *src1p,
798 const struct cpumask *src2p)
799{
800 bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p),
801 cpumask_bits(src2p), nr_cpumask_bits);
802}
803
804/**
805 * cpumask_complement - *dstp = ~*srcp
806 * @dstp: the cpumask result
807 * @srcp: the input to invert
808 */
809static inline void cpumask_complement(struct cpumask *dstp,
810 const struct cpumask *srcp)
811{
812 bitmap_complement(cpumask_bits(dstp), cpumask_bits(srcp),
813 nr_cpumask_bits);
814}
815
816/**
817 * cpumask_equal - *src1p == *src2p
818 * @src1p: the first input
819 * @src2p: the second input
820 */
821static inline bool cpumask_equal(const struct cpumask *src1p,
822 const struct cpumask *src2p)
823{
824 return bitmap_equal(cpumask_bits(src1p), cpumask_bits(src2p),
825 nr_cpumask_bits);
826}
827
828/**
829 * cpumask_intersects - (*src1p & *src2p) != 0
830 * @src1p: the first input
831 * @src2p: the second input
832 */
833static inline bool cpumask_intersects(const struct cpumask *src1p,
834 const struct cpumask *src2p)
835{
836 return bitmap_intersects(cpumask_bits(src1p), cpumask_bits(src2p),
837 nr_cpumask_bits);
838}
839
840/**
841 * cpumask_subset - (*src1p & ~*src2p) == 0
842 * @src1p: the first input
843 * @src2p: the second input
844 */
845static inline int cpumask_subset(const struct cpumask *src1p,
846 const struct cpumask *src2p)
847{
848 return bitmap_subset(cpumask_bits(src1p), cpumask_bits(src2p),
849 nr_cpumask_bits);
850}
851
852/**
853 * cpumask_empty - *srcp == 0
854 * @srcp: the cpumask to that all cpus < nr_cpu_ids are clear.
855 */
856static inline bool cpumask_empty(const struct cpumask *srcp)
857{
858 return bitmap_empty(cpumask_bits(srcp), nr_cpumask_bits);
859}
860
861/**
862 * cpumask_full - *srcp == 0xFFFFFFFF...
863 * @srcp: the cpumask to that all cpus < nr_cpu_ids are set.
864 */
865static inline bool cpumask_full(const struct cpumask *srcp)
866{
867 return bitmap_full(cpumask_bits(srcp), nr_cpumask_bits);
868}
869
870/**
871 * cpumask_weight - Count of bits in *srcp
872 * @srcp: the cpumask to count bits (< nr_cpu_ids) in.
873 */
874static inline unsigned int cpumask_weight(const struct cpumask *srcp)
875{
876 return bitmap_weight(cpumask_bits(srcp), nr_cpumask_bits);
877}
878
879/**
880 * cpumask_shift_right - *dstp = *srcp >> n
881 * @dstp: the cpumask result
882 * @srcp: the input to shift
883 * @n: the number of bits to shift by
884 */
885static inline void cpumask_shift_right(struct cpumask *dstp,
886 const struct cpumask *srcp, int n)
887{
888 bitmap_shift_right(cpumask_bits(dstp), cpumask_bits(srcp), n,
889 nr_cpumask_bits);
890}
891
892/**
893 * cpumask_shift_left - *dstp = *srcp << n
894 * @dstp: the cpumask result
895 * @srcp: the input to shift
896 * @n: the number of bits to shift by
897 */
898static inline void cpumask_shift_left(struct cpumask *dstp,
899 const struct cpumask *srcp, int n)
900{
901 bitmap_shift_left(cpumask_bits(dstp), cpumask_bits(srcp), n,
902 nr_cpumask_bits);
903}
904
905/**
906 * cpumask_copy - *dstp = *srcp
907 * @dstp: the result
908 * @srcp: the input cpumask
909 */
910static inline void cpumask_copy(struct cpumask *dstp,
911 const struct cpumask *srcp)
912{
913 bitmap_copy(cpumask_bits(dstp), cpumask_bits(srcp), nr_cpumask_bits);
914}
915
916/**
917 * cpumask_any - pick a "random" cpu from *srcp
918 * @srcp: the input cpumask
919 *
920 * Returns >= nr_cpu_ids if no cpus set.
921 */
922#define cpumask_any(srcp) cpumask_first(srcp)
923
924/**
925 * cpumask_first_and - return the first cpu from *srcp1 & *srcp2
926 * @src1p: the first input
927 * @src2p: the second input
928 *
929 * Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and().
930 */
931#define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p))
932
933/**
934 * cpumask_any_and - pick a "random" cpu from *mask1 & *mask2
935 * @mask1: the first input cpumask
936 * @mask2: the second input cpumask
937 *
938 * Returns >= nr_cpu_ids if no cpus set.
939 */
940#define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2))
941
942/**
943 * cpumask_of - the cpumask containing just a given cpu
944 * @cpu: the cpu (<= nr_cpu_ids)
945 */
946#define cpumask_of(cpu) (get_cpu_mask(cpu))
947
948/**
949 * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask *
950 * @bitmap: the bitmap
951 *
952 * There are a few places where cpumask_var_t isn't appropriate and
953 * static cpumasks must be used (eg. very early boot), yet we don't
954 * expose the definition of 'struct cpumask'.
955 *
956 * This does the conversion, and can be used as a constant initializer.
957 */
958#define to_cpumask(bitmap) \
959 ((struct cpumask *)(1 ? (bitmap) \
960 : (void *)sizeof(__check_is_bitmap(bitmap))))
961
962static inline int __check_is_bitmap(const unsigned long *bitmap)
963{
964 return 1;
965}
966
967/**
968 * cpumask_size - size to allocate for a 'struct cpumask' in bytes
969 *
970 * This will eventually be a runtime variable, depending on nr_cpu_ids.
971 */
972static inline size_t cpumask_size(void)
973{
974 /* FIXME: Once all cpumask assignments are eliminated, this
975 * can be nr_cpumask_bits */
976 return BITS_TO_LONGS(NR_CPUS) * sizeof(long);
977}
978
979/*
980 * cpumask_var_t: struct cpumask for stack usage.
981 *
982 * Oh, the wicked games we play! In order to make kernel coding a
983 * little more difficult, we typedef cpumask_var_t to an array or a
984 * pointer: doing &mask on an array is a noop, so it still works.
985 *
986 * ie.
987 * cpumask_var_t tmpmask;
988 * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL))
989 * return -ENOMEM;
990 *
991 * ... use 'tmpmask' like a normal struct cpumask * ...
992 *
993 * free_cpumask_var(tmpmask);
994 */
995#ifdef CONFIG_CPUMASK_OFFSTACK
996typedef struct cpumask *cpumask_var_t;
997
998bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags);
999void alloc_bootmem_cpumask_var(cpumask_var_t *mask);
1000void free_cpumask_var(cpumask_var_t mask);
1001void free_bootmem_cpumask_var(cpumask_var_t mask);
1002
1003#else
1004typedef struct cpumask cpumask_var_t[1];
1005
1006static inline bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
1007{
1008 return true;
1009}
1010
1011static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask)
1012{
1013}
1014
1015static inline void free_cpumask_var(cpumask_var_t mask)
1016{
1017}
1018
1019static inline void free_bootmem_cpumask_var(cpumask_var_t mask)
1020{
1021}
1022#endif /* CONFIG_CPUMASK_OFFSTACK */
1023
1024/* The pointer versions of the maps, these will become the primary versions. */
1025#define cpu_possible_mask ((const struct cpumask *)&cpu_possible_map)
1026#define cpu_online_mask ((const struct cpumask *)&cpu_online_map)
1027#define cpu_present_mask ((const struct cpumask *)&cpu_present_map)
1028#define cpu_active_mask ((const struct cpumask *)&cpu_active_map)
1029
1030/* It's common to want to use cpu_all_mask in struct member initializers,
1031 * so it has to refer to an address rather than a pointer. */
1032extern const DECLARE_BITMAP(cpu_all_bits, NR_CPUS);
1033#define cpu_all_mask to_cpumask(cpu_all_bits)
1034
1035/* First bits of cpu_bit_bitmap are in fact unset. */
1036#define cpu_none_mask to_cpumask(cpu_bit_bitmap[0])
1037
1038/* Wrappers for arch boot code to manipulate normally-constant masks */
1039static inline void set_cpu_possible(unsigned int cpu, bool possible)
1040{
1041 if (possible)
1042 cpumask_set_cpu(cpu, &cpu_possible_map);
1043 else
1044 cpumask_clear_cpu(cpu, &cpu_possible_map);
1045}
1046
1047static inline void set_cpu_present(unsigned int cpu, bool present)
1048{
1049 if (present)
1050 cpumask_set_cpu(cpu, &cpu_present_map);
1051 else
1052 cpumask_clear_cpu(cpu, &cpu_present_map);
1053}
1054
1055static inline void set_cpu_online(unsigned int cpu, bool online)
1056{
1057 if (online)
1058 cpumask_set_cpu(cpu, &cpu_online_map);
1059 else
1060 cpumask_clear_cpu(cpu, &cpu_online_map);
1061}
1062
1063static inline void set_cpu_active(unsigned int cpu, bool active)
1064{
1065 if (active)
1066 cpumask_set_cpu(cpu, &cpu_active_map);
1067 else
1068 cpumask_clear_cpu(cpu, &cpu_active_map);
1069}
1070
1071static inline void init_cpu_present(const struct cpumask *src)
1072{
1073 cpumask_copy(&cpu_present_map, src);
1074}
1075
1076static inline void init_cpu_possible(const struct cpumask *src)
1077{
1078 cpumask_copy(&cpu_possible_map, src);
1079}
1080
1081static inline void init_cpu_online(const struct cpumask *src)
1082{
1083 cpumask_copy(&cpu_online_map, src);
1084}
530#endif /* __LINUX_CPUMASK_H */ 1085#endif /* __LINUX_CPUMASK_H */
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 2691926fb506..8e540d32c9fe 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -74,8 +74,6 @@ static inline int cpuset_do_slab_mem_spread(void)
74 return current->flags & PF_SPREAD_SLAB; 74 return current->flags & PF_SPREAD_SLAB;
75} 75}
76 76
77extern void cpuset_track_online_nodes(void);
78
79extern int current_cpuset_is_being_rebound(void); 77extern int current_cpuset_is_being_rebound(void);
80 78
81extern void rebuild_sched_domains(void); 79extern void rebuild_sched_domains(void);
@@ -151,8 +149,6 @@ static inline int cpuset_do_slab_mem_spread(void)
151 return 0; 149 return 0;
152} 150}
153 151
154static inline void cpuset_track_online_nodes(void) {}
155
156static inline int current_cpuset_is_being_rebound(void) 152static inline int current_cpuset_is_being_rebound(void)
157{ 153{
158 return 0; 154 return 0;
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index 025e4f575103..2dac064d8359 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -8,17 +8,12 @@
8#include <linux/proc_fs.h> 8#include <linux/proc_fs.h>
9 9
10#define ELFCORE_ADDR_MAX (-1ULL) 10#define ELFCORE_ADDR_MAX (-1ULL)
11#define ELFCORE_ADDR_ERR (-2ULL)
11 12
12#ifdef CONFIG_PROC_VMCORE
13extern unsigned long long elfcorehdr_addr; 13extern unsigned long long elfcorehdr_addr;
14#else
15static const unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
16#endif
17 14
18extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, 15extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
19 unsigned long, int); 16 unsigned long, int);
20extern const struct file_operations proc_vmcore_operations;
21extern struct proc_dir_entry *proc_vmcore;
22 17
23/* Architecture code defines this if there are other possible ELF 18/* Architecture code defines this if there are other possible ELF
24 * machine types, e.g. on bi-arch capable hardware. */ 19 * machine types, e.g. on bi-arch capable hardware. */
@@ -28,10 +23,43 @@ extern struct proc_dir_entry *proc_vmcore;
28 23
29#define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x)) 24#define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
30 25
26/*
27 * is_kdump_kernel() checks whether this kernel is booting after a panic of
28 * previous kernel or not. This is determined by checking if previous kernel
29 * has passed the elf core header address on command line.
30 *
31 * This is not just a test if CONFIG_CRASH_DUMP is enabled or not. It will
32 * return 1 if CONFIG_CRASH_DUMP=y and if kernel is booting after a panic of
33 * previous kernel.
34 */
35
31static inline int is_kdump_kernel(void) 36static inline int is_kdump_kernel(void)
32{ 37{
33 return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0; 38 return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0;
34} 39}
40
41/* is_vmcore_usable() checks if the kernel is booting after a panic and
42 * the vmcore region is usable.
43 *
44 * This makes use of the fact that due to alignment -2ULL is not
45 * a valid pointer, much in the vain of IS_ERR(), except
46 * dealing directly with an unsigned long long rather than a pointer.
47 */
48
49static inline int is_vmcore_usable(void)
50{
51 return is_kdump_kernel() && elfcorehdr_addr != ELFCORE_ADDR_ERR ? 1 : 0;
52}
53
54/* vmcore_unusable() marks the vmcore as unusable,
55 * without disturbing the logic of is_kdump_kernel()
56 */
57
58static inline void vmcore_unusable(void)
59{
60 if (is_kdump_kernel())
61 elfcorehdr_addr = ELFCORE_ADDR_ERR;
62}
35#else /* !CONFIG_CRASH_DUMP */ 63#else /* !CONFIG_CRASH_DUMP */
36static inline int is_kdump_kernel(void) { return 0; } 64static inline int is_kdump_kernel(void) { return 0; }
37#endif /* CONFIG_CRASH_DUMP */ 65#endif /* CONFIG_CRASH_DUMP */
diff --git a/include/linux/crc32c.h b/include/linux/crc32c.h
index 508f512e5a2f..bd8b44d96bdc 100644
--- a/include/linux/crc32c.h
+++ b/include/linux/crc32c.h
@@ -3,9 +3,9 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6extern u32 crc32c_le(u32 crc, unsigned char const *address, size_t length); 6extern u32 crc32c(u32 crc, const void *address, unsigned int length);
7extern u32 crc32c_be(u32 crc, unsigned char const *address, size_t length);
8 7
9#define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length) 8/* This macro exists for backwards-compatibility. */
9#define crc32c_le crc32c
10 10
11#endif /* _LINUX_CRC32C_H */ 11#endif /* _LINUX_CRC32C_H */
diff --git a/include/linux/cred.h b/include/linux/cred.h
index b69222cc1fd2..3282ee4318e7 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -1,4 +1,4 @@
1/* Credentials management 1/* Credentials management - see Documentation/credentials.txt
2 * 2 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
@@ -12,39 +12,335 @@
12#ifndef _LINUX_CRED_H 12#ifndef _LINUX_CRED_H
13#define _LINUX_CRED_H 13#define _LINUX_CRED_H
14 14
15#define get_current_user() (get_uid(current->user)) 15#include <linux/capability.h>
16#include <linux/key.h>
17#include <asm/atomic.h>
16 18
17#define task_uid(task) ((task)->uid) 19struct user_struct;
18#define task_gid(task) ((task)->gid) 20struct cred;
19#define task_euid(task) ((task)->euid) 21struct inode;
20#define task_egid(task) ((task)->egid)
21 22
22#define current_uid() (current->uid) 23/*
23#define current_gid() (current->gid) 24 * COW Supplementary groups list
24#define current_euid() (current->euid) 25 */
25#define current_egid() (current->egid) 26#define NGROUPS_SMALL 32
26#define current_suid() (current->suid) 27#define NGROUPS_PER_BLOCK ((unsigned int)(PAGE_SIZE / sizeof(gid_t)))
27#define current_sgid() (current->sgid) 28
28#define current_fsuid() (current->fsuid) 29struct group_info {
29#define current_fsgid() (current->fsgid) 30 atomic_t usage;
30#define current_cap() (current->cap_effective) 31 int ngroups;
32 int nblocks;
33 gid_t small_block[NGROUPS_SMALL];
34 gid_t *blocks[0];
35};
36
37/**
38 * get_group_info - Get a reference to a group info structure
39 * @group_info: The group info to reference
40 *
41 * This gets a reference to a set of supplementary groups.
42 *
43 * If the caller is accessing a task's credentials, they must hold the RCU read
44 * lock when reading.
45 */
46static inline struct group_info *get_group_info(struct group_info *gi)
47{
48 atomic_inc(&gi->usage);
49 return gi;
50}
51
52/**
53 * put_group_info - Release a reference to a group info structure
54 * @group_info: The group info to release
55 */
56#define put_group_info(group_info) \
57do { \
58 if (atomic_dec_and_test(&(group_info)->usage)) \
59 groups_free(group_info); \
60} while (0)
61
62extern struct group_info *groups_alloc(int);
63extern struct group_info init_groups;
64extern void groups_free(struct group_info *);
65extern int set_current_groups(struct group_info *);
66extern int set_groups(struct cred *, struct group_info *);
67extern int groups_search(const struct group_info *, gid_t);
68
69/* access the groups "array" with this macro */
70#define GROUP_AT(gi, i) \
71 ((gi)->blocks[(i) / NGROUPS_PER_BLOCK][(i) % NGROUPS_PER_BLOCK])
72
73extern int in_group_p(gid_t);
74extern int in_egroup_p(gid_t);
75
76/*
77 * The common credentials for a thread group
78 * - shared by CLONE_THREAD
79 */
80#ifdef CONFIG_KEYS
81struct thread_group_cred {
82 atomic_t usage;
83 pid_t tgid; /* thread group process ID */
84 spinlock_t lock;
85 struct key *session_keyring; /* keyring inherited over fork */
86 struct key *process_keyring; /* keyring private to this process */
87 struct rcu_head rcu; /* RCU deletion hook */
88};
89#endif
90
91/*
92 * The security context of a task
93 *
94 * The parts of the context break down into two categories:
95 *
96 * (1) The objective context of a task. These parts are used when some other
97 * task is attempting to affect this one.
98 *
99 * (2) The subjective context. These details are used when the task is acting
100 * upon another object, be that a file, a task, a key or whatever.
101 *
102 * Note that some members of this structure belong to both categories - the
103 * LSM security pointer for instance.
104 *
105 * A task has two security pointers. task->real_cred points to the objective
106 * context that defines that task's actual details. The objective part of this
107 * context is used whenever that task is acted upon.
108 *
109 * task->cred points to the subjective context that defines the details of how
110 * that task is going to act upon another object. This may be overridden
111 * temporarily to point to another security context, but normally points to the
112 * same context as task->real_cred.
113 */
114struct cred {
115 atomic_t usage;
116 uid_t uid; /* real UID of the task */
117 gid_t gid; /* real GID of the task */
118 uid_t suid; /* saved UID of the task */
119 gid_t sgid; /* saved GID of the task */
120 uid_t euid; /* effective UID of the task */
121 gid_t egid; /* effective GID of the task */
122 uid_t fsuid; /* UID for VFS ops */
123 gid_t fsgid; /* GID for VFS ops */
124 unsigned securebits; /* SUID-less security management */
125 kernel_cap_t cap_inheritable; /* caps our children can inherit */
126 kernel_cap_t cap_permitted; /* caps we're permitted */
127 kernel_cap_t cap_effective; /* caps we can actually use */
128 kernel_cap_t cap_bset; /* capability bounding set */
129#ifdef CONFIG_KEYS
130 unsigned char jit_keyring; /* default keyring to attach requested
131 * keys to */
132 struct key *thread_keyring; /* keyring private to this thread */
133 struct key *request_key_auth; /* assumed request_key authority */
134 struct thread_group_cred *tgcred; /* thread-group shared credentials */
135#endif
136#ifdef CONFIG_SECURITY
137 void *security; /* subjective LSM security */
138#endif
139 struct user_struct *user; /* real user ID subscription */
140 struct group_info *group_info; /* supplementary groups for euid/fsgid */
141 struct rcu_head rcu; /* RCU deletion hook */
142};
143
144extern void __put_cred(struct cred *);
145extern int copy_creds(struct task_struct *, unsigned long);
146extern struct cred *prepare_creds(void);
147extern struct cred *prepare_exec_creds(void);
148extern struct cred *prepare_usermodehelper_creds(void);
149extern int commit_creds(struct cred *);
150extern void abort_creds(struct cred *);
151extern const struct cred *override_creds(const struct cred *);
152extern void revert_creds(const struct cred *);
153extern struct cred *prepare_kernel_cred(struct task_struct *);
154extern int change_create_files_as(struct cred *, struct inode *);
155extern int set_security_override(struct cred *, u32);
156extern int set_security_override_from_ctx(struct cred *, const char *);
157extern int set_create_files_as(struct cred *, struct inode *);
158extern void __init cred_init(void);
159
160/**
161 * get_new_cred - Get a reference on a new set of credentials
162 * @cred: The new credentials to reference
163 *
164 * Get a reference on the specified set of new credentials. The caller must
165 * release the reference.
166 */
167static inline struct cred *get_new_cred(struct cred *cred)
168{
169 atomic_inc(&cred->usage);
170 return cred;
171}
172
173/**
174 * get_cred - Get a reference on a set of credentials
175 * @cred: The credentials to reference
176 *
177 * Get a reference on the specified set of credentials. The caller must
178 * release the reference.
179 *
180 * This is used to deal with a committed set of credentials. Although the
181 * pointer is const, this will temporarily discard the const and increment the
182 * usage count. The purpose of this is to attempt to catch at compile time the
183 * accidental alteration of a set of credentials that should be considered
184 * immutable.
185 */
186static inline const struct cred *get_cred(const struct cred *cred)
187{
188 return get_new_cred((struct cred *) cred);
189}
190
191/**
192 * put_cred - Release a reference to a set of credentials
193 * @cred: The credentials to release
194 *
195 * Release a reference to a set of credentials, deleting them when the last ref
196 * is released.
197 *
198 * This takes a const pointer to a set of credentials because the credentials
199 * on task_struct are attached by const pointers to prevent accidental
200 * alteration of otherwise immutable credential sets.
201 */
202static inline void put_cred(const struct cred *_cred)
203{
204 struct cred *cred = (struct cred *) _cred;
205
206 BUG_ON(atomic_read(&(cred)->usage) <= 0);
207 if (atomic_dec_and_test(&(cred)->usage))
208 __put_cred(cred);
209}
210
211/**
212 * current_cred - Access the current task's subjective credentials
213 *
214 * Access the subjective credentials of the current task.
215 */
216#define current_cred() \
217 (current->cred)
218
219/**
220 * __task_cred - Access a task's objective credentials
221 * @task: The task to query
222 *
223 * Access the objective credentials of a task. The caller must hold the RCU
224 * readlock.
225 *
226 * The caller must make sure task doesn't go away, either by holding a ref on
227 * task or by holding tasklist_lock to prevent it from being unlinked.
228 */
229#define __task_cred(task) \
230 ((const struct cred *)(rcu_dereference((task)->real_cred)))
231
232/**
233 * get_task_cred - Get another task's objective credentials
234 * @task: The task to query
235 *
236 * Get the objective credentials of a task, pinning them so that they can't go
237 * away. Accessing a task's credentials directly is not permitted.
238 *
239 * The caller must make sure task doesn't go away, either by holding a ref on
240 * task or by holding tasklist_lock to prevent it from being unlinked.
241 */
242#define get_task_cred(task) \
243({ \
244 struct cred *__cred; \
245 rcu_read_lock(); \
246 __cred = (struct cred *) __task_cred((task)); \
247 get_cred(__cred); \
248 rcu_read_unlock(); \
249 __cred; \
250})
251
252/**
253 * get_current_cred - Get the current task's subjective credentials
254 *
255 * Get the subjective credentials of the current task, pinning them so that
256 * they can't go away. Accessing the current task's credentials directly is
257 * not permitted.
258 */
259#define get_current_cred() \
260 (get_cred(current_cred()))
261
262/**
263 * get_current_user - Get the current task's user_struct
264 *
265 * Get the user record of the current task, pinning it so that it can't go
266 * away.
267 */
268#define get_current_user() \
269({ \
270 struct user_struct *__u; \
271 struct cred *__cred; \
272 __cred = (struct cred *) current_cred(); \
273 __u = get_uid(__cred->user); \
274 __u; \
275})
276
277/**
278 * get_current_groups - Get the current task's supplementary group list
279 *
280 * Get the supplementary group list of the current task, pinning it so that it
281 * can't go away.
282 */
283#define get_current_groups() \
284({ \
285 struct group_info *__groups; \
286 struct cred *__cred; \
287 __cred = (struct cred *) current_cred(); \
288 __groups = get_group_info(__cred->group_info); \
289 __groups; \
290})
291
292#define task_cred_xxx(task, xxx) \
293({ \
294 __typeof__(((struct cred *)NULL)->xxx) ___val; \
295 rcu_read_lock(); \
296 ___val = __task_cred((task))->xxx; \
297 rcu_read_unlock(); \
298 ___val; \
299})
300
301#define task_uid(task) (task_cred_xxx((task), uid))
302#define task_euid(task) (task_cred_xxx((task), euid))
303
304#define current_cred_xxx(xxx) \
305({ \
306 current->cred->xxx; \
307})
308
309#define current_uid() (current_cred_xxx(uid))
310#define current_gid() (current_cred_xxx(gid))
311#define current_euid() (current_cred_xxx(euid))
312#define current_egid() (current_cred_xxx(egid))
313#define current_suid() (current_cred_xxx(suid))
314#define current_sgid() (current_cred_xxx(sgid))
315#define current_fsuid() (current_cred_xxx(fsuid))
316#define current_fsgid() (current_cred_xxx(fsgid))
317#define current_cap() (current_cred_xxx(cap_effective))
318#define current_user() (current_cred_xxx(user))
319#define current_user_ns() (current_cred_xxx(user)->user_ns)
320#define current_security() (current_cred_xxx(security))
31 321
32#define current_uid_gid(_uid, _gid) \ 322#define current_uid_gid(_uid, _gid) \
33do { \ 323do { \
34 *(_uid) = current->uid; \ 324 const struct cred *__cred; \
35 *(_gid) = current->gid; \ 325 __cred = current_cred(); \
326 *(_uid) = __cred->uid; \
327 *(_gid) = __cred->gid; \
36} while(0) 328} while(0)
37 329
38#define current_euid_egid(_uid, _gid) \ 330#define current_euid_egid(_euid, _egid) \
39do { \ 331do { \
40 *(_uid) = current->euid; \ 332 const struct cred *__cred; \
41 *(_gid) = current->egid; \ 333 __cred = current_cred(); \
334 *(_euid) = __cred->euid; \
335 *(_egid) = __cred->egid; \
42} while(0) 336} while(0)
43 337
44#define current_fsuid_fsgid(_uid, _gid) \ 338#define current_fsuid_fsgid(_fsuid, _fsgid) \
45do { \ 339do { \
46 *(_uid) = current->fsuid; \ 340 const struct cred *__cred; \
47 *(_gid) = current->fsgid; \ 341 __cred = current_cred(); \
342 *(_fsuid) = __cred->fsuid; \
343 *(_fsgid) = __cred->fsgid; \
48} while(0) 344} while(0)
49 345
50#endif /* _LINUX_CRED_H */ 346#endif /* _LINUX_CRED_H */
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 3d2317e4af2e..3bacd71509fb 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -36,7 +36,8 @@
36#define CRYPTO_ALG_TYPE_ABLKCIPHER 0x00000005 36#define CRYPTO_ALG_TYPE_ABLKCIPHER 0x00000005
37#define CRYPTO_ALG_TYPE_GIVCIPHER 0x00000006 37#define CRYPTO_ALG_TYPE_GIVCIPHER 0x00000006
38#define CRYPTO_ALG_TYPE_DIGEST 0x00000008 38#define CRYPTO_ALG_TYPE_DIGEST 0x00000008
39#define CRYPTO_ALG_TYPE_HASH 0x00000009 39#define CRYPTO_ALG_TYPE_HASH 0x00000008
40#define CRYPTO_ALG_TYPE_SHASH 0x00000009
40#define CRYPTO_ALG_TYPE_AHASH 0x0000000a 41#define CRYPTO_ALG_TYPE_AHASH 0x0000000a
41#define CRYPTO_ALG_TYPE_RNG 0x0000000c 42#define CRYPTO_ALG_TYPE_RNG 0x0000000c
42 43
@@ -220,6 +221,7 @@ struct ablkcipher_alg {
220 221
221struct ahash_alg { 222struct ahash_alg {
222 int (*init)(struct ahash_request *req); 223 int (*init)(struct ahash_request *req);
224 int (*reinit)(struct ahash_request *req);
223 int (*update)(struct ahash_request *req); 225 int (*update)(struct ahash_request *req);
224 int (*final)(struct ahash_request *req); 226 int (*final)(struct ahash_request *req);
225 int (*digest)(struct ahash_request *req); 227 int (*digest)(struct ahash_request *req);
@@ -480,6 +482,8 @@ struct crypto_tfm {
480 struct compress_tfm compress; 482 struct compress_tfm compress;
481 struct rng_tfm rng; 483 struct rng_tfm rng;
482 } crt_u; 484 } crt_u;
485
486 void (*exit)(struct crypto_tfm *tfm);
483 487
484 struct crypto_alg *__crt_alg; 488 struct crypto_alg *__crt_alg;
485 489
@@ -544,7 +548,9 @@ struct crypto_attr_u32 {
544 * Transform user interface. 548 * Transform user interface.
545 */ 549 */
546 550
547struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, u32 tfm_flags); 551struct crypto_tfm *crypto_alloc_tfm(const char *alg_name,
552 const struct crypto_type *frontend,
553 u32 type, u32 mask);
548struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); 554struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask);
549void crypto_free_tfm(struct crypto_tfm *tfm); 555void crypto_free_tfm(struct crypto_tfm *tfm);
550 556
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index efba1de629ac..a37359d0bad1 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -228,9 +228,9 @@ extern void d_delete(struct dentry *);
228 228
229/* allocate/de-allocate */ 229/* allocate/de-allocate */
230extern struct dentry * d_alloc(struct dentry *, const struct qstr *); 230extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
231extern struct dentry * d_alloc_anon(struct inode *);
232extern struct dentry * d_splice_alias(struct inode *, struct dentry *); 231extern struct dentry * d_splice_alias(struct inode *, struct dentry *);
233extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); 232extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *);
233extern struct dentry * d_obtain_alias(struct inode *);
234extern void shrink_dcache_sb(struct super_block *); 234extern void shrink_dcache_sb(struct super_block *);
235extern void shrink_dcache_parent(struct dentry *); 235extern void shrink_dcache_parent(struct dentry *);
236extern void shrink_dcache_for_umount(struct super_block *); 236extern void shrink_dcache_for_umount(struct super_block *);
@@ -287,6 +287,7 @@ static inline struct dentry *d_add_unique(struct dentry *entry, struct inode *in
287 287
288/* used for rename() and baskets */ 288/* used for rename() and baskets */
289extern void d_move(struct dentry *, struct dentry *); 289extern void d_move(struct dentry *, struct dentry *);
290extern struct dentry *d_ancestor(struct dentry *, struct dentry *);
290 291
291/* appendix may either be NULL or be used for transname suffixes */ 292/* appendix may either be NULL or be used for transname suffixes */
292extern struct dentry * d_lookup(struct dentry *, struct qstr *); 293extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
new file mode 100644
index 000000000000..b0ef274e0031
--- /dev/null
+++ b/include/linux/dcbnl.h
@@ -0,0 +1,340 @@
1/*
2 * Copyright (c) 2008, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Author: Lucy Liu <lucy.liu@intel.com>
18 */
19
20#ifndef __LINUX_DCBNL_H__
21#define __LINUX_DCBNL_H__
22
23#define DCB_PROTO_VERSION 1
24
25struct dcbmsg {
26 unsigned char dcb_family;
27 __u8 cmd;
28 __u16 dcb_pad;
29};
30
31/**
32 * enum dcbnl_commands - supported DCB commands
33 *
34 * @DCB_CMD_UNDEFINED: unspecified command to catch errors
35 * @DCB_CMD_GSTATE: request the state of DCB in the device
36 * @DCB_CMD_SSTATE: set the state of DCB in the device
37 * @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx
38 * @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx
39 * @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx
40 * @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx
41 * @DCB_CMD_PFC_GCFG: request the priority flow control configuration
42 * @DCB_CMD_PFC_SCFG: set the priority flow control configuration
43 * @DCB_CMD_SET_ALL: apply all changes to the underlying device
44 * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying
45 * device. Only useful when using bonding.
46 * @DCB_CMD_GCAP: request the DCB capabilities of the device
47 * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported
48 * @DCB_CMD_SNUMTCS: set the number of traffic classes
49 * @DCB_CMD_GBCN: set backward congestion notification configuration
50 * @DCB_CMD_SBCN: get backward congestion notification configration.
51 */
52enum dcbnl_commands {
53 DCB_CMD_UNDEFINED,
54
55 DCB_CMD_GSTATE,
56 DCB_CMD_SSTATE,
57
58 DCB_CMD_PGTX_GCFG,
59 DCB_CMD_PGTX_SCFG,
60 DCB_CMD_PGRX_GCFG,
61 DCB_CMD_PGRX_SCFG,
62
63 DCB_CMD_PFC_GCFG,
64 DCB_CMD_PFC_SCFG,
65
66 DCB_CMD_SET_ALL,
67
68 DCB_CMD_GPERM_HWADDR,
69
70 DCB_CMD_GCAP,
71
72 DCB_CMD_GNUMTCS,
73 DCB_CMD_SNUMTCS,
74
75 DCB_CMD_PFC_GSTATE,
76 DCB_CMD_PFC_SSTATE,
77
78 DCB_CMD_BCN_GCFG,
79 DCB_CMD_BCN_SCFG,
80
81 __DCB_CMD_ENUM_MAX,
82 DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1,
83};
84
85/**
86 * enum dcbnl_attrs - DCB top-level netlink attributes
87 *
88 * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors
89 * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING)
90 * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8)
91 * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8)
92 * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED)
93 * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8)
94 * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED)
95 * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8)
96 * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED)
97 * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED)
98 * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED)
99 * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED)
100 */
101enum dcbnl_attrs {
102 DCB_ATTR_UNDEFINED,
103
104 DCB_ATTR_IFNAME,
105 DCB_ATTR_STATE,
106 DCB_ATTR_PFC_STATE,
107 DCB_ATTR_PFC_CFG,
108 DCB_ATTR_NUM_TC,
109 DCB_ATTR_PG_CFG,
110 DCB_ATTR_SET_ALL,
111 DCB_ATTR_PERM_HWADDR,
112 DCB_ATTR_CAP,
113 DCB_ATTR_NUMTCS,
114 DCB_ATTR_BCN,
115
116 __DCB_ATTR_ENUM_MAX,
117 DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1,
118};
119
120/**
121 * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
122 *
123 * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors
124 * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8)
125 * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8)
126 * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8)
127 * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8)
128 * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8)
129 * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8)
130 * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8)
131 * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8)
132 * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined
133 * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG)
134 *
135 */
136enum dcbnl_pfc_up_attrs {
137 DCB_PFC_UP_ATTR_UNDEFINED,
138
139 DCB_PFC_UP_ATTR_0,
140 DCB_PFC_UP_ATTR_1,
141 DCB_PFC_UP_ATTR_2,
142 DCB_PFC_UP_ATTR_3,
143 DCB_PFC_UP_ATTR_4,
144 DCB_PFC_UP_ATTR_5,
145 DCB_PFC_UP_ATTR_6,
146 DCB_PFC_UP_ATTR_7,
147 DCB_PFC_UP_ATTR_ALL,
148
149 __DCB_PFC_UP_ATTR_ENUM_MAX,
150 DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1,
151};
152
153/**
154 * enum dcbnl_pg_attrs - DCB Priority Group attributes
155 *
156 * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors
157 * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED)
158 * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED)
159 * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED)
160 * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED)
161 * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED)
162 * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED)
163 * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED)
164 * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED)
165 * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined
166 * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED)
167 * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8)
168 * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8)
169 * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8)
170 * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8)
171 * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8)
172 * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8)
173 * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8)
174 * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8)
175 * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined
176 * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG)
177 *
178 */
179enum dcbnl_pg_attrs {
180 DCB_PG_ATTR_UNDEFINED,
181
182 DCB_PG_ATTR_TC_0,
183 DCB_PG_ATTR_TC_1,
184 DCB_PG_ATTR_TC_2,
185 DCB_PG_ATTR_TC_3,
186 DCB_PG_ATTR_TC_4,
187 DCB_PG_ATTR_TC_5,
188 DCB_PG_ATTR_TC_6,
189 DCB_PG_ATTR_TC_7,
190 DCB_PG_ATTR_TC_MAX,
191 DCB_PG_ATTR_TC_ALL,
192
193 DCB_PG_ATTR_BW_ID_0,
194 DCB_PG_ATTR_BW_ID_1,
195 DCB_PG_ATTR_BW_ID_2,
196 DCB_PG_ATTR_BW_ID_3,
197 DCB_PG_ATTR_BW_ID_4,
198 DCB_PG_ATTR_BW_ID_5,
199 DCB_PG_ATTR_BW_ID_6,
200 DCB_PG_ATTR_BW_ID_7,
201 DCB_PG_ATTR_BW_ID_MAX,
202 DCB_PG_ATTR_BW_ID_ALL,
203
204 __DCB_PG_ATTR_ENUM_MAX,
205 DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1,
206};
207
208/**
209 * enum dcbnl_tc_attrs - DCB Traffic Class attributes
210 *
211 * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors
212 * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to
213 * Valid values are: 0-7
214 * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map
215 * Some devices may not support changing the
216 * user priority map of a TC.
217 * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting
218 * 0 - none
219 * 1 - group strict
220 * 2 - link strict
221 * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and
222 * not configured to use link strict priority,
223 * this is the percentage of bandwidth of the
224 * priority group this traffic class belongs to
225 * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters
226 *
227 */
228enum dcbnl_tc_attrs {
229 DCB_TC_ATTR_PARAM_UNDEFINED,
230
231 DCB_TC_ATTR_PARAM_PGID,
232 DCB_TC_ATTR_PARAM_UP_MAPPING,
233 DCB_TC_ATTR_PARAM_STRICT_PRIO,
234 DCB_TC_ATTR_PARAM_BW_PCT,
235 DCB_TC_ATTR_PARAM_ALL,
236
237 __DCB_TC_ATTR_PARAM_ENUM_MAX,
238 DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1,
239};
240
241/**
242 * enum dcbnl_cap_attrs - DCB Capability attributes
243 *
244 * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors
245 * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters
246 * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups
247 * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control
248 * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to
249 * traffic class mapping
250 * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a
251 * number of traffic classes the device
252 * can be configured to use for Priority Groups
253 * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a
254 * number of traffic classes the device can be
255 * configured to use for Priority Flow Control
256 * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority
257 * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion
258 * Notification
259 */
260enum dcbnl_cap_attrs {
261 DCB_CAP_ATTR_UNDEFINED,
262 DCB_CAP_ATTR_ALL,
263 DCB_CAP_ATTR_PG,
264 DCB_CAP_ATTR_PFC,
265 DCB_CAP_ATTR_UP2TC,
266 DCB_CAP_ATTR_PG_TCS,
267 DCB_CAP_ATTR_PFC_TCS,
268 DCB_CAP_ATTR_GSP,
269 DCB_CAP_ATTR_BCN,
270
271 __DCB_CAP_ATTR_ENUM_MAX,
272 DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1,
273};
274
275/**
276 * enum dcbnl_numtcs_attrs - number of traffic classes
277 *
278 * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors
279 * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes
280 * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for
281 * priority groups
282 * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can
283 * support priority flow control
284 */
285enum dcbnl_numtcs_attrs {
286 DCB_NUMTCS_ATTR_UNDEFINED,
287 DCB_NUMTCS_ATTR_ALL,
288 DCB_NUMTCS_ATTR_PG,
289 DCB_NUMTCS_ATTR_PFC,
290
291 __DCB_NUMTCS_ATTR_ENUM_MAX,
292 DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1,
293};
294
295enum dcbnl_bcn_attrs{
296 DCB_BCN_ATTR_UNDEFINED = 0,
297
298 DCB_BCN_ATTR_RP_0,
299 DCB_BCN_ATTR_RP_1,
300 DCB_BCN_ATTR_RP_2,
301 DCB_BCN_ATTR_RP_3,
302 DCB_BCN_ATTR_RP_4,
303 DCB_BCN_ATTR_RP_5,
304 DCB_BCN_ATTR_RP_6,
305 DCB_BCN_ATTR_RP_7,
306 DCB_BCN_ATTR_RP_ALL,
307
308 DCB_BCN_ATTR_BCNA_0,
309 DCB_BCN_ATTR_BCNA_1,
310 DCB_BCN_ATTR_ALPHA,
311 DCB_BCN_ATTR_BETA,
312 DCB_BCN_ATTR_GD,
313 DCB_BCN_ATTR_GI,
314 DCB_BCN_ATTR_TMAX,
315 DCB_BCN_ATTR_TD,
316 DCB_BCN_ATTR_RMIN,
317 DCB_BCN_ATTR_W,
318 DCB_BCN_ATTR_RD,
319 DCB_BCN_ATTR_RU,
320 DCB_BCN_ATTR_WRTT,
321 DCB_BCN_ATTR_RI,
322 DCB_BCN_ATTR_C,
323 DCB_BCN_ATTR_ALL,
324
325 __DCB_BCN_ATTR_ENUM_MAX,
326 DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1,
327};
328
329/**
330 * enum dcb_general_attr_values - general DCB attribute values
331 *
332 * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported
333 *
334 */
335enum dcb_general_attr_values {
336 DCB_ATTR_VALUE_UNDEFINED = 0xff
337};
338
339
340#endif /* __LINUX_DCBNL_H__ */
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index 6080449fbec9..61734e27abb7 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -168,6 +168,8 @@ enum {
168 DCCPO_MIN_CCID_SPECIFIC = 128, 168 DCCPO_MIN_CCID_SPECIFIC = 128,
169 DCCPO_MAX_CCID_SPECIFIC = 255, 169 DCCPO_MAX_CCID_SPECIFIC = 255,
170}; 170};
171/* maximum size of a single TLV-encoded DCCP option (sans type/len bytes) */
172#define DCCP_SINGLE_OPT_MAXLEN 253
171 173
172/* DCCP CCIDS */ 174/* DCCP CCIDS */
173enum { 175enum {
@@ -176,29 +178,23 @@ enum {
176}; 178};
177 179
178/* DCCP features (RFC 4340 section 6.4) */ 180/* DCCP features (RFC 4340 section 6.4) */
179enum { 181enum dccp_feature_numbers {
180 DCCPF_RESERVED = 0, 182 DCCPF_RESERVED = 0,
181 DCCPF_CCID = 1, 183 DCCPF_CCID = 1,
182 DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */ 184 DCCPF_SHORT_SEQNOS = 2,
183 DCCPF_SEQUENCE_WINDOW = 3, 185 DCCPF_SEQUENCE_WINDOW = 3,
184 DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */ 186 DCCPF_ECN_INCAPABLE = 4,
185 DCCPF_ACK_RATIO = 5, 187 DCCPF_ACK_RATIO = 5,
186 DCCPF_SEND_ACK_VECTOR = 6, 188 DCCPF_SEND_ACK_VECTOR = 6,
187 DCCPF_SEND_NDP_COUNT = 7, 189 DCCPF_SEND_NDP_COUNT = 7,
188 DCCPF_MIN_CSUM_COVER = 8, 190 DCCPF_MIN_CSUM_COVER = 8,
189 DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */ 191 DCCPF_DATA_CHECKSUM = 9,
190 /* 10-127 reserved */ 192 /* 10-127 reserved */
191 DCCPF_MIN_CCID_SPECIFIC = 128, 193 DCCPF_MIN_CCID_SPECIFIC = 128,
194 DCCPF_SEND_LEV_RATE = 192, /* RFC 4342, sec. 8.4 */
192 DCCPF_MAX_CCID_SPECIFIC = 255, 195 DCCPF_MAX_CCID_SPECIFIC = 255,
193}; 196};
194 197
195/* this structure is argument to DCCP_SOCKOPT_CHANGE_X */
196struct dccp_so_feat {
197 __u8 dccpsf_feat;
198 __u8 __user *dccpsf_val;
199 __u8 dccpsf_len;
200};
201
202/* DCCP socket options */ 198/* DCCP socket options */
203#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ 199#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
204#define DCCP_SOCKOPT_SERVICE 2 200#define DCCP_SOCKOPT_SERVICE 2
@@ -208,6 +204,10 @@ struct dccp_so_feat {
208#define DCCP_SOCKOPT_SERVER_TIMEWAIT 6 204#define DCCP_SOCKOPT_SERVER_TIMEWAIT 6
209#define DCCP_SOCKOPT_SEND_CSCOV 10 205#define DCCP_SOCKOPT_SEND_CSCOV 10
210#define DCCP_SOCKOPT_RECV_CSCOV 11 206#define DCCP_SOCKOPT_RECV_CSCOV 11
207#define DCCP_SOCKOPT_AVAILABLE_CCIDS 12
208#define DCCP_SOCKOPT_CCID 13
209#define DCCP_SOCKOPT_TX_CCID 14
210#define DCCP_SOCKOPT_RX_CCID 15
211#define DCCP_SOCKOPT_CCID_RX_INFO 128 211#define DCCP_SOCKOPT_CCID_RX_INFO 128
212#define DCCP_SOCKOPT_CCID_TX_INFO 192 212#define DCCP_SOCKOPT_CCID_TX_INFO 192
213 213
@@ -360,7 +360,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
360#define DCCPF_INITIAL_SEQUENCE_WINDOW 100 360#define DCCPF_INITIAL_SEQUENCE_WINDOW 100
361#define DCCPF_INITIAL_ACK_RATIO 2 361#define DCCPF_INITIAL_ACK_RATIO 2
362#define DCCPF_INITIAL_CCID DCCPC_CCID2 362#define DCCPF_INITIAL_CCID DCCPC_CCID2
363#define DCCPF_INITIAL_SEND_ACK_VECTOR 1
364/* FIXME: for now we're default to 1 but it should really be 0 */ 363/* FIXME: for now we're default to 1 but it should really be 0 */
365#define DCCPF_INITIAL_SEND_NDP_COUNT 1 364#define DCCPF_INITIAL_SEND_NDP_COUNT 1
366 365
@@ -370,20 +369,11 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
370 * Will be used to pass the state from dccp_request_sock to dccp_sock. 369 * Will be used to pass the state from dccp_request_sock to dccp_sock.
371 * 370 *
372 * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) 371 * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2)
373 * @dccpms_ccid - Congestion Control Id (CCID) (section 10)
374 * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
375 * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
376 * @dccpms_ack_ratio - Ack Ratio Feature (section 11.3)
377 * @dccpms_pending - List of features being negotiated 372 * @dccpms_pending - List of features being negotiated
378 * @dccpms_conf - 373 * @dccpms_conf -
379 */ 374 */
380struct dccp_minisock { 375struct dccp_minisock {
381 __u64 dccpms_sequence_window; 376 __u64 dccpms_sequence_window;
382 __u8 dccpms_rx_ccid;
383 __u8 dccpms_tx_ccid;
384 __u8 dccpms_send_ack_vector;
385 __u8 dccpms_send_ndp_count;
386 __u8 dccpms_ack_ratio;
387 struct list_head dccpms_pending; 377 struct list_head dccpms_pending;
388 struct list_head dccpms_conf; 378 struct list_head dccpms_conf;
389}; 379};
@@ -411,6 +401,7 @@ extern void dccp_minisock_init(struct dccp_minisock *dmsk);
411 * @dreq_iss: initial sequence number sent on the Response (RFC 4340, 7.1) 401 * @dreq_iss: initial sequence number sent on the Response (RFC 4340, 7.1)
412 * @dreq_isr: initial sequence number received on the Request 402 * @dreq_isr: initial sequence number received on the Request
413 * @dreq_service: service code present on the Request (there is just one) 403 * @dreq_service: service code present on the Request (there is just one)
404 * @dreq_featneg: feature negotiation options for this connection
414 * The following two fields are analogous to the ones in dccp_sock: 405 * The following two fields are analogous to the ones in dccp_sock:
415 * @dreq_timestamp_echo: last received timestamp to echo (13.1) 406 * @dreq_timestamp_echo: last received timestamp to echo (13.1)
416 * @dreq_timestamp_echo: the time of receiving the last @dreq_timestamp_echo 407 * @dreq_timestamp_echo: the time of receiving the last @dreq_timestamp_echo
@@ -420,6 +411,7 @@ struct dccp_request_sock {
420 __u64 dreq_iss; 411 __u64 dreq_iss;
421 __u64 dreq_isr; 412 __u64 dreq_isr;
422 __be32 dreq_service; 413 __be32 dreq_service;
414 struct list_head dreq_featneg;
423 __u32 dreq_timestamp_echo; 415 __u32 dreq_timestamp_echo;
424 __u32 dreq_timestamp_time; 416 __u32 dreq_timestamp_time;
425}; 417};
@@ -493,10 +485,12 @@ struct dccp_ackvec;
493 * @dccps_r_ack_ratio - feature-remote Ack Ratio 485 * @dccps_r_ack_ratio - feature-remote Ack Ratio
494 * @dccps_pcslen - sender partial checksum coverage (via sockopt) 486 * @dccps_pcslen - sender partial checksum coverage (via sockopt)
495 * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) 487 * @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
488 * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2)
496 * @dccps_ndp_count - number of Non Data Packets since last data packet 489 * @dccps_ndp_count - number of Non Data Packets since last data packet
497 * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) 490 * @dccps_mss_cache - current value of MSS (path MTU minus header sizes)
498 * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) 491 * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4)
499 * @dccps_minisock - associated minisock (accessed via dccp_msk) 492 * @dccps_minisock - associated minisock (accessed via dccp_msk)
493 * @dccps_featneg - tracks feature-negotiation state (mostly during handshake)
500 * @dccps_hc_rx_ackvec - rx half connection ack vector 494 * @dccps_hc_rx_ackvec - rx half connection ack vector
501 * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) 495 * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection)
502 * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection) 496 * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection)
@@ -529,11 +523,13 @@ struct dccp_sock {
529 __u32 dccps_timestamp_time; 523 __u32 dccps_timestamp_time;
530 __u16 dccps_l_ack_ratio; 524 __u16 dccps_l_ack_ratio;
531 __u16 dccps_r_ack_ratio; 525 __u16 dccps_r_ack_ratio;
532 __u16 dccps_pcslen; 526 __u8 dccps_pcslen:4;
533 __u16 dccps_pcrlen; 527 __u8 dccps_pcrlen:4;
528 __u8 dccps_send_ndp_count:1;
534 __u64 dccps_ndp_count:48; 529 __u64 dccps_ndp_count:48;
535 unsigned long dccps_rate_last; 530 unsigned long dccps_rate_last;
536 struct dccp_minisock dccps_minisock; 531 struct dccp_minisock dccps_minisock;
532 struct list_head dccps_featneg;
537 struct dccp_ackvec *dccps_hc_rx_ackvec; 533 struct dccp_ackvec *dccps_hc_rx_ackvec;
538 struct ccid *dccps_hc_rx_ccid; 534 struct ccid *dccps_hc_rx_ccid;
539 struct ccid *dccps_hc_tx_ccid; 535 struct ccid *dccps_hc_tx_ccid;
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 4aaa4afb1cb9..096476f1fb35 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -17,7 +17,7 @@ extern int debug_locks_off(void);
17({ \ 17({ \
18 int __ret = 0; \ 18 int __ret = 0; \
19 \ 19 \
20 if (unlikely(c)) { \ 20 if (!oops_in_progress && unlikely(c)) { \
21 if (debug_locks_off() && !debug_locks_silent) \ 21 if (debug_locks_off() && !debug_locks_silent) \
22 WARN_ON(1); \ 22 WARN_ON(1); \
23 __ret = 1; \ 23 __ret = 1; \
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 08d783592b73..c17fd334e574 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -69,8 +69,7 @@ typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
69 69
70typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv); 70typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
71 71
72typedef int (*dm_ioctl_fn) (struct dm_target *ti, struct inode *inode, 72typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd,
73 struct file *filp, unsigned int cmd,
74 unsigned long arg); 73 unsigned long arg);
75 74
76typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, 75typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm,
@@ -85,7 +84,7 @@ void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev);
85 84
86struct dm_dev { 85struct dm_dev {
87 struct block_device *bdev; 86 struct block_device *bdev;
88 int mode; 87 fmode_t mode;
89 char name[16]; 88 char name[16];
90}; 89};
91 90
@@ -95,7 +94,7 @@ struct dm_dev {
95 * FIXME: too many arguments. 94 * FIXME: too many arguments.
96 */ 95 */
97int dm_get_device(struct dm_target *ti, const char *path, sector_t start, 96int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
98 sector_t len, int mode, struct dm_dev **result); 97 sector_t len, fmode_t mode, struct dm_dev **result);
99void dm_put_device(struct dm_target *ti, struct dm_dev *d); 98void dm_put_device(struct dm_target *ti, struct dm_dev *d);
100 99
101/* 100/*
@@ -223,7 +222,7 @@ int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
223/* 222/*
224 * First create an empty table. 223 * First create an empty table.
225 */ 224 */
226int dm_table_create(struct dm_table **result, int mode, 225int dm_table_create(struct dm_table **result, fmode_t mode,
227 unsigned num_targets, struct mapped_device *md); 226 unsigned num_targets, struct mapped_device *md);
228 227
229/* 228/*
@@ -254,7 +253,7 @@ void dm_table_put(struct dm_table *t);
254 */ 253 */
255sector_t dm_table_get_size(struct dm_table *t); 254sector_t dm_table_get_size(struct dm_table *t);
256unsigned int dm_table_get_num_targets(struct dm_table *t); 255unsigned int dm_table_get_num_targets(struct dm_table *t);
257int dm_table_get_mode(struct dm_table *t); 256fmode_t dm_table_get_mode(struct dm_table *t);
258struct mapped_device *dm_table_get_md(struct dm_table *t); 257struct mapped_device *dm_table_get_md(struct dm_table *t);
259 258
260/* 259/*
@@ -354,6 +353,9 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
354 */ 353 */
355#define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz)) 354#define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz))
356 355
356#define dm_array_too_big(fixed, obj, num) \
357 ((num) > (UINT_MAX - (fixed)) / (obj))
358
357static inline sector_t to_sector(unsigned long n) 359static inline sector_t to_sector(unsigned long n)
358{ 360{
359 return (n >> SECTOR_SHIFT); 361 return (n >> SECTOR_SHIFT);
diff --git a/include/linux/device.h b/include/linux/device.h
index 246937c9cbc7..1a3686d15f98 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -90,6 +90,9 @@ int __must_check bus_for_each_drv(struct bus_type *bus,
90 struct device_driver *start, void *data, 90 struct device_driver *start, void *data,
91 int (*fn)(struct device_driver *, void *)); 91 int (*fn)(struct device_driver *, void *));
92 92
93void bus_sort_breadthfirst(struct bus_type *bus,
94 int (*compare)(const struct device *a,
95 const struct device *b));
93/* 96/*
94 * Bus notifiers: Get notified of addition/removal of devices 97 * Bus notifiers: Get notified of addition/removal of devices
95 * and binding/unbinding of drivers to devices. 98 * and binding/unbinding of drivers to devices.
@@ -447,7 +450,7 @@ static inline void set_dev_node(struct device *dev, int node)
447} 450}
448#endif 451#endif
449 452
450static inline void *dev_get_drvdata(struct device *dev) 453static inline void *dev_get_drvdata(const struct device *dev)
451{ 454{
452 return dev->driver_data; 455 return dev->driver_data;
453} 456}
@@ -502,7 +505,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
502 dev_t devt, void *drvdata, 505 dev_t devt, void *drvdata,
503 const char *fmt, ...) 506 const char *fmt, ...)
504 __attribute__((format(printf, 5, 6))); 507 __attribute__((format(printf, 5, 6)));
505#define device_create_drvdata device_create
506extern void device_destroy(struct class *cls, dev_t devt); 508extern void device_destroy(struct class *cls, dev_t devt);
507 509
508/* 510/*
@@ -551,7 +553,11 @@ extern const char *dev_driver_string(const struct device *dev);
551#define dev_info(dev, format, arg...) \ 553#define dev_info(dev, format, arg...) \
552 dev_printk(KERN_INFO , dev , format , ## arg) 554 dev_printk(KERN_INFO , dev , format , ## arg)
553 555
554#ifdef DEBUG 556#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
557#define dev_dbg(dev, format, ...) do { \
558 dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
559 } while (0)
560#elif defined(DEBUG)
555#define dev_dbg(dev, format, arg...) \ 561#define dev_dbg(dev, format, arg...) \
556 dev_printk(KERN_DEBUG , dev , format , ## arg) 562 dev_printk(KERN_DEBUG , dev , format , ## arg)
557#else 563#else
@@ -567,6 +573,14 @@ extern const char *dev_driver_string(const struct device *dev);
567 ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) 573 ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
568#endif 574#endif
569 575
576/*
577 * dev_WARN() acts like dev_printk(), but with the key difference
578 * of using a WARN/WARN_ON to get the message out, including the
579 * file/line information and a backtrace.
580 */
581#define dev_WARN(dev, format, arg...) \
582 WARN(1, "Device: %s\n" format, dev_driver_string(dev), ## arg);
583
570/* Create alias, so I can be autoloaded. */ 584/* Create alias, so I can be autoloaded. */
571#define MODULE_ALIAS_CHARDEV(major,minor) \ 585#define MODULE_ALIAS_CHARDEV(major,minor) \
572 MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) 586 MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
diff --git a/include/linux/dm-region-hash.h b/include/linux/dm-region-hash.h
new file mode 100644
index 000000000000..a9e652a41373
--- /dev/null
+++ b/include/linux/dm-region-hash.h
@@ -0,0 +1,104 @@
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * Device-Mapper dirty region hash interface.
6 *
7 * This file is released under the GPL.
8 */
9
10#ifndef DM_REGION_HASH_H
11#define DM_REGION_HASH_H
12
13#include <linux/dm-dirty-log.h>
14
15/*-----------------------------------------------------------------
16 * Region hash
17 *----------------------------------------------------------------*/
18struct dm_region_hash;
19struct dm_region;
20
21/*
22 * States a region can have.
23 */
24enum dm_rh_region_states {
25 DM_RH_CLEAN = 0x01, /* No writes in flight. */
26 DM_RH_DIRTY = 0x02, /* Writes in flight. */
27 DM_RH_NOSYNC = 0x04, /* Out of sync. */
28 DM_RH_RECOVERING = 0x08, /* Under resynchronization. */
29};
30
31/*
32 * Region hash create/destroy.
33 */
34struct bio_list;
35struct dm_region_hash *dm_region_hash_create(
36 void *context, void (*dispatch_bios)(void *context,
37 struct bio_list *bios),
38 void (*wakeup_workers)(void *context),
39 void (*wakeup_all_recovery_waiters)(void *context),
40 sector_t target_begin, unsigned max_recovery,
41 struct dm_dirty_log *log, uint32_t region_size,
42 region_t nr_regions);
43void dm_region_hash_destroy(struct dm_region_hash *rh);
44
45struct dm_dirty_log *dm_rh_dirty_log(struct dm_region_hash *rh);
46
47/*
48 * Conversion functions.
49 */
50region_t dm_rh_bio_to_region(struct dm_region_hash *rh, struct bio *bio);
51sector_t dm_rh_region_to_sector(struct dm_region_hash *rh, region_t region);
52void *dm_rh_region_context(struct dm_region *reg);
53
54/*
55 * Get region size and key (ie. number of the region).
56 */
57sector_t dm_rh_get_region_size(struct dm_region_hash *rh);
58region_t dm_rh_get_region_key(struct dm_region *reg);
59
60/*
61 * Get/set/update region state (and dirty log).
62 *
63 */
64int dm_rh_get_state(struct dm_region_hash *rh, region_t region, int may_block);
65void dm_rh_set_state(struct dm_region_hash *rh, region_t region,
66 enum dm_rh_region_states state, int may_block);
67
68/* Non-zero errors_handled leaves the state of the region NOSYNC */
69void dm_rh_update_states(struct dm_region_hash *rh, int errors_handled);
70
71/* Flush the region hash and dirty log. */
72int dm_rh_flush(struct dm_region_hash *rh);
73
74/* Inc/dec pending count on regions. */
75void dm_rh_inc_pending(struct dm_region_hash *rh, struct bio_list *bios);
76void dm_rh_dec(struct dm_region_hash *rh, region_t region);
77
78/* Delay bios on regions. */
79void dm_rh_delay(struct dm_region_hash *rh, struct bio *bio);
80
81void dm_rh_mark_nosync(struct dm_region_hash *rh,
82 struct bio *bio, unsigned done, int error);
83
84/*
85 * Region recovery control.
86 */
87
88/* Prepare some regions for recovery by starting to quiesce them. */
89void dm_rh_recovery_prepare(struct dm_region_hash *rh);
90
91/* Try fetching a quiesced region for recovery. */
92struct dm_region *dm_rh_recovery_start(struct dm_region_hash *rh);
93
94/* Report recovery end on a region. */
95void dm_rh_recovery_end(struct dm_region *reg, int error);
96
97/* Returns number of regions with recovery work outstanding. */
98int dm_rh_recovery_in_flight(struct dm_region_hash *rh);
99
100/* Start/stop recovery. */
101void dm_rh_start_recovery(struct dm_region_hash *rh);
102void dm_rh_stop_recovery(struct dm_region_hash *rh);
103
104#endif /* DM_REGION_HASH_H */
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
new file mode 100644
index 000000000000..952df39c989d
--- /dev/null
+++ b/include/linux/dma_remapping.h
@@ -0,0 +1,156 @@
1#ifndef _DMA_REMAPPING_H
2#define _DMA_REMAPPING_H
3
4/*
5 * VT-d hardware uses 4KiB page size regardless of host page size.
6 */
7#define VTD_PAGE_SHIFT (12)
8#define VTD_PAGE_SIZE (1UL << VTD_PAGE_SHIFT)
9#define VTD_PAGE_MASK (((u64)-1) << VTD_PAGE_SHIFT)
10#define VTD_PAGE_ALIGN(addr) (((addr) + VTD_PAGE_SIZE - 1) & VTD_PAGE_MASK)
11
12#define IOVA_PFN(addr) ((addr) >> PAGE_SHIFT)
13#define DMA_32BIT_PFN IOVA_PFN(DMA_32BIT_MASK)
14#define DMA_64BIT_PFN IOVA_PFN(DMA_64BIT_MASK)
15
16
17/*
18 * 0: Present
19 * 1-11: Reserved
20 * 12-63: Context Ptr (12 - (haw-1))
21 * 64-127: Reserved
22 */
23struct root_entry {
24 u64 val;
25 u64 rsvd1;
26};
27#define ROOT_ENTRY_NR (VTD_PAGE_SIZE/sizeof(struct root_entry))
28static inline bool root_present(struct root_entry *root)
29{
30 return (root->val & 1);
31}
32static inline void set_root_present(struct root_entry *root)
33{
34 root->val |= 1;
35}
36static inline void set_root_value(struct root_entry *root, unsigned long value)
37{
38 root->val |= value & VTD_PAGE_MASK;
39}
40
41struct context_entry;
42static inline struct context_entry *
43get_context_addr_from_root(struct root_entry *root)
44{
45 return (struct context_entry *)
46 (root_present(root)?phys_to_virt(
47 root->val & VTD_PAGE_MASK) :
48 NULL);
49}
50
51/*
52 * low 64 bits:
53 * 0: present
54 * 1: fault processing disable
55 * 2-3: translation type
56 * 12-63: address space root
57 * high 64 bits:
58 * 0-2: address width
59 * 3-6: aval
60 * 8-23: domain id
61 */
62struct context_entry {
63 u64 lo;
64 u64 hi;
65};
66#define context_present(c) ((c).lo & 1)
67#define context_fault_disable(c) (((c).lo >> 1) & 1)
68#define context_translation_type(c) (((c).lo >> 2) & 3)
69#define context_address_root(c) ((c).lo & VTD_PAGE_MASK)
70#define context_address_width(c) ((c).hi & 7)
71#define context_domain_id(c) (((c).hi >> 8) & ((1 << 16) - 1))
72
73#define context_set_present(c) do {(c).lo |= 1;} while (0)
74#define context_set_fault_enable(c) \
75 do {(c).lo &= (((u64)-1) << 2) | 1;} while (0)
76#define context_set_translation_type(c, val) \
77 do { \
78 (c).lo &= (((u64)-1) << 4) | 3; \
79 (c).lo |= ((val) & 3) << 2; \
80 } while (0)
81#define CONTEXT_TT_MULTI_LEVEL 0
82#define context_set_address_root(c, val) \
83 do {(c).lo |= (val) & VTD_PAGE_MASK; } while (0)
84#define context_set_address_width(c, val) do {(c).hi |= (val) & 7;} while (0)
85#define context_set_domain_id(c, val) \
86 do {(c).hi |= ((val) & ((1 << 16) - 1)) << 8;} while (0)
87#define context_clear_entry(c) do {(c).lo = 0; (c).hi = 0;} while (0)
88
89/*
90 * 0: readable
91 * 1: writable
92 * 2-6: reserved
93 * 7: super page
94 * 8-11: available
95 * 12-63: Host physcial address
96 */
97struct dma_pte {
98 u64 val;
99};
100#define dma_clear_pte(p) do {(p).val = 0;} while (0)
101
102#define DMA_PTE_READ (1)
103#define DMA_PTE_WRITE (2)
104
105#define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while (0)
106#define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while (0)
107#define dma_set_pte_prot(p, prot) \
108 do {(p).val = ((p).val & ~3) | ((prot) & 3); } while (0)
109#define dma_pte_addr(p) ((p).val & VTD_PAGE_MASK)
110#define dma_set_pte_addr(p, addr) do {\
111 (p).val |= ((addr) & VTD_PAGE_MASK); } while (0)
112#define dma_pte_present(p) (((p).val & 3) != 0)
113
114struct intel_iommu;
115
116struct dmar_domain {
117 int id; /* domain id */
118 struct intel_iommu *iommu; /* back pointer to owning iommu */
119
120 struct list_head devices; /* all devices' list */
121 struct iova_domain iovad; /* iova's that belong to this domain */
122
123 struct dma_pte *pgd; /* virtual address */
124 spinlock_t mapping_lock; /* page table lock */
125 int gaw; /* max guest address width */
126
127 /* adjusted guest address width, 0 is level 2 30-bit */
128 int agaw;
129
130#define DOMAIN_FLAG_MULTIPLE_DEVICES 1
131 int flags;
132};
133
134/* PCI domain-device relationship */
135struct device_domain_info {
136 struct list_head link; /* link to domain siblings */
137 struct list_head global; /* link to global list */
138 u8 bus; /* PCI bus numer */
139 u8 devfn; /* PCI devfn number */
140 struct pci_dev *dev; /* it's NULL for PCIE-to-PCI bridge */
141 struct dmar_domain *domain; /* pointer to domain */
142};
143
144extern int init_dmars(void);
145extern void free_dmar_iommu(struct intel_iommu *iommu);
146
147extern int dmar_disabled;
148
149#ifndef CONFIG_DMAR_GFX_WA
150static inline void iommu_prepare_gfx_mapping(void)
151{
152 return;
153}
154#endif /* !CONFIG_DMAR_GFX_WA */
155
156#endif
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index c360c558e59e..f1984fc3e06d 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -45,7 +45,6 @@ extern struct list_head dmar_drhd_units;
45 list_for_each_entry(drhd, &dmar_drhd_units, list) 45 list_for_each_entry(drhd, &dmar_drhd_units, list)
46 46
47extern int dmar_table_init(void); 47extern int dmar_table_init(void);
48extern int early_dmar_detect(void);
49extern int dmar_dev_scope_init(void); 48extern int dmar_dev_scope_init(void);
50 49
51/* Intel IOMMU detection */ 50/* Intel IOMMU detection */
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index e5084eb5943a..34161907b2f8 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -44,8 +44,10 @@ extern const struct dmi_device * dmi_find_device(int type, const char *name,
44extern void dmi_scan_machine(void); 44extern void dmi_scan_machine(void);
45extern int dmi_get_year(int field); 45extern int dmi_get_year(int field);
46extern int dmi_name_in_vendors(const char *str); 46extern int dmi_name_in_vendors(const char *str);
47extern int dmi_name_in_serial(const char *str);
47extern int dmi_available; 48extern int dmi_available;
48extern int dmi_walk(void (*decode)(const struct dmi_header *)); 49extern int dmi_walk(void (*decode)(const struct dmi_header *));
50extern bool dmi_match(enum dmi_field f, const char *str);
49 51
50#else 52#else
51 53
@@ -56,9 +58,12 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na
56static inline void dmi_scan_machine(void) { return; } 58static inline void dmi_scan_machine(void) { return; }
57static inline int dmi_get_year(int year) { return 0; } 59static inline int dmi_get_year(int year) { return 0; }
58static inline int dmi_name_in_vendors(const char *s) { return 0; } 60static inline int dmi_name_in_vendors(const char *s) { return 0; }
61static inline int dmi_name_in_serial(const char *s) { return 0; }
59#define dmi_available 0 62#define dmi_available 0
60static inline int dmi_walk(void (*decode)(const struct dmi_header *)) 63static inline int dmi_walk(void (*decode)(const struct dmi_header *))
61 { return -1; } 64 { return -1; }
65static inline bool dmi_match(enum dmi_field f, const char *str)
66 { return false; }
62 67
63#endif 68#endif
64 69
diff --git a/include/linux/ds1286.h b/include/linux/ds1286.h
index d8989860e4ce..45ea0aa0aeb9 100644
--- a/include/linux/ds1286.h
+++ b/include/linux/ds1286.h
@@ -8,8 +8,6 @@
8#ifndef __LINUX_DS1286_H 8#ifndef __LINUX_DS1286_H
9#define __LINUX_DS1286_H 9#define __LINUX_DS1286_H
10 10
11#include <asm/ds1286.h>
12
13/********************************************************************** 11/**********************************************************************
14 * register summary 12 * register summary
15 **********************************************************************/ 13 **********************************************************************/
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 6e4ace270276..79a8ed8e6a7d 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -166,6 +166,7 @@ typedef enum fe_modulation {
166 VSB_16, 166 VSB_16,
167 PSK_8, 167 PSK_8,
168 APSK_16, 168 APSK_16,
169 APSK_32,
169 DQPSK, 170 DQPSK,
170} fe_modulation_t; 171} fe_modulation_t;
171 172
@@ -295,6 +296,7 @@ typedef enum fe_delivery_system {
295 SYS_DVBC_ANNEX_AC, 296 SYS_DVBC_ANNEX_AC,
296 SYS_DVBC_ANNEX_B, 297 SYS_DVBC_ANNEX_B,
297 SYS_DVBT, 298 SYS_DVBT,
299 SYS_DSS,
298 SYS_DVBS, 300 SYS_DVBS,
299 SYS_DVBS2, 301 SYS_DVBS2,
300 SYS_DVBH, 302 SYS_DVBH,
diff --git a/include/linux/dynamic_printk.h b/include/linux/dynamic_printk.h
new file mode 100644
index 000000000000..2d528d009074
--- /dev/null
+++ b/include/linux/dynamic_printk.h
@@ -0,0 +1,93 @@
1#ifndef _DYNAMIC_PRINTK_H
2#define _DYNAMIC_PRINTK_H
3
4#define DYNAMIC_DEBUG_HASH_BITS 6
5#define DEBUG_HASH_TABLE_SIZE (1 << DYNAMIC_DEBUG_HASH_BITS)
6
7#define TYPE_BOOLEAN 1
8
9#define DYNAMIC_ENABLED_ALL 0
10#define DYNAMIC_ENABLED_NONE 1
11#define DYNAMIC_ENABLED_SOME 2
12
13extern int dynamic_enabled;
14
15/* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which
16 * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They
17 * use independent hash functions, to reduce the chance of false positives.
18 */
19extern long long dynamic_printk_enabled;
20extern long long dynamic_printk_enabled2;
21
22struct mod_debug {
23 char *modname;
24 char *logical_modname;
25 char *flag_names;
26 int type;
27 int hash;
28 int hash2;
29} __attribute__((aligned(8)));
30
31int register_dynamic_debug_module(char *mod_name, int type, char *share_name,
32 char *flags, int hash, int hash2);
33
34#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
35extern int unregister_dynamic_debug_module(char *mod_name);
36extern int __dynamic_dbg_enabled_helper(char *modname, int type,
37 int value, int hash);
38
39#define __dynamic_dbg_enabled(module, type, value, level, hash) ({ \
40 int __ret = 0; \
41 if (unlikely((dynamic_printk_enabled & (1LL << DEBUG_HASH)) && \
42 (dynamic_printk_enabled2 & (1LL << DEBUG_HASH2)))) \
43 __ret = __dynamic_dbg_enabled_helper(module, type, \
44 value, hash);\
45 __ret; })
46
47#define dynamic_pr_debug(fmt, ...) do { \
48 static char mod_name[] \
49 __attribute__((section("__verbose_strings"))) \
50 = KBUILD_MODNAME; \
51 static struct mod_debug descriptor \
52 __used \
53 __attribute__((section("__verbose"), aligned(8))) = \
54 { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\
55 if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \
56 0, 0, DEBUG_HASH)) \
57 printk(KERN_DEBUG KBUILD_MODNAME ":" fmt, \
58 ##__VA_ARGS__); \
59 } while (0)
60
61#define dynamic_dev_dbg(dev, format, ...) do { \
62 static char mod_name[] \
63 __attribute__((section("__verbose_strings"))) \
64 = KBUILD_MODNAME; \
65 static struct mod_debug descriptor \
66 __used \
67 __attribute__((section("__verbose"), aligned(8))) = \
68 { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\
69 if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \
70 0, 0, DEBUG_HASH)) \
71 dev_printk(KERN_DEBUG, dev, \
72 KBUILD_MODNAME ": " format, \
73 ##__VA_ARGS__); \
74 } while (0)
75
76#else
77
78static inline int unregister_dynamic_debug_module(const char *mod_name)
79{
80 return 0;
81}
82static inline int __dynamic_dbg_enabled_helper(char *modname, int type,
83 int value, int hash)
84{
85 return 0;
86}
87
88#define __dynamic_dbg_enabled(module, type, value, level, hash) ({ 0; })
89#define dynamic_pr_debug(fmt, ...) do { } while (0)
90#define dynamic_dev_dbg(dev, format, ...) do { } while (0)
91#endif
92
93#endif
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 807373d467f7..bb66feb164bd 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -208,6 +208,9 @@ typedef efi_status_t efi_set_virtual_address_map_t (unsigned long memory_map_siz
208#define EFI_GLOBAL_VARIABLE_GUID \ 208#define EFI_GLOBAL_VARIABLE_GUID \
209 EFI_GUID( 0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c ) 209 EFI_GUID( 0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c )
210 210
211#define UV_SYSTEM_TABLE_GUID \
212 EFI_GUID( 0x3b13a7d4, 0x633e, 0x11dd, 0x93, 0xec, 0xda, 0x25, 0x56, 0xd8, 0x95, 0x93 )
213
211typedef struct { 214typedef struct {
212 efi_guid_t guid; 215 efi_guid_t guid;
213 unsigned long table; 216 unsigned long table;
@@ -255,6 +258,7 @@ extern struct efi {
255 unsigned long boot_info; /* boot info table */ 258 unsigned long boot_info; /* boot info table */
256 unsigned long hcdp; /* HCDP table */ 259 unsigned long hcdp; /* HCDP table */
257 unsigned long uga; /* UGA table */ 260 unsigned long uga; /* UGA table */
261 unsigned long uv_systab; /* UV system table */
258 efi_get_time_t *get_time; 262 efi_get_time_t *get_time;
259 efi_set_time_t *set_time; 263 efi_set_time_t *set_time;
260 efi_get_wakeup_time_t *get_wakeup_time; 264 efi_get_wakeup_time_t *get_wakeup_time;
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 92f6f634e3e6..7a204256b155 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -28,7 +28,7 @@ typedef void (elevator_activate_req_fn) (struct request_queue *, struct request
28typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *); 28typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *);
29 29
30typedef void *(elevator_init_fn) (struct request_queue *); 30typedef void *(elevator_init_fn) (struct request_queue *);
31typedef void (elevator_exit_fn) (elevator_t *); 31typedef void (elevator_exit_fn) (struct elevator_queue *);
32 32
33struct elevator_ops 33struct elevator_ops
34{ 34{
@@ -62,8 +62,8 @@ struct elevator_ops
62 62
63struct elv_fs_entry { 63struct elv_fs_entry {
64 struct attribute attr; 64 struct attribute attr;
65 ssize_t (*show)(elevator_t *, char *); 65 ssize_t (*show)(struct elevator_queue *, char *);
66 ssize_t (*store)(elevator_t *, const char *, size_t); 66 ssize_t (*store)(struct elevator_queue *, const char *, size_t);
67}; 67};
68 68
69/* 69/*
@@ -130,7 +130,7 @@ extern ssize_t elv_iosched_show(struct request_queue *, char *);
130extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t); 130extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t);
131 131
132extern int elevator_init(struct request_queue *, char *); 132extern int elevator_init(struct request_queue *, char *);
133extern void elevator_exit(elevator_t *); 133extern void elevator_exit(struct elevator_queue *);
134extern int elv_rq_merge_ok(struct request *, struct bio *); 134extern int elv_rq_merge_ok(struct request *, struct bio *);
135 135
136/* 136/*
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 25d62e6e3290..1cb0f0b90926 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -27,6 +27,7 @@
27#include <linux/if_ether.h> 27#include <linux/if_ether.h>
28#include <linux/netdevice.h> 28#include <linux/netdevice.h>
29#include <linux/random.h> 29#include <linux/random.h>
30#include <asm/unaligned.h>
30 31
31#ifdef __KERNEL__ 32#ifdef __KERNEL__
32extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); 33extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);
@@ -41,6 +42,10 @@ extern int eth_header_cache(const struct neighbour *neigh, struct hh_cache *hh);
41extern void eth_header_cache_update(struct hh_cache *hh, 42extern void eth_header_cache_update(struct hh_cache *hh,
42 const struct net_device *dev, 43 const struct net_device *dev,
43 const unsigned char *haddr); 44 const unsigned char *haddr);
45extern int eth_mac_addr(struct net_device *dev, void *p);
46extern int eth_change_mtu(struct net_device *dev, int new_mtu);
47extern int eth_validate_addr(struct net_device *dev);
48
44 49
45 50
46extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count); 51extern struct net_device *alloc_etherdev_mq(int sizeof_priv, unsigned int queue_count);
@@ -136,6 +141,47 @@ static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2)
136 BUILD_BUG_ON(ETH_ALEN != 6); 141 BUILD_BUG_ON(ETH_ALEN != 6);
137 return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0; 142 return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
138} 143}
144
145static inline unsigned long zap_last_2bytes(unsigned long value)
146{
147#ifdef __BIG_ENDIAN
148 return value >> 16;
149#else
150 return value << 16;
151#endif
152}
153
154/**
155 * compare_ether_addr_64bits - Compare two Ethernet addresses
156 * @addr1: Pointer to an array of 8 bytes
157 * @addr2: Pointer to an other array of 8 bytes
158 *
159 * Compare two ethernet addresses, returns 0 if equal.
160 * Same result than "memcmp(addr1, addr2, ETH_ALEN)" but without conditional
161 * branches, and possibly long word memory accesses on CPU allowing cheap
162 * unaligned memory reads.
163 * arrays = { byte1, byte2, byte3, byte4, byte6, byte7, pad1, pad2}
164 *
165 * Please note that alignment of addr1 & addr2 is only guaranted to be 16 bits.
166 */
167
168static inline unsigned compare_ether_addr_64bits(const u8 addr1[6+2],
169 const u8 addr2[6+2])
170{
171#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
172 unsigned long fold = ((*(unsigned long *)addr1) ^
173 (*(unsigned long *)addr2));
174
175 if (sizeof(fold) == 8)
176 return zap_last_2bytes(fold) != 0;
177
178 fold |= zap_last_2bytes((*(unsigned long *)(addr1 + 4)) ^
179 (*(unsigned long *)(addr2 + 4)));
180 return fold != 0;
181#else
182 return compare_ether_addr(addr1, addr2);
183#endif
184}
139#endif /* __KERNEL__ */ 185#endif /* __KERNEL__ */
140 186
141#endif /* _LINUX_ETHERDEVICE_H */ 187#endif /* _LINUX_ETHERDEVICE_H */
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index b4b038b89ee6..27c67a542235 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -467,6 +467,8 @@ struct ethtool_ops {
467 467
468#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ 468#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
469#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ 469#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
470#define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */
471#define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */
470 472
471/* compatibility with older code */ 473/* compatibility with older code */
472#define SPARC_ETH_GSET ETHTOOL_GSET 474#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 2efe7b863cff..78c775a83f7c 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -47,7 +47,7 @@
47#ifdef EXT2FS_DEBUG 47#ifdef EXT2FS_DEBUG
48# define ext2_debug(f, a...) { \ 48# define ext2_debug(f, a...) { \
49 printk ("EXT2-fs DEBUG (%s, %d): %s:", \ 49 printk ("EXT2-fs DEBUG (%s, %d): %s:", \
50 __FILE__, __LINE__, __FUNCTION__); \ 50 __FILE__, __LINE__, __func__); \
51 printk (f, ## a); \ 51 printk (f, ## a); \
52 } 52 }
53#else 53#else
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 8120fa1bc235..d14f02918483 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -43,7 +43,7 @@
43#define ext3_debug(f, a...) \ 43#define ext3_debug(f, a...) \
44 do { \ 44 do { \
45 printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \ 45 printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \
46 __FILE__, __LINE__, __FUNCTION__); \ 46 __FILE__, __LINE__, __func__); \
47 printk (KERN_DEBUG f, ## a); \ 47 printk (KERN_DEBUG f, ## a); \
48 } while (0) 48 } while (0)
49#else 49#else
@@ -380,6 +380,8 @@ struct ext3_inode {
380#define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ 380#define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */
381#define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ 381#define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */
382#define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ 382#define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
383#define EXT3_MOUNT_DATA_ERR_ABORT 0x400000 /* Abort on file data write
384 * error in ordered mode */
383 385
384/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ 386/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
385#ifndef _LINUX_EXT2_FS_H 387#ifndef _LINUX_EXT2_FS_H
@@ -871,7 +873,7 @@ extern void ext3_update_dynamic_rev (struct super_block *sb);
871#define ext3_std_error(sb, errno) \ 873#define ext3_std_error(sb, errno) \
872do { \ 874do { \
873 if ((errno)) \ 875 if ((errno)) \
874 __ext3_std_error((sb), __FUNCTION__, (errno)); \ 876 __ext3_std_error((sb), __func__, (errno)); \
875} while (0) 877} while (0)
876 878
877/* 879/*
diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h
index 8c43b13a02fe..cf82d519be40 100644
--- a/include/linux/ext3_jbd.h
+++ b/include/linux/ext3_jbd.h
@@ -137,17 +137,17 @@ int __ext3_journal_dirty_metadata(const char *where,
137 handle_t *handle, struct buffer_head *bh); 137 handle_t *handle, struct buffer_head *bh);
138 138
139#define ext3_journal_get_undo_access(handle, bh) \ 139#define ext3_journal_get_undo_access(handle, bh) \
140 __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh)) 140 __ext3_journal_get_undo_access(__func__, (handle), (bh))
141#define ext3_journal_get_write_access(handle, bh) \ 141#define ext3_journal_get_write_access(handle, bh) \
142 __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh)) 142 __ext3_journal_get_write_access(__func__, (handle), (bh))
143#define ext3_journal_revoke(handle, blocknr, bh) \ 143#define ext3_journal_revoke(handle, blocknr, bh) \
144 __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh)) 144 __ext3_journal_revoke(__func__, (handle), (blocknr), (bh))
145#define ext3_journal_get_create_access(handle, bh) \ 145#define ext3_journal_get_create_access(handle, bh) \
146 __ext3_journal_get_create_access(__FUNCTION__, (handle), (bh)) 146 __ext3_journal_get_create_access(__func__, (handle), (bh))
147#define ext3_journal_dirty_metadata(handle, bh) \ 147#define ext3_journal_dirty_metadata(handle, bh) \
148 __ext3_journal_dirty_metadata(__FUNCTION__, (handle), (bh)) 148 __ext3_journal_dirty_metadata(__func__, (handle), (bh))
149#define ext3_journal_forget(handle, bh) \ 149#define ext3_journal_forget(handle, bh) \
150 __ext3_journal_forget(__FUNCTION__, (handle), (bh)) 150 __ext3_journal_forget(__func__, (handle), (bh))
151 151
152int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh); 152int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
153 153
@@ -160,7 +160,7 @@ static inline handle_t *ext3_journal_start(struct inode *inode, int nblocks)
160} 160}
161 161
162#define ext3_journal_stop(handle) \ 162#define ext3_journal_stop(handle) \
163 __ext3_journal_stop(__FUNCTION__, (handle)) 163 __ext3_journal_stop(__func__, (handle))
164 164
165static inline handle_t *ext3_journal_current_handle(void) 165static inline handle_t *ext3_journal_current_handle(void)
166{ 166{
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
index 32368c4f0326..06ca9b21dad2 100644
--- a/include/linux/fault-inject.h
+++ b/include/linux/fault-inject.h
@@ -81,4 +81,13 @@ static inline void cleanup_fault_attr_dentries(struct fault_attr *attr)
81 81
82#endif /* CONFIG_FAULT_INJECTION */ 82#endif /* CONFIG_FAULT_INJECTION */
83 83
84#ifdef CONFIG_FAILSLAB
85extern bool should_failslab(size_t size, gfp_t gfpflags);
86#else
87static inline bool should_failslab(size_t size, gfp_t gfpflags)
88{
89 return false;
90}
91#endif /* CONFIG_FAILSLAB */
92
84#endif /* _LINUX_FAULT_INJECT_H */ 93#endif /* _LINUX_FAULT_INJECT_H */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 531ccd5f5960..1ee63df5be92 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -808,6 +808,7 @@ struct fb_tile_ops {
808struct fb_info { 808struct fb_info {
809 int node; 809 int node;
810 int flags; 810 int flags;
811 struct mutex lock; /* Lock for open/release/ioctl funcs */
811 struct fb_var_screeninfo var; /* Current var */ 812 struct fb_var_screeninfo var; /* Current var */
812 struct fb_fix_screeninfo fix; /* Current fix */ 813 struct fb_fix_screeninfo fix; /* Current fix */
813 struct fb_monspecs monspecs; /* Current Monitor specs */ 814 struct fb_monspecs monspecs; /* Current Monitor specs */
@@ -887,7 +888,7 @@ struct fb_info {
887#define fb_writeq sbus_writeq 888#define fb_writeq sbus_writeq
888#define fb_memset sbus_memset_io 889#define fb_memset sbus_memset_io
889 890
890#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) || defined(__avr32__) 891#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__)
891 892
892#define fb_readb __raw_readb 893#define fb_readb __raw_readb
893#define fb_readw __raw_readw 894#define fb_readw __raw_readw
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h
index e61e42dfd317..155bafd9e886 100644
--- a/include/linux/fddidevice.h
+++ b/include/linux/fddidevice.h
@@ -27,6 +27,7 @@
27#ifdef __KERNEL__ 27#ifdef __KERNEL__
28extern __be16 fddi_type_trans(struct sk_buff *skb, 28extern __be16 fddi_type_trans(struct sk_buff *skb,
29 struct net_device *dev); 29 struct net_device *dev);
30extern int fddi_change_mtu(struct net_device *dev, int new_mtu);
30extern struct net_device *alloc_fddidev(int sizeof_priv); 31extern struct net_device *alloc_fddidev(int sizeof_priv);
31#endif 32#endif
32 33
diff --git a/include/linux/file.h b/include/linux/file.h
index a20259e248a5..335a0a5c316e 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -19,10 +19,10 @@ struct file_operations;
19struct vfsmount; 19struct vfsmount;
20struct dentry; 20struct dentry;
21extern int init_file(struct file *, struct vfsmount *mnt, 21extern int init_file(struct file *, struct vfsmount *mnt,
22 struct dentry *dentry, mode_t mode, 22 struct dentry *dentry, fmode_t mode,
23 const struct file_operations *fop); 23 const struct file_operations *fop);
24extern struct file *alloc_file(struct vfsmount *, struct dentry *dentry, 24extern struct file *alloc_file(struct vfsmount *, struct dentry *dentry,
25 mode_t mode, const struct file_operations *fop); 25 fmode_t mode, const struct file_operations *fop);
26 26
27static inline void fput_light(struct file *file, int fput_needed) 27static inline void fput_light(struct file *file, int fput_needed)
28{ 28{
diff --git a/include/linux/filter.h b/include/linux/filter.h
index b6ea9aa9e853..1354aaf6abbe 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -122,7 +122,8 @@ struct sock_fprog /* Required for SO_ATTACH_FILTER. */
122#define SKF_AD_PKTTYPE 4 122#define SKF_AD_PKTTYPE 4
123#define SKF_AD_IFINDEX 8 123#define SKF_AD_IFINDEX 8
124#define SKF_AD_NLATTR 12 124#define SKF_AD_NLATTR 12
125#define SKF_AD_MAX 16 125#define SKF_AD_NLATTR_NEST 16
126#define SKF_AD_MAX 20
126#define SKF_NET_OFF (-0x100000) 127#define SKF_NET_OFF (-0x100000)
127#define SKF_LL_OFF (-0x200000) 128#define SKF_LL_OFF (-0x200000)
128 129
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h
index 0f0e271f97fa..4d078e99c017 100644
--- a/include/linux/firewire-cdev.h
+++ b/include/linux/firewire-cdev.h
@@ -154,8 +154,13 @@ struct fw_cdev_event_iso_interrupt {
154 * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST 154 * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST
155 * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT 155 * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT
156 * 156 *
157 * Convenience union for userspace use. Events could be read(2) into a char 157 * Convenience union for userspace use. Events could be read(2) into an
158 * buffer and then cast to this union for further processing. 158 * appropriately aligned char buffer and then cast to this union for further
159 * processing. Note that for a request, response or iso_interrupt event,
160 * the data[] or header[] may make the size of the full event larger than
161 * sizeof(union fw_cdev_event). Also note that if you attempt to read(2)
162 * an event into a buffer that is not large enough for it, the data that does
163 * not fit will be discarded so that the next read(2) will return a new event.
159 */ 164 */
160union fw_cdev_event { 165union fw_cdev_event {
161 struct fw_cdev_event_common common; 166 struct fw_cdev_event_common common;
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index deddeedf3257..5a361f85cfec 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -6,7 +6,7 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/wait.h> 7#include <linux/wait.h>
8 8
9#ifdef CONFIG_PM_SLEEP 9#ifdef CONFIG_FREEZER
10/* 10/*
11 * Check if a process has been frozen 11 * Check if a process has been frozen
12 */ 12 */
@@ -39,29 +39,14 @@ static inline void clear_freeze_flag(struct task_struct *p)
39 clear_tsk_thread_flag(p, TIF_FREEZE); 39 clear_tsk_thread_flag(p, TIF_FREEZE);
40} 40}
41 41
42/* 42static inline bool should_send_signal(struct task_struct *p)
43 * Wake up a frozen process
44 *
45 * task_lock() is taken to prevent the race with refrigerator() which may
46 * occur if the freezing of tasks fails. Namely, without the lock, if the
47 * freezing of tasks failed, thaw_tasks() might have run before a task in
48 * refrigerator() could call frozen_process(), in which case the task would be
49 * frozen and no one would thaw it.
50 */
51static inline int thaw_process(struct task_struct *p)
52{ 43{
53 task_lock(p); 44 return !(p->flags & PF_FREEZER_NOSIG);
54 if (frozen(p)) {
55 p->flags &= ~PF_FROZEN;
56 task_unlock(p);
57 wake_up_process(p);
58 return 1;
59 }
60 clear_freeze_flag(p);
61 task_unlock(p);
62 return 0;
63} 45}
64 46
47/* Takes and releases task alloc lock using task_lock() */
48extern int thaw_process(struct task_struct *p);
49
65extern void refrigerator(void); 50extern void refrigerator(void);
66extern int freeze_processes(void); 51extern int freeze_processes(void);
67extern void thaw_processes(void); 52extern void thaw_processes(void);
@@ -75,6 +60,15 @@ static inline int try_to_freeze(void)
75 return 0; 60 return 0;
76} 61}
77 62
63extern bool freeze_task(struct task_struct *p, bool sig_only);
64extern void cancel_freezing(struct task_struct *p);
65
66#ifdef CONFIG_CGROUP_FREEZER
67extern int cgroup_frozen(struct task_struct *task);
68#else /* !CONFIG_CGROUP_FREEZER */
69static inline int cgroup_frozen(struct task_struct *task) { return 0; }
70#endif /* !CONFIG_CGROUP_FREEZER */
71
78/* 72/*
79 * The PF_FREEZER_SKIP flag should be set by a vfork parent right before it 73 * The PF_FREEZER_SKIP flag should be set by a vfork parent right before it
80 * calls wait_for_completion(&vfork) and reset right after it returns from this 74 * calls wait_for_completion(&vfork) and reset right after it returns from this
@@ -166,7 +160,7 @@ static inline void set_freezable_with_signal(void)
166 } while (try_to_freeze()); \ 160 } while (try_to_freeze()); \
167 __retval; \ 161 __retval; \
168}) 162})
169#else /* !CONFIG_PM_SLEEP */ 163#else /* !CONFIG_FREEZER */
170static inline int frozen(struct task_struct *p) { return 0; } 164static inline int frozen(struct task_struct *p) { return 0; }
171static inline int freezing(struct task_struct *p) { return 0; } 165static inline int freezing(struct task_struct *p) { return 0; }
172static inline void set_freeze_flag(struct task_struct *p) {} 166static inline void set_freeze_flag(struct task_struct *p) {}
@@ -191,6 +185,6 @@ static inline void set_freezable_with_signal(void) {}
191#define wait_event_freezable_timeout(wq, condition, timeout) \ 185#define wait_event_freezable_timeout(wq, condition, timeout) \
192 wait_event_interruptible_timeout(wq, condition, timeout) 186 wait_event_interruptible_timeout(wq, condition, timeout)
193 187
194#endif /* !CONFIG_PM_SLEEP */ 188#endif /* !CONFIG_FREEZER */
195 189
196#endif /* FREEZER_H_INCLUDED */ 190#endif /* FREEZER_H_INCLUDED */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a6a625be13fc..001ded4845b4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -63,18 +63,32 @@ extern int dir_notify_enable;
63#define MAY_ACCESS 16 63#define MAY_ACCESS 16
64#define MAY_OPEN 32 64#define MAY_OPEN 32
65 65
66#define FMODE_READ 1 66/* file is open for reading */
67#define FMODE_WRITE 2 67#define FMODE_READ ((__force fmode_t)1)
68/* file is open for writing */
69#define FMODE_WRITE ((__force fmode_t)2)
70/* file is seekable */
71#define FMODE_LSEEK ((__force fmode_t)4)
72/* file can be accessed using pread/pwrite */
73#define FMODE_PREAD ((__force fmode_t)8)
74#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */
75/* File is opened for execution with sys_execve / sys_uselib */
76#define FMODE_EXEC ((__force fmode_t)16)
77/* File is opened with O_NDELAY (only set for block devices) */
78#define FMODE_NDELAY ((__force fmode_t)32)
79/* File is opened with O_EXCL (only set for block devices) */
80#define FMODE_EXCL ((__force fmode_t)64)
81/* File is opened using open(.., 3, ..) and is writeable only for ioctls
82 (specialy hack for floppy.c) */
83#define FMODE_WRITE_IOCTL ((__force fmode_t)128)
68 84
69/* Internal kernel extensions */ 85/*
70#define FMODE_LSEEK 4 86 * Don't update ctime and mtime.
71#define FMODE_PREAD 8 87 *
72#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ 88 * Currently a special hack for the XFS open_by_handle ioctl, but we'll
73 89 * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
74/* File is being opened for execution. Primary users of this flag are 90 */
75 distributed filesystems that can use it to achieve correct ETXTBUSY 91#define FMODE_NOCMTIME ((__force fmode_t)2048)
76 behavior for cross-node execution/opening_for_writing of files */
77#define FMODE_EXEC 16
78 92
79#define RW_MASK 1 93#define RW_MASK 1
80#define RWA_MASK 2 94#define RWA_MASK 2
@@ -136,7 +150,7 @@ extern int dir_notify_enable;
136/* 150/*
137 * Superblock flags that can be altered by MS_REMOUNT 151 * Superblock flags that can be altered by MS_REMOUNT
138 */ 152 */
139#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK) 153#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
140 154
141/* 155/*
142 * Old magic mount flag and mask 156 * Old magic mount flag and mask
@@ -310,6 +324,7 @@ struct poll_table_struct;
310struct kstatfs; 324struct kstatfs;
311struct vm_area_struct; 325struct vm_area_struct;
312struct vfsmount; 326struct vfsmount;
327struct cred;
313 328
314extern void __init inode_init(void); 329extern void __init inode_init(void);
315extern void __init inode_init_early(void); 330extern void __init inode_init_early(void);
@@ -484,13 +499,6 @@ struct address_space_operations {
484 int (*readpages)(struct file *filp, struct address_space *mapping, 499 int (*readpages)(struct file *filp, struct address_space *mapping,
485 struct list_head *pages, unsigned nr_pages); 500 struct list_head *pages, unsigned nr_pages);
486 501
487 /*
488 * ext3 requires that a successful prepare_write() call be followed
489 * by a commit_write() call - they must be balanced
490 */
491 int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
492 int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
493
494 int (*write_begin)(struct file *, struct address_space *mapping, 502 int (*write_begin)(struct file *, struct address_space *mapping,
495 loff_t pos, unsigned len, unsigned flags, 503 loff_t pos, unsigned len, unsigned flags,
496 struct page **pagep, void **fsdata); 504 struct page **pagep, void **fsdata);
@@ -825,10 +833,10 @@ struct file {
825 const struct file_operations *f_op; 833 const struct file_operations *f_op;
826 atomic_long_t f_count; 834 atomic_long_t f_count;
827 unsigned int f_flags; 835 unsigned int f_flags;
828 mode_t f_mode; 836 fmode_t f_mode;
829 loff_t f_pos; 837 loff_t f_pos;
830 struct fown_struct f_owner; 838 struct fown_struct f_owner;
831 unsigned int f_uid, f_gid; 839 const struct cred *f_cred;
832 struct file_ra_state f_ra; 840 struct file_ra_state f_ra;
833 841
834 u64 f_version; 842 u64 f_version;
@@ -1037,7 +1045,6 @@ extern int vfs_setlease(struct file *, long, struct file_lock **);
1037extern int lease_modify(struct file_lock **, int); 1045extern int lease_modify(struct file_lock **, int);
1038extern int lock_may_read(struct inode *, loff_t start, unsigned long count); 1046extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
1039extern int lock_may_write(struct inode *, loff_t start, unsigned long count); 1047extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
1040extern struct seq_operations locks_seq_operations;
1041#else /* !CONFIG_FILE_LOCKING */ 1048#else /* !CONFIG_FILE_LOCKING */
1042#define fcntl_getlk(a, b) ({ -EINVAL; }) 1049#define fcntl_getlk(a, b) ({ -EINVAL; })
1043#define fcntl_setlk(a, b, c, d) ({ -EACCES; }) 1050#define fcntl_setlk(a, b, c, d) ({ -EACCES; })
@@ -1152,6 +1159,7 @@ struct super_block {
1152 char s_id[32]; /* Informational name */ 1159 char s_id[32]; /* Informational name */
1153 1160
1154 void *s_fs_info; /* Filesystem private info */ 1161 void *s_fs_info; /* Filesystem private info */
1162 fmode_t s_mode;
1155 1163
1156 /* 1164 /*
1157 * The next field is for VFS *only*. No filesystems have any business 1165 * The next field is for VFS *only*. No filesystems have any business
@@ -1195,7 +1203,7 @@ enum {
1195#define has_fs_excl() atomic_read(&current->fs_excl) 1203#define has_fs_excl() atomic_read(&current->fs_excl)
1196 1204
1197#define is_owner_or_cap(inode) \ 1205#define is_owner_or_cap(inode) \
1198 ((current->fsuid == (inode)->i_uid) || capable(CAP_FOWNER)) 1206 ((current_fsuid() == (inode)->i_uid) || capable(CAP_FOWNER))
1199 1207
1200/* not quite ready to be deprecated, but... */ 1208/* not quite ready to be deprecated, but... */
1201extern void lock_super(struct super_block *); 1209extern void lock_super(struct super_block *);
@@ -1266,20 +1274,7 @@ int generic_osync_inode(struct inode *, struct address_space *, int);
1266 * to have different dirent layouts depending on the binary type. 1274 * to have different dirent layouts depending on the binary type.
1267 */ 1275 */
1268typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); 1276typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
1269 1277struct block_device_operations;
1270struct block_device_operations {
1271 int (*open) (struct inode *, struct file *);
1272 int (*release) (struct inode *, struct file *);
1273 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
1274 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
1275 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
1276 int (*direct_access) (struct block_device *, sector_t,
1277 void **, unsigned long *);
1278 int (*media_changed) (struct gendisk *);
1279 int (*revalidate_disk) (struct gendisk *);
1280 int (*getgeo)(struct block_device *, struct hd_geometry *);
1281 struct module *owner;
1282};
1283 1278
1284/* These macros are for out of kernel modules to test that 1279/* These macros are for out of kernel modules to test that
1285 * the kernel supports the unlocked_ioctl and compat_ioctl 1280 * the kernel supports the unlocked_ioctl and compat_ioctl
@@ -1593,7 +1588,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *,
1593 struct vfsmount *mnt); 1588 struct vfsmount *mnt);
1594extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); 1589extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
1595int __put_super_and_need_restart(struct super_block *sb); 1590int __put_super_and_need_restart(struct super_block *sb);
1596void unnamed_dev_init(void);
1597 1591
1598/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ 1592/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
1599#define fops_get(fops) \ 1593#define fops_get(fops) \
@@ -1689,7 +1683,8 @@ extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
1689extern long do_sys_open(int dfd, const char __user *filename, int flags, 1683extern long do_sys_open(int dfd, const char __user *filename, int flags,
1690 int mode); 1684 int mode);
1691extern struct file *filp_open(const char *, int, int); 1685extern struct file *filp_open(const char *, int, int);
1692extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); 1686extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
1687 const struct cred *);
1693extern int filp_close(struct file *, fl_owner_t id); 1688extern int filp_close(struct file *, fl_owner_t id);
1694extern char * getname(const char __user *); 1689extern char * getname(const char __user *);
1695 1690
@@ -1714,7 +1709,7 @@ extern struct block_device *bdget(dev_t);
1714extern void bd_set_size(struct block_device *, loff_t size); 1709extern void bd_set_size(struct block_device *, loff_t size);
1715extern void bd_forget(struct inode *inode); 1710extern void bd_forget(struct inode *inode);
1716extern void bdput(struct block_device *); 1711extern void bdput(struct block_device *);
1717extern struct block_device *open_by_devnum(dev_t, unsigned); 1712extern struct block_device *open_by_devnum(dev_t, fmode_t);
1718#else 1713#else
1719static inline void bd_forget(struct inode *inode) {} 1714static inline void bd_forget(struct inode *inode) {}
1720#endif 1715#endif
@@ -1724,13 +1719,10 @@ extern const struct file_operations bad_sock_fops;
1724extern const struct file_operations def_fifo_fops; 1719extern const struct file_operations def_fifo_fops;
1725#ifdef CONFIG_BLOCK 1720#ifdef CONFIG_BLOCK
1726extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); 1721extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
1727extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); 1722extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);
1728extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
1729 struct gendisk *disk, unsigned cmd,
1730 unsigned long arg);
1731extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); 1723extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
1732extern int blkdev_get(struct block_device *, mode_t, unsigned); 1724extern int blkdev_get(struct block_device *, fmode_t);
1733extern int blkdev_put(struct block_device *); 1725extern int blkdev_put(struct block_device *, fmode_t);
1734extern int bd_claim(struct block_device *, void *); 1726extern int bd_claim(struct block_device *, void *);
1735extern void bd_release(struct block_device *); 1727extern void bd_release(struct block_device *);
1736#ifdef CONFIG_SYSFS 1728#ifdef CONFIG_SYSFS
@@ -1761,9 +1753,10 @@ extern void chrdev_show(struct seq_file *,off_t);
1761extern const char *__bdevname(dev_t, char *buffer); 1753extern const char *__bdevname(dev_t, char *buffer);
1762extern const char *bdevname(struct block_device *bdev, char *buffer); 1754extern const char *bdevname(struct block_device *bdev, char *buffer);
1763extern struct block_device *lookup_bdev(const char *); 1755extern struct block_device *lookup_bdev(const char *);
1764extern struct block_device *open_bdev_excl(const char *, int, void *); 1756extern struct block_device *open_bdev_exclusive(const char *, fmode_t, void *);
1765extern void close_bdev_excl(struct block_device *); 1757extern void close_bdev_exclusive(struct block_device *, fmode_t);
1766extern void blkdev_show(struct seq_file *,off_t); 1758extern void blkdev_show(struct seq_file *,off_t);
1759
1767#else 1760#else
1768#define BLKDEV_MAJOR_HASH_SIZE 0 1761#define BLKDEV_MAJOR_HASH_SIZE 0
1769#endif 1762#endif
@@ -1852,6 +1845,11 @@ extern int inode_permission(struct inode *, int);
1852extern int generic_permission(struct inode *, int, 1845extern int generic_permission(struct inode *, int,
1853 int (*check_acl)(struct inode *, int)); 1846 int (*check_acl)(struct inode *, int));
1854 1847
1848static inline bool execute_ok(struct inode *inode)
1849{
1850 return (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode);
1851}
1852
1855extern int get_write_access(struct inode *); 1853extern int get_write_access(struct inode *);
1856extern int deny_write_access(struct file *); 1854extern int deny_write_access(struct file *);
1857static inline void put_write_access(struct inode * inode) 1855static inline void put_write_access(struct inode * inode)
@@ -1887,7 +1885,9 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
1887 1885
1888extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); 1886extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
1889 1887
1888extern struct inode * inode_init_always(struct super_block *, struct inode *);
1890extern void inode_init_once(struct inode *); 1889extern void inode_init_once(struct inode *);
1890extern void inode_add_to_lists(struct super_block *, struct inode *);
1891extern void iput(struct inode *); 1891extern void iput(struct inode *);
1892extern struct inode * igrab(struct inode *); 1892extern struct inode * igrab(struct inode *);
1893extern ino_t iunique(struct super_block *, ino_t); 1893extern ino_t iunique(struct super_block *, ino_t);
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 4e625e0094c8..d9051d717d27 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -47,11 +47,7 @@
47struct gianfar_platform_data { 47struct gianfar_platform_data {
48 /* device specific information */ 48 /* device specific information */
49 u32 device_flags; 49 u32 device_flags;
50 /* board specific information */ 50 char bus_id[BUS_ID_SIZE];
51 u32 board_flags;
52 char bus_id[MII_BUS_ID_SIZE];
53 u32 phy_id;
54 u8 mac_addr[6];
55 phy_interface_t interface; 51 phy_interface_t interface;
56}; 52};
57 53
@@ -60,17 +56,6 @@ struct gianfar_mdio_data {
60 int irq[32]; 56 int irq[32];
61}; 57};
62 58
63/* Flags related to gianfar device features */
64#define FSL_GIANFAR_DEV_HAS_GIGABIT 0x00000001
65#define FSL_GIANFAR_DEV_HAS_COALESCE 0x00000002
66#define FSL_GIANFAR_DEV_HAS_RMON 0x00000004
67#define FSL_GIANFAR_DEV_HAS_MULTI_INTR 0x00000008
68#define FSL_GIANFAR_DEV_HAS_CSUM 0x00000010
69#define FSL_GIANFAR_DEV_HAS_VLAN 0x00000020
70#define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH 0x00000040
71#define FSL_GIANFAR_DEV_HAS_PADDING 0x00000080
72#define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100
73
74/* Flags in gianfar_platform_data */ 59/* Flags in gianfar_platform_data */
75#define FSL_GIANFAR_BRD_HAS_PHY_INTR 0x00000001 /* set or use a timer */ 60#define FSL_GIANFAR_BRD_HAS_PHY_INTR 0x00000001 /* set or use a timer */
76#define FSL_GIANFAR_BRD_IS_REDUCED 0x00000002 /* Set if RGMII, RMII */ 61#define FSL_GIANFAR_BRD_IS_REDUCED 0x00000002 /* Set if RGMII, RMII */
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index a89513188ce7..00fbd5b245c9 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -188,7 +188,7 @@ static inline void fsnotify_close(struct file *file)
188 struct dentry *dentry = file->f_path.dentry; 188 struct dentry *dentry = file->f_path.dentry;
189 struct inode *inode = dentry->d_inode; 189 struct inode *inode = dentry->d_inode;
190 const char *name = dentry->d_name.name; 190 const char *name = dentry->d_name.name;
191 mode_t mode = file->f_mode; 191 fmode_t mode = file->f_mode;
192 u32 mask = (mode & FMODE_WRITE) ? IN_CLOSE_WRITE : IN_CLOSE_NOWRITE; 192 u32 mask = (mode & FMODE_WRITE) ? IN_CLOSE_WRITE : IN_CLOSE_NOWRITE;
193 193
194 if (S_ISDIR(inode->i_mode)) 194 if (S_ISDIR(inode->i_mode))
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index bb384068272e..677432b9cb7e 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -1,10 +1,17 @@
1#ifndef _LINUX_FTRACE_H 1#ifndef _LINUX_FTRACE_H
2#define _LINUX_FTRACE_H 2#define _LINUX_FTRACE_H
3 3
4#ifdef CONFIG_FTRACE
5
6#include <linux/linkage.h> 4#include <linux/linkage.h>
7#include <linux/fs.h> 5#include <linux/fs.h>
6#include <linux/ktime.h>
7#include <linux/init.h>
8#include <linux/types.h>
9#include <linux/module.h>
10#include <linux/kallsyms.h>
11#include <linux/bitops.h>
12#include <linux/sched.h>
13
14#ifdef CONFIG_FUNCTION_TRACER
8 15
9extern int ftrace_enabled; 16extern int ftrace_enabled;
10extern int 17extern int
@@ -19,6 +26,45 @@ struct ftrace_ops {
19 struct ftrace_ops *next; 26 struct ftrace_ops *next;
20}; 27};
21 28
29extern int function_trace_stop;
30
31/*
32 * Type of the current tracing.
33 */
34enum ftrace_tracing_type_t {
35 FTRACE_TYPE_ENTER = 0, /* Hook the call of the function */
36 FTRACE_TYPE_RETURN, /* Hook the return of the function */
37};
38
39/* Current tracing type, default is FTRACE_TYPE_ENTER */
40extern enum ftrace_tracing_type_t ftrace_tracing_type;
41
42/**
43 * ftrace_stop - stop function tracer.
44 *
45 * A quick way to stop the function tracer. Note this an on off switch,
46 * it is not something that is recursive like preempt_disable.
47 * This does not disable the calling of mcount, it only stops the
48 * calling of functions from mcount.
49 */
50static inline void ftrace_stop(void)
51{
52 function_trace_stop = 1;
53}
54
55/**
56 * ftrace_start - start the function tracer.
57 *
58 * This function is the inverse of ftrace_stop. This does not enable
59 * the function tracing if the function tracer is disabled. This only
60 * sets the function tracer flag to continue calling the functions
61 * from mcount.
62 */
63static inline void ftrace_start(void)
64{
65 function_trace_stop = 0;
66}
67
22/* 68/*
23 * The ftrace_ops must be a static and should also 69 * The ftrace_ops must be a static and should also
24 * be read_mostly. These functions do modify read_mostly variables 70 * be read_mostly. These functions do modify read_mostly variables
@@ -32,15 +78,26 @@ void clear_ftrace_function(void);
32 78
33extern void ftrace_stub(unsigned long a0, unsigned long a1); 79extern void ftrace_stub(unsigned long a0, unsigned long a1);
34 80
35#else /* !CONFIG_FTRACE */ 81#else /* !CONFIG_FUNCTION_TRACER */
36# define register_ftrace_function(ops) do { } while (0) 82# define register_ftrace_function(ops) do { } while (0)
37# define unregister_ftrace_function(ops) do { } while (0) 83# define unregister_ftrace_function(ops) do { } while (0)
38# define clear_ftrace_function(ops) do { } while (0) 84# define clear_ftrace_function(ops) do { } while (0)
39#endif /* CONFIG_FTRACE */ 85static inline void ftrace_kill(void) { }
86static inline void ftrace_stop(void) { }
87static inline void ftrace_start(void) { }
88#endif /* CONFIG_FUNCTION_TRACER */
89
90#ifdef CONFIG_STACK_TRACER
91extern int stack_tracer_enabled;
92int
93stack_trace_sysctl(struct ctl_table *table, int write,
94 struct file *file, void __user *buffer, size_t *lenp,
95 loff_t *ppos);
96#endif
40 97
41#ifdef CONFIG_DYNAMIC_FTRACE 98#ifdef CONFIG_DYNAMIC_FTRACE
42# define FTRACE_HASHBITS 10 99/* asm/ftrace.h must be defined for archs supporting dynamic ftrace */
43# define FTRACE_HASHSIZE (1<<FTRACE_HASHBITS) 100#include <asm/ftrace.h>
44 101
45enum { 102enum {
46 FTRACE_FL_FREE = (1 << 0), 103 FTRACE_FL_FREE = (1 << 0),
@@ -53,9 +110,10 @@ enum {
53}; 110};
54 111
55struct dyn_ftrace { 112struct dyn_ftrace {
56 struct hlist_node node; 113 struct list_head list;
57 unsigned long ip; /* address of mcount call-site */ 114 unsigned long ip; /* address of mcount call-site */
58 unsigned long flags; 115 unsigned long flags;
116 struct dyn_arch_ftrace arch;
59}; 117};
60 118
61int ftrace_force_update(void); 119int ftrace_force_update(void);
@@ -63,47 +121,103 @@ void ftrace_set_filter(unsigned char *buf, int len, int reset);
63 121
64/* defined in arch */ 122/* defined in arch */
65extern int ftrace_ip_converted(unsigned long ip); 123extern int ftrace_ip_converted(unsigned long ip);
66extern unsigned char *ftrace_nop_replace(void);
67extern unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr);
68extern int ftrace_dyn_arch_init(void *data); 124extern int ftrace_dyn_arch_init(void *data);
69extern int ftrace_mcount_set(unsigned long *data);
70extern int ftrace_modify_code(unsigned long ip, unsigned char *old_code,
71 unsigned char *new_code);
72extern int ftrace_update_ftrace_func(ftrace_func_t func); 125extern int ftrace_update_ftrace_func(ftrace_func_t func);
73extern void ftrace_caller(void); 126extern void ftrace_caller(void);
74extern void ftrace_call(void); 127extern void ftrace_call(void);
75extern void mcount_call(void); 128extern void mcount_call(void);
129#ifdef CONFIG_FUNCTION_GRAPH_TRACER
130extern void ftrace_graph_caller(void);
131extern int ftrace_enable_ftrace_graph_caller(void);
132extern int ftrace_disable_ftrace_graph_caller(void);
133#else
134static inline int ftrace_enable_ftrace_graph_caller(void) { return 0; }
135static inline int ftrace_disable_ftrace_graph_caller(void) { return 0; }
136#endif
137
138/**
139 * ftrace_make_nop - convert code into top
140 * @mod: module structure if called by module load initialization
141 * @rec: the mcount call site record
142 * @addr: the address that the call site should be calling
143 *
144 * This is a very sensitive operation and great care needs
145 * to be taken by the arch. The operation should carefully
146 * read the location, check to see if what is read is indeed
147 * what we expect it to be, and then on success of the compare,
148 * it should write to the location.
149 *
150 * The code segment at @rec->ip should be a caller to @addr
151 *
152 * Return must be:
153 * 0 on success
154 * -EFAULT on error reading the location
155 * -EINVAL on a failed compare of the contents
156 * -EPERM on error writing to the location
157 * Any other value will be considered a failure.
158 */
159extern int ftrace_make_nop(struct module *mod,
160 struct dyn_ftrace *rec, unsigned long addr);
161
162/**
163 * ftrace_make_call - convert a nop call site into a call to addr
164 * @rec: the mcount call site record
165 * @addr: the address that the call site should call
166 *
167 * This is a very sensitive operation and great care needs
168 * to be taken by the arch. The operation should carefully
169 * read the location, check to see if what is read is indeed
170 * what we expect it to be, and then on success of the compare,
171 * it should write to the location.
172 *
173 * The code segment at @rec->ip should be a nop
174 *
175 * Return must be:
176 * 0 on success
177 * -EFAULT on error reading the location
178 * -EINVAL on a failed compare of the contents
179 * -EPERM on error writing to the location
180 * Any other value will be considered a failure.
181 */
182extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr);
183
184
185/* May be defined in arch */
186extern int ftrace_arch_read_dyn_info(char *buf, int size);
76 187
77extern int skip_trace(unsigned long ip); 188extern int skip_trace(unsigned long ip);
78 189
79void ftrace_disable_daemon(void); 190extern void ftrace_release(void *start, unsigned long size);
80void ftrace_enable_daemon(void);
81 191
192extern void ftrace_disable_daemon(void);
193extern void ftrace_enable_daemon(void);
82#else 194#else
83# define skip_trace(ip) ({ 0; }) 195# define skip_trace(ip) ({ 0; })
84# define ftrace_force_update() ({ 0; }) 196# define ftrace_force_update() ({ 0; })
85# define ftrace_set_filter(buf, len, reset) do { } while (0) 197# define ftrace_set_filter(buf, len, reset) do { } while (0)
86# define ftrace_disable_daemon() do { } while (0) 198# define ftrace_disable_daemon() do { } while (0)
87# define ftrace_enable_daemon() do { } while (0) 199# define ftrace_enable_daemon() do { } while (0)
200static inline void ftrace_release(void *start, unsigned long size) { }
88#endif /* CONFIG_DYNAMIC_FTRACE */ 201#endif /* CONFIG_DYNAMIC_FTRACE */
89 202
90/* totally disable ftrace - can not re-enable after this */ 203/* totally disable ftrace - can not re-enable after this */
91void ftrace_kill(void); 204void ftrace_kill(void);
92void ftrace_kill_atomic(void);
93 205
94static inline void tracer_disable(void) 206static inline void tracer_disable(void)
95{ 207{
96#ifdef CONFIG_FTRACE 208#ifdef CONFIG_FUNCTION_TRACER
97 ftrace_enabled = 0; 209 ftrace_enabled = 0;
98#endif 210#endif
99} 211}
100 212
101/* Ftrace disable/restore without lock. Some synchronization mechanism 213/*
214 * Ftrace disable/restore without lock. Some synchronization mechanism
102 * must be used to prevent ftrace_enabled to be changed between 215 * must be used to prevent ftrace_enabled to be changed between
103 * disable/restore. */ 216 * disable/restore.
217 */
104static inline int __ftrace_enabled_save(void) 218static inline int __ftrace_enabled_save(void)
105{ 219{
106#ifdef CONFIG_FTRACE 220#ifdef CONFIG_FUNCTION_TRACER
107 int saved_ftrace_enabled = ftrace_enabled; 221 int saved_ftrace_enabled = ftrace_enabled;
108 ftrace_enabled = 0; 222 ftrace_enabled = 0;
109 return saved_ftrace_enabled; 223 return saved_ftrace_enabled;
@@ -114,7 +228,7 @@ static inline int __ftrace_enabled_save(void)
114 228
115static inline void __ftrace_enabled_restore(int enabled) 229static inline void __ftrace_enabled_restore(int enabled)
116{ 230{
117#ifdef CONFIG_FTRACE 231#ifdef CONFIG_FUNCTION_TRACER
118 ftrace_enabled = enabled; 232 ftrace_enabled = enabled;
119#endif 233#endif
120} 234}
@@ -155,11 +269,227 @@ static inline void __ftrace_enabled_restore(int enabled)
155#endif 269#endif
156 270
157#ifdef CONFIG_TRACING 271#ifdef CONFIG_TRACING
272extern int ftrace_dump_on_oops;
273
274extern void tracing_start(void);
275extern void tracing_stop(void);
276extern void ftrace_off_permanent(void);
277
158extern void 278extern void
159ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); 279ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
280
281/**
282 * ftrace_printk - printf formatting in the ftrace buffer
283 * @fmt: the printf format for printing
284 *
285 * Note: __ftrace_printk is an internal function for ftrace_printk and
286 * the @ip is passed in via the ftrace_printk macro.
287 *
288 * This function allows a kernel developer to debug fast path sections
289 * that printk is not appropriate for. By scattering in various
290 * printk like tracing in the code, a developer can quickly see
291 * where problems are occurring.
292 *
293 * This is intended as a debugging tool for the developer only.
294 * Please refrain from leaving ftrace_printks scattered around in
295 * your code.
296 */
297# define ftrace_printk(fmt...) __ftrace_printk(_THIS_IP_, fmt)
298extern int
299__ftrace_printk(unsigned long ip, const char *fmt, ...)
300 __attribute__ ((format (printf, 2, 3)));
301extern void ftrace_dump(void);
160#else 302#else
161static inline void 303static inline void
162ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } 304ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
305static inline int
306ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
307
308static inline void tracing_start(void) { }
309static inline void tracing_stop(void) { }
310static inline void ftrace_off_permanent(void) { }
311static inline int
312ftrace_printk(const char *fmt, ...)
313{
314 return 0;
315}
316static inline void ftrace_dump(void) { }
317#endif
318
319#ifdef CONFIG_FTRACE_MCOUNT_RECORD
320extern void ftrace_init(void);
321extern void ftrace_init_module(struct module *mod,
322 unsigned long *start, unsigned long *end);
323#else
324static inline void ftrace_init(void) { }
325static inline void
326ftrace_init_module(struct module *mod,
327 unsigned long *start, unsigned long *end) { }
328#endif
329
330enum {
331 POWER_NONE = 0,
332 POWER_CSTATE = 1,
333 POWER_PSTATE = 2,
334};
335
336struct power_trace {
337#ifdef CONFIG_POWER_TRACER
338 ktime_t stamp;
339 ktime_t end;
340 int type;
341 int state;
342#endif
343};
344
345#ifdef CONFIG_POWER_TRACER
346extern void trace_power_start(struct power_trace *it, unsigned int type,
347 unsigned int state);
348extern void trace_power_mark(struct power_trace *it, unsigned int type,
349 unsigned int state);
350extern void trace_power_end(struct power_trace *it);
351#else
352static inline void trace_power_start(struct power_trace *it, unsigned int type,
353 unsigned int state) { }
354static inline void trace_power_mark(struct power_trace *it, unsigned int type,
355 unsigned int state) { }
356static inline void trace_power_end(struct power_trace *it) { }
357#endif
358
359
360/*
361 * Structure that defines an entry function trace.
362 */
363struct ftrace_graph_ent {
364 unsigned long func; /* Current function */
365 int depth;
366};
367
368/*
369 * Structure that defines a return function trace.
370 */
371struct ftrace_graph_ret {
372 unsigned long func; /* Current function */
373 unsigned long long calltime;
374 unsigned long long rettime;
375 /* Number of functions that overran the depth limit for current task */
376 unsigned long overrun;
377 int depth;
378};
379
380#ifdef CONFIG_FUNCTION_GRAPH_TRACER
381
382/*
383 * Sometimes we don't want to trace a function with the function
384 * graph tracer but we want them to keep traced by the usual function
385 * tracer if the function graph tracer is not configured.
386 */
387#define __notrace_funcgraph notrace
388
389/*
390 * We want to which function is an entrypoint of a hardirq.
391 * That will help us to put a signal on output.
392 */
393#define __irq_entry __attribute__((__section__(".irqentry.text")))
394
395/* Limits of hardirq entrypoints */
396extern char __irqentry_text_start[];
397extern char __irqentry_text_end[];
398
399#define FTRACE_RETFUNC_DEPTH 50
400#define FTRACE_RETSTACK_ALLOC_SIZE 32
401/* Type of the callback handlers for tracing function graph*/
402typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); /* return */
403typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
404
405extern int register_ftrace_graph(trace_func_graph_ret_t retfunc,
406 trace_func_graph_ent_t entryfunc);
407
408extern void ftrace_graph_stop(void);
409
410/* The current handlers in use */
411extern trace_func_graph_ret_t ftrace_graph_return;
412extern trace_func_graph_ent_t ftrace_graph_entry;
413
414extern void unregister_ftrace_graph(void);
415
416extern void ftrace_graph_init_task(struct task_struct *t);
417extern void ftrace_graph_exit_task(struct task_struct *t);
418
419static inline int task_curr_ret_stack(struct task_struct *t)
420{
421 return t->curr_ret_stack;
422}
423
424static inline void pause_graph_tracing(void)
425{
426 atomic_inc(&current->tracing_graph_pause);
427}
428
429static inline void unpause_graph_tracing(void)
430{
431 atomic_dec(&current->tracing_graph_pause);
432}
433#else
434
435#define __notrace_funcgraph
436#define __irq_entry
437
438static inline void ftrace_graph_init_task(struct task_struct *t) { }
439static inline void ftrace_graph_exit_task(struct task_struct *t) { }
440
441static inline int task_curr_ret_stack(struct task_struct *tsk)
442{
443 return -1;
444}
445
446static inline void pause_graph_tracing(void) { }
447static inline void unpause_graph_tracing(void) { }
163#endif 448#endif
164 449
450#ifdef CONFIG_TRACING
451#include <linux/sched.h>
452
453/* flags for current->trace */
454enum {
455 TSK_TRACE_FL_TRACE_BIT = 0,
456 TSK_TRACE_FL_GRAPH_BIT = 1,
457};
458enum {
459 TSK_TRACE_FL_TRACE = 1 << TSK_TRACE_FL_TRACE_BIT,
460 TSK_TRACE_FL_GRAPH = 1 << TSK_TRACE_FL_GRAPH_BIT,
461};
462
463static inline void set_tsk_trace_trace(struct task_struct *tsk)
464{
465 set_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace);
466}
467
468static inline void clear_tsk_trace_trace(struct task_struct *tsk)
469{
470 clear_bit(TSK_TRACE_FL_TRACE_BIT, &tsk->trace);
471}
472
473static inline int test_tsk_trace_trace(struct task_struct *tsk)
474{
475 return tsk->trace & TSK_TRACE_FL_TRACE;
476}
477
478static inline void set_tsk_trace_graph(struct task_struct *tsk)
479{
480 set_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace);
481}
482
483static inline void clear_tsk_trace_graph(struct task_struct *tsk)
484{
485 clear_bit(TSK_TRACE_FL_GRAPH_BIT, &tsk->trace);
486}
487
488static inline int test_tsk_trace_graph(struct task_struct *tsk)
489{
490 return tsk->trace & TSK_TRACE_FL_GRAPH;
491}
492
493#endif /* CONFIG_TRACING */
494
165#endif /* _LINUX_FTRACE_H */ 495#endif /* _LINUX_FTRACE_H */
diff --git a/include/linux/ftrace_irq.h b/include/linux/ftrace_irq.h
new file mode 100644
index 000000000000..366a054d0b05
--- /dev/null
+++ b/include/linux/ftrace_irq.h
@@ -0,0 +1,13 @@
1#ifndef _LINUX_FTRACE_IRQ_H
2#define _LINUX_FTRACE_IRQ_H
3
4
5#if defined(CONFIG_DYNAMIC_FTRACE) || defined(CONFIG_FUNCTION_GRAPH_TRACER)
6extern void ftrace_nmi_enter(void);
7extern void ftrace_nmi_exit(void);
8#else
9static inline void ftrace_nmi_enter(void) { }
10static inline void ftrace_nmi_exit(void) { }
11#endif
12
13#endif /* _LINUX_FTRACE_IRQ_H */
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 265635dc9908..350fe9767bbc 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -17,8 +17,14 @@
17 * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in 17 * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in
18 * - add blksize field to fuse_attr 18 * - add blksize field to fuse_attr
19 * - add file flags field to fuse_read_in and fuse_write_in 19 * - add file flags field to fuse_read_in and fuse_write_in
20 *
21 * 7.10
22 * - add nonseekable open flag
20 */ 23 */
21 24
25#ifndef _LINUX_FUSE_H
26#define _LINUX_FUSE_H
27
22#include <asm/types.h> 28#include <asm/types.h>
23#include <linux/major.h> 29#include <linux/major.h>
24 30
@@ -26,7 +32,7 @@
26#define FUSE_KERNEL_VERSION 7 32#define FUSE_KERNEL_VERSION 7
27 33
28/** Minor version number of this interface */ 34/** Minor version number of this interface */
29#define FUSE_KERNEL_MINOR_VERSION 9 35#define FUSE_KERNEL_MINOR_VERSION 10
30 36
31/** The node ID of the root inode */ 37/** The node ID of the root inode */
32#define FUSE_ROOT_ID 1 38#define FUSE_ROOT_ID 1
@@ -98,9 +104,11 @@ struct fuse_file_lock {
98 * 104 *
99 * FOPEN_DIRECT_IO: bypass page cache for this open file 105 * FOPEN_DIRECT_IO: bypass page cache for this open file
100 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open 106 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
107 * FOPEN_NONSEEKABLE: the file is not seekable
101 */ 108 */
102#define FOPEN_DIRECT_IO (1 << 0) 109#define FOPEN_DIRECT_IO (1 << 0)
103#define FOPEN_KEEP_CACHE (1 << 1) 110#define FOPEN_KEEP_CACHE (1 << 1)
111#define FOPEN_NONSEEKABLE (1 << 2)
104 112
105/** 113/**
106 * INIT request/reply flags 114 * INIT request/reply flags
@@ -409,3 +417,5 @@ struct fuse_dirent {
409#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) 417#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
410#define FUSE_DIRENT_SIZE(d) \ 418#define FUSE_DIRENT_SIZE(d) \
411 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 419 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
420
421#endif /* _LINUX_FUSE_H */
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 586ab56a3ec3..3bf5bb5a34f9 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -25,7 +25,8 @@ union ktime;
25#define FUTEX_WAKE_BITSET 10 25#define FUTEX_WAKE_BITSET 10
26 26
27#define FUTEX_PRIVATE_FLAG 128 27#define FUTEX_PRIVATE_FLAG 128
28#define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG 28#define FUTEX_CLOCK_REALTIME 256
29#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
29 30
30#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG) 31#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
31#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG) 32#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
@@ -164,6 +165,8 @@ union futex_key {
164 } both; 165 } both;
165}; 166};
166 167
168#define FUTEX_KEY_INIT (union futex_key) { .both = { .ptr = NULL } }
169
167#ifdef CONFIG_FUTEX 170#ifdef CONFIG_FUTEX
168extern void exit_robust_list(struct task_struct *curr); 171extern void exit_robust_list(struct task_struct *curr);
169extern void exit_pi_state_list(struct task_struct *curr); 172extern void exit_pi_state_list(struct task_struct *curr);
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index f64e29c0ef3f..0cd825f7363a 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -146,10 +146,11 @@ static inline void gameport_unpin_driver(struct gameport *gameport)
146 mutex_unlock(&gameport->drv_mutex); 146 mutex_unlock(&gameport->drv_mutex);
147} 147}
148 148
149void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); 149int __gameport_register_driver(struct gameport_driver *drv,
150static inline void gameport_register_driver(struct gameport_driver *drv) 150 struct module *owner, const char *mod_name);
151static inline int __must_check gameport_register_driver(struct gameport_driver *drv)
151{ 152{
152 __gameport_register_driver(drv, THIS_MODULE); 153 return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME);
153} 154}
154 155
155void gameport_unregister_driver(struct gameport_driver *drv); 156void gameport_unregister_driver(struct gameport_driver *drv);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 206cdf96c3a7..16948eaecae3 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -25,9 +25,6 @@ extern struct device_type part_type;
25extern struct kobject *block_depr; 25extern struct kobject *block_depr;
26extern struct class block_class; 26extern struct class block_class;
27 27
28extern const struct seq_operations partitions_op;
29extern const struct seq_operations diskstats_op;
30
31enum { 28enum {
32/* These three have identical behaviour; use the second one if DOS FDISK gets 29/* These three have identical behaviour; use the second one if DOS FDISK gets
33 confused about extended/logical partitions starting past cylinder 1023. */ 30 confused about extended/logical partitions starting past cylinder 1023. */
@@ -129,6 +126,7 @@ struct blk_scsi_cmd_filter {
129struct disk_part_tbl { 126struct disk_part_tbl {
130 struct rcu_head rcu_head; 127 struct rcu_head rcu_head;
131 int len; 128 int len;
129 struct hd_struct *last_lookup;
132 struct hd_struct *part[]; 130 struct hd_struct *part[];
133}; 131};
134 132
@@ -525,7 +523,9 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
525 523
526extern int disk_expand_part_tbl(struct gendisk *disk, int target); 524extern int disk_expand_part_tbl(struct gendisk *disk, int target);
527extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 525extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
528extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int); 526extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
527 int partno, sector_t start,
528 sector_t len, int flags);
529extern void delete_partition(struct gendisk *, int); 529extern void delete_partition(struct gendisk *, int);
530extern void printk_all_partitions(void); 530extern void printk_all_partitions(void);
531 531
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 730a20b83576..e10c49a5b96e 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -8,6 +8,7 @@
8 8
9#else 9#else
10 10
11#include <linux/kernel.h>
11#include <linux/types.h> 12#include <linux/types.h>
12#include <linux/errno.h> 13#include <linux/errno.h>
13 14
@@ -32,6 +33,8 @@ static inline int gpio_request(unsigned gpio, const char *label)
32 33
33static inline void gpio_free(unsigned gpio) 34static inline void gpio_free(unsigned gpio)
34{ 35{
36 might_sleep();
37
35 /* GPIO can never have been requested */ 38 /* GPIO can never have been requested */
36 WARN_ON(1); 39 WARN_ON(1);
37} 40}
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 181006cc94a0..f83288347dda 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -4,6 +4,7 @@
4#include <linux/preempt.h> 4#include <linux/preempt.h>
5#include <linux/smp_lock.h> 5#include <linux/smp_lock.h>
6#include <linux/lockdep.h> 6#include <linux/lockdep.h>
7#include <linux/ftrace_irq.h>
7#include <asm/hardirq.h> 8#include <asm/hardirq.h>
8#include <asm/system.h> 9#include <asm/system.h>
9 10
@@ -118,13 +119,17 @@ static inline void account_system_vtime(struct task_struct *tsk)
118} 119}
119#endif 120#endif
120 121
121#if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ) 122#if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU)
122extern void rcu_irq_enter(void); 123extern void rcu_irq_enter(void);
123extern void rcu_irq_exit(void); 124extern void rcu_irq_exit(void);
125extern void rcu_nmi_enter(void);
126extern void rcu_nmi_exit(void);
124#else 127#else
125# define rcu_irq_enter() do { } while (0) 128# define rcu_irq_enter() do { } while (0)
126# define rcu_irq_exit() do { } while (0) 129# define rcu_irq_exit() do { } while (0)
127#endif /* CONFIG_PREEMPT_RCU */ 130# define rcu_nmi_enter() do { } while (0)
131# define rcu_nmi_exit() do { } while (0)
132#endif /* #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) */
128 133
129/* 134/*
130 * It is safe to do non-atomic ops on ->hardirq_context, 135 * It is safe to do non-atomic ops on ->hardirq_context,
@@ -134,7 +139,6 @@ extern void rcu_irq_exit(void);
134 */ 139 */
135#define __irq_enter() \ 140#define __irq_enter() \
136 do { \ 141 do { \
137 rcu_irq_enter(); \
138 account_system_vtime(current); \ 142 account_system_vtime(current); \
139 add_preempt_count(HARDIRQ_OFFSET); \ 143 add_preempt_count(HARDIRQ_OFFSET); \
140 trace_hardirq_enter(); \ 144 trace_hardirq_enter(); \
@@ -153,7 +157,6 @@ extern void irq_enter(void);
153 trace_hardirq_exit(); \ 157 trace_hardirq_exit(); \
154 account_system_vtime(current); \ 158 account_system_vtime(current); \
155 sub_preempt_count(HARDIRQ_OFFSET); \ 159 sub_preempt_count(HARDIRQ_OFFSET); \
156 rcu_irq_exit(); \
157 } while (0) 160 } while (0)
158 161
159/* 162/*
@@ -161,7 +164,20 @@ extern void irq_enter(void);
161 */ 164 */
162extern void irq_exit(void); 165extern void irq_exit(void);
163 166
164#define nmi_enter() do { lockdep_off(); __irq_enter(); } while (0) 167#define nmi_enter() \
165#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) 168 do { \
169 ftrace_nmi_enter(); \
170 lockdep_off(); \
171 rcu_nmi_enter(); \
172 __irq_enter(); \
173 } while (0)
174
175#define nmi_exit() \
176 do { \
177 __irq_exit(); \
178 rcu_nmi_exit(); \
179 lockdep_on(); \
180 ftrace_nmi_exit(); \
181 } while (0)
166 182
167#endif /* LINUX_HARDIRQ_H */ 183#endif /* LINUX_HARDIRQ_H */
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
index c59769693bee..fd47a151665e 100644
--- a/include/linux/hdlc.h
+++ b/include/linux/hdlc.h
@@ -43,7 +43,7 @@ struct hdlc_proto {
43}; 43};
44 44
45 45
46/* Pointed to by dev->priv */ 46/* Pointed to by netdev_priv(dev) */
47typedef struct hdlc_device { 47typedef struct hdlc_device {
48 /* used by HDLC layer to take control over HDLC device from hw driver*/ 48 /* used by HDLC layer to take control over HDLC device from hw driver*/
49 int (*attach)(struct net_device *dev, 49 int (*attach)(struct net_device *dev,
@@ -80,7 +80,7 @@ struct net_device *alloc_hdlcdev(void *priv);
80 80
81static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev) 81static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev)
82{ 82{
83 return dev->priv; 83 return netdev_priv(dev);
84} 84}
85 85
86static __inline__ void debug_frame(const struct sk_buff *skb) 86static __inline__ void debug_frame(const struct sk_buff *skb)
diff --git a/include/linux/hid.h b/include/linux/hid.h
index f13bca2dd53b..e5780f8c934a 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -410,6 +410,7 @@ struct hid_output_fifo {
410#define HID_SUSPENDED 5 410#define HID_SUSPENDED 5
411#define HID_CLEAR_HALT 6 411#define HID_CLEAR_HALT 6
412#define HID_DISCONNECTED 7 412#define HID_DISCONNECTED 7
413#define HID_STARTED 8
413 414
414struct hid_input { 415struct hid_input {
415 struct list_head list; 416 struct list_head list;
@@ -417,6 +418,11 @@ struct hid_input {
417 struct input_dev *input; 418 struct input_dev *input;
418}; 419};
419 420
421enum hid_type {
422 HID_TYPE_OTHER = 0,
423 HID_TYPE_USBMOUSE
424};
425
420struct hid_driver; 426struct hid_driver;
421struct hid_ll_driver; 427struct hid_ll_driver;
422 428
@@ -431,6 +437,7 @@ struct hid_device { /* device report descriptor */
431 __u32 vendor; /* Vendor ID */ 437 __u32 vendor; /* Vendor ID */
432 __u32 product; /* Product ID */ 438 __u32 product; /* Product ID */
433 __u32 version; /* HID version */ 439 __u32 version; /* HID version */
440 enum hid_type type; /* device type (mouse, kbd, ...) */
434 unsigned country; /* HID country */ 441 unsigned country; /* HID country */
435 struct hid_report_enum report_enum[HID_REPORT_TYPES]; 442 struct hid_report_enum report_enum[HID_REPORT_TYPES];
436 443
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 7dcbc82f3b7b..13875ce9112a 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -63,12 +63,14 @@ static inline void *kmap_atomic(struct page *page, enum km_type idx)
63#endif /* CONFIG_HIGHMEM */ 63#endif /* CONFIG_HIGHMEM */
64 64
65/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ 65/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
66#ifndef clear_user_highpage
66static inline void clear_user_highpage(struct page *page, unsigned long vaddr) 67static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
67{ 68{
68 void *addr = kmap_atomic(page, KM_USER0); 69 void *addr = kmap_atomic(page, KM_USER0);
69 clear_user_page(addr, vaddr, page); 70 clear_user_page(addr, vaddr, page);
70 kunmap_atomic(addr, KM_USER0); 71 kunmap_atomic(addr, KM_USER0);
71} 72}
73#endif
72 74
73#ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 75#ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
74/** 76/**
diff --git a/include/linux/hippidevice.h b/include/linux/hippidevice.h
index bab303dafd6e..f148e4908410 100644
--- a/include/linux/hippidevice.h
+++ b/include/linux/hippidevice.h
@@ -32,7 +32,9 @@ struct hippi_cb {
32}; 32};
33 33
34extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev); 34extern __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev);
35 35extern int hippi_change_mtu(struct net_device *dev, int new_mtu);
36extern int hippi_mac_addr(struct net_device *dev, void *p);
37extern int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p);
36extern struct net_device *alloc_hippi_dev(int sizeof_priv); 38extern struct net_device *alloc_hippi_dev(int sizeof_priv);
37#endif 39#endif
38 40
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 2f245fe63bda..bd37078c2d7d 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -20,6 +20,8 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/wait.h> 22#include <linux/wait.h>
23#include <linux/percpu.h>
24
23 25
24struct hrtimer_clock_base; 26struct hrtimer_clock_base;
25struct hrtimer_cpu_base; 27struct hrtimer_cpu_base;
@@ -41,31 +43,6 @@ enum hrtimer_restart {
41}; 43};
42 44
43/* 45/*
44 * hrtimer callback modes:
45 *
46 * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context
47 * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context
48 * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and
49 * does not restart the timer
50 * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context
51 * Special mode for tick emulation and
52 * scheduler timer. Such timers are per
53 * cpu and not allowed to be migrated on
54 * cpu unplug.
55 * HRTIMER_CB_IRQSAFE_UNLOCKED: Callback should run in hardirq context
56 * with timer->base lock unlocked
57 * used for timers which call wakeup to
58 * avoid lock order problems with rq->lock
59 */
60enum hrtimer_cb_mode {
61 HRTIMER_CB_SOFTIRQ,
62 HRTIMER_CB_IRQSAFE,
63 HRTIMER_CB_IRQSAFE_NO_RESTART,
64 HRTIMER_CB_IRQSAFE_PERCPU,
65 HRTIMER_CB_IRQSAFE_UNLOCKED,
66};
67
68/*
69 * Values to track state of the timer 46 * Values to track state of the timer
70 * 47 *
71 * Possible states: 48 * Possible states:
@@ -73,7 +50,6 @@ enum hrtimer_cb_mode {
73 * 0x00 inactive 50 * 0x00 inactive
74 * 0x01 enqueued into rbtree 51 * 0x01 enqueued into rbtree
75 * 0x02 callback function running 52 * 0x02 callback function running
76 * 0x04 callback pending (high resolution mode)
77 * 53 *
78 * Special cases: 54 * Special cases:
79 * 0x03 callback function running and enqueued 55 * 0x03 callback function running and enqueued
@@ -95,20 +71,22 @@ enum hrtimer_cb_mode {
95#define HRTIMER_STATE_INACTIVE 0x00 71#define HRTIMER_STATE_INACTIVE 0x00
96#define HRTIMER_STATE_ENQUEUED 0x01 72#define HRTIMER_STATE_ENQUEUED 0x01
97#define HRTIMER_STATE_CALLBACK 0x02 73#define HRTIMER_STATE_CALLBACK 0x02
98#define HRTIMER_STATE_PENDING 0x04 74#define HRTIMER_STATE_MIGRATE 0x04
99#define HRTIMER_STATE_MIGRATE 0x08
100 75
101/** 76/**
102 * struct hrtimer - the basic hrtimer structure 77 * struct hrtimer - the basic hrtimer structure
103 * @node: red black tree node for time ordered insertion 78 * @node: red black tree node for time ordered insertion
104 * @expires: the absolute expiry time in the hrtimers internal 79 * @_expires: the absolute expiry time in the hrtimers internal
105 * representation. The time is related to the clock on 80 * representation. The time is related to the clock on
106 * which the timer is based. 81 * which the timer is based. Is setup by adding
82 * slack to the _softexpires value. For non range timers
83 * identical to _softexpires.
84 * @_softexpires: the absolute earliest expiry time of the hrtimer.
85 * The time which was given as expiry time when the timer
86 * was armed.
107 * @function: timer expiry callback function 87 * @function: timer expiry callback function
108 * @base: pointer to the timer base (per cpu and per clock) 88 * @base: pointer to the timer base (per cpu and per clock)
109 * @state: state information (See bit values above) 89 * @state: state information (See bit values above)
110 * @cb_mode: high resolution timer feature to select the callback execution
111 * mode
112 * @cb_entry: list head to enqueue an expired timer into the callback list 90 * @cb_entry: list head to enqueue an expired timer into the callback list
113 * @start_site: timer statistics field to store the site where the timer 91 * @start_site: timer statistics field to store the site where the timer
114 * was started 92 * was started
@@ -121,16 +99,16 @@ enum hrtimer_cb_mode {
121 */ 99 */
122struct hrtimer { 100struct hrtimer {
123 struct rb_node node; 101 struct rb_node node;
124 ktime_t expires; 102 ktime_t _expires;
103 ktime_t _softexpires;
125 enum hrtimer_restart (*function)(struct hrtimer *); 104 enum hrtimer_restart (*function)(struct hrtimer *);
126 struct hrtimer_clock_base *base; 105 struct hrtimer_clock_base *base;
127 unsigned long state; 106 unsigned long state;
128 enum hrtimer_cb_mode cb_mode;
129 struct list_head cb_entry; 107 struct list_head cb_entry;
130#ifdef CONFIG_TIMER_STATS 108#ifdef CONFIG_TIMER_STATS
109 int start_pid;
131 void *start_site; 110 void *start_site;
132 char start_comm[16]; 111 char start_comm[16];
133 int start_pid;
134#endif 112#endif
135}; 113};
136 114
@@ -155,10 +133,8 @@ struct hrtimer_sleeper {
155 * @first: pointer to the timer node which expires first 133 * @first: pointer to the timer node which expires first
156 * @resolution: the resolution of the clock, in nanoseconds 134 * @resolution: the resolution of the clock, in nanoseconds
157 * @get_time: function to retrieve the current time of the clock 135 * @get_time: function to retrieve the current time of the clock
158 * @get_softirq_time: function to retrieve the current time from the softirq
159 * @softirq_time: the time when running the hrtimer queue in the softirq 136 * @softirq_time: the time when running the hrtimer queue in the softirq
160 * @offset: offset of this clock to the monotonic base 137 * @offset: offset of this clock to the monotonic base
161 * @reprogram: function to reprogram the timer event
162 */ 138 */
163struct hrtimer_clock_base { 139struct hrtimer_clock_base {
164 struct hrtimer_cpu_base *cpu_base; 140 struct hrtimer_cpu_base *cpu_base;
@@ -167,13 +143,9 @@ struct hrtimer_clock_base {
167 struct rb_node *first; 143 struct rb_node *first;
168 ktime_t resolution; 144 ktime_t resolution;
169 ktime_t (*get_time)(void); 145 ktime_t (*get_time)(void);
170 ktime_t (*get_softirq_time)(void);
171 ktime_t softirq_time; 146 ktime_t softirq_time;
172#ifdef CONFIG_HIGH_RES_TIMERS 147#ifdef CONFIG_HIGH_RES_TIMERS
173 ktime_t offset; 148 ktime_t offset;
174 int (*reprogram)(struct hrtimer *t,
175 struct hrtimer_clock_base *b,
176 ktime_t n);
177#endif 149#endif
178}; 150};
179 151
@@ -191,15 +163,11 @@ struct hrtimer_clock_base {
191 * @check_clocks: Indictator, when set evaluate time source and clock 163 * @check_clocks: Indictator, when set evaluate time source and clock
192 * event devices whether high resolution mode can be 164 * event devices whether high resolution mode can be
193 * activated. 165 * activated.
194 * @cb_pending: Expired timers are moved from the rbtree to this
195 * list in the timer interrupt. The list is processed
196 * in the softirq.
197 * @nr_events: Total number of timer interrupt events 166 * @nr_events: Total number of timer interrupt events
198 */ 167 */
199struct hrtimer_cpu_base { 168struct hrtimer_cpu_base {
200 spinlock_t lock; 169 spinlock_t lock;
201 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; 170 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
202 struct list_head cb_pending;
203#ifdef CONFIG_HIGH_RES_TIMERS 171#ifdef CONFIG_HIGH_RES_TIMERS
204 ktime_t expires_next; 172 ktime_t expires_next;
205 int hres_active; 173 int hres_active;
@@ -207,6 +175,71 @@ struct hrtimer_cpu_base {
207#endif 175#endif
208}; 176};
209 177
178static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
179{
180 timer->_expires = time;
181 timer->_softexpires = time;
182}
183
184static inline void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta)
185{
186 timer->_softexpires = time;
187 timer->_expires = ktime_add_safe(time, delta);
188}
189
190static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta)
191{
192 timer->_softexpires = time;
193 timer->_expires = ktime_add_safe(time, ns_to_ktime(delta));
194}
195
196static inline void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64)
197{
198 timer->_expires.tv64 = tv64;
199 timer->_softexpires.tv64 = tv64;
200}
201
202static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time)
203{
204 timer->_expires = ktime_add_safe(timer->_expires, time);
205 timer->_softexpires = ktime_add_safe(timer->_softexpires, time);
206}
207
208static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns)
209{
210 timer->_expires = ktime_add_ns(timer->_expires, ns);
211 timer->_softexpires = ktime_add_ns(timer->_softexpires, ns);
212}
213
214static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer)
215{
216 return timer->_expires;
217}
218
219static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer)
220{
221 return timer->_softexpires;
222}
223
224static inline s64 hrtimer_get_expires_tv64(const struct hrtimer *timer)
225{
226 return timer->_expires.tv64;
227}
228static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer)
229{
230 return timer->_softexpires.tv64;
231}
232
233static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer)
234{
235 return ktime_to_ns(timer->_expires);
236}
237
238static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer)
239{
240 return ktime_sub(timer->_expires, timer->base->get_time());
241}
242
210#ifdef CONFIG_HIGH_RES_TIMERS 243#ifdef CONFIG_HIGH_RES_TIMERS
211struct clock_event_device; 244struct clock_event_device;
212 245
@@ -227,6 +260,8 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer)
227 return timer->base->cpu_base->hres_active; 260 return timer->base->cpu_base->hres_active;
228} 261}
229 262
263extern void hrtimer_peek_ahead_timers(void);
264
230/* 265/*
231 * The resolution of the clocks. The resolution value is returned in 266 * The resolution of the clocks. The resolution value is returned in
232 * the clock_getres() system call to give application programmers an 267 * the clock_getres() system call to give application programmers an
@@ -249,6 +284,7 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer)
249 * is expired in the next softirq when the clock was advanced. 284 * is expired in the next softirq when the clock was advanced.
250 */ 285 */
251static inline void clock_was_set(void) { } 286static inline void clock_was_set(void) { }
287static inline void hrtimer_peek_ahead_timers(void) { }
252 288
253static inline void hres_timers_resume(void) { } 289static inline void hres_timers_resume(void) { }
254 290
@@ -270,6 +306,10 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer)
270extern ktime_t ktime_get(void); 306extern ktime_t ktime_get(void);
271extern ktime_t ktime_get_real(void); 307extern ktime_t ktime_get_real(void);
272 308
309
310DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
311
312
273/* Exported timer functions: */ 313/* Exported timer functions: */
274 314
275/* Initialize timers: */ 315/* Initialize timers: */
@@ -294,12 +334,25 @@ static inline void destroy_hrtimer_on_stack(struct hrtimer *timer) { }
294/* Basic timer operations: */ 334/* Basic timer operations: */
295extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, 335extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
296 const enum hrtimer_mode mode); 336 const enum hrtimer_mode mode);
337extern int hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
338 unsigned long range_ns, const enum hrtimer_mode mode);
297extern int hrtimer_cancel(struct hrtimer *timer); 339extern int hrtimer_cancel(struct hrtimer *timer);
298extern int hrtimer_try_to_cancel(struct hrtimer *timer); 340extern int hrtimer_try_to_cancel(struct hrtimer *timer);
299 341
342static inline int hrtimer_start_expires(struct hrtimer *timer,
343 enum hrtimer_mode mode)
344{
345 unsigned long delta;
346 ktime_t soft, hard;
347 soft = hrtimer_get_softexpires(timer);
348 hard = hrtimer_get_expires(timer);
349 delta = ktime_to_ns(ktime_sub(hard, soft));
350 return hrtimer_start_range_ns(timer, soft, delta, mode);
351}
352
300static inline int hrtimer_restart(struct hrtimer *timer) 353static inline int hrtimer_restart(struct hrtimer *timer)
301{ 354{
302 return hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS); 355 return hrtimer_start_expires(timer, HRTIMER_MODE_ABS);
303} 356}
304 357
305/* Query timers: */ 358/* Query timers: */
@@ -322,8 +375,7 @@ static inline int hrtimer_active(const struct hrtimer *timer)
322 */ 375 */
323static inline int hrtimer_is_queued(struct hrtimer *timer) 376static inline int hrtimer_is_queued(struct hrtimer *timer)
324{ 377{
325 return timer->state & 378 return timer->state & HRTIMER_STATE_ENQUEUED;
326 (HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING);
327} 379}
328 380
329/* 381/*
@@ -356,6 +408,10 @@ extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
356extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, 408extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
357 struct task_struct *tsk); 409 struct task_struct *tsk);
358 410
411extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta,
412 const enum hrtimer_mode mode);
413extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode);
414
359/* Soft interrupt function to run the hrtimer queues: */ 415/* Soft interrupt function to run the hrtimer queues: */
360extern void hrtimer_run_queues(void); 416extern void hrtimer_run_queues(void);
361extern void hrtimer_run_pending(void); 417extern void hrtimer_run_pending(void);
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 32e0ef0f6e1f..e1c8afc002c0 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -27,7 +27,7 @@ void unmap_hugepage_range(struct vm_area_struct *,
27void __unmap_hugepage_range(struct vm_area_struct *, 27void __unmap_hugepage_range(struct vm_area_struct *,
28 unsigned long, unsigned long, struct page *); 28 unsigned long, unsigned long, struct page *);
29int hugetlb_prefault(struct address_space *, struct vm_area_struct *); 29int hugetlb_prefault(struct address_space *, struct vm_area_struct *);
30int hugetlb_report_meminfo(char *); 30void hugetlb_report_meminfo(struct seq_file *);
31int hugetlb_report_node_meminfo(int, char *); 31int hugetlb_report_node_meminfo(int, char *);
32unsigned long hugetlb_total_pages(void); 32unsigned long hugetlb_total_pages(void);
33int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, 33int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -79,7 +79,9 @@ static inline unsigned long hugetlb_total_pages(void)
79#define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) 79#define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; })
80#define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) 80#define hugetlb_prefault(mapping, vma) ({ BUG(); 0; })
81#define unmap_hugepage_range(vma, start, end, page) BUG() 81#define unmap_hugepage_range(vma, start, end, page) BUG()
82#define hugetlb_report_meminfo(buf) 0 82static inline void hugetlb_report_meminfo(struct seq_file *m)
83{
84}
83#define hugetlb_report_node_meminfo(n, buf) 0 85#define hugetlb_report_node_meminfo(n, buf) 0
84#define follow_huge_pmd(mm, addr, pmd, write) NULL 86#define follow_huge_pmd(mm, addr, pmd, write) NULL
85#define follow_huge_pud(mm, addr, pud, write) NULL 87#define follow_huge_pud(mm, addr, pud, write) NULL
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h
index 0177d280f733..0f91a957a690 100644
--- a/include/linux/i2c-algo-pcf.h
+++ b/include/linux/i2c-algo-pcf.h
@@ -31,7 +31,10 @@ struct i2c_algo_pcf_data {
31 int (*getpcf) (void *data, int ctl); 31 int (*getpcf) (void *data, int ctl);
32 int (*getown) (void *data); 32 int (*getown) (void *data);
33 int (*getclock) (void *data); 33 int (*getclock) (void *data);
34 void (*waitforpin) (void); 34 void (*waitforpin) (void *data);
35
36 void (*xfer_begin) (void *data);
37 void (*xfer_end) (void *data);
35 38
36 /* Multi-master lost arbitration back-off delay (msecs) 39 /* Multi-master lost arbitration back-off delay (msecs)
37 * This should be set by the bus adapter or knowledgable client 40 * This should be set by the bus adapter or knowledgable client
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 493435bcdbe5..01d67ba9e985 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -60,7 +60,7 @@
60#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ 60#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */
61#define I2C_DRIVERID_CS53L32A 70 /* cs53l32a audio processor */ 61#define I2C_DRIVERID_CS53L32A 70 /* cs53l32a audio processor */
62#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ 62#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */
63#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ 63#define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */
64#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ 64#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
65#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ 65#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
66#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ 66#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 06115128047f..33a5992d4936 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -53,45 +53,44 @@ struct i2c_board_info;
53 * transmit one message at a time, a more complex version can be used to 53 * transmit one message at a time, a more complex version can be used to
54 * transmit an arbitrary number of messages without interruption. 54 * transmit an arbitrary number of messages without interruption.
55 */ 55 */
56extern int i2c_master_send(struct i2c_client *,const char* ,int); 56extern int i2c_master_send(struct i2c_client *client, const char *buf,
57extern int i2c_master_recv(struct i2c_client *,char* ,int); 57 int count);
58extern int i2c_master_recv(struct i2c_client *client, char *buf, int count);
58 59
59/* Transfer num messages. 60/* Transfer num messages.
60 */ 61 */
61extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); 62extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
62 63 int num);
63 64
64/* This is the very generalized SMBus access routine. You probably do not 65/* This is the very generalized SMBus access routine. You probably do not
65 want to use this, though; one of the functions below may be much easier, 66 want to use this, though; one of the functions below may be much easier,
66 and probably just as fast. 67 and probably just as fast.
67 Note that we use i2c_adapter here, because you do not need a specific 68 Note that we use i2c_adapter here, because you do not need a specific
68 smbus adapter to call this function. */ 69 smbus adapter to call this function. */
69extern s32 i2c_smbus_xfer (struct i2c_adapter * adapter, u16 addr, 70extern s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
70 unsigned short flags, 71 unsigned short flags, char read_write, u8 command,
71 char read_write, u8 command, int size, 72 int size, union i2c_smbus_data *data);
72 union i2c_smbus_data * data);
73 73
74/* Now follow the 'nice' access routines. These also document the calling 74/* Now follow the 'nice' access routines. These also document the calling
75 conventions of i2c_smbus_xfer. */ 75 conventions of i2c_smbus_xfer. */
76 76
77extern s32 i2c_smbus_read_byte(struct i2c_client * client); 77extern s32 i2c_smbus_read_byte(struct i2c_client *client);
78extern s32 i2c_smbus_write_byte(struct i2c_client * client, u8 value); 78extern s32 i2c_smbus_write_byte(struct i2c_client *client, u8 value);
79extern s32 i2c_smbus_read_byte_data(struct i2c_client * client, u8 command); 79extern s32 i2c_smbus_read_byte_data(struct i2c_client *client, u8 command);
80extern s32 i2c_smbus_write_byte_data(struct i2c_client * client, 80extern s32 i2c_smbus_write_byte_data(struct i2c_client *client,
81 u8 command, u8 value); 81 u8 command, u8 value);
82extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command); 82extern s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command);
83extern s32 i2c_smbus_write_word_data(struct i2c_client * client, 83extern s32 i2c_smbus_write_word_data(struct i2c_client *client,
84 u8 command, u16 value); 84 u8 command, u16 value);
85/* Returns the number of read bytes */ 85/* Returns the number of read bytes */
86extern s32 i2c_smbus_read_block_data(struct i2c_client *client, 86extern s32 i2c_smbus_read_block_data(struct i2c_client *client,
87 u8 command, u8 *values); 87 u8 command, u8 *values);
88extern s32 i2c_smbus_write_block_data(struct i2c_client * client, 88extern s32 i2c_smbus_write_block_data(struct i2c_client *client,
89 u8 command, u8 length, 89 u8 command, u8 length, const u8 *values);
90 const u8 *values);
91/* Returns the number of read bytes */ 90/* Returns the number of read bytes */
92extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, 91extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client,
93 u8 command, u8 length, u8 *values); 92 u8 command, u8 length, u8 *values);
94extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, 93extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client,
95 u8 command, u8 length, 94 u8 command, u8 length,
96 const u8 *values); 95 const u8 *values);
97 96
@@ -169,7 +168,7 @@ struct i2c_driver {
169 /* a ioctl like command that can be used to perform specific functions 168 /* a ioctl like command that can be used to perform specific functions
170 * with the device. 169 * with the device.
171 */ 170 */
172 int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); 171 int (*command)(struct i2c_client *client, unsigned int cmd, void *arg);
173 172
174 struct device_driver driver; 173 struct device_driver driver;
175 const struct i2c_device_id *id_table; 174 const struct i2c_device_id *id_table;
@@ -224,14 +223,14 @@ static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
224 return to_i2c_client(dev); 223 return to_i2c_client(dev);
225} 224}
226 225
227static inline void *i2c_get_clientdata (struct i2c_client *dev) 226static inline void *i2c_get_clientdata(const struct i2c_client *dev)
228{ 227{
229 return dev_get_drvdata (&dev->dev); 228 return dev_get_drvdata(&dev->dev);
230} 229}
231 230
232static inline void i2c_set_clientdata (struct i2c_client *dev, void *data) 231static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
233{ 232{
234 dev_set_drvdata (&dev->dev, data); 233 dev_set_drvdata(&dev->dev, data);
235} 234}
236 235
237/** 236/**
@@ -240,6 +239,7 @@ static inline void i2c_set_clientdata (struct i2c_client *dev, void *data)
240 * @flags: to initialize i2c_client.flags 239 * @flags: to initialize i2c_client.flags
241 * @addr: stored in i2c_client.addr 240 * @addr: stored in i2c_client.addr
242 * @platform_data: stored in i2c_client.dev.platform_data 241 * @platform_data: stored in i2c_client.dev.platform_data
242 * @archdata: copied into i2c_client.dev.archdata
243 * @irq: stored in i2c_client.irq 243 * @irq: stored in i2c_client.irq
244 * 244 *
245 * I2C doesn't actually support hardware probing, although controllers and 245 * I2C doesn't actually support hardware probing, although controllers and
@@ -259,6 +259,7 @@ struct i2c_board_info {
259 unsigned short flags; 259 unsigned short flags;
260 unsigned short addr; 260 unsigned short addr;
261 void *platform_data; 261 void *platform_data;
262 struct dev_archdata *archdata;
262 int irq; 263 int irq;
263}; 264};
264 265
@@ -272,7 +273,7 @@ struct i2c_board_info {
272 * fields (such as associated irq, or device-specific platform_data) 273 * fields (such as associated irq, or device-specific platform_data)
273 * are provided using conventional syntax. 274 * are provided using conventional syntax.
274 */ 275 */
275#define I2C_BOARD_INFO(dev_type,dev_addr) \ 276#define I2C_BOARD_INFO(dev_type, dev_addr) \
276 .type = (dev_type), .addr = (dev_addr) 277 .type = (dev_type), .addr = (dev_addr)
277 278
278 279
@@ -306,10 +307,12 @@ extern void i2c_unregister_device(struct i2c_client *);
306 */ 307 */
307#ifdef CONFIG_I2C_BOARDINFO 308#ifdef CONFIG_I2C_BOARDINFO
308extern int 309extern int
309i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n); 310i2c_register_board_info(int busnum, struct i2c_board_info const *info,
311 unsigned n);
310#else 312#else
311static inline int 313static inline int
312i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned n) 314i2c_register_board_info(int busnum, struct i2c_board_info const *info,
315 unsigned n)
313{ 316{
314 return 0; 317 return 0;
315} 318}
@@ -328,11 +331,11 @@ struct i2c_algorithm {
328 using common I2C messages */ 331 using common I2C messages */
329 /* master_xfer should return the number of messages successfully 332 /* master_xfer should return the number of messages successfully
330 processed, or a negative value on error */ 333 processed, or a negative value on error */
331 int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, 334 int (*master_xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs,
332 int num); 335 int num);
333 int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, 336 int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
334 unsigned short flags, char read_write, 337 unsigned short flags, char read_write,
335 u8 command, int size, union i2c_smbus_data * data); 338 u8 command, int size, union i2c_smbus_data *data);
336 339
337 /* To determine what the adapter supports */ 340 /* To determine what the adapter supports */
338 u32 (*functionality) (struct i2c_adapter *); 341 u32 (*functionality) (struct i2c_adapter *);
@@ -345,7 +348,7 @@ struct i2c_algorithm {
345struct i2c_adapter { 348struct i2c_adapter {
346 struct module *owner; 349 struct module *owner;
347 unsigned int id; 350 unsigned int id;
348 unsigned int class; 351 unsigned int class; /* classes to allow probing for */
349 const struct i2c_algorithm *algo; /* the algorithm to access the bus */ 352 const struct i2c_algorithm *algo; /* the algorithm to access the bus */
350 void *algo_data; 353 void *algo_data;
351 354
@@ -369,14 +372,14 @@ struct i2c_adapter {
369}; 372};
370#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) 373#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
371 374
372static inline void *i2c_get_adapdata (struct i2c_adapter *dev) 375static inline void *i2c_get_adapdata(const struct i2c_adapter *dev)
373{ 376{
374 return dev_get_drvdata (&dev->dev); 377 return dev_get_drvdata(&dev->dev);
375} 378}
376 379
377static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) 380static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
378{ 381{
379 dev_set_drvdata (&dev->dev, data); 382 dev_set_drvdata(&dev->dev, data);
380} 383}
381 384
382/*flags for the client struct: */ 385/*flags for the client struct: */
@@ -449,7 +452,7 @@ extern int i2c_probe(struct i2c_adapter *adapter,
449 const struct i2c_client_address_data *address_data, 452 const struct i2c_client_address_data *address_data,
450 int (*found_proc) (struct i2c_adapter *, int, int)); 453 int (*found_proc) (struct i2c_adapter *, int, int));
451 454
452extern struct i2c_adapter* i2c_get_adapter(int id); 455extern struct i2c_adapter *i2c_get_adapter(int id);
453extern void i2c_put_adapter(struct i2c_adapter *adap); 456extern void i2c_put_adapter(struct i2c_adapter *adap);
454 457
455 458
@@ -465,7 +468,7 @@ static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func)
465 return (func & i2c_get_functionality(adap)) == func; 468 return (func & i2c_get_functionality(adap)) == func;
466} 469}
467 470
468/* Return id number for a specific adapter */ 471/* Return the adapter number for a specific adapter */
469static inline int i2c_adapter_id(struct i2c_adapter *adap) 472static inline int i2c_adapter_id(struct i2c_adapter *adap)
470{ 473{
471 return adap->nr; 474 return adap->nr;
@@ -526,7 +529,7 @@ struct i2c_msg {
526 529
527#define I2C_FUNC_I2C 0x00000001 530#define I2C_FUNC_I2C 0x00000001
528#define I2C_FUNC_10BIT_ADDR 0x00000002 531#define I2C_FUNC_10BIT_ADDR 0x00000002
529#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ 532#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_NOSTART etc. */
530#define I2C_FUNC_SMBUS_PEC 0x00000008 533#define I2C_FUNC_SMBUS_PEC 0x00000008
531#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */ 534#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
532#define I2C_FUNC_SMBUS_QUICK 0x00010000 535#define I2C_FUNC_SMBUS_QUICK 0x00010000
@@ -541,30 +544,26 @@ struct i2c_msg {
541#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 544#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
542#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */ 545#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */
543#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ 546#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
544#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */ 547
545#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */ 548#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
546 549 I2C_FUNC_SMBUS_WRITE_BYTE)
547#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \ 550#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
548 I2C_FUNC_SMBUS_WRITE_BYTE) 551 I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
549#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \ 552#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
550 I2C_FUNC_SMBUS_WRITE_BYTE_DATA) 553 I2C_FUNC_SMBUS_WRITE_WORD_DATA)
551#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \ 554#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
552 I2C_FUNC_SMBUS_WRITE_WORD_DATA) 555 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
553#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \ 556#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
554 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) 557 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
555#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \ 558
556 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) 559#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
557#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ 560 I2C_FUNC_SMBUS_BYTE | \
558 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) 561 I2C_FUNC_SMBUS_BYTE_DATA | \
559 562 I2C_FUNC_SMBUS_WORD_DATA | \
560#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \ 563 I2C_FUNC_SMBUS_PROC_CALL | \
561 I2C_FUNC_SMBUS_BYTE | \ 564 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
562 I2C_FUNC_SMBUS_BYTE_DATA | \ 565 I2C_FUNC_SMBUS_I2C_BLOCK | \
563 I2C_FUNC_SMBUS_WORD_DATA | \ 566 I2C_FUNC_SMBUS_PEC)
564 I2C_FUNC_SMBUS_PROC_CALL | \
565 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
566 I2C_FUNC_SMBUS_I2C_BLOCK | \
567 I2C_FUNC_SMBUS_PEC)
568 567
569/* 568/*
570 * Data for SMBus Messages 569 * Data for SMBus Messages
@@ -574,7 +573,7 @@ union i2c_smbus_data {
574 __u8 byte; 573 __u8 byte;
575 __u16 word; 574 __u16 word;
576 __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */ 575 __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */
577 /* and one more for user-space compatibility */ 576 /* and one more for user-space compatibility */
578}; 577};
579 578
580/* i2c_smbus_xfer read or write markers */ 579/* i2c_smbus_xfer read or write markers */
@@ -602,21 +601,21 @@ union i2c_smbus_data {
602 601
603/* Default fill of many variables */ 602/* Default fill of many variables */
604#define I2C_CLIENT_DEFAULTS {I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 603#define I2C_CLIENT_DEFAULTS {I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
605 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 604 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
606 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 605 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
607 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 606 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
608 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 607 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
609 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 608 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
610 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 609 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
611 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 610 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
612 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 611 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
613 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 612 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
614 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 613 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
615 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 614 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
616 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 615 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
617 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 616 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
618 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \ 617 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
619 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END} 618 I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END}
620 619
621/* I2C_CLIENT_MODULE_PARM creates a module parameter, and puts it in the 620/* I2C_CLIENT_MODULE_PARM creates a module parameter, and puts it in the
622 module header */ 621 module header */
@@ -625,7 +624,7 @@ union i2c_smbus_data {
625 static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \ 624 static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \
626 static unsigned int var##_num; \ 625 static unsigned int var##_num; \
627 module_param_array(var, short, &var##_num, 0); \ 626 module_param_array(var, short, &var##_num, 0); \
628 MODULE_PARM_DESC(var,desc) 627 MODULE_PARM_DESC(var, desc)
629 628
630#define I2C_CLIENT_MODULE_PARM_FORCE(name) \ 629#define I2C_CLIENT_MODULE_PARM_FORCE(name) \
631I2C_CLIENT_MODULE_PARM(force_##name, \ 630I2C_CLIENT_MODULE_PARM(force_##name, \
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
new file mode 100644
index 000000000000..fb604dcd38f1
--- /dev/null
+++ b/include/linux/i2c/twl4030.h
@@ -0,0 +1,343 @@
1/*
2 * twl4030.h - header for TWL4030 PM and audio CODEC device
3 *
4 * Copyright (C) 2005-2006 Texas Instruments, Inc.
5 *
6 * Based on tlv320aic23.c:
7 * Copyright (c) by Kai Svahn <kai.svahn@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifndef __TWL4030_H_
26#define __TWL4030_H_
27
28/*
29 * Using the twl4030 core we address registers using a pair
30 * { module id, relative register offset }
31 * which that core then maps to the relevant
32 * { i2c slave, absolute register address }
33 *
34 * The module IDs are meaningful only to the twl4030 core code,
35 * which uses them as array indices to look up the first register
36 * address each module uses within a given i2c slave.
37 */
38
39/* Slave 0 (i2c address 0x48) */
40#define TWL4030_MODULE_USB 0x00
41
42/* Slave 1 (i2c address 0x49) */
43#define TWL4030_MODULE_AUDIO_VOICE 0x01
44#define TWL4030_MODULE_GPIO 0x02
45#define TWL4030_MODULE_INTBR 0x03
46#define TWL4030_MODULE_PIH 0x04
47#define TWL4030_MODULE_TEST 0x05
48
49/* Slave 2 (i2c address 0x4a) */
50#define TWL4030_MODULE_KEYPAD 0x06
51#define TWL4030_MODULE_MADC 0x07
52#define TWL4030_MODULE_INTERRUPTS 0x08
53#define TWL4030_MODULE_LED 0x09
54#define TWL4030_MODULE_MAIN_CHARGE 0x0A
55#define TWL4030_MODULE_PRECHARGE 0x0B
56#define TWL4030_MODULE_PWM0 0x0C
57#define TWL4030_MODULE_PWM1 0x0D
58#define TWL4030_MODULE_PWMA 0x0E
59#define TWL4030_MODULE_PWMB 0x0F
60
61/* Slave 3 (i2c address 0x4b) */
62#define TWL4030_MODULE_BACKUP 0x10
63#define TWL4030_MODULE_INT 0x11
64#define TWL4030_MODULE_PM_MASTER 0x12
65#define TWL4030_MODULE_PM_RECEIVER 0x13
66#define TWL4030_MODULE_RTC 0x14
67#define TWL4030_MODULE_SECURED_REG 0x15
68
69/*
70 * Read and write single 8-bit registers
71 */
72int twl4030_i2c_write_u8(u8 mod_no, u8 val, u8 reg);
73int twl4030_i2c_read_u8(u8 mod_no, u8 *val, u8 reg);
74
75/*
76 * Read and write several 8-bit registers at once.
77 *
78 * IMPORTANT: For twl4030_i2c_write(), allocate num_bytes + 1
79 * for the value, and populate your data starting at offset 1.
80 */
81int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, u8 num_bytes);
82int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, u8 num_bytes);
83
84/*----------------------------------------------------------------------*/
85
86/*
87 * NOTE: at up to 1024 registers, this is a big chip.
88 *
89 * Avoid putting register declarations in this file, instead of into
90 * a driver-private file, unless some of the registers in a block
91 * need to be shared with other drivers. One example is blocks that
92 * have Secondary IRQ Handler (SIH) registers.
93 */
94
95#define TWL4030_SIH_CTRL_EXCLEN_MASK BIT(0)
96#define TWL4030_SIH_CTRL_PENDDIS_MASK BIT(1)
97#define TWL4030_SIH_CTRL_COR_MASK BIT(2)
98
99/*----------------------------------------------------------------------*/
100
101/*
102 * GPIO Block Register offsets (use TWL4030_MODULE_GPIO)
103 */
104
105#define REG_GPIODATAIN1 0x0
106#define REG_GPIODATAIN2 0x1
107#define REG_GPIODATAIN3 0x2
108#define REG_GPIODATADIR1 0x3
109#define REG_GPIODATADIR2 0x4
110#define REG_GPIODATADIR3 0x5
111#define REG_GPIODATAOUT1 0x6
112#define REG_GPIODATAOUT2 0x7
113#define REG_GPIODATAOUT3 0x8
114#define REG_CLEARGPIODATAOUT1 0x9
115#define REG_CLEARGPIODATAOUT2 0xA
116#define REG_CLEARGPIODATAOUT3 0xB
117#define REG_SETGPIODATAOUT1 0xC
118#define REG_SETGPIODATAOUT2 0xD
119#define REG_SETGPIODATAOUT3 0xE
120#define REG_GPIO_DEBEN1 0xF
121#define REG_GPIO_DEBEN2 0x10
122#define REG_GPIO_DEBEN3 0x11
123#define REG_GPIO_CTRL 0x12
124#define REG_GPIOPUPDCTR1 0x13
125#define REG_GPIOPUPDCTR2 0x14
126#define REG_GPIOPUPDCTR3 0x15
127#define REG_GPIOPUPDCTR4 0x16
128#define REG_GPIOPUPDCTR5 0x17
129#define REG_GPIO_ISR1A 0x19
130#define REG_GPIO_ISR2A 0x1A
131#define REG_GPIO_ISR3A 0x1B
132#define REG_GPIO_IMR1A 0x1C
133#define REG_GPIO_IMR2A 0x1D
134#define REG_GPIO_IMR3A 0x1E
135#define REG_GPIO_ISR1B 0x1F
136#define REG_GPIO_ISR2B 0x20
137#define REG_GPIO_ISR3B 0x21
138#define REG_GPIO_IMR1B 0x22
139#define REG_GPIO_IMR2B 0x23
140#define REG_GPIO_IMR3B 0x24
141#define REG_GPIO_EDR1 0x28
142#define REG_GPIO_EDR2 0x29
143#define REG_GPIO_EDR3 0x2A
144#define REG_GPIO_EDR4 0x2B
145#define REG_GPIO_EDR5 0x2C
146#define REG_GPIO_SIH_CTRL 0x2D
147
148/* Up to 18 signals are available as GPIOs, when their
149 * pins are not assigned to another use (such as ULPI/USB).
150 */
151#define TWL4030_GPIO_MAX 18
152
153/*----------------------------------------------------------------------*/
154
155/*
156 * Keypad register offsets (use TWL4030_MODULE_KEYPAD)
157 * ... SIH/interrupt only
158 */
159
160#define TWL4030_KEYPAD_KEYP_ISR1 0x11
161#define TWL4030_KEYPAD_KEYP_IMR1 0x12
162#define TWL4030_KEYPAD_KEYP_ISR2 0x13
163#define TWL4030_KEYPAD_KEYP_IMR2 0x14
164#define TWL4030_KEYPAD_KEYP_SIR 0x15 /* test register */
165#define TWL4030_KEYPAD_KEYP_EDR 0x16
166#define TWL4030_KEYPAD_KEYP_SIH_CTRL 0x17
167
168/*----------------------------------------------------------------------*/
169
170/*
171 * Multichannel ADC register offsets (use TWL4030_MODULE_MADC)
172 * ... SIH/interrupt only
173 */
174
175#define TWL4030_MADC_ISR1 0x61
176#define TWL4030_MADC_IMR1 0x62
177#define TWL4030_MADC_ISR2 0x63
178#define TWL4030_MADC_IMR2 0x64
179#define TWL4030_MADC_SIR 0x65 /* test register */
180#define TWL4030_MADC_EDR 0x66
181#define TWL4030_MADC_SIH_CTRL 0x67
182
183/*----------------------------------------------------------------------*/
184
185/*
186 * Battery charger register offsets (use TWL4030_MODULE_INTERRUPTS)
187 */
188
189#define TWL4030_INTERRUPTS_BCIISR1A 0x0
190#define TWL4030_INTERRUPTS_BCIISR2A 0x1
191#define TWL4030_INTERRUPTS_BCIIMR1A 0x2
192#define TWL4030_INTERRUPTS_BCIIMR2A 0x3
193#define TWL4030_INTERRUPTS_BCIISR1B 0x4
194#define TWL4030_INTERRUPTS_BCIISR2B 0x5
195#define TWL4030_INTERRUPTS_BCIIMR1B 0x6
196#define TWL4030_INTERRUPTS_BCIIMR2B 0x7
197#define TWL4030_INTERRUPTS_BCISIR1 0x8 /* test register */
198#define TWL4030_INTERRUPTS_BCISIR2 0x9 /* test register */
199#define TWL4030_INTERRUPTS_BCIEDR1 0xa
200#define TWL4030_INTERRUPTS_BCIEDR2 0xb
201#define TWL4030_INTERRUPTS_BCIEDR3 0xc
202#define TWL4030_INTERRUPTS_BCISIHCTRL 0xd
203
204/*----------------------------------------------------------------------*/
205
206/*
207 * Power Interrupt block register offsets (use TWL4030_MODULE_INT)
208 */
209
210#define TWL4030_INT_PWR_ISR1 0x0
211#define TWL4030_INT_PWR_IMR1 0x1
212#define TWL4030_INT_PWR_ISR2 0x2
213#define TWL4030_INT_PWR_IMR2 0x3
214#define TWL4030_INT_PWR_SIR 0x4 /* test register */
215#define TWL4030_INT_PWR_EDR1 0x5
216#define TWL4030_INT_PWR_EDR2 0x6
217#define TWL4030_INT_PWR_SIH_CTRL 0x7
218
219/*----------------------------------------------------------------------*/
220
221struct twl4030_bci_platform_data {
222 int *battery_tmp_tbl;
223 unsigned int tblsize;
224};
225
226/* TWL4030_GPIO_MAX (18) GPIOs, with interrupts */
227struct twl4030_gpio_platform_data {
228 int gpio_base;
229 unsigned irq_base, irq_end;
230
231 /* package the two LED signals as output-only GPIOs? */
232 bool use_leds;
233
234 /* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */
235 u8 mmc_cd;
236
237 /* For gpio-N, bit (1 << N) in "pullups" is set if that pullup
238 * should be enabled. Else, if that bit is set in "pulldowns",
239 * that pulldown is enabled. Don't waste power by letting any
240 * digital inputs float...
241 */
242 u32 pullups;
243 u32 pulldowns;
244
245 int (*setup)(struct device *dev,
246 unsigned gpio, unsigned ngpio);
247 int (*teardown)(struct device *dev,
248 unsigned gpio, unsigned ngpio);
249};
250
251struct twl4030_madc_platform_data {
252 int irq_line;
253};
254
255struct twl4030_keypad_data {
256 int rows;
257 int cols;
258 int *keymap;
259 int irq;
260 unsigned int keymapsize;
261 unsigned int rep:1;
262};
263
264enum twl4030_usb_mode {
265 T2_USB_MODE_ULPI = 1,
266 T2_USB_MODE_CEA2011_3PIN = 2,
267};
268
269struct twl4030_usb_data {
270 enum twl4030_usb_mode usb_mode;
271};
272
273struct twl4030_platform_data {
274 unsigned irq_base, irq_end;
275 struct twl4030_bci_platform_data *bci;
276 struct twl4030_gpio_platform_data *gpio;
277 struct twl4030_madc_platform_data *madc;
278 struct twl4030_keypad_data *keypad;
279 struct twl4030_usb_data *usb;
280
281 /* REVISIT more to come ... _nothing_ should be hard-wired */
282};
283
284/*----------------------------------------------------------------------*/
285
286int twl4030_sih_setup(int module);
287
288/*
289 * FIXME completely stop using TWL4030_IRQ_BASE ... instead, pass the
290 * IRQ data to subsidiary devices using platform device resources.
291 */
292
293/* IRQ information-need base */
294#include <mach/irqs.h>
295/* TWL4030 interrupts */
296
297/* #define TWL4030_MODIRQ_GPIO (TWL4030_IRQ_BASE + 0) */
298#define TWL4030_MODIRQ_KEYPAD (TWL4030_IRQ_BASE + 1)
299#define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2)
300#define TWL4030_MODIRQ_MADC (TWL4030_IRQ_BASE + 3)
301/* #define TWL4030_MODIRQ_USB (TWL4030_IRQ_BASE + 4) */
302/* #define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5) */
303
304#define TWL4030_PWRIRQ_PWRBTN (TWL4030_PWR_IRQ_BASE + 0)
305/* #define TWL4030_PWRIRQ_CHG_PRES (TWL4030_PWR_IRQ_BASE + 1) */
306/* #define TWL4030_PWRIRQ_USB_PRES (TWL4030_PWR_IRQ_BASE + 2) */
307/* #define TWL4030_PWRIRQ_RTC (TWL4030_PWR_IRQ_BASE + 3) */
308/* #define TWL4030_PWRIRQ_HOT_DIE (TWL4030_PWR_IRQ_BASE + 4) */
309/* #define TWL4030_PWRIRQ_PWROK_TIMEOUT (TWL4030_PWR_IRQ_BASE + 5) */
310/* #define TWL4030_PWRIRQ_MBCHG (TWL4030_PWR_IRQ_BASE + 6) */
311/* #define TWL4030_PWRIRQ_SC_DETECT (TWL4030_PWR_IRQ_BASE + 7) */
312
313/* Rest are unsued currently*/
314
315/* Offsets to Power Registers */
316#define TWL4030_VDAC_DEV_GRP 0x3B
317#define TWL4030_VDAC_DEDICATED 0x3E
318#define TWL4030_VAUX1_DEV_GRP 0x17
319#define TWL4030_VAUX1_DEDICATED 0x1A
320#define TWL4030_VAUX2_DEV_GRP 0x1B
321#define TWL4030_VAUX2_DEDICATED 0x1E
322#define TWL4030_VAUX3_DEV_GRP 0x1F
323#define TWL4030_VAUX3_DEDICATED 0x22
324
325/* TWL4030 GPIO interrupt definitions */
326
327#define TWL4030_GPIO_IRQ_NO(n) (TWL4030_GPIO_IRQ_BASE + (n))
328
329/*
330 * Exported TWL4030 GPIO APIs
331 *
332 * WARNING -- use standard GPIO and IRQ calls instead; these will vanish.
333 */
334int twl4030_set_gpio_debounce(int gpio, int enable);
335
336#if defined(CONFIG_TWL4030_BCI_BATTERY) || \
337 defined(CONFIG_TWL4030_BCI_BATTERY_MODULE)
338 extern int twl4030charger_usb_en(int enable);
339#else
340 static inline int twl4030charger_usb_en(int enable) { return 0; }
341#endif
342
343#endif /* End of __TWL4030_H */
diff --git a/include/linux/i2o.h b/include/linux/i2o.h
index 75ae6d8aba4f..4c4e57d1f19d 100644
--- a/include/linux/i2o.h
+++ b/include/linux/i2o.h
@@ -570,7 +570,6 @@ struct i2o_controller {
570#endif 570#endif
571 spinlock_t lock; /* lock for controller 571 spinlock_t lock; /* lock for controller
572 configuration */ 572 configuration */
573
574 void *driver_data[I2O_MAX_DRIVERS]; /* storage for drivers */ 573 void *driver_data[I2O_MAX_DRIVERS]; /* storage for drivers */
575}; 574};
576 575
@@ -691,289 +690,22 @@ static inline u32 i2o_dma_high(dma_addr_t dma_addr)
691}; 690};
692#endif 691#endif
693 692
694/** 693extern u16 i2o_sg_tablesize(struct i2o_controller *c, u16 body_size);
695 * i2o_sg_tablesize - Calculate the maximum number of elements in a SGL 694extern dma_addr_t i2o_dma_map_single(struct i2o_controller *c, void *ptr,
696 * @c: I2O controller for which the calculation should be done
697 * @body_size: maximum body size used for message in 32-bit words.
698 *
699 * Return the maximum number of SG elements in a SG list.
700 */
701static inline u16 i2o_sg_tablesize(struct i2o_controller *c, u16 body_size)
702{
703 i2o_status_block *sb = c->status_block.virt;
704 u16 sg_count =
705 (sb->inbound_frame_size - sizeof(struct i2o_message) / 4) -
706 body_size;
707
708 if (c->pae_support) {
709 /*
710 * for 64-bit a SG attribute element must be added and each
711 * SG element needs 12 bytes instead of 8.
712 */
713 sg_count -= 2;
714 sg_count /= 3;
715 } else
716 sg_count /= 2;
717
718 if (c->short_req && (sg_count > 8))
719 sg_count = 8;
720
721 return sg_count;
722};
723
724/**
725 * i2o_dma_map_single - Map pointer to controller and fill in I2O message.
726 * @c: I2O controller
727 * @ptr: pointer to the data which should be mapped
728 * @size: size of data in bytes
729 * @direction: DMA_TO_DEVICE / DMA_FROM_DEVICE
730 * @sg_ptr: pointer to the SG list inside the I2O message
731 *
732 * This function does all necessary DMA handling and also writes the I2O
733 * SGL elements into the I2O message. For details on DMA handling see also
734 * dma_map_single(). The pointer sg_ptr will only be set to the end of the
735 * SG list if the allocation was successful.
736 *
737 * Returns DMA address which must be checked for failures using
738 * dma_mapping_error().
739 */
740static inline dma_addr_t i2o_dma_map_single(struct i2o_controller *c, void *ptr,
741 size_t size, 695 size_t size,
742 enum dma_data_direction direction, 696 enum dma_data_direction direction,
743 u32 ** sg_ptr) 697 u32 ** sg_ptr);
744{ 698extern int i2o_dma_map_sg(struct i2o_controller *c,
745 u32 sg_flags;
746 u32 *mptr = *sg_ptr;
747 dma_addr_t dma_addr;
748
749 switch (direction) {
750 case DMA_TO_DEVICE:
751 sg_flags = 0xd4000000;
752 break;
753 case DMA_FROM_DEVICE:
754 sg_flags = 0xd0000000;
755 break;
756 default:
757 return 0;
758 }
759
760 dma_addr = dma_map_single(&c->pdev->dev, ptr, size, direction);
761 if (!dma_mapping_error(&c->pdev->dev, dma_addr)) {
762#ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
763 if ((sizeof(dma_addr_t) > 4) && c->pae_support) {
764 *mptr++ = cpu_to_le32(0x7C020002);
765 *mptr++ = cpu_to_le32(PAGE_SIZE);
766 }
767#endif
768
769 *mptr++ = cpu_to_le32(sg_flags | size);
770 *mptr++ = cpu_to_le32(i2o_dma_low(dma_addr));
771#ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
772 if ((sizeof(dma_addr_t) > 4) && c->pae_support)
773 *mptr++ = cpu_to_le32(i2o_dma_high(dma_addr));
774#endif
775 *sg_ptr = mptr;
776 }
777 return dma_addr;
778};
779
780/**
781 * i2o_dma_map_sg - Map a SG List to controller and fill in I2O message.
782 * @c: I2O controller
783 * @sg: SG list to be mapped
784 * @sg_count: number of elements in the SG list
785 * @direction: DMA_TO_DEVICE / DMA_FROM_DEVICE
786 * @sg_ptr: pointer to the SG list inside the I2O message
787 *
788 * This function does all necessary DMA handling and also writes the I2O
789 * SGL elements into the I2O message. For details on DMA handling see also
790 * dma_map_sg(). The pointer sg_ptr will only be set to the end of the SG
791 * list if the allocation was successful.
792 *
793 * Returns 0 on failure or 1 on success.
794 */
795static inline int i2o_dma_map_sg(struct i2o_controller *c,
796 struct scatterlist *sg, int sg_count, 699 struct scatterlist *sg, int sg_count,
797 enum dma_data_direction direction, 700 enum dma_data_direction direction,
798 u32 ** sg_ptr) 701 u32 ** sg_ptr);
799{ 702extern int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, size_t len);
800 u32 sg_flags; 703extern void i2o_dma_free(struct device *dev, struct i2o_dma *addr);
801 u32 *mptr = *sg_ptr; 704extern int i2o_dma_realloc(struct device *dev, struct i2o_dma *addr,
802 705 size_t len);
803 switch (direction) { 706extern int i2o_pool_alloc(struct i2o_pool *pool, const char *name,
804 case DMA_TO_DEVICE: 707 size_t size, int min_nr);
805 sg_flags = 0x14000000; 708extern void i2o_pool_free(struct i2o_pool *pool);
806 break;
807 case DMA_FROM_DEVICE:
808 sg_flags = 0x10000000;
809 break;
810 default:
811 return 0;
812 }
813
814 sg_count = dma_map_sg(&c->pdev->dev, sg, sg_count, direction);
815 if (!sg_count)
816 return 0;
817
818#ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
819 if ((sizeof(dma_addr_t) > 4) && c->pae_support) {
820 *mptr++ = cpu_to_le32(0x7C020002);
821 *mptr++ = cpu_to_le32(PAGE_SIZE);
822 }
823#endif
824
825 while (sg_count-- > 0) {
826 if (!sg_count)
827 sg_flags |= 0xC0000000;
828 *mptr++ = cpu_to_le32(sg_flags | sg_dma_len(sg));
829 *mptr++ = cpu_to_le32(i2o_dma_low(sg_dma_address(sg)));
830#ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
831 if ((sizeof(dma_addr_t) > 4) && c->pae_support)
832 *mptr++ = cpu_to_le32(i2o_dma_high(sg_dma_address(sg)));
833#endif
834 sg = sg_next(sg);
835 }
836 *sg_ptr = mptr;
837
838 return 1;
839};
840
841/**
842 * i2o_dma_alloc - Allocate DMA memory
843 * @dev: struct device pointer to the PCI device of the I2O controller
844 * @addr: i2o_dma struct which should get the DMA buffer
845 * @len: length of the new DMA memory
846 * @gfp_mask: GFP mask
847 *
848 * Allocate a coherent DMA memory and write the pointers into addr.
849 *
850 * Returns 0 on success or -ENOMEM on failure.
851 */
852static inline int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr,
853 size_t len, gfp_t gfp_mask)
854{
855 struct pci_dev *pdev = to_pci_dev(dev);
856 int dma_64 = 0;
857
858 if ((sizeof(dma_addr_t) > 4) && (pdev->dma_mask == DMA_64BIT_MASK)) {
859 dma_64 = 1;
860 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK))
861 return -ENOMEM;
862 }
863
864 addr->virt = dma_alloc_coherent(dev, len, &addr->phys, gfp_mask);
865
866 if ((sizeof(dma_addr_t) > 4) && dma_64)
867 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK))
868 printk(KERN_WARNING "i2o: unable to set 64-bit DMA");
869
870 if (!addr->virt)
871 return -ENOMEM;
872
873 memset(addr->virt, 0, len);
874 addr->len = len;
875
876 return 0;
877};
878
879/**
880 * i2o_dma_free - Free DMA memory
881 * @dev: struct device pointer to the PCI device of the I2O controller
882 * @addr: i2o_dma struct which contains the DMA buffer
883 *
884 * Free a coherent DMA memory and set virtual address of addr to NULL.
885 */
886static inline void i2o_dma_free(struct device *dev, struct i2o_dma *addr)
887{
888 if (addr->virt) {
889 if (addr->phys)
890 dma_free_coherent(dev, addr->len, addr->virt,
891 addr->phys);
892 else
893 kfree(addr->virt);
894 addr->virt = NULL;
895 }
896};
897
898/**
899 * i2o_dma_realloc - Realloc DMA memory
900 * @dev: struct device pointer to the PCI device of the I2O controller
901 * @addr: pointer to a i2o_dma struct DMA buffer
902 * @len: new length of memory
903 * @gfp_mask: GFP mask
904 *
905 * If there was something allocated in the addr, free it first. If len > 0
906 * than try to allocate it and write the addresses back to the addr
907 * structure. If len == 0 set the virtual address to NULL.
908 *
909 * Returns the 0 on success or negative error code on failure.
910 */
911static inline int i2o_dma_realloc(struct device *dev, struct i2o_dma *addr,
912 size_t len, gfp_t gfp_mask)
913{
914 i2o_dma_free(dev, addr);
915
916 if (len)
917 return i2o_dma_alloc(dev, addr, len, gfp_mask);
918
919 return 0;
920};
921
922/*
923 * i2o_pool_alloc - Allocate an slab cache and mempool
924 * @mempool: pointer to struct i2o_pool to write data into.
925 * @name: name which is used to identify cache
926 * @size: size of each object
927 * @min_nr: minimum number of objects
928 *
929 * First allocates a slab cache with name and size. Then allocates a
930 * mempool which uses the slab cache for allocation and freeing.
931 *
932 * Returns 0 on success or negative error code on failure.
933 */
934static inline int i2o_pool_alloc(struct i2o_pool *pool, const char *name,
935 size_t size, int min_nr)
936{
937 pool->name = kmalloc(strlen(name) + 1, GFP_KERNEL);
938 if (!pool->name)
939 goto exit;
940 strcpy(pool->name, name);
941
942 pool->slab =
943 kmem_cache_create(pool->name, size, 0, SLAB_HWCACHE_ALIGN, NULL);
944 if (!pool->slab)
945 goto free_name;
946
947 pool->mempool = mempool_create_slab_pool(min_nr, pool->slab);
948 if (!pool->mempool)
949 goto free_slab;
950
951 return 0;
952
953 free_slab:
954 kmem_cache_destroy(pool->slab);
955
956 free_name:
957 kfree(pool->name);
958
959 exit:
960 return -ENOMEM;
961};
962
963/*
964 * i2o_pool_free - Free slab cache and mempool again
965 * @mempool: pointer to struct i2o_pool which should be freed
966 *
967 * Note that you have to return all objects to the mempool again before
968 * calling i2o_pool_free().
969 */
970static inline void i2o_pool_free(struct i2o_pool *pool)
971{
972 mempool_destroy(pool->mempool);
973 kmem_cache_destroy(pool->slab);
974 kfree(pool->name);
975};
976
977/* I2O driver (OSM) functions */ 709/* I2O driver (OSM) functions */
978extern int i2o_driver_register(struct i2o_driver *); 710extern int i2o_driver_register(struct i2o_driver *);
979extern void i2o_driver_unregister(struct i2o_driver *); 711extern void i2o_driver_unregister(struct i2o_driver *);
diff --git a/include/linux/i7300_idle.h b/include/linux/i7300_idle.h
new file mode 100644
index 000000000000..05a80c44513c
--- /dev/null
+++ b/include/linux/i7300_idle.h
@@ -0,0 +1,83 @@
1
2#ifndef I7300_IDLE_H
3#define I7300_IDLE_H
4
5#include <linux/pci.h>
6
7/*
8 * I/O AT controls (PCI bus 0 device 8 function 0)
9 * DIMM controls (PCI bus 0 device 16 function 1)
10 */
11#define IOAT_BUS 0
12#define IOAT_DEVFN PCI_DEVFN(8, 0)
13#define MEMCTL_BUS 0
14#define MEMCTL_DEVFN PCI_DEVFN(16, 1)
15
16struct fbd_ioat {
17 unsigned int vendor;
18 unsigned int ioat_dev;
19};
20
21/*
22 * The i5000 chip-set has the same hooks as the i7300
23 * but support is disabled by default because this driver
24 * has not been validated on that platform.
25 */
26#define SUPPORT_I5000 0
27
28static const struct fbd_ioat fbd_ioat_list[] = {
29 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB},
30#if SUPPORT_I5000
31 {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT},
32#endif
33 {0, 0}
34};
35
36/* table of devices that work with this driver */
37static const struct pci_device_id pci_tbl[] = {
38 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) },
39#if SUPPORT_I5000
40 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
41#endif
42 { } /* Terminating entry */
43};
44
45/* Check for known platforms with I/O-AT */
46static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
47 struct pci_dev **ioat_dev)
48{
49 int i;
50 struct pci_dev *memdev, *dmadev;
51
52 memdev = pci_get_bus_and_slot(MEMCTL_BUS, MEMCTL_DEVFN);
53 if (!memdev)
54 return -ENODEV;
55
56 for (i = 0; pci_tbl[i].vendor != 0; i++) {
57 if (memdev->vendor == pci_tbl[i].vendor &&
58 memdev->device == pci_tbl[i].device) {
59 break;
60 }
61 }
62 if (pci_tbl[i].vendor == 0)
63 return -ENODEV;
64
65 dmadev = pci_get_bus_and_slot(IOAT_BUS, IOAT_DEVFN);
66 if (!dmadev)
67 return -ENODEV;
68
69 for (i = 0; fbd_ioat_list[i].vendor != 0; i++) {
70 if (dmadev->vendor == fbd_ioat_list[i].vendor &&
71 dmadev->device == fbd_ioat_list[i].ioat_dev) {
72 if (fbd_dev)
73 *fbd_dev = memdev;
74 if (ioat_dev)
75 *ioat_dev = dmadev;
76
77 return 0;
78 }
79 }
80 return -ENODEV;
81}
82
83#endif
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h
index 03067443198a..a93a8dd33118 100644
--- a/include/linux/icmpv6.h
+++ b/include/linux/icmpv6.h
@@ -40,16 +40,18 @@ struct icmp6hdr {
40 struct icmpv6_nd_ra { 40 struct icmpv6_nd_ra {
41 __u8 hop_limit; 41 __u8 hop_limit;
42#if defined(__LITTLE_ENDIAN_BITFIELD) 42#if defined(__LITTLE_ENDIAN_BITFIELD)
43 __u8 reserved:4, 43 __u8 reserved:3,
44 router_pref:2, 44 router_pref:2,
45 home_agent:1,
45 other:1, 46 other:1,
46 managed:1; 47 managed:1;
47 48
48#elif defined(__BIG_ENDIAN_BITFIELD) 49#elif defined(__BIG_ENDIAN_BITFIELD)
49 __u8 managed:1, 50 __u8 managed:1,
50 other:1, 51 other:1,
52 home_agent:1,
51 router_pref:2, 53 router_pref:2,
52 reserved:4; 54 reserved:3;
53#else 55#else
54#error "Please fix <asm/byteorder.h>" 56#error "Please fix <asm/byteorder.h>"
55#endif 57#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index c47e371554c1..e99c56de7f56 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -122,8 +122,6 @@ struct ide_io_ports {
122#define MAX_DRIVES 2 /* per interface; 2 assumed by lots of code */ 122#define MAX_DRIVES 2 /* per interface; 2 assumed by lots of code */
123#define SECTOR_SIZE 512 123#define SECTOR_SIZE 512
124 124
125#define IDE_LARGE_SEEK(b1,b2,t) (((b1) > (b2) + (t)) || ((b2) > (b1) + (t)))
126
127/* 125/*
128 * Timeouts for various operations: 126 * Timeouts for various operations:
129 */ 127 */
@@ -172,9 +170,7 @@ typedef int (ide_ack_intr_t)(struct hwif_s *);
172enum { ide_unknown, ide_generic, ide_pci, 170enum { ide_unknown, ide_generic, ide_pci,
173 ide_cmd640, ide_dtc2278, ide_ali14xx, 171 ide_cmd640, ide_dtc2278, ide_ali14xx,
174 ide_qd65xx, ide_umc8672, ide_ht6560b, 172 ide_qd65xx, ide_umc8672, ide_ht6560b,
175 ide_rz1000, ide_trm290, 173 ide_4drives, ide_pmac, ide_acorn,
176 ide_cmd646, ide_cy82c693, ide_4drives,
177 ide_pmac, ide_acorn,
178 ide_au1xxx, ide_palm3710 174 ide_au1xxx, ide_palm3710
179}; 175};
180 176
@@ -461,12 +457,26 @@ struct ide_acpi_drive_link;
461struct ide_acpi_hwif_link; 457struct ide_acpi_hwif_link;
462#endif 458#endif
463 459
460struct ide_drive_s;
461
462struct ide_disk_ops {
463 int (*check)(struct ide_drive_s *, const char *);
464 int (*get_capacity)(struct ide_drive_s *);
465 void (*setup)(struct ide_drive_s *);
466 void (*flush)(struct ide_drive_s *);
467 int (*init_media)(struct ide_drive_s *, struct gendisk *);
468 int (*set_doorlock)(struct ide_drive_s *, struct gendisk *,
469 int);
470 ide_startstop_t (*do_request)(struct ide_drive_s *, struct request *,
471 sector_t);
472 int (*end_request)(struct ide_drive_s *, int, int);
473 int (*ioctl)(struct ide_drive_s *, struct block_device *,
474 fmode_t, unsigned int, unsigned long);
475};
476
464/* ATAPI device flags */ 477/* ATAPI device flags */
465enum { 478enum {
466 IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), 479 IDE_AFLAG_DRQ_INTERRUPT = (1 << 0),
467 IDE_AFLAG_MEDIA_CHANGED = (1 << 1),
468 /* Drive cannot lock the door. */
469 IDE_AFLAG_NO_DOORLOCK = (1 << 2),
470 480
471 /* ide-cd */ 481 /* ide-cd */
472 /* Drive cannot eject the disc. */ 482 /* Drive cannot eject the disc. */
@@ -482,8 +492,6 @@ enum {
482 * when more than one interrupt is needed. 492 * when more than one interrupt is needed.
483 */ 493 */
484 IDE_AFLAG_LIMIT_NFRAMES = (1 << 7), 494 IDE_AFLAG_LIMIT_NFRAMES = (1 << 7),
485 /* Seeking in progress. */
486 IDE_AFLAG_SEEKING = (1 << 8),
487 /* Saved TOC information is current. */ 495 /* Saved TOC information is current. */
488 IDE_AFLAG_TOC_VALID = (1 << 9), 496 IDE_AFLAG_TOC_VALID = (1 << 9),
489 /* We think that the drive door is locked. */ 497 /* We think that the drive door is locked. */
@@ -498,14 +506,10 @@ enum {
498 IDE_AFLAG_LE_SPEED_FIELDS = (1 << 17), 506 IDE_AFLAG_LE_SPEED_FIELDS = (1 << 17),
499 507
500 /* ide-floppy */ 508 /* ide-floppy */
501 /* Format in progress */
502 IDE_AFLAG_FORMAT_IN_PROGRESS = (1 << 18),
503 /* Avoid commands not supported in Clik drive */ 509 /* Avoid commands not supported in Clik drive */
504 IDE_AFLAG_CLIK_DRIVE = (1 << 19), 510 IDE_AFLAG_CLIK_DRIVE = (1 << 19),
505 /* Requires BH algorithm for packets */ 511 /* Requires BH algorithm for packets */
506 IDE_AFLAG_ZIP_DRIVE = (1 << 20), 512 IDE_AFLAG_ZIP_DRIVE = (1 << 20),
507 /* Write protect */
508 IDE_AFLAG_WP = (1 << 21),
509 /* Supports format progress report */ 513 /* Supports format progress report */
510 IDE_AFLAG_SRFP = (1 << 22), 514 IDE_AFLAG_SRFP = (1 << 22),
511 515
@@ -578,7 +582,11 @@ enum {
578 /* don't unload heads */ 582 /* don't unload heads */
579 IDE_DFLAG_NO_UNLOAD = (1 << 27), 583 IDE_DFLAG_NO_UNLOAD = (1 << 27),
580 /* heads unloaded, please don't reset port */ 584 /* heads unloaded, please don't reset port */
581 IDE_DFLAG_PARKED = (1 << 28) 585 IDE_DFLAG_PARKED = (1 << 28),
586 IDE_DFLAG_MEDIA_CHANGED = (1 << 29),
587 /* write protect */
588 IDE_DFLAG_WP = (1 << 30),
589 IDE_DFLAG_FORMAT_IN_PROGRESS = (1 << 31),
582}; 590};
583 591
584struct ide_drive_s { 592struct ide_drive_s {
@@ -597,6 +605,8 @@ struct ide_drive_s {
597#endif 605#endif
598 struct hwif_s *hwif; /* actually (ide_hwif_t *) */ 606 struct hwif_s *hwif; /* actually (ide_hwif_t *) */
599 607
608 const struct ide_disk_ops *disk_ops;
609
600 unsigned long dev_flags; 610 unsigned long dev_flags;
601 611
602 unsigned long sleep; /* sleep until this time */ 612 unsigned long sleep; /* sleep until this time */
@@ -829,8 +839,6 @@ typedef struct hwif_s {
829 unsigned extra_ports; /* number of extra dma ports */ 839 unsigned extra_ports; /* number of extra dma ports */
830 840
831 unsigned present : 1; /* this interface exists */ 841 unsigned present : 1; /* this interface exists */
832 unsigned serialized : 1; /* serialized all channel operation */
833 unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */
834 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ 842 unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
835 843
836 struct device gendev; 844 struct device gendev;
@@ -893,6 +901,8 @@ typedef struct hwgroup_s {
893 901
894 int req_gen; 902 int req_gen;
895 int req_gen_timer; 903 int req_gen_timer;
904
905 spinlock_t lock;
896} ide_hwgroup_t; 906} ide_hwgroup_t;
897 907
898typedef struct ide_driver_s ide_driver_t; 908typedef struct ide_driver_s ide_driver_t;
@@ -1106,6 +1116,14 @@ enum {
1106 IDE_PM_COMPLETED, 1116 IDE_PM_COMPLETED,
1107}; 1117};
1108 1118
1119int generic_ide_suspend(struct device *, pm_message_t);
1120int generic_ide_resume(struct device *);
1121
1122void ide_complete_power_step(ide_drive_t *, struct request *);
1123ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *);
1124void ide_complete_pm_request(ide_drive_t *, struct request *);
1125void ide_check_pm_state(ide_drive_t *, struct request *);
1126
1109/* 1127/*
1110 * Subdrivers support. 1128 * Subdrivers support.
1111 * 1129 *
@@ -1123,8 +1141,8 @@ struct ide_driver_s {
1123 void (*resume)(ide_drive_t *); 1141 void (*resume)(ide_drive_t *);
1124 void (*shutdown)(ide_drive_t *); 1142 void (*shutdown)(ide_drive_t *);
1125#ifdef CONFIG_IDE_PROC_FS 1143#ifdef CONFIG_IDE_PROC_FS
1126 ide_proc_entry_t *proc; 1144 ide_proc_entry_t * (*proc_entries)(ide_drive_t *);
1127 const struct ide_proc_devset *settings; 1145 const struct ide_proc_devset * (*proc_devsets)(ide_drive_t *);
1128#endif 1146#endif
1129}; 1147};
1130 1148
@@ -1142,8 +1160,7 @@ struct ide_ioctl_devset {
1142int ide_setting_ioctl(ide_drive_t *, struct block_device *, unsigned int, 1160int ide_setting_ioctl(ide_drive_t *, struct block_device *, unsigned int,
1143 unsigned long, const struct ide_ioctl_devset *); 1161 unsigned long, const struct ide_ioctl_devset *);
1144 1162
1145int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, 1163int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned long);
1146 unsigned, unsigned long);
1147 1164
1148extern int ide_vlb_clk; 1165extern int ide_vlb_clk;
1149extern int ide_pci_clk; 1166extern int ide_pci_clk;
@@ -1281,6 +1298,13 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o
1281#define ide_pci_register_driver(d) pci_register_driver(d) 1298#define ide_pci_register_driver(d) pci_register_driver(d)
1282#endif 1299#endif
1283 1300
1301static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev)
1302{
1303 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5)
1304 return 1;
1305 return 0;
1306}
1307
1284void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, 1308void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int,
1285 hw_regs_t *, hw_regs_t **); 1309 hw_regs_t *, hw_regs_t **);
1286void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); 1310void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
@@ -1354,12 +1378,13 @@ enum {
1354 IDE_HFLAG_LEGACY_IRQS = (1 << 21), 1378 IDE_HFLAG_LEGACY_IRQS = (1 << 21),
1355 /* force use of legacy IRQs */ 1379 /* force use of legacy IRQs */
1356 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), 1380 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22),
1357 /* limit LBA48 requests to 256 sectors */ 1381 /* host is TRM290 */
1358 IDE_HFLAG_RQSIZE_256 = (1 << 23), 1382 IDE_HFLAG_TRM290 = (1 << 23),
1359 /* use 32-bit I/O ops */ 1383 /* use 32-bit I/O ops */
1360 IDE_HFLAG_IO_32BIT = (1 << 24), 1384 IDE_HFLAG_IO_32BIT = (1 << 24),
1361 /* unmask IRQs */ 1385 /* unmask IRQs */
1362 IDE_HFLAG_UNMASK_IRQS = (1 << 25), 1386 IDE_HFLAG_UNMASK_IRQS = (1 << 25),
1387 IDE_HFLAG_BROKEN_ALTSTATUS = (1 << 26),
1363 /* serialize ports if DMA is possible (for sl82c105) */ 1388 /* serialize ports if DMA is possible (for sl82c105) */
1364 IDE_HFLAG_SERIALIZE_DMA = (1 << 27), 1389 IDE_HFLAG_SERIALIZE_DMA = (1 << 27),
1365 /* force host out of "simplex" mode */ 1390 /* force host out of "simplex" mode */
@@ -1392,6 +1417,9 @@ struct ide_port_info {
1392 1417
1393 ide_pci_enablebit_t enablebits[2]; 1418 ide_pci_enablebit_t enablebits[2];
1394 hwif_chipset_t chipset; 1419 hwif_chipset_t chipset;
1420
1421 u16 max_sectors; /* if < than the default one */
1422
1395 u32 host_flags; 1423 u32 host_flags;
1396 u8 pio_mask; 1424 u8 pio_mask;
1397 u8 swdma_mask; 1425 u8 swdma_mask;
@@ -1587,13 +1615,13 @@ extern struct mutex ide_cfg_mtx;
1587/* 1615/*
1588 * Structure locking: 1616 * Structure locking:
1589 * 1617 *
1590 * ide_cfg_mtx and ide_lock together protect changes to 1618 * ide_cfg_mtx and hwgroup->lock together protect changes to
1591 * ide_hwif_t->{next,hwgroup} 1619 * ide_hwif_t->next
1592 * ide_drive_t->next 1620 * ide_drive_t->next
1593 * 1621 *
1594 * ide_hwgroup_t->busy: ide_lock 1622 * ide_hwgroup_t->busy: hwgroup->lock
1595 * ide_hwgroup_t->hwif: ide_lock 1623 * ide_hwgroup_t->hwif: hwgroup->lock
1596 * ide_hwif_t->mate: constant, no locking 1624 * ide_hwif_t->{hwgroup,mate}: constant, no locking
1597 * ide_drive_t->hwif: constant, no locking 1625 * ide_drive_t->hwif: constant, no locking
1598 */ 1626 */
1599 1627
diff --git a/include/linux/idr.h b/include/linux/idr.h
index fa035f96f2a3..dd846df8cd32 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -52,13 +52,14 @@ struct idr_layer {
52 unsigned long bitmap; /* A zero bit means "space here" */ 52 unsigned long bitmap; /* A zero bit means "space here" */
53 struct idr_layer *ary[1<<IDR_BITS]; 53 struct idr_layer *ary[1<<IDR_BITS];
54 int count; /* When zero, we can release it */ 54 int count; /* When zero, we can release it */
55 int layer; /* distance from leaf */
55 struct rcu_head rcu_head; 56 struct rcu_head rcu_head;
56}; 57};
57 58
58struct idr { 59struct idr {
59 struct idr_layer *top; 60 struct idr_layer *top;
60 struct idr_layer *id_free; 61 struct idr_layer *id_free;
61 int layers; 62 int layers; /* only valid without concurrent changes */
62 int id_free_cnt; 63 int id_free_cnt;
63 spinlock_t lock; 64 spinlock_t lock;
64}; 65};
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 14126bc36641..c4e6ca1a6306 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -12,8 +12,8 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#ifndef IEEE80211_H 15#ifndef LINUX_IEEE80211_H
16#define IEEE80211_H 16#define LINUX_IEEE80211_H
17 17
18#include <linux/types.h> 18#include <linux/types.h>
19#include <asm/byteorder.h> 19#include <asm/byteorder.h>
@@ -97,7 +97,10 @@
97#define IEEE80211_MAX_FRAME_LEN 2352 97#define IEEE80211_MAX_FRAME_LEN 2352
98 98
99#define IEEE80211_MAX_SSID_LEN 32 99#define IEEE80211_MAX_SSID_LEN 32
100
100#define IEEE80211_MAX_MESH_ID_LEN 32 101#define IEEE80211_MAX_MESH_ID_LEN 32
102#define IEEE80211_MESH_CONFIG_LEN 19
103
101#define IEEE80211_QOS_CTL_LEN 2 104#define IEEE80211_QOS_CTL_LEN 2
102#define IEEE80211_QOS_CTL_TID_MASK 0x000F 105#define IEEE80211_QOS_CTL_TID_MASK 0x000F
103#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 106#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
@@ -666,6 +669,13 @@ struct ieee80211_cts {
666 u8 ra[6]; 669 u8 ra[6];
667} __attribute__ ((packed)); 670} __attribute__ ((packed));
668 671
672struct ieee80211_pspoll {
673 __le16 frame_control;
674 __le16 aid;
675 u8 bssid[6];
676 u8 ta[6];
677} __attribute__ ((packed));
678
669/** 679/**
670 * struct ieee80211_bar - HT Block Ack Request 680 * struct ieee80211_bar - HT Block Ack Request
671 * 681 *
@@ -685,28 +695,88 @@ struct ieee80211_bar {
685#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 695#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
686#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 696#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
687 697
698
699#define IEEE80211_HT_MCS_MASK_LEN 10
700
701/**
702 * struct ieee80211_mcs_info - MCS information
703 * @rx_mask: RX mask
704 * @rx_highest: highest supported RX rate
705 * @tx_params: TX parameters
706 */
707struct ieee80211_mcs_info {
708 u8 rx_mask[IEEE80211_HT_MCS_MASK_LEN];
709 __le16 rx_highest;
710 u8 tx_params;
711 u8 reserved[3];
712} __attribute__((packed));
713
714/* 802.11n HT capability MSC set */
715#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
716#define IEEE80211_HT_MCS_TX_DEFINED 0x01
717#define IEEE80211_HT_MCS_TX_RX_DIFF 0x02
718/* value 0 == 1 stream etc */
719#define IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK 0x0C
720#define IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT 2
721#define IEEE80211_HT_MCS_TX_MAX_STREAMS 4
722#define IEEE80211_HT_MCS_TX_UNEQUAL_MODULATION 0x10
723
724/*
725 * 802.11n D5.0 20.3.5 / 20.6 says:
726 * - indices 0 to 7 and 32 are single spatial stream
727 * - 8 to 31 are multiple spatial streams using equal modulation
728 * [8..15 for two streams, 16..23 for three and 24..31 for four]
729 * - remainder are multiple spatial streams using unequal modulation
730 */
731#define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START 33
732#define IEEE80211_HT_MCS_UNEQUAL_MODULATION_START_BYTE \
733 (IEEE80211_HT_MCS_UNEQUAL_MODULATION_START / 8)
734
688/** 735/**
689 * struct ieee80211_ht_cap - HT capabilities 736 * struct ieee80211_ht_cap - HT capabilities
690 * 737 *
691 * This structure refers to "HT capabilities element" as 738 * This structure is the "HT capabilities element" as
692 * described in 802.11n draft section 7.3.2.52 739 * described in 802.11n D5.0 7.3.2.57
693 */ 740 */
694struct ieee80211_ht_cap { 741struct ieee80211_ht_cap {
695 __le16 cap_info; 742 __le16 cap_info;
696 u8 ampdu_params_info; 743 u8 ampdu_params_info;
697 u8 supp_mcs_set[16]; 744
745 /* 16 bytes MCS information */
746 struct ieee80211_mcs_info mcs;
747
698 __le16 extended_ht_cap_info; 748 __le16 extended_ht_cap_info;
699 __le32 tx_BF_cap_info; 749 __le32 tx_BF_cap_info;
700 u8 antenna_selection_info; 750 u8 antenna_selection_info;
701} __attribute__ ((packed)); 751} __attribute__ ((packed));
702 752
753/* 802.11n HT capabilities masks (for cap_info) */
754#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
755#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
756#define IEEE80211_HT_CAP_SM_PS 0x000C
757#define IEEE80211_HT_CAP_GRN_FLD 0x0010
758#define IEEE80211_HT_CAP_SGI_20 0x0020
759#define IEEE80211_HT_CAP_SGI_40 0x0040
760#define IEEE80211_HT_CAP_TX_STBC 0x0080
761#define IEEE80211_HT_CAP_RX_STBC 0x0300
762#define IEEE80211_HT_CAP_DELAY_BA 0x0400
763#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
764#define IEEE80211_HT_CAP_DSSSCCK40 0x1000
765#define IEEE80211_HT_CAP_PSMP_SUPPORT 0x2000
766#define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000
767#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000
768
769/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
770#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
771#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
772
703/** 773/**
704 * struct ieee80211_ht_cap - HT additional information 774 * struct ieee80211_ht_info - HT information
705 * 775 *
706 * This structure refers to "HT information element" as 776 * This structure is the "HT information element" as
707 * described in 802.11n draft section 7.3.2.53 777 * described in 802.11n D5.0 7.3.2.58
708 */ 778 */
709struct ieee80211_ht_addt_info { 779struct ieee80211_ht_info {
710 u8 control_chan; 780 u8 control_chan;
711 u8 ht_param; 781 u8 ht_param;
712 __le16 operation_mode; 782 __le16 operation_mode;
@@ -714,36 +784,33 @@ struct ieee80211_ht_addt_info {
714 u8 basic_set[16]; 784 u8 basic_set[16];
715} __attribute__ ((packed)); 785} __attribute__ ((packed));
716 786
717/* 802.11n HT capabilities masks */ 787/* for ht_param */
718#define IEEE80211_HT_CAP_SUP_WIDTH 0x0002 788#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
719#define IEEE80211_HT_CAP_SM_PS 0x000C 789#define IEEE80211_HT_PARAM_CHA_SEC_NONE 0x00
720#define IEEE80211_HT_CAP_GRN_FLD 0x0010 790#define IEEE80211_HT_PARAM_CHA_SEC_ABOVE 0x01
721#define IEEE80211_HT_CAP_SGI_20 0x0020 791#define IEEE80211_HT_PARAM_CHA_SEC_BELOW 0x03
722#define IEEE80211_HT_CAP_SGI_40 0x0040 792#define IEEE80211_HT_PARAM_CHAN_WIDTH_ANY 0x04
723#define IEEE80211_HT_CAP_DELAY_BA 0x0400 793#define IEEE80211_HT_PARAM_RIFS_MODE 0x08
724#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 794#define IEEE80211_HT_PARAM_SPSMP_SUPPORT 0x10
725#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 795#define IEEE80211_HT_PARAM_SERV_INTERVAL_GRAN 0xE0
726/* 802.11n HT capability AMPDU settings */ 796
727#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03 797/* for operation_mode */
728#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C 798#define IEEE80211_HT_OP_MODE_PROTECTION 0x0003
729/* 802.11n HT capability MSC set */ 799#define IEEE80211_HT_OP_MODE_PROTECTION_NONE 0
730#define IEEE80211_SUPP_MCS_SET_UEQM 4 800#define IEEE80211_HT_OP_MODE_PROTECTION_NONMEMBER 1
731#define IEEE80211_HT_CAP_MAX_STREAMS 4 801#define IEEE80211_HT_OP_MODE_PROTECTION_20MHZ 2
732#define IEEE80211_SUPP_MCS_SET_LEN 10 802#define IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED 3
733/* maximum streams the spec allows */ 803#define IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT 0x0004
734#define IEEE80211_HT_CAP_MCS_TX_DEFINED 0x01 804#define IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT 0x0010
735#define IEEE80211_HT_CAP_MCS_TX_RX_DIFF 0x02 805
736#define IEEE80211_HT_CAP_MCS_TX_STREAMS 0x0C 806/* for stbc_param */
737#define IEEE80211_HT_CAP_MCS_TX_UEQM 0x10 807#define IEEE80211_HT_STBC_PARAM_DUAL_BEACON 0x0040
738/* 802.11n HT IE masks */ 808#define IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT 0x0080
739#define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03 809#define IEEE80211_HT_STBC_PARAM_STBC_BEACON 0x0100
740#define IEEE80211_HT_IE_CHA_SEC_NONE 0x00 810#define IEEE80211_HT_STBC_PARAM_LSIG_TXOP_FULLPROT 0x0200
741#define IEEE80211_HT_IE_CHA_SEC_ABOVE 0x01 811#define IEEE80211_HT_STBC_PARAM_PCO_ACTIVE 0x0400
742#define IEEE80211_HT_IE_CHA_SEC_BELOW 0x03 812#define IEEE80211_HT_STBC_PARAM_PCO_PHASE 0x0800
743#define IEEE80211_HT_IE_CHA_WIDTH 0x04 813
744#define IEEE80211_HT_IE_HT_PROTECTION 0x0003
745#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004
746#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010
747 814
748/* block-ack parameters */ 815/* block-ack parameters */
749#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002 816#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
@@ -769,7 +836,6 @@ struct ieee80211_ht_addt_info {
769/* Authentication algorithms */ 836/* Authentication algorithms */
770#define WLAN_AUTH_OPEN 0 837#define WLAN_AUTH_OPEN 0
771#define WLAN_AUTH_SHARED_KEY 1 838#define WLAN_AUTH_SHARED_KEY 1
772#define WLAN_AUTH_FAST_BSS_TRANSITION 2
773#define WLAN_AUTH_LEAP 128 839#define WLAN_AUTH_LEAP 128
774 840
775#define WLAN_AUTH_CHALLENGE_LEN 128 841#define WLAN_AUTH_CHALLENGE_LEN 128
@@ -949,7 +1015,7 @@ enum ieee80211_eid {
949 WLAN_EID_EXT_SUPP_RATES = 50, 1015 WLAN_EID_EXT_SUPP_RATES = 50,
950 /* 802.11n */ 1016 /* 802.11n */
951 WLAN_EID_HT_CAPABILITY = 45, 1017 WLAN_EID_HT_CAPABILITY = 45,
952 WLAN_EID_HT_EXTRA_INFO = 61, 1018 WLAN_EID_HT_INFORMATION = 61,
953 /* 802.11i */ 1019 /* 802.11i */
954 WLAN_EID_RSN = 48, 1020 WLAN_EID_RSN = 48,
955 WLAN_EID_WPA = 221, 1021 WLAN_EID_WPA = 221,
@@ -976,6 +1042,68 @@ enum ieee80211_spectrum_mgmt_actioncode {
976 WLAN_ACTION_SPCT_CHL_SWITCH = 4, 1042 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
977}; 1043};
978 1044
1045/*
1046 * IEEE 802.11-2007 7.3.2.9 Country information element
1047 *
1048 * Minimum length is 8 octets, ie len must be evenly
1049 * divisible by 2
1050 */
1051
1052/* Although the spec says 8 I'm seeing 6 in practice */
1053#define IEEE80211_COUNTRY_IE_MIN_LEN 6
1054
1055/*
1056 * For regulatory extension stuff see IEEE 802.11-2007
1057 * Annex I (page 1141) and Annex J (page 1147). Also
1058 * review 7.3.2.9.
1059 *
1060 * When dot11RegulatoryClassesRequired is true and the
1061 * first_channel/reg_extension_id is >= 201 then the IE
1062 * compromises of the 'ext' struct represented below:
1063 *
1064 * - Regulatory extension ID - when generating IE this just needs
1065 * to be monotonically increasing for each triplet passed in
1066 * the IE
1067 * - Regulatory class - index into set of rules
1068 * - Coverage class - index into air propagation time (Table 7-27),
1069 * in microseconds, you can compute the air propagation time from
1070 * the index by multiplying by 3, so index 10 yields a propagation
1071 * of 10 us. Valid values are 0-31, values 32-255 are not defined
1072 * yet. A value of 0 inicates air propagation of <= 1 us.
1073 *
1074 * See also Table I.2 for Emission limit sets and table
1075 * I.3 for Behavior limit sets. Table J.1 indicates how to map
1076 * a reg_class to an emission limit set and behavior limit set.
1077 */
1078#define IEEE80211_COUNTRY_EXTENSION_ID 201
1079
1080/*
1081 * Channels numbers in the IE must be monotonically increasing
1082 * if dot11RegulatoryClassesRequired is not true.
1083 *
1084 * If dot11RegulatoryClassesRequired is true consecutive
1085 * subband triplets following a regulatory triplet shall
1086 * have monotonically increasing first_channel number fields.
1087 *
1088 * Channel numbers shall not overlap.
1089 *
1090 * Note that max_power is signed.
1091 */
1092struct ieee80211_country_ie_triplet {
1093 union {
1094 struct {
1095 u8 first_channel;
1096 u8 num_channels;
1097 s8 max_power;
1098 } __attribute__ ((packed)) chans;
1099 struct {
1100 u8 reg_extension_id;
1101 u8 reg_class;
1102 u8 coverage_class;
1103 } __attribute__ ((packed)) ext;
1104 };
1105} __attribute__ ((packed));
1106
979/* BACK action code */ 1107/* BACK action code */
980enum ieee80211_back_actioncode { 1108enum ieee80211_back_actioncode {
981 WLAN_ACTION_ADDBA_REQ = 0, 1109 WLAN_ACTION_ADDBA_REQ = 0,
@@ -1057,4 +1185,4 @@ static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr)
1057 return hdr->addr1; 1185 return hdr->addr1;
1058} 1186}
1059 1187
1060#endif /* IEEE80211_H */ 1188#endif /* LINUX_IEEE80211_H */
diff --git a/include/linux/if.h b/include/linux/if.h
index 65246846c844..2a6e29620a96 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -65,6 +65,7 @@
65#define IFF_BONDING 0x20 /* bonding master or slave */ 65#define IFF_BONDING 0x20 /* bonding master or slave */
66#define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ 66#define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */
67#define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ 67#define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */
68#define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */
68 69
69#define IF_GET_IFACE 0x0001 /* for querying only */ 70#define IF_GET_IFACE 0x0001 /* for querying only */
70#define IF_GET_PROTO 0x0002 71#define IF_GET_PROTO 0x0002
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 4d3401812e6c..5ff89809a581 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -87,6 +87,9 @@
87#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ 87#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */
88#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ 88#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */
89 89
90#define ARPHRD_PHONET 820 /* PhoNet media type */
91#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */
92
90#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ 93#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */
91#define ARPHRD_NONE 0xFFFE /* zero header length */ 94#define ARPHRD_NONE 0xFFFE /* zero header length */
92 95
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 9e7b49b8062d..a5cb0c3f6dcf 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev);
114 114
115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
116 u16 vlan_tci, int polling); 116 u16 vlan_tci, int polling);
117extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
118
117#else 119#else
118static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) 120static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
119{ 121{
@@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
133 BUG(); 135 BUG();
134 return NET_XMIT_SUCCESS; 136 return NET_XMIT_SUCCESS;
135} 137}
138
139static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
140{
141 return 0;
142}
136#endif 143#endif
137 144
138/** 145/**
diff --git a/include/linux/in.h b/include/linux/in.h
index db458beef19d..d60122a3a088 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -80,6 +80,10 @@ struct in_addr {
80/* BSD compatibility */ 80/* BSD compatibility */
81#define IP_RECVRETOPTS IP_RETOPTS 81#define IP_RECVRETOPTS IP_RETOPTS
82 82
83/* TProxy original addresses */
84#define IP_ORIGDSTADDR 20
85#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
86
83/* IP_MTU_DISCOVER values */ 87/* IP_MTU_DISCOVER values */
84#define IP_PMTUDISC_DONT 0 /* Never send DF frames */ 88#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
85#define IP_PMTUDISC_WANT 1 /* Use per route hints */ 89#define IP_PMTUDISC_WANT 1 /* Use per route hints */
diff --git a/include/linux/init.h b/include/linux/init.h
index 93538b696e3d..68cb0265d009 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -40,7 +40,7 @@
40 40
41/* These are for everybody (although not all archs will actually 41/* These are for everybody (although not all archs will actually
42 discard it in modules) */ 42 discard it in modules) */
43#define __init __section(.init.text) __cold 43#define __init __section(.init.text) __cold notrace
44#define __initdata __section(.init.data) 44#define __initdata __section(.init.data)
45#define __initconst __section(.init.rodata) 45#define __initconst __section(.init.rodata)
46#define __exitdata __section(.exit.data) 46#define __exitdata __section(.exit.data)
@@ -112,21 +112,25 @@
112#define __FINIT .previous 112#define __FINIT .previous
113 113
114#define __INITDATA .section ".init.data","aw" 114#define __INITDATA .section ".init.data","aw"
115#define __INITRODATA .section ".init.rodata","a"
115#define __FINITDATA .previous 116#define __FINITDATA .previous
116 117
117#define __DEVINIT .section ".devinit.text", "ax" 118#define __DEVINIT .section ".devinit.text", "ax"
118#define __DEVINITDATA .section ".devinit.data", "aw" 119#define __DEVINITDATA .section ".devinit.data", "aw"
120#define __DEVINITRODATA .section ".devinit.rodata", "a"
119 121
120#define __CPUINIT .section ".cpuinit.text", "ax" 122#define __CPUINIT .section ".cpuinit.text", "ax"
121#define __CPUINITDATA .section ".cpuinit.data", "aw" 123#define __CPUINITDATA .section ".cpuinit.data", "aw"
124#define __CPUINITRODATA .section ".cpuinit.rodata", "a"
122 125
123#define __MEMINIT .section ".meminit.text", "ax" 126#define __MEMINIT .section ".meminit.text", "ax"
124#define __MEMINITDATA .section ".meminit.data", "aw" 127#define __MEMINITDATA .section ".meminit.data", "aw"
128#define __MEMINITRODATA .section ".meminit.rodata", "a"
125 129
126/* silence warnings when references are OK */ 130/* silence warnings when references are OK */
127#define __REF .section ".ref.text", "ax" 131#define __REF .section ".ref.text", "ax"
128#define __REFDATA .section ".ref.data", "aw" 132#define __REFDATA .section ".ref.data", "aw"
129#define __REFCONST .section ".ref.rodata", "aw" 133#define __REFCONST .section ".ref.rodata", "a"
130 134
131#ifndef __ASSEMBLY__ 135#ifndef __ASSEMBLY__
132/* 136/*
@@ -233,9 +237,6 @@ struct obs_kernel_param {
233 __attribute__((aligned((sizeof(long))))) \ 237 __attribute__((aligned((sizeof(long))))) \
234 = { __setup_str_##unique_id, fn, early } 238 = { __setup_str_##unique_id, fn, early }
235 239
236#define __setup_null_param(str, unique_id) \
237 __setup_param(str, unique_id, NULL, 0)
238
239#define __setup(str, fn) \ 240#define __setup(str, fn) \
240 __setup_param(str, fn, fn, 0) 241 __setup_param(str, fn, fn, 0)
241 242
@@ -296,7 +297,6 @@ void __init parse_early_param(void);
296 void cleanup_module(void) __attribute__((alias(#exitfn))); 297 void cleanup_module(void) __attribute__((alias(#exitfn)));
297 298
298#define __setup_param(str, unique_id, fn) /* nothing */ 299#define __setup_param(str, unique_id, fn) /* nothing */
299#define __setup_null_param(str, unique_id) /* nothing */
300#define __setup(str, func) /* nothing */ 300#define __setup(str, func) /* nothing */
301#endif 301#endif
302 302
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 021d8e720c79..959f5522d10a 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -57,7 +57,6 @@ extern struct nsproxy init_nsproxy;
57 .mnt_ns = NULL, \ 57 .mnt_ns = NULL, \
58 INIT_NET_NS(net_ns) \ 58 INIT_NET_NS(net_ns) \
59 INIT_IPC_NS(ipc_ns) \ 59 INIT_IPC_NS(ipc_ns) \
60 .user_ns = &init_user_ns, \
61} 60}
62 61
63#define INIT_SIGHAND(sighand) { \ 62#define INIT_SIGHAND(sighand) { \
@@ -113,6 +112,8 @@ extern struct group_info init_groups;
113# define CAP_INIT_BSET CAP_INIT_EFF_SET 112# define CAP_INIT_BSET CAP_INIT_EFF_SET
114#endif 113#endif
115 114
115extern struct cred init_cred;
116
116/* 117/*
117 * INIT_TASK is used to set up the first task table, touch at 118 * INIT_TASK is used to set up the first task table, touch at
118 * your own risk!. Base=0, limit=0x1fffff (=2MB) 119 * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -147,13 +148,10 @@ extern struct group_info init_groups;
147 .children = LIST_HEAD_INIT(tsk.children), \ 148 .children = LIST_HEAD_INIT(tsk.children), \
148 .sibling = LIST_HEAD_INIT(tsk.sibling), \ 149 .sibling = LIST_HEAD_INIT(tsk.sibling), \
149 .group_leader = &tsk, \ 150 .group_leader = &tsk, \
150 .group_info = &init_groups, \ 151 .real_cred = &init_cred, \
151 .cap_effective = CAP_INIT_EFF_SET, \ 152 .cred = &init_cred, \
152 .cap_inheritable = CAP_INIT_INH_SET, \ 153 .cred_exec_mutex = \
153 .cap_permitted = CAP_FULL_SET, \ 154 __MUTEX_INITIALIZER(tsk.cred_exec_mutex), \
154 .cap_bset = CAP_INIT_BSET, \
155 .securebits = SECUREBITS_DEFAULT, \
156 .user = INIT_USER, \
157 .comm = "swapper", \ 155 .comm = "swapper", \
158 .thread = INIT_THREAD, \ 156 .thread = INIT_THREAD, \
159 .fs = &init_fs, \ 157 .fs = &init_fs, \
@@ -170,6 +168,7 @@ extern struct group_info init_groups;
170 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ 168 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
171 .fs_excl = ATOMIC_INIT(0), \ 169 .fs_excl = ATOMIC_INIT(0), \
172 .pi_lock = __SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ 170 .pi_lock = __SPIN_LOCK_UNLOCKED(tsk.pi_lock), \
171 .timer_slack_ns = 50000, /* 50 usec default slack */ \
173 .pids = { \ 172 .pids = { \
174 [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \ 173 [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \
175 [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ 174 [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \
diff --git a/include/linux/inotify.h b/include/linux/inotify.h
index bd578578a8b9..37ea2894b3c0 100644
--- a/include/linux/inotify.h
+++ b/include/linux/inotify.h
@@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(struct inotify_handle *,
134 struct inotify_watch *); 134 struct inotify_watch *);
135extern void get_inotify_watch(struct inotify_watch *); 135extern void get_inotify_watch(struct inotify_watch *);
136extern void put_inotify_watch(struct inotify_watch *); 136extern void put_inotify_watch(struct inotify_watch *);
137extern int pin_inotify_watch(struct inotify_watch *);
138extern void unpin_inotify_watch(struct inotify_watch *);
137 139
138#else 140#else
139 141
@@ -228,6 +230,15 @@ static inline void put_inotify_watch(struct inotify_watch *watch)
228{ 230{
229} 231}
230 232
233extern inline int pin_inotify_watch(struct inotify_watch *watch)
234{
235 return 0;
236}
237
238extern inline void unpin_inotify_watch(struct inotify_watch *watch)
239{
240}
241
231#endif /* CONFIG_INOTIFY */ 242#endif /* CONFIG_INOTIFY */
232 243
233#endif /* __KERNEL __ */ 244#endif /* __KERNEL __ */
diff --git a/include/linux/input.h b/include/linux/input.h
index a5802c9c81a4..9a6355f74db2 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -238,6 +238,7 @@ struct input_absinfo {
238#define KEY_KPEQUAL 117 238#define KEY_KPEQUAL 117
239#define KEY_KPPLUSMINUS 118 239#define KEY_KPPLUSMINUS 118
240#define KEY_PAUSE 119 240#define KEY_PAUSE 119
241#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */
241 242
242#define KEY_KPCOMMA 121 243#define KEY_KPCOMMA 121
243#define KEY_HANGEUL 122 244#define KEY_HANGEUL 122
@@ -322,6 +323,7 @@ struct input_absinfo {
322#define KEY_PAUSECD 201 323#define KEY_PAUSECD 201
323#define KEY_PROG3 202 324#define KEY_PROG3 202
324#define KEY_PROG4 203 325#define KEY_PROG4 203
326#define KEY_DASHBOARD 204 /* AL Dashboard */
325#define KEY_SUSPEND 205 327#define KEY_SUSPEND 205
326#define KEY_CLOSE 206 /* AC Close */ 328#define KEY_CLOSE 206 /* AC Close */
327#define KEY_PLAY 207 329#define KEY_PLAY 207
@@ -577,9 +579,22 @@ struct input_absinfo {
577#define KEY_BRL_DOT9 0x1f9 579#define KEY_BRL_DOT9 0x1f9
578#define KEY_BRL_DOT10 0x1fa 580#define KEY_BRL_DOT10 0x1fa
579 581
582#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */
583#define KEY_NUMERIC_1 0x201 /* and other keypads */
584#define KEY_NUMERIC_2 0x202
585#define KEY_NUMERIC_3 0x203
586#define KEY_NUMERIC_4 0x204
587#define KEY_NUMERIC_5 0x205
588#define KEY_NUMERIC_6 0x206
589#define KEY_NUMERIC_7 0x207
590#define KEY_NUMERIC_8 0x208
591#define KEY_NUMERIC_9 0x209
592#define KEY_NUMERIC_STAR 0x20a
593#define KEY_NUMERIC_POUND 0x20b
594
580/* We avoid low common keys in module aliases so they don't get huge. */ 595/* We avoid low common keys in module aliases so they don't get huge. */
581#define KEY_MIN_INTERESTING KEY_MUTE 596#define KEY_MIN_INTERESTING KEY_MUTE
582#define KEY_MAX 0x1ff 597#define KEY_MAX 0x2ff
583#define KEY_CNT (KEY_MAX+1) 598#define KEY_CNT (KEY_MAX+1)
584 599
585/* 600/*
@@ -644,6 +659,8 @@ struct input_absinfo {
644#define SW_RADIO SW_RFKILL_ALL /* deprecated */ 659#define SW_RADIO SW_RFKILL_ALL /* deprecated */
645#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ 660#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */
646#define SW_DOCK 0x05 /* set = plugged into dock */ 661#define SW_DOCK 0x05 /* set = plugged into dock */
662#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
663#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */
647#define SW_MAX 0x0f 664#define SW_MAX 0x0f
648#define SW_CNT (SW_MAX+1) 665#define SW_CNT (SW_MAX+1)
649 666
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
new file mode 100644
index 000000000000..3d017cfd245b
--- /dev/null
+++ b/include/linux/intel-iommu.h
@@ -0,0 +1,363 @@
1/*
2 * Copyright (c) 2006, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Copyright (C) 2006-2008 Intel Corporation
18 * Author: Ashok Raj <ashok.raj@intel.com>
19 * Author: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
20 */
21
22#ifndef _INTEL_IOMMU_H_
23#define _INTEL_IOMMU_H_
24
25#include <linux/types.h>
26#include <linux/msi.h>
27#include <linux/sysdev.h>
28#include <linux/iova.h>
29#include <linux/io.h>
30#include <linux/dma_remapping.h>
31#include <asm/cacheflush.h>
32#include <asm/iommu.h>
33
34/*
35 * Intel IOMMU register specification per version 1.0 public spec.
36 */
37
38#define DMAR_VER_REG 0x0 /* Arch version supported by this IOMMU */
39#define DMAR_CAP_REG 0x8 /* Hardware supported capabilities */
40#define DMAR_ECAP_REG 0x10 /* Extended capabilities supported */
41#define DMAR_GCMD_REG 0x18 /* Global command register */
42#define DMAR_GSTS_REG 0x1c /* Global status register */
43#define DMAR_RTADDR_REG 0x20 /* Root entry table */
44#define DMAR_CCMD_REG 0x28 /* Context command reg */
45#define DMAR_FSTS_REG 0x34 /* Fault Status register */
46#define DMAR_FECTL_REG 0x38 /* Fault control register */
47#define DMAR_FEDATA_REG 0x3c /* Fault event interrupt data register */
48#define DMAR_FEADDR_REG 0x40 /* Fault event interrupt addr register */
49#define DMAR_FEUADDR_REG 0x44 /* Upper address register */
50#define DMAR_AFLOG_REG 0x58 /* Advanced Fault control */
51#define DMAR_PMEN_REG 0x64 /* Enable Protected Memory Region */
52#define DMAR_PLMBASE_REG 0x68 /* PMRR Low addr */
53#define DMAR_PLMLIMIT_REG 0x6c /* PMRR low limit */
54#define DMAR_PHMBASE_REG 0x70 /* pmrr high base addr */
55#define DMAR_PHMLIMIT_REG 0x78 /* pmrr high limit */
56#define DMAR_IQH_REG 0x80 /* Invalidation queue head register */
57#define DMAR_IQT_REG 0x88 /* Invalidation queue tail register */
58#define DMAR_IQA_REG 0x90 /* Invalidation queue addr register */
59#define DMAR_ICS_REG 0x98 /* Invalidation complete status register */
60#define DMAR_IRTA_REG 0xb8 /* Interrupt remapping table addr register */
61
62#define OFFSET_STRIDE (9)
63/*
64#define dmar_readl(dmar, reg) readl(dmar + reg)
65#define dmar_readq(dmar, reg) ({ \
66 u32 lo, hi; \
67 lo = readl(dmar + reg); \
68 hi = readl(dmar + reg + 4); \
69 (((u64) hi) << 32) + lo; })
70*/
71static inline u64 dmar_readq(void __iomem *addr)
72{
73 u32 lo, hi;
74 lo = readl(addr);
75 hi = readl(addr + 4);
76 return (((u64) hi) << 32) + lo;
77}
78
79static inline void dmar_writeq(void __iomem *addr, u64 val)
80{
81 writel((u32)val, addr);
82 writel((u32)(val >> 32), addr + 4);
83}
84
85#define DMAR_VER_MAJOR(v) (((v) & 0xf0) >> 4)
86#define DMAR_VER_MINOR(v) ((v) & 0x0f)
87
88/*
89 * Decoding Capability Register
90 */
91#define cap_read_drain(c) (((c) >> 55) & 1)
92#define cap_write_drain(c) (((c) >> 54) & 1)
93#define cap_max_amask_val(c) (((c) >> 48) & 0x3f)
94#define cap_num_fault_regs(c) ((((c) >> 40) & 0xff) + 1)
95#define cap_pgsel_inv(c) (((c) >> 39) & 1)
96
97#define cap_super_page_val(c) (((c) >> 34) & 0xf)
98#define cap_super_offset(c) (((find_first_bit(&cap_super_page_val(c), 4)) \
99 * OFFSET_STRIDE) + 21)
100
101#define cap_fault_reg_offset(c) ((((c) >> 24) & 0x3ff) * 16)
102#define cap_max_fault_reg_offset(c) \
103 (cap_fault_reg_offset(c) + cap_num_fault_regs(c) * 16)
104
105#define cap_zlr(c) (((c) >> 22) & 1)
106#define cap_isoch(c) (((c) >> 23) & 1)
107#define cap_mgaw(c) ((((c) >> 16) & 0x3f) + 1)
108#define cap_sagaw(c) (((c) >> 8) & 0x1f)
109#define cap_caching_mode(c) (((c) >> 7) & 1)
110#define cap_phmr(c) (((c) >> 6) & 1)
111#define cap_plmr(c) (((c) >> 5) & 1)
112#define cap_rwbf(c) (((c) >> 4) & 1)
113#define cap_afl(c) (((c) >> 3) & 1)
114#define cap_ndoms(c) (((unsigned long)1) << (4 + 2 * ((c) & 0x7)))
115/*
116 * Extended Capability Register
117 */
118
119#define ecap_niotlb_iunits(e) ((((e) >> 24) & 0xff) + 1)
120#define ecap_iotlb_offset(e) ((((e) >> 8) & 0x3ff) * 16)
121#define ecap_max_iotlb_offset(e) \
122 (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16)
123#define ecap_coherent(e) ((e) & 0x1)
124#define ecap_qis(e) ((e) & 0x2)
125#define ecap_eim_support(e) ((e >> 4) & 0x1)
126#define ecap_ir_support(e) ((e >> 3) & 0x1)
127#define ecap_max_handle_mask(e) ((e >> 20) & 0xf)
128
129
130/* IOTLB_REG */
131#define DMA_TLB_FLUSH_GRANU_OFFSET 60
132#define DMA_TLB_GLOBAL_FLUSH (((u64)1) << 60)
133#define DMA_TLB_DSI_FLUSH (((u64)2) << 60)
134#define DMA_TLB_PSI_FLUSH (((u64)3) << 60)
135#define DMA_TLB_IIRG(type) ((type >> 60) & 7)
136#define DMA_TLB_IAIG(val) (((val) >> 57) & 7)
137#define DMA_TLB_READ_DRAIN (((u64)1) << 49)
138#define DMA_TLB_WRITE_DRAIN (((u64)1) << 48)
139#define DMA_TLB_DID(id) (((u64)((id) & 0xffff)) << 32)
140#define DMA_TLB_IVT (((u64)1) << 63)
141#define DMA_TLB_IH_NONLEAF (((u64)1) << 6)
142#define DMA_TLB_MAX_SIZE (0x3f)
143
144/* INVALID_DESC */
145#define DMA_CCMD_INVL_GRANU_OFFSET 61
146#define DMA_ID_TLB_GLOBAL_FLUSH (((u64)1) << 3)
147#define DMA_ID_TLB_DSI_FLUSH (((u64)2) << 3)
148#define DMA_ID_TLB_PSI_FLUSH (((u64)3) << 3)
149#define DMA_ID_TLB_READ_DRAIN (((u64)1) << 7)
150#define DMA_ID_TLB_WRITE_DRAIN (((u64)1) << 6)
151#define DMA_ID_TLB_DID(id) (((u64)((id & 0xffff) << 16)))
152#define DMA_ID_TLB_IH_NONLEAF (((u64)1) << 6)
153#define DMA_ID_TLB_ADDR(addr) (addr)
154#define DMA_ID_TLB_ADDR_MASK(mask) (mask)
155
156/* PMEN_REG */
157#define DMA_PMEN_EPM (((u32)1)<<31)
158#define DMA_PMEN_PRS (((u32)1)<<0)
159
160/* GCMD_REG */
161#define DMA_GCMD_TE (((u32)1) << 31)
162#define DMA_GCMD_SRTP (((u32)1) << 30)
163#define DMA_GCMD_SFL (((u32)1) << 29)
164#define DMA_GCMD_EAFL (((u32)1) << 28)
165#define DMA_GCMD_WBF (((u32)1) << 27)
166#define DMA_GCMD_QIE (((u32)1) << 26)
167#define DMA_GCMD_SIRTP (((u32)1) << 24)
168#define DMA_GCMD_IRE (((u32) 1) << 25)
169
170/* GSTS_REG */
171#define DMA_GSTS_TES (((u32)1) << 31)
172#define DMA_GSTS_RTPS (((u32)1) << 30)
173#define DMA_GSTS_FLS (((u32)1) << 29)
174#define DMA_GSTS_AFLS (((u32)1) << 28)
175#define DMA_GSTS_WBFS (((u32)1) << 27)
176#define DMA_GSTS_QIES (((u32)1) << 26)
177#define DMA_GSTS_IRTPS (((u32)1) << 24)
178#define DMA_GSTS_IRES (((u32)1) << 25)
179
180/* CCMD_REG */
181#define DMA_CCMD_ICC (((u64)1) << 63)
182#define DMA_CCMD_GLOBAL_INVL (((u64)1) << 61)
183#define DMA_CCMD_DOMAIN_INVL (((u64)2) << 61)
184#define DMA_CCMD_DEVICE_INVL (((u64)3) << 61)
185#define DMA_CCMD_FM(m) (((u64)((m) & 0x3)) << 32)
186#define DMA_CCMD_MASK_NOBIT 0
187#define DMA_CCMD_MASK_1BIT 1
188#define DMA_CCMD_MASK_2BIT 2
189#define DMA_CCMD_MASK_3BIT 3
190#define DMA_CCMD_SID(s) (((u64)((s) & 0xffff)) << 16)
191#define DMA_CCMD_DID(d) ((u64)((d) & 0xffff))
192
193/* FECTL_REG */
194#define DMA_FECTL_IM (((u32)1) << 31)
195
196/* FSTS_REG */
197#define DMA_FSTS_PPF ((u32)2)
198#define DMA_FSTS_PFO ((u32)1)
199#define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff)
200
201/* FRCD_REG, 32 bits access */
202#define DMA_FRCD_F (((u32)1) << 31)
203#define dma_frcd_type(d) ((d >> 30) & 1)
204#define dma_frcd_fault_reason(c) (c & 0xff)
205#define dma_frcd_source_id(c) (c & 0xffff)
206/* low 64 bit */
207#define dma_frcd_page_addr(d) (d & (((u64)-1) << PAGE_SHIFT))
208
209#define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
210do { \
211 cycles_t start_time = get_cycles(); \
212 while (1) { \
213 sts = op(iommu->reg + offset); \
214 if (cond) \
215 break; \
216 if (DMAR_OPERATION_TIMEOUT < (get_cycles() - start_time))\
217 panic("DMAR hardware is malfunctioning\n"); \
218 cpu_relax(); \
219 } \
220} while (0)
221
222#define QI_LENGTH 256 /* queue length */
223
224enum {
225 QI_FREE,
226 QI_IN_USE,
227 QI_DONE
228};
229
230#define QI_CC_TYPE 0x1
231#define QI_IOTLB_TYPE 0x2
232#define QI_DIOTLB_TYPE 0x3
233#define QI_IEC_TYPE 0x4
234#define QI_IWD_TYPE 0x5
235
236#define QI_IEC_SELECTIVE (((u64)1) << 4)
237#define QI_IEC_IIDEX(idx) (((u64)(idx & 0xffff) << 32))
238#define QI_IEC_IM(m) (((u64)(m & 0x1f) << 27))
239
240#define QI_IWD_STATUS_DATA(d) (((u64)d) << 32)
241#define QI_IWD_STATUS_WRITE (((u64)1) << 5)
242
243#define QI_IOTLB_DID(did) (((u64)did) << 16)
244#define QI_IOTLB_DR(dr) (((u64)dr) << 7)
245#define QI_IOTLB_DW(dw) (((u64)dw) << 6)
246#define QI_IOTLB_GRAN(gran) (((u64)gran) >> (DMA_TLB_FLUSH_GRANU_OFFSET-4))
247#define QI_IOTLB_ADDR(addr) (((u64)addr) & VTD_PAGE_MASK)
248#define QI_IOTLB_IH(ih) (((u64)ih) << 6)
249#define QI_IOTLB_AM(am) (((u8)am))
250
251#define QI_CC_FM(fm) (((u64)fm) << 48)
252#define QI_CC_SID(sid) (((u64)sid) << 32)
253#define QI_CC_DID(did) (((u64)did) << 16)
254#define QI_CC_GRAN(gran) (((u64)gran) >> (DMA_CCMD_INVL_GRANU_OFFSET-4))
255
256struct qi_desc {
257 u64 low, high;
258};
259
260struct q_inval {
261 spinlock_t q_lock;
262 struct qi_desc *desc; /* invalidation queue */
263 int *desc_status; /* desc status */
264 int free_head; /* first free entry */
265 int free_tail; /* last free entry */
266 int free_cnt;
267};
268
269#ifdef CONFIG_INTR_REMAP
270/* 1MB - maximum possible interrupt remapping table size */
271#define INTR_REMAP_PAGE_ORDER 8
272#define INTR_REMAP_TABLE_REG_SIZE 0xf
273
274#define INTR_REMAP_TABLE_ENTRIES 65536
275
276struct ir_table {
277 struct irte *base;
278};
279#endif
280
281struct iommu_flush {
282 int (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, u8 fm,
283 u64 type, int non_present_entry_flush);
284 int (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr,
285 unsigned int size_order, u64 type, int non_present_entry_flush);
286};
287
288struct intel_iommu {
289 void __iomem *reg; /* Pointer to hardware regs, virtual addr */
290 u64 cap;
291 u64 ecap;
292 int seg;
293 u32 gcmd; /* Holds TE, EAFL. Don't need SRTP, SFL, WBF */
294 spinlock_t register_lock; /* protect register handling */
295 int seq_id; /* sequence id of the iommu */
296
297#ifdef CONFIG_DMAR
298 unsigned long *domain_ids; /* bitmap of domains */
299 struct dmar_domain **domains; /* ptr to domains */
300 spinlock_t lock; /* protect context, domain ids */
301 struct root_entry *root_entry; /* virtual address */
302
303 unsigned int irq;
304 unsigned char name[7]; /* Device Name */
305 struct msi_msg saved_msg;
306 struct sys_device sysdev;
307 struct iommu_flush flush;
308#endif
309 struct q_inval *qi; /* Queued invalidation info */
310#ifdef CONFIG_INTR_REMAP
311 struct ir_table *ir_table; /* Interrupt remapping info */
312#endif
313};
314
315static inline void __iommu_flush_cache(
316 struct intel_iommu *iommu, void *addr, int size)
317{
318 if (!ecap_coherent(iommu->ecap))
319 clflush_cache_range(addr, size);
320}
321
322extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev);
323
324extern int alloc_iommu(struct dmar_drhd_unit *drhd);
325extern void free_iommu(struct intel_iommu *iommu);
326extern int dmar_enable_qi(struct intel_iommu *iommu);
327extern void qi_global_iec(struct intel_iommu *iommu);
328
329extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid,
330 u8 fm, u64 type, int non_present_entry_flush);
331extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
332 unsigned int size_order, u64 type,
333 int non_present_entry_flush);
334
335extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
336
337void intel_iommu_domain_exit(struct dmar_domain *domain);
338struct dmar_domain *intel_iommu_domain_alloc(struct pci_dev *pdev);
339int intel_iommu_context_mapping(struct dmar_domain *domain,
340 struct pci_dev *pdev);
341int intel_iommu_page_mapping(struct dmar_domain *domain, dma_addr_t iova,
342 u64 hpa, size_t size, int prot);
343void intel_iommu_detach_dev(struct dmar_domain *domain, u8 bus, u8 devfn);
344struct dmar_domain *intel_iommu_find_domain(struct pci_dev *pdev);
345u64 intel_iommu_iova_to_pfn(struct dmar_domain *domain, u64 iova);
346
347#ifdef CONFIG_DMAR
348int intel_iommu_found(void);
349#else /* CONFIG_DMAR */
350static inline int intel_iommu_found(void)
351{
352 return 0;
353}
354#endif /* CONFIG_DMAR */
355
356extern void *intel_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t);
357extern void intel_free_coherent(struct device *, size_t, void *, dma_addr_t);
358extern dma_addr_t intel_map_single(struct device *, phys_addr_t, size_t, int);
359extern void intel_unmap_single(struct device *, dma_addr_t, size_t, int);
360extern int intel_map_sg(struct device *, struct scatterlist *, int, int);
361extern void intel_unmap_sg(struct device *, struct scatterlist *, int, int);
362
363#endif
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 58ff4e74b2f3..be3c484b5242 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -8,9 +8,14 @@
8#include <linux/preempt.h> 8#include <linux/preempt.h>
9#include <linux/cpumask.h> 9#include <linux/cpumask.h>
10#include <linux/irqreturn.h> 10#include <linux/irqreturn.h>
11#include <linux/irqnr.h>
11#include <linux/hardirq.h> 12#include <linux/hardirq.h>
12#include <linux/sched.h> 13#include <linux/sched.h>
13#include <linux/irqflags.h> 14#include <linux/irqflags.h>
15#include <linux/smp.h>
16#include <linux/percpu.h>
17#include <linux/irqnr.h>
18
14#include <asm/atomic.h> 19#include <asm/atomic.h>
15#include <asm/ptrace.h> 20#include <asm/ptrace.h>
16#include <asm/system.h> 21#include <asm/system.h>
@@ -248,10 +253,9 @@ enum
248 BLOCK_SOFTIRQ, 253 BLOCK_SOFTIRQ,
249 TASKLET_SOFTIRQ, 254 TASKLET_SOFTIRQ,
250 SCHED_SOFTIRQ, 255 SCHED_SOFTIRQ,
251#ifdef CONFIG_HIGH_RES_TIMERS
252 HRTIMER_SOFTIRQ,
253#endif
254 RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */ 256 RCU_SOFTIRQ, /* Preferable RCU should always be the last softirq */
257
258 NR_SOFTIRQS
255}; 259};
256 260
257/* softirq mask and active fields moved to irq_cpustat_t in 261/* softirq mask and active fields moved to irq_cpustat_t in
@@ -271,6 +275,25 @@ extern void softirq_init(void);
271extern void raise_softirq_irqoff(unsigned int nr); 275extern void raise_softirq_irqoff(unsigned int nr);
272extern void raise_softirq(unsigned int nr); 276extern void raise_softirq(unsigned int nr);
273 277
278/* This is the worklist that queues up per-cpu softirq work.
279 *
280 * send_remote_sendirq() adds work to these lists, and
281 * the softirq handler itself dequeues from them. The queues
282 * are protected by disabling local cpu interrupts and they must
283 * only be accessed by the local cpu that they are for.
284 */
285DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list);
286
287/* Try to send a softirq to a remote cpu. If this cannot be done, the
288 * work will be queued to the local cpu.
289 */
290extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq);
291
292/* Like send_remote_softirq(), but the caller must disable local cpu interrupts
293 * and compute the current cpu, passed in as 'this_cpu'.
294 */
295extern void __send_remote_softirq(struct call_single_data *cp, int cpu,
296 int this_cpu, int softirq);
274 297
275/* Tasklets --- multithreaded analogue of BHs. 298/* Tasklets --- multithreaded analogue of BHs.
276 299
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
new file mode 100644
index 000000000000..82df31726a54
--- /dev/null
+++ b/include/linux/io-mapping.h
@@ -0,0 +1,125 @@
1/*
2 * Copyright © 2008 Keith Packard <keithp@keithp.com>
3 *
4 * This file is free software; you can redistribute it and/or modify
5 * it under the terms of version 2 of the GNU General Public License
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
16 */
17
18#ifndef _LINUX_IO_MAPPING_H
19#define _LINUX_IO_MAPPING_H
20
21#include <linux/types.h>
22#include <asm/io.h>
23#include <asm/page.h>
24#include <asm/iomap.h>
25
26/*
27 * The io_mapping mechanism provides an abstraction for mapping
28 * individual pages from an io device to the CPU in an efficient fashion.
29 *
30 * See Documentation/io_mapping.txt
31 */
32
33/* this struct isn't actually defined anywhere */
34struct io_mapping;
35
36#ifdef CONFIG_HAVE_ATOMIC_IOMAP
37
38/*
39 * For small address space machines, mapping large objects
40 * into the kernel virtual space isn't practical. Where
41 * available, use fixmap support to dynamically map pages
42 * of the object at run time.
43 */
44
45static inline struct io_mapping *
46io_mapping_create_wc(unsigned long base, unsigned long size)
47{
48 return (struct io_mapping *) base;
49}
50
51static inline void
52io_mapping_free(struct io_mapping *mapping)
53{
54}
55
56/* Atomic map/unmap */
57static inline void *
58io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset)
59{
60 offset += (unsigned long) mapping;
61 return iomap_atomic_prot_pfn(offset >> PAGE_SHIFT, KM_USER0,
62 __pgprot(__PAGE_KERNEL_WC));
63}
64
65static inline void
66io_mapping_unmap_atomic(void *vaddr)
67{
68 iounmap_atomic(vaddr, KM_USER0);
69}
70
71static inline void *
72io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
73{
74 offset += (unsigned long) mapping;
75 return ioremap_wc(offset, PAGE_SIZE);
76}
77
78static inline void
79io_mapping_unmap(void *vaddr)
80{
81 iounmap(vaddr);
82}
83
84#else
85
86/* Create the io_mapping object*/
87static inline struct io_mapping *
88io_mapping_create_wc(unsigned long base, unsigned long size)
89{
90 return (struct io_mapping *) ioremap_wc(base, size);
91}
92
93static inline void
94io_mapping_free(struct io_mapping *mapping)
95{
96 iounmap(mapping);
97}
98
99/* Atomic map/unmap */
100static inline void *
101io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset)
102{
103 return ((char *) mapping) + offset;
104}
105
106static inline void
107io_mapping_unmap_atomic(void *vaddr)
108{
109}
110
111/* Non-atomic map/unmap */
112static inline void *
113io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
114{
115 return ((char *) mapping) + offset;
116}
117
118static inline void
119io_mapping_unmap(void *vaddr)
120{
121}
122
123#endif /* HAVE_ATOMIC_IOMAP */
124
125#endif /* _LINUX_IO_MAPPING_H */
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index a6d0586e2bf7..3b068e5b5671 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -23,4 +23,7 @@ extern unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
23extern void iommu_area_free(unsigned long *map, unsigned long start, 23extern void iommu_area_free(unsigned long *map, unsigned long start,
24 unsigned int nr); 24 unsigned int nr);
25 25
26extern unsigned long iommu_num_pages(unsigned long addr, unsigned long len,
27 unsigned long io_page_size);
28
26#endif 29#endif
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index ee9bcc6f32b6..041e95aac2bf 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -34,7 +34,8 @@ struct resource_list {
34 */ 34 */
35#define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ 35#define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */
36 36
37#define IORESOURCE_IO 0x00000100 /* Resource type */ 37#define IORESOURCE_TYPE_BITS 0x00000f00 /* Resource type */
38#define IORESOURCE_IO 0x00000100
38#define IORESOURCE_MEM 0x00000200 39#define IORESOURCE_MEM 0x00000200
39#define IORESOURCE_IRQ 0x00000400 40#define IORESOURCE_IRQ 0x00000400
40#define IORESOURCE_DMA 0x00000800 41#define IORESOURCE_DMA 0x00000800
@@ -126,6 +127,10 @@ static inline resource_size_t resource_size(struct resource *res)
126{ 127{
127 return res->end - res->start + 1; 128 return res->end - res->start + 1;
128} 129}
130static inline unsigned long resource_type(struct resource *res)
131{
132 return res->flags & IORESOURCE_TYPE_BITS;
133}
129 134
130/* Convenience shorthand with allocation */ 135/* Convenience shorthand with allocation */
131#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) 136#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
@@ -169,6 +174,7 @@ extern struct resource * __devm_request_region(struct device *dev,
169 174
170extern void __devm_release_region(struct device *dev, struct resource *parent, 175extern void __devm_release_region(struct device *dev, struct resource *parent,
171 resource_size_t start, resource_size_t n); 176 resource_size_t start, resource_size_t n);
177extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size);
172 178
173#endif /* __ASSEMBLY__ */ 179#endif /* __ASSEMBLY__ */
174#endif /* _LINUX_IOPORT_H */ 180#endif /* _LINUX_IOPORT_H */
diff --git a/include/linux/iova.h b/include/linux/iova.h
new file mode 100644
index 000000000000..228f6c94b69c
--- /dev/null
+++ b/include/linux/iova.h
@@ -0,0 +1,52 @@
1/*
2 * Copyright (c) 2006, Intel Corporation.
3 *
4 * This file is released under the GPLv2.
5 *
6 * Copyright (C) 2006-2008 Intel Corporation
7 * Author: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
8 *
9 */
10
11#ifndef _IOVA_H_
12#define _IOVA_H_
13
14#include <linux/types.h>
15#include <linux/kernel.h>
16#include <linux/rbtree.h>
17#include <linux/dma-mapping.h>
18
19/* IO virtual address start page frame number */
20#define IOVA_START_PFN (1)
21
22/* iova structure */
23struct iova {
24 struct rb_node node;
25 unsigned long pfn_hi; /* IOMMU dish out addr hi */
26 unsigned long pfn_lo; /* IOMMU dish out addr lo */
27};
28
29/* holds all the iova translations for a domain */
30struct iova_domain {
31 spinlock_t iova_alloc_lock;/* Lock to protect iova allocation */
32 spinlock_t iova_rbtree_lock; /* Lock to protect update of rbtree */
33 struct rb_root rbroot; /* iova domain rbtree root */
34 struct rb_node *cached32_node; /* Save last alloced node */
35 unsigned long dma_32bit_pfn;
36};
37
38struct iova *alloc_iova_mem(void);
39void free_iova_mem(struct iova *iova);
40void free_iova(struct iova_domain *iovad, unsigned long pfn);
41void __free_iova(struct iova_domain *iovad, struct iova *iova);
42struct iova *alloc_iova(struct iova_domain *iovad, unsigned long size,
43 unsigned long limit_pfn,
44 bool size_aligned);
45struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo,
46 unsigned long pfn_hi);
47void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to);
48void init_iova_domain(struct iova_domain *iovad, unsigned long pfn_32bit);
49struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn);
50void put_iova_domain(struct iova_domain *iovad);
51
52#endif
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 641e026eee8f..0b816cae533e 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -278,6 +278,7 @@ struct ipv6_pinfo {
278 struct in6_addr saddr; 278 struct in6_addr saddr;
279 struct in6_addr rcv_saddr; 279 struct in6_addr rcv_saddr;
280 struct in6_addr daddr; 280 struct in6_addr daddr;
281 struct in6_pktinfo sticky_pktinfo;
281 struct in6_addr *daddr_cache; 282 struct in6_addr *daddr_cache;
282#ifdef CONFIG_IPV6_SUBTREES 283#ifdef CONFIG_IPV6_SUBTREES
283 struct in6_addr *saddr_cache; 284 struct in6_addr *saddr_cache;
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 8d9411bc60f6..98564dc64476 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -18,6 +18,7 @@
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/cpumask.h> 19#include <linux/cpumask.h>
20#include <linux/irqreturn.h> 20#include <linux/irqreturn.h>
21#include <linux/irqnr.h>
21#include <linux/errno.h> 22#include <linux/errno.h>
22 23
23#include <asm/irq.h> 24#include <asm/irq.h>
@@ -62,7 +63,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
62#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ 63#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
63#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ 64#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
64#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */ 65#define IRQ_SPURIOUS_DISABLED 0x00800000 /* IRQ was disabled by the spurious trap */
65#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */ 66#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
67#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
66 68
67#ifdef CONFIG_IRQ_PER_CPU 69#ifdef CONFIG_IRQ_PER_CPU
68# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 70# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
@@ -127,9 +129,14 @@ struct irq_chip {
127 const char *typename; 129 const char *typename;
128}; 130};
129 131
132struct timer_rand_state;
133struct irq_2_iommu;
130/** 134/**
131 * struct irq_desc - interrupt descriptor 135 * struct irq_desc - interrupt descriptor
132 * 136 * @irq: interrupt number for this descriptor
137 * @timer_rand_state: pointer to timer rand state struct
138 * @kstat_irqs: irq stats per cpu
139 * @irq_2_iommu: iommu with this irq
133 * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] 140 * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
134 * @chip: low level interrupt hardware access 141 * @chip: low level interrupt hardware access
135 * @msi_desc: MSI descriptor 142 * @msi_desc: MSI descriptor
@@ -141,17 +148,24 @@ struct irq_chip {
141 * @depth: disable-depth, for nested irq_disable() calls 148 * @depth: disable-depth, for nested irq_disable() calls
142 * @wake_depth: enable depth, for multiple set_irq_wake() callers 149 * @wake_depth: enable depth, for multiple set_irq_wake() callers
143 * @irq_count: stats field to detect stalled irqs 150 * @irq_count: stats field to detect stalled irqs
144 * @irqs_unhandled: stats field for spurious unhandled interrupts
145 * @last_unhandled: aging timer for unhandled count 151 * @last_unhandled: aging timer for unhandled count
152 * @irqs_unhandled: stats field for spurious unhandled interrupts
146 * @lock: locking for SMP 153 * @lock: locking for SMP
147 * @affinity: IRQ affinity on SMP 154 * @affinity: IRQ affinity on SMP
148 * @cpu: cpu index useful for balancing 155 * @cpu: cpu index useful for balancing
149 * @pending_mask: pending rebalanced interrupts 156 * @pending_mask: pending rebalanced interrupts
150 * @dir: /proc/irq/ procfs entry 157 * @dir: /proc/irq/ procfs entry
151 * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP
152 * @name: flow handler name for /proc/interrupts output 158 * @name: flow handler name for /proc/interrupts output
153 */ 159 */
154struct irq_desc { 160struct irq_desc {
161 unsigned int irq;
162#ifdef CONFIG_SPARSE_IRQ
163 struct timer_rand_state *timer_rand_state;
164 unsigned int *kstat_irqs;
165# ifdef CONFIG_INTR_REMAP
166 struct irq_2_iommu *irq_2_iommu;
167# endif
168#endif
155 irq_flow_handler_t handle_irq; 169 irq_flow_handler_t handle_irq;
156 struct irq_chip *chip; 170 struct irq_chip *chip;
157 struct msi_desc *msi_desc; 171 struct msi_desc *msi_desc;
@@ -163,14 +177,14 @@ struct irq_desc {
163 unsigned int depth; /* nested irq disables */ 177 unsigned int depth; /* nested irq disables */
164 unsigned int wake_depth; /* nested wake enables */ 178 unsigned int wake_depth; /* nested wake enables */
165 unsigned int irq_count; /* For detecting broken IRQs */ 179 unsigned int irq_count; /* For detecting broken IRQs */
166 unsigned int irqs_unhandled;
167 unsigned long last_unhandled; /* Aging timer for unhandled count */ 180 unsigned long last_unhandled; /* Aging timer for unhandled count */
181 unsigned int irqs_unhandled;
168 spinlock_t lock; 182 spinlock_t lock;
169#ifdef CONFIG_SMP 183#ifdef CONFIG_SMP
170 cpumask_t affinity; 184 cpumask_t affinity;
171 unsigned int cpu; 185 unsigned int cpu;
172#endif 186#endif
173#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) 187#ifdef CONFIG_GENERIC_PENDING_IRQ
174 cpumask_t pending_mask; 188 cpumask_t pending_mask;
175#endif 189#endif
176#ifdef CONFIG_PROC_FS 190#ifdef CONFIG_PROC_FS
@@ -179,8 +193,53 @@ struct irq_desc {
179 const char *name; 193 const char *name;
180} ____cacheline_internodealigned_in_smp; 194} ____cacheline_internodealigned_in_smp;
181 195
196extern void early_irq_init(void);
197extern void arch_early_irq_init(void);
198extern void arch_init_chip_data(struct irq_desc *desc, int cpu);
199extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
200 struct irq_desc *desc, int cpu);
201extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);
202
203#ifndef CONFIG_SPARSE_IRQ
182extern struct irq_desc irq_desc[NR_IRQS]; 204extern struct irq_desc irq_desc[NR_IRQS];
183 205
206static inline struct irq_desc *irq_to_desc(unsigned int irq)
207{
208 return (irq < NR_IRQS) ? irq_desc + irq : NULL;
209}
210static inline struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
211{
212 return irq_to_desc(irq);
213}
214
215#else
216
217extern struct irq_desc *irq_to_desc(unsigned int irq);
218extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
219extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);
220
221# define for_each_irq_desc(irq, desc) \
222 for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; irq++, desc = irq_to_desc(irq))
223# define for_each_irq_desc_reverse(irq, desc) \
224 for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; irq--, desc = irq_to_desc(irq))
225
226#define kstat_irqs_this_cpu(DESC) \
227 ((DESC)->kstat_irqs[smp_processor_id()])
228#define kstat_incr_irqs_this_cpu(irqno, DESC) \
229 ((DESC)->kstat_irqs[smp_processor_id()]++)
230
231#endif
232
233static inline struct irq_desc *
234irq_remap_to_desc(unsigned int irq, struct irq_desc *desc)
235{
236#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
237 return irq_to_desc(irq);
238#else
239 return desc;
240#endif
241}
242
184/* 243/*
185 * Migration helpers for obsolete names, they will go away: 244 * Migration helpers for obsolete names, they will go away:
186 */ 245 */
@@ -198,19 +257,14 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
198 257
199#ifdef CONFIG_GENERIC_HARDIRQS 258#ifdef CONFIG_GENERIC_HARDIRQS
200 259
201#ifndef handle_dynamic_tick
202# define handle_dynamic_tick(a) do { } while (0)
203#endif
204
205#ifdef CONFIG_SMP 260#ifdef CONFIG_SMP
206 261
207#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) 262#ifdef CONFIG_GENERIC_PENDING_IRQ
208 263
209void set_pending_irq(unsigned int irq, cpumask_t mask);
210void move_native_irq(int irq); 264void move_native_irq(int irq);
211void move_masked_irq(int irq); 265void move_masked_irq(int irq);
212 266
213#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */ 267#else /* CONFIG_GENERIC_PENDING_IRQ */
214 268
215static inline void move_irq(int irq) 269static inline void move_irq(int irq)
216{ 270{
@@ -224,10 +278,6 @@ static inline void move_masked_irq(int irq)
224{ 278{
225} 279}
226 280
227static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
228{
229}
230
231#endif /* CONFIG_GENERIC_PENDING_IRQ */ 281#endif /* CONFIG_GENERIC_PENDING_IRQ */
232 282
233#else /* CONFIG_SMP */ 283#else /* CONFIG_SMP */
@@ -237,19 +287,14 @@ static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
237 287
238#endif /* CONFIG_SMP */ 288#endif /* CONFIG_SMP */
239 289
240#ifdef CONFIG_IRQBALANCE
241extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask);
242#else
243static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
244{
245}
246#endif
247
248extern int no_irq_affinity; 290extern int no_irq_affinity;
249 291
250static inline int irq_balancing_disabled(unsigned int irq) 292static inline int irq_balancing_disabled(unsigned int irq)
251{ 293{
252 return irq_desc[irq].status & IRQ_NO_BALANCING_MASK; 294 struct irq_desc *desc;
295
296 desc = irq_to_desc(irq);
297 return desc->status & IRQ_NO_BALANCING_MASK;
253} 298}
254 299
255/* Handle irq action chains: */ 300/* Handle irq action chains: */
@@ -279,10 +324,8 @@ extern unsigned int __do_IRQ(unsigned int irq);
279 * irqchip-style controller then we call the ->handle_irq() handler, 324 * irqchip-style controller then we call the ->handle_irq() handler,
280 * and it calls __do_IRQ() if it's attached to an irqtype-style controller. 325 * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
281 */ 326 */
282static inline void generic_handle_irq(unsigned int irq) 327static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc)
283{ 328{
284 struct irq_desc *desc = irq_desc + irq;
285
286#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ 329#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
287 desc->handle_irq(irq, desc); 330 desc->handle_irq(irq, desc);
288#else 331#else
@@ -293,6 +336,11 @@ static inline void generic_handle_irq(unsigned int irq)
293#endif 336#endif
294} 337}
295 338
339static inline void generic_handle_irq(unsigned int irq)
340{
341 generic_handle_irq_desc(irq, irq_to_desc(irq));
342}
343
296/* Handling of unhandled and spurious interrupts: */ 344/* Handling of unhandled and spurious interrupts: */
297extern void note_interrupt(unsigned int irq, struct irq_desc *desc, 345extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
298 int action_ret); 346 int action_ret);
@@ -325,7 +373,10 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
325static inline void __set_irq_handler_unlocked(int irq, 373static inline void __set_irq_handler_unlocked(int irq,
326 irq_flow_handler_t handler) 374 irq_flow_handler_t handler)
327{ 375{
328 irq_desc[irq].handle_irq = handler; 376 struct irq_desc *desc;
377
378 desc = irq_to_desc(irq);
379 desc->handle_irq = handler;
329} 380}
330 381
331/* 382/*
@@ -353,13 +404,14 @@ extern void set_irq_noprobe(unsigned int irq);
353extern void set_irq_probe(unsigned int irq); 404extern void set_irq_probe(unsigned int irq);
354 405
355/* Handle dynamic irq creation and destruction */ 406/* Handle dynamic irq creation and destruction */
407extern unsigned int create_irq_nr(unsigned int irq_want);
356extern int create_irq(void); 408extern int create_irq(void);
357extern void destroy_irq(unsigned int irq); 409extern void destroy_irq(unsigned int irq);
358 410
359/* Test to see if a driver has successfully requested an irq */ 411/* Test to see if a driver has successfully requested an irq */
360static inline int irq_has_action(unsigned int irq) 412static inline int irq_has_action(unsigned int irq)
361{ 413{
362 struct irq_desc *desc = irq_desc + irq; 414 struct irq_desc *desc = irq_to_desc(irq);
363 return desc->action != NULL; 415 return desc->action != NULL;
364} 416}
365 417
@@ -374,10 +426,15 @@ extern int set_irq_chip_data(unsigned int irq, void *data);
374extern int set_irq_type(unsigned int irq, unsigned int type); 426extern int set_irq_type(unsigned int irq, unsigned int type);
375extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); 427extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
376 428
377#define get_irq_chip(irq) (irq_desc[irq].chip) 429#define get_irq_chip(irq) (irq_to_desc(irq)->chip)
378#define get_irq_chip_data(irq) (irq_desc[irq].chip_data) 430#define get_irq_chip_data(irq) (irq_to_desc(irq)->chip_data)
379#define get_irq_data(irq) (irq_desc[irq].handler_data) 431#define get_irq_data(irq) (irq_to_desc(irq)->handler_data)
380#define get_irq_msi(irq) (irq_desc[irq].msi_desc) 432#define get_irq_msi(irq) (irq_to_desc(irq)->msi_desc)
433
434#define get_irq_desc_chip(desc) ((desc)->chip)
435#define get_irq_desc_chip_data(desc) ((desc)->chip_data)
436#define get_irq_desc_data(desc) ((desc)->handler_data)
437#define get_irq_desc_msi(desc) ((desc)->msi_desc)
381 438
382#endif /* CONFIG_GENERIC_HARDIRQS */ 439#endif /* CONFIG_GENERIC_HARDIRQS */
383 440
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
new file mode 100644
index 000000000000..95d2b74641f5
--- /dev/null
+++ b/include/linux/irqnr.h
@@ -0,0 +1,38 @@
1#ifndef _LINUX_IRQNR_H
2#define _LINUX_IRQNR_H
3
4/*
5 * Generic irq_desc iterators:
6 */
7#ifdef __KERNEL__
8
9#ifndef CONFIG_GENERIC_HARDIRQS
10#include <asm/irq.h>
11# define nr_irqs NR_IRQS
12
13# define for_each_irq_desc(irq, desc) \
14 for (irq = 0; irq < nr_irqs; irq++)
15
16# define for_each_irq_desc_reverse(irq, desc) \
17 for (irq = nr_irqs - 1; irq >= 0; irq--)
18#else
19
20extern int nr_irqs;
21
22#ifndef CONFIG_SPARSE_IRQ
23
24struct irq_desc;
25# define for_each_irq_desc(irq, desc) \
26 for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
27# define for_each_irq_desc_reverse(irq, desc) \
28 for (irq = nr_irqs - 1, desc = irq_desc + (nr_irqs - 1); \
29 irq >= 0; irq--, desc--)
30#endif
31#endif
32
33#define for_each_irq_nr(irq) \
34 for (irq = 0; irq < nr_irqs; irq++)
35
36#endif /* __KERNEL__ */
37
38#endif
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index 07a9b52a2654..346e2b80be7d 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -61,7 +61,7 @@ extern u8 journal_enable_debug;
61 do { \ 61 do { \
62 if ((n) <= journal_enable_debug) { \ 62 if ((n) <= journal_enable_debug) { \
63 printk (KERN_DEBUG "(%s, %d): %s: ", \ 63 printk (KERN_DEBUG "(%s, %d): %s: ", \
64 __FILE__, __LINE__, __FUNCTION__); \ 64 __FILE__, __LINE__, __func__); \
65 printk (f, ## a); \ 65 printk (f, ## a); \
66 } \ 66 } \
67 } while (0) 67 } while (0)
@@ -816,6 +816,9 @@ struct journal_s
816#define JFS_FLUSHED 0x008 /* The journal superblock has been flushed */ 816#define JFS_FLUSHED 0x008 /* The journal superblock has been flushed */
817#define JFS_LOADED 0x010 /* The journal superblock has been loaded */ 817#define JFS_LOADED 0x010 /* The journal superblock has been loaded */
818#define JFS_BARRIER 0x020 /* Use IDE barriers */ 818#define JFS_BARRIER 0x020 /* Use IDE barriers */
819#define JFS_ABORT_ON_SYNCDATA_ERR 0x040 /* Abort the journal on file
820 * data write error in ordered
821 * mode */
819 822
820/* 823/*
821 * Function declarations for the journaling transaction and buffer 824 * Function declarations for the journaling transaction and buffer
@@ -908,7 +911,7 @@ extern int journal_set_features
908 (journal_t *, unsigned long, unsigned long, unsigned long); 911 (journal_t *, unsigned long, unsigned long, unsigned long);
909extern int journal_create (journal_t *); 912extern int journal_create (journal_t *);
910extern int journal_load (journal_t *journal); 913extern int journal_load (journal_t *journal);
911extern void journal_destroy (journal_t *); 914extern int journal_destroy (journal_t *);
912extern int journal_recover (journal_t *journal); 915extern int journal_recover (journal_t *journal);
913extern int journal_wipe (journal_t *, int); 916extern int journal_wipe (journal_t *, int);
914extern int journal_skip_recovery (journal_t *); 917extern int journal_skip_recovery (journal_t *);
@@ -984,7 +987,7 @@ extern int cleanup_journal_tail(journal_t *);
984 987
985#define jbd_ENOSYS() \ 988#define jbd_ENOSYS() \
986do { \ 989do { \
987 printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \ 990 printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \
988 current->state = TASK_UNINTERRUPTIBLE; \ 991 current->state = TASK_UNINTERRUPTIBLE; \
989 schedule(); \ 992 schedule(); \
990} while (1) 993} while (1)
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index d2e91ea998fd..c7d106ef22e2 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -61,7 +61,7 @@ extern u8 jbd2_journal_enable_debug;
61 do { \ 61 do { \
62 if ((n) <= jbd2_journal_enable_debug) { \ 62 if ((n) <= jbd2_journal_enable_debug) { \
63 printk (KERN_DEBUG "(%s, %d): %s: ", \ 63 printk (KERN_DEBUG "(%s, %d): %s: ", \
64 __FILE__, __LINE__, __FUNCTION__); \ 64 __FILE__, __LINE__, __func__); \
65 printk (f, ## a); \ 65 printk (f, ## a); \
66 } \ 66 } \
67 } while (0) 67 } while (0)
@@ -641,6 +641,11 @@ struct transaction_s
641 */ 641 */
642 int t_handle_count; 642 int t_handle_count;
643 643
644 /*
645 * For use by the filesystem to store fs-specific data
646 * structures associated with the transaction
647 */
648 struct list_head t_private_list;
644}; 649};
645 650
646struct transaction_run_stats_s { 651struct transaction_run_stats_s {
@@ -935,6 +940,10 @@ struct journal_s
935 940
936 pid_t j_last_sync_writer; 941 pid_t j_last_sync_writer;
937 942
943 /* This function is called when a transaction is closed */
944 void (*j_commit_callback)(journal_t *,
945 transaction_t *);
946
938 /* 947 /*
939 * Journal statistics 948 * Journal statistics
940 */ 949 */
@@ -1143,7 +1152,7 @@ extern int jbd2_cleanup_journal_tail(journal_t *);
1143 1152
1144#define jbd_ENOSYS() \ 1153#define jbd_ENOSYS() \
1145do { \ 1154do { \
1146 printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \ 1155 printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \
1147 current->state = TASK_UNINTERRUPTIBLE; \ 1156 current->state = TASK_UNINTERRUPTIBLE; \
1148 schedule(); \ 1157 schedule(); \
1149} while (1) 1158} while (1)
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index abb6ac639e8e..1a9cf78bfce5 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -115,10 +115,20 @@ static inline u64 get_jiffies_64(void)
115 ((long)(a) - (long)(b) >= 0)) 115 ((long)(a) - (long)(b) >= 0))
116#define time_before_eq(a,b) time_after_eq(b,a) 116#define time_before_eq(a,b) time_after_eq(b,a)
117 117
118/*
119 * Calculate whether a is in the range of [b, c].
120 */
118#define time_in_range(a,b,c) \ 121#define time_in_range(a,b,c) \
119 (time_after_eq(a,b) && \ 122 (time_after_eq(a,b) && \
120 time_before_eq(a,c)) 123 time_before_eq(a,c))
121 124
125/*
126 * Calculate whether a is in the range of [b, c).
127 */
128#define time_in_range_open(a,b,c) \
129 (time_after_eq(a,b) && \
130 time_before(a,c))
131
122/* Same as above, but does so with platform independent 64bit types. 132/* Same as above, but does so with platform independent 64bit types.
123 * These must be used when utilizing jiffies_64 (i.e. return value of 133 * These must be used when utilizing jiffies_64 (i.e. return value of
124 * get_jiffies_64() */ 134 * get_jiffies_64() */
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h
index 8a62d1e84b9b..bb70ebb6a2d5 100644
--- a/include/linux/journal-head.h
+++ b/include/linux/journal-head.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * buffer_head fields for JBD 4 * buffer_head fields for JBD
5 * 5 *
6 * 27 May 2001 Andrew Morton <akpm@digeo.com> 6 * 27 May 2001 Andrew Morton
7 * Created - pulled out of fs.h 7 * Created - pulled out of fs.h
8 */ 8 */
9 9
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index b96144887444..f3fe34391d8e 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -93,12 +93,10 @@ static inline void print_symbol(const char *fmt, unsigned long addr)
93} 93}
94 94
95/* 95/*
96 * Pretty-print a function pointer. 96 * Pretty-print a function pointer. This function is deprecated.
97 * 97 * Please use the "%pF" vsprintf format instead.
98 * ia64 and ppc64 function pointers are really function descriptors,
99 * which contain a pointer the real address.
100 */ 98 */
101static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) 99static inline void __deprecated print_fn_descriptor_symbol(const char *fmt, void *addr)
102{ 100{
103#if defined(CONFIG_IA64) || defined(CONFIG_PPC64) 101#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
104 addr = *(void **)addr; 102 addr = *(void **)addr;
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 75d81f157d2e..ca9ff6411dfa 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -16,6 +16,7 @@
16#include <linux/log2.h> 16#include <linux/log2.h>
17#include <linux/typecheck.h> 17#include <linux/typecheck.h>
18#include <linux/ratelimit.h> 18#include <linux/ratelimit.h>
19#include <linux/dynamic_printk.h>
19#include <asm/byteorder.h> 20#include <asm/byteorder.h>
20#include <asm/bug.h> 21#include <asm/bug.h>
21 22
@@ -115,6 +116,8 @@ extern int _cond_resched(void);
115# define might_resched() do { } while (0) 116# define might_resched() do { } while (0)
116#endif 117#endif
117 118
119#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
120 void __might_sleep(char *file, int line);
118/** 121/**
119 * might_sleep - annotation for functions that can sleep 122 * might_sleep - annotation for functions that can sleep
120 * 123 *
@@ -125,8 +128,6 @@ extern int _cond_resched(void);
125 * be bitten later when the calling function happens to sleep when it is not 128 * be bitten later when the calling function happens to sleep when it is not
126 * supposed to. 129 * supposed to.
127 */ 130 */
128#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
129 void __might_sleep(char *file, int line);
130# define might_sleep() \ 131# define might_sleep() \
131 do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) 132 do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
132#else 133#else
@@ -140,6 +141,15 @@ extern int _cond_resched(void);
140 (__x < 0) ? -__x : __x; \ 141 (__x < 0) ? -__x : __x; \
141 }) 142 })
142 143
144#ifdef CONFIG_PROVE_LOCKING
145void might_fault(void);
146#else
147static inline void might_fault(void)
148{
149 might_sleep();
150}
151#endif
152
143extern struct atomic_notifier_head panic_notifier_list; 153extern struct atomic_notifier_head panic_notifier_list;
144extern long (*panic_blink)(long time); 154extern long (*panic_blink)(long time);
145NORET_TYPE void panic(const char * fmt, ...) 155NORET_TYPE void panic(const char * fmt, ...)
@@ -187,9 +197,35 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
187extern int core_kernel_text(unsigned long addr); 197extern int core_kernel_text(unsigned long addr);
188extern int __kernel_text_address(unsigned long addr); 198extern int __kernel_text_address(unsigned long addr);
189extern int kernel_text_address(unsigned long addr); 199extern int kernel_text_address(unsigned long addr);
200extern int func_ptr_is_kernel_text(void *ptr);
201
190struct pid; 202struct pid;
191extern struct pid *session_of_pgrp(struct pid *pgrp); 203extern struct pid *session_of_pgrp(struct pid *pgrp);
192 204
205/*
206 * FW_BUG
207 * Add this to a message where you are sure the firmware is buggy or behaves
208 * really stupid or out of spec. Be aware that the responsible BIOS developer
209 * should be able to fix this issue or at least get a concrete idea of the
210 * problem by reading your message without the need of looking at the kernel
211 * code.
212 *
213 * Use it for definite and high priority BIOS bugs.
214 *
215 * FW_WARN
216 * Use it for not that clear (e.g. could the kernel messed up things already?)
217 * and medium priority BIOS bugs.
218 *
219 * FW_INFO
220 * Use this one if you want to tell the user or vendor about something
221 * suspicious, but generally harmless related to the firmware.
222 *
223 * Use it for information or very low priority BIOS bugs.
224 */
225#define FW_BUG "[Firmware Bug]: "
226#define FW_WARN "[Firmware Warn]: "
227#define FW_INFO "[Firmware Info]: "
228
193#ifdef CONFIG_PRINTK 229#ifdef CONFIG_PRINTK
194asmlinkage int vprintk(const char *fmt, va_list args) 230asmlinkage int vprintk(const char *fmt, va_list args)
195 __attribute__ ((format (printf, 1, 0))); 231 __attribute__ ((format (printf, 1, 0)));
@@ -213,6 +249,9 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
213 { return false; } 249 { return false; }
214#endif 250#endif
215 251
252extern int printk_needs_cpu(int cpu);
253extern void printk_tick(void);
254
216extern void asmlinkage __attribute__((format(printf, 1, 2))) 255extern void asmlinkage __attribute__((format(printf, 1, 2)))
217 early_printk(const char *fmt, ...); 256 early_printk(const char *fmt, ...);
218 257
@@ -235,9 +274,10 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in
235extern int panic_timeout; 274extern int panic_timeout;
236extern int panic_on_oops; 275extern int panic_on_oops;
237extern int panic_on_unrecovered_nmi; 276extern int panic_on_unrecovered_nmi;
238extern int tainted;
239extern const char *print_tainted(void); 277extern const char *print_tainted(void);
240extern void add_taint(unsigned); 278extern void add_taint(unsigned flag);
279extern int test_taint(unsigned flag);
280extern unsigned long get_taint(void);
241extern int root_mountflags; 281extern int root_mountflags;
242 282
243/* Values used for system_state */ 283/* Values used for system_state */
@@ -250,16 +290,17 @@ extern enum system_states {
250 SYSTEM_SUSPEND_DISK, 290 SYSTEM_SUSPEND_DISK,
251} system_state; 291} system_state;
252 292
253#define TAINT_PROPRIETARY_MODULE (1<<0) 293#define TAINT_PROPRIETARY_MODULE 0
254#define TAINT_FORCED_MODULE (1<<1) 294#define TAINT_FORCED_MODULE 1
255#define TAINT_UNSAFE_SMP (1<<2) 295#define TAINT_UNSAFE_SMP 2
256#define TAINT_FORCED_RMMOD (1<<3) 296#define TAINT_FORCED_RMMOD 3
257#define TAINT_MACHINE_CHECK (1<<4) 297#define TAINT_MACHINE_CHECK 4
258#define TAINT_BAD_PAGE (1<<5) 298#define TAINT_BAD_PAGE 5
259#define TAINT_USER (1<<6) 299#define TAINT_USER 6
260#define TAINT_DIE (1<<7) 300#define TAINT_DIE 7
261#define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8) 301#define TAINT_OVERRIDDEN_ACPI_TABLE 8
262#define TAINT_WARN (1<<9) 302#define TAINT_WARN 9
303#define TAINT_CRAP 10
263 304
264extern void dump_stack(void) __cold; 305extern void dump_stack(void) __cold;
265 306
@@ -288,28 +329,36 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
288 return buf; 329 return buf;
289} 330}
290 331
291#define pr_emerg(fmt, arg...) \ 332#ifndef pr_fmt
292 printk(KERN_EMERG fmt, ##arg) 333#define pr_fmt(fmt) fmt
293#define pr_alert(fmt, arg...) \ 334#endif
294 printk(KERN_ALERT fmt, ##arg) 335
295#define pr_crit(fmt, arg...) \ 336#define pr_emerg(fmt, ...) \
296 printk(KERN_CRIT fmt, ##arg) 337 printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
297#define pr_err(fmt, arg...) \ 338#define pr_alert(fmt, ...) \
298 printk(KERN_ERR fmt, ##arg) 339 printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
299#define pr_warning(fmt, arg...) \ 340#define pr_crit(fmt, ...) \
300 printk(KERN_WARNING fmt, ##arg) 341 printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
301#define pr_notice(fmt, arg...) \ 342#define pr_err(fmt, ...) \
302 printk(KERN_NOTICE fmt, ##arg) 343 printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
303#define pr_info(fmt, arg...) \ 344#define pr_warning(fmt, ...) \
304 printk(KERN_INFO fmt, ##arg) 345 printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
305 346#define pr_notice(fmt, ...) \
306#ifdef DEBUG 347 printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
348#define pr_info(fmt, ...) \
349 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
350
307/* If you are writing a driver, please use dev_dbg instead */ 351/* If you are writing a driver, please use dev_dbg instead */
308#define pr_debug(fmt, arg...) \ 352#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
309 printk(KERN_DEBUG fmt, ##arg) 353#define pr_debug(fmt, ...) do { \
354 dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
355 } while (0)
356#elif defined(DEBUG)
357#define pr_debug(fmt, ...) \
358 printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
310#else 359#else
311#define pr_debug(fmt, arg...) \ 360#define pr_debug(fmt, ...) \
312 ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; }) 361 ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
313#endif 362#endif
314 363
315/* 364/*
@@ -323,18 +372,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
323 ((unsigned char *)&addr)[3] 372 ((unsigned char *)&addr)[3]
324#define NIPQUAD_FMT "%u.%u.%u.%u" 373#define NIPQUAD_FMT "%u.%u.%u.%u"
325 374
326#define NIP6(addr) \
327 ntohs((addr).s6_addr16[0]), \
328 ntohs((addr).s6_addr16[1]), \
329 ntohs((addr).s6_addr16[2]), \
330 ntohs((addr).s6_addr16[3]), \
331 ntohs((addr).s6_addr16[4]), \
332 ntohs((addr).s6_addr16[5]), \
333 ntohs((addr).s6_addr16[6]), \
334 ntohs((addr).s6_addr16[7])
335#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
336#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x"
337
338#if defined(__LITTLE_ENDIAN) 375#if defined(__LITTLE_ENDIAN)
339#define HIPQUAD(addr) \ 376#define HIPQUAD(addr) \
340 ((unsigned char *)&addr)[3], \ 377 ((unsigned char *)&addr)[3], \
@@ -486,4 +523,9 @@ struct sysinfo {
486#define NUMA_BUILD 0 523#define NUMA_BUILD 0
487#endif 524#endif
488 525
526/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */
527#ifdef CONFIG_FTRACE_MCOUNT_RECORD
528# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD
529#endif
530
489#endif 531#endif
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index cf9f40a91c9c..4ee4b3d2316f 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -28,7 +28,9 @@ struct cpu_usage_stat {
28 28
29struct kernel_stat { 29struct kernel_stat {
30 struct cpu_usage_stat cpustat; 30 struct cpu_usage_stat cpustat;
31 unsigned int irqs[NR_IRQS]; 31#ifndef CONFIG_SPARSE_IRQ
32 unsigned int irqs[NR_IRQS];
33#endif
32}; 34};
33 35
34DECLARE_PER_CPU(struct kernel_stat, kstat); 36DECLARE_PER_CPU(struct kernel_stat, kstat);
@@ -39,19 +41,44 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
39 41
40extern unsigned long long nr_context_switches(void); 42extern unsigned long long nr_context_switches(void);
41 43
44#ifndef CONFIG_SPARSE_IRQ
45#define kstat_irqs_this_cpu(irq) \
46 (kstat_this_cpu.irqs[irq])
47
48struct irq_desc;
49
50static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
51 struct irq_desc *desc)
52{
53 kstat_this_cpu.irqs[irq]++;
54}
55#endif
56
57
58#ifndef CONFIG_SPARSE_IRQ
59static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
60{
61 return kstat_cpu(cpu).irqs[irq];
62}
63#else
64extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
65#endif
66
42/* 67/*
43 * Number of interrupts per specific IRQ source, since bootup 68 * Number of interrupts per specific IRQ source, since bootup
44 */ 69 */
45static inline int kstat_irqs(int irq) 70static inline unsigned int kstat_irqs(unsigned int irq)
46{ 71{
47 int cpu, sum = 0; 72 unsigned int sum = 0;
73 int cpu;
48 74
49 for_each_possible_cpu(cpu) 75 for_each_possible_cpu(cpu)
50 sum += kstat_cpu(cpu).irqs[irq]; 76 sum += kstat_irqs_cpu(irq, cpu);
51 77
52 return sum; 78 return sum;
53} 79}
54 80
81extern unsigned long long task_delta_exec(struct task_struct *);
55extern void account_user_time(struct task_struct *, cputime_t); 82extern void account_user_time(struct task_struct *, cputime_t);
56extern void account_user_time_scaled(struct task_struct *, cputime_t); 83extern void account_user_time_scaled(struct task_struct *, cputime_t);
57extern void account_system_time(struct task_struct *, int, cputime_t); 84extern void account_system_time(struct task_struct *, int, cputime_t);
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 17f76fc05173..adc34f2c6eff 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -100,6 +100,10 @@ struct kimage {
100#define KEXEC_TYPE_DEFAULT 0 100#define KEXEC_TYPE_DEFAULT 0
101#define KEXEC_TYPE_CRASH 1 101#define KEXEC_TYPE_CRASH 1
102 unsigned int preserve_context : 1; 102 unsigned int preserve_context : 1;
103
104#ifdef ARCH_HAS_KIMAGE_ARCH
105 struct kimage_arch arch;
106#endif
103}; 107};
104 108
105 109
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h
deleted file mode 100644
index e8b8a7a5c496..000000000000
--- a/include/linux/key-ui.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/* key-ui.h: key userspace interface stuff
2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#ifndef _LINUX_KEY_UI_H
13#define _LINUX_KEY_UI_H
14
15#include <linux/key.h>
16
17/* the key tree */
18extern struct rb_root key_serial_tree;
19extern spinlock_t key_serial_lock;
20
21/* required permissions */
22#define KEY_VIEW 0x01 /* require permission to view attributes */
23#define KEY_READ 0x02 /* require permission to read content */
24#define KEY_WRITE 0x04 /* require permission to update / modify */
25#define KEY_SEARCH 0x08 /* require permission to search (keyring) or find (key) */
26#define KEY_LINK 0x10 /* require permission to link */
27#define KEY_SETATTR 0x20 /* require permission to change attributes */
28#define KEY_ALL 0x3f /* all the above permissions */
29
30/*
31 * the keyring payload contains a list of the keys to which the keyring is
32 * subscribed
33 */
34struct keyring_list {
35 struct rcu_head rcu; /* RCU deletion hook */
36 unsigned short maxkeys; /* max keys this list can hold */
37 unsigned short nkeys; /* number of keys currently held */
38 unsigned short delkey; /* key to be unlinked by RCU */
39 struct key *keys[0];
40};
41
42/*
43 * check to see whether permission is granted to use a key in the desired way
44 */
45extern int key_task_permission(const key_ref_t key_ref,
46 struct task_struct *context,
47 key_perm_t perm);
48
49static inline int key_permission(const key_ref_t key_ref, key_perm_t perm)
50{
51 return key_task_permission(key_ref, current, perm);
52}
53
54extern key_ref_t lookup_user_key(struct task_struct *context,
55 key_serial_t id, int create, int partial,
56 key_perm_t perm);
57
58extern long join_session_keyring(const char *name);
59
60extern struct key_type *key_type_lookup(const char *type);
61extern void key_type_put(struct key_type *ktype);
62
63#define key_negative_timeout 60 /* default timeout on a negative key's existence */
64
65
66#endif /* _LINUX_KEY_UI_H */
diff --git a/include/linux/key.h b/include/linux/key.h
index 1b70e35a71e3..21d32a142c00 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -73,6 +73,7 @@ struct key;
73struct seq_file; 73struct seq_file;
74struct user_struct; 74struct user_struct;
75struct signal_struct; 75struct signal_struct;
76struct cred;
76 77
77struct key_type; 78struct key_type;
78struct key_owner; 79struct key_owner;
@@ -181,7 +182,7 @@ struct key {
181extern struct key *key_alloc(struct key_type *type, 182extern struct key *key_alloc(struct key_type *type,
182 const char *desc, 183 const char *desc,
183 uid_t uid, gid_t gid, 184 uid_t uid, gid_t gid,
184 struct task_struct *ctx, 185 const struct cred *cred,
185 key_perm_t perm, 186 key_perm_t perm,
186 unsigned long flags); 187 unsigned long flags);
187 188
@@ -249,7 +250,7 @@ extern int key_unlink(struct key *keyring,
249 struct key *key); 250 struct key *key);
250 251
251extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, 252extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
252 struct task_struct *ctx, 253 const struct cred *cred,
253 unsigned long flags, 254 unsigned long flags,
254 struct key *dest); 255 struct key *dest);
255 256
@@ -276,24 +277,11 @@ extern ctl_table key_sysctls[];
276/* 277/*
277 * the userspace interface 278 * the userspace interface
278 */ 279 */
279extern void switch_uid_keyring(struct user_struct *new_user); 280extern int install_thread_keyring_to_cred(struct cred *cred);
280extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk);
281extern int copy_thread_group_keys(struct task_struct *tsk);
282extern void exit_keys(struct task_struct *tsk);
283extern void exit_thread_group_keys(struct signal_struct *tg);
284extern int suid_keys(struct task_struct *tsk);
285extern int exec_keys(struct task_struct *tsk);
286extern void key_fsuid_changed(struct task_struct *tsk); 281extern void key_fsuid_changed(struct task_struct *tsk);
287extern void key_fsgid_changed(struct task_struct *tsk); 282extern void key_fsgid_changed(struct task_struct *tsk);
288extern void key_init(void); 283extern void key_init(void);
289 284
290#define __install_session_keyring(tsk, keyring) \
291({ \
292 struct key *old_session = tsk->signal->session_keyring; \
293 tsk->signal->session_keyring = keyring; \
294 old_session; \
295})
296
297#else /* CONFIG_KEYS */ 285#else /* CONFIG_KEYS */
298 286
299#define key_validate(k) 0 287#define key_validate(k) 0
@@ -302,17 +290,9 @@ extern void key_init(void);
302#define key_revoke(k) do { } while(0) 290#define key_revoke(k) do { } while(0)
303#define key_put(k) do { } while(0) 291#define key_put(k) do { } while(0)
304#define key_ref_put(k) do { } while(0) 292#define key_ref_put(k) do { } while(0)
305#define make_key_ref(k, p) ({ NULL; }) 293#define make_key_ref(k, p) NULL
306#define key_ref_to_ptr(k) ({ NULL; }) 294#define key_ref_to_ptr(k) NULL
307#define is_key_possessed(k) 0 295#define is_key_possessed(k) 0
308#define switch_uid_keyring(u) do { } while(0)
309#define __install_session_keyring(t, k) ({ NULL; })
310#define copy_keys(f,t) 0
311#define copy_thread_group_keys(t) 0
312#define exit_keys(t) do { } while(0)
313#define exit_thread_group_keys(tg) do { } while(0)
314#define suid_keys(t) do { } while(0)
315#define exec_keys(t) do { } while(0)
316#define key_fsuid_changed(t) do { } while(0) 296#define key_fsuid_changed(t) do { } while(0)
317#define key_fsgid_changed(t) do { } while(0) 297#define key_fsgid_changed(t) do { } while(0)
318#define key_init() do { } while(0) 298#define key_init() do { } while(0)
diff --git a/include/linux/keyctl.h b/include/linux/keyctl.h
index 656ee6b77a4a..c0688eb72093 100644
--- a/include/linux/keyctl.h
+++ b/include/linux/keyctl.h
@@ -1,6 +1,6 @@
1/* keyctl.h: keyctl command IDs 1/* keyctl.h: keyctl command IDs
2 * 2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2004, 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
20#define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */ 20#define KEY_SPEC_USER_SESSION_KEYRING -5 /* - key ID for UID-session keyring */
21#define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */ 21#define KEY_SPEC_GROUP_KEYRING -6 /* - key ID for GID-specific keyring */
22#define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */ 22#define KEY_SPEC_REQKEY_AUTH_KEY -7 /* - key ID for assumed request_key auth key */
23#define KEY_SPEC_REQUESTOR_KEYRING -8 /* - key ID for request_key() dest keyring */
23 24
24/* request-key default keyrings */ 25/* request-key default keyrings */
25#define KEY_REQKEY_DEFL_NO_CHANGE -1 26#define KEY_REQKEY_DEFL_NO_CHANGE -1
@@ -30,6 +31,7 @@
30#define KEY_REQKEY_DEFL_USER_KEYRING 4 31#define KEY_REQKEY_DEFL_USER_KEYRING 4
31#define KEY_REQKEY_DEFL_USER_SESSION_KEYRING 5 32#define KEY_REQKEY_DEFL_USER_SESSION_KEYRING 5
32#define KEY_REQKEY_DEFL_GROUP_KEYRING 6 33#define KEY_REQKEY_DEFL_GROUP_KEYRING 6
34#define KEY_REQKEY_DEFL_REQUESTOR_KEYRING 7
33 35
34/* keyctl commands */ 36/* keyctl commands */
35#define KEYCTL_GET_KEYRING_ID 0 /* ask for a keyring's ID */ 37#define KEYCTL_GET_KEYRING_ID 0 /* ask for a keyring's ID */
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index a1a91577813c..92213a9194e1 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -99,4 +99,7 @@ struct file;
99extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[], 99extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
100 struct file **filp); 100 struct file **filp);
101 101
102extern int usermodehelper_disable(void);
103extern void usermodehelper_enable(void);
104
102#endif /* __LINUX_KMOD_H__ */ 105#endif /* __LINUX_KMOD_H__ */
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 0be7795655fa..497b1d1f7a05 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -29,6 +29,7 @@
29 * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi 29 * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi
30 * <prasanna@in.ibm.com> added function-return probes. 30 * <prasanna@in.ibm.com> added function-return probes.
31 */ 31 */
32#include <linux/linkage.h>
32#include <linux/list.h> 33#include <linux/list.h>
33#include <linux/notifier.h> 34#include <linux/notifier.h>
34#include <linux/smp.h> 35#include <linux/smp.h>
@@ -47,7 +48,7 @@
47#define KPROBE_HIT_SSDONE 0x00000008 48#define KPROBE_HIT_SSDONE 0x00000008
48 49
49/* Attach to insert probes on any functions which should be ignored*/ 50/* Attach to insert probes on any functions which should be ignored*/
50#define __kprobes __attribute__((__section__(".kprobes.text"))) 51#define __kprobes __attribute__((__section__(".kprobes.text"))) notrace
51 52
52struct kprobe; 53struct kprobe;
53struct pt_regs; 54struct pt_regs;
@@ -256,7 +257,7 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
256 257
257#else /* CONFIG_KPROBES */ 258#else /* CONFIG_KPROBES */
258 259
259#define __kprobes /**/ 260#define __kprobes notrace
260struct jprobe; 261struct jprobe;
261struct kretprobe; 262struct kretprobe;
262 263
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 70a30651cd12..f18b86fa8655 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -311,22 +311,33 @@ struct kvm_s390_interrupt {
311 311
312/* This structure represents a single trace buffer record. */ 312/* This structure represents a single trace buffer record. */
313struct kvm_trace_rec { 313struct kvm_trace_rec {
314 __u32 event:28; 314 /* variable rec_val
315 __u32 extra_u32:3; 315 * is split into:
316 __u32 cycle_in:1; 316 * bits 0 - 27 -> event id
317 * bits 28 -30 -> number of extra data args of size u32
318 * bits 31 -> binary indicator for if tsc is in record
319 */
320 __u32 rec_val;
317 __u32 pid; 321 __u32 pid;
318 __u32 vcpu_id; 322 __u32 vcpu_id;
319 union { 323 union {
320 struct { 324 struct {
321 __u64 cycle_u64; 325 __u64 timestamp;
322 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 326 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
323 } __attribute__((packed)) cycle; 327 } __attribute__((packed)) timestamp;
324 struct { 328 struct {
325 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 329 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
326 } nocycle; 330 } notimestamp;
327 } u; 331 } u;
328}; 332};
329 333
334#define TRACE_REC_EVENT_ID(val) \
335 (0x0fffffff & (val))
336#define TRACE_REC_NUM_DATA_ARGS(val) \
337 (0x70000000 & ((val) << 28))
338#define TRACE_REC_TCS(val) \
339 (0x80000000 & ((val) << 31))
340
330#define KVMIO 0xAE 341#define KVMIO 0xAE
331 342
332/* 343/*
@@ -372,6 +383,10 @@ struct kvm_trace_rec {
372#define KVM_CAP_MP_STATE 14 383#define KVM_CAP_MP_STATE 14
373#define KVM_CAP_COALESCED_MMIO 15 384#define KVM_CAP_COALESCED_MMIO 15
374#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ 385#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */
386#if defined(CONFIG_X86)||defined(CONFIG_IA64)
387#define KVM_CAP_DEVICE_ASSIGNMENT 17
388#endif
389#define KVM_CAP_IOMMU 18
375 390
376/* 391/*
377 * ioctls for VM fds 392 * ioctls for VM fds
@@ -401,6 +416,10 @@ struct kvm_trace_rec {
401 _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) 416 _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone)
402#define KVM_UNREGISTER_COALESCED_MMIO \ 417#define KVM_UNREGISTER_COALESCED_MMIO \
403 _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) 418 _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone)
419#define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \
420 struct kvm_assigned_pci_dev)
421#define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
422 struct kvm_assigned_irq)
404 423
405/* 424/*
406 * ioctls for vcpu fds 425 * ioctls for vcpu fds
@@ -440,4 +459,51 @@ struct kvm_trace_rec {
440#define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) 459#define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state)
441#define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) 460#define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state)
442 461
462#define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02)
463#define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03)
464#define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04)
465#define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05)
466#define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06)
467#define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07)
468#define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08)
469#define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09)
470#define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A)
471#define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B)
472#define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C)
473#define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D)
474#define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E)
475#define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F)
476#define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10)
477#define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11)
478#define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12)
479#define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13)
480#define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14)
481#define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15)
482#define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16)
483#define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17)
484#define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18)
485#define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19)
486
487struct kvm_assigned_pci_dev {
488 __u32 assigned_dev_id;
489 __u32 busnr;
490 __u32 devfn;
491 __u32 flags;
492 union {
493 __u32 reserved[12];
494 };
495};
496
497struct kvm_assigned_irq {
498 __u32 assigned_dev_id;
499 __u32 host_irq;
500 __u32 guest_irq;
501 __u32 flags;
502 union {
503 __u32 reserved[12];
504 };
505};
506
507#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
508
443#endif 509#endif
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 8525afc53107..bb92be2153bc 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -34,6 +34,10 @@
34#define KVM_REQ_MMU_RELOAD 3 34#define KVM_REQ_MMU_RELOAD 3
35#define KVM_REQ_TRIPLE_FAULT 4 35#define KVM_REQ_TRIPLE_FAULT 4
36#define KVM_REQ_PENDING_TIMER 5 36#define KVM_REQ_PENDING_TIMER 5
37#define KVM_REQ_UNHALT 6
38#define KVM_REQ_MMU_SYNC 7
39
40#define KVM_USERSPACE_IRQ_SOURCE_ID 0
37 41
38struct kvm_vcpu; 42struct kvm_vcpu;
39extern struct kmem_cache *kvm_vcpu_cache; 43extern struct kmem_cache *kvm_vcpu_cache;
@@ -279,12 +283,71 @@ void kvm_free_physmem(struct kvm *kvm);
279 283
280struct kvm *kvm_arch_create_vm(void); 284struct kvm *kvm_arch_create_vm(void);
281void kvm_arch_destroy_vm(struct kvm *kvm); 285void kvm_arch_destroy_vm(struct kvm *kvm);
286void kvm_free_all_assigned_devices(struct kvm *kvm);
282 287
283int kvm_cpu_get_interrupt(struct kvm_vcpu *v); 288int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
284int kvm_cpu_has_interrupt(struct kvm_vcpu *v); 289int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
285int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); 290int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu);
286void kvm_vcpu_kick(struct kvm_vcpu *vcpu); 291void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
287 292
293int kvm_is_mmio_pfn(pfn_t pfn);
294
295struct kvm_irq_ack_notifier {
296 struct hlist_node link;
297 unsigned gsi;
298 void (*irq_acked)(struct kvm_irq_ack_notifier *kian);
299};
300
301struct kvm_assigned_dev_kernel {
302 struct kvm_irq_ack_notifier ack_notifier;
303 struct work_struct interrupt_work;
304 struct list_head list;
305 int assigned_dev_id;
306 int host_busnr;
307 int host_devfn;
308 int host_irq;
309 int guest_irq;
310 int irq_requested;
311 int irq_source_id;
312 struct pci_dev *dev;
313 struct kvm *kvm;
314};
315void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level);
316void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi);
317void kvm_register_irq_ack_notifier(struct kvm *kvm,
318 struct kvm_irq_ack_notifier *kian);
319void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
320 struct kvm_irq_ack_notifier *kian);
321int kvm_request_irq_source_id(struct kvm *kvm);
322void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);
323
324#ifdef CONFIG_DMAR
325int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn,
326 unsigned long npages);
327int kvm_iommu_map_guest(struct kvm *kvm,
328 struct kvm_assigned_dev_kernel *assigned_dev);
329int kvm_iommu_unmap_guest(struct kvm *kvm);
330#else /* CONFIG_DMAR */
331static inline int kvm_iommu_map_pages(struct kvm *kvm,
332 gfn_t base_gfn,
333 unsigned long npages)
334{
335 return 0;
336}
337
338static inline int kvm_iommu_map_guest(struct kvm *kvm,
339 struct kvm_assigned_dev_kernel
340 *assigned_dev)
341{
342 return -ENODEV;
343}
344
345static inline int kvm_iommu_unmap_guest(struct kvm *kvm)
346{
347 return 0;
348}
349#endif /* CONFIG_DMAR */
350
288static inline void kvm_guest_enter(void) 351static inline void kvm_guest_enter(void)
289{ 352{
290 account_system_vtime(current); 353 account_system_vtime(current);
@@ -307,6 +370,11 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn)
307 return (gpa_t)gfn << PAGE_SHIFT; 370 return (gpa_t)gfn << PAGE_SHIFT;
308} 371}
309 372
373static inline hpa_t pfn_to_hpa(pfn_t pfn)
374{
375 return (hpa_t)pfn << PAGE_SHIFT;
376}
377
310static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) 378static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu)
311{ 379{
312 set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); 380 set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
@@ -326,6 +394,25 @@ struct kvm_stats_debugfs_item {
326extern struct kvm_stats_debugfs_item debugfs_entries[]; 394extern struct kvm_stats_debugfs_item debugfs_entries[];
327extern struct dentry *kvm_debugfs_dir; 395extern struct dentry *kvm_debugfs_dir;
328 396
397#define KVMTRACE_5D(evt, vcpu, d1, d2, d3, d4, d5, name) \
398 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
399 vcpu, 5, d1, d2, d3, d4, d5)
400#define KVMTRACE_4D(evt, vcpu, d1, d2, d3, d4, name) \
401 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
402 vcpu, 4, d1, d2, d3, d4, 0)
403#define KVMTRACE_3D(evt, vcpu, d1, d2, d3, name) \
404 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
405 vcpu, 3, d1, d2, d3, 0, 0)
406#define KVMTRACE_2D(evt, vcpu, d1, d2, name) \
407 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
408 vcpu, 2, d1, d2, 0, 0, 0)
409#define KVMTRACE_1D(evt, vcpu, d1, name) \
410 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
411 vcpu, 1, d1, 0, 0, 0, 0)
412#define KVMTRACE_0D(evt, vcpu, name) \
413 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
414 vcpu, 0, 0, 0, 0, 0, 0)
415
329#ifdef CONFIG_KVM_TRACE 416#ifdef CONFIG_KVM_TRACE
330int kvm_trace_ioctl(unsigned int ioctl, unsigned long arg); 417int kvm_trace_ioctl(unsigned int ioctl, unsigned long arg);
331void kvm_trace_cleanup(void); 418void kvm_trace_cleanup(void);
diff --git a/include/linux/leds.h b/include/linux/leds.h
index d41ccb56146a..d3a73f5a48c3 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -123,7 +123,7 @@ extern void ledtrig_ide_activity(void);
123 */ 123 */
124struct led_info { 124struct led_info {
125 const char *name; 125 const char *name;
126 char *default_trigger; 126 const char *default_trigger;
127 int flags; 127 int flags;
128}; 128};
129 129
@@ -135,7 +135,7 @@ struct led_platform_data {
135/* For the leds-gpio driver */ 135/* For the leds-gpio driver */
136struct gpio_led { 136struct gpio_led {
137 const char *name; 137 const char *name;
138 char *default_trigger; 138 const char *default_trigger;
139 unsigned gpio; 139 unsigned gpio;
140 u8 active_low; 140 u8 active_low;
141}; 141};
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h
index e7217dc58f39..a53407a4165c 100644
--- a/include/linux/lguest_launcher.h
+++ b/include/linux/lguest_launcher.h
@@ -54,9 +54,13 @@ struct lguest_vqconfig {
54/* Write command first word is a request. */ 54/* Write command first word is a request. */
55enum lguest_req 55enum lguest_req
56{ 56{
57 LHREQ_INITIALIZE, /* + base, pfnlimit, pgdir, start */ 57 LHREQ_INITIALIZE, /* + base, pfnlimit, start */
58 LHREQ_GETDMA, /* No longer used */ 58 LHREQ_GETDMA, /* No longer used */
59 LHREQ_IRQ, /* + irq */ 59 LHREQ_IRQ, /* + irq */
60 LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */ 60 LHREQ_BREAK, /* + on/off flag (on blocks until someone does off) */
61}; 61};
62
63/* The alignment to use between consumer and producer parts of vring.
64 * x86 pagesize for historical reasons. */
65#define LGUEST_VRING_ALIGN 4096
62#endif /* _LINUX_LGUEST_LAUNCHER */ 66#endif /* _LINUX_LGUEST_LAUNCHER */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 947cf84e555d..3449de597eff 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -213,10 +213,11 @@ enum {
213 ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */ 213 ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */
214 ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */ 214 ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */
215 ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */ 215 ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */
216 ATA_PFLAG_UNLOADING = (1 << 5), /* module is unloading */
217 ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ 216 ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */
218 ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */ 217 ATA_PFLAG_INITIALIZING = (1 << 7), /* being initialized, don't touch */
219 ATA_PFLAG_RESETTING = (1 << 8), /* reset in progress */ 218 ATA_PFLAG_RESETTING = (1 << 8), /* reset in progress */
219 ATA_PFLAG_UNLOADING = (1 << 9), /* driver is being unloaded */
220 ATA_PFLAG_UNLOADED = (1 << 10), /* driver is unloaded */
220 221
221 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ 222 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */
222 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ 223 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
@@ -340,6 +341,9 @@ enum {
340 341
341 ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET, 342 ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
342 343
344 /* mask of flags to transfer *to* the slave link */
345 ATA_EHI_TO_SLAVE_MASK = ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET,
346
343 /* max tries if error condition is still set after ->error_handler */ 347 /* max tries if error condition is still set after ->error_handler */
344 ATA_EH_MAX_TRIES = 5, 348 ATA_EH_MAX_TRIES = 5,
345 349
@@ -369,6 +373,10 @@ enum {
369 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ 373 ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
370 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ 374 ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
371 ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ 375 ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
376 ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */
377 ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands
378 not multiple of 16 bytes */
379 ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */
372 380
373 /* DMA mask for user DMA control: User visible values; DO NOT 381 /* DMA mask for user DMA control: User visible values; DO NOT
374 renumber */ 382 renumber */
@@ -1278,26 +1286,62 @@ static inline int ata_link_active(struct ata_link *link)
1278 return ata_tag_valid(link->active_tag) || link->sactive; 1286 return ata_tag_valid(link->active_tag) || link->sactive;
1279} 1287}
1280 1288
1281extern struct ata_link *__ata_port_next_link(struct ata_port *ap, 1289/*
1282 struct ata_link *link, 1290 * Iterators
1283 bool dev_only); 1291 *
1292 * ATA_LITER_* constants are used to select link iteration mode and
1293 * ATA_DITER_* device iteration mode.
1294 *
1295 * For a custom iteration directly using ata_{link|dev}_next(), if
1296 * @link or @dev, respectively, is NULL, the first element is
1297 * returned. @dev and @link can be any valid device or link and the
1298 * next element according to the iteration mode will be returned.
1299 * After the last element, NULL is returned.
1300 */
1301enum ata_link_iter_mode {
1302 ATA_LITER_EDGE, /* if present, PMP links only; otherwise,
1303 * host link. no slave link */
1304 ATA_LITER_HOST_FIRST, /* host link followed by PMP or slave links */
1305 ATA_LITER_PMP_FIRST, /* PMP links followed by host link,
1306 * slave link still comes after host link */
1307};
1308
1309enum ata_dev_iter_mode {
1310 ATA_DITER_ENABLED,
1311 ATA_DITER_ENABLED_REVERSE,
1312 ATA_DITER_ALL,
1313 ATA_DITER_ALL_REVERSE,
1314};
1284 1315
1285#define __ata_port_for_each_link(link, ap) \ 1316extern struct ata_link *ata_link_next(struct ata_link *link,
1286 for ((link) = __ata_port_next_link((ap), NULL, false); (link); \ 1317 struct ata_port *ap,
1287 (link) = __ata_port_next_link((ap), (link), false)) 1318 enum ata_link_iter_mode mode);
1288 1319
1289#define ata_port_for_each_link(link, ap) \ 1320extern struct ata_device *ata_dev_next(struct ata_device *dev,
1290 for ((link) = __ata_port_next_link((ap), NULL, true); (link); \ 1321 struct ata_link *link,
1291 (link) = __ata_port_next_link((ap), (link), true)) 1322 enum ata_dev_iter_mode mode);
1292 1323
1293#define ata_link_for_each_dev(dev, link) \ 1324/*
1294 for ((dev) = (link)->device; \ 1325 * Shortcut notation for iterations
1295 (dev) < (link)->device + ata_link_max_devices(link) || ((dev) = NULL); \ 1326 *
1296 (dev)++) 1327 * ata_for_each_link() iterates over each link of @ap according to
1328 * @mode. @link points to the current link in the loop. @link is
1329 * NULL after loop termination. ata_for_each_dev() works the same way
1330 * except that it iterates over each device of @link.
1331 *
1332 * Note that the mode prefixes ATA_{L|D}ITER_ shouldn't need to be
1333 * specified when using the following shorthand notations. Only the
1334 * mode itself (EDGE, HOST_FIRST, ENABLED, etc...) should be
1335 * specified. This not only increases brevity but also makes it
1336 * impossible to use ATA_LITER_* for device iteration or vice-versa.
1337 */
1338#define ata_for_each_link(link, ap, mode) \
1339 for ((link) = ata_link_next(NULL, (ap), ATA_LITER_##mode); (link); \
1340 (link) = ata_link_next((link), (ap), ATA_LITER_##mode))
1297 1341
1298#define ata_link_for_each_dev_reverse(dev, link) \ 1342#define ata_for_each_dev(dev, link, mode) \
1299 for ((dev) = (link)->device + ata_link_max_devices(link) - 1; \ 1343 for ((dev) = ata_dev_next(NULL, (link), ATA_DITER_##mode); (dev); \
1300 (dev) >= (link)->device || ((dev) = NULL); (dev)--) 1344 (dev) = ata_dev_next((dev), (link), ATA_DITER_##mode))
1301 1345
1302/** 1346/**
1303 * ata_ncq_enabled - Test whether NCQ is enabled 1347 * ata_ncq_enabled - Test whether NCQ is enabled
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 56ba37394656..fee9e59649c1 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -4,8 +4,6 @@
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5#include <asm/linkage.h> 5#include <asm/linkage.h>
6 6
7#define notrace __attribute__((no_instrument_function))
8
9#ifdef __cplusplus 7#ifdef __cplusplus
10#define CPP_ASMLINKAGE extern "C" 8#define CPP_ASMLINKAGE extern "C"
11#else 9#else
@@ -66,14 +64,6 @@
66 name: 64 name:
67#endif 65#endif
68 66
69#define KPROBE_ENTRY(name) \
70 .pushsection .kprobes.text, "ax"; \
71 ENTRY(name)
72
73#define KPROBE_END(name) \
74 END(name); \
75 .popsection
76
77#ifndef END 67#ifndef END
78#define END(name) \ 68#define END(name) \
79 .size name, .-name 69 .size name, .-name
diff --git a/include/linux/list_nulls.h b/include/linux/list_nulls.h
new file mode 100644
index 000000000000..93150ecf3ea4
--- /dev/null
+++ b/include/linux/list_nulls.h
@@ -0,0 +1,94 @@
1#ifndef _LINUX_LIST_NULLS_H
2#define _LINUX_LIST_NULLS_H
3
4/*
5 * Special version of lists, where end of list is not a NULL pointer,
6 * but a 'nulls' marker, which can have many different values.
7 * (up to 2^31 different values guaranteed on all platforms)
8 *
9 * In the standard hlist, termination of a list is the NULL pointer.
10 * In this special 'nulls' variant, we use the fact that objects stored in
11 * a list are aligned on a word (4 or 8 bytes alignment).
12 * We therefore use the last significant bit of 'ptr' :
13 * Set to 1 : This is a 'nulls' end-of-list marker (ptr >> 1)
14 * Set to 0 : This is a pointer to some object (ptr)
15 */
16
17struct hlist_nulls_head {
18 struct hlist_nulls_node *first;
19};
20
21struct hlist_nulls_node {
22 struct hlist_nulls_node *next, **pprev;
23};
24#define INIT_HLIST_NULLS_HEAD(ptr, nulls) \
25 ((ptr)->first = (struct hlist_nulls_node *) (1UL | (((long)nulls) << 1)))
26
27#define hlist_nulls_entry(ptr, type, member) container_of(ptr,type,member)
28/**
29 * ptr_is_a_nulls - Test if a ptr is a nulls
30 * @ptr: ptr to be tested
31 *
32 */
33static inline int is_a_nulls(const struct hlist_nulls_node *ptr)
34{
35 return ((unsigned long)ptr & 1);
36}
37
38/**
39 * get_nulls_value - Get the 'nulls' value of the end of chain
40 * @ptr: end of chain
41 *
42 * Should be called only if is_a_nulls(ptr);
43 */
44static inline unsigned long get_nulls_value(const struct hlist_nulls_node *ptr)
45{
46 return ((unsigned long)ptr) >> 1;
47}
48
49static inline int hlist_nulls_unhashed(const struct hlist_nulls_node *h)
50{
51 return !h->pprev;
52}
53
54static inline int hlist_nulls_empty(const struct hlist_nulls_head *h)
55{
56 return is_a_nulls(h->first);
57}
58
59static inline void __hlist_nulls_del(struct hlist_nulls_node *n)
60{
61 struct hlist_nulls_node *next = n->next;
62 struct hlist_nulls_node **pprev = n->pprev;
63 *pprev = next;
64 if (!is_a_nulls(next))
65 next->pprev = pprev;
66}
67
68/**
69 * hlist_nulls_for_each_entry - iterate over list of given type
70 * @tpos: the type * to use as a loop cursor.
71 * @pos: the &struct hlist_node to use as a loop cursor.
72 * @head: the head for your list.
73 * @member: the name of the hlist_node within the struct.
74 *
75 */
76#define hlist_nulls_for_each_entry(tpos, pos, head, member) \
77 for (pos = (head)->first; \
78 (!is_a_nulls(pos)) && \
79 ({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1;}); \
80 pos = pos->next)
81
82/**
83 * hlist_nulls_for_each_entry_from - iterate over a hlist continuing from current point
84 * @tpos: the type * to use as a loop cursor.
85 * @pos: the &struct hlist_node to use as a loop cursor.
86 * @member: the name of the hlist_node within the struct.
87 *
88 */
89#define hlist_nulls_for_each_entry_from(tpos, pos, member) \
90 for (; (!is_a_nulls(pos)) && \
91 ({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1;}); \
92 pos = pos->next)
93
94#endif
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h
index e5872dc994c0..fbc48f898521 100644
--- a/include/linux/lockd/bind.h
+++ b/include/linux/lockd/bind.h
@@ -41,6 +41,7 @@ struct nlmclnt_initdata {
41 size_t addrlen; 41 size_t addrlen;
42 unsigned short protocol; 42 unsigned short protocol;
43 u32 nfs_version; 43 u32 nfs_version;
44 int noresvport;
44}; 45};
45 46
46/* 47/*
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index b56d5aa9b194..23da3fa69efa 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -49,6 +49,7 @@ struct nlm_host {
49 unsigned short h_proto; /* transport proto */ 49 unsigned short h_proto; /* transport proto */
50 unsigned short h_reclaiming : 1, 50 unsigned short h_reclaiming : 1,
51 h_server : 1, /* server side, not client side */ 51 h_server : 1, /* server side, not client side */
52 h_noresvport : 1,
52 h_inuse : 1; 53 h_inuse : 1;
53 wait_queue_head_t h_gracewait; /* wait while reclaiming */ 54 wait_queue_head_t h_gracewait; /* wait while reclaiming */
54 struct rw_semaphore h_rwsem; /* Reboot recovery lock */ 55 struct rw_semaphore h_rwsem; /* Reboot recovery lock */
@@ -220,7 +221,8 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap,
220 const size_t salen, 221 const size_t salen,
221 const unsigned short protocol, 222 const unsigned short protocol,
222 const u32 version, 223 const u32 version,
223 const char *hostname); 224 const char *hostname,
225 int noresvport);
224struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, 226struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
225 const char *hostname, 227 const char *hostname,
226 const size_t hostname_len); 228 const size_t hostname_len);
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 331e5f1c2d8e..23bf02fb124f 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -73,6 +73,8 @@ struct lock_class_key {
73 struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES]; 73 struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
74}; 74};
75 75
76#define LOCKSTAT_POINTS 4
77
76/* 78/*
77 * The lock-class itself: 79 * The lock-class itself:
78 */ 80 */
@@ -119,7 +121,8 @@ struct lock_class {
119 int name_version; 121 int name_version;
120 122
121#ifdef CONFIG_LOCK_STAT 123#ifdef CONFIG_LOCK_STAT
122 unsigned long contention_point[4]; 124 unsigned long contention_point[LOCKSTAT_POINTS];
125 unsigned long contending_point[LOCKSTAT_POINTS];
123#endif 126#endif
124}; 127};
125 128
@@ -144,6 +147,7 @@ enum bounce_type {
144 147
145struct lock_class_stats { 148struct lock_class_stats {
146 unsigned long contention_point[4]; 149 unsigned long contention_point[4];
150 unsigned long contending_point[4];
147 struct lock_time read_waittime; 151 struct lock_time read_waittime;
148 struct lock_time write_waittime; 152 struct lock_time write_waittime;
149 struct lock_time read_holdtime; 153 struct lock_time read_holdtime;
@@ -165,6 +169,7 @@ struct lockdep_map {
165 const char *name; 169 const char *name;
166#ifdef CONFIG_LOCK_STAT 170#ifdef CONFIG_LOCK_STAT
167 int cpu; 171 int cpu;
172 unsigned long ip;
168#endif 173#endif
169}; 174};
170 175
@@ -309,8 +314,15 @@ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
309extern void lock_release(struct lockdep_map *lock, int nested, 314extern void lock_release(struct lockdep_map *lock, int nested,
310 unsigned long ip); 315 unsigned long ip);
311 316
312extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass, 317extern void lock_set_class(struct lockdep_map *lock, const char *name,
313 unsigned long ip); 318 struct lock_class_key *key, unsigned int subclass,
319 unsigned long ip);
320
321static inline void lock_set_subclass(struct lockdep_map *lock,
322 unsigned int subclass, unsigned long ip)
323{
324 lock_set_class(lock, lock->name, lock->key, subclass, ip);
325}
314 326
315# define INIT_LOCKDEP .lockdep_recursion = 0, 327# define INIT_LOCKDEP .lockdep_recursion = 0,
316 328
@@ -328,13 +340,15 @@ static inline void lockdep_on(void)
328 340
329# define lock_acquire(l, s, t, r, c, n, i) do { } while (0) 341# define lock_acquire(l, s, t, r, c, n, i) do { } while (0)
330# define lock_release(l, n, i) do { } while (0) 342# define lock_release(l, n, i) do { } while (0)
343# define lock_set_class(l, n, k, s, i) do { } while (0)
331# define lock_set_subclass(l, s, i) do { } while (0) 344# define lock_set_subclass(l, s, i) do { } while (0)
332# define lockdep_init() do { } while (0) 345# define lockdep_init() do { } while (0)
333# define lockdep_info() do { } while (0) 346# define lockdep_info() do { } while (0)
334# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) 347# define lockdep_init_map(lock, name, key, sub) \
348 do { (void)(name); (void)(key); } while (0)
335# define lockdep_set_class(lock, key) do { (void)(key); } while (0) 349# define lockdep_set_class(lock, key) do { (void)(key); } while (0)
336# define lockdep_set_class_and_name(lock, key, name) \ 350# define lockdep_set_class_and_name(lock, key, name) \
337 do { (void)(key); } while (0) 351 do { (void)(key); (void)(name); } while (0)
338#define lockdep_set_class_and_subclass(lock, key, sub) \ 352#define lockdep_set_class_and_subclass(lock, key, sub) \
339 do { (void)(key); } while (0) 353 do { (void)(key); } while (0)
340#define lockdep_set_subclass(lock, sub) do { } while (0) 354#define lockdep_set_subclass(lock, sub) do { } while (0)
@@ -355,7 +369,7 @@ struct lock_class_key { };
355#ifdef CONFIG_LOCK_STAT 369#ifdef CONFIG_LOCK_STAT
356 370
357extern void lock_contended(struct lockdep_map *lock, unsigned long ip); 371extern void lock_contended(struct lockdep_map *lock, unsigned long ip);
358extern void lock_acquired(struct lockdep_map *lock); 372extern void lock_acquired(struct lockdep_map *lock, unsigned long ip);
359 373
360#define LOCK_CONTENDED(_lock, try, lock) \ 374#define LOCK_CONTENDED(_lock, try, lock) \
361do { \ 375do { \
@@ -363,20 +377,20 @@ do { \
363 lock_contended(&(_lock)->dep_map, _RET_IP_); \ 377 lock_contended(&(_lock)->dep_map, _RET_IP_); \
364 lock(_lock); \ 378 lock(_lock); \
365 } \ 379 } \
366 lock_acquired(&(_lock)->dep_map); \ 380 lock_acquired(&(_lock)->dep_map, _RET_IP_); \
367} while (0) 381} while (0)
368 382
369#else /* CONFIG_LOCK_STAT */ 383#else /* CONFIG_LOCK_STAT */
370 384
371#define lock_contended(lockdep_map, ip) do {} while (0) 385#define lock_contended(lockdep_map, ip) do {} while (0)
372#define lock_acquired(lockdep_map) do {} while (0) 386#define lock_acquired(lockdep_map, ip) do {} while (0)
373 387
374#define LOCK_CONTENDED(_lock, try, lock) \ 388#define LOCK_CONTENDED(_lock, try, lock) \
375 lock(_lock) 389 lock(_lock)
376 390
377#endif /* CONFIG_LOCK_STAT */ 391#endif /* CONFIG_LOCK_STAT */
378 392
379#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS) 393#ifdef CONFIG_GENERIC_HARDIRQS
380extern void early_init_irq_lock_class(void); 394extern void early_init_irq_lock_class(void);
381#else 395#else
382static inline void early_init_irq_lock_class(void) 396static inline void early_init_irq_lock_class(void)
@@ -480,4 +494,22 @@ static inline void print_irqtrace_events(struct task_struct *curr)
480# define lock_map_release(l) do { } while (0) 494# define lock_map_release(l) do { } while (0)
481#endif 495#endif
482 496
497#ifdef CONFIG_PROVE_LOCKING
498# define might_lock(lock) \
499do { \
500 typecheck(struct lockdep_map *, &(lock)->dep_map); \
501 lock_acquire(&(lock)->dep_map, 0, 0, 0, 2, NULL, _THIS_IP_); \
502 lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
503} while (0)
504# define might_lock_read(lock) \
505do { \
506 typecheck(struct lockdep_map *, &(lock)->dep_map); \
507 lock_acquire(&(lock)->dep_map, 0, 0, 1, 2, NULL, _THIS_IP_); \
508 lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
509} while (0)
510#else
511# define might_lock(lock) do { } while (0)
512# define might_lock_read(lock) do { } while (0)
513#endif
514
483#endif /* __LINUX_LOCKDEP_H */ 515#endif /* __LINUX_LOCKDEP_H */
diff --git a/include/linux/map_to_7segment.h b/include/linux/map_to_7segment.h
new file mode 100644
index 000000000000..7df8432c4402
--- /dev/null
+++ b/include/linux/map_to_7segment.h
@@ -0,0 +1,187 @@
1/*
2 * Copyright (c) 2005 Henk Vergonet <Henk.Vergonet@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef MAP_TO_7SEGMENT_H
20#define MAP_TO_7SEGMENT_H
21
22/* This file provides translation primitives and tables for the conversion
23 * of (ASCII) characters to a 7-segments notation.
24 *
25 * The 7 segment's wikipedia notation below is used as standard.
26 * See: http://en.wikipedia.org/wiki/Seven_segment_display
27 *
28 * Notation: +-a-+
29 * f b
30 * +-g-+
31 * e c
32 * +-d-+
33 *
34 * Usage:
35 *
36 * Register a map variable, and fill it with a character set:
37 * static SEG7_DEFAULT_MAP(map_seg7);
38 *
39 *
40 * Then use for conversion:
41 * seg7 = map_to_seg7(&map_seg7, some_char);
42 * ...
43 *
44 * In device drivers it is recommended, if required, to make the char map
45 * accessible via the sysfs interface using the following scheme:
46 *
47 * static ssize_t show_map(struct device *dev, char *buf) {
48 * memcpy(buf, &map_seg7, sizeof(map_seg7));
49 * return sizeof(map_seg7);
50 * }
51 * static ssize_t store_map(struct device *dev, const char *buf, size_t cnt) {
52 * if(cnt != sizeof(map_seg7))
53 * return -EINVAL;
54 * memcpy(&map_seg7, buf, cnt);
55 * return cnt;
56 * }
57 * static DEVICE_ATTR(map_seg7, PERMS_RW, show_map, store_map);
58 *
59 * History:
60 * 2005-05-31 RFC linux-kernel@vger.kernel.org
61 */
62#include <linux/errno.h>
63
64
65#define BIT_SEG7_A 0
66#define BIT_SEG7_B 1
67#define BIT_SEG7_C 2
68#define BIT_SEG7_D 3
69#define BIT_SEG7_E 4
70#define BIT_SEG7_F 5
71#define BIT_SEG7_G 6
72#define BIT_SEG7_RESERVED 7
73
74struct seg7_conversion_map {
75 unsigned char table[128];
76};
77
78static inline int map_to_seg7(struct seg7_conversion_map *map, int c)
79{
80 return c >= 0 && c < sizeof(map->table) ? map->table[c] : -EINVAL;
81}
82
83#define SEG7_CONVERSION_MAP(_name, _map) \
84 struct seg7_conversion_map _name = { .table = { _map } }
85
86/*
87 * It is recommended to use a facility that allows user space to redefine
88 * custom character sets for LCD devices. Please use a sysfs interface
89 * as described above.
90 */
91#define MAP_TO_SEG7_SYSFS_FILE "map_seg7"
92
93/*******************************************************************************
94 * ASCII conversion table
95 ******************************************************************************/
96
97#define _SEG7(l,a,b,c,d,e,f,g) \
98 ( a<<BIT_SEG7_A | b<<BIT_SEG7_B | c<<BIT_SEG7_C | d<<BIT_SEG7_D | \
99 e<<BIT_SEG7_E | f<<BIT_SEG7_F | g<<BIT_SEG7_G )
100
101#define _MAP_0_32_ASCII_SEG7_NON_PRINTABLE \
102 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
103
104#define _MAP_33_47_ASCII_SEG7_SYMBOL \
105 _SEG7('!',0,0,0,0,1,1,0), _SEG7('"',0,1,0,0,0,1,0), _SEG7('#',0,1,1,0,1,1,0),\
106 _SEG7('$',1,0,1,1,0,1,1), _SEG7('%',0,0,1,0,0,1,0), _SEG7('&',1,0,1,1,1,1,1),\
107 _SEG7('\'',0,0,0,0,0,1,0),_SEG7('(',1,0,0,1,1,1,0), _SEG7(')',1,1,1,1,0,0,0),\
108 _SEG7('*',0,1,1,0,1,1,1), _SEG7('+',0,1,1,0,0,0,1), _SEG7(',',0,0,0,0,1,0,0),\
109 _SEG7('-',0,0,0,0,0,0,1), _SEG7('.',0,0,0,0,1,0,0), _SEG7('/',0,1,0,0,1,0,1),
110
111#define _MAP_48_57_ASCII_SEG7_NUMERIC \
112 _SEG7('0',1,1,1,1,1,1,0), _SEG7('1',0,1,1,0,0,0,0), _SEG7('2',1,1,0,1,1,0,1),\
113 _SEG7('3',1,1,1,1,0,0,1), _SEG7('4',0,1,1,0,0,1,1), _SEG7('5',1,0,1,1,0,1,1),\
114 _SEG7('6',1,0,1,1,1,1,1), _SEG7('7',1,1,1,0,0,0,0), _SEG7('8',1,1,1,1,1,1,1),\
115 _SEG7('9',1,1,1,1,0,1,1),
116
117#define _MAP_58_64_ASCII_SEG7_SYMBOL \
118 _SEG7(':',0,0,0,1,0,0,1), _SEG7(';',0,0,0,1,0,0,1), _SEG7('<',1,0,0,0,0,1,1),\
119 _SEG7('=',0,0,0,1,0,0,1), _SEG7('>',1,1,0,0,0,0,1), _SEG7('?',1,1,1,0,0,1,0),\
120 _SEG7('@',1,1,0,1,1,1,1),
121
122#define _MAP_65_90_ASCII_SEG7_ALPHA_UPPR \
123 _SEG7('A',1,1,1,0,1,1,1), _SEG7('B',1,1,1,1,1,1,1), _SEG7('C',1,0,0,1,1,1,0),\
124 _SEG7('D',1,1,1,1,1,1,0), _SEG7('E',1,0,0,1,1,1,1), _SEG7('F',1,0,0,0,1,1,1),\
125 _SEG7('G',1,1,1,1,0,1,1), _SEG7('H',0,1,1,0,1,1,1), _SEG7('I',0,1,1,0,0,0,0),\
126 _SEG7('J',0,1,1,1,0,0,0), _SEG7('K',0,1,1,0,1,1,1), _SEG7('L',0,0,0,1,1,1,0),\
127 _SEG7('M',1,1,1,0,1,1,0), _SEG7('N',1,1,1,0,1,1,0), _SEG7('O',1,1,1,1,1,1,0),\
128 _SEG7('P',1,1,0,0,1,1,1), _SEG7('Q',1,1,1,1,1,1,0), _SEG7('R',1,1,1,0,1,1,1),\
129 _SEG7('S',1,0,1,1,0,1,1), _SEG7('T',0,0,0,1,1,1,1), _SEG7('U',0,1,1,1,1,1,0),\
130 _SEG7('V',0,1,1,1,1,1,0), _SEG7('W',0,1,1,1,1,1,1), _SEG7('X',0,1,1,0,1,1,1),\
131 _SEG7('Y',0,1,1,0,0,1,1), _SEG7('Z',1,1,0,1,1,0,1),
132
133#define _MAP_91_96_ASCII_SEG7_SYMBOL \
134 _SEG7('[',1,0,0,1,1,1,0), _SEG7('\\',0,0,1,0,0,1,1),_SEG7(']',1,1,1,1,0,0,0),\
135 _SEG7('^',1,1,0,0,0,1,0), _SEG7('_',0,0,0,1,0,0,0), _SEG7('`',0,1,0,0,0,0,0),
136
137#define _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \
138 _SEG7('A',1,1,1,0,1,1,1), _SEG7('b',0,0,1,1,1,1,1), _SEG7('c',0,0,0,1,1,0,1),\
139 _SEG7('d',0,1,1,1,1,0,1), _SEG7('E',1,0,0,1,1,1,1), _SEG7('F',1,0,0,0,1,1,1),\
140 _SEG7('G',1,1,1,1,0,1,1), _SEG7('h',0,0,1,0,1,1,1), _SEG7('i',0,0,1,0,0,0,0),\
141 _SEG7('j',0,0,1,1,0,0,0), _SEG7('k',0,0,1,0,1,1,1), _SEG7('L',0,0,0,1,1,1,0),\
142 _SEG7('M',1,1,1,0,1,1,0), _SEG7('n',0,0,1,0,1,0,1), _SEG7('o',0,0,1,1,1,0,1),\
143 _SEG7('P',1,1,0,0,1,1,1), _SEG7('q',1,1,1,0,0,1,1), _SEG7('r',0,0,0,0,1,0,1),\
144 _SEG7('S',1,0,1,1,0,1,1), _SEG7('T',0,0,0,1,1,1,1), _SEG7('u',0,0,1,1,1,0,0),\
145 _SEG7('v',0,0,1,1,1,0,0), _SEG7('W',0,1,1,1,1,1,1), _SEG7('X',0,1,1,0,1,1,1),\
146 _SEG7('y',0,1,1,1,0,1,1), _SEG7('Z',1,1,0,1,1,0,1),
147
148#define _MAP_123_126_ASCII_SEG7_SYMBOL \
149 _SEG7('{',1,0,0,1,1,1,0), _SEG7('|',0,0,0,0,1,1,0), _SEG7('}',1,1,1,1,0,0,0),\
150 _SEG7('~',1,0,0,0,0,0,0),
151
152/* Maps */
153
154/* This set tries to map as close as possible to the visible characteristics
155 * of the ASCII symbol, lowercase and uppercase letters may differ in
156 * presentation on the display.
157 */
158#define MAP_ASCII7SEG_ALPHANUM \
159 _MAP_0_32_ASCII_SEG7_NON_PRINTABLE \
160 _MAP_33_47_ASCII_SEG7_SYMBOL \
161 _MAP_48_57_ASCII_SEG7_NUMERIC \
162 _MAP_58_64_ASCII_SEG7_SYMBOL \
163 _MAP_65_90_ASCII_SEG7_ALPHA_UPPR \
164 _MAP_91_96_ASCII_SEG7_SYMBOL \
165 _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \
166 _MAP_123_126_ASCII_SEG7_SYMBOL
167
168/* This set tries to map as close as possible to the symbolic characteristics
169 * of the ASCII character for maximum discrimination.
170 * For now this means all alpha chars are in lower case representations.
171 * (This for example facilitates the use of hex numbers with uppercase input.)
172 */
173#define MAP_ASCII7SEG_ALPHANUM_LC \
174 _MAP_0_32_ASCII_SEG7_NON_PRINTABLE \
175 _MAP_33_47_ASCII_SEG7_SYMBOL \
176 _MAP_48_57_ASCII_SEG7_NUMERIC \
177 _MAP_58_64_ASCII_SEG7_SYMBOL \
178 _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \
179 _MAP_91_96_ASCII_SEG7_SYMBOL \
180 _MAP_97_122_ASCII_SEG7_ALPHA_LOWER \
181 _MAP_123_126_ASCII_SEG7_SYMBOL
182
183#define SEG7_DEFAULT_MAP(_name) \
184 SEG7_CONVERSION_MAP(_name,MAP_ASCII7SEG_ALPHANUM)
185
186#endif /* MAP_TO_7SEGMENT_H */
187
diff --git a/include/linux/marker.h b/include/linux/marker.h
index 1290653f9241..b85e74ca782f 100644
--- a/include/linux/marker.h
+++ b/include/linux/marker.h
@@ -12,6 +12,7 @@
12 * See the file COPYING for more details. 12 * See the file COPYING for more details.
13 */ 13 */
14 14
15#include <stdarg.h>
15#include <linux/types.h> 16#include <linux/types.h>
16 17
17struct module; 18struct module;
@@ -48,10 +49,28 @@ struct marker {
48 void (*call)(const struct marker *mdata, void *call_private, ...); 49 void (*call)(const struct marker *mdata, void *call_private, ...);
49 struct marker_probe_closure single; 50 struct marker_probe_closure single;
50 struct marker_probe_closure *multi; 51 struct marker_probe_closure *multi;
52 const char *tp_name; /* Optional tracepoint name */
53 void *tp_cb; /* Optional tracepoint callback */
51} __attribute__((aligned(8))); 54} __attribute__((aligned(8)));
52 55
53#ifdef CONFIG_MARKERS 56#ifdef CONFIG_MARKERS
54 57
58#define _DEFINE_MARKER(name, tp_name_str, tp_cb, format) \
59 static const char __mstrtab_##name[] \
60 __attribute__((section("__markers_strings"))) \
61 = #name "\0" format; \
62 static struct marker __mark_##name \
63 __attribute__((section("__markers"), aligned(8))) = \
64 { __mstrtab_##name, &__mstrtab_##name[sizeof(#name)], \
65 0, 0, marker_probe_cb, { __mark_empty_function, NULL},\
66 NULL, tp_name_str, tp_cb }
67
68#define DEFINE_MARKER(name, format) \
69 _DEFINE_MARKER(name, NULL, NULL, format)
70
71#define DEFINE_MARKER_TP(name, tp_name, tp_cb, format) \
72 _DEFINE_MARKER(name, #tp_name, tp_cb, format)
73
55/* 74/*
56 * Note : the empty asm volatile with read constraint is used here instead of a 75 * Note : the empty asm volatile with read constraint is used here instead of a
57 * "used" attribute to fix a gcc 4.1.x bug. 76 * "used" attribute to fix a gcc 4.1.x bug.
@@ -65,14 +84,7 @@ struct marker {
65 */ 84 */
66#define __trace_mark(generic, name, call_private, format, args...) \ 85#define __trace_mark(generic, name, call_private, format, args...) \
67 do { \ 86 do { \
68 static const char __mstrtab_##name[] \ 87 DEFINE_MARKER(name, format); \
69 __attribute__((section("__markers_strings"))) \
70 = #name "\0" format; \
71 static struct marker __mark_##name \
72 __attribute__((section("__markers"), aligned(8))) = \
73 { __mstrtab_##name, &__mstrtab_##name[sizeof(#name)], \
74 0, 0, marker_probe_cb, \
75 { __mark_empty_function, NULL}, NULL }; \
76 __mark_check_format(format, ## args); \ 88 __mark_check_format(format, ## args); \
77 if (unlikely(__mark_##name.state)) { \ 89 if (unlikely(__mark_##name.state)) { \
78 (*__mark_##name.call) \ 90 (*__mark_##name.call) \
@@ -80,14 +92,39 @@ struct marker {
80 } \ 92 } \
81 } while (0) 93 } while (0)
82 94
95#define __trace_mark_tp(name, call_private, tp_name, tp_cb, format, args...) \
96 do { \
97 void __check_tp_type(void) \
98 { \
99 register_trace_##tp_name(tp_cb); \
100 } \
101 DEFINE_MARKER_TP(name, tp_name, tp_cb, format); \
102 __mark_check_format(format, ## args); \
103 (*__mark_##name.call)(&__mark_##name, call_private, \
104 ## args); \
105 } while (0)
106
83extern void marker_update_probe_range(struct marker *begin, 107extern void marker_update_probe_range(struct marker *begin,
84 struct marker *end); 108 struct marker *end);
109
110#define GET_MARKER(name) (__mark_##name)
111
85#else /* !CONFIG_MARKERS */ 112#else /* !CONFIG_MARKERS */
113#define DEFINE_MARKER(name, tp_name, tp_cb, format)
86#define __trace_mark(generic, name, call_private, format, args...) \ 114#define __trace_mark(generic, name, call_private, format, args...) \
87 __mark_check_format(format, ## args) 115 __mark_check_format(format, ## args)
116#define __trace_mark_tp(name, call_private, tp_name, tp_cb, format, args...) \
117 do { \
118 void __check_tp_type(void) \
119 { \
120 register_trace_##tp_name(tp_cb); \
121 } \
122 __mark_check_format(format, ## args); \
123 } while (0)
88static inline void marker_update_probe_range(struct marker *begin, 124static inline void marker_update_probe_range(struct marker *begin,
89 struct marker *end) 125 struct marker *end)
90{ } 126{ }
127#define GET_MARKER(name)
91#endif /* CONFIG_MARKERS */ 128#endif /* CONFIG_MARKERS */
92 129
93/** 130/**
@@ -117,6 +154,20 @@ static inline void marker_update_probe_range(struct marker *begin,
117 __trace_mark(1, name, NULL, format, ## args) 154 __trace_mark(1, name, NULL, format, ## args)
118 155
119/** 156/**
157 * trace_mark_tp - Marker in a tracepoint callback
158 * @name: marker name, not quoted.
159 * @tp_name: tracepoint name, not quoted.
160 * @tp_cb: tracepoint callback. Should have an associated global symbol so it
161 * is not optimized away by the compiler (should not be static).
162 * @format: format string
163 * @args...: variable argument list
164 *
165 * Places a marker in a tracepoint callback.
166 */
167#define trace_mark_tp(name, tp_name, tp_cb, format, args...) \
168 __trace_mark_tp(name, NULL, tp_name, tp_cb, format, ## args)
169
170/**
120 * MARK_NOARGS - Format string for a marker with no argument. 171 * MARK_NOARGS - Format string for a marker with no argument.
121 */ 172 */
122#define MARK_NOARGS " " 173#define MARK_NOARGS " "
@@ -136,8 +187,6 @@ extern marker_probe_func __mark_empty_function;
136 187
137extern void marker_probe_cb(const struct marker *mdata, 188extern void marker_probe_cb(const struct marker *mdata,
138 void *call_private, ...); 189 void *call_private, ...);
139extern void marker_probe_cb_noarg(const struct marker *mdata,
140 void *call_private, ...);
141 190
142/* 191/*
143 * Connect a probe to a marker. 192 * Connect a probe to a marker.
@@ -160,4 +209,13 @@ extern int marker_probe_unregister_private_data(marker_probe_func *probe,
160extern void *marker_get_private_data(const char *name, marker_probe_func *probe, 209extern void *marker_get_private_data(const char *name, marker_probe_func *probe,
161 int num); 210 int num);
162 211
212/*
213 * marker_synchronize_unregister must be called between the last marker probe
214 * unregistration and the first one of
215 * - the end of module exit function
216 * - the free of any resource used by the probes
217 * to ensure the code and data are valid for any possibly running probes.
218 */
219#define marker_synchronize_unregister() synchronize_sched()
220
163#endif 221#endif
diff --git a/include/linux/mdio-gpio.h b/include/linux/mdio-gpio.h
new file mode 100644
index 000000000000..e9d3fdfe41d7
--- /dev/null
+++ b/include/linux/mdio-gpio.h
@@ -0,0 +1,25 @@
1/*
2 * MDIO-GPIO bus platform data structures
3 *
4 * Copyright (C) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef __LINUX_MDIO_GPIO_H
12#define __LINUX_MDIO_GPIO_H
13
14#include <linux/mdio-bitbang.h>
15
16struct mdio_gpio_platform_data {
17 /* GPIO numbers for bus pins */
18 unsigned int mdc;
19 unsigned int mdio;
20
21 unsigned int phy_mask;
22 int irqs[PHY_MAX_ADDR];
23};
24
25#endif /* __LINUX_MDIO_GPIO_H */
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index fdf3967e1397..1fbe14d39521 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -27,16 +27,13 @@ struct mm_struct;
27 27
28#ifdef CONFIG_CGROUP_MEM_RES_CTLR 28#ifdef CONFIG_CGROUP_MEM_RES_CTLR
29 29
30#define page_reset_bad_cgroup(page) ((page)->page_cgroup = 0)
31
32extern struct page_cgroup *page_get_page_cgroup(struct page *page);
33extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm, 30extern int mem_cgroup_charge(struct page *page, struct mm_struct *mm,
34 gfp_t gfp_mask); 31 gfp_t gfp_mask);
35extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, 32extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
36 gfp_t gfp_mask); 33 gfp_t gfp_mask);
34extern void mem_cgroup_move_lists(struct page *page, enum lru_list lru);
37extern void mem_cgroup_uncharge_page(struct page *page); 35extern void mem_cgroup_uncharge_page(struct page *page);
38extern void mem_cgroup_uncharge_cache_page(struct page *page); 36extern void mem_cgroup_uncharge_cache_page(struct page *page);
39extern void mem_cgroup_move_lists(struct page *page, bool active);
40extern int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask); 37extern int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask);
41 38
42extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, 39extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
@@ -44,7 +41,7 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
44 unsigned long *scanned, int order, 41 unsigned long *scanned, int order,
45 int mode, struct zone *z, 42 int mode, struct zone *z,
46 struct mem_cgroup *mem_cont, 43 struct mem_cgroup *mem_cont,
47 int active); 44 int active, int file);
48extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask); 45extern void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask);
49int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); 46int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem);
50 47
@@ -69,21 +66,11 @@ extern void mem_cgroup_note_reclaim_priority(struct mem_cgroup *mem,
69extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem, 66extern void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
70 int priority); 67 int priority);
71 68
72extern long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem, 69extern long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, struct zone *zone,
73 struct zone *zone, int priority); 70 int priority, enum lru_list lru);
74extern long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem,
75 struct zone *zone, int priority);
76
77#else /* CONFIG_CGROUP_MEM_RES_CTLR */
78static inline void page_reset_bad_cgroup(struct page *page)
79{
80}
81 71
82static inline struct page_cgroup *page_get_page_cgroup(struct page *page)
83{
84 return NULL;
85}
86 72
73#else /* CONFIG_CGROUP_MEM_RES_CTLR */
87static inline int mem_cgroup_charge(struct page *page, 74static inline int mem_cgroup_charge(struct page *page,
88 struct mm_struct *mm, gfp_t gfp_mask) 75 struct mm_struct *mm, gfp_t gfp_mask)
89{ 76{
@@ -159,14 +146,9 @@ static inline void mem_cgroup_record_reclaim_priority(struct mem_cgroup *mem,
159{ 146{
160} 147}
161 148
162static inline long mem_cgroup_calc_reclaim_active(struct mem_cgroup *mem, 149static inline long mem_cgroup_calc_reclaim(struct mem_cgroup *mem,
163 struct zone *zone, int priority) 150 struct zone *zone, int priority,
164{ 151 enum lru_list lru)
165 return 0;
166}
167
168static inline long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem,
169 struct zone *zone, int priority)
170{ 152{
171 return 0; 153 return 0;
172} 154}
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 2f5f8a5ef2a0..36c82c9e6ea7 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -91,7 +91,7 @@ extern int memory_notify(unsigned long val, void *v);
91 91
92#ifdef CONFIG_MEMORY_HOTPLUG 92#ifdef CONFIG_MEMORY_HOTPLUG
93#define hotplug_memory_notifier(fn, pri) { \ 93#define hotplug_memory_notifier(fn, pri) { \
94 static struct notifier_block fn##_mem_nb = \ 94 static __meminitdata struct notifier_block fn##_mem_nb =\
95 { .notifier_call = fn, .priority = pri }; \ 95 { .notifier_call = fn, .priority = pri }; \
96 register_memory_notifier(&fn##_mem_nb); \ 96 register_memory_notifier(&fn##_mem_nb); \
97} 97}
diff --git a/include/linux/mfd/da903x.h b/include/linux/mfd/da903x.h
new file mode 100644
index 000000000000..cad314c12439
--- /dev/null
+++ b/include/linux/mfd/da903x.h
@@ -0,0 +1,201 @@
1#ifndef __LINUX_PMIC_DA903X_H
2#define __LINUX_PMIC_DA903X_H
3
4/* Unified sub device IDs for DA9030/DA9034 */
5enum {
6 DA9030_ID_LED_1,
7 DA9030_ID_LED_2,
8 DA9030_ID_LED_3,
9 DA9030_ID_LED_4,
10 DA9030_ID_LED_PC,
11 DA9030_ID_VIBRA,
12 DA9030_ID_WLED,
13 DA9030_ID_BUCK1,
14 DA9030_ID_BUCK2,
15 DA9030_ID_LDO1,
16 DA9030_ID_LDO2,
17 DA9030_ID_LDO3,
18 DA9030_ID_LDO4,
19 DA9030_ID_LDO5,
20 DA9030_ID_LDO6,
21 DA9030_ID_LDO7,
22 DA9030_ID_LDO8,
23 DA9030_ID_LDO9,
24 DA9030_ID_LDO10,
25 DA9030_ID_LDO11,
26 DA9030_ID_LDO12,
27 DA9030_ID_LDO13,
28 DA9030_ID_LDO14,
29 DA9030_ID_LDO15,
30 DA9030_ID_LDO16,
31 DA9030_ID_LDO17,
32 DA9030_ID_LDO18,
33 DA9030_ID_LDO19,
34 DA9030_ID_LDO_INT, /* LDO Internal */
35
36 DA9034_ID_LED_1,
37 DA9034_ID_LED_2,
38 DA9034_ID_VIBRA,
39 DA9034_ID_WLED,
40 DA9034_ID_TOUCH,
41
42 DA9034_ID_BUCK1,
43 DA9034_ID_BUCK2,
44 DA9034_ID_LDO1,
45 DA9034_ID_LDO2,
46 DA9034_ID_LDO3,
47 DA9034_ID_LDO4,
48 DA9034_ID_LDO5,
49 DA9034_ID_LDO6,
50 DA9034_ID_LDO7,
51 DA9034_ID_LDO8,
52 DA9034_ID_LDO9,
53 DA9034_ID_LDO10,
54 DA9034_ID_LDO11,
55 DA9034_ID_LDO12,
56 DA9034_ID_LDO13,
57 DA9034_ID_LDO14,
58 DA9034_ID_LDO15,
59};
60
61/*
62 * DA9030/DA9034 LEDs sub-devices uses generic "struct led_info"
63 * as the platform_data
64 */
65
66/* DA9030 flags for "struct led_info"
67 */
68#define DA9030_LED_RATE_ON (0 << 5)
69#define DA9030_LED_RATE_052S (1 << 5)
70#define DA9030_LED_DUTY_1_16 (0 << 3)
71#define DA9030_LED_DUTY_1_8 (1 << 3)
72#define DA9030_LED_DUTY_1_4 (2 << 3)
73#define DA9030_LED_DUTY_1_2 (3 << 3)
74
75#define DA9030_VIBRA_MODE_1P3V (0 << 1)
76#define DA9030_VIBRA_MODE_2P7V (1 << 1)
77#define DA9030_VIBRA_FREQ_1HZ (0 << 2)
78#define DA9030_VIBRA_FREQ_2HZ (1 << 2)
79#define DA9030_VIBRA_FREQ_4HZ (2 << 2)
80#define DA9030_VIBRA_FREQ_8HZ (3 << 2)
81#define DA9030_VIBRA_DUTY_ON (0 << 4)
82#define DA9030_VIBRA_DUTY_75P (1 << 4)
83#define DA9030_VIBRA_DUTY_50P (2 << 4)
84#define DA9030_VIBRA_DUTY_25P (3 << 4)
85
86/* DA9034 flags for "struct led_info" */
87#define DA9034_LED_RAMP (1 << 7)
88
89/* DA9034 touch screen platform data */
90struct da9034_touch_pdata {
91 int interval_ms; /* sampling interval while pen down */
92 int x_inverted;
93 int y_inverted;
94};
95
96struct da903x_subdev_info {
97 int id;
98 const char *name;
99 void *platform_data;
100};
101
102struct da903x_platform_data {
103 int num_subdevs;
104 struct da903x_subdev_info *subdevs;
105};
106
107/* bit definitions for DA9030 events */
108#define DA9030_EVENT_ONKEY (1 << 0)
109#define DA9030_EVENT_PWREN (1 << 1)
110#define DA9030_EVENT_EXTON (1 << 2)
111#define DA9030_EVENT_CHDET (1 << 3)
112#define DA9030_EVENT_TBAT (1 << 4)
113#define DA9030_EVENT_VBATMON (1 << 5)
114#define DA9030_EVENT_VBATMON_TXON (1 << 6)
115#define DA9030_EVENT_CHIOVER (1 << 7)
116#define DA9030_EVENT_TCTO (1 << 8)
117#define DA9030_EVENT_CCTO (1 << 9)
118#define DA9030_EVENT_ADC_READY (1 << 10)
119#define DA9030_EVENT_VBUS_4P4 (1 << 11)
120#define DA9030_EVENT_VBUS_4P0 (1 << 12)
121#define DA9030_EVENT_SESS_VALID (1 << 13)
122#define DA9030_EVENT_SRP_DETECT (1 << 14)
123#define DA9030_EVENT_WATCHDOG (1 << 15)
124#define DA9030_EVENT_LDO15 (1 << 16)
125#define DA9030_EVENT_LDO16 (1 << 17)
126#define DA9030_EVENT_LDO17 (1 << 18)
127#define DA9030_EVENT_LDO18 (1 << 19)
128#define DA9030_EVENT_LDO19 (1 << 20)
129#define DA9030_EVENT_BUCK2 (1 << 21)
130
131/* bit definitions for DA9034 events */
132#define DA9034_EVENT_ONKEY (1 << 0)
133#define DA9034_EVENT_EXTON (1 << 2)
134#define DA9034_EVENT_CHDET (1 << 3)
135#define DA9034_EVENT_TBAT (1 << 4)
136#define DA9034_EVENT_VBATMON (1 << 5)
137#define DA9034_EVENT_REV_IOVER (1 << 6)
138#define DA9034_EVENT_CH_IOVER (1 << 7)
139#define DA9034_EVENT_CH_TCTO (1 << 8)
140#define DA9034_EVENT_CH_CCTO (1 << 9)
141#define DA9034_EVENT_USB_DEV (1 << 10)
142#define DA9034_EVENT_OTGCP_IOVER (1 << 11)
143#define DA9034_EVENT_VBUS_4P55 (1 << 12)
144#define DA9034_EVENT_VBUS_3P8 (1 << 13)
145#define DA9034_EVENT_SESS_1P8 (1 << 14)
146#define DA9034_EVENT_SRP_READY (1 << 15)
147#define DA9034_EVENT_ADC_MAN (1 << 16)
148#define DA9034_EVENT_ADC_AUTO4 (1 << 17)
149#define DA9034_EVENT_ADC_AUTO5 (1 << 18)
150#define DA9034_EVENT_ADC_AUTO6 (1 << 19)
151#define DA9034_EVENT_PEN_DOWN (1 << 20)
152#define DA9034_EVENT_TSI_READY (1 << 21)
153#define DA9034_EVENT_UART_TX (1 << 22)
154#define DA9034_EVENT_UART_RX (1 << 23)
155#define DA9034_EVENT_HEADSET (1 << 25)
156#define DA9034_EVENT_HOOKSWITCH (1 << 26)
157#define DA9034_EVENT_WATCHDOG (1 << 27)
158
159extern int da903x_register_notifier(struct device *dev,
160 struct notifier_block *nb, unsigned int events);
161extern int da903x_unregister_notifier(struct device *dev,
162 struct notifier_block *nb, unsigned int events);
163
164/* Status Query Interface */
165#define DA9030_STATUS_ONKEY (1 << 0)
166#define DA9030_STATUS_PWREN1 (1 << 1)
167#define DA9030_STATUS_EXTON (1 << 2)
168#define DA9030_STATUS_CHDET (1 << 3)
169#define DA9030_STATUS_TBAT (1 << 4)
170#define DA9030_STATUS_VBATMON (1 << 5)
171#define DA9030_STATUS_VBATMON_TXON (1 << 6)
172#define DA9030_STATUS_MCLKDET (1 << 7)
173
174#define DA9034_STATUS_ONKEY (1 << 0)
175#define DA9034_STATUS_EXTON (1 << 2)
176#define DA9034_STATUS_CHDET (1 << 3)
177#define DA9034_STATUS_TBAT (1 << 4)
178#define DA9034_STATUS_VBATMON (1 << 5)
179#define DA9034_STATUS_PEN_DOWN (1 << 6)
180#define DA9034_STATUS_MCLKDET (1 << 7)
181#define DA9034_STATUS_USB_DEV (1 << 8)
182#define DA9034_STATUS_HEADSET (1 << 9)
183#define DA9034_STATUS_HOOKSWITCH (1 << 10)
184#define DA9034_STATUS_REMCON (1 << 11)
185#define DA9034_STATUS_VBUS_VALID_4P55 (1 << 12)
186#define DA9034_STATUS_VBUS_VALID_3P8 (1 << 13)
187#define DA9034_STATUS_SESS_VALID_1P8 (1 << 14)
188#define DA9034_STATUS_SRP_READY (1 << 15)
189
190extern int da903x_query_status(struct device *dev, unsigned int status);
191
192
193/* NOTE: the two functions below are not intended for use outside
194 * of the DA9034 sub-device drivers
195 */
196extern int da903x_write(struct device *dev, int reg, uint8_t val);
197extern int da903x_read(struct device *dev, int reg, uint8_t *val);
198extern int da903x_update(struct device *dev, int reg, uint8_t val, uint8_t mask);
199extern int da903x_set_bits(struct device *dev, int reg, uint8_t bit_mask);
200extern int da903x_clr_bits(struct device *dev, int reg, uint8_t bit_mask);
201#endif /* __LINUX_PMIC_DA903X_H */
diff --git a/include/linux/mfd/t7l66xb.h b/include/linux/mfd/t7l66xb.h
index e83c7f2036f9..b4629818aea5 100644
--- a/include/linux/mfd/t7l66xb.h
+++ b/include/linux/mfd/t7l66xb.h
@@ -15,8 +15,6 @@
15#include <linux/mfd/tmio.h> 15#include <linux/mfd/tmio.h>
16 16
17struct t7l66xb_platform_data { 17struct t7l66xb_platform_data {
18 int (*enable_clk32k)(struct platform_device *dev);
19 void (*disable_clk32k)(struct platform_device *dev);
20 int (*enable)(struct platform_device *dev); 18 int (*enable)(struct platform_device *dev);
21 int (*disable)(struct platform_device *dev); 19 int (*disable)(struct platform_device *dev);
22 int (*suspend)(struct platform_device *dev); 20 int (*suspend)(struct platform_device *dev);
diff --git a/include/linux/mfd/tc6387xb.h b/include/linux/mfd/tc6387xb.h
index fa06e0610b8e..b4888209494a 100644
--- a/include/linux/mfd/tc6387xb.h
+++ b/include/linux/mfd/tc6387xb.h
@@ -11,9 +11,6 @@
11#define MFD_TC6387XB_H 11#define MFD_TC6387XB_H
12 12
13struct tc6387xb_platform_data { 13struct tc6387xb_platform_data {
14 int (*enable_clk32k)(struct platform_device *dev);
15 void (*disable_clk32k)(struct platform_device *dev);
16
17 int (*enable)(struct platform_device *dev); 14 int (*enable)(struct platform_device *dev);
18 int (*disable)(struct platform_device *dev); 15 int (*disable)(struct platform_device *dev);
19 int (*suspend)(struct platform_device *dev); 16 int (*suspend)(struct platform_device *dev);
diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
index fec7b3f7a81f..626e448205c5 100644
--- a/include/linux/mfd/tc6393xb.h
+++ b/include/linux/mfd/tc6393xb.h
@@ -17,12 +17,12 @@
17#ifndef MFD_TC6393XB_H 17#ifndef MFD_TC6393XB_H
18#define MFD_TC6393XB_H 18#define MFD_TC6393XB_H
19 19
20#include <linux/fb.h>
21
20/* Also one should provide the CK3P6MI clock */ 22/* Also one should provide the CK3P6MI clock */
21struct tc6393xb_platform_data { 23struct tc6393xb_platform_data {
22 u16 scr_pll2cr; /* PLL2 Control */ 24 u16 scr_pll2cr; /* PLL2 Control */
23 u16 scr_gper; /* GP Enable */ 25 u16 scr_gper; /* GP Enable */
24 u32 scr_gpo_doecr; /* GPO Data OE Control */
25 u32 scr_gpo_dsr; /* GPO Data Set */
26 26
27 int (*enable)(struct platform_device *dev); 27 int (*enable)(struct platform_device *dev);
28 int (*disable)(struct platform_device *dev); 28 int (*disable)(struct platform_device *dev);
@@ -31,15 +31,28 @@ struct tc6393xb_platform_data {
31 31
32 int irq_base; /* base for subdevice irqs */ 32 int irq_base; /* base for subdevice irqs */
33 int gpio_base; 33 int gpio_base;
34 int (*setup)(struct platform_device *dev);
35 void (*teardown)(struct platform_device *dev);
34 36
35 struct tmio_nand_data *nand_data; 37 struct tmio_nand_data *nand_data;
38 struct tmio_fb_data *fb_data;
39
40 unsigned resume_restore : 1; /* make special actions
41 to preserve the state
42 on suspend/resume */
36}; 43};
37 44
45extern int tc6393xb_lcd_mode(struct platform_device *fb,
46 const struct fb_videomode *mode);
47extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);
48
38/* 49/*
39 * Relative to irq_base 50 * Relative to irq_base
40 */ 51 */
41#define IRQ_TC6393_NAND 0 52#define IRQ_TC6393_NAND 0
42#define IRQ_TC6393_MMC 1 53#define IRQ_TC6393_MMC 1
54#define IRQ_TC6393_OHCI 2
55#define IRQ_TC6393_FB 4
43 56
44#define TC6393XB_NR_IRQS 8 57#define TC6393XB_NR_IRQS 8
45 58
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index ec612e66391c..516d955ab8a1 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -1,6 +1,8 @@
1#ifndef MFD_TMIO_H 1#ifndef MFD_TMIO_H
2#define MFD_TMIO_H 2#define MFD_TMIO_H
3 3
4#include <linux/fb.h>
5
4#define tmio_ioread8(addr) readb(addr) 6#define tmio_ioread8(addr) readb(addr)
5#define tmio_ioread16(addr) readw(addr) 7#define tmio_ioread16(addr) readw(addr)
6#define tmio_ioread16_rep(r, b, l) readsw(r, b, l) 8#define tmio_ioread16_rep(r, b, l) readsw(r, b, l)
@@ -25,4 +27,21 @@ struct tmio_nand_data {
25 unsigned int num_partitions; 27 unsigned int num_partitions;
26}; 28};
27 29
30#define FBIO_TMIO_ACC_WRITE 0x7C639300
31#define FBIO_TMIO_ACC_SYNC 0x7C639301
32
33struct tmio_fb_data {
34 int (*lcd_set_power)(struct platform_device *fb_dev,
35 bool on);
36 int (*lcd_mode)(struct platform_device *fb_dev,
37 const struct fb_videomode *mode);
38 int num_modes;
39 struct fb_videomode *modes;
40
41 /* in mm: size of screen */
42 int height;
43 int width;
44};
45
46
28#endif 47#endif
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h
index 217bb22ebb8e..af95a1d2f3a1 100644
--- a/include/linux/mfd/wm8350/audio.h
+++ b/include/linux/mfd/wm8350/audio.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * audio.h -- Audio Driver for Wolfson WM8350 PMIC 2 * audio.h -- Audio Driver for Wolfson WM8350 PMIC
3 * 3 *
4 * Copyright 2007 Wolfson Microelectronics PLC 4 * Copyright 2007, 2008 Wolfson Microelectronics PLC
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 7 * under the terms of the GNU General Public License as published by the
@@ -70,9 +70,9 @@
70#define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */ 70#define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */
71 71
72#define WM8350_VMID_OFF 0 72#define WM8350_VMID_OFF 0
73#define WM8350_VMID_500K 1 73#define WM8350_VMID_300K 1
74#define WM8350_VMID_100K 2 74#define WM8350_VMID_50K 2
75#define WM8350_VMID_10K 3 75#define WM8350_VMID_5K 3
76 76
77/* 77/*
78 * R40 (0x28) - Clock Control 1 78 * R40 (0x28) - Clock Control 1
@@ -591,8 +591,38 @@
591#define WM8350_IRQ_CODEC_MICSCD 41 591#define WM8350_IRQ_CODEC_MICSCD 41
592#define WM8350_IRQ_CODEC_MICD 42 592#define WM8350_IRQ_CODEC_MICD 42
593 593
594/*
595 * WM8350 Platform data.
596 *
597 * This must be initialised per platform for best audio performance.
598 * Please see WM8350 datasheet for information.
599 */
600struct wm8350_audio_platform_data {
601 int vmid_discharge_msecs; /* VMID --> OFF discharge time */
602 int drain_msecs; /* OFF drain time */
603 int cap_discharge_msecs; /* Cap ON (from OFF) discharge time */
604 int vmid_charge_msecs; /* vmid power up time */
605 u32 vmid_s_curve:2; /* vmid enable s curve speed */
606 u32 dis_out4:2; /* out4 discharge speed */
607 u32 dis_out3:2; /* out3 discharge speed */
608 u32 dis_out2:2; /* out2 discharge speed */
609 u32 dis_out1:2; /* out1 discharge speed */
610 u32 vroi_out4:1; /* out4 tie off */
611 u32 vroi_out3:1; /* out3 tie off */
612 u32 vroi_out2:1; /* out2 tie off */
613 u32 vroi_out1:1; /* out1 tie off */
614 u32 vroi_enable:1; /* enable tie off */
615 u32 codec_current_on:2; /* current level ON */
616 u32 codec_current_standby:2; /* current level STANDBY */
617 u32 codec_current_charge:2; /* codec current @ vmid charge */
618};
619
620struct snd_soc_codec;
621
594struct wm8350_codec { 622struct wm8350_codec {
595 struct platform_device *pdev; 623 struct platform_device *pdev;
624 struct snd_soc_codec *codec;
625 struct wm8350_audio_platform_data *platform_data;
596}; 626};
597 627
598#endif 628#endif
diff --git a/include/linux/mfd/wm8350/rtc.h b/include/linux/mfd/wm8350/rtc.h
index dfda69e9f440..24add2bef6c9 100644
--- a/include/linux/mfd/wm8350/rtc.h
+++ b/include/linux/mfd/wm8350/rtc.h
@@ -261,6 +261,8 @@
261 261
262struct wm8350_rtc { 262struct wm8350_rtc {
263 struct platform_device *pdev; 263 struct platform_device *pdev;
264 struct rtc_device *rtc;
265 int alarm_enabled; /* used over suspend/resume */
264}; 266};
265 267
266#endif 268#endif
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 03aea612d284..3f34005068d4 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -7,7 +7,6 @@
7typedef struct page *new_page_t(struct page *, unsigned long private, int **); 7typedef struct page *new_page_t(struct page *, unsigned long private, int **);
8 8
9#ifdef CONFIG_MIGRATION 9#ifdef CONFIG_MIGRATION
10extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
11extern int putback_lru_pages(struct list_head *l); 10extern int putback_lru_pages(struct list_head *l);
12extern int migrate_page(struct address_space *, 11extern int migrate_page(struct address_space *,
13 struct page *, struct page *); 12 struct page *, struct page *);
@@ -21,8 +20,6 @@ extern int migrate_vmas(struct mm_struct *mm,
21 const nodemask_t *from, const nodemask_t *to, 20 const nodemask_t *from, const nodemask_t *to,
22 unsigned long flags); 21 unsigned long flags);
23#else 22#else
24static inline int isolate_lru_page(struct page *p, struct list_head *list)
25 { return -ENOSYS; }
26static inline int putback_lru_pages(struct list_head *l) { return 0; } 23static inline int putback_lru_pages(struct list_head *l) { return 0; }
27static inline int migrate_pages(struct list_head *l, new_page_t x, 24static inline int migrate_pages(struct list_head *l, new_page_t x,
28 unsigned long private) { return -ENOSYS; } 25 unsigned long private) { return -ENOSYS; }
diff --git a/include/linux/mii.h b/include/linux/mii.h
index 151b7e0182c7..ad748588faf1 100644
--- a/include/linux/mii.h
+++ b/include/linux/mii.h
@@ -135,6 +135,10 @@
135#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ 135#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */
136#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ 136#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
137 137
138/* Flow control flags */
139#define FLOW_CTRL_TX 0x01
140#define FLOW_CTRL_RX 0x02
141
138/* This structure is used in all SIOCxMIIxxx ioctl calls */ 142/* This structure is used in all SIOCxMIIxxx ioctl calls */
139struct mii_ioctl_data { 143struct mii_ioctl_data {
140 __u16 phy_id; 144 __u16 phy_id;
@@ -235,5 +239,34 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock,
235 return 0; 239 return 0;
236} 240}
237 241
242/**
243 * mii_resolve_flowctrl_fdx
244 * @lcladv: value of MII ADVERTISE register
245 * @rmtadv: value of MII LPA register
246 *
247 * Resolve full duplex flow control as per IEEE 802.3-2005 table 28B-3
248 */
249static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv)
250{
251 u8 cap = 0;
252
253 if (lcladv & ADVERTISE_PAUSE_CAP) {
254 if (lcladv & ADVERTISE_PAUSE_ASYM) {
255 if (rmtadv & LPA_PAUSE_CAP)
256 cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
257 else if (rmtadv & LPA_PAUSE_ASYM)
258 cap = FLOW_CTRL_RX;
259 } else {
260 if (rmtadv & LPA_PAUSE_CAP)
261 cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
262 }
263 } else if (lcladv & ADVERTISE_PAUSE_ASYM) {
264 if ((rmtadv & LPA_PAUSE_CAP) && (rmtadv & LPA_PAUSE_ASYM))
265 cap = FLOW_CTRL_TX;
266 }
267
268 return cap;
269}
270
238#endif /* __KERNEL__ */ 271#endif /* __KERNEL__ */
239#endif /* __LINUX_MII_H__ */ 272#endif /* __LINUX_MII_H__ */
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index 77323a72dd3c..cf9c679ab38b 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -132,6 +132,15 @@ enum {
132 MLX4_MAILBOX_SIZE = 4096 132 MLX4_MAILBOX_SIZE = 4096
133}; 133};
134 134
135enum {
136 /* set port opcode modifiers */
137 MLX4_SET_PORT_GENERAL = 0x0,
138 MLX4_SET_PORT_RQP_CALC = 0x1,
139 MLX4_SET_PORT_MAC_TABLE = 0x2,
140 MLX4_SET_PORT_VLAN_TABLE = 0x3,
141 MLX4_SET_PORT_PRIO_MAP = 0x4,
142};
143
135struct mlx4_dev; 144struct mlx4_dev;
136 145
137struct mlx4_cmd_mailbox { 146struct mlx4_cmd_mailbox {
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index b2f944468313..8f659cc29960 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -60,6 +60,7 @@ enum {
60 MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1 << 7, 60 MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1 << 7,
61 MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1 << 8, 61 MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1 << 8,
62 MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1 << 9, 62 MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1 << 9,
63 MLX4_DEV_CAP_FLAG_DPDP = 1 << 12,
63 MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1 << 16, 64 MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1 << 16,
64 MLX4_DEV_CAP_FLAG_APM = 1 << 17, 65 MLX4_DEV_CAP_FLAG_APM = 1 << 17,
65 MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, 66 MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18,
@@ -145,6 +146,29 @@ enum {
145 MLX4_MTT_FLAG_PRESENT = 1 146 MLX4_MTT_FLAG_PRESENT = 1
146}; 147};
147 148
149enum mlx4_qp_region {
150 MLX4_QP_REGION_FW = 0,
151 MLX4_QP_REGION_ETH_ADDR,
152 MLX4_QP_REGION_FC_ADDR,
153 MLX4_QP_REGION_FC_EXCH,
154 MLX4_NUM_QP_REGION
155};
156
157enum mlx4_port_type {
158 MLX4_PORT_TYPE_IB = 1 << 0,
159 MLX4_PORT_TYPE_ETH = 1 << 1,
160};
161
162enum mlx4_special_vlan_idx {
163 MLX4_NO_VLAN_IDX = 0,
164 MLX4_VLAN_MISS_IDX,
165 MLX4_VLAN_REGULAR
166};
167
168enum {
169 MLX4_NUM_FEXCH = 64 * 1024,
170};
171
148static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) 172static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor)
149{ 173{
150 return (major << 32) | (minor << 16) | subminor; 174 return (major << 32) | (minor << 16) | subminor;
@@ -154,7 +178,10 @@ struct mlx4_caps {
154 u64 fw_ver; 178 u64 fw_ver;
155 int num_ports; 179 int num_ports;
156 int vl_cap[MLX4_MAX_PORTS + 1]; 180 int vl_cap[MLX4_MAX_PORTS + 1];
157 int mtu_cap[MLX4_MAX_PORTS + 1]; 181 int ib_mtu_cap[MLX4_MAX_PORTS + 1];
182 __be32 ib_port_def_cap[MLX4_MAX_PORTS + 1];
183 u64 def_mac[MLX4_MAX_PORTS + 1];
184 int eth_mtu_cap[MLX4_MAX_PORTS + 1];
158 int gid_table_len[MLX4_MAX_PORTS + 1]; 185 int gid_table_len[MLX4_MAX_PORTS + 1];
159 int pkey_table_len[MLX4_MAX_PORTS + 1]; 186 int pkey_table_len[MLX4_MAX_PORTS + 1];
160 int local_ca_ack_delay; 187 int local_ca_ack_delay;
@@ -169,7 +196,6 @@ struct mlx4_caps {
169 int max_rq_desc_sz; 196 int max_rq_desc_sz;
170 int max_qp_init_rdma; 197 int max_qp_init_rdma;
171 int max_qp_dest_rdma; 198 int max_qp_dest_rdma;
172 int reserved_qps;
173 int sqp_start; 199 int sqp_start;
174 int num_srqs; 200 int num_srqs;
175 int max_srq_wqes; 201 int max_srq_wqes;
@@ -180,6 +206,7 @@ struct mlx4_caps {
180 int reserved_cqs; 206 int reserved_cqs;
181 int num_eqs; 207 int num_eqs;
182 int reserved_eqs; 208 int reserved_eqs;
209 int num_comp_vectors;
183 int num_mpts; 210 int num_mpts;
184 int num_mtt_segs; 211 int num_mtt_segs;
185 int fmr_reserved_mtts; 212 int fmr_reserved_mtts;
@@ -201,6 +228,15 @@ struct mlx4_caps {
201 u16 stat_rate_support; 228 u16 stat_rate_support;
202 u8 port_width_cap[MLX4_MAX_PORTS + 1]; 229 u8 port_width_cap[MLX4_MAX_PORTS + 1];
203 int max_gso_sz; 230 int max_gso_sz;
231 int reserved_qps_cnt[MLX4_NUM_QP_REGION];
232 int reserved_qps;
233 int reserved_qps_base[MLX4_NUM_QP_REGION];
234 int log_num_macs;
235 int log_num_vlans;
236 int log_num_prios;
237 enum mlx4_port_type port_type[MLX4_MAX_PORTS + 1];
238 u8 supported_type[MLX4_MAX_PORTS + 1];
239 u32 port_mask;
204}; 240};
205 241
206struct mlx4_buf_list { 242struct mlx4_buf_list {
@@ -293,6 +329,7 @@ struct mlx4_cq {
293 int arm_sn; 329 int arm_sn;
294 330
295 int cqn; 331 int cqn;
332 unsigned vector;
296 333
297 atomic_t refcount; 334 atomic_t refcount;
298 struct completion free; 335 struct completion free;
@@ -355,6 +392,11 @@ struct mlx4_init_port_param {
355 u64 si_guid; 392 u64 si_guid;
356}; 393};
357 394
395#define mlx4_foreach_port(port, dev, type) \
396 for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \
397 if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \
398 ~(dev)->caps.port_mask) & 1 << ((port) - 1))
399
358int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, 400int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
359 struct mlx4_buf *buf); 401 struct mlx4_buf *buf);
360void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); 402void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
@@ -397,10 +439,13 @@ void mlx4_free_hwq_res(struct mlx4_dev *mdev, struct mlx4_hwq_resources *wqres,
397 439
398int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, 440int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
399 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq, 441 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq,
400 int collapsed); 442 unsigned vector, int collapsed);
401void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq); 443void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq);
402 444
403int mlx4_qp_alloc(struct mlx4_dev *dev, int sqpn, struct mlx4_qp *qp); 445int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, int *base);
446void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt);
447
448int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp);
404void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp); 449void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp);
405 450
406int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, 451int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt,
@@ -416,6 +461,12 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
416 int block_mcast_loopback); 461 int block_mcast_loopback);
417int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); 462int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
418 463
464int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index);
465void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index);
466
467int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index);
468void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index);
469
419int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list, 470int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list,
420 int npages, u64 iova, u32 *lkey, u32 *rkey); 471 int npages, u64 iova, u32 *lkey, u32 *rkey);
421int mlx4_fmr_alloc(struct mlx4_dev *dev, u32 pd, u32 access, int max_pages, 472int mlx4_fmr_alloc(struct mlx4_dev *dev, u32 pd, u32 access, int max_pages,
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c61ba10768ea..aaa8b843be28 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -132,6 +132,11 @@ extern unsigned int kobjsize(const void *objp);
132#define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ) 132#define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ)
133 133
134/* 134/*
135 * special vmas that are non-mergable, non-mlock()able
136 */
137#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP)
138
139/*
135 * mapping from the currently active vm_flags protection bits (the 140 * mapping from the currently active vm_flags protection bits (the
136 * low four bits) to a page protection mask.. 141 * low four bits) to a page protection mask..
137 */ 142 */
@@ -140,6 +145,23 @@ extern pgprot_t protection_map[16];
140#define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ 145#define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */
141#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ 146#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */
142 147
148/*
149 * This interface is used by x86 PAT code to identify a pfn mapping that is
150 * linear over entire vma. This is to optimize PAT code that deals with
151 * marking the physical region with a particular prot. This is not for generic
152 * mm use. Note also that this check will not work if the pfn mapping is
153 * linear for a vma starting at physical address 0. In which case PAT code
154 * falls back to slow path of reserving physical range page by page.
155 */
156static inline int is_linear_pfn_mapping(struct vm_area_struct *vma)
157{
158 return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff);
159}
160
161static inline int is_pfn_mapping(struct vm_area_struct *vma)
162{
163 return (vma->vm_flags & VM_PFNMAP);
164}
143 165
144/* 166/*
145 * vm_fault is filled by the the pagefault handler and passed to the vma's 167 * vm_fault is filled by the the pagefault handler and passed to the vma's
@@ -700,10 +722,10 @@ static inline int page_mapped(struct page *page)
700extern void show_free_areas(void); 722extern void show_free_areas(void);
701 723
702#ifdef CONFIG_SHMEM 724#ifdef CONFIG_SHMEM
703int shmem_lock(struct file *file, int lock, struct user_struct *user); 725extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
704#else 726#else
705static inline int shmem_lock(struct file *file, int lock, 727static inline int shmem_lock(struct file *file, int lock,
706 struct user_struct *user) 728 struct user_struct *user)
707{ 729{
708 return 0; 730 return 0;
709} 731}
@@ -776,6 +798,8 @@ int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
776 struct vm_area_struct *vma); 798 struct vm_area_struct *vma);
777void unmap_mapping_range(struct address_space *mapping, 799void unmap_mapping_range(struct address_space *mapping,
778 loff_t const holebegin, loff_t const holelen, int even_cows); 800 loff_t const holebegin, loff_t const holelen, int even_cows);
801int follow_phys(struct vm_area_struct *vma, unsigned long address,
802 unsigned int flags, unsigned long *prot, resource_size_t *phys);
779int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, 803int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
780 void *buf, int len, int write); 804 void *buf, int len, int write);
781 805
@@ -1281,5 +1305,7 @@ int vmemmap_populate_basepages(struct page *start_page,
1281int vmemmap_populate(struct page *start_page, unsigned long pages, int node); 1305int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
1282void vmemmap_populate_print_last(void); 1306void vmemmap_populate_print_last(void);
1283 1307
1308extern void *alloc_locked_buffer(size_t size);
1309extern void free_locked_buffer(void *buffer, size_t size);
1284#endif /* __KERNEL__ */ 1310#endif /* __KERNEL__ */
1285#endif /* _LINUX_MM_H */ 1311#endif /* _LINUX_MM_H */
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 895bc4e93039..c948350c378e 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -1,40 +1,100 @@
1static inline void 1#ifndef LINUX_MM_INLINE_H
2add_page_to_active_list(struct zone *zone, struct page *page) 2#define LINUX_MM_INLINE_H
3{
4 list_add(&page->lru, &zone->active_list);
5 __inc_zone_state(zone, NR_ACTIVE);
6}
7 3
8static inline void 4/**
9add_page_to_inactive_list(struct zone *zone, struct page *page) 5 * page_is_file_cache - should the page be on a file LRU or anon LRU?
6 * @page: the page to test
7 *
8 * Returns LRU_FILE if @page is page cache page backed by a regular filesystem,
9 * or 0 if @page is anonymous, tmpfs or otherwise ram or swap backed.
10 * Used by functions that manipulate the LRU lists, to sort a page
11 * onto the right LRU list.
12 *
13 * We would like to get this info without a page flag, but the state
14 * needs to survive until the page is last deleted from the LRU, which
15 * could be as far down as __page_cache_release.
16 */
17static inline int page_is_file_cache(struct page *page)
10{ 18{
11 list_add(&page->lru, &zone->inactive_list); 19 if (PageSwapBacked(page))
12 __inc_zone_state(zone, NR_INACTIVE); 20 return 0;
21
22 /* The page is page cache backed by a normal filesystem. */
23 return LRU_FILE;
13} 24}
14 25
15static inline void 26static inline void
16del_page_from_active_list(struct zone *zone, struct page *page) 27add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l)
17{ 28{
18 list_del(&page->lru); 29 list_add(&page->lru, &zone->lru[l].list);
19 __dec_zone_state(zone, NR_ACTIVE); 30 __inc_zone_state(zone, NR_LRU_BASE + l);
20} 31}
21 32
22static inline void 33static inline void
23del_page_from_inactive_list(struct zone *zone, struct page *page) 34del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l)
24{ 35{
25 list_del(&page->lru); 36 list_del(&page->lru);
26 __dec_zone_state(zone, NR_INACTIVE); 37 __dec_zone_state(zone, NR_LRU_BASE + l);
27} 38}
28 39
29static inline void 40static inline void
30del_page_from_lru(struct zone *zone, struct page *page) 41del_page_from_lru(struct zone *zone, struct page *page)
31{ 42{
43 enum lru_list l = LRU_BASE;
44
32 list_del(&page->lru); 45 list_del(&page->lru);
33 if (PageActive(page)) { 46 if (PageUnevictable(page)) {
34 __ClearPageActive(page); 47 __ClearPageUnevictable(page);
35 __dec_zone_state(zone, NR_ACTIVE); 48 l = LRU_UNEVICTABLE;
36 } else { 49 } else {
37 __dec_zone_state(zone, NR_INACTIVE); 50 if (PageActive(page)) {
51 __ClearPageActive(page);
52 l += LRU_ACTIVE;
53 }
54 l += page_is_file_cache(page);
55 }
56 __dec_zone_state(zone, NR_LRU_BASE + l);
57}
58
59/**
60 * page_lru - which LRU list should a page be on?
61 * @page: the page to test
62 *
63 * Returns the LRU list a page should be on, as an index
64 * into the array of LRU lists.
65 */
66static inline enum lru_list page_lru(struct page *page)
67{
68 enum lru_list lru = LRU_BASE;
69
70 if (PageUnevictable(page))
71 lru = LRU_UNEVICTABLE;
72 else {
73 if (PageActive(page))
74 lru += LRU_ACTIVE;
75 lru += page_is_file_cache(page);
38 } 76 }
77
78 return lru;
39} 79}
40 80
81/**
82 * inactive_anon_is_low - check if anonymous pages need to be deactivated
83 * @zone: zone to check
84 *
85 * Returns true if the zone does not have enough inactive anon pages,
86 * meaning some active anon pages need to be deactivated.
87 */
88static inline int inactive_anon_is_low(struct zone *zone)
89{
90 unsigned long active, inactive;
91
92 active = zone_page_state(zone, NR_ACTIVE_ANON);
93 inactive = zone_page_state(zone, NR_INACTIVE_ANON);
94
95 if (inactive * zone->inactive_ratio < active)
96 return 1;
97
98 return 0;
99}
100#endif
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 9d49fa36bbef..9cfc9b627fdd 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -94,9 +94,6 @@ struct page {
94 void *virtual; /* Kernel virtual address (NULL if 94 void *virtual; /* Kernel virtual address (NULL if
95 not kmapped, ie. highmem) */ 95 not kmapped, ie. highmem) */
96#endif /* WANT_PAGE_VIRTUAL */ 96#endif /* WANT_PAGE_VIRTUAL */
97#ifdef CONFIG_CGROUP_MEM_RES_CTLR
98 unsigned long page_cgroup;
99#endif
100}; 97};
101 98
102/* 99/*
@@ -235,8 +232,9 @@ struct mm_struct {
235 struct core_state *core_state; /* coredumping support */ 232 struct core_state *core_state; /* coredumping support */
236 233
237 /* aio bits */ 234 /* aio bits */
238 rwlock_t ioctx_list_lock; /* aio lock */ 235 spinlock_t ioctx_lock;
239 struct kioctx *ioctx_list; 236 struct hlist_head ioctx_list;
237
240#ifdef CONFIG_MM_OWNER 238#ifdef CONFIG_MM_OWNER
241 /* 239 /*
242 * "owner" points to a task that is regarded as the canonical 240 * "owner" points to a task that is regarded as the canonical
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index ee6e822d5994..403aa505f27e 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -130,7 +130,7 @@ struct mmc_card {
130#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) 130#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
131 131
132#define mmc_card_name(c) ((c)->cid.prod_name) 132#define mmc_card_name(c) ((c)->cid.prod_name)
133#define mmc_card_id(c) ((c)->dev.bus_id) 133#define mmc_card_id(c) (dev_name(&(c)->dev))
134 134
135#define mmc_list_to_card(l) container_of(l, struct mmc_card, node) 135#define mmc_list_to_card(l) container_of(l, struct mmc_card, node)
136#define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) 136#define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev)
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index bde891f64591..f842f234e44f 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -176,7 +176,7 @@ static inline void *mmc_priv(struct mmc_host *host)
176 176
177#define mmc_dev(x) ((x)->parent) 177#define mmc_dev(x) ((x)->parent)
178#define mmc_classdev(x) (&(x)->class_dev) 178#define mmc_classdev(x) (&(x)->class_dev)
179#define mmc_hostname(x) ((x)->class_dev.bus_id) 179#define mmc_hostname(x) (dev_name(&(x)->class_dev))
180 180
181extern int mmc_suspend_host(struct mmc_host *, pm_message_t); 181extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
182extern int mmc_resume_host(struct mmc_host *); 182extern int mmc_resume_host(struct mmc_host *);
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 07bee4a0d457..451bdfc85830 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -63,7 +63,7 @@ struct sdio_func {
63 63
64#define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT) 64#define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT)
65 65
66#define sdio_func_id(f) ((f)->dev.bus_id) 66#define sdio_func_id(f) (dev_name(&(f)->dev))
67 67
68#define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) 68#define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev)
69#define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) 69#define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d)
diff --git a/include/linux/mmiotrace.h b/include/linux/mmiotrace.h
index 61d19e1b7a0b..139d7c88d9c9 100644
--- a/include/linux/mmiotrace.h
+++ b/include/linux/mmiotrace.h
@@ -34,11 +34,15 @@ extern void unregister_kmmio_probe(struct kmmio_probe *p);
34/* Called from page fault handler. */ 34/* Called from page fault handler. */
35extern int kmmio_handler(struct pt_regs *regs, unsigned long addr); 35extern int kmmio_handler(struct pt_regs *regs, unsigned long addr);
36 36
37/* Called from ioremap.c */
38#ifdef CONFIG_MMIOTRACE 37#ifdef CONFIG_MMIOTRACE
38/* Called from ioremap.c */
39extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size, 39extern void mmiotrace_ioremap(resource_size_t offset, unsigned long size,
40 void __iomem *addr); 40 void __iomem *addr);
41extern void mmiotrace_iounmap(volatile void __iomem *addr); 41extern void mmiotrace_iounmap(volatile void __iomem *addr);
42
43/* For anyone to insert markers. Remember trailing newline. */
44extern int mmiotrace_printk(const char *fmt, ...)
45 __attribute__ ((format (printf, 1, 2)));
42#else 46#else
43static inline void mmiotrace_ioremap(resource_size_t offset, 47static inline void mmiotrace_ioremap(resource_size_t offset,
44 unsigned long size, void __iomem *addr) 48 unsigned long size, void __iomem *addr)
@@ -48,15 +52,22 @@ static inline void mmiotrace_ioremap(resource_size_t offset,
48static inline void mmiotrace_iounmap(volatile void __iomem *addr) 52static inline void mmiotrace_iounmap(volatile void __iomem *addr)
49{ 53{
50} 54}
51#endif /* CONFIG_MMIOTRACE_HOOKS */ 55
56static inline int mmiotrace_printk(const char *fmt, ...)
57 __attribute__ ((format (printf, 1, 0)));
58
59static inline int mmiotrace_printk(const char *fmt, ...)
60{
61 return 0;
62}
63#endif /* CONFIG_MMIOTRACE */
52 64
53enum mm_io_opcode { 65enum mm_io_opcode {
54 MMIO_READ = 0x1, /* struct mmiotrace_rw */ 66 MMIO_READ = 0x1, /* struct mmiotrace_rw */
55 MMIO_WRITE = 0x2, /* struct mmiotrace_rw */ 67 MMIO_WRITE = 0x2, /* struct mmiotrace_rw */
56 MMIO_PROBE = 0x3, /* struct mmiotrace_map */ 68 MMIO_PROBE = 0x3, /* struct mmiotrace_map */
57 MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */ 69 MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */
58 MMIO_MARKER = 0x5, /* raw char data */ 70 MMIO_UNKNOWN_OP = 0x5, /* struct mmiotrace_rw */
59 MMIO_UNKNOWN_OP = 0x6, /* struct mmiotrace_rw */
60}; 71};
61 72
62struct mmiotrace_rw { 73struct mmiotrace_rw {
@@ -81,5 +92,6 @@ extern void enable_mmiotrace(void);
81extern void disable_mmiotrace(void); 92extern void disable_mmiotrace(void);
82extern void mmio_trace_rw(struct mmiotrace_rw *rw); 93extern void mmio_trace_rw(struct mmiotrace_rw *rw);
83extern void mmio_trace_mapping(struct mmiotrace_map *map); 94extern void mmio_trace_mapping(struct mmiotrace_map *map);
95extern int mmio_trace_printk(const char *fmt, va_list args);
84 96
85#endif /* MMIOTRACE_H */ 97#endif /* MMIOTRACE_H */
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 428328a05fa1..35a7b5e19465 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -81,21 +81,31 @@ struct zone_padding {
81enum zone_stat_item { 81enum zone_stat_item {
82 /* First 128 byte cacheline (assuming 64 bit words) */ 82 /* First 128 byte cacheline (assuming 64 bit words) */
83 NR_FREE_PAGES, 83 NR_FREE_PAGES,
84 NR_INACTIVE, 84 NR_LRU_BASE,
85 NR_ACTIVE, 85 NR_INACTIVE_ANON = NR_LRU_BASE, /* must match order of LRU_[IN]ACTIVE */
86 NR_ACTIVE_ANON, /* " " " " " */
87 NR_INACTIVE_FILE, /* " " " " " */
88 NR_ACTIVE_FILE, /* " " " " " */
89#ifdef CONFIG_UNEVICTABLE_LRU
90 NR_UNEVICTABLE, /* " " " " " */
91 NR_MLOCK, /* mlock()ed pages found and moved off LRU */
92#else
93 NR_UNEVICTABLE = NR_ACTIVE_FILE, /* avoid compiler errors in dead code */
94 NR_MLOCK = NR_ACTIVE_FILE,
95#endif
86 NR_ANON_PAGES, /* Mapped anonymous pages */ 96 NR_ANON_PAGES, /* Mapped anonymous pages */
87 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. 97 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
88 only modified from process context */ 98 only modified from process context */
89 NR_FILE_PAGES, 99 NR_FILE_PAGES,
90 NR_FILE_DIRTY, 100 NR_FILE_DIRTY,
91 NR_WRITEBACK, 101 NR_WRITEBACK,
92 /* Second 128 byte cacheline */
93 NR_SLAB_RECLAIMABLE, 102 NR_SLAB_RECLAIMABLE,
94 NR_SLAB_UNRECLAIMABLE, 103 NR_SLAB_UNRECLAIMABLE,
95 NR_PAGETABLE, /* used for pagetables */ 104 NR_PAGETABLE, /* used for pagetables */
96 NR_UNSTABLE_NFS, /* NFS unstable pages */ 105 NR_UNSTABLE_NFS, /* NFS unstable pages */
97 NR_BOUNCE, 106 NR_BOUNCE,
98 NR_VMSCAN_WRITE, 107 NR_VMSCAN_WRITE,
108 /* Second 128 byte cacheline */
99 NR_WRITEBACK_TEMP, /* Writeback using temporary buffers */ 109 NR_WRITEBACK_TEMP, /* Writeback using temporary buffers */
100#ifdef CONFIG_NUMA 110#ifdef CONFIG_NUMA
101 NUMA_HIT, /* allocated in intended node */ 111 NUMA_HIT, /* allocated in intended node */
@@ -107,6 +117,55 @@ enum zone_stat_item {
107#endif 117#endif
108 NR_VM_ZONE_STAT_ITEMS }; 118 NR_VM_ZONE_STAT_ITEMS };
109 119
120/*
121 * We do arithmetic on the LRU lists in various places in the code,
122 * so it is important to keep the active lists LRU_ACTIVE higher in
123 * the array than the corresponding inactive lists, and to keep
124 * the *_FILE lists LRU_FILE higher than the corresponding _ANON lists.
125 *
126 * This has to be kept in sync with the statistics in zone_stat_item
127 * above and the descriptions in vmstat_text in mm/vmstat.c
128 */
129#define LRU_BASE 0
130#define LRU_ACTIVE 1
131#define LRU_FILE 2
132
133enum lru_list {
134 LRU_INACTIVE_ANON = LRU_BASE,
135 LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE,
136 LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE,
137 LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE,
138#ifdef CONFIG_UNEVICTABLE_LRU
139 LRU_UNEVICTABLE,
140#else
141 LRU_UNEVICTABLE = LRU_ACTIVE_FILE, /* avoid compiler errors in dead code */
142#endif
143 NR_LRU_LISTS
144};
145
146#define for_each_lru(l) for (l = 0; l < NR_LRU_LISTS; l++)
147
148#define for_each_evictable_lru(l) for (l = 0; l <= LRU_ACTIVE_FILE; l++)
149
150static inline int is_file_lru(enum lru_list l)
151{
152 return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE);
153}
154
155static inline int is_active_lru(enum lru_list l)
156{
157 return (l == LRU_ACTIVE_ANON || l == LRU_ACTIVE_FILE);
158}
159
160static inline int is_unevictable_lru(enum lru_list l)
161{
162#ifdef CONFIG_UNEVICTABLE_LRU
163 return (l == LRU_UNEVICTABLE);
164#else
165 return 0;
166#endif
167}
168
110struct per_cpu_pages { 169struct per_cpu_pages {
111 int count; /* number of pages in the list */ 170 int count; /* number of pages in the list */
112 int high; /* high watermark, emptying needed */ 171 int high; /* high watermark, emptying needed */
@@ -251,10 +310,22 @@ struct zone {
251 310
252 /* Fields commonly accessed by the page reclaim scanner */ 311 /* Fields commonly accessed by the page reclaim scanner */
253 spinlock_t lru_lock; 312 spinlock_t lru_lock;
254 struct list_head active_list; 313 struct {
255 struct list_head inactive_list; 314 struct list_head list;
256 unsigned long nr_scan_active; 315 unsigned long nr_scan;
257 unsigned long nr_scan_inactive; 316 } lru[NR_LRU_LISTS];
317
318 /*
319 * The pageout code in vmscan.c keeps track of how many of the
320 * mem/swap backed and file backed pages are refeferenced.
321 * The higher the rotated/scanned ratio, the more valuable
322 * that cache is.
323 *
324 * The anon LRU stats live in [0], file LRU stats in [1]
325 */
326 unsigned long recent_rotated[2];
327 unsigned long recent_scanned[2];
328
258 unsigned long pages_scanned; /* since last reclaim */ 329 unsigned long pages_scanned; /* since last reclaim */
259 unsigned long flags; /* zone flags, see below */ 330 unsigned long flags; /* zone flags, see below */
260 331
@@ -276,6 +347,12 @@ struct zone {
276 */ 347 */
277 int prev_priority; 348 int prev_priority;
278 349
350 /*
351 * The target ratio of ACTIVE_ANON to INACTIVE_ANON pages on
352 * this zone's LRU. Maintained by the pageout code.
353 */
354 unsigned int inactive_ratio;
355
279 356
280 ZONE_PADDING(_pad2_) 357 ZONE_PADDING(_pad2_)
281 /* Rarely used or read-mostly fields */ 358 /* Rarely used or read-mostly fields */
@@ -524,8 +601,11 @@ typedef struct pglist_data {
524 struct zone node_zones[MAX_NR_ZONES]; 601 struct zone node_zones[MAX_NR_ZONES];
525 struct zonelist node_zonelists[MAX_ZONELISTS]; 602 struct zonelist node_zonelists[MAX_ZONELISTS];
526 int nr_zones; 603 int nr_zones;
527#ifdef CONFIG_FLAT_NODE_MEM_MAP 604#ifdef CONFIG_FLAT_NODE_MEM_MAP /* means !SPARSEMEM */
528 struct page *node_mem_map; 605 struct page *node_mem_map;
606#ifdef CONFIG_CGROUP_MEM_RES_CTLR
607 struct page_cgroup *node_page_cgroup;
608#endif
529#endif 609#endif
530 struct bootmem_data *bdata; 610 struct bootmem_data *bdata;
531#ifdef CONFIG_MEMORY_HOTPLUG 611#ifdef CONFIG_MEMORY_HOTPLUG
@@ -854,6 +934,7 @@ static inline unsigned long early_pfn_to_nid(unsigned long pfn)
854#endif 934#endif
855 935
856struct page; 936struct page;
937struct page_cgroup;
857struct mem_section { 938struct mem_section {
858 /* 939 /*
859 * This is, logically, a pointer to an array of struct 940 * This is, logically, a pointer to an array of struct
@@ -871,6 +952,14 @@ struct mem_section {
871 952
872 /* See declaration of similar field in struct zone */ 953 /* See declaration of similar field in struct zone */
873 unsigned long *pageblock_flags; 954 unsigned long *pageblock_flags;
955#ifdef CONFIG_CGROUP_MEM_RES_CTLR
956 /*
957 * If !SPARSEMEM, pgdat doesn't have page_cgroup pointer. We use
958 * section. (see memcontrol.h/page_cgroup.h about this.)
959 */
960 struct page_cgroup *page_cgroup;
961 unsigned long pad;
962#endif
874}; 963};
875 964
876#ifdef CONFIG_SPARSEMEM_EXTREME 965#ifdef CONFIG_SPARSEMEM_EXTREME
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index d6a3f47e95cb..97b91d1abb43 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -135,6 +135,7 @@ struct usb_device_id {
135 135
136struct hid_device_id { 136struct hid_device_id {
137 __u16 bus; 137 __u16 bus;
138 __u16 pad1;
138 __u32 vendor; 139 __u32 vendor;
139 __u32 product; 140 __u32 product;
140 kernel_ulong_t driver_data 141 kernel_ulong_t driver_data
@@ -284,7 +285,7 @@ struct pcmcia_device_id {
284/* Input */ 285/* Input */
285#define INPUT_DEVICE_ID_EV_MAX 0x1f 286#define INPUT_DEVICE_ID_EV_MAX 0x1f
286#define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71 287#define INPUT_DEVICE_ID_KEY_MIN_INTERESTING 0x71
287#define INPUT_DEVICE_ID_KEY_MAX 0x1ff 288#define INPUT_DEVICE_ID_KEY_MAX 0x2ff
288#define INPUT_DEVICE_ID_REL_MAX 0x0f 289#define INPUT_DEVICE_ID_REL_MAX 0x0f
289#define INPUT_DEVICE_ID_ABS_MAX 0x3f 290#define INPUT_DEVICE_ID_ABS_MAX 0x3f
290#define INPUT_DEVICE_ID_MSC_MAX 0x07 291#define INPUT_DEVICE_ID_MSC_MAX 0x07
diff --git a/include/linux/module.h b/include/linux/module.h
index 68e09557c951..3bfed013350b 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -16,6 +16,7 @@
16#include <linux/kobject.h> 16#include <linux/kobject.h>
17#include <linux/moduleparam.h> 17#include <linux/moduleparam.h>
18#include <linux/marker.h> 18#include <linux/marker.h>
19#include <linux/tracepoint.h>
19#include <asm/local.h> 20#include <asm/local.h>
20 21
21#include <asm/module.h> 22#include <asm/module.h>
@@ -28,7 +29,7 @@
28#define MODULE_SYMBOL_PREFIX "" 29#define MODULE_SYMBOL_PREFIX ""
29#endif 30#endif
30 31
31#define MODULE_NAME_LEN (64 - sizeof(unsigned long)) 32#define MODULE_NAME_LEN MAX_PARAM_PREFIX_LEN
32 33
33struct kernel_symbol 34struct kernel_symbol
34{ 35{
@@ -59,6 +60,7 @@ struct module_kobject
59 struct kobject kobj; 60 struct kobject kobj;
60 struct module *mod; 61 struct module *mod;
61 struct kobject *drivers_dir; 62 struct kobject *drivers_dir;
63 struct module_param_attrs *mp;
62}; 64};
63 65
64/* These are either module local, or the kernel's dummy ones. */ 66/* These are either module local, or the kernel's dummy ones. */
@@ -241,7 +243,6 @@ struct module
241 243
242 /* Sysfs stuff. */ 244 /* Sysfs stuff. */
243 struct module_kobject mkobj; 245 struct module_kobject mkobj;
244 struct module_param_attrs *param_attrs;
245 struct module_attribute *modinfo_attrs; 246 struct module_attribute *modinfo_attrs;
246 const char *version; 247 const char *version;
247 const char *srcversion; 248 const char *srcversion;
@@ -276,7 +277,7 @@ struct module
276 277
277 /* Exception table */ 278 /* Exception table */
278 unsigned int num_exentries; 279 unsigned int num_exentries;
279 const struct exception_table_entry *extable; 280 struct exception_table_entry *extable;
280 281
281 /* Startup function. */ 282 /* Startup function. */
282 int (*init)(void); 283 int (*init)(void);
@@ -331,6 +332,10 @@ struct module
331 struct marker *markers; 332 struct marker *markers;
332 unsigned int num_markers; 333 unsigned int num_markers;
333#endif 334#endif
335#ifdef CONFIG_TRACEPOINTS
336 struct tracepoint *tracepoints;
337 unsigned int num_tracepoints;
338#endif
334 339
335#ifdef CONFIG_MODULE_UNLOAD 340#ifdef CONFIG_MODULE_UNLOAD
336 /* What modules depend on me? */ 341 /* What modules depend on me? */
@@ -345,7 +350,6 @@ struct module
345 /* Reference counts */ 350 /* Reference counts */
346 struct module_ref ref[NR_CPUS]; 351 struct module_ref ref[NR_CPUS];
347#endif 352#endif
348
349}; 353};
350#ifndef MODULE_ARCH_INIT 354#ifndef MODULE_ARCH_INIT
351#define MODULE_ARCH_INIT {} 355#define MODULE_ARCH_INIT {}
@@ -454,6 +458,9 @@ extern void print_modules(void);
454 458
455extern void module_update_markers(void); 459extern void module_update_markers(void);
456 460
461extern void module_update_tracepoints(void);
462extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);
463
457#else /* !CONFIG_MODULES... */ 464#else /* !CONFIG_MODULES... */
458#define EXPORT_SYMBOL(sym) 465#define EXPORT_SYMBOL(sym)
459#define EXPORT_SYMBOL_GPL(sym) 466#define EXPORT_SYMBOL_GPL(sym)
@@ -558,6 +565,15 @@ static inline void module_update_markers(void)
558{ 565{
559} 566}
560 567
568static inline void module_update_tracepoints(void)
569{
570}
571
572static inline int module_get_iter_tracepoints(struct tracepoint_iter *iter)
573{
574 return 0;
575}
576
561#endif /* CONFIG_MODULES */ 577#endif /* CONFIG_MODULES */
562 578
563struct device_driver; 579struct device_driver;
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index ec624381c844..e4af3399ef48 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -13,6 +13,9 @@
13#define MODULE_PARAM_PREFIX KBUILD_MODNAME "." 13#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
14#endif 14#endif
15 15
16/* Chosen so that structs with an unsigned long line up. */
17#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long))
18
16#ifdef MODULE 19#ifdef MODULE
17#define ___module_cat(a,b) __mod_ ## a ## b 20#define ___module_cat(a,b) __mod_ ## a ## b
18#define __module_cat(a,b) ___module_cat(a,b) 21#define __module_cat(a,b) ___module_cat(a,b)
@@ -79,7 +82,8 @@ struct kparam_array
79#define __module_param_call(prefix, name, set, get, arg, perm) \ 82#define __module_param_call(prefix, name, set, get, arg, perm) \
80 /* Default value instead of permissions? */ \ 83 /* Default value instead of permissions? */ \
81 static int __param_perm_check_##name __attribute__((unused)) = \ 84 static int __param_perm_check_##name __attribute__((unused)) = \
82 BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)); \ 85 BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
86 + BUILD_BUG_ON_ZERO(sizeof(""prefix) > MAX_PARAM_PREFIX_LEN); \
83 static const char __param_str_##name[] = prefix #name; \ 87 static const char __param_str_##name[] = prefix #name; \
84 static struct kernel_param __moduleparam_const __param_##name \ 88 static struct kernel_param __moduleparam_const __param_##name \
85 __used \ 89 __used \
@@ -100,6 +104,25 @@ struct kparam_array
100#define module_param(name, type, perm) \ 104#define module_param(name, type, perm) \
101 module_param_named(name, name, type, perm) 105 module_param_named(name, name, type, perm)
102 106
107#ifndef MODULE
108/**
109 * core_param - define a historical core kernel parameter.
110 * @name: the name of the cmdline and sysfs parameter (often the same as var)
111 * @var: the variable
112 * @type: the type (for param_set_##type and param_get_##type)
113 * @perm: visibility in sysfs
114 *
115 * core_param is just like module_param(), but cannot be modular and
116 * doesn't add a prefix (such as "printk."). This is for compatibility
117 * with __setup(), and it makes sense as truly core parameters aren't
118 * tied to the particular file they're in.
119 */
120#define core_param(name, var, type, perm) \
121 param_check_##type(name, &(var)); \
122 __module_param_call("", name, param_set_##type, param_get_##type, \
123 &var, perm)
124#endif /* !MODULE */
125
103/* Actually copy string: maxlen param is usually sizeof(string). */ 126/* Actually copy string: maxlen param is usually sizeof(string). */
104#define module_param_string(name, string, len, perm) \ 127#define module_param_string(name, string, len, perm) \
105 static const struct kparam_string __param_string_##name \ 128 static const struct kparam_string __param_string_##name \
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 30a1d63b6fb5..cab2a85e2ee8 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -5,8 +5,6 @@
5 * 5 *
6 * Author: Marco van Wieringen <mvw@planets.elm.net> 6 * Author: Marco van Wieringen <mvw@planets.elm.net>
7 * 7 *
8 * Version: $Id: mount.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $
9 *
10 */ 8 */
11#ifndef _LINUX_MOUNT_H 9#ifndef _LINUX_MOUNT_H
12#define _LINUX_MOUNT_H 10#define _LINUX_MOUNT_H
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index 6f4c180179e2..5375faca1f72 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -117,6 +117,7 @@ struct sioc_mif_req6
117 117
118#include <linux/pim.h> 118#include <linux/pim.h>
119#include <linux/skbuff.h> /* for struct sk_buff_head */ 119#include <linux/skbuff.h> /* for struct sk_buff_head */
120#include <net/net_namespace.h>
120 121
121#ifdef CONFIG_IPV6_MROUTE 122#ifdef CONFIG_IPV6_MROUTE
122static inline int ip6_mroute_opt(int opt) 123static inline int ip6_mroute_opt(int opt)
@@ -187,6 +188,9 @@ struct mif_device
187struct mfc6_cache 188struct mfc6_cache
188{ 189{
189 struct mfc6_cache *next; /* Next entry on cache line */ 190 struct mfc6_cache *next; /* Next entry on cache line */
191#ifdef CONFIG_NET_NS
192 struct net *mfc6_net;
193#endif
190 struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */ 194 struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */
191 struct in6_addr mf6c_origin; /* Source of packet */ 195 struct in6_addr mf6c_origin; /* Source of packet */
192 mifi_t mf6c_parent; /* Source interface */ 196 mifi_t mf6c_parent; /* Source interface */
@@ -209,6 +213,18 @@ struct mfc6_cache
209 } mfc_un; 213 } mfc_un;
210}; 214};
211 215
216static inline
217struct net *mfc6_net(const struct mfc6_cache *mfc)
218{
219 return read_pnet(&mfc->mfc6_net);
220}
221
222static inline
223void mfc6_net_set(struct mfc6_cache *mfc, struct net *net)
224{
225 write_pnet(&mfc->mfc6_net, hold_net(net));
226}
227
212#define MFC_STATIC 1 228#define MFC_STATIC 1
213#define MFC_NOTIFY 2 229#define MFC_NOTIFY 2
214 230
@@ -229,13 +245,17 @@ struct mfc6_cache
229 245
230#ifdef __KERNEL__ 246#ifdef __KERNEL__
231struct rtmsg; 247struct rtmsg;
232extern int ip6mr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait); 248extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
249 struct rtmsg *rtm, int nowait);
233 250
234#ifdef CONFIG_IPV6_MROUTE 251#ifdef CONFIG_IPV6_MROUTE
235extern struct sock *mroute6_socket; 252static inline struct sock *mroute6_socket(struct net *net)
253{
254 return net->ipv6.mroute6_sk;
255}
236extern int ip6mr_sk_done(struct sock *sk); 256extern int ip6mr_sk_done(struct sock *sk);
237#else 257#else
238#define mroute6_socket NULL 258static inline struct sock *mroute6_socket(struct net *net) { return NULL; }
239static inline int ip6mr_sk_done(struct sock *sk) { return 0; } 259static inline int ip6mr_sk_done(struct sock *sk) { return 0; }
240#endif 260#endif
241#endif 261#endif
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index ba63858056c7..e0a9b207920d 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -46,11 +46,6 @@
46#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ 46#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
47#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) 47#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
48 48
49/* valid file mode bits */
50#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
51/* Convert attribute bits and a mask to the UNIX mode. */
52#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
53
54#define MSDOS_NAME 11 /* maximum name length */ 49#define MSDOS_NAME 11 /* maximum name length */
55#define MSDOS_LONGNAME 256 /* maximum name length */ 50#define MSDOS_LONGNAME 256 /* maximum name length */
56#define MSDOS_SLOTS 21 /* max # of slots for short and long names */ 51#define MSDOS_SLOTS 21 /* max # of slots for short and long names */
@@ -167,282 +162,10 @@ struct msdos_dir_slot {
167}; 162};
168 163
169#ifdef __KERNEL__ 164#ifdef __KERNEL__
170
171#include <linux/buffer_head.h>
172#include <linux/string.h>
173#include <linux/nls.h>
174#include <linux/fs.h>
175#include <linux/mutex.h>
176
177/*
178 * vfat shortname flags
179 */
180#define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */
181#define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */
182#define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */
183#define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */
184#define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */
185
186struct fat_mount_options {
187 uid_t fs_uid;
188 gid_t fs_gid;
189 unsigned short fs_fmask;
190 unsigned short fs_dmask;
191 unsigned short codepage; /* Codepage for shortname conversions */
192 char *iocharset; /* Charset used for filename input/display */
193 unsigned short shortname; /* flags for shortname display/create rule */
194 unsigned char name_check; /* r = relaxed, n = normal, s = strict */
195 unsigned short allow_utime;/* permission for setting the [am]time */
196 unsigned quiet:1, /* set = fake successful chmods and chowns */
197 showexec:1, /* set = only set x bit for com/exe/bat */
198 sys_immutable:1, /* set = system files are immutable */
199 dotsOK:1, /* set = hidden and system files are named '.filename' */
200 isvfat:1, /* 0=no vfat long filename support, 1=vfat support */
201 utf8:1, /* Use of UTF-8 character set (Default) */
202 unicode_xlate:1, /* create escape sequences for unhandled Unicode */
203 numtail:1, /* Does first alias have a numeric '~1' type tail? */
204 flush:1, /* write things quickly */
205 nocase:1, /* Does this need case conversion? 0=need case conversion*/
206 usefree:1, /* Use free_clusters for FAT32 */
207 tz_utc:1; /* Filesystem timestamps are in UTC */
208};
209
210#define FAT_HASH_BITS 8
211#define FAT_HASH_SIZE (1UL << FAT_HASH_BITS)
212#define FAT_HASH_MASK (FAT_HASH_SIZE-1)
213
214/*
215 * MS-DOS file system in-core superblock data
216 */
217struct msdos_sb_info {
218 unsigned short sec_per_clus; /* sectors/cluster */
219 unsigned short cluster_bits; /* log2(cluster_size) */
220 unsigned int cluster_size; /* cluster size */
221 unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */
222 unsigned short fat_start;
223 unsigned long fat_length; /* FAT start & length (sec.) */
224 unsigned long dir_start;
225 unsigned short dir_entries; /* root dir start & entries */
226 unsigned long data_start; /* first data sector */
227 unsigned long max_cluster; /* maximum cluster number */
228 unsigned long root_cluster; /* first cluster of the root directory */
229 unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */
230 struct mutex fat_lock;
231 unsigned int prev_free; /* previously allocated cluster number */
232 unsigned int free_clusters; /* -1 if undefined */
233 unsigned int free_clus_valid; /* is free_clusters valid? */
234 struct fat_mount_options options;
235 struct nls_table *nls_disk; /* Codepage used on disk */
236 struct nls_table *nls_io; /* Charset used for input and display */
237 const void *dir_ops; /* Opaque; default directory operations */
238 int dir_per_block; /* dir entries per block */
239 int dir_per_block_bits; /* log2(dir_per_block) */
240
241 int fatent_shift;
242 struct fatent_operations *fatent_ops;
243
244 spinlock_t inode_hash_lock;
245 struct hlist_head inode_hashtable[FAT_HASH_SIZE];
246};
247
248#define FAT_CACHE_VALID 0 /* special case for valid cache */
249
250/*
251 * MS-DOS file system inode data in memory
252 */
253struct msdos_inode_info {
254 spinlock_t cache_lru_lock;
255 struct list_head cache_lru;
256 int nr_caches;
257 /* for avoiding the race between fat_free() and fat_get_cluster() */
258 unsigned int cache_valid_id;
259
260 loff_t mmu_private;
261 int i_start; /* first cluster or 0 */
262 int i_logstart; /* logical first cluster */
263 int i_attrs; /* unused attribute bits */
264 loff_t i_pos; /* on-disk position of directory entry or 0 */
265 struct hlist_node i_fat_hash; /* hash by i_location */
266 struct inode vfs_inode;
267};
268
269struct fat_slot_info {
270 loff_t i_pos; /* on-disk position of directory entry */
271 loff_t slot_off; /* offset for slot or de start */
272 int nr_slots; /* number of slots + 1(de) in filename */
273 struct msdos_dir_entry *de;
274 struct buffer_head *bh;
275};
276
277static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb)
278{
279 return sb->s_fs_info;
280}
281
282static inline struct msdos_inode_info *MSDOS_I(struct inode *inode)
283{
284 return container_of(inode, struct msdos_inode_info, vfs_inode);
285}
286
287/* Return the FAT attribute byte for this inode */
288static inline u8 fat_attr(struct inode *inode)
289{
290 return ((inode->i_mode & S_IWUGO) ? ATTR_NONE : ATTR_RO) |
291 (S_ISDIR(inode->i_mode) ? ATTR_DIR : ATTR_NONE) |
292 MSDOS_I(inode)->i_attrs;
293}
294
295static inline unsigned char fat_checksum(const __u8 *name)
296{
297 unsigned char s = name[0];
298 s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2];
299 s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4];
300 s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6];
301 s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8];
302 s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10];
303 return s;
304}
305
306static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus)
307{
308 return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus
309 + sbi->data_start;
310}
311
312static inline void fat16_towchar(wchar_t *dst, const __u8 *src, size_t len)
313{
314#ifdef __BIG_ENDIAN
315 while (len--) {
316 *dst++ = src[0] | (src[1] << 8);
317 src += 2;
318 }
319#else
320 memcpy(dst, src, len * 2);
321#endif
322}
323
324static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len)
325{
326#ifdef __BIG_ENDIAN
327 while (len--) {
328 dst[0] = *src & 0x00FF;
329 dst[1] = (*src & 0xFF00) >> 8;
330 dst += 2;
331 src++;
332 }
333#else
334 memcpy(dst, src, len * 2);
335#endif
336}
337
338/* media of boot sector */ 165/* media of boot sector */
339static inline int fat_valid_media(u8 media) 166static inline int fat_valid_media(u8 media)
340{ 167{
341 return 0xf8 <= media || media == 0xf0; 168 return 0xf8 <= media || media == 0xf0;
342} 169}
343 170#endif /* !__KERNEL__ */
344/* fat/cache.c */ 171#endif /* !_LINUX_MSDOS_FS_H */
345extern void fat_cache_inval_inode(struct inode *inode);
346extern int fat_get_cluster(struct inode *inode, int cluster,
347 int *fclus, int *dclus);
348extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys,
349 unsigned long *mapped_blocks);
350
351/* fat/dir.c */
352extern const struct file_operations fat_dir_operations;
353extern int fat_search_long(struct inode *inode, const unsigned char *name,
354 int name_len, struct fat_slot_info *sinfo);
355extern int fat_dir_empty(struct inode *dir);
356extern int fat_subdirs(struct inode *dir);
357extern int fat_scan(struct inode *dir, const unsigned char *name,
358 struct fat_slot_info *sinfo);
359extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh,
360 struct msdos_dir_entry **de, loff_t *i_pos);
361extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts);
362extern int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
363 struct fat_slot_info *sinfo);
364extern int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo);
365
366/* fat/fatent.c */
367struct fat_entry {
368 int entry;
369 union {
370 u8 *ent12_p[2];
371 __le16 *ent16_p;
372 __le32 *ent32_p;
373 } u;
374 int nr_bhs;
375 struct buffer_head *bhs[2];
376};
377
378static inline void fatent_init(struct fat_entry *fatent)
379{
380 fatent->nr_bhs = 0;
381 fatent->entry = 0;
382 fatent->u.ent32_p = NULL;
383 fatent->bhs[0] = fatent->bhs[1] = NULL;
384}
385
386static inline void fatent_set_entry(struct fat_entry *fatent, int entry)
387{
388 fatent->entry = entry;
389 fatent->u.ent32_p = NULL;
390}
391
392static inline void fatent_brelse(struct fat_entry *fatent)
393{
394 int i;
395 fatent->u.ent32_p = NULL;
396 for (i = 0; i < fatent->nr_bhs; i++)
397 brelse(fatent->bhs[i]);
398 fatent->nr_bhs = 0;
399 fatent->bhs[0] = fatent->bhs[1] = NULL;
400}
401
402extern void fat_ent_access_init(struct super_block *sb);
403extern int fat_ent_read(struct inode *inode, struct fat_entry *fatent,
404 int entry);
405extern int fat_ent_write(struct inode *inode, struct fat_entry *fatent,
406 int new, int wait);
407extern int fat_alloc_clusters(struct inode *inode, int *cluster,
408 int nr_cluster);
409extern int fat_free_clusters(struct inode *inode, int cluster);
410extern int fat_count_free_clusters(struct super_block *sb);
411
412/* fat/file.c */
413extern int fat_generic_ioctl(struct inode *inode, struct file *filp,
414 unsigned int cmd, unsigned long arg);
415extern const struct file_operations fat_file_operations;
416extern const struct inode_operations fat_file_inode_operations;
417extern int fat_setattr(struct dentry * dentry, struct iattr * attr);
418extern void fat_truncate(struct inode *inode);
419extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
420 struct kstat *stat);
421
422/* fat/inode.c */
423extern void fat_attach(struct inode *inode, loff_t i_pos);
424extern void fat_detach(struct inode *inode);
425extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos);
426extern struct inode *fat_build_inode(struct super_block *sb,
427 struct msdos_dir_entry *de, loff_t i_pos);
428extern int fat_sync_inode(struct inode *inode);
429extern int fat_fill_super(struct super_block *sb, void *data, int silent,
430 const struct inode_operations *fs_dir_inode_ops, int isvfat);
431
432extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
433 struct inode *i2);
434/* fat/misc.c */
435extern void fat_fs_panic(struct super_block *s, const char *fmt, ...);
436extern void fat_clusters_flush(struct super_block *sb);
437extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
438extern int date_dos2unix(unsigned short time, unsigned short date, int tz_utc);
439extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date,
440 int tz_utc);
441extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs);
442
443int fat_cache_init(void);
444void fat_cache_destroy(void);
445
446#endif /* __KERNEL__ */
447
448#endif
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 8f2939227207..d2b8a1e8ca11 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -10,8 +10,11 @@ struct msi_msg {
10}; 10};
11 11
12/* Helper functions */ 12/* Helper functions */
13struct irq_desc;
13extern void mask_msi_irq(unsigned int irq); 14extern void mask_msi_irq(unsigned int irq);
14extern void unmask_msi_irq(unsigned int irq); 15extern void unmask_msi_irq(unsigned int irq);
16extern void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
17extern void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg);
15extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); 18extern void read_msi_msg(unsigned int irq, struct msi_msg *msg);
16extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); 19extern void write_msi_msg(unsigned int irq, struct msi_msg *msg);
17 20
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index d6fb115f5a07..00e2b575021f 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -12,6 +12,7 @@
12#include <linux/mtd/flashchip.h> 12#include <linux/mtd/flashchip.h>
13#include <linux/mtd/map.h> 13#include <linux/mtd/map.h>
14#include <linux/mtd/cfi_endian.h> 14#include <linux/mtd/cfi_endian.h>
15#include <linux/mtd/xip.h>
15 16
16#ifdef CONFIG_MTD_CFI_I1 17#ifdef CONFIG_MTD_CFI_I1
17#define cfi_interleave(cfi) 1 18#define cfi_interleave(cfi) 1
@@ -281,9 +282,25 @@ struct cfi_private {
281/* 282/*
282 * Returns the command address according to the given geometry. 283 * Returns the command address according to the given geometry.
283 */ 284 */
284static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, int interleave, int type) 285static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs,
286 struct map_info *map, struct cfi_private *cfi)
285{ 287{
286 return (cmd_ofs * type) * interleave; 288 unsigned bankwidth = map_bankwidth(map);
289 unsigned interleave = cfi_interleave(cfi);
290 unsigned type = cfi->device_type;
291 uint32_t addr;
292
293 addr = (cmd_ofs * type) * interleave;
294
295 /* Modify the unlock address if we are in compatiblity mode.
296 * For 16bit devices on 8 bit busses
297 * and 32bit devices on 16 bit busses
298 * set the low bit of the alternating bit sequence of the address.
299 */
300 if (((type * interleave) > bankwidth) && ((uint8_t)cmd_ofs == 0xaa))
301 addr |= (type >> 1)*interleave;
302
303 return addr;
287} 304}
288 305
289/* 306/*
@@ -429,8 +446,7 @@ static inline uint32_t cfi_send_gen_cmd(u_char cmd, uint32_t cmd_addr, uint32_t
429 int type, map_word *prev_val) 446 int type, map_word *prev_val)
430{ 447{
431 map_word val; 448 map_word val;
432 uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, cfi_interleave(cfi), type); 449 uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, map, cfi);
433
434 val = cfi_build_cmd(cmd, map, cfi); 450 val = cfi_build_cmd(cmd, map, cfi);
435 451
436 if (prev_val) 452 if (prev_val)
@@ -483,6 +499,13 @@ static inline void cfi_udelay(int us)
483 } 499 }
484} 500}
485 501
502int __xipram cfi_qry_present(struct map_info *map, __u32 base,
503 struct cfi_private *cfi);
504int __xipram cfi_qry_mode_on(uint32_t base, struct map_info *map,
505 struct cfi_private *cfi);
506void __xipram cfi_qry_mode_off(uint32_t base, struct map_info *map,
507 struct cfi_private *cfi);
508
486struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t size, 509struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t size,
487 const char* name); 510 const char* name);
488struct cfi_fixup { 511struct cfi_fixup {
diff --git a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h
index 08dd131301c1..d4f38c5fd44e 100644
--- a/include/linux/mtd/flashchip.h
+++ b/include/linux/mtd/flashchip.h
@@ -73,6 +73,10 @@ struct flchip {
73 int buffer_write_time; 73 int buffer_write_time;
74 int erase_time; 74 int erase_time;
75 75
76 int word_write_time_max;
77 int buffer_write_time_max;
78 int erase_time_max;
79
76 void *priv; 80 void *priv;
77}; 81};
78 82
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 922636548558..eae26bb6430a 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -25,8 +25,10 @@
25#define MTD_ERASE_DONE 0x08 25#define MTD_ERASE_DONE 0x08
26#define MTD_ERASE_FAILED 0x10 26#define MTD_ERASE_FAILED 0x10
27 27
28#define MTD_FAIL_ADDR_UNKNOWN 0xffffffff
29
28/* If the erase fails, fail_addr might indicate exactly which block failed. If 30/* If the erase fails, fail_addr might indicate exactly which block failed. If
29 fail_addr = 0xffffffff, the failure was not at the device level or was not 31 fail_addr = MTD_FAIL_ADDR_UNKNOWN, the failure was not at the device level or was not
30 specific to any particular block. */ 32 specific to any particular block. */
31struct erase_info { 33struct erase_info {
32 struct mtd_info *mtd; 34 struct mtd_info *mtd;
diff --git a/include/linux/mtd/nand-gpio.h b/include/linux/mtd/nand-gpio.h
new file mode 100644
index 000000000000..51534e50f7fc
--- /dev/null
+++ b/include/linux/mtd/nand-gpio.h
@@ -0,0 +1,19 @@
1#ifndef __LINUX_MTD_NAND_GPIO_H
2#define __LINUX_MTD_NAND_GPIO_H
3
4#include <linux/mtd/nand.h>
5
6struct gpio_nand_platdata {
7 int gpio_nce;
8 int gpio_nwp;
9 int gpio_cle;
10 int gpio_ale;
11 int gpio_rdy;
12 void (*adjust_parts)(struct gpio_nand_platdata *, size_t);
13 struct mtd_partition *parts;
14 unsigned int num_parts;
15 unsigned int options;
16 int chip_delay;
17};
18
19#endif
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 81774e5facf4..733d3f3b4eb8 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -248,6 +248,7 @@ struct nand_hw_control {
248 * @read_page_raw: function to read a raw page without ECC 248 * @read_page_raw: function to read a raw page without ECC
249 * @write_page_raw: function to write a raw page without ECC 249 * @write_page_raw: function to write a raw page without ECC
250 * @read_page: function to read a page according to the ecc generator requirements 250 * @read_page: function to read a page according to the ecc generator requirements
251 * @read_subpage: function to read parts of the page covered by ECC.
251 * @write_page: function to write a page according to the ecc generator requirements 252 * @write_page: function to write a page according to the ecc generator requirements
252 * @read_oob: function to read chip OOB data 253 * @read_oob: function to read chip OOB data
253 * @write_oob: function to write chip OOB data 254 * @write_oob: function to write chip OOB data
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index d1b310c92eb4..0c6bbe28f38c 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -152,6 +152,8 @@
152#define ONENAND_SYS_CFG1_INT (1 << 6) 152#define ONENAND_SYS_CFG1_INT (1 << 6)
153#define ONENAND_SYS_CFG1_IOBE (1 << 5) 153#define ONENAND_SYS_CFG1_IOBE (1 << 5)
154#define ONENAND_SYS_CFG1_RDY_CONF (1 << 4) 154#define ONENAND_SYS_CFG1_RDY_CONF (1 << 4)
155#define ONENAND_SYS_CFG1_HF (1 << 2)
156#define ONENAND_SYS_CFG1_SYNC_WRITE (1 << 1)
155 157
156/* 158/*
157 * Controller Status Register F240h (R) 159 * Controller Status Register F240h (R)
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 5014f7a9f5df..c92b4d439609 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -73,7 +73,6 @@ struct device;
73struct device_node; 73struct device_node;
74 74
75int __devinit of_mtd_parse_partitions(struct device *dev, 75int __devinit of_mtd_parse_partitions(struct device *dev,
76 struct mtd_info *mtd,
77 struct device_node *node, 76 struct device_node *node,
78 struct mtd_partition **pparts); 77 struct mtd_partition **pparts);
79 78
diff --git a/include/linux/mtd/sh_flctl.h b/include/linux/mtd/sh_flctl.h
new file mode 100644
index 000000000000..e77c1cea404d
--- /dev/null
+++ b/include/linux/mtd/sh_flctl.h
@@ -0,0 +1,125 @@
1/*
2 * SuperH FLCTL nand controller
3 *
4 * Copyright © 2008 Renesas Solutions Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef __SH_FLCTL_H__
21#define __SH_FLCTL_H__
22
23#include <linux/mtd/mtd.h>
24#include <linux/mtd/nand.h>
25#include <linux/mtd/partitions.h>
26
27/* FLCTL registers */
28#define FLCMNCR(f) (f->reg + 0x0)
29#define FLCMDCR(f) (f->reg + 0x4)
30#define FLCMCDR(f) (f->reg + 0x8)
31#define FLADR(f) (f->reg + 0xC)
32#define FLADR2(f) (f->reg + 0x3C)
33#define FLDATAR(f) (f->reg + 0x10)
34#define FLDTCNTR(f) (f->reg + 0x14)
35#define FLINTDMACR(f) (f->reg + 0x18)
36#define FLBSYTMR(f) (f->reg + 0x1C)
37#define FLBSYCNT(f) (f->reg + 0x20)
38#define FLDTFIFO(f) (f->reg + 0x24)
39#define FLECFIFO(f) (f->reg + 0x28)
40#define FLTRCR(f) (f->reg + 0x2C)
41#define FL4ECCRESULT0(f) (f->reg + 0x80)
42#define FL4ECCRESULT1(f) (f->reg + 0x84)
43#define FL4ECCRESULT2(f) (f->reg + 0x88)
44#define FL4ECCRESULT3(f) (f->reg + 0x8C)
45#define FL4ECCCR(f) (f->reg + 0x90)
46#define FL4ECCCNT(f) (f->reg + 0x94)
47#define FLERRADR(f) (f->reg + 0x98)
48
49/* FLCMNCR control bits */
50#define ECCPOS2 (0x1 << 25)
51#define _4ECCCNTEN (0x1 << 24)
52#define _4ECCEN (0x1 << 23)
53#define _4ECCCORRECT (0x1 << 22)
54#define SNAND_E (0x1 << 18) /* SNAND (0=512 1=2048)*/
55#define QTSEL_E (0x1 << 17)
56#define ENDIAN (0x1 << 16) /* 1 = little endian */
57#define FCKSEL_E (0x1 << 15)
58#define ECCPOS_00 (0x00 << 12)
59#define ECCPOS_01 (0x01 << 12)
60#define ECCPOS_02 (0x02 << 12)
61#define ACM_SACCES_MODE (0x01 << 10)
62#define NANWF_E (0x1 << 9)
63#define SE_D (0x1 << 8) /* Spare area disable */
64#define CE1_ENABLE (0x1 << 4) /* Chip Enable 1 */
65#define CE0_ENABLE (0x1 << 3) /* Chip Enable 0 */
66#define TYPESEL_SET (0x1 << 0)
67
68/* FLCMDCR control bits */
69#define ADRCNT2_E (0x1 << 31) /* 5byte address enable */
70#define ADRMD_E (0x1 << 26) /* Sector address access */
71#define CDSRC_E (0x1 << 25) /* Data buffer selection */
72#define DOSR_E (0x1 << 24) /* Status read check */
73#define SELRW (0x1 << 21) /* 0:read 1:write */
74#define DOADR_E (0x1 << 20) /* Address stage execute */
75#define ADRCNT_1 (0x00 << 18) /* Address data bytes: 1byte */
76#define ADRCNT_2 (0x01 << 18) /* Address data bytes: 2byte */
77#define ADRCNT_3 (0x02 << 18) /* Address data bytes: 3byte */
78#define ADRCNT_4 (0x03 << 18) /* Address data bytes: 4byte */
79#define DOCMD2_E (0x1 << 17) /* 2nd cmd stage execute */
80#define DOCMD1_E (0x1 << 16) /* 1st cmd stage execute */
81
82/* FLTRCR control bits */
83#define TRSTRT (0x1 << 0) /* translation start */
84#define TREND (0x1 << 1) /* translation end */
85
86/* FL4ECCCR control bits */
87#define _4ECCFA (0x1 << 2) /* 4 symbols correct fault */
88#define _4ECCEND (0x1 << 1) /* 4 symbols end */
89#define _4ECCEXST (0x1 << 0) /* 4 symbols exist */
90
91#define INIT_FL4ECCRESULT_VAL 0x03FF03FF
92#define LOOP_TIMEOUT_MAX 0x00010000
93
94#define mtd_to_flctl(mtd) container_of(mtd, struct sh_flctl, mtd)
95
96struct sh_flctl {
97 struct mtd_info mtd;
98 struct nand_chip chip;
99 void __iomem *reg;
100
101 uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */
102 int read_bytes;
103 int index;
104 int seqin_column; /* column in SEQIN cmd */
105 int seqin_page_addr; /* page_addr in SEQIN cmd */
106 uint32_t seqin_read_cmd; /* read cmd in SEQIN cmd */
107 int erase1_page_addr; /* page_addr in ERASE1 cmd */
108 uint32_t erase_ADRCNT; /* bits of FLCMDCR in ERASE1 cmd */
109 uint32_t rw_ADRCNT; /* bits of FLCMDCR in READ WRITE cmd */
110
111 int hwecc_cant_correct[4];
112
113 unsigned page_size:1; /* NAND page size (0 = 512, 1 = 2048) */
114 unsigned hwecc:1; /* Hardware ECC (0 = disabled, 1 = enabled) */
115};
116
117struct sh_flctl_platform_data {
118 struct mtd_partition *parts;
119 int nr_parts;
120 unsigned long flcmncr_val;
121
122 unsigned has_hwecc:1;
123};
124
125#endif /* __SH_FLCTL_H__ */
diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index bc6da10ceee0..7a0e5c4f8072 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -144,6 +144,8 @@ extern int __must_check mutex_lock_killable(struct mutex *lock);
144/* 144/*
145 * NOTE: mutex_trylock() follows the spin_trylock() convention, 145 * NOTE: mutex_trylock() follows the spin_trylock() convention,
146 * not the down_trylock() convention! 146 * not the down_trylock() convention!
147 *
148 * Returns 1 if the mutex has been acquired successfully, and 0 on contention.
147 */ 149 */
148extern int mutex_trylock(struct mutex *lock); 150extern int mutex_trylock(struct mutex *lock);
149extern void mutex_unlock(struct mutex *lock); 151extern void mutex_unlock(struct mutex *lock);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 68f8c3203c89..99eb80306dc5 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -51,8 +51,10 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
51/* 51/*
52 * Intent data 52 * Intent data
53 */ 53 */
54#define LOOKUP_OPEN (0x0100) 54#define LOOKUP_OPEN 0x0100
55#define LOOKUP_CREATE (0x0200) 55#define LOOKUP_CREATE 0x0200
56#define LOOKUP_EXCL 0x0400
57#define LOOKUP_RENAME_TARGET 0x0800
56 58
57extern int user_path_at(int, const char __user *, unsigned, struct path *); 59extern int user_path_at(int, const char __user *, unsigned, struct path *);
58 60
@@ -61,6 +63,8 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *);
61#define user_path_dir(name, path) \ 63#define user_path_dir(name, path) \
62 user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, path) 64 user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, path)
63 65
66extern int kern_path(const char *, unsigned, struct path *);
67
64extern int path_lookup(const char *, unsigned, struct nameidata *); 68extern int path_lookup(const char *, unsigned, struct nameidata *);
65extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 69extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
66 const char *, unsigned int, struct nameidata *); 70 const char *, unsigned int, struct nameidata *);
diff --git a/include/linux/net.h b/include/linux/net.h
index 6dc14a240042..4515efae4c39 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -40,7 +40,7 @@
40#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ 40#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
41#define SYS_SENDMSG 16 /* sys_sendmsg(2) */ 41#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
42#define SYS_RECVMSG 17 /* sys_recvmsg(2) */ 42#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
43#define SYS_PACCEPT 18 /* sys_paccept(2) */ 43#define SYS_ACCEPT4 18 /* sys_accept4(2) */
44 44
45typedef enum { 45typedef enum {
46 SS_FREE = 0, /* not allocated */ 46 SS_FREE = 0, /* not allocated */
@@ -100,7 +100,7 @@ enum sock_type {
100 * remaining bits are used as flags. */ 100 * remaining bits are used as flags. */
101#define SOCK_TYPE_MASK 0xf 101#define SOCK_TYPE_MASK 0xf
102 102
103/* Flags for socket, socketpair, paccept */ 103/* Flags for socket, socketpair, accept4 */
104#define SOCK_CLOEXEC O_CLOEXEC 104#define SOCK_CLOEXEC O_CLOEXEC
105#ifndef SOCK_NONBLOCK 105#ifndef SOCK_NONBLOCK
106#define SOCK_NONBLOCK O_NONBLOCK 106#define SOCK_NONBLOCK O_NONBLOCK
@@ -223,8 +223,6 @@ extern int sock_map_fd(struct socket *sock, int flags);
223extern struct socket *sockfd_lookup(int fd, int *err); 223extern struct socket *sockfd_lookup(int fd, int *err);
224#define sockfd_put(sock) fput(sock->file) 224#define sockfd_put(sock) fput(sock->file)
225extern int net_ratelimit(void); 225extern int net_ratelimit(void);
226extern long do_accept(int fd, struct sockaddr __user *upeer_sockaddr,
227 int __user *upeer_addrlen, int flags);
228 226
229#define net_random() random32() 227#define net_random() random32()
230#define net_srandom(seed) srandom32((__force u32)seed) 228#define net_srandom(seed) srandom32((__force u32)seed)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 64875859d654..41e1224651cf 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -43,6 +43,9 @@
43 43
44#include <net/net_namespace.h> 44#include <net/net_namespace.h>
45#include <net/dsa.h> 45#include <net/dsa.h>
46#ifdef CONFIG_DCB
47#include <net/dcbnl.h>
48#endif
46 49
47struct vlan_group; 50struct vlan_group;
48struct ethtool_ops; 51struct ethtool_ops;
@@ -311,14 +314,16 @@ struct napi_struct {
311 spinlock_t poll_lock; 314 spinlock_t poll_lock;
312 int poll_owner; 315 int poll_owner;
313 struct net_device *dev; 316 struct net_device *dev;
314 struct list_head dev_list;
315#endif 317#endif
318 struct list_head dev_list;
319 struct sk_buff *gro_list;
316}; 320};
317 321
318enum 322enum
319{ 323{
320 NAPI_STATE_SCHED, /* Poll is scheduled */ 324 NAPI_STATE_SCHED, /* Poll is scheduled */
321 NAPI_STATE_DISABLE, /* Disable pending */ 325 NAPI_STATE_DISABLE, /* Disable pending */
326 NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */
322}; 327};
323 328
324extern void __napi_schedule(struct napi_struct *n); 329extern void __napi_schedule(struct napi_struct *n);
@@ -372,22 +377,8 @@ static inline int napi_reschedule(struct napi_struct *napi)
372 * 377 *
373 * Mark NAPI processing as complete. 378 * Mark NAPI processing as complete.
374 */ 379 */
375static inline void __napi_complete(struct napi_struct *n) 380extern void __napi_complete(struct napi_struct *n);
376{ 381extern void napi_complete(struct napi_struct *n);
377 BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
378 list_del(&n->poll_list);
379 smp_mb__before_clear_bit();
380 clear_bit(NAPI_STATE_SCHED, &n->state);
381}
382
383static inline void napi_complete(struct napi_struct *n)
384{
385 unsigned long flags;
386
387 local_irq_save(flags);
388 __napi_complete(n);
389 local_irq_restore(flags);
390}
391 382
392/** 383/**
393 * napi_disable - prevent NAPI from scheduling 384 * napi_disable - prevent NAPI from scheduling
@@ -451,6 +442,147 @@ struct netdev_queue {
451 struct Qdisc *qdisc_sleeping; 442 struct Qdisc *qdisc_sleeping;
452} ____cacheline_aligned_in_smp; 443} ____cacheline_aligned_in_smp;
453 444
445
446/*
447 * This structure defines the management hooks for network devices.
448 * The following hooks can be defined; unless noted otherwise, they are
449 * optional and can be filled with a null pointer.
450 *
451 * int (*ndo_init)(struct net_device *dev);
452 * This function is called once when network device is registered.
453 * The network device can use this to any late stage initializaton
454 * or semantic validattion. It can fail with an error code which will
455 * be propogated back to register_netdev
456 *
457 * void (*ndo_uninit)(struct net_device *dev);
458 * This function is called when device is unregistered or when registration
459 * fails. It is not called if init fails.
460 *
461 * int (*ndo_open)(struct net_device *dev);
462 * This function is called when network device transistions to the up
463 * state.
464 *
465 * int (*ndo_stop)(struct net_device *dev);
466 * This function is called when network device transistions to the down
467 * state.
468 *
469 * int (*ndo_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev);
470 * Called when a packet needs to be transmitted.
471 * Must return NETDEV_TX_OK , NETDEV_TX_BUSY, or NETDEV_TX_LOCKED,
472 * Required can not be NULL.
473 *
474 * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb);
475 * Called to decide which queue to when device supports multiple
476 * transmit queues.
477 *
478 * void (*ndo_change_rx_flags)(struct net_device *dev, int flags);
479 * This function is called to allow device receiver to make
480 * changes to configuration when multicast or promiscious is enabled.
481 *
482 * void (*ndo_set_rx_mode)(struct net_device *dev);
483 * This function is called device changes address list filtering.
484 *
485 * void (*ndo_set_multicast_list)(struct net_device *dev);
486 * This function is called when the multicast address list changes.
487 *
488 * int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
489 * This function is called when the Media Access Control address
490 * needs to be changed. If not this interface is not defined, the
491 * mac address can not be changed.
492 *
493 * int (*ndo_validate_addr)(struct net_device *dev);
494 * Test if Media Access Control address is valid for the device.
495 *
496 * int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
497 * Called when a user request an ioctl which can't be handled by
498 * the generic interface code. If not defined ioctl's return
499 * not supported error code.
500 *
501 * int (*ndo_set_config)(struct net_device *dev, struct ifmap *map);
502 * Used to set network devices bus interface parameters. This interface
503 * is retained for legacy reason, new devices should use the bus
504 * interface (PCI) for low level management.
505 *
506 * int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
507 * Called when a user wants to change the Maximum Transfer Unit
508 * of a device. If not defined, any request to change MTU will
509 * will return an error.
510 *
511 * void (*ndo_tx_timeout)(struct net_device *dev);
512 * Callback uses when the transmitter has not made any progress
513 * for dev->watchdog ticks.
514 *
515 * struct net_device_stats* (*get_stats)(struct net_device *dev);
516 * Called when a user wants to get the network device usage
517 * statistics. If not defined, the counters in dev->stats will
518 * be used.
519 *
520 * void (*ndo_vlan_rx_register)(struct net_device *dev, struct vlan_group *grp);
521 * If device support VLAN receive accleration
522 * (ie. dev->features & NETIF_F_HW_VLAN_RX), then this function is called
523 * when vlan groups for the device changes. Note: grp is NULL
524 * if no vlan's groups are being used.
525 *
526 * void (*ndo_vlan_rx_add_vid)(struct net_device *dev, unsigned short vid);
527 * If device support VLAN filtering (dev->features & NETIF_F_HW_VLAN_FILTER)
528 * this function is called when a VLAN id is registered.
529 *
530 * void (*ndo_vlan_rx_kill_vid)(struct net_device *dev, unsigned short vid);
531 * If device support VLAN filtering (dev->features & NETIF_F_HW_VLAN_FILTER)
532 * this function is called when a VLAN id is unregistered.
533 *
534 * void (*ndo_poll_controller)(struct net_device *dev);
535 */
536#define HAVE_NET_DEVICE_OPS
537struct net_device_ops {
538 int (*ndo_init)(struct net_device *dev);
539 void (*ndo_uninit)(struct net_device *dev);
540 int (*ndo_open)(struct net_device *dev);
541 int (*ndo_stop)(struct net_device *dev);
542 int (*ndo_start_xmit) (struct sk_buff *skb,
543 struct net_device *dev);
544 u16 (*ndo_select_queue)(struct net_device *dev,
545 struct sk_buff *skb);
546#define HAVE_CHANGE_RX_FLAGS
547 void (*ndo_change_rx_flags)(struct net_device *dev,
548 int flags);
549#define HAVE_SET_RX_MODE
550 void (*ndo_set_rx_mode)(struct net_device *dev);
551#define HAVE_MULTICAST
552 void (*ndo_set_multicast_list)(struct net_device *dev);
553#define HAVE_SET_MAC_ADDR
554 int (*ndo_set_mac_address)(struct net_device *dev,
555 void *addr);
556#define HAVE_VALIDATE_ADDR
557 int (*ndo_validate_addr)(struct net_device *dev);
558#define HAVE_PRIVATE_IOCTL
559 int (*ndo_do_ioctl)(struct net_device *dev,
560 struct ifreq *ifr, int cmd);
561#define HAVE_SET_CONFIG
562 int (*ndo_set_config)(struct net_device *dev,
563 struct ifmap *map);
564#define HAVE_CHANGE_MTU
565 int (*ndo_change_mtu)(struct net_device *dev,
566 int new_mtu);
567 int (*ndo_neigh_setup)(struct net_device *dev,
568 struct neigh_parms *);
569#define HAVE_TX_TIMEOUT
570 void (*ndo_tx_timeout) (struct net_device *dev);
571
572 struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
573
574 void (*ndo_vlan_rx_register)(struct net_device *dev,
575 struct vlan_group *grp);
576 void (*ndo_vlan_rx_add_vid)(struct net_device *dev,
577 unsigned short vid);
578 void (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
579 unsigned short vid);
580#ifdef CONFIG_NET_POLL_CONTROLLER
581#define HAVE_NETDEV_POLL
582 void (*ndo_poll_controller)(struct net_device *dev);
583#endif
584};
585
454/* 586/*
455 * The DEVICE structure. 587 * The DEVICE structure.
456 * Actually, this whole structure is a big mistake. It mixes I/O 588 * Actually, this whole structure is a big mistake. It mixes I/O
@@ -495,14 +627,7 @@ struct net_device
495 unsigned long state; 627 unsigned long state;
496 628
497 struct list_head dev_list; 629 struct list_head dev_list;
498#ifdef CONFIG_NETPOLL
499 struct list_head napi_list; 630 struct list_head napi_list;
500#endif
501
502 /* The device initialization function. Called only once. */
503 int (*init)(struct net_device *dev);
504
505 /* ------- Fields preinitialized in Space.c finish here ------- */
506 631
507 /* Net device features */ 632 /* Net device features */
508 unsigned long features; 633 unsigned long features;
@@ -521,6 +646,7 @@ struct net_device
521#define NETIF_F_LLTX 4096 /* LockLess TX - deprecated. Please */ 646#define NETIF_F_LLTX 4096 /* LockLess TX - deprecated. Please */
522 /* do not use LLTX in new drivers */ 647 /* do not use LLTX in new drivers */
523#define NETIF_F_NETNS_LOCAL 8192 /* Does not change network namespaces */ 648#define NETIF_F_NETNS_LOCAL 8192 /* Does not change network namespaces */
649#define NETIF_F_GRO 16384 /* Generic receive offload */
524#define NETIF_F_LRO 32768 /* large receive offload */ 650#define NETIF_F_LRO 32768 /* large receive offload */
525 651
526 /* Segmentation offload features */ 652 /* Segmentation offload features */
@@ -541,12 +667,18 @@ struct net_device
541#define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM) 667#define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
542#define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM) 668#define NETIF_F_ALL_CSUM (NETIF_F_V4_CSUM | NETIF_F_V6_CSUM)
543 669
670 /*
671 * If one device supports one of these features, then enable them
672 * for all in netdev_increment_features.
673 */
674#define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \
675 NETIF_F_SG | NETIF_F_HIGHDMA | \
676 NETIF_F_FRAGLIST)
677
544 /* Interface index. Unique device identifier */ 678 /* Interface index. Unique device identifier */
545 int ifindex; 679 int ifindex;
546 int iflink; 680 int iflink;
547 681
548
549 struct net_device_stats* (*get_stats)(struct net_device *dev);
550 struct net_device_stats stats; 682 struct net_device_stats stats;
551 683
552#ifdef CONFIG_WIRELESS_EXT 684#ifdef CONFIG_WIRELESS_EXT
@@ -556,18 +688,13 @@ struct net_device
556 /* Instance data managed by the core of Wireless Extensions. */ 688 /* Instance data managed by the core of Wireless Extensions. */
557 struct iw_public_data * wireless_data; 689 struct iw_public_data * wireless_data;
558#endif 690#endif
691 /* Management operations */
692 const struct net_device_ops *netdev_ops;
559 const struct ethtool_ops *ethtool_ops; 693 const struct ethtool_ops *ethtool_ops;
560 694
561 /* Hardware header description */ 695 /* Hardware header description */
562 const struct header_ops *header_ops; 696 const struct header_ops *header_ops;
563 697
564 /*
565 * This marks the end of the "visible" part of the structure. All
566 * fields hereafter are internal to the system, and may change at
567 * will (read: may be cleaned up at will).
568 */
569
570
571 unsigned int flags; /* interface flags (a la BSD) */ 698 unsigned int flags; /* interface flags (a la BSD) */
572 unsigned short gflags; 699 unsigned short gflags;
573 unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */ 700 unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */
@@ -626,7 +753,7 @@ struct net_device
626 unsigned long last_rx; /* Time of last Rx */ 753 unsigned long last_rx; /* Time of last Rx */
627 /* Interface address info used in eth_type_trans() */ 754 /* Interface address info used in eth_type_trans() */
628 unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast 755 unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast
629 because most packets are unicast) */ 756 because most packets are unicast) */
630 757
631 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ 758 unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
632 759
@@ -645,18 +772,12 @@ struct net_device
645/* 772/*
646 * One part is mostly used on xmit path (device) 773 * One part is mostly used on xmit path (device)
647 */ 774 */
648 void *priv; /* pointer to private data */
649 int (*hard_start_xmit) (struct sk_buff *skb,
650 struct net_device *dev);
651 /* These may be needed for future network-power-down code. */ 775 /* These may be needed for future network-power-down code. */
652 unsigned long trans_start; /* Time (in jiffies) of last Tx */ 776 unsigned long trans_start; /* Time (in jiffies) of last Tx */
653 777
654 int watchdog_timeo; /* used by dev_watchdog() */ 778 int watchdog_timeo; /* used by dev_watchdog() */
655 struct timer_list watchdog_timer; 779 struct timer_list watchdog_timer;
656 780
657/*
658 * refcnt is a very hot point, so align it on SMP
659 */
660 /* Number of references to this device */ 781 /* Number of references to this device */
661 atomic_t refcnt ____cacheline_aligned_in_smp; 782 atomic_t refcnt ____cacheline_aligned_in_smp;
662 783
@@ -675,56 +796,12 @@ struct net_device
675 NETREG_RELEASED, /* called free_netdev */ 796 NETREG_RELEASED, /* called free_netdev */
676 } reg_state; 797 } reg_state;
677 798
678 /* Called after device is detached from network. */ 799 /* Called from unregister, can be used to call free_netdev */
679 void (*uninit)(struct net_device *dev); 800 void (*destructor)(struct net_device *dev);
680 /* Called after last user reference disappears. */
681 void (*destructor)(struct net_device *dev);
682
683 /* Pointers to interface service routines. */
684 int (*open)(struct net_device *dev);
685 int (*stop)(struct net_device *dev);
686#define HAVE_NETDEV_POLL
687#define HAVE_CHANGE_RX_FLAGS
688 void (*change_rx_flags)(struct net_device *dev,
689 int flags);
690#define HAVE_SET_RX_MODE
691 void (*set_rx_mode)(struct net_device *dev);
692#define HAVE_MULTICAST
693 void (*set_multicast_list)(struct net_device *dev);
694#define HAVE_SET_MAC_ADDR
695 int (*set_mac_address)(struct net_device *dev,
696 void *addr);
697#define HAVE_VALIDATE_ADDR
698 int (*validate_addr)(struct net_device *dev);
699#define HAVE_PRIVATE_IOCTL
700 int (*do_ioctl)(struct net_device *dev,
701 struct ifreq *ifr, int cmd);
702#define HAVE_SET_CONFIG
703 int (*set_config)(struct net_device *dev,
704 struct ifmap *map);
705#define HAVE_CHANGE_MTU
706 int (*change_mtu)(struct net_device *dev, int new_mtu);
707 801
708#define HAVE_TX_TIMEOUT
709 void (*tx_timeout) (struct net_device *dev);
710
711 void (*vlan_rx_register)(struct net_device *dev,
712 struct vlan_group *grp);
713 void (*vlan_rx_add_vid)(struct net_device *dev,
714 unsigned short vid);
715 void (*vlan_rx_kill_vid)(struct net_device *dev,
716 unsigned short vid);
717
718 int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
719#ifdef CONFIG_NETPOLL 802#ifdef CONFIG_NETPOLL
720 struct netpoll_info *npinfo; 803 struct netpoll_info *npinfo;
721#endif 804#endif
722#ifdef CONFIG_NET_POLL_CONTROLLER
723 void (*poll_controller)(struct net_device *dev);
724#endif
725
726 u16 (*select_queue)(struct net_device *dev,
727 struct sk_buff *skb);
728 805
729#ifdef CONFIG_NET_NS 806#ifdef CONFIG_NET_NS
730 /* Network namespace this network device is inside */ 807 /* Network namespace this network device is inside */
@@ -755,6 +832,49 @@ struct net_device
755 /* for setting kernel sock attribute on TCP connection setup */ 832 /* for setting kernel sock attribute on TCP connection setup */
756#define GSO_MAX_SIZE 65536 833#define GSO_MAX_SIZE 65536
757 unsigned int gso_max_size; 834 unsigned int gso_max_size;
835
836#ifdef CONFIG_DCB
837 /* Data Center Bridging netlink ops */
838 struct dcbnl_rtnl_ops *dcbnl_ops;
839#endif
840
841#ifdef CONFIG_COMPAT_NET_DEV_OPS
842 struct {
843 int (*init)(struct net_device *dev);
844 void (*uninit)(struct net_device *dev);
845 int (*open)(struct net_device *dev);
846 int (*stop)(struct net_device *dev);
847 int (*hard_start_xmit) (struct sk_buff *skb,
848 struct net_device *dev);
849 u16 (*select_queue)(struct net_device *dev,
850 struct sk_buff *skb);
851 void (*change_rx_flags)(struct net_device *dev,
852 int flags);
853 void (*set_rx_mode)(struct net_device *dev);
854 void (*set_multicast_list)(struct net_device *dev);
855 int (*set_mac_address)(struct net_device *dev,
856 void *addr);
857 int (*validate_addr)(struct net_device *dev);
858 int (*do_ioctl)(struct net_device *dev,
859 struct ifreq *ifr, int cmd);
860 int (*set_config)(struct net_device *dev,
861 struct ifmap *map);
862 int (*change_mtu)(struct net_device *dev, int new_mtu);
863 int (*neigh_setup)(struct net_device *dev,
864 struct neigh_parms *);
865 void (*tx_timeout) (struct net_device *dev);
866 struct net_device_stats* (*get_stats)(struct net_device *dev);
867 void (*vlan_rx_register)(struct net_device *dev,
868 struct vlan_group *grp);
869 void (*vlan_rx_add_vid)(struct net_device *dev,
870 unsigned short vid);
871 void (*vlan_rx_kill_vid)(struct net_device *dev,
872 unsigned short vid);
873#ifdef CONFIG_NET_POLL_CONTROLLER
874 void (*poll_controller)(struct net_device *dev);
875#endif
876 };
877#endif
758}; 878};
759#define to_net_dev(d) container_of(d, struct net_device, dev) 879#define to_net_dev(d) container_of(d, struct net_device, dev)
760 880
@@ -850,22 +970,8 @@ static inline void *netdev_priv(const struct net_device *dev)
850 * netif_napi_add() must be used to initialize a napi context prior to calling 970 * netif_napi_add() must be used to initialize a napi context prior to calling
851 * *any* of the other napi related functions. 971 * *any* of the other napi related functions.
852 */ 972 */
853static inline void netif_napi_add(struct net_device *dev, 973void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
854 struct napi_struct *napi, 974 int (*poll)(struct napi_struct *, int), int weight);
855 int (*poll)(struct napi_struct *, int),
856 int weight)
857{
858 INIT_LIST_HEAD(&napi->poll_list);
859 napi->poll = poll;
860 napi->weight = weight;
861#ifdef CONFIG_NETPOLL
862 napi->dev = dev;
863 list_add(&napi->dev_list, &dev->napi_list);
864 spin_lock_init(&napi->poll_lock);
865 napi->poll_owner = -1;
866#endif
867 set_bit(NAPI_STATE_SCHED, &napi->state);
868}
869 975
870/** 976/**
871 * netif_napi_del - remove a napi context 977 * netif_napi_del - remove a napi context
@@ -873,12 +979,20 @@ static inline void netif_napi_add(struct net_device *dev,
873 * 979 *
874 * netif_napi_del() removes a napi context from the network device napi list 980 * netif_napi_del() removes a napi context from the network device napi list
875 */ 981 */
876static inline void netif_napi_del(struct napi_struct *napi) 982void netif_napi_del(struct napi_struct *napi);
877{ 983
878#ifdef CONFIG_NETPOLL 984struct napi_gro_cb {
879 list_del(&napi->dev_list); 985 /* This is non-zero if the packet may be of the same flow. */
880#endif 986 int same_flow;
881} 987
988 /* This is non-zero if the packet cannot be merged with the new skb. */
989 int flush;
990
991 /* Number of segments aggregated. */
992 int count;
993};
994
995#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
882 996
883struct packet_type { 997struct packet_type {
884 __be16 type; /* This is really htons(ether_type). */ 998 __be16 type; /* This is really htons(ether_type). */
@@ -890,6 +1004,9 @@ struct packet_type {
890 struct sk_buff *(*gso_segment)(struct sk_buff *skb, 1004 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
891 int features); 1005 int features);
892 int (*gso_send_check)(struct sk_buff *skb); 1006 int (*gso_send_check)(struct sk_buff *skb);
1007 struct sk_buff **(*gro_receive)(struct sk_buff **head,
1008 struct sk_buff *skb);
1009 int (*gro_complete)(struct sk_buff *skb);
893 void *af_packet_priv; 1010 void *af_packet_priv;
894 struct list_head list; 1011 struct list_head list;
895}; 1012};
@@ -1243,6 +1360,9 @@ extern int netif_rx(struct sk_buff *skb);
1243extern int netif_rx_ni(struct sk_buff *skb); 1360extern int netif_rx_ni(struct sk_buff *skb);
1244#define HAVE_NETIF_RECEIVE_SKB 1 1361#define HAVE_NETIF_RECEIVE_SKB 1
1245extern int netif_receive_skb(struct sk_buff *skb); 1362extern int netif_receive_skb(struct sk_buff *skb);
1363extern void napi_gro_flush(struct napi_struct *napi);
1364extern int napi_gro_receive(struct napi_struct *napi,
1365 struct sk_buff *skb);
1246extern void netif_nit_deliver(struct sk_buff *skb); 1366extern void netif_nit_deliver(struct sk_buff *skb);
1247extern int dev_valid_name(const char *name); 1367extern int dev_valid_name(const char *name);
1248extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *); 1368extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *);
@@ -1435,8 +1555,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
1435} 1555}
1436 1556
1437/* Test if receive needs to be scheduled but only if up */ 1557/* Test if receive needs to be scheduled but only if up */
1438static inline int netif_rx_schedule_prep(struct net_device *dev, 1558static inline int netif_rx_schedule_prep(struct napi_struct *napi)
1439 struct napi_struct *napi)
1440{ 1559{
1441 return napi_schedule_prep(napi); 1560 return napi_schedule_prep(napi);
1442} 1561}
@@ -1444,27 +1563,24 @@ static inline int netif_rx_schedule_prep(struct net_device *dev,
1444/* Add interface to tail of rx poll list. This assumes that _prep has 1563/* Add interface to tail of rx poll list. This assumes that _prep has
1445 * already been called and returned 1. 1564 * already been called and returned 1.
1446 */ 1565 */
1447static inline void __netif_rx_schedule(struct net_device *dev, 1566static inline void __netif_rx_schedule(struct napi_struct *napi)
1448 struct napi_struct *napi)
1449{ 1567{
1450 __napi_schedule(napi); 1568 __napi_schedule(napi);
1451} 1569}
1452 1570
1453/* Try to reschedule poll. Called by irq handler. */ 1571/* Try to reschedule poll. Called by irq handler. */
1454 1572
1455static inline void netif_rx_schedule(struct net_device *dev, 1573static inline void netif_rx_schedule(struct napi_struct *napi)
1456 struct napi_struct *napi)
1457{ 1574{
1458 if (netif_rx_schedule_prep(dev, napi)) 1575 if (netif_rx_schedule_prep(napi))
1459 __netif_rx_schedule(dev, napi); 1576 __netif_rx_schedule(napi);
1460} 1577}
1461 1578
1462/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */ 1579/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */
1463static inline int netif_rx_reschedule(struct net_device *dev, 1580static inline int netif_rx_reschedule(struct napi_struct *napi)
1464 struct napi_struct *napi)
1465{ 1581{
1466 if (napi_schedule_prep(napi)) { 1582 if (napi_schedule_prep(napi)) {
1467 __netif_rx_schedule(dev, napi); 1583 __netif_rx_schedule(napi);
1468 return 1; 1584 return 1;
1469 } 1585 }
1470 return 0; 1586 return 0;
@@ -1473,8 +1589,7 @@ static inline int netif_rx_reschedule(struct net_device *dev,
1473/* same as netif_rx_complete, except that local_irq_save(flags) 1589/* same as netif_rx_complete, except that local_irq_save(flags)
1474 * has already been issued 1590 * has already been issued
1475 */ 1591 */
1476static inline void __netif_rx_complete(struct net_device *dev, 1592static inline void __netif_rx_complete(struct napi_struct *napi)
1477 struct napi_struct *napi)
1478{ 1593{
1479 __napi_complete(napi); 1594 __napi_complete(napi);
1480} 1595}
@@ -1484,14 +1599,9 @@ static inline void __netif_rx_complete(struct net_device *dev,
1484 * it completes the work. The device cannot be out of poll list at this 1599 * it completes the work. The device cannot be out of poll list at this
1485 * moment, it is BUG(). 1600 * moment, it is BUG().
1486 */ 1601 */
1487static inline void netif_rx_complete(struct net_device *dev, 1602static inline void netif_rx_complete(struct napi_struct *napi)
1488 struct napi_struct *napi)
1489{ 1603{
1490 unsigned long flags; 1604 napi_complete(napi);
1491
1492 local_irq_save(flags);
1493 __netif_rx_complete(dev, napi);
1494 local_irq_restore(flags);
1495} 1605}
1496 1606
1497static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu) 1607static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu)
@@ -1529,7 +1639,6 @@ static inline void __netif_tx_unlock_bh(struct netdev_queue *txq)
1529/** 1639/**
1530 * netif_tx_lock - grab network device transmit lock 1640 * netif_tx_lock - grab network device transmit lock
1531 * @dev: network device 1641 * @dev: network device
1532 * @cpu: cpu number of lock owner
1533 * 1642 *
1534 * Get network device transmit lock 1643 * Get network device transmit lock
1535 */ 1644 */
@@ -1669,6 +1778,8 @@ extern void netdev_features_change(struct net_device *dev);
1669/* Load a device via the kmod */ 1778/* Load a device via the kmod */
1670extern void dev_load(struct net *net, const char *name); 1779extern void dev_load(struct net *net, const char *name);
1671extern void dev_mcast_init(void); 1780extern void dev_mcast_init(void);
1781extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
1782
1672extern int netdev_max_backlog; 1783extern int netdev_max_backlog;
1673extern int weight_p; 1784extern int weight_p;
1674extern int netdev_set_master(struct net_device *dev, struct net_device *master); 1785extern int netdev_set_master(struct net_device *dev, struct net_device *master);
@@ -1698,7 +1809,9 @@ extern char *netdev_drivername(const struct net_device *dev, char *buffer, int l
1698 1809
1699extern void linkwatch_run_queue(void); 1810extern void linkwatch_run_queue(void);
1700 1811
1701extern int netdev_compute_features(unsigned long all, unsigned long one); 1812unsigned long netdev_increment_features(unsigned long all, unsigned long one,
1813 unsigned long mask);
1814unsigned long netdev_fix_features(unsigned long features, const char *name);
1702 1815
1703static inline int net_gso_ok(int features, int gso_type) 1816static inline int net_gso_ok(int features, int gso_type)
1704{ 1817{
@@ -1715,6 +1828,8 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
1715{ 1828{
1716 return skb_is_gso(skb) && 1829 return skb_is_gso(skb) &&
1717 (!skb_gso_ok(skb, dev->features) || 1830 (!skb_gso_ok(skb, dev->features) ||
1831 (skb_shinfo(skb)->frag_list &&
1832 !(dev->features & NETIF_F_FRAGLIST)) ||
1718 unlikely(skb->ip_summed != CHECKSUM_PARTIAL)); 1833 unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
1719} 1834}
1720 1835
@@ -1733,26 +1848,31 @@ static inline int skb_bond_should_drop(struct sk_buff *skb)
1733 struct net_device *dev = skb->dev; 1848 struct net_device *dev = skb->dev;
1734 struct net_device *master = dev->master; 1849 struct net_device *master = dev->master;
1735 1850
1736 if (master && 1851 if (master) {
1737 (dev->priv_flags & IFF_SLAVE_INACTIVE)) { 1852 if (master->priv_flags & IFF_MASTER_ARPMON)
1738 if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && 1853 dev->last_rx = jiffies;
1739 skb->protocol == __constant_htons(ETH_P_ARP))
1740 return 0;
1741 1854
1742 if (master->priv_flags & IFF_MASTER_ALB) { 1855 if (dev->priv_flags & IFF_SLAVE_INACTIVE) {
1743 if (skb->pkt_type != PACKET_BROADCAST && 1856 if ((dev->priv_flags & IFF_SLAVE_NEEDARP) &&
1744 skb->pkt_type != PACKET_MULTICAST) 1857 skb->protocol == __constant_htons(ETH_P_ARP))
1745 return 0; 1858 return 0;
1746 }
1747 if (master->priv_flags & IFF_MASTER_8023AD &&
1748 skb->protocol == __constant_htons(ETH_P_SLOW))
1749 return 0;
1750 1859
1751 return 1; 1860 if (master->priv_flags & IFF_MASTER_ALB) {
1861 if (skb->pkt_type != PACKET_BROADCAST &&
1862 skb->pkt_type != PACKET_MULTICAST)
1863 return 0;
1864 }
1865 if (master->priv_flags & IFF_MASTER_8023AD &&
1866 skb->protocol == __constant_htons(ETH_P_SLOW))
1867 return 0;
1868
1869 return 1;
1870 }
1752 } 1871 }
1753 return 0; 1872 return 0;
1754} 1873}
1755 1874
1875extern struct pernet_operations __net_initdata loopback_net_ops;
1756#endif /* __KERNEL__ */ 1876#endif /* __KERNEL__ */
1757 1877
1758#endif /* _LINUX_DEV_H */ 1878#endif /* _LINUX_DEV_H */
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 0d8424f76899..7d8e0455ccac 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -78,6 +78,9 @@ extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
78 int echo); 78 int echo);
79extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags); 79extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
80 80
81extern void nfnl_lock(void);
82extern void nfnl_unlock(void);
83
81#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \ 84#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
82 MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys)) 85 MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
83 86
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h
index c19595c89304..29fe9ea1d346 100644
--- a/include/linux/netfilter/nfnetlink_conntrack.h
+++ b/include/linux/netfilter/nfnetlink_conntrack.h
@@ -141,6 +141,7 @@ enum ctattr_protonat {
141#define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) 141#define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
142 142
143enum ctattr_natseq { 143enum ctattr_natseq {
144 CTA_NAT_SEQ_UNSPEC,
144 CTA_NAT_SEQ_CORRECTION_POS, 145 CTA_NAT_SEQ_CORRECTION_POS,
145 CTA_NAT_SEQ_OFFSET_BEFORE, 146 CTA_NAT_SEQ_OFFSET_BEFORE,
146 CTA_NAT_SEQ_OFFSET_AFTER, 147 CTA_NAT_SEQ_OFFSET_AFTER,
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index be41b609c88f..e52ce475d19f 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -251,7 +251,7 @@ struct xt_target_param {
251 */ 251 */
252struct xt_tgchk_param { 252struct xt_tgchk_param {
253 const char *table; 253 const char *table;
254 void *entryinfo; 254 const void *entryinfo;
255 const struct xt_target *target; 255 const struct xt_target *target;
256 void *targinfo; 256 void *targinfo;
257 unsigned int hook_mask; 257 unsigned int hook_mask;
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h
index d45e29cd1cfb..e40ddb94b1af 100644
--- a/include/linux/netfilter_bridge/ebtables.h
+++ b/include/linux/netfilter_bridge/ebtables.h
@@ -300,7 +300,8 @@ struct ebt_table
300 300
301#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \ 301#define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \
302 ~(__alignof__(struct ebt_replace)-1)) 302 ~(__alignof__(struct ebt_replace)-1))
303extern int ebt_register_table(struct ebt_table *table); 303extern struct ebt_table *ebt_register_table(struct net *net,
304 struct ebt_table *table);
304extern void ebt_unregister_table(struct ebt_table *table); 305extern void ebt_unregister_table(struct ebt_table *table);
305extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb, 306extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb,
306 const struct net_device *in, const struct net_device *out, 307 const struct net_device *in, const struct net_device *out,
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h
index b9478a255301..1037fb2cd206 100644
--- a/include/linux/netfilter_ipv4/ipt_policy.h
+++ b/include/linux/netfilter_ipv4/ipt_policy.h
@@ -1,6 +1,8 @@
1#ifndef _IPT_POLICY_H 1#ifndef _IPT_POLICY_H
2#define _IPT_POLICY_H 2#define _IPT_POLICY_H
3 3
4#include <linux/netfilter/xt_policy.h>
5
4#define IPT_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM 6#define IPT_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM
5 7
6/* ipt_policy_flags */ 8/* ipt_policy_flags */
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h
index 6bab3163d2fb..b1c449d7ec89 100644
--- a/include/linux/netfilter_ipv6/ip6t_policy.h
+++ b/include/linux/netfilter_ipv6/ip6t_policy.h
@@ -1,6 +1,8 @@
1#ifndef _IP6T_POLICY_H 1#ifndef _IP6T_POLICY_H
2#define _IP6T_POLICY_H 2#define _IP6T_POLICY_H
3 3
4#include <linux/netfilter/xt_policy.h>
5
4#define IP6T_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM 6#define IP6T_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM
5 7
6/* ip6t_policy_flags */ 8/* ip6t_policy_flags */
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 9ff1b54908f3..51b09a1f46c3 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -242,7 +242,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
242 nlh->nlmsg_flags = flags; 242 nlh->nlmsg_flags = flags;
243 nlh->nlmsg_pid = pid; 243 nlh->nlmsg_pid = pid;
244 nlh->nlmsg_seq = seq; 244 nlh->nlmsg_seq = seq;
245 memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size); 245 if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0)
246 memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
246 return nlh; 247 return nlh;
247} 248}
248 249
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index e3d79593fb3a..e38d3c9dccda 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -94,11 +94,6 @@ static inline void netpoll_poll_unlock(void *have)
94 rcu_read_unlock(); 94 rcu_read_unlock();
95} 95}
96 96
97static inline void netpoll_netdev_init(struct net_device *dev)
98{
99 INIT_LIST_HEAD(&dev->napi_list);
100}
101
102#else 97#else
103static inline int netpoll_rx(struct sk_buff *skb) 98static inline int netpoll_rx(struct sk_buff *skb)
104{ 99{
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 78a5922a2f11..db867b04ac3c 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -83,7 +83,7 @@ struct nfs_open_context {
83 struct rpc_cred *cred; 83 struct rpc_cred *cred;
84 struct nfs4_state *state; 84 struct nfs4_state *state;
85 fl_owner_t lockowner; 85 fl_owner_t lockowner;
86 int mode; 86 fmode_t mode;
87 87
88 unsigned long flags; 88 unsigned long flags;
89#define NFS_CONTEXT_ERROR_WRITE (0) 89#define NFS_CONTEXT_ERROR_WRITE (0)
@@ -130,14 +130,17 @@ struct nfs_inode {
130 * 130 *
131 * We need to revalidate the cached attrs for this inode if 131 * We need to revalidate the cached attrs for this inode if
132 * 132 *
133 * jiffies - read_cache_jiffies > attrtimeo 133 * jiffies - read_cache_jiffies >= attrtimeo
134 *
135 * Please note the comparison is greater than or equal
136 * so that zero timeout values can be specified.
134 */ 137 */
135 unsigned long read_cache_jiffies; 138 unsigned long read_cache_jiffies;
136 unsigned long attrtimeo; 139 unsigned long attrtimeo;
137 unsigned long attrtimeo_timestamp; 140 unsigned long attrtimeo_timestamp;
138 __u64 change_attr; /* v4 only */ 141 __u64 change_attr; /* v4 only */
139 142
140 unsigned long last_updated; 143 unsigned long attr_gencount;
141 /* "Generation counter" for the attribute cache. This is 144 /* "Generation counter" for the attribute cache. This is
142 * bumped whenever we update the metadata on the 145 * bumped whenever we update the metadata on the
143 * server. 146 * server.
@@ -180,7 +183,7 @@ struct nfs_inode {
180 /* NFSv4 state */ 183 /* NFSv4 state */
181 struct list_head open_states; 184 struct list_head open_states;
182 struct nfs_delegation *delegation; 185 struct nfs_delegation *delegation;
183 int delegation_state; 186 fmode_t delegation_state;
184 struct rw_semaphore rwsem; 187 struct rw_semaphore rwsem;
185#endif /* CONFIG_NFS_V4*/ 188#endif /* CONFIG_NFS_V4*/
186 struct inode vfs_inode; 189 struct inode vfs_inode;
@@ -200,11 +203,10 @@ struct nfs_inode {
200/* 203/*
201 * Bit offsets in flags field 204 * Bit offsets in flags field
202 */ 205 */
203#define NFS_INO_REVALIDATING (0) /* revalidating attrs */ 206#define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */
204#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ 207#define NFS_INO_STALE (1) /* possible stale inode */
205#define NFS_INO_STALE (2) /* possible stale inode */ 208#define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */
206#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ 209#define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */
207#define NFS_INO_MOUNTPOINT (4) /* inode is remote mountpoint */
208 210
209static inline struct nfs_inode *NFS_I(const struct inode *inode) 211static inline struct nfs_inode *NFS_I(const struct inode *inode)
210{ 212{
@@ -343,17 +345,13 @@ extern int nfs_setattr(struct dentry *, struct iattr *);
343extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); 345extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
344extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); 346extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
345extern void put_nfs_open_context(struct nfs_open_context *ctx); 347extern void put_nfs_open_context(struct nfs_open_context *ctx);
346extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); 348extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode);
347extern u64 nfs_compat_user_ino64(u64 fileid); 349extern u64 nfs_compat_user_ino64(u64 fileid);
350extern void nfs_fattr_init(struct nfs_fattr *fattr);
348 351
349/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ 352/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */
350extern __be32 root_nfs_parse_addr(char *name); /*__init*/ 353extern __be32 root_nfs_parse_addr(char *name); /*__init*/
351 354extern unsigned long nfs_inc_attr_generation_counter(void);
352static inline void nfs_fattr_init(struct nfs_fattr *fattr)
353{
354 fattr->valid = 0;
355 fattr->time_start = jiffies;
356}
357 355
358/* 356/*
359 * linux/fs/nfs/file.c 357 * linux/fs/nfs/file.c
@@ -372,8 +370,12 @@ static inline struct nfs_open_context *nfs_file_open_context(struct file *filp)
372 370
373static inline struct rpc_cred *nfs_file_cred(struct file *file) 371static inline struct rpc_cred *nfs_file_cred(struct file *file)
374{ 372{
375 if (file != NULL) 373 if (file != NULL) {
376 return nfs_file_open_context(file)->cred; 374 struct nfs_open_context *ctx =
375 nfs_file_open_context(file);
376 if (ctx)
377 return ctx->cred;
378 }
377 return NULL; 379 return NULL;
378} 380}
379 381
@@ -534,12 +536,6 @@ static inline void nfs3_forget_cached_acls(struct inode *inode)
534#endif /* CONFIG_NFS_V3_ACL */ 536#endif /* CONFIG_NFS_V3_ACL */
535 537
536/* 538/*
537 * linux/fs/mount_clnt.c
538 */
539extern int nfs_mount(struct sockaddr *, size_t, char *, char *,
540 int, int, struct nfs_fh *);
541
542/*
543 * inline functions 539 * inline functions
544 */ 540 */
545 541
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index c9beacd16c00..9bb81aec91cf 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -42,12 +42,6 @@ struct nfs_client {
42 struct rb_root cl_openowner_id; 42 struct rb_root cl_openowner_id;
43 struct rb_root cl_lockowner_id; 43 struct rb_root cl_lockowner_id;
44 44
45 /*
46 * The following rwsem ensures exclusive access to the server
47 * while we recover the state following a lease expiration.
48 */
49 struct rw_semaphore cl_sem;
50
51 struct list_head cl_delegations; 45 struct list_head cl_delegations;
52 struct rb_root cl_state_owners; 46 struct rb_root cl_state_owners;
53 spinlock_t cl_lock; 47 spinlock_t cl_lock;
@@ -119,7 +113,6 @@ struct nfs_server {
119 void (*destroy)(struct nfs_server *); 113 void (*destroy)(struct nfs_server *);
120 114
121 atomic_t active; /* Keep trace of any activity to this server */ 115 atomic_t active; /* Keep trace of any activity to this server */
122 wait_queue_head_t active_wq; /* Wait for any activity to stop */
123 116
124 /* mountd-related mount options */ 117 /* mountd-related mount options */
125 struct sockaddr_storage mountd_address; 118 struct sockaddr_storage mountd_address;
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h
index df7c6b7a7ebb..4499016e6d0d 100644
--- a/include/linux/nfs_mount.h
+++ b/include/linux/nfs_mount.h
@@ -45,7 +45,7 @@ struct nfs_mount_data {
45 char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */ 45 char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */
46}; 46};
47 47
48/* bits in the flags field */ 48/* bits in the flags field visible to user space */
49 49
50#define NFS_MOUNT_SOFT 0x0001 /* 1 */ 50#define NFS_MOUNT_SOFT 0x0001 /* 1 */
51#define NFS_MOUNT_INTR 0x0002 /* 1 */ /* now unused, but ABI */ 51#define NFS_MOUNT_INTR 0x0002 /* 1 */ /* now unused, but ABI */
@@ -65,4 +65,9 @@ struct nfs_mount_data {
65#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ 65#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */
66#define NFS_MOUNT_FLAGMASK 0xFFFF 66#define NFS_MOUNT_FLAGMASK 0xFFFF
67 67
68/* The following are for internal use only */
69#define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000
70#define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000
71#define NFS_MOUNT_NORESVPORT 0x40000
72
68#endif 73#endif
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 8c77c11224d1..a550b528319f 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -36,6 +36,7 @@ struct nfs_fattr {
36 __u32 nlink; 36 __u32 nlink;
37 __u32 uid; 37 __u32 uid;
38 __u32 gid; 38 __u32 gid;
39 dev_t rdev;
39 __u64 size; 40 __u64 size;
40 union { 41 union {
41 struct { 42 struct {
@@ -46,7 +47,6 @@ struct nfs_fattr {
46 __u64 used; 47 __u64 used;
47 } nfs3; 48 } nfs3;
48 } du; 49 } du;
49 dev_t rdev;
50 struct nfs_fsid fsid; 50 struct nfs_fsid fsid;
51 __u64 fileid; 51 __u64 fileid;
52 struct timespec atime; 52 struct timespec atime;
@@ -56,6 +56,7 @@ struct nfs_fattr {
56 __u64 change_attr; /* NFSv4 change attribute */ 56 __u64 change_attr; /* NFSv4 change attribute */
57 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ 57 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
58 unsigned long time_start; 58 unsigned long time_start;
59 unsigned long gencount;
59}; 60};
60 61
61#define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ 62#define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */
@@ -119,13 +120,14 @@ struct nfs_openargs {
119 const struct nfs_fh * fh; 120 const struct nfs_fh * fh;
120 struct nfs_seqid * seqid; 121 struct nfs_seqid * seqid;
121 int open_flags; 122 int open_flags;
123 fmode_t fmode;
122 __u64 clientid; 124 __u64 clientid;
123 __u64 id; 125 __u64 id;
124 union { 126 union {
125 struct iattr * attrs; /* UNCHECKED, GUARDED */ 127 struct iattr * attrs; /* UNCHECKED, GUARDED */
126 nfs4_verifier verifier; /* EXCLUSIVE */ 128 nfs4_verifier verifier; /* EXCLUSIVE */
127 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */ 129 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
128 int delegation_type; /* CLAIM_PREVIOUS */ 130 fmode_t delegation_type; /* CLAIM_PREVIOUS */
129 } u; 131 } u;
130 const struct qstr * name; 132 const struct qstr * name;
131 const struct nfs_server *server; /* Needed for ID mapping */ 133 const struct nfs_server *server; /* Needed for ID mapping */
@@ -142,7 +144,7 @@ struct nfs_openres {
142 struct nfs_fattr * dir_attr; 144 struct nfs_fattr * dir_attr;
143 struct nfs_seqid * seqid; 145 struct nfs_seqid * seqid;
144 const struct nfs_server *server; 146 const struct nfs_server *server;
145 int delegation_type; 147 fmode_t delegation_type;
146 nfs4_stateid delegation; 148 nfs4_stateid delegation;
147 __u32 do_recall; 149 __u32 do_recall;
148 __u64 maxsize; 150 __u64 maxsize;
@@ -170,7 +172,7 @@ struct nfs_closeargs {
170 struct nfs_fh * fh; 172 struct nfs_fh * fh;
171 nfs4_stateid * stateid; 173 nfs4_stateid * stateid;
172 struct nfs_seqid * seqid; 174 struct nfs_seqid * seqid;
173 int open_flags; 175 fmode_t fmode;
174 const u32 * bitmask; 176 const u32 * bitmask;
175}; 177};
176 178
@@ -672,16 +674,16 @@ struct nfs4_rename_res {
672 struct nfs_fattr * new_fattr; 674 struct nfs_fattr * new_fattr;
673}; 675};
674 676
675#define NFS4_SETCLIENTID_NAMELEN (56) 677#define NFS4_SETCLIENTID_NAMELEN (127)
676struct nfs4_setclientid { 678struct nfs4_setclientid {
677 const nfs4_verifier * sc_verifier; 679 const nfs4_verifier * sc_verifier;
678 unsigned int sc_name_len; 680 unsigned int sc_name_len;
679 char sc_name[NFS4_SETCLIENTID_NAMELEN]; 681 char sc_name[NFS4_SETCLIENTID_NAMELEN + 1];
680 u32 sc_prog; 682 u32 sc_prog;
681 unsigned int sc_netid_len; 683 unsigned int sc_netid_len;
682 char sc_netid[RPCBIND_MAXNETIDLEN]; 684 char sc_netid[RPCBIND_MAXNETIDLEN + 1];
683 unsigned int sc_uaddr_len; 685 unsigned int sc_uaddr_len;
684 char sc_uaddr[RPCBIND_MAXUADDRLEN]; 686 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
685 u32 sc_cb_ident; 687 u32 sc_cb_ident;
686}; 688};
687 689
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index d0fe2e378452..128298c0362d 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -124,6 +124,8 @@ struct nfs4_client {
124 nfs4_verifier cl_verifier; /* generated by client */ 124 nfs4_verifier cl_verifier; /* generated by client */
125 time_t cl_time; /* time of last lease renewal */ 125 time_t cl_time; /* time of last lease renewal */
126 __be32 cl_addr; /* client ipaddress */ 126 __be32 cl_addr; /* client ipaddress */
127 u32 cl_flavor; /* setclientid pseudoflavor */
128 char *cl_principal; /* setclientid principal name */
127 struct svc_cred cl_cred; /* setclientid principal */ 129 struct svc_cred cl_cred; /* setclientid principal */
128 clientid_t cl_clientid; /* generated by server */ 130 clientid_t cl_clientid; /* generated by server */
129 nfs4_verifier cl_confirm; /* generated by server */ 131 nfs4_verifier cl_confirm; /* generated by server */
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 9bad65400fba..e86ed59f9ad5 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -3,7 +3,26 @@
3/* 3/*
4 * 802.11 netlink interface public header 4 * 802.11 netlink interface public header
5 * 5 *
6 * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2006, 2007, 2008 Johannes Berg <johannes@sipsolutions.net>
7 * Copyright 2008 Michael Wu <flamingice@sourmilk.net>
8 * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com>
9 * Copyright 2008 Michael Buesch <mb@bu3sch.de>
10 * Copyright 2008 Luis R. Rodriguez <lrodriguez@atheros.com>
11 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
12 * Copyright 2008 Colin McCabe <colin@cozybit.com>
13 *
14 * Permission to use, copy, modify, and/or distribute this software for any
15 * purpose with or without fee is hereby granted, provided that the above
16 * copyright notice and this permission notice appear in all copies.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
19 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
21 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
23 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
24 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 *
7 */ 26 */
8 27
9/** 28/**
@@ -25,8 +44,10 @@
25 * 44 *
26 * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request 45 * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request
27 * to get a list of all present wiphys. 46 * to get a list of all present wiphys.
28 * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and 47 * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
29 * %NL80211_ATTR_WIPHY_NAME. 48 * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
49 * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or
50 * %NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET.
30 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request 51 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
31 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and 52 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and
32 * %NL80211_ATTR_WIPHY_NAME. 53 * %NL80211_ATTR_WIPHY_NAME.
@@ -106,6 +127,12 @@
106 * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will 127 * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will
107 * store this as a valid request and then query userspace for it. 128 * store this as a valid request and then query userspace for it.
108 * 129 *
130 * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the
131 * interface identified by %NL80211_ATTR_IFINDEX
132 *
133 * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the
134 * interface identified by %NL80211_ATTR_IFINDEX
135 *
109 * @NL80211_CMD_MAX: highest used command number 136 * @NL80211_CMD_MAX: highest used command number
110 * @__NL80211_CMD_AFTER_LAST: internal use 137 * @__NL80211_CMD_AFTER_LAST: internal use
111 */ 138 */
@@ -148,6 +175,9 @@ enum nl80211_commands {
148 NL80211_CMD_SET_REG, 175 NL80211_CMD_SET_REG,
149 NL80211_CMD_REQ_SET_REG, 176 NL80211_CMD_REQ_SET_REG,
150 177
178 NL80211_CMD_GET_MESH_PARAMS,
179 NL80211_CMD_SET_MESH_PARAMS,
180
151 /* add new commands above here */ 181 /* add new commands above here */
152 182
153 /* used to define NL80211_CMD_MAX below */ 183 /* used to define NL80211_CMD_MAX below */
@@ -169,6 +199,15 @@ enum nl80211_commands {
169 * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf. 199 * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
170 * /sys/class/ieee80211/<phyname>/index 200 * /sys/class/ieee80211/<phyname>/index
171 * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) 201 * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
202 * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
203 * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
204 * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
205 * if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
206 * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
207 * this attribute)
208 * NL80211_CHAN_HT20 = HT20 only
209 * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
210 * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
172 * 211 *
173 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on 212 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
174 * @NL80211_ATTR_IFNAME: network interface name 213 * @NL80211_ATTR_IFNAME: network interface name
@@ -234,6 +273,9 @@ enum nl80211_commands {
234 * (u8, 0 or 1) 273 * (u8, 0 or 1)
235 * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled 274 * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled
236 * (u8, 0 or 1) 275 * (u8, 0 or 1)
276 * @NL80211_ATTR_BSS_BASIC_RATES: basic rates, array of basic
277 * rates in format defined by IEEE 802.11 7.3.2.2 but without the length
278 * restriction (at most %NL80211_MAX_SUPP_RATES).
237 * 279 *
238 * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from 280 * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from
239 * association request when used with NL80211_CMD_NEW_STATION) 281 * association request when used with NL80211_CMD_NEW_STATION)
@@ -296,6 +338,14 @@ enum nl80211_attrs {
296 NL80211_ATTR_REG_ALPHA2, 338 NL80211_ATTR_REG_ALPHA2,
297 NL80211_ATTR_REG_RULES, 339 NL80211_ATTR_REG_RULES,
298 340
341 NL80211_ATTR_MESH_PARAMS,
342
343 NL80211_ATTR_BSS_BASIC_RATES,
344
345 NL80211_ATTR_WIPHY_TXQ_PARAMS,
346 NL80211_ATTR_WIPHY_FREQ,
347 NL80211_ATTR_WIPHY_CHANNEL_TYPE,
348
299 /* add attributes here, update the policy in nl80211.c */ 349 /* add attributes here, update the policy in nl80211.c */
300 350
301 __NL80211_ATTR_AFTER_LAST, 351 __NL80211_ATTR_AFTER_LAST,
@@ -307,6 +357,10 @@ enum nl80211_attrs {
307 * here 357 * here
308 */ 358 */
309#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY 359#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY
360#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES
361#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS
362#define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ
363#define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET
310 364
311#define NL80211_MAX_SUPP_RATES 32 365#define NL80211_MAX_SUPP_RATES 32
312#define NL80211_MAX_SUPP_REG_RULES 32 366#define NL80211_MAX_SUPP_REG_RULES 32
@@ -371,6 +425,32 @@ enum nl80211_sta_flags {
371}; 425};
372 426
373/** 427/**
428 * enum nl80211_rate_info - bitrate information
429 *
430 * These attribute types are used with %NL80211_STA_INFO_TXRATE
431 * when getting information about the bitrate of a station.
432 *
433 * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved
434 * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s)
435 * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8)
436 * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate
437 * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval
438 * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined
439 * @__NL80211_RATE_INFO_AFTER_LAST: internal use
440 */
441enum nl80211_rate_info {
442 __NL80211_RATE_INFO_INVALID,
443 NL80211_RATE_INFO_BITRATE,
444 NL80211_RATE_INFO_MCS,
445 NL80211_RATE_INFO_40_MHZ_WIDTH,
446 NL80211_RATE_INFO_SHORT_GI,
447
448 /* keep last */
449 __NL80211_RATE_INFO_AFTER_LAST,
450 NL80211_RATE_INFO_MAX = __NL80211_RATE_INFO_AFTER_LAST - 1
451};
452
453/**
374 * enum nl80211_sta_info - station information 454 * enum nl80211_sta_info - station information
375 * 455 *
376 * These attribute types are used with %NL80211_ATTR_STA_INFO 456 * These attribute types are used with %NL80211_ATTR_STA_INFO
@@ -382,6 +462,9 @@ enum nl80211_sta_flags {
382 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) 462 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
383 * @__NL80211_STA_INFO_AFTER_LAST: internal 463 * @__NL80211_STA_INFO_AFTER_LAST: internal
384 * @NL80211_STA_INFO_MAX: highest possible station info attribute 464 * @NL80211_STA_INFO_MAX: highest possible station info attribute
465 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
466 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
467 * containing info as possible, see &enum nl80211_sta_info_txrate.
385 */ 468 */
386enum nl80211_sta_info { 469enum nl80211_sta_info {
387 __NL80211_STA_INFO_INVALID, 470 __NL80211_STA_INFO_INVALID,
@@ -391,6 +474,8 @@ enum nl80211_sta_info {
391 NL80211_STA_INFO_LLID, 474 NL80211_STA_INFO_LLID,
392 NL80211_STA_INFO_PLID, 475 NL80211_STA_INFO_PLID,
393 NL80211_STA_INFO_PLINK_STATE, 476 NL80211_STA_INFO_PLINK_STATE,
477 NL80211_STA_INFO_SIGNAL,
478 NL80211_STA_INFO_TX_BITRATE,
394 479
395 /* keep last */ 480 /* keep last */
396 __NL80211_STA_INFO_AFTER_LAST, 481 __NL80211_STA_INFO_AFTER_LAST,
@@ -452,17 +537,29 @@ enum nl80211_mpath_info {
452 * an array of nested frequency attributes 537 * an array of nested frequency attributes
453 * @NL80211_BAND_ATTR_RATES: supported bitrates in this band, 538 * @NL80211_BAND_ATTR_RATES: supported bitrates in this band,
454 * an array of nested bitrate attributes 539 * an array of nested bitrate attributes
540 * @NL80211_BAND_ATTR_HT_MCS_SET: 16-byte attribute containing the MCS set as
541 * defined in 802.11n
542 * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
543 * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
544 * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
455 */ 545 */
456enum nl80211_band_attr { 546enum nl80211_band_attr {
457 __NL80211_BAND_ATTR_INVALID, 547 __NL80211_BAND_ATTR_INVALID,
458 NL80211_BAND_ATTR_FREQS, 548 NL80211_BAND_ATTR_FREQS,
459 NL80211_BAND_ATTR_RATES, 549 NL80211_BAND_ATTR_RATES,
460 550
551 NL80211_BAND_ATTR_HT_MCS_SET,
552 NL80211_BAND_ATTR_HT_CAPA,
553 NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
554 NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
555
461 /* keep last */ 556 /* keep last */
462 __NL80211_BAND_ATTR_AFTER_LAST, 557 __NL80211_BAND_ATTR_AFTER_LAST,
463 NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 558 NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
464}; 559};
465 560
561#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
562
466/** 563/**
467 * enum nl80211_frequency_attr - frequency attributes 564 * enum nl80211_frequency_attr - frequency attributes
468 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz 565 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
@@ -474,6 +571,8 @@ enum nl80211_band_attr {
474 * on this channel in current regulatory domain. 571 * on this channel in current regulatory domain.
475 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory 572 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
476 * on this channel in current regulatory domain. 573 * on this channel in current regulatory domain.
574 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
575 * (100 * dBm).
477 */ 576 */
478enum nl80211_frequency_attr { 577enum nl80211_frequency_attr {
479 __NL80211_FREQUENCY_ATTR_INVALID, 578 __NL80211_FREQUENCY_ATTR_INVALID,
@@ -482,12 +581,15 @@ enum nl80211_frequency_attr {
482 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, 581 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN,
483 NL80211_FREQUENCY_ATTR_NO_IBSS, 582 NL80211_FREQUENCY_ATTR_NO_IBSS,
484 NL80211_FREQUENCY_ATTR_RADAR, 583 NL80211_FREQUENCY_ATTR_RADAR,
584 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
485 585
486 /* keep last */ 586 /* keep last */
487 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 587 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
488 NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1 588 NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1
489}; 589};
490 590
591#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
592
491/** 593/**
492 * enum nl80211_bitrate_attr - bitrate attributes 594 * enum nl80211_bitrate_attr - bitrate attributes
493 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps 595 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps
@@ -594,4 +696,119 @@ enum nl80211_mntr_flags {
594 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1 696 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1
595}; 697};
596 698
699/**
700 * enum nl80211_meshconf_params - mesh configuration parameters
701 *
702 * Mesh configuration parameters
703 *
704 * @__NL80211_MESHCONF_INVALID: internal use
705 *
706 * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in
707 * millisecond units, used by the Peer Link Open message
708 *
709 * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in
710 * millisecond units, used by the peer link management to close a peer link
711 *
712 * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in
713 * millisecond units
714 *
715 * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed
716 * on this mesh interface
717 *
718 * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link
719 * open retries that can be sent to establish a new peer link instance in a
720 * mesh
721 *
722 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
723 * point.
724 *
725 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically
726 * open peer links when we detect compatible mesh peers.
727 *
728 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
729 * containing a PREQ that an MP can send to a particular destination (path
730 * target)
731 *
732 * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths
733 * (in milliseconds)
734 *
735 * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait
736 * until giving up on a path discovery (in milliseconds)
737 *
738 * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh
739 * points receiving a PREQ shall consider the forwarding information from the
740 * root to be valid. (TU = time unit)
741 *
742 * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in
743 * TUs) during which an MP can send only one action frame containing a PREQ
744 * reference element
745 *
746 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
747 * that it takes for an HWMP information element to propagate across the mesh
748 *
749 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
750 *
751 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
752 */
753enum nl80211_meshconf_params {
754 __NL80211_MESHCONF_INVALID,
755 NL80211_MESHCONF_RETRY_TIMEOUT,
756 NL80211_MESHCONF_CONFIRM_TIMEOUT,
757 NL80211_MESHCONF_HOLDING_TIMEOUT,
758 NL80211_MESHCONF_MAX_PEER_LINKS,
759 NL80211_MESHCONF_MAX_RETRIES,
760 NL80211_MESHCONF_TTL,
761 NL80211_MESHCONF_AUTO_OPEN_PLINKS,
762 NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
763 NL80211_MESHCONF_PATH_REFRESH_TIME,
764 NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
765 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
766 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
767 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
768
769 /* keep last */
770 __NL80211_MESHCONF_ATTR_AFTER_LAST,
771 NL80211_MESHCONF_ATTR_MAX = __NL80211_MESHCONF_ATTR_AFTER_LAST - 1
772};
773
774/**
775 * enum nl80211_txq_attr - TX queue parameter attributes
776 * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved
777 * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*)
778 * @NL80211_TXQ_ATTR_TXOP: Maximum burst time in units of 32 usecs, 0 meaning
779 * disabled
780 * @NL80211_TXQ_ATTR_CWMIN: Minimum contention window [a value of the form
781 * 2^n-1 in the range 1..32767]
782 * @NL80211_TXQ_ATTR_CWMAX: Maximum contention window [a value of the form
783 * 2^n-1 in the range 1..32767]
784 * @NL80211_TXQ_ATTR_AIFS: Arbitration interframe space [0..255]
785 * @__NL80211_TXQ_ATTR_AFTER_LAST: Internal
786 * @NL80211_TXQ_ATTR_MAX: Maximum TXQ attribute number
787 */
788enum nl80211_txq_attr {
789 __NL80211_TXQ_ATTR_INVALID,
790 NL80211_TXQ_ATTR_QUEUE,
791 NL80211_TXQ_ATTR_TXOP,
792 NL80211_TXQ_ATTR_CWMIN,
793 NL80211_TXQ_ATTR_CWMAX,
794 NL80211_TXQ_ATTR_AIFS,
795
796 /* keep last */
797 __NL80211_TXQ_ATTR_AFTER_LAST,
798 NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1
799};
800
801enum nl80211_txq_q {
802 NL80211_TXQ_Q_VO,
803 NL80211_TXQ_Q_VI,
804 NL80211_TXQ_Q_BE,
805 NL80211_TXQ_Q_BK
806};
807
808enum nl80211_channel_type {
809 NL80211_CHAN_NO_HT,
810 NL80211_CHAN_HT20,
811 NL80211_CHAN_HT40MINUS,
812 NL80211_CHAN_HT40PLUS
813};
597#endif /* __LINUX_NL80211_H */ 814#endif /* __LINUX_NL80211_H */
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index c8a768e59640..afad7dec1b36 100644
--- a/include/linux/nsproxy.h
+++ b/include/linux/nsproxy.h
@@ -27,7 +27,6 @@ struct nsproxy {
27 struct ipc_namespace *ipc_ns; 27 struct ipc_namespace *ipc_ns;
28 struct mnt_namespace *mnt_ns; 28 struct mnt_namespace *mnt_ns;
29 struct pid_namespace *pid_ns; 29 struct pid_namespace *pid_ns;
30 struct user_namespace *user_ns;
31 struct net *net_ns; 30 struct net *net_ns;
32}; 31};
33extern struct nsproxy init_nsproxy; 32extern struct nsproxy init_nsproxy;
diff --git a/include/linux/of.h b/include/linux/of.h
index 79886ade070f..6a7efa242f5e 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -57,6 +57,12 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
57 for (child = of_get_next_child(parent, NULL); child != NULL; \ 57 for (child = of_get_next_child(parent, NULL); child != NULL; \
58 child = of_get_next_child(parent, child)) 58 child = of_get_next_child(parent, child))
59 59
60extern struct device_node *of_find_node_with_property(
61 struct device_node *from, const char *prop_name);
62#define for_each_node_with_property(dn, prop_name) \
63 for (dn = of_find_node_with_property(NULL, prop_name); dn; \
64 dn = of_find_node_with_property(dn, prop_name))
65
60extern struct property *of_find_property(const struct device_node *np, 66extern struct property *of_find_property(const struct device_node *np,
61 const char *name, 67 const char *name,
62 int *lenp); 68 int *lenp);
@@ -71,5 +77,8 @@ extern int of_n_size_cells(struct device_node *np);
71extern const struct of_device_id *of_match_node( 77extern const struct of_device_id *of_match_node(
72 const struct of_device_id *matches, const struct device_node *node); 78 const struct of_device_id *matches, const struct device_node *node);
73extern int of_modalias_node(struct device_node *node, char *modalias, int len); 79extern int of_modalias_node(struct device_node *node, char *modalias, int len);
80extern int of_parse_phandles_with_args(struct device_node *np,
81 const char *list_name, const char *cells_name, int index,
82 struct device_node **out_node, const void **out_args);
74 83
75#endif /* _LINUX_OF_H */ 84#endif /* _LINUX_OF_H */
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 67db101d0eb8..fc2472c3c254 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -14,9 +14,22 @@
14#ifndef __LINUX_OF_GPIO_H 14#ifndef __LINUX_OF_GPIO_H
15#define __LINUX_OF_GPIO_H 15#define __LINUX_OF_GPIO_H
16 16
17#include <linux/compiler.h>
18#include <linux/kernel.h>
17#include <linux/errno.h> 19#include <linux/errno.h>
18#include <linux/gpio.h> 20#include <linux/gpio.h>
19 21
22struct device_node;
23
24/*
25 * This is Linux-specific flags. By default controllers' and Linux' mapping
26 * match, but GPIO controllers are free to translate their own flags to
27 * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
28 */
29enum of_gpio_flags {
30 OF_GPIO_ACTIVE_LOW = 0x1,
31};
32
20#ifdef CONFIG_OF_GPIO 33#ifdef CONFIG_OF_GPIO
21 34
22/* 35/*
@@ -26,7 +39,7 @@ struct of_gpio_chip {
26 struct gpio_chip gc; 39 struct gpio_chip gc;
27 int gpio_cells; 40 int gpio_cells;
28 int (*xlate)(struct of_gpio_chip *of_gc, struct device_node *np, 41 int (*xlate)(struct of_gpio_chip *of_gc, struct device_node *np,
29 const void *gpio_spec); 42 const void *gpio_spec, enum of_gpio_flags *flags);
30}; 43};
31 44
32static inline struct of_gpio_chip *to_of_gpio_chip(struct gpio_chip *gc) 45static inline struct of_gpio_chip *to_of_gpio_chip(struct gpio_chip *gc)
@@ -50,20 +63,43 @@ static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc)
50 return container_of(of_gc, struct of_mm_gpio_chip, of_gc); 63 return container_of(of_gc, struct of_mm_gpio_chip, of_gc);
51} 64}
52 65
53extern int of_get_gpio(struct device_node *np, int index); 66extern int of_get_gpio_flags(struct device_node *np, int index,
67 enum of_gpio_flags *flags);
68extern unsigned int of_gpio_count(struct device_node *np);
69
54extern int of_mm_gpiochip_add(struct device_node *np, 70extern int of_mm_gpiochip_add(struct device_node *np,
55 struct of_mm_gpio_chip *mm_gc); 71 struct of_mm_gpio_chip *mm_gc);
56extern int of_gpio_simple_xlate(struct of_gpio_chip *of_gc, 72extern int of_gpio_simple_xlate(struct of_gpio_chip *of_gc,
57 struct device_node *np, 73 struct device_node *np,
58 const void *gpio_spec); 74 const void *gpio_spec,
75 enum of_gpio_flags *flags);
59#else 76#else
60 77
61/* Drivers may not strictly depend on the GPIO support, so let them link. */ 78/* Drivers may not strictly depend on the GPIO support, so let them link. */
62static inline int of_get_gpio(struct device_node *np, int index) 79static inline int of_get_gpio_flags(struct device_node *np, int index,
80 enum of_gpio_flags *flags)
63{ 81{
64 return -ENOSYS; 82 return -ENOSYS;
65} 83}
66 84
85static inline unsigned int of_gpio_count(struct device_node *np)
86{
87 return 0;
88}
89
67#endif /* CONFIG_OF_GPIO */ 90#endif /* CONFIG_OF_GPIO */
68 91
92/**
93 * of_get_gpio - Get a GPIO number to use with GPIO API
94 * @np: device node to get GPIO from
95 * @index: index of the GPIO
96 *
97 * Returns GPIO number to use with Linux generic GPIO API, or one of the errno
98 * value on the error condition.
99 */
100static inline int of_get_gpio(struct device_node *np, int index)
101{
102 return of_get_gpio_flags(np, index, NULL);
103}
104
69#endif /* __LINUX_OF_GPIO_H */ 105#endif /* __LINUX_OF_GPIO_H */
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index a8efcfeea732..3d327b67d7e2 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -26,8 +26,7 @@ extern struct bus_type of_platform_bus_type;
26 26
27/* 27/*
28 * An of_platform_driver driver is attached to a basic of_device on 28 * An of_platform_driver driver is attached to a basic of_device on
29 * the "platform bus" (of_platform_bus_type) (or ISA, EBUS and SBUS 29 * the "platform bus" (of_platform_bus_type).
30 * busses on sparc).
31 */ 30 */
32struct of_platform_driver 31struct of_platform_driver
33{ 32{
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index bcb8f725427c..1ce9fe572e51 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -86,15 +86,7 @@ int oprofile_arch_init(struct oprofile_operations * ops);
86void oprofile_arch_exit(void); 86void oprofile_arch_exit(void);
87 87
88/** 88/**
89 * Add data to the event buffer. 89 * Add a sample. This may be called from any context.
90 * The data passed is free-form, but typically consists of
91 * file offsets, dcookies, context information, and ESCAPE codes.
92 */
93void add_event_entry(unsigned long data);
94
95/**
96 * Add a sample. This may be called from any context. Pass
97 * smp_processor_id() as cpu.
98 */ 90 */
99void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); 91void oprofile_add_sample(struct pt_regs * const regs, unsigned long event);
100 92
@@ -162,5 +154,14 @@ int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, siz
162 154
163/** lock for read/write safety */ 155/** lock for read/write safety */
164extern spinlock_t oprofilefs_lock; 156extern spinlock_t oprofilefs_lock;
157
158/**
159 * Add the contents of a circular buffer to the event buffer.
160 */
161void oprofile_put_buff(unsigned long *buf, unsigned int start,
162 unsigned int stop, unsigned int max);
163
164unsigned long oprofile_get_cpu_buffer_size(void);
165void oprofile_cpu_buffer_inc_smpl_lost(void);
165 166
166#endif /* OPROFILE_H */ 167#endif /* OPROFILE_H */
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index c74d3e875314..b12f93a3c345 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -93,6 +93,11 @@ enum pageflags {
93 PG_mappedtodisk, /* Has blocks allocated on-disk */ 93 PG_mappedtodisk, /* Has blocks allocated on-disk */
94 PG_reclaim, /* To be reclaimed asap */ 94 PG_reclaim, /* To be reclaimed asap */
95 PG_buddy, /* Page is free, on buddy lists */ 95 PG_buddy, /* Page is free, on buddy lists */
96 PG_swapbacked, /* Page is backed by RAM/swap */
97#ifdef CONFIG_UNEVICTABLE_LRU
98 PG_unevictable, /* Page is "unevictable" */
99 PG_mlocked, /* Page is vma mlocked */
100#endif
96#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR 101#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
97 PG_uncached, /* Page has been mapped as uncached */ 102 PG_uncached, /* Page has been mapped as uncached */
98#endif 103#endif
@@ -161,6 +166,18 @@ static inline int Page##uname(struct page *page) \
161#define TESTSCFLAG(uname, lname) \ 166#define TESTSCFLAG(uname, lname) \
162 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname) 167 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname)
163 168
169#define SETPAGEFLAG_NOOP(uname) \
170static inline void SetPage##uname(struct page *page) { }
171
172#define CLEARPAGEFLAG_NOOP(uname) \
173static inline void ClearPage##uname(struct page *page) { }
174
175#define __CLEARPAGEFLAG_NOOP(uname) \
176static inline void __ClearPage##uname(struct page *page) { }
177
178#define TESTCLEARFLAG_FALSE(uname) \
179static inline int TestClearPage##uname(struct page *page) { return 0; }
180
164struct page; /* forward declaration */ 181struct page; /* forward declaration */
165 182
166TESTPAGEFLAG(Locked, locked) 183TESTPAGEFLAG(Locked, locked)
@@ -169,6 +186,7 @@ PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced)
169PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) 186PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty)
170PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru) 187PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru)
171PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active) 188PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
189 TESTCLEARFLAG(Active, active)
172__PAGEFLAG(Slab, slab) 190__PAGEFLAG(Slab, slab)
173PAGEFLAG(Checked, checked) /* Used by some filesystems */ 191PAGEFLAG(Checked, checked) /* Used by some filesystems */
174PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */ 192PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */
@@ -176,6 +194,7 @@ PAGEFLAG(SavePinned, savepinned); /* Xen */
176PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) 194PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
177PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private) 195PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
178 __SETPAGEFLAG(Private, private) 196 __SETPAGEFLAG(Private, private)
197PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked)
179 198
180__PAGEFLAG(SlobPage, slob_page) 199__PAGEFLAG(SlobPage, slob_page)
181__PAGEFLAG(SlobFree, slob_free) 200__PAGEFLAG(SlobFree, slob_free)
@@ -211,6 +230,25 @@ PAGEFLAG(SwapCache, swapcache)
211PAGEFLAG_FALSE(SwapCache) 230PAGEFLAG_FALSE(SwapCache)
212#endif 231#endif
213 232
233#ifdef CONFIG_UNEVICTABLE_LRU
234PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
235 TESTCLEARFLAG(Unevictable, unevictable)
236
237#define MLOCK_PAGES 1
238PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked)
239 TESTSCFLAG(Mlocked, mlocked)
240
241#else
242
243#define MLOCK_PAGES 0
244PAGEFLAG_FALSE(Mlocked)
245 SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked)
246
247PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable)
248 SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable)
249 __CLEARPAGEFLAG_NOOP(Unevictable)
250#endif
251
214#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR 252#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
215PAGEFLAG(Uncached, uncached) 253PAGEFLAG(Uncached, uncached)
216#else 254#else
@@ -326,15 +364,25 @@ static inline void __ClearPageTail(struct page *page)
326 364
327#endif /* !PAGEFLAGS_EXTENDED */ 365#endif /* !PAGEFLAGS_EXTENDED */
328 366
367#ifdef CONFIG_UNEVICTABLE_LRU
368#define __PG_UNEVICTABLE (1 << PG_unevictable)
369#define __PG_MLOCKED (1 << PG_mlocked)
370#else
371#define __PG_UNEVICTABLE 0
372#define __PG_MLOCKED 0
373#endif
374
329#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ 375#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
330 1 << PG_buddy | 1 << PG_writeback | \ 376 1 << PG_buddy | 1 << PG_writeback | \
331 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active) 377 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
378 __PG_UNEVICTABLE | __PG_MLOCKED)
332 379
333/* 380/*
334 * Flags checked in bad_page(). Pages on the free list should not have 381 * Flags checked in bad_page(). Pages on the free list should not have
335 * these flags set. It they are, there is a problem. 382 * these flags set. It they are, there is a problem.
336 */ 383 */
337#define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty) 384#define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | \
385 1 << PG_reclaim | 1 << PG_dirty | 1 << PG_swapbacked)
338 386
339/* 387/*
340 * Flags checked when a page is freed. Pages being freed should not have 388 * Flags checked when a page is freed. Pages being freed should not have
@@ -347,7 +395,8 @@ static inline void __ClearPageTail(struct page *page)
347 * Pages being prepped should not have these flags set. It they are, there 395 * Pages being prepped should not have these flags set. It they are, there
348 * is a problem. 396 * is a problem.
349 */ 397 */
350#define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty) 398#define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | \
399 1 << PG_reserved | 1 << PG_dirty | 1 << PG_swapbacked)
351 400
352#endif /* !__GENERATING_BOUNDS_H */ 401#endif /* !__GENERATING_BOUNDS_H */
353#endif /* PAGE_FLAGS_H */ 402#endif /* PAGE_FLAGS_H */
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
new file mode 100644
index 000000000000..1e6d34bfa094
--- /dev/null
+++ b/include/linux/page_cgroup.h
@@ -0,0 +1,108 @@
1#ifndef __LINUX_PAGE_CGROUP_H
2#define __LINUX_PAGE_CGROUP_H
3
4#ifdef CONFIG_CGROUP_MEM_RES_CTLR
5#include <linux/bit_spinlock.h>
6/*
7 * Page Cgroup can be considered as an extended mem_map.
8 * A page_cgroup page is associated with every page descriptor. The
9 * page_cgroup helps us identify information about the cgroup
10 * All page cgroups are allocated at boot or memory hotplug event,
11 * then the page cgroup for pfn always exists.
12 */
13struct page_cgroup {
14 unsigned long flags;
15 struct mem_cgroup *mem_cgroup;
16 struct page *page;
17 struct list_head lru; /* per cgroup LRU list */
18};
19
20void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat);
21void __init page_cgroup_init(void);
22struct page_cgroup *lookup_page_cgroup(struct page *page);
23
24enum {
25 /* flags for mem_cgroup */
26 PCG_LOCK, /* page cgroup is locked */
27 PCG_CACHE, /* charged as cache */
28 PCG_USED, /* this object is in use. */
29 /* flags for LRU placement */
30 PCG_ACTIVE, /* page is active in this cgroup */
31 PCG_FILE, /* page is file system backed */
32 PCG_UNEVICTABLE, /* page is unevictableable */
33};
34
35#define TESTPCGFLAG(uname, lname) \
36static inline int PageCgroup##uname(struct page_cgroup *pc) \
37 { return test_bit(PCG_##lname, &pc->flags); }
38
39#define SETPCGFLAG(uname, lname) \
40static inline void SetPageCgroup##uname(struct page_cgroup *pc)\
41 { set_bit(PCG_##lname, &pc->flags); }
42
43#define CLEARPCGFLAG(uname, lname) \
44static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \
45 { clear_bit(PCG_##lname, &pc->flags); }
46
47/* Cache flag is set only once (at allocation) */
48TESTPCGFLAG(Cache, CACHE)
49
50TESTPCGFLAG(Used, USED)
51CLEARPCGFLAG(Used, USED)
52
53/* LRU management flags (from global-lru definition) */
54TESTPCGFLAG(File, FILE)
55SETPCGFLAG(File, FILE)
56CLEARPCGFLAG(File, FILE)
57
58TESTPCGFLAG(Active, ACTIVE)
59SETPCGFLAG(Active, ACTIVE)
60CLEARPCGFLAG(Active, ACTIVE)
61
62TESTPCGFLAG(Unevictable, UNEVICTABLE)
63SETPCGFLAG(Unevictable, UNEVICTABLE)
64CLEARPCGFLAG(Unevictable, UNEVICTABLE)
65
66static inline int page_cgroup_nid(struct page_cgroup *pc)
67{
68 return page_to_nid(pc->page);
69}
70
71static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc)
72{
73 return page_zonenum(pc->page);
74}
75
76static inline void lock_page_cgroup(struct page_cgroup *pc)
77{
78 bit_spin_lock(PCG_LOCK, &pc->flags);
79}
80
81static inline int trylock_page_cgroup(struct page_cgroup *pc)
82{
83 return bit_spin_trylock(PCG_LOCK, &pc->flags);
84}
85
86static inline void unlock_page_cgroup(struct page_cgroup *pc)
87{
88 bit_spin_unlock(PCG_LOCK, &pc->flags);
89}
90
91#else /* CONFIG_CGROUP_MEM_RES_CTLR */
92struct page_cgroup;
93
94static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
95{
96}
97
98static inline struct page_cgroup *lookup_page_cgroup(struct page *page)
99{
100 return NULL;
101}
102
103static inline void page_cgroup_init(void)
104{
105}
106
107#endif
108#endif
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 5da31c12101c..709742be02f0 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -32,6 +32,34 @@ static inline void mapping_set_error(struct address_space *mapping, int error)
32 } 32 }
33} 33}
34 34
35#ifdef CONFIG_UNEVICTABLE_LRU
36#define AS_UNEVICTABLE (__GFP_BITS_SHIFT + 2) /* e.g., ramdisk, SHM_LOCK */
37
38static inline void mapping_set_unevictable(struct address_space *mapping)
39{
40 set_bit(AS_UNEVICTABLE, &mapping->flags);
41}
42
43static inline void mapping_clear_unevictable(struct address_space *mapping)
44{
45 clear_bit(AS_UNEVICTABLE, &mapping->flags);
46}
47
48static inline int mapping_unevictable(struct address_space *mapping)
49{
50 if (likely(mapping))
51 return test_bit(AS_UNEVICTABLE, &mapping->flags);
52 return !!mapping;
53}
54#else
55static inline void mapping_set_unevictable(struct address_space *mapping) { }
56static inline void mapping_clear_unevictable(struct address_space *mapping) { }
57static inline int mapping_unevictable(struct address_space *mapping)
58{
59 return 0;
60}
61#endif
62
35static inline gfp_t mapping_gfp_mask(struct address_space * mapping) 63static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
36{ 64{
37 return (__force gfp_t)mapping->flags & __GFP_BITS_MASK; 65 return (__force gfp_t)mapping->flags & __GFP_BITS_MASK;
@@ -271,19 +299,19 @@ extern int __lock_page_killable(struct page *page);
271extern void __lock_page_nosync(struct page *page); 299extern void __lock_page_nosync(struct page *page);
272extern void unlock_page(struct page *page); 300extern void unlock_page(struct page *page);
273 301
274static inline void set_page_locked(struct page *page) 302static inline void __set_page_locked(struct page *page)
275{ 303{
276 set_bit(PG_locked, &page->flags); 304 __set_bit(PG_locked, &page->flags);
277} 305}
278 306
279static inline void clear_page_locked(struct page *page) 307static inline void __clear_page_locked(struct page *page)
280{ 308{
281 clear_bit(PG_locked, &page->flags); 309 __clear_bit(PG_locked, &page->flags);
282} 310}
283 311
284static inline int trylock_page(struct page *page) 312static inline int trylock_page(struct page *page)
285{ 313{
286 return !test_and_set_bit(PG_locked, &page->flags); 314 return (likely(!test_and_set_bit_lock(PG_locked, &page->flags)));
287} 315}
288 316
289/* 317/*
@@ -410,17 +438,17 @@ extern void __remove_from_page_cache(struct page *page);
410 438
411/* 439/*
412 * Like add_to_page_cache_locked, but used to add newly allocated pages: 440 * Like add_to_page_cache_locked, but used to add newly allocated pages:
413 * the page is new, so we can just run set_page_locked() against it. 441 * the page is new, so we can just run __set_page_locked() against it.
414 */ 442 */
415static inline int add_to_page_cache(struct page *page, 443static inline int add_to_page_cache(struct page *page,
416 struct address_space *mapping, pgoff_t offset, gfp_t gfp_mask) 444 struct address_space *mapping, pgoff_t offset, gfp_t gfp_mask)
417{ 445{
418 int error; 446 int error;
419 447
420 set_page_locked(page); 448 __set_page_locked(page);
421 error = add_to_page_cache_locked(page, mapping, offset, gfp_mask); 449 error = add_to_page_cache_locked(page, mapping, offset, gfp_mask);
422 if (unlikely(error)) 450 if (unlikely(error))
423 clear_page_locked(page); 451 __clear_page_locked(page);
424 return error; 452 return error;
425} 453}
426 454
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 8eb7fa76c1d0..e90a2cb02915 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -23,9 +23,9 @@ struct pagevec {
23void __pagevec_release(struct pagevec *pvec); 23void __pagevec_release(struct pagevec *pvec);
24void __pagevec_release_nonlru(struct pagevec *pvec); 24void __pagevec_release_nonlru(struct pagevec *pvec);
25void __pagevec_free(struct pagevec *pvec); 25void __pagevec_free(struct pagevec *pvec);
26void __pagevec_lru_add(struct pagevec *pvec); 26void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru);
27void __pagevec_lru_add_active(struct pagevec *pvec);
28void pagevec_strip(struct pagevec *pvec); 27void pagevec_strip(struct pagevec *pvec);
28void pagevec_swap_free(struct pagevec *pvec);
29unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, 29unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping,
30 pgoff_t start, unsigned nr_pages); 30 pgoff_t start, unsigned nr_pages);
31unsigned pagevec_lookup_tag(struct pagevec *pvec, 31unsigned pagevec_lookup_tag(struct pagevec *pvec,
@@ -81,10 +81,36 @@ static inline void pagevec_free(struct pagevec *pvec)
81 __pagevec_free(pvec); 81 __pagevec_free(pvec);
82} 82}
83 83
84static inline void pagevec_lru_add(struct pagevec *pvec) 84static inline void __pagevec_lru_add_anon(struct pagevec *pvec)
85{
86 ____pagevec_lru_add(pvec, LRU_INACTIVE_ANON);
87}
88
89static inline void __pagevec_lru_add_active_anon(struct pagevec *pvec)
90{
91 ____pagevec_lru_add(pvec, LRU_ACTIVE_ANON);
92}
93
94static inline void __pagevec_lru_add_file(struct pagevec *pvec)
95{
96 ____pagevec_lru_add(pvec, LRU_INACTIVE_FILE);
97}
98
99static inline void __pagevec_lru_add_active_file(struct pagevec *pvec)
100{
101 ____pagevec_lru_add(pvec, LRU_ACTIVE_FILE);
102}
103
104static inline void pagevec_lru_add_file(struct pagevec *pvec)
105{
106 if (pagevec_count(pvec))
107 __pagevec_lru_add_file(pvec);
108}
109
110static inline void pagevec_lru_add_anon(struct pagevec *pvec)
85{ 111{
86 if (pagevec_count(pvec)) 112 if (pagevec_count(pvec))
87 __pagevec_lru_add(pvec); 113 __pagevec_lru_add_anon(pvec);
88} 114}
89 115
90#endif /* _LINUX_PAGEVEC_H */ 116#endif /* _LINUX_PAGEVEC_H */
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 6a0d7cdb5774..e1f83c5065c5 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -1,5 +1,3 @@
1/* $Id: parport.h,v 1.1 1998/05/17 10:57:52 andrea Exp andrea $ */
2
3/* 1/*
4 * Any part of this program may be used in documents licensed under 2 * Any part of this program may be used in documents licensed under
5 * the GNU Free Documentation License, Version 1.1 or any later version 3 * the GNU Free Documentation License, Version 1.1 or any later version
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 98dc6243a706..03b0b8c3c81b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -51,6 +51,7 @@
51#include <linux/kobject.h> 51#include <linux/kobject.h>
52#include <asm/atomic.h> 52#include <asm/atomic.h>
53#include <linux/device.h> 53#include <linux/device.h>
54#include <linux/io.h>
54 55
55/* Include the ID list */ 56/* Include the ID list */
56#include <linux/pci_ids.h> 57#include <linux/pci_ids.h>
@@ -64,6 +65,11 @@ struct pci_slot {
64 struct kobject kobj; 65 struct kobject kobj;
65}; 66};
66 67
68static inline const char *pci_slot_name(const struct pci_slot *slot)
69{
70 return kobject_name(&slot->kobj);
71}
72
67/* File state for mmap()s on /proc/bus/pci/X/Y */ 73/* File state for mmap()s on /proc/bus/pci/X/Y */
68enum pci_mmap_state { 74enum pci_mmap_state {
69 pci_mmap_io, 75 pci_mmap_io,
@@ -128,6 +134,11 @@ enum pci_dev_flags {
128 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, 134 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
129}; 135};
130 136
137enum pci_irq_reroute_variant {
138 INTEL_IRQ_REROUTE_VARIANT = 1,
139 MAX_IRQ_REROUTE_VARIANTS = 3
140};
141
131typedef unsigned short __bitwise pci_bus_flags_t; 142typedef unsigned short __bitwise pci_bus_flags_t;
132enum pci_bus_flags { 143enum pci_bus_flags {
133 PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, 144 PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
@@ -212,8 +223,10 @@ struct pci_dev {
212 unsigned int no_msi:1; /* device may not use msi */ 223 unsigned int no_msi:1; /* device may not use msi */
213 unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ 224 unsigned int block_ucfg_access:1; /* userspace config space access is blocked */
214 unsigned int broken_parity_status:1; /* Device generates false positive parity */ 225 unsigned int broken_parity_status:1; /* Device generates false positive parity */
226 unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */
215 unsigned int msi_enabled:1; 227 unsigned int msi_enabled:1;
216 unsigned int msix_enabled:1; 228 unsigned int msix_enabled:1;
229 unsigned int ari_enabled:1; /* ARI forwarding */
217 unsigned int is_managed:1; 230 unsigned int is_managed:1;
218 unsigned int is_pcie:1; 231 unsigned int is_pcie:1;
219 pci_dev_flags_t dev_flags; 232 pci_dev_flags_t dev_flags;
@@ -347,7 +360,6 @@ struct pci_bus_region {
347struct pci_dynids { 360struct pci_dynids {
348 spinlock_t lock; /* protects list, index */ 361 spinlock_t lock; /* protects list, index */
349 struct list_head list; /* for IDs added at runtime */ 362 struct list_head list; /* for IDs added at runtime */
350 unsigned int use_driver_data:1; /* pci_device_id->driver_data is used */
351}; 363};
352 364
353/* ---------------------------------------------------------------- */ 365/* ---------------------------------------------------------------- */
@@ -456,8 +468,8 @@ struct pci_driver {
456 468
457/** 469/**
458 * PCI_VDEVICE - macro used to describe a specific pci device in short form 470 * PCI_VDEVICE - macro used to describe a specific pci device in short form
459 * @vend: the vendor name 471 * @vendor: the vendor name
460 * @dev: the 16 bit PCI Device ID 472 * @device: the 16 bit PCI Device ID
461 * 473 *
462 * This macro is used to create a struct pci_device_id that matches a 474 * This macro is used to create a struct pci_device_id that matches a
463 * specific PCI device. The subvendor, and subdevice fields will be set 475 * specific PCI device. The subvendor, and subdevice fields will be set
@@ -509,9 +521,10 @@ struct pci_bus *pci_create_bus(struct device *parent, int bus,
509struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, 521struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
510 int busnr); 522 int busnr);
511struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, 523struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
512 const char *name); 524 const char *name,
525 struct hotplug_slot *hotplug);
513void pci_destroy_slot(struct pci_slot *slot); 526void pci_destroy_slot(struct pci_slot *slot);
514void pci_update_slot_number(struct pci_slot *slot, int slot_nr); 527void pci_renumber_slot(struct pci_slot *slot, int slot_nr);
515int pci_scan_slot(struct pci_bus *bus, int devfn); 528int pci_scan_slot(struct pci_bus *bus, int devfn);
516struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn); 529struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn);
517void pci_device_add(struct pci_dev *dev, struct pci_bus *bus); 530void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
@@ -539,6 +552,13 @@ struct pci_dev __deprecated *pci_find_slot(unsigned int bus,
539 unsigned int devfn); 552 unsigned int devfn);
540#endif /* CONFIG_PCI_LEGACY */ 553#endif /* CONFIG_PCI_LEGACY */
541 554
555enum pci_lost_interrupt_reason {
556 PCI_LOST_IRQ_NO_INFORMATION = 0,
557 PCI_LOST_IRQ_DISABLE_MSI,
558 PCI_LOST_IRQ_DISABLE_MSIX,
559 PCI_LOST_IRQ_DISABLE_ACPI,
560};
561enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
542int pci_find_capability(struct pci_dev *dev, int cap); 562int pci_find_capability(struct pci_dev *dev, int cap);
543int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); 563int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
544int pci_find_ext_capability(struct pci_dev *dev, int cap); 564int pci_find_ext_capability(struct pci_dev *dev, int cap);
@@ -626,11 +646,15 @@ int pcix_get_mmrbc(struct pci_dev *dev);
626int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); 646int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc);
627int pcie_get_readrq(struct pci_dev *dev); 647int pcie_get_readrq(struct pci_dev *dev);
628int pcie_set_readrq(struct pci_dev *dev, int rq); 648int pcie_set_readrq(struct pci_dev *dev, int rq);
649int pci_reset_function(struct pci_dev *dev);
650int pci_execute_reset_function(struct pci_dev *dev);
629void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); 651void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
630int __must_check pci_assign_resource(struct pci_dev *dev, int i); 652int __must_check pci_assign_resource(struct pci_dev *dev, int i);
631int pci_select_bars(struct pci_dev *dev, unsigned long flags); 653int pci_select_bars(struct pci_dev *dev, unsigned long flags);
632 654
633/* ROM control related routines */ 655/* ROM control related routines */
656int pci_enable_rom(struct pci_dev *pdev);
657void pci_disable_rom(struct pci_dev *pdev);
634void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); 658void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
635void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); 659void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
636size_t pci_get_rom_size(void __iomem *rom, size_t size); 660size_t pci_get_rom_size(void __iomem *rom, size_t size);
@@ -643,6 +667,7 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
643bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 667bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
644void pci_pme_active(struct pci_dev *dev, bool enable); 668void pci_pme_active(struct pci_dev *dev, bool enable);
645int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 669int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
670int pci_wake_from_d3(struct pci_dev *dev, bool enable);
646pci_power_t pci_target_state(struct pci_dev *dev); 671pci_power_t pci_target_state(struct pci_dev *dev);
647int pci_prepare_to_sleep(struct pci_dev *dev); 672int pci_prepare_to_sleep(struct pci_dev *dev);
648int pci_back_from_sleep(struct pci_dev *dev); 673int pci_back_from_sleep(struct pci_dev *dev);
@@ -723,7 +748,7 @@ enum pci_dma_burst_strategy {
723}; 748};
724 749
725struct msix_entry { 750struct msix_entry {
726 u16 vector; /* kernel uses to write allocated vector */ 751 u32 vector; /* kernel uses to write allocated vector */
727 u16 entry; /* driver uses to specify entry, OS writes */ 752 u16 entry; /* driver uses to specify entry, OS writes */
728}; 753};
729 754
@@ -1116,5 +1141,20 @@ static inline void pci_mmcfg_early_init(void) { }
1116static inline void pci_mmcfg_late_init(void) { } 1141static inline void pci_mmcfg_late_init(void) { }
1117#endif 1142#endif
1118 1143
1144#ifdef CONFIG_HAS_IOMEM
1145static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
1146{
1147 /*
1148 * Make sure the BAR is actually a memory resource, not an IO resource
1149 */
1150 if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
1151 WARN_ON(1);
1152 return NULL;
1153 }
1154 return ioremap_nocache(pci_resource_start(pdev, bar),
1155 pci_resource_len(pdev, bar));
1156}
1157#endif
1158
1119#endif /* __KERNEL__ */ 1159#endif /* __KERNEL__ */
1120#endif /* LINUX_PCI_H */ 1160#endif /* LINUX_PCI_H */
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index a08cd06b541a..a00bd1a0f156 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -142,8 +142,6 @@ struct hotplug_slot_info {
142 142
143/** 143/**
144 * struct hotplug_slot - used to register a physical slot with the hotplug pci core 144 * struct hotplug_slot - used to register a physical slot with the hotplug pci core
145 * @name: the name of the slot being registered. This string must
146 * be unique amoung slots registered on this system.
147 * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot 145 * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot
148 * @info: pointer to the &struct hotplug_slot_info for the initial values for 146 * @info: pointer to the &struct hotplug_slot_info for the initial values for
149 * this slot. 147 * this slot.
@@ -153,7 +151,6 @@ struct hotplug_slot_info {
153 * needs. 151 * needs.
154 */ 152 */
155struct hotplug_slot { 153struct hotplug_slot {
156 char *name;
157 struct hotplug_slot_ops *ops; 154 struct hotplug_slot_ops *ops;
158 struct hotplug_slot_info *info; 155 struct hotplug_slot_info *info;
159 void (*release) (struct hotplug_slot *slot); 156 void (*release) (struct hotplug_slot *slot);
@@ -165,7 +162,13 @@ struct hotplug_slot {
165}; 162};
166#define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj) 163#define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj)
167 164
168extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr); 165static inline const char *hotplug_slot_name(const struct hotplug_slot *slot)
166{
167 return pci_slot_name(slot->pci_slot);
168}
169
170extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr,
171 const char *name);
169extern int pci_hp_deregister(struct hotplug_slot *slot); 172extern int pci_hp_deregister(struct hotplug_slot *slot);
170extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, 173extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot,
171 struct hotplug_slot_info *info); 174 struct hotplug_slot_info *info);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1176f1f177e2..b6e694454280 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -587,6 +587,7 @@
587#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 587#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520
588#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 588#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521
589#define PCI_DEVICE_ID_MATROX_G400 0x0525 589#define PCI_DEVICE_ID_MATROX_G400 0x0525
590#define PCI_DEVICE_ID_MATROX_G200EV_PCI 0x0530
590#define PCI_DEVICE_ID_MATROX_G550 0x2527 591#define PCI_DEVICE_ID_MATROX_G550 0x2527
591#define PCI_DEVICE_ID_MATROX_VIA 0x4536 592#define PCI_DEVICE_ID_MATROX_VIA 0x4536
592 593
@@ -1943,6 +1944,14 @@
1943 1944
1944#define PCI_VENDOR_ID_OXSEMI 0x1415 1945#define PCI_VENDOR_ID_OXSEMI 0x1415
1945#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 1946#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403
1947#define PCI_DEVICE_ID_OXSEMI_PCIe840 0xC000
1948#define PCI_DEVICE_ID_OXSEMI_PCIe840_G 0xC004
1949#define PCI_DEVICE_ID_OXSEMI_PCIe952_0 0xC100
1950#define PCI_DEVICE_ID_OXSEMI_PCIe952_0_G 0xC104
1951#define PCI_DEVICE_ID_OXSEMI_PCIe952_1 0xC110
1952#define PCI_DEVICE_ID_OXSEMI_PCIe952_1_G 0xC114
1953#define PCI_DEVICE_ID_OXSEMI_PCIe952_1_U 0xC118
1954#define PCI_DEVICE_ID_OXSEMI_PCIe952_1_GU 0xC11C
1946#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 1955#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501
1947#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 1956#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511
1948#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513 1957#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513
@@ -2295,6 +2304,10 @@
2295#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 2304#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329
2296#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A 2305#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A
2297#define PCI_DEVICE_ID_INTEL_PXHV 0x032C 2306#define PCI_DEVICE_ID_INTEL_PXHV 0x032C
2307#define PCI_DEVICE_ID_INTEL_80332_0 0x0330
2308#define PCI_DEVICE_ID_INTEL_80332_1 0x0332
2309#define PCI_DEVICE_ID_INTEL_80333_0 0x0370
2310#define PCI_DEVICE_ID_INTEL_80333_1 0x0372
2298#define PCI_DEVICE_ID_INTEL_82375 0x0482 2311#define PCI_DEVICE_ID_INTEL_82375 0x0482
2299#define PCI_DEVICE_ID_INTEL_82424 0x0483 2312#define PCI_DEVICE_ID_INTEL_82424 0x0483
2300#define PCI_DEVICE_ID_INTEL_82378 0x0484 2313#define PCI_DEVICE_ID_INTEL_82378 0x0484
@@ -2367,6 +2380,7 @@
2367#define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 2380#define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4
2368#define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6 2381#define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6
2369#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab 2382#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
2383#define PCI_DEVICE_ID_INTEL_ESB_10 0x25ac
2370#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500 2384#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500
2371#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 2385#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501
2372#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 2386#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530
@@ -2447,15 +2461,16 @@
2447#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a 2461#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
2448#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e 2462#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
2449#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b 2463#define PCI_DEVICE_ID_INTEL_IOAT_CNB 0x360b
2464#define PCI_DEVICE_ID_INTEL_FBD_CNB 0x360c
2450#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14 2465#define PCI_DEVICE_ID_INTEL_ICH10_0 0x3a14
2451#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 2466#define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16
2452#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18 2467#define PCI_DEVICE_ID_INTEL_ICH10_2 0x3a18
2453#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a 2468#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a
2454#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 2469#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30
2455#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 2470#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60
2456#define PCI_DEVICE_ID_INTEL_PCH_0 0x3b10 2471#define PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 0x3b00
2457#define PCI_DEVICE_ID_INTEL_PCH_1 0x3b11 2472#define PCI_DEVICE_ID_INTEL_PCH_LPC_MAX 0x3b1f
2458#define PCI_DEVICE_ID_INTEL_PCH_2 0x3b30 2473#define PCI_DEVICE_ID_INTEL_PCH_SMBUS 0x3b30
2459#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2474#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
2460#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 2475#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0
2461#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 2476#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 450684f7eaac..e5effd47ed74 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -377,6 +377,7 @@
377#define PCI_EXP_DEVCAP_RBER 0x8000 /* Role-Based Error Reporting */ 377#define PCI_EXP_DEVCAP_RBER 0x8000 /* Role-Based Error Reporting */
378#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ 378#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */
379#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ 379#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */
380#define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */
380#define PCI_EXP_DEVCTL 8 /* Device Control */ 381#define PCI_EXP_DEVCTL 8 /* Device Control */
381#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ 382#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */
382#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ 383#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */
@@ -389,6 +390,7 @@
389#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ 390#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */
390#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ 391#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */
391#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ 392#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */
393#define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */
392#define PCI_EXP_DEVSTA 10 /* Device Status */ 394#define PCI_EXP_DEVSTA 10 /* Device Status */
393#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ 395#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */
394#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ 396#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */
@@ -419,6 +421,10 @@
419#define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */ 421#define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */
420#define PCI_EXP_RTCAP 30 /* Root Capabilities */ 422#define PCI_EXP_RTCAP 30 /* Root Capabilities */
421#define PCI_EXP_RTSTA 32 /* Root Status */ 423#define PCI_EXP_RTSTA 32 /* Root Status */
424#define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */
425#define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */
426#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
427#define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */
422 428
423/* Extended Capabilities (PCI-X 2.0 and Express) */ 429/* Extended Capabilities (PCI-X 2.0 and Express) */
424#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) 430#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
@@ -429,6 +435,7 @@
429#define PCI_EXT_CAP_ID_VC 2 435#define PCI_EXT_CAP_ID_VC 2
430#define PCI_EXT_CAP_ID_DSN 3 436#define PCI_EXT_CAP_ID_DSN 3
431#define PCI_EXT_CAP_ID_PWR 4 437#define PCI_EXT_CAP_ID_PWR 4
438#define PCI_EXT_CAP_ID_ARI 14
432 439
433/* Advanced Error Reporting */ 440/* Advanced Error Reporting */
434#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ 441#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
@@ -536,5 +543,14 @@
536#define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ 543#define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */
537#define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ 544#define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */
538 545
546/* Alternative Routing-ID Interpretation */
547#define PCI_ARI_CAP 0x04 /* ARI Capability Register */
548#define PCI_ARI_CAP_MFVC 0x0001 /* MFVC Function Groups Capability */
549#define PCI_ARI_CAP_ACS 0x0002 /* ACS Function Groups Capability */
550#define PCI_ARI_CAP_NFN(x) (((x) >> 8) & 0xff) /* Next Function Number */
551#define PCI_ARI_CTRL 0x06 /* ARI Control Register */
552#define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */
553#define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */
554#define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */
539 555
540#endif /* LINUX_PCI_REGS_H */ 556#endif /* LINUX_PCI_REGS_H */
diff --git a/include/linux/pfn.h b/include/linux/pfn.h
index bb01f8b92b56..7646637221f3 100644
--- a/include/linux/pfn.h
+++ b/include/linux/pfn.h
@@ -1,9 +1,13 @@
1#ifndef _LINUX_PFN_H_ 1#ifndef _LINUX_PFN_H_
2#define _LINUX_PFN_H_ 2#define _LINUX_PFN_H_
3 3
4#ifndef __ASSEMBLY__
5#include <linux/types.h>
6#endif
7
4#define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK) 8#define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK)
5#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) 9#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
6#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) 10#define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
7#define PFN_PHYS(x) ((x) << PAGE_SHIFT) 11#define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
8 12
9#endif 13#endif
diff --git a/include/linux/phonet.h b/include/linux/phonet.h
index c9609f9aedac..4157faa857b6 100644
--- a/include/linux/phonet.h
+++ b/include/linux/phonet.h
@@ -72,6 +72,7 @@ struct phonetmsg {
72 } pn_msg_u; 72 } pn_msg_u;
73}; 73};
74#define PN_COMMON_MESSAGE 0xF0 74#define PN_COMMON_MESSAGE 0xF0
75#define PN_COMMGR 0x10
75#define PN_PREFIX 0xE0 /* resource for extended messages */ 76#define PN_PREFIX 0xE0 /* resource for extended messages */
76#define pn_submsg_id pn_msg_u.base.pn_submsg_id 77#define pn_submsg_id pn_msg_u.base.pn_submsg_id
77#define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id 78#define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 77c4ed60b982..d7e54d98869f 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -467,6 +467,8 @@ int genphy_restart_aneg(struct phy_device *phydev);
467int genphy_config_aneg(struct phy_device *phydev); 467int genphy_config_aneg(struct phy_device *phydev);
468int genphy_update_link(struct phy_device *phydev); 468int genphy_update_link(struct phy_device *phydev);
469int genphy_read_status(struct phy_device *phydev); 469int genphy_read_status(struct phy_device *phydev);
470int genphy_suspend(struct phy_device *phydev);
471int genphy_resume(struct phy_device *phydev);
470void phy_driver_unregister(struct phy_driver *drv); 472void phy_driver_unregister(struct phy_driver *drv);
471int phy_driver_register(struct phy_driver *new_driver); 473int phy_driver_register(struct phy_driver *new_driver);
472void phy_prepare_link(struct phy_device *phydev, 474void phy_prepare_link(struct phy_device *phydev,
diff --git a/include/linux/pid.h b/include/linux/pid.h
index d7e98ff8021e..bb206c56d1f0 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -147,9 +147,9 @@ pid_t pid_vnr(struct pid *pid);
147#define do_each_pid_task(pid, type, task) \ 147#define do_each_pid_task(pid, type, task) \
148 do { \ 148 do { \
149 struct hlist_node *pos___; \ 149 struct hlist_node *pos___; \
150 if (pid != NULL) \ 150 if ((pid) != NULL) \
151 hlist_for_each_entry_rcu((task), pos___, \ 151 hlist_for_each_entry_rcu((task), pos___, \
152 &pid->tasks[type], pids[type].node) { 152 &(pid)->tasks[type], pids[type].node) {
153 153
154 /* 154 /*
155 * Both old and new leaders may be attached to 155 * Both old and new leaders may be attached to
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 1af82c4e17d4..d82fe825d62f 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -84,12 +84,6 @@ static inline struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
84 return tsk->nsproxy->pid_ns; 84 return tsk->nsproxy->pid_ns;
85} 85}
86 86
87static inline struct task_struct *task_child_reaper(struct task_struct *tsk)
88{
89 BUG_ON(tsk != current);
90 return tsk->nsproxy->pid_ns->child_reaper;
91}
92
93void pidhash_init(void); 87void pidhash_init(void);
94void pidmap_init(void); 88void pidmap_init(void);
95 89
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index 7cf7824df778..e6aa8482ad7a 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -394,6 +394,20 @@ enum
394 394
395#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1) 395#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1)
396 396
397
398/* Cgroup classifier */
399
400enum
401{
402 TCA_CGROUP_UNSPEC,
403 TCA_CGROUP_ACT,
404 TCA_CGROUP_POLICE,
405 TCA_CGROUP_EMATCHES,
406 __TCA_CGROUP_MAX,
407};
408
409#define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1)
410
397/* Extended Matches */ 411/* Extended Matches */
398 412
399struct tcf_ematch_tree_hdr 413struct tcf_ematch_tree_hdr
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 5d921fa91a5b..e3f133adba78 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -500,4 +500,20 @@ struct tc_netem_corrupt
500 500
501#define NETEM_DIST_SCALE 8192 501#define NETEM_DIST_SCALE 8192
502 502
503/* DRR */
504
505enum
506{
507 TCA_DRR_UNSPEC,
508 TCA_DRR_QUANTUM,
509 __TCA_DRR_MAX
510};
511
512#define TCA_DRR_MAX (__TCA_DRR_MAX - 1)
513
514struct tc_drr_stats
515{
516 u32 deficit;
517};
518
503#endif 519#endif
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 95ac21ab3a09..4b8cc6a32479 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -37,6 +37,8 @@ extern int platform_add_devices(struct platform_device **, int);
37 37
38extern struct platform_device *platform_device_register_simple(const char *, int id, 38extern struct platform_device *platform_device_register_simple(const char *, int id,
39 struct resource *, unsigned int); 39 struct resource *, unsigned int);
40extern struct platform_device *platform_device_register_data(struct device *,
41 const char *, int, const void *, size_t);
40 42
41extern struct platform_device *platform_device_alloc(const char *name, int id); 43extern struct platform_device *platform_device_alloc(const char *name, int id);
42extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num); 44extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num);
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 4dcce54b6d76..42de4003c4ee 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -419,7 +419,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
419 419
420#define suspend_report_result(fn, ret) \ 420#define suspend_report_result(fn, ret) \
421 do { \ 421 do { \
422 __suspend_report_result(__FUNCTION__, fn, ret); \ 422 __suspend_report_result(__func__, fn, ret); \
423 } while (0) 423 } while (0)
424 424
425#else /* !CONFIG_PM_SLEEP */ 425#else /* !CONFIG_PM_SLEEP */
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index be764e514e35..ca3c88773028 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -22,9 +22,11 @@ struct pnp_dev;
22 * Resource Management 22 * Resource Management
23 */ 23 */
24#ifdef CONFIG_PNP 24#ifdef CONFIG_PNP
25struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); 25struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned long type,
26 unsigned int num);
26#else 27#else
27static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num) 28static inline struct resource *pnp_get_resource(struct pnp_dev *dev,
29 unsigned long type, unsigned int num)
28{ 30{
29 return NULL; 31 return NULL;
30} 32}
@@ -483,14 +485,4 @@ static inline void pnp_unregister_driver(struct pnp_driver *drv) { }
483 485
484#endif /* CONFIG_PNP */ 486#endif /* CONFIG_PNP */
485 487
486#define pnp_err(format, arg...) printk(KERN_ERR "pnp: " format "\n" , ## arg)
487#define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg)
488#define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg)
489
490#ifdef CONFIG_PNP_DEBUG
491#define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg)
492#else
493#define pnp_dbg(format, arg...) do {} while (0)
494#endif
495
496#endif /* _LINUX_PNP_H */ 488#endif /* _LINUX_PNP_H */
diff --git a/include/linux/poll.h b/include/linux/poll.h
index ef453828877a..badd98ab06f6 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -114,11 +114,13 @@ void zero_fd_set(unsigned long nr, unsigned long *fdset)
114 114
115#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1) 115#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1)
116 116
117extern int do_select(int n, fd_set_bits *fds, s64 *timeout); 117extern int do_select(int n, fd_set_bits *fds, struct timespec *end_time);
118extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds, 118extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds,
119 s64 *timeout); 119 struct timespec *end_time);
120extern int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, 120extern int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
121 fd_set __user *exp, s64 *timeout); 121 fd_set __user *exp, struct timespec *end_time);
122
123extern int poll_select_set_timeout(struct timespec *to, long sec, long nsec);
122 124
123#endif /* KERNEL */ 125#endif /* KERNEL */
124 126
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index a7dd38f30ade..4f71bf4e628c 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -45,9 +45,11 @@ struct k_itimer {
45 int it_requeue_pending; /* waiting to requeue this timer */ 45 int it_requeue_pending; /* waiting to requeue this timer */
46#define REQUEUE_PENDING 1 46#define REQUEUE_PENDING 1
47 int it_sigev_notify; /* notify word of sigevent struct */ 47 int it_sigev_notify; /* notify word of sigevent struct */
48 int it_sigev_signo; /* signo word of sigevent struct */ 48 struct signal_struct *it_signal;
49 sigval_t it_sigev_value; /* value word of sigevent struct */ 49 union {
50 struct task_struct *it_process; /* process to send signal to */ 50 struct pid *it_pid; /* pid of process to send signal to */
51 struct task_struct *it_process; /* for clock_nanosleep */
52 };
51 struct sigqueue *sigq; /* signal queue entry. */ 53 struct sigqueue *sigq; /* signal queue entry. */
52 union { 54 union {
53 struct { 55 struct {
@@ -115,4 +117,6 @@ void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx,
115 117
116long clock_nanosleep_restart(struct restart_block *restart_block); 118long clock_nanosleep_restart(struct restart_block *restart_block);
117 119
120void update_rlimit_cpu(unsigned long rlim_new);
121
118#endif 122#endif
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index ea96ead1d39d..f9348cba6dc1 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -165,6 +165,12 @@ struct power_supply_info {
165extern void power_supply_changed(struct power_supply *psy); 165extern void power_supply_changed(struct power_supply *psy);
166extern int power_supply_am_i_supplied(struct power_supply *psy); 166extern int power_supply_am_i_supplied(struct power_supply *psy);
167 167
168#if defined(CONFIG_POWER_SUPPLY) || defined(CONFIG_POWER_SUPPLY_MODULE)
169extern int power_supply_is_system_supplied(void);
170#else
171static inline int power_supply_is_system_supplied(void) { return -ENOSYS; }
172#endif
173
168extern int power_supply_register(struct device *parent, 174extern int power_supply_register(struct device *parent,
169 struct power_supply *psy); 175 struct power_supply *psy);
170extern void power_supply_unregister(struct power_supply *psy); 176extern void power_supply_unregister(struct power_supply *psy);
diff --git a/include/linux/prctl.h b/include/linux/prctl.h
index 5ad79198d6f9..48d887e3c6e7 100644
--- a/include/linux/prctl.h
+++ b/include/linux/prctl.h
@@ -78,4 +78,11 @@
78#define PR_GET_SECUREBITS 27 78#define PR_GET_SECUREBITS 27
79#define PR_SET_SECUREBITS 28 79#define PR_SET_SECUREBITS 28
80 80
81/*
82 * Get/set the timerslack as used by poll/select/nanosleep
83 * A value of 0 means "use default"
84 */
85#define PR_SET_TIMERSLACK 29
86#define PR_GET_TIMERSLACK 30
87
81#endif /* _LINUX_PRCTL_H */ 88#endif /* _LINUX_PRCTL_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index fb61850d1cfc..b8bdb96eff78 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -97,12 +97,9 @@ struct vmcore {
97 97
98#ifdef CONFIG_PROC_FS 98#ifdef CONFIG_PROC_FS
99 99
100extern struct proc_dir_entry *proc_root_kcore;
101
102extern spinlock_t proc_subdir_lock; 100extern spinlock_t proc_subdir_lock;
103 101
104extern void proc_root_init(void); 102extern void proc_root_init(void);
105extern void proc_misc_init(void);
106 103
107void proc_flush_task(struct task_struct *task); 104void proc_flush_task(struct task_struct *task);
108struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); 105struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
@@ -138,9 +135,6 @@ extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct p
138extern int proc_readdir(struct file *, void *, filldir_t); 135extern int proc_readdir(struct file *, void *, filldir_t);
139extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *); 136extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
140 137
141extern const struct file_operations proc_kcore_operations;
142extern const struct file_operations ppc_htab_operations;
143
144extern int pid_ns_prepare_proc(struct pid_namespace *ns); 138extern int pid_ns_prepare_proc(struct pid_namespace *ns);
145extern void pid_ns_release_proc(struct pid_namespace *ns); 139extern void pid_ns_release_proc(struct pid_namespace *ns);
146 140
diff --git a/include/linux/profile.h b/include/linux/profile.h
index 7e7087239af5..a0fc32279fc0 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -19,10 +19,16 @@ struct notifier_block;
19 19
20#if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS) 20#if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS)
21void create_prof_cpu_mask(struct proc_dir_entry *de); 21void create_prof_cpu_mask(struct proc_dir_entry *de);
22int create_proc_profile(void);
22#else 23#else
23static inline void create_prof_cpu_mask(struct proc_dir_entry *de) 24static inline void create_prof_cpu_mask(struct proc_dir_entry *de)
24{ 25{
25} 26}
27
28static inline int create_proc_profile(void)
29{
30 return 0;
31}
26#endif 32#endif
27 33
28enum profile_type { 34enum profile_type {
@@ -35,7 +41,8 @@ enum profile_type {
35extern int prof_on __read_mostly; 41extern int prof_on __read_mostly;
36 42
37/* init basic kernel profiler */ 43/* init basic kernel profiler */
38void __init profile_init(void); 44int profile_init(void);
45int profile_setup(char *str);
39void profile_tick(int type); 46void profile_tick(int type);
40 47
41/* 48/*
@@ -84,9 +91,9 @@ struct pt_regs;
84 91
85#define prof_on 0 92#define prof_on 0
86 93
87static inline void profile_init(void) 94static inline int profile_init(void)
88{ 95{
89 return; 96 return 0;
90} 97}
91 98
92static inline void profile_tick(int type) 99static inline void profile_tick(int type)
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index ea7416c901d1..98b93ca4db06 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -94,7 +94,7 @@ extern void ptrace_notify(int exit_code);
94extern void __ptrace_link(struct task_struct *child, 94extern void __ptrace_link(struct task_struct *child,
95 struct task_struct *new_parent); 95 struct task_struct *new_parent);
96extern void __ptrace_unlink(struct task_struct *child); 96extern void __ptrace_unlink(struct task_struct *child);
97extern void ptrace_untrace(struct task_struct *child); 97extern void ptrace_fork(struct task_struct *task, unsigned long clone_flags);
98#define PTRACE_MODE_READ 1 98#define PTRACE_MODE_READ 1
99#define PTRACE_MODE_ATTACH 2 99#define PTRACE_MODE_ATTACH 2
100/* Returns 0 on success, -errno on denial. */ 100/* Returns 0 on success, -errno on denial. */
@@ -314,6 +314,27 @@ static inline void user_enable_block_step(struct task_struct *task)
314#define arch_ptrace_stop(code, info) do { } while (0) 314#define arch_ptrace_stop(code, info) do { } while (0)
315#endif 315#endif
316 316
317#ifndef arch_ptrace_untrace
318/*
319 * Do machine-specific work before untracing child.
320 *
321 * This is called for a normal detach as well as from ptrace_exit()
322 * when the tracing task dies.
323 *
324 * Called with write_lock(&tasklist_lock) held.
325 */
326#define arch_ptrace_untrace(task) do { } while (0)
327#endif
328
329#ifndef arch_ptrace_fork
330/*
331 * Do machine-specific work to initialize a new task.
332 *
333 * This is called from copy_process().
334 */
335#define arch_ptrace_fork(child, clone_flags) do { } while (0)
336#endif
337
317extern int task_current_syscall(struct task_struct *target, long *callno, 338extern int task_current_syscall(struct task_struct *target, long *callno,
318 unsigned long args[6], unsigned int maxargs, 339 unsigned long args[6], unsigned int maxargs,
319 unsigned long *sp, unsigned long *pc); 340 unsigned long *sp, unsigned long *pc);
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 376a05048bc5..40401b554484 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -28,8 +28,6 @@
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE. 30 * SUCH DAMAGE.
31 *
32 * Version: $Id: quota.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $
33 */ 31 */
34 32
35#ifndef _LINUX_QUOTA_ 33#ifndef _LINUX_QUOTA_
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index ca6b9b5c8d52..a558a4c1d35a 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -3,9 +3,6 @@
3 * macros expand to the right source-code. 3 * macros expand to the right source-code.
4 * 4 *
5 * Author: Marco van Wieringen <mvw@planets.elm.net> 5 * Author: Marco van Wieringen <mvw@planets.elm.net>
6 *
7 * Version: $Id: quotaops.h,v 1.2 1998/01/15 16:22:26 ecd Exp $
8 *
9 */ 6 */
10#ifndef _LINUX_QUOTAOPS_ 7#ifndef _LINUX_QUOTAOPS_
11#define _LINUX_QUOTAOPS_ 8#define _LINUX_QUOTAOPS_
diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h
index 7e375111d007..f38b9c586afb 100644
--- a/include/linux/raid/linear.h
+++ b/include/linux/raid/linear.h
@@ -5,8 +5,8 @@
5 5
6struct dev_info { 6struct dev_info {
7 mdk_rdev_t *rdev; 7 mdk_rdev_t *rdev;
8 sector_t size; 8 sector_t num_sectors;
9 sector_t offset; 9 sector_t start_sector;
10}; 10};
11 11
12typedef struct dev_info dev_info_t; 12typedef struct dev_info dev_info_t;
@@ -15,9 +15,11 @@ struct linear_private_data
15{ 15{
16 struct linear_private_data *prev; /* earlier version */ 16 struct linear_private_data *prev; /* earlier version */
17 dev_info_t **hash_table; 17 dev_info_t **hash_table;
18 sector_t hash_spacing; 18 sector_t spacing;
19 sector_t array_sectors; 19 sector_t array_sectors;
20 int preshift; /* shift before dividing by hash_spacing */ 20 int sector_shift; /* shift before dividing
21 * by spacing
22 */
21 dev_info_t disks[0]; 23 dev_info_t disks[0];
22}; 24};
23 25
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index dc0e3fcb9f28..82bea14cae1a 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -19,27 +19,7 @@
19#define _MD_H 19#define _MD_H
20 20
21#include <linux/blkdev.h> 21#include <linux/blkdev.h>
22#include <linux/major.h>
23#include <linux/ioctl.h>
24#include <linux/types.h>
25#include <linux/bitops.h>
26#include <linux/module.h>
27#include <linux/hdreg.h>
28#include <linux/proc_fs.h>
29#include <linux/seq_file.h> 22#include <linux/seq_file.h>
30#include <linux/smp_lock.h>
31#include <linux/delay.h>
32#include <net/checksum.h>
33#include <linux/random.h>
34#include <linux/kernel_stat.h>
35#include <asm/io.h>
36#include <linux/completion.h>
37#include <linux/mempool.h>
38#include <linux/list.h>
39#include <linux/reboot.h>
40#include <linux/vmalloc.h>
41#include <linux/blkpg.h>
42#include <linux/bio.h>
43 23
44/* 24/*
45 * 'md_p.h' holds the 'physical' layout of RAID devices 25 * 'md_p.h' holds the 'physical' layout of RAID devices
@@ -74,19 +54,17 @@
74 54
75extern int mdp_major; 55extern int mdp_major;
76 56
77extern int register_md_personality (struct mdk_personality *p); 57extern int register_md_personality(struct mdk_personality *p);
78extern int unregister_md_personality (struct mdk_personality *p); 58extern int unregister_md_personality(struct mdk_personality *p);
79extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), 59extern mdk_thread_t * md_register_thread(void (*run) (mddev_t *mddev),
80 mddev_t *mddev, const char *name); 60 mddev_t *mddev, const char *name);
81extern void md_unregister_thread (mdk_thread_t *thread); 61extern void md_unregister_thread(mdk_thread_t *thread);
82extern void md_wakeup_thread(mdk_thread_t *thread); 62extern void md_wakeup_thread(mdk_thread_t *thread);
83extern void md_check_recovery(mddev_t *mddev); 63extern void md_check_recovery(mddev_t *mddev);
84extern void md_write_start(mddev_t *mddev, struct bio *bi); 64extern void md_write_start(mddev_t *mddev, struct bio *bi);
85extern void md_write_end(mddev_t *mddev); 65extern void md_write_end(mddev_t *mddev);
86extern void md_handle_safemode(mddev_t *mddev);
87extern void md_done_sync(mddev_t *mddev, int blocks, int ok); 66extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
88extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); 67extern void md_error(mddev_t *mddev, mdk_rdev_t *rdev);
89extern void md_unplug_mddev(mddev_t *mddev);
90 68
91extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, 69extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
92 sector_t sector, int size, struct page *page); 70 sector_t sector, int size, struct page *page);
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index c200b9a34aff..8fc909ef6787 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -115,6 +115,9 @@ struct mdk_rdev_s
115 * in superblock. 115 * in superblock.
116 */ 116 */
117 struct work_struct del_work; /* used for delayed sysfs removal */ 117 struct work_struct del_work; /* used for delayed sysfs removal */
118
119 struct sysfs_dirent *sysfs_state; /* handle for 'state'
120 * sysfs entry */
118}; 121};
119 122
120struct mddev_s 123struct mddev_s
@@ -128,7 +131,6 @@ struct mddev_s
128#define MD_CHANGE_DEVS 0 /* Some device status has changed */ 131#define MD_CHANGE_DEVS 0 /* Some device status has changed */
129#define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */ 132#define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */
130#define MD_CHANGE_PENDING 2 /* superblock update in progress */ 133#define MD_CHANGE_PENDING 2 /* superblock update in progress */
131#define MD_NOTIFY_ARRAY_STATE 3 /* atomic context wants to notify userspace */
132 134
133 int ro; 135 int ro;
134 136
@@ -239,6 +241,10 @@ struct mddev_s
239 sector_t resync_max; /* resync should pause 241 sector_t resync_max; /* resync should pause
240 * when it gets here */ 242 * when it gets here */
241 243
244 struct sysfs_dirent *sysfs_state; /* handle for 'array_state'
245 * file in sysfs.
246 */
247
242 spinlock_t write_lock; 248 spinlock_t write_lock;
243 wait_queue_head_t sb_wait; /* for waiting on superblock updates */ 249 wait_queue_head_t sb_wait; /* for waiting on superblock updates */
244 atomic_t pending_writes; /* number of active superblock writes */ 250 atomic_t pending_writes; /* number of active superblock writes */
diff --git a/include/linux/random.h b/include/linux/random.h
index 36f125c0c603..adbf3bd3c6b3 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -8,6 +8,7 @@
8#define _LINUX_RANDOM_H 8#define _LINUX_RANDOM_H
9 9
10#include <linux/ioctl.h> 10#include <linux/ioctl.h>
11#include <linux/irqnr.h>
11 12
12/* ioctl()'s for the random number generator */ 13/* ioctl()'s for the random number generator */
13 14
@@ -44,6 +45,56 @@ struct rand_pool_info {
44 45
45extern void rand_initialize_irq(int irq); 46extern void rand_initialize_irq(int irq);
46 47
48struct timer_rand_state;
49#ifndef CONFIG_SPARSE_IRQ
50
51extern struct timer_rand_state *irq_timer_state[];
52
53static inline struct timer_rand_state *get_timer_rand_state(unsigned int irq)
54{
55 if (irq >= nr_irqs)
56 return NULL;
57
58 return irq_timer_state[irq];
59}
60
61static inline void set_timer_rand_state(unsigned int irq, struct timer_rand_state *state)
62{
63 if (irq >= nr_irqs)
64 return;
65
66 irq_timer_state[irq] = state;
67}
68
69#else
70
71#include <linux/irq.h>
72static inline struct timer_rand_state *get_timer_rand_state(unsigned int irq)
73{
74 struct irq_desc *desc;
75
76 desc = irq_to_desc(irq);
77
78 if (!desc)
79 return NULL;
80
81 return desc->timer_rand_state;
82}
83
84static inline void set_timer_rand_state(unsigned int irq, struct timer_rand_state *state)
85{
86 struct irq_desc *desc;
87
88 desc = irq_to_desc(irq);
89
90 if (!desc)
91 return;
92
93 desc->timer_rand_state = state;
94}
95#endif
96
97
47extern void add_input_randomness(unsigned int type, unsigned int code, 98extern void add_input_randomness(unsigned int type, unsigned int code,
48 unsigned int value); 99 unsigned int value);
49extern void add_interrupt_randomness(int irq); 100extern void add_interrupt_randomness(int irq);
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
index 18a5b9ba9d40..00044b856453 100644
--- a/include/linux/ratelimit.h
+++ b/include/linux/ratelimit.h
@@ -17,11 +17,4 @@ struct ratelimit_state {
17 struct ratelimit_state name = {interval, burst,} 17 struct ratelimit_state name = {interval, burst,}
18 18
19extern int __ratelimit(struct ratelimit_state *rs); 19extern int __ratelimit(struct ratelimit_state *rs);
20
21static inline int ratelimit(void)
22{
23 static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
24 DEFAULT_RATELIMIT_BURST);
25 return __ratelimit(&rs);
26}
27#endif 20#endif
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h
index 5f89b62e6983..301dda829e37 100644
--- a/include/linux/rcuclassic.h
+++ b/include/linux/rcuclassic.h
@@ -41,7 +41,7 @@
41#include <linux/seqlock.h> 41#include <linux/seqlock.h>
42 42
43#ifdef CONFIG_RCU_CPU_STALL_DETECTOR 43#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
44#define RCU_SECONDS_TILL_STALL_CHECK ( 3 * HZ) /* for rcp->jiffies_stall */ 44#define RCU_SECONDS_TILL_STALL_CHECK (10 * HZ) /* for rcp->jiffies_stall */
45#define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ) /* for rcp->jiffies_stall */ 45#define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ) /* for rcp->jiffies_stall */
46#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 46#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
47 47
diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h
new file mode 100644
index 000000000000..f9ddd03961a8
--- /dev/null
+++ b/include/linux/rculist_nulls.h
@@ -0,0 +1,110 @@
1#ifndef _LINUX_RCULIST_NULLS_H
2#define _LINUX_RCULIST_NULLS_H
3
4#ifdef __KERNEL__
5
6/*
7 * RCU-protected list version
8 */
9#include <linux/list_nulls.h>
10#include <linux/rcupdate.h>
11
12/**
13 * hlist_nulls_del_init_rcu - deletes entry from hash list with re-initialization
14 * @n: the element to delete from the hash list.
15 *
16 * Note: hlist_nulls_unhashed() on the node return true after this. It is
17 * useful for RCU based read lockfree traversal if the writer side
18 * must know if the list entry is still hashed or already unhashed.
19 *
20 * In particular, it means that we can not poison the forward pointers
21 * that may still be used for walking the hash list and we can only
22 * zero the pprev pointer so list_unhashed() will return true after
23 * this.
24 *
25 * The caller must take whatever precautions are necessary (such as
26 * holding appropriate locks) to avoid racing with another
27 * list-mutation primitive, such as hlist_nulls_add_head_rcu() or
28 * hlist_nulls_del_rcu(), running on this same list. However, it is
29 * perfectly legal to run concurrently with the _rcu list-traversal
30 * primitives, such as hlist_nulls_for_each_entry_rcu().
31 */
32static inline void hlist_nulls_del_init_rcu(struct hlist_nulls_node *n)
33{
34 if (!hlist_nulls_unhashed(n)) {
35 __hlist_nulls_del(n);
36 n->pprev = NULL;
37 }
38}
39
40/**
41 * hlist_nulls_del_rcu - deletes entry from hash list without re-initialization
42 * @n: the element to delete from the hash list.
43 *
44 * Note: hlist_nulls_unhashed() on entry does not return true after this,
45 * the entry is in an undefined state. It is useful for RCU based
46 * lockfree traversal.
47 *
48 * In particular, it means that we can not poison the forward
49 * pointers that may still be used for walking the hash list.
50 *
51 * The caller must take whatever precautions are necessary
52 * (such as holding appropriate locks) to avoid racing
53 * with another list-mutation primitive, such as hlist_nulls_add_head_rcu()
54 * or hlist_nulls_del_rcu(), running on this same list.
55 * However, it is perfectly legal to run concurrently with
56 * the _rcu list-traversal primitives, such as
57 * hlist_nulls_for_each_entry().
58 */
59static inline void hlist_nulls_del_rcu(struct hlist_nulls_node *n)
60{
61 __hlist_nulls_del(n);
62 n->pprev = LIST_POISON2;
63}
64
65/**
66 * hlist_nulls_add_head_rcu
67 * @n: the element to add to the hash list.
68 * @h: the list to add to.
69 *
70 * Description:
71 * Adds the specified element to the specified hlist_nulls,
72 * while permitting racing traversals.
73 *
74 * The caller must take whatever precautions are necessary
75 * (such as holding appropriate locks) to avoid racing
76 * with another list-mutation primitive, such as hlist_nulls_add_head_rcu()
77 * or hlist_nulls_del_rcu(), running on this same list.
78 * However, it is perfectly legal to run concurrently with
79 * the _rcu list-traversal primitives, such as
80 * hlist_nulls_for_each_entry_rcu(), used to prevent memory-consistency
81 * problems on Alpha CPUs. Regardless of the type of CPU, the
82 * list-traversal primitive must be guarded by rcu_read_lock().
83 */
84static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n,
85 struct hlist_nulls_head *h)
86{
87 struct hlist_nulls_node *first = h->first;
88
89 n->next = first;
90 n->pprev = &h->first;
91 rcu_assign_pointer(h->first, n);
92 if (!is_a_nulls(first))
93 first->pprev = &n->next;
94}
95/**
96 * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type
97 * @tpos: the type * to use as a loop cursor.
98 * @pos: the &struct hlist_nulls_node to use as a loop cursor.
99 * @head: the head for your list.
100 * @member: the name of the hlist_nulls_node within the struct.
101 *
102 */
103#define hlist_nulls_for_each_entry_rcu(tpos, pos, head, member) \
104 for (pos = rcu_dereference((head)->first); \
105 (!is_a_nulls(pos)) && \
106 ({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1; }); \
107 pos = rcu_dereference(pos->next))
108
109#endif
110#endif
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 86f1f5e43e33..1168fbcea8d4 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -52,11 +52,15 @@ struct rcu_head {
52 void (*func)(struct rcu_head *head); 52 void (*func)(struct rcu_head *head);
53}; 53};
54 54
55#ifdef CONFIG_CLASSIC_RCU 55#if defined(CONFIG_CLASSIC_RCU)
56#include <linux/rcuclassic.h> 56#include <linux/rcuclassic.h>
57#else /* #ifdef CONFIG_CLASSIC_RCU */ 57#elif defined(CONFIG_TREE_RCU)
58#include <linux/rcutree.h>
59#elif defined(CONFIG_PREEMPT_RCU)
58#include <linux/rcupreempt.h> 60#include <linux/rcupreempt.h>
59#endif /* #else #ifdef CONFIG_CLASSIC_RCU */ 61#else
62#error "Unknown RCU implementation specified to kernel configuration"
63#endif /* #else #if defined(CONFIG_CLASSIC_RCU) */
60 64
61#define RCU_HEAD_INIT { .next = NULL, .func = NULL } 65#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
62#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT 66#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
@@ -142,6 +146,7 @@ struct rcu_head {
142 * on the write-side to insure proper synchronization. 146 * on the write-side to insure proper synchronization.
143 */ 147 */
144#define rcu_read_lock_sched() preempt_disable() 148#define rcu_read_lock_sched() preempt_disable()
149#define rcu_read_lock_sched_notrace() preempt_disable_notrace()
145 150
146/* 151/*
147 * rcu_read_unlock_sched - marks the end of a RCU-classic critical section 152 * rcu_read_unlock_sched - marks the end of a RCU-classic critical section
@@ -149,6 +154,7 @@ struct rcu_head {
149 * See rcu_read_lock_sched for more information. 154 * See rcu_read_lock_sched for more information.
150 */ 155 */
151#define rcu_read_unlock_sched() preempt_enable() 156#define rcu_read_unlock_sched() preempt_enable()
157#define rcu_read_unlock_sched_notrace() preempt_enable_notrace()
152 158
153 159
154 160
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
new file mode 100644
index 000000000000..d4368b7975c3
--- /dev/null
+++ b/include/linux/rcutree.h
@@ -0,0 +1,329 @@
1/*
2 * Read-Copy Update mechanism for mutual exclusion (tree-based version)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * Copyright IBM Corporation, 2008
19 *
20 * Author: Dipankar Sarma <dipankar@in.ibm.com>
21 * Paul E. McKenney <paulmck@linux.vnet.ibm.com> Hierarchical algorithm
22 *
23 * Based on the original work by Paul McKenney <paulmck@us.ibm.com>
24 * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
25 *
26 * For detailed explanation of Read-Copy Update mechanism see -
27 * Documentation/RCU
28 */
29
30#ifndef __LINUX_RCUTREE_H
31#define __LINUX_RCUTREE_H
32
33#include <linux/cache.h>
34#include <linux/spinlock.h>
35#include <linux/threads.h>
36#include <linux/percpu.h>
37#include <linux/cpumask.h>
38#include <linux/seqlock.h>
39
40/*
41 * Define shape of hierarchy based on NR_CPUS and CONFIG_RCU_FANOUT.
42 * In theory, it should be possible to add more levels straightforwardly.
43 * In practice, this has not been tested, so there is probably some
44 * bug somewhere.
45 */
46#define MAX_RCU_LVLS 3
47#define RCU_FANOUT (CONFIG_RCU_FANOUT)
48#define RCU_FANOUT_SQ (RCU_FANOUT * RCU_FANOUT)
49#define RCU_FANOUT_CUBE (RCU_FANOUT_SQ * RCU_FANOUT)
50
51#if NR_CPUS <= RCU_FANOUT
52# define NUM_RCU_LVLS 1
53# define NUM_RCU_LVL_0 1
54# define NUM_RCU_LVL_1 (NR_CPUS)
55# define NUM_RCU_LVL_2 0
56# define NUM_RCU_LVL_3 0
57#elif NR_CPUS <= RCU_FANOUT_SQ
58# define NUM_RCU_LVLS 2
59# define NUM_RCU_LVL_0 1
60# define NUM_RCU_LVL_1 (((NR_CPUS) + RCU_FANOUT - 1) / RCU_FANOUT)
61# define NUM_RCU_LVL_2 (NR_CPUS)
62# define NUM_RCU_LVL_3 0
63#elif NR_CPUS <= RCU_FANOUT_CUBE
64# define NUM_RCU_LVLS 3
65# define NUM_RCU_LVL_0 1
66# define NUM_RCU_LVL_1 (((NR_CPUS) + RCU_FANOUT_SQ - 1) / RCU_FANOUT_SQ)
67# define NUM_RCU_LVL_2 (((NR_CPUS) + (RCU_FANOUT) - 1) / (RCU_FANOUT))
68# define NUM_RCU_LVL_3 NR_CPUS
69#else
70# error "CONFIG_RCU_FANOUT insufficient for NR_CPUS"
71#endif /* #if (NR_CPUS) <= RCU_FANOUT */
72
73#define RCU_SUM (NUM_RCU_LVL_0 + NUM_RCU_LVL_1 + NUM_RCU_LVL_2 + NUM_RCU_LVL_3)
74#define NUM_RCU_NODES (RCU_SUM - NR_CPUS)
75
76/*
77 * Dynticks per-CPU state.
78 */
79struct rcu_dynticks {
80 int dynticks_nesting; /* Track nesting level, sort of. */
81 int dynticks; /* Even value for dynticks-idle, else odd. */
82 int dynticks_nmi; /* Even value for either dynticks-idle or */
83 /* not in nmi handler, else odd. So this */
84 /* remains even for nmi from irq handler. */
85};
86
87/*
88 * Definition for node within the RCU grace-period-detection hierarchy.
89 */
90struct rcu_node {
91 spinlock_t lock;
92 unsigned long qsmask; /* CPUs or groups that need to switch in */
93 /* order for current grace period to proceed.*/
94 unsigned long qsmaskinit;
95 /* Per-GP initialization for qsmask. */
96 unsigned long grpmask; /* Mask to apply to parent qsmask. */
97 int grplo; /* lowest-numbered CPU or group here. */
98 int grphi; /* highest-numbered CPU or group here. */
99 u8 grpnum; /* CPU/group number for next level up. */
100 u8 level; /* root is at level 0. */
101 struct rcu_node *parent;
102} ____cacheline_internodealigned_in_smp;
103
104/* Index values for nxttail array in struct rcu_data. */
105#define RCU_DONE_TAIL 0 /* Also RCU_WAIT head. */
106#define RCU_WAIT_TAIL 1 /* Also RCU_NEXT_READY head. */
107#define RCU_NEXT_READY_TAIL 2 /* Also RCU_NEXT head. */
108#define RCU_NEXT_TAIL 3
109#define RCU_NEXT_SIZE 4
110
111/* Per-CPU data for read-copy update. */
112struct rcu_data {
113 /* 1) quiescent-state and grace-period handling : */
114 long completed; /* Track rsp->completed gp number */
115 /* in order to detect GP end. */
116 long gpnum; /* Highest gp number that this CPU */
117 /* is aware of having started. */
118 long passed_quiesc_completed;
119 /* Value of completed at time of qs. */
120 bool passed_quiesc; /* User-mode/idle loop etc. */
121 bool qs_pending; /* Core waits for quiesc state. */
122 bool beenonline; /* CPU online at least once. */
123 struct rcu_node *mynode; /* This CPU's leaf of hierarchy */
124 unsigned long grpmask; /* Mask to apply to leaf qsmask. */
125
126 /* 2) batch handling */
127 /*
128 * If nxtlist is not NULL, it is partitioned as follows.
129 * Any of the partitions might be empty, in which case the
130 * pointer to that partition will be equal to the pointer for
131 * the following partition. When the list is empty, all of
132 * the nxttail elements point to nxtlist, which is NULL.
133 *
134 * [*nxttail[RCU_NEXT_READY_TAIL], NULL = *nxttail[RCU_NEXT_TAIL]):
135 * Entries that might have arrived after current GP ended
136 * [*nxttail[RCU_WAIT_TAIL], *nxttail[RCU_NEXT_READY_TAIL]):
137 * Entries known to have arrived before current GP ended
138 * [*nxttail[RCU_DONE_TAIL], *nxttail[RCU_WAIT_TAIL]):
139 * Entries that batch # <= ->completed - 1: waiting for current GP
140 * [nxtlist, *nxttail[RCU_DONE_TAIL]):
141 * Entries that batch # <= ->completed
142 * The grace period for these entries has completed, and
143 * the other grace-period-completed entries may be moved
144 * here temporarily in rcu_process_callbacks().
145 */
146 struct rcu_head *nxtlist;
147 struct rcu_head **nxttail[RCU_NEXT_SIZE];
148 long qlen; /* # of queued callbacks */
149 long blimit; /* Upper limit on a processed batch */
150
151#ifdef CONFIG_NO_HZ
152 /* 3) dynticks interface. */
153 struct rcu_dynticks *dynticks; /* Shared per-CPU dynticks state. */
154 int dynticks_snap; /* Per-GP tracking for dynticks. */
155 int dynticks_nmi_snap; /* Per-GP tracking for dynticks_nmi. */
156#endif /* #ifdef CONFIG_NO_HZ */
157
158 /* 4) reasons this CPU needed to be kicked by force_quiescent_state */
159#ifdef CONFIG_NO_HZ
160 unsigned long dynticks_fqs; /* Kicked due to dynticks idle. */
161#endif /* #ifdef CONFIG_NO_HZ */
162 unsigned long offline_fqs; /* Kicked due to being offline. */
163 unsigned long resched_ipi; /* Sent a resched IPI. */
164
165 /* 5) state to allow this CPU to force_quiescent_state on others */
166 long n_rcu_pending; /* rcu_pending() calls since boot. */
167 long n_rcu_pending_force_qs; /* when to force quiescent states. */
168
169 int cpu;
170};
171
172/* Values for signaled field in struct rcu_state. */
173#define RCU_GP_INIT 0 /* Grace period being initialized. */
174#define RCU_SAVE_DYNTICK 1 /* Need to scan dyntick state. */
175#define RCU_FORCE_QS 2 /* Need to force quiescent state. */
176#ifdef CONFIG_NO_HZ
177#define RCU_SIGNAL_INIT RCU_SAVE_DYNTICK
178#else /* #ifdef CONFIG_NO_HZ */
179#define RCU_SIGNAL_INIT RCU_FORCE_QS
180#endif /* #else #ifdef CONFIG_NO_HZ */
181
182#define RCU_JIFFIES_TILL_FORCE_QS 3 /* for rsp->jiffies_force_qs */
183#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
184#define RCU_SECONDS_TILL_STALL_CHECK (10 * HZ) /* for rsp->jiffies_stall */
185#define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ) /* for rsp->jiffies_stall */
186#define RCU_STALL_RAT_DELAY 2 /* Allow other CPUs time */
187 /* to take at least one */
188 /* scheduling clock irq */
189 /* before ratting on them. */
190
191#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
192
193/*
194 * RCU global state, including node hierarchy. This hierarchy is
195 * represented in "heap" form in a dense array. The root (first level)
196 * of the hierarchy is in ->node[0] (referenced by ->level[0]), the second
197 * level in ->node[1] through ->node[m] (->node[1] referenced by ->level[1]),
198 * and the third level in ->node[m+1] and following (->node[m+1] referenced
199 * by ->level[2]). The number of levels is determined by the number of
200 * CPUs and by CONFIG_RCU_FANOUT. Small systems will have a "hierarchy"
201 * consisting of a single rcu_node.
202 */
203struct rcu_state {
204 struct rcu_node node[NUM_RCU_NODES]; /* Hierarchy. */
205 struct rcu_node *level[NUM_RCU_LVLS]; /* Hierarchy levels. */
206 u32 levelcnt[MAX_RCU_LVLS + 1]; /* # nodes in each level. */
207 u8 levelspread[NUM_RCU_LVLS]; /* kids/node in each level. */
208 struct rcu_data *rda[NR_CPUS]; /* array of rdp pointers. */
209
210 /* The following fields are guarded by the root rcu_node's lock. */
211
212 u8 signaled ____cacheline_internodealigned_in_smp;
213 /* Force QS state. */
214 long gpnum; /* Current gp number. */
215 long completed; /* # of last completed gp. */
216 spinlock_t onofflock; /* exclude on/offline and */
217 /* starting new GP. */
218 spinlock_t fqslock; /* Only one task forcing */
219 /* quiescent states. */
220 unsigned long jiffies_force_qs; /* Time at which to invoke */
221 /* force_quiescent_state(). */
222 unsigned long n_force_qs; /* Number of calls to */
223 /* force_quiescent_state(). */
224 unsigned long n_force_qs_lh; /* ~Number of calls leaving */
225 /* due to lock unavailable. */
226 unsigned long n_force_qs_ngp; /* Number of calls leaving */
227 /* due to no GP active. */
228#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
229 unsigned long gp_start; /* Time at which GP started, */
230 /* but in jiffies. */
231 unsigned long jiffies_stall; /* Time at which to check */
232 /* for CPU stalls. */
233#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
234#ifdef CONFIG_NO_HZ
235 long dynticks_completed; /* Value of completed @ snap. */
236#endif /* #ifdef CONFIG_NO_HZ */
237};
238
239extern struct rcu_state rcu_state;
240DECLARE_PER_CPU(struct rcu_data, rcu_data);
241
242extern struct rcu_state rcu_bh_state;
243DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
244
245/*
246 * Increment the quiescent state counter.
247 * The counter is a bit degenerated: We do not need to know
248 * how many quiescent states passed, just if there was at least
249 * one since the start of the grace period. Thus just a flag.
250 */
251static inline void rcu_qsctr_inc(int cpu)
252{
253 struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
254 rdp->passed_quiesc = 1;
255 rdp->passed_quiesc_completed = rdp->completed;
256}
257static inline void rcu_bh_qsctr_inc(int cpu)
258{
259 struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu);
260 rdp->passed_quiesc = 1;
261 rdp->passed_quiesc_completed = rdp->completed;
262}
263
264extern int rcu_pending(int cpu);
265extern int rcu_needs_cpu(int cpu);
266
267#ifdef CONFIG_DEBUG_LOCK_ALLOC
268extern struct lockdep_map rcu_lock_map;
269# define rcu_read_acquire() \
270 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
271# define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_)
272#else
273# define rcu_read_acquire() do { } while (0)
274# define rcu_read_release() do { } while (0)
275#endif
276
277static inline void __rcu_read_lock(void)
278{
279 preempt_disable();
280 __acquire(RCU);
281 rcu_read_acquire();
282}
283static inline void __rcu_read_unlock(void)
284{
285 rcu_read_release();
286 __release(RCU);
287 preempt_enable();
288}
289static inline void __rcu_read_lock_bh(void)
290{
291 local_bh_disable();
292 __acquire(RCU_BH);
293 rcu_read_acquire();
294}
295static inline void __rcu_read_unlock_bh(void)
296{
297 rcu_read_release();
298 __release(RCU_BH);
299 local_bh_enable();
300}
301
302#define __synchronize_sched() synchronize_rcu()
303
304#define call_rcu_sched(head, func) call_rcu(head, func)
305
306static inline void rcu_init_sched(void)
307{
308}
309
310extern void __rcu_init(void);
311extern void rcu_check_callbacks(int cpu, int user);
312extern void rcu_restart_cpu(int cpu);
313
314extern long rcu_batches_completed(void);
315extern long rcu_batches_completed_bh(void);
316
317#ifdef CONFIG_NO_HZ
318void rcu_enter_nohz(void);
319void rcu_exit_nohz(void);
320#else /* CONFIG_NO_HZ */
321static inline void rcu_enter_nohz(void)
322{
323}
324static inline void rcu_exit_nohz(void)
325{
326}
327#endif /* CONFIG_NO_HZ */
328
329#endif /* __LINUX_RCUTREE_H */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index e9963af16cda..bc5114d35e99 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -87,7 +87,7 @@ void reiserfs_warning(struct super_block *s, const char *fmt, ...);
87if( !( cond ) ) \ 87if( !( cond ) ) \
88 reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \ 88 reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \
89 __FILE__ ":%i:%s: " format "\n", \ 89 __FILE__ ":%i:%s: " format "\n", \
90 in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __FUNCTION__ , ##args ) 90 in_interrupt() ? -1 : task_pid_nr(current), __LINE__ , __func__ , ##args )
91 91
92#define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args) 92#define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args)
93 93
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 315517e8bfa1..bda6b562a1e0 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -178,6 +178,7 @@ struct reiserfs_journal {
178 struct reiserfs_journal_cnode *j_first; /* oldest journal block. start here for traverse */ 178 struct reiserfs_journal_cnode *j_first; /* oldest journal block. start here for traverse */
179 179
180 struct block_device *j_dev_bd; 180 struct block_device *j_dev_bd;
181 fmode_t j_dev_mode;
181 int j_1st_reserved_block; /* first block on s_dev of reserved area journal */ 182 int j_1st_reserved_block; /* first block on s_dev of reserved area journal */
182 183
183 unsigned long j_state; 184 unsigned long j_state;
diff --git a/include/linux/resource.h b/include/linux/resource.h
index aaa423a6f3d9..40fc7e626082 100644
--- a/include/linux/resource.h
+++ b/include/linux/resource.h
@@ -59,10 +59,10 @@ struct rlimit {
59#define _STK_LIM (8*1024*1024) 59#define _STK_LIM (8*1024*1024)
60 60
61/* 61/*
62 * GPG wants 32kB of mlocked memory, to make sure pass phrases 62 * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
63 * and other sensitive information are never written to disk. 63 * and other sensitive information are never written to disk.
64 */ 64 */
65#define MLOCK_LIMIT (8 * PAGE_SIZE) 65#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
66 66
67/* 67/*
68 * Due to binary compatibility, the actual resource numbers 68 * Due to binary compatibility, the actual resource numbers
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 4cd64b0d9825..164332cbb77c 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -108,6 +108,7 @@ struct rfkill {
108 108
109 struct device dev; 109 struct device dev;
110 struct list_head node; 110 struct list_head node;
111 enum rfkill_state state_for_resume;
111}; 112};
112#define to_rfkill(d) container_of(d, struct rfkill, dev) 113#define to_rfkill(d) container_of(d, struct rfkill, dev)
113 114
@@ -148,11 +149,4 @@ static inline char *rfkill_get_led_name(struct rfkill *rfkill)
148#endif 149#endif
149} 150}
150 151
151/* rfkill notification chain */
152#define RFKILL_STATE_CHANGED 0x0001 /* state of a normal rfkill
153 switch has changed */
154
155int register_rfkill_notifier(struct notifier_block *nb);
156int unregister_rfkill_notifier(struct notifier_block *nb);
157
158#endif /* RFKILL_H */ 152#endif /* RFKILL_H */
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
new file mode 100644
index 000000000000..b3b359660082
--- /dev/null
+++ b/include/linux/ring_buffer.h
@@ -0,0 +1,140 @@
1#ifndef _LINUX_RING_BUFFER_H
2#define _LINUX_RING_BUFFER_H
3
4#include <linux/mm.h>
5#include <linux/seq_file.h>
6
7struct ring_buffer;
8struct ring_buffer_iter;
9
10/*
11 * Don't reference this struct directly, use functions below.
12 */
13struct ring_buffer_event {
14 u32 type:2, len:3, time_delta:27;
15 u32 array[];
16};
17
18/**
19 * enum ring_buffer_type - internal ring buffer types
20 *
21 * @RINGBUF_TYPE_PADDING: Left over page padding
22 * array is ignored
23 * size is variable depending on how much
24 * padding is needed
25 *
26 * @RINGBUF_TYPE_TIME_EXTEND: Extend the time delta
27 * array[0] = time delta (28 .. 59)
28 * size = 8 bytes
29 *
30 * @RINGBUF_TYPE_TIME_STAMP: Sync time stamp with external clock
31 * array[0] = tv_nsec
32 * array[1..2] = tv_sec
33 * size = 16 bytes
34 *
35 * @RINGBUF_TYPE_DATA: Data record
36 * If len is zero:
37 * array[0] holds the actual length
38 * array[1..(length+3)/4] holds data
39 * size = 4 + 4 + length (bytes)
40 * else
41 * length = len << 2
42 * array[0..(length+3)/4-1] holds data
43 * size = 4 + length (bytes)
44 */
45enum ring_buffer_type {
46 RINGBUF_TYPE_PADDING,
47 RINGBUF_TYPE_TIME_EXTEND,
48 /* FIXME: RINGBUF_TYPE_TIME_STAMP not implemented */
49 RINGBUF_TYPE_TIME_STAMP,
50 RINGBUF_TYPE_DATA,
51};
52
53unsigned ring_buffer_event_length(struct ring_buffer_event *event);
54void *ring_buffer_event_data(struct ring_buffer_event *event);
55
56/**
57 * ring_buffer_event_time_delta - return the delta timestamp of the event
58 * @event: the event to get the delta timestamp of
59 *
60 * The delta timestamp is the 27 bit timestamp since the last event.
61 */
62static inline unsigned
63ring_buffer_event_time_delta(struct ring_buffer_event *event)
64{
65 return event->time_delta;
66}
67
68/*
69 * size is in bytes for each per CPU buffer.
70 */
71struct ring_buffer *
72ring_buffer_alloc(unsigned long size, unsigned flags);
73void ring_buffer_free(struct ring_buffer *buffer);
74
75int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size);
76
77struct ring_buffer_event *
78ring_buffer_lock_reserve(struct ring_buffer *buffer,
79 unsigned long length,
80 unsigned long *flags);
81int ring_buffer_unlock_commit(struct ring_buffer *buffer,
82 struct ring_buffer_event *event,
83 unsigned long flags);
84int ring_buffer_write(struct ring_buffer *buffer,
85 unsigned long length, void *data);
86
87struct ring_buffer_event *
88ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts);
89struct ring_buffer_event *
90ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts);
91
92struct ring_buffer_iter *
93ring_buffer_read_start(struct ring_buffer *buffer, int cpu);
94void ring_buffer_read_finish(struct ring_buffer_iter *iter);
95
96struct ring_buffer_event *
97ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts);
98struct ring_buffer_event *
99ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts);
100void ring_buffer_iter_reset(struct ring_buffer_iter *iter);
101int ring_buffer_iter_empty(struct ring_buffer_iter *iter);
102
103unsigned long ring_buffer_size(struct ring_buffer *buffer);
104
105void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu);
106void ring_buffer_reset(struct ring_buffer *buffer);
107
108int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
109 struct ring_buffer *buffer_b, int cpu);
110
111int ring_buffer_empty(struct ring_buffer *buffer);
112int ring_buffer_empty_cpu(struct ring_buffer *buffer, int cpu);
113
114void ring_buffer_record_disable(struct ring_buffer *buffer);
115void ring_buffer_record_enable(struct ring_buffer *buffer);
116void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu);
117void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu);
118
119unsigned long ring_buffer_entries(struct ring_buffer *buffer);
120unsigned long ring_buffer_overruns(struct ring_buffer *buffer);
121unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu);
122unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu);
123
124u64 ring_buffer_time_stamp(int cpu);
125void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);
126
127void tracing_on(void);
128void tracing_off(void);
129void tracing_off_permanent(void);
130
131void *ring_buffer_alloc_read_page(struct ring_buffer *buffer);
132void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data);
133int ring_buffer_read_page(struct ring_buffer *buffer,
134 void **data_page, int cpu, int full);
135
136enum ring_buffer_flags {
137 RB_FL_OVERWRITE = 1 << 0,
138};
139
140#endif /* _LINUX_RING_BUFFER_H */
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h
index 90987b7bcc1b..32c0547ffafc 100644
--- a/include/linux/rio_drv.h
+++ b/include/linux/rio_drv.h
@@ -427,9 +427,9 @@ void rio_dev_put(struct rio_dev *);
427 * Get the unique RIO device identifier. Returns the device 427 * Get the unique RIO device identifier. Returns the device
428 * identifier string. 428 * identifier string.
429 */ 429 */
430static inline char *rio_name(struct rio_dev *rdev) 430static inline const char *rio_name(struct rio_dev *rdev)
431{ 431{
432 return rdev->dev.bus_id; 432 return dev_name(&rdev->dev);
433} 433}
434 434
435/** 435/**
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index fed6f5e0b411..89f0564b10c8 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -39,18 +39,6 @@ struct anon_vma {
39 39
40#ifdef CONFIG_MMU 40#ifdef CONFIG_MMU
41 41
42extern struct kmem_cache *anon_vma_cachep;
43
44static inline struct anon_vma *anon_vma_alloc(void)
45{
46 return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
47}
48
49static inline void anon_vma_free(struct anon_vma *anon_vma)
50{
51 kmem_cache_free(anon_vma_cachep, anon_vma);
52}
53
54static inline void anon_vma_lock(struct vm_area_struct *vma) 42static inline void anon_vma_lock(struct vm_area_struct *vma)
55{ 43{
56 struct anon_vma *anon_vma = vma->anon_vma; 44 struct anon_vma *anon_vma = vma->anon_vma;
@@ -75,6 +63,9 @@ void anon_vma_unlink(struct vm_area_struct *);
75void anon_vma_link(struct vm_area_struct *); 63void anon_vma_link(struct vm_area_struct *);
76void __anon_vma_link(struct vm_area_struct *); 64void __anon_vma_link(struct vm_area_struct *);
77 65
66extern struct anon_vma *page_lock_anon_vma(struct page *page);
67extern void page_unlock_anon_vma(struct anon_vma *anon_vma);
68
78/* 69/*
79 * rmap interfaces called when adding or removing pte of page 70 * rmap interfaces called when adding or removing pte of page
80 */ 71 */
@@ -117,6 +108,19 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *);
117 */ 108 */
118int page_mkclean(struct page *); 109int page_mkclean(struct page *);
119 110
111#ifdef CONFIG_UNEVICTABLE_LRU
112/*
113 * called in munlock()/munmap() path to check for other vmas holding
114 * the page mlocked.
115 */
116int try_to_munlock(struct page *);
117#else
118static inline int try_to_munlock(struct page *page)
119{
120 return 0; /* a.k.a. SWAP_SUCCESS */
121}
122#endif
123
120#else /* !CONFIG_MMU */ 124#else /* !CONFIG_MMU */
121 125
122#define anon_vma_init() do {} while (0) 126#define anon_vma_init() do {} while (0)
@@ -140,5 +144,6 @@ static inline int page_mkclean(struct page *page)
140#define SWAP_SUCCESS 0 144#define SWAP_SUCCESS 0
141#define SWAP_AGAIN 1 145#define SWAP_AGAIN 1
142#define SWAP_FAIL 2 146#define SWAP_FAIL 2
147#define SWAP_MLOCK 3
143 148
144#endif /* _LINUX_RMAP_H */ 149#endif /* _LINUX_RMAP_H */
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
index 382bb7951166..f19b00b7d530 100644
--- a/include/linux/rtmutex.h
+++ b/include/linux/rtmutex.h
@@ -54,7 +54,7 @@ struct hrtimer_sleeper;
54#ifdef CONFIG_DEBUG_RT_MUTEXES 54#ifdef CONFIG_DEBUG_RT_MUTEXES
55# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ 55# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
56 , .name = #mutexname, .file = __FILE__, .line = __LINE__ 56 , .name = #mutexname, .file = __FILE__, .line = __LINE__
57# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) 57# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __func__)
58 extern void rt_mutex_debug_task_free(struct task_struct *tsk); 58 extern void rt_mutex_debug_task_free(struct task_struct *tsk);
59#else 59#else
60# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) 60# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 2b3d51c6ec9c..e88f7058b3a1 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -107,6 +107,11 @@ enum {
107 RTM_GETADDRLABEL, 107 RTM_GETADDRLABEL,
108#define RTM_GETADDRLABEL RTM_GETADDRLABEL 108#define RTM_GETADDRLABEL RTM_GETADDRLABEL
109 109
110 RTM_GETDCB = 78,
111#define RTM_GETDCB RTM_GETDCB
112 RTM_SETDCB,
113#define RTM_SETDCB RTM_SETDCB
114
110 __RTM_MAX, 115 __RTM_MAX,
111#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) 116#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
112}; 117};
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1a7e8461db5a..bd5ff78798c2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -96,6 +96,7 @@ struct exec_domain;
96struct futex_pi_state; 96struct futex_pi_state;
97struct robust_list_head; 97struct robust_list_head;
98struct bio; 98struct bio;
99struct bts_tracer;
99 100
100/* 101/*
101 * List of flags we want to share for kernel threads, 102 * List of flags we want to share for kernel threads,
@@ -247,6 +248,7 @@ extern void init_idle(struct task_struct *idle, int cpu);
247extern void init_idle_bootup_task(struct task_struct *idle); 248extern void init_idle_bootup_task(struct task_struct *idle);
248 249
249extern int runqueue_is_locked(void); 250extern int runqueue_is_locked(void);
251extern void task_rq_unlock_wait(struct task_struct *p);
250 252
251extern cpumask_t nohz_cpu_mask; 253extern cpumask_t nohz_cpu_mask;
252#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) 254#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
@@ -258,8 +260,6 @@ static inline int select_nohz_load_balancer(int cpu)
258} 260}
259#endif 261#endif
260 262
261extern unsigned long rt_needs_cpu(int cpu);
262
263/* 263/*
264 * Only dump TASK_* tasks. (0 for all tasks) 264 * Only dump TASK_* tasks. (0 for all tasks)
265 */ 265 */
@@ -287,7 +287,6 @@ extern void trap_init(void);
287extern void account_process_tick(struct task_struct *task, int user); 287extern void account_process_tick(struct task_struct *task, int user);
288extern void update_process_times(int user); 288extern void update_process_times(int user);
289extern void scheduler_tick(void); 289extern void scheduler_tick(void);
290extern void hrtick_resched(void);
291 290
292extern void sched_show_task(struct task_struct *p); 291extern void sched_show_task(struct task_struct *p);
293 292
@@ -403,12 +402,21 @@ extern int get_dumpable(struct mm_struct *mm);
403#define MMF_DUMP_MAPPED_PRIVATE 4 402#define MMF_DUMP_MAPPED_PRIVATE 4
404#define MMF_DUMP_MAPPED_SHARED 5 403#define MMF_DUMP_MAPPED_SHARED 5
405#define MMF_DUMP_ELF_HEADERS 6 404#define MMF_DUMP_ELF_HEADERS 6
405#define MMF_DUMP_HUGETLB_PRIVATE 7
406#define MMF_DUMP_HUGETLB_SHARED 8
406#define MMF_DUMP_FILTER_SHIFT MMF_DUMPABLE_BITS 407#define MMF_DUMP_FILTER_SHIFT MMF_DUMPABLE_BITS
407#define MMF_DUMP_FILTER_BITS 5 408#define MMF_DUMP_FILTER_BITS 7
408#define MMF_DUMP_FILTER_MASK \ 409#define MMF_DUMP_FILTER_MASK \
409 (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT) 410 (((1 << MMF_DUMP_FILTER_BITS) - 1) << MMF_DUMP_FILTER_SHIFT)
410#define MMF_DUMP_FILTER_DEFAULT \ 411#define MMF_DUMP_FILTER_DEFAULT \
411 ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED)) 412 ((1 << MMF_DUMP_ANON_PRIVATE) | (1 << MMF_DUMP_ANON_SHARED) |\
413 (1 << MMF_DUMP_HUGETLB_PRIVATE) | MMF_DUMP_MASK_DEFAULT_ELF)
414
415#ifdef CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS
416# define MMF_DUMP_MASK_DEFAULT_ELF (1 << MMF_DUMP_ELF_HEADERS)
417#else
418# define MMF_DUMP_MASK_DEFAULT_ELF 0
419#endif
412 420
413struct sighand_struct { 421struct sighand_struct {
414 atomic_t count; 422 atomic_t count;
@@ -425,6 +433,39 @@ struct pacct_struct {
425 unsigned long ac_minflt, ac_majflt; 433 unsigned long ac_minflt, ac_majflt;
426}; 434};
427 435
436/**
437 * struct task_cputime - collected CPU time counts
438 * @utime: time spent in user mode, in &cputime_t units
439 * @stime: time spent in kernel mode, in &cputime_t units
440 * @sum_exec_runtime: total time spent on the CPU, in nanoseconds
441 *
442 * This structure groups together three kinds of CPU time that are
443 * tracked for threads and thread groups. Most things considering
444 * CPU time want to group these counts together and treat all three
445 * of them in parallel.
446 */
447struct task_cputime {
448 cputime_t utime;
449 cputime_t stime;
450 unsigned long long sum_exec_runtime;
451};
452/* Alternate field names when used to cache expirations. */
453#define prof_exp stime
454#define virt_exp utime
455#define sched_exp sum_exec_runtime
456
457/**
458 * struct thread_group_cputime - thread group interval timer counts
459 * @totals: thread group interval timers; substructure for
460 * uniprocessor kernel, per-cpu for SMP kernel.
461 *
462 * This structure contains the version of task_cputime, above, that is
463 * used for thread group CPU clock calculations.
464 */
465struct thread_group_cputime {
466 struct task_cputime *totals;
467};
468
428/* 469/*
429 * NOTE! "signal_struct" does not have it's own 470 * NOTE! "signal_struct" does not have it's own
430 * locking, because a shared signal_struct always 471 * locking, because a shared signal_struct always
@@ -470,6 +511,17 @@ struct signal_struct {
470 cputime_t it_prof_expires, it_virt_expires; 511 cputime_t it_prof_expires, it_virt_expires;
471 cputime_t it_prof_incr, it_virt_incr; 512 cputime_t it_prof_incr, it_virt_incr;
472 513
514 /*
515 * Thread group totals for process CPU clocks.
516 * See thread_group_cputime(), et al, for details.
517 */
518 struct thread_group_cputime cputime;
519
520 /* Earliest-expiration cache. */
521 struct task_cputime cputime_expires;
522
523 struct list_head cpu_timers[3];
524
473 /* job control IDs */ 525 /* job control IDs */
474 526
475 /* 527 /*
@@ -500,7 +552,7 @@ struct signal_struct {
500 * Live threads maintain their own counters and add to these 552 * Live threads maintain their own counters and add to these
501 * in __exit_signal, except for the group leader. 553 * in __exit_signal, except for the group leader.
502 */ 554 */
503 cputime_t utime, stime, cutime, cstime; 555 cputime_t cutime, cstime;
504 cputime_t gtime; 556 cputime_t gtime;
505 cputime_t cgtime; 557 cputime_t cgtime;
506 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; 558 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
@@ -509,14 +561,6 @@ struct signal_struct {
509 struct task_io_accounting ioac; 561 struct task_io_accounting ioac;
510 562
511 /* 563 /*
512 * Cumulative ns of scheduled CPU time for dead threads in the
513 * group, not including a zombie group leader. (This only differs
514 * from jiffies_to_ns(utime + stime) if sched_clock uses something
515 * other than jiffies.)
516 */
517 unsigned long long sum_sched_runtime;
518
519 /*
520 * We don't bother to synchronize most readers of this at all, 564 * We don't bother to synchronize most readers of this at all,
521 * because there is no reader checking a limit that actually needs 565 * because there is no reader checking a limit that actually needs
522 * to get both rlim_cur and rlim_max atomically, and either one 566 * to get both rlim_cur and rlim_max atomically, and either one
@@ -527,14 +571,6 @@ struct signal_struct {
527 */ 571 */
528 struct rlimit rlim[RLIM_NLIMITS]; 572 struct rlimit rlim[RLIM_NLIMITS];
529 573
530 struct list_head cpu_timers[3];
531
532 /* keep the process-shared keyrings here so that they do the right
533 * thing in threads created with CLONE_THREAD */
534#ifdef CONFIG_KEYS
535 struct key *session_keyring; /* keyring inherited over fork */
536 struct key *process_keyring; /* keyring private to this process */
537#endif
538#ifdef CONFIG_BSD_PROCESS_ACCT 574#ifdef CONFIG_BSD_PROCESS_ACCT
539 struct pacct_struct pacct; /* per-process accounting information */ 575 struct pacct_struct pacct; /* per-process accounting information */
540#endif 576#endif
@@ -587,6 +623,10 @@ struct user_struct {
587 atomic_t inotify_watches; /* How many inotify watches does this user have? */ 623 atomic_t inotify_watches; /* How many inotify watches does this user have? */
588 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ 624 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
589#endif 625#endif
626#ifdef CONFIG_EPOLL
627 atomic_t epoll_devs; /* The number of epoll descriptors currently open */
628 atomic_t epoll_watches; /* The number of file descriptors currently watched */
629#endif
590#ifdef CONFIG_POSIX_MQUEUE 630#ifdef CONFIG_POSIX_MQUEUE
591 /* protected by mq_lock */ 631 /* protected by mq_lock */
592 unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ 632 unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
@@ -601,6 +641,7 @@ struct user_struct {
601 /* Hash table maintenance information */ 641 /* Hash table maintenance information */
602 struct hlist_node uidhash_node; 642 struct hlist_node uidhash_node;
603 uid_t uid; 643 uid_t uid;
644 struct user_namespace *user_ns;
604 645
605#ifdef CONFIG_USER_SCHED 646#ifdef CONFIG_USER_SCHED
606 struct task_group *tg; 647 struct task_group *tg;
@@ -618,6 +659,7 @@ extern struct user_struct *find_user(uid_t);
618extern struct user_struct root_user; 659extern struct user_struct root_user;
619#define INIT_USER (&root_user) 660#define INIT_USER (&root_user)
620 661
662
621struct backing_dev_info; 663struct backing_dev_info;
622struct reclaim_state; 664struct reclaim_state;
623 665
@@ -625,8 +667,7 @@ struct reclaim_state;
625struct sched_info { 667struct sched_info {
626 /* cumulative counters */ 668 /* cumulative counters */
627 unsigned long pcount; /* # of times run on this cpu */ 669 unsigned long pcount; /* # of times run on this cpu */
628 unsigned long long cpu_time, /* time spent on the cpu */ 670 unsigned long long run_delay; /* time spent waiting on a runqueue */
629 run_delay; /* time spent waiting on a runqueue */
630 671
631 /* timestamps */ 672 /* timestamps */
632 unsigned long long last_arrival,/* when we last ran on a cpu */ 673 unsigned long long last_arrival,/* when we last ran on a cpu */
@@ -638,10 +679,6 @@ struct sched_info {
638}; 679};
639#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ 680#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
640 681
641#ifdef CONFIG_SCHEDSTATS
642extern const struct file_operations proc_schedstat_operations;
643#endif /* CONFIG_SCHEDSTATS */
644
645#ifdef CONFIG_TASK_DELAY_ACCT 682#ifdef CONFIG_TASK_DELAY_ACCT
646struct task_delay_info { 683struct task_delay_info {
647 spinlock_t lock; 684 spinlock_t lock;
@@ -845,38 +882,7 @@ partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
845#endif /* !CONFIG_SMP */ 882#endif /* !CONFIG_SMP */
846 883
847struct io_context; /* See blkdev.h */ 884struct io_context; /* See blkdev.h */
848#define NGROUPS_SMALL 32
849#define NGROUPS_PER_BLOCK ((unsigned int)(PAGE_SIZE / sizeof(gid_t)))
850struct group_info {
851 int ngroups;
852 atomic_t usage;
853 gid_t small_block[NGROUPS_SMALL];
854 int nblocks;
855 gid_t *blocks[0];
856};
857
858/*
859 * get_group_info() must be called with the owning task locked (via task_lock())
860 * when task != current. The reason being that the vast majority of callers are
861 * looking at current->group_info, which can not be changed except by the
862 * current task. Changing current->group_info requires the task lock, too.
863 */
864#define get_group_info(group_info) do { \
865 atomic_inc(&(group_info)->usage); \
866} while (0)
867 885
868#define put_group_info(group_info) do { \
869 if (atomic_dec_and_test(&(group_info)->usage)) \
870 groups_free(group_info); \
871} while (0)
872
873extern struct group_info *groups_alloc(int gidsetsize);
874extern void groups_free(struct group_info *group_info);
875extern int set_current_groups(struct group_info *group_info);
876extern int groups_search(struct group_info *group_info, gid_t grp);
877/* access the groups "array" with this macro */
878#define GROUP_AT(gi, i) \
879 ((gi)->blocks[(i)/NGROUPS_PER_BLOCK][(i)%NGROUPS_PER_BLOCK])
880 886
881#ifdef ARCH_HAS_PREFETCH_SWITCH_STACK 887#ifdef ARCH_HAS_PREFETCH_SWITCH_STACK
882extern void prefetch_stack(struct task_struct *t); 888extern void prefetch_stack(struct task_struct *t);
@@ -898,7 +904,6 @@ struct sched_class {
898 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); 904 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup);
899 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); 905 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep);
900 void (*yield_task) (struct rq *rq); 906 void (*yield_task) (struct rq *rq);
901 int (*select_task_rq)(struct task_struct *p, int sync);
902 907
903 void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync); 908 void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync);
904 909
@@ -906,6 +911,8 @@ struct sched_class {
906 void (*put_prev_task) (struct rq *rq, struct task_struct *p); 911 void (*put_prev_task) (struct rq *rq, struct task_struct *p);
907 912
908#ifdef CONFIG_SMP 913#ifdef CONFIG_SMP
914 int (*select_task_rq)(struct task_struct *p, int sync);
915
909 unsigned long (*load_balance) (struct rq *this_rq, int this_cpu, 916 unsigned long (*load_balance) (struct rq *this_rq, int this_cpu,
910 struct rq *busiest, unsigned long max_load_move, 917 struct rq *busiest, unsigned long max_load_move,
911 struct sched_domain *sd, enum cpu_idle_type idle, 918 struct sched_domain *sd, enum cpu_idle_type idle,
@@ -917,16 +924,17 @@ struct sched_class {
917 void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); 924 void (*pre_schedule) (struct rq *this_rq, struct task_struct *task);
918 void (*post_schedule) (struct rq *this_rq); 925 void (*post_schedule) (struct rq *this_rq);
919 void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); 926 void (*task_wake_up) (struct rq *this_rq, struct task_struct *task);
920#endif
921 927
922 void (*set_curr_task) (struct rq *rq);
923 void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
924 void (*task_new) (struct rq *rq, struct task_struct *p);
925 void (*set_cpus_allowed)(struct task_struct *p, 928 void (*set_cpus_allowed)(struct task_struct *p,
926 const cpumask_t *newmask); 929 const cpumask_t *newmask);
927 930
928 void (*rq_online)(struct rq *rq); 931 void (*rq_online)(struct rq *rq);
929 void (*rq_offline)(struct rq *rq); 932 void (*rq_offline)(struct rq *rq);
933#endif
934
935 void (*set_curr_task) (struct rq *rq);
936 void (*task_tick) (struct rq *rq, struct task_struct *p, int queued);
937 void (*task_new) (struct rq *rq, struct task_struct *p);
930 938
931 void (*switched_from) (struct rq *this_rq, struct task_struct *task, 939 void (*switched_from) (struct rq *this_rq, struct task_struct *task,
932 int running); 940 int running);
@@ -1119,6 +1127,19 @@ struct task_struct {
1119 struct list_head ptraced; 1127 struct list_head ptraced;
1120 struct list_head ptrace_entry; 1128 struct list_head ptrace_entry;
1121 1129
1130#ifdef CONFIG_X86_PTRACE_BTS
1131 /*
1132 * This is the tracer handle for the ptrace BTS extension.
1133 * This field actually belongs to the ptracer task.
1134 */
1135 struct bts_tracer *bts;
1136 /*
1137 * The buffer to hold the BTS data.
1138 */
1139 void *bts_buffer;
1140 size_t bts_size;
1141#endif /* CONFIG_X86_PTRACE_BTS */
1142
1122 /* PID/PID hash table linkage. */ 1143 /* PID/PID hash table linkage. */
1123 struct pid_link pids[PIDTYPE_MAX]; 1144 struct pid_link pids[PIDTYPE_MAX];
1124 struct list_head thread_group; 1145 struct list_head thread_group;
@@ -1136,22 +1157,16 @@ struct task_struct {
1136/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ 1157/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
1137 unsigned long min_flt, maj_flt; 1158 unsigned long min_flt, maj_flt;
1138 1159
1139 cputime_t it_prof_expires, it_virt_expires; 1160 struct task_cputime cputime_expires;
1140 unsigned long long it_sched_expires;
1141 struct list_head cpu_timers[3]; 1161 struct list_head cpu_timers[3];
1142 1162
1143/* process credentials */ 1163/* process credentials */
1144 uid_t uid,euid,suid,fsuid; 1164 const struct cred *real_cred; /* objective and real subjective task
1145 gid_t gid,egid,sgid,fsgid; 1165 * credentials (COW) */
1146 struct group_info *group_info; 1166 const struct cred *cred; /* effective (overridable) subjective task
1147 kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset; 1167 * credentials (COW) */
1148 struct user_struct *user; 1168 struct mutex cred_exec_mutex; /* execve vs ptrace cred calculation mutex */
1149 unsigned securebits; 1169
1150#ifdef CONFIG_KEYS
1151 unsigned char jit_keyring; /* default keyring to attach requested keys to */
1152 struct key *request_key_auth; /* assumed request_key authority */
1153 struct key *thread_keyring; /* keyring private to this thread */
1154#endif
1155 char comm[TASK_COMM_LEN]; /* executable name excluding path 1170 char comm[TASK_COMM_LEN]; /* executable name excluding path
1156 - access with [gs]et_task_comm (which lock 1171 - access with [gs]et_task_comm (which lock
1157 it with task_lock()) 1172 it with task_lock())
@@ -1188,9 +1203,6 @@ struct task_struct {
1188 int (*notifier)(void *priv); 1203 int (*notifier)(void *priv);
1189 void *notifier_data; 1204 void *notifier_data;
1190 sigset_t *notifier_mask; 1205 sigset_t *notifier_mask;
1191#ifdef CONFIG_SECURITY
1192 void *security;
1193#endif
1194 struct audit_context *audit_context; 1206 struct audit_context *audit_context;
1195#ifdef CONFIG_AUDITSYSCALL 1207#ifdef CONFIG_AUDITSYSCALL
1196 uid_t loginuid; 1208 uid_t loginuid;
@@ -1303,6 +1315,31 @@ struct task_struct {
1303 int latency_record_count; 1315 int latency_record_count;
1304 struct latency_record latency_record[LT_SAVECOUNT]; 1316 struct latency_record latency_record[LT_SAVECOUNT];
1305#endif 1317#endif
1318 /*
1319 * time slack values; these are used to round up poll() and
1320 * select() etc timeout values. These are in nanoseconds.
1321 */
1322 unsigned long timer_slack_ns;
1323 unsigned long default_timer_slack_ns;
1324
1325 struct list_head *scm_work_list;
1326#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1327 /* Index of current stored adress in ret_stack */
1328 int curr_ret_stack;
1329 /* Stack of return addresses for return function tracing */
1330 struct ftrace_ret_stack *ret_stack;
1331 /*
1332 * Number of functions that haven't been traced
1333 * because of depth overrun.
1334 */
1335 atomic_t trace_overrun;
1336 /* Pause for the tracing */
1337 atomic_t tracing_graph_pause;
1338#endif
1339#ifdef CONFIG_TRACING
1340 /* state flags for use by tracers */
1341 unsigned long trace;
1342#endif
1306}; 1343};
1307 1344
1308/* 1345/*
@@ -1587,6 +1624,7 @@ extern unsigned long long cpu_clock(int cpu);
1587 1624
1588extern unsigned long long 1625extern unsigned long long
1589task_sched_runtime(struct task_struct *task); 1626task_sched_runtime(struct task_struct *task);
1627extern unsigned long long thread_group_sched_runtime(struct task_struct *task);
1590 1628
1591/* sched_exec is called by processes performing an exec */ 1629/* sched_exec is called by processes performing an exec */
1592#ifdef CONFIG_SMP 1630#ifdef CONFIG_SMP
@@ -1621,6 +1659,7 @@ extern unsigned int sysctl_sched_features;
1621extern unsigned int sysctl_sched_migration_cost; 1659extern unsigned int sysctl_sched_migration_cost;
1622extern unsigned int sysctl_sched_nr_migrate; 1660extern unsigned int sysctl_sched_nr_migrate;
1623extern unsigned int sysctl_sched_shares_ratelimit; 1661extern unsigned int sysctl_sched_shares_ratelimit;
1662extern unsigned int sysctl_sched_shares_thresh;
1624 1663
1625int sched_nr_latency_handler(struct ctl_table *table, int write, 1664int sched_nr_latency_handler(struct ctl_table *table, int write,
1626 struct file *file, void __user *buffer, size_t *length, 1665 struct file *file, void __user *buffer, size_t *length,
@@ -1720,7 +1759,6 @@ static inline struct user_struct *get_uid(struct user_struct *u)
1720 return u; 1759 return u;
1721} 1760}
1722extern void free_uid(struct user_struct *); 1761extern void free_uid(struct user_struct *);
1723extern void switch_uid(struct user_struct *);
1724extern void release_uids(struct user_namespace *ns); 1762extern void release_uids(struct user_namespace *ns);
1725 1763
1726#include <asm/current.h> 1764#include <asm/current.h>
@@ -1739,9 +1777,6 @@ extern void wake_up_new_task(struct task_struct *tsk,
1739extern void sched_fork(struct task_struct *p, int clone_flags); 1777extern void sched_fork(struct task_struct *p, int clone_flags);
1740extern void sched_dead(struct task_struct *p); 1778extern void sched_dead(struct task_struct *p);
1741 1779
1742extern int in_group_p(gid_t);
1743extern int in_egroup_p(gid_t);
1744
1745extern void proc_caches_init(void); 1780extern void proc_caches_init(void);
1746extern void flush_signals(struct task_struct *); 1781extern void flush_signals(struct task_struct *);
1747extern void ignore_signals(struct task_struct *); 1782extern void ignore_signals(struct task_struct *);
@@ -1873,6 +1908,8 @@ static inline unsigned long wait_task_inactive(struct task_struct *p,
1873#define for_each_process(p) \ 1908#define for_each_process(p) \
1874 for (p = &init_task ; (p = next_task(p)) != &init_task ; ) 1909 for (p = &init_task ; (p = next_task(p)) != &init_task ; )
1875 1910
1911extern bool is_single_threaded(struct task_struct *);
1912
1876/* 1913/*
1877 * Careful: do_each_thread/while_each_thread is a double loop so 1914 * Careful: do_each_thread/while_each_thread is a double loop so
1878 * 'break' will not work as expected - use goto instead. 1915 * 'break' will not work as expected - use goto instead.
@@ -2097,6 +2134,30 @@ static inline int spin_needbreak(spinlock_t *lock)
2097} 2134}
2098 2135
2099/* 2136/*
2137 * Thread group CPU time accounting.
2138 */
2139
2140extern int thread_group_cputime_alloc(struct task_struct *);
2141extern void thread_group_cputime(struct task_struct *, struct task_cputime *);
2142
2143static inline void thread_group_cputime_init(struct signal_struct *sig)
2144{
2145 sig->cputime.totals = NULL;
2146}
2147
2148static inline int thread_group_cputime_clone_thread(struct task_struct *curr)
2149{
2150 if (curr->signal->cputime.totals)
2151 return 0;
2152 return thread_group_cputime_alloc(curr);
2153}
2154
2155static inline void thread_group_cputime_free(struct signal_struct *sig)
2156{
2157 free_percpu(sig->cputime.totals);
2158}
2159
2160/*
2100 * Reevaluate whether the task has signals pending delivery. 2161 * Reevaluate whether the task has signals pending delivery.
2101 * Wake the task if so. 2162 * Wake the task if so.
2102 * This is required every time the blocked sigset_t changes. 2163 * This is required every time the blocked sigset_t changes.
@@ -2158,6 +2219,7 @@ extern void normalize_rt_tasks(void);
2158extern struct task_group init_task_group; 2219extern struct task_group init_task_group;
2159#ifdef CONFIG_USER_SCHED 2220#ifdef CONFIG_USER_SCHED
2160extern struct task_group root_task_group; 2221extern struct task_group root_task_group;
2222extern void set_tg_uid(struct user_struct *user);
2161#endif 2223#endif
2162 2224
2163extern struct task_group *sched_create_group(struct task_group *parent); 2225extern struct task_group *sched_create_group(struct task_group *parent);
diff --git a/include/linux/securebits.h b/include/linux/securebits.h
index 92f09bdf1175..d2c5ed845bcc 100644
--- a/include/linux/securebits.h
+++ b/include/linux/securebits.h
@@ -32,7 +32,7 @@
32 setting is locked or not. A setting which is locked cannot be 32 setting is locked or not. A setting which is locked cannot be
33 changed from user-level. */ 33 changed from user-level. */
34#define issecure_mask(X) (1 << (X)) 34#define issecure_mask(X) (1 << (X))
35#define issecure(X) (issecure_mask(X) & current->securebits) 35#define issecure(X) (issecure_mask(X) & current_cred_xxx(securebits))
36 36
37#define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \ 37#define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \
38 issecure_mask(SECURE_NO_SETUID_FIXUP) | \ 38 issecure_mask(SECURE_NO_SETUID_FIXUP) | \
diff --git a/include/linux/security.h b/include/linux/security.h
index f5c4a51eb42e..3416cb85e77b 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -37,6 +37,10 @@
37/* Maximum number of letters for an LSM name string */ 37/* Maximum number of letters for an LSM name string */
38#define SECURITY_NAME_MAX 10 38#define SECURITY_NAME_MAX 10
39 39
40/* If capable should audit the security request */
41#define SECURITY_CAP_NOAUDIT 0
42#define SECURITY_CAP_AUDIT 1
43
40struct ctl_table; 44struct ctl_table;
41struct audit_krule; 45struct audit_krule;
42 46
@@ -44,25 +48,25 @@ struct audit_krule;
44 * These functions are in security/capability.c and are used 48 * These functions are in security/capability.c and are used
45 * as the default capabilities functions 49 * as the default capabilities functions
46 */ 50 */
47extern int cap_capable(struct task_struct *tsk, int cap); 51extern int cap_capable(struct task_struct *tsk, int cap, int audit);
48extern int cap_settime(struct timespec *ts, struct timezone *tz); 52extern int cap_settime(struct timespec *ts, struct timezone *tz);
49extern int cap_ptrace_may_access(struct task_struct *child, unsigned int mode); 53extern int cap_ptrace_may_access(struct task_struct *child, unsigned int mode);
50extern int cap_ptrace_traceme(struct task_struct *parent); 54extern int cap_ptrace_traceme(struct task_struct *parent);
51extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 55extern int cap_capget(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted);
52extern int cap_capset_check(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 56extern int cap_capset(struct cred *new, const struct cred *old,
53extern void cap_capset_set(struct task_struct *target, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted); 57 const kernel_cap_t *effective,
54extern int cap_bprm_set_security(struct linux_binprm *bprm); 58 const kernel_cap_t *inheritable,
55extern void cap_bprm_apply_creds(struct linux_binprm *bprm, int unsafe); 59 const kernel_cap_t *permitted);
60extern int cap_bprm_set_creds(struct linux_binprm *bprm);
56extern int cap_bprm_secureexec(struct linux_binprm *bprm); 61extern int cap_bprm_secureexec(struct linux_binprm *bprm);
57extern int cap_inode_setxattr(struct dentry *dentry, const char *name, 62extern int cap_inode_setxattr(struct dentry *dentry, const char *name,
58 const void *value, size_t size, int flags); 63 const void *value, size_t size, int flags);
59extern int cap_inode_removexattr(struct dentry *dentry, const char *name); 64extern int cap_inode_removexattr(struct dentry *dentry, const char *name);
60extern int cap_inode_need_killpriv(struct dentry *dentry); 65extern int cap_inode_need_killpriv(struct dentry *dentry);
61extern int cap_inode_killpriv(struct dentry *dentry); 66extern int cap_inode_killpriv(struct dentry *dentry);
62extern int cap_task_post_setuid(uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); 67extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags);
63extern void cap_task_reparent_to_init(struct task_struct *p);
64extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, 68extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
65 unsigned long arg4, unsigned long arg5, long *rc_p); 69 unsigned long arg4, unsigned long arg5);
66extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); 70extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp);
67extern int cap_task_setioprio(struct task_struct *p, int ioprio); 71extern int cap_task_setioprio(struct task_struct *p, int ioprio);
68extern int cap_task_setnice(struct task_struct *p, int nice); 72extern int cap_task_setnice(struct task_struct *p, int nice);
@@ -105,7 +109,7 @@ extern unsigned long mmap_min_addr;
105struct sched_param; 109struct sched_param;
106struct request_sock; 110struct request_sock;
107 111
108/* bprm_apply_creds unsafe reasons */ 112/* bprm->unsafe reasons */
109#define LSM_UNSAFE_SHARE 1 113#define LSM_UNSAFE_SHARE 1
110#define LSM_UNSAFE_PTRACE 2 114#define LSM_UNSAFE_PTRACE 2
111#define LSM_UNSAFE_PTRACE_CAP 4 115#define LSM_UNSAFE_PTRACE_CAP 4
@@ -149,36 +153,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
149 * 153 *
150 * Security hooks for program execution operations. 154 * Security hooks for program execution operations.
151 * 155 *
152 * @bprm_alloc_security: 156 * @bprm_set_creds:
153 * Allocate and attach a security structure to the @bprm->security field.
154 * The security field is initialized to NULL when the bprm structure is
155 * allocated.
156 * @bprm contains the linux_binprm structure to be modified.
157 * Return 0 if operation was successful.
158 * @bprm_free_security:
159 * @bprm contains the linux_binprm structure to be modified.
160 * Deallocate and clear the @bprm->security field.
161 * @bprm_apply_creds:
162 * Compute and set the security attributes of a process being transformed
163 * by an execve operation based on the old attributes (current->security)
164 * and the information saved in @bprm->security by the set_security hook.
165 * Since this hook function (and its caller) are void, this hook can not
166 * return an error. However, it can leave the security attributes of the
167 * process unchanged if an access failure occurs at this point.
168 * bprm_apply_creds is called under task_lock. @unsafe indicates various
169 * reasons why it may be unsafe to change security state.
170 * @bprm contains the linux_binprm structure.
171 * @bprm_post_apply_creds:
172 * Runs after bprm_apply_creds with the task_lock dropped, so that
173 * functions which cannot be called safely under the task_lock can
174 * be used. This hook is a good place to perform state changes on
175 * the process such as closing open file descriptors to which access
176 * is no longer granted if the attributes were changed.
177 * Note that a security module might need to save state between
178 * bprm_apply_creds and bprm_post_apply_creds to store the decision
179 * on whether the process may proceed.
180 * @bprm contains the linux_binprm structure.
181 * @bprm_set_security:
182 * Save security information in the bprm->security field, typically based 157 * Save security information in the bprm->security field, typically based
183 * on information about the bprm->file, for later use by the apply_creds 158 * on information about the bprm->file, for later use by the apply_creds
184 * hook. This hook may also optionally check permissions (e.g. for 159 * hook. This hook may also optionally check permissions (e.g. for
@@ -191,15 +166,30 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
191 * @bprm contains the linux_binprm structure. 166 * @bprm contains the linux_binprm structure.
192 * Return 0 if the hook is successful and permission is granted. 167 * Return 0 if the hook is successful and permission is granted.
193 * @bprm_check_security: 168 * @bprm_check_security:
194 * This hook mediates the point when a search for a binary handler will 169 * This hook mediates the point when a search for a binary handler will
195 * begin. It allows a check the @bprm->security value which is set in 170 * begin. It allows a check the @bprm->security value which is set in the
196 * the preceding set_security call. The primary difference from 171 * preceding set_creds call. The primary difference from set_creds is
197 * set_security is that the argv list and envp list are reliably 172 * that the argv list and envp list are reliably available in @bprm. This
198 * available in @bprm. This hook may be called multiple times 173 * hook may be called multiple times during a single execve; and in each
199 * during a single execve; and in each pass set_security is called 174 * pass set_creds is called first.
200 * first.
201 * @bprm contains the linux_binprm structure. 175 * @bprm contains the linux_binprm structure.
202 * Return 0 if the hook is successful and permission is granted. 176 * Return 0 if the hook is successful and permission is granted.
177 * @bprm_committing_creds:
178 * Prepare to install the new security attributes of a process being
179 * transformed by an execve operation, based on the old credentials
180 * pointed to by @current->cred and the information set in @bprm->cred by
181 * the bprm_set_creds hook. @bprm points to the linux_binprm structure.
182 * This hook is a good place to perform state changes on the process such
183 * as closing open file descriptors to which access will no longer be
184 * granted when the attributes are changed. This is called immediately
185 * before commit_creds().
186 * @bprm_committed_creds:
187 * Tidy up after the installation of the new security attributes of a
188 * process being transformed by an execve operation. The new credentials
189 * have, by this point, been set to @current->cred. @bprm points to the
190 * linux_binprm structure. This hook is a good place to perform state
191 * changes on the process such as clearing out non-inheritable signal
192 * state. This is called immediately after commit_creds().
203 * @bprm_secureexec: 193 * @bprm_secureexec:
204 * Return a boolean value (0 or 1) indicating whether a "secure exec" 194 * Return a boolean value (0 or 1) indicating whether a "secure exec"
205 * is required. The flag is passed in the auxiliary table 195 * is required. The flag is passed in the auxiliary table
@@ -585,15 +575,31 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
585 * manual page for definitions of the @clone_flags. 575 * manual page for definitions of the @clone_flags.
586 * @clone_flags contains the flags indicating what should be shared. 576 * @clone_flags contains the flags indicating what should be shared.
587 * Return 0 if permission is granted. 577 * Return 0 if permission is granted.
588 * @task_alloc_security: 578 * @cred_free:
589 * @p contains the task_struct for child process. 579 * @cred points to the credentials.
590 * Allocate and attach a security structure to the p->security field. The 580 * Deallocate and clear the cred->security field in a set of credentials.
591 * security field is initialized to NULL when the task structure is 581 * @cred_prepare:
592 * allocated. 582 * @new points to the new credentials.
593 * Return 0 if operation was successful. 583 * @old points to the original credentials.
594 * @task_free_security: 584 * @gfp indicates the atomicity of any memory allocations.
595 * @p contains the task_struct for process. 585 * Prepare a new set of credentials by copying the data from the old set.
596 * Deallocate and clear the p->security field. 586 * @cred_commit:
587 * @new points to the new credentials.
588 * @old points to the original credentials.
589 * Install a new set of credentials.
590 * @kernel_act_as:
591 * Set the credentials for a kernel service to act as (subjective context).
592 * @new points to the credentials to be modified.
593 * @secid specifies the security ID to be set
594 * The current task must be the one that nominated @secid.
595 * Return 0 if successful.
596 * @kernel_create_files_as:
597 * Set the file creation context in a set of credentials to be the same as
598 * the objective context of the specified inode.
599 * @new points to the credentials to be modified.
600 * @inode points to the inode to use as a reference.
601 * The current task must be the one that nominated @inode.
602 * Return 0 if successful.
597 * @task_setuid: 603 * @task_setuid:
598 * Check permission before setting one or more of the user identity 604 * Check permission before setting one or more of the user identity
599 * attributes of the current process. The @flags parameter indicates 605 * attributes of the current process. The @flags parameter indicates
@@ -606,15 +612,13 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
606 * @id2 contains a uid. 612 * @id2 contains a uid.
607 * @flags contains one of the LSM_SETID_* values. 613 * @flags contains one of the LSM_SETID_* values.
608 * Return 0 if permission is granted. 614 * Return 0 if permission is granted.
609 * @task_post_setuid: 615 * @task_fix_setuid:
610 * Update the module's state after setting one or more of the user 616 * Update the module's state after setting one or more of the user
611 * identity attributes of the current process. The @flags parameter 617 * identity attributes of the current process. The @flags parameter
612 * indicates which of the set*uid system calls invoked this hook. If 618 * indicates which of the set*uid system calls invoked this hook. If
613 * @flags is LSM_SETID_FS, then @old_ruid is the old fs uid and the other 619 * @new is the set of credentials that will be installed. Modifications
614 * parameters are not used. 620 * should be made to this rather than to @current->cred.
615 * @old_ruid contains the old real uid (or fs uid if LSM_SETID_FS). 621 * @old is the set of credentials that are being replaces
616 * @old_euid contains the old effective uid (or -1 if LSM_SETID_FS).
617 * @old_suid contains the old saved uid (or -1 if LSM_SETID_FS).
618 * @flags contains one of the LSM_SETID_* values. 622 * @flags contains one of the LSM_SETID_* values.
619 * Return 0 on success. 623 * Return 0 on success.
620 * @task_setgid: 624 * @task_setgid:
@@ -717,13 +721,8 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
717 * @arg3 contains a argument. 721 * @arg3 contains a argument.
718 * @arg4 contains a argument. 722 * @arg4 contains a argument.
719 * @arg5 contains a argument. 723 * @arg5 contains a argument.
720 * @rc_p contains a pointer to communicate back the forced return code 724 * Return -ENOSYS if no-one wanted to handle this op, any other value to
721 * Return 0 if permission is granted, and non-zero if the security module 725 * cause prctl() to return immediately with that value.
722 * has taken responsibility (setting *rc_p) for the prctl call.
723 * @task_reparent_to_init:
724 * Set the security attributes in @p->security for a kernel thread that
725 * is being reparented to the init task.
726 * @p contains the task_struct for the kernel thread.
727 * @task_to_inode: 726 * @task_to_inode:
728 * Set the security attributes for an inode based on an associated task's 727 * Set the security attributes for an inode based on an associated task's
729 * security attributes, e.g. for /proc/pid inodes. 728 * security attributes, e.g. for /proc/pid inodes.
@@ -1000,7 +999,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1000 * See whether a specific operational right is granted to a process on a 999 * See whether a specific operational right is granted to a process on a
1001 * key. 1000 * key.
1002 * @key_ref refers to the key (key pointer + possession attribute bit). 1001 * @key_ref refers to the key (key pointer + possession attribute bit).
1003 * @context points to the process to provide the context against which to 1002 * @cred points to the credentials to provide the context against which to
1004 * evaluate the security data on the key. 1003 * evaluate the security data on the key.
1005 * @perm describes the combination of permissions required of this key. 1004 * @perm describes the combination of permissions required of this key.
1006 * Return 1 if permission granted, 0 if permission denied and -ve it the 1005 * Return 1 if permission granted, 0 if permission denied and -ve it the
@@ -1162,6 +1161,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1162 * @child process. 1161 * @child process.
1163 * Security modules may also want to perform a process tracing check 1162 * Security modules may also want to perform a process tracing check
1164 * during an execve in the set_security or apply_creds hooks of 1163 * during an execve in the set_security or apply_creds hooks of
1164 * tracing check during an execve in the bprm_set_creds hook of
1165 * binprm_security_ops if the process is being traced and its security 1165 * binprm_security_ops if the process is being traced and its security
1166 * attributes would be changed by the execve. 1166 * attributes would be changed by the execve.
1167 * @child contains the task_struct structure for the target process. 1167 * @child contains the task_struct structure for the target process.
@@ -1185,29 +1185,15 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
1185 * @inheritable contains the inheritable capability set. 1185 * @inheritable contains the inheritable capability set.
1186 * @permitted contains the permitted capability set. 1186 * @permitted contains the permitted capability set.
1187 * Return 0 if the capability sets were successfully obtained. 1187 * Return 0 if the capability sets were successfully obtained.
1188 * @capset_check: 1188 * @capset:
1189 * Check permission before setting the @effective, @inheritable, and
1190 * @permitted capability sets for the @target process.
1191 * Caveat: @target is also set to current if a set of processes is
1192 * specified (i.e. all processes other than current and init or a
1193 * particular process group). Hence, the capset_set hook may need to
1194 * revalidate permission to the actual target process.
1195 * @target contains the task_struct structure for target process.
1196 * @effective contains the effective capability set.
1197 * @inheritable contains the inheritable capability set.
1198 * @permitted contains the permitted capability set.
1199 * Return 0 if permission is granted.
1200 * @capset_set:
1201 * Set the @effective, @inheritable, and @permitted capability sets for 1189 * Set the @effective, @inheritable, and @permitted capability sets for
1202 * the @target process. Since capset_check cannot always check permission 1190 * the current process.
1203 * to the real @target process, this hook may also perform permission 1191 * @new contains the new credentials structure for target process.
1204 * checking to determine if the current process is allowed to set the 1192 * @old contains the current credentials structure for target process.
1205 * capability sets of the @target process. However, this hook has no way
1206 * of returning an error due to the structure of the sys_capset code.
1207 * @target contains the task_struct structure for target process.
1208 * @effective contains the effective capability set. 1193 * @effective contains the effective capability set.
1209 * @inheritable contains the inheritable capability set. 1194 * @inheritable contains the inheritable capability set.
1210 * @permitted contains the permitted capability set. 1195 * @permitted contains the permitted capability set.
1196 * Return 0 and update @new if permission is granted.
1211 * @capable: 1197 * @capable:
1212 * Check whether the @tsk process has the @cap capability. 1198 * Check whether the @tsk process has the @cap capability.
1213 * @tsk contains the task_struct for the process. 1199 * @tsk contains the task_struct for the process.
@@ -1299,15 +1285,12 @@ struct security_operations {
1299 int (*capget) (struct task_struct *target, 1285 int (*capget) (struct task_struct *target,
1300 kernel_cap_t *effective, 1286 kernel_cap_t *effective,
1301 kernel_cap_t *inheritable, kernel_cap_t *permitted); 1287 kernel_cap_t *inheritable, kernel_cap_t *permitted);
1302 int (*capset_check) (struct task_struct *target, 1288 int (*capset) (struct cred *new,
1303 kernel_cap_t *effective, 1289 const struct cred *old,
1304 kernel_cap_t *inheritable, 1290 const kernel_cap_t *effective,
1305 kernel_cap_t *permitted); 1291 const kernel_cap_t *inheritable,
1306 void (*capset_set) (struct task_struct *target, 1292 const kernel_cap_t *permitted);
1307 kernel_cap_t *effective, 1293 int (*capable) (struct task_struct *tsk, int cap, int audit);
1308 kernel_cap_t *inheritable,
1309 kernel_cap_t *permitted);
1310 int (*capable) (struct task_struct *tsk, int cap);
1311 int (*acct) (struct file *file); 1294 int (*acct) (struct file *file);
1312 int (*sysctl) (struct ctl_table *table, int op); 1295 int (*sysctl) (struct ctl_table *table, int op);
1313 int (*quotactl) (int cmds, int type, int id, struct super_block *sb); 1296 int (*quotactl) (int cmds, int type, int id, struct super_block *sb);
@@ -1316,18 +1299,16 @@ struct security_operations {
1316 int (*settime) (struct timespec *ts, struct timezone *tz); 1299 int (*settime) (struct timespec *ts, struct timezone *tz);
1317 int (*vm_enough_memory) (struct mm_struct *mm, long pages); 1300 int (*vm_enough_memory) (struct mm_struct *mm, long pages);
1318 1301
1319 int (*bprm_alloc_security) (struct linux_binprm *bprm); 1302 int (*bprm_set_creds) (struct linux_binprm *bprm);
1320 void (*bprm_free_security) (struct linux_binprm *bprm);
1321 void (*bprm_apply_creds) (struct linux_binprm *bprm, int unsafe);
1322 void (*bprm_post_apply_creds) (struct linux_binprm *bprm);
1323 int (*bprm_set_security) (struct linux_binprm *bprm);
1324 int (*bprm_check_security) (struct linux_binprm *bprm); 1303 int (*bprm_check_security) (struct linux_binprm *bprm);
1325 int (*bprm_secureexec) (struct linux_binprm *bprm); 1304 int (*bprm_secureexec) (struct linux_binprm *bprm);
1305 void (*bprm_committing_creds) (struct linux_binprm *bprm);
1306 void (*bprm_committed_creds) (struct linux_binprm *bprm);
1326 1307
1327 int (*sb_alloc_security) (struct super_block *sb); 1308 int (*sb_alloc_security) (struct super_block *sb);
1328 void (*sb_free_security) (struct super_block *sb); 1309 void (*sb_free_security) (struct super_block *sb);
1329 int (*sb_copy_data) (char *orig, char *copy); 1310 int (*sb_copy_data) (char *orig, char *copy);
1330 int (*sb_kern_mount) (struct super_block *sb, void *data); 1311 int (*sb_kern_mount) (struct super_block *sb, int flags, void *data);
1331 int (*sb_show_options) (struct seq_file *m, struct super_block *sb); 1312 int (*sb_show_options) (struct seq_file *m, struct super_block *sb);
1332 int (*sb_statfs) (struct dentry *dentry); 1313 int (*sb_statfs) (struct dentry *dentry);
1333 int (*sb_mount) (char *dev_name, struct path *path, 1314 int (*sb_mount) (char *dev_name, struct path *path,
@@ -1406,14 +1387,18 @@ struct security_operations {
1406 int (*file_send_sigiotask) (struct task_struct *tsk, 1387 int (*file_send_sigiotask) (struct task_struct *tsk,
1407 struct fown_struct *fown, int sig); 1388 struct fown_struct *fown, int sig);
1408 int (*file_receive) (struct file *file); 1389 int (*file_receive) (struct file *file);
1409 int (*dentry_open) (struct file *file); 1390 int (*dentry_open) (struct file *file, const struct cred *cred);
1410 1391
1411 int (*task_create) (unsigned long clone_flags); 1392 int (*task_create) (unsigned long clone_flags);
1412 int (*task_alloc_security) (struct task_struct *p); 1393 void (*cred_free) (struct cred *cred);
1413 void (*task_free_security) (struct task_struct *p); 1394 int (*cred_prepare)(struct cred *new, const struct cred *old,
1395 gfp_t gfp);
1396 void (*cred_commit)(struct cred *new, const struct cred *old);
1397 int (*kernel_act_as)(struct cred *new, u32 secid);
1398 int (*kernel_create_files_as)(struct cred *new, struct inode *inode);
1414 int (*task_setuid) (uid_t id0, uid_t id1, uid_t id2, int flags); 1399 int (*task_setuid) (uid_t id0, uid_t id1, uid_t id2, int flags);
1415 int (*task_post_setuid) (uid_t old_ruid /* or fsuid */ , 1400 int (*task_fix_setuid) (struct cred *new, const struct cred *old,
1416 uid_t old_euid, uid_t old_suid, int flags); 1401 int flags);
1417 int (*task_setgid) (gid_t id0, gid_t id1, gid_t id2, int flags); 1402 int (*task_setgid) (gid_t id0, gid_t id1, gid_t id2, int flags);
1418 int (*task_setpgid) (struct task_struct *p, pid_t pgid); 1403 int (*task_setpgid) (struct task_struct *p, pid_t pgid);
1419 int (*task_getpgid) (struct task_struct *p); 1404 int (*task_getpgid) (struct task_struct *p);
@@ -1433,8 +1418,7 @@ struct security_operations {
1433 int (*task_wait) (struct task_struct *p); 1418 int (*task_wait) (struct task_struct *p);
1434 int (*task_prctl) (int option, unsigned long arg2, 1419 int (*task_prctl) (int option, unsigned long arg2,
1435 unsigned long arg3, unsigned long arg4, 1420 unsigned long arg3, unsigned long arg4,
1436 unsigned long arg5, long *rc_p); 1421 unsigned long arg5);
1437 void (*task_reparent_to_init) (struct task_struct *p);
1438 void (*task_to_inode) (struct task_struct *p, struct inode *inode); 1422 void (*task_to_inode) (struct task_struct *p, struct inode *inode);
1439 1423
1440 int (*ipc_permission) (struct kern_ipc_perm *ipcp, short flag); 1424 int (*ipc_permission) (struct kern_ipc_perm *ipcp, short flag);
@@ -1539,10 +1523,10 @@ struct security_operations {
1539 1523
1540 /* key management security hooks */ 1524 /* key management security hooks */
1541#ifdef CONFIG_KEYS 1525#ifdef CONFIG_KEYS
1542 int (*key_alloc) (struct key *key, struct task_struct *tsk, unsigned long flags); 1526 int (*key_alloc) (struct key *key, const struct cred *cred, unsigned long flags);
1543 void (*key_free) (struct key *key); 1527 void (*key_free) (struct key *key);
1544 int (*key_permission) (key_ref_t key_ref, 1528 int (*key_permission) (key_ref_t key_ref,
1545 struct task_struct *context, 1529 const struct cred *cred,
1546 key_perm_t perm); 1530 key_perm_t perm);
1547 int (*key_getsecurity)(struct key *key, char **_buffer); 1531 int (*key_getsecurity)(struct key *key, char **_buffer);
1548#endif /* CONFIG_KEYS */ 1532#endif /* CONFIG_KEYS */
@@ -1568,15 +1552,12 @@ int security_capget(struct task_struct *target,
1568 kernel_cap_t *effective, 1552 kernel_cap_t *effective,
1569 kernel_cap_t *inheritable, 1553 kernel_cap_t *inheritable,
1570 kernel_cap_t *permitted); 1554 kernel_cap_t *permitted);
1571int security_capset_check(struct task_struct *target, 1555int security_capset(struct cred *new, const struct cred *old,
1572 kernel_cap_t *effective, 1556 const kernel_cap_t *effective,
1573 kernel_cap_t *inheritable, 1557 const kernel_cap_t *inheritable,
1574 kernel_cap_t *permitted); 1558 const kernel_cap_t *permitted);
1575void security_capset_set(struct task_struct *target,
1576 kernel_cap_t *effective,
1577 kernel_cap_t *inheritable,
1578 kernel_cap_t *permitted);
1579int security_capable(struct task_struct *tsk, int cap); 1559int security_capable(struct task_struct *tsk, int cap);
1560int security_capable_noaudit(struct task_struct *tsk, int cap);
1580int security_acct(struct file *file); 1561int security_acct(struct file *file);
1581int security_sysctl(struct ctl_table *table, int op); 1562int security_sysctl(struct ctl_table *table, int op);
1582int security_quotactl(int cmds, int type, int id, struct super_block *sb); 1563int security_quotactl(int cmds, int type, int id, struct super_block *sb);
@@ -1585,17 +1566,16 @@ int security_syslog(int type);
1585int security_settime(struct timespec *ts, struct timezone *tz); 1566int security_settime(struct timespec *ts, struct timezone *tz);
1586int security_vm_enough_memory(long pages); 1567int security_vm_enough_memory(long pages);
1587int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); 1568int security_vm_enough_memory_mm(struct mm_struct *mm, long pages);
1588int security_bprm_alloc(struct linux_binprm *bprm); 1569int security_vm_enough_memory_kern(long pages);
1589void security_bprm_free(struct linux_binprm *bprm); 1570int security_bprm_set_creds(struct linux_binprm *bprm);
1590void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe);
1591void security_bprm_post_apply_creds(struct linux_binprm *bprm);
1592int security_bprm_set(struct linux_binprm *bprm);
1593int security_bprm_check(struct linux_binprm *bprm); 1571int security_bprm_check(struct linux_binprm *bprm);
1572void security_bprm_committing_creds(struct linux_binprm *bprm);
1573void security_bprm_committed_creds(struct linux_binprm *bprm);
1594int security_bprm_secureexec(struct linux_binprm *bprm); 1574int security_bprm_secureexec(struct linux_binprm *bprm);
1595int security_sb_alloc(struct super_block *sb); 1575int security_sb_alloc(struct super_block *sb);
1596void security_sb_free(struct super_block *sb); 1576void security_sb_free(struct super_block *sb);
1597int security_sb_copy_data(char *orig, char *copy); 1577int security_sb_copy_data(char *orig, char *copy);
1598int security_sb_kern_mount(struct super_block *sb, void *data); 1578int security_sb_kern_mount(struct super_block *sb, int flags, void *data);
1599int security_sb_show_options(struct seq_file *m, struct super_block *sb); 1579int security_sb_show_options(struct seq_file *m, struct super_block *sb);
1600int security_sb_statfs(struct dentry *dentry); 1580int security_sb_statfs(struct dentry *dentry);
1601int security_sb_mount(char *dev_name, struct path *path, 1581int security_sb_mount(char *dev_name, struct path *path,
@@ -1662,13 +1642,16 @@ int security_file_set_fowner(struct file *file);
1662int security_file_send_sigiotask(struct task_struct *tsk, 1642int security_file_send_sigiotask(struct task_struct *tsk,
1663 struct fown_struct *fown, int sig); 1643 struct fown_struct *fown, int sig);
1664int security_file_receive(struct file *file); 1644int security_file_receive(struct file *file);
1665int security_dentry_open(struct file *file); 1645int security_dentry_open(struct file *file, const struct cred *cred);
1666int security_task_create(unsigned long clone_flags); 1646int security_task_create(unsigned long clone_flags);
1667int security_task_alloc(struct task_struct *p); 1647void security_cred_free(struct cred *cred);
1668void security_task_free(struct task_struct *p); 1648int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp);
1649void security_commit_creds(struct cred *new, const struct cred *old);
1650int security_kernel_act_as(struct cred *new, u32 secid);
1651int security_kernel_create_files_as(struct cred *new, struct inode *inode);
1669int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags); 1652int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags);
1670int security_task_post_setuid(uid_t old_ruid, uid_t old_euid, 1653int security_task_fix_setuid(struct cred *new, const struct cred *old,
1671 uid_t old_suid, int flags); 1654 int flags);
1672int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, int flags); 1655int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, int flags);
1673int security_task_setpgid(struct task_struct *p, pid_t pgid); 1656int security_task_setpgid(struct task_struct *p, pid_t pgid);
1674int security_task_getpgid(struct task_struct *p); 1657int security_task_getpgid(struct task_struct *p);
@@ -1687,8 +1670,7 @@ int security_task_kill(struct task_struct *p, struct siginfo *info,
1687 int sig, u32 secid); 1670 int sig, u32 secid);
1688int security_task_wait(struct task_struct *p); 1671int security_task_wait(struct task_struct *p);
1689int security_task_prctl(int option, unsigned long arg2, unsigned long arg3, 1672int security_task_prctl(int option, unsigned long arg2, unsigned long arg3,
1690 unsigned long arg4, unsigned long arg5, long *rc_p); 1673 unsigned long arg4, unsigned long arg5);
1691void security_task_reparent_to_init(struct task_struct *p);
1692void security_task_to_inode(struct task_struct *p, struct inode *inode); 1674void security_task_to_inode(struct task_struct *p, struct inode *inode);
1693int security_ipc_permission(struct kern_ipc_perm *ipcp, short flag); 1675int security_ipc_permission(struct kern_ipc_perm *ipcp, short flag);
1694void security_ipc_getsecid(struct kern_ipc_perm *ipcp, u32 *secid); 1676void security_ipc_getsecid(struct kern_ipc_perm *ipcp, u32 *secid);
@@ -1763,25 +1745,23 @@ static inline int security_capget(struct task_struct *target,
1763 return cap_capget(target, effective, inheritable, permitted); 1745 return cap_capget(target, effective, inheritable, permitted);
1764} 1746}
1765 1747
1766static inline int security_capset_check(struct task_struct *target, 1748static inline int security_capset(struct cred *new,
1767 kernel_cap_t *effective, 1749 const struct cred *old,
1768 kernel_cap_t *inheritable, 1750 const kernel_cap_t *effective,
1769 kernel_cap_t *permitted) 1751 const kernel_cap_t *inheritable,
1752 const kernel_cap_t *permitted)
1770{ 1753{
1771 return cap_capset_check(target, effective, inheritable, permitted); 1754 return cap_capset(new, old, effective, inheritable, permitted);
1772} 1755}
1773 1756
1774static inline void security_capset_set(struct task_struct *target, 1757static inline int security_capable(struct task_struct *tsk, int cap)
1775 kernel_cap_t *effective,
1776 kernel_cap_t *inheritable,
1777 kernel_cap_t *permitted)
1778{ 1758{
1779 cap_capset_set(target, effective, inheritable, permitted); 1759 return cap_capable(tsk, cap, SECURITY_CAP_AUDIT);
1780} 1760}
1781 1761
1782static inline int security_capable(struct task_struct *tsk, int cap) 1762static inline int security_capable_noaudit(struct task_struct *tsk, int cap)
1783{ 1763{
1784 return cap_capable(tsk, cap); 1764 return cap_capable(tsk, cap, SECURITY_CAP_NOAUDIT);
1785} 1765}
1786 1766
1787static inline int security_acct(struct file *file) 1767static inline int security_acct(struct file *file)
@@ -1817,40 +1797,39 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz)
1817 1797
1818static inline int security_vm_enough_memory(long pages) 1798static inline int security_vm_enough_memory(long pages)
1819{ 1799{
1800 WARN_ON(current->mm == NULL);
1820 return cap_vm_enough_memory(current->mm, pages); 1801 return cap_vm_enough_memory(current->mm, pages);
1821} 1802}
1822 1803
1823static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) 1804static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
1824{ 1805{
1806 WARN_ON(mm == NULL);
1825 return cap_vm_enough_memory(mm, pages); 1807 return cap_vm_enough_memory(mm, pages);
1826} 1808}
1827 1809
1828static inline int security_bprm_alloc(struct linux_binprm *bprm) 1810static inline int security_vm_enough_memory_kern(long pages)
1829{ 1811{
1830 return 0; 1812 /* If current->mm is a kernel thread then we will pass NULL,
1813 for this specific case that is fine */
1814 return cap_vm_enough_memory(current->mm, pages);
1831} 1815}
1832 1816
1833static inline void security_bprm_free(struct linux_binprm *bprm) 1817static inline int security_bprm_set_creds(struct linux_binprm *bprm)
1834{ }
1835
1836static inline void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe)
1837{ 1818{
1838 cap_bprm_apply_creds(bprm, unsafe); 1819 return cap_bprm_set_creds(bprm);
1839} 1820}
1840 1821
1841static inline void security_bprm_post_apply_creds(struct linux_binprm *bprm) 1822static inline int security_bprm_check(struct linux_binprm *bprm)
1842{ 1823{
1843 return; 1824 return 0;
1844} 1825}
1845 1826
1846static inline int security_bprm_set(struct linux_binprm *bprm) 1827static inline void security_bprm_committing_creds(struct linux_binprm *bprm)
1847{ 1828{
1848 return cap_bprm_set_security(bprm);
1849} 1829}
1850 1830
1851static inline int security_bprm_check(struct linux_binprm *bprm) 1831static inline void security_bprm_committed_creds(struct linux_binprm *bprm)
1852{ 1832{
1853 return 0;
1854} 1833}
1855 1834
1856static inline int security_bprm_secureexec(struct linux_binprm *bprm) 1835static inline int security_bprm_secureexec(struct linux_binprm *bprm)
@@ -1871,7 +1850,7 @@ static inline int security_sb_copy_data(char *orig, char *copy)
1871 return 0; 1850 return 0;
1872} 1851}
1873 1852
1874static inline int security_sb_kern_mount(struct super_block *sb, void *data) 1853static inline int security_sb_kern_mount(struct super_block *sb, int flags, void *data)
1875{ 1854{
1876 return 0; 1855 return 0;
1877} 1856}
@@ -2167,7 +2146,8 @@ static inline int security_file_receive(struct file *file)
2167 return 0; 2146 return 0;
2168} 2147}
2169 2148
2170static inline int security_dentry_open(struct file *file) 2149static inline int security_dentry_open(struct file *file,
2150 const struct cred *cred)
2171{ 2151{
2172 return 0; 2152 return 0;
2173} 2153}
@@ -2177,13 +2157,31 @@ static inline int security_task_create(unsigned long clone_flags)
2177 return 0; 2157 return 0;
2178} 2158}
2179 2159
2180static inline int security_task_alloc(struct task_struct *p) 2160static inline void security_cred_free(struct cred *cred)
2161{ }
2162
2163static inline int security_prepare_creds(struct cred *new,
2164 const struct cred *old,
2165 gfp_t gfp)
2181{ 2166{
2182 return 0; 2167 return 0;
2183} 2168}
2184 2169
2185static inline void security_task_free(struct task_struct *p) 2170static inline void security_commit_creds(struct cred *new,
2186{ } 2171 const struct cred *old)
2172{
2173}
2174
2175static inline int security_kernel_act_as(struct cred *cred, u32 secid)
2176{
2177 return 0;
2178}
2179
2180static inline int security_kernel_create_files_as(struct cred *cred,
2181 struct inode *inode)
2182{
2183 return 0;
2184}
2187 2185
2188static inline int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, 2186static inline int security_task_setuid(uid_t id0, uid_t id1, uid_t id2,
2189 int flags) 2187 int flags)
@@ -2191,10 +2189,11 @@ static inline int security_task_setuid(uid_t id0, uid_t id1, uid_t id2,
2191 return 0; 2189 return 0;
2192} 2190}
2193 2191
2194static inline int security_task_post_setuid(uid_t old_ruid, uid_t old_euid, 2192static inline int security_task_fix_setuid(struct cred *new,
2195 uid_t old_suid, int flags) 2193 const struct cred *old,
2194 int flags)
2196{ 2195{
2197 return cap_task_post_setuid(old_ruid, old_euid, old_suid, flags); 2196 return cap_task_fix_setuid(new, old, flags);
2198} 2197}
2199 2198
2200static inline int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, 2199static inline int security_task_setgid(gid_t id0, gid_t id1, gid_t id2,
@@ -2281,14 +2280,9 @@ static inline int security_task_wait(struct task_struct *p)
2281static inline int security_task_prctl(int option, unsigned long arg2, 2280static inline int security_task_prctl(int option, unsigned long arg2,
2282 unsigned long arg3, 2281 unsigned long arg3,
2283 unsigned long arg4, 2282 unsigned long arg4,
2284 unsigned long arg5, long *rc_p) 2283 unsigned long arg5)
2285{
2286 return cap_task_prctl(option, arg2, arg3, arg3, arg5, rc_p);
2287}
2288
2289static inline void security_task_reparent_to_init(struct task_struct *p)
2290{ 2284{
2291 cap_task_reparent_to_init(p); 2285 return cap_task_prctl(option, arg2, arg3, arg3, arg5);
2292} 2286}
2293 2287
2294static inline void security_task_to_inode(struct task_struct *p, struct inode *inode) 2288static inline void security_task_to_inode(struct task_struct *p, struct inode *inode)
@@ -2714,16 +2708,16 @@ static inline void security_skb_classify_flow(struct sk_buff *skb, struct flowi
2714#ifdef CONFIG_KEYS 2708#ifdef CONFIG_KEYS
2715#ifdef CONFIG_SECURITY 2709#ifdef CONFIG_SECURITY
2716 2710
2717int security_key_alloc(struct key *key, struct task_struct *tsk, unsigned long flags); 2711int security_key_alloc(struct key *key, const struct cred *cred, unsigned long flags);
2718void security_key_free(struct key *key); 2712void security_key_free(struct key *key);
2719int security_key_permission(key_ref_t key_ref, 2713int security_key_permission(key_ref_t key_ref,
2720 struct task_struct *context, key_perm_t perm); 2714 const struct cred *cred, key_perm_t perm);
2721int security_key_getsecurity(struct key *key, char **_buffer); 2715int security_key_getsecurity(struct key *key, char **_buffer);
2722 2716
2723#else 2717#else
2724 2718
2725static inline int security_key_alloc(struct key *key, 2719static inline int security_key_alloc(struct key *key,
2726 struct task_struct *tsk, 2720 const struct cred *cred,
2727 unsigned long flags) 2721 unsigned long flags)
2728{ 2722{
2729 return 0; 2723 return 0;
@@ -2734,7 +2728,7 @@ static inline void security_key_free(struct key *key)
2734} 2728}
2735 2729
2736static inline int security_key_permission(key_ref_t key_ref, 2730static inline int security_key_permission(key_ref_t key_ref,
2737 struct task_struct *context, 2731 const struct cred *cred,
2738 key_perm_t perm) 2732 key_perm_t perm)
2739{ 2733{
2740 return 0; 2734 return 0;
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index a1783b229ef4..b3dfa72f13b9 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -34,6 +34,7 @@ struct seq_operations {
34 34
35#define SEQ_SKIP 1 35#define SEQ_SKIP 1
36 36
37char *mangle_path(char *s, char *p, char *esc);
37int seq_open(struct file *, const struct seq_operations *); 38int seq_open(struct file *, const struct seq_operations *);
38ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); 39ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
39loff_t seq_lseek(struct file *, loff_t, int); 40loff_t seq_lseek(struct file *, loff_t, int);
@@ -60,6 +61,19 @@ static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)
60 return seq_bitmap(m, mask->bits, MAX_NUMNODES); 61 return seq_bitmap(m, mask->bits, MAX_NUMNODES);
61} 62}
62 63
64int seq_bitmap_list(struct seq_file *m, unsigned long *bits,
65 unsigned int nr_bits);
66
67static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask)
68{
69 return seq_bitmap_list(m, mask->bits, NR_CPUS);
70}
71
72static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask)
73{
74 return seq_bitmap_list(m, mask->bits, MAX_NUMNODES);
75}
76
63int single_open(struct file *, int (*)(struct seq_file *, void *), void *); 77int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
64int single_release(struct inode *, struct file *); 78int single_release(struct inode *, struct file *);
65void *__seq_open_private(struct file *, const struct seq_operations *, int); 79void *__seq_open_private(struct file *, const struct seq_operations *, int);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index e27f216361fc..feb3b939ec4b 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -155,6 +155,11 @@
155 155
156#define PORT_SC26XX 82 156#define PORT_SC26XX 82
157 157
158/* SH-SCI */
159#define PORT_SCIFA 83
160
161#define PORT_S3C6400 84
162
158#ifdef __KERNEL__ 163#ifdef __KERNEL__
159 164
160#include <linux/compiler.h> 165#include <linux/compiler.h>
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h
new file mode 100644
index 000000000000..68e212ff9dde
--- /dev/null
+++ b/include/linux/sh_intc.h
@@ -0,0 +1,91 @@
1#ifndef __SH_INTC_H
2#define __SH_INTC_H
3
4typedef unsigned char intc_enum;
5
6struct intc_vect {
7 intc_enum enum_id;
8 unsigned short vect;
9};
10
11#define INTC_VECT(enum_id, vect) { enum_id, vect }
12#define INTC_IRQ(enum_id, irq) INTC_VECT(enum_id, irq2evt(irq))
13
14struct intc_group {
15 intc_enum enum_id;
16 intc_enum enum_ids[32];
17};
18
19#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } }
20
21struct intc_mask_reg {
22 unsigned long set_reg, clr_reg, reg_width;
23 intc_enum enum_ids[32];
24#ifdef CONFIG_SMP
25 unsigned long smp;
26#endif
27};
28
29struct intc_prio_reg {
30 unsigned long set_reg, clr_reg, reg_width, field_width;
31 intc_enum enum_ids[16];
32#ifdef CONFIG_SMP
33 unsigned long smp;
34#endif
35};
36
37struct intc_sense_reg {
38 unsigned long reg, reg_width, field_width;
39 intc_enum enum_ids[16];
40};
41
42#ifdef CONFIG_SMP
43#define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8)
44#else
45#define INTC_SMP(stride, nr)
46#endif
47
48struct intc_desc {
49 struct intc_vect *vectors;
50 unsigned int nr_vectors;
51 struct intc_group *groups;
52 unsigned int nr_groups;
53 struct intc_mask_reg *mask_regs;
54 unsigned int nr_mask_regs;
55 struct intc_prio_reg *prio_regs;
56 unsigned int nr_prio_regs;
57 struct intc_sense_reg *sense_regs;
58 unsigned int nr_sense_regs;
59 char *name;
60#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
61 struct intc_mask_reg *ack_regs;
62 unsigned int nr_ack_regs;
63#endif
64};
65
66#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
67#define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \
68 mask_regs, prio_regs, sense_regs) \
69struct intc_desc symbol __initdata = { \
70 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
71 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
72 _INTC_ARRAY(sense_regs), \
73 chipname, \
74}
75
76#if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4A)
77#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
78 mask_regs, prio_regs, sense_regs, ack_regs) \
79struct intc_desc symbol __initdata = { \
80 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
81 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
82 _INTC_ARRAY(sense_regs), \
83 chipname, \
84 _INTC_ARRAY(ack_regs), \
85}
86#endif
87
88void __init register_intc_controller(struct intc_desc *desc);
89int intc_set_priority(unsigned int irq, unsigned int prio);
90
91#endif /* __SH_INTC_H */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2725f4e5a9bf..cf2cb50f77d1 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -250,6 +250,9 @@ typedef unsigned char *sk_buff_data_t;
250 * @tc_verd: traffic control verdict 250 * @tc_verd: traffic control verdict
251 * @ndisc_nodetype: router type (from link layer) 251 * @ndisc_nodetype: router type (from link layer)
252 * @do_not_encrypt: set to prevent encryption of this frame 252 * @do_not_encrypt: set to prevent encryption of this frame
253 * @requeue: set to indicate that the wireless core should attempt
254 * a software retry on this frame if we failed to
255 * receive an ACK for it
253 * @dma_cookie: a cookie to one of several possible DMA operations 256 * @dma_cookie: a cookie to one of several possible DMA operations
254 * done by skb DMA functions 257 * done by skb DMA functions
255 * @secmark: security marking 258 * @secmark: security marking
@@ -269,8 +272,9 @@ struct sk_buff {
269 struct dst_entry *dst; 272 struct dst_entry *dst;
270 struct rtable *rtable; 273 struct rtable *rtable;
271 }; 274 };
275#ifdef CONFIG_XFRM
272 struct sec_path *sp; 276 struct sec_path *sp;
273 277#endif
274 /* 278 /*
275 * This is the control buffer. It is free to use for every 279 * This is the control buffer. It is free to use for every
276 * layer. Please put your private variables there. If you 280 * layer. Please put your private variables there. If you
@@ -325,6 +329,7 @@ struct sk_buff {
325#endif 329#endif
326#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) 330#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
327 __u8 do_not_encrypt:1; 331 __u8 do_not_encrypt:1;
332 __u8 requeue:1;
328#endif 333#endif
329 /* 0/13/14 bit hole */ 334 /* 0/13/14 bit hole */
330 335
@@ -488,6 +493,19 @@ static inline bool skb_queue_is_last(const struct sk_buff_head *list,
488} 493}
489 494
490/** 495/**
496 * skb_queue_is_first - check if skb is the first entry in the queue
497 * @list: queue head
498 * @skb: buffer
499 *
500 * Returns true if @skb is the first buffer on the list.
501 */
502static inline bool skb_queue_is_first(const struct sk_buff_head *list,
503 const struct sk_buff *skb)
504{
505 return (skb->prev == (struct sk_buff *) list);
506}
507
508/**
491 * skb_queue_next - return the next packet in the queue 509 * skb_queue_next - return the next packet in the queue
492 * @list: queue head 510 * @list: queue head
493 * @skb: current buffer 511 * @skb: current buffer
@@ -506,6 +524,24 @@ static inline struct sk_buff *skb_queue_next(const struct sk_buff_head *list,
506} 524}
507 525
508/** 526/**
527 * skb_queue_prev - return the prev packet in the queue
528 * @list: queue head
529 * @skb: current buffer
530 *
531 * Return the prev packet in @list before @skb. It is only valid to
532 * call this if skb_queue_is_first() evaluates to false.
533 */
534static inline struct sk_buff *skb_queue_prev(const struct sk_buff_head *list,
535 const struct sk_buff *skb)
536{
537 /* This BUG_ON may seem severe, but if we just return then we
538 * are going to dereference garbage.
539 */
540 BUG_ON(skb_queue_is_first(list, skb));
541 return skb->prev;
542}
543
544/**
509 * skb_get - reference buffer 545 * skb_get - reference buffer
510 * @skb: buffer to reference 546 * @skb: buffer to reference
511 * 547 *
@@ -1647,8 +1683,12 @@ extern int skb_splice_bits(struct sk_buff *skb,
1647extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); 1683extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
1648extern void skb_split(struct sk_buff *skb, 1684extern void skb_split(struct sk_buff *skb,
1649 struct sk_buff *skb1, const u32 len); 1685 struct sk_buff *skb1, const u32 len);
1686extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb,
1687 int shiftlen);
1650 1688
1651extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); 1689extern struct sk_buff *skb_segment(struct sk_buff *skb, int features);
1690extern int skb_gro_receive(struct sk_buff **head,
1691 struct sk_buff *skb);
1652 1692
1653static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, 1693static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
1654 int len, void *buffer) 1694 int len, void *buffer)
@@ -1864,6 +1904,18 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu
1864 to->queue_mapping = from->queue_mapping; 1904 to->queue_mapping = from->queue_mapping;
1865} 1905}
1866 1906
1907#ifdef CONFIG_XFRM
1908static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
1909{
1910 return skb->sp;
1911}
1912#else
1913static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
1914{
1915 return NULL;
1916}
1917#endif
1918
1867static inline int skb_is_gso(const struct sk_buff *skb) 1919static inline int skb_is_gso(const struct sk_buff *skb)
1868{ 1920{
1869 return skb_shinfo(skb)->gso_size; 1921 return skb_shinfo(skb)->gso_size;
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 5ff9676c1e2c..f96d13c281e8 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -23,6 +23,34 @@
23#define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ 23#define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */
24#define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ 24#define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */
25#define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ 25#define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */
26/*
27 * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS!
28 *
29 * This delays freeing the SLAB page by a grace period, it does _NOT_
30 * delay object freeing. This means that if you do kmem_cache_free()
31 * that memory location is free to be reused at any time. Thus it may
32 * be possible to see another object there in the same RCU grace period.
33 *
34 * This feature only ensures the memory location backing the object
35 * stays valid, the trick to using this is relying on an independent
36 * object validation pass. Something like:
37 *
38 * rcu_read_lock()
39 * again:
40 * obj = lockless_lookup(key);
41 * if (obj) {
42 * if (!try_get_ref(obj)) // might fail for free objects
43 * goto again;
44 *
45 * if (obj->key != key) { // not the object we expected
46 * put_ref(obj);
47 * goto again;
48 * }
49 * }
50 * rcu_read_unlock();
51 *
52 * See also the comment on struct slab_rcu in mm/slab.c.
53 */
26#define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ 54#define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */
27#define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ 55#define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */
28#define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ 56#define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */
@@ -225,9 +253,9 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep,
225 * request comes from. 253 * request comes from.
226 */ 254 */
227#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB) 255#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
228extern void *__kmalloc_track_caller(size_t, gfp_t, void*); 256extern void *__kmalloc_track_caller(size_t, gfp_t, unsigned long);
229#define kmalloc_track_caller(size, flags) \ 257#define kmalloc_track_caller(size, flags) \
230 __kmalloc_track_caller(size, flags, __builtin_return_address(0)) 258 __kmalloc_track_caller(size, flags, _RET_IP_)
231#else 259#else
232#define kmalloc_track_caller(size, flags) \ 260#define kmalloc_track_caller(size, flags) \
233 __kmalloc(size, flags) 261 __kmalloc(size, flags)
@@ -243,10 +271,10 @@ extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
243 * allocation request comes from. 271 * allocation request comes from.
244 */ 272 */
245#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB) 273#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB)
246extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *); 274extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, unsigned long);
247#define kmalloc_node_track_caller(size, flags, node) \ 275#define kmalloc_node_track_caller(size, flags, node) \
248 __kmalloc_node_track_caller(size, flags, node, \ 276 __kmalloc_node_track_caller(size, flags, node, \
249 __builtin_return_address(0)) 277 _RET_IP_)
250#else 278#else
251#define kmalloc_node_track_caller(size, flags, node) \ 279#define kmalloc_node_track_caller(size, flags, node) \
252 __kmalloc_node(size, flags, node) 280 __kmalloc_node(size, flags, node)
@@ -257,7 +285,7 @@ extern void *__kmalloc_node_track_caller(size_t, gfp_t, int, void *);
257#define kmalloc_node_track_caller(size, flags, node) \ 285#define kmalloc_node_track_caller(size, flags, node) \
258 kmalloc_track_caller(size, flags) 286 kmalloc_track_caller(size, flags)
259 287
260#endif /* DEBUG_SLAB */ 288#endif /* CONFIG_NUMA */
261 289
262/* 290/*
263 * Shortcuts 291 * Shortcuts
@@ -288,9 +316,4 @@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
288 return kmalloc_node(size, flags | __GFP_ZERO, node); 316 return kmalloc_node(size, flags | __GFP_ZERO, node);
289} 317}
290 318
291#ifdef CONFIG_SLABINFO
292extern const struct seq_operations slabinfo_op;
293ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
294#endif
295
296#endif /* _LINUX_SLAB_H */ 319#endif /* _LINUX_SLAB_H */
diff --git a/include/linux/smc911x.h b/include/linux/smc911x.h
index b58f54c24183..521f37143fae 100644
--- a/include/linux/smc911x.h
+++ b/include/linux/smc911x.h
@@ -7,6 +7,7 @@
7struct smc911x_platdata { 7struct smc911x_platdata {
8 unsigned long flags; 8 unsigned long flags;
9 unsigned long irq_flags; /* IRQF_... */ 9 unsigned long irq_flags; /* IRQF_... */
10 int irq_polarity;
10}; 11};
11 12
12#endif /* __SMC911X_H__ */ 13#endif /* __SMC911X_H__ */
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 66484d4a8459..6e7ba16ff454 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/types.h>
10#include <linux/list.h> 11#include <linux/list.h>
11#include <linux/cpumask.h> 12#include <linux/cpumask.h>
12 13
@@ -16,7 +17,8 @@ struct call_single_data {
16 struct list_head list; 17 struct list_head list;
17 void (*func) (void *info); 18 void (*func) (void *info);
18 void *info; 19 void *info;
19 unsigned int flags; 20 u16 flags;
21 u16 priv;
20}; 22};
21 23
22#ifdef CONFIG_SMP 24#ifdef CONFIG_SMP
@@ -62,8 +64,17 @@ extern void smp_cpus_done(unsigned int max_cpus);
62 * Call a function on all other processors 64 * Call a function on all other processors
63 */ 65 */
64int smp_call_function(void(*func)(void *info), void *info, int wait); 66int smp_call_function(void(*func)(void *info), void *info, int wait);
67/* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */
65int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info, 68int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
66 int wait); 69 int wait);
70
71static inline void smp_call_function_many(const struct cpumask *mask,
72 void (*func)(void *info), void *info,
73 int wait)
74{
75 smp_call_function_mask(*mask, func, info, wait);
76}
77
67int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, 78int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
68 int wait); 79 int wait);
69void __smp_call_function_single(int cpuid, struct call_single_data *data); 80void __smp_call_function_single(int cpuid, struct call_single_data *data);
@@ -135,6 +146,8 @@ static inline void smp_send_reschedule(int cpu) { }
135}) 146})
136#define smp_call_function_mask(mask, func, info, wait) \ 147#define smp_call_function_mask(mask, func, info, wait) \
137 (up_smp_call_function(func, info)) 148 (up_smp_call_function(func, info))
149#define smp_call_function_many(mask, func, info, wait) \
150 (up_smp_call_function(func, info))
138static inline void init_call_single_data(void) 151static inline void init_call_single_data(void)
139{ 152{
140} 153}
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h
new file mode 100644
index 000000000000..1cbf0313adde
--- /dev/null
+++ b/include/linux/smsc911x.h
@@ -0,0 +1,47 @@
1/***************************************************************************
2 *
3 * Copyright (C) 2004-2008 SMSC
4 * Copyright (C) 2005-2008 ARM
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 *
20 ***************************************************************************/
21#ifndef __LINUX_SMSC911X_H__
22#define __LINUX_SMSC911X_H__
23
24#include <linux/phy.h>
25
26/* platform_device configuration data, should be assigned to
27 * the platform_device's dev.platform_data */
28struct smsc911x_platform_config {
29 unsigned int irq_polarity;
30 unsigned int irq_type;
31 unsigned int flags;
32 phy_interface_t phy_interface;
33};
34
35/* Constants for platform_device irq polarity configuration */
36#define SMSC911X_IRQ_POLARITY_ACTIVE_LOW 0
37#define SMSC911X_IRQ_POLARITY_ACTIVE_HIGH 1
38
39/* Constants for platform_device irq type configuration */
40#define SMSC911X_IRQ_TYPE_OPEN_DRAIN 0
41#define SMSC911X_IRQ_TYPE_PUSH_PULL 1
42
43/* Constants for flags */
44#define SMSC911X_USE_16BIT (BIT(0))
45#define SMSC911X_USE_32BIT (BIT(1))
46
47#endif /* __LINUX_SMSC911X_H__ */
diff --git a/include/linux/snmp.h b/include/linux/snmp.h
index 7a6e6bba4a71..aee3f1e1d1ce 100644
--- a/include/linux/snmp.h
+++ b/include/linux/snmp.h
@@ -216,6 +216,9 @@ enum
216 LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */ 216 LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */
217 LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */ 217 LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */
218 LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */ 218 LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */
219 LINUX_MIB_SACKSHIFTED,
220 LINUX_MIB_SACKMERGED,
221 LINUX_MIB_SACKSHIFTFALLBACK,
219 __LINUX_MIB_MAX 222 __LINUX_MIB_MAX
220}; 223};
221 224
diff --git a/include/linux/spi/orion_spi.h b/include/linux/spi/orion_spi.h
index b4d9fa6f797c..decf6d8c77b7 100644
--- a/include/linux/spi/orion_spi.h
+++ b/include/linux/spi/orion_spi.h
@@ -11,6 +11,7 @@
11 11
12struct orion_spi_info { 12struct orion_spi_info {
13 u32 tclk; /* no <linux/clk.h> support yet */ 13 u32 tclk; /* no <linux/clk.h> support yet */
14 u32 enable_clock_fix;
14}; 15};
15 16
16 17
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h
index b8db32cea1de..bf8de281b4ed 100644
--- a/include/linux/spi/spi_bitbang.h
+++ b/include/linux/spi/spi_bitbang.h
@@ -18,6 +18,9 @@
18 * duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(), 18 * duplex (MicroWire) controllers. Provide chipslect() and txrx_bufs(),
19 * and custom setup()/cleanup() methods. 19 * and custom setup()/cleanup() methods.
20 */ 20 */
21
22#include <linux/workqueue.h>
23
21struct spi_bitbang { 24struct spi_bitbang {
22 struct workqueue_struct *workqueue; 25 struct workqueue_struct *workqueue;
23 struct work_struct work; 26 struct work_struct work;
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index e530026eedf7..17d9b58f6379 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -427,12 +427,16 @@ static inline int ssb_dma_mapping_error(struct ssb_device *dev, dma_addr_t addr)
427{ 427{
428 switch (dev->bus->bustype) { 428 switch (dev->bus->bustype) {
429 case SSB_BUSTYPE_PCI: 429 case SSB_BUSTYPE_PCI:
430#ifdef CONFIG_SSB_PCIHOST
430 return pci_dma_mapping_error(dev->bus->host_pci, addr); 431 return pci_dma_mapping_error(dev->bus->host_pci, addr);
432#endif
433 break;
431 case SSB_BUSTYPE_SSB: 434 case SSB_BUSTYPE_SSB:
432 return dma_mapping_error(dev->dev, addr); 435 return dma_mapping_error(dev->dev, addr);
433 default: 436 default:
434 __ssb_dma_not_implemented(dev); 437 break;
435 } 438 }
439 __ssb_dma_not_implemented(dev);
436 return -ENOSYS; 440 return -ENOSYS;
437} 441}
438 442
@@ -441,12 +445,16 @@ static inline dma_addr_t ssb_dma_map_single(struct ssb_device *dev, void *p,
441{ 445{
442 switch (dev->bus->bustype) { 446 switch (dev->bus->bustype) {
443 case SSB_BUSTYPE_PCI: 447 case SSB_BUSTYPE_PCI:
448#ifdef CONFIG_SSB_PCIHOST
444 return pci_map_single(dev->bus->host_pci, p, size, dir); 449 return pci_map_single(dev->bus->host_pci, p, size, dir);
450#endif
451 break;
445 case SSB_BUSTYPE_SSB: 452 case SSB_BUSTYPE_SSB:
446 return dma_map_single(dev->dev, p, size, dir); 453 return dma_map_single(dev->dev, p, size, dir);
447 default: 454 default:
448 __ssb_dma_not_implemented(dev); 455 break;
449 } 456 }
457 __ssb_dma_not_implemented(dev);
450 return 0; 458 return 0;
451} 459}
452 460
@@ -455,14 +463,18 @@ static inline void ssb_dma_unmap_single(struct ssb_device *dev, dma_addr_t dma_a
455{ 463{
456 switch (dev->bus->bustype) { 464 switch (dev->bus->bustype) {
457 case SSB_BUSTYPE_PCI: 465 case SSB_BUSTYPE_PCI:
466#ifdef CONFIG_SSB_PCIHOST
458 pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir); 467 pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir);
459 return; 468 return;
469#endif
470 break;
460 case SSB_BUSTYPE_SSB: 471 case SSB_BUSTYPE_SSB:
461 dma_unmap_single(dev->dev, dma_addr, size, dir); 472 dma_unmap_single(dev->dev, dma_addr, size, dir);
462 return; 473 return;
463 default: 474 default:
464 __ssb_dma_not_implemented(dev); 475 break;
465 } 476 }
477 __ssb_dma_not_implemented(dev);
466} 478}
467 479
468static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, 480static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev,
@@ -472,15 +484,19 @@ static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev,
472{ 484{
473 switch (dev->bus->bustype) { 485 switch (dev->bus->bustype) {
474 case SSB_BUSTYPE_PCI: 486 case SSB_BUSTYPE_PCI:
487#ifdef CONFIG_SSB_PCIHOST
475 pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, 488 pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
476 size, dir); 489 size, dir);
477 return; 490 return;
491#endif
492 break;
478 case SSB_BUSTYPE_SSB: 493 case SSB_BUSTYPE_SSB:
479 dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir); 494 dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir);
480 return; 495 return;
481 default: 496 default:
482 __ssb_dma_not_implemented(dev); 497 break;
483 } 498 }
499 __ssb_dma_not_implemented(dev);
484} 500}
485 501
486static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, 502static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev,
@@ -490,15 +506,19 @@ static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev,
490{ 506{
491 switch (dev->bus->bustype) { 507 switch (dev->bus->bustype) {
492 case SSB_BUSTYPE_PCI: 508 case SSB_BUSTYPE_PCI:
509#ifdef CONFIG_SSB_PCIHOST
493 pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, 510 pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
494 size, dir); 511 size, dir);
495 return; 512 return;
513#endif
514 break;
496 case SSB_BUSTYPE_SSB: 515 case SSB_BUSTYPE_SSB:
497 dma_sync_single_for_device(dev->dev, dma_addr, size, dir); 516 dma_sync_single_for_device(dev->dev, dma_addr, size, dir);
498 return; 517 return;
499 default: 518 default:
500 __ssb_dma_not_implemented(dev); 519 break;
501 } 520 }
521 __ssb_dma_not_implemented(dev);
502} 522}
503 523
504static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, 524static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev,
@@ -509,17 +529,21 @@ static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev,
509{ 529{
510 switch (dev->bus->bustype) { 530 switch (dev->bus->bustype) {
511 case SSB_BUSTYPE_PCI: 531 case SSB_BUSTYPE_PCI:
532#ifdef CONFIG_SSB_PCIHOST
512 /* Just sync everything. That's all the PCI API can do. */ 533 /* Just sync everything. That's all the PCI API can do. */
513 pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, 534 pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
514 offset + size, dir); 535 offset + size, dir);
515 return; 536 return;
537#endif
538 break;
516 case SSB_BUSTYPE_SSB: 539 case SSB_BUSTYPE_SSB:
517 dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset, 540 dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset,
518 size, dir); 541 size, dir);
519 return; 542 return;
520 default: 543 default:
521 __ssb_dma_not_implemented(dev); 544 break;
522 } 545 }
546 __ssb_dma_not_implemented(dev);
523} 547}
524 548
525static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, 549static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev,
@@ -530,17 +554,21 @@ static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev,
530{ 554{
531 switch (dev->bus->bustype) { 555 switch (dev->bus->bustype) {
532 case SSB_BUSTYPE_PCI: 556 case SSB_BUSTYPE_PCI:
557#ifdef CONFIG_SSB_PCIHOST
533 /* Just sync everything. That's all the PCI API can do. */ 558 /* Just sync everything. That's all the PCI API can do. */
534 pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, 559 pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
535 offset + size, dir); 560 offset + size, dir);
536 return; 561 return;
562#endif
563 break;
537 case SSB_BUSTYPE_SSB: 564 case SSB_BUSTYPE_SSB:
538 dma_sync_single_range_for_device(dev->dev, dma_addr, offset, 565 dma_sync_single_range_for_device(dev->dev, dma_addr, offset,
539 size, dir); 566 size, dir);
540 return; 567 return;
541 default: 568 default:
542 __ssb_dma_not_implemented(dev); 569 break;
543 } 570 }
571 __ssb_dma_not_implemented(dev);
544} 572}
545 573
546 574
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h
index b106fd8e0d5c..1a8cecc4f38c 100644
--- a/include/linux/stacktrace.h
+++ b/include/linux/stacktrace.h
@@ -15,9 +15,17 @@ extern void save_stack_trace_tsk(struct task_struct *tsk,
15 struct stack_trace *trace); 15 struct stack_trace *trace);
16 16
17extern void print_stack_trace(struct stack_trace *trace, int spaces); 17extern void print_stack_trace(struct stack_trace *trace, int spaces);
18
19#ifdef CONFIG_USER_STACKTRACE_SUPPORT
20extern void save_stack_trace_user(struct stack_trace *trace);
21#else
22# define save_stack_trace_user(trace) do { } while (0)
23#endif
24
18#else 25#else
19# define save_stack_trace(trace) do { } while (0) 26# define save_stack_trace(trace) do { } while (0)
20# define save_stack_trace_tsk(tsk, trace) do { } while (0) 27# define save_stack_trace_tsk(tsk, trace) do { } while (0)
28# define save_stack_trace_user(trace) do { } while (0)
21# define print_stack_trace(trace, spaces) do { } while (0) 29# define print_stack_trace(trace, spaces) do { } while (0)
22#endif 30#endif
23 31
diff --git a/include/linux/string.h b/include/linux/string.h
index 810d80df0a1d..d18fc198aa2f 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -1,7 +1,7 @@
1#ifndef _LINUX_STRING_H_ 1#ifndef _LINUX_STRING_H_
2#define _LINUX_STRING_H_ 2#define _LINUX_STRING_H_
3 3
4/* We don't want strings.h stuff being user by user stuff by accident */ 4/* We don't want strings.h stuff being used by user stuff by accident */
5 5
6#ifndef __KERNEL__ 6#ifndef __KERNEL__
7#include <string.h> 7#include <string.h>
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 6f0ee1b84a4f..c39a21040dcb 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -58,6 +58,7 @@ struct rpc_clnt {
58 struct rpc_timeout cl_timeout_default; 58 struct rpc_timeout cl_timeout_default;
59 struct rpc_program * cl_program; 59 struct rpc_program * cl_program;
60 char cl_inline_name[32]; 60 char cl_inline_name[32];
61 char *cl_principal; /* target to authenticate to */
61}; 62};
62 63
63/* 64/*
@@ -108,6 +109,7 @@ struct rpc_create_args {
108 u32 version; 109 u32 version;
109 rpc_authflavor_t authflavor; 110 rpc_authflavor_t authflavor;
110 unsigned long flags; 111 unsigned long flags;
112 char *client_name;
111}; 113};
112 114
113/* Values for "flags" field */ 115/* Values for "flags" field */
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
index 51b977a4ca20..cea764c2359f 100644
--- a/include/linux/sunrpc/rpc_pipe_fs.h
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
@@ -15,6 +15,7 @@ struct rpc_pipe_ops {
15 ssize_t (*upcall)(struct file *, struct rpc_pipe_msg *, char __user *, size_t); 15 ssize_t (*upcall)(struct file *, struct rpc_pipe_msg *, char __user *, size_t);
16 ssize_t (*downcall)(struct file *, const char __user *, size_t); 16 ssize_t (*downcall)(struct file *, const char __user *, size_t);
17 void (*release_pipe)(struct inode *); 17 void (*release_pipe)(struct inode *);
18 int (*open_pipe)(struct inode *);
18 void (*destroy_msg)(struct rpc_pipe_msg *); 19 void (*destroy_msg)(struct rpc_pipe_msg *);
19}; 20};
20 21
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 6fd7b016517f..0127daca4354 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -139,14 +139,14 @@ static inline char *__svc_print_addr(struct sockaddr *addr,
139{ 139{
140 switch (addr->sa_family) { 140 switch (addr->sa_family) {
141 case AF_INET: 141 case AF_INET:
142 snprintf(buf, len, "%u.%u.%u.%u, port=%u", 142 snprintf(buf, len, "%pI4, port=%u",
143 NIPQUAD(((struct sockaddr_in *) addr)->sin_addr), 143 &((struct sockaddr_in *)addr)->sin_addr,
144 ntohs(((struct sockaddr_in *) addr)->sin_port)); 144 ntohs(((struct sockaddr_in *) addr)->sin_port));
145 break; 145 break;
146 146
147 case AF_INET6: 147 case AF_INET6:
148 snprintf(buf, len, "%x:%x:%x:%x:%x:%x:%x:%x, port=%u", 148 snprintf(buf, len, "%pI6, port=%u",
149 NIP6(((struct sockaddr_in6 *) addr)->sin6_addr), 149 &((struct sockaddr_in6 *)addr)->sin6_addr,
150 ntohs(((struct sockaddr_in6 *) addr)->sin6_port)); 150 ntohs(((struct sockaddr_in6 *) addr)->sin6_port));
151 break; 151 break;
152 152
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h
index c9165d9771a8..ca7d725861fc 100644
--- a/include/linux/sunrpc/svcauth_gss.h
+++ b/include/linux/sunrpc/svcauth_gss.h
@@ -20,6 +20,7 @@ int gss_svc_init(void);
20void gss_svc_shutdown(void); 20void gss_svc_shutdown(void);
21int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); 21int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name);
22u32 svcauth_gss_flavor(struct auth_domain *dom); 22u32 svcauth_gss_flavor(struct auth_domain *dom);
23char *svc_gss_principal(struct svc_rqst *);
23 24
24#endif /* __KERNEL__ */ 25#endif /* __KERNEL__ */
25#endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ 26#endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index e4057d729f03..49e1eb454465 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -37,21 +37,6 @@ struct xdr_netobj {
37typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); 37typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
38 38
39/* 39/*
40 * We're still requiring the BKL in the xdr code until it's been
41 * more carefully audited, at which point this wrapper will become
42 * unnecessary.
43 */
44static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj)
45{
46 int ret;
47
48 lock_kernel();
49 ret = xdrproc(rqstp, data, obj);
50 unlock_kernel();
51 return ret;
52}
53
54/*
55 * Basic structure for transmission/reception of a client XDR message. 40 * Basic structure for transmission/reception of a client XDR message.
56 * Features a header (for a linear buffer containing RPC headers 41 * Features a header (for a linear buffer containing RPC headers
57 * and the data payload for short messages), and then an array of 42 * and the data payload for short messages), and then an array of
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 4d80a118d538..11fc71d50c1e 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -76,8 +76,7 @@ struct rpc_rqst {
76 struct list_head rq_list; 76 struct list_head rq_list;
77 77
78 __u32 * rq_buffer; /* XDR encode buffer */ 78 __u32 * rq_buffer; /* XDR encode buffer */
79 size_t rq_bufsize, 79 size_t rq_callsize,
80 rq_callsize,
81 rq_rcvsize; 80 rq_rcvsize;
82 81
83 struct xdr_buf rq_private_buf; /* The receive buffer 82 struct xdr_buf rq_private_buf; /* The receive buffer
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h
index 4de56b1d372b..54a379c9e8eb 100644
--- a/include/linux/sunrpc/xprtrdma.h
+++ b/include/linux/sunrpc/xprtrdma.h
@@ -66,9 +66,6 @@
66 66
67#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */ 67#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */
68 68
69#define RDMA_RESOLVE_TIMEOUT (5*HZ) /* TBD 5 seconds */
70#define RDMA_CONNECT_RETRY_MAX (2) /* retries if no listener backlog */
71
72/* memory registration strategies */ 69/* memory registration strategies */
73#define RPCRDMA_PERSISTENT_REGISTRATION (1) 70#define RPCRDMA_PERSISTENT_REGISTRATION (1)
74 71
@@ -78,6 +75,7 @@ enum rpcrdma_memreg {
78 RPCRDMA_MEMWINDOWS, 75 RPCRDMA_MEMWINDOWS,
79 RPCRDMA_MEMWINDOWS_ASYNC, 76 RPCRDMA_MEMWINDOWS_ASYNC,
80 RPCRDMA_MTHCAFMR, 77 RPCRDMA_MTHCAFMR,
78 RPCRDMA_FRMR,
81 RPCRDMA_ALLPHYSICAL, 79 RPCRDMA_ALLPHYSICAL,
82 RPCRDMA_LAST 80 RPCRDMA_LAST
83}; 81};
diff --git a/include/linux/swab.h b/include/linux/swab.h
index 270d5c208a89..bbed279f3b32 100644
--- a/include/linux/swab.h
+++ b/include/linux/swab.h
@@ -47,8 +47,6 @@ static inline __attribute_const__ __u16 ___swab16(__u16 val)
47{ 47{
48#ifdef __arch_swab16 48#ifdef __arch_swab16
49 return __arch_swab16(val); 49 return __arch_swab16(val);
50#elif defined(__arch_swab16p)
51 return __arch_swab16p(&val);
52#else 50#else
53 return __const_swab16(val); 51 return __const_swab16(val);
54#endif 52#endif
@@ -58,8 +56,6 @@ static inline __attribute_const__ __u32 ___swab32(__u32 val)
58{ 56{
59#ifdef __arch_swab32 57#ifdef __arch_swab32
60 return __arch_swab32(val); 58 return __arch_swab32(val);
61#elif defined(__arch_swab32p)
62 return __arch_swab32p(&val);
63#else 59#else
64 return __const_swab32(val); 60 return __const_swab32(val);
65#endif 61#endif
@@ -69,8 +65,6 @@ static inline __attribute_const__ __u64 ___swab64(__u64 val)
69{ 65{
70#ifdef __arch_swab64 66#ifdef __arch_swab64
71 return __arch_swab64(val); 67 return __arch_swab64(val);
72#elif defined(__arch_swab64p)
73 return __arch_swab64p(&val);
74#elif defined(__SWAB_64_THRU_32__) 68#elif defined(__SWAB_64_THRU_32__)
75 __u32 h = val >> 32; 69 __u32 h = val >> 32;
76 __u32 l = val & ((1ULL << 32) - 1); 70 __u32 l = val & ((1ULL << 32) - 1);
@@ -84,8 +78,6 @@ static inline __attribute_const__ __u32 ___swahw32(__u32 val)
84{ 78{
85#ifdef __arch_swahw32 79#ifdef __arch_swahw32
86 return __arch_swahw32(val); 80 return __arch_swahw32(val);
87#elif defined(__arch_swahw32p)
88 return __arch_swahw32p(&val);
89#else 81#else
90 return __const_swahw32(val); 82 return __const_swahw32(val);
91#endif 83#endif
@@ -95,8 +87,6 @@ static inline __attribute_const__ __u32 ___swahb32(__u32 val)
95{ 87{
96#ifdef __arch_swahb32 88#ifdef __arch_swahb32
97 return __arch_swahb32(val); 89 return __arch_swahb32(val);
98#elif defined(__arch_swahb32p)
99 return __arch_swahb32p(&val);
100#else 90#else
101 return __const_swahb32(val); 91 return __const_swahb32(val);
102#endif 92#endif
diff --git a/include/linux/swap.h b/include/linux/swap.h
index de40f169a4e4..a3af95b2cb6d 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -7,6 +7,7 @@
7#include <linux/list.h> 7#include <linux/list.h>
8#include <linux/memcontrol.h> 8#include <linux/memcontrol.h>
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/node.h>
10 11
11#include <asm/atomic.h> 12#include <asm/atomic.h>
12#include <asm/page.h> 13#include <asm/page.h>
@@ -171,8 +172,10 @@ extern unsigned int nr_free_pagecache_pages(void);
171 172
172 173
173/* linux/mm/swap.c */ 174/* linux/mm/swap.c */
174extern void lru_cache_add(struct page *); 175extern void __lru_cache_add(struct page *, enum lru_list lru);
175extern void lru_cache_add_active(struct page *); 176extern void lru_cache_add_lru(struct page *, enum lru_list lru);
177extern void lru_cache_add_active_or_unevictable(struct page *,
178 struct vm_area_struct *);
176extern void activate_page(struct page *); 179extern void activate_page(struct page *);
177extern void mark_page_accessed(struct page *); 180extern void mark_page_accessed(struct page *);
178extern void lru_add_drain(void); 181extern void lru_add_drain(void);
@@ -180,12 +183,38 @@ extern int lru_add_drain_all(void);
180extern void rotate_reclaimable_page(struct page *page); 183extern void rotate_reclaimable_page(struct page *page);
181extern void swap_setup(void); 184extern void swap_setup(void);
182 185
186extern void add_page_to_unevictable_list(struct page *page);
187
188/**
189 * lru_cache_add: add a page to the page lists
190 * @page: the page to add
191 */
192static inline void lru_cache_add_anon(struct page *page)
193{
194 __lru_cache_add(page, LRU_INACTIVE_ANON);
195}
196
197static inline void lru_cache_add_active_anon(struct page *page)
198{
199 __lru_cache_add(page, LRU_ACTIVE_ANON);
200}
201
202static inline void lru_cache_add_file(struct page *page)
203{
204 __lru_cache_add(page, LRU_INACTIVE_FILE);
205}
206
207static inline void lru_cache_add_active_file(struct page *page)
208{
209 __lru_cache_add(page, LRU_ACTIVE_FILE);
210}
211
183/* linux/mm/vmscan.c */ 212/* linux/mm/vmscan.c */
184extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, 213extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
185 gfp_t gfp_mask); 214 gfp_t gfp_mask);
186extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, 215extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
187 gfp_t gfp_mask); 216 gfp_t gfp_mask);
188extern int __isolate_lru_page(struct page *page, int mode); 217extern int __isolate_lru_page(struct page *page, int mode, int file);
189extern unsigned long shrink_all_memory(unsigned long nr_pages); 218extern unsigned long shrink_all_memory(unsigned long nr_pages);
190extern int vm_swappiness; 219extern int vm_swappiness;
191extern int remove_mapping(struct address_space *mapping, struct page *page); 220extern int remove_mapping(struct address_space *mapping, struct page *page);
@@ -204,6 +233,34 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
204} 233}
205#endif 234#endif
206 235
236#ifdef CONFIG_UNEVICTABLE_LRU
237extern int page_evictable(struct page *page, struct vm_area_struct *vma);
238extern void scan_mapping_unevictable_pages(struct address_space *);
239
240extern unsigned long scan_unevictable_pages;
241extern int scan_unevictable_handler(struct ctl_table *, int, struct file *,
242 void __user *, size_t *, loff_t *);
243extern int scan_unevictable_register_node(struct node *node);
244extern void scan_unevictable_unregister_node(struct node *node);
245#else
246static inline int page_evictable(struct page *page,
247 struct vm_area_struct *vma)
248{
249 return 1;
250}
251
252static inline void scan_mapping_unevictable_pages(struct address_space *mapping)
253{
254}
255
256static inline int scan_unevictable_register_node(struct node *node)
257{
258 return 0;
259}
260
261static inline void scan_unevictable_unregister_node(struct node *node) { }
262#endif
263
207extern int kswapd_run(int nid); 264extern int kswapd_run(int nid);
208 265
209#ifdef CONFIG_MMU 266#ifdef CONFIG_MMU
@@ -251,6 +308,7 @@ extern sector_t swapdev_block(int, pgoff_t);
251extern struct swap_info_struct *get_swap_info_struct(unsigned); 308extern struct swap_info_struct *get_swap_info_struct(unsigned);
252extern int can_share_swap_page(struct page *); 309extern int can_share_swap_page(struct page *);
253extern int remove_exclusive_swap_page(struct page *); 310extern int remove_exclusive_swap_page(struct page *);
311extern int remove_exclusive_swap_page_ref(struct page *);
254struct backing_dev_info; 312struct backing_dev_info;
255 313
256/* linux/mm/thrash.c */ 314/* linux/mm/thrash.c */
@@ -339,6 +397,11 @@ static inline int remove_exclusive_swap_page(struct page *p)
339 return 0; 397 return 0;
340} 398}
341 399
400static inline int remove_exclusive_swap_page_ref(struct page *page)
401{
402 return 0;
403}
404
342static inline swp_entry_t get_swap_page(void) 405static inline swp_entry_t get_swap_page(void)
343{ 406{
344 swp_entry_t entry; 407 swp_entry_t entry;
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
new file mode 100644
index 000000000000..325af1de0351
--- /dev/null
+++ b/include/linux/swiotlb.h
@@ -0,0 +1,105 @@
1#ifndef __LINUX_SWIOTLB_H
2#define __LINUX_SWIOTLB_H
3
4#include <linux/types.h>
5
6struct device;
7struct dma_attrs;
8struct scatterlist;
9
10/*
11 * Maximum allowable number of contiguous slabs to map,
12 * must be a power of 2. What is the appropriate value ?
13 * The complexity of {map,unmap}_single is linearly dependent on this value.
14 */
15#define IO_TLB_SEGSIZE 128
16
17
18/*
19 * log of the size of each IO TLB slab. The number of slabs is command line
20 * controllable.
21 */
22#define IO_TLB_SHIFT 11
23
24extern void
25swiotlb_init(void);
26
27extern void *swiotlb_alloc_boot(size_t bytes, unsigned long nslabs);
28extern void *swiotlb_alloc(unsigned order, unsigned long nslabs);
29
30extern dma_addr_t swiotlb_phys_to_bus(phys_addr_t address);
31extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address);
32
33extern int swiotlb_arch_range_needs_mapping(void *ptr, size_t size);
34
35extern void
36*swiotlb_alloc_coherent(struct device *hwdev, size_t size,
37 dma_addr_t *dma_handle, gfp_t flags);
38
39extern void
40swiotlb_free_coherent(struct device *hwdev, size_t size,
41 void *vaddr, dma_addr_t dma_handle);
42
43extern dma_addr_t
44swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir);
45
46extern void
47swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
48 size_t size, int dir);
49
50extern dma_addr_t
51swiotlb_map_single_attrs(struct device *hwdev, void *ptr, size_t size,
52 int dir, struct dma_attrs *attrs);
53
54extern void
55swiotlb_unmap_single_attrs(struct device *hwdev, dma_addr_t dev_addr,
56 size_t size, int dir, struct dma_attrs *attrs);
57
58extern int
59swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,
60 int direction);
61
62extern void
63swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
64 int direction);
65
66extern int
67swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
68 int dir, struct dma_attrs *attrs);
69
70extern void
71swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
72 int nelems, int dir, struct dma_attrs *attrs);
73
74extern void
75swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
76 size_t size, int dir);
77
78extern void
79swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
80 int nelems, int dir);
81
82extern void
83swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
84 size_t size, int dir);
85
86extern void
87swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
88 int nelems, int dir);
89
90extern void
91swiotlb_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
92 unsigned long offset, size_t size, int dir);
93
94extern void
95swiotlb_sync_single_range_for_device(struct device *hwdev, dma_addr_t dev_addr,
96 unsigned long offset, size_t size,
97 int dir);
98
99extern int
100swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr);
101
102extern int
103swiotlb_dma_supported(struct device *hwdev, u64 mask);
104
105#endif /* __LINUX_SWIOTLB_H */
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index d6ff145919ca..04fb47bfb920 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -410,8 +410,7 @@ asmlinkage long sys_getsockopt(int fd, int level, int optname,
410asmlinkage long sys_bind(int, struct sockaddr __user *, int); 410asmlinkage long sys_bind(int, struct sockaddr __user *, int);
411asmlinkage long sys_connect(int, struct sockaddr __user *, int); 411asmlinkage long sys_connect(int, struct sockaddr __user *, int);
412asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *); 412asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *);
413asmlinkage long sys_paccept(int, struct sockaddr __user *, int __user *, 413asmlinkage long sys_accept4(int, struct sockaddr __user *, int __user *, int);
414 const __user sigset_t *, size_t, int);
415asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *); 414asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
416asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *); 415asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
417asmlinkage long sys_send(int, void __user *, size_t, unsigned); 416asmlinkage long sys_send(int, void __user *, size_t, unsigned);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index d0437f36921f..39d471d1163b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -972,7 +972,7 @@ extern int sysctl_perm(struct ctl_table_root *root,
972 972
973typedef struct ctl_table ctl_table; 973typedef struct ctl_table ctl_table;
974 974
975typedef int ctl_handler (struct ctl_table *table, int __user *name, int nlen, 975typedef int ctl_handler (struct ctl_table *table,
976 void __user *oldval, size_t __user *oldlenp, 976 void __user *oldval, size_t __user *oldlenp,
977 void __user *newval, size_t newlen); 977 void __user *newval, size_t newlen);
978 978
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 37fa24152bd8..9d68fed50f11 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -21,8 +21,9 @@ struct kobject;
21struct module; 21struct module;
22 22
23/* FIXME 23/* FIXME
24 * The *owner field is no longer used, but leave around 24 * The *owner field is no longer used.
25 * until the tree gets cleaned up fully. 25 * x86 tree has been cleaned up. The owner
26 * attribute is still left for other arches.
26 */ 27 */
27struct attribute { 28struct attribute {
28 const char *name; 29 const char *name;
@@ -78,6 +79,8 @@ struct sysfs_ops {
78 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); 79 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
79}; 80};
80 81
82struct sysfs_dirent;
83
81#ifdef CONFIG_SYSFS 84#ifdef CONFIG_SYSFS
82 85
83int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), 86int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *),
@@ -117,9 +120,14 @@ int sysfs_add_file_to_group(struct kobject *kobj,
117void sysfs_remove_file_from_group(struct kobject *kobj, 120void sysfs_remove_file_from_group(struct kobject *kobj,
118 const struct attribute *attr, const char *group); 121 const struct attribute *attr, const char *group);
119 122
120void sysfs_notify(struct kobject *kobj, char *dir, char *attr); 123void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr);
121 124void sysfs_notify_dirent(struct sysfs_dirent *sd);
122extern int __must_check sysfs_init(void); 125struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
126 const unsigned char *name);
127struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd);
128void sysfs_put(struct sysfs_dirent *sd);
129void sysfs_printk_last_file(void);
130int __must_check sysfs_init(void);
123 131
124#else /* CONFIG_SYSFS */ 132#else /* CONFIG_SYSFS */
125 133
@@ -222,7 +230,24 @@ static inline void sysfs_remove_file_from_group(struct kobject *kobj,
222{ 230{
223} 231}
224 232
225static inline void sysfs_notify(struct kobject *kobj, char *dir, char *attr) 233static inline void sysfs_notify(struct kobject *kobj, const char *dir,
234 const char *attr)
235{
236}
237static inline void sysfs_notify_dirent(struct sysfs_dirent *sd)
238{
239}
240static inline
241struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd,
242 const unsigned char *name)
243{
244 return NULL;
245}
246static inline struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd)
247{
248 return NULL;
249}
250static inline void sysfs_put(struct sysfs_dirent *sd)
226{ 251{
227} 252}
228 253
@@ -231,6 +256,10 @@ static inline int __must_check sysfs_init(void)
231 return 0; 256 return 0;
232} 257}
233 258
259static inline void sysfs_printk_last_file(void)
260{
261}
262
234#endif /* CONFIG_SYSFS */ 263#endif /* CONFIG_SYSFS */
235 264
236#endif /* _SYSFS_H_ */ 265#endif /* _SYSFS_H_ */
diff --git a/include/linux/task_io_accounting.h b/include/linux/task_io_accounting.h
index 5e88afc9a2fb..bdf855c2856f 100644
--- a/include/linux/task_io_accounting.h
+++ b/include/linux/task_io_accounting.h
@@ -5,7 +5,7 @@
5 * Don't include this header file directly - it is designed to be dragged in via 5 * Don't include this header file directly - it is designed to be dragged in via
6 * sched.h. 6 * sched.h.
7 * 7 *
8 * Blame akpm@osdl.org for all this. 8 * Blame Andrew Morton for all this.
9 */ 9 */
10 10
11struct task_io_accounting { 11struct task_io_accounting {
diff --git a/include/linux/telephony.h b/include/linux/telephony.h
index 0d0cf2a1e7bc..f63afe330add 100644
--- a/include/linux/telephony.h
+++ b/include/linux/telephony.h
@@ -14,7 +14,7 @@
14 * Authors: Ed Okerson, <eokerson@quicknet.net> 14 * Authors: Ed Okerson, <eokerson@quicknet.net>
15 * Greg Herlein, <gherlein@quicknet.net> 15 * Greg Herlein, <gherlein@quicknet.net>
16 * 16 *
17 * Contributors: Alan Cox, <alan@redhat.com> 17 * Contributors: Alan Cox, <alan@lxorguk.ukuu.org.uk>
18 * David W. Erhart, <derhart@quicknet.net> 18 * David W. Erhart, <derhart@quicknet.net>
19 * 19 *
20 * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR 20 * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR
@@ -28,10 +28,6 @@
28 * ON AN "AS IS" BASIS, AND QUICKNET TECHNOLOGIES, INC. HAS NO OBLIGATION 28 * ON AN "AS IS" BASIS, AND QUICKNET TECHNOLOGIES, INC. HAS NO OBLIGATION
29 * TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 29 * TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
30 * 30 *
31 * Version: $Revision: 4.2 $
32 *
33 * $Id: telephony.h,v 4.2 2001/08/06 07:09:43 craigs Exp $
34 *
35 *****************************************************************************/ 31 *****************************************************************************/
36 32
37#ifndef TELEPHONY_H 33#ifndef TELEPHONY_H
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 38a56477f27a..e6b820f8b56b 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -38,6 +38,14 @@ struct restart_block {
38#endif 38#endif
39 u64 expires; 39 u64 expires;
40 } nanosleep; 40 } nanosleep;
41 /* For poll */
42 struct {
43 struct pollfd __user *ufds;
44 int nfds;
45 int has_timeout;
46 unsigned long tv_sec;
47 unsigned long tv_nsec;
48 } poll;
41 }; 49 };
42}; 50};
43 51
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 98921a3e1aa8..b6ec8189ac0c 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -96,9 +96,11 @@ extern cpumask_t *tick_get_broadcast_oneshot_mask(void);
96extern void tick_clock_notify(void); 96extern void tick_clock_notify(void);
97extern int tick_check_oneshot_change(int allow_nohz); 97extern int tick_check_oneshot_change(int allow_nohz);
98extern struct tick_sched *tick_get_tick_sched(int cpu); 98extern struct tick_sched *tick_get_tick_sched(int cpu);
99extern void tick_check_idle(int cpu);
99# else 100# else
100static inline void tick_clock_notify(void) { } 101static inline void tick_clock_notify(void) { }
101static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } 102static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
103static inline void tick_check_idle(int cpu) { }
102# endif 104# endif
103 105
104#else /* CONFIG_GENERIC_CLOCKEVENTS */ 106#else /* CONFIG_GENERIC_CLOCKEVENTS */
@@ -106,26 +108,23 @@ static inline void tick_init(void) { }
106static inline void tick_cancel_sched_timer(int cpu) { } 108static inline void tick_cancel_sched_timer(int cpu) { }
107static inline void tick_clock_notify(void) { } 109static inline void tick_clock_notify(void) { }
108static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } 110static inline int tick_check_oneshot_change(int allow_nohz) { return 0; }
111static inline void tick_check_idle(int cpu) { }
109#endif /* !CONFIG_GENERIC_CLOCKEVENTS */ 112#endif /* !CONFIG_GENERIC_CLOCKEVENTS */
110 113
111# ifdef CONFIG_NO_HZ 114# ifdef CONFIG_NO_HZ
112extern void tick_nohz_stop_sched_tick(int inidle); 115extern void tick_nohz_stop_sched_tick(int inidle);
113extern void tick_nohz_restart_sched_tick(void); 116extern void tick_nohz_restart_sched_tick(void);
114extern void tick_nohz_update_jiffies(void);
115extern ktime_t tick_nohz_get_sleep_length(void); 117extern ktime_t tick_nohz_get_sleep_length(void);
116extern void tick_nohz_stop_idle(int cpu);
117extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time); 118extern u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time);
118# else 119# else
119static inline void tick_nohz_stop_sched_tick(int inidle) { } 120static inline void tick_nohz_stop_sched_tick(int inidle) { }
120static inline void tick_nohz_restart_sched_tick(void) { } 121static inline void tick_nohz_restart_sched_tick(void) { }
121static inline void tick_nohz_update_jiffies(void) { }
122static inline ktime_t tick_nohz_get_sleep_length(void) 122static inline ktime_t tick_nohz_get_sleep_length(void)
123{ 123{
124 ktime_t len = { .tv64 = NSEC_PER_SEC/HZ }; 124 ktime_t len = { .tv64 = NSEC_PER_SEC/HZ };
125 125
126 return len; 126 return len;
127} 127}
128static inline void tick_nohz_stop_idle(int cpu) { }
129static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; } 128static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; }
130# endif /* !NO_HZ */ 129# endif /* !NO_HZ */
131 130
diff --git a/include/linux/time.h b/include/linux/time.h
index e15206a7e82e..ce321ac5c8f8 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -29,6 +29,8 @@ struct timezone {
29 29
30#ifdef __KERNEL__ 30#ifdef __KERNEL__
31 31
32extern struct timezone sys_tz;
33
32/* Parameters used to convert the timespec values: */ 34/* Parameters used to convert the timespec values: */
33#define MSEC_PER_SEC 1000L 35#define MSEC_PER_SEC 1000L
34#define USEC_PER_MSEC 1000L 36#define USEC_PER_MSEC 1000L
@@ -38,6 +40,8 @@ struct timezone {
38#define NSEC_PER_SEC 1000000000L 40#define NSEC_PER_SEC 1000000000L
39#define FSEC_PER_SEC 1000000000000000L 41#define FSEC_PER_SEC 1000000000000000L
40 42
43#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
44
41static inline int timespec_equal(const struct timespec *a, 45static inline int timespec_equal(const struct timespec *a,
42 const struct timespec *b) 46 const struct timespec *b)
43{ 47{
@@ -72,6 +76,8 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon,
72 const unsigned int min, const unsigned int sec); 76 const unsigned int min, const unsigned int sec);
73 77
74extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); 78extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
79extern struct timespec timespec_add_safe(const struct timespec lhs,
80 const struct timespec rhs);
75 81
76/* 82/*
77 * sub = lhs - rhs, in normalized form 83 * sub = lhs - rhs, in normalized form
@@ -117,6 +123,7 @@ extern int do_setitimer(int which, struct itimerval *value,
117extern unsigned int alarm_setitimer(unsigned int seconds); 123extern unsigned int alarm_setitimer(unsigned int seconds);
118extern int do_getitimer(int which, struct itimerval *value); 124extern int do_getitimer(int which, struct itimerval *value);
119extern void getnstimeofday(struct timespec *tv); 125extern void getnstimeofday(struct timespec *tv);
126extern void getrawmonotonic(struct timespec *ts);
120extern void getboottime(struct timespec *ts); 127extern void getboottime(struct timespec *ts);
121extern void monotonic_to_bootbased(struct timespec *ts); 128extern void monotonic_to_bootbased(struct timespec *ts);
122 129
@@ -125,6 +132,9 @@ extern int timekeeping_valid_for_hres(void);
125extern void update_wall_time(void); 132extern void update_wall_time(void);
126extern void update_xtime_cache(u64 nsec); 133extern void update_xtime_cache(u64 nsec);
127 134
135struct tms;
136extern void do_sys_times(struct tms *);
137
128/** 138/**
129 * timespec_to_ns - Convert timespec to nanoseconds 139 * timespec_to_ns - Convert timespec to nanoseconds
130 * @ts: pointer to the timespec variable to be converted 140 * @ts: pointer to the timespec variable to be converted
@@ -214,6 +224,7 @@ struct itimerval {
214#define CLOCK_MONOTONIC 1 224#define CLOCK_MONOTONIC 1
215#define CLOCK_PROCESS_CPUTIME_ID 2 225#define CLOCK_PROCESS_CPUTIME_ID 2
216#define CLOCK_THREAD_CPUTIME_ID 3 226#define CLOCK_THREAD_CPUTIME_ID 3
227#define CLOCK_MONOTONIC_RAW 4
217 228
218/* 229/*
219 * The IDs of various hardware clocks: 230 * The IDs of various hardware clocks:
diff --git a/include/linux/timer.h b/include/linux/timer.h
index d4ba79248a27..daf9685b861c 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -186,4 +186,9 @@ unsigned long __round_jiffies_relative(unsigned long j, int cpu);
186unsigned long round_jiffies(unsigned long j); 186unsigned long round_jiffies(unsigned long j);
187unsigned long round_jiffies_relative(unsigned long j); 187unsigned long round_jiffies_relative(unsigned long j);
188 188
189unsigned long __round_jiffies_up(unsigned long j, int cpu);
190unsigned long __round_jiffies_up_relative(unsigned long j, int cpu);
191unsigned long round_jiffies_up(unsigned long j);
192unsigned long round_jiffies_up_relative(unsigned long j);
193
189#endif 194#endif
diff --git a/include/linux/timex.h b/include/linux/timex.h
index fc6035d29d56..998a55d80acf 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -53,47 +53,11 @@
53#ifndef _LINUX_TIMEX_H 53#ifndef _LINUX_TIMEX_H
54#define _LINUX_TIMEX_H 54#define _LINUX_TIMEX_H
55 55
56#include <linux/compiler.h>
57#include <linux/time.h> 56#include <linux/time.h>
58 57
59#include <asm/param.h>
60
61#define NTP_API 4 /* NTP API version */ 58#define NTP_API 4 /* NTP API version */
62 59
63/* 60/*
64 * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
65 * for a slightly underdamped convergence characteristic. SHIFT_KH
66 * establishes the damping of the FLL and is chosen by wisdom and black
67 * art.
68 *
69 * MAXTC establishes the maximum time constant of the PLL. With the
70 * SHIFT_KG and SHIFT_KF values given and a time constant range from
71 * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours,
72 * respectively.
73 */
74#define SHIFT_PLL 4 /* PLL frequency factor (shift) */
75#define SHIFT_FLL 2 /* FLL frequency factor (shift) */
76#define MAXTC 10 /* maximum time constant (shift) */
77
78/*
79 * SHIFT_USEC defines the scaling (shift) of the time_freq and
80 * time_tolerance variables, which represent the current frequency
81 * offset and maximum frequency tolerance.
82 */
83#define SHIFT_USEC 16 /* frequency offset scale (shift) */
84#define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
85#define PPM_SCALE_INV_SHIFT 20
86#define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \
87 PPM_SCALE + 1)
88
89#define MAXPHASE 500000000l /* max phase error (ns) */
90#define MAXFREQ 500000 /* max frequency error (ns/s) */
91#define MAXFREQ_SCALED ((s64)MAXFREQ << NTP_SCALE_SHIFT)
92#define MINSEC 256 /* min interval between updates (s) */
93#define MAXSEC 2048 /* max interval between updates (s) */
94#define NTP_PHASE_LIMIT ((MAXPHASE / NSEC_PER_USEC) << 5) /* beyond max. dispersion */
95
96/*
97 * syscall interface - used (mainly by NTP daemon) 61 * syscall interface - used (mainly by NTP daemon)
98 * to discipline kernel clock oscillator 62 * to discipline kernel clock oscillator
99 */ 63 */
@@ -141,8 +105,15 @@ struct timex {
141#define ADJ_MICRO 0x1000 /* select microsecond resolution */ 105#define ADJ_MICRO 0x1000 /* select microsecond resolution */
142#define ADJ_NANO 0x2000 /* select nanosecond resolution */ 106#define ADJ_NANO 0x2000 /* select nanosecond resolution */
143#define ADJ_TICK 0x4000 /* tick value */ 107#define ADJ_TICK 0x4000 /* tick value */
108
109#ifdef __KERNEL__
110#define ADJ_ADJTIME 0x8000 /* switch between adjtime/adjtimex modes */
111#define ADJ_OFFSET_SINGLESHOT 0x0001 /* old-fashioned adjtime */
112#define ADJ_OFFSET_READONLY 0x2000 /* read-only adjtime */
113#else
144#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ 114#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
145#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ 115#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
116#endif
146 117
147/* xntp 3.4 compatibility names */ 118/* xntp 3.4 compatibility names */
148#define MOD_OFFSET ADJ_OFFSET 119#define MOD_OFFSET ADJ_OFFSET
@@ -192,9 +163,46 @@ struct timex {
192#define TIME_BAD TIME_ERROR /* bw compat */ 163#define TIME_BAD TIME_ERROR /* bw compat */
193 164
194#ifdef __KERNEL__ 165#ifdef __KERNEL__
166#include <linux/compiler.h>
167#include <linux/types.h>
168#include <linux/param.h>
169
195#include <asm/timex.h> 170#include <asm/timex.h>
196 171
197/* 172/*
173 * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
174 * for a slightly underdamped convergence characteristic. SHIFT_KH
175 * establishes the damping of the FLL and is chosen by wisdom and black
176 * art.
177 *
178 * MAXTC establishes the maximum time constant of the PLL. With the
179 * SHIFT_KG and SHIFT_KF values given and a time constant range from
180 * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours,
181 * respectively.
182 */
183#define SHIFT_PLL 4 /* PLL frequency factor (shift) */
184#define SHIFT_FLL 2 /* FLL frequency factor (shift) */
185#define MAXTC 10 /* maximum time constant (shift) */
186
187/*
188 * SHIFT_USEC defines the scaling (shift) of the time_freq and
189 * time_tolerance variables, which represent the current frequency
190 * offset and maximum frequency tolerance.
191 */
192#define SHIFT_USEC 16 /* frequency offset scale (shift) */
193#define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
194#define PPM_SCALE_INV_SHIFT 19
195#define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \
196 PPM_SCALE + 1)
197
198#define MAXPHASE 500000000l /* max phase error (ns) */
199#define MAXFREQ 500000 /* max frequency error (ns/s) */
200#define MAXFREQ_SCALED ((s64)MAXFREQ << NTP_SCALE_SHIFT)
201#define MINSEC 256 /* min interval between updates (s) */
202#define MAXSEC 2048 /* max interval between updates (s) */
203#define NTP_PHASE_LIMIT ((MAXPHASE / NSEC_PER_USEC) << 5) /* beyond max. dispersion */
204
205/*
198 * kernel variables 206 * kernel variables
199 * Note: maximum error = NTP synch distance = dispersion + delay / 2; 207 * Note: maximum error = NTP synch distance = dispersion + delay / 2;
200 * estimated error = NTP dispersion. 208 * estimated error = NTP dispersion.
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 2158fc0d5a56..0c5b5ac36d8e 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -49,7 +49,7 @@
49 for_each_online_node(node) \ 49 for_each_online_node(node) \
50 if (nr_cpus_node(node)) 50 if (nr_cpus_node(node))
51 51
52void arch_update_cpu_topology(void); 52int arch_update_cpu_topology(void);
53 53
54/* Conform to ACPI 2.0 SLIT distance definitions */ 54/* Conform to ACPI 2.0 SLIT distance definitions */
55#define LOCAL_DISTANCE 10 55#define LOCAL_DISTANCE 10
@@ -99,7 +99,7 @@ void arch_update_cpu_topology(void);
99 | SD_BALANCE_FORK \ 99 | SD_BALANCE_FORK \
100 | SD_BALANCE_EXEC \ 100 | SD_BALANCE_EXEC \
101 | SD_WAKE_AFFINE \ 101 | SD_WAKE_AFFINE \
102 | SD_WAKE_IDLE \ 102 | SD_WAKE_BALANCE \
103 | SD_SHARE_CPUPOWER, \ 103 | SD_SHARE_CPUPOWER, \
104 .last_balance = jiffies, \ 104 .last_balance = jiffies, \
105 .balance_interval = 1, \ 105 .balance_interval = 1, \
@@ -120,10 +120,10 @@ void arch_update_cpu_topology(void);
120 .wake_idx = 1, \ 120 .wake_idx = 1, \
121 .forkexec_idx = 1, \ 121 .forkexec_idx = 1, \
122 .flags = SD_LOAD_BALANCE \ 122 .flags = SD_LOAD_BALANCE \
123 | SD_BALANCE_NEWIDLE \
124 | SD_BALANCE_FORK \ 123 | SD_BALANCE_FORK \
125 | SD_BALANCE_EXEC \ 124 | SD_BALANCE_EXEC \
126 | SD_WAKE_AFFINE \ 125 | SD_WAKE_AFFINE \
126 | SD_WAKE_BALANCE \
127 | SD_SHARE_PKG_RESOURCES\ 127 | SD_SHARE_PKG_RESOURCES\
128 | BALANCE_FOR_MC_POWER, \ 128 | BALANCE_FOR_MC_POWER, \
129 .last_balance = jiffies, \ 129 .last_balance = jiffies, \
@@ -146,10 +146,10 @@ void arch_update_cpu_topology(void);
146 .wake_idx = 1, \ 146 .wake_idx = 1, \
147 .forkexec_idx = 1, \ 147 .forkexec_idx = 1, \
148 .flags = SD_LOAD_BALANCE \ 148 .flags = SD_LOAD_BALANCE \
149 | SD_BALANCE_NEWIDLE \
150 | SD_BALANCE_FORK \
151 | SD_BALANCE_EXEC \ 149 | SD_BALANCE_EXEC \
150 | SD_BALANCE_FORK \
152 | SD_WAKE_AFFINE \ 151 | SD_WAKE_AFFINE \
152 | SD_WAKE_BALANCE \
153 | BALANCE_FOR_PKG_POWER,\ 153 | BALANCE_FOR_PKG_POWER,\
154 .last_balance = jiffies, \ 154 .last_balance = jiffies, \
155 .balance_interval = 1, \ 155 .balance_interval = 1, \
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
new file mode 100644
index 000000000000..757005458366
--- /dev/null
+++ b/include/linux/tracepoint.h
@@ -0,0 +1,156 @@
1#ifndef _LINUX_TRACEPOINT_H
2#define _LINUX_TRACEPOINT_H
3
4/*
5 * Kernel Tracepoint API.
6 *
7 * See Documentation/tracepoint.txt.
8 *
9 * (C) Copyright 2008 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
10 *
11 * Heavily inspired from the Linux Kernel Markers.
12 *
13 * This file is released under the GPLv2.
14 * See the file COPYING for more details.
15 */
16
17#include <linux/types.h>
18#include <linux/rcupdate.h>
19
20struct module;
21struct tracepoint;
22
23struct tracepoint {
24 const char *name; /* Tracepoint name */
25 int state; /* State. */
26 void **funcs;
27} __attribute__((aligned(32))); /*
28 * Aligned on 32 bytes because it is
29 * globally visible and gcc happily
30 * align these on the structure size.
31 * Keep in sync with vmlinux.lds.h.
32 */
33
34#define TPPROTO(args...) args
35#define TPARGS(args...) args
36
37#ifdef CONFIG_TRACEPOINTS
38
39/*
40 * it_func[0] is never NULL because there is at least one element in the array
41 * when the array itself is non NULL.
42 */
43#define __DO_TRACE(tp, proto, args) \
44 do { \
45 void **it_func; \
46 \
47 rcu_read_lock_sched_notrace(); \
48 it_func = rcu_dereference((tp)->funcs); \
49 if (it_func) { \
50 do { \
51 ((void(*)(proto))(*it_func))(args); \
52 } while (*(++it_func)); \
53 } \
54 rcu_read_unlock_sched_notrace(); \
55 } while (0)
56
57/*
58 * Make sure the alignment of the structure in the __tracepoints section will
59 * not add unwanted padding between the beginning of the section and the
60 * structure. Force alignment to the same alignment as the section start.
61 */
62#define DECLARE_TRACE(name, proto, args) \
63 extern struct tracepoint __tracepoint_##name; \
64 static inline void trace_##name(proto) \
65 { \
66 if (unlikely(__tracepoint_##name.state)) \
67 __DO_TRACE(&__tracepoint_##name, \
68 TPPROTO(proto), TPARGS(args)); \
69 } \
70 static inline int register_trace_##name(void (*probe)(proto)) \
71 { \
72 return tracepoint_probe_register(#name, (void *)probe); \
73 } \
74 static inline int unregister_trace_##name(void (*probe)(proto)) \
75 { \
76 return tracepoint_probe_unregister(#name, (void *)probe);\
77 }
78
79#define DEFINE_TRACE(name) \
80 static const char __tpstrtab_##name[] \
81 __attribute__((section("__tracepoints_strings"))) = #name; \
82 struct tracepoint __tracepoint_##name \
83 __attribute__((section("__tracepoints"), aligned(32))) = \
84 { __tpstrtab_##name, 0, NULL }
85
86#define EXPORT_TRACEPOINT_SYMBOL_GPL(name) \
87 EXPORT_SYMBOL_GPL(__tracepoint_##name)
88#define EXPORT_TRACEPOINT_SYMBOL(name) \
89 EXPORT_SYMBOL(__tracepoint_##name)
90
91extern void tracepoint_update_probe_range(struct tracepoint *begin,
92 struct tracepoint *end);
93
94#else /* !CONFIG_TRACEPOINTS */
95#define DECLARE_TRACE(name, proto, args) \
96 static inline void _do_trace_##name(struct tracepoint *tp, proto) \
97 { } \
98 static inline void trace_##name(proto) \
99 { } \
100 static inline int register_trace_##name(void (*probe)(proto)) \
101 { \
102 return -ENOSYS; \
103 } \
104 static inline int unregister_trace_##name(void (*probe)(proto)) \
105 { \
106 return -ENOSYS; \
107 }
108
109#define DEFINE_TRACE(name)
110#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
111#define EXPORT_TRACEPOINT_SYMBOL(name)
112
113static inline void tracepoint_update_probe_range(struct tracepoint *begin,
114 struct tracepoint *end)
115{ }
116#endif /* CONFIG_TRACEPOINTS */
117
118/*
119 * Connect a probe to a tracepoint.
120 * Internal API, should not be used directly.
121 */
122extern int tracepoint_probe_register(const char *name, void *probe);
123
124/*
125 * Disconnect a probe from a tracepoint.
126 * Internal API, should not be used directly.
127 */
128extern int tracepoint_probe_unregister(const char *name, void *probe);
129
130extern int tracepoint_probe_register_noupdate(const char *name, void *probe);
131extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe);
132extern void tracepoint_probe_update_all(void);
133
134struct tracepoint_iter {
135 struct module *module;
136 struct tracepoint *tracepoint;
137};
138
139extern void tracepoint_iter_start(struct tracepoint_iter *iter);
140extern void tracepoint_iter_next(struct tracepoint_iter *iter);
141extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
142extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
143extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,
144 struct tracepoint *begin, struct tracepoint *end);
145
146/*
147 * tracepoint_synchronize_unregister must be called between the last tracepoint
148 * probe unregistration and the end of module exit to make sure there is no
149 * caller executing a probe when it is freed.
150 */
151static inline void tracepoint_synchronize_unregister(void)
152{
153 synchronize_sched();
154}
155
156#endif
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 3b8121d4e36f..3f4954c55e53 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -325,7 +325,7 @@ extern struct class *tty_class;
325 * go away 325 * go away
326 */ 326 */
327 327
328extern inline struct tty_struct *tty_kref_get(struct tty_struct *tty) 328static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
329{ 329{
330 if (tty) 330 if (tty)
331 kref_get(&tty->kref); 331 kref_get(&tty->kref);
@@ -442,6 +442,7 @@ extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data,
442 size_t size); 442 size_t size);
443extern void tty_audit_exit(void); 443extern void tty_audit_exit(void);
444extern void tty_audit_fork(struct signal_struct *sig); 444extern void tty_audit_fork(struct signal_struct *sig);
445extern void tty_audit_tiocsti(struct tty_struct *tty, char ch);
445extern void tty_audit_push(struct tty_struct *tty); 446extern void tty_audit_push(struct tty_struct *tty);
446extern void tty_audit_push_task(struct task_struct *tsk, 447extern void tty_audit_push_task(struct task_struct *tsk,
447 uid_t loginuid, u32 sessionid); 448 uid_t loginuid, u32 sessionid);
@@ -450,6 +451,9 @@ static inline void tty_audit_add_data(struct tty_struct *tty,
450 unsigned char *data, size_t size) 451 unsigned char *data, size_t size)
451{ 452{
452} 453}
454static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch)
455{
456}
453static inline void tty_audit_exit(void) 457static inline void tty_audit_exit(void)
454{ 458{
455} 459}
diff --git a/include/linux/types.h b/include/linux/types.h
index d4a9ce6e2760..121f349cb7ec 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -135,19 +135,14 @@ typedef __s64 int64_t;
135 * 135 *
136 * Linux always considers sectors to be 512 bytes long independently 136 * Linux always considers sectors to be 512 bytes long independently
137 * of the devices real block size. 137 * of the devices real block size.
138 *
139 * blkcnt_t is the type of the inode's block count.
138 */ 140 */
139#ifdef CONFIG_LBD 141#ifdef CONFIG_LBD
140typedef u64 sector_t; 142typedef u64 sector_t;
141#else
142typedef unsigned long sector_t;
143#endif
144
145/*
146 * The type of the inode's block count.
147 */
148#ifdef CONFIG_LSF
149typedef u64 blkcnt_t; 143typedef u64 blkcnt_t;
150#else 144#else
145typedef unsigned long sector_t;
151typedef unsigned long blkcnt_t; 146typedef unsigned long blkcnt_t;
152#endif 147#endif
153 148
@@ -190,13 +185,16 @@ typedef __u32 __bitwise __wsum;
190 185
191#ifdef __KERNEL__ 186#ifdef __KERNEL__
192typedef unsigned __bitwise__ gfp_t; 187typedef unsigned __bitwise__ gfp_t;
188typedef unsigned __bitwise__ fmode_t;
193 189
194#ifdef CONFIG_RESOURCES_64BIT 190#ifdef CONFIG_PHYS_ADDR_T_64BIT
195typedef u64 resource_size_t; 191typedef u64 phys_addr_t;
196#else 192#else
197typedef u32 resource_size_t; 193typedef u32 phys_addr_t;
198#endif 194#endif
199 195
196typedef phys_addr_t resource_size_t;
197
200struct ustat { 198struct ustat {
201 __kernel_daddr_t f_tfree; 199 __kernel_daddr_t f_tfree;
202 __kernel_ino_t f_tinode; 200 __kernel_ino_t f_tinode;
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index fec6decfb983..6b58367d145e 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -78,7 +78,7 @@ static inline unsigned long __copy_from_user_nocache(void *to,
78 \ 78 \
79 set_fs(KERNEL_DS); \ 79 set_fs(KERNEL_DS); \
80 pagefault_disable(); \ 80 pagefault_disable(); \
81 ret = __get_user(retval, (__force typeof(retval) __user *)(addr)); \ 81 ret = __copy_from_user_inatomic(&(retval), (__force typeof(retval) __user *)(addr), sizeof(retval)); \
82 pagefault_enable(); \ 82 pagefault_enable(); \
83 set_fs(old_fs); \ 83 set_fs(old_fs); \
84 ret; \ 84 ret; \
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 94ac74aba6b6..f72aa51f7bcd 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -108,6 +108,7 @@ enum usb_interface_condition {
108 * (in probe()), bound to a driver, or unbinding (in disconnect()) 108 * (in probe()), bound to a driver, or unbinding (in disconnect())
109 * @is_active: flag set when the interface is bound and not suspended. 109 * @is_active: flag set when the interface is bound and not suspended.
110 * @sysfs_files_created: sysfs attributes exist 110 * @sysfs_files_created: sysfs attributes exist
111 * @unregistering: flag set when the interface is being unregistered
111 * @needs_remote_wakeup: flag set when the driver requires remote-wakeup 112 * @needs_remote_wakeup: flag set when the driver requires remote-wakeup
112 * capability during autosuspend. 113 * capability during autosuspend.
113 * @needs_altsetting0: flag set when a set-interface request for altsetting 0 114 * @needs_altsetting0: flag set when a set-interface request for altsetting 0
@@ -163,6 +164,7 @@ struct usb_interface {
163 enum usb_interface_condition condition; /* state of binding */ 164 enum usb_interface_condition condition; /* state of binding */
164 unsigned is_active:1; /* the interface is not suspended */ 165 unsigned is_active:1; /* the interface is not suspended */
165 unsigned sysfs_files_created:1; /* the sysfs attributes exist */ 166 unsigned sysfs_files_created:1; /* the sysfs attributes exist */
167 unsigned unregistering:1; /* unregistration is in progress */
166 unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ 168 unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */
167 unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ 169 unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */
168 unsigned needs_binding:1; /* needs delayed unbind/rebind */ 170 unsigned needs_binding:1; /* needs delayed unbind/rebind */
@@ -1135,6 +1137,7 @@ struct usb_anchor {
1135 struct list_head urb_list; 1137 struct list_head urb_list;
1136 wait_queue_head_t wait; 1138 wait_queue_head_t wait;
1137 spinlock_t lock; 1139 spinlock_t lock;
1140 unsigned int poisoned:1;
1138}; 1141};
1139 1142
1140static inline void init_usb_anchor(struct usb_anchor *anchor) 1143static inline void init_usb_anchor(struct usb_anchor *anchor)
@@ -1459,12 +1462,18 @@ extern struct urb *usb_get_urb(struct urb *urb);
1459extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags); 1462extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags);
1460extern int usb_unlink_urb(struct urb *urb); 1463extern int usb_unlink_urb(struct urb *urb);
1461extern void usb_kill_urb(struct urb *urb); 1464extern void usb_kill_urb(struct urb *urb);
1465extern void usb_poison_urb(struct urb *urb);
1466extern void usb_unpoison_urb(struct urb *urb);
1462extern void usb_kill_anchored_urbs(struct usb_anchor *anchor); 1467extern void usb_kill_anchored_urbs(struct usb_anchor *anchor);
1468extern void usb_poison_anchored_urbs(struct usb_anchor *anchor);
1463extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor); 1469extern void usb_unlink_anchored_urbs(struct usb_anchor *anchor);
1464extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); 1470extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor);
1465extern void usb_unanchor_urb(struct urb *urb); 1471extern void usb_unanchor_urb(struct urb *urb);
1466extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor, 1472extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor,
1467 unsigned int timeout); 1473 unsigned int timeout);
1474extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor);
1475extern void usb_scuttle_anchored_urbs(struct usb_anchor *anchor);
1476extern int usb_anchor_empty(struct usb_anchor *anchor);
1468 1477
1469/** 1478/**
1470 * usb_urb_dir_in - check if an URB describes an IN transfer 1479 * usb_urb_dir_in - check if an URB describes an IN transfer
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild
index 42e84fc315e3..54c446309a2a 100644
--- a/include/linux/usb/Kbuild
+++ b/include/linux/usb/Kbuild
@@ -4,4 +4,5 @@ header-y += ch9.h
4header-y += gadgetfs.h 4header-y += gadgetfs.h
5header-y += midi.h 5header-y += midi.h
6header-y += g_printer.h 6header-y += g_printer.h
7 7header-y += tmc.h
8header-y += vstusb.h
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index ca228bb94218..18a729343ffa 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -160,6 +160,15 @@ struct usb_cdc_mdlm_detail_desc {
160 __u8 bDetailData[0]; 160 __u8 bDetailData[0];
161} __attribute__ ((packed)); 161} __attribute__ ((packed));
162 162
163/* "OBEX Control Model Functional Descriptor" */
164struct usb_cdc_obex_desc {
165 __u8 bLength;
166 __u8 bDescriptorType;
167 __u8 bDescriptorSubType;
168
169 __le16 bcdVersion;
170} __attribute__ ((packed));
171
163/*-------------------------------------------------------------------------*/ 172/*-------------------------------------------------------------------------*/
164 173
165/* 174/*
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index 73a2f4eb1f7a..9b42baed3900 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -158,8 +158,12 @@ struct usb_ctrlrequest {
158 * (rarely) accepted by SET_DESCRIPTOR. 158 * (rarely) accepted by SET_DESCRIPTOR.
159 * 159 *
160 * Note that all multi-byte values here are encoded in little endian 160 * Note that all multi-byte values here are encoded in little endian
161 * byte order "on the wire". But when exposed through Linux-USB APIs, 161 * byte order "on the wire". Within the kernel and when exposed
162 * they've been converted to cpu byte order. 162 * through the Linux-USB APIs, they are not converted to cpu byte
163 * order; it is the responsibility of the client code to do this.
164 * The single exception is when device and configuration descriptors (but
165 * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
166 * in this case the fields are converted to host endianness by the kernel.
163 */ 167 */
164 168
165/* 169/*
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index c932390c6da0..935c380ffe47 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -130,6 +130,9 @@ struct usb_function {
130 130
131int usb_add_function(struct usb_configuration *, struct usb_function *); 131int usb_add_function(struct usb_configuration *, struct usb_function *);
132 132
133int usb_function_deactivate(struct usb_function *);
134int usb_function_activate(struct usb_function *);
135
133int usb_interface_id(struct usb_configuration *, struct usb_function *); 136int usb_interface_id(struct usb_configuration *, struct usb_function *);
134 137
135/** 138/**
@@ -316,9 +319,13 @@ struct usb_composite_dev {
316 struct usb_composite_driver *driver; 319 struct usb_composite_driver *driver;
317 u8 next_string_id; 320 u8 next_string_id;
318 321
319 spinlock_t lock; 322 /* the gadget driver won't enable the data pullup
323 * while the deactivation count is nonzero.
324 */
325 unsigned deactivations;
320 326
321 /* REVISIT use and existence of lock ... */ 327 /* protects at least deactivation count */
328 spinlock_t lock;
322}; 329};
323 330
324extern int usb_string_id(struct usb_composite_dev *c); 331extern int usb_string_id(struct usb_composite_dev *c);
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 655341d0f534..0b8617a9176d 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -192,7 +192,7 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data)
192 * The driver.owner field should be set to the module owner of this driver. 192 * The driver.owner field should be set to the module owner of this driver.
193 * The driver.name field should be set to the name of this driver (remember 193 * The driver.name field should be set to the name of this driver (remember
194 * it will show up in sysfs, so it needs to be short and to the point. 194 * it will show up in sysfs, so it needs to be short and to the point.
195 * Useing the module name is a good idea.) 195 * Using the module name is a good idea.)
196 */ 196 */
197struct usb_serial_driver { 197struct usb_serial_driver {
198 const char *description; 198 const char *description;
diff --git a/include/linux/usb/tmc.h b/include/linux/usb/tmc.h
new file mode 100644
index 000000000000..c045ae12556c
--- /dev/null
+++ b/include/linux/usb/tmc.h
@@ -0,0 +1,43 @@
1/*
2 * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
3 * Copyright (C) 2008 Novell, Inc.
4 * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
5 *
6 * This file holds USB constants defined by the USB Device Class
7 * Definition for Test and Measurement devices published by the USB-IF.
8 *
9 * It also has the ioctl definitions for the usbtmc kernel driver that
10 * userspace needs to know about.
11 */
12
13#ifndef __LINUX_USB_TMC_H
14#define __LINUX_USB_TMC_H
15
16/* USB TMC status values */
17#define USBTMC_STATUS_SUCCESS 0x01
18#define USBTMC_STATUS_PENDING 0x02
19#define USBTMC_STATUS_FAILED 0x80
20#define USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS 0x81
21#define USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS 0x82
22#define USBTMC_STATUS_SPLIT_IN_PROGRESS 0x83
23
24/* USB TMC requests values */
25#define USBTMC_REQUEST_INITIATE_ABORT_BULK_OUT 1
26#define USBTMC_REQUEST_CHECK_ABORT_BULK_OUT_STATUS 2
27#define USBTMC_REQUEST_INITIATE_ABORT_BULK_IN 3
28#define USBTMC_REQUEST_CHECK_ABORT_BULK_IN_STATUS 4
29#define USBTMC_REQUEST_INITIATE_CLEAR 5
30#define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6
31#define USBTMC_REQUEST_GET_CAPABILITIES 7
32#define USBTMC_REQUEST_INDICATOR_PULSE 64
33
34/* Request values for USBTMC driver's ioctl entry point */
35#define USBTMC_IOC_NR 91
36#define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
37#define USBTMC_IOCTL_CLEAR _IO(USBTMC_IOC_NR, 2)
38#define USBTMC_IOCTL_ABORT_BULK_OUT _IO(USBTMC_IOC_NR, 3)
39#define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
40#define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
41#define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)
42
43#endif
diff --git a/include/linux/usb/vstusb.h b/include/linux/usb/vstusb.h
new file mode 100644
index 000000000000..1cfac67191ff
--- /dev/null
+++ b/include/linux/usb/vstusb.h
@@ -0,0 +1,71 @@
1/*****************************************************************************
2 * File: drivers/usb/misc/vstusb.h
3 *
4 * Purpose: Support for the bulk USB Vernier Spectrophotometers
5 *
6 * Author: EQware Engineering, Inc.
7 * Oregon City, OR, USA 97045
8 *
9 * Copyright: 2007, 2008
10 * Vernier Software & Technology
11 * Beaverton, OR, USA 97005
12 *
13 * Web: www.vernier.com
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation.
18 *
19 *****************************************************************************/
20/*****************************************************************************
21 *
22 * The vstusb module is a standard usb 'client' driver running on top of the
23 * standard usb host controller stack.
24 *
25 * In general, vstusb supports standard bulk usb pipes. It supports multiple
26 * devices and multiple pipes per device.
27 *
28 * The vstusb driver supports two interfaces:
29 * 1 - ioctl SEND_PIPE/RECV_PIPE - a general bulk write/read msg
30 * interface to any pipe with timeout support;
31 * 2 - standard read/write with ioctl config - offers standard read/write
32 * interface with ioctl configured pipes and timeouts.
33 *
34 * Both interfaces can be signal from other process and will abort its i/o
35 * operation.
36 *
37 * A timeout of 0 means NO timeout. The user can still terminate the read via
38 * signal.
39 *
40 * If using multiple threads with this driver, the user should ensure that
41 * any reads, writes, or ioctls are complete before closing the device.
42 * Changing read/write timeouts or pipes takes effect on next read/write.
43 *
44 *****************************************************************************/
45
46struct vstusb_args {
47 union {
48 /* this struct is used for IOCTL_VSTUSB_SEND_PIPE, *
49 * IOCTL_VSTUSB_RECV_PIPE, and read()/write() fops */
50 struct {
51 void __user *buffer;
52 size_t count;
53 unsigned int timeout_ms;
54 int pipe;
55 };
56
57 /* this one is used for IOCTL_VSTUSB_CONFIG_RW */
58 struct {
59 int rd_pipe;
60 int rd_timeout_ms;
61 int wr_pipe;
62 int wr_timeout_ms;
63 };
64 };
65};
66
67#define VST_IOC_MAGIC 'L'
68#define VST_IOC_FIRST 0x20
69#define IOCTL_VSTUSB_SEND_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST)
70#define IOCTL_VSTUSB_RECV_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 1)
71#define IOCTL_VSTUSB_CONFIG_RW _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 2)
diff --git a/include/linux/usb/wusb-wa.h b/include/linux/usb/wusb-wa.h
new file mode 100644
index 000000000000..a102561e7026
--- /dev/null
+++ b/include/linux/usb/wusb-wa.h
@@ -0,0 +1,271 @@
1/*
2 * Wireless USB Wire Adapter constants and structures.
3 *
4 * Copyright (C) 2005-2006 Intel Corporation.
5 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version
9 * 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301, USA.
20 *
21 *
22 * FIXME: docs
23 * FIXME: organize properly, group logically
24 *
25 * All the event structures are defined in uwb/spec.h, as they are
26 * common to the WHCI and WUSB radio control interfaces.
27 *
28 * References:
29 * [WUSB] Wireless Universal Serial Bus Specification, revision 1.0, ch8
30 */
31#ifndef __LINUX_USB_WUSB_WA_H
32#define __LINUX_USB_WUSB_WA_H
33
34/**
35 * Radio Command Request for the Radio Control Interface
36 *
37 * Radio Control Interface command and event codes are the same as
38 * WHCI, and listed in include/linux/uwb.h:UWB_RC_{CMD,EVT}_*
39 */
40enum {
41 WA_EXEC_RC_CMD = 40, /* Radio Control command Request */
42};
43
44/* Wireless Adapter Requests ([WUSB] table 8-51) */
45enum {
46 WUSB_REQ_ADD_MMC_IE = 20,
47 WUSB_REQ_REMOVE_MMC_IE = 21,
48 WUSB_REQ_SET_NUM_DNTS = 22,
49 WUSB_REQ_SET_CLUSTER_ID = 23,
50 WUSB_REQ_SET_DEV_INFO = 24,
51 WUSB_REQ_GET_TIME = 25,
52 WUSB_REQ_SET_STREAM_IDX = 26,
53 WUSB_REQ_SET_WUSB_MAS = 27,
54};
55
56
57/* Wireless Adapter WUSB Channel Time types ([WUSB] table 8-52) */
58enum {
59 WUSB_TIME_ADJ = 0,
60 WUSB_TIME_BPST = 1,
61 WUSB_TIME_WUSB = 2,
62};
63
64enum {
65 WA_ENABLE = 0x01,
66 WA_RESET = 0x02,
67 RPIPE_PAUSE = 0x1,
68};
69
70/* Responses from Get Status request ([WUSB] section 8.3.1.6) */
71enum {
72 WA_STATUS_ENABLED = 0x01,
73 WA_STATUS_RESETTING = 0x02
74};
75
76enum rpipe_crs {
77 RPIPE_CRS_CTL = 0x01,
78 RPIPE_CRS_ISO = 0x02,
79 RPIPE_CRS_BULK = 0x04,
80 RPIPE_CRS_INTR = 0x08
81};
82
83/**
84 * RPipe descriptor ([WUSB] section 8.5.2.11)
85 *
86 * FIXME: explain rpipes
87 */
88struct usb_rpipe_descriptor {
89 u8 bLength;
90 u8 bDescriptorType;
91 __le16 wRPipeIndex;
92 __le16 wRequests;
93 __le16 wBlocks; /* rw if 0 */
94 __le16 wMaxPacketSize; /* rw? */
95 u8 bHSHubAddress; /* reserved: 0 */
96 u8 bHSHubPort; /* ??? FIXME ??? */
97 u8 bSpeed; /* rw: xfer rate 'enum uwb_phy_rate' */
98 u8 bDeviceAddress; /* rw: Target device address */
99 u8 bEndpointAddress; /* rw: Target EP address */
100 u8 bDataSequence; /* ro: Current Data sequence */
101 __le32 dwCurrentWindow; /* ro */
102 u8 bMaxDataSequence; /* ro?: max supported seq */
103 u8 bInterval; /* rw: */
104 u8 bOverTheAirInterval; /* rw: */
105 u8 bmAttribute; /* ro? */
106 u8 bmCharacteristics; /* ro? enum rpipe_attr, supported xsactions */
107 u8 bmRetryOptions; /* rw? */
108 __le16 wNumTransactionErrors; /* rw */
109} __attribute__ ((packed));
110
111/**
112 * Wire Adapter Notification types ([WUSB] sections 8.4.5 & 8.5.4)
113 *
114 * These are the notifications coming on the notification endpoint of
115 * an HWA and a DWA.
116 */
117enum wa_notif_type {
118 DWA_NOTIF_RWAKE = 0x91,
119 DWA_NOTIF_PORTSTATUS = 0x92,
120 WA_NOTIF_TRANSFER = 0x93,
121 HWA_NOTIF_BPST_ADJ = 0x94,
122 HWA_NOTIF_DN = 0x95,
123};
124
125/**
126 * Wire Adapter notification header
127 *
128 * Notifications coming from a wire adapter use a common header
129 * defined in [WUSB] sections 8.4.5 & 8.5.4.
130 */
131struct wa_notif_hdr {
132 u8 bLength;
133 u8 bNotifyType; /* enum wa_notif_type */
134} __attribute__((packed));
135
136/**
137 * HWA DN Received notification [(WUSB] section 8.5.4.2)
138 *
139 * The DNData is specified in WUSB1.0[7.6]. For each device
140 * notification we received, we just need to dispatch it.
141 *
142 * @dndata: this is really an array of notifications, but all start
143 * with the same header.
144 */
145struct hwa_notif_dn {
146 struct wa_notif_hdr hdr;
147 u8 bSourceDeviceAddr; /* from errata 2005/07 */
148 u8 bmAttributes;
149 struct wusb_dn_hdr dndata[];
150} __attribute__((packed));
151
152/* [WUSB] section 8.3.3 */
153enum wa_xfer_type {
154 WA_XFER_TYPE_CTL = 0x80,
155 WA_XFER_TYPE_BI = 0x81, /* bulk/interrupt */
156 WA_XFER_TYPE_ISO = 0x82,
157 WA_XFER_RESULT = 0x83,
158 WA_XFER_ABORT = 0x84,
159};
160
161/* [WUSB] section 8.3.3 */
162struct wa_xfer_hdr {
163 u8 bLength; /* 0x18 */
164 u8 bRequestType; /* 0x80 WA_REQUEST_TYPE_CTL */
165 __le16 wRPipe; /* RPipe index */
166 __le32 dwTransferID; /* Host-assigned ID */
167 __le32 dwTransferLength; /* Length of data to xfer */
168 u8 bTransferSegment;
169} __attribute__((packed));
170
171struct wa_xfer_ctl {
172 struct wa_xfer_hdr hdr;
173 u8 bmAttribute;
174 __le16 wReserved;
175 struct usb_ctrlrequest baSetupData;
176} __attribute__((packed));
177
178struct wa_xfer_bi {
179 struct wa_xfer_hdr hdr;
180 u8 bReserved;
181 __le16 wReserved;
182} __attribute__((packed));
183
184struct wa_xfer_hwaiso {
185 struct wa_xfer_hdr hdr;
186 u8 bReserved;
187 __le16 wPresentationTime;
188 __le32 dwNumOfPackets;
189 /* FIXME: u8 pktdata[]? */
190} __attribute__((packed));
191
192/* [WUSB] section 8.3.3.5 */
193struct wa_xfer_abort {
194 u8 bLength;
195 u8 bRequestType;
196 __le16 wRPipe; /* RPipe index */
197 __le32 dwTransferID; /* Host-assigned ID */
198} __attribute__((packed));
199
200/**
201 * WA Transfer Complete notification ([WUSB] section 8.3.3.3)
202 *
203 */
204struct wa_notif_xfer {
205 struct wa_notif_hdr hdr;
206 u8 bEndpoint;
207 u8 Reserved;
208} __attribute__((packed));
209
210/** Transfer result basic codes [WUSB] table 8-15 */
211enum {
212 WA_XFER_STATUS_SUCCESS,
213 WA_XFER_STATUS_HALTED,
214 WA_XFER_STATUS_DATA_BUFFER_ERROR,
215 WA_XFER_STATUS_BABBLE,
216 WA_XFER_RESERVED,
217 WA_XFER_STATUS_NOT_FOUND,
218 WA_XFER_STATUS_INSUFFICIENT_RESOURCE,
219 WA_XFER_STATUS_TRANSACTION_ERROR,
220 WA_XFER_STATUS_ABORTED,
221 WA_XFER_STATUS_RPIPE_NOT_READY,
222 WA_XFER_INVALID_FORMAT,
223 WA_XFER_UNEXPECTED_SEGMENT_NUMBER,
224 WA_XFER_STATUS_RPIPE_TYPE_MISMATCH,
225};
226
227/** [WUSB] section 8.3.3.4 */
228struct wa_xfer_result {
229 struct wa_notif_hdr hdr;
230 __le32 dwTransferID;
231 __le32 dwTransferLength;
232 u8 bTransferSegment;
233 u8 bTransferStatus;
234 __le32 dwNumOfPackets;
235} __attribute__((packed));
236
237/**
238 * Wire Adapter Class Descriptor ([WUSB] section 8.5.2.7).
239 *
240 * NOTE: u16 fields are read Little Endian from the hardware.
241 *
242 * @bNumPorts is the original max number of devices that the host can
243 * connect; we might chop this so the stack can handle
244 * it. In case you need to access it, use wusbhc->ports_max
245 * if it is a Wireless USB WA.
246 */
247struct usb_wa_descriptor {
248 u8 bLength;
249 u8 bDescriptorType;
250 u16 bcdWAVersion;
251 u8 bNumPorts; /* don't use!! */
252 u8 bmAttributes; /* Reserved == 0 */
253 u16 wNumRPipes;
254 u16 wRPipeMaxBlock;
255 u8 bRPipeBlockSize;
256 u8 bPwrOn2PwrGood;
257 u8 bNumMMCIEs;
258 u8 DeviceRemovable; /* FIXME: in DWA this is up to 16 bytes */
259} __attribute__((packed));
260
261/**
262 * HWA Device Information Buffer (WUSB1.0[T8.54])
263 */
264struct hwa_dev_info {
265 u8 bmDeviceAvailability[32]; /* FIXME: ignored for now */
266 u8 bDeviceAddress;
267 __le16 wPHYRates;
268 u8 bmDeviceAttribute;
269} __attribute__((packed));
270
271#endif /* #ifndef __LINUX_USB_WUSB_WA_H */
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h
new file mode 100644
index 000000000000..5f401b644ed5
--- /dev/null
+++ b/include/linux/usb/wusb.h
@@ -0,0 +1,376 @@
1/*
2 * Wireless USB Standard Definitions
3 * Event Size Tables
4 *
5 * Copyright (C) 2005-2006 Intel Corporation
6 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version
10 * 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 *
22 *
23 * FIXME: docs
24 * FIXME: organize properly, group logically
25 *
26 * All the event structures are defined in uwb/spec.h, as they are
27 * common to the WHCI and WUSB radio control interfaces.
28 */
29
30#ifndef __WUSB_H__
31#define __WUSB_H__
32
33#include <linux/types.h>
34#include <linux/kernel.h>
35#include <linux/uwb/spec.h>
36#include <linux/usb/ch9.h>
37#include <linux/param.h>
38
39/**
40 * WUSB Information Element header
41 *
42 * I don't know why, they decided to make it different to the MBOA MAC
43 * IE Header; beats me.
44 */
45struct wuie_hdr {
46 u8 bLength;
47 u8 bIEIdentifier;
48} __attribute__((packed));
49
50enum {
51 WUIE_ID_WCTA = 0x80,
52 WUIE_ID_CONNECTACK,
53 WUIE_ID_HOST_INFO,
54 WUIE_ID_CHANGE_ANNOUNCE,
55 WUIE_ID_DEVICE_DISCONNECT,
56 WUIE_ID_HOST_DISCONNECT,
57 WUIE_ID_KEEP_ALIVE = 0x89,
58 WUIE_ID_ISOCH_DISCARD,
59 WUIE_ID_RESET_DEVICE,
60};
61
62/**
63 * Maximum number of array elements in a WUSB IE.
64 *
65 * WUSB1.0[7.5 before table 7-38] says that in WUSB IEs that
66 * are "arrays" have to limited to 4 elements. So we define it
67 * like that to ease up and submit only the neeed size.
68 */
69#define WUIE_ELT_MAX 4
70
71/**
72 * Wrapper for the data that defines a CHID, a CDID or a CK
73 *
74 * WUSB defines that CHIDs, CDIDs and CKs are a 16 byte string of
75 * data. In order to avoid confusion and enforce types, we wrap it.
76 *
77 * Make it packed, as we use it in some hw defintions.
78 */
79struct wusb_ckhdid {
80 u8 data[16];
81} __attribute__((packed));
82
83const static
84struct wusb_ckhdid wusb_ckhdid_zero = { .data = { 0 } };
85
86#define WUSB_CKHDID_STRSIZE (3 * sizeof(struct wusb_ckhdid) + 1)
87
88/**
89 * WUSB IE: Host Information (WUSB1.0[7.5.2])
90 *
91 * Used to provide information about the host to the Wireless USB
92 * devices in range (CHID can be used as an ASCII string).
93 */
94struct wuie_host_info {
95 struct wuie_hdr hdr;
96 __le16 attributes;
97 struct wusb_ckhdid CHID;
98} __attribute__((packed));
99
100/**
101 * WUSB IE: Connect Ack (WUSB1.0[7.5.1])
102 *
103 * Used to acknowledge device connect requests. See note for
104 * WUIE_ELT_MAX.
105 */
106struct wuie_connect_ack {
107 struct wuie_hdr hdr;
108 struct {
109 struct wusb_ckhdid CDID;
110 u8 bDeviceAddress; /* 0 means unused */
111 u8 bReserved;
112 } blk[WUIE_ELT_MAX];
113} __attribute__((packed));
114
115/**
116 * WUSB IE Host Information Element, Connect Availability
117 *
118 * WUSB1.0[7.5.2], bmAttributes description
119 */
120enum {
121 WUIE_HI_CAP_RECONNECT = 0,
122 WUIE_HI_CAP_LIMITED,
123 WUIE_HI_CAP_RESERVED,
124 WUIE_HI_CAP_ALL,
125};
126
127/**
128 * WUSB IE: Channel Stop (WUSB1.0[7.5.8])
129 *
130 * Tells devices the host is going to stop sending MMCs and will dissapear.
131 */
132struct wuie_channel_stop {
133 struct wuie_hdr hdr;
134 u8 attributes;
135 u8 timestamp[3];
136} __attribute__((packed));
137
138/**
139 * WUSB IE: Keepalive (WUSB1.0[7.5.9])
140 *
141 * Ask device(s) to send keepalives.
142 */
143struct wuie_keep_alive {
144 struct wuie_hdr hdr;
145 u8 bDeviceAddress[WUIE_ELT_MAX];
146} __attribute__((packed));
147
148/**
149 * WUSB IE: Reset device (WUSB1.0[7.5.11])
150 *
151 * Tell device to reset; in all truth, we can fit 4 CDIDs, but we only
152 * use it for one at the time...
153 *
154 * In any case, this request is a wee bit silly: why don't they target
155 * by address??
156 */
157struct wuie_reset {
158 struct wuie_hdr hdr;
159 struct wusb_ckhdid CDID;
160} __attribute__((packed));
161
162/**
163 * WUSB IE: Disconnect device (WUSB1.0[7.5.11])
164 *
165 * Tell device to disconnect; we can fit 4 addresses, but we only use
166 * it for one at the time...
167 */
168struct wuie_disconnect {
169 struct wuie_hdr hdr;
170 u8 bDeviceAddress;
171 u8 padding;
172} __attribute__((packed));
173
174/**
175 * WUSB IE: Host disconnect ([WUSB] section 7.5.5)
176 *
177 * Tells all connected devices to disconnect.
178 */
179struct wuie_host_disconnect {
180 struct wuie_hdr hdr;
181} __attribute__((packed));
182
183/**
184 * WUSB Device Notification header (WUSB1.0[7.6])
185 */
186struct wusb_dn_hdr {
187 u8 bType;
188 u8 notifdata[];
189} __attribute__((packed));
190
191/** Device Notification codes (WUSB1.0[Table 7-54]) */
192enum WUSB_DN {
193 WUSB_DN_CONNECT = 0x01,
194 WUSB_DN_DISCONNECT = 0x02,
195 WUSB_DN_EPRDY = 0x03,
196 WUSB_DN_MASAVAILCHANGED = 0x04,
197 WUSB_DN_RWAKE = 0x05,
198 WUSB_DN_SLEEP = 0x06,
199 WUSB_DN_ALIVE = 0x07,
200};
201
202/** WUSB Device Notification Connect */
203struct wusb_dn_connect {
204 struct wusb_dn_hdr hdr;
205 __le16 attributes;
206 struct wusb_ckhdid CDID;
207} __attribute__((packed));
208
209static inline int wusb_dn_connect_prev_dev_addr(const struct wusb_dn_connect *dn)
210{
211 return le16_to_cpu(dn->attributes) & 0xff;
212}
213
214static inline int wusb_dn_connect_new_connection(const struct wusb_dn_connect *dn)
215{
216 return (le16_to_cpu(dn->attributes) >> 8) & 0x1;
217}
218
219static inline int wusb_dn_connect_beacon_behavior(const struct wusb_dn_connect *dn)
220{
221 return (le16_to_cpu(dn->attributes) >> 9) & 0x03;
222}
223
224/** Device is alive (aka: pong) (WUSB1.0[7.6.7]) */
225struct wusb_dn_alive {
226 struct wusb_dn_hdr hdr;
227} __attribute__((packed));
228
229/** Device is disconnecting (WUSB1.0[7.6.2]) */
230struct wusb_dn_disconnect {
231 struct wusb_dn_hdr hdr;
232} __attribute__((packed));
233
234/* General constants */
235enum {
236 WUSB_TRUST_TIMEOUT_MS = 4000, /* [WUSB] section 4.15.1 */
237};
238
239static inline size_t ckhdid_printf(char *pr_ckhdid, size_t size,
240 const struct wusb_ckhdid *ckhdid)
241{
242 return scnprintf(pr_ckhdid, size,
243 "%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx "
244 "%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx",
245 ckhdid->data[0], ckhdid->data[1],
246 ckhdid->data[2], ckhdid->data[3],
247 ckhdid->data[4], ckhdid->data[5],
248 ckhdid->data[6], ckhdid->data[7],
249 ckhdid->data[8], ckhdid->data[9],
250 ckhdid->data[10], ckhdid->data[11],
251 ckhdid->data[12], ckhdid->data[13],
252 ckhdid->data[14], ckhdid->data[15]);
253}
254
255/*
256 * WUSB Crypto stuff (WUSB1.0[6])
257 */
258
259extern const char *wusb_et_name(u8);
260
261/**
262 * WUSB key index WUSB1.0[7.3.2.4], for usage when setting keys for
263 * the host or the device.
264 */
265static inline u8 wusb_key_index(int index, int type, int originator)
266{
267 return (originator << 6) | (type << 4) | index;
268}
269
270#define WUSB_KEY_INDEX_TYPE_PTK 0 /* for HWA only */
271#define WUSB_KEY_INDEX_TYPE_ASSOC 1
272#define WUSB_KEY_INDEX_TYPE_GTK 2
273#define WUSB_KEY_INDEX_ORIGINATOR_HOST 0
274#define WUSB_KEY_INDEX_ORIGINATOR_DEVICE 1
275
276/* A CCM Nonce, defined in WUSB1.0[6.4.1] */
277struct aes_ccm_nonce {
278 u8 sfn[6]; /* Little Endian */
279 u8 tkid[3]; /* LE */
280 struct uwb_dev_addr dest_addr;
281 struct uwb_dev_addr src_addr;
282} __attribute__((packed));
283
284/* A CCM operation label, defined on WUSB1.0[6.5.x] */
285struct aes_ccm_label {
286 u8 data[14];
287} __attribute__((packed));
288
289/*
290 * Input to the key derivation sequence defined in
291 * WUSB1.0[6.5.1]. Rest of the data is in the CCM Nonce passed to the
292 * PRF function.
293 */
294struct wusb_keydvt_in {
295 u8 hnonce[16];
296 u8 dnonce[16];
297} __attribute__((packed));
298
299/*
300 * Output from the key derivation sequence defined in
301 * WUSB1.0[6.5.1].
302 */
303struct wusb_keydvt_out {
304 u8 kck[16];
305 u8 ptk[16];
306} __attribute__((packed));
307
308/* Pseudo Random Function WUSB1.0[6.5] */
309extern int wusb_crypto_init(void);
310extern void wusb_crypto_exit(void);
311extern ssize_t wusb_prf(void *out, size_t out_size,
312 const u8 key[16], const struct aes_ccm_nonce *_n,
313 const struct aes_ccm_label *a,
314 const void *b, size_t blen, size_t len);
315
316static inline int wusb_prf_64(void *out, size_t out_size, const u8 key[16],
317 const struct aes_ccm_nonce *n,
318 const struct aes_ccm_label *a,
319 const void *b, size_t blen)
320{
321 return wusb_prf(out, out_size, key, n, a, b, blen, 64);
322}
323
324static inline int wusb_prf_128(void *out, size_t out_size, const u8 key[16],
325 const struct aes_ccm_nonce *n,
326 const struct aes_ccm_label *a,
327 const void *b, size_t blen)
328{
329 return wusb_prf(out, out_size, key, n, a, b, blen, 128);
330}
331
332static inline int wusb_prf_256(void *out, size_t out_size, const u8 key[16],
333 const struct aes_ccm_nonce *n,
334 const struct aes_ccm_label *a,
335 const void *b, size_t blen)
336{
337 return wusb_prf(out, out_size, key, n, a, b, blen, 256);
338}
339
340/* Key derivation WUSB1.0[6.5.1] */
341static inline int wusb_key_derive(struct wusb_keydvt_out *keydvt_out,
342 const u8 key[16],
343 const struct aes_ccm_nonce *n,
344 const struct wusb_keydvt_in *keydvt_in)
345{
346 const struct aes_ccm_label a = { .data = "Pair-wise keys" };
347 return wusb_prf_256(keydvt_out, sizeof(*keydvt_out), key, n, &a,
348 keydvt_in, sizeof(*keydvt_in));
349}
350
351/*
352 * Out-of-band MIC Generation WUSB1.0[6.5.2]
353 *
354 * Compute the MIC over @key, @n and @hs and place it in @mic_out.
355 *
356 * @mic_out: Where to place the 8 byte MIC tag
357 * @key: KCK from the derivation process
358 * @n: CCM nonce, n->sfn == 0, TKID as established in the
359 * process.
360 * @hs: Handshake struct for phase 2 of the 4-way.
361 * hs->bStatus and hs->bReserved are zero.
362 * hs->bMessageNumber is 2 (WUSB1.0[7.3.2.5.2]
363 * hs->dest_addr is the device's USB address padded with 0
364 * hs->src_addr is the hosts's UWB device address
365 * hs->mic is ignored (as we compute that value).
366 */
367static inline int wusb_oob_mic(u8 mic_out[8], const u8 key[16],
368 const struct aes_ccm_nonce *n,
369 const struct usb_handshake *hs)
370{
371 const struct aes_ccm_label a = { .data = "out-of-bandMIC" };
372 return wusb_prf_64(mic_out, 8, key, n, &a,
373 hs, sizeof(*hs) - sizeof(hs->MIC));
374}
375
376#endif /* #ifndef __WUSB_H__ */
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index b5f41d4c2eec..315bcd375224 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -12,7 +12,7 @@
12struct user_namespace { 12struct user_namespace {
13 struct kref kref; 13 struct kref kref;
14 struct hlist_head uidhash_table[UIDHASH_SZ]; 14 struct hlist_head uidhash_table[UIDHASH_SZ];
15 struct user_struct *root_user; 15 struct user_struct *creator;
16}; 16};
17 17
18extern struct user_namespace init_user_ns; 18extern struct user_namespace init_user_ns;
@@ -26,8 +26,7 @@ static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
26 return ns; 26 return ns;
27} 27}
28 28
29extern struct user_namespace *copy_user_ns(int flags, 29extern int create_user_ns(struct cred *new);
30 struct user_namespace *old_ns);
31extern void free_user_ns(struct kref *kref); 30extern void free_user_ns(struct kref *kref);
32 31
33static inline void put_user_ns(struct user_namespace *ns) 32static inline void put_user_ns(struct user_namespace *ns)
@@ -43,13 +42,9 @@ static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
43 return &init_user_ns; 42 return &init_user_ns;
44} 43}
45 44
46static inline struct user_namespace *copy_user_ns(int flags, 45static inline int create_user_ns(struct cred *new)
47 struct user_namespace *old_ns)
48{ 46{
49 if (flags & CLONE_NEWUSER) 47 return -EINVAL;
50 return ERR_PTR(-EINVAL);
51
52 return old_ns;
53} 48}
54 49
55static inline void put_user_ns(struct user_namespace *ns) 50static inline void put_user_ns(struct user_namespace *ns)
diff --git a/include/linux/uwb.h b/include/linux/uwb.h
new file mode 100644
index 000000000000..f9ccbd9a2ced
--- /dev/null
+++ b/include/linux/uwb.h
@@ -0,0 +1,765 @@
1/*
2 * Ultra Wide Band
3 * UWB API
4 *
5 * Copyright (C) 2005-2006 Intel Corporation
6 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version
10 * 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 *
22 *
23 * FIXME: doc: overview of the API, different parts and pointers
24 */
25
26#ifndef __LINUX__UWB_H__
27#define __LINUX__UWB_H__
28
29#include <linux/limits.h>
30#include <linux/device.h>
31#include <linux/mutex.h>
32#include <linux/timer.h>
33#include <linux/workqueue.h>
34#include <linux/uwb/spec.h>
35
36struct uwb_dev;
37struct uwb_beca_e;
38struct uwb_rc;
39struct uwb_rsv;
40struct uwb_dbg;
41
42/**
43 * struct uwb_dev - a UWB Device
44 * @rc: UWB Radio Controller that discovered the device (kind of its
45 * parent).
46 * @bce: a beacon cache entry for this device; or NULL if the device
47 * is a local radio controller.
48 * @mac_addr: the EUI-48 address of this device.
49 * @dev_addr: the current DevAddr used by this device.
50 * @beacon_slot: the slot number the beacon is using.
51 * @streams: bitmap of streams allocated to reservations targeted at
52 * this device. For an RC, this is the streams allocated for
53 * reservations targeted at DevAddrs.
54 *
55 * A UWB device may either by a neighbor or part of a local radio
56 * controller.
57 */
58struct uwb_dev {
59 struct mutex mutex;
60 struct list_head list_node;
61 struct device dev;
62 struct uwb_rc *rc; /* radio controller */
63 struct uwb_beca_e *bce; /* Beacon Cache Entry */
64
65 struct uwb_mac_addr mac_addr;
66 struct uwb_dev_addr dev_addr;
67 int beacon_slot;
68 DECLARE_BITMAP(streams, UWB_NUM_STREAMS);
69};
70#define to_uwb_dev(d) container_of(d, struct uwb_dev, dev)
71
72/**
73 * UWB HWA/WHCI Radio Control {Command|Event} Block context IDs
74 *
75 * RC[CE]Bs have a 'context ID' field that matches the command with
76 * the event received to confirm it.
77 *
78 * Maximum number of context IDs
79 */
80enum { UWB_RC_CTX_MAX = 256 };
81
82
83/** Notification chain head for UWB generated events to listeners */
84struct uwb_notifs_chain {
85 struct list_head list;
86 struct mutex mutex;
87};
88
89/**
90 * struct uwb_mas_bm - a bitmap of all MAS in a superframe
91 * @bm: a bitmap of length #UWB_NUM_MAS
92 */
93struct uwb_mas_bm {
94 DECLARE_BITMAP(bm, UWB_NUM_MAS);
95};
96
97/**
98 * uwb_rsv_state - UWB Reservation state.
99 *
100 * NONE - reservation is not active (no DRP IE being transmitted).
101 *
102 * Owner reservation states:
103 *
104 * INITIATED - owner has sent an initial DRP request.
105 * PENDING - target responded with pending Reason Code.
106 * MODIFIED - reservation manager is modifying an established
107 * reservation with a different MAS allocation.
108 * ESTABLISHED - the reservation has been successfully negotiated.
109 *
110 * Target reservation states:
111 *
112 * DENIED - request is denied.
113 * ACCEPTED - request is accepted.
114 * PENDING - PAL has yet to make a decision to whether to accept or
115 * deny.
116 *
117 * FIXME: further target states TBD.
118 */
119enum uwb_rsv_state {
120 UWB_RSV_STATE_NONE,
121 UWB_RSV_STATE_O_INITIATED,
122 UWB_RSV_STATE_O_PENDING,
123 UWB_RSV_STATE_O_MODIFIED,
124 UWB_RSV_STATE_O_ESTABLISHED,
125 UWB_RSV_STATE_T_ACCEPTED,
126 UWB_RSV_STATE_T_DENIED,
127 UWB_RSV_STATE_T_PENDING,
128
129 UWB_RSV_STATE_LAST,
130};
131
132enum uwb_rsv_target_type {
133 UWB_RSV_TARGET_DEV,
134 UWB_RSV_TARGET_DEVADDR,
135};
136
137/**
138 * struct uwb_rsv_target - the target of a reservation.
139 *
140 * Reservations unicast and targeted at a single device
141 * (UWB_RSV_TARGET_DEV); or (e.g., in the case of WUSB) targeted at a
142 * specific (private) DevAddr (UWB_RSV_TARGET_DEVADDR).
143 */
144struct uwb_rsv_target {
145 enum uwb_rsv_target_type type;
146 union {
147 struct uwb_dev *dev;
148 struct uwb_dev_addr devaddr;
149 };
150};
151
152/*
153 * Number of streams reserved for reservations targeted at DevAddrs.
154 */
155#define UWB_NUM_GLOBAL_STREAMS 1
156
157typedef void (*uwb_rsv_cb_f)(struct uwb_rsv *rsv);
158
159/**
160 * struct uwb_rsv - a DRP reservation
161 *
162 * Data structure management:
163 *
164 * @rc: the radio controller this reservation is for
165 * (as target or owner)
166 * @rc_node: a list node for the RC
167 * @pal_node: a list node for the PAL
168 *
169 * Owner and target parameters:
170 *
171 * @owner: the UWB device owning this reservation
172 * @target: the target UWB device
173 * @type: reservation type
174 *
175 * Owner parameters:
176 *
177 * @max_mas: maxiumum number of MAS
178 * @min_mas: minimum number of MAS
179 * @sparsity: owner selected sparsity
180 * @is_multicast: true iff multicast
181 *
182 * @callback: callback function when the reservation completes
183 * @pal_priv: private data for the PAL making the reservation
184 *
185 * Reservation status:
186 *
187 * @status: negotiation status
188 * @stream: stream index allocated for this reservation
189 * @mas: reserved MAS
190 * @drp_ie: the DRP IE
191 * @ie_valid: true iff the DRP IE matches the reservation parameters
192 *
193 * DRP reservations are uniquely identified by the owner, target and
194 * stream index. However, when using a DevAddr as a target (e.g., for
195 * a WUSB cluster reservation) the responses may be received from
196 * devices with different DevAddrs. In this case, reservations are
197 * uniquely identified by just the stream index. A number of stream
198 * indexes (UWB_NUM_GLOBAL_STREAMS) are reserved for this.
199 */
200struct uwb_rsv {
201 struct uwb_rc *rc;
202 struct list_head rc_node;
203 struct list_head pal_node;
204
205 struct uwb_dev *owner;
206 struct uwb_rsv_target target;
207 enum uwb_drp_type type;
208 int max_mas;
209 int min_mas;
210 int sparsity;
211 bool is_multicast;
212
213 uwb_rsv_cb_f callback;
214 void *pal_priv;
215
216 enum uwb_rsv_state state;
217 u8 stream;
218 struct uwb_mas_bm mas;
219 struct uwb_ie_drp *drp_ie;
220 bool ie_valid;
221 struct timer_list timer;
222 bool expired;
223};
224
225static const
226struct uwb_mas_bm uwb_mas_bm_zero = { .bm = { 0 } };
227
228static inline void uwb_mas_bm_copy_le(void *dst, const struct uwb_mas_bm *mas)
229{
230 bitmap_copy_le(dst, mas->bm, UWB_NUM_MAS);
231}
232
233/**
234 * struct uwb_drp_avail - a radio controller's view of MAS usage
235 * @global: MAS unused by neighbors (excluding reservations targetted
236 * or owned by the local radio controller) or the beaon period
237 * @local: MAS unused by local established reservations
238 * @pending: MAS unused by local pending reservations
239 * @ie: DRP Availability IE to be included in the beacon
240 * @ie_valid: true iff @ie is valid and does not need to regenerated from
241 * @global and @local
242 *
243 * Each radio controller maintains a view of MAS usage or
244 * availability. MAS available for a new reservation are determined
245 * from the intersection of @global, @local, and @pending.
246 *
247 * The radio controller must transmit a DRP Availability IE that's the
248 * intersection of @global and @local.
249 *
250 * A set bit indicates the MAS is unused and available.
251 *
252 * rc->rsvs_mutex should be held before accessing this data structure.
253 *
254 * [ECMA-368] section 17.4.3.
255 */
256struct uwb_drp_avail {
257 DECLARE_BITMAP(global, UWB_NUM_MAS);
258 DECLARE_BITMAP(local, UWB_NUM_MAS);
259 DECLARE_BITMAP(pending, UWB_NUM_MAS);
260 struct uwb_ie_drp_avail ie;
261 bool ie_valid;
262};
263
264
265const char *uwb_rsv_state_str(enum uwb_rsv_state state);
266const char *uwb_rsv_type_str(enum uwb_drp_type type);
267
268struct uwb_rsv *uwb_rsv_create(struct uwb_rc *rc, uwb_rsv_cb_f cb,
269 void *pal_priv);
270void uwb_rsv_destroy(struct uwb_rsv *rsv);
271
272int uwb_rsv_establish(struct uwb_rsv *rsv);
273int uwb_rsv_modify(struct uwb_rsv *rsv,
274 int max_mas, int min_mas, int sparsity);
275void uwb_rsv_terminate(struct uwb_rsv *rsv);
276
277void uwb_rsv_accept(struct uwb_rsv *rsv, uwb_rsv_cb_f cb, void *pal_priv);
278
279/**
280 * Radio Control Interface instance
281 *
282 *
283 * Life cycle rules: those of the UWB Device.
284 *
285 * @index: an index number for this radio controller, as used in the
286 * device name.
287 * @version: version of protocol supported by this device
288 * @priv: Backend implementation; rw with uwb_dev.dev.sem taken.
289 * @cmd: Backend implementation to execute commands; rw and call
290 * only with uwb_dev.dev.sem taken.
291 * @reset: Hardware reset of radio controller and any PAL controllers.
292 * @filter: Backend implementation to manipulate data to and from device
293 * to be compliant to specification assumed by driver (WHCI
294 * 0.95).
295 *
296 * uwb_dev.dev.mutex is used to execute commands and update
297 * the corresponding structures; can't use a spinlock
298 * because rc->cmd() can sleep.
299 * @ies: This is a dynamically allocated array cacheing the
300 * IEs (settable by the host) that the beacon of this
301 * radio controller is currently sending.
302 *
303 * In reality, we store here the full command we set to
304 * the radio controller (which is basically a command
305 * prefix followed by all the IEs the beacon currently
306 * contains). This way we don't have to realloc and
307 * memcpy when setting it.
308 *
309 * We set this up in uwb_rc_ie_setup(), where we alloc
310 * this struct, call get_ie() [so we know which IEs are
311 * currently being sent, if any].
312 *
313 * @ies_capacity:Amount of space (in bytes) allocated in @ies. The
314 * amount used is given by sizeof(*ies) plus ies->wIELength
315 * (which is a little endian quantity all the time).
316 * @ies_mutex: protect the IE cache
317 * @dbg: information for the debug interface
318 */
319struct uwb_rc {
320 struct uwb_dev uwb_dev;
321 int index;
322 u16 version;
323
324 struct module *owner;
325 void *priv;
326 int (*start)(struct uwb_rc *rc);
327 void (*stop)(struct uwb_rc *rc);
328 int (*cmd)(struct uwb_rc *, const struct uwb_rccb *, size_t);
329 int (*reset)(struct uwb_rc *rc);
330 int (*filter_cmd)(struct uwb_rc *, struct uwb_rccb **, size_t *);
331 int (*filter_event)(struct uwb_rc *, struct uwb_rceb **, const size_t,
332 size_t *, size_t *);
333
334 spinlock_t neh_lock; /* protects neh_* and ctx_* */
335 struct list_head neh_list; /* Open NE handles */
336 unsigned long ctx_bm[UWB_RC_CTX_MAX / 8 / sizeof(unsigned long)];
337 u8 ctx_roll;
338
339 int beaconing; /* Beaconing state [channel number] */
340 int scanning;
341 enum uwb_scan_type scan_type:3;
342 unsigned ready:1;
343 struct uwb_notifs_chain notifs_chain;
344
345 struct uwb_drp_avail drp_avail;
346 struct list_head reservations;
347 struct mutex rsvs_mutex;
348 struct workqueue_struct *rsv_workq;
349 struct work_struct rsv_update_work;
350
351 struct mutex ies_mutex;
352 struct uwb_rc_cmd_set_ie *ies;
353 size_t ies_capacity;
354
355 spinlock_t pal_lock;
356 struct list_head pals;
357
358 struct uwb_dbg *dbg;
359};
360
361
362/**
363 * struct uwb_pal - a UWB PAL
364 * @name: descriptive name for this PAL (wushc, wlp, etc.).
365 * @device: a device for the PAL. Used to link the PAL and the radio
366 * controller in sysfs.
367 * @new_rsv: called when a peer requests a reservation (may be NULL if
368 * the PAL cannot accept reservation requests).
369 *
370 * A Protocol Adaptation Layer (PAL) is a user of the WiMedia UWB
371 * radio platform (e.g., WUSB, WLP or Bluetooth UWB AMP).
372 *
373 * The PALs using a radio controller must register themselves to
374 * permit the UWB stack to coordinate usage of the radio between the
375 * various PALs or to allow PALs to response to certain requests from
376 * peers.
377 *
378 * A struct uwb_pal should be embedded in a containing structure
379 * belonging to the PAL and initialized with uwb_pal_init()). Fields
380 * should be set appropriately by the PAL before registering the PAL
381 * with uwb_pal_register().
382 */
383struct uwb_pal {
384 struct list_head node;
385 const char *name;
386 struct device *device;
387 void (*new_rsv)(struct uwb_rsv *rsv);
388};
389
390void uwb_pal_init(struct uwb_pal *pal);
391int uwb_pal_register(struct uwb_rc *rc, struct uwb_pal *pal);
392void uwb_pal_unregister(struct uwb_rc *rc, struct uwb_pal *pal);
393
394/*
395 * General public API
396 *
397 * This API can be used by UWB device drivers or by those implementing
398 * UWB Radio Controllers
399 */
400struct uwb_dev *uwb_dev_get_by_devaddr(struct uwb_rc *rc,
401 const struct uwb_dev_addr *devaddr);
402struct uwb_dev *uwb_dev_get_by_rc(struct uwb_dev *, struct uwb_rc *);
403static inline void uwb_dev_get(struct uwb_dev *uwb_dev)
404{
405 get_device(&uwb_dev->dev);
406}
407static inline void uwb_dev_put(struct uwb_dev *uwb_dev)
408{
409 put_device(&uwb_dev->dev);
410}
411struct uwb_dev *uwb_dev_try_get(struct uwb_rc *rc, struct uwb_dev *uwb_dev);
412
413/**
414 * Callback function for 'uwb_{dev,rc}_foreach()'.
415 *
416 * @dev: Linux device instance
417 * 'uwb_dev = container_of(dev, struct uwb_dev, dev)'
418 * @priv: Data passed by the caller to 'uwb_{dev,rc}_foreach()'.
419 *
420 * @returns: 0 to continue the iterations, any other val to stop
421 * iterating and return the value to the caller of
422 * _foreach().
423 */
424typedef int (*uwb_dev_for_each_f)(struct device *dev, void *priv);
425int uwb_dev_for_each(struct uwb_rc *rc, uwb_dev_for_each_f func, void *priv);
426
427struct uwb_rc *uwb_rc_alloc(void);
428struct uwb_rc *uwb_rc_get_by_dev(const struct uwb_dev_addr *);
429struct uwb_rc *uwb_rc_get_by_grandpa(const struct device *);
430void uwb_rc_put(struct uwb_rc *rc);
431
432typedef void (*uwb_rc_cmd_cb_f)(struct uwb_rc *rc, void *arg,
433 struct uwb_rceb *reply, ssize_t reply_size);
434
435int uwb_rc_cmd_async(struct uwb_rc *rc, const char *cmd_name,
436 struct uwb_rccb *cmd, size_t cmd_size,
437 u8 expected_type, u16 expected_event,
438 uwb_rc_cmd_cb_f cb, void *arg);
439ssize_t uwb_rc_cmd(struct uwb_rc *rc, const char *cmd_name,
440 struct uwb_rccb *cmd, size_t cmd_size,
441 struct uwb_rceb *reply, size_t reply_size);
442ssize_t uwb_rc_vcmd(struct uwb_rc *rc, const char *cmd_name,
443 struct uwb_rccb *cmd, size_t cmd_size,
444 u8 expected_type, u16 expected_event,
445 struct uwb_rceb **preply);
446ssize_t uwb_rc_get_ie(struct uwb_rc *, struct uwb_rc_evt_get_ie **);
447int uwb_bg_joined(struct uwb_rc *rc);
448
449size_t __uwb_addr_print(char *, size_t, const unsigned char *, int);
450
451int uwb_rc_dev_addr_set(struct uwb_rc *, const struct uwb_dev_addr *);
452int uwb_rc_dev_addr_get(struct uwb_rc *, struct uwb_dev_addr *);
453int uwb_rc_mac_addr_set(struct uwb_rc *, const struct uwb_mac_addr *);
454int uwb_rc_mac_addr_get(struct uwb_rc *, struct uwb_mac_addr *);
455int __uwb_mac_addr_assigned_check(struct device *, void *);
456int __uwb_dev_addr_assigned_check(struct device *, void *);
457
458/* Print in @buf a pretty repr of @addr */
459static inline size_t uwb_dev_addr_print(char *buf, size_t buf_size,
460 const struct uwb_dev_addr *addr)
461{
462 return __uwb_addr_print(buf, buf_size, addr->data, 0);
463}
464
465/* Print in @buf a pretty repr of @addr */
466static inline size_t uwb_mac_addr_print(char *buf, size_t buf_size,
467 const struct uwb_mac_addr *addr)
468{
469 return __uwb_addr_print(buf, buf_size, addr->data, 1);
470}
471
472/* @returns 0 if device addresses @addr2 and @addr1 are equal */
473static inline int uwb_dev_addr_cmp(const struct uwb_dev_addr *addr1,
474 const struct uwb_dev_addr *addr2)
475{
476 return memcmp(addr1, addr2, sizeof(*addr1));
477}
478
479/* @returns 0 if MAC addresses @addr2 and @addr1 are equal */
480static inline int uwb_mac_addr_cmp(const struct uwb_mac_addr *addr1,
481 const struct uwb_mac_addr *addr2)
482{
483 return memcmp(addr1, addr2, sizeof(*addr1));
484}
485
486/* @returns !0 if a MAC @addr is a broadcast address */
487static inline int uwb_mac_addr_bcast(const struct uwb_mac_addr *addr)
488{
489 struct uwb_mac_addr bcast = {
490 .data = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
491 };
492 return !uwb_mac_addr_cmp(addr, &bcast);
493}
494
495/* @returns !0 if a MAC @addr is all zeroes*/
496static inline int uwb_mac_addr_unset(const struct uwb_mac_addr *addr)
497{
498 struct uwb_mac_addr unset = {
499 .data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
500 };
501 return !uwb_mac_addr_cmp(addr, &unset);
502}
503
504/* @returns !0 if the address is in use. */
505static inline unsigned __uwb_dev_addr_assigned(struct uwb_rc *rc,
506 struct uwb_dev_addr *addr)
507{
508 return uwb_dev_for_each(rc, __uwb_dev_addr_assigned_check, addr);
509}
510
511/*
512 * UWB Radio Controller API
513 *
514 * This API is used (in addition to the general API) to implement UWB
515 * Radio Controllers.
516 */
517void uwb_rc_init(struct uwb_rc *);
518int uwb_rc_add(struct uwb_rc *, struct device *dev, void *rc_priv);
519void uwb_rc_rm(struct uwb_rc *);
520void uwb_rc_neh_grok(struct uwb_rc *, void *, size_t);
521void uwb_rc_neh_error(struct uwb_rc *, int);
522void uwb_rc_reset_all(struct uwb_rc *rc);
523
524/**
525 * uwb_rsv_is_owner - is the owner of this reservation the RC?
526 * @rsv: the reservation
527 */
528static inline bool uwb_rsv_is_owner(struct uwb_rsv *rsv)
529{
530 return rsv->owner == &rsv->rc->uwb_dev;
531}
532
533/**
534 * Events generated by UWB that can be passed to any listeners
535 *
536 * Higher layers can register callback functions with the radio
537 * controller using uwb_notifs_register(). The radio controller
538 * maintains a list of all registered handlers and will notify all
539 * nodes when an event occurs.
540 */
541enum uwb_notifs {
542 UWB_NOTIF_BG_JOIN = 0, /* radio controller joined a beacon group */
543 UWB_NOTIF_BG_LEAVE = 1, /* radio controller left a beacon group */
544 UWB_NOTIF_ONAIR,
545 UWB_NOTIF_OFFAIR,
546};
547
548/* Callback function registered with UWB */
549struct uwb_notifs_handler {
550 struct list_head list_node;
551 void (*cb)(void *, struct uwb_dev *, enum uwb_notifs);
552 void *data;
553};
554
555int uwb_notifs_register(struct uwb_rc *, struct uwb_notifs_handler *);
556int uwb_notifs_deregister(struct uwb_rc *, struct uwb_notifs_handler *);
557
558
559/**
560 * UWB radio controller Event Size Entry (for creating entry tables)
561 *
562 * WUSB and WHCI define events and notifications, and they might have
563 * fixed or variable size.
564 *
565 * Each event/notification has a size which is not necessarily known
566 * in advance based on the event code. As well, vendor specific
567 * events/notifications will have a size impossible to determine
568 * unless we know about the device's specific details.
569 *
570 * It was way too smart of the spec writers not to think that it would
571 * be impossible for a generic driver to skip over vendor specific
572 * events/notifications if there are no LENGTH fields in the HEADER of
573 * each message...the transaction size cannot be counted on as the
574 * spec does not forbid to pack more than one event in a single
575 * transaction.
576 *
577 * Thus, we guess sizes with tables (or for events, when you know the
578 * size ahead of time you can use uwb_rc_neh_extra_size*()). We
579 * register tables with the known events and their sizes, and then we
580 * traverse those tables. For those with variable length, we provide a
581 * way to lookup the size inside the event/notification's
582 * payload. This allows device-specific event size tables to be
583 * registered.
584 *
585 * @size: Size of the payload
586 *
587 * @offset: if != 0, at offset @offset-1 starts a field with a length
588 * that has to be added to @size. The format of the field is
589 * given by @type.
590 *
591 * @type: Type and length of the offset field. Most common is LE 16
592 * bits (that's why that is zero); others are there mostly to
593 * cover for bugs and weirdos.
594 */
595struct uwb_est_entry {
596 size_t size;
597 unsigned offset;
598 enum { UWB_EST_16 = 0, UWB_EST_8 = 1 } type;
599};
600
601int uwb_est_register(u8 type, u8 code_high, u16 vendor, u16 product,
602 const struct uwb_est_entry *, size_t entries);
603int uwb_est_unregister(u8 type, u8 code_high, u16 vendor, u16 product,
604 const struct uwb_est_entry *, size_t entries);
605ssize_t uwb_est_find_size(struct uwb_rc *rc, const struct uwb_rceb *rceb,
606 size_t len);
607
608/* -- Misc */
609
610enum {
611 EDC_MAX_ERRORS = 10,
612 EDC_ERROR_TIMEFRAME = HZ,
613};
614
615/* error density counter */
616struct edc {
617 unsigned long timestart;
618 u16 errorcount;
619};
620
621static inline
622void edc_init(struct edc *edc)
623{
624 edc->timestart = jiffies;
625}
626
627/* Called when an error occured.
628 * This is way to determine if the number of acceptable errors per time
629 * period has been exceeded. It is not accurate as there are cases in which
630 * this scheme will not work, for example if there are periodic occurences
631 * of errors that straddle updates to the start time. This scheme is
632 * sufficient for our usage.
633 *
634 * @returns 1 if maximum acceptable errors per timeframe has been exceeded.
635 */
636static inline int edc_inc(struct edc *err_hist, u16 max_err, u16 timeframe)
637{
638 unsigned long now;
639
640 now = jiffies;
641 if (now - err_hist->timestart > timeframe) {
642 err_hist->errorcount = 1;
643 err_hist->timestart = now;
644 } else if (++err_hist->errorcount > max_err) {
645 err_hist->errorcount = 0;
646 err_hist->timestart = now;
647 return 1;
648 }
649 return 0;
650}
651
652
653/* Information Element handling */
654
655/* For representing the state of writing to a buffer when iterating */
656struct uwb_buf_ctx {
657 char *buf;
658 size_t bytes, size;
659};
660
661typedef int (*uwb_ie_f)(struct uwb_dev *, const struct uwb_ie_hdr *,
662 size_t, void *);
663struct uwb_ie_hdr *uwb_ie_next(void **ptr, size_t *len);
664ssize_t uwb_ie_for_each(struct uwb_dev *uwb_dev, uwb_ie_f fn, void *data,
665 const void *buf, size_t size);
666int uwb_ie_dump_hex(struct uwb_dev *, const struct uwb_ie_hdr *,
667 size_t, void *);
668int uwb_rc_set_ie(struct uwb_rc *, struct uwb_rc_cmd_set_ie *);
669struct uwb_ie_hdr *uwb_ie_next(void **ptr, size_t *len);
670
671
672/*
673 * Transmission statistics
674 *
675 * UWB uses LQI and RSSI (one byte values) for reporting radio signal
676 * strength and line quality indication. We do quick and dirty
677 * averages of those. They are signed values, btw.
678 *
679 * For 8 bit quantities, we keep the min, the max, an accumulator
680 * (@sigma) and a # of samples. When @samples gets to 255, we compute
681 * the average (@sigma / @samples), place it in @sigma and reset
682 * @samples to 1 (so we use it as the first sample).
683 *
684 * Now, statistically speaking, probably I am kicking the kidneys of
685 * some books I have in my shelves collecting dust, but I just want to
686 * get an approx, not the Nobel.
687 *
688 * LOCKING: there is no locking per se, but we try to keep a lockless
689 * schema. Only _add_samples() modifies the values--as long as you
690 * have other locking on top that makes sure that no two calls of
691 * _add_sample() happen at the same time, then we are fine. Now, for
692 * resetting the values we just set @samples to 0 and that makes the
693 * next _add_sample() to start with defaults. Reading the values in
694 * _show() currently can race, so you need to make sure the calls are
695 * under the same lock that protects calls to _add_sample(). FIXME:
696 * currently unlocked (It is not ultraprecise but does the trick. Bite
697 * me).
698 */
699struct stats {
700 s8 min, max;
701 s16 sigma;
702 atomic_t samples;
703};
704
705static inline
706void stats_init(struct stats *stats)
707{
708 atomic_set(&stats->samples, 0);
709 wmb();
710}
711
712static inline
713void stats_add_sample(struct stats *stats, s8 sample)
714{
715 s8 min, max;
716 s16 sigma;
717 unsigned samples = atomic_read(&stats->samples);
718 if (samples == 0) { /* it was zero before, so we initialize */
719 min = 127;
720 max = -128;
721 sigma = 0;
722 } else {
723 min = stats->min;
724 max = stats->max;
725 sigma = stats->sigma;
726 }
727
728 if (sample < min) /* compute new values */
729 min = sample;
730 else if (sample > max)
731 max = sample;
732 sigma += sample;
733
734 stats->min = min; /* commit */
735 stats->max = max;
736 stats->sigma = sigma;
737 if (atomic_add_return(1, &stats->samples) > 255) {
738 /* wrapped around! reset */
739 stats->sigma = sigma / 256;
740 atomic_set(&stats->samples, 1);
741 }
742}
743
744static inline ssize_t stats_show(struct stats *stats, char *buf)
745{
746 int min, max, avg;
747 int samples = atomic_read(&stats->samples);
748 if (samples == 0)
749 min = max = avg = 0;
750 else {
751 min = stats->min;
752 max = stats->max;
753 avg = stats->sigma / samples;
754 }
755 return scnprintf(buf, PAGE_SIZE, "%d %d %d\n", min, max, avg);
756}
757
758static inline ssize_t stats_store(struct stats *stats, const char *buf,
759 size_t size)
760{
761 stats_init(stats);
762 return size;
763}
764
765#endif /* #ifndef __LINUX__UWB_H__ */
diff --git a/include/linux/uwb/debug-cmd.h b/include/linux/uwb/debug-cmd.h
new file mode 100644
index 000000000000..1141f41bab5c
--- /dev/null
+++ b/include/linux/uwb/debug-cmd.h
@@ -0,0 +1,57 @@
1/*
2 * Ultra Wide Band
3 * Debug interface commands
4 *
5 * Copyright (C) 2008 Cambridge Silicon Radio Ltd.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version
9 * 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19#ifndef __LINUX__UWB__DEBUG_CMD_H__
20#define __LINUX__UWB__DEBUG_CMD_H__
21
22#include <linux/types.h>
23
24/*
25 * Debug interface commands
26 *
27 * UWB_DBG_CMD_RSV_ESTABLISH: Establish a new unicast reservation.
28 *
29 * UWB_DBG_CMD_RSV_TERMINATE: Terminate the Nth reservation.
30 */
31
32enum uwb_dbg_cmd_type {
33 UWB_DBG_CMD_RSV_ESTABLISH = 1,
34 UWB_DBG_CMD_RSV_TERMINATE = 2,
35};
36
37struct uwb_dbg_cmd_rsv_establish {
38 __u8 target[6];
39 __u8 type;
40 __u16 max_mas;
41 __u16 min_mas;
42 __u8 sparsity;
43};
44
45struct uwb_dbg_cmd_rsv_terminate {
46 int index;
47};
48
49struct uwb_dbg_cmd {
50 __u32 type;
51 union {
52 struct uwb_dbg_cmd_rsv_establish rsv_establish;
53 struct uwb_dbg_cmd_rsv_terminate rsv_terminate;
54 };
55};
56
57#endif /* #ifndef __LINUX__UWB__DEBUG_CMD_H__ */
diff --git a/include/linux/uwb/debug.h b/include/linux/uwb/debug.h
new file mode 100644
index 000000000000..a86a73fe303f
--- /dev/null
+++ b/include/linux/uwb/debug.h
@@ -0,0 +1,82 @@
1/*
2 * Ultra Wide Band
3 * Debug Support
4 *
5 * Copyright (C) 2005-2006 Intel Corporation
6 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version
10 * 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 *
22 *
23 * FIXME: doc
24 * Invoke like:
25 *
26 * #define D_LOCAL 4
27 * #include <linux/uwb/debug.h>
28 *
29 * At the end of your include files.
30 */
31#include <linux/types.h>
32
33struct device;
34extern void dump_bytes(struct device *dev, const void *_buf, size_t rsize);
35
36/* Master debug switch; !0 enables, 0 disables */
37#define D_MASTER (!0)
38
39/* Local (per-file) debug switch; #define before #including */
40#ifndef D_LOCAL
41#define D_LOCAL 0
42#endif
43
44#undef __d_printf
45#undef d_fnstart
46#undef d_fnend
47#undef d_printf
48#undef d_dump
49
50#define __d_printf(l, _tag, _dev, f, a...) \
51do { \
52 struct device *__dev = (_dev); \
53 if (D_MASTER && D_LOCAL >= (l)) { \
54 char __head[64] = ""; \
55 if (_dev != NULL) { \
56 if ((unsigned long)__dev < 4096) \
57 printk(KERN_ERR "E: Corrupt dev %p\n", \
58 __dev); \
59 else \
60 snprintf(__head, sizeof(__head), \
61 "%s %s: ", \
62 dev_driver_string(__dev), \
63 __dev->bus_id); \
64 } \
65 printk(KERN_ERR "%s%s" _tag ": " f, __head, \
66 __func__, ## a); \
67 } \
68} while (0 && _dev)
69
70#define d_fnstart(l, _dev, f, a...) \
71 __d_printf(l, " FNSTART", _dev, f, ## a)
72#define d_fnend(l, _dev, f, a...) \
73 __d_printf(l, " FNEND", _dev, f, ## a)
74#define d_printf(l, _dev, f, a...) \
75 __d_printf(l, "", _dev, f, ## a)
76#define d_dump(l, _dev, ptr, size) \
77do { \
78 struct device *__dev = _dev; \
79 if (D_MASTER && D_LOCAL >= (l)) \
80 dump_bytes(__dev, ptr, size); \
81} while (0 && _dev)
82#define d_test(l) (D_MASTER && D_LOCAL >= (l))
diff --git a/include/linux/uwb/spec.h b/include/linux/uwb/spec.h
new file mode 100644
index 000000000000..198c15f8e251
--- /dev/null
+++ b/include/linux/uwb/spec.h
@@ -0,0 +1,727 @@
1/*
2 * Ultra Wide Band
3 * UWB Standard definitions
4 *
5 * Copyright (C) 2005-2006 Intel Corporation
6 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License version
10 * 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 *
22 *
23 * All these definitions are based on the ECMA-368 standard.
24 *
25 * Note all definitions are Little Endian in the wire, and we will
26 * convert them to host order before operating on the bitfields (that
27 * yes, we use extensively).
28 */
29
30#ifndef __LINUX__UWB_SPEC_H__
31#define __LINUX__UWB_SPEC_H__
32
33#include <linux/types.h>
34#include <linux/bitmap.h>
35
36#define i1480_FW 0x00000303
37/* #define i1480_FW 0x00000302 */
38
39/**
40 * Number of Medium Access Slots in a superframe.
41 *
42 * UWB divides time in SuperFrames, each one divided in 256 pieces, or
43 * Medium Access Slots. See MBOA MAC[5.4.5] for details. The MAS is the
44 * basic bandwidth allocation unit in UWB.
45 */
46enum { UWB_NUM_MAS = 256 };
47
48/**
49 * Number of Zones in superframe.
50 *
51 * UWB divides the superframe into zones with numbering starting from BPST.
52 * See MBOA MAC[16.8.6]
53 */
54enum { UWB_NUM_ZONES = 16 };
55
56/*
57 * Number of MAS in a zone.
58 */
59#define UWB_MAS_PER_ZONE (UWB_NUM_MAS / UWB_NUM_ZONES)
60
61/*
62 * Number of streams per DRP reservation between a pair of devices.
63 *
64 * [ECMA-368] section 16.8.6.
65 */
66enum { UWB_NUM_STREAMS = 8 };
67
68/*
69 * mMasLength
70 *
71 * The length of a MAS in microseconds.
72 *
73 * [ECMA-368] section 17.16.
74 */
75enum { UWB_MAS_LENGTH_US = 256 };
76
77/*
78 * mBeaconSlotLength
79 *
80 * The length of the beacon slot in microseconds.
81 *
82 * [ECMA-368] section 17.16
83 */
84enum { UWB_BEACON_SLOT_LENGTH_US = 85 };
85
86/*
87 * mMaxLostBeacons
88 *
89 * The number beacons missing in consecutive superframes before a
90 * device can be considered as unreachable.
91 *
92 * [ECMA-368] section 17.16
93 */
94enum { UWB_MAX_LOST_BEACONS = 3 };
95
96/*
97 * Length of a superframe in microseconds.
98 */
99#define UWB_SUPERFRAME_LENGTH_US (UWB_MAS_LENGTH_US * UWB_NUM_MAS)
100
101/**
102 * UWB MAC address
103 *
104 * It is *imperative* that this struct is exactly 6 packed bytes (as
105 * it is also used to define headers sent down and up the wire/radio).
106 */
107struct uwb_mac_addr {
108 u8 data[6];
109} __attribute__((packed));
110
111
112/**
113 * UWB device address
114 *
115 * It is *imperative* that this struct is exactly 6 packed bytes (as
116 * it is also used to define headers sent down and up the wire/radio).
117 */
118struct uwb_dev_addr {
119 u8 data[2];
120} __attribute__((packed));
121
122
123/**
124 * Types of UWB addresses
125 *
126 * Order matters (by size).
127 */
128enum uwb_addr_type {
129 UWB_ADDR_DEV = 0,
130 UWB_ADDR_MAC = 1,
131};
132
133
134/** Size of a char buffer for printing a MAC/device address */
135enum { UWB_ADDR_STRSIZE = 32 };
136
137
138/** UWB WiMedia protocol IDs. */
139enum uwb_prid {
140 UWB_PRID_WLP_RESERVED = 0x0000,
141 UWB_PRID_WLP = 0x0001,
142 UWB_PRID_WUSB_BOT = 0x0010,
143 UWB_PRID_WUSB = 0x0010,
144 UWB_PRID_WUSB_TOP = 0x001F,
145};
146
147
148/** PHY Rate (MBOA MAC[7.8.12, Table 61]) */
149enum uwb_phy_rate {
150 UWB_PHY_RATE_53 = 0,
151 UWB_PHY_RATE_80,
152 UWB_PHY_RATE_106,
153 UWB_PHY_RATE_160,
154 UWB_PHY_RATE_200,
155 UWB_PHY_RATE_320,
156 UWB_PHY_RATE_400,
157 UWB_PHY_RATE_480,
158 UWB_PHY_RATE_INVALID
159};
160
161
162/**
163 * Different ways to scan (MBOA MAC[6.2.2, Table 8], WUSB[Table 8-78])
164 */
165enum uwb_scan_type {
166 UWB_SCAN_ONLY = 0,
167 UWB_SCAN_OUTSIDE_BP,
168 UWB_SCAN_WHILE_INACTIVE,
169 UWB_SCAN_DISABLED,
170 UWB_SCAN_ONLY_STARTTIME,
171 UWB_SCAN_TOP
172};
173
174
175/** ACK Policy types (MBOA MAC[7.2.1.3]) */
176enum uwb_ack_pol {
177 UWB_ACK_NO = 0,
178 UWB_ACK_INM = 1,
179 UWB_ACK_B = 2,
180 UWB_ACK_B_REQ = 3,
181};
182
183
184/** DRP reservation types ([ECMA-368 table 106) */
185enum uwb_drp_type {
186 UWB_DRP_TYPE_ALIEN_BP = 0,
187 UWB_DRP_TYPE_HARD,
188 UWB_DRP_TYPE_SOFT,
189 UWB_DRP_TYPE_PRIVATE,
190 UWB_DRP_TYPE_PCA,
191};
192
193
194/** DRP Reason Codes ([ECMA-368] table 107) */
195enum uwb_drp_reason {
196 UWB_DRP_REASON_ACCEPTED = 0,
197 UWB_DRP_REASON_CONFLICT,
198 UWB_DRP_REASON_PENDING,
199 UWB_DRP_REASON_DENIED,
200 UWB_DRP_REASON_MODIFIED,
201};
202
203/**
204 * DRP Notification Reason Codes (WHCI 0.95 [3.1.4.9])
205 */
206enum uwb_drp_notif_reason {
207 UWB_DRP_NOTIF_DRP_IE_RCVD = 0,
208 UWB_DRP_NOTIF_CONFLICT,
209 UWB_DRP_NOTIF_TERMINATE,
210};
211
212
213/** Allocation of MAS slots in a DRP request MBOA MAC[7.8.7] */
214struct uwb_drp_alloc {
215 __le16 zone_bm;
216 __le16 mas_bm;
217} __attribute__((packed));
218
219
220/** General MAC Header format (ECMA-368[16.2]) */
221struct uwb_mac_frame_hdr {
222 __le16 Frame_Control;
223 struct uwb_dev_addr DestAddr;
224 struct uwb_dev_addr SrcAddr;
225 __le16 Sequence_Control;
226 __le16 Access_Information;
227} __attribute__((packed));
228
229
230/**
231 * uwb_beacon_frame - a beacon frame including MAC headers
232 *
233 * [ECMA] section 16.3.
234 */
235struct uwb_beacon_frame {
236 struct uwb_mac_frame_hdr hdr;
237 struct uwb_mac_addr Device_Identifier; /* may be a NULL EUI-48 */
238 u8 Beacon_Slot_Number;
239 u8 Device_Control;
240 u8 IEData[];
241} __attribute__((packed));
242
243
244/** Information Element codes (MBOA MAC[T54]) */
245enum uwb_ie {
246 UWB_PCA_AVAILABILITY = 2,
247 UWB_IE_DRP_AVAILABILITY = 8,
248 UWB_IE_DRP = 9,
249 UWB_BP_SWITCH_IE = 11,
250 UWB_MAC_CAPABILITIES_IE = 12,
251 UWB_PHY_CAPABILITIES_IE = 13,
252 UWB_APP_SPEC_PROBE_IE = 15,
253 UWB_IDENTIFICATION_IE = 19,
254 UWB_MASTER_KEY_ID_IE = 20,
255 UWB_IE_WLP = 250, /* WiMedia Logical Link Control Protocol WLP 0.99 */
256 UWB_APP_SPEC_IE = 255,
257};
258
259
260/**
261 * Header common to all Information Elements (IEs)
262 */
263struct uwb_ie_hdr {
264 u8 element_id; /* enum uwb_ie */
265 u8 length;
266} __attribute__((packed));
267
268
269/** Dynamic Reservation Protocol IE (MBOA MAC[7.8.6]) */
270struct uwb_ie_drp {
271 struct uwb_ie_hdr hdr;
272 __le16 drp_control;
273 struct uwb_dev_addr dev_addr;
274 struct uwb_drp_alloc allocs[];
275} __attribute__((packed));
276
277static inline int uwb_ie_drp_type(struct uwb_ie_drp *ie)
278{
279 return (le16_to_cpu(ie->drp_control) >> 0) & 0x7;
280}
281
282static inline int uwb_ie_drp_stream_index(struct uwb_ie_drp *ie)
283{
284 return (le16_to_cpu(ie->drp_control) >> 3) & 0x7;
285}
286
287static inline int uwb_ie_drp_reason_code(struct uwb_ie_drp *ie)
288{
289 return (le16_to_cpu(ie->drp_control) >> 6) & 0x7;
290}
291
292static inline int uwb_ie_drp_status(struct uwb_ie_drp *ie)
293{
294 return (le16_to_cpu(ie->drp_control) >> 9) & 0x1;
295}
296
297static inline int uwb_ie_drp_owner(struct uwb_ie_drp *ie)
298{
299 return (le16_to_cpu(ie->drp_control) >> 10) & 0x1;
300}
301
302static inline int uwb_ie_drp_tiebreaker(struct uwb_ie_drp *ie)
303{
304 return (le16_to_cpu(ie->drp_control) >> 11) & 0x1;
305}
306
307static inline int uwb_ie_drp_unsafe(struct uwb_ie_drp *ie)
308{
309 return (le16_to_cpu(ie->drp_control) >> 12) & 0x1;
310}
311
312static inline void uwb_ie_drp_set_type(struct uwb_ie_drp *ie, enum uwb_drp_type type)
313{
314 u16 drp_control = le16_to_cpu(ie->drp_control);
315 drp_control = (drp_control & ~(0x7 << 0)) | (type << 0);
316 ie->drp_control = cpu_to_le16(drp_control);
317}
318
319static inline void uwb_ie_drp_set_stream_index(struct uwb_ie_drp *ie, int stream_index)
320{
321 u16 drp_control = le16_to_cpu(ie->drp_control);
322 drp_control = (drp_control & ~(0x7 << 3)) | (stream_index << 3);
323 ie->drp_control = cpu_to_le16(drp_control);
324}
325
326static inline void uwb_ie_drp_set_reason_code(struct uwb_ie_drp *ie,
327 enum uwb_drp_reason reason_code)
328{
329 u16 drp_control = le16_to_cpu(ie->drp_control);
330 drp_control = (ie->drp_control & ~(0x7 << 6)) | (reason_code << 6);
331 ie->drp_control = cpu_to_le16(drp_control);
332}
333
334static inline void uwb_ie_drp_set_status(struct uwb_ie_drp *ie, int status)
335{
336 u16 drp_control = le16_to_cpu(ie->drp_control);
337 drp_control = (drp_control & ~(0x1 << 9)) | (status << 9);
338 ie->drp_control = cpu_to_le16(drp_control);
339}
340
341static inline void uwb_ie_drp_set_owner(struct uwb_ie_drp *ie, int owner)
342{
343 u16 drp_control = le16_to_cpu(ie->drp_control);
344 drp_control = (drp_control & ~(0x1 << 10)) | (owner << 10);
345 ie->drp_control = cpu_to_le16(drp_control);
346}
347
348static inline void uwb_ie_drp_set_tiebreaker(struct uwb_ie_drp *ie, int tiebreaker)
349{
350 u16 drp_control = le16_to_cpu(ie->drp_control);
351 drp_control = (drp_control & ~(0x1 << 11)) | (tiebreaker << 11);
352 ie->drp_control = cpu_to_le16(drp_control);
353}
354
355static inline void uwb_ie_drp_set_unsafe(struct uwb_ie_drp *ie, int unsafe)
356{
357 u16 drp_control = le16_to_cpu(ie->drp_control);
358 drp_control = (drp_control & ~(0x1 << 12)) | (unsafe << 12);
359 ie->drp_control = cpu_to_le16(drp_control);
360}
361
362/** Dynamic Reservation Protocol IE (MBOA MAC[7.8.7]) */
363struct uwb_ie_drp_avail {
364 struct uwb_ie_hdr hdr;
365 DECLARE_BITMAP(bmp, UWB_NUM_MAS);
366} __attribute__((packed));
367
368/**
369 * The Vendor ID is set to an OUI that indicates the vendor of the device.
370 * ECMA-368 [16.8.10]
371 */
372struct uwb_vendor_id {
373 u8 data[3];
374} __attribute__((packed));
375
376/**
377 * The device type ID
378 * FIXME: clarify what this means
379 * ECMA-368 [16.8.10]
380 */
381struct uwb_device_type_id {
382 u8 data[3];
383} __attribute__((packed));
384
385
386/**
387 * UWB device information types
388 * ECMA-368 [16.8.10]
389 */
390enum uwb_dev_info_type {
391 UWB_DEV_INFO_VENDOR_ID = 0,
392 UWB_DEV_INFO_VENDOR_TYPE,
393 UWB_DEV_INFO_NAME,
394};
395
396/**
397 * UWB device information found in Identification IE
398 * ECMA-368 [16.8.10]
399 */
400struct uwb_dev_info {
401 u8 type; /* enum uwb_dev_info_type */
402 u8 length;
403 u8 data[];
404} __attribute__((packed));
405
406/**
407 * UWB Identification IE
408 * ECMA-368 [16.8.10]
409 */
410struct uwb_identification_ie {
411 struct uwb_ie_hdr hdr;
412 struct uwb_dev_info info[];
413} __attribute__((packed));
414
415/*
416 * UWB Radio Controller
417 *
418 * These definitions are common to the Radio Control layers as
419 * exported by the WUSB1.0 HWA and WHCI interfaces.
420 */
421
422/** Radio Control Command Block (WUSB1.0[Table 8-65] and WHCI 0.95) */
423struct uwb_rccb {
424 u8 bCommandType; /* enum hwa_cet */
425 __le16 wCommand; /* Command code */
426 u8 bCommandContext; /* Context ID */
427} __attribute__((packed));
428
429
430/** Radio Control Event Block (WUSB[table 8-66], WHCI 0.95) */
431struct uwb_rceb {
432 u8 bEventType; /* enum hwa_cet */
433 __le16 wEvent; /* Event code */
434 u8 bEventContext; /* Context ID */
435} __attribute__((packed));
436
437
438enum {
439 UWB_RC_CET_GENERAL = 0, /* General Command/Event type */
440 UWB_RC_CET_EX_TYPE_1 = 1, /* Extended Type 1 Command/Event type */
441};
442
443/* Commands to the radio controller */
444enum uwb_rc_cmd {
445 UWB_RC_CMD_CHANNEL_CHANGE = 16,
446 UWB_RC_CMD_DEV_ADDR_MGMT = 17, /* Device Address Management */
447 UWB_RC_CMD_GET_IE = 18, /* GET Information Elements */
448 UWB_RC_CMD_RESET = 19,
449 UWB_RC_CMD_SCAN = 20, /* Scan management */
450 UWB_RC_CMD_SET_BEACON_FILTER = 21,
451 UWB_RC_CMD_SET_DRP_IE = 22, /* Dynamic Reservation Protocol IEs */
452 UWB_RC_CMD_SET_IE = 23, /* Information Element management */
453 UWB_RC_CMD_SET_NOTIFICATION_FILTER = 24,
454 UWB_RC_CMD_SET_TX_POWER = 25,
455 UWB_RC_CMD_SLEEP = 26,
456 UWB_RC_CMD_START_BEACON = 27,
457 UWB_RC_CMD_STOP_BEACON = 28,
458 UWB_RC_CMD_BP_MERGE = 29,
459 UWB_RC_CMD_SEND_COMMAND_FRAME = 30,
460 UWB_RC_CMD_SET_ASIE_NOTIF = 31,
461};
462
463/* Notifications from the radio controller */
464enum uwb_rc_evt {
465 UWB_RC_EVT_IE_RCV = 0,
466 UWB_RC_EVT_BEACON = 1,
467 UWB_RC_EVT_BEACON_SIZE = 2,
468 UWB_RC_EVT_BPOIE_CHANGE = 3,
469 UWB_RC_EVT_BP_SLOT_CHANGE = 4,
470 UWB_RC_EVT_BP_SWITCH_IE_RCV = 5,
471 UWB_RC_EVT_DEV_ADDR_CONFLICT = 6,
472 UWB_RC_EVT_DRP_AVAIL = 7,
473 UWB_RC_EVT_DRP = 8,
474 UWB_RC_EVT_BP_SWITCH_STATUS = 9,
475 UWB_RC_EVT_CMD_FRAME_RCV = 10,
476 UWB_RC_EVT_CHANNEL_CHANGE_IE_RCV = 11,
477 /* Events (command responses) use the same code as the command */
478 UWB_RC_EVT_UNKNOWN_CMD_RCV = 65535,
479};
480
481enum uwb_rc_extended_type_1_cmd {
482 UWB_RC_SET_DAA_ENERGY_MASK = 32,
483 UWB_RC_SET_NOTIFICATION_FILTER_EX = 33,
484};
485
486enum uwb_rc_extended_type_1_evt {
487 UWB_RC_DAA_ENERGY_DETECTED = 0,
488};
489
490/* Radio Control Result Code. [WHCI] table 3-3. */
491enum {
492 UWB_RC_RES_SUCCESS = 0,
493 UWB_RC_RES_FAIL,
494 UWB_RC_RES_FAIL_HARDWARE,
495 UWB_RC_RES_FAIL_NO_SLOTS,
496 UWB_RC_RES_FAIL_BEACON_TOO_LARGE,
497 UWB_RC_RES_FAIL_INVALID_PARAMETER,
498 UWB_RC_RES_FAIL_UNSUPPORTED_PWR_LEVEL,
499 UWB_RC_RES_FAIL_INVALID_IE_DATA,
500 UWB_RC_RES_FAIL_BEACON_SIZE_EXCEEDED,
501 UWB_RC_RES_FAIL_CANCELLED,
502 UWB_RC_RES_FAIL_INVALID_STATE,
503 UWB_RC_RES_FAIL_INVALID_SIZE,
504 UWB_RC_RES_FAIL_ACK_NOT_RECEIVED,
505 UWB_RC_RES_FAIL_NO_MORE_ASIE_NOTIF,
506 UWB_RC_RES_FAIL_TIME_OUT = 255,
507};
508
509/* Confirm event. [WHCI] section 3.1.3.1 etc. */
510struct uwb_rc_evt_confirm {
511 struct uwb_rceb rceb;
512 u8 bResultCode;
513} __attribute__((packed));
514
515/* Device Address Management event. [WHCI] section 3.1.3.2. */
516struct uwb_rc_evt_dev_addr_mgmt {
517 struct uwb_rceb rceb;
518 u8 baAddr[6];
519 u8 bResultCode;
520} __attribute__((packed));
521
522
523/* Get IE Event. [WHCI] section 3.1.3.3. */
524struct uwb_rc_evt_get_ie {
525 struct uwb_rceb rceb;
526 __le16 wIELength;
527 u8 IEData[];
528} __attribute__((packed));
529
530/* Set DRP IE Event. [WHCI] section 3.1.3.7. */
531struct uwb_rc_evt_set_drp_ie {
532 struct uwb_rceb rceb;
533 __le16 wRemainingSpace;
534 u8 bResultCode;
535} __attribute__((packed));
536
537/* Set IE Event. [WHCI] section 3.1.3.8. */
538struct uwb_rc_evt_set_ie {
539 struct uwb_rceb rceb;
540 __le16 RemainingSpace;
541 u8 bResultCode;
542} __attribute__((packed));
543
544/* Scan command. [WHCI] 3.1.3.5. */
545struct uwb_rc_cmd_scan {
546 struct uwb_rccb rccb;
547 u8 bChannelNumber;
548 u8 bScanState;
549 __le16 wStartTime;
550} __attribute__((packed));
551
552/* Set DRP IE command. [WHCI] section 3.1.3.7. */
553struct uwb_rc_cmd_set_drp_ie {
554 struct uwb_rccb rccb;
555 __le16 wIELength;
556 struct uwb_ie_drp IEData[];
557} __attribute__((packed));
558
559/* Set IE command. [WHCI] section 3.1.3.8. */
560struct uwb_rc_cmd_set_ie {
561 struct uwb_rccb rccb;
562 __le16 wIELength;
563 u8 IEData[];
564} __attribute__((packed));
565
566/* Set DAA Energy Mask event. [WHCI 0.96] section 3.1.3.17. */
567struct uwb_rc_evt_set_daa_energy_mask {
568 struct uwb_rceb rceb;
569 __le16 wLength;
570 u8 result;
571} __attribute__((packed));
572
573/* Set Notification Filter Extended event. [WHCI 0.96] section 3.1.3.18. */
574struct uwb_rc_evt_set_notification_filter_ex {
575 struct uwb_rceb rceb;
576 __le16 wLength;
577 u8 result;
578} __attribute__((packed));
579
580/* IE Received notification. [WHCI] section 3.1.4.1. */
581struct uwb_rc_evt_ie_rcv {
582 struct uwb_rceb rceb;
583 struct uwb_dev_addr SrcAddr;
584 __le16 wIELength;
585 u8 IEData[];
586} __attribute__((packed));
587
588/* Type of the received beacon. [WHCI] section 3.1.4.2. */
589enum uwb_rc_beacon_type {
590 UWB_RC_BEACON_TYPE_SCAN = 0,
591 UWB_RC_BEACON_TYPE_NEIGHBOR,
592 UWB_RC_BEACON_TYPE_OL_ALIEN,
593 UWB_RC_BEACON_TYPE_NOL_ALIEN,
594};
595
596/* Beacon received notification. [WHCI] 3.1.4.2. */
597struct uwb_rc_evt_beacon {
598 struct uwb_rceb rceb;
599 u8 bChannelNumber;
600 u8 bBeaconType;
601 __le16 wBPSTOffset;
602 u8 bLQI;
603 u8 bRSSI;
604 __le16 wBeaconInfoLength;
605 u8 BeaconInfo[];
606} __attribute__((packed));
607
608
609/* Beacon Size Change notification. [WHCI] section 3.1.4.3 */
610struct uwb_rc_evt_beacon_size {
611 struct uwb_rceb rceb;
612 __le16 wNewBeaconSize;
613} __attribute__((packed));
614
615
616/* BPOIE Change notification. [WHCI] section 3.1.4.4. */
617struct uwb_rc_evt_bpoie_change {
618 struct uwb_rceb rceb;
619 __le16 wBPOIELength;
620 u8 BPOIE[];
621} __attribute__((packed));
622
623
624/* Beacon Slot Change notification. [WHCI] section 3.1.4.5. */
625struct uwb_rc_evt_bp_slot_change {
626 struct uwb_rceb rceb;
627 u8 slot_info;
628} __attribute__((packed));
629
630static inline int uwb_rc_evt_bp_slot_change_slot_num(
631 const struct uwb_rc_evt_bp_slot_change *evt)
632{
633 return evt->slot_info & 0x7f;
634}
635
636static inline int uwb_rc_evt_bp_slot_change_no_slot(
637 const struct uwb_rc_evt_bp_slot_change *evt)
638{
639 return (evt->slot_info & 0x80) >> 7;
640}
641
642/* BP Switch IE Received notification. [WHCI] section 3.1.4.6. */
643struct uwb_rc_evt_bp_switch_ie_rcv {
644 struct uwb_rceb rceb;
645 struct uwb_dev_addr wSrcAddr;
646 __le16 wIELength;
647 u8 IEData[];
648} __attribute__((packed));
649
650/* DevAddr Conflict notification. [WHCI] section 3.1.4.7. */
651struct uwb_rc_evt_dev_addr_conflict {
652 struct uwb_rceb rceb;
653} __attribute__((packed));
654
655/* DRP notification. [WHCI] section 3.1.4.9. */
656struct uwb_rc_evt_drp {
657 struct uwb_rceb rceb;
658 struct uwb_dev_addr src_addr;
659 u8 reason;
660 u8 beacon_slot_number;
661 __le16 ie_length;
662 u8 ie_data[];
663} __attribute__((packed));
664
665static inline enum uwb_drp_notif_reason uwb_rc_evt_drp_reason(struct uwb_rc_evt_drp *evt)
666{
667 return evt->reason & 0x0f;
668}
669
670
671/* DRP Availability Change notification. [WHCI] section 3.1.4.8. */
672struct uwb_rc_evt_drp_avail {
673 struct uwb_rceb rceb;
674 DECLARE_BITMAP(bmp, UWB_NUM_MAS);
675} __attribute__((packed));
676
677/* BP switch status notification. [WHCI] section 3.1.4.10. */
678struct uwb_rc_evt_bp_switch_status {
679 struct uwb_rceb rceb;
680 u8 status;
681 u8 slot_offset;
682 __le16 bpst_offset;
683 u8 move_countdown;
684} __attribute__((packed));
685
686/* Command Frame Received notification. [WHCI] section 3.1.4.11. */
687struct uwb_rc_evt_cmd_frame_rcv {
688 struct uwb_rceb rceb;
689 __le16 receive_time;
690 struct uwb_dev_addr wSrcAddr;
691 struct uwb_dev_addr wDstAddr;
692 __le16 control;
693 __le16 reserved;
694 __le16 dataLength;
695 u8 data[];
696} __attribute__((packed));
697
698/* Channel Change IE Received notification. [WHCI] section 3.1.4.12. */
699struct uwb_rc_evt_channel_change_ie_rcv {
700 struct uwb_rceb rceb;
701 struct uwb_dev_addr wSrcAddr;
702 __le16 wIELength;
703 u8 IEData[];
704} __attribute__((packed));
705
706/* DAA Energy Detected notification. [WHCI 0.96] section 3.1.4.14. */
707struct uwb_rc_evt_daa_energy_detected {
708 struct uwb_rceb rceb;
709 __le16 wLength;
710 u8 bandID;
711 u8 reserved;
712 u8 toneBmp[16];
713} __attribute__((packed));
714
715
716/**
717 * Radio Control Interface Class Descriptor
718 *
719 * WUSB 1.0 [8.6.1.2]
720 */
721struct uwb_rc_control_intf_class_desc {
722 u8 bLength;
723 u8 bDescriptorType;
724 __le16 bcdRCIVersion;
725} __attribute__((packed));
726
727#endif /* #ifndef __LINUX__UWB_SPEC_H__ */
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h
new file mode 100644
index 000000000000..36a39e34f8d7
--- /dev/null
+++ b/include/linux/uwb/umc.h
@@ -0,0 +1,194 @@
1/*
2 * UWB Multi-interface Controller support.
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * This file is released under the GPLv2
7 *
8 * UMC (UWB Multi-interface Controller) capabilities (e.g., radio
9 * controller, host controller) are presented as devices on the "umc"
10 * bus.
11 *
12 * The radio controller is not strictly a UMC capability but it's
13 * useful to present it as such.
14 *
15 * References:
16 *
17 * [WHCI] Wireless Host Controller Interface Specification for
18 * Certified Wireless Universal Serial Bus, revision 0.95.
19 *
20 * How this works is kind of convoluted but simple. The whci.ko driver
21 * loads when WHCI devices are detected. These WHCI devices expose
22 * many devices in the same PCI function (they couldn't have reused
23 * functions, no), so for each PCI function that exposes these many
24 * devices, whci ceates a umc_dev [whci_probe() -> whci_add_cap()]
25 * with umc_device_create() and adds it to the bus with
26 * umc_device_register().
27 *
28 * umc_device_register() calls device_register() which will push the
29 * bus management code to load your UMC driver's somehting_probe()
30 * that you have registered for that capability code.
31 *
32 * Now when the WHCI device is removed, whci_remove() will go over
33 * each umc_dev assigned to each of the PCI function's capabilities
34 * and through whci_del_cap() call umc_device_unregister() each
35 * created umc_dev. Of course, if you are bound to the device, your
36 * driver's something_remove() will be called.
37 */
38
39#ifndef _LINUX_UWB_UMC_H_
40#define _LINUX_UWB_UMC_H_
41
42#include <linux/device.h>
43#include <linux/pci.h>
44
45/*
46 * UMC capability IDs.
47 *
48 * 0x00 is reserved so use it for the radio controller device.
49 *
50 * [WHCI] table 2-8
51 */
52#define UMC_CAP_ID_WHCI_RC 0x00 /* radio controller */
53#define UMC_CAP_ID_WHCI_WUSB_HC 0x01 /* WUSB host controller */
54
55/**
56 * struct umc_dev - UMC capability device
57 *
58 * @version: version of the specification this capability conforms to.
59 * @cap_id: capability ID.
60 * @bar: PCI Bar (64 bit) where the resource lies
61 * @resource: register space resource.
62 * @irq: interrupt line.
63 */
64struct umc_dev {
65 u16 version;
66 u8 cap_id;
67 u8 bar;
68 struct resource resource;
69 unsigned irq;
70 struct device dev;
71};
72
73#define to_umc_dev(d) container_of(d, struct umc_dev, dev)
74
75/**
76 * struct umc_driver - UMC capability driver
77 * @cap_id: supported capability ID.
78 * @match: driver specific capability matching function.
79 * @match_data: driver specific data for match() (e.g., a
80 * table of pci_device_id's if umc_match_pci_id() is used).
81 */
82struct umc_driver {
83 char *name;
84 u8 cap_id;
85 int (*match)(struct umc_driver *, struct umc_dev *);
86 const void *match_data;
87
88 int (*probe)(struct umc_dev *);
89 void (*remove)(struct umc_dev *);
90 int (*suspend)(struct umc_dev *, pm_message_t state);
91 int (*resume)(struct umc_dev *);
92
93 struct device_driver driver;
94};
95
96#define to_umc_driver(d) container_of(d, struct umc_driver, driver)
97
98extern struct bus_type umc_bus_type;
99
100struct umc_dev *umc_device_create(struct device *parent, int n);
101int __must_check umc_device_register(struct umc_dev *umc);
102void umc_device_unregister(struct umc_dev *umc);
103
104int __must_check __umc_driver_register(struct umc_driver *umc_drv,
105 struct module *mod,
106 const char *mod_name);
107
108/**
109 * umc_driver_register - register a UMC capabiltity driver.
110 * @umc_drv: pointer to the driver.
111 */
112static inline int __must_check umc_driver_register(struct umc_driver *umc_drv)
113{
114 return __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME);
115}
116void umc_driver_unregister(struct umc_driver *umc_drv);
117
118/*
119 * Utility function you can use to match (umc_driver->match) against a
120 * null-terminated array of 'struct pci_device_id' in
121 * umc_driver->match_data.
122 */
123int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc);
124
125/**
126 * umc_parent_pci_dev - return the UMC's parent PCI device or NULL if none
127 * @umc_dev: UMC device whose parent PCI device we are looking for
128 *
129 * DIRTY!!! DON'T RELY ON THIS
130 *
131 * FIXME: This is as dirty as it gets, but we need some way to check
132 * the correct type of umc_dev->parent (so that for example, we can
133 * cast to pci_dev). Casting to pci_dev is necesary because at some
134 * point we need to request resources from the device. Mapping is
135 * easily over come (ioremap and stuff are bus agnostic), but hooking
136 * up to some error handlers (such as pci error handlers) might need
137 * this.
138 *
139 * THIS might (probably will) be removed in the future, so don't count
140 * on it.
141 */
142static inline struct pci_dev *umc_parent_pci_dev(struct umc_dev *umc_dev)
143{
144 struct pci_dev *pci_dev = NULL;
145 if (umc_dev->dev.parent->bus == &pci_bus_type)
146 pci_dev = to_pci_dev(umc_dev->dev.parent);
147 return pci_dev;
148}
149
150/**
151 * umc_dev_get() - reference a UMC device.
152 * @umc_dev: Pointer to UMC device.
153 *
154 * NOTE: we are assuming in this whole scheme that the parent device
155 * is referenced at _probe() time and unreferenced at _remove()
156 * time by the parent's subsystem.
157 */
158static inline struct umc_dev *umc_dev_get(struct umc_dev *umc_dev)
159{
160 get_device(&umc_dev->dev);
161 return umc_dev;
162}
163
164/**
165 * umc_dev_put() - unreference a UMC device.
166 * @umc_dev: Pointer to UMC device.
167 */
168static inline void umc_dev_put(struct umc_dev *umc_dev)
169{
170 put_device(&umc_dev->dev);
171}
172
173/**
174 * umc_set_drvdata - set UMC device's driver data.
175 * @umc_dev: Pointer to UMC device.
176 * @data: Data to set.
177 */
178static inline void umc_set_drvdata(struct umc_dev *umc_dev, void *data)
179{
180 dev_set_drvdata(&umc_dev->dev, data);
181}
182
183/**
184 * umc_get_drvdata - recover UMC device's driver data.
185 * @umc_dev: Pointer to UMC device.
186 */
187static inline void *umc_get_drvdata(struct umc_dev *umc_dev)
188{
189 return dev_get_drvdata(&umc_dev->dev);
190}
191
192int umc_controller_reset(struct umc_dev *umc);
193
194#endif /* #ifndef _LINUX_UWB_UMC_H_ */
diff --git a/include/linux/uwb/whci.h b/include/linux/uwb/whci.h
new file mode 100644
index 000000000000..915ec23042d4
--- /dev/null
+++ b/include/linux/uwb/whci.h
@@ -0,0 +1,117 @@
1/*
2 * Wireless Host Controller Interface for Ultra-Wide-Band and Wireless USB
3 *
4 * Copyright (C) 2005-2006 Intel Corporation
5 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version
9 * 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301, USA.
20 *
21 *
22 *
23 * References:
24 * [WHCI] Wireless Host Controller Interface Specification for
25 * Certified Wireless Universal Serial Bus, revision 0.95.
26 */
27#ifndef _LINUX_UWB_WHCI_H_
28#define _LINUX_UWB_WHCI_H_
29
30#include <linux/pci.h>
31
32/*
33 * UWB interface capability registers (offsets from UWBBASE)
34 *
35 * [WHCI] section 2.2
36 */
37#define UWBCAPINFO 0x00 /* == UWBCAPDATA(0) */
38# define UWBCAPINFO_TO_N_CAPS(c) (((c) >> 0) & 0xFull)
39#define UWBCAPDATA(n) (8*(n))
40# define UWBCAPDATA_TO_VERSION(c) (((c) >> 32) & 0xFFFFull)
41# define UWBCAPDATA_TO_OFFSET(c) (((c) >> 18) & 0x3FFFull)
42# define UWBCAPDATA_TO_BAR(c) (((c) >> 16) & 0x3ull)
43# define UWBCAPDATA_TO_SIZE(c) ((((c) >> 8) & 0xFFull) * sizeof(u32))
44# define UWBCAPDATA_TO_CAP_ID(c) (((c) >> 0) & 0xFFull)
45
46/* Size of the WHCI capability data (including the RC capability) for
47 a device with n capabilities. */
48#define UWBCAPDATA_SIZE(n) (8 + 8*(n))
49
50
51/*
52 * URC registers (offsets from URCBASE)
53 *
54 * [WHCI] section 2.3
55 */
56#define URCCMD 0x00
57# define URCCMD_RESET (1 << 31) /* UMC Hardware reset */
58# define URCCMD_RS (1 << 30) /* Run/Stop */
59# define URCCMD_EARV (1 << 29) /* Event Address Register Valid */
60# define URCCMD_ACTIVE (1 << 15) /* Command is active */
61# define URCCMD_IWR (1 << 14) /* Interrupt When Ready */
62# define URCCMD_SIZE_MASK 0x00000fff /* Command size mask */
63#define URCSTS 0x04
64# define URCSTS_EPS (1 << 17) /* Event Processing Status */
65# define URCSTS_HALTED (1 << 16) /* RC halted */
66# define URCSTS_HSE (1 << 10) /* Host System Error...fried */
67# define URCSTS_ER (1 << 9) /* Event Ready */
68# define URCSTS_RCI (1 << 8) /* Ready for Command Interrupt */
69# define URCSTS_INT_MASK 0x00000700 /* URC interrupt sources */
70# define URCSTS_ISI 0x000000ff /* Interrupt Source Identification */
71#define URCINTR 0x08
72# define URCINTR_EN_ALL 0x000007ff /* Enable all interrupt sources */
73#define URCCMDADDR 0x10
74#define URCEVTADDR 0x18
75# define URCEVTADDR_OFFSET_MASK 0xfff /* Event pointer offset mask */
76
77
78/** Write 32 bit @value to little endian register at @addr */
79static inline
80void le_writel(u32 value, void __iomem *addr)
81{
82 iowrite32(value, addr);
83}
84
85
86/** Read from 32 bit little endian register at @addr */
87static inline
88u32 le_readl(void __iomem *addr)
89{
90 return ioread32(addr);
91}
92
93
94/** Write 64 bit @value to little endian register at @addr */
95static inline
96void le_writeq(u64 value, void __iomem *addr)
97{
98 iowrite32(value, addr);
99 iowrite32(value >> 32, addr + 4);
100}
101
102
103/** Read from 64 bit little endian register at @addr */
104static inline
105u64 le_readq(void __iomem *addr)
106{
107 u64 value;
108 value = ioread32(addr);
109 value |= (u64)ioread32(addr + 4) << 32;
110 return value;
111}
112
113extern int whci_wait_for(struct device *dev, u32 __iomem *reg,
114 u32 mask, u32 result,
115 unsigned long max_ms, const char *tag);
116
117#endif /* #ifndef _LINUX_UWB_WHCI_H_ */
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index d4b03034ee73..1f126e30766c 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -293,6 +293,7 @@ struct v4l2_pix_format {
293#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ 293#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */
294#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ 294#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */
295#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ 295#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */
296#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
296#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ 297#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */
297#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16 YVU411 planar */ 298#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16 YVU411 planar */
298#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ 299#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */
@@ -304,6 +305,8 @@ struct v4l2_pix_format {
304/* two planes -- one Y, one Cr + Cb interleaved */ 305/* two planes -- one Y, one Cr + Cb interleaved */
305#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ 306#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
306#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ 307#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */
308#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
309#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
307 310
308/* The following formats are not defined in the V4L2 specification */ 311/* The following formats are not defined in the V4L2 specification */
309#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ 312#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
@@ -315,6 +318,13 @@ struct v4l2_pix_format {
315/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ 318/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
316#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 319#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
317#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 320#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
321/*
322 * 10bit raw bayer, expanded to 16 bits
323 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
324 */
325#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
326/* 10bit raw bayer DPCM compressed to 8 bits */
327#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
318#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ 328#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
319 329
320/* compressed formats */ 330/* compressed formats */
@@ -1043,7 +1053,7 @@ enum v4l2_mpeg_video_bitrate_mode {
1043#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210) 1053#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
1044#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211) 1054#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
1045 1055
1046/* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */ 1056/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
1047#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) 1057#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
1048#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) 1058#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
1049enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { 1059enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
@@ -1110,6 +1120,12 @@ enum v4l2_exposure_auto_type {
1110#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) 1120#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11)
1111#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) 1121#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12)
1112 1122
1123#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13)
1124#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14)
1125#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15)
1126
1127#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
1128
1113/* 1129/*
1114 * T U N I N G 1130 * T U N I N G
1115 */ 1131 */
@@ -1362,6 +1378,7 @@ struct v4l2_streamparm {
1362#define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ 1378#define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */
1363#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver ID */ 1379#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver ID */
1364#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ 1380#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
1381#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */
1365 1382
1366struct v4l2_register { 1383struct v4l2_register {
1367 __u32 match_type; /* Match type */ 1384 __u32 match_type; /* Match type */
@@ -1451,6 +1468,8 @@ struct v4l2_chip_ident {
1451#define VIDIOC_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_chip_ident) 1468#define VIDIOC_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_chip_ident)
1452#endif 1469#endif
1453#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) 1470#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
1471/* Reminder: when adding new ioctls please add support for them to
1472 drivers/media/video/v4l2-compat-ioctl32.c as well! */
1454 1473
1455#ifdef __OLD_VIDIOC_ 1474#ifdef __OLD_VIDIOC_
1456/* for compatibility, will go away some day */ 1475/* for compatibility, will go away some day */
diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h
index c30c7bfbf39b..8726ff77763e 100644
--- a/include/linux/virtio_balloon.h
+++ b/include/linux/virtio_balloon.h
@@ -10,6 +10,9 @@
10/* The feature bitmap for virtio balloon */ 10/* The feature bitmap for virtio balloon */
11#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ 11#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
12 12
13/* Size of a PFN in the balloon interface. */
14#define VIRTIO_BALLOON_PFN_SHIFT 12
15
13struct virtio_balloon_config 16struct virtio_balloon_config
14{ 17{
15 /* Number of pages host wants Guest to give up. */ 18 /* Number of pages host wants Guest to give up. */
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h
index 19a0da0dba41..7615ffcdd555 100644
--- a/include/linux/virtio_console.h
+++ b/include/linux/virtio_console.h
@@ -7,6 +7,17 @@
7/* The ID for virtio console */ 7/* The ID for virtio console */
8#define VIRTIO_ID_CONSOLE 3 8#define VIRTIO_ID_CONSOLE 3
9 9
10/* Feature bits */
11#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */
12
13struct virtio_console_config {
14 /* colums of the screens */
15 __u16 cols;
16 /* rows of the screens */
17 __u16 rows;
18} __attribute__((packed));
19
20
10#ifdef __KERNEL__ 21#ifdef __KERNEL__
11int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); 22int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int));
12#endif /* __KERNEL__ */ 23#endif /* __KERNEL__ */
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 5e33761b9b8a..5cdd0aa8bde9 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -20,6 +20,7 @@
20#define VIRTIO_NET_F_HOST_TSO6 12 /* Host can handle TSOv6 in. */ 20#define VIRTIO_NET_F_HOST_TSO6 12 /* Host can handle TSOv6 in. */
21#define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ 21#define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */
22#define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ 22#define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */
23#define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */
23 24
24struct virtio_net_config 25struct virtio_net_config
25{ 26{
@@ -44,4 +45,12 @@ struct virtio_net_hdr
44 __u16 csum_start; /* Position to start checksumming from */ 45 __u16 csum_start; /* Position to start checksumming from */
45 __u16 csum_offset; /* Offset after that to place checksum */ 46 __u16 csum_offset; /* Offset after that to place checksum */
46}; 47};
48
49/* This is the version of the header to use when the MRG_RXBUF
50 * feature has been negotiated. */
51struct virtio_net_hdr_mrg_rxbuf {
52 struct virtio_net_hdr hdr;
53 __u16 num_buffers; /* Number of merged rx buffers */
54};
55
47#endif /* _LINUX_VIRTIO_NET_H */ 56#endif /* _LINUX_VIRTIO_NET_H */
diff --git a/include/linux/virtio_pci.h b/include/linux/virtio_pci.h
index cdef35742932..cd0fd5d181a6 100644
--- a/include/linux/virtio_pci.h
+++ b/include/linux/virtio_pci.h
@@ -53,4 +53,12 @@
53 53
54/* Virtio ABI version, this must match exactly */ 54/* Virtio ABI version, this must match exactly */
55#define VIRTIO_PCI_ABI_VERSION 0 55#define VIRTIO_PCI_ABI_VERSION 0
56
57/* How many bits to shift physical queue address written to QUEUE_PFN.
58 * 12 is historical, and due to x86 page size. */
59#define VIRTIO_PCI_QUEUE_ADDR_SHIFT 12
60
61/* The alignment to use between consumer and producer parts of vring.
62 * x86 pagesize again. */
63#define VIRTIO_PCI_VRING_ALIGN 4096
56#endif 64#endif
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h
index c4a598fb3826..71e03722fb59 100644
--- a/include/linux/virtio_ring.h
+++ b/include/linux/virtio_ring.h
@@ -83,7 +83,7 @@ struct vring {
83 * __u16 avail_idx; 83 * __u16 avail_idx;
84 * __u16 available[num]; 84 * __u16 available[num];
85 * 85 *
86 * // Padding to the next page boundary. 86 * // Padding to the next align boundary.
87 * char pad[]; 87 * char pad[];
88 * 88 *
89 * // A ring of used descriptor heads with free-running index. 89 * // A ring of used descriptor heads with free-running index.
@@ -93,19 +93,19 @@ struct vring {
93 * }; 93 * };
94 */ 94 */
95static inline void vring_init(struct vring *vr, unsigned int num, void *p, 95static inline void vring_init(struct vring *vr, unsigned int num, void *p,
96 unsigned long pagesize) 96 unsigned long align)
97{ 97{
98 vr->num = num; 98 vr->num = num;
99 vr->desc = p; 99 vr->desc = p;
100 vr->avail = p + num*sizeof(struct vring_desc); 100 vr->avail = p + num*sizeof(struct vring_desc);
101 vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + pagesize-1) 101 vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + align-1)
102 & ~(pagesize - 1)); 102 & ~(align - 1));
103} 103}
104 104
105static inline unsigned vring_size(unsigned int num, unsigned long pagesize) 105static inline unsigned vring_size(unsigned int num, unsigned long align)
106{ 106{
107 return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (2 + num) 107 return ((sizeof(struct vring_desc) * num + sizeof(__u16) * (2 + num)
108 + pagesize - 1) & ~(pagesize - 1)) 108 + align - 1) & ~(align - 1))
109 + sizeof(__u16) * 2 + sizeof(struct vring_used_elem) * num; 109 + sizeof(__u16) * 2 + sizeof(struct vring_used_elem) * num;
110} 110}
111 111
@@ -115,6 +115,7 @@ struct virtio_device;
115struct virtqueue; 115struct virtqueue;
116 116
117struct virtqueue *vring_new_virtqueue(unsigned int num, 117struct virtqueue *vring_new_virtqueue(unsigned int num,
118 unsigned int vring_align,
118 struct virtio_device *vdev, 119 struct virtio_device *vdev,
119 void *pages, 120 void *pages,
120 void (*notify)(struct virtqueue *vq), 121 void (*notify)(struct virtqueue *vq),
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 328eb4022727..307b88577eaa 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -2,6 +2,7 @@
2#define _LINUX_VMALLOC_H 2#define _LINUX_VMALLOC_H
3 3
4#include <linux/spinlock.h> 4#include <linux/spinlock.h>
5#include <linux/init.h>
5#include <asm/page.h> /* pgprot_t */ 6#include <asm/page.h> /* pgprot_t */
6 7
7struct vm_area_struct; /* vma defining user mapping in mm_types.h */ 8struct vm_area_struct; /* vma defining user mapping in mm_types.h */
@@ -23,7 +24,6 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
23#endif 24#endif
24 25
25struct vm_struct { 26struct vm_struct {
26 /* keep next,addr,size together to speedup lookups */
27 struct vm_struct *next; 27 struct vm_struct *next;
28 void *addr; 28 void *addr;
29 unsigned long size; 29 unsigned long size;
@@ -37,6 +37,19 @@ struct vm_struct {
37/* 37/*
38 * Highlevel APIs for driver use 38 * Highlevel APIs for driver use
39 */ 39 */
40extern void vm_unmap_ram(const void *mem, unsigned int count);
41extern void *vm_map_ram(struct page **pages, unsigned int count,
42 int node, pgprot_t prot);
43extern void vm_unmap_aliases(void);
44
45#ifdef CONFIG_MMU
46extern void __init vmalloc_init(void);
47#else
48static inline void vmalloc_init(void)
49{
50}
51#endif
52
40extern void *vmalloc(unsigned long size); 53extern void *vmalloc(unsigned long size);
41extern void *vmalloc_user(unsigned long size); 54extern void *vmalloc_user(unsigned long size);
42extern void *vmalloc_node(unsigned long size, int node); 55extern void *vmalloc_node(unsigned long size, int node);
@@ -90,6 +103,4 @@ extern void free_vm_area(struct vm_struct *area);
90extern rwlock_t vmlist_lock; 103extern rwlock_t vmlist_lock;
91extern struct vm_struct *vmlist; 104extern struct vm_struct *vmlist;
92 105
93extern const struct seq_operations vmalloc_op;
94
95#endif /* _LINUX_VMALLOC_H */ 106#endif /* _LINUX_VMALLOC_H */
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 58334d439516..524cd1b28ecb 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -41,13 +41,19 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
41#ifdef CONFIG_HUGETLB_PAGE 41#ifdef CONFIG_HUGETLB_PAGE
42 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, 42 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
43#endif 43#endif
44#ifdef CONFIG_UNEVICTABLE_LRU
45 UNEVICTABLE_PGCULLED, /* culled to noreclaim list */
46 UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */
47 UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */
48 UNEVICTABLE_PGMLOCKED,
49 UNEVICTABLE_PGMUNLOCKED,
50 UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
51 UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
52 UNEVICTABLE_MLOCKFREED,
53#endif
44 NR_VM_EVENT_ITEMS 54 NR_VM_EVENT_ITEMS
45}; 55};
46 56
47extern const struct seq_operations fragmentation_op;
48extern const struct seq_operations pagetypeinfo_op;
49extern const struct seq_operations zoneinfo_op;
50extern const struct seq_operations vmstat_op;
51extern int sysctl_stat_interval; 57extern int sysctl_stat_interval;
52 58
53#ifdef CONFIG_VM_EVENT_COUNTERS 59#ifdef CONFIG_VM_EVENT_COUNTERS
@@ -159,6 +165,16 @@ static inline unsigned long zone_page_state(struct zone *zone,
159 return x; 165 return x;
160} 166}
161 167
168extern unsigned long global_lru_pages(void);
169
170static inline unsigned long zone_lru_pages(struct zone *zone)
171{
172 return (zone_page_state(zone, NR_ACTIVE_ANON)
173 + zone_page_state(zone, NR_ACTIVE_FILE)
174 + zone_page_state(zone, NR_INACTIVE_ANON)
175 + zone_page_state(zone, NR_INACTIVE_FILE));
176}
177
162#ifdef CONFIG_NUMA 178#ifdef CONFIG_NUMA
163/* 179/*
164 * Determine the per node value of a stat item. This function 180 * Determine the per node value of a stat item. This function
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 0081147a9fe8..ef609f842fac 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -108,15 +108,6 @@ static inline int waitqueue_active(wait_queue_head_t *q)
108 return !list_empty(&q->task_list); 108 return !list_empty(&q->task_list);
109} 109}
110 110
111/*
112 * Used to distinguish between sync and async io wait context:
113 * sync i/o typically specifies a NULL wait queue entry or a wait
114 * queue entry bound to a task (current task) to wake up.
115 * aio specifies a wait queue entry with an async notification
116 * callback routine, not associated with any task.
117 */
118#define is_sync_wait(wait) (!(wait) || ((wait)->private))
119
120extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); 111extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
121extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait); 112extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait);
122extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); 113extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
diff --git a/include/linux/wlp.h b/include/linux/wlp.h
new file mode 100644
index 000000000000..033545e145c7
--- /dev/null
+++ b/include/linux/wlp.h
@@ -0,0 +1,735 @@
1/*
2 * WiMedia Logical Link Control Protocol (WLP)
3 *
4 * Copyright (C) 2005-2006 Intel Corporation
5 * Reinette Chatre <reinette.chatre@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version
9 * 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301, USA.
20 *
21 *
22 * FIXME: docs
23 *
24 * - Does not (yet) include support for WLP control frames
25 * WLP Draft 0.99 [6.5].
26 *
27 * A visual representation of the data structures.
28 *
29 * wssidB wssidB
30 * ^ ^
31 * | |
32 * wssidA wssidA
33 * wlp interface { ^ ^
34 * ... | |
35 * ... ... wssid wssid ...
36 * wlp --- ... | |
37 * }; neighbors --> neighbA --> neighbB
38 * ...
39 * wss
40 * ...
41 * eda cache --> neighborA --> neighborB --> neighborC ...
42 */
43
44#ifndef __LINUX__WLP_H_
45#define __LINUX__WLP_H_
46
47#include <linux/netdevice.h>
48#include <linux/skbuff.h>
49#include <linux/list.h>
50#include <linux/uwb.h>
51
52/**
53 * WLP Protocol ID
54 * WLP Draft 0.99 [6.2]
55 *
56 * The MUX header for all WLP frames
57 */
58#define WLP_PROTOCOL_ID 0x0100
59
60/**
61 * WLP Version
62 * WLP version placed in the association frames (WLP 0.99 [6.6])
63 */
64#define WLP_VERSION 0x10
65
66/**
67 * Bytes needed to print UUID as string
68 */
69#define WLP_WSS_UUID_STRSIZE 48
70
71/**
72 * Bytes needed to print nonce as string
73 */
74#define WLP_WSS_NONCE_STRSIZE 48
75
76
77/**
78 * Size used for WLP name size
79 *
80 * The WSS name is set to 65 bytes, 1 byte larger than the maximum
81 * allowed by the WLP spec. This is to have a null terminated string
82 * for display to the user. A maximum of 64 bytes will still be used
83 * when placing the WSS name field in association frames.
84 */
85#define WLP_WSS_NAME_SIZE 65
86
87/**
88 * Number of bytes added by WLP to data frame
89 *
90 * A data frame transmitted from a host will be placed in a Standard or
91 * Abbreviated WLP frame. These have an extra 4 bytes of header (struct
92 * wlp_frame_std_abbrv_hdr).
93 * When the stack sends this data frame for transmission it needs to ensure
94 * there is enough headroom for this header.
95 */
96#define WLP_DATA_HLEN 4
97
98/**
99 * State of device regarding WLP Service Set
100 *
101 * WLP_WSS_STATE_NONE: the host does not participate in any WSS
102 * WLP_WSS_STATE_PART_ENROLLED: used as part of the enrollment sequence
103 * ("Partial Enroll"). This state is used to
104 * indicate the first part of enrollment that is
105 * unsecure. If the WSS is unsecure then the
106 * state will promptly go to WLP_WSS_STATE_ENROLLED,
107 * if the WSS is not secure then the enrollment
108 * procedure is a few more steps before we are
109 * enrolled.
110 * WLP_WSS_STATE_ENROLLED: the host is enrolled in a WSS
111 * WLP_WSS_STATE_ACTIVE: WSS is activated
112 * WLP_WSS_STATE_CONNECTED: host is connected to neighbor in WSS
113 *
114 */
115enum wlp_wss_state {
116 WLP_WSS_STATE_NONE = 0,
117 WLP_WSS_STATE_PART_ENROLLED,
118 WLP_WSS_STATE_ENROLLED,
119 WLP_WSS_STATE_ACTIVE,
120 WLP_WSS_STATE_CONNECTED,
121};
122
123/**
124 * WSS Secure status
125 * WLP 0.99 Table 6
126 *
127 * Set to one if the WSS is secure, zero if it is not secure
128 */
129enum wlp_wss_sec_status {
130 WLP_WSS_UNSECURE = 0,
131 WLP_WSS_SECURE,
132};
133
134/**
135 * WLP frame type
136 * WLP Draft 0.99 [6.2 Table 1]
137 */
138enum wlp_frame_type {
139 WLP_FRAME_STANDARD = 0,
140 WLP_FRAME_ABBREVIATED,
141 WLP_FRAME_CONTROL,
142 WLP_FRAME_ASSOCIATION,
143};
144
145/**
146 * WLP Association Message Type
147 * WLP Draft 0.99 [6.6.1.2 Table 8]
148 */
149enum wlp_assoc_type {
150 WLP_ASSOC_D1 = 2,
151 WLP_ASSOC_D2 = 3,
152 WLP_ASSOC_M1 = 4,
153 WLP_ASSOC_M2 = 5,
154 WLP_ASSOC_M3 = 7,
155 WLP_ASSOC_M4 = 8,
156 WLP_ASSOC_M5 = 9,
157 WLP_ASSOC_M6 = 10,
158 WLP_ASSOC_M7 = 11,
159 WLP_ASSOC_M8 = 12,
160 WLP_ASSOC_F0 = 14,
161 WLP_ASSOC_E1 = 32,
162 WLP_ASSOC_E2 = 33,
163 WLP_ASSOC_C1 = 34,
164 WLP_ASSOC_C2 = 35,
165 WLP_ASSOC_C3 = 36,
166 WLP_ASSOC_C4 = 37,
167};
168
169/**
170 * WLP Attribute Type
171 * WLP Draft 0.99 [6.6.1 Table 6]
172 */
173enum wlp_attr_type {
174 WLP_ATTR_AUTH = 0x1005, /* Authenticator */
175 WLP_ATTR_DEV_NAME = 0x1011, /* Device Name */
176 WLP_ATTR_DEV_PWD_ID = 0x1012, /* Device Password ID */
177 WLP_ATTR_E_HASH1 = 0x1014, /* E-Hash1 */
178 WLP_ATTR_E_HASH2 = 0x1015, /* E-Hash2 */
179 WLP_ATTR_E_SNONCE1 = 0x1016, /* E-SNonce1 */
180 WLP_ATTR_E_SNONCE2 = 0x1017, /* E-SNonce2 */
181 WLP_ATTR_ENCR_SET = 0x1018, /* Encrypted Settings */
182 WLP_ATTR_ENRL_NONCE = 0x101A, /* Enrollee Nonce */
183 WLP_ATTR_KEYWRAP_AUTH = 0x101E, /* Key Wrap Authenticator */
184 WLP_ATTR_MANUF = 0x1021, /* Manufacturer */
185 WLP_ATTR_MSG_TYPE = 0x1022, /* Message Type */
186 WLP_ATTR_MODEL_NAME = 0x1023, /* Model Name */
187 WLP_ATTR_MODEL_NR = 0x1024, /* Model Number */
188 WLP_ATTR_PUB_KEY = 0x1032, /* Public Key */
189 WLP_ATTR_REG_NONCE = 0x1039, /* Registrar Nonce */
190 WLP_ATTR_R_HASH1 = 0x103D, /* R-Hash1 */
191 WLP_ATTR_R_HASH2 = 0x103E, /* R-Hash2 */
192 WLP_ATTR_R_SNONCE1 = 0x103F, /* R-SNonce1 */
193 WLP_ATTR_R_SNONCE2 = 0x1040, /* R-SNonce2 */
194 WLP_ATTR_SERIAL = 0x1042, /* Serial number */
195 WLP_ATTR_UUID_E = 0x1047, /* UUID-E */
196 WLP_ATTR_UUID_R = 0x1048, /* UUID-R */
197 WLP_ATTR_PRI_DEV_TYPE = 0x1054, /* Primary Device Type */
198 WLP_ATTR_SEC_DEV_TYPE = 0x1055, /* Secondary Device Type */
199 WLP_ATTR_PORT_DEV = 0x1056, /* Portable Device */
200 WLP_ATTR_APP_EXT = 0x1058, /* Application Extension */
201 WLP_ATTR_WLP_VER = 0x2000, /* WLP Version */
202 WLP_ATTR_WSSID = 0x2001, /* WSSID */
203 WLP_ATTR_WSS_NAME = 0x2002, /* WSS Name */
204 WLP_ATTR_WSS_SEC_STAT = 0x2003, /* WSS Secure Status */
205 WLP_ATTR_WSS_BCAST = 0x2004, /* WSS Broadcast Address */
206 WLP_ATTR_WSS_M_KEY = 0x2005, /* WSS Master Key */
207 WLP_ATTR_ACC_ENRL = 0x2006, /* Accepting Enrollment */
208 WLP_ATTR_WSS_INFO = 0x2007, /* WSS Information */
209 WLP_ATTR_WSS_SEL_MTHD = 0x2008, /* WSS Selection Method */
210 WLP_ATTR_ASSC_MTHD_LIST = 0x2009, /* Association Methods List */
211 WLP_ATTR_SEL_ASSC_MTHD = 0x200A, /* Selected Association Method */
212 WLP_ATTR_ENRL_HASH_COMM = 0x200B, /* Enrollee Hash Commitment */
213 WLP_ATTR_WSS_TAG = 0x200C, /* WSS Tag */
214 WLP_ATTR_WSS_VIRT = 0x200D, /* WSS Virtual EUI-48 */
215 WLP_ATTR_WLP_ASSC_ERR = 0x200E, /* WLP Association Error */
216 WLP_ATTR_VNDR_EXT = 0x200F, /* Vendor Extension */
217};
218
219/**
220 * WLP Category ID of primary/secondary device
221 * WLP Draft 0.99 [6.6.1.8 Table 12]
222 */
223enum wlp_dev_category_id {
224 WLP_DEV_CAT_COMPUTER = 1,
225 WLP_DEV_CAT_INPUT,
226 WLP_DEV_CAT_PRINT_SCAN_FAX_COPIER,
227 WLP_DEV_CAT_CAMERA,
228 WLP_DEV_CAT_STORAGE,
229 WLP_DEV_CAT_INFRASTRUCTURE,
230 WLP_DEV_CAT_DISPLAY,
231 WLP_DEV_CAT_MULTIM,
232 WLP_DEV_CAT_GAMING,
233 WLP_DEV_CAT_TELEPHONE,
234 WLP_DEV_CAT_OTHER = 65535,
235};
236
237/**
238 * WLP WSS selection method
239 * WLP Draft 0.99 [6.6.1.6 Table 10]
240 */
241enum wlp_wss_sel_mthd {
242 WLP_WSS_ENRL_SELECT = 1, /* Enrollee selects */
243 WLP_WSS_REG_SELECT, /* Registrar selects */
244};
245
246/**
247 * WLP association error values
248 * WLP Draft 0.99 [6.6.1.5 Table 9]
249 */
250enum wlp_assc_error {
251 WLP_ASSOC_ERROR_NONE,
252 WLP_ASSOC_ERROR_AUTH, /* Authenticator Failure */
253 WLP_ASSOC_ERROR_ROGUE, /* Rogue activity suspected */
254 WLP_ASSOC_ERROR_BUSY, /* Device busy */
255 WLP_ASSOC_ERROR_LOCK, /* Setup Locked */
256 WLP_ASSOC_ERROR_NOT_READY, /* Registrar not ready */
257 WLP_ASSOC_ERROR_INV, /* Invalid WSS selection */
258 WLP_ASSOC_ERROR_MSG_TIME, /* Message timeout */
259 WLP_ASSOC_ERROR_ENR_TIME, /* Enrollment session timeout */
260 WLP_ASSOC_ERROR_PW, /* Device password invalid */
261 WLP_ASSOC_ERROR_VER, /* Unsupported version */
262 WLP_ASSOC_ERROR_INT, /* Internal error */
263 WLP_ASSOC_ERROR_UNDEF, /* Undefined error */
264 WLP_ASSOC_ERROR_NUM, /* Numeric comparison failure */
265 WLP_ASSOC_ERROR_WAIT, /* Waiting for user input */
266};
267
268/**
269 * WLP Parameters
270 * WLP 0.99 [7.7]
271 */
272enum wlp_parameters {
273 WLP_PER_MSG_TIMEOUT = 15, /* Seconds to wait for response to
274 association message. */
275};
276
277/**
278 * WLP IE
279 *
280 * The WLP IE should be included in beacons by all devices.
281 *
282 * The driver can set only a few of the fields in this information element,
283 * most fields are managed by the device self. When the driver needs to set
284 * a field it will only provide values for the fields of interest, the rest
285 * will be filled with zeroes. The fields of interest are:
286 *
287 * Element ID
288 * Length
289 * Capabilities (only to include WSSID Hash list length)
290 * WSSID Hash List fields
291 *
292 * WLP 0.99 [6.7]
293 *
294 * Only the fields that will be used are detailed in this structure, rest
295 * are not detailed or marked as "notused".
296 */
297struct wlp_ie {
298 struct uwb_ie_hdr hdr;
299 __le16 capabilities;
300 __le16 cycle_param;
301 __le16 acw_anchor_addr;
302 u8 wssid_hash_list[];
303} __attribute__((packed));
304
305static inline int wlp_ie_hash_length(struct wlp_ie *ie)
306{
307 return (le16_to_cpu(ie->capabilities) >> 12) & 0xf;
308}
309
310static inline void wlp_ie_set_hash_length(struct wlp_ie *ie, int hash_length)
311{
312 u16 caps = le16_to_cpu(ie->capabilities);
313 caps = (caps & ~(0xf << 12)) | (hash_length << 12);
314 ie->capabilities = cpu_to_le16(caps);
315}
316
317/**
318 * WLP nonce
319 * WLP Draft 0.99 [6.6.1 Table 6]
320 *
321 * A 128-bit random number often used (E-SNonce1, E-SNonce2, Enrollee
322 * Nonce, Registrar Nonce, R-SNonce1, R-SNonce2). It is passed to HW so
323 * it is packed.
324 */
325struct wlp_nonce {
326 u8 data[16];
327} __attribute__((packed));
328
329/**
330 * WLP UUID
331 * WLP Draft 0.99 [6.6.1 Table 6]
332 *
333 * Universally Unique Identifier (UUID) encoded as an octet string in the
334 * order the octets are shown in string representation in RFC4122. A UUID
335 * is often used (UUID-E, UUID-R, WSSID). It is passed to HW so it is packed.
336 */
337struct wlp_uuid {
338 u8 data[16];
339} __attribute__((packed));
340
341
342/**
343 * Primary and secondary device type attributes
344 * WLP Draft 0.99 [6.6.1.8]
345 */
346struct wlp_dev_type {
347 enum wlp_dev_category_id category:16;
348 u8 OUI[3];
349 u8 OUIsubdiv;
350 __le16 subID;
351} __attribute__((packed));
352
353/**
354 * WLP frame header
355 * WLP Draft 0.99 [6.2]
356 */
357struct wlp_frame_hdr {
358 __le16 mux_hdr; /* WLP_PROTOCOL_ID */
359 enum wlp_frame_type type:8;
360} __attribute__((packed));
361
362/**
363 * WLP attribute field header
364 * WLP Draft 0.99 [6.6.1]
365 *
366 * Header of each attribute found in an association frame
367 */
368struct wlp_attr_hdr {
369 __le16 type;
370 __le16 length;
371} __attribute__((packed));
372
373/**
374 * Device information commonly used together
375 *
376 * Each of these device information elements has a specified range in which it
377 * should fit (WLP 0.99 [Table 6]). This range provided in the spec does not
378 * include the termination null '\0' character (when used in the
379 * association protocol the attribute fields are accompanied
380 * with a "length" field so the full range from the spec can be used for
381 * the value). We thus allocate an extra byte to be able to store a string
382 * of max length with a terminating '\0'.
383 */
384struct wlp_device_info {
385 char name[33];
386 char model_name[33];
387 char manufacturer[65];
388 char model_nr[33];
389 char serial[33];
390 struct wlp_dev_type prim_dev_type;
391};
392
393/**
394 * Macros for the WLP attributes
395 *
396 * There are quite a few attributes (total is 43). The attribute layout can be
397 * in one of three categories: one value, an array, an enum forced to 8 bits.
398 * These macros help with their definitions.
399 */
400#define wlp_attr(type, name) \
401struct wlp_attr_##name { \
402 struct wlp_attr_hdr hdr; \
403 type name; \
404} __attribute__((packed));
405
406#define wlp_attr_array(type, name) \
407struct wlp_attr_##name { \
408 struct wlp_attr_hdr hdr; \
409 type name[]; \
410} __attribute__((packed));
411
412/**
413 * WLP association attribute fields
414 * WLP Draft 0.99 [6.6.1 Table 6]
415 *
416 * Attributes appear in same order as the Table in the spec
417 * FIXME Does not define all attributes yet
418 */
419
420/* Device name: Friendly name of sending device */
421wlp_attr_array(u8, dev_name)
422
423/* Enrollee Nonce: Random number generated by enrollee for an enrollment
424 * session */
425wlp_attr(struct wlp_nonce, enonce)
426
427/* Manufacturer name: Name of manufacturer of the sending device */
428wlp_attr_array(u8, manufacturer)
429
430/* WLP Message Type */
431wlp_attr(u8, msg_type)
432
433/* WLP Model name: Model name of sending device */
434wlp_attr_array(u8, model_name)
435
436/* WLP Model number: Model number of sending device */
437wlp_attr_array(u8, model_nr)
438
439/* Registrar Nonce: Random number generated by registrar for an enrollment
440 * session */
441wlp_attr(struct wlp_nonce, rnonce)
442
443/* Serial number of device */
444wlp_attr_array(u8, serial)
445
446/* UUID of enrollee */
447wlp_attr(struct wlp_uuid, uuid_e)
448
449/* UUID of registrar */
450wlp_attr(struct wlp_uuid, uuid_r)
451
452/* WLP Primary device type */
453wlp_attr(struct wlp_dev_type, prim_dev_type)
454
455/* WLP Secondary device type */
456wlp_attr(struct wlp_dev_type, sec_dev_type)
457
458/* WLP protocol version */
459wlp_attr(u8, version)
460
461/* WLP service set identifier */
462wlp_attr(struct wlp_uuid, wssid)
463
464/* WLP WSS name */
465wlp_attr_array(u8, wss_name)
466
467/* WLP WSS Secure Status */
468wlp_attr(u8, wss_sec_status)
469
470/* WSS Broadcast Address */
471wlp_attr(struct uwb_mac_addr, wss_bcast)
472
473/* WLP Accepting Enrollment */
474wlp_attr(u8, accept_enrl)
475
476/**
477 * WSS information attributes
478 * WLP Draft 0.99 [6.6.3 Table 15]
479 */
480struct wlp_wss_info {
481 struct wlp_attr_wssid wssid;
482 struct wlp_attr_wss_name name;
483 struct wlp_attr_accept_enrl accept;
484 struct wlp_attr_wss_sec_status sec_stat;
485 struct wlp_attr_wss_bcast bcast;
486} __attribute__((packed));
487
488/* WLP WSS Information */
489wlp_attr_array(struct wlp_wss_info, wss_info)
490
491/* WLP WSS Selection method */
492wlp_attr(u8, wss_sel_mthd)
493
494/* WLP WSS tag */
495wlp_attr(u8, wss_tag)
496
497/* WSS Virtual Address */
498wlp_attr(struct uwb_mac_addr, wss_virt)
499
500/* WLP association error */
501wlp_attr(u8, wlp_assc_err)
502
503/**
504 * WLP standard and abbreviated frames
505 *
506 * WLP Draft 0.99 [6.3] and [6.4]
507 *
508 * The difference between the WLP standard frame and the WLP
509 * abbreviated frame is that the standard frame includes the src
510 * and dest addresses from the Ethernet header, the abbreviated frame does
511 * not.
512 * The src/dest (as well as the type/length and client data) are already
513 * defined as part of the Ethernet header, we do not do this here.
514 * From this perspective the standard and abbreviated frames appear the
515 * same - they will be treated differently though.
516 *
517 * The size of this header is also captured in WLP_DATA_HLEN to enable
518 * interfaces to prepare their headroom.
519 */
520struct wlp_frame_std_abbrv_hdr {
521 struct wlp_frame_hdr hdr;
522 u8 tag;
523} __attribute__((packed));
524
525/**
526 * WLP association frames
527 *
528 * WLP Draft 0.99 [6.6]
529 */
530struct wlp_frame_assoc {
531 struct wlp_frame_hdr hdr;
532 enum wlp_assoc_type type:8;
533 struct wlp_attr_version version;
534 struct wlp_attr_msg_type msg_type;
535 u8 attr[];
536} __attribute__((packed));
537
538/* Ethernet to dev address mapping */
539struct wlp_eda {
540 spinlock_t lock;
541 struct list_head cache; /* Eth<->Dev Addr cache */
542};
543
544/**
545 * WSS information temporary storage
546 *
547 * This information is only stored temporarily during discovery. It should
548 * not be stored unless the device is enrolled in the advertised WSS. This
549 * is done mainly because we follow the letter of the spec in this regard.
550 * See WLP 0.99 [7.2.3].
551 * When the device does become enrolled in a WSS the WSS information will
552 * be stored as part of the more comprehensive struct wlp_wss.
553 */
554struct wlp_wss_tmp_info {
555 char name[WLP_WSS_NAME_SIZE];
556 u8 accept_enroll;
557 u8 sec_status;
558 struct uwb_mac_addr bcast;
559};
560
561struct wlp_wssid_e {
562 struct list_head node;
563 struct wlp_uuid wssid;
564 struct wlp_wss_tmp_info *info;
565};
566
567/**
568 * A cache entry of WLP neighborhood
569 *
570 * @node: head of list is wlp->neighbors
571 * @wssid: list of wssids of this neighbor, element is wlp_wssid_e
572 * @info: temporary storage for information learned during discovery. This
573 * storage is used together with the wssid_e temporary storage
574 * during discovery.
575 */
576struct wlp_neighbor_e {
577 struct list_head node;
578 struct wlp_uuid uuid;
579 struct uwb_dev *uwb_dev;
580 struct list_head wssid; /* Elements are wlp_wssid_e */
581 struct wlp_device_info *info;
582};
583
584struct wlp;
585/**
586 * Information for an association session in progress.
587 *
588 * @exp_message: The type of the expected message. Both this message and a
589 * F0 message (which can be sent in response to any
590 * association frame) will be accepted as a valid message for
591 * this session.
592 * @cb: The function that will be called upon receipt of this
593 * message.
594 * @cb_priv: Private data of callback
595 * @data: Data used in association process (always a sk_buff?)
596 * @neighbor: Address of neighbor with which association session is in
597 * progress.
598 */
599struct wlp_session {
600 enum wlp_assoc_type exp_message;
601 void (*cb)(struct wlp *);
602 void *cb_priv;
603 void *data;
604 struct uwb_dev_addr neighbor_addr;
605};
606
607/**
608 * WLP Service Set
609 *
610 * @mutex: used to protect entire WSS structure.
611 *
612 * @name: The WSS name is set to 65 bytes, 1 byte larger than the maximum
613 * allowed by the WLP spec. This is to have a null terminated string
614 * for display to the user. A maximum of 64 bytes will still be used
615 * when placing the WSS name field in association frames.
616 *
617 * @accept_enroll: Accepting enrollment: Set to one if registrar is
618 * accepting enrollment in WSS, or zero otherwise.
619 *
620 * Global and local information for each WSS in which we are enrolled.
621 * WLP 0.99 Section 7.2.1 and Section 7.2.2
622 */
623struct wlp_wss {
624 struct mutex mutex;
625 struct kobject kobj;
626 /* Global properties. */
627 struct wlp_uuid wssid;
628 u8 hash;
629 char name[WLP_WSS_NAME_SIZE];
630 struct uwb_mac_addr bcast;
631 u8 secure_status:1;
632 u8 master_key[16];
633 /* Local properties. */
634 u8 tag;
635 struct uwb_mac_addr virtual_addr;
636 /* Extra */
637 u8 accept_enroll:1;
638 enum wlp_wss_state state;
639};
640
641/**
642 * WLP main structure
643 * @mutex: protect changes to WLP structure. We only allow changes to the
644 * uuid, so currently this mutex only protects this field.
645 */
646struct wlp {
647 struct mutex mutex;
648 struct uwb_rc *rc; /* UWB radio controller */
649 struct uwb_pal pal;
650 struct wlp_eda eda;
651 struct wlp_uuid uuid;
652 struct wlp_session *session;
653 struct wlp_wss wss;
654 struct mutex nbmutex; /* Neighbor mutex protects neighbors list */
655 struct list_head neighbors; /* Elements are wlp_neighbor_e */
656 struct uwb_notifs_handler uwb_notifs_handler;
657 struct wlp_device_info *dev_info;
658 void (*fill_device_info)(struct wlp *wlp, struct wlp_device_info *info);
659 int (*xmit_frame)(struct wlp *, struct sk_buff *,
660 struct uwb_dev_addr *);
661 void (*stop_queue)(struct wlp *);
662 void (*start_queue)(struct wlp *);
663};
664
665/* sysfs */
666
667
668struct wlp_wss_attribute {
669 struct attribute attr;
670 ssize_t (*show)(struct wlp_wss *wss, char *buf);
671 ssize_t (*store)(struct wlp_wss *wss, const char *buf, size_t count);
672};
673
674#define WSS_ATTR(_name, _mode, _show, _store) \
675static struct wlp_wss_attribute wss_attr_##_name = __ATTR(_name, _mode, \
676 _show, _store)
677
678extern int wlp_setup(struct wlp *, struct uwb_rc *);
679extern void wlp_remove(struct wlp *);
680extern ssize_t wlp_neighborhood_show(struct wlp *, char *);
681extern int wlp_wss_setup(struct net_device *, struct wlp_wss *);
682extern void wlp_wss_remove(struct wlp_wss *);
683extern ssize_t wlp_wss_activate_show(struct wlp_wss *, char *);
684extern ssize_t wlp_wss_activate_store(struct wlp_wss *, const char *, size_t);
685extern ssize_t wlp_eda_show(struct wlp *, char *);
686extern ssize_t wlp_eda_store(struct wlp *, const char *, size_t);
687extern ssize_t wlp_uuid_show(struct wlp *, char *);
688extern ssize_t wlp_uuid_store(struct wlp *, const char *, size_t);
689extern ssize_t wlp_dev_name_show(struct wlp *, char *);
690extern ssize_t wlp_dev_name_store(struct wlp *, const char *, size_t);
691extern ssize_t wlp_dev_manufacturer_show(struct wlp *, char *);
692extern ssize_t wlp_dev_manufacturer_store(struct wlp *, const char *, size_t);
693extern ssize_t wlp_dev_model_name_show(struct wlp *, char *);
694extern ssize_t wlp_dev_model_name_store(struct wlp *, const char *, size_t);
695extern ssize_t wlp_dev_model_nr_show(struct wlp *, char *);
696extern ssize_t wlp_dev_model_nr_store(struct wlp *, const char *, size_t);
697extern ssize_t wlp_dev_serial_show(struct wlp *, char *);
698extern ssize_t wlp_dev_serial_store(struct wlp *, const char *, size_t);
699extern ssize_t wlp_dev_prim_category_show(struct wlp *, char *);
700extern ssize_t wlp_dev_prim_category_store(struct wlp *, const char *,
701 size_t);
702extern ssize_t wlp_dev_prim_OUI_show(struct wlp *, char *);
703extern ssize_t wlp_dev_prim_OUI_store(struct wlp *, const char *, size_t);
704extern ssize_t wlp_dev_prim_OUI_sub_show(struct wlp *, char *);
705extern ssize_t wlp_dev_prim_OUI_sub_store(struct wlp *, const char *,
706 size_t);
707extern ssize_t wlp_dev_prim_subcat_show(struct wlp *, char *);
708extern ssize_t wlp_dev_prim_subcat_store(struct wlp *, const char *,
709 size_t);
710extern int wlp_receive_frame(struct device *, struct wlp *, struct sk_buff *,
711 struct uwb_dev_addr *);
712extern int wlp_prepare_tx_frame(struct device *, struct wlp *,
713 struct sk_buff *, struct uwb_dev_addr *);
714void wlp_reset_all(struct wlp *wlp);
715
716/**
717 * Initialize WSS
718 */
719static inline
720void wlp_wss_init(struct wlp_wss *wss)
721{
722 mutex_init(&wss->mutex);
723}
724
725static inline
726void wlp_init(struct wlp *wlp)
727{
728 INIT_LIST_HEAD(&wlp->neighbors);
729 mutex_init(&wlp->mutex);
730 mutex_init(&wlp->nbmutex);
731 wlp_wss_init(&wlp->wss);
732}
733
734
735#endif /* #ifndef __LINUX__WLP_H_ */
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 5c158c477ac7..b36291130f22 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -149,11 +149,11 @@ struct execute_work {
149 149
150extern struct workqueue_struct * 150extern struct workqueue_struct *
151__create_workqueue_key(const char *name, int singlethread, 151__create_workqueue_key(const char *name, int singlethread,
152 int freezeable, struct lock_class_key *key, 152 int freezeable, int rt, struct lock_class_key *key,
153 const char *lock_name); 153 const char *lock_name);
154 154
155#ifdef CONFIG_LOCKDEP 155#ifdef CONFIG_LOCKDEP
156#define __create_workqueue(name, singlethread, freezeable) \ 156#define __create_workqueue(name, singlethread, freezeable, rt) \
157({ \ 157({ \
158 static struct lock_class_key __key; \ 158 static struct lock_class_key __key; \
159 const char *__lock_name; \ 159 const char *__lock_name; \
@@ -164,17 +164,19 @@ __create_workqueue_key(const char *name, int singlethread,
164 __lock_name = #name; \ 164 __lock_name = #name; \
165 \ 165 \
166 __create_workqueue_key((name), (singlethread), \ 166 __create_workqueue_key((name), (singlethread), \
167 (freezeable), &__key, \ 167 (freezeable), (rt), &__key, \
168 __lock_name); \ 168 __lock_name); \
169}) 169})
170#else 170#else
171#define __create_workqueue(name, singlethread, freezeable) \ 171#define __create_workqueue(name, singlethread, freezeable, rt) \
172 __create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL) 172 __create_workqueue_key((name), (singlethread), (freezeable), (rt), \
173 NULL, NULL)
173#endif 174#endif
174 175
175#define create_workqueue(name) __create_workqueue((name), 0, 0) 176#define create_workqueue(name) __create_workqueue((name), 0, 0, 0)
176#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1) 177#define create_rt_workqueue(name) __create_workqueue((name), 0, 0, 1)
177#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0) 178#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1, 0)
179#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0, 0)
178 180
179extern void destroy_workqueue(struct workqueue_struct *wq); 181extern void destroy_workqueue(struct workqueue_struct *wq);
180 182
@@ -238,4 +240,12 @@ void cancel_rearming_delayed_work(struct delayed_work *work)
238 cancel_delayed_work_sync(work); 240 cancel_delayed_work_sync(work);
239} 241}
240 242
243#ifndef CONFIG_SMP
244static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg)
245{
246 return fn(arg);
247}
248#else
249long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg);
250#endif /* CONFIG_SMP */
241#endif 251#endif
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 12b15c561a1f..e585657e9831 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -63,7 +63,15 @@ struct writeback_control {
63 unsigned for_writepages:1; /* This is a writepages() call */ 63 unsigned for_writepages:1; /* This is a writepages() call */
64 unsigned range_cyclic:1; /* range_start is cyclic */ 64 unsigned range_cyclic:1; /* range_start is cyclic */
65 unsigned more_io:1; /* more io to be dispatched */ 65 unsigned more_io:1; /* more io to be dispatched */
66 unsigned range_cont:1; 66 /*
67 * write_cache_pages() won't update wbc->nr_to_write and
68 * mapping->writeback_index if no_nrwrite_index_update
69 * is set. write_cache_pages() may write more than we
70 * requested and we want to make sure nr_to_write and
71 * writeback_index are updated in a consistent manner
72 * so we use a single control to update them
73 */
74 unsigned no_nrwrite_index_update:1;
67}; 75};
68 76
69/* 77/*
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 4bc1e6b86cb2..52f3abd453a1 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -199,6 +199,9 @@ enum {
199#define XFRM_MSG_NEWSPDINFO XFRM_MSG_NEWSPDINFO 199#define XFRM_MSG_NEWSPDINFO XFRM_MSG_NEWSPDINFO
200 XFRM_MSG_GETSPDINFO, 200 XFRM_MSG_GETSPDINFO,
201#define XFRM_MSG_GETSPDINFO XFRM_MSG_GETSPDINFO 201#define XFRM_MSG_GETSPDINFO XFRM_MSG_GETSPDINFO
202
203 XFRM_MSG_MAPPING,
204#define XFRM_MSG_MAPPING XFRM_MSG_MAPPING
202 __XFRM_MSG_MAX 205 __XFRM_MSG_MAX
203}; 206};
204#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) 207#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
@@ -438,6 +441,15 @@ struct xfrm_user_migrate {
438 __u16 new_family; 441 __u16 new_family;
439}; 442};
440 443
444struct xfrm_user_mapping {
445 struct xfrm_usersa_id id;
446 __u32 reqid;
447 xfrm_address_t old_saddr;
448 xfrm_address_t new_saddr;
449 __be16 old_sport;
450 __be16 new_sport;
451};
452
441#ifndef __KERNEL__ 453#ifndef __KERNEL__
442/* backwards compatibility for userspace */ 454/* backwards compatibility for userspace */
443#define XFRMGRP_ACQUIRE 1 455#define XFRMGRP_ACQUIRE 1
@@ -464,6 +476,8 @@ enum xfrm_nlgroups {
464#define XFRMNLGRP_REPORT XFRMNLGRP_REPORT 476#define XFRMNLGRP_REPORT XFRMNLGRP_REPORT
465 XFRMNLGRP_MIGRATE, 477 XFRMNLGRP_MIGRATE,
466#define XFRMNLGRP_MIGRATE XFRMNLGRP_MIGRATE 478#define XFRMNLGRP_MIGRATE XFRMNLGRP_MIGRATE
479 XFRMNLGRP_MAPPING,
480#define XFRMNLGRP_MAPPING XFRMNLGRP_MAPPING
467 __XFRMNLGRP_MAX 481 __XFRMNLGRP_MAX
468}; 482};
469#define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) 483#define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1)
diff --git a/include/math-emu/op-2.h b/include/math-emu/op-2.h
index e193fb08fd55..4f26ecc1411b 100644
--- a/include/math-emu/op-2.h
+++ b/include/math-emu/op-2.h
@@ -25,7 +25,7 @@
25#ifndef __MATH_EMU_OP_2_H__ 25#ifndef __MATH_EMU_OP_2_H__
26#define __MATH_EMU_OP_2_H__ 26#define __MATH_EMU_OP_2_H__
27 27
28#define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1 28#define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0 = 0, X##_f1 = 0
29#define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1) 29#define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1)
30#define _FP_FRAC_SET_2(X,I) __FP_FRAC_SET_2(X, I) 30#define _FP_FRAC_SET_2(X,I) __FP_FRAC_SET_2(X, I)
31#define _FP_FRAC_HIGH_2(X) (X##_f1) 31#define _FP_FRAC_HIGH_2(X) (X##_f1)
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h
index bb46e7645d53..f456534dcaf9 100644
--- a/include/math-emu/op-common.h
+++ b/include/math-emu/op-common.h
@@ -73,7 +73,7 @@ do { \
73 X##_c = FP_CLS_NAN; \ 73 X##_c = FP_CLS_NAN; \
74 /* Check for signaling NaN */ \ 74 /* Check for signaling NaN */ \
75 if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \ 75 if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \
76 FP_SET_EXCEPTION(FP_EX_INVALID); \ 76 FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_SNAN); \
77 } \ 77 } \
78 break; \ 78 break; \
79 } \ 79 } \
@@ -139,18 +139,27 @@ do { \
139 if (X##_e <= _FP_WFRACBITS_##fs) \ 139 if (X##_e <= _FP_WFRACBITS_##fs) \
140 { \ 140 { \
141 _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \ 141 _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \
142 _FP_ROUND(wc, X); \
143 if (_FP_FRAC_HIGH_##fs(X) \ 142 if (_FP_FRAC_HIGH_##fs(X) \
144 & (_FP_OVERFLOW_##fs >> 1)) \ 143 & (_FP_OVERFLOW_##fs >> 1)) \
145 { \ 144 { \
146 X##_e = 1; \ 145 X##_e = 1; \
147 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ 146 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
148 FP_SET_EXCEPTION(FP_EX_INEXACT); \
149 } \ 147 } \
150 else \ 148 else \
151 { \ 149 { \
152 X##_e = 0; \ 150 _FP_ROUND(wc, X); \
153 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ 151 if (_FP_FRAC_HIGH_##fs(X) \
152 & (_FP_OVERFLOW_##fs >> 1)) \
153 { \
154 X##_e = 1; \
155 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
156 FP_SET_EXCEPTION(FP_EX_INEXACT); \
157 } \
158 else \
159 { \
160 X##_e = 0; \
161 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
162 } \
154 } \ 163 } \
155 if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \ 164 if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \
156 (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \ 165 (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
@@ -324,7 +333,7 @@ do { \
324 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ 333 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
325 R##_s = _FP_NANSIGN_##fs; \ 334 R##_s = _FP_NANSIGN_##fs; \
326 R##_c = FP_CLS_NAN; \ 335 R##_c = FP_CLS_NAN; \
327 FP_SET_EXCEPTION(FP_EX_INVALID); \ 336 FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_ISI); \
328 break; \ 337 break; \
329 } \ 338 } \
330 /* FALLTHRU */ \ 339 /* FALLTHRU */ \
@@ -431,7 +440,7 @@ do { \
431 R##_s = _FP_NANSIGN_##fs; \ 440 R##_s = _FP_NANSIGN_##fs; \
432 R##_c = FP_CLS_NAN; \ 441 R##_c = FP_CLS_NAN; \
433 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ 442 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
434 FP_SET_EXCEPTION(FP_EX_INVALID); \ 443 FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IMZ);\
435 break; \ 444 break; \
436 \ 445 \
437 default: \ 446 default: \
@@ -490,11 +499,17 @@ do { \
490 break; \ 499 break; \
491 \ 500 \
492 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \ 501 case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \
502 R##_s = _FP_NANSIGN_##fs; \
503 R##_c = FP_CLS_NAN; \
504 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
505 FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\
506 break; \
507 \
493 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \ 508 case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \
494 R##_s = _FP_NANSIGN_##fs; \ 509 R##_s = _FP_NANSIGN_##fs; \
495 R##_c = FP_CLS_NAN; \ 510 R##_c = FP_CLS_NAN; \
496 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ 511 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
497 FP_SET_EXCEPTION(FP_EX_INVALID); \ 512 FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_ZDZ);\
498 break; \ 513 break; \
499 \ 514 \
500 default: \ 515 default: \
diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h
index a6f873b45f98..3f284bc03180 100644
--- a/include/math-emu/soft-fp.h
+++ b/include/math-emu/soft-fp.h
@@ -51,6 +51,25 @@
51#ifndef FP_EX_INVALID 51#ifndef FP_EX_INVALID
52#define FP_EX_INVALID 0 52#define FP_EX_INVALID 0
53#endif 53#endif
54#ifndef FP_EX_INVALID_SNAN
55#define FP_EX_INVALID_SNAN 0
56#endif
57/* inf - inf */
58#ifndef FP_EX_INVALID_ISI
59#define FP_EX_INVALID_ISI 0
60#endif
61/* inf / inf */
62#ifndef FP_EX_INVALID_IDI
63#define FP_EX_INVALID_IDI 0
64#endif
65/* 0 / 0 */
66#ifndef FP_EX_INVALID_ZDZ
67#define FP_EX_INVALID_ZDZ 0
68#endif
69/* inf * 0 */
70#ifndef FP_EX_INVALID_IMZ
71#define FP_EX_INVALID_IMZ 0
72#endif
54#ifndef FP_EX_OVERFLOW 73#ifndef FP_EX_OVERFLOW
55#define FP_EX_OVERFLOW 0 74#define FP_EX_OVERFLOW 0
56#endif 75#endif
diff --git a/include/media/i2c-addr.h b/include/media/i2c-addr.h
index e7ff44a35ca0..5d0f56054d26 100644
--- a/include/media/i2c-addr.h
+++ b/include/media/i2c-addr.h
@@ -12,8 +12,6 @@
12/* bttv address list */ 12/* bttv address list */
13#define I2C_ADDR_TSA5522 0xc2 13#define I2C_ADDR_TSA5522 0xc2
14#define I2C_ADDR_TDA7432 0x8a 14#define I2C_ADDR_TDA7432 0x8a
15#define I2C_ADDR_BT832_ALT1 0x88
16#define I2C_ADDR_BT832_ALT2 0x8a // alternate setting
17#define I2C_ADDR_TDA8425 0x82 15#define I2C_ADDR_TDA8425 0x82
18#define I2C_ADDR_TDA9840 0x84 16#define I2C_ADDR_TDA9840 0x84
19#define I2C_ADDR_TDA9850 0xb6 /* also used by 9855,9873 */ 17#define I2C_ADDR_TDA9850 0xb6 /* also used by 9855,9873 */
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 38f2d93c3957..5bf2ea00678c 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -157,6 +157,8 @@ extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE];
157extern IR_KEYTAB_TYPE ir_codes_encore_enltv_fm53[IR_KEYTAB_SIZE]; 157extern IR_KEYTAB_TYPE ir_codes_encore_enltv_fm53[IR_KEYTAB_SIZE];
158extern IR_KEYTAB_TYPE ir_codes_real_audio_220_32_keys[IR_KEYTAB_SIZE]; 158extern IR_KEYTAB_TYPE ir_codes_real_audio_220_32_keys[IR_KEYTAB_SIZE];
159extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere_plus[IR_KEYTAB_SIZE]; 159extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere_plus[IR_KEYTAB_SIZE];
160extern IR_KEYTAB_TYPE ir_codes_ati_tv_wonder_hd_600[IR_KEYTAB_SIZE];
161extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE];
160#endif 162#endif
161 163
162/* 164/*
diff --git a/include/media/ov772x.h b/include/media/ov772x.h
new file mode 100644
index 000000000000..e391d55edb95
--- /dev/null
+++ b/include/media/ov772x.h
@@ -0,0 +1,21 @@
1/* ov772x Camera
2 *
3 * Copyright (C) 2008 Renesas Solutions Corp.
4 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __OV772X_H__
12#define __OV772X_H__
13
14#include <media/soc_camera.h>
15
16struct ov772x_camera_info {
17 unsigned long buswidth;
18 struct soc_camera_link link;
19};
20
21#endif /* __OV772X_H__ */
diff --git a/include/media/saa7146.h b/include/media/saa7146.h
index 64a2ec746a3e..c5a6e22a4b37 100644
--- a/include/media/saa7146.h
+++ b/include/media/saa7146.h
@@ -24,7 +24,7 @@
24 24
25extern unsigned int saa7146_debug; 25extern unsigned int saa7146_debug;
26 26
27//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__FUNCTION__) 27//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__func__)
28 28
29#ifndef DEBUG_VARIABLE 29#ifndef DEBUG_VARIABLE
30 #define DEBUG_VARIABLE saa7146_debug 30 #define DEBUG_VARIABLE saa7146_debug
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
index 1d104096619c..6bbb0d93bb5f 100644
--- a/include/media/saa7146_vv.h
+++ b/include/media/saa7146_vv.h
@@ -216,8 +216,7 @@ void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data);
216extern struct saa7146_use_ops saa7146_video_uops; 216extern struct saa7146_use_ops saa7146_video_uops;
217int saa7146_start_preview(struct saa7146_fh *fh); 217int saa7146_start_preview(struct saa7146_fh *fh);
218int saa7146_stop_preview(struct saa7146_fh *fh); 218int saa7146_stop_preview(struct saa7146_fh *fh);
219int saa7146_video_do_ioctl(struct inode *inode, struct file *file, 219int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg);
220 unsigned int cmd, void *arg);
221 220
222/* from saa7146_vbi.c */ 221/* from saa7146_vbi.c */
223extern struct saa7146_use_ops saa7146_vbi_uops; 222extern struct saa7146_use_ops saa7146_vbi_uops;
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index c5de7bb19fda..425b6a98c95c 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -12,9 +12,10 @@
12#ifndef SOC_CAMERA_H 12#ifndef SOC_CAMERA_H
13#define SOC_CAMERA_H 13#define SOC_CAMERA_H
14 14
15#include <linux/mutex.h>
16#include <linux/pm.h>
15#include <linux/videodev2.h> 17#include <linux/videodev2.h>
16#include <media/videobuf-core.h> 18#include <media/videobuf-core.h>
17#include <linux/pm.h>
18 19
19struct soc_camera_device { 20struct soc_camera_device {
20 struct list_head list; 21 struct list_head list;
@@ -36,14 +37,19 @@ struct soc_camera_device {
36 unsigned char iface; /* Host number */ 37 unsigned char iface; /* Host number */
37 unsigned char devnum; /* Device number per host */ 38 unsigned char devnum; /* Device number per host */
38 unsigned char buswidth; /* See comment in .c */ 39 unsigned char buswidth; /* See comment in .c */
40 struct soc_camera_sense *sense; /* See comment in struct definition */
39 struct soc_camera_ops *ops; 41 struct soc_camera_ops *ops;
40 struct video_device *vdev; 42 struct video_device *vdev;
41 const struct soc_camera_data_format *current_fmt; 43 const struct soc_camera_data_format *current_fmt;
42 const struct soc_camera_data_format *formats; 44 const struct soc_camera_data_format *formats;
43 int num_formats; 45 int num_formats;
46 struct soc_camera_format_xlate *user_formats;
47 int num_user_formats;
44 struct module *owner; 48 struct module *owner;
45 /* soc_camera.c private count. Only accessed with video_lock held */ 49 void *host_priv; /* Per-device host private data */
50 /* soc_camera.c private count. Only accessed with .video_lock held */
46 int use_count; 51 int use_count;
52 struct mutex video_lock; /* Protects device data */
47}; 53};
48 54
49struct soc_camera_file { 55struct soc_camera_file {
@@ -56,7 +62,7 @@ struct soc_camera_host {
56 struct device dev; 62 struct device dev;
57 unsigned char nr; /* Host number */ 63 unsigned char nr; /* Host number */
58 void *priv; 64 void *priv;
59 char *drv_name; 65 const char *drv_name;
60 struct soc_camera_host_ops *ops; 66 struct soc_camera_host_ops *ops;
61}; 67};
62 68
@@ -64,25 +70,33 @@ struct soc_camera_host_ops {
64 struct module *owner; 70 struct module *owner;
65 int (*add)(struct soc_camera_device *); 71 int (*add)(struct soc_camera_device *);
66 void (*remove)(struct soc_camera_device *); 72 void (*remove)(struct soc_camera_device *);
67 int (*suspend)(struct soc_camera_device *, pm_message_t state); 73 int (*suspend)(struct soc_camera_device *, pm_message_t);
68 int (*resume)(struct soc_camera_device *); 74 int (*resume)(struct soc_camera_device *);
69 int (*set_fmt_cap)(struct soc_camera_device *, __u32, 75 int (*get_formats)(struct soc_camera_device *, int,
70 struct v4l2_rect *); 76 struct soc_camera_format_xlate *);
71 int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); 77 int (*set_fmt)(struct soc_camera_device *, __u32, struct v4l2_rect *);
78 int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *);
72 void (*init_videobuf)(struct videobuf_queue *, 79 void (*init_videobuf)(struct videobuf_queue *,
73 struct soc_camera_device *); 80 struct soc_camera_device *);
74 int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); 81 int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
75 int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); 82 int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
76 int (*try_bus_param)(struct soc_camera_device *, __u32);
77 int (*set_bus_param)(struct soc_camera_device *, __u32); 83 int (*set_bus_param)(struct soc_camera_device *, __u32);
78 unsigned int (*poll)(struct file *, poll_table *); 84 unsigned int (*poll)(struct file *, poll_table *);
79}; 85};
80 86
87#define SOCAM_SENSOR_INVERT_PCLK (1 << 0)
88#define SOCAM_SENSOR_INVERT_MCLK (1 << 1)
89#define SOCAM_SENSOR_INVERT_HSYNC (1 << 2)
90#define SOCAM_SENSOR_INVERT_VSYNC (1 << 3)
91#define SOCAM_SENSOR_INVERT_DATA (1 << 4)
92
81struct soc_camera_link { 93struct soc_camera_link {
82 /* Camera bus id, used to match a camera and a bus */ 94 /* Camera bus id, used to match a camera and a bus */
83 int bus_id; 95 int bus_id;
84 /* GPIO number to switch between 8 and 10 bit modes */ 96 /* GPIO number to switch between 8 and 10 bit modes */
85 unsigned int gpio; 97 unsigned int gpio;
98 /* Per camera SOCAM_SENSOR_* bus flags */
99 unsigned long flags;
86 /* Optional callbacks to power on or off and reset the sensor */ 100 /* Optional callbacks to power on or off and reset the sensor */
87 int (*power)(struct device *, int); 101 int (*power)(struct device *, int);
88 int (*reset)(struct device *); 102 int (*reset)(struct device *);
@@ -106,13 +120,35 @@ extern void soc_camera_device_unregister(struct soc_camera_device *icd);
106extern int soc_camera_video_start(struct soc_camera_device *icd); 120extern int soc_camera_video_start(struct soc_camera_device *icd);
107extern void soc_camera_video_stop(struct soc_camera_device *icd); 121extern void soc_camera_video_stop(struct soc_camera_device *icd);
108 122
123extern const struct soc_camera_data_format *soc_camera_format_by_fourcc(
124 struct soc_camera_device *icd, unsigned int fourcc);
125extern const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
126 struct soc_camera_device *icd, unsigned int fourcc);
127
109struct soc_camera_data_format { 128struct soc_camera_data_format {
110 char *name; 129 const char *name;
111 unsigned int depth; 130 unsigned int depth;
112 __u32 fourcc; 131 __u32 fourcc;
113 enum v4l2_colorspace colorspace; 132 enum v4l2_colorspace colorspace;
114}; 133};
115 134
135/**
136 * struct soc_camera_format_xlate - match between host and sensor formats
137 * @cam_fmt: sensor format provided by the sensor
138 * @host_fmt: host format after host translation from cam_fmt
139 * @buswidth: bus width for this format
140 *
141 * Host and sensor translation structure. Used in table of host and sensor
142 * formats matchings in soc_camera_device. A host can override the generic list
143 * generation by implementing get_formats(), and use it for format checks and
144 * format setup.
145 */
146struct soc_camera_format_xlate {
147 const struct soc_camera_data_format *cam_fmt;
148 const struct soc_camera_data_format *host_fmt;
149 unsigned char buswidth;
150};
151
116struct soc_camera_ops { 152struct soc_camera_ops {
117 struct module *owner; 153 struct module *owner;
118 int (*probe)(struct soc_camera_device *); 154 int (*probe)(struct soc_camera_device *);
@@ -123,13 +159,14 @@ struct soc_camera_ops {
123 int (*release)(struct soc_camera_device *); 159 int (*release)(struct soc_camera_device *);
124 int (*start_capture)(struct soc_camera_device *); 160 int (*start_capture)(struct soc_camera_device *);
125 int (*stop_capture)(struct soc_camera_device *); 161 int (*stop_capture)(struct soc_camera_device *);
126 int (*set_fmt_cap)(struct soc_camera_device *, __u32, 162 int (*set_fmt)(struct soc_camera_device *, __u32, struct v4l2_rect *);
127 struct v4l2_rect *); 163 int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *);
128 int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *);
129 unsigned long (*query_bus_param)(struct soc_camera_device *); 164 unsigned long (*query_bus_param)(struct soc_camera_device *);
130 int (*set_bus_param)(struct soc_camera_device *, unsigned long); 165 int (*set_bus_param)(struct soc_camera_device *, unsigned long);
131 int (*get_chip_id)(struct soc_camera_device *, 166 int (*get_chip_id)(struct soc_camera_device *,
132 struct v4l2_chip_ident *); 167 struct v4l2_chip_ident *);
168 int (*set_std)(struct soc_camera_device *, v4l2_std_id *);
169 int (*enum_input)(struct soc_camera_device *, struct v4l2_input *);
133#ifdef CONFIG_VIDEO_ADV_DEBUG 170#ifdef CONFIG_VIDEO_ADV_DEBUG
134 int (*get_register)(struct soc_camera_device *, struct v4l2_register *); 171 int (*get_register)(struct soc_camera_device *, struct v4l2_register *);
135 int (*set_register)(struct soc_camera_device *, struct v4l2_register *); 172 int (*set_register)(struct soc_camera_device *, struct v4l2_register *);
@@ -140,6 +177,32 @@ struct soc_camera_ops {
140 int num_controls; 177 int num_controls;
141}; 178};
142 179
180#define SOCAM_SENSE_PCLK_CHANGED (1 << 0)
181
182/**
183 * This struct can be attached to struct soc_camera_device by the host driver
184 * to request sense from the camera, for example, when calling .set_fmt(). The
185 * host then can check which flags are set and verify respective values if any.
186 * For example, if SOCAM_SENSE_PCLK_CHANGED is set, it means, pixclock has
187 * changed during this operation. After completion the host should detach sense.
188 *
189 * @flags ored SOCAM_SENSE_* flags
190 * @master_clock if the host wants to be informed about pixel-clock
191 * change, it better set master_clock.
192 * @pixel_clock_max maximum pixel clock frequency supported by the host,
193 * camera is not allowed to exceed this.
194 * @pixel_clock if the camera driver changed pixel clock during this
195 * operation, it sets SOCAM_SENSE_PCLK_CHANGED, uses
196 * master_clock to calculate the new pixel-clock and
197 * sets this field.
198 */
199struct soc_camera_sense {
200 unsigned long flags;
201 unsigned long master_clock;
202 unsigned long pixel_clock_max;
203 unsigned long pixel_clock;
204};
205
143static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( 206static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
144 struct soc_camera_ops *ops, int id) 207 struct soc_camera_ops *ops, int id)
145{ 208{
@@ -158,15 +221,20 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
158#define SOCAM_HSYNC_ACTIVE_LOW (1 << 3) 221#define SOCAM_HSYNC_ACTIVE_LOW (1 << 3)
159#define SOCAM_VSYNC_ACTIVE_HIGH (1 << 4) 222#define SOCAM_VSYNC_ACTIVE_HIGH (1 << 4)
160#define SOCAM_VSYNC_ACTIVE_LOW (1 << 5) 223#define SOCAM_VSYNC_ACTIVE_LOW (1 << 5)
161#define SOCAM_DATAWIDTH_8 (1 << 6) 224#define SOCAM_DATAWIDTH_4 (1 << 6)
162#define SOCAM_DATAWIDTH_9 (1 << 7) 225#define SOCAM_DATAWIDTH_8 (1 << 7)
163#define SOCAM_DATAWIDTH_10 (1 << 8) 226#define SOCAM_DATAWIDTH_9 (1 << 8)
164#define SOCAM_DATAWIDTH_16 (1 << 9) 227#define SOCAM_DATAWIDTH_10 (1 << 9)
165#define SOCAM_PCLK_SAMPLE_RISING (1 << 10) 228#define SOCAM_DATAWIDTH_15 (1 << 10)
166#define SOCAM_PCLK_SAMPLE_FALLING (1 << 11) 229#define SOCAM_DATAWIDTH_16 (1 << 11)
230#define SOCAM_PCLK_SAMPLE_RISING (1 << 12)
231#define SOCAM_PCLK_SAMPLE_FALLING (1 << 13)
232#define SOCAM_DATA_ACTIVE_HIGH (1 << 14)
233#define SOCAM_DATA_ACTIVE_LOW (1 << 15)
167 234
168#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \ 235#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \
169 SOCAM_DATAWIDTH_10 | SOCAM_DATAWIDTH_16) 236 SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \
237 SOCAM_DATAWIDTH_15 | SOCAM_DATAWIDTH_16)
170 238
171static inline unsigned long soc_camera_bus_param_compatible( 239static inline unsigned long soc_camera_bus_param_compatible(
172 unsigned long camera_flags, unsigned long bus_flags) 240 unsigned long camera_flags, unsigned long bus_flags)
@@ -182,4 +250,7 @@ static inline unsigned long soc_camera_bus_param_compatible(
182 return (!hsync || !vsync || !pclk) ? 0 : common_flags; 250 return (!hsync || !vsync || !pclk) ? 0 : common_flags;
183} 251}
184 252
253extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,
254 unsigned long flags);
255
185#endif 256#endif
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 851f18220984..1d092b4678aa 100644
--- a/include/media/soc_camera_platform.h
+++ b/include/media/soc_camera_platform.h
@@ -1,3 +1,13 @@
1/*
2 * Generic Platform Camera Driver Header
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
1#ifndef __SOC_CAMERA_H__ 11#ifndef __SOC_CAMERA_H__
2#define __SOC_CAMERA_H__ 12#define __SOC_CAMERA_H__
3 13
@@ -9,6 +19,7 @@ struct soc_camera_platform_info {
9 unsigned long format_depth; 19 unsigned long format_depth;
10 struct v4l2_pix_format format; 20 struct v4l2_pix_format format;
11 unsigned long bus_param; 21 unsigned long bus_param;
22 void (*power)(int);
12 int (*set_capture)(struct soc_camera_platform_info *info, int enable); 23 int (*set_capture)(struct soc_camera_platform_info *info, int enable);
13}; 24};
14 25
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 67c1f514d0e2..7d4e2db78076 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -123,6 +123,7 @@
123#define TUNER_TEA5761 75 /* Only FM Radio Tuner */ 123#define TUNER_TEA5761 75 /* Only FM Radio Tuner */
124#define TUNER_XC5000 76 /* Xceive Silicon Tuner */ 124#define TUNER_XC5000 76 /* Xceive Silicon Tuner */
125#define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */ 125#define TUNER_TCL_MF02GIP_5N 77 /* TCL MF02GIP_5N */
126#define TUNER_PHILIPS_FMD1216MEX_MK3 78
126 127
127/* tv card specific */ 128/* tv card specific */
128#define TDA9887_PRESENT (1<<0) 129#define TDA9887_PRESENT (1<<0)
diff --git a/include/media/tvp514x.h b/include/media/tvp514x.h
new file mode 100644
index 000000000000..5e7ee968c6dc
--- /dev/null
+++ b/include/media/tvp514x.h
@@ -0,0 +1,118 @@
1/*
2 * drivers/media/video/tvp514x.h
3 *
4 * Copyright (C) 2008 Texas Instruments Inc
5 * Author: Vaibhav Hiremath <hvaibhav@ti.com>
6 *
7 * Contributors:
8 * Sivaraj R <sivaraj@ti.com>
9 * Brijesh R Jadav <brijesh.j@ti.com>
10 * Hardik Shah <hardik.shah@ti.com>
11 * Manjunath Hadli <mrh@ti.com>
12 * Karicheri Muralidharan <m-karicheri2@ti.com>
13 *
14 * This package is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 *
27 */
28
29#ifndef _TVP514X_H
30#define _TVP514X_H
31
32/*
33 * Other macros
34 */
35#define TVP514X_MODULE_NAME "tvp514x"
36
37#define TVP514X_XCLK_BT656 (27000000)
38
39/* Number of pixels and number of lines per frame for different standards */
40#define NTSC_NUM_ACTIVE_PIXELS (720)
41#define NTSC_NUM_ACTIVE_LINES (480)
42#define PAL_NUM_ACTIVE_PIXELS (720)
43#define PAL_NUM_ACTIVE_LINES (576)
44
45/**
46 * enum tvp514x_input - enum for different decoder input pin
47 * configuration.
48 */
49enum tvp514x_input {
50 /*
51 * CVBS input selection
52 */
53 INPUT_CVBS_VI1A = 0x0,
54 INPUT_CVBS_VI1B,
55 INPUT_CVBS_VI1C,
56 INPUT_CVBS_VI2A = 0x04,
57 INPUT_CVBS_VI2B,
58 INPUT_CVBS_VI2C,
59 INPUT_CVBS_VI3A = 0x08,
60 INPUT_CVBS_VI3B,
61 INPUT_CVBS_VI3C,
62 INPUT_CVBS_VI4A = 0x0C,
63 /*
64 * S-Video input selection
65 */
66 INPUT_SVIDEO_VI2A_VI1A = 0x44,
67 INPUT_SVIDEO_VI2B_VI1B,
68 INPUT_SVIDEO_VI2C_VI1C,
69 INPUT_SVIDEO_VI2A_VI3A = 0x54,
70 INPUT_SVIDEO_VI2B_VI3B,
71 INPUT_SVIDEO_VI2C_VI3C,
72 INPUT_SVIDEO_VI4A_VI1A = 0x4C,
73 INPUT_SVIDEO_VI4A_VI1B,
74 INPUT_SVIDEO_VI4A_VI1C,
75 INPUT_SVIDEO_VI4A_VI3A = 0x5C,
76 INPUT_SVIDEO_VI4A_VI3B,
77 INPUT_SVIDEO_VI4A_VI3C,
78
79 /* Need to add entries for
80 * RGB, YPbPr and SCART.
81 */
82 INPUT_INVALID
83};
84
85/**
86 * enum tvp514x_output - enum for output format
87 * supported.
88 *
89 */
90enum tvp514x_output {
91 OUTPUT_10BIT_422_EMBEDDED_SYNC = 0,
92 OUTPUT_20BIT_422_SEPERATE_SYNC,
93 OUTPUT_10BIT_422_SEPERATE_SYNC = 3,
94 OUTPUT_INVALID
95};
96
97/**
98 * struct tvp514x_platform_data - Platform data values and access functions.
99 * @power_set: Power state access function, zero is off, non-zero is on.
100 * @ifparm: Interface parameters access function.
101 * @priv_data_set: Device private data (pointer) access function.
102 * @clk_polarity: Clock polarity of the current interface.
103 * @ hs_polarity: HSYNC Polarity configuration for current interface.
104 * @ vs_polarity: VSYNC Polarity configuration for current interface.
105 */
106struct tvp514x_platform_data {
107 char *master;
108 int (*power_set) (enum v4l2_power on);
109 int (*ifparm) (struct v4l2_ifparm *p);
110 int (*priv_data_set) (void *);
111 /* Interface control params */
112 bool clk_polarity;
113 bool hs_polarity;
114 bool vs_polarity;
115};
116
117
118#endif /* ifndef _TVP514X_H */
diff --git a/include/media/tw9910.h b/include/media/tw9910.h
new file mode 100644
index 000000000000..73231e7880d8
--- /dev/null
+++ b/include/media/tw9910.h
@@ -0,0 +1,39 @@
1/*
2 * tw9910 Driver header
3 *
4 * Copyright (C) 2008 Renesas Solutions Corp.
5 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
6 *
7 * Based on ov772x.h
8 *
9 * Copyright (C) Kuninori Morimoto <morimoto.kuninori@renesas.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __TW9910_H__
17#define __TW9910_H__
18
19#include <media/soc_camera.h>
20
21enum tw9910_mpout_pin {
22 TW9910_MPO_VLOSS,
23 TW9910_MPO_HLOCK,
24 TW9910_MPO_SLOCK,
25 TW9910_MPO_VLOCK,
26 TW9910_MPO_MONO,
27 TW9910_MPO_DET50,
28 TW9910_MPO_FIELD,
29 TW9910_MPO_RTCO,
30};
31
32struct tw9910_video_info {
33 unsigned long buswidth;
34 enum tw9910_mpout_pin mpout;
35 struct soc_camera_link link;
36};
37
38
39#endif /* __TW9910_H__ */
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index d73a8e9028a5..43dbb659f1f5 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -60,6 +60,8 @@ enum {
60 60
61 /* OmniVision sensors: reserved range 250-299 */ 61 /* OmniVision sensors: reserved range 250-299 */
62 V4L2_IDENT_OV7670 = 250, 62 V4L2_IDENT_OV7670 = 250,
63 V4L2_IDENT_OV7720 = 251,
64 V4L2_IDENT_OV7725 = 252,
63 65
64 /* Conexant MPEG encoder/decoders: reserved range 410-420 */ 66 /* Conexant MPEG encoder/decoders: reserved range 410-420 */
65 V4L2_IDENT_CX23415 = 415, 67 V4L2_IDENT_CX23415 = 415,
@@ -69,6 +71,9 @@ enum {
69 /* module vp27smpx: just ident 2700 */ 71 /* module vp27smpx: just ident 2700 */
70 V4L2_IDENT_VP27SMPX = 2700, 72 V4L2_IDENT_VP27SMPX = 2700,
71 73
74 /* module tvp5150 */
75 V4L2_IDENT_TVP5150 = 5150,
76
72 /* module cs5345: just ident 5345 */ 77 /* module cs5345: just ident 5345 */
73 V4L2_IDENT_CS5345 = 5345, 78 V4L2_IDENT_CS5345 = 5345,
74 79
@@ -82,6 +87,9 @@ enum {
82 /* module wm8775: just ident 8775 */ 87 /* module wm8775: just ident 8775 */
83 V4L2_IDENT_WM8775 = 8775, 88 V4L2_IDENT_WM8775 = 8775,
84 89
90 /* module tw9910: just ident 9910 */
91 V4L2_IDENT_TW9910 = 9910,
92
85 /* module cs53132a: just ident 53132 */ 93 /* module cs53132a: just ident 53132 */
86 V4L2_IDENT_CS53l32A = 53132, 94 V4L2_IDENT_CS53l32A = 53132,
87 95
@@ -166,8 +174,10 @@ enum {
166 V4L2_IDENT_MT9M001C12ST = 45000, 174 V4L2_IDENT_MT9M001C12ST = 45000,
167 V4L2_IDENT_MT9M001C12STM = 45005, 175 V4L2_IDENT_MT9M001C12STM = 45005,
168 V4L2_IDENT_MT9M111 = 45007, 176 V4L2_IDENT_MT9M111 = 45007,
177 V4L2_IDENT_MT9M112 = 45008,
169 V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ 178 V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */
170 V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ 179 V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */
180 V4L2_IDENT_MT9T031 = 45020,
171}; 181};
172 182
173#endif 183#endif
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 2f8719abf5cb..f99c866d8c37 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -57,6 +57,29 @@
57 57
58/* ------------------------------------------------------------------------- */ 58/* ------------------------------------------------------------------------- */
59 59
60/* These printk constructs can be used with v4l2_device and v4l2_subdev */
61#define v4l2_printk(level, dev, fmt, arg...) \
62 printk(level "%s: " fmt, (dev)->name , ## arg)
63
64#define v4l2_err(dev, fmt, arg...) \
65 v4l2_printk(KERN_ERR, dev, fmt , ## arg)
66
67#define v4l2_warn(dev, fmt, arg...) \
68 v4l2_printk(KERN_WARNING, dev, fmt , ## arg)
69
70#define v4l2_info(dev, fmt, arg...) \
71 v4l2_printk(KERN_INFO, dev, fmt , ## arg)
72
73/* These three macros assume that the debug level is set with a module
74 parameter called 'debug'. */
75#define v4l2_dbg(level, debug, dev, fmt, arg...) \
76 do { \
77 if (debug >= (level)) \
78 v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \
79 } while (0)
80
81/* ------------------------------------------------------------------------- */
82
60/* Priority helper functions */ 83/* Priority helper functions */
61 84
62struct v4l2_prio_state { 85struct v4l2_prio_state {
@@ -104,11 +127,29 @@ struct i2c_driver;
104struct i2c_adapter; 127struct i2c_adapter;
105struct i2c_client; 128struct i2c_client;
106struct i2c_device_id; 129struct i2c_device_id;
130struct v4l2_device;
131struct v4l2_subdev;
132struct v4l2_subdev_ops;
107 133
108int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver, 134int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver,
109 const char *name, 135 const char *name,
110 int (*probe)(struct i2c_client *, const struct i2c_device_id *)); 136 int (*probe)(struct i2c_client *, const struct i2c_device_id *));
111 137
138/* Load an i2c module and return an initialized v4l2_subdev struct.
139 Only call request_module if module_name != NULL.
140 The client_type argument is the name of the chip that's on the adapter. */
141struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
142 const char *module_name, const char *client_type, u8 addr);
143/* Probe and load an i2c module and return an initialized v4l2_subdev struct.
144 Only call request_module if module_name != NULL.
145 The client_type argument is the name of the chip that's on the adapter. */
146struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
147 const char *module_name, const char *client_type,
148 const unsigned short *addrs);
149/* Initialize an v4l2_subdev with data from an i2c_client struct */
150void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
151 const struct v4l2_subdev_ops *ops);
152
112/* ------------------------------------------------------------------------- */ 153/* ------------------------------------------------------------------------- */
113 154
114/* Internal ioctls */ 155/* Internal ioctls */
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index a0a6b41c5e09..0a88d1d17d30 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -25,6 +25,12 @@
25#define VFL_TYPE_MAX 4 25#define VFL_TYPE_MAX 4
26 26
27struct v4l2_ioctl_callbacks; 27struct v4l2_ioctl_callbacks;
28struct v4l2_device;
29
30/* Flag to mark the video_device struct as unregistered.
31 Drivers can set this flag if they want to block all future
32 device access. It is set by video_unregister_device. */
33#define V4L2_FL_UNREGISTERED (0)
28 34
29/* 35/*
30 * Newer version of video_device, handled by videodev2.c 36 * Newer version of video_device, handled by videodev2.c
@@ -39,15 +45,20 @@ struct video_device
39 45
40 /* sysfs */ 46 /* sysfs */
41 struct device dev; /* v4l device */ 47 struct device dev; /* v4l device */
42 struct cdev cdev; /* character device */ 48 struct cdev *cdev; /* character device */
43 void (*cdev_release)(struct kobject *kobj); 49
50 /* Set either parent or v4l2_dev if your driver uses v4l2_device */
44 struct device *parent; /* device parent */ 51 struct device *parent; /* device parent */
52 struct v4l2_device *v4l2_dev; /* v4l2_device parent */
45 53
46 /* device info */ 54 /* device info */
47 char name[32]; 55 char name[32];
48 int vfl_type; 56 int vfl_type;
57 /* 'minor' is set to -1 if the registration failed */
49 int minor; 58 int minor;
50 u16 num; 59 u16 num;
60 /* use bitops to set/clear/test flags */
61 unsigned long flags;
51 /* attribute to differentiate multiple indices on one physical device */ 62 /* attribute to differentiate multiple indices on one physical device */
52 int index; 63 int index;
53 64
@@ -58,7 +69,7 @@ struct video_device
58 v4l2_std_id current_norm; /* Current tvnorm */ 69 v4l2_std_id current_norm; /* Current tvnorm */
59 70
60 /* callbacks */ 71 /* callbacks */
61 void (*release)(struct video_device *vfd); 72 void (*release)(struct video_device *vdev);
62 73
63 /* ioctl callbacks */ 74 /* ioctl callbacks */
64 const struct v4l2_ioctl_ops *ioctl_ops; 75 const struct v4l2_ioctl_ops *ioctl_ops;
@@ -67,36 +78,41 @@ struct video_device
67/* dev to video-device */ 78/* dev to video-device */
68#define to_video_device(cd) container_of(cd, struct video_device, dev) 79#define to_video_device(cd) container_of(cd, struct video_device, dev)
69 80
70/* Register and unregister devices. Note that if video_register_device fails, 81/* Register video devices. Note that if video_register_device fails,
71 the release() callback of the video_device structure is *not* called, so 82 the release() callback of the video_device structure is *not* called, so
72 the caller is responsible for freeing any data. Usually that means that 83 the caller is responsible for freeing any data. Usually that means that
73 you call video_device_release() on failure. */ 84 you call video_device_release() on failure.
74int __must_check video_register_device(struct video_device *vfd, int type, int nr); 85
75int __must_check video_register_device_index(struct video_device *vfd, 86 Also note that vdev->minor is set to -1 if the registration failed. */
87int __must_check video_register_device(struct video_device *vdev, int type, int nr);
88int __must_check video_register_device_index(struct video_device *vdev,
76 int type, int nr, int index); 89 int type, int nr, int index);
77void video_unregister_device(struct video_device *vfd); 90
91/* Unregister video devices. Will do nothing if vdev == NULL or
92 vdev->minor < 0. */
93void video_unregister_device(struct video_device *vdev);
78 94
79/* helper functions to alloc/release struct video_device, the 95/* helper functions to alloc/release struct video_device, the
80 latter can also be used for video_device->release(). */ 96 latter can also be used for video_device->release(). */
81struct video_device * __must_check video_device_alloc(void); 97struct video_device * __must_check video_device_alloc(void);
82 98
83/* this release function frees the vfd pointer */ 99/* this release function frees the vdev pointer */
84void video_device_release(struct video_device *vfd); 100void video_device_release(struct video_device *vdev);
85 101
86/* this release function does nothing, use when the video_device is a 102/* this release function does nothing, use when the video_device is a
87 static global struct. Note that having a static video_device is 103 static global struct. Note that having a static video_device is
88 a dubious construction at best. */ 104 a dubious construction at best. */
89void video_device_release_empty(struct video_device *vfd); 105void video_device_release_empty(struct video_device *vdev);
90 106
91/* helper functions to access driver private data. */ 107/* helper functions to access driver private data. */
92static inline void *video_get_drvdata(struct video_device *dev) 108static inline void *video_get_drvdata(struct video_device *vdev)
93{ 109{
94 return dev_get_drvdata(&dev->dev); 110 return dev_get_drvdata(&vdev->dev);
95} 111}
96 112
97static inline void video_set_drvdata(struct video_device *dev, void *data) 113static inline void video_set_drvdata(struct video_device *vdev, void *data)
98{ 114{
99 dev_set_drvdata(&dev->dev, data); 115 dev_set_drvdata(&vdev->dev, data);
100} 116}
101 117
102struct video_device *video_devdata(struct file *file); 118struct video_device *video_devdata(struct file *file);
@@ -108,4 +124,9 @@ static inline void *video_drvdata(struct file *file)
108 return video_get_drvdata(video_devdata(file)); 124 return video_get_drvdata(video_devdata(file));
109} 125}
110 126
127static inline int video_is_unregistered(struct video_device *vdev)
128{
129 return test_bit(V4L2_FL_UNREGISTERED, &vdev->flags);
130}
131
111#endif /* _V4L2_DEV_H */ 132#endif /* _V4L2_DEV_H */
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
new file mode 100644
index 000000000000..97b283a04289
--- /dev/null
+++ b/include/media/v4l2-device.h
@@ -0,0 +1,109 @@
1/*
2 V4L2 device support header.
3
4 Copyright (C) 2008 Hans Verkuil <hverkuil@xs4all.nl>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef _V4L2_DEVICE_H
22#define _V4L2_DEVICE_H
23
24#include <media/v4l2-subdev.h>
25
26/* Each instance of a V4L2 device should create the v4l2_device struct,
27 either stand-alone or embedded in a larger struct.
28
29 It allows easy access to sub-devices (see v4l2-subdev.h) and provides
30 basic V4L2 device-level support.
31 */
32
33#define V4L2_DEVICE_NAME_SIZE (BUS_ID_SIZE + 16)
34
35struct v4l2_device {
36 /* dev->driver_data points to this struct */
37 struct device *dev;
38 /* used to keep track of the registered subdevs */
39 struct list_head subdevs;
40 /* lock this struct; can be used by the driver as well if this
41 struct is embedded into a larger struct. */
42 spinlock_t lock;
43 /* unique device name, by default the driver name + bus ID */
44 char name[V4L2_DEVICE_NAME_SIZE];
45};
46
47/* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev */
48int __must_check v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev);
49/* Set v4l2_dev->dev->driver_data to NULL and unregister all sub-devices */
50void v4l2_device_unregister(struct v4l2_device *v4l2_dev);
51
52/* Register a subdev with a v4l2 device. While registered the subdev module
53 is marked as in-use. An error is returned if the module is no longer
54 loaded when you attempt to register it. */
55int __must_check v4l2_device_register_subdev(struct v4l2_device *dev, struct v4l2_subdev *sd);
56/* Unregister a subdev with a v4l2 device. Can also be called if the subdev
57 wasn't registered. In that case it will do nothing. */
58void v4l2_device_unregister_subdev(struct v4l2_subdev *sd);
59
60/* Iterate over all subdevs. */
61#define v4l2_device_for_each_subdev(sd, dev) \
62 list_for_each_entry(sd, &(dev)->subdevs, list)
63
64/* Call the specified callback for all subdevs matching the condition.
65 Ignore any errors. Note that you cannot add or delete a subdev
66 while walking the subdevs list. */
67#define __v4l2_device_call_subdevs(dev, cond, o, f, args...) \
68 do { \
69 struct v4l2_subdev *sd; \
70 \
71 list_for_each_entry(sd, &(dev)->subdevs, list) \
72 if ((cond) && sd->ops->o && sd->ops->o->f) \
73 sd->ops->o->f(sd , ##args); \
74 } while (0)
75
76/* Call the specified callback for all subdevs matching the condition.
77 If the callback returns an error other than 0 or -ENOIOCTLCMD, then
78 return with that error code. Note that you cannot add or delete a
79 subdev while walking the subdevs list. */
80#define __v4l2_device_call_subdevs_until_err(dev, cond, o, f, args...) \
81({ \
82 struct v4l2_subdev *sd; \
83 int err = 0; \
84 \
85 list_for_each_entry(sd, &(dev)->subdevs, list) { \
86 if ((cond) && sd->ops->o && sd->ops->o->f) \
87 err = sd->ops->o->f(sd , ##args); \
88 if (err && err != -ENOIOCTLCMD) \
89 break; \
90 } \
91 (err == -ENOIOCTLCMD) ? 0 : err; \
92})
93
94/* Call the specified callback for all subdevs matching grp_id (if 0, then
95 match them all). Ignore any errors. Note that you cannot add or delete
96 a subdev while walking the subdevs list. */
97#define v4l2_device_call_all(dev, grp_id, o, f, args...) \
98 __v4l2_device_call_subdevs(dev, \
99 !(grp_id) || sd->grp_id == (grp_id), o, f , ##args)
100
101/* Call the specified callback for all subdevs matching grp_id (if 0, then
102 match them all). If the callback returns an error other than 0 or
103 -ENOIOCTLCMD, then return with that error code. Note that you cannot
104 add or delete a subdev while walking the subdevs list. */
105#define v4l2_device_call_until_err(dev, grp_id, o, f, args...) \
106 __v4l2_device_call_subdevs_until_err(dev, \
107 !(grp_id) || sd->grp_id == (grp_id), o, f , ##args)
108
109#endif
diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h
index 975ffbf4e2c5..e65dd9d84e8b 100644
--- a/include/media/v4l2-i2c-drv-legacy.h
+++ b/include/media/v4l2-i2c-drv-legacy.h
@@ -21,6 +21,17 @@
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */ 22 */
23 23
24/* NOTE: the full version of this header is in the v4l-dvb repository
25 * and allows v4l i2c drivers to be compiled on older kernels as well.
26 * The version of this header as it appears in the kernel is a stripped
27 * version (without all the backwards compatibility stuff) and so it
28 * looks a bit odd.
29 *
30 * If you look at the full version then you will understand the reason
31 * for introducing this header since you really don't want to have all
32 * the tricky backwards compatibility code in each and every i2c driver.
33 */
34
24struct v4l2_i2c_driver_data { 35struct v4l2_i2c_driver_data {
25 const char * const name; 36 const char * const name;
26 int driverid; 37 int driverid;
diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h
index 40ecef29801d..efdc8bf27f87 100644
--- a/include/media/v4l2-i2c-drv.h
+++ b/include/media/v4l2-i2c-drv.h
@@ -21,6 +21,17 @@
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */ 22 */
23 23
24/* NOTE: the full version of this header is in the v4l-dvb repository
25 * and allows v4l i2c drivers to be compiled on older kernels as well.
26 * The version of this header as it appears in the kernel is a stripped
27 * version (without all the backwards compatibility stuff) and so it
28 * looks a bit odd.
29 *
30 * If you look at the full version then you will understand the reason
31 * for introducing this header since you really don't want to have all
32 * the tricky backwards compatibility code in each and every i2c driver.
33 */
34
24#ifndef __V4L2_I2C_DRV_H__ 35#ifndef __V4L2_I2C_DRV_H__
25#define __V4L2_I2C_DRV_H__ 36#define __V4L2_I2C_DRV_H__
26 37
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index c8b80e0f0651..ecda3c725837 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -84,6 +84,8 @@ struct v4l2_int_device {
84 void *priv; 84 void *priv;
85}; 85};
86 86
87void v4l2_int_device_try_attach_all(void);
88
87int v4l2_int_device_register(struct v4l2_int_device *d); 89int v4l2_int_device_register(struct v4l2_int_device *d);
88void v4l2_int_device_unregister(struct v4l2_int_device *d); 90void v4l2_int_device_unregister(struct v4l2_int_device *d);
89 91
@@ -96,6 +98,12 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg);
96 * 98 *
97 */ 99 */
98 100
101enum v4l2_power {
102 V4L2_POWER_OFF = 0,
103 V4L2_POWER_ON,
104 V4L2_POWER_STANDBY,
105};
106
99/* Slave interface type. */ 107/* Slave interface type. */
100enum v4l2_if_type { 108enum v4l2_if_type {
101 /* 109 /*
@@ -170,8 +178,14 @@ enum v4l2_int_ioctl_num {
170 vidioc_int_queryctrl_num, 178 vidioc_int_queryctrl_num,
171 vidioc_int_g_ctrl_num, 179 vidioc_int_g_ctrl_num,
172 vidioc_int_s_ctrl_num, 180 vidioc_int_s_ctrl_num,
181 vidioc_int_cropcap_num,
182 vidioc_int_g_crop_num,
183 vidioc_int_s_crop_num,
173 vidioc_int_g_parm_num, 184 vidioc_int_g_parm_num,
174 vidioc_int_s_parm_num, 185 vidioc_int_s_parm_num,
186 vidioc_int_querystd_num,
187 vidioc_int_s_std_num,
188 vidioc_int_s_video_routing_num,
175 189
176 /* 190 /*
177 * 191 *
@@ -182,12 +196,19 @@ enum v4l2_int_ioctl_num {
182 vidioc_int_dev_init_num = 1000, 196 vidioc_int_dev_init_num = 1000,
183 /* Delinitialise the device at slave detach. */ 197 /* Delinitialise the device at slave detach. */
184 vidioc_int_dev_exit_num, 198 vidioc_int_dev_exit_num,
185 /* Set device power state: 0 is off, non-zero is on. */ 199 /* Set device power state. */
186 vidioc_int_s_power_num, 200 vidioc_int_s_power_num,
201 /*
202 * Get slave private data, e.g. platform-specific slave
203 * configuration used by the master.
204 */
205 vidioc_int_g_priv_num,
187 /* Get slave interface parameters. */ 206 /* Get slave interface parameters. */
188 vidioc_int_g_ifparm_num, 207 vidioc_int_g_ifparm_num,
189 /* Does the slave need to be reset after VIDIOC_DQBUF? */ 208 /* Does the slave need to be reset after VIDIOC_DQBUF? */
190 vidioc_int_g_needs_reset_num, 209 vidioc_int_g_needs_reset_num,
210 vidioc_int_enum_framesizes_num,
211 vidioc_int_enum_frameintervals_num,
191 212
192 /* 213 /*
193 * 214 *
@@ -261,14 +282,23 @@ V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *);
261V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *); 282V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *);
262V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *); 283V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *);
263V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *); 284V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *);
285V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *);
286V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *);
287V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *);
264V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *); 288V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *);
265V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *); 289V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
290V4L2_INT_WRAPPER_1(querystd, v4l2_std_id, *);
291V4L2_INT_WRAPPER_1(s_std, v4l2_std_id, *);
292V4L2_INT_WRAPPER_1(s_video_routing, struct v4l2_routing, *);
266 293
267V4L2_INT_WRAPPER_0(dev_init); 294V4L2_INT_WRAPPER_0(dev_init);
268V4L2_INT_WRAPPER_0(dev_exit); 295V4L2_INT_WRAPPER_0(dev_exit);
269V4L2_INT_WRAPPER_1(s_power, int, ); 296V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
297V4L2_INT_WRAPPER_1(g_priv, void, *);
270V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *); 298V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
271V4L2_INT_WRAPPER_1(g_needs_reset, void, *); 299V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
300V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *);
301V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *);
272 302
273V4L2_INT_WRAPPER_0(reset); 303V4L2_INT_WRAPPER_0(reset);
274V4L2_INT_WRAPPER_0(init); 304V4L2_INT_WRAPPER_0(init);
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 0bef03add796..fcdb58c4ce07 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -232,6 +232,12 @@ struct v4l2_ioctl_ops {
232 int (*vidioc_g_chip_ident) (struct file *file, void *fh, 232 int (*vidioc_g_chip_ident) (struct file *file, void *fh,
233 struct v4l2_chip_ident *chip); 233 struct v4l2_chip_ident *chip);
234 234
235 int (*vidioc_enum_framesizes) (struct file *file, void *fh,
236 struct v4l2_frmsizeenum *fsize);
237
238 int (*vidioc_enum_frameintervals) (struct file *file, void *fh,
239 struct v4l2_frmivalenum *fival);
240
235 /* For other private ioctls */ 241 /* For other private ioctls */
236 int (*vidioc_default) (struct file *file, void *fh, 242 int (*vidioc_default) (struct file *file, void *fh,
237 int cmd, void *arg); 243 int cmd, void *arg);
@@ -271,26 +277,36 @@ extern const char *v4l2_field_names[];
271extern const char *v4l2_type_names[]; 277extern const char *v4l2_type_names[];
272 278
273/* Compatibility layer interface -- v4l1-compat module */ 279/* Compatibility layer interface -- v4l1-compat module */
274typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, 280typedef int (*v4l2_kioctl)(struct file *file,
275 unsigned int cmd, void *arg); 281 unsigned int cmd, void *arg);
276#ifdef CONFIG_VIDEO_V4L1_COMPAT 282#ifdef CONFIG_VIDEO_V4L1_COMPAT
277int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, 283int v4l_compat_translate_ioctl(struct file *file,
278 int cmd, void *arg, v4l2_kioctl driver_ioctl); 284 int cmd, void *arg, v4l2_kioctl driver_ioctl);
279#else 285#else
280#define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL) 286#define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL)
281#endif 287#endif
282 288
283/* 32 Bits compatibility layer for 64 bits processors */ 289/* 32 Bits compatibility layer for 64 bits processors */
284extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, 290extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
285 unsigned long arg); 291 unsigned long arg);
286 292
287extern int video_ioctl2(struct inode *inode, struct file *file,
288 unsigned int cmd, unsigned long arg);
289
290/* Include support for obsoleted stuff */ 293/* Include support for obsoleted stuff */
291extern int video_usercopy(struct inode *inode, struct file *file, 294extern int video_usercopy(struct file *file, unsigned int cmd,
292 unsigned int cmd, unsigned long arg, 295 unsigned long arg, v4l2_kioctl func);
293 int (*func)(struct inode *inode, struct file *file, 296
294 unsigned int cmd, void *arg)); 297/* Standard handlers for V4L ioctl's */
298
299/* This prototype is used on fops.unlocked_ioctl */
300extern long __video_ioctl2(struct file *file,
301 unsigned int cmd, unsigned long arg);
302
303/* This prototype is used on fops.ioctl
304 * Since fops.ioctl enables Kernel Big Lock, it is preferred
305 * to use __video_ioctl2 instead.
306 * It should be noticed that there's no lock code inside
307 * video_ioctl2().
308 */
309extern int video_ioctl2(struct inode *inode, struct file *file,
310 unsigned int cmd, unsigned long arg);
295 311
296#endif /* _V4L2_IOCTL_H */ 312#endif /* _V4L2_IOCTL_H */
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
new file mode 100644
index 000000000000..ceef016bb0b7
--- /dev/null
+++ b/include/media/v4l2-subdev.h
@@ -0,0 +1,189 @@
1/*
2 V4L2 sub-device support header.
3
4 Copyright (C) 2008 Hans Verkuil <hverkuil@xs4all.nl>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef _V4L2_SUBDEV_H
22#define _V4L2_SUBDEV_H
23
24#include <media/v4l2-common.h>
25
26struct v4l2_device;
27struct v4l2_subdev;
28struct tuner_setup;
29
30/* Sub-devices are devices that are connected somehow to the main bridge
31 device. These devices are usually audio/video muxers/encoders/decoders or
32 sensors and webcam controllers.
33
34 Usually these devices are controlled through an i2c bus, but other busses
35 may also be used.
36
37 The v4l2_subdev struct provides a way of accessing these devices in a
38 generic manner. Most operations that these sub-devices support fall in
39 a few categories: core ops, audio ops, video ops and tuner ops.
40
41 More categories can be added if needed, although this should remain a
42 limited set (no more than approx. 8 categories).
43
44 Each category has its own set of ops that subdev drivers can implement.
45
46 A subdev driver can leave the pointer to the category ops NULL if
47 it does not implement them (e.g. an audio subdev will generally not
48 implement the video category ops). The exception is the core category:
49 this must always be present.
50
51 These ops are all used internally so it is no problem to change, remove
52 or add ops or move ops from one to another category. Currently these
53 ops are based on the original ioctls, but since ops are not limited to
54 one argument there is room for improvement here once all i2c subdev
55 drivers are converted to use these ops.
56 */
57
58/* Core ops: it is highly recommended to implement at least these ops:
59
60 g_chip_ident
61 log_status
62 g_register
63 s_register
64
65 This provides basic debugging support.
66
67 The ioctl ops is meant for generic ioctl-like commands. Depending on
68 the use-case it might be better to use subdev-specific ops (currently
69 not yet implemented) since ops provide proper type-checking.
70 */
71struct v4l2_subdev_core_ops {
72 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_chip_ident *chip);
73 int (*log_status)(struct v4l2_subdev *sd);
74 int (*init)(struct v4l2_subdev *sd, u32 val);
75 int (*s_standby)(struct v4l2_subdev *sd, u32 standby);
76 int (*reset)(struct v4l2_subdev *sd, u32 val);
77 int (*s_gpio)(struct v4l2_subdev *sd, u32 val);
78 int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc);
79 int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
80 int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
81 int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm);
82 int (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg);
83#ifdef CONFIG_VIDEO_ADV_DEBUG
84 int (*g_register)(struct v4l2_subdev *sd, struct v4l2_register *reg);
85 int (*s_register)(struct v4l2_subdev *sd, struct v4l2_register *reg);
86#endif
87};
88
89struct v4l2_subdev_tuner_ops {
90 int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type);
91 int (*s_radio)(struct v4l2_subdev *sd);
92 int (*s_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
93 int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
94 int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
95 int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
96 int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm);
97 int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
98 int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
99};
100
101struct v4l2_subdev_audio_ops {
102 int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
103 int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
104 int (*s_routing)(struct v4l2_subdev *sd, const struct v4l2_routing *route);
105};
106
107struct v4l2_subdev_video_ops {
108 int (*s_routing)(struct v4l2_subdev *sd, const struct v4l2_routing *route);
109 int (*s_crystal_freq)(struct v4l2_subdev *sd, struct v4l2_crystal_freq *freq);
110 int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line);
111 int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data);
112 int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data);
113 int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap);
114 int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std);
115 int (*s_stream)(struct v4l2_subdev *sd, int enable);
116 int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
117 int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
118};
119
120struct v4l2_subdev_ops {
121 const struct v4l2_subdev_core_ops *core;
122 const struct v4l2_subdev_tuner_ops *tuner;
123 const struct v4l2_subdev_audio_ops *audio;
124 const struct v4l2_subdev_video_ops *video;
125};
126
127#define V4L2_SUBDEV_NAME_SIZE 32
128
129/* Each instance of a subdev driver should create this struct, either
130 stand-alone or embedded in a larger struct.
131 */
132struct v4l2_subdev {
133 struct list_head list;
134 struct module *owner;
135 struct v4l2_device *dev;
136 const struct v4l2_subdev_ops *ops;
137 /* name must be unique */
138 char name[V4L2_SUBDEV_NAME_SIZE];
139 /* can be used to group similar subdevs, value is driver-specific */
140 u32 grp_id;
141 /* pointer to private data */
142 void *priv;
143};
144
145static inline void v4l2_set_subdevdata(struct v4l2_subdev *sd, void *p)
146{
147 sd->priv = p;
148}
149
150static inline void *v4l2_get_subdevdata(const struct v4l2_subdev *sd)
151{
152 return sd->priv;
153}
154
155/* Convert an ioctl-type command to the proper v4l2_subdev_ops function call.
156 This is used by subdev modules that can be called by both old-style ioctl
157 commands and through the v4l2_subdev_ops.
158
159 The ioctl API of the subdev driver can call this function to call the
160 right ops based on the ioctl cmd and arg.
161
162 Once all subdev drivers have been converted and all drivers no longer
163 use the ioctl interface, then this function can be removed.
164 */
165int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg);
166
167static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
168 const struct v4l2_subdev_ops *ops)
169{
170 INIT_LIST_HEAD(&sd->list);
171 /* ops->core MUST be set */
172 BUG_ON(!ops || !ops->core);
173 sd->ops = ops;
174 sd->dev = NULL;
175 sd->name[0] = '\0';
176 sd->grp_id = 0;
177 sd->priv = NULL;
178}
179
180/* Call an ops of a v4l2_subdev, doing the right checks against
181 NULL pointers.
182
183 Example: err = v4l2_subdev_call(sd, core, g_chip_ident, &chip);
184 */
185#define v4l2_subdev_call(sd, o, f, args...) \
186 (!(sd) ? -ENODEV : (((sd) && (sd)->ops->o && (sd)->ops->o->f) ? \
187 (sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD))
188
189#endif
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h
index b77748696329..6ba4f1271d23 100644
--- a/include/media/videobuf-dvb.h
+++ b/include/media/videobuf-dvb.h
@@ -16,7 +16,6 @@ struct videobuf_dvb {
16 int nfeeds; 16 int nfeeds;
17 17
18 /* videobuf_dvb_(un)register manges this */ 18 /* videobuf_dvb_(un)register manges this */
19 struct dvb_adapter adapter;
20 struct dvb_demux demux; 19 struct dvb_demux demux;
21 struct dmxdev dmxdev; 20 struct dmxdev dmxdev;
22 struct dmx_frontend fe_hw; 21 struct dmx_frontend fe_hw;
@@ -24,12 +23,35 @@ struct videobuf_dvb {
24 struct dvb_net net; 23 struct dvb_net net;
25}; 24};
26 25
27int videobuf_dvb_register(struct videobuf_dvb *dvb, 26struct videobuf_dvb_frontend {
27 struct list_head felist;
28 int id;
29 struct videobuf_dvb dvb;
30};
31
32struct videobuf_dvb_frontends {
33 struct list_head felist;
34 struct mutex lock;
35 struct dvb_adapter adapter;
36 int active_fe_id; /* Indicates which frontend in the felist is in use */
37 int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
38};
39
40int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
28 struct module *module, 41 struct module *module,
29 void *adapter_priv, 42 void *adapter_priv,
30 struct device *device, 43 struct device *device,
31 short *adapter_nr); 44 short *adapter_nr,
32void videobuf_dvb_unregister(struct videobuf_dvb *dvb); 45 int mfe_shared);
46
47void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
48
49struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id);
50void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f);
51
52struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
53int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
54
33 55
34/* 56/*
35 * Local variables: 57 * Local variables:
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index c3626c0ba9d3..b77c1478c99f 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -27,8 +27,6 @@
27#ifndef NET_9P_H 27#ifndef NET_9P_H
28#define NET_9P_H 28#define NET_9P_H
29 29
30#ifdef CONFIG_NET_9P_DEBUG
31
32/** 30/**
33 * enum p9_debug_flags - bits for mount time debug parameter 31 * enum p9_debug_flags - bits for mount time debug parameter
34 * @P9_DEBUG_ERROR: more verbose error messages including original error string 32 * @P9_DEBUG_ERROR: more verbose error messages including original error string
@@ -39,6 +37,7 @@
39 * @P9_DEBUG_TRANS: transport tracing 37 * @P9_DEBUG_TRANS: transport tracing
40 * @P9_DEBUG_SLABS: memory management tracing 38 * @P9_DEBUG_SLABS: memory management tracing
41 * @P9_DEBUG_FCALL: verbose dump of protocol messages 39 * @P9_DEBUG_FCALL: verbose dump of protocol messages
40 * @P9_DEBUG_FID: fid allocation/deallocation tracking
42 * 41 *
43 * These flags are passed at mount time to turn on various levels of 42 * These flags are passed at mount time to turn on various levels of
44 * verbosity and tracing which will be output to the system logs. 43 * verbosity and tracing which will be output to the system logs.
@@ -53,30 +52,33 @@ enum p9_debug_flags {
53 P9_DEBUG_TRANS = (1<<6), 52 P9_DEBUG_TRANS = (1<<6),
54 P9_DEBUG_SLABS = (1<<7), 53 P9_DEBUG_SLABS = (1<<7),
55 P9_DEBUG_FCALL = (1<<8), 54 P9_DEBUG_FCALL = (1<<8),
55 P9_DEBUG_FID = (1<<9),
56 P9_DEBUG_PKT = (1<<10),
56}; 57};
57 58
59#ifdef CONFIG_NET_9P_DEBUG
58extern unsigned int p9_debug_level; 60extern unsigned int p9_debug_level;
59 61
60#define P9_DPRINTK(level, format, arg...) \ 62#define P9_DPRINTK(level, format, arg...) \
61do { \ 63do { \
62 if ((p9_debug_level & level) == level) \ 64 if ((p9_debug_level & level) == level) {\
63 printk(KERN_NOTICE "-- %s (%d): " \ 65 if (level == P9_DEBUG_9P) \
64 format , __FUNCTION__, task_pid_nr(current) , ## arg); \ 66 printk(KERN_NOTICE "(%8.8d) " \
67 format , task_pid_nr(current) , ## arg); \
68 else \
69 printk(KERN_NOTICE "-- %s (%d): " \
70 format , __func__, task_pid_nr(current) , ## arg); \
71 } \
65} while (0) 72} while (0)
66 73
67#define PRINT_FCALL_ERROR(s, fcall) P9_DPRINTK(P9_DEBUG_ERROR, \
68 "%s: %.*s\n", s, fcall?fcall->params.rerror.error.len:0, \
69 fcall?fcall->params.rerror.error.str:"");
70
71#else 74#else
72#define P9_DPRINTK(level, format, arg...) do { } while (0) 75#define P9_DPRINTK(level, format, arg...) do { } while (0)
73#define PRINT_FCALL_ERROR(s, fcall) do { } while (0)
74#endif 76#endif
75 77
76#define P9_EPRINTK(level, format, arg...) \ 78#define P9_EPRINTK(level, format, arg...) \
77do { \ 79do { \
78 printk(level "9p: %s (%d): " \ 80 printk(level "9p: %s (%d): " \
79 format , __FUNCTION__, task_pid_nr(current), ## arg); \ 81 format , __func__, task_pid_nr(current), ## arg); \
80} while (0) 82} while (0)
81 83
82/** 84/**
@@ -325,33 +327,6 @@ struct p9_qid {
325 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat 327 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
326 */ 328 */
327 329
328struct p9_stat {
329 u16 size;
330 u16 type;
331 u32 dev;
332 struct p9_qid qid;
333 u32 mode;
334 u32 atime;
335 u32 mtime;
336 u64 length;
337 struct p9_str name;
338 struct p9_str uid;
339 struct p9_str gid;
340 struct p9_str muid;
341 struct p9_str extension; /* 9p2000.u extensions */
342 u32 n_uid; /* 9p2000.u extensions */
343 u32 n_gid; /* 9p2000.u extensions */
344 u32 n_muid; /* 9p2000.u extensions */
345};
346
347/*
348 * file metadata (stat) structure used to create Twstat message
349 * The is identical to &p9_stat, but the strings don't point to
350 * the same memory block and should be freed separately
351 *
352 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
353 */
354
355struct p9_wstat { 330struct p9_wstat {
356 u16 size; 331 u16 size;
357 u16 type; 332 u16 type;
@@ -493,12 +468,12 @@ struct p9_tstat {
493}; 468};
494 469
495struct p9_rstat { 470struct p9_rstat {
496 struct p9_stat stat; 471 struct p9_wstat stat;
497}; 472};
498 473
499struct p9_twstat { 474struct p9_twstat {
500 u32 fid; 475 u32 fid;
501 struct p9_stat stat; 476 struct p9_wstat stat;
502}; 477};
503 478
504struct p9_rwstat { 479struct p9_rwstat {
@@ -509,8 +484,9 @@ struct p9_rwstat {
509 * @size: prefixed length of the structure 484 * @size: prefixed length of the structure
510 * @id: protocol operating identifier of type &p9_msg_t 485 * @id: protocol operating identifier of type &p9_msg_t
511 * @tag: transaction id of the request 486 * @tag: transaction id of the request
487 * @offset: used by marshalling routines to track currentposition in buffer
488 * @capacity: used by marshalling routines to track total capacity
512 * @sdata: payload 489 * @sdata: payload
513 * @params: per-operation parameters
514 * 490 *
515 * &p9_fcall represents the structure for all 9P RPC 491 * &p9_fcall represents the structure for all 9P RPC
516 * transactions. Requests are packaged into fcalls, and reponses 492 * transactions. Requests are packaged into fcalls, and reponses
@@ -523,68 +499,15 @@ struct p9_fcall {
523 u32 size; 499 u32 size;
524 u8 id; 500 u8 id;
525 u16 tag; 501 u16 tag;
526 void *sdata; 502
527 503 size_t offset;
528 union { 504 size_t capacity;
529 struct p9_tversion tversion; 505
530 struct p9_rversion rversion; 506 uint8_t *sdata;
531 struct p9_tauth tauth;
532 struct p9_rauth rauth;
533 struct p9_rerror rerror;
534 struct p9_tflush tflush;
535 struct p9_rflush rflush;
536 struct p9_tattach tattach;
537 struct p9_rattach rattach;
538 struct p9_twalk twalk;
539 struct p9_rwalk rwalk;
540 struct p9_topen topen;
541 struct p9_ropen ropen;
542 struct p9_tcreate tcreate;
543 struct p9_rcreate rcreate;
544 struct p9_tread tread;
545 struct p9_rread rread;
546 struct p9_twrite twrite;
547 struct p9_rwrite rwrite;
548 struct p9_tclunk tclunk;
549 struct p9_rclunk rclunk;
550 struct p9_tremove tremove;
551 struct p9_rremove rremove;
552 struct p9_tstat tstat;
553 struct p9_rstat rstat;
554 struct p9_twstat twstat;
555 struct p9_rwstat rwstat;
556 } params;
557}; 507};
558 508
559struct p9_idpool; 509struct p9_idpool;
560 510
561int p9_deserialize_stat(void *buf, u32 buflen, struct p9_stat *stat,
562 int dotu);
563int p9_deserialize_fcall(void *buf, u32 buflen, struct p9_fcall *fc, int dotu);
564void p9_set_tag(struct p9_fcall *fc, u16 tag);
565struct p9_fcall *p9_create_tversion(u32 msize, char *version);
566struct p9_fcall *p9_create_tattach(u32 fid, u32 afid, char *uname,
567 char *aname, u32 n_uname, int dotu);
568struct p9_fcall *p9_create_tauth(u32 afid, char *uname, char *aname,
569 u32 n_uname, int dotu);
570struct p9_fcall *p9_create_tflush(u16 oldtag);
571struct p9_fcall *p9_create_twalk(u32 fid, u32 newfid, u16 nwname,
572 char **wnames);
573struct p9_fcall *p9_create_topen(u32 fid, u8 mode);
574struct p9_fcall *p9_create_tcreate(u32 fid, char *name, u32 perm, u8 mode,
575 char *extension, int dotu);
576struct p9_fcall *p9_create_tread(u32 fid, u64 offset, u32 count);
577struct p9_fcall *p9_create_twrite(u32 fid, u64 offset, u32 count,
578 const char *data);
579struct p9_fcall *p9_create_twrite_u(u32 fid, u64 offset, u32 count,
580 const char __user *data);
581struct p9_fcall *p9_create_tclunk(u32 fid);
582struct p9_fcall *p9_create_tremove(u32 fid);
583struct p9_fcall *p9_create_tstat(u32 fid);
584struct p9_fcall *p9_create_twstat(u32 fid, struct p9_wstat *wstat,
585 int dotu);
586
587int p9_printfcall(char *buf, int buflen, struct p9_fcall *fc, int dotu);
588int p9_errstr2errno(char *errstr, int len); 511int p9_errstr2errno(char *errstr, int len);
589 512
590struct p9_idpool *p9_idpool_create(void); 513struct p9_idpool *p9_idpool_create(void);
diff --git a/include/net/9p/client.h b/include/net/9p/client.h
index c936dd14de41..4012e07162e5 100644
--- a/include/net/9p/client.h
+++ b/include/net/9p/client.h
@@ -26,6 +26,87 @@
26#ifndef NET_9P_CLIENT_H 26#ifndef NET_9P_CLIENT_H
27#define NET_9P_CLIENT_H 27#define NET_9P_CLIENT_H
28 28
29/* Number of requests per row */
30#define P9_ROW_MAXTAG 255
31
32/**
33 * enum p9_trans_status - different states of underlying transports
34 * @Connected: transport is connected and healthy
35 * @Disconnected: transport has been disconnected
36 * @Hung: transport is connected by wedged
37 *
38 * This enumeration details the various states a transport
39 * instatiation can be in.
40 */
41
42enum p9_trans_status {
43 Connected,
44 Disconnected,
45 Hung,
46};
47
48/**
49 * enum p9_req_status_t - virtio request status
50 * @REQ_STATUS_IDLE: request slot unused
51 * @REQ_STATUS_ALLOC: request has been allocated but not sent
52 * @REQ_STATUS_UNSENT: request waiting to be sent
53 * @REQ_STATUS_SENT: request sent to server
54 * @REQ_STATUS_FLSH: a flush has been sent for this request
55 * @REQ_STATUS_RCVD: response received from server
56 * @REQ_STATUS_FLSHD: request has been flushed
57 * @REQ_STATUS_ERROR: request encountered an error on the client side
58 *
59 * The @REQ_STATUS_IDLE state is used to mark a request slot as unused
60 * but use is actually tracked by the idpool structure which handles tag
61 * id allocation.
62 *
63 */
64
65enum p9_req_status_t {
66 REQ_STATUS_IDLE,
67 REQ_STATUS_ALLOC,
68 REQ_STATUS_UNSENT,
69 REQ_STATUS_SENT,
70 REQ_STATUS_FLSH,
71 REQ_STATUS_RCVD,
72 REQ_STATUS_FLSHD,
73 REQ_STATUS_ERROR,
74};
75
76/**
77 * struct p9_req_t - request slots
78 * @status: status of this request slot
79 * @t_err: transport error
80 * @flush_tag: tag of request being flushed (for flush requests)
81 * @wq: wait_queue for the client to block on for this request
82 * @tc: the request fcall structure
83 * @rc: the response fcall structure
84 * @aux: transport specific data (provided for trans_fd migration)
85 * @req_list: link for higher level objects to chain requests
86 *
87 * Transport use an array to track outstanding requests
88 * instead of a list. While this may incurr overhead during initial
89 * allocation or expansion, it makes request lookup much easier as the
90 * tag id is a index into an array. (We use tag+1 so that we can accomodate
91 * the -1 tag for the T_VERSION request).
92 * This also has the nice effect of only having to allocate wait_queues
93 * once, instead of constantly allocating and freeing them. Its possible
94 * other resources could benefit from this scheme as well.
95 *
96 */
97
98struct p9_req_t {
99 int status;
100 int t_err;
101 u16 flush_tag;
102 wait_queue_head_t *wq;
103 struct p9_fcall *tc;
104 struct p9_fcall *rc;
105 void *aux;
106
107 struct list_head req_list;
108};
109
29/** 110/**
30 * struct p9_client - per client instance state 111 * struct p9_client - per client instance state
31 * @lock: protect @fidlist 112 * @lock: protect @fidlist
@@ -36,9 +117,20 @@
36 * @conn: connection state information used by trans_fd 117 * @conn: connection state information used by trans_fd
37 * @fidpool: fid handle accounting for session 118 * @fidpool: fid handle accounting for session
38 * @fidlist: List of active fid handles 119 * @fidlist: List of active fid handles
120 * @tagpool - transaction id accounting for session
121 * @reqs - 2D array of requests
122 * @max_tag - current maximum tag id allocated
39 * 123 *
40 * The client structure is used to keep track of various per-client 124 * The client structure is used to keep track of various per-client
41 * state that has been instantiated. 125 * state that has been instantiated.
126 * In order to minimize per-transaction overhead we use a
127 * simple array to lookup requests instead of a hash table
128 * or linked list. In order to support larger number of
129 * transactions, we make this a 2D array, allocating new rows
130 * when we need to grow the total number of the transactions.
131 *
132 * Each row is 256 requests and we'll support up to 256 rows for
133 * a total of 64k concurrent requests per session.
42 * 134 *
43 * Bugs: duplicated data and potentially unnecessary elements. 135 * Bugs: duplicated data and potentially unnecessary elements.
44 */ 136 */
@@ -48,11 +140,16 @@ struct p9_client {
48 int msize; 140 int msize;
49 unsigned char dotu; 141 unsigned char dotu;
50 struct p9_trans_module *trans_mod; 142 struct p9_trans_module *trans_mod;
51 struct p9_trans *trans; 143 enum p9_trans_status status;
144 void *trans;
52 struct p9_conn *conn; 145 struct p9_conn *conn;
53 146
54 struct p9_idpool *fidpool; 147 struct p9_idpool *fidpool;
55 struct list_head fidlist; 148 struct list_head fidlist;
149
150 struct p9_idpool *tagpool;
151 struct p9_req_t *reqs[P9_ROW_MAXTAG];
152 int max_tag;
56}; 153};
57 154
58/** 155/**
@@ -65,8 +162,6 @@ struct p9_client {
65 * @uid: the numeric uid of the local user who owns this handle 162 * @uid: the numeric uid of the local user who owns this handle
66 * @aux: transport specific information (unused?) 163 * @aux: transport specific information (unused?)
67 * @rdir_fpos: tracks offset of file position when reading directory contents 164 * @rdir_fpos: tracks offset of file position when reading directory contents
68 * @rdir_pos: (unused?)
69 * @rdir_fcall: holds response of last directory read request
70 * @flist: per-client-instance fid tracking 165 * @flist: per-client-instance fid tracking
71 * @dlist: per-dentry fid tracking 166 * @dlist: per-dentry fid tracking
72 * 167 *
@@ -83,12 +178,11 @@ struct p9_fid {
83 void *aux; 178 void *aux;
84 179
85 int rdir_fpos; 180 int rdir_fpos;
86 int rdir_pos;
87 struct p9_fcall *rdir_fcall;
88 struct list_head flist; 181 struct list_head flist;
89 struct list_head dlist; /* list of all fids attached to a dentry */ 182 struct list_head dlist; /* list of all fids attached to a dentry */
90}; 183};
91 184
185int p9_client_version(struct p9_client *);
92struct p9_client *p9_client_create(const char *dev_name, char *options); 186struct p9_client *p9_client_create(const char *dev_name, char *options);
93void p9_client_destroy(struct p9_client *clnt); 187void p9_client_destroy(struct p9_client *clnt);
94void p9_client_disconnect(struct p9_client *clnt); 188void p9_client_disconnect(struct p9_client *clnt);
@@ -103,15 +197,19 @@ int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode,
103 char *extension); 197 char *extension);
104int p9_client_clunk(struct p9_fid *fid); 198int p9_client_clunk(struct p9_fid *fid);
105int p9_client_remove(struct p9_fid *fid); 199int p9_client_remove(struct p9_fid *fid);
106int p9_client_read(struct p9_fid *fid, char *data, u64 offset, u32 count); 200int p9_client_read(struct p9_fid *fid, char *data, char __user *udata,
107int p9_client_readn(struct p9_fid *fid, char *data, u64 offset, u32 count); 201 u64 offset, u32 count);
108int p9_client_write(struct p9_fid *fid, char *data, u64 offset, u32 count); 202int p9_client_write(struct p9_fid *fid, char *data, const char __user *udata,
109int p9_client_uread(struct p9_fid *fid, char __user *data, u64 offset, 203 u64 offset, u32 count);
110 u32 count); 204struct p9_wstat *p9_client_stat(struct p9_fid *fid);
111int p9_client_uwrite(struct p9_fid *fid, const char __user *data, u64 offset,
112 u32 count);
113struct p9_stat *p9_client_stat(struct p9_fid *fid);
114int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst); 205int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst);
115struct p9_stat *p9_client_dirread(struct p9_fid *fid, u64 offset); 206
207struct p9_req_t *p9_tag_lookup(struct p9_client *, u16);
208void p9_client_cb(struct p9_client *c, struct p9_req_t *req);
209
210int p9_parse_header(struct p9_fcall *, int32_t *, int8_t *, int16_t *, int);
211int p9stat_read(char *, int, struct p9_wstat *, int);
212void p9stat_free(struct p9_wstat *);
213
116 214
117#endif /* NET_9P_CLIENT_H */ 215#endif /* NET_9P_CLIENT_H */
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 3ca737120a90..6d5886efb102 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -26,52 +26,6 @@
26#ifndef NET_9P_TRANSPORT_H 26#ifndef NET_9P_TRANSPORT_H
27#define NET_9P_TRANSPORT_H 27#define NET_9P_TRANSPORT_H
28 28
29#include <linux/module.h>
30
31/**
32 * enum p9_trans_status - different states of underlying transports
33 * @Connected: transport is connected and healthy
34 * @Disconnected: transport has been disconnected
35 * @Hung: transport is connected by wedged
36 *
37 * This enumeration details the various states a transport
38 * instatiation can be in.
39 */
40
41enum p9_trans_status {
42 Connected,
43 Disconnected,
44 Hung,
45};
46
47/**
48 * struct p9_trans - per-transport state and API
49 * @status: transport &p9_trans_status
50 * @msize: negotiated maximum packet size (duplicate from client)
51 * @extended: negotiated protocol extensions (duplicate from client)
52 * @priv: transport private data
53 * @close: member function to disconnect and close the transport
54 * @rpc: member function to issue a request to the transport
55 *
56 * This is the basic API for a transport instance. It is used as
57 * a handle by the client to issue requests. This interface is currently
58 * in flux during reorganization.
59 *
60 * Bugs: there is lots of duplicated data here and its not clear that
61 * the member functions need to be per-instance versus per transport
62 * module.
63 */
64
65struct p9_trans {
66 enum p9_trans_status status;
67 int msize;
68 unsigned char extended;
69 void *priv;
70 void (*close) (struct p9_trans *);
71 int (*rpc) (struct p9_trans *t, struct p9_fcall *tc,
72 struct p9_fcall **rc);
73};
74
75/** 29/**
76 * struct p9_trans_module - transport module interface 30 * struct p9_trans_module - transport module interface
77 * @list: used to maintain a list of currently available transports 31 * @list: used to maintain a list of currently available transports
@@ -79,12 +33,14 @@ struct p9_trans {
79 * @maxsize: transport provided maximum packet size 33 * @maxsize: transport provided maximum packet size
80 * @def: set if this transport should be considered the default 34 * @def: set if this transport should be considered the default
81 * @create: member function to create a new connection on this transport 35 * @create: member function to create a new connection on this transport
36 * @request: member function to issue a request to the transport
37 * @cancel: member function to cancel a request (if it hasn't been sent)
82 * 38 *
83 * This is the basic API for a transport module which is registered by the 39 * This is the basic API for a transport module which is registered by the
84 * transport module with the 9P core network module and used by the client 40 * transport module with the 9P core network module and used by the client
85 * to instantiate a new connection on a transport. 41 * to instantiate a new connection on a transport.
86 * 42 *
87 * Bugs: the transport module list isn't protected. 43 * BUGS: the transport module list isn't protected.
88 */ 44 */
89 45
90struct p9_trans_module { 46struct p9_trans_module {
@@ -92,8 +48,11 @@ struct p9_trans_module {
92 char *name; /* name of transport */ 48 char *name; /* name of transport */
93 int maxsize; /* max message size of transport */ 49 int maxsize; /* max message size of transport */
94 int def; /* this transport should be default */ 50 int def; /* this transport should be default */
95 struct p9_trans * (*create)(const char *, char *, int, unsigned char);
96 struct module *owner; 51 struct module *owner;
52 int (*create)(struct p9_client *, const char *, char *);
53 void (*close) (struct p9_client *);
54 int (*request) (struct p9_client *, struct p9_req_t *req);
55 int (*cancel) (struct p9_client *, struct p9_req_t *req);
97}; 56};
98 57
99void v9fs_register_trans(struct p9_trans_module *m); 58void v9fs_register_trans(struct p9_trans_module *m);
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 7dd29b7e461d..1614d78c60ed 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -9,6 +9,7 @@
9extern void unix_inflight(struct file *fp); 9extern void unix_inflight(struct file *fp);
10extern void unix_notinflight(struct file *fp); 10extern void unix_notinflight(struct file *fp);
11extern void unix_gc(void); 11extern void unix_gc(void);
12extern void wait_for_unix_gc(void);
12 13
13#define UNIX_HASH_SIZE 256 14#define UNIX_HASH_SIZE 256
14 15
@@ -54,6 +55,7 @@ struct unix_sock {
54 atomic_long_t inflight; 55 atomic_long_t inflight;
55 spinlock_t lock; 56 spinlock_t lock;
56 unsigned int gc_candidate : 1; 57 unsigned int gc_candidate : 1;
58 unsigned int gc_maybe_cycle : 1;
57 wait_queue_head_t peer_wait; 59 wait_queue_head_t peer_wait;
58}; 60};
59#define unix_sk(__sk) ((struct unix_sock *)__sk) 61#define unix_sk(__sk) ((struct unix_sock *)__sk)
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 6f8418bf4241..a04f8463ac7e 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -54,8 +54,8 @@
54#define SOL_RFCOMM 18 54#define SOL_RFCOMM 18
55 55
56#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg) 56#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
57#define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) 57#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)
58#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) 58#define BT_DBG(fmt, arg...) pr_debug("%s: " fmt "\n" , __func__ , ## arg)
59 59
60/* Connection and socket states */ 60/* Connection and socket states */
61enum { 61enum {
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 3cc294919312..3645139e68c7 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -54,7 +54,7 @@
54 54
55/* HCI device quirks */ 55/* HCI device quirks */
56enum { 56enum {
57 HCI_QUIRK_RESET_ON_INIT, 57 HCI_QUIRK_NO_RESET,
58 HCI_QUIRK_RAW_DEVICE, 58 HCI_QUIRK_RAW_DEVICE,
59 HCI_QUIRK_FIXUP_BUFFER_SIZE 59 HCI_QUIRK_FIXUP_BUFFER_SIZE
60}; 60};
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 0e85ec39b638..23c0ab74ded6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -5,6 +5,8 @@
5#include <linux/skbuff.h> 5#include <linux/skbuff.h>
6#include <linux/nl80211.h> 6#include <linux/nl80211.h>
7#include <net/genetlink.h> 7#include <net/genetlink.h>
8/* remove once we remove the wext stuff */
9#include <net/iw_handler.h>
8 10
9/* 11/*
10 * 802.11 configuration in-kernel interface 12 * 802.11 configuration in-kernel interface
@@ -167,6 +169,9 @@ struct station_parameters {
167 * @STATION_INFO_LLID: @llid filled 169 * @STATION_INFO_LLID: @llid filled
168 * @STATION_INFO_PLID: @plid filled 170 * @STATION_INFO_PLID: @plid filled
169 * @STATION_INFO_PLINK_STATE: @plink_state filled 171 * @STATION_INFO_PLINK_STATE: @plink_state filled
172 * @STATION_INFO_SIGNAL: @signal filled
173 * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled
174 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
170 */ 175 */
171enum station_info_flags { 176enum station_info_flags {
172 STATION_INFO_INACTIVE_TIME = 1<<0, 177 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -175,6 +180,39 @@ enum station_info_flags {
175 STATION_INFO_LLID = 1<<3, 180 STATION_INFO_LLID = 1<<3,
176 STATION_INFO_PLID = 1<<4, 181 STATION_INFO_PLID = 1<<4,
177 STATION_INFO_PLINK_STATE = 1<<5, 182 STATION_INFO_PLINK_STATE = 1<<5,
183 STATION_INFO_SIGNAL = 1<<6,
184 STATION_INFO_TX_BITRATE = 1<<7,
185};
186
187/**
188 * enum station_info_rate_flags - bitrate info flags
189 *
190 * Used by the driver to indicate the specific rate transmission
191 * type for 802.11n transmissions.
192 *
193 * @RATE_INFO_FLAGS_MCS: @tx_bitrate_mcs filled
194 * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 Mhz width transmission
195 * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval
196 */
197enum rate_info_flags {
198 RATE_INFO_FLAGS_MCS = 1<<0,
199 RATE_INFO_FLAGS_40_MHZ_WIDTH = 1<<1,
200 RATE_INFO_FLAGS_SHORT_GI = 1<<2,
201};
202
203/**
204 * struct rate_info - bitrate information
205 *
206 * Information about a receiving or transmitting bitrate
207 *
208 * @flags: bitflag of flags from &enum rate_info_flags
209 * @mcs: mcs index if struct describes a 802.11n bitrate
210 * @legacy: bitrate in 100kbit/s for 802.11abg
211 */
212struct rate_info {
213 u8 flags;
214 u8 mcs;
215 u16 legacy;
178}; 216};
179 217
180/** 218/**
@@ -189,6 +227,8 @@ enum station_info_flags {
189 * @llid: mesh local link id 227 * @llid: mesh local link id
190 * @plid: mesh peer link id 228 * @plid: mesh peer link id
191 * @plink_state: mesh peer link state 229 * @plink_state: mesh peer link state
230 * @signal: signal strength of last received packet in dBm
231 * @txrate: current unicast bitrate to this station
192 */ 232 */
193struct station_info { 233struct station_info {
194 u32 filled; 234 u32 filled;
@@ -198,6 +238,8 @@ struct station_info {
198 u16 llid; 238 u16 llid;
199 u16 plid; 239 u16 plid;
200 u8 plink_state; 240 u8 plink_state;
241 s8 signal;
242 struct rate_info txrate;
201}; 243};
202 244
203/** 245/**
@@ -280,11 +322,16 @@ struct mpath_info {
280 * (0 = no, 1 = yes, -1 = do not change) 322 * (0 = no, 1 = yes, -1 = do not change)
281 * @use_short_slot_time: Whether the use of short slot time is allowed 323 * @use_short_slot_time: Whether the use of short slot time is allowed
282 * (0 = no, 1 = yes, -1 = do not change) 324 * (0 = no, 1 = yes, -1 = do not change)
325 * @basic_rates: basic rates in IEEE 802.11 format
326 * (or NULL for no change)
327 * @basic_rates_len: number of basic rates
283 */ 328 */
284struct bss_parameters { 329struct bss_parameters {
285 int use_cts_prot; 330 int use_cts_prot;
286 int use_short_preamble; 331 int use_short_preamble;
287 int use_short_slot_time; 332 int use_short_slot_time;
333 u8 *basic_rates;
334 u8 basic_rates_len;
288}; 335};
289 336
290/** 337/**
@@ -331,25 +378,65 @@ struct ieee80211_regdomain {
331 struct ieee80211_reg_rule reg_rules[]; 378 struct ieee80211_reg_rule reg_rules[];
332}; 379};
333 380
334#define MHZ_TO_KHZ(freq) (freq * 1000) 381#define MHZ_TO_KHZ(freq) ((freq) * 1000)
335#define KHZ_TO_MHZ(freq) (freq / 1000) 382#define KHZ_TO_MHZ(freq) ((freq) / 1000)
336#define DBI_TO_MBI(gain) (gain * 100) 383#define DBI_TO_MBI(gain) ((gain) * 100)
337#define MBI_TO_DBI(gain) (gain / 100) 384#define MBI_TO_DBI(gain) ((gain) / 100)
338#define DBM_TO_MBM(gain) (gain * 100) 385#define DBM_TO_MBM(gain) ((gain) * 100)
339#define MBM_TO_DBM(gain) (gain / 100) 386#define MBM_TO_DBM(gain) ((gain) / 100)
340 387
341#define REG_RULE(start, end, bw, gain, eirp, reg_flags) { \ 388#define REG_RULE(start, end, bw, gain, eirp, reg_flags) { \
342 .freq_range.start_freq_khz = (start) * 1000, \ 389 .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \
343 .freq_range.end_freq_khz = (end) * 1000, \ 390 .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \
344 .freq_range.max_bandwidth_khz = (bw) * 1000, \ 391 .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \
345 .power_rule.max_antenna_gain = (gain) * 100, \ 392 .power_rule.max_antenna_gain = DBI_TO_MBI(gain), \
346 .power_rule.max_eirp = (eirp) * 100, \ 393 .power_rule.max_eirp = DBM_TO_MBM(eirp), \
347 .flags = reg_flags, \ 394 .flags = reg_flags, \
348 } 395 }
349 396
397struct mesh_config {
398 /* Timeouts in ms */
399 /* Mesh plink management parameters */
400 u16 dot11MeshRetryTimeout;
401 u16 dot11MeshConfirmTimeout;
402 u16 dot11MeshHoldingTimeout;
403 u16 dot11MeshMaxPeerLinks;
404 u8 dot11MeshMaxRetries;
405 u8 dot11MeshTTL;
406 bool auto_open_plinks;
407 /* HWMP parameters */
408 u8 dot11MeshHWMPmaxPREQretries;
409 u32 path_refresh_time;
410 u16 min_discovery_timeout;
411 u32 dot11MeshHWMPactivePathTimeout;
412 u16 dot11MeshHWMPpreqMinInterval;
413 u16 dot11MeshHWMPnetDiameterTraversalTime;
414};
415
416/**
417 * struct ieee80211_txq_params - TX queue parameters
418 * @queue: TX queue identifier (NL80211_TXQ_Q_*)
419 * @txop: Maximum burst time in units of 32 usecs, 0 meaning disabled
420 * @cwmin: Minimum contention window [a value of the form 2^n-1 in the range
421 * 1..32767]
422 * @cwmax: Maximum contention window [a value of the form 2^n-1 in the range
423 * 1..32767]
424 * @aifs: Arbitration interframe space [0..255]
425 */
426struct ieee80211_txq_params {
427 enum nl80211_txq_q queue;
428 u16 txop;
429 u16 cwmin;
430 u16 cwmax;
431 u8 aifs;
432};
433
350/* from net/wireless.h */ 434/* from net/wireless.h */
351struct wiphy; 435struct wiphy;
352 436
437/* from net/ieee80211.h */
438struct ieee80211_channel;
439
353/** 440/**
354 * struct cfg80211_ops - backend description for wireless configuration 441 * struct cfg80211_ops - backend description for wireless configuration
355 * 442 *
@@ -397,9 +484,19 @@ struct wiphy;
397 * 484 *
398 * @change_station: Modify a given station. 485 * @change_station: Modify a given station.
399 * 486 *
487 * @get_mesh_params: Put the current mesh parameters into *params
488 *
489 * @set_mesh_params: Set mesh parameters.
490 * The mask is a bitfield which tells us which parameters to
491 * set, and which to leave alone.
492 *
400 * @set_mesh_cfg: set mesh parameters (by now, just mesh id) 493 * @set_mesh_cfg: set mesh parameters (by now, just mesh id)
401 * 494 *
402 * @change_bss: Modify parameters for a given BSS. 495 * @change_bss: Modify parameters for a given BSS.
496 *
497 * @set_txq_params: Set TX queue parameters
498 *
499 * @set_channel: Set channel
403 */ 500 */
404struct cfg80211_ops { 501struct cfg80211_ops {
405 int (*add_virtual_intf)(struct wiphy *wiphy, char *name, 502 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
@@ -452,9 +549,30 @@ struct cfg80211_ops {
452 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, 549 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
453 int idx, u8 *dst, u8 *next_hop, 550 int idx, u8 *dst, u8 *next_hop,
454 struct mpath_info *pinfo); 551 struct mpath_info *pinfo);
455 552 int (*get_mesh_params)(struct wiphy *wiphy,
553 struct net_device *dev,
554 struct mesh_config *conf);
555 int (*set_mesh_params)(struct wiphy *wiphy,
556 struct net_device *dev,
557 const struct mesh_config *nconf, u32 mask);
456 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev, 558 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
457 struct bss_parameters *params); 559 struct bss_parameters *params);
560
561 int (*set_txq_params)(struct wiphy *wiphy,
562 struct ieee80211_txq_params *params);
563
564 int (*set_channel)(struct wiphy *wiphy,
565 struct ieee80211_channel *chan,
566 enum nl80211_channel_type channel_type);
458}; 567};
459 568
569/* temporary wext handlers */
570int cfg80211_wext_giwname(struct net_device *dev,
571 struct iw_request_info *info,
572 char *name, char *extra);
573int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
574 u32 *mode, char *extra);
575int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
576 u32 *mode, char *extra);
577
460#endif /* __NET_CFG80211_H */ 578#endif /* __NET_CFG80211_H */
diff --git a/include/net/checksum.h b/include/net/checksum.h
index 07602b7fa218..ba55d8b8c87c 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -98,7 +98,7 @@ static inline void csum_replace4(__sum16 *sum, __be32 from, __be32 to)
98{ 98{
99 __be32 diff[] = { ~from, to }; 99 __be32 diff[] = { ~from, to };
100 100
101 *sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum))); 101 *sum = csum_fold(csum_partial(diff, sizeof(diff), ~csum_unfold(*sum)));
102} 102}
103 103
104static inline void csum_replace2(__sum16 *sum, __be16 from, __be16 to) 104static inline void csum_replace2(__sum16 *sum, __be16 from, __be16 to)
diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h
new file mode 100644
index 000000000000..775cfc8055be
--- /dev/null
+++ b/include/net/dcbnl.h
@@ -0,0 +1,53 @@
1/*
2 * Copyright (c) 2008, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Author: Lucy Liu <lucy.liu@intel.com>
18 */
19
20#ifndef __NET_DCBNL_H__
21#define __NET_DCBNL_H__
22
23/*
24 * Ops struct for the netlink callbacks. Used by DCB-enabled drivers through
25 * the netdevice struct.
26 */
27struct dcbnl_rtnl_ops {
28 u8 (*getstate)(struct net_device *);
29 u8 (*setstate)(struct net_device *, u8);
30 void (*getpermhwaddr)(struct net_device *, u8 *);
31 void (*setpgtccfgtx)(struct net_device *, int, u8, u8, u8, u8);
32 void (*setpgbwgcfgtx)(struct net_device *, int, u8);
33 void (*setpgtccfgrx)(struct net_device *, int, u8, u8, u8, u8);
34 void (*setpgbwgcfgrx)(struct net_device *, int, u8);
35 void (*getpgtccfgtx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *);
36 void (*getpgbwgcfgtx)(struct net_device *, int, u8 *);
37 void (*getpgtccfgrx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *);
38 void (*getpgbwgcfgrx)(struct net_device *, int, u8 *);
39 void (*setpfccfg)(struct net_device *, int, u8);
40 void (*getpfccfg)(struct net_device *, int, u8 *);
41 u8 (*setall)(struct net_device *);
42 u8 (*getcap)(struct net_device *, int, u8 *);
43 u8 (*getnumtcs)(struct net_device *, int, u8 *);
44 u8 (*setnumtcs)(struct net_device *, int, u8);
45 u8 (*getpfcstate)(struct net_device *);
46 void (*setpfcstate)(struct net_device *, u8);
47 void (*getbcncfg)(struct net_device *, int, u32 *);
48 void (*setbcncfg)(struct net_device *, int, u32);
49 void (*getbcnrp)(struct net_device *, int, u8 *);
50 void (*setbcnrp)(struct net_device *, int, u8);
51};
52
53#endif /* __NET_DCBNL_H__ */
diff --git a/include/net/dn.h b/include/net/dn.h
index 627778384c84..e5469f7b67a3 100644
--- a/include/net/dn.h
+++ b/include/net/dn.h
@@ -4,9 +4,7 @@
4#include <linux/dn.h> 4#include <linux/dn.h>
5#include <net/sock.h> 5#include <net/sock.h>
6#include <asm/byteorder.h> 6#include <asm/byteorder.h>
7 7#include <asm/unaligned.h>
8#define dn_ntohs(x) le16_to_cpu(x)
9#define dn_htons(x) cpu_to_le16(x)
10 8
11struct dn_scp /* Session Control Port */ 9struct dn_scp /* Session Control Port */
12{ 10{
@@ -175,7 +173,7 @@ struct dn_skb_cb {
175 173
176static inline __le16 dn_eth2dn(unsigned char *ethaddr) 174static inline __le16 dn_eth2dn(unsigned char *ethaddr)
177{ 175{
178 return dn_htons(ethaddr[4] | (ethaddr[5] << 8)); 176 return get_unaligned((__le16 *)(ethaddr + 4));
179} 177}
180 178
181static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr) 179static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr)
@@ -185,7 +183,7 @@ static inline __le16 dn_saddr2dn(struct sockaddr_dn *saddr)
185 183
186static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr) 184static inline void dn_dn2eth(unsigned char *ethaddr, __le16 addr)
187{ 185{
188 __u16 a = dn_ntohs(addr); 186 __u16 a = le16_to_cpu(addr);
189 ethaddr[0] = 0xAA; 187 ethaddr[0] = 0xAA;
190 ethaddr[1] = 0x00; 188 ethaddr[1] = 0x00;
191 ethaddr[2] = 0x04; 189 ethaddr[2] = 0x04;
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index 30125119c950..c378be7bf960 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -181,9 +181,9 @@ static inline void dn_fib_res_put(struct dn_fib_res *res)
181 181
182static inline __le16 dnet_make_mask(int n) 182static inline __le16 dnet_make_mask(int n)
183{ 183{
184 if (n) 184 if (n)
185 return dn_htons(~((1<<(16-n))-1)); 185 return cpu_to_le16(~((1 << (16 - n)) - 1));
186 return 0; 186 return cpu_to_le16(0);
187} 187}
188 188
189#endif /* _NET_DN_FIB_H */ 189#endif /* _NET_DN_FIB_H */
diff --git a/include/net/dst.h b/include/net/dst.h
index 8a8b71e5f3f1..6be3b082a070 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -59,8 +59,11 @@ struct dst_entry
59 59
60 struct neighbour *neighbour; 60 struct neighbour *neighbour;
61 struct hh_cache *hh; 61 struct hh_cache *hh;
62#ifdef CONFIG_XFRM
62 struct xfrm_state *xfrm; 63 struct xfrm_state *xfrm;
63 64#else
65 void *__pad1;
66#endif
64 int (*input)(struct sk_buff*); 67 int (*input)(struct sk_buff*);
65 int (*output)(struct sk_buff*); 68 int (*output)(struct sk_buff*);
66 69
@@ -70,8 +73,20 @@ struct dst_entry
70 73
71#ifdef CONFIG_NET_CLS_ROUTE 74#ifdef CONFIG_NET_CLS_ROUTE
72 __u32 tclassid; 75 __u32 tclassid;
76#else
77 __u32 __pad2;
73#endif 78#endif
74 79
80
81 /*
82 * Align __refcnt to a 64 bytes alignment
83 * (L1_CACHE_SIZE would be too much)
84 */
85#ifdef CONFIG_64BIT
86 long __pad_to_align_refcnt[2];
87#else
88 long __pad_to_align_refcnt[1];
89#endif
75 /* 90 /*
76 * __refcnt wants to be on a different cache line from 91 * __refcnt wants to be on a different cache line from
77 * input/output/ops or performance tanks badly 92 * input/output/ops or performance tanks badly
@@ -103,7 +118,6 @@ struct dst_ops
103 void (*link_failure)(struct sk_buff *); 118 void (*link_failure)(struct sk_buff *);
104 void (*update_pmtu)(struct dst_entry *dst, u32 mtu); 119 void (*update_pmtu)(struct dst_entry *dst, u32 mtu);
105 int (*local_out)(struct sk_buff *skb); 120 int (*local_out)(struct sk_buff *skb);
106 int entry_size;
107 121
108 atomic_t entries; 122 atomic_t entries;
109 struct kmem_cache *kmem_cachep; 123 struct kmem_cache *kmem_cachep;
@@ -157,6 +171,11 @@ dst_metric_locked(struct dst_entry *dst, int metric)
157 171
158static inline void dst_hold(struct dst_entry * dst) 172static inline void dst_hold(struct dst_entry * dst)
159{ 173{
174 /*
175 * If your kernel compilation stops here, please check
176 * __pad_to_align_refcnt declaration in struct dst_entry
177 */
178 BUILD_BUG_ON(offsetof(struct dst_entry, __refcnt) & 63);
160 atomic_inc(&dst->__refcnt); 179 atomic_inc(&dst->__refcnt);
161} 180}
162 181
@@ -272,21 +291,21 @@ enum {
272 291
273struct flowi; 292struct flowi;
274#ifndef CONFIG_XFRM 293#ifndef CONFIG_XFRM
275static inline int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 294static inline int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
276 struct sock *sk, int flags) 295 struct flowi *fl, struct sock *sk, int flags)
277{ 296{
278 return 0; 297 return 0;
279} 298}
280static inline int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 299static inline int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
281 struct sock *sk, int flags) 300 struct flowi *fl, struct sock *sk, int flags)
282{ 301{
283 return 0; 302 return 0;
284} 303}
285#else 304#else
286extern int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 305extern int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
287 struct sock *sk, int flags); 306 struct flowi *fl, struct sock *sk, int flags);
288extern int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 307extern int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
289 struct sock *sk, int flags); 308 struct flowi *fl, struct sock *sk, int flags);
290#endif 309#endif
291#endif 310#endif
292 311
diff --git a/include/net/flow.h b/include/net/flow.h
index b45a5e4fcadd..809970b7dfee 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -84,12 +84,13 @@ struct flowi {
84#define FLOW_DIR_OUT 1 84#define FLOW_DIR_OUT 1
85#define FLOW_DIR_FWD 2 85#define FLOW_DIR_FWD 2
86 86
87struct net;
87struct sock; 88struct sock;
88typedef int (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir, 89typedef int (*flow_resolve_t)(struct net *net, struct flowi *key, u16 family,
89 void **objp, atomic_t **obj_refp); 90 u8 dir, void **objp, atomic_t **obj_refp);
90 91
91extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir, 92extern void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family,
92 flow_resolve_t resolver); 93 u8 dir, flow_resolve_t resolver);
93extern void flow_cache_flush(void); 94extern void flow_cache_flush(void);
94extern atomic_t flow_cache_genid; 95extern atomic_t flow_cache_genid;
95 96
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h
index 8cd8185fa2ed..d136b5240ef2 100644
--- a/include/net/gen_stats.h
+++ b/include/net/gen_stats.h
@@ -45,5 +45,6 @@ extern void gen_kill_estimator(struct gnet_stats_basic *bstats,
45extern int gen_replace_estimator(struct gnet_stats_basic *bstats, 45extern int gen_replace_estimator(struct gnet_stats_basic *bstats,
46 struct gnet_stats_rate_est *rate_est, 46 struct gnet_stats_rate_est *rate_est,
47 spinlock_t *stats_lock, struct nlattr *opt); 47 spinlock_t *stats_lock, struct nlattr *opt);
48 48extern bool gen_estimator_active(const struct gnet_stats_basic *bstats,
49 const struct gnet_stats_rate_est *rate_est);
49#endif 50#endif
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 6048579d0b24..adb7cf31f781 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -28,6 +28,9 @@
28#include <linux/if_ether.h> /* ETH_ALEN */ 28#include <linux/if_ether.h> /* ETH_ALEN */
29#include <linux/kernel.h> /* ARRAY_SIZE */ 29#include <linux/kernel.h> /* ARRAY_SIZE */
30#include <linux/wireless.h> 30#include <linux/wireless.h>
31#include <linux/ieee80211.h>
32
33#include <net/lib80211.h>
31 34
32#define IEEE80211_VERSION "git-1.1.13" 35#define IEEE80211_VERSION "git-1.1.13"
33 36
@@ -114,7 +117,7 @@ extern u32 ieee80211_debug_level;
114#define IEEE80211_DEBUG(level, fmt, args...) \ 117#define IEEE80211_DEBUG(level, fmt, args...) \
115do { if (ieee80211_debug_level & (level)) \ 118do { if (ieee80211_debug_level & (level)) \
116 printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ 119 printk(KERN_DEBUG "ieee80211: %c %s " fmt, \
117 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) 120 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
118static inline bool ieee80211_ratelimit_debug(u32 level) 121static inline bool ieee80211_ratelimit_debug(u32 level)
119{ 122{
120 return (ieee80211_debug_level & level) && net_ratelimit(); 123 return (ieee80211_debug_level & level) && net_ratelimit();
@@ -127,10 +130,6 @@ static inline bool ieee80211_ratelimit_debug(u32 level)
127} 130}
128#endif /* CONFIG_IEEE80211_DEBUG */ 131#endif /* CONFIG_IEEE80211_DEBUG */
129 132
130/* escape_essid() is intended to be used in debug (and possibly error)
131 * messages. It should never be used for passing essid to user space. */
132const char *escape_essid(const char *essid, u8 essid_len);
133
134/* 133/*
135 * To use the debug system: 134 * To use the debug system:
136 * 135 *
@@ -218,94 +217,6 @@ struct ieee80211_snap_hdr {
218#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG) 217#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
219#define WLAN_GET_SEQ_SEQ(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) 218#define WLAN_GET_SEQ_SEQ(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4)
220 219
221/* Authentication algorithms */
222#define WLAN_AUTH_OPEN 0
223#define WLAN_AUTH_SHARED_KEY 1
224#define WLAN_AUTH_LEAP 2
225
226#define WLAN_AUTH_CHALLENGE_LEN 128
227
228#define WLAN_CAPABILITY_ESS (1<<0)
229#define WLAN_CAPABILITY_IBSS (1<<1)
230#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
231#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
232#define WLAN_CAPABILITY_PRIVACY (1<<4)
233#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
234#define WLAN_CAPABILITY_PBCC (1<<6)
235#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
236#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
237#define WLAN_CAPABILITY_QOS (1<<9)
238#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
239#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
240
241/* 802.11g ERP information element */
242#define WLAN_ERP_NON_ERP_PRESENT (1<<0)
243#define WLAN_ERP_USE_PROTECTION (1<<1)
244#define WLAN_ERP_BARKER_PREAMBLE (1<<2)
245
246/* Status codes */
247enum ieee80211_statuscode {
248 WLAN_STATUS_SUCCESS = 0,
249 WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
250 WLAN_STATUS_CAPS_UNSUPPORTED = 10,
251 WLAN_STATUS_REASSOC_NO_ASSOC = 11,
252 WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12,
253 WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
254 WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14,
255 WLAN_STATUS_CHALLENGE_FAIL = 15,
256 WLAN_STATUS_AUTH_TIMEOUT = 16,
257 WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
258 WLAN_STATUS_ASSOC_DENIED_RATES = 18,
259 /* 802.11b */
260 WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19,
261 WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20,
262 WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21,
263 /* 802.11h */
264 WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22,
265 WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23,
266 WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24,
267 /* 802.11g */
268 WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25,
269 WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26,
270 /* 802.11i */
271 WLAN_STATUS_INVALID_IE = 40,
272 WLAN_STATUS_INVALID_GROUP_CIPHER = 41,
273 WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42,
274 WLAN_STATUS_INVALID_AKMP = 43,
275 WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
276 WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
277 WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
278};
279
280/* Reason codes */
281enum ieee80211_reasoncode {
282 WLAN_REASON_UNSPECIFIED = 1,
283 WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
284 WLAN_REASON_DEAUTH_LEAVING = 3,
285 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
286 WLAN_REASON_DISASSOC_AP_BUSY = 5,
287 WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6,
288 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7,
289 WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8,
290 WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9,
291 /* 802.11h */
292 WLAN_REASON_DISASSOC_BAD_POWER = 10,
293 WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11,
294 /* 802.11i */
295 WLAN_REASON_INVALID_IE = 13,
296 WLAN_REASON_MIC_FAILURE = 14,
297 WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
298 WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16,
299 WLAN_REASON_IE_DIFFERENT = 17,
300 WLAN_REASON_INVALID_GROUP_CIPHER = 18,
301 WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19,
302 WLAN_REASON_INVALID_AKMP = 20,
303 WLAN_REASON_UNSUPP_RSN_VERSION = 21,
304 WLAN_REASON_INVALID_RSN_IE_CAP = 22,
305 WLAN_REASON_IEEE8021X_FAILED = 23,
306 WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
307};
308
309/* Action categories - 802.11h */ 220/* Action categories - 802.11h */
310enum ieee80211_actioncategories { 221enum ieee80211_actioncategories {
311 WLAN_ACTION_SPECTRUM_MGMT = 0, 222 WLAN_ACTION_SPECTRUM_MGMT = 0,
@@ -446,8 +357,6 @@ struct ieee80211_stats {
446 357
447struct ieee80211_device; 358struct ieee80211_device;
448 359
449#include "ieee80211_crypt.h"
450
451#define SEC_KEY_1 (1<<0) 360#define SEC_KEY_1 (1<<0)
452#define SEC_KEY_2 (1<<1) 361#define SEC_KEY_2 (1<<1)
453#define SEC_KEY_3 (1<<2) 362#define SEC_KEY_3 (1<<2)
@@ -476,9 +385,8 @@ struct ieee80211_device;
476#define SCM_TEMPORAL_KEY_LENGTH 16 385#define SCM_TEMPORAL_KEY_LENGTH 16
477 386
478struct ieee80211_security { 387struct ieee80211_security {
479 u16 active_key:2, 388 u16 active_key:2, enabled:1, unicast_uses_group:1, encrypt:1;
480 enabled:1, 389 u8 auth_mode;
481 auth_mode:2, auth_algo:4, unicast_uses_group:1, encrypt:1;
482 u8 encode_alg[WEP_KEYS]; 390 u8 encode_alg[WEP_KEYS];
483 u8 key_sizes[WEP_KEYS]; 391 u8 key_sizes[WEP_KEYS];
484 u8 keys[WEP_KEYS][SCM_KEY_LEN]; 392 u8 keys[WEP_KEYS][SCM_KEY_LEN];
@@ -534,15 +442,6 @@ enum ieee80211_mfie {
534 MFIE_TYPE_QOS_PARAMETER = 222, 442 MFIE_TYPE_QOS_PARAMETER = 222,
535}; 443};
536 444
537/* Minimal header; can be used for passing 802.11 frames with sufficient
538 * information to determine what type of underlying data type is actually
539 * stored in the data. */
540struct ieee80211_hdr {
541 __le16 frame_ctl;
542 __le16 duration_id;
543 u8 payload[0];
544} __attribute__ ((packed));
545
546struct ieee80211_hdr_1addr { 445struct ieee80211_hdr_1addr {
547 __le16 frame_ctl; 446 __le16 frame_ctl;
548 __le16 duration_id; 447 __le16 duration_id;
@@ -590,18 +489,6 @@ struct ieee80211_hdr_3addrqos {
590 __le16 qos_ctl; 489 __le16 qos_ctl;
591} __attribute__ ((packed)); 490} __attribute__ ((packed));
592 491
593struct ieee80211_hdr_4addrqos {
594 __le16 frame_ctl;
595 __le16 duration_id;
596 u8 addr1[ETH_ALEN];
597 u8 addr2[ETH_ALEN];
598 u8 addr3[ETH_ALEN];
599 __le16 seq_ctl;
600 u8 addr4[ETH_ALEN];
601 u8 payload[0];
602 __le16 qos_ctl;
603} __attribute__ ((packed));
604
605struct ieee80211_info_element { 492struct ieee80211_info_element {
606 u8 id; 493 u8 id;
607 u8 len; 494 u8 len;
@@ -733,7 +620,6 @@ struct ieee80211_txb {
733 620
734#define MAX_WPA_IE_LEN 64 621#define MAX_WPA_IE_LEN 64
735 622
736#define NETWORK_EMPTY_ESSID (1<<0)
737#define NETWORK_HAS_OFDM (1<<1) 623#define NETWORK_HAS_OFDM (1<<1)
738#define NETWORK_HAS_CCK (1<<2) 624#define NETWORK_HAS_CCK (1<<2)
739 625
@@ -1050,11 +936,7 @@ struct ieee80211_device {
1050 size_t wpa_ie_len; 936 size_t wpa_ie_len;
1051 u8 *wpa_ie; 937 u8 *wpa_ie;
1052 938
1053 struct list_head crypt_deinit_list; 939 struct lib80211_crypt_info crypt_info;
1054 struct ieee80211_crypt_data *crypt[WEP_KEYS];
1055 int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */
1056 struct timer_list crypt_deinit_timer;
1057 int crypt_quiesced;
1058 940
1059 int bcrx_sta_key; /* use individual keys to override default keys even 941 int bcrx_sta_key; /* use individual keys to override default keys even
1060 * with RX of broad/multicast frames */ 942 * with RX of broad/multicast frames */
@@ -1135,22 +1017,6 @@ static inline void *ieee80211_priv(struct net_device *dev)
1135 return ((struct ieee80211_device *)netdev_priv(dev))->priv; 1017 return ((struct ieee80211_device *)netdev_priv(dev))->priv;
1136} 1018}
1137 1019
1138static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
1139{
1140 /* Single white space is for Linksys APs */
1141 if (essid_len == 1 && essid[0] == ' ')
1142 return 1;
1143
1144 /* Otherwise, if the entire essid is 0, we assume it is hidden */
1145 while (essid_len) {
1146 essid_len--;
1147 if (essid[essid_len] != '\0')
1148 return 0;
1149 }
1150
1151 return 1;
1152}
1153
1154static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, 1020static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee,
1155 int mode) 1021 int mode)
1156{ 1022{
@@ -1208,7 +1074,7 @@ static inline int ieee80211_get_hdrlen(u16 fc)
1208 1074
1209static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr) 1075static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr)
1210{ 1076{
1211 switch (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl))) { 1077 switch (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control))) {
1212 case IEEE80211_1ADDR_LEN: 1078 case IEEE80211_1ADDR_LEN:
1213 return ((struct ieee80211_hdr_1addr *)hdr)->payload; 1079 return ((struct ieee80211_hdr_1addr *)hdr)->payload;
1214 case IEEE80211_2ADDR_LEN: 1080 case IEEE80211_2ADDR_LEN:
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index d364fd594ea4..384698cb773a 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -1,7 +1,4 @@
1/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 sam Exp $ */ 1/*
2/* $NetBSD: ieee80211_radiotap.h,v 1.11 2005/06/22 06:16:02 dyoung Exp $ */
3
4/*-
5 * Copyright (c) 2003, 2004 David Young. All rights reserved. 2 * Copyright (c) 2003, 2004 David Young. All rights reserved.
6 * 3 *
7 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
@@ -42,8 +39,6 @@
42#include <linux/kernel.h> 39#include <linux/kernel.h>
43#include <asm/unaligned.h> 40#include <asm/unaligned.h>
44 41
45/* Radiotap header version (from official NetBSD feed) */
46#define IEEE80211RADIOTAP_VERSION "1.5"
47/* Base version of the radiotap packet header data */ 42/* Base version of the radiotap packet header data */
48#define PKTHDR_RADIOTAP_VERSION 0 43#define PKTHDR_RADIOTAP_VERSION 0
49 44
@@ -62,12 +57,8 @@
62 * readers. 57 * readers.
63 */ 58 */
64 59
65/* XXX tcpdump/libpcap do not tolerate variable-length headers, 60/*
66 * yet, so we pad every radiotap header to 64 bytes. Ugh. 61 * The radio capture header precedes the 802.11 header.
67 */
68#define IEEE80211_RADIOTAP_HDRLEN 64
69
70/* The radio capture header precedes the 802.11 header.
71 * All data in the header is little endian on all platforms. 62 * All data in the header is little endian on all platforms.
72 */ 63 */
73struct ieee80211_radiotap_header { 64struct ieee80211_radiotap_header {
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 5cc182f9ecae..f44bb5c77a70 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -41,8 +41,8 @@
41 * I'll experiment with dynamic table growth later. 41 * I'll experiment with dynamic table growth later.
42 */ 42 */
43struct inet_ehash_bucket { 43struct inet_ehash_bucket {
44 struct hlist_head chain; 44 struct hlist_nulls_head chain;
45 struct hlist_head twchain; 45 struct hlist_nulls_head twchain;
46}; 46};
47 47
48/* There are a few simple rules, which allow for local port reuse by 48/* There are a few simple rules, which allow for local port reuse by
@@ -77,13 +77,20 @@ struct inet_ehash_bucket {
77 * ports are created in O(1) time? I thought so. ;-) -DaveM 77 * ports are created in O(1) time? I thought so. ;-) -DaveM
78 */ 78 */
79struct inet_bind_bucket { 79struct inet_bind_bucket {
80#ifdef CONFIG_NET_NS
80 struct net *ib_net; 81 struct net *ib_net;
82#endif
81 unsigned short port; 83 unsigned short port;
82 signed short fastreuse; 84 signed short fastreuse;
83 struct hlist_node node; 85 struct hlist_node node;
84 struct hlist_head owners; 86 struct hlist_head owners;
85}; 87};
86 88
89static inline struct net *ib_net(struct inet_bind_bucket *ib)
90{
91 return read_pnet(&ib->ib_net);
92}
93
87#define inet_bind_bucket_for_each(tb, node, head) \ 94#define inet_bind_bucket_for_each(tb, node, head) \
88 hlist_for_each_entry(tb, node, head, node) 95 hlist_for_each_entry(tb, node, head, node)
89 96
@@ -92,6 +99,18 @@ struct inet_bind_hashbucket {
92 struct hlist_head chain; 99 struct hlist_head chain;
93}; 100};
94 101
102/*
103 * Sockets can be hashed in established or listening table
104 * We must use different 'nulls' end-of-chain value for listening
105 * hash table, or we might find a socket that was closed and
106 * reallocated/inserted into established hash table
107 */
108#define LISTENING_NULLS_BASE (1U << 29)
109struct inet_listen_hashbucket {
110 spinlock_t lock;
111 struct hlist_nulls_head head;
112};
113
95/* This is for listening sockets, thus all sockets which possess wildcards. */ 114/* This is for listening sockets, thus all sockets which possess wildcards. */
96#define INET_LHTABLE_SIZE 32 /* Yes, really, this is all you need. */ 115#define INET_LHTABLE_SIZE 32 /* Yes, really, this is all you need. */
97 116
@@ -104,7 +123,7 @@ struct inet_hashinfo {
104 * TIME_WAIT sockets use a separate chain (twchain). 123 * TIME_WAIT sockets use a separate chain (twchain).
105 */ 124 */
106 struct inet_ehash_bucket *ehash; 125 struct inet_ehash_bucket *ehash;
107 rwlock_t *ehash_locks; 126 spinlock_t *ehash_locks;
108 unsigned int ehash_size; 127 unsigned int ehash_size;
109 unsigned int ehash_locks_mask; 128 unsigned int ehash_locks_mask;
110 129
@@ -116,22 +135,21 @@ struct inet_hashinfo {
116 unsigned int bhash_size; 135 unsigned int bhash_size;
117 /* Note : 4 bytes padding on 64 bit arches */ 136 /* Note : 4 bytes padding on 64 bit arches */
118 137
119 /* All sockets in TCP_LISTEN state will be in here. This is the only 138 struct kmem_cache *bind_bucket_cachep;
120 * table where wildcard'd TCP sockets can exist. Hash function here
121 * is just local port number.
122 */
123 struct hlist_head listening_hash[INET_LHTABLE_SIZE];
124 139
125 /* All the above members are written once at bootup and 140 /* All the above members are written once at bootup and
126 * never written again _or_ are predominantly read-access. 141 * never written again _or_ are predominantly read-access.
127 * 142 *
128 * Now align to a new cache line as all the following members 143 * Now align to a new cache line as all the following members
129 * are often dirty. 144 * might be often dirty.
130 */ 145 */
131 rwlock_t lhash_lock ____cacheline_aligned; 146 /* All sockets in TCP_LISTEN state will be in here. This is the only
132 atomic_t lhash_users; 147 * table where wildcard'd TCP sockets can exist. Hash function here
133 wait_queue_head_t lhash_wait; 148 * is just local port number.
134 struct kmem_cache *bind_bucket_cachep; 149 */
150 struct inet_listen_hashbucket listening_hash[INET_LHTABLE_SIZE]
151 ____cacheline_aligned_in_smp;
152
135}; 153};
136 154
137static inline struct inet_ehash_bucket *inet_ehash_bucket( 155static inline struct inet_ehash_bucket *inet_ehash_bucket(
@@ -141,7 +159,7 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket(
141 return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; 159 return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)];
142} 160}
143 161
144static inline rwlock_t *inet_ehash_lockp( 162static inline spinlock_t *inet_ehash_lockp(
145 struct inet_hashinfo *hashinfo, 163 struct inet_hashinfo *hashinfo,
146 unsigned int hash) 164 unsigned int hash)
147{ 165{
@@ -166,16 +184,16 @@ static inline int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)
166 size = 4096; 184 size = 4096;
167 if (sizeof(rwlock_t) != 0) { 185 if (sizeof(rwlock_t) != 0) {
168#ifdef CONFIG_NUMA 186#ifdef CONFIG_NUMA
169 if (size * sizeof(rwlock_t) > PAGE_SIZE) 187 if (size * sizeof(spinlock_t) > PAGE_SIZE)
170 hashinfo->ehash_locks = vmalloc(size * sizeof(rwlock_t)); 188 hashinfo->ehash_locks = vmalloc(size * sizeof(spinlock_t));
171 else 189 else
172#endif 190#endif
173 hashinfo->ehash_locks = kmalloc(size * sizeof(rwlock_t), 191 hashinfo->ehash_locks = kmalloc(size * sizeof(spinlock_t),
174 GFP_KERNEL); 192 GFP_KERNEL);
175 if (!hashinfo->ehash_locks) 193 if (!hashinfo->ehash_locks)
176 return ENOMEM; 194 return ENOMEM;
177 for (i = 0; i < size; i++) 195 for (i = 0; i < size; i++)
178 rwlock_init(&hashinfo->ehash_locks[i]); 196 spin_lock_init(&hashinfo->ehash_locks[i]);
179 } 197 }
180 hashinfo->ehash_locks_mask = size - 1; 198 hashinfo->ehash_locks_mask = size - 1;
181 return 0; 199 return 0;
@@ -186,7 +204,7 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo)
186 if (hashinfo->ehash_locks) { 204 if (hashinfo->ehash_locks) {
187#ifdef CONFIG_NUMA 205#ifdef CONFIG_NUMA
188 unsigned int size = (hashinfo->ehash_locks_mask + 1) * 206 unsigned int size = (hashinfo->ehash_locks_mask + 1) *
189 sizeof(rwlock_t); 207 sizeof(spinlock_t);
190 if (size > PAGE_SIZE) 208 if (size > PAGE_SIZE)
191 vfree(hashinfo->ehash_locks); 209 vfree(hashinfo->ehash_locks);
192 else 210 else
@@ -229,26 +247,7 @@ extern void __inet_inherit_port(struct sock *sk, struct sock *child);
229 247
230extern void inet_put_port(struct sock *sk); 248extern void inet_put_port(struct sock *sk);
231 249
232extern void inet_listen_wlock(struct inet_hashinfo *hashinfo); 250void inet_hashinfo_init(struct inet_hashinfo *h);
233
234/*
235 * - We may sleep inside this lock.
236 * - If sleeping is not required (or called from BH),
237 * use plain read_(un)lock(&inet_hashinfo.lhash_lock).
238 */
239static inline void inet_listen_lock(struct inet_hashinfo *hashinfo)
240{
241 /* read_lock synchronizes to candidates to writers */
242 read_lock(&hashinfo->lhash_lock);
243 atomic_inc(&hashinfo->lhash_users);
244 read_unlock(&hashinfo->lhash_lock);
245}
246
247static inline void inet_listen_unlock(struct inet_hashinfo *hashinfo)
248{
249 if (atomic_dec_and_test(&hashinfo->lhash_users))
250 wake_up(&hashinfo->lhash_wait);
251}
252 251
253extern void __inet_hash_nolisten(struct sock *sk); 252extern void __inet_hash_nolisten(struct sock *sk);
254extern void inet_hash(struct sock *sk); 253extern void inet_hash(struct sock *sk);
@@ -299,25 +298,25 @@ typedef __u64 __bitwise __addrpair;
299 ((__force __u64)(__be32)(__saddr))); 298 ((__force __u64)(__be32)(__saddr)));
300#endif /* __BIG_ENDIAN */ 299#endif /* __BIG_ENDIAN */
301#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 300#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
302 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ 301 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
303 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ 302 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \
304 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 303 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
305 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 304 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
306#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 305#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
307 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ 306 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
308 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ 307 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \
309 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 308 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \
310 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 309 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
311#else /* 32-bit arch */ 310#else /* 32-bit arch */
312#define INET_ADDR_COOKIE(__name, __saddr, __daddr) 311#define INET_ADDR_COOKIE(__name, __saddr, __daddr)
313#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \ 312#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \
314 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ 313 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
315 (inet_sk(__sk)->daddr == (__saddr)) && \ 314 (inet_sk(__sk)->daddr == (__saddr)) && \
316 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ 315 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \
317 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 316 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \
318 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 317 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
319#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ 318#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \
320 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ 319 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
321 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \ 320 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \
322 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ 321 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \
323 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 322 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 80e4977631b8..4b8ece22b8e9 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -110,7 +110,7 @@ struct inet_timewait_sock {
110#define tw_state __tw_common.skc_state 110#define tw_state __tw_common.skc_state
111#define tw_reuse __tw_common.skc_reuse 111#define tw_reuse __tw_common.skc_reuse
112#define tw_bound_dev_if __tw_common.skc_bound_dev_if 112#define tw_bound_dev_if __tw_common.skc_bound_dev_if
113#define tw_node __tw_common.skc_node 113#define tw_node __tw_common.skc_nulls_node
114#define tw_bind_node __tw_common.skc_bind_node 114#define tw_bind_node __tw_common.skc_bind_node
115#define tw_refcnt __tw_common.skc_refcnt 115#define tw_refcnt __tw_common.skc_refcnt
116#define tw_hash __tw_common.skc_hash 116#define tw_hash __tw_common.skc_hash
@@ -137,10 +137,10 @@ struct inet_timewait_sock {
137 struct hlist_node tw_death_node; 137 struct hlist_node tw_death_node;
138}; 138};
139 139
140static inline void inet_twsk_add_node(struct inet_timewait_sock *tw, 140static inline void inet_twsk_add_node_rcu(struct inet_timewait_sock *tw,
141 struct hlist_head *list) 141 struct hlist_nulls_head *list)
142{ 142{
143 hlist_add_head(&tw->tw_node, list); 143 hlist_nulls_add_head_rcu(&tw->tw_node, list);
144} 144}
145 145
146static inline void inet_twsk_add_bind_node(struct inet_timewait_sock *tw, 146static inline void inet_twsk_add_bind_node(struct inet_timewait_sock *tw,
@@ -175,7 +175,7 @@ static inline int inet_twsk_del_dead_node(struct inet_timewait_sock *tw)
175} 175}
176 176
177#define inet_twsk_for_each(tw, node, head) \ 177#define inet_twsk_for_each(tw, node, head) \
178 hlist_for_each_entry(tw, node, head, tw_node) 178 hlist_nulls_for_each_entry(tw, node, head, tw_node)
179 179
180#define inet_twsk_for_each_inmate(tw, node, jail) \ 180#define inet_twsk_for_each_inmate(tw, node, jail) \
181 hlist_for_each_entry(tw, node, jail, tw_death_node) 181 hlist_for_each_entry(tw, node, jail, tw_death_node)
diff --git a/include/net/ip.h b/include/net/ip.h
index 1cbccaf0de3f..10868139e656 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -110,7 +110,7 @@ extern int ip_append_data(struct sock *sk,
110 int odd, struct sk_buff *skb), 110 int odd, struct sk_buff *skb),
111 void *from, int len, int protolen, 111 void *from, int len, int protolen,
112 struct ipcm_cookie *ipc, 112 struct ipcm_cookie *ipc,
113 struct rtable *rt, 113 struct rtable **rt,
114 unsigned int flags); 114 unsigned int flags);
115extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); 115extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb);
116extern ssize_t ip_append_page(struct sock *sk, struct page *page, 116extern ssize_t ip_append_page(struct sock *sk, struct page *page,
@@ -187,6 +187,7 @@ extern void inet_get_local_port_range(int *low, int *high);
187extern int sysctl_ip_default_ttl; 187extern int sysctl_ip_default_ttl;
188extern int sysctl_ip_nonlocal_bind; 188extern int sysctl_ip_nonlocal_bind;
189 189
190extern struct ctl_path net_core_path[];
190extern struct ctl_path net_ipv4_ctl_path[]; 191extern struct ctl_path net_ipv4_ctl_path[];
191 192
192/* From inetpeer.c */ 193/* From inetpeer.c */
@@ -396,7 +397,7 @@ extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,
396int ipv4_doint_and_flush(ctl_table *ctl, int write, 397int ipv4_doint_and_flush(ctl_table *ctl, int write,
397 struct file* filp, void __user *buffer, 398 struct file* filp, void __user *buffer,
398 size_t *lenp, loff_t *ppos); 399 size_t *lenp, loff_t *ppos);
399int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, 400int ipv4_doint_and_flush_strategy(ctl_table *table,
400 void __user *oldval, size_t __user *oldlenp, 401 void __user *oldval, size_t __user *oldlenp,
401 void __user *newval, size_t newlen); 402 void __user *newval, size_t newlen);
402#ifdef CONFIG_PROC_FS 403#ifdef CONFIG_PROC_FS
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 0b2071d9326d..ab9b003ab671 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -87,12 +87,12 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
87 int len; 87 int len;
88#ifdef CONFIG_IP_VS_IPV6 88#ifdef CONFIG_IP_VS_IPV6
89 if (af == AF_INET6) 89 if (af == AF_INET6)
90 len = snprintf(&buf[*idx], buf_len - *idx, "[" NIP6_FMT "]", 90 len = snprintf(&buf[*idx], buf_len - *idx, "[%pI6]",
91 NIP6(addr->in6)) + 1; 91 &addr->in6) + 1;
92 else 92 else
93#endif 93#endif
94 len = snprintf(&buf[*idx], buf_len - *idx, NIPQUAD_FMT, 94 len = snprintf(&buf[*idx], buf_len - *idx, "%pI4",
95 NIPQUAD(addr->ip)) + 1; 95 &addr->ip) + 1;
96 96
97 *idx += len; 97 *idx += len;
98 BUG_ON(*idx > buf_len + 1); 98 BUG_ON(*idx > buf_len + 1);
@@ -165,13 +165,13 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
165 do { \ 165 do { \
166 if (level <= ip_vs_get_debug_level()) \ 166 if (level <= ip_vs_get_debug_level()) \
167 printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ 167 printk(KERN_DEBUG "Enter: %s, %s line %i\n", \
168 __FUNCTION__, __FILE__, __LINE__); \ 168 __func__, __FILE__, __LINE__); \
169 } while (0) 169 } while (0)
170#define LeaveFunction(level) \ 170#define LeaveFunction(level) \
171 do { \ 171 do { \
172 if (level <= ip_vs_get_debug_level()) \ 172 if (level <= ip_vs_get_debug_level()) \
173 printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ 173 printk(KERN_DEBUG "Leave: %s, %s line %i\n", \
174 __FUNCTION__, __FILE__, __LINE__); \ 174 __func__, __FILE__, __LINE__); \
175 } while (0) 175 } while (0)
176#else 176#else
177#define EnterFunction(level) do {} while (0) 177#define EnterFunction(level) do {} while (0)
@@ -503,9 +503,6 @@ struct ip_vs_scheduler {
503 char *name; /* scheduler name */ 503 char *name; /* scheduler name */
504 atomic_t refcnt; /* reference counter */ 504 atomic_t refcnt; /* reference counter */
505 struct module *module; /* THIS_MODULE/NULL */ 505 struct module *module; /* THIS_MODULE/NULL */
506#ifdef CONFIG_IP_VS_IPV6
507 int supports_ipv6; /* scheduler has IPv6 support */
508#endif
509 506
510 /* scheduler initializing service */ 507 /* scheduler initializing service */
511 int (*init_service)(struct ip_vs_service *svc); 508 int (*init_service)(struct ip_vs_service *svc);
@@ -916,7 +913,7 @@ static inline __wsum ip_vs_check_diff4(__be32 old, __be32 new, __wsum oldsum)
916{ 913{
917 __be32 diff[2] = { ~old, new }; 914 __be32 diff[2] = { ~old, new };
918 915
919 return csum_partial((char *) diff, sizeof(diff), oldsum); 916 return csum_partial(diff, sizeof(diff), oldsum);
920} 917}
921 918
922#ifdef CONFIG_IP_VS_IPV6 919#ifdef CONFIG_IP_VS_IPV6
@@ -926,7 +923,7 @@ static inline __wsum ip_vs_check_diff16(const __be32 *old, const __be32 *new,
926 __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0], 923 __be32 diff[8] = { ~old[3], ~old[2], ~old[1], ~old[0],
927 new[3], new[2], new[1], new[0] }; 924 new[3], new[2], new[1], new[0] };
928 925
929 return csum_partial((char *) diff, sizeof(diff), oldsum); 926 return csum_partial(diff, sizeof(diff), oldsum);
930} 927}
931#endif 928#endif
932 929
@@ -934,7 +931,7 @@ static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum)
934{ 931{
935 __be16 diff[2] = { ~old, new }; 932 __be16 diff[2] = { ~old, new };
936 933
937 return csum_partial((char *) diff, sizeof(diff), oldsum); 934 return csum_partial(diff, sizeof(diff), oldsum);
938} 935}
939 936
940#endif /* __KERNEL__ */ 937#endif /* __KERNEL__ */
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 08387553b57e..7e582061b230 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -72,7 +72,7 @@ do { if (irda_debug >= (n)) \
72#define IRDA_ASSERT(expr, func) \ 72#define IRDA_ASSERT(expr, func) \
73do { if(!(expr)) { \ 73do { if(!(expr)) { \
74 printk( "Assertion failed! %s:%s:%d %s\n", \ 74 printk( "Assertion failed! %s:%s:%d %s\n", \
75 __FILE__,__FUNCTION__,__LINE__,(#expr) ); \ 75 __FILE__,__func__,__LINE__,(#expr) ); \
76 func } } while (0) 76 func } } while (0)
77#define IRDA_ASSERT_LABEL(label) label 77#define IRDA_ASSERT_LABEL(label) label
78#else 78#else
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 3025ae17ddbe..94c852d47d0f 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -135,9 +135,11 @@ struct dongle_reg {
135 135
136/* 136/*
137 * Per-packet information we need to hide inside sk_buff 137 * Per-packet information we need to hide inside sk_buff
138 * (must not exceed 48 bytes, check with struct sk_buff) 138 * (must not exceed 48 bytes, check with struct sk_buff)
139 * The default_qdisc_pad field is a temporary hack.
139 */ 140 */
140struct irda_skb_cb { 141struct irda_skb_cb {
142 unsigned int default_qdisc_pad;
141 magic_t magic; /* Be sure that we can trust the information */ 143 magic_t magic; /* Be sure that we can trust the information */
142 __u32 next_speed; /* The Speed to be set *after* this frame */ 144 __u32 next_speed; /* The Speed to be set *after* this frame */
143 __u16 mtt; /* Minimum turn around time */ 145 __u16 mtt; /* Minimum turn around time */
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h
index fd70adbb3566..5e310c8d8e2f 100644
--- a/include/net/iucv/iucv.h
+++ b/include/net/iucv/iucv.h
@@ -337,12 +337,35 @@ int iucv_message_purge(struct iucv_path *path, struct iucv_message *msg,
337 * established paths. This function will deal with RMDATA messages 337 * established paths. This function will deal with RMDATA messages
338 * embedded in struct iucv_message as well. 338 * embedded in struct iucv_message as well.
339 * 339 *
340 * Locking: local_bh_enable/local_bh_disable
341 *
340 * Returns the result from the CP IUCV call. 342 * Returns the result from the CP IUCV call.
341 */ 343 */
342int iucv_message_receive(struct iucv_path *path, struct iucv_message *msg, 344int iucv_message_receive(struct iucv_path *path, struct iucv_message *msg,
343 u8 flags, void *buffer, size_t size, size_t *residual); 345 u8 flags, void *buffer, size_t size, size_t *residual);
344 346
345/** 347/**
348 * __iucv_message_receive
349 * @path: address of iucv path structure
350 * @msg: address of iucv msg structure
351 * @flags: flags that affect how the message is received (IUCV_IPBUFLST)
352 * @buffer: address of data buffer or address of struct iucv_array
353 * @size: length of data buffer
354 * @residual:
355 *
356 * This function receives messages that are being sent to you over
357 * established paths. This function will deal with RMDATA messages
358 * embedded in struct iucv_message as well.
359 *
360 * Locking: no locking.
361 *
362 * Returns the result from the CP IUCV call.
363 */
364int __iucv_message_receive(struct iucv_path *path, struct iucv_message *msg,
365 u8 flags, void *buffer, size_t size,
366 size_t *residual);
367
368/**
346 * iucv_message_reject 369 * iucv_message_reject
347 * @path: address of iucv path structure 370 * @path: address of iucv path structure
348 * @msg: address of iucv msg structure 371 * @msg: address of iucv msg structure
@@ -386,12 +409,34 @@ int iucv_message_reply(struct iucv_path *path, struct iucv_message *msg,
386 * transmitted is in a buffer and this is a one-way message and the 409 * transmitted is in a buffer and this is a one-way message and the
387 * receiver will not reply to the message. 410 * receiver will not reply to the message.
388 * 411 *
412 * Locking: local_bh_enable/local_bh_disable
413 *
389 * Returns the result from the CP IUCV call. 414 * Returns the result from the CP IUCV call.
390 */ 415 */
391int iucv_message_send(struct iucv_path *path, struct iucv_message *msg, 416int iucv_message_send(struct iucv_path *path, struct iucv_message *msg,
392 u8 flags, u32 srccls, void *buffer, size_t size); 417 u8 flags, u32 srccls, void *buffer, size_t size);
393 418
394/** 419/**
420 * __iucv_message_send
421 * @path: address of iucv path structure
422 * @msg: address of iucv msg structure
423 * @flags: how the message is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST)
424 * @srccls: source class of message
425 * @buffer: address of data buffer or address of struct iucv_array
426 * @size: length of send buffer
427 *
428 * This function transmits data to another application. Data to be
429 * transmitted is in a buffer and this is a one-way message and the
430 * receiver will not reply to the message.
431 *
432 * Locking: no locking.
433 *
434 * Returns the result from the CP IUCV call.
435 */
436int __iucv_message_send(struct iucv_path *path, struct iucv_message *msg,
437 u8 flags, u32 srccls, void *buffer, size_t size);
438
439/**
395 * iucv_message_send2way 440 * iucv_message_send2way
396 * @path: address of iucv path structure 441 * @path: address of iucv path structure
397 * @msg: address of iucv msg structure 442 * @msg: address of iucv msg structure
diff --git a/include/net/ieee80211_crypt.h b/include/net/lib80211.h
index b3d65e0bedd3..fb4e2784857d 100644
--- a/include/net/ieee80211_crypt.h
+++ b/include/net/lib80211.h
@@ -1,4 +1,11 @@
1/* 1/*
2 * lib80211.h -- common bits for IEEE802.11 wireless drivers
3 *
4 * Copyright (c) 2008, John W. Linville <linville@tuxdriver.com>
5 *
6 * Some bits copied from old ieee80211 component, w/ original copyright
7 * notices below:
8 *
2 * Original code based on Host AP (software wireless LAN access point) driver 9 * Original code based on Host AP (software wireless LAN access point) driver
3 * for Intersil Prism2/2.5/3. 10 * for Intersil Prism2/2.5/3.
4 * 11 *
@@ -11,31 +18,31 @@
11 * 18 *
12 * Copyright (c) 2004, Intel Corporation 19 * Copyright (c) 2004, Intel Corporation
13 * 20 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation. See README and COPYING for
17 * more details.
18 */ 21 */
19 22
20/* 23#ifndef LIB80211_H
21 * This file defines the interface to the ieee80211 crypto module. 24#define LIB80211_H
22 */
23#ifndef IEEE80211_CRYPT_H
24#define IEEE80211_CRYPT_H
25 25
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/list.h> 27#include <linux/list.h>
28#include <net/ieee80211.h> 28#include <linux/module.h>
29#include <asm/atomic.h> 29#include <asm/atomic.h>
30#include <linux/if.h>
31#include <linux/skbuff.h>
32#include <linux/ieee80211.h>
33#include <linux/timer.h>
34/* print_ssid() is intended to be used in debug (and possibly error)
35 * messages. It should never be used for passing ssid to user space. */
36const char *print_ssid(char *buf, const char *ssid, u8 ssid_len);
37#define DECLARE_SSID_BUF(var) char var[IEEE80211_MAX_SSID_LEN * 4 + 1] __maybe_unused
38
39#define NUM_WEP_KEYS 4
30 40
31enum { 41enum {
32 IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0), 42 IEEE80211_CRYPTO_TKIP_COUNTERMEASURES = (1 << 0),
33}; 43};
34 44
35struct sk_buff; 45struct lib80211_crypto_ops {
36struct module;
37
38struct ieee80211_crypto_ops {
39 const char *name; 46 const char *name;
40 struct list_head list; 47 struct list_head list;
41 48
@@ -87,22 +94,36 @@ struct ieee80211_crypto_ops {
87 struct module *owner; 94 struct module *owner;
88}; 95};
89 96
90struct ieee80211_crypt_data { 97struct lib80211_crypt_data {
91 struct list_head list; /* delayed deletion list */ 98 struct list_head list; /* delayed deletion list */
92 struct ieee80211_crypto_ops *ops; 99 struct lib80211_crypto_ops *ops;
93 void *priv; 100 void *priv;
94 atomic_t refcnt; 101 atomic_t refcnt;
95}; 102};
96 103
97struct ieee80211_device; 104struct lib80211_crypt_info {
98 105 char *name;
99int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); 106 /* Most clients will already have a lock,
100int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); 107 so just point to that. */
101struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); 108 spinlock_t *lock;
102void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); 109
103void ieee80211_crypt_deinit_handler(unsigned long); 110 struct lib80211_crypt_data *crypt[NUM_WEP_KEYS];
104void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, 111 int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */
105 struct ieee80211_crypt_data **crypt); 112 struct list_head crypt_deinit_list;
106void ieee80211_crypt_quiescing(struct ieee80211_device *ieee); 113 struct timer_list crypt_deinit_timer;
114 int crypt_quiesced;
115};
107 116
108#endif 117int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name,
118 spinlock_t *lock);
119void lib80211_crypt_info_free(struct lib80211_crypt_info *info);
120int lib80211_register_crypto_ops(struct lib80211_crypto_ops *ops);
121int lib80211_unregister_crypto_ops(struct lib80211_crypto_ops *ops);
122struct lib80211_crypto_ops *lib80211_get_crypto_ops(const char *name);
123void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *, int);
124void lib80211_crypt_deinit_handler(unsigned long);
125void lib80211_crypt_delayed_deinit(struct lib80211_crypt_info *info,
126 struct lib80211_crypt_data **crypt);
127void lib80211_crypt_quiescing(struct lib80211_crypt_info *info);
128
129#endif /* LIB80211_H */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5617a1613c91..b3bd00a9d992 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright 2002-2005, Devicescape Software, Inc. 4 * Copyright 2002-2005, Devicescape Software, Inc.
5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
6 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -74,14 +74,6 @@
74 */ 74 */
75 75
76/** 76/**
77 * enum ieee80211_notification_type - Low level driver notification
78 * @IEEE80211_NOTIFY_RE_ASSOC: start the re-association sequence
79 */
80enum ieee80211_notification_types {
81 IEEE80211_NOTIFY_RE_ASSOC,
82};
83
84/**
85 * struct ieee80211_ht_bss_info - describing BSS's HT characteristics 77 * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
86 * 78 *
87 * This structure describes most essential parameters needed 79 * This structure describes most essential parameters needed
@@ -115,7 +107,7 @@ enum ieee80211_max_queues {
115 * The information provided in this structure is required for QoS 107 * The information provided in this structure is required for QoS
116 * transmit queue configuration. Cf. IEEE 802.11 7.3.2.29. 108 * transmit queue configuration. Cf. IEEE 802.11 7.3.2.29.
117 * 109 *
118 * @aifs: arbitration interface space [0..255] 110 * @aifs: arbitration interframe space [0..255]
119 * @cw_min: minimum contention window [a value of the form 111 * @cw_min: minimum contention window [a value of the form
120 * 2^n-1 in the range 1..32767] 112 * 2^n-1 in the range 1..32767]
121 * @cw_max: maximum contention window [like @cw_min] 113 * @cw_max: maximum contention window [like @cw_min]
@@ -172,6 +164,14 @@ enum ieee80211_bss_change {
172}; 164};
173 165
174/** 166/**
167 * struct ieee80211_bss_ht_conf - BSS's changing HT configuration
168 * @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
169 */
170struct ieee80211_bss_ht_conf {
171 u16 operation_mode;
172};
173
174/**
175 * struct ieee80211_bss_conf - holds the BSS's changing parameters 175 * struct ieee80211_bss_conf - holds the BSS's changing parameters
176 * 176 *
177 * This structure keeps information about a BSS (and an association 177 * This structure keeps information about a BSS (and an association
@@ -180,15 +180,17 @@ enum ieee80211_bss_change {
180 * @assoc: association status 180 * @assoc: association status
181 * @aid: association ID number, valid only when @assoc is true 181 * @aid: association ID number, valid only when @assoc is true
182 * @use_cts_prot: use CTS protection 182 * @use_cts_prot: use CTS protection
183 * @use_short_preamble: use 802.11b short preamble 183 * @use_short_preamble: use 802.11b short preamble;
184 * @use_short_slot: use short slot time (only relevant for ERP) 184 * if the hardware cannot handle this it must set the
185 * IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE hardware flag
186 * @use_short_slot: use short slot time (only relevant for ERP);
187 * if the hardware cannot handle this it must set the
188 * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag
185 * @dtim_period: num of beacons before the next DTIM, for PSM 189 * @dtim_period: num of beacons before the next DTIM, for PSM
186 * @timestamp: beacon timestamp 190 * @timestamp: beacon timestamp
187 * @beacon_int: beacon interval 191 * @beacon_int: beacon interval
188 * @assoc_capability: capabilities taken from assoc resp 192 * @assoc_capability: capabilities taken from assoc resp
189 * @assoc_ht: association in HT mode 193 * @ht: BSS's HT configuration
190 * @ht_conf: ht capabilities
191 * @ht_bss_conf: ht extended capabilities
192 * @basic_rates: bitmap of basic rates, each bit stands for an 194 * @basic_rates: bitmap of basic rates, each bit stands for an
193 * index into the rate table configured by the driver in 195 * index into the rate table configured by the driver in
194 * the current band. 196 * the current band.
@@ -206,10 +208,7 @@ struct ieee80211_bss_conf {
206 u16 assoc_capability; 208 u16 assoc_capability;
207 u64 timestamp; 209 u64 timestamp;
208 u64 basic_rates; 210 u64 basic_rates;
209 /* ht related data */ 211 struct ieee80211_bss_ht_conf ht;
210 bool assoc_ht;
211 struct ieee80211_ht_info *ht_conf;
212 struct ieee80211_ht_bss_info *ht_bss_conf;
213}; 212};
214 213
215/** 214/**
@@ -218,29 +217,24 @@ struct ieee80211_bss_conf {
218 * These flags are used with the @flags member of &ieee80211_tx_info. 217 * These flags are used with the @flags member of &ieee80211_tx_info.
219 * 218 *
220 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame. 219 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame.
221 * @IEEE80211_TX_CTL_USE_RTS_CTS: use RTS-CTS before sending frame 220 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
222 * @IEEE80211_TX_CTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., 221 * number to this frame, taking care of not overwriting the fragment
223 * for combined 802.11g / 802.11b networks) 222 * number and increasing the sequence number only when the
223 * IEEE80211_TX_CTL_FIRST_FRAGMENT flag is set. mac80211 will properly
224 * assign sequence numbers to QoS-data frames but cannot do so correctly
225 * for non-QoS-data and management frames because beacons need them from
226 * that counter as well and mac80211 cannot guarantee proper sequencing.
227 * If this flag is set, the driver should instruct the hardware to
228 * assign a sequence number to the frame or assign one itself. Cf. IEEE
229 * 802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for
230 * beacons and always be clear for frames without a sequence number field.
224 * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack 231 * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack
225 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: TBD
226 * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination 232 * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination
227 * station 233 * station
228 * @IEEE80211_TX_CTL_REQUEUE: TBD
229 * @IEEE80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame 234 * @IEEE80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame
230 * @IEEE80211_TX_CTL_SHORT_PREAMBLE: TBD
231 * @IEEE80211_TX_CTL_LONG_RETRY_LIMIT: this frame should be send using the
232 * through set_retry_limit configured long retry value
233 * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon 235 * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon
234 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU 236 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
235 * @IEEE80211_TX_CTL_OFDM_HT: this frame can be sent in HT OFDM rates. number 237 * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211.
236 * of streams when this flag is on can be extracted from antenna_sel_tx,
237 * so if 1 antenna is marked use SISO, 2 antennas marked use MIMO, n
238 * antennas marked use MIMO_n.
239 * @IEEE80211_TX_CTL_GREEN_FIELD: use green field protection for this frame
240 * @IEEE80211_TX_CTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width
241 * @IEEE80211_TX_CTL_DUP_DATA: duplicate data frame on both 20 Mhz channels
242 * @IEEE80211_TX_CTL_SHORT_GI: send this frame using short guard interval
243 * @IEEE80211_TX_CTL_INJECTED: TBD
244 * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted 238 * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted
245 * because the destination STA was in powersave mode. 239 * because the destination STA was in powersave mode.
246 * @IEEE80211_TX_STAT_ACK: Frame was acknowledged 240 * @IEEE80211_TX_STAT_ACK: Frame was acknowledged
@@ -248,63 +242,67 @@ struct ieee80211_bss_conf {
248 * is for the whole aggregation. 242 * is for the whole aggregation.
249 * @IEEE80211_TX_STAT_AMPDU_NO_BACK: no block ack was returned, 243 * @IEEE80211_TX_STAT_AMPDU_NO_BACK: no block ack was returned,
250 * so consider using block ack request (BAR). 244 * so consider using block ack request (BAR).
251 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence 245 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be
252 * number to this frame, taking care of not overwriting the fragment 246 * set by rate control algorithms to indicate probe rate, will
253 * number and increasing the sequence number only when the 247 * be cleared for fragmented frames (except on the last fragment)
254 * IEEE80211_TX_CTL_FIRST_FRAGMENT flags is set. mac80211 will properly
255 * assign sequence numbers to QoS-data frames but cannot do so correctly
256 * for non-QoS-data and management frames because beacons need them from
257 * that counter as well and mac80211 cannot guarantee proper sequencing.
258 * If this flag is set, the driver should instruct the hardware to
259 * assign a sequence number to the frame or assign one itself. Cf. IEEE
260 * 802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for
261 * beacons always be clear for frames without a sequence number field.
262 */ 248 */
263enum mac80211_tx_control_flags { 249enum mac80211_tx_control_flags {
264 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 250 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
265 IEEE80211_TX_CTL_USE_RTS_CTS = BIT(2), 251 IEEE80211_TX_CTL_ASSIGN_SEQ = BIT(1),
266 IEEE80211_TX_CTL_USE_CTS_PROTECT = BIT(3), 252 IEEE80211_TX_CTL_NO_ACK = BIT(2),
267 IEEE80211_TX_CTL_NO_ACK = BIT(4), 253 IEEE80211_TX_CTL_CLEAR_PS_FILT = BIT(3),
268 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(5), 254 IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(4),
269 IEEE80211_TX_CTL_CLEAR_PS_FILT = BIT(6), 255 IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(5),
270 IEEE80211_TX_CTL_REQUEUE = BIT(7), 256 IEEE80211_TX_CTL_AMPDU = BIT(6),
271 IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(8), 257 IEEE80211_TX_CTL_INJECTED = BIT(7),
272 IEEE80211_TX_CTL_SHORT_PREAMBLE = BIT(9), 258 IEEE80211_TX_STAT_TX_FILTERED = BIT(8),
273 IEEE80211_TX_CTL_LONG_RETRY_LIMIT = BIT(10), 259 IEEE80211_TX_STAT_ACK = BIT(9),
274 IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(12), 260 IEEE80211_TX_STAT_AMPDU = BIT(10),
275 IEEE80211_TX_CTL_AMPDU = BIT(13), 261 IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11),
276 IEEE80211_TX_CTL_OFDM_HT = BIT(14), 262 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
277 IEEE80211_TX_CTL_GREEN_FIELD = BIT(15), 263};
278 IEEE80211_TX_CTL_40_MHZ_WIDTH = BIT(16), 264
279 IEEE80211_TX_CTL_DUP_DATA = BIT(17), 265enum mac80211_rate_control_flags {
280 IEEE80211_TX_CTL_SHORT_GI = BIT(18), 266 IEEE80211_TX_RC_USE_RTS_CTS = BIT(0),
281 IEEE80211_TX_CTL_INJECTED = BIT(19), 267 IEEE80211_TX_RC_USE_CTS_PROTECT = BIT(1),
282 IEEE80211_TX_STAT_TX_FILTERED = BIT(20), 268 IEEE80211_TX_RC_USE_SHORT_PREAMBLE = BIT(2),
283 IEEE80211_TX_STAT_ACK = BIT(21), 269
284 IEEE80211_TX_STAT_AMPDU = BIT(22), 270 /* rate index is an MCS rate number instead of an index */
285 IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(23), 271 IEEE80211_TX_RC_MCS = BIT(3),
286 IEEE80211_TX_CTL_ASSIGN_SEQ = BIT(24), 272 IEEE80211_TX_RC_GREEN_FIELD = BIT(4),
273 IEEE80211_TX_RC_40_MHZ_WIDTH = BIT(5),
274 IEEE80211_TX_RC_DUP_DATA = BIT(6),
275 IEEE80211_TX_RC_SHORT_GI = BIT(7),
287}; 276};
288 277
289 278
290#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE \ 279/* there are 40 bytes if you don't need the rateset to be kept */
291 (sizeof(((struct sk_buff *)0)->cb) - 8) 280#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE 40
292#define IEEE80211_TX_INFO_DRIVER_DATA_PTRS \
293 (IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *))
294 281
295/* maximum number of alternate rate retry stages */ 282/* if you do need the rateset, then you have less space */
296#define IEEE80211_TX_MAX_ALTRATE 3 283#define IEEE80211_TX_INFO_RATE_DRIVER_DATA_SIZE 24
284
285/* maximum number of rate stages */
286#define IEEE80211_TX_MAX_RATES 5
297 287
298/** 288/**
299 * struct ieee80211_tx_altrate - alternate rate selection/status 289 * struct ieee80211_tx_rate - rate selection/status
290 *
291 * @idx: rate index to attempt to send with
292 * @flags: rate control flags (&enum mac80211_rate_control_flags)
293 * @count: number of tries in this rate before going to the next rate
300 * 294 *
301 * @rate_idx: rate index to attempt to send with 295 * A value of -1 for @idx indicates an invalid rate and, if used
302 * @limit: number of retries before fallback 296 * in an array of retry rates, that no more rates should be tried.
297 *
298 * When used for transmit status reporting, the driver should
299 * always report the rate along with the flags it used.
303 */ 300 */
304struct ieee80211_tx_altrate { 301struct ieee80211_tx_rate {
305 s8 rate_idx; 302 s8 idx;
306 u8 limit; 303 u8 count;
307}; 304 u8 flags;
305} __attribute__((packed));
308 306
309/** 307/**
310 * struct ieee80211_tx_info - skb transmit information 308 * struct ieee80211_tx_info - skb transmit information
@@ -318,15 +316,13 @@ struct ieee80211_tx_altrate {
318 * it may be NULL. 316 * it may be NULL.
319 * 317 *
320 * @flags: transmit info flags, defined above 318 * @flags: transmit info flags, defined above
321 * @band: TBD 319 * @band: the band to transmit on (use for checking for races)
322 * @tx_rate_idx: TBD 320 * @antenna_sel_tx: antenna to use, 0 for automatic diversity
323 * @antenna_sel_tx: TBD 321 * @pad: padding, ignore
324 * @control: union for control data 322 * @control: union for control data
325 * @status: union for status data 323 * @status: union for status data
326 * @driver_data: array of driver_data pointers 324 * @driver_data: array of driver_data pointers
327 * @retry_count: number of retries 325 * @retry_count: number of retries
328 * @excessive_retries: set to 1 if the frame was retried many times
329 * but not acknowledged
330 * @ampdu_ack_len: number of aggregated frames. 326 * @ampdu_ack_len: number of aggregated frames.
331 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 327 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
332 * @ampdu_ack_map: block ack bit map for the aggregation. 328 * @ampdu_ack_map: block ack bit map for the aggregation.
@@ -337,31 +333,44 @@ struct ieee80211_tx_info {
337 /* common information */ 333 /* common information */
338 u32 flags; 334 u32 flags;
339 u8 band; 335 u8 band;
340 s8 tx_rate_idx; 336
341 u8 antenna_sel_tx; 337 u8 antenna_sel_tx;
342 338
343 /* 1 byte hole */ 339 /* 2 byte hole */
340 u8 pad[2];
344 341
345 union { 342 union {
346 struct { 343 struct {
344 union {
345 /* rate control */
346 struct {
347 struct ieee80211_tx_rate rates[
348 IEEE80211_TX_MAX_RATES];
349 s8 rts_cts_rate_idx;
350 };
351 /* only needed before rate control */
352 unsigned long jiffies;
353 };
347 /* NB: vif can be NULL for injected frames */ 354 /* NB: vif can be NULL for injected frames */
348 struct ieee80211_vif *vif; 355 struct ieee80211_vif *vif;
349 struct ieee80211_key_conf *hw_key; 356 struct ieee80211_key_conf *hw_key;
350 struct ieee80211_sta *sta; 357 struct ieee80211_sta *sta;
351 unsigned long jiffies;
352 s8 rts_cts_rate_idx;
353 u8 retry_limit;
354 struct ieee80211_tx_altrate retries[IEEE80211_TX_MAX_ALTRATE];
355 } control; 358 } control;
356 struct { 359 struct {
360 struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
361 u8 ampdu_ack_len;
357 u64 ampdu_ack_map; 362 u64 ampdu_ack_map;
358 int ack_signal; 363 int ack_signal;
359 struct ieee80211_tx_altrate retries[IEEE80211_TX_MAX_ALTRATE + 1]; 364 /* 8 bytes free */
360 u8 retry_count;
361 bool excessive_retries;
362 u8 ampdu_ack_len;
363 } status; 365 } status;
364 void *driver_data[IEEE80211_TX_INFO_DRIVER_DATA_PTRS]; 366 struct {
367 struct ieee80211_tx_rate driver_rates[
368 IEEE80211_TX_MAX_RATES];
369 void *rate_driver_data[
370 IEEE80211_TX_INFO_RATE_DRIVER_DATA_SIZE / sizeof(void *)];
371 };
372 void *driver_data[
373 IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)];
365 }; 374 };
366}; 375};
367 376
@@ -370,6 +379,41 @@ static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
370 return (struct ieee80211_tx_info *)skb->cb; 379 return (struct ieee80211_tx_info *)skb->cb;
371} 380}
372 381
382/**
383 * ieee80211_tx_info_clear_status - clear TX status
384 *
385 * @info: The &struct ieee80211_tx_info to be cleared.
386 *
387 * When the driver passes an skb back to mac80211, it must report
388 * a number of things in TX status. This function clears everything
389 * in the TX status but the rate control information (it does clear
390 * the count since you need to fill that in anyway).
391 *
392 * NOTE: You can only use this function if you do NOT use
393 * info->driver_data! Use info->rate_driver_data
394 * instead if you need only the less space that allows.
395 */
396static inline void
397ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
398{
399 int i;
400
401 BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, status.rates) !=
402 offsetof(struct ieee80211_tx_info, control.rates));
403 BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, status.rates) !=
404 offsetof(struct ieee80211_tx_info, driver_rates));
405 BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, status.rates) != 8);
406 /* clear the rate counts */
407 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++)
408 info->status.rates[i].count = 0;
409
410 BUILD_BUG_ON(
411 offsetof(struct ieee80211_tx_info, status.ampdu_ack_len) != 23);
412 memset(&info->status.ampdu_ack_len, 0,
413 sizeof(struct ieee80211_tx_info) -
414 offsetof(struct ieee80211_tx_info, status.ampdu_ack_len));
415}
416
373 417
374/** 418/**
375 * enum mac80211_rx_flags - receive flags 419 * enum mac80211_rx_flags - receive flags
@@ -392,6 +436,9 @@ static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
392 * is valid. This is useful in monitor mode and necessary for beacon frames 436 * is valid. This is useful in monitor mode and necessary for beacon frames
393 * to enable IBSS merging. 437 * to enable IBSS merging.
394 * @RX_FLAG_SHORTPRE: Short preamble was used for this frame 438 * @RX_FLAG_SHORTPRE: Short preamble was used for this frame
439 * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
440 * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
441 * @RX_FLAG_SHORT_GI: Short guard interval was used
395 */ 442 */
396enum mac80211_rx_flags { 443enum mac80211_rx_flags {
397 RX_FLAG_MMIC_ERROR = 1<<0, 444 RX_FLAG_MMIC_ERROR = 1<<0,
@@ -402,7 +449,10 @@ enum mac80211_rx_flags {
402 RX_FLAG_FAILED_FCS_CRC = 1<<5, 449 RX_FLAG_FAILED_FCS_CRC = 1<<5,
403 RX_FLAG_FAILED_PLCP_CRC = 1<<6, 450 RX_FLAG_FAILED_PLCP_CRC = 1<<6,
404 RX_FLAG_TSFT = 1<<7, 451 RX_FLAG_TSFT = 1<<7,
405 RX_FLAG_SHORTPRE = 1<<8 452 RX_FLAG_SHORTPRE = 1<<8,
453 RX_FLAG_HT = 1<<9,
454 RX_FLAG_40MHZ = 1<<10,
455 RX_FLAG_SHORT_GI = 1<<11,
406}; 456};
407 457
408/** 458/**
@@ -422,7 +472,8 @@ enum mac80211_rx_flags {
422 * @noise: noise when receiving this frame, in dBm. 472 * @noise: noise when receiving this frame, in dBm.
423 * @qual: overall signal quality indication, in percent (0-100). 473 * @qual: overall signal quality indication, in percent (0-100).
424 * @antenna: antenna used 474 * @antenna: antenna used
425 * @rate_idx: index of data rate into band's supported rates 475 * @rate_idx: index of data rate into band's supported rates or MCS index if
476 * HT rates are use (RX_FLAG_HT)
426 * @flag: %RX_FLAG_* 477 * @flag: %RX_FLAG_*
427 */ 478 */
428struct ieee80211_rx_status { 479struct ieee80211_rx_status {
@@ -442,21 +493,49 @@ struct ieee80211_rx_status {
442 * 493 *
443 * Flags to define PHY configuration options 494 * Flags to define PHY configuration options
444 * 495 *
445 * @IEEE80211_CONF_SHORT_SLOT_TIME: use 802.11g short slot time
446 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) 496 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported)
447 * @IEEE80211_CONF_SUPPORT_HT_MODE: use 802.11n HT capabilities (if supported)
448 * @IEEE80211_CONF_PS: Enable 802.11 power save mode 497 * @IEEE80211_CONF_PS: Enable 802.11 power save mode
449 */ 498 */
450enum ieee80211_conf_flags { 499enum ieee80211_conf_flags {
451 /* 500 IEEE80211_CONF_RADIOTAP = (1<<0),
452 * TODO: IEEE80211_CONF_SHORT_SLOT_TIME will be removed once drivers 501 IEEE80211_CONF_PS = (1<<1),
453 * have been converted to use bss_info_changed() for slot time 502};
454 * configuration 503
455 */ 504/* XXX: remove all this once drivers stop trying to use it */
456 IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0), 505static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
457 IEEE80211_CONF_RADIOTAP = (1<<1), 506{
458 IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2), 507 return 0;
459 IEEE80211_CONF_PS = (1<<3), 508}
509#define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME())
510
511struct ieee80211_ht_conf {
512 bool enabled;
513 enum nl80211_channel_type channel_type;
514};
515
516/**
517 * enum ieee80211_conf_changed - denotes which configuration changed
518 *
519 * @IEEE80211_CONF_CHANGE_RADIO_ENABLED: the value of radio_enabled changed
520 * @IEEE80211_CONF_CHANGE_BEACON_INTERVAL: the beacon interval changed
521 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
522 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed
523 * @IEEE80211_CONF_CHANGE_PS: the PS flag changed
524 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed
525 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel changed
526 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
527 * @IEEE80211_CONF_CHANGE_HT: HT configuration changed
528 */
529enum ieee80211_conf_changed {
530 IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0),
531 IEEE80211_CONF_CHANGE_BEACON_INTERVAL = BIT(1),
532 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
533 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3),
534 IEEE80211_CONF_CHANGE_PS = BIT(4),
535 IEEE80211_CONF_CHANGE_POWER = BIT(5),
536 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
537 IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7),
538 IEEE80211_CONF_CHANGE_HT = BIT(8),
460}; 539};
461 540
462/** 541/**
@@ -465,34 +544,31 @@ enum ieee80211_conf_flags {
465 * This struct indicates how the driver shall configure the hardware. 544 * This struct indicates how the driver shall configure the hardware.
466 * 545 *
467 * @radio_enabled: when zero, driver is required to switch off the radio. 546 * @radio_enabled: when zero, driver is required to switch off the radio.
468 * TODO make a flag
469 * @beacon_int: beacon interval (TODO make interface config) 547 * @beacon_int: beacon interval (TODO make interface config)
470 * @listen_interval: listen interval in units of beacon interval 548 * @listen_interval: listen interval in units of beacon interval
471 * @flags: configuration flags defined above 549 * @flags: configuration flags defined above
472 * @power_level: requested transmit power (in dBm) 550 * @power_level: requested transmit power (in dBm)
473 * @max_antenna_gain: maximum antenna gain (in dBi)
474 * @antenna_sel_tx: transmit antenna selection, 0: default/diversity,
475 * 1/2: antenna 0/1
476 * @antenna_sel_rx: receive antenna selection, like @antenna_sel_tx
477 * @ht_conf: describes current self configuration of 802.11n HT capabilies
478 * @ht_bss_conf: describes current BSS configuration of 802.11n HT parameters
479 * @channel: the channel to tune to 551 * @channel: the channel to tune to
552 * @ht: the HT configuration for the device
553 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
554 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
555 * but actually means the number of transmissions not the number of retries
556 * @short_frame_max_tx_count: Maximum number of transmissions for a "short"
557 * frame, called "dot11ShortRetryLimit" in 802.11, but actually means the
558 * number of transmissions not the number of retries
480 */ 559 */
481struct ieee80211_conf { 560struct ieee80211_conf {
482 int radio_enabled;
483
484 int beacon_int; 561 int beacon_int;
485 u16 listen_interval;
486 u32 flags; 562 u32 flags;
487 int power_level; 563 int power_level;
488 int max_antenna_gain;
489 u8 antenna_sel_tx;
490 u8 antenna_sel_rx;
491 564
492 struct ieee80211_channel *channel; 565 u16 listen_interval;
566 bool radio_enabled;
567
568 u8 long_frame_max_tx_count, short_frame_max_tx_count;
493 569
494 struct ieee80211_ht_info ht_conf; 570 struct ieee80211_channel *channel;
495 struct ieee80211_ht_bss_info ht_bss_conf; 571 struct ieee80211_ht_conf ht;
496}; 572};
497 573
498/** 574/**
@@ -502,11 +578,14 @@ struct ieee80211_conf {
502 * use during the life of a virtual interface. 578 * use during the life of a virtual interface.
503 * 579 *
504 * @type: type of this virtual interface 580 * @type: type of this virtual interface
581 * @bss_conf: BSS configuration for this interface, either our own
582 * or the BSS we're associated to
505 * @drv_priv: data area for driver use, will always be aligned to 583 * @drv_priv: data area for driver use, will always be aligned to
506 * sizeof(void *). 584 * sizeof(void *).
507 */ 585 */
508struct ieee80211_vif { 586struct ieee80211_vif {
509 enum nl80211_iftype type; 587 enum nl80211_iftype type;
588 struct ieee80211_bss_conf bss_conf;
510 /* must be last */ 589 /* must be last */
511 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 590 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
512}; 591};
@@ -550,14 +629,12 @@ struct ieee80211_if_init_conf {
550 * enum ieee80211_if_conf_change - interface config change flags 629 * enum ieee80211_if_conf_change - interface config change flags
551 * 630 *
552 * @IEEE80211_IFCC_BSSID: The BSSID changed. 631 * @IEEE80211_IFCC_BSSID: The BSSID changed.
553 * @IEEE80211_IFCC_SSID: The SSID changed.
554 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed 632 * @IEEE80211_IFCC_BEACON: The beacon for this interface changed
555 * (currently AP and MESH only), use ieee80211_beacon_get(). 633 * (currently AP and MESH only), use ieee80211_beacon_get().
556 */ 634 */
557enum ieee80211_if_conf_change { 635enum ieee80211_if_conf_change {
558 IEEE80211_IFCC_BSSID = BIT(0), 636 IEEE80211_IFCC_BSSID = BIT(0),
559 IEEE80211_IFCC_SSID = BIT(1), 637 IEEE80211_IFCC_BEACON = BIT(1),
560 IEEE80211_IFCC_BEACON = BIT(2),
561}; 638};
562 639
563/** 640/**
@@ -565,11 +642,6 @@ enum ieee80211_if_conf_change {
565 * 642 *
566 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change. 643 * @changed: parameters that have changed, see &enum ieee80211_if_conf_change.
567 * @bssid: BSSID of the network we are associated to/creating. 644 * @bssid: BSSID of the network we are associated to/creating.
568 * @ssid: used (together with @ssid_len) by drivers for hardware that
569 * generate beacons independently. The pointer is valid only during the
570 * config_interface() call, so copy the value somewhere if you need
571 * it.
572 * @ssid_len: length of the @ssid field.
573 * 645 *
574 * This structure is passed to the config_interface() callback of 646 * This structure is passed to the config_interface() callback of
575 * &struct ieee80211_hw. 647 * &struct ieee80211_hw.
@@ -577,8 +649,6 @@ enum ieee80211_if_conf_change {
577struct ieee80211_if_conf { 649struct ieee80211_if_conf {
578 u32 changed; 650 u32 changed;
579 u8 *bssid; 651 u8 *bssid;
580 u8 *ssid;
581 size_t ssid_len;
582}; 652};
583 653
584/** 654/**
@@ -645,7 +715,8 @@ enum ieee80211_key_flags {
645 * - Temporal Encryption Key (128 bits) 715 * - Temporal Encryption Key (128 bits)
646 * - Temporal Authenticator Tx MIC Key (64 bits) 716 * - Temporal Authenticator Tx MIC Key (64 bits)
647 * - Temporal Authenticator Rx MIC Key (64 bits) 717 * - Temporal Authenticator Rx MIC Key (64 bits)
648 * 718 * @icv_len: FIXME
719 * @iv_len: FIXME
649 */ 720 */
650struct ieee80211_key_conf { 721struct ieee80211_key_conf {
651 enum ieee80211_key_alg alg; 722 enum ieee80211_key_alg alg;
@@ -684,7 +755,7 @@ enum set_key_cmd {
684 * @addr: MAC address 755 * @addr: MAC address
685 * @aid: AID we assigned to the station if we're an AP 756 * @aid: AID we assigned to the station if we're an AP
686 * @supp_rates: Bitmap of supported rates (per band) 757 * @supp_rates: Bitmap of supported rates (per band)
687 * @ht_info: HT capabilities of this STA 758 * @ht_cap: HT capabilities of this STA; restricted to our own TX capabilities
688 * @drv_priv: data area for driver use, will always be aligned to 759 * @drv_priv: data area for driver use, will always be aligned to
689 * sizeof(void *), size is determined in hw information. 760 * sizeof(void *), size is determined in hw information.
690 */ 761 */
@@ -692,7 +763,7 @@ struct ieee80211_sta {
692 u64 supp_rates[IEEE80211_NUM_BANDS]; 763 u64 supp_rates[IEEE80211_NUM_BANDS];
693 u8 addr[ETH_ALEN]; 764 u8 addr[ETH_ALEN];
694 u16 aid; 765 u16 aid;
695 struct ieee80211_ht_info ht_info; 766 struct ieee80211_sta_ht_cap ht_cap;
696 767
697 /* must be last */ 768 /* must be last */
698 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); 769 u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
@@ -702,13 +773,17 @@ struct ieee80211_sta {
702 * enum sta_notify_cmd - sta notify command 773 * enum sta_notify_cmd - sta notify command
703 * 774 *
704 * Used with the sta_notify() callback in &struct ieee80211_ops, this 775 * Used with the sta_notify() callback in &struct ieee80211_ops, this
705 * indicates addition and removal of a station to station table. 776 * indicates addition and removal of a station to station table,
777 * or if a associated station made a power state transition.
706 * 778 *
707 * @STA_NOTIFY_ADD: a station was added to the station table 779 * @STA_NOTIFY_ADD: a station was added to the station table
708 * @STA_NOTIFY_REMOVE: a station being removed from the station table 780 * @STA_NOTIFY_REMOVE: a station being removed from the station table
781 * @STA_NOTIFY_SLEEP: a station is now sleeping
782 * @STA_NOTIFY_AWAKE: a sleeping station woke up
709 */ 783 */
710enum sta_notify_cmd { 784enum sta_notify_cmd {
711 STA_NOTIFY_ADD, STA_NOTIFY_REMOVE 785 STA_NOTIFY_ADD, STA_NOTIFY_REMOVE,
786 STA_NOTIFY_SLEEP, STA_NOTIFY_AWAKE,
712}; 787};
713 788
714/** 789/**
@@ -776,6 +851,14 @@ enum ieee80211_tkip_key_type {
776 * @IEEE80211_HW_SPECTRUM_MGMT: 851 * @IEEE80211_HW_SPECTRUM_MGMT:
777 * Hardware supports spectrum management defined in 802.11h 852 * Hardware supports spectrum management defined in 802.11h
778 * Measurement, Channel Switch, Quieting, TPC 853 * Measurement, Channel Switch, Quieting, TPC
854 *
855 * @IEEE80211_HW_AMPDU_AGGREGATION:
856 * Hardware supports 11n A-MPDU aggregation.
857 *
858 * @IEEE80211_HW_NO_STACK_DYNAMIC_PS:
859 * Hardware which has dynamic power save support, meaning
860 * that power save is enabled in idle periods, and don't need support
861 * from stack.
779 */ 862 */
780enum ieee80211_hw_flags { 863enum ieee80211_hw_flags {
781 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, 864 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
@@ -787,6 +870,8 @@ enum ieee80211_hw_flags {
787 IEEE80211_HW_SIGNAL_DBM = 1<<7, 870 IEEE80211_HW_SIGNAL_DBM = 1<<7,
788 IEEE80211_HW_NOISE_DBM = 1<<8, 871 IEEE80211_HW_NOISE_DBM = 1<<8,
789 IEEE80211_HW_SPECTRUM_MGMT = 1<<9, 872 IEEE80211_HW_SPECTRUM_MGMT = 1<<9,
873 IEEE80211_HW_AMPDU_AGGREGATION = 1<<10,
874 IEEE80211_HW_NO_STACK_DYNAMIC_PS = 1<<11,
790}; 875};
791 876
792/** 877/**
@@ -845,8 +930,8 @@ enum ieee80211_hw_flags {
845 * @sta_data_size: size (in bytes) of the drv_priv data area 930 * @sta_data_size: size (in bytes) of the drv_priv data area
846 * within &struct ieee80211_sta. 931 * within &struct ieee80211_sta.
847 * 932 *
848 * @max_altrates: maximum number of alternate rate retry stages 933 * @max_rates: maximum number of alternate rate retry stages
849 * @max_altrate_tries: maximum number of tries for each stage 934 * @max_rate_tries: maximum number of tries for each stage
850 */ 935 */
851struct ieee80211_hw { 936struct ieee80211_hw {
852 struct ieee80211_conf conf; 937 struct ieee80211_conf conf;
@@ -863,12 +948,10 @@ struct ieee80211_hw {
863 u16 ampdu_queues; 948 u16 ampdu_queues;
864 u16 max_listen_interval; 949 u16 max_listen_interval;
865 s8 max_signal; 950 s8 max_signal;
866 u8 max_altrates; 951 u8 max_rates;
867 u8 max_altrate_tries; 952 u8 max_rate_tries;
868}; 953};
869 954
870struct ieee80211_hw *wiphy_to_hw(struct wiphy *wiphy);
871
872/** 955/**
873 * SET_IEEE80211_DEV - set device for 802.11 hardware 956 * SET_IEEE80211_DEV - set device for 802.11 hardware
874 * 957 *
@@ -881,7 +964,7 @@ static inline void SET_IEEE80211_DEV(struct ieee80211_hw *hw, struct device *dev
881} 964}
882 965
883/** 966/**
884 * SET_IEEE80211_PERM_ADDR - set the permanenet MAC address for 802.11 hardware 967 * SET_IEEE80211_PERM_ADDR - set the permanent MAC address for 802.11 hardware
885 * 968 *
886 * @hw: the &struct ieee80211_hw to set the MAC address for 969 * @hw: the &struct ieee80211_hw to set the MAC address for
887 * @addr: the address to set 970 * @addr: the address to set
@@ -905,9 +988,9 @@ static inline struct ieee80211_rate *
905ieee80211_get_tx_rate(const struct ieee80211_hw *hw, 988ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
906 const struct ieee80211_tx_info *c) 989 const struct ieee80211_tx_info *c)
907{ 990{
908 if (WARN_ON(c->tx_rate_idx < 0)) 991 if (WARN_ON(c->control.rates[0].idx < 0))
909 return NULL; 992 return NULL;
910 return &hw->wiphy->bands[c->band]->bitrates[c->tx_rate_idx]; 993 return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
911} 994}
912 995
913static inline struct ieee80211_rate * 996static inline struct ieee80211_rate *
@@ -923,9 +1006,9 @@ static inline struct ieee80211_rate *
923ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, 1006ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
924 const struct ieee80211_tx_info *c, int idx) 1007 const struct ieee80211_tx_info *c, int idx)
925{ 1008{
926 if (c->control.retries[idx].rate_idx < 0) 1009 if (c->control.rates[idx + 1].idx < 0)
927 return NULL; 1010 return NULL;
928 return &hw->wiphy->bands[c->band]->bitrates[c->control.retries[idx].rate_idx]; 1011 return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[idx + 1].idx];
929} 1012}
930 1013
931/** 1014/**
@@ -974,7 +1057,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
974 * This happens everytime the iv16 wraps around (every 65536 packets). The 1057 * This happens everytime the iv16 wraps around (every 65536 packets). The
975 * set_key() call will happen only once for each key (unless the AP did 1058 * set_key() call will happen only once for each key (unless the AP did
976 * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is 1059 * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is
977 * provided by udpate_tkip_key only. The trigger that makes mac80211 call this 1060 * provided by update_tkip_key only. The trigger that makes mac80211 call this
978 * handler is software decryption with wrap around of iv16. 1061 * handler is software decryption with wrap around of iv16.
979 */ 1062 */
980 1063
@@ -1067,12 +1150,14 @@ enum ieee80211_filter_flags {
1067 * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation 1150 * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
1068 * @IEEE80211_AMPDU_TX_START: start Tx aggregation 1151 * @IEEE80211_AMPDU_TX_START: start Tx aggregation
1069 * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation 1152 * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
1153 * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation
1070 */ 1154 */
1071enum ieee80211_ampdu_mlme_action { 1155enum ieee80211_ampdu_mlme_action {
1072 IEEE80211_AMPDU_RX_START, 1156 IEEE80211_AMPDU_RX_START,
1073 IEEE80211_AMPDU_RX_STOP, 1157 IEEE80211_AMPDU_RX_STOP,
1074 IEEE80211_AMPDU_TX_START, 1158 IEEE80211_AMPDU_TX_START,
1075 IEEE80211_AMPDU_TX_STOP, 1159 IEEE80211_AMPDU_TX_STOP,
1160 IEEE80211_AMPDU_TX_RESUME,
1076}; 1161};
1077 1162
1078/** 1163/**
@@ -1108,7 +1193,7 @@ enum ieee80211_ampdu_mlme_action {
1108 * Must be implemented. 1193 * Must be implemented.
1109 * 1194 *
1110 * @add_interface: Called when a netdevice attached to the hardware is 1195 * @add_interface: Called when a netdevice attached to the hardware is
1111 * enabled. Because it is not called for monitor mode devices, @open 1196 * enabled. Because it is not called for monitor mode devices, @start
1112 * and @stop must be implemented. 1197 * and @stop must be implemented.
1113 * The driver should perform any initialization it needs before 1198 * The driver should perform any initialization it needs before
1114 * the device can be enabled. The initial configuration for the 1199 * the device can be enabled. The initial configuration for the
@@ -1170,14 +1255,9 @@ enum ieee80211_ampdu_mlme_action {
1170 * 1255 *
1171 * @set_rts_threshold: Configuration of RTS threshold (if device needs it) 1256 * @set_rts_threshold: Configuration of RTS threshold (if device needs it)
1172 * 1257 *
1173 * @set_frag_threshold: Configuration of fragmentation threshold. Assign this if 1258 * @sta_notify: Notifies low level driver about addition, removal or power
1174 * the device does fragmentation by itself; if this method is assigned then 1259 * state transition of an associated station, AP, IBSS/WDS/mesh peer etc.
1175 * the stack will not do fragmentation. 1260 * Must be atomic.
1176 *
1177 * @set_retry_limit: Configuration of retry limits (if device needs it)
1178 *
1179 * @sta_notify: Notifies low level driver about addition or removal
1180 * of assocaited station or AP.
1181 * 1261 *
1182 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), 1262 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
1183 * bursting) for a hardware TX queue. 1263 * bursting) for a hardware TX queue.
@@ -1201,8 +1281,6 @@ enum ieee80211_ampdu_mlme_action {
1201 * This is needed only for IBSS mode and the result of this function is 1281 * This is needed only for IBSS mode and the result of this function is
1202 * used to determine whether to reply to Probe Requests. 1282 * used to determine whether to reply to Probe Requests.
1203 * 1283 *
1204 * @conf_ht: Configures low level driver with 802.11n HT data. Must be atomic.
1205 *
1206 * @ampdu_action: Perform a certain A-MPDU action 1284 * @ampdu_action: Perform a certain A-MPDU action
1207 * The RA/TID combination determines the destination and TID we want 1285 * The RA/TID combination determines the destination and TID we want
1208 * the ampdu action to be performed for. The action is defined through 1286 * the ampdu action to be performed for. The action is defined through
@@ -1218,7 +1296,7 @@ struct ieee80211_ops {
1218 struct ieee80211_if_init_conf *conf); 1296 struct ieee80211_if_init_conf *conf);
1219 void (*remove_interface)(struct ieee80211_hw *hw, 1297 void (*remove_interface)(struct ieee80211_hw *hw,
1220 struct ieee80211_if_init_conf *conf); 1298 struct ieee80211_if_init_conf *conf);
1221 int (*config)(struct ieee80211_hw *hw, struct ieee80211_conf *conf); 1299 int (*config)(struct ieee80211_hw *hw, u32 changed);
1222 int (*config_interface)(struct ieee80211_hw *hw, 1300 int (*config_interface)(struct ieee80211_hw *hw,
1223 struct ieee80211_vif *vif, 1301 struct ieee80211_vif *vif,
1224 struct ieee80211_if_conf *conf); 1302 struct ieee80211_if_conf *conf);
@@ -1244,9 +1322,6 @@ struct ieee80211_ops {
1244 void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx, 1322 void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx,
1245 u32 *iv32, u16 *iv16); 1323 u32 *iv32, u16 *iv16);
1246 int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); 1324 int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value);
1247 int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
1248 int (*set_retry_limit)(struct ieee80211_hw *hw,
1249 u32 short_retry, u32 long_retr);
1250 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1325 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1251 enum sta_notify_cmd, struct ieee80211_sta *sta); 1326 enum sta_notify_cmd, struct ieee80211_sta *sta);
1252 int (*conf_tx)(struct ieee80211_hw *hw, u16 queue, 1327 int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
@@ -1473,14 +1548,13 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
1473 * ieee80211_beacon_get - beacon generation function 1548 * ieee80211_beacon_get - beacon generation function
1474 * @hw: pointer obtained from ieee80211_alloc_hw(). 1549 * @hw: pointer obtained from ieee80211_alloc_hw().
1475 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1550 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1476 * @control: will be filled with information needed to send this beacon.
1477 * 1551 *
1478 * If the beacon frames are generated by the host system (i.e., not in 1552 * If the beacon frames are generated by the host system (i.e., not in
1479 * hardware/firmware), the low-level driver uses this function to receive 1553 * hardware/firmware), the low-level driver uses this function to receive
1480 * the next beacon frame from the 802.11 code. The low-level is responsible 1554 * the next beacon frame from the 802.11 code. The low-level is responsible
1481 * for calling this function before beacon data is needed (e.g., based on 1555 * for calling this function before beacon data is needed (e.g., based on
1482 * hardware interrupt). Returned skb is used only once and low-level driver 1556 * hardware interrupt). Returned skb is used only once and low-level driver
1483 * is responsible of freeing it. 1557 * is responsible for freeing it.
1484 */ 1558 */
1485struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, 1559struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1486 struct ieee80211_vif *vif); 1560 struct ieee80211_vif *vif);
@@ -1574,7 +1648,6 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
1574 * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames 1648 * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames
1575 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1649 * @hw: pointer as obtained from ieee80211_alloc_hw().
1576 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1650 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1577 * @control: will be filled with information needed to send returned frame.
1578 * 1651 *
1579 * Function for accessing buffered broadcast and multicast frames. If 1652 * Function for accessing buffered broadcast and multicast frames. If
1580 * hardware/firmware does not implement buffering of broadcast/multicast 1653 * hardware/firmware does not implement buffering of broadcast/multicast
@@ -1622,9 +1695,8 @@ unsigned int ieee80211_hdrlen(__le16 fc);
1622 * 1695 *
1623 * @keyconf: the parameter passed with the set key 1696 * @keyconf: the parameter passed with the set key
1624 * @skb: the skb for which the key is needed 1697 * @skb: the skb for which the key is needed
1625 * @rc4key: a buffer to which the key will be written
1626 * @type: TBD 1698 * @type: TBD
1627 * @key: TBD 1699 * @key: a buffer to which the key will be written
1628 */ 1700 */
1629void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, 1701void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
1630 struct sk_buff *skb, 1702 struct sk_buff *skb,
@@ -1725,7 +1797,8 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
1725 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1797 * @hw: pointer as obtained from ieee80211_alloc_hw().
1726 * @ra: receiver address of the BA session recipient 1798 * @ra: receiver address of the BA session recipient
1727 * @tid: the TID to BA on. 1799 * @tid: the TID to BA on.
1728 * @return: success if addBA request was sent, failure otherwise 1800 *
1801 * Return: success if addBA request was sent, failure otherwise
1729 * 1802 *
1730 * Although mac80211/low level driver/user space application can estimate 1803 * Although mac80211/low level driver/user space application can estimate
1731 * the need to start aggregation on a certain RA/TID, the session level 1804 * the need to start aggregation on a certain RA/TID, the session level
@@ -1763,7 +1836,8 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
1763 * @ra: receiver address of the BA session recipient 1836 * @ra: receiver address of the BA session recipient
1764 * @tid: the TID to stop BA. 1837 * @tid: the TID to stop BA.
1765 * @initiator: if indicates initiator DELBA frame will be sent. 1838 * @initiator: if indicates initiator DELBA frame will be sent.
1766 * @return: error if no sta with matching da found, success otherwise 1839 *
1840 * Return: error if no sta with matching da found, success otherwise
1767 * 1841 *
1768 * Although mac80211/low level driver/user space application can estimate 1842 * Although mac80211/low level driver/user space application can estimate
1769 * the need to stop aggregation on a certain RA/TID, the session level 1843 * the need to stop aggregation on a certain RA/TID, the session level
@@ -1798,18 +1872,6 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
1798 u16 tid); 1872 u16 tid);
1799 1873
1800/** 1874/**
1801 * ieee80211_notify_mac - low level driver notification
1802 * @hw: pointer as obtained from ieee80211_alloc_hw().
1803 * @notif_type: enum ieee80211_notification_types
1804 *
1805 * This function must be called by low level driver to inform mac80211 of
1806 * low level driver status change or force mac80211 to re-assoc for low
1807 * level driver internal error that require re-assoc.
1808 */
1809void ieee80211_notify_mac(struct ieee80211_hw *hw,
1810 enum ieee80211_notification_types notif_type);
1811
1812/**
1813 * ieee80211_find_sta - find a station 1875 * ieee80211_find_sta - find a station
1814 * 1876 *
1815 * @hw: pointer as obtained from ieee80211_alloc_hw() 1877 * @hw: pointer as obtained from ieee80211_alloc_hw()
@@ -1823,24 +1885,38 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw,
1823 1885
1824 1886
1825/* Rate control API */ 1887/* Rate control API */
1888
1826/** 1889/**
1827 * struct rate_selection - rate information for/from rate control algorithms 1890 * struct ieee80211_tx_rate_control - rate control information for/from RC algo
1828 * 1891 *
1829 * @rate_idx: selected transmission rate index 1892 * @hw: The hardware the algorithm is invoked for.
1830 * @nonerp_idx: Non-ERP rate to use instead if ERP cannot be used 1893 * @sband: The band this frame is being transmitted on.
1831 * @probe_idx: rate for probing (or -1) 1894 * @bss_conf: the current BSS configuration
1832 * @max_rate_idx: maximum rate index that can be used, this is 1895 * @reported_rate: The rate control algorithm can fill this in to indicate
1833 * input to the algorithm and will be enforced 1896 * which rate should be reported to userspace as the current rate and
1834 */ 1897 * used for rate calculations in the mesh network.
1835struct rate_selection { 1898 * @rts: whether RTS will be used for this frame because it is longer than the
1836 s8 rate_idx, nonerp_idx, probe_idx, max_rate_idx; 1899 * RTS threshold
1900 * @short_preamble: whether mac80211 will request short-preamble transmission
1901 * if the selected rate supports it
1902 * @max_rate_idx: user-requested maximum rate (not MCS for now)
1903 * @skb: the skb that will be transmitted, the control information in it needs
1904 * to be filled in
1905 */
1906struct ieee80211_tx_rate_control {
1907 struct ieee80211_hw *hw;
1908 struct ieee80211_supported_band *sband;
1909 struct ieee80211_bss_conf *bss_conf;
1910 struct sk_buff *skb;
1911 struct ieee80211_tx_rate reported_rate;
1912 bool rts, short_preamble;
1913 u8 max_rate_idx;
1837}; 1914};
1838 1915
1839struct rate_control_ops { 1916struct rate_control_ops {
1840 struct module *module; 1917 struct module *module;
1841 const char *name; 1918 const char *name;
1842 void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir); 1919 void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir);
1843 void (*clear)(void *priv);
1844 void (*free)(void *priv); 1920 void (*free)(void *priv);
1845 1921
1846 void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp); 1922 void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
@@ -1852,10 +1928,8 @@ struct rate_control_ops {
1852 void (*tx_status)(void *priv, struct ieee80211_supported_band *sband, 1928 void (*tx_status)(void *priv, struct ieee80211_supported_band *sband,
1853 struct ieee80211_sta *sta, void *priv_sta, 1929 struct ieee80211_sta *sta, void *priv_sta,
1854 struct sk_buff *skb); 1930 struct sk_buff *skb);
1855 void (*get_rate)(void *priv, struct ieee80211_supported_band *sband, 1931 void (*get_rate)(void *priv, struct ieee80211_sta *sta, void *priv_sta,
1856 struct ieee80211_sta *sta, void *priv_sta, 1932 struct ieee80211_tx_rate_control *txrc);
1857 struct sk_buff *skb,
1858 struct rate_selection *sel);
1859 1933
1860 void (*add_sta_debugfs)(void *priv, void *priv_sta, 1934 void (*add_sta_debugfs)(void *priv, void *priv_sta,
1861 struct dentry *dir); 1935 struct dentry *dir);
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index a01b7c4dc763..ce532f2222ce 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -108,6 +108,20 @@ extern void ndisc_send_redirect(struct sk_buff *skb,
108 108
109extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); 109extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir);
110 110
111extern struct sk_buff *ndisc_build_skb(struct net_device *dev,
112 const struct in6_addr *daddr,
113 const struct in6_addr *saddr,
114 struct icmp6hdr *icmp6h,
115 const struct in6_addr *target,
116 int llinfo);
117
118extern void ndisc_send_skb(struct sk_buff *skb,
119 struct net_device *dev,
120 struct neighbour *neigh,
121 const struct in6_addr *daddr,
122 const struct in6_addr *saddr,
123 struct icmp6hdr *icmp6h);
124
111 125
112 126
113/* 127/*
@@ -129,9 +143,8 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl,
129 void __user *buffer, 143 void __user *buffer,
130 size_t *lenp, 144 size_t *lenp,
131 loff_t *ppos); 145 loff_t *ppos);
132int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, 146int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl,
133 int nlen, void __user *oldval, 147 void __user *oldval, size_t __user *oldlenp,
134 size_t __user *oldlenp,
135 void __user *newval, size_t newlen); 148 void __user *newval, size_t newlen);
136#endif 149#endif
137 150
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index aa4b708654a4..d8d790e56d3d 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -180,9 +180,6 @@ struct neigh_table
180 __u32 hash_rnd; 180 __u32 hash_rnd;
181 unsigned int hash_chain_gc; 181 unsigned int hash_chain_gc;
182 struct pneigh_entry **phash_buckets; 182 struct pneigh_entry **phash_buckets;
183#ifdef CONFIG_PROC_FS
184 struct proc_dir_entry *pde;
185#endif
186}; 183};
187 184
188/* flags for neigh_update() */ 185/* flags for neigh_update() */
@@ -223,11 +220,7 @@ extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *p
223static inline 220static inline
224struct net *neigh_parms_net(const struct neigh_parms *parms) 221struct net *neigh_parms_net(const struct neigh_parms *parms)
225{ 222{
226#ifdef CONFIG_NET_NS 223 return read_pnet(&parms->net);
227 return parms->net;
228#else
229 return &init_net;
230#endif
231} 224}
232 225
233extern unsigned long neigh_rand_reach_time(unsigned long base); 226extern unsigned long neigh_rand_reach_time(unsigned long base);
@@ -244,11 +237,7 @@ extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void
244static inline 237static inline
245struct net *pneigh_net(const struct pneigh_entry *pneigh) 238struct net *pneigh_net(const struct pneigh_entry *pneigh)
246{ 239{
247#ifdef CONFIG_NET_NS 240 return read_pnet(&pneigh->net);
248 return pneigh->net;
249#else
250 return &init_net;
251#endif
252} 241}
253 242
254extern void neigh_app_ns(struct neighbour *n); 243extern void neigh_app_ns(struct neighbour *n);
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 708009be88b6..6fc13d905c5f 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -19,6 +19,7 @@
19#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 19#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
20#include <net/netns/conntrack.h> 20#include <net/netns/conntrack.h>
21#endif 21#endif
22#include <net/netns/xfrm.h>
22 23
23struct proc_dir_entry; 24struct proc_dir_entry;
24struct net_device; 25struct net_device;
@@ -74,6 +75,9 @@ struct net {
74 struct netns_ct ct; 75 struct netns_ct ct;
75#endif 76#endif
76#endif 77#endif
78#ifdef CONFIG_XFRM
79 struct netns_xfrm xfrm;
80#endif
77 struct net_generic *gen; 81 struct net_generic *gen;
78}; 82};
79 83
@@ -192,6 +196,24 @@ static inline void release_net(struct net *net)
192} 196}
193#endif 197#endif
194 198
199#ifdef CONFIG_NET_NS
200
201static inline void write_pnet(struct net **pnet, struct net *net)
202{
203 *pnet = net;
204}
205
206static inline struct net *read_pnet(struct net * const *pnet)
207{
208 return *pnet;
209}
210
211#else
212
213#define write_pnet(pnet, net) do { (void)(net);} while (0)
214#define read_pnet(pnet) (&init_net)
215
216#endif
195 217
196#define for_each_net(VAR) \ 218#define for_each_net(VAR) \
197 list_for_each_entry(VAR, &net_namespace_list, list) 219 list_for_each_entry(VAR, &net_namespace_list, list)
@@ -214,6 +236,8 @@ struct pernet_operations {
214 236
215extern int register_pernet_subsys(struct pernet_operations *); 237extern int register_pernet_subsys(struct pernet_operations *);
216extern void unregister_pernet_subsys(struct pernet_operations *); 238extern void unregister_pernet_subsys(struct pernet_operations *);
239extern int register_pernet_gen_subsys(int *id, struct pernet_operations *);
240extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *);
217extern int register_pernet_device(struct pernet_operations *); 241extern int register_pernet_device(struct pernet_operations *);
218extern void unregister_pernet_device(struct pernet_operations *); 242extern void unregister_pernet_device(struct pernet_operations *);
219extern int register_pernet_gen_device(int *id, struct pernet_operations *); 243extern int register_pernet_gen_device(int *id, struct pernet_operations *);
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index b76a8685b5b5..2e0c53641cbe 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -199,7 +199,7 @@ __nf_conntrack_find(struct net *net, const struct nf_conntrack_tuple *tuple);
199 199
200extern void nf_conntrack_hash_insert(struct nf_conn *ct); 200extern void nf_conntrack_hash_insert(struct nf_conn *ct);
201 201
202extern void nf_conntrack_flush(struct net *net); 202extern void nf_conntrack_flush(struct net *net, u32 pid, int report);
203 203
204extern bool nf_ct_get_tuplepr(const struct sk_buff *skb, 204extern bool nf_ct_get_tuplepr(const struct sk_buff *skb,
205 unsigned int nhoff, u_int16_t l3num, 205 unsigned int nhoff, u_int16_t l3num,
@@ -298,5 +298,8 @@ do { \
298 local_bh_enable(); \ 298 local_bh_enable(); \
299} while (0) 299} while (0)
300 300
301#define MODULE_ALIAS_NFCT_HELPER(helper) \
302 MODULE_ALIAS("nfct-helper-" helper)
303
301#endif /* __KERNEL__ */ 304#endif /* __KERNEL__ */
302#endif /* _NF_CONNTRACK_H */ 305#endif /* _NF_CONNTRACK_H */
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h
index 1285ff26a014..0ff0dc69ca4a 100644
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -17,6 +17,13 @@ struct nf_conntrack_ecache {
17 unsigned int events; 17 unsigned int events;
18}; 18};
19 19
20/* This structure is passed to event handler */
21struct nf_ct_event {
22 struct nf_conn *ct;
23 u32 pid;
24 int report;
25};
26
20extern struct atomic_notifier_head nf_conntrack_chain; 27extern struct atomic_notifier_head nf_conntrack_chain;
21extern int nf_conntrack_register_notifier(struct notifier_block *nb); 28extern int nf_conntrack_register_notifier(struct notifier_block *nb);
22extern int nf_conntrack_unregister_notifier(struct notifier_block *nb); 29extern int nf_conntrack_unregister_notifier(struct notifier_block *nb);
@@ -39,22 +46,56 @@ nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct)
39 local_bh_enable(); 46 local_bh_enable();
40} 47}
41 48
42static inline void nf_conntrack_event(enum ip_conntrack_events event, 49static inline void
43 struct nf_conn *ct) 50nf_conntrack_event_report(enum ip_conntrack_events event,
51 struct nf_conn *ct,
52 u32 pid,
53 int report)
44{ 54{
55 struct nf_ct_event item = {
56 .ct = ct,
57 .pid = pid,
58 .report = report
59 };
45 if (nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) 60 if (nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))
46 atomic_notifier_call_chain(&nf_conntrack_chain, event, ct); 61 atomic_notifier_call_chain(&nf_conntrack_chain, event, &item);
47} 62}
48 63
64static inline void
65nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct)
66{
67 nf_conntrack_event_report(event, ct, 0, 0);
68}
69
70struct nf_exp_event {
71 struct nf_conntrack_expect *exp;
72 u32 pid;
73 int report;
74};
75
49extern struct atomic_notifier_head nf_ct_expect_chain; 76extern struct atomic_notifier_head nf_ct_expect_chain;
50extern int nf_ct_expect_register_notifier(struct notifier_block *nb); 77extern int nf_ct_expect_register_notifier(struct notifier_block *nb);
51extern int nf_ct_expect_unregister_notifier(struct notifier_block *nb); 78extern int nf_ct_expect_unregister_notifier(struct notifier_block *nb);
52 79
53static inline void 80static inline void
81nf_ct_expect_event_report(enum ip_conntrack_expect_events event,
82 struct nf_conntrack_expect *exp,
83 u32 pid,
84 int report)
85{
86 struct nf_exp_event item = {
87 .exp = exp,
88 .pid = pid,
89 .report = report
90 };
91 atomic_notifier_call_chain(&nf_ct_expect_chain, event, &item);
92}
93
94static inline void
54nf_ct_expect_event(enum ip_conntrack_expect_events event, 95nf_ct_expect_event(enum ip_conntrack_expect_events event,
55 struct nf_conntrack_expect *exp) 96 struct nf_conntrack_expect *exp)
56{ 97{
57 atomic_notifier_call_chain(&nf_ct_expect_chain, event, exp); 98 nf_ct_expect_event_report(event, exp, 0, 0);
58} 99}
59 100
60extern int nf_conntrack_ecache_init(struct net *net); 101extern int nf_conntrack_ecache_init(struct net *net);
@@ -66,9 +107,17 @@ static inline void nf_conntrack_event_cache(enum ip_conntrack_events event,
66 struct nf_conn *ct) {} 107 struct nf_conn *ct) {}
67static inline void nf_conntrack_event(enum ip_conntrack_events event, 108static inline void nf_conntrack_event(enum ip_conntrack_events event,
68 struct nf_conn *ct) {} 109 struct nf_conn *ct) {}
110static inline void nf_conntrack_event_report(enum ip_conntrack_events event,
111 struct nf_conn *ct,
112 u32 pid,
113 int report) {}
69static inline void nf_ct_deliver_cached_events(const struct nf_conn *ct) {} 114static inline void nf_ct_deliver_cached_events(const struct nf_conn *ct) {}
70static inline void nf_ct_expect_event(enum ip_conntrack_expect_events event, 115static inline void nf_ct_expect_event(enum ip_conntrack_expect_events event,
71 struct nf_conntrack_expect *exp) {} 116 struct nf_conntrack_expect *exp) {}
117static inline void nf_ct_expect_event_report(enum ip_conntrack_expect_events e,
118 struct nf_conntrack_expect *exp,
119 u32 pid,
120 int report) {}
72static inline void nf_ct_event_cache_flush(struct net *net) {} 121static inline void nf_ct_event_cache_flush(struct net *net) {}
73 122
74static inline int nf_conntrack_ecache_init(struct net *net) 123static inline int nf_conntrack_ecache_init(struct net *net)
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index 37a7fc1164b0..ab17a159ac66 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -100,6 +100,8 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
100 u_int8_t, const __be16 *, const __be16 *); 100 u_int8_t, const __be16 *, const __be16 *);
101void nf_ct_expect_put(struct nf_conntrack_expect *exp); 101void nf_ct_expect_put(struct nf_conntrack_expect *exp);
102int nf_ct_expect_related(struct nf_conntrack_expect *expect); 102int nf_ct_expect_related(struct nf_conntrack_expect *expect);
103int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
104 u32 pid, int report);
103 105
104#endif /*_NF_CONNTRACK_EXPECT_H*/ 106#endif /*_NF_CONNTRACK_EXPECT_H*/
105 107
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
index f8060ab5a083..66d65a7caa39 100644
--- a/include/net/netfilter/nf_conntrack_helper.h
+++ b/include/net/netfilter/nf_conntrack_helper.h
@@ -39,9 +39,6 @@ struct nf_conntrack_helper
39}; 39};
40 40
41extern struct nf_conntrack_helper * 41extern struct nf_conntrack_helper *
42__nf_ct_helper_find(const struct nf_conntrack_tuple *tuple);
43
44extern struct nf_conntrack_helper *
45__nf_conntrack_helper_find_byname(const char *name); 42__nf_conntrack_helper_find_byname(const char *name);
46 43
47extern int nf_conntrack_helper_register(struct nf_conntrack_helper *); 44extern int nf_conntrack_helper_register(struct nf_conntrack_helper *);
@@ -49,6 +46,8 @@ extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *);
49 46
50extern struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp); 47extern struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp);
51 48
49extern int __nf_ct_try_assign_helper(struct nf_conn *ct, gfp_t flags);
50
52static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct) 51static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct)
53{ 52{
54 return nf_ct_ext_find(ct, NF_CT_EXT_HELPER); 53 return nf_ct_ext_find(ct, NF_CT_EXT_HELPER);
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index 7f2f43c77284..debdaf75cecf 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -129,7 +129,7 @@ extern const struct nla_policy nf_ct_port_nla_policy[];
129 && net_ratelimit()) 129 && net_ratelimit())
130#endif 130#endif
131#else 131#else
132#define LOG_INVALID(net, proto) 0 132static inline int LOG_INVALID(struct net *net, int proto) { return 0; }
133#endif /* CONFIG_SYSCTL */ 133#endif /* CONFIG_SYSCTL */
134 134
135#endif /*_NF_CONNTRACK_PROTOCOL_H*/ 135#endif /*_NF_CONNTRACK_PROTOCOL_H*/
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index a6874ba22d54..f2f6aa73dc10 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -112,20 +112,20 @@ struct nf_conntrack_tuple_mask
112static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t) 112static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t)
113{ 113{
114#ifdef DEBUG 114#ifdef DEBUG
115 printk("tuple %p: %u " NIPQUAD_FMT ":%hu -> " NIPQUAD_FMT ":%hu\n", 115 printk("tuple %p: %u %pI4:%hu -> %pI4:%hu\n",
116 t, t->dst.protonum, 116 t, t->dst.protonum,
117 NIPQUAD(t->src.u3.ip), ntohs(t->src.u.all), 117 &t->src.u3.ip, ntohs(t->src.u.all),
118 NIPQUAD(t->dst.u3.ip), ntohs(t->dst.u.all)); 118 &t->dst.u3.ip, ntohs(t->dst.u.all));
119#endif 119#endif
120} 120}
121 121
122static inline void nf_ct_dump_tuple_ipv6(const struct nf_conntrack_tuple *t) 122static inline void nf_ct_dump_tuple_ipv6(const struct nf_conntrack_tuple *t)
123{ 123{
124#ifdef DEBUG 124#ifdef DEBUG
125 printk("tuple %p: %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n", 125 printk("tuple %p: %u %pI6 %hu -> %pI6 %hu\n",
126 t, t->dst.protonum, 126 t, t->dst.protonum,
127 NIP6(*(struct in6_addr *)t->src.u3.all), ntohs(t->src.u.all), 127 t->src.u3.all, ntohs(t->src.u.all),
128 NIP6(*(struct in6_addr *)t->dst.u3.all), ntohs(t->dst.u.all)); 128 t->dst.u3.all, ntohs(t->dst.u.all));
129#endif 129#endif
130} 130}
131 131
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h
index f29eeb9777e0..58684066388c 100644
--- a/include/net/netfilter/nf_nat_core.h
+++ b/include/net/netfilter/nf_nat_core.h
@@ -25,4 +25,12 @@ static inline int nf_nat_initialized(struct nf_conn *ct,
25 else 25 else
26 return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status); 26 return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status);
27} 27}
28
29struct nlattr;
30
31extern int
32(*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct,
33 enum nf_nat_manip_type manip,
34 struct nlattr *attr);
35
28#endif /* _NF_NAT_CORE_H */ 36#endif /* _NF_NAT_CORE_H */
diff --git a/include/net/netfilter/nfnetlink_log.h b/include/net/netfilter/nfnetlink_log.h
new file mode 100644
index 000000000000..b0569ff0775e
--- /dev/null
+++ b/include/net/netfilter/nfnetlink_log.h
@@ -0,0 +1,14 @@
1#ifndef _KER_NFNETLINK_LOG_H
2#define _KER_NFNETLINK_LOG_H
3
4void
5nfulnl_log_packet(u_int8_t pf,
6 unsigned int hooknum,
7 const struct sk_buff *skb,
8 const struct net_device *in,
9 const struct net_device *out,
10 const struct nf_loginfo *li_user,
11 const char *prefix);
12
13#endif /* _KER_NFNETLINK_LOG_H */
14
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 3643bbb8e585..8a6150a3f4c7 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -233,7 +233,7 @@ extern int nla_parse(struct nlattr *tb[], int maxtype,
233extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); 233extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype);
234extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, 234extern size_t nla_strlcpy(char *dst, const struct nlattr *nla,
235 size_t dstsize); 235 size_t dstsize);
236extern int nla_memcpy(void *dest, struct nlattr *src, int count); 236extern int nla_memcpy(void *dest, const struct nlattr *src, int count);
237extern int nla_memcmp(const struct nlattr *nla, const void *data, 237extern int nla_memcmp(const struct nlattr *nla, const void *data,
238 size_t size); 238 size_t size);
239extern int nla_strcmp(const struct nlattr *nla, const char *str); 239extern int nla_strcmp(const struct nlattr *nla, const char *str);
@@ -332,7 +332,7 @@ static inline int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen)
332 */ 332 */
333static inline int nlmsg_ok(const struct nlmsghdr *nlh, int remaining) 333static inline int nlmsg_ok(const struct nlmsghdr *nlh, int remaining)
334{ 334{
335 return (remaining >= sizeof(struct nlmsghdr) && 335 return (remaining >= (int) sizeof(struct nlmsghdr) &&
336 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && 336 nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
337 nlh->nlmsg_len <= remaining); 337 nlh->nlmsg_len <= remaining);
338} 338}
@@ -741,7 +741,7 @@ static inline struct nlattr *nla_find_nested(struct nlattr *nla, int attrtype)
741 * See nla_parse() 741 * See nla_parse()
742 */ 742 */
743static inline int nla_parse_nested(struct nlattr *tb[], int maxtype, 743static inline int nla_parse_nested(struct nlattr *tb[], int maxtype,
744 struct nlattr *nla, 744 const struct nlattr *nla,
745 const struct nla_policy *policy) 745 const struct nla_policy *policy)
746{ 746{
747 return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy); 747 return nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy);
@@ -875,7 +875,7 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
875 * nla_get_u32 - return payload of u32 attribute 875 * nla_get_u32 - return payload of u32 attribute
876 * @nla: u32 netlink attribute 876 * @nla: u32 netlink attribute
877 */ 877 */
878static inline u32 nla_get_u32(struct nlattr *nla) 878static inline u32 nla_get_u32(const struct nlattr *nla)
879{ 879{
880 return *(u32 *) nla_data(nla); 880 return *(u32 *) nla_data(nla);
881} 881}
@@ -884,7 +884,7 @@ static inline u32 nla_get_u32(struct nlattr *nla)
884 * nla_get_be32 - return payload of __be32 attribute 884 * nla_get_be32 - return payload of __be32 attribute
885 * @nla: __be32 netlink attribute 885 * @nla: __be32 netlink attribute
886 */ 886 */
887static inline __be32 nla_get_be32(struct nlattr *nla) 887static inline __be32 nla_get_be32(const struct nlattr *nla)
888{ 888{
889 return *(__be32 *) nla_data(nla); 889 return *(__be32 *) nla_data(nla);
890} 890}
@@ -893,7 +893,7 @@ static inline __be32 nla_get_be32(struct nlattr *nla)
893 * nla_get_u16 - return payload of u16 attribute 893 * nla_get_u16 - return payload of u16 attribute
894 * @nla: u16 netlink attribute 894 * @nla: u16 netlink attribute
895 */ 895 */
896static inline u16 nla_get_u16(struct nlattr *nla) 896static inline u16 nla_get_u16(const struct nlattr *nla)
897{ 897{
898 return *(u16 *) nla_data(nla); 898 return *(u16 *) nla_data(nla);
899} 899}
@@ -902,7 +902,7 @@ static inline u16 nla_get_u16(struct nlattr *nla)
902 * nla_get_be16 - return payload of __be16 attribute 902 * nla_get_be16 - return payload of __be16 attribute
903 * @nla: __be16 netlink attribute 903 * @nla: __be16 netlink attribute
904 */ 904 */
905static inline __be16 nla_get_be16(struct nlattr *nla) 905static inline __be16 nla_get_be16(const struct nlattr *nla)
906{ 906{
907 return *(__be16 *) nla_data(nla); 907 return *(__be16 *) nla_data(nla);
908} 908}
@@ -911,7 +911,7 @@ static inline __be16 nla_get_be16(struct nlattr *nla)
911 * nla_get_le16 - return payload of __le16 attribute 911 * nla_get_le16 - return payload of __le16 attribute
912 * @nla: __le16 netlink attribute 912 * @nla: __le16 netlink attribute
913 */ 913 */
914static inline __le16 nla_get_le16(struct nlattr *nla) 914static inline __le16 nla_get_le16(const struct nlattr *nla)
915{ 915{
916 return *(__le16 *) nla_data(nla); 916 return *(__le16 *) nla_data(nla);
917} 917}
@@ -920,7 +920,7 @@ static inline __le16 nla_get_le16(struct nlattr *nla)
920 * nla_get_u8 - return payload of u8 attribute 920 * nla_get_u8 - return payload of u8 attribute
921 * @nla: u8 netlink attribute 921 * @nla: u8 netlink attribute
922 */ 922 */
923static inline u8 nla_get_u8(struct nlattr *nla) 923static inline u8 nla_get_u8(const struct nlattr *nla)
924{ 924{
925 return *(u8 *) nla_data(nla); 925 return *(u8 *) nla_data(nla);
926} 926}
@@ -929,7 +929,7 @@ static inline u8 nla_get_u8(struct nlattr *nla)
929 * nla_get_u64 - return payload of u64 attribute 929 * nla_get_u64 - return payload of u64 attribute
930 * @nla: u64 netlink attribute 930 * @nla: u64 netlink attribute
931 */ 931 */
932static inline u64 nla_get_u64(struct nlattr *nla) 932static inline u64 nla_get_u64(const struct nlattr *nla)
933{ 933{
934 u64 tmp; 934 u64 tmp;
935 935
@@ -942,7 +942,7 @@ static inline u64 nla_get_u64(struct nlattr *nla)
942 * nla_get_flag - return payload of flag attribute 942 * nla_get_flag - return payload of flag attribute
943 * @nla: flag netlink attribute 943 * @nla: flag netlink attribute
944 */ 944 */
945static inline int nla_get_flag(struct nlattr *nla) 945static inline int nla_get_flag(const struct nlattr *nla)
946{ 946{
947 return !!nla; 947 return !!nla;
948} 948}
@@ -953,7 +953,7 @@ static inline int nla_get_flag(struct nlattr *nla)
953 * 953 *
954 * Returns the number of milliseconds in jiffies. 954 * Returns the number of milliseconds in jiffies.
955 */ 955 */
956static inline unsigned long nla_get_msecs(struct nlattr *nla) 956static inline unsigned long nla_get_msecs(const struct nlattr *nla)
957{ 957{
958 u64 msecs = nla_get_u64(nla); 958 u64 msecs = nla_get_u64(nla);
959 959
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index ece1c926b5d1..977f482d97a9 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -49,6 +49,8 @@ struct netns_ipv4 {
49 int sysctl_icmp_ratelimit; 49 int sysctl_icmp_ratelimit;
50 int sysctl_icmp_ratemask; 50 int sysctl_icmp_ratemask;
51 int sysctl_icmp_errors_use_inbound_ifaddr; 51 int sysctl_icmp_errors_use_inbound_ifaddr;
52 int sysctl_rt_cache_rebuild_count;
53 int current_rt_cache_rebuild_count;
52 54
53 struct timer_list rt_secret_timer; 55 struct timer_list rt_secret_timer;
54 atomic_t rt_genid; 56 atomic_t rt_genid;
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index 2932721180c0..afab4e4cbac7 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -55,5 +55,17 @@ struct netns_ipv6 {
55 struct sock *ndisc_sk; 55 struct sock *ndisc_sk;
56 struct sock *tcp_sk; 56 struct sock *tcp_sk;
57 struct sock *igmp_sk; 57 struct sock *igmp_sk;
58#ifdef CONFIG_IPV6_MROUTE
59 struct sock *mroute6_sk;
60 struct mfc6_cache **mfc6_cache_array;
61 struct mif_device *vif6_table;
62 int maxvif;
63 atomic_t cache_resolve_queue_len;
64 int mroute_do_assert;
65 int mroute_do_pim;
66#ifdef CONFIG_IPV6_PIMSM_V2
67 int mroute_reg_vif_num;
68#endif
69#endif
58}; 70};
59#endif 71#endif
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h
index 10cb7c336de5..0b44112e2366 100644
--- a/include/net/netns/mib.h
+++ b/include/net/netns/mib.h
@@ -20,6 +20,9 @@ struct netns_mib {
20 DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); 20 DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
21 DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); 21 DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics);
22#endif 22#endif
23#ifdef CONFIG_XFRM_STATISTICS
24 DEFINE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics);
25#endif
23}; 26};
24 27
25#endif 28#endif
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h
index 0cb63ed2c1fc..9554a644a8f8 100644
--- a/include/net/netns/x_tables.h
+++ b/include/net/netns/x_tables.h
@@ -2,9 +2,14 @@
2#define __NETNS_X_TABLES_H 2#define __NETNS_X_TABLES_H
3 3
4#include <linux/list.h> 4#include <linux/list.h>
5#include <linux/net.h> 5#include <linux/netfilter.h>
6
7struct ebt_table;
6 8
7struct netns_xt { 9struct netns_xt {
8 struct list_head tables[NPROTO]; 10 struct list_head tables[NFPROTO_NUMPROTO];
11 struct ebt_table *broute_table;
12 struct ebt_table *frame_filter;
13 struct ebt_table *frame_nat;
9}; 14};
10#endif 15#endif
diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h
new file mode 100644
index 000000000000..1ba912749caa
--- /dev/null
+++ b/include/net/netns/xfrm.h
@@ -0,0 +1,56 @@
1#ifndef __NETNS_XFRM_H
2#define __NETNS_XFRM_H
3
4#include <linux/list.h>
5#include <linux/wait.h>
6#include <linux/workqueue.h>
7#include <linux/xfrm.h>
8
9struct ctl_table_header;
10
11struct xfrm_policy_hash {
12 struct hlist_head *table;
13 unsigned int hmask;
14};
15
16struct netns_xfrm {
17 struct list_head state_all;
18 /*
19 * Hash table to find appropriate SA towards given target (endpoint of
20 * tunnel or destination of transport mode) allowed by selector.
21 *
22 * Main use is finding SA after policy selected tunnel or transport
23 * mode. Also, it can be used by ah/esp icmp error handler to find
24 * offending SA.
25 */
26 struct hlist_head *state_bydst;
27 struct hlist_head *state_bysrc;
28 struct hlist_head *state_byspi;
29 unsigned int state_hmask;
30 unsigned int state_num;
31 struct work_struct state_hash_work;
32 struct hlist_head state_gc_list;
33 struct work_struct state_gc_work;
34
35 wait_queue_head_t km_waitq;
36
37 struct list_head policy_all;
38 struct hlist_head *policy_byidx;
39 unsigned int policy_idx_hmask;
40 struct hlist_head policy_inexact[XFRM_POLICY_MAX * 2];
41 struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX * 2];
42 unsigned int policy_count[XFRM_POLICY_MAX * 2];
43 struct work_struct policy_hash_work;
44
45 struct sock *nlsk;
46
47 u32 sysctl_aevent_etime;
48 u32 sysctl_aevent_rseqth;
49 int sysctl_larval_drop;
50 u32 sysctl_acq_expires;
51#ifdef CONFIG_SYSCTL
52 struct ctl_table_header *sysctl_hdr;
53#endif
54};
55
56#endif
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h
index fcd793030e4d..4c61cdce4e5f 100644
--- a/include/net/phonet/pep.h
+++ b/include/net/phonet/pep.h
@@ -35,12 +35,12 @@ struct pep_sock {
35 struct sock *listener; 35 struct sock *listener;
36 struct sk_buff_head ctrlreq_queue; 36 struct sk_buff_head ctrlreq_queue;
37#define PNPIPE_CTRLREQ_MAX 10 37#define PNPIPE_CTRLREQ_MAX 10
38 atomic_t tx_credits;
38 int ifindex; 39 int ifindex;
39 u16 peer_type; /* peer type/subtype */ 40 u16 peer_type; /* peer type/subtype */
40 u8 pipe_handle; 41 u8 pipe_handle;
41 42
42 u8 rx_credits; 43 u8 rx_credits;
43 u8 tx_credits;
44 u8 rx_fc; /* RX flow control */ 44 u8 rx_fc; /* RX flow control */
45 u8 tx_fc; /* TX flow control */ 45 u8 tx_fc; /* TX flow control */
46 u8 init_enable; /* auto-enable at creation */ 46 u8 init_enable; /* auto-enable at creation */
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h
index d4e72508e145..057b0a8a2885 100644
--- a/include/net/phonet/phonet.h
+++ b/include/net/phonet/phonet.h
@@ -27,7 +27,7 @@
27 * The lower layers may not require more space, ever. Make sure it's 27 * The lower layers may not require more space, ever. Make sure it's
28 * enough. 28 * enough.
29 */ 29 */
30#define MAX_PHONET_HEADER 8 30#define MAX_PHONET_HEADER (8 + MAX_HEADER)
31 31
32/* 32/*
33 * Every Phonet* socket has this structure first in its 33 * Every Phonet* socket has this structure first in its
@@ -46,7 +46,7 @@ static inline struct pn_sock *pn_sk(struct sock *sk)
46 46
47extern const struct proto_ops phonet_dgram_ops; 47extern const struct proto_ops phonet_dgram_ops;
48 48
49struct sock *pn_find_sock_by_sa(const struct sockaddr_pn *sa); 49struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa);
50void phonet_get_local_port_range(int *min, int *max); 50void phonet_get_local_port_range(int *min, int *max);
51void pn_sock_hash(struct sock *sk); 51void pn_sock_hash(struct sock *sk);
52void pn_sock_unhash(struct sock *sk); 52void pn_sock_unhash(struct sock *sk);
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h
index bbd2a836e04c..aa1c59a1d33f 100644
--- a/include/net/phonet/pn_dev.h
+++ b/include/net/phonet/pn_dev.h
@@ -43,7 +43,7 @@ struct net_device *phonet_device_get(struct net *net);
43int phonet_address_add(struct net_device *dev, u8 addr); 43int phonet_address_add(struct net_device *dev, u8 addr);
44int phonet_address_del(struct net_device *dev, u8 addr); 44int phonet_address_del(struct net_device *dev, u8 addr);
45u8 phonet_address_get(struct net_device *dev, u8 addr); 45u8 phonet_address_get(struct net_device *dev, u8 addr);
46int phonet_address_lookup(u8 addr); 46int phonet_address_lookup(struct net *net, u8 addr);
47 47
48#define PN_NO_ADDR 0xff 48#define PN_NO_ADDR 0xff
49 49
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index aa9e282db485..d1ca31444644 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -246,7 +246,7 @@ struct tcf_ematch_ops
246}; 246};
247 247
248extern int tcf_em_register(struct tcf_ematch_ops *); 248extern int tcf_em_register(struct tcf_ematch_ops *);
249extern int tcf_em_unregister(struct tcf_ematch_ops *); 249extern void tcf_em_unregister(struct tcf_ematch_ops *);
250extern int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *, 250extern int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *,
251 struct tcf_ematch_tree *); 251 struct tcf_ematch_tree *);
252extern void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *); 252extern void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *);
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 8d024d7cb741..cb2965aa1b62 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -39,6 +39,9 @@ struct net_protocol {
39 int (*gso_send_check)(struct sk_buff *skb); 39 int (*gso_send_check)(struct sk_buff *skb);
40 struct sk_buff *(*gso_segment)(struct sk_buff *skb, 40 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
41 int features); 41 int features);
42 struct sk_buff **(*gro_receive)(struct sk_buff **head,
43 struct sk_buff *skb);
44 int (*gro_complete)(struct sk_buff *skb);
42 unsigned int no_policy:1, 45 unsigned int no_policy:1,
43 netns_ok:1; 46 netns_ok:1;
44}; 47};
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index cac811e51f6d..c7190846e128 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -31,6 +31,7 @@ struct request_sock_ops {
31 int family; 31 int family;
32 int obj_size; 32 int obj_size;
33 struct kmem_cache *slab; 33 struct kmem_cache *slab;
34 char *slab_name;
34 int (*rtx_syn_ack)(struct sock *sk, 35 int (*rtx_syn_ack)(struct sock *sk,
35 struct request_sock *req); 36 struct request_sock *req);
36 void (*send_ack)(struct sock *sk, struct sk_buff *skb, 37 void (*send_ack)(struct sock *sk, struct sk_buff *skb,
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 3fe49d808957..f8c47429044a 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -53,7 +53,6 @@ struct Qdisc
53 atomic_t refcnt; 53 atomic_t refcnt;
54 unsigned long state; 54 unsigned long state;
55 struct sk_buff *gso_skb; 55 struct sk_buff *gso_skb;
56 struct sk_buff_head requeue;
57 struct sk_buff_head q; 56 struct sk_buff_head q;
58 struct netdev_queue *dev_queue; 57 struct netdev_queue *dev_queue;
59 struct Qdisc *next_sched; 58 struct Qdisc *next_sched;
@@ -111,7 +110,7 @@ struct Qdisc_ops
111 110
112 int (*enqueue)(struct sk_buff *, struct Qdisc *); 111 int (*enqueue)(struct sk_buff *, struct Qdisc *);
113 struct sk_buff * (*dequeue)(struct Qdisc *); 112 struct sk_buff * (*dequeue)(struct Qdisc *);
114 int (*requeue)(struct sk_buff *, struct Qdisc *); 113 struct sk_buff * (*peek)(struct Qdisc *);
115 unsigned int (*drop)(struct Qdisc *); 114 unsigned int (*drop)(struct Qdisc *);
116 115
117 int (*init)(struct Qdisc *, struct nlattr *arg); 116 int (*init)(struct Qdisc *, struct nlattr *arg);
@@ -432,19 +431,38 @@ static inline struct sk_buff *qdisc_dequeue_tail(struct Qdisc *sch)
432 return __qdisc_dequeue_tail(sch, &sch->q); 431 return __qdisc_dequeue_tail(sch, &sch->q);
433} 432}
434 433
435static inline int __qdisc_requeue(struct sk_buff *skb, struct Qdisc *sch, 434static inline struct sk_buff *qdisc_peek_head(struct Qdisc *sch)
436 struct sk_buff_head *list)
437{ 435{
438 __skb_queue_head(list, skb); 436 return skb_peek(&sch->q);
439 sch->qstats.backlog += qdisc_pkt_len(skb); 437}
440 sch->qstats.requeues++;
441 438
442 return NET_XMIT_SUCCESS; 439/* generic pseudo peek method for non-work-conserving qdisc */
440static inline struct sk_buff *qdisc_peek_dequeued(struct Qdisc *sch)
441{
442 /* we can reuse ->gso_skb because peek isn't called for root qdiscs */
443 if (!sch->gso_skb) {
444 sch->gso_skb = sch->dequeue(sch);
445 if (sch->gso_skb)
446 /* it's still part of the queue */
447 sch->q.qlen++;
448 }
449
450 return sch->gso_skb;
443} 451}
444 452
445static inline int qdisc_requeue(struct sk_buff *skb, struct Qdisc *sch) 453/* use instead of qdisc->dequeue() for all qdiscs queried with ->peek() */
454static inline struct sk_buff *qdisc_dequeue_peeked(struct Qdisc *sch)
446{ 455{
447 return __qdisc_requeue(skb, sch, &sch->q); 456 struct sk_buff *skb = sch->gso_skb;
457
458 if (skb) {
459 sch->gso_skb = NULL;
460 sch->q.qlen--;
461 } else {
462 skb = sch->dequeue(sch);
463 }
464
465 return skb;
448} 466}
449 467
450static inline void __qdisc_reset_queue(struct Qdisc *sch, 468static inline void __qdisc_reset_queue(struct Qdisc *sch,
diff --git a/include/net/scm.h b/include/net/scm.h
index 06df126103ca..f45bb6eca7d4 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -14,8 +14,9 @@
14 14
15struct scm_fp_list 15struct scm_fp_list
16{ 16{
17 int count; 17 struct list_head list;
18 struct file *fp[SCM_MAX_FD]; 18 int count;
19 struct file *fp[SCM_MAX_FD];
19}; 20};
20 21
21struct scm_cookie 22struct scm_cookie
@@ -54,8 +55,8 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
54 struct scm_cookie *scm) 55 struct scm_cookie *scm)
55{ 56{
56 struct task_struct *p = current; 57 struct task_struct *p = current;
57 scm->creds.uid = p->uid; 58 scm->creds.uid = current_uid();
58 scm->creds.gid = p->gid; 59 scm->creds.gid = current_gid();
59 scm->creds.pid = task_tgid_vnr(p); 60 scm->creds.pid = task_tgid_vnr(p);
60 scm->fp = NULL; 61 scm->fp = NULL;
61 scm->seq = 0; 62 scm->seq = 0;
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 703305d00365..bbb7742195b0 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -138,6 +138,7 @@ void sctp_write_space(struct sock *sk);
138unsigned int sctp_poll(struct file *file, struct socket *sock, 138unsigned int sctp_poll(struct file *file, struct socket *sock,
139 poll_table *wait); 139 poll_table *wait);
140void sctp_sock_rfree(struct sk_buff *skb); 140void sctp_sock_rfree(struct sk_buff *skb);
141extern struct percpu_counter sctp_sockets_allocated;
141 142
142/* 143/*
143 * sctp/primitive.c 144 * sctp/primitive.c
@@ -285,15 +286,15 @@ extern int sctp_debug_flag;
285 if (sctp_debug_flag) { \ 286 if (sctp_debug_flag) { \
286 if (saddr->sa.sa_family == AF_INET6) { \ 287 if (saddr->sa.sa_family == AF_INET6) { \
287 printk(KERN_DEBUG \ 288 printk(KERN_DEBUG \
288 lead NIP6_FMT trail, \ 289 lead "%pI6" trail, \
289 leadparm, \ 290 leadparm, \
290 NIP6(saddr->v6.sin6_addr), \ 291 &saddr->v6.sin6_addr, \
291 otherparms); \ 292 otherparms); \
292 } else { \ 293 } else { \
293 printk(KERN_DEBUG \ 294 printk(KERN_DEBUG \
294 lead NIPQUAD_FMT trail, \ 295 lead "%pI4" trail, \
295 leadparm, \ 296 leadparm, \
296 NIPQUAD(saddr->v4.sin_addr.s_addr), \ 297 &saddr->v4.sin_addr.s_addr, \
297 otherparms); \ 298 otherparms); \
298 } \ 299 } \
299 } 300 }
@@ -303,7 +304,7 @@ extern int sctp_debug_flag;
303#define SCTP_ASSERT(expr, str, func) \ 304#define SCTP_ASSERT(expr, str, func) \
304 if (!(expr)) { \ 305 if (!(expr)) { \
305 SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \ 306 SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \
306 str, (#expr), __FILE__, __FUNCTION__, __LINE__); \ 307 str, (#expr), __FILE__, __func__, __LINE__); \
307 func; \ 308 func; \
308 } 309 }
309 310
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 029a54a02396..c1dd89365833 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -125,6 +125,7 @@ sctp_state_fn_t sctp_sf_beat_8_3;
125sctp_state_fn_t sctp_sf_backbeat_8_3; 125sctp_state_fn_t sctp_sf_backbeat_8_3;
126sctp_state_fn_t sctp_sf_do_9_2_final; 126sctp_state_fn_t sctp_sf_do_9_2_final;
127sctp_state_fn_t sctp_sf_do_9_2_shutdown; 127sctp_state_fn_t sctp_sf_do_9_2_shutdown;
128sctp_state_fn_t sctp_sf_do_9_2_shut_ctsn;
128sctp_state_fn_t sctp_sf_do_ecn_cwr; 129sctp_state_fn_t sctp_sf_do_ecn_cwr;
129sctp_state_fn_t sctp_sf_do_ecne; 130sctp_state_fn_t sctp_sf_do_ecne;
130sctp_state_fn_t sctp_sf_ootb; 131sctp_state_fn_t sctp_sf_ootb;
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index f205b10f0ab9..b259fc5798fb 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -118,6 +118,8 @@ enum sctp_optname {
118#define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS 118#define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS
119 SCTP_LOCAL_AUTH_CHUNKS, /* Read only */ 119 SCTP_LOCAL_AUTH_CHUNKS, /* Read only */
120#define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS 120#define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS
121 SCTP_GET_ASSOC_NUMBER, /* Read only */
122#define SCTP_GET_ASSOC_NUMBER SCTP_GET_ASSOC_NUMBER
121 123
122 124
123 /* Internal Socket Options. Some of the sctp library functions are 125 /* Internal Socket Options. Some of the sctp library functions are
diff --git a/include/net/sock.h b/include/net/sock.h
index ada50c04d09f..5a3a151bd730 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -42,6 +42,7 @@
42 42
43#include <linux/kernel.h> 43#include <linux/kernel.h>
44#include <linux/list.h> 44#include <linux/list.h>
45#include <linux/list_nulls.h>
45#include <linux/timer.h> 46#include <linux/timer.h>
46#include <linux/cache.h> 47#include <linux/cache.h>
47#include <linux/module.h> 48#include <linux/module.h>
@@ -52,6 +53,7 @@
52#include <linux/security.h> 53#include <linux/security.h>
53 54
54#include <linux/filter.h> 55#include <linux/filter.h>
56#include <linux/rculist_nulls.h>
55 57
56#include <asm/atomic.h> 58#include <asm/atomic.h>
57#include <net/dst.h> 59#include <net/dst.h>
@@ -106,6 +108,7 @@ struct net;
106 * @skc_reuse: %SO_REUSEADDR setting 108 * @skc_reuse: %SO_REUSEADDR setting
107 * @skc_bound_dev_if: bound device index if != 0 109 * @skc_bound_dev_if: bound device index if != 0
108 * @skc_node: main hash linkage for various protocol lookup tables 110 * @skc_node: main hash linkage for various protocol lookup tables
111 * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol
109 * @skc_bind_node: bind hash linkage for various protocol lookup tables 112 * @skc_bind_node: bind hash linkage for various protocol lookup tables
110 * @skc_refcnt: reference count 113 * @skc_refcnt: reference count
111 * @skc_hash: hash value used with various protocol lookup tables 114 * @skc_hash: hash value used with various protocol lookup tables
@@ -120,7 +123,10 @@ struct sock_common {
120 volatile unsigned char skc_state; 123 volatile unsigned char skc_state;
121 unsigned char skc_reuse; 124 unsigned char skc_reuse;
122 int skc_bound_dev_if; 125 int skc_bound_dev_if;
123 struct hlist_node skc_node; 126 union {
127 struct hlist_node skc_node;
128 struct hlist_nulls_node skc_nulls_node;
129 };
124 struct hlist_node skc_bind_node; 130 struct hlist_node skc_bind_node;
125 atomic_t skc_refcnt; 131 atomic_t skc_refcnt;
126 unsigned int skc_hash; 132 unsigned int skc_hash;
@@ -206,6 +212,7 @@ struct sock {
206#define sk_reuse __sk_common.skc_reuse 212#define sk_reuse __sk_common.skc_reuse
207#define sk_bound_dev_if __sk_common.skc_bound_dev_if 213#define sk_bound_dev_if __sk_common.skc_bound_dev_if
208#define sk_node __sk_common.skc_node 214#define sk_node __sk_common.skc_node
215#define sk_nulls_node __sk_common.skc_nulls_node
209#define sk_bind_node __sk_common.skc_bind_node 216#define sk_bind_node __sk_common.skc_bind_node
210#define sk_refcnt __sk_common.skc_refcnt 217#define sk_refcnt __sk_common.skc_refcnt
211#define sk_hash __sk_common.skc_hash 218#define sk_hash __sk_common.skc_hash
@@ -229,7 +236,9 @@ struct sock {
229 } sk_backlog; 236 } sk_backlog;
230 wait_queue_head_t *sk_sleep; 237 wait_queue_head_t *sk_sleep;
231 struct dst_entry *sk_dst_cache; 238 struct dst_entry *sk_dst_cache;
239#ifdef CONFIG_XFRM
232 struct xfrm_policy *sk_policy[2]; 240 struct xfrm_policy *sk_policy[2];
241#endif
233 rwlock_t sk_dst_lock; 242 rwlock_t sk_dst_lock;
234 atomic_t sk_rmem_alloc; 243 atomic_t sk_rmem_alloc;
235 atomic_t sk_wmem_alloc; 244 atomic_t sk_wmem_alloc;
@@ -237,7 +246,9 @@ struct sock {
237 int sk_sndbuf; 246 int sk_sndbuf;
238 struct sk_buff_head sk_receive_queue; 247 struct sk_buff_head sk_receive_queue;
239 struct sk_buff_head sk_write_queue; 248 struct sk_buff_head sk_write_queue;
249#ifdef CONFIG_NET_DMA
240 struct sk_buff_head sk_async_wait_queue; 250 struct sk_buff_head sk_async_wait_queue;
251#endif
241 int sk_wmem_queued; 252 int sk_wmem_queued;
242 int sk_forward_alloc; 253 int sk_forward_alloc;
243 gfp_t sk_allocation; 254 gfp_t sk_allocation;
@@ -269,7 +280,9 @@ struct sock {
269 struct sk_buff *sk_send_head; 280 struct sk_buff *sk_send_head;
270 __u32 sk_sndmsg_off; 281 __u32 sk_sndmsg_off;
271 int sk_write_pending; 282 int sk_write_pending;
283#ifdef CONFIG_SECURITY
272 void *sk_security; 284 void *sk_security;
285#endif
273 __u32 sk_mark; 286 __u32 sk_mark;
274 /* XXX 4 bytes hole on 64 bit */ 287 /* XXX 4 bytes hole on 64 bit */
275 void (*sk_state_change)(struct sock *sk); 288 void (*sk_state_change)(struct sock *sk);
@@ -294,12 +307,30 @@ static inline struct sock *sk_head(const struct hlist_head *head)
294 return hlist_empty(head) ? NULL : __sk_head(head); 307 return hlist_empty(head) ? NULL : __sk_head(head);
295} 308}
296 309
310static inline struct sock *__sk_nulls_head(const struct hlist_nulls_head *head)
311{
312 return hlist_nulls_entry(head->first, struct sock, sk_nulls_node);
313}
314
315static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)
316{
317 return hlist_nulls_empty(head) ? NULL : __sk_nulls_head(head);
318}
319
297static inline struct sock *sk_next(const struct sock *sk) 320static inline struct sock *sk_next(const struct sock *sk)
298{ 321{
299 return sk->sk_node.next ? 322 return sk->sk_node.next ?
300 hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL; 323 hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL;
301} 324}
302 325
326static inline struct sock *sk_nulls_next(const struct sock *sk)
327{
328 return (!is_a_nulls(sk->sk_nulls_node.next)) ?
329 hlist_nulls_entry(sk->sk_nulls_node.next,
330 struct sock, sk_nulls_node) :
331 NULL;
332}
333
303static inline int sk_unhashed(const struct sock *sk) 334static inline int sk_unhashed(const struct sock *sk)
304{ 335{
305 return hlist_unhashed(&sk->sk_node); 336 return hlist_unhashed(&sk->sk_node);
@@ -315,6 +346,11 @@ static __inline__ void sk_node_init(struct hlist_node *node)
315 node->pprev = NULL; 346 node->pprev = NULL;
316} 347}
317 348
349static __inline__ void sk_nulls_node_init(struct hlist_nulls_node *node)
350{
351 node->pprev = NULL;
352}
353
318static __inline__ void __sk_del_node(struct sock *sk) 354static __inline__ void __sk_del_node(struct sock *sk)
319{ 355{
320 __hlist_del(&sk->sk_node); 356 __hlist_del(&sk->sk_node);
@@ -361,6 +397,27 @@ static __inline__ int sk_del_node_init(struct sock *sk)
361 return rc; 397 return rc;
362} 398}
363 399
400static __inline__ int __sk_nulls_del_node_init_rcu(struct sock *sk)
401{
402 if (sk_hashed(sk)) {
403 hlist_nulls_del_init_rcu(&sk->sk_nulls_node);
404 return 1;
405 }
406 return 0;
407}
408
409static __inline__ int sk_nulls_del_node_init_rcu(struct sock *sk)
410{
411 int rc = __sk_nulls_del_node_init_rcu(sk);
412
413 if (rc) {
414 /* paranoid for a while -acme */
415 WARN_ON(atomic_read(&sk->sk_refcnt) == 1);
416 __sock_put(sk);
417 }
418 return rc;
419}
420
364static __inline__ void __sk_add_node(struct sock *sk, struct hlist_head *list) 421static __inline__ void __sk_add_node(struct sock *sk, struct hlist_head *list)
365{ 422{
366 hlist_add_head(&sk->sk_node, list); 423 hlist_add_head(&sk->sk_node, list);
@@ -372,6 +429,17 @@ static __inline__ void sk_add_node(struct sock *sk, struct hlist_head *list)
372 __sk_add_node(sk, list); 429 __sk_add_node(sk, list);
373} 430}
374 431
432static __inline__ void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
433{
434 hlist_nulls_add_head_rcu(&sk->sk_nulls_node, list);
435}
436
437static __inline__ void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
438{
439 sock_hold(sk);
440 __sk_nulls_add_node_rcu(sk, list);
441}
442
375static __inline__ void __sk_del_bind_node(struct sock *sk) 443static __inline__ void __sk_del_bind_node(struct sock *sk)
376{ 444{
377 __hlist_del(&sk->sk_bind_node); 445 __hlist_del(&sk->sk_bind_node);
@@ -385,9 +453,16 @@ static __inline__ void sk_add_bind_node(struct sock *sk,
385 453
386#define sk_for_each(__sk, node, list) \ 454#define sk_for_each(__sk, node, list) \
387 hlist_for_each_entry(__sk, node, list, sk_node) 455 hlist_for_each_entry(__sk, node, list, sk_node)
456#define sk_nulls_for_each(__sk, node, list) \
457 hlist_nulls_for_each_entry(__sk, node, list, sk_nulls_node)
458#define sk_nulls_for_each_rcu(__sk, node, list) \
459 hlist_nulls_for_each_entry_rcu(__sk, node, list, sk_nulls_node)
388#define sk_for_each_from(__sk, node) \ 460#define sk_for_each_from(__sk, node) \
389 if (__sk && ({ node = &(__sk)->sk_node; 1; })) \ 461 if (__sk && ({ node = &(__sk)->sk_node; 1; })) \
390 hlist_for_each_entry_from(__sk, node, sk_node) 462 hlist_for_each_entry_from(__sk, node, sk_node)
463#define sk_nulls_for_each_from(__sk, node) \
464 if (__sk && ({ node = &(__sk)->sk_nulls_node; 1; })) \
465 hlist_nulls_for_each_entry_from(__sk, node, sk_nulls_node)
391#define sk_for_each_continue(__sk, node) \ 466#define sk_for_each_continue(__sk, node) \
392 if (__sk && ({ node = &(__sk)->sk_node; 1; })) \ 467 if (__sk && ({ node = &(__sk)->sk_node; 1; })) \
393 hlist_for_each_entry_continue(__sk, node, sk_node) 468 hlist_for_each_entry_continue(__sk, node, sk_node)
@@ -574,7 +649,7 @@ struct proto {
574 /* Memory pressure */ 649 /* Memory pressure */
575 void (*enter_memory_pressure)(struct sock *sk); 650 void (*enter_memory_pressure)(struct sock *sk);
576 atomic_t *memory_allocated; /* Current allocated memory. */ 651 atomic_t *memory_allocated; /* Current allocated memory. */
577 atomic_t *sockets_allocated; /* Current number of sockets. */ 652 struct percpu_counter *sockets_allocated; /* Current number of sockets. */
578 /* 653 /*
579 * Pressure flag: try to collapse. 654 * Pressure flag: try to collapse.
580 * Technical note: it is used by multiple contexts non atomically. 655 * Technical note: it is used by multiple contexts non atomically.
@@ -587,17 +662,18 @@ struct proto {
587 int *sysctl_rmem; 662 int *sysctl_rmem;
588 int max_header; 663 int max_header;
589 664
590 struct kmem_cache *slab; 665 struct kmem_cache *slab;
591 unsigned int obj_size; 666 unsigned int obj_size;
667 int slab_flags;
592 668
593 atomic_t *orphan_count; 669 struct percpu_counter *orphan_count;
594 670
595 struct request_sock_ops *rsk_prot; 671 struct request_sock_ops *rsk_prot;
596 struct timewait_sock_ops *twsk_prot; 672 struct timewait_sock_ops *twsk_prot;
597 673
598 union { 674 union {
599 struct inet_hashinfo *hashinfo; 675 struct inet_hashinfo *hashinfo;
600 struct hlist_head *udp_hash; 676 struct udp_table *udp_table;
601 struct raw_hashinfo *raw_hash; 677 struct raw_hashinfo *raw_hash;
602 } h; 678 } h;
603 679
@@ -815,7 +891,7 @@ static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
815 */ 891 */
816#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \ 892#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \
817do { \ 893do { \
818 sk->sk_lock.owned = 0; \ 894 sk->sk_lock.owned = 0; \
819 init_waitqueue_head(&sk->sk_lock.wq); \ 895 init_waitqueue_head(&sk->sk_lock.wq); \
820 spin_lock_init(&(sk)->sk_lock.slock); \ 896 spin_lock_init(&(sk)->sk_lock.slock); \
821 debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ 897 debug_check_no_locks_freed((void *)&(sk)->sk_lock, \
@@ -936,7 +1012,6 @@ extern void sock_init_data(struct socket *sock, struct sock *sk);
936 1012
937/** 1013/**
938 * sk_filter_release: Release a socket filter 1014 * sk_filter_release: Release a socket filter
939 * @sk: socket
940 * @fp: filter to remove 1015 * @fp: filter to remove
941 * 1016 *
942 * Remove a filter from a socket and release its resources. 1017 * Remove a filter from a socket and release its resources.
diff --git a/include/net/syncppp.h b/include/net/syncppp.h
deleted file mode 100644
index 9e306f7f579a..000000000000
--- a/include/net/syncppp.h
+++ /dev/null
@@ -1,102 +0,0 @@
1/*
2 * Defines for synchronous PPP/Cisco link level subroutines.
3 *
4 * Copyright (C) 1994 Cronyx Ltd.
5 * Author: Serge Vakulenko, <vak@zebub.msk.su>
6 *
7 * This software is distributed with NO WARRANTIES, not even the implied
8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 *
10 * Authors grant any other persons or organizations permission to use
11 * or modify this software as long as this message is kept with the software,
12 * all derivative works or modified versions.
13 *
14 * Version 1.7, Wed Jun 7 22:12:02 MSD 1995
15 *
16 *
17 *
18 */
19
20#ifndef _SYNCPPP_H_
21#define _SYNCPPP_H_ 1
22
23#ifdef __KERNEL__
24struct slcp {
25 u16 state; /* state machine */
26 u32 magic; /* local magic number */
27 u_char echoid; /* id of last keepalive echo request */
28 u_char confid; /* id of last configuration request */
29};
30
31struct sipcp {
32 u16 state; /* state machine */
33 u_char confid; /* id of last configuration request */
34};
35
36struct sppp
37{
38 struct sppp * pp_next; /* next interface in keepalive list */
39 u32 pp_flags; /* use Cisco protocol instead of PPP */
40 u16 pp_alivecnt; /* keepalive packets counter */
41 u16 pp_loopcnt; /* loopback detection counter */
42 u32 pp_seq; /* local sequence number */
43 u32 pp_rseq; /* remote sequence number */
44 struct slcp lcp; /* LCP params */
45 struct sipcp ipcp; /* IPCP params */
46 struct timer_list pp_timer;
47 struct net_device *pp_if;
48 char pp_link_state; /* Link status */
49 spinlock_t lock;
50};
51
52struct ppp_device
53{
54 struct net_device *dev; /* Network device pointer */
55 struct sppp sppp; /* Synchronous PPP */
56};
57
58static inline struct sppp *sppp_of(struct net_device *dev)
59{
60 struct ppp_device **ppp = dev->ml_priv;
61 BUG_ON((*ppp)->dev != dev);
62 return &(*ppp)->sppp;
63}
64
65#define PP_KEEPALIVE 0x01 /* use keepalive protocol */
66#define PP_CISCO 0x02 /* use Cisco protocol instead of PPP */
67#define PP_TIMO 0x04 /* cp_timeout routine active */
68#define PP_DEBUG 0x08
69
70#define PPP_MTU 1500 /* max. transmit unit */
71
72#define LCP_STATE_CLOSED 0 /* LCP state: closed (conf-req sent) */
73#define LCP_STATE_ACK_RCVD 1 /* LCP state: conf-ack received */
74#define LCP_STATE_ACK_SENT 2 /* LCP state: conf-ack sent */
75#define LCP_STATE_OPENED 3 /* LCP state: opened */
76
77#define IPCP_STATE_CLOSED 0 /* IPCP state: closed (conf-req sent) */
78#define IPCP_STATE_ACK_RCVD 1 /* IPCP state: conf-ack received */
79#define IPCP_STATE_ACK_SENT 2 /* IPCP state: conf-ack sent */
80#define IPCP_STATE_OPENED 3 /* IPCP state: opened */
81
82#define SPPP_LINK_DOWN 0 /* link down - no keepalive */
83#define SPPP_LINK_UP 1 /* link is up - keepalive ok */
84
85void sppp_attach (struct ppp_device *pd);
86void sppp_detach (struct net_device *dev);
87int sppp_do_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd);
88struct sk_buff *sppp_dequeue (struct net_device *dev);
89int sppp_isempty (struct net_device *dev);
90void sppp_flush (struct net_device *dev);
91int sppp_open (struct net_device *dev);
92int sppp_reopen (struct net_device *dev);
93int sppp_close (struct net_device *dev);
94#endif
95
96#define SPPPIOCCISCO (SIOCDEVPRIVATE)
97#define SPPPIOCPPP (SIOCDEVPRIVATE+1)
98#define SPPPIOCDEBUG (SIOCDEVPRIVATE+2)
99#define SPPPIOCSFLAGS (SIOCDEVPRIVATE+3)
100#define SPPPIOCGFLAGS (SIOCDEVPRIVATE+4)
101
102#endif /* _SYNCPPP_H_ */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 438014d57610..218235de8963 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -46,7 +46,7 @@
46 46
47extern struct inet_hashinfo tcp_hashinfo; 47extern struct inet_hashinfo tcp_hashinfo;
48 48
49extern atomic_t tcp_orphan_count; 49extern struct percpu_counter tcp_orphan_count;
50extern void tcp_time_wait(struct sock *sk, int state, int timeo); 50extern void tcp_time_wait(struct sock *sk, int state, int timeo);
51 51
52#define MAX_TCP_HEADER (128 + MAX_HEADER) 52#define MAX_TCP_HEADER (128 + MAX_HEADER)
@@ -238,7 +238,7 @@ extern int sysctl_tcp_slow_start_after_idle;
238extern int sysctl_tcp_max_ssthresh; 238extern int sysctl_tcp_max_ssthresh;
239 239
240extern atomic_t tcp_memory_allocated; 240extern atomic_t tcp_memory_allocated;
241extern atomic_t tcp_sockets_allocated; 241extern struct percpu_counter tcp_sockets_allocated;
242extern int tcp_memory_pressure; 242extern int tcp_memory_pressure;
243 243
244/* 244/*
@@ -472,8 +472,6 @@ extern void tcp_send_delayed_ack(struct sock *sk);
472 472
473/* tcp_input.c */ 473/* tcp_input.c */
474extern void tcp_cwnd_application_limited(struct sock *sk); 474extern void tcp_cwnd_application_limited(struct sock *sk);
475extern void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp,
476 struct sk_buff *skb);
477 475
478/* tcp_timer.c */ 476/* tcp_timer.c */
479extern void tcp_init_xmit_timers(struct sock *); 477extern void tcp_init_xmit_timers(struct sock *);
@@ -590,7 +588,6 @@ struct tcp_skb_cb {
590#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */ 588#define TCPCB_EVER_RETRANS 0x80 /* Ever retransmitted frame */
591#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS) 589#define TCPCB_RETRANS (TCPCB_SACKED_RETRANS|TCPCB_EVER_RETRANS)
592 590
593 __u16 urg_ptr; /* Valid w/URG flags is set. */
594 __u32 ack_seq; /* Sequence number ACK'd */ 591 __u32 ack_seq; /* Sequence number ACK'd */
595}; 592};
596 593
@@ -764,8 +761,6 @@ static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp)
764 return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; 761 return tp->packets_out - tcp_left_out(tp) + tp->retrans_out;
765} 762}
766 763
767extern int tcp_limit_reno_sacked(struct tcp_sock *tp);
768
769/* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. 764/* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd.
770 * The exception is rate halving phase, when cwnd is decreasing towards 765 * The exception is rate halving phase, when cwnd is decreasing towards
771 * ssthresh. 766 * ssthresh.
@@ -1195,6 +1190,11 @@ static inline struct sk_buff *tcp_write_queue_next(struct sock *sk, struct sk_bu
1195 return skb_queue_next(&sk->sk_write_queue, skb); 1190 return skb_queue_next(&sk->sk_write_queue, skb);
1196} 1191}
1197 1192
1193static inline struct sk_buff *tcp_write_queue_prev(struct sock *sk, struct sk_buff *skb)
1194{
1195 return skb_queue_prev(&sk->sk_write_queue, skb);
1196}
1197
1198#define tcp_for_write_queue(skb, sk) \ 1198#define tcp_for_write_queue(skb, sk) \
1199 skb_queue_walk(&(sk)->sk_write_queue, skb) 1199 skb_queue_walk(&(sk)->sk_write_queue, skb)
1200 1200
@@ -1358,6 +1358,12 @@ extern void tcp_v4_destroy_sock(struct sock *sk);
1358 1358
1359extern int tcp_v4_gso_send_check(struct sk_buff *skb); 1359extern int tcp_v4_gso_send_check(struct sk_buff *skb);
1360extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); 1360extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features);
1361extern struct sk_buff **tcp_gro_receive(struct sk_buff **head,
1362 struct sk_buff *skb);
1363extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head,
1364 struct sk_buff *skb);
1365extern int tcp_gro_complete(struct sk_buff *skb);
1366extern int tcp4_gro_complete(struct sk_buff *skb);
1361 1367
1362#ifdef CONFIG_PROC_FS 1368#ifdef CONFIG_PROC_FS
1363extern int tcp4_proc_init(void); 1369extern int tcp4_proc_init(void);
diff --git a/include/net/timewait_sock.h b/include/net/timewait_sock.h
index 1e1ee3253fd8..97c3b14da55d 100644
--- a/include/net/timewait_sock.h
+++ b/include/net/timewait_sock.h
@@ -16,6 +16,7 @@
16 16
17struct timewait_sock_ops { 17struct timewait_sock_ops {
18 struct kmem_cache *twsk_slab; 18 struct kmem_cache *twsk_slab;
19 char *twsk_slab_name;
19 unsigned int twsk_obj_size; 20 unsigned int twsk_obj_size;
20 int (*twsk_unique)(struct sock *sk, 21 int (*twsk_unique)(struct sock *sk,
21 struct sock *sktw, void *twp); 22 struct sock *sktw, void *twp);
diff --git a/include/net/udp.h b/include/net/udp.h
index 1e205095ea68..90e6ce56be65 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -50,8 +50,15 @@ struct udp_skb_cb {
50}; 50};
51#define UDP_SKB_CB(__skb) ((struct udp_skb_cb *)((__skb)->cb)) 51#define UDP_SKB_CB(__skb) ((struct udp_skb_cb *)((__skb)->cb))
52 52
53extern struct hlist_head udp_hash[UDP_HTABLE_SIZE]; 53struct udp_hslot {
54extern rwlock_t udp_hash_lock; 54 struct hlist_nulls_head head;
55 spinlock_t lock;
56} __attribute__((aligned(2 * sizeof(long))));
57struct udp_table {
58 struct udp_hslot hash[UDP_HTABLE_SIZE];
59};
60extern struct udp_table udp_table;
61extern void udp_table_init(struct udp_table *);
55 62
56 63
57/* Note: this must match 'valbool' in sock_setsockopt */ 64/* Note: this must match 'valbool' in sock_setsockopt */
@@ -110,15 +117,7 @@ static inline void udp_lib_hash(struct sock *sk)
110 BUG(); 117 BUG();
111} 118}
112 119
113static inline void udp_lib_unhash(struct sock *sk) 120extern void udp_lib_unhash(struct sock *sk);
114{
115 write_lock_bh(&udp_hash_lock);
116 if (sk_del_node_init(sk)) {
117 inet_sk(sk)->num = 0;
118 sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
119 }
120 write_unlock_bh(&udp_hash_lock);
121}
122 121
123static inline void udp_lib_close(struct sock *sk, long timeout) 122static inline void udp_lib_close(struct sock *sk, long timeout)
124{ 123{
@@ -187,7 +186,7 @@ extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
187struct udp_seq_afinfo { 186struct udp_seq_afinfo {
188 char *name; 187 char *name;
189 sa_family_t family; 188 sa_family_t family;
190 struct hlist_head *hashtable; 189 struct udp_table *udp_table;
191 struct file_operations seq_fops; 190 struct file_operations seq_fops;
192 struct seq_operations seq_ops; 191 struct seq_operations seq_ops;
193}; 192};
@@ -196,7 +195,7 @@ struct udp_iter_state {
196 struct seq_net_private p; 195 struct seq_net_private p;
197 sa_family_t family; 196 sa_family_t family;
198 int bucket; 197 int bucket;
199 struct hlist_head *hashtable; 198 struct udp_table *udp_table;
200}; 199};
201 200
202#ifdef CONFIG_PROC_FS 201#ifdef CONFIG_PROC_FS
diff --git a/include/net/udplite.h b/include/net/udplite.h
index b76b2e377af4..afdffe607b24 100644
--- a/include/net/udplite.h
+++ b/include/net/udplite.h
@@ -11,7 +11,7 @@
11#define UDPLITE_RECV_CSCOV 11 /* receiver partial coverage (threshold ) */ 11#define UDPLITE_RECV_CSCOV 11 /* receiver partial coverage (threshold ) */
12 12
13extern struct proto udplite_prot; 13extern struct proto udplite_prot;
14extern struct hlist_head udplite_hash[UDP_HTABLE_SIZE]; 14extern struct udp_table udplite_table;
15 15
16/* 16/*
17 * Checksum computation is all in software, hence simpler getfrag. 17 * Checksum computation is all in software, hence simpler getfrag.
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 721efb363db7..21c5d966142d 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -10,6 +10,7 @@
10#include <linux/netdevice.h> 10#include <linux/netdevice.h>
11#include <linux/debugfs.h> 11#include <linux/debugfs.h>
12#include <linux/list.h> 12#include <linux/list.h>
13#include <linux/ieee80211.h>
13#include <net/cfg80211.h> 14#include <net/cfg80211.h>
14 15
15/** 16/**
@@ -133,23 +134,23 @@ struct ieee80211_rate {
133}; 134};
134 135
135/** 136/**
136 * struct ieee80211_ht_info - describing STA's HT capabilities 137 * struct ieee80211_sta_ht_cap - STA's HT capabilities
137 * 138 *
138 * This structure describes most essential parameters needed 139 * This structure describes most essential parameters needed
139 * to describe 802.11n HT capabilities for an STA. 140 * to describe 802.11n HT capabilities for an STA.
140 * 141 *
141 * @ht_supported: is HT supported by STA, 0: no, 1: yes 142 * @ht_supported: is HT supported by the STA
142 * @cap: HT capabilities map as described in 802.11n spec 143 * @cap: HT capabilities map as described in 802.11n spec
143 * @ampdu_factor: Maximum A-MPDU length factor 144 * @ampdu_factor: Maximum A-MPDU length factor
144 * @ampdu_density: Minimum A-MPDU spacing 145 * @ampdu_density: Minimum A-MPDU spacing
145 * @supp_mcs_set: Supported MCS set as described in 802.11n spec 146 * @mcs: Supported MCS rates
146 */ 147 */
147struct ieee80211_ht_info { 148struct ieee80211_sta_ht_cap {
148 u16 cap; /* use IEEE80211_HT_CAP_ */ 149 u16 cap; /* use IEEE80211_HT_CAP_ */
149 u8 ht_supported; 150 bool ht_supported;
150 u8 ampdu_factor; 151 u8 ampdu_factor;
151 u8 ampdu_density; 152 u8 ampdu_density;
152 u8 supp_mcs_set[16]; 153 struct ieee80211_mcs_info mcs;
153}; 154};
154 155
155/** 156/**
@@ -173,13 +174,18 @@ struct ieee80211_supported_band {
173 enum ieee80211_band band; 174 enum ieee80211_band band;
174 int n_channels; 175 int n_channels;
175 int n_bitrates; 176 int n_bitrates;
176 struct ieee80211_ht_info ht_info; 177 struct ieee80211_sta_ht_cap ht_cap;
177}; 178};
178 179
179/** 180/**
180 * struct wiphy - wireless hardware description 181 * struct wiphy - wireless hardware description
181 * @idx: the wiphy index assigned to this item 182 * @idx: the wiphy index assigned to this item
182 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> 183 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name>
184 * @fw_handles_regulatory: tells us the firmware for this device
185 * has its own regulatory solution and cannot identify the
186 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled
187 * we will disregard the first regulatory hint (when the
188 * initiator is %REGDOM_SET_BY_CORE).
183 * @reg_notifier: the driver's regulatory notification callback 189 * @reg_notifier: the driver's regulatory notification callback
184 */ 190 */
185struct wiphy { 191struct wiphy {
@@ -191,6 +197,8 @@ struct wiphy {
191 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ 197 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
192 u16 interface_modes; 198 u16 interface_modes;
193 199
200 bool fw_handles_regulatory;
201
194 /* If multiple wiphys are registered and you're handed e.g. 202 /* If multiple wiphys are registered and you're handed e.g.
195 * a regular netdev with assigned ieee80211_ptr, you won't 203 * a regular netdev with assigned ieee80211_ptr, you won't
196 * know whether it points to a wiphy your driver has registered 204 * know whether it points to a wiphy your driver has registered
@@ -262,9 +270,9 @@ static inline struct device *wiphy_dev(struct wiphy *wiphy)
262/** 270/**
263 * wiphy_name - get wiphy name 271 * wiphy_name - get wiphy name
264 */ 272 */
265static inline char *wiphy_name(struct wiphy *wiphy) 273static inline const char *wiphy_name(struct wiphy *wiphy)
266{ 274{
267 return wiphy->dev.bus_id; 275 return dev_name(&wiphy->dev);
268} 276}
269 277
270/** 278/**
@@ -340,55 +348,51 @@ ieee80211_get_channel(struct wiphy *wiphy, int freq)
340} 348}
341 349
342/** 350/**
343 * __regulatory_hint - hint to the wireless core a regulatory domain 351 * ieee80211_get_response_rate - get basic rate for a given rate
344 * @wiphy: if a driver is providing the hint this is the driver's very
345 * own &struct wiphy
346 * @alpha2: the ISO/IEC 3166 alpha2 being claimed the regulatory domain
347 * should be in. If @rd is set this should be NULL
348 * @rd: a complete regulatory domain, if passed the caller need not worry
349 * about freeing it
350 *
351 * The Wireless subsystem can use this function to hint to the wireless core
352 * what it believes should be the current regulatory domain by
353 * giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory
354 * domain should be in or by providing a completely build regulatory domain.
355 * 352 *
356 * Returns -EALREADY if *a regulatory domain* has already been set. Note that 353 * @sband: the band to look for rates in
357 * this could be by another driver. It is safe for drivers to continue if 354 * @basic_rates: bitmap of basic rates
358 * -EALREADY is returned, if drivers are not capable of world roaming they 355 * @bitrate: the bitrate for which to find the basic rate
359 * should not register more channels than they support. Right now we only
360 * support listening to the first driver hint. If the driver is capable
361 * of world roaming but wants to respect its own EEPROM mappings for
362 * specific regulatory domains it should register the @reg_notifier callback
363 * on the &struct wiphy. Returns 0 if the hint went through fine or through an
364 * intersection operation. Otherwise a standard error code is returned.
365 * 356 *
357 * This function returns the basic rate corresponding to a given
358 * bitrate, that is the next lower bitrate contained in the basic
359 * rate map, which is, for this function, given as a bitmap of
360 * indices of rates in the band's bitrate table.
366 */ 361 */
367extern int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by, 362struct ieee80211_rate *
368 const char *alpha2, struct ieee80211_regdomain *rd); 363ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
364 u64 basic_rates, int bitrate);
365
369/** 366/**
370 * regulatory_hint - driver hint to the wireless core a regulatory domain 367 * regulatory_hint - driver hint to the wireless core a regulatory domain
371 * @wiphy: the driver's very own &struct wiphy 368 * @wiphy: the wireless device giving the hint (used only for reporting
369 * conflicts)
372 * @alpha2: the ISO/IEC 3166 alpha2 the driver claims its regulatory domain 370 * @alpha2: the ISO/IEC 3166 alpha2 the driver claims its regulatory domain
373 * should be in. If @rd is set this should be NULL. Note that if you 371 * should be in. If @rd is set this should be NULL. Note that if you
374 * set this to NULL you should still set rd->alpha2 to some accepted 372 * set this to NULL you should still set rd->alpha2 to some accepted
375 * alpha2. 373 * alpha2.
376 * @rd: a complete regulatory domain provided by the driver. If passed
377 * the driver does not need to worry about freeing it.
378 * 374 *
379 * Wireless drivers can use this function to hint to the wireless core 375 * Wireless drivers can use this function to hint to the wireless core
380 * what it believes should be the current regulatory domain by 376 * what it believes should be the current regulatory domain by
381 * giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory 377 * giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory
382 * domain should be in or by providing a completely build regulatory domain. 378 * domain should be in or by providing a completely build regulatory domain.
383 * If the driver provides an ISO/IEC 3166 alpha2 userspace will be queried 379 * If the driver provides an ISO/IEC 3166 alpha2 userspace will be queried
384 * for a regulatory domain structure for the respective country. If 380 * for a regulatory domain structure for the respective country.
385 * a regulatory domain is build and passed you should set the alpha2 381 */
386 * if possible, otherwise set it to the special value of "99" which tells 382extern void regulatory_hint(struct wiphy *wiphy, const char *alpha2);
387 * the wireless core it is unknown. If you pass a built regulatory domain 383
388 * and we return non zero you are in charge of kfree()'ing the structure. 384/**
385 * regulatory_hint_11d - hints a country IE as a regulatory domain
386 * @wiphy: the wireless device giving the hint (used only for reporting
387 * conflicts)
388 * @country_ie: pointer to the country IE
389 * @country_ie_len: length of the country IE
389 * 390 *
390 * See __regulatory_hint() documentation for possible return values. 391 * We will intersect the rd with the what CRDA tells us should apply
392 * for the alpha2 this country IE belongs to, this prevents APs from
393 * sending us incorrect or outdated information against a country.
391 */ 394 */
392extern int regulatory_hint(struct wiphy *wiphy, 395extern void regulatory_hint_11d(struct wiphy *wiphy,
393 const char *alpha2, struct ieee80211_regdomain *rd); 396 u8 *country_ie,
397 u8 country_ie_len);
394#endif /* __NET_WIRELESS_H */ 398#endif /* __NET_WIRELESS_H */
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 11c890ad8ebb..2e9f5c0018ae 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -38,22 +38,15 @@
38 MODULE_ALIAS("xfrm-type-" __stringify(family) "-" __stringify(proto)) 38 MODULE_ALIAS("xfrm-type-" __stringify(family) "-" __stringify(proto))
39 39
40#ifdef CONFIG_XFRM_STATISTICS 40#ifdef CONFIG_XFRM_STATISTICS
41DECLARE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics); 41#define XFRM_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.xfrm_statistics, field)
42#define XFRM_INC_STATS(field) SNMP_INC_STATS(xfrm_statistics, field) 42#define XFRM_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.xfrm_statistics, field)
43#define XFRM_INC_STATS_BH(field) SNMP_INC_STATS_BH(xfrm_statistics, field) 43#define XFRM_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)-mib.xfrm_statistics, field)
44#define XFRM_INC_STATS_USER(field) SNMP_INC_STATS_USER(xfrm_statistics, field)
45#else 44#else
46#define XFRM_INC_STATS(field) 45#define XFRM_INC_STATS(net, field) ((void)(net))
47#define XFRM_INC_STATS_BH(field) 46#define XFRM_INC_STATS_BH(net, field) ((void)(net))
48#define XFRM_INC_STATS_USER(field) 47#define XFRM_INC_STATS_USER(net, field) ((void)(net))
49#endif 48#endif
50 49
51extern struct sock *xfrm_nl;
52extern u32 sysctl_xfrm_aevent_etime;
53extern u32 sysctl_xfrm_aevent_rseqth;
54extern int sysctl_xfrm_larval_drop;
55extern u32 sysctl_xfrm_acq_expires;
56
57extern struct mutex xfrm_cfg_mutex; 50extern struct mutex xfrm_cfg_mutex;
58 51
59/* Organization of SPD aka "XFRM rules" 52/* Organization of SPD aka "XFRM rules"
@@ -130,6 +123,9 @@ struct xfrm_state_walk {
130/* Full description of state of transformer. */ 123/* Full description of state of transformer. */
131struct xfrm_state 124struct xfrm_state
132{ 125{
126#ifdef CONFIG_NET_NS
127 struct net *xs_net;
128#endif
133 union { 129 union {
134 struct hlist_node gclist; 130 struct hlist_node gclist;
135 struct hlist_node bydst; 131 struct hlist_node bydst;
@@ -223,6 +219,11 @@ struct xfrm_state
223 void *data; 219 void *data;
224}; 220};
225 221
222static inline struct net *xs_net(struct xfrm_state *x)
223{
224 return read_pnet(&x->xs_net);
225}
226
226/* xflags - make enum if more show up */ 227/* xflags - make enum if more show up */
227#define XFRM_TIME_DEFER 1 228#define XFRM_TIME_DEFER 1
228 229
@@ -249,6 +250,7 @@ struct km_event
249 u32 seq; 250 u32 seq;
250 u32 pid; 251 u32 pid;
251 u32 event; 252 u32 event;
253 struct net *net;
252}; 254};
253 255
254struct net_device; 256struct net_device;
@@ -257,10 +259,11 @@ struct xfrm_dst;
257struct xfrm_policy_afinfo { 259struct xfrm_policy_afinfo {
258 unsigned short family; 260 unsigned short family;
259 struct dst_ops *dst_ops; 261 struct dst_ops *dst_ops;
260 void (*garbage_collect)(void); 262 void (*garbage_collect)(struct net *net);
261 struct dst_entry *(*dst_lookup)(int tos, xfrm_address_t *saddr, 263 struct dst_entry *(*dst_lookup)(struct net *net, int tos,
264 xfrm_address_t *saddr,
262 xfrm_address_t *daddr); 265 xfrm_address_t *daddr);
263 int (*get_saddr)(xfrm_address_t *saddr, xfrm_address_t *daddr); 266 int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr);
264 struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy); 267 struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy);
265 void (*decode_session)(struct sk_buff *skb, 268 void (*decode_session)(struct sk_buff *skb,
266 struct flowi *fl, 269 struct flowi *fl,
@@ -467,7 +470,9 @@ struct xfrm_policy_walk {
467 470
468struct xfrm_policy 471struct xfrm_policy
469{ 472{
470 struct xfrm_policy *next; 473#ifdef CONFIG_NET_NS
474 struct net *xp_net;
475#endif
471 struct hlist_node bydst; 476 struct hlist_node bydst;
472 struct hlist_node byidx; 477 struct hlist_node byidx;
473 478
@@ -492,6 +497,11 @@ struct xfrm_policy
492 struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH]; 497 struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH];
493}; 498};
494 499
500static inline struct net *xp_net(struct xfrm_policy *xp)
501{
502 return read_pnet(&xp->xp_net);
503}
504
495struct xfrm_kmaddress { 505struct xfrm_kmaddress {
496 xfrm_address_t local; 506 xfrm_address_t local;
497 xfrm_address_t remote; 507 xfrm_address_t remote;
@@ -537,15 +547,13 @@ struct xfrm_mgr
537 struct xfrm_policy *(*compile_policy)(struct sock *sk, int opt, u8 *data, int len, int *dir); 547 struct xfrm_policy *(*compile_policy)(struct sock *sk, int opt, u8 *data, int len, int *dir);
538 int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); 548 int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport);
539 int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c); 549 int (*notify_policy)(struct xfrm_policy *x, int dir, struct km_event *c);
540 int (*report)(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); 550 int (*report)(struct net *net, u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);
541 int (*migrate)(struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles, struct xfrm_kmaddress *k); 551 int (*migrate)(struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_bundles, struct xfrm_kmaddress *k);
542}; 552};
543 553
544extern int xfrm_register_km(struct xfrm_mgr *km); 554extern int xfrm_register_km(struct xfrm_mgr *km);
545extern int xfrm_unregister_km(struct xfrm_mgr *km); 555extern int xfrm_unregister_km(struct xfrm_mgr *km);
546 556
547extern unsigned int xfrm_policy_count[XFRM_POLICY_MAX*2];
548
549/* 557/*
550 * This structure is used for the duration where packets are being 558 * This structure is used for the duration where packets are being
551 * transformed by IPsec. As soon as the packet leaves IPsec the 559 * transformed by IPsec. As soon as the packet leaves IPsec the
@@ -882,6 +890,7 @@ struct xfrm_dst
882 u32 path_cookie; 890 u32 path_cookie;
883}; 891};
884 892
893#ifdef CONFIG_XFRM
885static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) 894static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
886{ 895{
887 dst_release(xdst->route); 896 dst_release(xdst->route);
@@ -894,6 +903,7 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
894 xdst->partner = NULL; 903 xdst->partner = NULL;
895#endif 904#endif
896} 905}
906#endif
897 907
898extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); 908extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
899 909
@@ -977,12 +987,13 @@ static inline int __xfrm_policy_check2(struct sock *sk, int dir,
977 struct sk_buff *skb, 987 struct sk_buff *skb,
978 unsigned int family, int reverse) 988 unsigned int family, int reverse)
979{ 989{
990 struct net *net = dev_net(skb->dev);
980 int ndir = dir | (reverse ? XFRM_POLICY_MASK + 1 : 0); 991 int ndir = dir | (reverse ? XFRM_POLICY_MASK + 1 : 0);
981 992
982 if (sk && sk->sk_policy[XFRM_POLICY_IN]) 993 if (sk && sk->sk_policy[XFRM_POLICY_IN])
983 return __xfrm_policy_check(sk, ndir, skb, family); 994 return __xfrm_policy_check(sk, ndir, skb, family);
984 995
985 return (!xfrm_policy_count[dir] && !skb->sp) || 996 return (!net->xfrm.policy_count[dir] && !skb->sp) ||
986 (skb->dst->flags & DST_NOPOLICY) || 997 (skb->dst->flags & DST_NOPOLICY) ||
987 __xfrm_policy_check(sk, ndir, skb, family); 998 __xfrm_policy_check(sk, ndir, skb, family);
988} 999}
@@ -1034,7 +1045,9 @@ extern int __xfrm_route_forward(struct sk_buff *skb, unsigned short family);
1034 1045
1035static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family) 1046static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family)
1036{ 1047{
1037 return !xfrm_policy_count[XFRM_POLICY_OUT] || 1048 struct net *net = dev_net(skb->dev);
1049
1050 return !net->xfrm.policy_count[XFRM_POLICY_OUT] ||
1038 (skb->dst->flags & DST_NOXFRM) || 1051 (skb->dst->flags & DST_NOXFRM) ||
1039 __xfrm_route_forward(skb, family); 1052 __xfrm_route_forward(skb, family);
1040} 1053}
@@ -1268,7 +1281,8 @@ struct xfrm6_tunnel {
1268 1281
1269extern void xfrm_init(void); 1282extern void xfrm_init(void);
1270extern void xfrm4_init(void); 1283extern void xfrm4_init(void);
1271extern void xfrm_state_init(void); 1284extern int xfrm_state_init(struct net *net);
1285extern void xfrm_state_fini(struct net *net);
1272extern void xfrm4_state_init(void); 1286extern void xfrm4_state_init(void);
1273#ifdef CONFIG_XFRM 1287#ifdef CONFIG_XFRM
1274extern int xfrm6_init(void); 1288extern int xfrm6_init(void);
@@ -1287,19 +1301,30 @@ static inline void xfrm6_fini(void)
1287#endif 1301#endif
1288 1302
1289#ifdef CONFIG_XFRM_STATISTICS 1303#ifdef CONFIG_XFRM_STATISTICS
1290extern int xfrm_proc_init(void); 1304extern int xfrm_proc_init(struct net *net);
1305extern void xfrm_proc_fini(struct net *net);
1306#endif
1307
1308extern int xfrm_sysctl_init(struct net *net);
1309#ifdef CONFIG_SYSCTL
1310extern void xfrm_sysctl_fini(struct net *net);
1311#else
1312static inline void xfrm_sysctl_fini(struct net *net)
1313{
1314}
1291#endif 1315#endif
1292 1316
1293extern void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto); 1317extern void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto);
1294extern int xfrm_state_walk(struct xfrm_state_walk *walk, 1318extern int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
1295 int (*func)(struct xfrm_state *, int, void*), void *); 1319 int (*func)(struct xfrm_state *, int, void*), void *);
1296extern void xfrm_state_walk_done(struct xfrm_state_walk *walk); 1320extern void xfrm_state_walk_done(struct xfrm_state_walk *walk);
1297extern struct xfrm_state *xfrm_state_alloc(void); 1321extern struct xfrm_state *xfrm_state_alloc(struct net *net);
1298extern struct xfrm_state *xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, 1322extern struct xfrm_state *xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
1299 struct flowi *fl, struct xfrm_tmpl *tmpl, 1323 struct flowi *fl, struct xfrm_tmpl *tmpl,
1300 struct xfrm_policy *pol, int *err, 1324 struct xfrm_policy *pol, int *err,
1301 unsigned short family); 1325 unsigned short family);
1302extern struct xfrm_state * xfrm_stateonly_find(xfrm_address_t *daddr, 1326extern struct xfrm_state * xfrm_stateonly_find(struct net *net,
1327 xfrm_address_t *daddr,
1303 xfrm_address_t *saddr, 1328 xfrm_address_t *saddr,
1304 unsigned short family, 1329 unsigned short family,
1305 u8 mode, u8 proto, u32 reqid); 1330 u8 mode, u8 proto, u32 reqid);
@@ -1307,8 +1332,8 @@ extern int xfrm_state_check_expire(struct xfrm_state *x);
1307extern void xfrm_state_insert(struct xfrm_state *x); 1332extern void xfrm_state_insert(struct xfrm_state *x);
1308extern int xfrm_state_add(struct xfrm_state *x); 1333extern int xfrm_state_add(struct xfrm_state *x);
1309extern int xfrm_state_update(struct xfrm_state *x); 1334extern int xfrm_state_update(struct xfrm_state *x);
1310extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family); 1335extern struct xfrm_state *xfrm_state_lookup(struct net *net, xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family);
1311extern struct xfrm_state *xfrm_state_lookup_byaddr(xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family); 1336extern struct xfrm_state *xfrm_state_lookup_byaddr(struct net *net, xfrm_address_t *daddr, xfrm_address_t *saddr, u8 proto, unsigned short family);
1312#ifdef CONFIG_XFRM_SUB_POLICY 1337#ifdef CONFIG_XFRM_SUB_POLICY
1313extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, 1338extern int xfrm_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src,
1314 int n, unsigned short family); 1339 int n, unsigned short family);
@@ -1345,9 +1370,9 @@ struct xfrmk_spdinfo {
1345 u32 spdhmcnt; 1370 u32 spdhmcnt;
1346}; 1371};
1347 1372
1348extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); 1373extern struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 seq);
1349extern int xfrm_state_delete(struct xfrm_state *x); 1374extern int xfrm_state_delete(struct xfrm_state *x);
1350extern int xfrm_state_flush(u8 proto, struct xfrm_audit *audit_info); 1375extern int xfrm_state_flush(struct net *net, u8 proto, struct xfrm_audit *audit_info);
1351extern void xfrm_sad_getinfo(struct xfrmk_sadinfo *si); 1376extern void xfrm_sad_getinfo(struct xfrmk_sadinfo *si);
1352extern void xfrm_spd_getinfo(struct xfrmk_spdinfo *si); 1377extern void xfrm_spd_getinfo(struct xfrmk_spdinfo *si);
1353extern int xfrm_replay_check(struct xfrm_state *x, 1378extern int xfrm_replay_check(struct xfrm_state *x,
@@ -1415,22 +1440,22 @@ static inline int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb)
1415} 1440}
1416#endif 1441#endif
1417 1442
1418struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp); 1443struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp);
1419 1444
1420extern void xfrm_policy_walk_init(struct xfrm_policy_walk *walk, u8 type); 1445extern void xfrm_policy_walk_init(struct xfrm_policy_walk *walk, u8 type);
1421extern int xfrm_policy_walk(struct xfrm_policy_walk *walk, 1446extern int xfrm_policy_walk(struct net *net, struct xfrm_policy_walk *walk,
1422 int (*func)(struct xfrm_policy *, int, int, void*), void *); 1447 int (*func)(struct xfrm_policy *, int, int, void*), void *);
1423extern void xfrm_policy_walk_done(struct xfrm_policy_walk *walk); 1448extern void xfrm_policy_walk_done(struct xfrm_policy_walk *walk);
1424int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); 1449int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
1425struct xfrm_policy *xfrm_policy_bysel_ctx(u8 type, int dir, 1450struct xfrm_policy *xfrm_policy_bysel_ctx(struct net *net, u8 type, int dir,
1426 struct xfrm_selector *sel, 1451 struct xfrm_selector *sel,
1427 struct xfrm_sec_ctx *ctx, int delete, 1452 struct xfrm_sec_ctx *ctx, int delete,
1428 int *err); 1453 int *err);
1429struct xfrm_policy *xfrm_policy_byid(u8, int dir, u32 id, int delete, int *err); 1454struct xfrm_policy *xfrm_policy_byid(struct net *net, u8, int dir, u32 id, int delete, int *err);
1430int xfrm_policy_flush(u8 type, struct xfrm_audit *audit_info); 1455int xfrm_policy_flush(struct net *net, u8 type, struct xfrm_audit *audit_info);
1431u32 xfrm_get_acqseq(void); 1456u32 xfrm_get_acqseq(void);
1432extern int xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi); 1457extern int xfrm_alloc_spi(struct xfrm_state *x, u32 minspi, u32 maxspi);
1433struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, 1458struct xfrm_state * xfrm_find_acq(struct net *net, u8 mode, u32 reqid, u8 proto,
1434 xfrm_address_t *daddr, xfrm_address_t *saddr, 1459 xfrm_address_t *daddr, xfrm_address_t *saddr,
1435 int create, unsigned short family); 1460 int create, unsigned short family);
1436extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); 1461extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
@@ -1449,10 +1474,9 @@ extern int xfrm_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
1449 struct xfrm_kmaddress *k); 1474 struct xfrm_kmaddress *k);
1450#endif 1475#endif
1451 1476
1452extern wait_queue_head_t km_waitq;
1453extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); 1477extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport);
1454extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); 1478extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid);
1455extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); 1479extern int km_report(struct net *net, u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);
1456 1480
1457extern void xfrm_input_init(void); 1481extern void xfrm_input_init(void);
1458extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq); 1482extern int xfrm_parse_spi(struct sk_buff *skb, u8 nexthdr, __be32 *spi, __be32 *seq);
@@ -1497,18 +1521,20 @@ static inline int xfrm_policy_id2dir(u32 index)
1497 return index & 7; 1521 return index & 7;
1498} 1522}
1499 1523
1500static inline int xfrm_aevent_is_on(void) 1524#ifdef CONFIG_XFRM
1525static inline int xfrm_aevent_is_on(struct net *net)
1501{ 1526{
1502 struct sock *nlsk; 1527 struct sock *nlsk;
1503 int ret = 0; 1528 int ret = 0;
1504 1529
1505 rcu_read_lock(); 1530 rcu_read_lock();
1506 nlsk = rcu_dereference(xfrm_nl); 1531 nlsk = rcu_dereference(net->xfrm.nlsk);
1507 if (nlsk) 1532 if (nlsk)
1508 ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS); 1533 ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS);
1509 rcu_read_unlock(); 1534 rcu_read_unlock();
1510 return ret; 1535 return ret;
1511} 1536}
1537#endif
1512 1538
1513static inline int xfrm_alg_len(struct xfrm_algo *alg) 1539static inline int xfrm_alg_len(struct xfrm_algo *alg)
1514{ 1540{
@@ -1536,9 +1562,11 @@ static inline void xfrm_states_delete(struct xfrm_state **states, int n)
1536} 1562}
1537#endif 1563#endif
1538 1564
1565#ifdef CONFIG_XFRM
1539static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb) 1566static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb)
1540{ 1567{
1541 return skb->sp->xvec[skb->sp->len - 1]; 1568 return skb->sp->xvec[skb->sp->len - 1];
1542} 1569}
1570#endif
1543 1571
1544#endif /* _NET_XFRM_H */ 1572#endif /* _NET_XFRM_H */
diff --git a/include/scsi/fc/fc_els.h b/include/scsi/fc/fc_els.h
new file mode 100644
index 000000000000..195ca014d3ce
--- /dev/null
+++ b/include/scsi/fc/fc_els.h
@@ -0,0 +1,816 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_ELS_H_
21#define _FC_ELS_H_
22
23/*
24 * Fibre Channel Switch - Enhanced Link Services definitions.
25 * From T11 FC-LS Rev 1.2 June 7, 2005.
26 */
27
28/*
29 * ELS Command codes - byte 0 of the frame payload
30 */
31enum fc_els_cmd {
32 ELS_LS_RJT = 0x01, /* ESL reject */
33 ELS_LS_ACC = 0x02, /* ESL Accept */
34 ELS_PLOGI = 0x03, /* N_Port login */
35 ELS_FLOGI = 0x04, /* F_Port login */
36 ELS_LOGO = 0x05, /* Logout */
37 ELS_ABTX = 0x06, /* Abort exchange - obsolete */
38 ELS_RCS = 0x07, /* read connection status */
39 ELS_RES = 0x08, /* read exchange status block */
40 ELS_RSS = 0x09, /* read sequence status block */
41 ELS_RSI = 0x0a, /* read sequence initiative */
42 ELS_ESTS = 0x0b, /* establish streaming */
43 ELS_ESTC = 0x0c, /* estimate credit */
44 ELS_ADVC = 0x0d, /* advise credit */
45 ELS_RTV = 0x0e, /* read timeout value */
46 ELS_RLS = 0x0f, /* read link error status block */
47 ELS_ECHO = 0x10, /* echo */
48 ELS_TEST = 0x11, /* test */
49 ELS_RRQ = 0x12, /* reinstate recovery qualifier */
50 ELS_REC = 0x13, /* read exchange concise */
51 ELS_SRR = 0x14, /* sequence retransmission request */
52 ELS_PRLI = 0x20, /* process login */
53 ELS_PRLO = 0x21, /* process logout */
54 ELS_SCN = 0x22, /* state change notification */
55 ELS_TPLS = 0x23, /* test process login state */
56 ELS_TPRLO = 0x24, /* third party process logout */
57 ELS_LCLM = 0x25, /* login control list mgmt (obs) */
58 ELS_GAID = 0x30, /* get alias_ID */
59 ELS_FACT = 0x31, /* fabric activate alias_id */
60 ELS_FDACDT = 0x32, /* fabric deactivate alias_id */
61 ELS_NACT = 0x33, /* N-port activate alias_id */
62 ELS_NDACT = 0x34, /* N-port deactivate alias_id */
63 ELS_QOSR = 0x40, /* quality of service request */
64 ELS_RVCS = 0x41, /* read virtual circuit status */
65 ELS_PDISC = 0x50, /* discover N_port service params */
66 ELS_FDISC = 0x51, /* discover F_port service params */
67 ELS_ADISC = 0x52, /* discover address */
68 ELS_RNC = 0x53, /* report node cap (obs) */
69 ELS_FARP_REQ = 0x54, /* FC ARP request */
70 ELS_FARP_REPL = 0x55, /* FC ARP reply */
71 ELS_RPS = 0x56, /* read port status block */
72 ELS_RPL = 0x57, /* read port list */
73 ELS_RPBC = 0x58, /* read port buffer condition */
74 ELS_FAN = 0x60, /* fabric address notification */
75 ELS_RSCN = 0x61, /* registered state change notification */
76 ELS_SCR = 0x62, /* state change registration */
77 ELS_RNFT = 0x63, /* report node FC-4 types */
78 ELS_CSR = 0x68, /* clock synch. request */
79 ELS_CSU = 0x69, /* clock synch. update */
80 ELS_LINIT = 0x70, /* loop initialize */
81 ELS_LSTS = 0x72, /* loop status */
82 ELS_RNID = 0x78, /* request node ID data */
83 ELS_RLIR = 0x79, /* registered link incident report */
84 ELS_LIRR = 0x7a, /* link incident record registration */
85 ELS_SRL = 0x7b, /* scan remote loop */
86 ELS_SBRP = 0x7c, /* set bit-error reporting params */
87 ELS_RPSC = 0x7d, /* report speed capabilities */
88 ELS_QSA = 0x7e, /* query security attributes */
89 ELS_EVFP = 0x7f, /* exchange virt. fabrics params */
90 ELS_LKA = 0x80, /* link keep-alive */
91 ELS_AUTH_ELS = 0x90, /* authentication ELS */
92};
93
94/*
95 * Initializer useful for decoding table.
96 * Please keep this in sync with the above definitions.
97 */
98#define FC_ELS_CMDS_INIT { \
99 [ELS_LS_RJT] = "LS_RJT", \
100 [ELS_LS_ACC] = "LS_ACC", \
101 [ELS_PLOGI] = "PLOGI", \
102 [ELS_FLOGI] = "FLOGI", \
103 [ELS_LOGO] = "LOGO", \
104 [ELS_ABTX] = "ABTX", \
105 [ELS_RCS] = "RCS", \
106 [ELS_RES] = "RES", \
107 [ELS_RSS] = "RSS", \
108 [ELS_RSI] = "RSI", \
109 [ELS_ESTS] = "ESTS", \
110 [ELS_ESTC] = "ESTC", \
111 [ELS_ADVC] = "ADVC", \
112 [ELS_RTV] = "RTV", \
113 [ELS_RLS] = "RLS", \
114 [ELS_ECHO] = "ECHO", \
115 [ELS_TEST] = "TEST", \
116 [ELS_RRQ] = "RRQ", \
117 [ELS_REC] = "REC", \
118 [ELS_SRR] = "SRR", \
119 [ELS_PRLI] = "PRLI", \
120 [ELS_PRLO] = "PRLO", \
121 [ELS_SCN] = "SCN", \
122 [ELS_TPLS] = "TPLS", \
123 [ELS_TPRLO] = "TPRLO", \
124 [ELS_LCLM] = "LCLM", \
125 [ELS_GAID] = "GAID", \
126 [ELS_FACT] = "FACT", \
127 [ELS_FDACDT] = "FDACDT", \
128 [ELS_NACT] = "NACT", \
129 [ELS_NDACT] = "NDACT", \
130 [ELS_QOSR] = "QOSR", \
131 [ELS_RVCS] = "RVCS", \
132 [ELS_PDISC] = "PDISC", \
133 [ELS_FDISC] = "FDISC", \
134 [ELS_ADISC] = "ADISC", \
135 [ELS_RNC] = "RNC", \
136 [ELS_FARP_REQ] = "FARP_REQ", \
137 [ELS_FARP_REPL] = "FARP_REPL", \
138 [ELS_RPS] = "RPS", \
139 [ELS_RPL] = "RPL", \
140 [ELS_RPBC] = "RPBC", \
141 [ELS_FAN] = "FAN", \
142 [ELS_RSCN] = "RSCN", \
143 [ELS_SCR] = "SCR", \
144 [ELS_RNFT] = "RNFT", \
145 [ELS_CSR] = "CSR", \
146 [ELS_CSU] = "CSU", \
147 [ELS_LINIT] = "LINIT", \
148 [ELS_LSTS] = "LSTS", \
149 [ELS_RNID] = "RNID", \
150 [ELS_RLIR] = "RLIR", \
151 [ELS_LIRR] = "LIRR", \
152 [ELS_SRL] = "SRL", \
153 [ELS_SBRP] = "SBRP", \
154 [ELS_RPSC] = "RPSC", \
155 [ELS_QSA] = "QSA", \
156 [ELS_EVFP] = "EVFP", \
157 [ELS_LKA] = "LKA", \
158 [ELS_AUTH_ELS] = "AUTH_ELS", \
159}
160
161/*
162 * LS_ACC payload.
163 */
164struct fc_els_ls_acc {
165 __u8 la_cmd; /* command code ELS_LS_ACC */
166 __u8 la_resv[3]; /* reserved */
167};
168
169/*
170 * ELS reject payload.
171 */
172struct fc_els_ls_rjt {
173 __u8 er_cmd; /* command code ELS_LS_RJT */
174 __u8 er_resv[4]; /* reserved must be zero */
175 __u8 er_reason; /* reason (enum fc_els_rjt_reason below) */
176 __u8 er_explan; /* explanation (enum fc_els_rjt_explan below) */
177 __u8 er_vendor; /* vendor specific code */
178};
179
180/*
181 * ELS reject reason codes (er_reason).
182 */
183enum fc_els_rjt_reason {
184 ELS_RJT_NONE = 0, /* no reject - not to be sent */
185 ELS_RJT_INVAL = 0x01, /* invalid ELS command code */
186 ELS_RJT_LOGIC = 0x03, /* logical error */
187 ELS_RJT_BUSY = 0x05, /* logical busy */
188 ELS_RJT_PROT = 0x07, /* protocol error */
189 ELS_RJT_UNAB = 0x09, /* unable to perform command request */
190 ELS_RJT_UNSUP = 0x0b, /* command not supported */
191 ELS_RJT_INPROG = 0x0e, /* command already in progress */
192 ELS_RJT_VENDOR = 0xff, /* vendor specific error */
193};
194
195
196/*
197 * reason code explanation (er_explan).
198 */
199enum fc_els_rjt_explan {
200 ELS_EXPL_NONE = 0x00, /* No additional explanation */
201 ELS_EXPL_SPP_OPT_ERR = 0x01, /* service parameter error - options */
202 ELS_EXPL_SPP_ICTL_ERR = 0x03, /* service parm error - initiator ctl */
203 ELS_EXPL_AH = 0x11, /* invalid association header */
204 ELS_EXPL_AH_REQ = 0x13, /* association_header required */
205 ELS_EXPL_SID = 0x15, /* invalid originator S_ID */
206 ELS_EXPL_OXID_RXID = 0x17, /* invalid OX_ID-RX_ID combination */
207 ELS_EXPL_INPROG = 0x19, /* Request already in progress */
208 ELS_EXPL_PLOGI_REQD = 0x1e, /* N_Port login required */
209 ELS_EXPL_INSUF_RES = 0x29, /* insufficient resources */
210 ELS_EXPL_UNAB_DATA = 0x2a, /* unable to supply requested data */
211 ELS_EXPL_UNSUPR = 0x2c, /* Request not supported */
212 ELS_EXPL_INV_LEN = 0x2d, /* Invalid payload length */
213 /* TBD - above definitions incomplete */
214};
215
216/*
217 * Common service parameters (N ports).
218 */
219struct fc_els_csp {
220 __u8 sp_hi_ver; /* highest version supported (obs.) */
221 __u8 sp_lo_ver; /* highest version supported (obs.) */
222 __be16 sp_bb_cred; /* buffer-to-buffer credits */
223 __be16 sp_features; /* common feature flags */
224 __be16 sp_bb_data; /* b-b state number and data field sz */
225 union {
226 struct {
227 __be16 _sp_tot_seq; /* total concurrent sequences */
228 __be16 _sp_rel_off; /* rel. offset by info cat */
229 } sp_plogi;
230 struct {
231 __be32 _sp_r_a_tov; /* resource alloc. timeout msec */
232 } sp_flogi_acc;
233 } sp_u;
234 __be32 sp_e_d_tov; /* error detect timeout value */
235};
236#define sp_tot_seq sp_u.sp_plogi._sp_tot_seq
237#define sp_rel_off sp_u.sp_plogi._sp_rel_off
238#define sp_r_a_tov sp_u.sp_flogi_acc._sp_r_a_tov
239
240#define FC_SP_BB_DATA_MASK 0xfff /* mask for data field size in sp_bb_data */
241
242/*
243 * Minimum and maximum values for max data field size in service parameters.
244 */
245#define FC_SP_MIN_MAX_PAYLOAD FC_MIN_MAX_PAYLOAD
246#define FC_SP_MAX_MAX_PAYLOAD FC_MAX_PAYLOAD
247
248/*
249 * sp_features
250 */
251#define FC_SP_FT_CIRO 0x8000 /* continuously increasing rel. off. */
252#define FC_SP_FT_CLAD 0x8000 /* clean address (in FLOGI LS_ACC) */
253#define FC_SP_FT_RAND 0x4000 /* random relative offset */
254#define FC_SP_FT_VAL 0x2000 /* valid vendor version level */
255#define FC_SP_FT_FPORT 0x1000 /* F port (1) vs. N port (0) */
256#define FC_SP_FT_ABB 0x0800 /* alternate BB_credit management */
257#define FC_SP_FT_EDTR 0x0400 /* E_D_TOV Resolution is nanoseconds */
258#define FC_SP_FT_MCAST 0x0200 /* multicast */
259#define FC_SP_FT_BCAST 0x0100 /* broadcast */
260#define FC_SP_FT_HUNT 0x0080 /* hunt group */
261#define FC_SP_FT_SIMP 0x0040 /* dedicated simplex */
262#define FC_SP_FT_SEC 0x0020 /* reserved for security */
263#define FC_SP_FT_CSYN 0x0010 /* clock synch. supported */
264#define FC_SP_FT_RTTOV 0x0008 /* R_T_TOV value 100 uS, else 100 mS */
265#define FC_SP_FT_HALF 0x0004 /* dynamic half duplex */
266#define FC_SP_FT_SEQC 0x0002 /* SEQ_CNT */
267#define FC_SP_FT_PAYL 0x0001 /* FLOGI payload length 256, else 116 */
268
269/*
270 * Class-specific service parameters.
271 */
272struct fc_els_cssp {
273 __be16 cp_class; /* class flags */
274 __be16 cp_init; /* initiator flags */
275 __be16 cp_recip; /* recipient flags */
276 __be16 cp_rdfs; /* receive data field size */
277 __be16 cp_con_seq; /* concurrent sequences */
278 __be16 cp_ee_cred; /* N-port end-to-end credit */
279 __u8 cp_resv1; /* reserved */
280 __u8 cp_open_seq; /* open sequences per exchange */
281 __u8 _cp_resv2[2]; /* reserved */
282};
283
284/*
285 * cp_class flags.
286 */
287#define FC_CPC_VALID 0x8000 /* class valid */
288#define FC_CPC_IMIX 0x4000 /* intermix mode */
289#define FC_CPC_SEQ 0x0800 /* sequential delivery */
290#define FC_CPC_CAMP 0x0200 /* camp-on */
291#define FC_CPC_PRI 0x0080 /* priority */
292
293/*
294 * cp_init flags.
295 * (TBD: not all flags defined here).
296 */
297#define FC_CPI_CSYN 0x0010 /* clock synch. capable */
298
299/*
300 * cp_recip flags.
301 */
302#define FC_CPR_CSYN 0x0008 /* clock synch. capable */
303
304/*
305 * NFC_ELS_FLOGI: Fabric login request.
306 * NFC_ELS_PLOGI: Port login request (same format).
307 */
308struct fc_els_flogi {
309 __u8 fl_cmd; /* command */
310 __u8 _fl_resvd[3]; /* must be zero */
311 struct fc_els_csp fl_csp; /* common service parameters */
312 __be64 fl_wwpn; /* port name */
313 __be64 fl_wwnn; /* node name */
314 struct fc_els_cssp fl_cssp[4]; /* class 1-4 service parameters */
315 __u8 fl_vend[16]; /* vendor version level */
316} __attribute__((__packed__));
317
318/*
319 * Process login service parameter page.
320 */
321struct fc_els_spp {
322 __u8 spp_type; /* type code or common service params */
323 __u8 spp_type_ext; /* type code extension */
324 __u8 spp_flags;
325 __u8 _spp_resvd;
326 __be32 spp_orig_pa; /* originator process associator */
327 __be32 spp_resp_pa; /* responder process associator */
328 __be32 spp_params; /* service parameters */
329};
330
331/*
332 * spp_flags.
333 */
334#define FC_SPP_OPA_VAL 0x80 /* originator proc. assoc. valid */
335#define FC_SPP_RPA_VAL 0x40 /* responder proc. assoc. valid */
336#define FC_SPP_EST_IMG_PAIR 0x20 /* establish image pair */
337#define FC_SPP_RESP_MASK 0x0f /* mask for response code (below) */
338
339/*
340 * SPP response code in spp_flags - lower 4 bits.
341 */
342enum fc_els_spp_resp {
343 FC_SPP_RESP_ACK = 1, /* request executed */
344 FC_SPP_RESP_RES = 2, /* unable due to lack of resources */
345 FC_SPP_RESP_INIT = 3, /* initialization not complete */
346 FC_SPP_RESP_NO_PA = 4, /* unknown process associator */
347 FC_SPP_RESP_CONF = 5, /* configuration precludes image pair */
348 FC_SPP_RESP_COND = 6, /* request completed conditionally */
349 FC_SPP_RESP_MULT = 7, /* unable to handle multiple SPPs */
350 FC_SPP_RESP_INVL = 8, /* SPP is invalid */
351};
352
353/*
354 * ELS_RRQ - Reinstate Recovery Qualifier
355 */
356struct fc_els_rrq {
357 __u8 rrq_cmd; /* command (0x12) */
358 __u8 rrq_zero[3]; /* specified as zero - part of cmd */
359 __u8 rrq_resvd; /* reserved */
360 __u8 rrq_s_id[3]; /* originator FID */
361 __be16 rrq_ox_id; /* originator exchange ID */
362 __be16 rrq_rx_id; /* responders exchange ID */
363};
364
365/*
366 * ELS_REC - Read exchange concise.
367 */
368struct fc_els_rec {
369 __u8 rec_cmd; /* command (0x13) */
370 __u8 rec_zero[3]; /* specified as zero - part of cmd */
371 __u8 rec_resvd; /* reserved */
372 __u8 rec_s_id[3]; /* originator FID */
373 __be16 rec_ox_id; /* originator exchange ID */
374 __be16 rec_rx_id; /* responders exchange ID */
375};
376
377/*
378 * ELS_REC LS_ACC payload.
379 */
380struct fc_els_rec_acc {
381 __u8 reca_cmd; /* accept (0x02) */
382 __u8 reca_zero[3]; /* specified as zero - part of cmd */
383 __be16 reca_ox_id; /* originator exchange ID */
384 __be16 reca_rx_id; /* responders exchange ID */
385 __u8 reca_resvd1; /* reserved */
386 __u8 reca_ofid[3]; /* originator FID */
387 __u8 reca_resvd2; /* reserved */
388 __u8 reca_rfid[3]; /* responder FID */
389 __be32 reca_fc4value; /* FC4 value */
390 __be32 reca_e_stat; /* ESB (exchange status block) status */
391};
392
393/*
394 * ELS_PRLI - Process login request and response.
395 */
396struct fc_els_prli {
397 __u8 prli_cmd; /* command */
398 __u8 prli_spp_len; /* length of each serv. parm. page */
399 __be16 prli_len; /* length of entire payload */
400 /* service parameter pages follow */
401};
402
403/*
404 * ELS_ADISC payload
405 */
406struct fc_els_adisc {
407 __u8 adisc_cmd;
408 __u8 adisc_resv[3];
409 __u8 adisc_resv1;
410 __u8 adisc_hard_addr[3];
411 __be64 adisc_wwpn;
412 __be64 adisc_wwnn;
413 __u8 adisc_resv2;
414 __u8 adisc_port_id[3];
415} __attribute__((__packed__));
416
417/*
418 * ELS_LOGO - process or fabric logout.
419 */
420struct fc_els_logo {
421 __u8 fl_cmd; /* command code */
422 __u8 fl_zero[3]; /* specified as zero - part of cmd */
423 __u8 fl_resvd; /* reserved */
424 __u8 fl_n_port_id[3];/* N port ID */
425 __be64 fl_n_port_wwn; /* port name */
426};
427
428/*
429 * ELS_RTV - read timeout value.
430 */
431struct fc_els_rtv {
432 __u8 rtv_cmd; /* command code 0x0e */
433 __u8 rtv_zero[3]; /* specified as zero - part of cmd */
434};
435
436/*
437 * LS_ACC for ELS_RTV - read timeout value.
438 */
439struct fc_els_rtv_acc {
440 __u8 rtv_cmd; /* command code 0x02 */
441 __u8 rtv_zero[3]; /* specified as zero - part of cmd */
442 __be32 rtv_r_a_tov; /* resource allocation timeout value */
443 __be32 rtv_e_d_tov; /* error detection timeout value */
444 __be32 rtv_toq; /* timeout qualifier (see below) */
445};
446
447/*
448 * rtv_toq bits.
449 */
450#define FC_ELS_RTV_EDRES (1 << 26) /* E_D_TOV resolution is nS else mS */
451#define FC_ELS_RTV_RTTOV (1 << 19) /* R_T_TOV is 100 uS else 100 mS */
452
453/*
454 * ELS_SCR - state change registration payload.
455 */
456struct fc_els_scr {
457 __u8 scr_cmd; /* command code */
458 __u8 scr_resv[6]; /* reserved */
459 __u8 scr_reg_func; /* registration function (see below) */
460};
461
462enum fc_els_scr_func {
463 ELS_SCRF_FAB = 1, /* fabric-detected registration */
464 ELS_SCRF_NPORT = 2, /* Nx_Port-detected registration */
465 ELS_SCRF_FULL = 3, /* full registration */
466 ELS_SCRF_CLEAR = 255, /* remove any current registrations */
467};
468
469/*
470 * ELS_RSCN - registered state change notification payload.
471 */
472struct fc_els_rscn {
473 __u8 rscn_cmd; /* RSCN opcode (0x61) */
474 __u8 rscn_page_len; /* page length (4) */
475 __be16 rscn_plen; /* payload length including this word */
476
477 /* followed by 4-byte generic affected Port_ID pages */
478};
479
480struct fc_els_rscn_page {
481 __u8 rscn_page_flags; /* event and address format */
482 __u8 rscn_fid[3]; /* fabric ID */
483};
484
485#define ELS_RSCN_EV_QUAL_BIT 2 /* shift count for event qualifier */
486#define ELS_RSCN_EV_QUAL_MASK 0xf /* mask for event qualifier */
487#define ELS_RSCN_ADDR_FMT_BIT 0 /* shift count for address format */
488#define ELS_RSCN_ADDR_FMT_MASK 0x3 /* mask for address format */
489
490enum fc_els_rscn_ev_qual {
491 ELS_EV_QUAL_NONE = 0, /* unspecified */
492 ELS_EV_QUAL_NS_OBJ = 1, /* changed name server object */
493 ELS_EV_QUAL_PORT_ATTR = 2, /* changed port attribute */
494 ELS_EV_QUAL_SERV_OBJ = 3, /* changed service object */
495 ELS_EV_QUAL_SW_CONFIG = 4, /* changed switch configuration */
496 ELS_EV_QUAL_REM_OBJ = 5, /* removed object */
497};
498
499enum fc_els_rscn_addr_fmt {
500 ELS_ADDR_FMT_PORT = 0, /* rscn_fid is a port address */
501 ELS_ADDR_FMT_AREA = 1, /* rscn_fid is a area address */
502 ELS_ADDR_FMT_DOM = 2, /* rscn_fid is a domain address */
503 ELS_ADDR_FMT_FAB = 3, /* anything on fabric may have changed */
504};
505
506/*
507 * ELS_RNID - request Node ID.
508 */
509struct fc_els_rnid {
510 __u8 rnid_cmd; /* RNID opcode (0x78) */
511 __u8 rnid_resv[3]; /* reserved */
512 __u8 rnid_fmt; /* data format */
513 __u8 rnid_resv2[3]; /* reserved */
514};
515
516/*
517 * Node Identification Data formats (rnid_fmt)
518 */
519enum fc_els_rnid_fmt {
520 ELS_RNIDF_NONE = 0, /* no specific identification data */
521 ELS_RNIDF_GEN = 0xdf, /* general topology discovery format */
522};
523
524/*
525 * ELS_RNID response.
526 */
527struct fc_els_rnid_resp {
528 __u8 rnid_cmd; /* response code (LS_ACC) */
529 __u8 rnid_resv[3]; /* reserved */
530 __u8 rnid_fmt; /* data format */
531 __u8 rnid_cid_len; /* common ID data length */
532 __u8 rnid_resv2; /* reserved */
533 __u8 rnid_sid_len; /* specific ID data length */
534};
535
536struct fc_els_rnid_cid {
537 __be64 rnid_wwpn; /* N port name */
538 __be64 rnid_wwnn; /* node name */
539};
540
541struct fc_els_rnid_gen {
542 __u8 rnid_vend_id[16]; /* vendor-unique ID */
543 __be32 rnid_atype; /* associated type (see below) */
544 __be32 rnid_phys_port; /* physical port number */
545 __be32 rnid_att_nodes; /* number of attached nodes */
546 __u8 rnid_node_mgmt; /* node management (see below) */
547 __u8 rnid_ip_ver; /* IP version (see below) */
548 __be16 rnid_prot_port; /* UDP / TCP port number */
549 __be32 rnid_ip_addr[4]; /* IP address */
550 __u8 rnid_resvd[2]; /* reserved */
551 __be16 rnid_vend_spec; /* vendor-specific field */
552};
553
554enum fc_els_rnid_atype {
555 ELS_RNIDA_UNK = 0x01, /* unknown */
556 ELS_RNIDA_OTHER = 0x02, /* none of the following */
557 ELS_RNIDA_HUB = 0x03,
558 ELS_RNIDA_SWITCH = 0x04,
559 ELS_RNIDA_GATEWAY = 0x05,
560 ELS_RNIDA_CONV = 0x06, /* Obsolete, do not use this value */
561 ELS_RNIDA_HBA = 0x07, /* Obsolete, do not use this value */
562 ELS_RNIDA_PROXY = 0x08, /* Obsolete, do not use this value */
563 ELS_RNIDA_STORAGE = 0x09,
564 ELS_RNIDA_HOST = 0x0a,
565 ELS_RNIDA_SUBSYS = 0x0b, /* storage subsystem (e.g., RAID) */
566 ELS_RNIDA_ACCESS = 0x0e, /* access device (e.g. media changer) */
567 ELS_RNIDA_NAS = 0x11, /* NAS server */
568 ELS_RNIDA_BRIDGE = 0x12, /* bridge */
569 ELS_RNIDA_VIRT = 0x13, /* virtualization device */
570 ELS_RNIDA_MF = 0xff, /* multifunction device (bits below) */
571 ELS_RNIDA_MF_HUB = 1UL << 31, /* hub */
572 ELS_RNIDA_MF_SW = 1UL << 30, /* switch */
573 ELS_RNIDA_MF_GW = 1UL << 29, /* gateway */
574 ELS_RNIDA_MF_ST = 1UL << 28, /* storage */
575 ELS_RNIDA_MF_HOST = 1UL << 27, /* host */
576 ELS_RNIDA_MF_SUB = 1UL << 26, /* storage subsystem */
577 ELS_RNIDA_MF_ACC = 1UL << 25, /* storage access dev */
578 ELS_RNIDA_MF_WDM = 1UL << 24, /* wavelength division mux */
579 ELS_RNIDA_MF_NAS = 1UL << 23, /* NAS server */
580 ELS_RNIDA_MF_BR = 1UL << 22, /* bridge */
581 ELS_RNIDA_MF_VIRT = 1UL << 21, /* virtualization device */
582};
583
584enum fc_els_rnid_mgmt {
585 ELS_RNIDM_SNMP = 0,
586 ELS_RNIDM_TELNET = 1,
587 ELS_RNIDM_HTTP = 2,
588 ELS_RNIDM_HTTPS = 3,
589 ELS_RNIDM_XML = 4, /* HTTP + XML */
590};
591
592enum fc_els_rnid_ipver {
593 ELS_RNIDIP_NONE = 0, /* no IP support or node mgmt. */
594 ELS_RNIDIP_V4 = 1, /* IPv4 */
595 ELS_RNIDIP_V6 = 2, /* IPv6 */
596};
597
598/*
599 * ELS RPL - Read Port List.
600 */
601struct fc_els_rpl {
602 __u8 rpl_cmd; /* command */
603 __u8 rpl_resv[5]; /* reserved - must be zero */
604 __be16 rpl_max_size; /* maximum response size or zero */
605 __u8 rpl_resv1; /* reserved - must be zero */
606 __u8 rpl_index[3]; /* starting index */
607};
608
609/*
610 * Port number block in RPL response.
611 */
612struct fc_els_pnb {
613 __be32 pnb_phys_pn; /* physical port number */
614 __u8 pnb_resv; /* reserved */
615 __u8 pnb_port_id[3]; /* port ID */
616 __be64 pnb_wwpn; /* port name */
617};
618
619/*
620 * RPL LS_ACC response.
621 */
622struct fc_els_rpl_resp {
623 __u8 rpl_cmd; /* ELS_LS_ACC */
624 __u8 rpl_resv1; /* reserved - must be zero */
625 __be16 rpl_plen; /* payload length */
626 __u8 rpl_resv2; /* reserved - must be zero */
627 __u8 rpl_llen[3]; /* list length */
628 __u8 rpl_resv3; /* reserved - must be zero */
629 __u8 rpl_index[3]; /* starting index */
630 struct fc_els_pnb rpl_pnb[1]; /* variable number of PNBs */
631};
632
633/*
634 * Link Error Status Block.
635 */
636struct fc_els_lesb {
637 __be32 lesb_link_fail; /* link failure count */
638 __be32 lesb_sync_loss; /* loss of synchronization count */
639 __be32 lesb_sig_loss; /* loss of signal count */
640 __be32 lesb_prim_err; /* primitive sequence error count */
641 __be32 lesb_inv_word; /* invalid transmission word count */
642 __be32 lesb_inv_crc; /* invalid CRC count */
643};
644
645/*
646 * ELS RPS - Read Port Status Block request.
647 */
648struct fc_els_rps {
649 __u8 rps_cmd; /* command */
650 __u8 rps_resv[2]; /* reserved - must be zero */
651 __u8 rps_flag; /* flag - see below */
652 __be64 rps_port_spec; /* port selection */
653};
654
655enum fc_els_rps_flag {
656 FC_ELS_RPS_DID = 0x00, /* port identified by D_ID of req. */
657 FC_ELS_RPS_PPN = 0x01, /* port_spec is physical port number */
658 FC_ELS_RPS_WWPN = 0x02, /* port_spec is port WWN */
659};
660
661/*
662 * ELS RPS LS_ACC response.
663 */
664struct fc_els_rps_resp {
665 __u8 rps_cmd; /* command - LS_ACC */
666 __u8 rps_resv[2]; /* reserved - must be zero */
667 __u8 rps_flag; /* flag - see below */
668 __u8 rps_resv2[2]; /* reserved */
669 __be16 rps_status; /* port status - see below */
670 struct fc_els_lesb rps_lesb; /* link error status block */
671};
672
673enum fc_els_rps_resp_flag {
674 FC_ELS_RPS_LPEV = 0x01, /* L_port extension valid */
675};
676
677enum fc_els_rps_resp_status {
678 FC_ELS_RPS_PTP = 1 << 5, /* point-to-point connection */
679 FC_ELS_RPS_LOOP = 1 << 4, /* loop mode */
680 FC_ELS_RPS_FAB = 1 << 3, /* fabric present */
681 FC_ELS_RPS_NO_SIG = 1 << 2, /* loss of signal */
682 FC_ELS_RPS_NO_SYNC = 1 << 1, /* loss of synchronization */
683 FC_ELS_RPS_RESET = 1 << 0, /* in link reset protocol */
684};
685
686/*
687 * ELS LIRR - Link Incident Record Registration request.
688 */
689struct fc_els_lirr {
690 __u8 lirr_cmd; /* command */
691 __u8 lirr_resv[3]; /* reserved - must be zero */
692 __u8 lirr_func; /* registration function */
693 __u8 lirr_fmt; /* FC-4 type of RLIR requested */
694 __u8 lirr_resv2[2]; /* reserved - must be zero */
695};
696
697enum fc_els_lirr_func {
698 ELS_LIRR_SET_COND = 0x01, /* set - conditionally receive */
699 ELS_LIRR_SET_UNCOND = 0x02, /* set - unconditionally receive */
700 ELS_LIRR_CLEAR = 0xff /* clear registration */
701};
702
703/*
704 * ELS SRL - Scan Remote Loop request.
705 */
706struct fc_els_srl {
707 __u8 srl_cmd; /* command */
708 __u8 srl_resv[3]; /* reserved - must be zero */
709 __u8 srl_flag; /* flag - see below */
710 __u8 srl_flag_param[3]; /* flag parameter */
711};
712
713enum fc_els_srl_flag {
714 FC_ELS_SRL_ALL = 0x00, /* scan all FL ports */
715 FC_ELS_SRL_ONE = 0x01, /* scan specified loop */
716 FC_ELS_SRL_EN_PER = 0x02, /* enable periodic scanning (param) */
717 FC_ELS_SRL_DIS_PER = 0x03, /* disable periodic scanning */
718};
719
720/*
721 * ELS RLS - Read Link Error Status Block request.
722 */
723struct fc_els_rls {
724 __u8 rls_cmd; /* command */
725 __u8 rls_resv[4]; /* reserved - must be zero */
726 __u8 rls_port_id[3]; /* port ID */
727};
728
729/*
730 * ELS RLS LS_ACC Response.
731 */
732struct fc_els_rls_resp {
733 __u8 rls_cmd; /* ELS_LS_ACC */
734 __u8 rls_resv[3]; /* reserved - must be zero */
735 struct fc_els_lesb rls_lesb; /* link error status block */
736};
737
738/*
739 * ELS RLIR - Registered Link Incident Report.
740 * This is followed by the CLIR and the CLID, described below.
741 */
742struct fc_els_rlir {
743 __u8 rlir_cmd; /* command */
744 __u8 rlir_resv[3]; /* reserved - must be zero */
745 __u8 rlir_fmt; /* format (FC4-type if type specific) */
746 __u8 rlir_clr_len; /* common link incident record length */
747 __u8 rlir_cld_len; /* common link incident desc. length */
748 __u8 rlir_slr_len; /* spec. link incident record length */
749};
750
751/*
752 * CLIR - Common Link Incident Record Data. - Sent via RLIR.
753 */
754struct fc_els_clir {
755 __be64 clir_wwpn; /* incident port name */
756 __be64 clir_wwnn; /* incident port node name */
757 __u8 clir_port_type; /* incident port type */
758 __u8 clir_port_id[3]; /* incident port ID */
759
760 __be64 clir_conn_wwpn; /* connected port name */
761 __be64 clir_conn_wwnn; /* connected node name */
762 __be64 clir_fab_name; /* fabric name */
763 __be32 clir_phys_port; /* physical port number */
764 __be32 clir_trans_id; /* transaction ID */
765 __u8 clir_resv[3]; /* reserved */
766 __u8 clir_ts_fmt; /* time stamp format */
767 __be64 clir_timestamp; /* time stamp */
768};
769
770/*
771 * CLIR clir_ts_fmt - time stamp format values.
772 */
773enum fc_els_clir_ts_fmt {
774 ELS_CLIR_TS_UNKNOWN = 0, /* time stamp field unknown */
775 ELS_CLIR_TS_SEC_FRAC = 1, /* time in seconds and fractions */
776 ELS_CLIR_TS_CSU = 2, /* time in clock synch update format */
777};
778
779/*
780 * Common Link Incident Descriptor - sent via RLIR.
781 */
782struct fc_els_clid {
783 __u8 clid_iq; /* incident qualifier flags */
784 __u8 clid_ic; /* incident code */
785 __be16 clid_epai; /* domain/area of ISL */
786};
787
788/*
789 * CLID incident qualifier flags.
790 */
791enum fc_els_clid_iq {
792 ELS_CLID_SWITCH = 0x20, /* incident port is a switch node */
793 ELS_CLID_E_PORT = 0x10, /* incident is an ISL (E) port */
794 ELS_CLID_SEV_MASK = 0x0c, /* severity 2-bit field mask */
795 ELS_CLID_SEV_INFO = 0x00, /* report is informational */
796 ELS_CLID_SEV_INOP = 0x08, /* link not operational */
797 ELS_CLID_SEV_DEG = 0x04, /* link degraded but operational */
798 ELS_CLID_LASER = 0x02, /* subassembly is a laser */
799 ELS_CLID_FRU = 0x01, /* format can identify a FRU */
800};
801
802/*
803 * CLID incident code.
804 */
805enum fc_els_clid_ic {
806 ELS_CLID_IC_IMPL = 1, /* implicit incident */
807 ELS_CLID_IC_BER = 2, /* bit-error-rate threshold exceeded */
808 ELS_CLID_IC_LOS = 3, /* loss of synch or signal */
809 ELS_CLID_IC_NOS = 4, /* non-operational primitive sequence */
810 ELS_CLID_IC_PST = 5, /* primitive sequence timeout */
811 ELS_CLID_IC_INVAL = 6, /* invalid primitive sequence */
812 ELS_CLID_IC_LOOP_TO = 7, /* loop initialization time out */
813 ELS_CLID_IC_LIP = 8, /* receiving LIP */
814};
815
816#endif /* _FC_ELS_H_ */
diff --git a/include/scsi/fc/fc_encaps.h b/include/scsi/fc/fc_encaps.h
new file mode 100644
index 000000000000..f180c3e16220
--- /dev/null
+++ b/include/scsi/fc/fc_encaps.h
@@ -0,0 +1,138 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19#ifndef _FC_ENCAPS_H_
20#define _FC_ENCAPS_H_
21
22/*
23 * Protocol definitions from RFC 3643 - Fibre Channel Frame Encapsulation.
24 *
25 * Note: The frame length field is the number of 32-bit words in
26 * the encapsulation including the fcip_encaps_header, CRC and EOF words.
27 * The minimum frame length value in bytes is (32 + 24 + 4 + 4) * 4 = 64.
28 * The maximum frame length value in bytes is (32 + 24 + 2112 + 4 + 4) = 2172.
29 */
30#define FC_ENCAPS_MIN_FRAME_LEN 64 /* min frame len (bytes) (see above) */
31#define FC_ENCAPS_MAX_FRAME_LEN (FC_ENCAPS_MIN_FRAME_LEN + FC_MAX_PAYLOAD)
32
33#define FC_ENCAPS_VER 1 /* current version number */
34
35struct fc_encaps_hdr {
36 __u8 fc_proto; /* protocol number */
37 __u8 fc_ver; /* version of encapsulation */
38 __u8 fc_proto_n; /* ones complement of protocol */
39 __u8 fc_ver_n; /* ones complement of version */
40
41 unsigned char fc_proto_data[8]; /* protocol specific data */
42
43 __be16 fc_len_flags; /* 10-bit length/4 w/ 6 flag bits */
44 __be16 fc_len_flags_n; /* ones complement of length / flags */
45
46 /*
47 * Offset 0x10
48 */
49 __be32 fc_time[2]; /* time stamp: seconds and fraction */
50 __be32 fc_crc; /* CRC */
51 __be32 fc_sof; /* start of frame (see FC_SOF below) */
52
53 /* 0x20 - FC frame content followed by EOF word */
54};
55
56#define FCIP_ENCAPS_HDR_LEN 0x20 /* expected length for asserts */
57
58/*
59 * Macro's for making redundant copies of EOF and SOF.
60 */
61#define FC_XY(x, y) ((((x) & 0xff) << 8) | ((y) & 0xff))
62#define FC_XYXY(x, y) ((FCIP_XY(x, y) << 16) | FCIP_XY(x, y))
63#define FC_XYNN(x, y) (FCIP_XYXY(x, y) ^ 0xffff)
64
65#define FC_SOF_ENCODE(n) FC_XYNN(n, n)
66#define FC_EOF_ENCODE(n) FC_XYNN(n, n)
67
68/*
69 * SOF / EOF bytes.
70 */
71enum fc_sof {
72 FC_SOF_F = 0x28, /* fabric */
73 FC_SOF_I4 = 0x29, /* initiate class 4 */
74 FC_SOF_I2 = 0x2d, /* initiate class 2 */
75 FC_SOF_I3 = 0x2e, /* initiate class 3 */
76 FC_SOF_N4 = 0x31, /* normal class 4 */
77 FC_SOF_N2 = 0x35, /* normal class 2 */
78 FC_SOF_N3 = 0x36, /* normal class 3 */
79 FC_SOF_C4 = 0x39, /* activate class 4 */
80} __attribute__((packed));
81
82enum fc_eof {
83 FC_EOF_N = 0x41, /* normal (not last frame of seq) */
84 FC_EOF_T = 0x42, /* terminate (last frame of sequence) */
85 FC_EOF_RT = 0x44,
86 FC_EOF_DT = 0x46, /* disconnect-terminate class-1 */
87 FC_EOF_NI = 0x49, /* normal-invalid */
88 FC_EOF_DTI = 0x4e, /* disconnect-terminate-invalid */
89 FC_EOF_RTI = 0x4f,
90 FC_EOF_A = 0x50, /* abort */
91} __attribute__((packed));
92
93#define FC_SOF_CLASS_MASK 0x06 /* mask for class of service in SOF */
94
95/*
96 * Define classes in terms of the SOF code (initial).
97 */
98enum fc_class {
99 FC_CLASS_NONE = 0, /* software value indicating no class */
100 FC_CLASS_2 = FC_SOF_I2,
101 FC_CLASS_3 = FC_SOF_I3,
102 FC_CLASS_4 = FC_SOF_I4,
103 FC_CLASS_F = FC_SOF_F,
104};
105
106/*
107 * Determine whether SOF code indicates the need for a BLS ACK.
108 */
109static inline int fc_sof_needs_ack(enum fc_sof sof)
110{
111 return (~sof) & 0x02; /* true for class 1, 2, 4, 6, or F */
112}
113
114/*
115 * Given an fc_class, return the normal (non-initial) SOF value.
116 */
117static inline enum fc_sof fc_sof_normal(enum fc_class class)
118{
119 return class + FC_SOF_N3 - FC_SOF_I3; /* diff is always 8 */
120}
121
122/*
123 * Compute class from SOF value.
124 */
125static inline enum fc_class fc_sof_class(enum fc_sof sof)
126{
127 return (sof & 0x7) | FC_SOF_F;
128}
129
130/*
131 * Determine whether SOF is for the initial frame of a sequence.
132 */
133static inline int fc_sof_is_init(enum fc_sof sof)
134{
135 return sof < 0x30;
136}
137
138#endif /* _FC_ENCAPS_H_ */
diff --git a/include/scsi/fc/fc_fc2.h b/include/scsi/fc/fc_fc2.h
new file mode 100644
index 000000000000..cff8a8c22f50
--- /dev/null
+++ b/include/scsi/fc/fc_fc2.h
@@ -0,0 +1,124 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_FC2_H_
21#define _FC_FC2_H_
22
23/*
24 * Fibre Channel Exchanges and Sequences.
25 */
26#ifndef PACKED
27#define PACKED __attribute__ ((__packed__))
28#endif /* PACKED */
29
30
31/*
32 * Sequence Status Block.
33 * This format is set by the FC-FS standard and is sent over the wire.
34 * Note that the fields aren't all naturally aligned.
35 */
36struct fc_ssb {
37 __u8 ssb_seq_id; /* sequence ID */
38 __u8 _ssb_resvd;
39 __be16 ssb_low_seq_cnt; /* lowest SEQ_CNT */
40
41 __be16 ssb_high_seq_cnt; /* highest SEQ_CNT */
42 __be16 ssb_s_stat; /* sequence status flags */
43
44 __be16 ssb_err_seq_cnt; /* error SEQ_CNT */
45 __u8 ssb_fh_cs_ctl; /* frame header CS_CTL */
46 __be16 ssb_fh_ox_id; /* frame header OX_ID */
47 __be16 ssb_rx_id; /* responder's exchange ID */
48 __u8 _ssb_resvd2[2];
49} PACKED;
50
51/*
52 * The SSB should be 17 bytes. Since it's layout is somewhat strange,
53 * we define the size here so that code can ASSERT that the size comes out
54 * correct.
55 */
56#define FC_SSB_SIZE 17 /* length of fc_ssb for assert */
57
58/*
59 * ssb_s_stat - flags from FC-FS-2 T11/1619-D Rev 0.90.
60 */
61#define SSB_ST_RESP (1 << 15) /* sequence responder */
62#define SSB_ST_ACTIVE (1 << 14) /* sequence is active */
63#define SSB_ST_ABNORMAL (1 << 12) /* abnormal ending condition */
64
65#define SSB_ST_REQ_MASK (3 << 10) /* ACK, abort sequence condition */
66#define SSB_ST_REQ_CONT (0 << 10)
67#define SSB_ST_REQ_ABORT (1 << 10)
68#define SSB_ST_REQ_STOP (2 << 10)
69#define SSB_ST_REQ_RETRANS (3 << 10)
70
71#define SSB_ST_ABTS (1 << 9) /* ABTS protocol completed */
72#define SSB_ST_RETRANS (1 << 8) /* retransmission completed */
73#define SSB_ST_TIMEOUT (1 << 7) /* sequence timed out by recipient */
74#define SSB_ST_P_RJT (1 << 6) /* P_RJT transmitted */
75
76#define SSB_ST_CLASS_BIT 4 /* class of service field LSB */
77#define SSB_ST_CLASS_MASK 3 /* class of service mask */
78#define SSB_ST_ACK (1 << 3) /* ACK (EOFt or EOFdt) transmitted */
79
80/*
81 * Exchange Status Block.
82 * This format is set by the FC-FS standard and is sent over the wire.
83 * Note that the fields aren't all naturally aligned.
84 */
85struct fc_esb {
86 __u8 esb_cs_ctl; /* CS_CTL for frame header */
87 __be16 esb_ox_id; /* originator exchange ID */
88 __be16 esb_rx_id; /* responder exchange ID */
89 __be32 esb_orig_fid; /* fabric ID of originator */
90 __be32 esb_resp_fid; /* fabric ID of responder */
91 __be32 esb_e_stat; /* status */
92 __u8 _esb_resvd[4];
93 __u8 esb_service_params[112]; /* TBD */
94 __u8 esb_seq_status[8]; /* sequence statuses, 8 bytes each */
95} __attribute__((packed));;
96
97
98/*
99 * Define expected size for ASSERTs.
100 * See comments on FC_SSB_SIZE.
101 */
102#define FC_ESB_SIZE (1 + 5*4 + 112 + 8) /* expected size */
103
104/*
105 * esb_e_stat - flags from FC-FS-2 T11/1619-D Rev 0.90.
106 */
107#define ESB_ST_RESP (1 << 31) /* responder to exchange */
108#define ESB_ST_SEQ_INIT (1 << 30) /* port holds sequence initiaive */
109#define ESB_ST_COMPLETE (1 << 29) /* exchange is complete */
110#define ESB_ST_ABNORMAL (1 << 28) /* abnormal ending condition */
111#define ESB_ST_REC_QUAL (1 << 26) /* recovery qualifier active */
112
113#define ESB_ST_ERRP_BIT 24 /* LSB for error policy */
114#define ESB_ST_ERRP_MASK (3 << 24) /* mask for error policy */
115#define ESB_ST_ERRP_MULT (0 << 24) /* abort, discard multiple sequences */
116#define ESB_ST_ERRP_SING (1 << 24) /* abort, discard single sequence */
117#define ESB_ST_ERRP_INF (2 << 24) /* process with infinite buffers */
118#define ESB_ST_ERRP_IMM (3 << 24) /* discard mult. with immed. retran. */
119
120#define ESB_ST_OX_ID_INVL (1 << 23) /* originator XID invalid */
121#define ESB_ST_RX_ID_INVL (1 << 22) /* responder XID invalid */
122#define ESB_ST_PRI_INUSE (1 << 21) /* priority / preemption in use */
123
124#endif /* _FC_FC2_H_ */
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h
new file mode 100644
index 000000000000..57aaa8f0d613
--- /dev/null
+++ b/include/scsi/fc/fc_fcoe.h
@@ -0,0 +1,114 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_FCOE_H_
21#define _FC_FCOE_H_
22
23/*
24 * FCoE - Fibre Channel over Ethernet.
25 */
26
27/*
28 * The FCoE ethertype eventually goes in net/if_ether.h.
29 */
30#ifndef ETH_P_FCOE
31#define ETH_P_FCOE 0x8906 /* FCOE ether type */
32#endif
33
34#ifndef ETH_P_8021Q
35#define ETH_P_8021Q 0x8100
36#endif
37
38/*
39 * FC_FCOE_OUI hasn't been standardized yet. XXX TBD.
40 */
41#ifndef FC_FCOE_OUI
42#define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE dest MAC TBD */
43#endif
44
45/*
46 * The destination MAC address for the fabric login may get a different OUI.
47 * This isn't standardized yet.
48 */
49#ifndef FC_FCOE_FLOGI_MAC
50/* gateway MAC - TBD */
51#define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe }
52#endif
53
54#define FC_FCOE_VER 0 /* version */
55
56/*
57 * Ethernet Addresses based on FC S_ID and D_ID.
58 * Generated by FC_FCOE_OUI | S_ID/D_ID
59 */
60#define FC_FCOE_ENCAPS_ID(n) (((u64) FC_FCOE_OUI << 24) | (n))
61#define FC_FCOE_DECAPS_ID(n) ((n) >> 24)
62
63/*
64 * FCoE frame header - 14 bytes
65 *
66 * This is the August 2007 version of the FCoE header as defined by T11.
67 * This follows the VLAN header, which includes the ethertype.
68 */
69struct fcoe_hdr {
70 __u8 fcoe_ver; /* version field - upper 4 bits */
71 __u8 fcoe_resvd[12]; /* reserved - send zero and ignore */
72 __u8 fcoe_sof; /* start of frame per RFC 3643 */
73};
74
75#define FC_FCOE_DECAPS_VER(hp) ((hp)->fcoe_ver >> 4)
76#define FC_FCOE_ENCAPS_VER(hp, ver) ((hp)->fcoe_ver = (ver) << 4)
77
78/*
79 * FCoE CRC & EOF - 8 bytes.
80 */
81struct fcoe_crc_eof {
82 __le32 fcoe_crc32; /* CRC for FC packet */
83 __u8 fcoe_eof; /* EOF from RFC 3643 */
84 __u8 fcoe_resvd[3]; /* reserved - send zero and ignore */
85} __attribute__((packed));
86
87/*
88 * Minimum FCoE + FC header length
89 * 14 bytes FCoE header + 24 byte FC header = 38 bytes
90 */
91#define FCOE_HEADER_LEN 38
92
93/*
94 * Minimum FCoE frame size
95 * 14 bytes FCoE header + 24 byte FC header + 8 byte FCoE trailer = 46 bytes
96 */
97#define FCOE_MIN_FRAME 46
98
99/*
100 * fc_fcoe_set_mac - Store OUI + DID into MAC address field.
101 * @mac: mac address to be set
102 * @did: fc dest id to use
103 */
104static inline void fc_fcoe_set_mac(u8 *mac, u8 *did)
105{
106 mac[0] = (u8) (FC_FCOE_OUI >> 16);
107 mac[1] = (u8) (FC_FCOE_OUI >> 8);
108 mac[2] = (u8) FC_FCOE_OUI;
109 mac[3] = did[0];
110 mac[4] = did[1];
111 mac[5] = did[2];
112}
113
114#endif /* _FC_FCOE_H_ */
diff --git a/include/scsi/fc/fc_fcp.h b/include/scsi/fc/fc_fcp.h
new file mode 100644
index 000000000000..5d38f1989f37
--- /dev/null
+++ b/include/scsi/fc/fc_fcp.h
@@ -0,0 +1,199 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_FCP_H_
21#define _FC_FCP_H_
22
23/*
24 * Fibre Channel Protocol for SCSI.
25 * From T10 FCP-3, T10 project 1560-D Rev 4, Sept. 13, 2005.
26 */
27
28/*
29 * fc/fs.h defines FC_TYPE_FCP.
30 */
31
32/*
33 * Service parameter page parameters (word 3 bits) for Process Login.
34 */
35#define FCP_SPPF_TASK_RETRY_ID 0x0200 /* task retry ID requested */
36#define FCP_SPPF_RETRY 0x0100 /* retry supported */
37#define FCP_SPPF_CONF_COMPL 0x0080 /* confirmed completion allowed */
38#define FCP_SPPF_OVLY_ALLOW 0x0040 /* data overlay allowed */
39#define FCP_SPPF_INIT_FCN 0x0020 /* initiator function */
40#define FCP_SPPF_TARG_FCN 0x0010 /* target function */
41#define FCP_SPPF_RD_XRDY_DIS 0x0002 /* disable XFER_RDY for reads */
42#define FCP_SPPF_WR_XRDY_DIS 0x0001 /* disable XFER_RDY for writes */
43
44/*
45 * FCP_CMND IU Payload.
46 */
47struct fcp_cmnd {
48 __u8 fc_lun[8]; /* logical unit number */
49 __u8 fc_cmdref; /* commmand reference number */
50 __u8 fc_pri_ta; /* priority and task attribute */
51 __u8 fc_tm_flags; /* task management flags */
52 __u8 fc_flags; /* additional len & flags */
53 __u8 fc_cdb[16]; /* base CDB */
54 __be32 fc_dl; /* data length (must follow fc_cdb) */
55};
56
57#define FCP_CMND_LEN 32 /* expected length of structure */
58
59struct fcp_cmnd32 {
60 __u8 fc_lun[8]; /* logical unit number */
61 __u8 fc_cmdref; /* commmand reference number */
62 __u8 fc_pri_ta; /* priority and task attribute */
63 __u8 fc_tm_flags; /* task management flags */
64 __u8 fc_flags; /* additional len & flags */
65 __u8 fc_cdb[32]; /* base CDB */
66 __be32 fc_dl; /* data length (must follow fc_cdb) */
67};
68
69#define FCP_CMND32_LEN 48 /* expected length of structure */
70#define FCP_CMND32_ADD_LEN (16 / 4) /* Additional cdb length */
71
72/*
73 * fc_pri_ta.
74 */
75#define FCP_PTA_SIMPLE 0 /* simple task attribute */
76#define FCP_PTA_HEADQ 1 /* head of queue task attribute */
77#define FCP_PTA_ORDERED 2 /* ordered task attribute */
78#define FCP_PTA_ACA 4 /* auto. contigent allegiance */
79#define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */
80#define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */
81
82/*
83 * fc_tm_flags - task management flags field.
84 */
85#define FCP_TMF_CLR_ACA 0x40 /* clear ACA condition */
86#define FCP_TMF_LUN_RESET 0x10 /* logical unit reset task management */
87#define FCP_TMF_CLR_TASK_SET 0x04 /* clear task set */
88#define FCP_TMF_ABT_TASK_SET 0x02 /* abort task set */
89
90/*
91 * fc_flags.
92 * Bits 7:2 are the additional FCP_CDB length / 4.
93 */
94#define FCP_CFL_LEN_MASK 0xfc /* mask for additional length */
95#define FCP_CFL_LEN_SHIFT 2 /* shift bits for additional length */
96#define FCP_CFL_RDDATA 0x02 /* read data */
97#define FCP_CFL_WRDATA 0x01 /* write data */
98
99/*
100 * FCP_TXRDY IU - transfer ready payload.
101 */
102struct fcp_txrdy {
103 __be32 ft_data_ro; /* data relative offset */
104 __be32 ft_burst_len; /* burst length */
105 __u8 _ft_resvd[4]; /* reserved */
106};
107
108#define FCP_TXRDY_LEN 12 /* expected length of structure */
109
110/*
111 * FCP_RESP IU - response payload.
112 *
113 * The response payload comes in three parts: the flags/status, the
114 * sense/response lengths and the sense data/response info section.
115 *
116 * From FCP3r04, note 6 of section 9.5.13:
117 *
118 * Some early implementations presented the FCP_RSP IU without the FCP_RESID,
119 * FCP_SNS_LEN, and FCP_RSP_LEN fields if the FCP_RESID_UNDER, FCP_RESID_OVER,
120 * FCP_SNS_LEN_VALID, and FCP_RSP_LEN_VALID bits were all set to zero. This
121 * non-standard behavior should be tolerated.
122 *
123 * All response frames will always contain the fcp_resp template. Some
124 * will also include the fcp_resp_len template.
125 */
126struct fcp_resp {
127 __u8 _fr_resvd[8]; /* reserved */
128 __be16 fr_retry_delay; /* retry delay timer */
129 __u8 fr_flags; /* flags */
130 __u8 fr_status; /* SCSI status code */
131};
132
133#define FCP_RESP_LEN 12 /* expected length of structure */
134
135struct fcp_resp_ext {
136 __be32 fr_resid; /* Residual value */
137 __be32 fr_sns_len; /* SCSI Sense length */
138 __be32 fr_rsp_len; /* Response Info length */
139
140 /*
141 * Optionally followed by RSP info and/or SNS info and/or
142 * bidirectional read residual length, if any.
143 */
144};
145
146#define FCP_RESP_EXT_LEN 12 /* expected length of the structure */
147
148struct fcp_resp_rsp_info {
149 __u8 _fr_resvd[3]; /* reserved */
150 __u8 rsp_code; /* Response Info Code */
151 __u8 _fr_resvd2[4]; /* reserved */
152};
153
154struct fcp_resp_with_ext {
155 struct fcp_resp resp;
156 struct fcp_resp_ext ext;
157};
158
159#define FCP_RESP_WITH_EXT (FCP_RESP_LEN + FCP_RESP_EXT_LEN)
160
161/*
162 * fr_flags.
163 */
164#define FCP_BIDI_RSP 0x80 /* bidirectional read response */
165#define FCP_BIDI_READ_UNDER 0x40 /* bidir. read less than requested */
166#define FCP_BIDI_READ_OVER 0x20 /* DL insufficient for full transfer */
167#define FCP_CONF_REQ 0x10 /* confirmation requested */
168#define FCP_RESID_UNDER 0x08 /* transfer shorter than expected */
169#define FCP_RESID_OVER 0x04 /* DL insufficient for full transfer */
170#define FCP_SNS_LEN_VAL 0x02 /* SNS_LEN field is valid */
171#define FCP_RSP_LEN_VAL 0x01 /* RSP_LEN field is valid */
172
173/*
174 * rsp_codes
175 */
176enum fcp_resp_rsp_codes {
177 FCP_TMF_CMPL = 0,
178 FCP_DATA_LEN_INVALID = 1,
179 FCP_CMND_FIELDS_INVALID = 2,
180 FCP_DATA_PARAM_MISMATCH = 3,
181 FCP_TMF_REJECTED = 4,
182 FCP_TMF_FAILED = 5,
183 FCP_TMF_INVALID_LUN = 9,
184};
185
186/*
187 * FCP SRR Link Service request - Sequence Retransmission Request.
188 */
189struct fcp_srr {
190 __u8 srr_op; /* opcode ELS_SRR */
191 __u8 srr_resvd[3]; /* opcode / reserved - must be zero */
192 __be16 srr_ox_id; /* OX_ID of failed command */
193 __be16 srr_rx_id; /* RX_ID of failed command */
194 __be32 srr_rel_off; /* relative offset */
195 __u8 srr_r_ctl; /* r_ctl for the information unit */
196 __u8 srr_resvd2[3]; /* reserved */
197};
198
199#endif /* _FC_FCP_H_ */
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h
new file mode 100644
index 000000000000..3e4801d2bdbb
--- /dev/null
+++ b/include/scsi/fc/fc_fs.h
@@ -0,0 +1,340 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_FS_H_
21#define _FC_FS_H_
22
23/*
24 * Fibre Channel Framing and Signalling definitions.
25 * From T11 FC-FS-2 Rev 0.90 - 9 August 2005.
26 */
27
28/*
29 * Frame header
30 */
31struct fc_frame_header {
32 __u8 fh_r_ctl; /* routing control */
33 __u8 fh_d_id[3]; /* Destination ID */
34
35 __u8 fh_cs_ctl; /* class of service control / pri */
36 __u8 fh_s_id[3]; /* Source ID */
37
38 __u8 fh_type; /* see enum fc_fh_type below */
39 __u8 fh_f_ctl[3]; /* frame control */
40
41 __u8 fh_seq_id; /* sequence ID */
42 __u8 fh_df_ctl; /* data field control */
43 __be16 fh_seq_cnt; /* sequence count */
44
45 __be16 fh_ox_id; /* originator exchange ID */
46 __be16 fh_rx_id; /* responder exchange ID */
47 __be32 fh_parm_offset; /* parameter or relative offset */
48};
49
50#define FC_FRAME_HEADER_LEN 24 /* expected length of structure */
51
52#define FC_MAX_PAYLOAD 2112U /* max payload length in bytes */
53#define FC_MIN_MAX_PAYLOAD 256U /* lower limit on max payload */
54
55#define FC_MAX_FRAME (FC_MAX_PAYLOAD + FC_FRAME_HEADER_LEN)
56#define FC_MIN_MAX_FRAME (FC_MIN_MAX_PAYLOAD + FC_FRAME_HEADER_LEN)
57
58/*
59 * fh_r_ctl - Routing control definitions.
60 */
61 /*
62 * FC-4 device_data.
63 */
64enum fc_rctl {
65 FC_RCTL_DD_UNCAT = 0x00, /* uncategorized information */
66 FC_RCTL_DD_SOL_DATA = 0x01, /* solicited data */
67 FC_RCTL_DD_UNSOL_CTL = 0x02, /* unsolicited control */
68 FC_RCTL_DD_SOL_CTL = 0x03, /* solicited control or reply */
69 FC_RCTL_DD_UNSOL_DATA = 0x04, /* unsolicited data */
70 FC_RCTL_DD_DATA_DESC = 0x05, /* data descriptor */
71 FC_RCTL_DD_UNSOL_CMD = 0x06, /* unsolicited command */
72 FC_RCTL_DD_CMD_STATUS = 0x07, /* command status */
73
74#define FC_RCTL_ILS_REQ FC_RCTL_DD_UNSOL_CTL /* ILS request */
75#define FC_RCTL_ILS_REP FC_RCTL_DD_SOL_CTL /* ILS reply */
76
77 /*
78 * Extended Link_Data
79 */
80 FC_RCTL_ELS_REQ = 0x22, /* extended link services request */
81 FC_RCTL_ELS_REP = 0x23, /* extended link services reply */
82 FC_RCTL_ELS4_REQ = 0x32, /* FC-4 ELS request */
83 FC_RCTL_ELS4_REP = 0x33, /* FC-4 ELS reply */
84 /*
85 * Optional Extended Headers
86 */
87 FC_RCTL_VFTH = 0x50, /* virtual fabric tagging header */
88 FC_RCTL_IFRH = 0x51, /* inter-fabric routing header */
89 FC_RCTL_ENCH = 0x52, /* encapsulation header */
90 /*
91 * Basic Link Services fh_r_ctl values.
92 */
93 FC_RCTL_BA_NOP = 0x80, /* basic link service NOP */
94 FC_RCTL_BA_ABTS = 0x81, /* basic link service abort */
95 FC_RCTL_BA_RMC = 0x82, /* remove connection */
96 FC_RCTL_BA_ACC = 0x84, /* basic accept */
97 FC_RCTL_BA_RJT = 0x85, /* basic reject */
98 FC_RCTL_BA_PRMT = 0x86, /* dedicated connection preempted */
99 /*
100 * Link Control Information.
101 */
102 FC_RCTL_ACK_1 = 0xc0, /* acknowledge_1 */
103 FC_RCTL_ACK_0 = 0xc1, /* acknowledge_0 */
104 FC_RCTL_P_RJT = 0xc2, /* port reject */
105 FC_RCTL_F_RJT = 0xc3, /* fabric reject */
106 FC_RCTL_P_BSY = 0xc4, /* port busy */
107 FC_RCTL_F_BSY = 0xc5, /* fabric busy to data frame */
108 FC_RCTL_F_BSYL = 0xc6, /* fabric busy to link control frame */
109 FC_RCTL_LCR = 0xc7, /* link credit reset */
110 FC_RCTL_END = 0xc9, /* end */
111};
112 /* incomplete list of definitions */
113
114/*
115 * R_CTL names initializer.
116 * Please keep this matching the above definitions.
117 */
118#define FC_RCTL_NAMES_INIT { \
119 [FC_RCTL_DD_UNCAT] = "uncat", \
120 [FC_RCTL_DD_SOL_DATA] = "sol data", \
121 [FC_RCTL_DD_UNSOL_CTL] = "unsol ctl", \
122 [FC_RCTL_DD_SOL_CTL] = "sol ctl/reply", \
123 [FC_RCTL_DD_UNSOL_DATA] = "unsol data", \
124 [FC_RCTL_DD_DATA_DESC] = "data desc", \
125 [FC_RCTL_DD_UNSOL_CMD] = "unsol cmd", \
126 [FC_RCTL_DD_CMD_STATUS] = "cmd status", \
127 [FC_RCTL_ELS_REQ] = "ELS req", \
128 [FC_RCTL_ELS_REP] = "ELS rep", \
129 [FC_RCTL_ELS4_REQ] = "FC-4 ELS req", \
130 [FC_RCTL_ELS4_REP] = "FC-4 ELS rep", \
131 [FC_RCTL_BA_NOP] = "BLS NOP", \
132 [FC_RCTL_BA_ABTS] = "BLS abort", \
133 [FC_RCTL_BA_RMC] = "BLS remove connection", \
134 [FC_RCTL_BA_ACC] = "BLS accept", \
135 [FC_RCTL_BA_RJT] = "BLS reject", \
136 [FC_RCTL_BA_PRMT] = "BLS dedicated connection preempted", \
137 [FC_RCTL_ACK_1] = "LC ACK_1", \
138 [FC_RCTL_ACK_0] = "LC ACK_0", \
139 [FC_RCTL_P_RJT] = "LC port reject", \
140 [FC_RCTL_F_RJT] = "LC fabric reject", \
141 [FC_RCTL_P_BSY] = "LC port busy", \
142 [FC_RCTL_F_BSY] = "LC fabric busy to data frame", \
143 [FC_RCTL_F_BSYL] = "LC fabric busy to link control frame",\
144 [FC_RCTL_LCR] = "LC link credit reset", \
145 [FC_RCTL_END] = "LC end", \
146}
147
148/*
149 * Well-known fabric addresses.
150 */
151enum fc_well_known_fid {
152 FC_FID_BCAST = 0xffffff, /* broadcast */
153 FC_FID_FLOGI = 0xfffffe, /* fabric login */
154 FC_FID_FCTRL = 0xfffffd, /* fabric controller */
155 FC_FID_DIR_SERV = 0xfffffc, /* directory server */
156 FC_FID_TIME_SERV = 0xfffffb, /* time server */
157 FC_FID_MGMT_SERV = 0xfffffa, /* management server */
158 FC_FID_QOS = 0xfffff9, /* QoS Facilitator */
159 FC_FID_ALIASES = 0xfffff8, /* alias server (FC-PH2) */
160 FC_FID_SEC_KEY = 0xfffff7, /* Security key dist. server */
161 FC_FID_CLOCK = 0xfffff6, /* clock synch server */
162 FC_FID_MCAST_SERV = 0xfffff5, /* multicast server */
163};
164
165#define FC_FID_WELL_KNOWN_MAX 0xffffff /* highest well-known fabric ID */
166#define FC_FID_WELL_KNOWN_BASE 0xfffff5 /* start of well-known fabric ID */
167
168/*
169 * Other well-known addresses, outside the above contiguous range.
170 */
171#define FC_FID_DOM_MGR 0xfffc00 /* domain manager base */
172
173/*
174 * Fabric ID bytes.
175 */
176#define FC_FID_DOMAIN 0
177#define FC_FID_PORT 1
178#define FC_FID_LINK 2
179
180/*
181 * fh_type codes
182 */
183enum fc_fh_type {
184 FC_TYPE_BLS = 0x00, /* basic link service */
185 FC_TYPE_ELS = 0x01, /* extended link service */
186 FC_TYPE_IP = 0x05, /* IP over FC, RFC 4338 */
187 FC_TYPE_FCP = 0x08, /* SCSI FCP */
188 FC_TYPE_CT = 0x20, /* Fibre Channel Services (FC-CT) */
189 FC_TYPE_ILS = 0x22, /* internal link service */
190};
191
192/*
193 * FC_TYPE names initializer.
194 * Please keep this matching the above definitions.
195 */
196#define FC_TYPE_NAMES_INIT { \
197 [FC_TYPE_BLS] = "BLS", \
198 [FC_TYPE_ELS] = "ELS", \
199 [FC_TYPE_IP] = "IP", \
200 [FC_TYPE_FCP] = "FCP", \
201 [FC_TYPE_CT] = "CT", \
202 [FC_TYPE_ILS] = "ILS", \
203}
204
205/*
206 * Exchange IDs.
207 */
208#define FC_XID_UNKNOWN 0xffff /* unknown exchange ID */
209#define FC_XID_MIN 0x0 /* supported min exchange ID */
210#define FC_XID_MAX 0xfffe /* supported max exchange ID */
211
212/*
213 * fh_f_ctl - Frame control flags.
214 */
215#define FC_FC_EX_CTX (1 << 23) /* sent by responder to exchange */
216#define FC_FC_SEQ_CTX (1 << 22) /* sent by responder to sequence */
217#define FC_FC_FIRST_SEQ (1 << 21) /* first sequence of this exchange */
218#define FC_FC_LAST_SEQ (1 << 20) /* last sequence of this exchange */
219#define FC_FC_END_SEQ (1 << 19) /* last frame of sequence */
220#define FC_FC_END_CONN (1 << 18) /* end of class 1 connection pending */
221#define FC_FC_RES_B17 (1 << 17) /* reserved */
222#define FC_FC_SEQ_INIT (1 << 16) /* transfer of sequence initiative */
223#define FC_FC_X_ID_REASS (1 << 15) /* exchange ID has been changed */
224#define FC_FC_X_ID_INVAL (1 << 14) /* exchange ID invalidated */
225
226#define FC_FC_ACK_1 (1 << 12) /* 13:12 = 1: ACK_1 expected */
227#define FC_FC_ACK_N (2 << 12) /* 13:12 = 2: ACK_N expected */
228#define FC_FC_ACK_0 (3 << 12) /* 13:12 = 3: ACK_0 expected */
229
230#define FC_FC_RES_B11 (1 << 11) /* reserved */
231#define FC_FC_RES_B10 (1 << 10) /* reserved */
232#define FC_FC_RETX_SEQ (1 << 9) /* retransmitted sequence */
233#define FC_FC_UNI_TX (1 << 8) /* unidirectional transmit (class 1) */
234#define FC_FC_CONT_SEQ(i) ((i) << 6)
235#define FC_FC_ABT_SEQ(i) ((i) << 4)
236#define FC_FC_REL_OFF (1 << 3) /* parameter is relative offset */
237#define FC_FC_RES2 (1 << 2) /* reserved */
238#define FC_FC_FILL(i) ((i) & 3) /* 1:0: bytes of trailing fill */
239
240/*
241 * BA_ACC payload.
242 */
243struct fc_ba_acc {
244 __u8 ba_seq_id_val; /* SEQ_ID validity */
245#define FC_BA_SEQ_ID_VAL 0x80
246 __u8 ba_seq_id; /* SEQ_ID of seq last deliverable */
247 __u8 ba_resvd[2]; /* reserved */
248 __be16 ba_ox_id; /* OX_ID for aborted seq or exch */
249 __be16 ba_rx_id; /* RX_ID for aborted seq or exch */
250 __be16 ba_low_seq_cnt; /* low SEQ_CNT of aborted seq */
251 __be16 ba_high_seq_cnt; /* high SEQ_CNT of aborted seq */
252};
253
254/*
255 * BA_RJT: Basic Reject payload.
256 */
257struct fc_ba_rjt {
258 __u8 br_resvd; /* reserved */
259 __u8 br_reason; /* reason code */
260 __u8 br_explan; /* reason explanation */
261 __u8 br_vendor; /* vendor unique code */
262};
263
264/*
265 * BA_RJT reason codes.
266 * From FS-2.
267 */
268enum fc_ba_rjt_reason {
269 FC_BA_RJT_NONE = 0, /* in software this means no reject */
270 FC_BA_RJT_INVL_CMD = 0x01, /* invalid command code */
271 FC_BA_RJT_LOG_ERR = 0x03, /* logical error */
272 FC_BA_RJT_LOG_BUSY = 0x05, /* logical busy */
273 FC_BA_RJT_PROTO_ERR = 0x07, /* protocol error */
274 FC_BA_RJT_UNABLE = 0x09, /* unable to perform request */
275 FC_BA_RJT_VENDOR = 0xff, /* vendor-specific (see br_vendor) */
276};
277
278/*
279 * BA_RJT reason code explanations.
280 */
281enum fc_ba_rjt_explan {
282 FC_BA_RJT_EXP_NONE = 0x00, /* no additional expanation */
283 FC_BA_RJT_INV_XID = 0x03, /* invalid OX_ID-RX_ID combination */
284 FC_BA_RJT_ABT = 0x05, /* sequence aborted, no seq info */
285};
286
287/*
288 * P_RJT or F_RJT: Port Reject or Fabric Reject parameter field.
289 */
290struct fc_pf_rjt {
291 __u8 rj_action; /* reserved */
292 __u8 rj_reason; /* reason code */
293 __u8 rj_resvd; /* reserved */
294 __u8 rj_vendor; /* vendor unique code */
295};
296
297/*
298 * P_RJT and F_RJT reject reason codes.
299 */
300enum fc_pf_rjt_reason {
301 FC_RJT_NONE = 0, /* non-reject (reserved by standard) */
302 FC_RJT_INVL_DID = 0x01, /* invalid destination ID */
303 FC_RJT_INVL_SID = 0x02, /* invalid source ID */
304 FC_RJT_P_UNAV_T = 0x03, /* port unavailable, temporary */
305 FC_RJT_P_UNAV = 0x04, /* port unavailable, permanent */
306 FC_RJT_CLS_UNSUP = 0x05, /* class not supported */
307 FC_RJT_DEL_USAGE = 0x06, /* delimiter usage error */
308 FC_RJT_TYPE_UNSUP = 0x07, /* type not supported */
309 FC_RJT_LINK_CTL = 0x08, /* invalid link control */
310 FC_RJT_R_CTL = 0x09, /* invalid R_CTL field */
311 FC_RJT_F_CTL = 0x0a, /* invalid F_CTL field */
312 FC_RJT_OX_ID = 0x0b, /* invalid originator exchange ID */
313 FC_RJT_RX_ID = 0x0c, /* invalid responder exchange ID */
314 FC_RJT_SEQ_ID = 0x0d, /* invalid sequence ID */
315 FC_RJT_DF_CTL = 0x0e, /* invalid DF_CTL field */
316 FC_RJT_SEQ_CNT = 0x0f, /* invalid SEQ_CNT field */
317 FC_RJT_PARAM = 0x10, /* invalid parameter field */
318 FC_RJT_EXCH_ERR = 0x11, /* exchange error */
319 FC_RJT_PROTO = 0x12, /* protocol error */
320 FC_RJT_LEN = 0x13, /* incorrect length */
321 FC_RJT_UNEXP_ACK = 0x14, /* unexpected ACK */
322 FC_RJT_FAB_CLASS = 0x15, /* class unsupported by fabric entity */
323 FC_RJT_LOGI_REQ = 0x16, /* login required */
324 FC_RJT_SEQ_XS = 0x17, /* excessive sequences attempted */
325 FC_RJT_EXCH_EST = 0x18, /* unable to establish exchange */
326 FC_RJT_FAB_UNAV = 0x1a, /* fabric unavailable */
327 FC_RJT_VC_ID = 0x1b, /* invalid VC_ID (class 4) */
328 FC_RJT_CS_CTL = 0x1c, /* invalid CS_CTL field */
329 FC_RJT_INSUF_RES = 0x1d, /* insuff. resources for VC (Class 4) */
330 FC_RJT_INVL_CLS = 0x1f, /* invalid class of service */
331 FC_RJT_PREEMT_RJT = 0x20, /* preemption request rejected */
332 FC_RJT_PREEMT_DIS = 0x21, /* preemption not enabled */
333 FC_RJT_MCAST_ERR = 0x22, /* multicast error */
334 FC_RJT_MCAST_ET = 0x23, /* multicast error terminate */
335 FC_RJT_PRLI_REQ = 0x24, /* process login required */
336 FC_RJT_INVL_ATT = 0x25, /* invalid attachment */
337 FC_RJT_VENDOR = 0xff, /* vendor specific reject */
338};
339
340#endif /* _FC_FS_H_ */
diff --git a/include/scsi/fc/fc_gs.h b/include/scsi/fc/fc_gs.h
new file mode 100644
index 000000000000..ffab0272c65a
--- /dev/null
+++ b/include/scsi/fc/fc_gs.h
@@ -0,0 +1,93 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_GS_H_
21#define _FC_GS_H_
22
23/*
24 * Fibre Channel Services - Common Transport.
25 * From T11.org FC-GS-2 Rev 5.3 November 1998.
26 */
27
28struct fc_ct_hdr {
29 __u8 ct_rev; /* revision */
30 __u8 ct_in_id[3]; /* N_Port ID of original requestor */
31 __u8 ct_fs_type; /* type of fibre channel service */
32 __u8 ct_fs_subtype; /* subtype */
33 __u8 ct_options;
34 __u8 _ct_resvd1;
35 __be16 ct_cmd; /* command / response code */
36 __be16 ct_mr_size; /* maximum / residual size */
37 __u8 _ct_resvd2;
38 __u8 ct_reason; /* reject reason */
39 __u8 ct_explan; /* reason code explanation */
40 __u8 ct_vendor; /* vendor unique data */
41};
42
43#define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */
44
45enum fc_ct_rev {
46 FC_CT_REV = 1 /* common transport revision */
47};
48
49/*
50 * ct_fs_type values.
51 */
52enum fc_ct_fs_type {
53 FC_FST_ALIAS = 0xf8, /* alias service */
54 FC_FST_MGMT = 0xfa, /* management service */
55 FC_FST_TIME = 0xfb, /* time service */
56 FC_FST_DIR = 0xfc, /* directory service */
57};
58
59/*
60 * ct_cmd: Command / response codes
61 */
62enum fc_ct_cmd {
63 FC_FS_RJT = 0x8001, /* reject */
64 FC_FS_ACC = 0x8002, /* accept */
65};
66
67/*
68 * FS_RJT reason codes.
69 */
70enum fc_ct_reason {
71 FC_FS_RJT_CMD = 0x01, /* invalid command code */
72 FC_FS_RJT_VER = 0x02, /* invalid version level */
73 FC_FS_RJT_LOG = 0x03, /* logical error */
74 FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */
75 FC_FS_RJT_BSY = 0x05, /* logical busy */
76 FC_FS_RJT_PROTO = 0x07, /* protocol error */
77 FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */
78 FC_FS_RJT_UNSUP = 0x0b, /* command not supported */
79};
80
81/*
82 * FS_RJT reason code explanations.
83 */
84enum fc_ct_explan {
85 FC_FS_EXP_NONE = 0x00, /* no additional explanation */
86 FC_FS_EXP_PID = 0x01, /* port ID not registered */
87 FC_FS_EXP_PNAM = 0x02, /* port name not registered */
88 FC_FS_EXP_NNAM = 0x03, /* node name not registered */
89 FC_FS_EXP_COS = 0x04, /* class of service not registered */
90 /* definitions not complete */
91};
92
93#endif /* _FC_GS_H_ */
diff --git a/include/scsi/fc/fc_ns.h b/include/scsi/fc/fc_ns.h
new file mode 100644
index 000000000000..790d7b97d4bc
--- /dev/null
+++ b/include/scsi/fc/fc_ns.h
@@ -0,0 +1,159 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_NS_H_
21#define _FC_NS_H_
22
23/*
24 * Fibre Channel Services - Name Service (dNS)
25 * From T11.org FC-GS-2 Rev 5.3 November 1998.
26 */
27
28/*
29 * Common-transport sub-type for Name Server.
30 */
31#define FC_NS_SUBTYPE 2 /* fs_ct_hdr.ct_fs_subtype */
32
33/*
34 * Name server Requests.
35 * Note: this is an incomplete list, some unused requests are omitted.
36 */
37enum fc_ns_req {
38 FC_NS_GA_NXT = 0x0100, /* get all next */
39 FC_NS_GI_A = 0x0101, /* get identifiers - scope */
40 FC_NS_GPN_ID = 0x0112, /* get port name by ID */
41 FC_NS_GNN_ID = 0x0113, /* get node name by ID */
42 FC_NS_GID_PN = 0x0121, /* get ID for port name */
43 FC_NS_GID_NN = 0x0131, /* get IDs for node name */
44 FC_NS_GID_FT = 0x0171, /* get IDs by FC4 type */
45 FC_NS_GPN_FT = 0x0172, /* get port names by FC4 type */
46 FC_NS_GID_PT = 0x01a1, /* get IDs by port type */
47 FC_NS_RFT_ID = 0x0217, /* reg FC4 type for ID */
48 FC_NS_RPN_ID = 0x0212, /* reg port name for ID */
49 FC_NS_RNN_ID = 0x0213, /* reg node name for ID */
50};
51
52/*
53 * Port type values.
54 */
55enum fc_ns_pt {
56 FC_NS_UNID_PORT = 0x00, /* unidentified */
57 FC_NS_N_PORT = 0x01, /* N port */
58 FC_NS_NL_PORT = 0x02, /* NL port */
59 FC_NS_FNL_PORT = 0x03, /* F/NL port */
60 FC_NS_NX_PORT = 0x7f, /* Nx port */
61 FC_NS_F_PORT = 0x81, /* F port */
62 FC_NS_FL_PORT = 0x82, /* FL port */
63 FC_NS_E_PORT = 0x84, /* E port */
64 FC_NS_B_PORT = 0x85, /* B port */
65};
66
67/*
68 * Port type object.
69 */
70struct fc_ns_pt_obj {
71 __u8 pt_type;
72};
73
74/*
75 * Port ID object
76 */
77struct fc_ns_fid {
78 __u8 fp_flags; /* flags for responses only */
79 __u8 fp_fid[3];
80};
81
82/*
83 * fp_flags in port ID object, for responses only.
84 */
85#define FC_NS_FID_LAST 0x80 /* last object */
86
87/*
88 * FC4-types object.
89 */
90#define FC_NS_TYPES 256 /* number of possible FC-4 types */
91#define FC_NS_BPW 32 /* bits per word in bitmap */
92
93struct fc_ns_fts {
94 __be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */
95};
96
97/*
98 * GID_PT request.
99 */
100struct fc_ns_gid_pt {
101 __u8 fn_pt_type;
102 __u8 fn_domain_id_scope;
103 __u8 fn_area_id_scope;
104 __u8 fn_resvd;
105};
106
107/*
108 * GID_FT or GPN_FT request.
109 */
110struct fc_ns_gid_ft {
111 __u8 fn_resvd;
112 __u8 fn_domain_id_scope;
113 __u8 fn_area_id_scope;
114 __u8 fn_fc4_type;
115};
116
117/*
118 * GPN_FT response.
119 */
120struct fc_gpn_ft_resp {
121 __u8 fp_flags; /* see fp_flags definitions above */
122 __u8 fp_fid[3]; /* port ID */
123 __be32 fp_resvd;
124 __be64 fp_wwpn; /* port name */
125};
126
127/*
128 * GID_PN request
129 */
130struct fc_ns_gid_pn {
131 __be64 fn_wwpn; /* port name */
132};
133
134/*
135 * GID_PN response
136 */
137struct fc_gid_pn_resp {
138 __u8 fp_resvd;
139 __u8 fp_fid[3]; /* port ID */
140};
141
142/*
143 * RFT_ID request - register FC-4 types for ID.
144 */
145struct fc_ns_rft_id {
146 struct fc_ns_fid fr_fid; /* port ID object */
147 struct fc_ns_fts fr_fts; /* FC-4 types object */
148};
149
150/*
151 * RPN_ID request - register port name for ID.
152 * RNN_ID request - register node name for ID.
153 */
154struct fc_ns_rn_id {
155 struct fc_ns_fid fr_fid; /* port ID object */
156 __be64 fr_wwn; /* node name or port name */
157} __attribute__((__packed__));
158
159#endif /* _FC_NS_H_ */
diff --git a/include/scsi/fc_encode.h b/include/scsi/fc_encode.h
new file mode 100644
index 000000000000..6300f556bce5
--- /dev/null
+++ b/include/scsi/fc_encode.h
@@ -0,0 +1,309 @@
1/*
2 * Copyright(c) 2008 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_ENCODE_H_
21#define _FC_ENCODE_H_
22#include <asm/unaligned.h>
23
24struct fc_ns_rft {
25 struct fc_ns_fid fid; /* port ID object */
26 struct fc_ns_fts fts; /* FC4-types object */
27};
28
29struct fc_ct_req {
30 struct fc_ct_hdr hdr;
31 union {
32 struct fc_ns_gid_ft gid;
33 struct fc_ns_rn_id rn;
34 struct fc_ns_rft rft;
35 } payload;
36};
37
38/**
39 * fill FC header fields in specified fc_frame
40 */
41static inline void fc_fill_fc_hdr(struct fc_frame *fp, enum fc_rctl r_ctl,
42 u32 did, u32 sid, enum fc_fh_type type,
43 u32 f_ctl, u32 parm_offset)
44{
45 struct fc_frame_header *fh;
46
47 fh = fc_frame_header_get(fp);
48 WARN_ON(r_ctl == 0);
49 fh->fh_r_ctl = r_ctl;
50 hton24(fh->fh_d_id, did);
51 hton24(fh->fh_s_id, sid);
52 fh->fh_type = type;
53 hton24(fh->fh_f_ctl, f_ctl);
54 fh->fh_cs_ctl = 0;
55 fh->fh_df_ctl = 0;
56 fh->fh_parm_offset = htonl(parm_offset);
57}
58
59/**
60 * fc_ct_hdr_fill- fills ct header and reset ct payload
61 * returns pointer to ct request.
62 */
63static inline struct fc_ct_req *fc_ct_hdr_fill(const struct fc_frame *fp,
64 unsigned int op, size_t req_size)
65{
66 struct fc_ct_req *ct;
67 size_t ct_plen;
68
69 ct_plen = sizeof(struct fc_ct_hdr) + req_size;
70 ct = fc_frame_payload_get(fp, ct_plen);
71 memset(ct, 0, ct_plen);
72 ct->hdr.ct_rev = FC_CT_REV;
73 ct->hdr.ct_fs_type = FC_FST_DIR;
74 ct->hdr.ct_fs_subtype = FC_NS_SUBTYPE;
75 ct->hdr.ct_cmd = htons((u16) op);
76 return ct;
77}
78
79/**
80 * fc_ct_fill - Fill in a name service request frame
81 */
82static inline int fc_ct_fill(struct fc_lport *lport, struct fc_frame *fp,
83 unsigned int op, enum fc_rctl *r_ctl, u32 *did,
84 enum fc_fh_type *fh_type)
85{
86 struct fc_ct_req *ct;
87
88 switch (op) {
89 case FC_NS_GPN_FT:
90 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_gid_ft));
91 ct->payload.gid.fn_fc4_type = FC_TYPE_FCP;
92 break;
93
94 case FC_NS_RFT_ID:
95 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rft));
96 hton24(ct->payload.rft.fid.fp_fid,
97 fc_host_port_id(lport->host));
98 ct->payload.rft.fts = lport->fcts;
99 break;
100
101 case FC_NS_RPN_ID:
102 ct = fc_ct_hdr_fill(fp, op, sizeof(struct fc_ns_rn_id));
103 hton24(ct->payload.rn.fr_fid.fp_fid,
104 fc_host_port_id(lport->host));
105 ct->payload.rft.fts = lport->fcts;
106 put_unaligned_be64(lport->wwpn, &ct->payload.rn.fr_wwn);
107 break;
108
109 default:
110 FC_DBG("Invalid op code %x \n", op);
111 return -EINVAL;
112 }
113 *r_ctl = FC_RCTL_DD_UNSOL_CTL;
114 *did = FC_FID_DIR_SERV;
115 *fh_type = FC_TYPE_CT;
116 return 0;
117}
118
119/**
120 * fc_plogi_fill - Fill in plogi request frame
121 */
122static inline void fc_plogi_fill(struct fc_lport *lport, struct fc_frame *fp,
123 unsigned int op)
124{
125 struct fc_els_flogi *plogi;
126 struct fc_els_csp *csp;
127 struct fc_els_cssp *cp;
128
129 plogi = fc_frame_payload_get(fp, sizeof(*plogi));
130 memset(plogi, 0, sizeof(*plogi));
131 plogi->fl_cmd = (u8) op;
132 put_unaligned_be64(lport->wwpn, &plogi->fl_wwpn);
133 put_unaligned_be64(lport->wwnn, &plogi->fl_wwnn);
134
135 csp = &plogi->fl_csp;
136 csp->sp_hi_ver = 0x20;
137 csp->sp_lo_ver = 0x20;
138 csp->sp_bb_cred = htons(10); /* this gets set by gateway */
139 csp->sp_bb_data = htons((u16) lport->mfs);
140 cp = &plogi->fl_cssp[3 - 1]; /* class 3 parameters */
141 cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ);
142 csp->sp_features = htons(FC_SP_FT_CIRO);
143 csp->sp_tot_seq = htons(255); /* seq. we accept */
144 csp->sp_rel_off = htons(0x1f);
145 csp->sp_e_d_tov = htonl(lport->e_d_tov);
146
147 cp->cp_rdfs = htons((u16) lport->mfs);
148 cp->cp_con_seq = htons(255);
149 cp->cp_open_seq = 1;
150}
151
152/**
153 * fc_flogi_fill - Fill in a flogi request frame.
154 */
155static inline void fc_flogi_fill(struct fc_lport *lport, struct fc_frame *fp)
156{
157 struct fc_els_csp *sp;
158 struct fc_els_cssp *cp;
159 struct fc_els_flogi *flogi;
160
161 flogi = fc_frame_payload_get(fp, sizeof(*flogi));
162 memset(flogi, 0, sizeof(*flogi));
163 flogi->fl_cmd = (u8) ELS_FLOGI;
164 put_unaligned_be64(lport->wwpn, &flogi->fl_wwpn);
165 put_unaligned_be64(lport->wwnn, &flogi->fl_wwnn);
166 sp = &flogi->fl_csp;
167 sp->sp_hi_ver = 0x20;
168 sp->sp_lo_ver = 0x20;
169 sp->sp_bb_cred = htons(10); /* this gets set by gateway */
170 sp->sp_bb_data = htons((u16) lport->mfs);
171 cp = &flogi->fl_cssp[3 - 1]; /* class 3 parameters */
172 cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ);
173}
174
175/**
176 * fc_logo_fill - Fill in a logo request frame.
177 */
178static inline void fc_logo_fill(struct fc_lport *lport, struct fc_frame *fp)
179{
180 struct fc_els_logo *logo;
181
182 logo = fc_frame_payload_get(fp, sizeof(*logo));
183 memset(logo, 0, sizeof(*logo));
184 logo->fl_cmd = ELS_LOGO;
185 hton24(logo->fl_n_port_id, fc_host_port_id(lport->host));
186 logo->fl_n_port_wwn = htonll(lport->wwpn);
187}
188
189/**
190 * fc_rtv_fill - Fill in RTV (read timeout value) request frame.
191 */
192static inline void fc_rtv_fill(struct fc_lport *lport, struct fc_frame *fp)
193{
194 struct fc_els_rtv *rtv;
195
196 rtv = fc_frame_payload_get(fp, sizeof(*rtv));
197 memset(rtv, 0, sizeof(*rtv));
198 rtv->rtv_cmd = ELS_RTV;
199}
200
201/**
202 * fc_rec_fill - Fill in rec request frame
203 */
204static inline void fc_rec_fill(struct fc_lport *lport, struct fc_frame *fp)
205{
206 struct fc_els_rec *rec;
207 struct fc_exch *ep = fc_seq_exch(fr_seq(fp));
208
209 rec = fc_frame_payload_get(fp, sizeof(*rec));
210 memset(rec, 0, sizeof(*rec));
211 rec->rec_cmd = ELS_REC;
212 hton24(rec->rec_s_id, fc_host_port_id(lport->host));
213 rec->rec_ox_id = htons(ep->oxid);
214 rec->rec_rx_id = htons(ep->rxid);
215}
216
217/**
218 * fc_prli_fill - Fill in prli request frame
219 */
220static inline void fc_prli_fill(struct fc_lport *lport, struct fc_frame *fp)
221{
222 struct {
223 struct fc_els_prli prli;
224 struct fc_els_spp spp;
225 } *pp;
226
227 pp = fc_frame_payload_get(fp, sizeof(*pp));
228 memset(pp, 0, sizeof(*pp));
229 pp->prli.prli_cmd = ELS_PRLI;
230 pp->prli.prli_spp_len = sizeof(struct fc_els_spp);
231 pp->prli.prli_len = htons(sizeof(*pp));
232 pp->spp.spp_type = FC_TYPE_FCP;
233 pp->spp.spp_flags = FC_SPP_EST_IMG_PAIR;
234 pp->spp.spp_params = htonl(lport->service_params);
235}
236
237/**
238 * fc_scr_fill - Fill in a scr request frame.
239 */
240static inline void fc_scr_fill(struct fc_lport *lport, struct fc_frame *fp)
241{
242 struct fc_els_scr *scr;
243
244 scr = fc_frame_payload_get(fp, sizeof(*scr));
245 memset(scr, 0, sizeof(*scr));
246 scr->scr_cmd = ELS_SCR;
247 scr->scr_reg_func = ELS_SCRF_FULL;
248}
249
250/**
251 * fc_els_fill - Fill in an ELS request frame
252 */
253static inline int fc_els_fill(struct fc_lport *lport, struct fc_rport *rport,
254 struct fc_frame *fp, unsigned int op,
255 enum fc_rctl *r_ctl, u32 *did, enum fc_fh_type *fh_type)
256{
257 switch (op) {
258 case ELS_PLOGI:
259 fc_plogi_fill(lport, fp, ELS_PLOGI);
260 *did = rport->port_id;
261 break;
262
263 case ELS_FLOGI:
264 fc_flogi_fill(lport, fp);
265 *did = FC_FID_FLOGI;
266 break;
267
268 case ELS_LOGO:
269 fc_logo_fill(lport, fp);
270 *did = FC_FID_FLOGI;
271 /*
272 * if rport is valid then it
273 * is port logo, therefore
274 * set did to rport id.
275 */
276 if (rport)
277 *did = rport->port_id;
278 break;
279
280 case ELS_RTV:
281 fc_rtv_fill(lport, fp);
282 *did = rport->port_id;
283 break;
284
285 case ELS_REC:
286 fc_rec_fill(lport, fp);
287 *did = rport->port_id;
288 break;
289
290 case ELS_PRLI:
291 fc_prli_fill(lport, fp);
292 *did = rport->port_id;
293 break;
294
295 case ELS_SCR:
296 fc_scr_fill(lport, fp);
297 *did = FC_FID_FCTRL;
298 break;
299
300 default:
301 FC_DBG("Invalid op code %x \n", op);
302 return -EINVAL;
303 }
304
305 *r_ctl = FC_RCTL_ELS_REQ;
306 *fh_type = FC_TYPE_ELS;
307 return 0;
308}
309#endif /* _FC_ENCODE_H_ */
diff --git a/include/scsi/fc_frame.h b/include/scsi/fc_frame.h
new file mode 100644
index 000000000000..04d34a71355f
--- /dev/null
+++ b/include/scsi/fc_frame.h
@@ -0,0 +1,242 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _FC_FRAME_H_
21#define _FC_FRAME_H_
22
23#include <linux/scatterlist.h>
24#include <linux/skbuff.h>
25#include <scsi/scsi_cmnd.h>
26
27#include <scsi/fc/fc_fs.h>
28#include <scsi/fc/fc_fcp.h>
29#include <scsi/fc/fc_encaps.h>
30
31/*
32 * The fc_frame interface is used to pass frame data between functions.
33 * The frame includes the data buffer, length, and SOF / EOF delimiter types.
34 * A pointer to the port structure of the receiving port is also includeded.
35 */
36
37#define FC_FRAME_HEADROOM 32 /* headroom for VLAN + FCoE headers */
38#define FC_FRAME_TAILROOM 8 /* trailer space for FCoE */
39
40/*
41 * Information about an individual fibre channel frame received or to be sent.
42 * The buffer may be in up to 4 additional non-contiguous sections,
43 * but the linear section must hold the frame header.
44 */
45#define FC_FRAME_SG_LEN 4 /* scatter/gather list maximum length */
46
47#define fp_skb(fp) (&((fp)->skb))
48#define fr_hdr(fp) ((fp)->skb.data)
49#define fr_len(fp) ((fp)->skb.len)
50#define fr_cb(fp) ((struct fcoe_rcv_info *)&((fp)->skb.cb[0]))
51#define fr_dev(fp) (fr_cb(fp)->fr_dev)
52#define fr_seq(fp) (fr_cb(fp)->fr_seq)
53#define fr_sof(fp) (fr_cb(fp)->fr_sof)
54#define fr_eof(fp) (fr_cb(fp)->fr_eof)
55#define fr_flags(fp) (fr_cb(fp)->fr_flags)
56#define fr_max_payload(fp) (fr_cb(fp)->fr_max_payload)
57#define fr_cmd(fp) (fr_cb(fp)->fr_cmd)
58#define fr_dir(fp) (fr_cmd(fp)->sc_data_direction)
59#define fr_crc(fp) (fr_cb(fp)->fr_crc)
60
61struct fc_frame {
62 struct sk_buff skb;
63};
64
65struct fcoe_rcv_info {
66 struct packet_type *ptype;
67 struct fc_lport *fr_dev; /* transport layer private pointer */
68 struct fc_seq *fr_seq; /* for use with exchange manager */
69 struct scsi_cmnd *fr_cmd; /* for use of scsi command */
70 u32 fr_crc;
71 u16 fr_max_payload; /* max FC payload */
72 enum fc_sof fr_sof; /* start of frame delimiter */
73 enum fc_eof fr_eof; /* end of frame delimiter */
74 u8 fr_flags; /* flags - see below */
75};
76
77
78/*
79 * Get fc_frame pointer for an skb that's already been imported.
80 */
81static inline struct fcoe_rcv_info *fcoe_dev_from_skb(const struct sk_buff *skb)
82{
83 BUILD_BUG_ON(sizeof(struct fcoe_rcv_info) > sizeof(skb->cb));
84 return (struct fcoe_rcv_info *) skb->cb;
85}
86
87/*
88 * fr_flags.
89 */
90#define FCPHF_CRC_UNCHECKED 0x01 /* CRC not computed, still appended */
91
92/*
93 * Initialize a frame.
94 * We don't do a complete memset here for performance reasons.
95 * The caller must set fr_free, fr_hdr, fr_len, fr_sof, and fr_eof eventually.
96 */
97static inline void fc_frame_init(struct fc_frame *fp)
98{
99 fr_dev(fp) = NULL;
100 fr_seq(fp) = NULL;
101 fr_flags(fp) = 0;
102}
103
104struct fc_frame *fc_frame_alloc_fill(struct fc_lport *, size_t payload_len);
105
106struct fc_frame *__fc_frame_alloc(size_t payload_len);
107
108/*
109 * Get frame for sending via port.
110 */
111static inline struct fc_frame *_fc_frame_alloc(struct fc_lport *dev,
112 size_t payload_len)
113{
114 return __fc_frame_alloc(payload_len);
115}
116
117/*
118 * Allocate fc_frame structure and buffer. Set the initial length to
119 * payload_size + sizeof (struct fc_frame_header).
120 */
121static inline struct fc_frame *fc_frame_alloc(struct fc_lport *dev, size_t len)
122{
123 struct fc_frame *fp;
124
125 /*
126 * Note: Since len will often be a constant multiple of 4,
127 * this check will usually be evaluated and eliminated at compile time.
128 */
129 if ((len % 4) != 0)
130 fp = fc_frame_alloc_fill(dev, len);
131 else
132 fp = _fc_frame_alloc(dev, len);
133 return fp;
134}
135
136/*
137 * Free the fc_frame structure and buffer.
138 */
139static inline void fc_frame_free(struct fc_frame *fp)
140{
141 kfree_skb(fp_skb(fp));
142}
143
144static inline int fc_frame_is_linear(struct fc_frame *fp)
145{
146 return !skb_is_nonlinear(fp_skb(fp));
147}
148
149/*
150 * Get frame header from message in fc_frame structure.
151 * This hides a cast and provides a place to add some checking.
152 */
153static inline
154struct fc_frame_header *fc_frame_header_get(const struct fc_frame *fp)
155{
156 WARN_ON(fr_len(fp) < sizeof(struct fc_frame_header));
157 return (struct fc_frame_header *) fr_hdr(fp);
158}
159
160/*
161 * Get frame payload from message in fc_frame structure.
162 * This hides a cast and provides a place to add some checking.
163 * The len parameter is the minimum length for the payload portion.
164 * Returns NULL if the frame is too short.
165 *
166 * This assumes the interesting part of the payload is in the first part
167 * of the buffer for received data. This may not be appropriate to use for
168 * buffers being transmitted.
169 */
170static inline void *fc_frame_payload_get(const struct fc_frame *fp,
171 size_t len)
172{
173 void *pp = NULL;
174
175 if (fr_len(fp) >= sizeof(struct fc_frame_header) + len)
176 pp = fc_frame_header_get(fp) + 1;
177 return pp;
178}
179
180/*
181 * Get frame payload opcode (first byte) from message in fc_frame structure.
182 * This hides a cast and provides a place to add some checking. Return 0
183 * if the frame has no payload.
184 */
185static inline u8 fc_frame_payload_op(const struct fc_frame *fp)
186{
187 u8 *cp;
188
189 cp = fc_frame_payload_get(fp, sizeof(u8));
190 if (!cp)
191 return 0;
192 return *cp;
193
194}
195
196/*
197 * Get FC class from frame.
198 */
199static inline enum fc_class fc_frame_class(const struct fc_frame *fp)
200{
201 return fc_sof_class(fr_sof(fp));
202}
203
204/*
205 * Check the CRC in a frame.
206 * The CRC immediately follows the last data item *AFTER* the length.
207 * The return value is zero if the CRC matches.
208 */
209u32 fc_frame_crc_check(struct fc_frame *);
210
211static inline u8 fc_frame_rctl(const struct fc_frame *fp)
212{
213 return fc_frame_header_get(fp)->fh_r_ctl;
214}
215
216static inline bool fc_frame_is_cmd(const struct fc_frame *fp)
217{
218 return fc_frame_rctl(fp) == FC_RCTL_DD_UNSOL_CMD;
219}
220
221static inline bool fc_frame_is_read(const struct fc_frame *fp)
222{
223 if (fc_frame_is_cmd(fp) && fr_cmd(fp))
224 return fr_dir(fp) == DMA_FROM_DEVICE;
225 return false;
226}
227
228static inline bool fc_frame_is_write(const struct fc_frame *fp)
229{
230 if (fc_frame_is_cmd(fp) && fr_cmd(fp))
231 return fr_dir(fp) == DMA_TO_DEVICE;
232 return false;
233}
234
235/*
236 * Check for leaks.
237 * Print the frame header of any currently allocated frame, assuming there
238 * should be none at this point.
239 */
240void fc_frame_leak_check(void);
241
242#endif /* _FC_FRAME_H_ */
diff --git a/include/scsi/fc_transport_fcoe.h b/include/scsi/fc_transport_fcoe.h
new file mode 100644
index 000000000000..8dca2af14ffc
--- /dev/null
+++ b/include/scsi/fc_transport_fcoe.h
@@ -0,0 +1,54 @@
1#ifndef FC_TRANSPORT_FCOE_H
2#define FC_TRANSPORT_FCOE_H
3
4#include <linux/device.h>
5#include <linux/netdevice.h>
6#include <scsi/scsi_host.h>
7#include <scsi/libfc.h>
8
9/**
10 * struct fcoe_transport - FCoE transport struct for generic transport
11 * for Ethernet devices as well as pure HBAs
12 *
13 * @name: name for thsi transport
14 * @bus: physical bus type (pci_bus_type)
15 * @driver: physical bus driver for network device
16 * @create: entry create function
17 * @destroy: exit destroy function
18 * @list: list of transports
19 */
20struct fcoe_transport {
21 char *name;
22 unsigned short vendor;
23 unsigned short device;
24 struct bus_type *bus;
25 struct device_driver *driver;
26 int (*create)(struct net_device *device);
27 int (*destroy)(struct net_device *device);
28 bool (*match)(struct net_device *device);
29 struct list_head list;
30 struct list_head devlist;
31 struct mutex devlock;
32};
33
34/**
35 * MODULE_ALIAS_FCOE_PCI
36 *
37 * some care must be taken with this, vendor and device MUST be a hex value
38 * preceded with 0x and with letters in lower case (0x12ab, not 0x12AB or 12AB)
39 */
40#define MODULE_ALIAS_FCOE_PCI(vendor, device) \
41 MODULE_ALIAS("fcoe-pci-" __stringify(vendor) "-" __stringify(device))
42
43/* exported funcs */
44int fcoe_transport_attach(struct net_device *netdev);
45int fcoe_transport_release(struct net_device *netdev);
46int fcoe_transport_register(struct fcoe_transport *t);
47int fcoe_transport_unregister(struct fcoe_transport *t);
48int fcoe_load_transport_driver(struct net_device *netdev);
49int __init fcoe_transport_init(void);
50int __exit fcoe_transport_exit(void);
51
52/* fcow_sw is the default transport */
53extern struct fcoe_transport fcoe_sw_transport;
54#endif /* FC_TRANSPORT_FCOE_H */
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 16be12f1cbe8..d0ed5226f8c4 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -213,6 +213,8 @@ enum iscsi_err {
213 ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15, 213 ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15,
214 ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16, 214 ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16,
215 ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17, 215 ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17,
216 ISCSI_ERR_INVALID_HOST = ISCSI_ERR_BASE + 18,
217 ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19,
216}; 218};
217 219
218/* 220/*
@@ -331,8 +333,11 @@ enum iscsi_host_param {
331#define CAP_TEXT_NEGO 0x80 333#define CAP_TEXT_NEGO 0x80
332#define CAP_MARKERS 0x100 334#define CAP_MARKERS 0x100
333#define CAP_FW_DB 0x200 335#define CAP_FW_DB 0x200
334#define CAP_SENDTARGETS_OFFLOAD 0x400 336#define CAP_SENDTARGETS_OFFLOAD 0x400 /* offload discovery process */
335#define CAP_DATA_PATH_OFFLOAD 0x800 337#define CAP_DATA_PATH_OFFLOAD 0x800 /* offload entire IO path */
338#define CAP_DIGEST_OFFLOAD 0x1000 /* offload hdr and data digests */
339#define CAP_PADDING_OFFLOAD 0x2000 /* offload padding insertion, removal,
340 and verification */
336 341
337/* 342/*
338 * These flags describes reason of stop_conn() call 343 * These flags describes reason of stop_conn() call
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
new file mode 100644
index 000000000000..9f2876397dda
--- /dev/null
+++ b/include/scsi/libfc.h
@@ -0,0 +1,938 @@
1/*
2 * Copyright(c) 2007 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _LIBFC_H_
21#define _LIBFC_H_
22
23#include <linux/timer.h>
24#include <linux/if.h>
25
26#include <scsi/scsi_transport.h>
27#include <scsi/scsi_transport_fc.h>
28
29#include <scsi/fc/fc_fcp.h>
30#include <scsi/fc/fc_ns.h>
31#include <scsi/fc/fc_els.h>
32#include <scsi/fc/fc_gs.h>
33
34#include <scsi/fc_frame.h>
35
36#define LIBFC_DEBUG
37
38#ifdef LIBFC_DEBUG
39/* Log messages */
40#define FC_DBG(fmt, args...) \
41 do { \
42 printk(KERN_INFO "%s " fmt, __func__, ##args); \
43 } while (0)
44#else
45#define FC_DBG(fmt, args...)
46#endif
47
48/*
49 * libfc error codes
50 */
51#define FC_NO_ERR 0 /* no error */
52#define FC_EX_TIMEOUT 1 /* Exchange timeout */
53#define FC_EX_CLOSED 2 /* Exchange closed */
54
55/* some helpful macros */
56
57#define ntohll(x) be64_to_cpu(x)
58#define htonll(x) cpu_to_be64(x)
59
60#define ntoh24(p) (((p)[0] << 16) | ((p)[1] << 8) | ((p)[2]))
61
62#define hton24(p, v) do { \
63 p[0] = (((v) >> 16) & 0xFF); \
64 p[1] = (((v) >> 8) & 0xFF); \
65 p[2] = ((v) & 0xFF); \
66 } while (0)
67
68/*
69 * FC HBA status
70 */
71#define FC_PAUSE (1 << 1)
72#define FC_LINK_UP (1 << 0)
73
74enum fc_lport_state {
75 LPORT_ST_NONE = 0,
76 LPORT_ST_FLOGI,
77 LPORT_ST_DNS,
78 LPORT_ST_RPN_ID,
79 LPORT_ST_RFT_ID,
80 LPORT_ST_SCR,
81 LPORT_ST_READY,
82 LPORT_ST_LOGO,
83 LPORT_ST_RESET
84};
85
86enum fc_disc_event {
87 DISC_EV_NONE = 0,
88 DISC_EV_SUCCESS,
89 DISC_EV_FAILED
90};
91
92enum fc_rport_state {
93 RPORT_ST_NONE = 0,
94 RPORT_ST_INIT, /* initialized */
95 RPORT_ST_PLOGI, /* waiting for PLOGI completion */
96 RPORT_ST_PRLI, /* waiting for PRLI completion */
97 RPORT_ST_RTV, /* waiting for RTV completion */
98 RPORT_ST_READY, /* ready for use */
99 RPORT_ST_LOGO, /* port logout sent */
100};
101
102enum fc_rport_trans_state {
103 FC_PORTSTATE_ROGUE,
104 FC_PORTSTATE_REAL,
105};
106
107/**
108 * struct fc_disc_port - temporary discovery port to hold rport identifiers
109 * @lp: Fibre Channel host port instance
110 * @peers: node for list management during discovery and RSCN processing
111 * @ids: identifiers structure to pass to fc_remote_port_add()
112 * @rport_work: work struct for starting the rport state machine
113 */
114struct fc_disc_port {
115 struct fc_lport *lp;
116 struct list_head peers;
117 struct fc_rport_identifiers ids;
118 struct work_struct rport_work;
119};
120
121enum fc_rport_event {
122 RPORT_EV_NONE = 0,
123 RPORT_EV_CREATED,
124 RPORT_EV_FAILED,
125 RPORT_EV_STOP,
126 RPORT_EV_LOGO
127};
128
129struct fc_rport_operations {
130 void (*event_callback)(struct fc_lport *, struct fc_rport *,
131 enum fc_rport_event);
132};
133
134/**
135 * struct fc_rport_libfc_priv - libfc internal information about a remote port
136 * @local_port: Fibre Channel host port instance
137 * @rp_state: state tracks progress of PLOGI, PRLI, and RTV exchanges
138 * @flags: REC and RETRY supported flags
139 * @max_seq: maximum number of concurrent sequences
140 * @retries: retry count in current state
141 * @e_d_tov: error detect timeout value (in msec)
142 * @r_a_tov: resource allocation timeout value (in msec)
143 * @rp_mutex: mutex protects rport
144 * @retry_work:
145 * @event_callback: Callback for rport READY, FAILED or LOGO
146 */
147struct fc_rport_libfc_priv {
148 struct fc_lport *local_port;
149 enum fc_rport_state rp_state;
150 u16 flags;
151 #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0)
152 #define FC_RP_FLAGS_RETRY (1 << 1)
153 u16 max_seq;
154 unsigned int retries;
155 unsigned int e_d_tov;
156 unsigned int r_a_tov;
157 enum fc_rport_trans_state trans_state;
158 struct mutex rp_mutex;
159 struct delayed_work retry_work;
160 enum fc_rport_event event;
161 struct fc_rport_operations *ops;
162 struct list_head peers;
163 struct work_struct event_work;
164};
165
166#define PRIV_TO_RPORT(x) \
167 (struct fc_rport *)((void *)x - sizeof(struct fc_rport));
168#define RPORT_TO_PRIV(x) \
169 (struct fc_rport_libfc_priv *)((void *)x + sizeof(struct fc_rport));
170
171struct fc_rport *fc_rport_rogue_create(struct fc_disc_port *);
172
173static inline void fc_rport_set_name(struct fc_rport *rport, u64 wwpn, u64 wwnn)
174{
175 rport->node_name = wwnn;
176 rport->port_name = wwpn;
177}
178
179/*
180 * fcoe stats structure
181 */
182struct fcoe_dev_stats {
183 u64 SecondsSinceLastReset;
184 u64 TxFrames;
185 u64 TxWords;
186 u64 RxFrames;
187 u64 RxWords;
188 u64 ErrorFrames;
189 u64 DumpedFrames;
190 u64 LinkFailureCount;
191 u64 LossOfSignalCount;
192 u64 InvalidTxWordCount;
193 u64 InvalidCRCCount;
194 u64 InputRequests;
195 u64 OutputRequests;
196 u64 ControlRequests;
197 u64 InputMegabytes;
198 u64 OutputMegabytes;
199};
200
201/*
202 * els data is used for passing ELS respone specific
203 * data to send ELS response mainly using infomation
204 * in exchange and sequence in EM layer.
205 */
206struct fc_seq_els_data {
207 struct fc_frame *fp;
208 enum fc_els_rjt_reason reason;
209 enum fc_els_rjt_explan explan;
210};
211
212/*
213 * FCP request structure, one for each scsi cmd request
214 */
215struct fc_fcp_pkt {
216 /*
217 * housekeeping stuff
218 */
219 struct fc_lport *lp; /* handle to hba struct */
220 u16 state; /* scsi_pkt state state */
221 u16 tgt_flags; /* target flags */
222 atomic_t ref_cnt; /* fcp pkt ref count */
223 spinlock_t scsi_pkt_lock; /* Must be taken before the host lock
224 * if both are held at the same time */
225 /*
226 * SCSI I/O related stuff
227 */
228 struct scsi_cmnd *cmd; /* scsi command pointer. set/clear
229 * under host lock */
230 struct list_head list; /* tracks queued commands. access under
231 * host lock */
232 /*
233 * timeout related stuff
234 */
235 struct timer_list timer; /* command timer */
236 struct completion tm_done;
237 int wait_for_comp;
238 unsigned long start_time; /* start jiffie */
239 unsigned long end_time; /* end jiffie */
240 unsigned long last_pkt_time; /* jiffies of last frame received */
241
242 /*
243 * scsi cmd and data transfer information
244 */
245 u32 data_len;
246 /*
247 * transport related veriables
248 */
249 struct fcp_cmnd cdb_cmd;
250 size_t xfer_len;
251 u32 xfer_contig_end; /* offset of end of contiguous xfer */
252 u16 max_payload; /* max payload size in bytes */
253
254 /*
255 * scsi/fcp return status
256 */
257 u32 io_status; /* SCSI result upper 24 bits */
258 u8 cdb_status;
259 u8 status_code; /* FCP I/O status */
260 /* bit 3 Underrun bit 2: overrun */
261 u8 scsi_comp_flags;
262 u32 req_flags; /* bit 0: read bit:1 write */
263 u32 scsi_resid; /* residule length */
264
265 struct fc_rport *rport; /* remote port pointer */
266 struct fc_seq *seq_ptr; /* current sequence pointer */
267 /*
268 * Error Processing
269 */
270 u8 recov_retry; /* count of recovery retries */
271 struct fc_seq *recov_seq; /* sequence for REC or SRR */
272};
273
274/*
275 * Structure and function definitions for managing Fibre Channel Exchanges
276 * and Sequences
277 *
278 * fc_exch holds state for one exchange and links to its active sequence.
279 *
280 * fc_seq holds the state for an individual sequence.
281 */
282
283struct fc_exch_mgr;
284
285/*
286 * Sequence.
287 */
288struct fc_seq {
289 u8 id; /* seq ID */
290 u16 ssb_stat; /* status flags for sequence status block */
291 u16 cnt; /* frames sent so far on sequence */
292 u32 rec_data; /* FC-4 value for REC */
293};
294
295#define FC_EX_DONE (1 << 0) /* ep is completed */
296#define FC_EX_RST_CLEANUP (1 << 1) /* reset is forcing completion */
297
298/*
299 * Exchange.
300 *
301 * Locking notes: The ex_lock protects following items:
302 * state, esb_stat, f_ctl, seq.ssb_stat
303 * seq_id
304 * sequence allocation
305 */
306struct fc_exch {
307 struct fc_exch_mgr *em; /* exchange manager */
308 u32 state; /* internal driver state */
309 u16 xid; /* our exchange ID */
310 struct list_head ex_list; /* free or busy list linkage */
311 spinlock_t ex_lock; /* lock covering exchange state */
312 atomic_t ex_refcnt; /* reference counter */
313 struct delayed_work timeout_work; /* timer for upper level protocols */
314 struct fc_lport *lp; /* fc device instance */
315 u16 oxid; /* originator's exchange ID */
316 u16 rxid; /* responder's exchange ID */
317 u32 oid; /* originator's FCID */
318 u32 sid; /* source FCID */
319 u32 did; /* destination FCID */
320 u32 esb_stat; /* exchange status for ESB */
321 u32 r_a_tov; /* r_a_tov from rport (msec) */
322 u8 seq_id; /* next sequence ID to use */
323 u32 f_ctl; /* F_CTL flags for sequences */
324 u8 fh_type; /* frame type */
325 enum fc_class class; /* class of service */
326 struct fc_seq seq; /* single sequence */
327 /*
328 * Handler for responses to this current exchange.
329 */
330 void (*resp)(struct fc_seq *, struct fc_frame *, void *);
331 void (*destructor)(struct fc_seq *, void *);
332 /*
333 * arg is passed as void pointer to exchange
334 * resp and destructor handlers
335 */
336 void *arg;
337};
338#define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq)
339
340struct libfc_function_template {
341
342 /**
343 * Mandatory Fields
344 *
345 * These handlers must be implemented by the LLD.
346 */
347
348 /*
349 * Interface to send a FC frame
350 */
351 int (*frame_send)(struct fc_lport *lp, struct fc_frame *fp);
352
353 /**
354 * Optional Fields
355 *
356 * The LLD may choose to implement any of the following handlers.
357 * If LLD doesn't specify hander and leaves its pointer NULL then
358 * the default libfc function will be used for that handler.
359 */
360
361 /**
362 * ELS/CT interfaces
363 */
364
365 /*
366 * elsct_send - sends ELS/CT frame
367 */
368 struct fc_seq *(*elsct_send)(struct fc_lport *lport,
369 struct fc_rport *rport,
370 struct fc_frame *fp,
371 unsigned int op,
372 void (*resp)(struct fc_seq *,
373 struct fc_frame *fp,
374 void *arg),
375 void *arg, u32 timer_msec);
376 /**
377 * Exhance Manager interfaces
378 */
379
380 /*
381 * Send the FC frame payload using a new exchange and sequence.
382 *
383 * The frame pointer with some of the header's fields must be
384 * filled before calling exch_seq_send(), those fields are,
385 *
386 * - routing control
387 * - FC port did
388 * - FC port sid
389 * - FC header type
390 * - frame control
391 * - parameter or relative offset
392 *
393 * The exchange response handler is set in this routine to resp()
394 * function pointer. It can be called in two scenarios: if a timeout
395 * occurs or if a response frame is received for the exchange. The
396 * fc_frame pointer in response handler will also indicate timeout
397 * as error using IS_ERR related macros.
398 *
399 * The exchange destructor handler is also set in this routine.
400 * The destructor handler is invoked by EM layer when exchange
401 * is about to free, this can be used by caller to free its
402 * resources along with exchange free.
403 *
404 * The arg is passed back to resp and destructor handler.
405 *
406 * The timeout value (in msec) for an exchange is set if non zero
407 * timer_msec argument is specified. The timer is canceled when
408 * it fires or when the exchange is done. The exchange timeout handler
409 * is registered by EM layer.
410 */
411 struct fc_seq *(*exch_seq_send)(struct fc_lport *lp,
412 struct fc_frame *fp,
413 void (*resp)(struct fc_seq *sp,
414 struct fc_frame *fp,
415 void *arg),
416 void (*destructor)(struct fc_seq *sp,
417 void *arg),
418 void *arg, unsigned int timer_msec);
419
420 /*
421 * send a frame using existing sequence and exchange.
422 */
423 int (*seq_send)(struct fc_lport *lp, struct fc_seq *sp,
424 struct fc_frame *fp);
425
426 /*
427 * Send ELS response using mainly infomation
428 * in exchange and sequence in EM layer.
429 */
430 void (*seq_els_rsp_send)(struct fc_seq *sp, enum fc_els_cmd els_cmd,
431 struct fc_seq_els_data *els_data);
432
433 /*
434 * Abort an exchange and sequence. Generally called because of a
435 * exchange timeout or an abort from the upper layer.
436 *
437 * A timer_msec can be specified for abort timeout, if non-zero
438 * timer_msec value is specified then exchange resp handler
439 * will be called with timeout error if no response to abort.
440 */
441 int (*seq_exch_abort)(const struct fc_seq *req_sp,
442 unsigned int timer_msec);
443
444 /*
445 * Indicate that an exchange/sequence tuple is complete and the memory
446 * allocated for the related objects may be freed.
447 */
448 void (*exch_done)(struct fc_seq *sp);
449
450 /*
451 * Assigns a EM and a free XID for an new exchange and then
452 * allocates a new exchange and sequence pair.
453 * The fp can be used to determine free XID.
454 */
455 struct fc_exch *(*exch_get)(struct fc_lport *lp, struct fc_frame *fp);
456
457 /*
458 * Release previously assigned XID by exch_get API.
459 * The LLD may implement this if XID is assigned by LLD
460 * in exch_get().
461 */
462 void (*exch_put)(struct fc_lport *lp, struct fc_exch_mgr *mp,
463 u16 ex_id);
464
465 /*
466 * Start a new sequence on the same exchange/sequence tuple.
467 */
468 struct fc_seq *(*seq_start_next)(struct fc_seq *sp);
469
470 /*
471 * Reset an exchange manager, completing all sequences and exchanges.
472 * If s_id is non-zero, reset only exchanges originating from that FID.
473 * If d_id is non-zero, reset only exchanges sending to that FID.
474 */
475 void (*exch_mgr_reset)(struct fc_exch_mgr *,
476 u32 s_id, u32 d_id);
477
478 void (*rport_flush_queue)(void);
479 /**
480 * Local Port interfaces
481 */
482
483 /*
484 * Receive a frame to a local port.
485 */
486 void (*lport_recv)(struct fc_lport *lp, struct fc_seq *sp,
487 struct fc_frame *fp);
488
489 int (*lport_reset)(struct fc_lport *);
490
491 /**
492 * Remote Port interfaces
493 */
494
495 /*
496 * Initiates the RP state machine. It is called from the LP module.
497 * This function will issue the following commands to the N_Port
498 * identified by the FC ID provided.
499 *
500 * - PLOGI
501 * - PRLI
502 * - RTV
503 */
504 int (*rport_login)(struct fc_rport *rport);
505
506 /*
507 * Logoff, and remove the rport from the transport if
508 * it had been added. This will send a LOGO to the target.
509 */
510 int (*rport_logoff)(struct fc_rport *rport);
511
512 /*
513 * Recieve a request from a remote port.
514 */
515 void (*rport_recv_req)(struct fc_seq *, struct fc_frame *,
516 struct fc_rport *);
517
518 struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32);
519
520 /**
521 * FCP interfaces
522 */
523
524 /*
525 * Send a fcp cmd from fsp pkt.
526 * Called with the SCSI host lock unlocked and irqs disabled.
527 *
528 * The resp handler is called when FCP_RSP received.
529 *
530 */
531 int (*fcp_cmd_send)(struct fc_lport *lp, struct fc_fcp_pkt *fsp,
532 void (*resp)(struct fc_seq *, struct fc_frame *fp,
533 void *arg));
534
535 /*
536 * Used at least durring linkdown and reset
537 */
538 void (*fcp_cleanup)(struct fc_lport *lp);
539
540 /*
541 * Abort all I/O on a local port
542 */
543 void (*fcp_abort_io)(struct fc_lport *lp);
544
545 /**
546 * Discovery interfaces
547 */
548
549 void (*disc_recv_req)(struct fc_seq *,
550 struct fc_frame *, struct fc_lport *);
551
552 /*
553 * Start discovery for a local port.
554 */
555 void (*disc_start)(void (*disc_callback)(struct fc_lport *,
556 enum fc_disc_event),
557 struct fc_lport *);
558
559 /*
560 * Stop discovery for a given lport. This will remove
561 * all discovered rports
562 */
563 void (*disc_stop) (struct fc_lport *);
564
565 /*
566 * Stop discovery for a given lport. This will block
567 * until all discovered rports are deleted from the
568 * FC transport class
569 */
570 void (*disc_stop_final) (struct fc_lport *);
571};
572
573/* information used by the discovery layer */
574struct fc_disc {
575 unsigned char retry_count;
576 unsigned char delay;
577 unsigned char pending;
578 unsigned char requested;
579 unsigned short seq_count;
580 unsigned char buf_len;
581 enum fc_disc_event event;
582
583 void (*disc_callback)(struct fc_lport *,
584 enum fc_disc_event);
585
586 struct list_head rports;
587 struct fc_lport *lport;
588 struct mutex disc_mutex;
589 struct fc_gpn_ft_resp partial_buf; /* partial name buffer */
590 struct delayed_work disc_work;
591};
592
593struct fc_lport {
594 struct list_head list;
595
596 /* Associations */
597 struct Scsi_Host *host;
598 struct fc_exch_mgr *emp;
599 struct fc_rport *dns_rp;
600 struct fc_rport *ptp_rp;
601 void *scsi_priv;
602 struct fc_disc disc;
603
604 /* Operational Information */
605 struct libfc_function_template tt;
606 u16 link_status;
607 enum fc_lport_state state;
608 unsigned long boot_time;
609
610 struct fc_host_statistics host_stats;
611 struct fcoe_dev_stats *dev_stats[NR_CPUS];
612 u64 wwpn;
613 u64 wwnn;
614 u8 retry_count;
615
616 /* Capabilities */
617 u32 sg_supp:1; /* scatter gather supported */
618 u32 seq_offload:1; /* seq offload supported */
619 u32 crc_offload:1; /* crc offload supported */
620 u32 lro_enabled:1; /* large receive offload */
621 u32 mfs; /* max FC payload size */
622 unsigned int service_params;
623 unsigned int e_d_tov;
624 unsigned int r_a_tov;
625 u8 max_retry_count;
626 u16 link_speed;
627 u16 link_supported_speeds;
628 u16 lro_xid; /* max xid for fcoe lro */
629 struct fc_ns_fts fcts; /* FC-4 type masks */
630 struct fc_els_rnid_gen rnid_gen; /* RNID information */
631
632 /* Semaphores */
633 struct mutex lp_mutex;
634
635 /* Miscellaneous */
636 struct delayed_work retry_work;
637 struct delayed_work disc_work;
638};
639
640/**
641 * FC_LPORT HELPER FUNCTIONS
642 *****************************/
643static inline void *lport_priv(const struct fc_lport *lp)
644{
645 return (void *)(lp + 1);
646}
647
648static inline int fc_lport_test_ready(struct fc_lport *lp)
649{
650 return lp->state == LPORT_ST_READY;
651}
652
653static inline void fc_set_wwnn(struct fc_lport *lp, u64 wwnn)
654{
655 lp->wwnn = wwnn;
656}
657
658static inline void fc_set_wwpn(struct fc_lport *lp, u64 wwnn)
659{
660 lp->wwpn = wwnn;
661}
662
663static inline void fc_lport_state_enter(struct fc_lport *lp,
664 enum fc_lport_state state)
665{
666 if (state != lp->state)
667 lp->retry_count = 0;
668 lp->state = state;
669}
670
671
672/**
673 * LOCAL PORT LAYER
674 *****************************/
675int fc_lport_init(struct fc_lport *lp);
676
677/*
678 * Destroy the specified local port by finding and freeing all
679 * fc_rports associated with it and then by freeing the fc_lport
680 * itself.
681 */
682int fc_lport_destroy(struct fc_lport *lp);
683
684/*
685 * Logout the specified local port from the fabric
686 */
687int fc_fabric_logoff(struct fc_lport *lp);
688
689/*
690 * Initiate the LP state machine. This handler will use fc_host_attr
691 * to store the FLOGI service parameters, so fc_host_attr must be
692 * initialized before calling this handler.
693 */
694int fc_fabric_login(struct fc_lport *lp);
695
696/*
697 * The link is up for the given local port.
698 */
699void fc_linkup(struct fc_lport *);
700
701/*
702 * Link is down for the given local port.
703 */
704void fc_linkdown(struct fc_lport *);
705
706/*
707 * Pause and unpause traffic.
708 */
709void fc_pause(struct fc_lport *);
710void fc_unpause(struct fc_lport *);
711
712/*
713 * Configure the local port.
714 */
715int fc_lport_config(struct fc_lport *);
716
717/*
718 * Reset the local port.
719 */
720int fc_lport_reset(struct fc_lport *);
721
722/*
723 * Set the mfs or reset
724 */
725int fc_set_mfs(struct fc_lport *lp, u32 mfs);
726
727
728/**
729 * REMOTE PORT LAYER
730 *****************************/
731int fc_rport_init(struct fc_lport *lp);
732void fc_rport_terminate_io(struct fc_rport *rp);
733
734/**
735 * DISCOVERY LAYER
736 *****************************/
737int fc_disc_init(struct fc_lport *lp);
738
739
740/**
741 * SCSI LAYER
742 *****************************/
743/*
744 * Initialize the SCSI block of libfc
745 */
746int fc_fcp_init(struct fc_lport *);
747
748/*
749 * This section provides an API which allows direct interaction
750 * with the SCSI-ml. Each of these functions satisfies a function
751 * pointer defined in Scsi_Host and therefore is always called
752 * directly from the SCSI-ml.
753 */
754int fc_queuecommand(struct scsi_cmnd *sc_cmd,
755 void (*done)(struct scsi_cmnd *));
756
757/*
758 * complete processing of a fcp packet
759 *
760 * This function may sleep if a fsp timer is pending.
761 * The host lock must not be held by caller.
762 */
763void fc_fcp_complete(struct fc_fcp_pkt *fsp);
764
765/*
766 * Send an ABTS frame to the target device. The sc_cmd argument
767 * is a pointer to the SCSI command to be aborted.
768 */
769int fc_eh_abort(struct scsi_cmnd *sc_cmd);
770
771/*
772 * Reset a LUN by sending send the tm cmd to the target.
773 */
774int fc_eh_device_reset(struct scsi_cmnd *sc_cmd);
775
776/*
777 * Reset the host adapter.
778 */
779int fc_eh_host_reset(struct scsi_cmnd *sc_cmd);
780
781/*
782 * Check rport status.
783 */
784int fc_slave_alloc(struct scsi_device *sdev);
785
786/*
787 * Adjust the queue depth.
788 */
789int fc_change_queue_depth(struct scsi_device *sdev, int qdepth);
790
791/*
792 * Change the tag type.
793 */
794int fc_change_queue_type(struct scsi_device *sdev, int tag_type);
795
796/*
797 * Free memory pools used by the FCP layer.
798 */
799void fc_fcp_destroy(struct fc_lport *);
800
801/**
802 * ELS/CT interface
803 *****************************/
804/*
805 * Initializes ELS/CT interface
806 */
807int fc_elsct_init(struct fc_lport *lp);
808
809
810/**
811 * EXCHANGE MANAGER LAYER
812 *****************************/
813/*
814 * Initializes Exchange Manager related
815 * function pointers in struct libfc_function_template.
816 */
817int fc_exch_init(struct fc_lport *lp);
818
819/*
820 * Allocates an Exchange Manager (EM).
821 *
822 * The EM manages exchanges for their allocation and
823 * free, also allows exchange lookup for received
824 * frame.
825 *
826 * The class is used for initializing FC class of
827 * allocated exchange from EM.
828 *
829 * The min_xid and max_xid will limit new
830 * exchange ID (XID) within this range for
831 * a new exchange.
832 * The LLD may choose to have multiple EMs,
833 * e.g. one EM instance per CPU receive thread in LLD.
834 * The LLD can use exch_get() of struct libfc_function_template
835 * to specify XID for a new exchange within
836 * a specified EM instance.
837 *
838 * The em_idx to uniquely identify an EM instance.
839 */
840struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lp,
841 enum fc_class class,
842 u16 min_xid,
843 u16 max_xid);
844
845/*
846 * Free an exchange manager.
847 */
848void fc_exch_mgr_free(struct fc_exch_mgr *mp);
849
850/*
851 * Receive a frame on specified local port and exchange manager.
852 */
853void fc_exch_recv(struct fc_lport *lp, struct fc_exch_mgr *mp,
854 struct fc_frame *fp);
855
856/*
857 * This function is for exch_seq_send function pointer in
858 * struct libfc_function_template, see comment block on
859 * exch_seq_send for description of this function.
860 */
861struct fc_seq *fc_exch_seq_send(struct fc_lport *lp,
862 struct fc_frame *fp,
863 void (*resp)(struct fc_seq *sp,
864 struct fc_frame *fp,
865 void *arg),
866 void (*destructor)(struct fc_seq *sp,
867 void *arg),
868 void *arg, u32 timer_msec);
869
870/*
871 * send a frame using existing sequence and exchange.
872 */
873int fc_seq_send(struct fc_lport *lp, struct fc_seq *sp, struct fc_frame *fp);
874
875/*
876 * Send ELS response using mainly infomation
877 * in exchange and sequence in EM layer.
878 */
879void fc_seq_els_rsp_send(struct fc_seq *sp, enum fc_els_cmd els_cmd,
880 struct fc_seq_els_data *els_data);
881
882/*
883 * This function is for seq_exch_abort function pointer in
884 * struct libfc_function_template, see comment block on
885 * seq_exch_abort for description of this function.
886 */
887int fc_seq_exch_abort(const struct fc_seq *req_sp, unsigned int timer_msec);
888
889/*
890 * Indicate that an exchange/sequence tuple is complete and the memory
891 * allocated for the related objects may be freed.
892 */
893void fc_exch_done(struct fc_seq *sp);
894
895/*
896 * Assigns a EM and XID for a frame and then allocates
897 * a new exchange and sequence pair.
898 * The fp can be used to determine free XID.
899 */
900struct fc_exch *fc_exch_get(struct fc_lport *lp, struct fc_frame *fp);
901
902/*
903 * Allocate a new exchange and sequence pair.
904 * if ex_id is zero then next free exchange id
905 * from specified exchange manger mp will be assigned.
906 */
907struct fc_exch *fc_exch_alloc(struct fc_exch_mgr *mp,
908 struct fc_frame *fp, u16 ex_id);
909/*
910 * Start a new sequence on the same exchange as the supplied sequence.
911 */
912struct fc_seq *fc_seq_start_next(struct fc_seq *sp);
913
914/*
915 * Reset an exchange manager, completing all sequences and exchanges.
916 * If s_id is non-zero, reset only exchanges originating from that FID.
917 * If d_id is non-zero, reset only exchanges sending to that FID.
918 */
919void fc_exch_mgr_reset(struct fc_exch_mgr *, u32 s_id, u32 d_id);
920
921/*
922 * Functions for fc_functions_template
923 */
924void fc_get_host_speed(struct Scsi_Host *shost);
925void fc_get_host_port_type(struct Scsi_Host *shost);
926void fc_get_host_port_state(struct Scsi_Host *shost);
927void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout);
928struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *);
929
930/*
931 * module setup functions.
932 */
933int fc_setup_exch_mgr(void);
934void fc_destroy_exch_mgr(void);
935int fc_setup_rport(void);
936void fc_destroy_rport(void);
937
938#endif /* _LIBFC_H_ */
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
new file mode 100644
index 000000000000..89fdbb9a6a1b
--- /dev/null
+++ b/include/scsi/libfcoe.h
@@ -0,0 +1,176 @@
1/*
2 * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 * Maintained at www.Open-FCoE.org
18 */
19
20#ifndef _LIBFCOE_H
21#define _LIBFCOE_H
22
23#include <linux/netdevice.h>
24#include <linux/skbuff.h>
25#include <scsi/fc/fc_fcoe.h>
26#include <scsi/libfc.h>
27
28/*
29 * this percpu struct for fcoe
30 */
31struct fcoe_percpu_s {
32 int cpu;
33 struct task_struct *thread;
34 struct sk_buff_head fcoe_rx_list;
35 struct page *crc_eof_page;
36 int crc_eof_offset;
37};
38
39/*
40 * the fcoe sw transport private data
41 */
42struct fcoe_softc {
43 struct list_head list;
44 struct fc_lport *lp;
45 struct net_device *real_dev;
46 struct net_device *phys_dev; /* device with ethtool_ops */
47 struct packet_type fcoe_packet_type;
48 struct sk_buff_head fcoe_pending_queue;
49
50 u8 dest_addr[ETH_ALEN];
51 u8 ctl_src_addr[ETH_ALEN];
52 u8 data_src_addr[ETH_ALEN];
53 /*
54 * fcoe protocol address learning related stuff
55 */
56 u16 flogi_oxid;
57 u8 flogi_progress;
58 u8 address_mode;
59};
60
61static inline struct fcoe_softc *fcoe_softc(
62 const struct fc_lport *lp)
63{
64 return (struct fcoe_softc *)lport_priv(lp);
65}
66
67static inline struct net_device *fcoe_netdev(
68 const struct fc_lport *lp)
69{
70 return fcoe_softc(lp)->real_dev;
71}
72
73static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb)
74{
75 return (struct fcoe_hdr *)skb_network_header(skb);
76}
77
78static inline int skb_fcoe_offset(const struct sk_buff *skb)
79{
80 return skb_network_offset(skb);
81}
82
83static inline struct fc_frame_header *skb_fc_header(const struct sk_buff *skb)
84{
85 return (struct fc_frame_header *)skb_transport_header(skb);
86}
87
88static inline int skb_fc_offset(const struct sk_buff *skb)
89{
90 return skb_transport_offset(skb);
91}
92
93static inline void skb_reset_fc_header(struct sk_buff *skb)
94{
95 skb_reset_network_header(skb);
96 skb_set_transport_header(skb, skb_network_offset(skb) +
97 sizeof(struct fcoe_hdr));
98}
99
100static inline bool skb_fc_is_data(const struct sk_buff *skb)
101{
102 return skb_fc_header(skb)->fh_r_ctl == FC_RCTL_DD_SOL_DATA;
103}
104
105static inline bool skb_fc_is_cmd(const struct sk_buff *skb)
106{
107 return skb_fc_header(skb)->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD;
108}
109
110static inline bool skb_fc_has_exthdr(const struct sk_buff *skb)
111{
112 return (skb_fc_header(skb)->fh_r_ctl == FC_RCTL_VFTH) ||
113 (skb_fc_header(skb)->fh_r_ctl == FC_RCTL_IFRH) ||
114 (skb_fc_header(skb)->fh_r_ctl == FC_RCTL_ENCH);
115}
116
117static inline bool skb_fc_is_roff(const struct sk_buff *skb)
118{
119 return skb_fc_header(skb)->fh_f_ctl[2] & FC_FC_REL_OFF;
120}
121
122static inline u16 skb_fc_oxid(const struct sk_buff *skb)
123{
124 return be16_to_cpu(skb_fc_header(skb)->fh_ox_id);
125}
126
127static inline u16 skb_fc_rxid(const struct sk_buff *skb)
128{
129 return be16_to_cpu(skb_fc_header(skb)->fh_rx_id);
130}
131
132/* FIXME - DMA_BIDIRECTIONAL ? */
133#define skb_cb(skb) ((struct fcoe_rcv_info *)&((skb)->cb[0]))
134#define skb_cmd(skb) (skb_cb(skb)->fr_cmd)
135#define skb_dir(skb) (skb_cmd(skb)->sc_data_direction)
136static inline bool skb_fc_is_read(const struct sk_buff *skb)
137{
138 if (skb_fc_is_cmd(skb) && skb_cmd(skb))
139 return skb_dir(skb) == DMA_FROM_DEVICE;
140 return false;
141}
142
143static inline bool skb_fc_is_write(const struct sk_buff *skb)
144{
145 if (skb_fc_is_cmd(skb) && skb_cmd(skb))
146 return skb_dir(skb) == DMA_TO_DEVICE;
147 return false;
148}
149
150/* libfcoe funcs */
151int fcoe_reset(struct Scsi_Host *shost);
152u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN],
153 unsigned int scheme, unsigned int port);
154
155u32 fcoe_fc_crc(struct fc_frame *fp);
156int fcoe_xmit(struct fc_lport *, struct fc_frame *);
157int fcoe_rcv(struct sk_buff *, struct net_device *,
158 struct packet_type *, struct net_device *);
159
160int fcoe_percpu_receive_thread(void *arg);
161void fcoe_clean_pending_queue(struct fc_lport *lp);
162void fcoe_percpu_clean(struct fc_lport *lp);
163void fcoe_watchdog(ulong vp);
164int fcoe_link_ok(struct fc_lport *lp);
165
166struct fc_lport *fcoe_hostlist_lookup(const struct net_device *);
167int fcoe_hostlist_add(const struct fc_lport *);
168int fcoe_hostlist_remove(const struct fc_lport *);
169
170struct Scsi_Host *fcoe_host_alloc(struct scsi_host_template *, int);
171int fcoe_libfc_config(struct fc_lport *, struct libfc_function_template *);
172
173/* fcoe sw hba */
174int __init fcoe_sw_init(void);
175int __exit fcoe_sw_exit(void);
176#endif /* _LIBFCOE_H */
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 5e75bb7f311c..7360e1916e75 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -30,6 +30,7 @@
30#include <linux/workqueue.h> 30#include <linux/workqueue.h>
31#include <scsi/iscsi_proto.h> 31#include <scsi/iscsi_proto.h>
32#include <scsi/iscsi_if.h> 32#include <scsi/iscsi_if.h>
33#include <scsi/scsi_transport_iscsi.h>
33 34
34struct scsi_transport_template; 35struct scsi_transport_template;
35struct scsi_host_template; 36struct scsi_host_template;
@@ -70,12 +71,12 @@ enum {
70/* Connection suspend "bit" */ 71/* Connection suspend "bit" */
71#define ISCSI_SUSPEND_BIT 1 72#define ISCSI_SUSPEND_BIT 1
72 73
73#define ISCSI_ITT_MASK (0x1fff) 74#define ISCSI_ITT_MASK 0x1fff
74#define ISCSI_TOTAL_CMDS_MAX 4096 75#define ISCSI_TOTAL_CMDS_MAX 4096
75/* this must be a power of two greater than ISCSI_MGMT_CMDS_MAX */ 76/* this must be a power of two greater than ISCSI_MGMT_CMDS_MAX */
76#define ISCSI_TOTAL_CMDS_MIN 16 77#define ISCSI_TOTAL_CMDS_MIN 16
77#define ISCSI_AGE_SHIFT 28 78#define ISCSI_AGE_SHIFT 28
78#define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT) 79#define ISCSI_AGE_MASK 0xf
79 80
80#define ISCSI_ADDRESS_BUF_LEN 64 81#define ISCSI_ADDRESS_BUF_LEN 64
81 82
@@ -93,24 +94,38 @@ enum {
93 ISCSI_TASK_RUNNING, 94 ISCSI_TASK_RUNNING,
94}; 95};
95 96
97struct iscsi_r2t_info {
98 __be32 ttt; /* copied from R2T */
99 __be32 exp_statsn; /* copied from R2T */
100 uint32_t data_length; /* copied from R2T */
101 uint32_t data_offset; /* copied from R2T */
102 int data_count; /* DATA-Out payload progress */
103 int datasn;
104 /* LLDs should set/update these values */
105 int sent; /* R2T sequence progress */
106};
107
96struct iscsi_task { 108struct iscsi_task {
97 /* 109 /*
98 * Because LLDs allocate their hdr differently, this is a pointer 110 * Because LLDs allocate their hdr differently, this is a pointer
99 * and length to that storage. It must be setup at session 111 * and length to that storage. It must be setup at session
100 * creation time. 112 * creation time.
101 */ 113 */
102 struct iscsi_cmd *hdr; 114 struct iscsi_hdr *hdr;
103 unsigned short hdr_max; 115 unsigned short hdr_max;
104 unsigned short hdr_len; /* accumulated size of hdr used */ 116 unsigned short hdr_len; /* accumulated size of hdr used */
117 /* copied values in case we need to send tmfs */
118 itt_t hdr_itt;
119 __be32 cmdsn;
120 uint8_t lun[8];
121
105 int itt; /* this ITT */ 122 int itt; /* this ITT */
106 123
107 uint32_t unsol_datasn;
108 unsigned imm_count; /* imm-data (bytes) */ 124 unsigned imm_count; /* imm-data (bytes) */
109 unsigned unsol_count; /* unsolicited (bytes)*/
110 /* offset in unsolicited stream (bytes); */ 125 /* offset in unsolicited stream (bytes); */
111 unsigned unsol_offset; 126 struct iscsi_r2t_info unsol_r2t;
112 unsigned data_count; /* remaining Data-Out */
113 char *data; /* mgmt payload */ 127 char *data; /* mgmt payload */
128 unsigned data_count;
114 struct scsi_cmnd *sc; /* associated SCSI cmd*/ 129 struct scsi_cmnd *sc; /* associated SCSI cmd*/
115 struct iscsi_conn *conn; /* used connection */ 130 struct iscsi_conn *conn; /* used connection */
116 131
@@ -121,6 +136,11 @@ struct iscsi_task {
121 void *dd_data; /* driver/transport data */ 136 void *dd_data; /* driver/transport data */
122}; 137};
123 138
139static inline int iscsi_task_has_unsol_data(struct iscsi_task *task)
140{
141 return task->unsol_r2t.data_length > task->unsol_r2t.sent;
142}
143
124static inline void* iscsi_next_hdr(struct iscsi_task *task) 144static inline void* iscsi_next_hdr(struct iscsi_task *task)
125{ 145{
126 return (void*)task->hdr + task->hdr_len; 146 return (void*)task->hdr + task->hdr_len;
@@ -287,6 +307,11 @@ struct iscsi_session {
287 struct iscsi_pool cmdpool; /* PDU's pool */ 307 struct iscsi_pool cmdpool; /* PDU's pool */
288}; 308};
289 309
310enum {
311 ISCSI_HOST_SETUP,
312 ISCSI_HOST_REMOVED,
313};
314
290struct iscsi_host { 315struct iscsi_host {
291 char *initiatorname; 316 char *initiatorname;
292 /* hw address or netdev iscsi connection is bound to */ 317 /* hw address or netdev iscsi connection is bound to */
@@ -295,6 +320,12 @@ struct iscsi_host {
295 /* local address */ 320 /* local address */
296 int local_port; 321 int local_port;
297 char local_address[ISCSI_ADDRESS_BUF_LEN]; 322 char local_address[ISCSI_ADDRESS_BUF_LEN];
323
324 wait_queue_head_t session_removal_wq;
325 /* protects sessions and state */
326 spinlock_t lock;
327 int num_sessions;
328 int state;
298}; 329};
299 330
300/* 331/*
@@ -302,7 +333,7 @@ struct iscsi_host {
302 */ 333 */
303extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth); 334extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth);
304extern int iscsi_eh_abort(struct scsi_cmnd *sc); 335extern int iscsi_eh_abort(struct scsi_cmnd *sc);
305extern int iscsi_eh_host_reset(struct scsi_cmnd *sc); 336extern int iscsi_eh_target_reset(struct scsi_cmnd *sc);
306extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); 337extern int iscsi_eh_device_reset(struct scsi_cmnd *sc);
307extern int iscsi_queuecommand(struct scsi_cmnd *sc, 338extern int iscsi_queuecommand(struct scsi_cmnd *sc,
308 void (*done)(struct scsi_cmnd *)); 339 void (*done)(struct scsi_cmnd *));
@@ -351,6 +382,8 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int);
351extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, 382extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *,
352 int); 383 int);
353extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); 384extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
385extern void iscsi_session_failure(struct iscsi_cls_session *cls_session,
386 enum iscsi_err err);
354extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, 387extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
355 enum iscsi_param param, char *buf); 388 enum iscsi_param param, char *buf);
356extern void iscsi_suspend_tx(struct iscsi_conn *conn); 389extern void iscsi_suspend_tx(struct iscsi_conn *conn);
@@ -363,8 +396,9 @@ extern void iscsi_suspend_tx(struct iscsi_conn *conn);
363 * pdu and task processing 396 * pdu and task processing
364 */ 397 */
365extern void iscsi_update_cmdsn(struct iscsi_session *, struct iscsi_nopin *); 398extern void iscsi_update_cmdsn(struct iscsi_session *, struct iscsi_nopin *);
366extern void iscsi_prep_unsolicit_data_pdu(struct iscsi_task *, 399extern void iscsi_prep_data_out_pdu(struct iscsi_task *task,
367 struct iscsi_data *hdr); 400 struct iscsi_r2t_info *r2t,
401 struct iscsi_data *hdr);
368extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *, 402extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *,
369 char *, uint32_t); 403 char *, uint32_t);
370extern int iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, 404extern int iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *,
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h
new file mode 100644
index 000000000000..83e32f6d7859
--- /dev/null
+++ b/include/scsi/libiscsi_tcp.h
@@ -0,0 +1,132 @@
1/*
2 * iSCSI over TCP/IP Data-Path lib
3 *
4 * Copyright (C) 2008 Mike Christie
5 * Copyright (C) 2008 Red Hat, Inc. All rights reserved.
6 * maintained by open-iscsi@googlegroups.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * See the file COPYING included with this distribution for more details.
19 */
20
21#ifndef LIBISCSI_TCP_H
22#define LIBISCSI_TCP_H
23
24#include <scsi/libiscsi.h>
25
26struct iscsi_tcp_conn;
27struct iscsi_segment;
28struct sk_buff;
29struct hash_desc;
30
31typedef int iscsi_segment_done_fn_t(struct iscsi_tcp_conn *,
32 struct iscsi_segment *);
33
34struct iscsi_segment {
35 unsigned char *data;
36 unsigned int size;
37 unsigned int copied;
38 unsigned int total_size;
39 unsigned int total_copied;
40
41 struct hash_desc *hash;
42 unsigned char recv_digest[ISCSI_DIGEST_SIZE];
43 unsigned char digest[ISCSI_DIGEST_SIZE];
44 unsigned int digest_len;
45
46 struct scatterlist *sg;
47 void *sg_mapped;
48 unsigned int sg_offset;
49
50 iscsi_segment_done_fn_t *done;
51};
52
53/* Socket connection recieve helper */
54struct iscsi_tcp_recv {
55 struct iscsi_hdr *hdr;
56 struct iscsi_segment segment;
57
58 /* Allocate buffer for BHS + AHS */
59 uint32_t hdr_buf[64];
60
61 /* copied and flipped values */
62 int datalen;
63};
64
65struct iscsi_tcp_conn {
66 struct iscsi_conn *iscsi_conn;
67 void *dd_data;
68 int stop_stage; /* conn_stop() flag: *
69 * stop to recover, *
70 * stop to terminate */
71 /* control data */
72 struct iscsi_tcp_recv in; /* TCP receive context */
73 /* CRC32C (Rx) LLD should set this is they do not offload */
74 struct hash_desc *rx_hash;
75};
76
77struct iscsi_tcp_task {
78 uint32_t exp_datasn; /* expected target's R2TSN/DataSN */
79 int data_offset;
80 struct iscsi_r2t_info *r2t; /* in progress solict R2T */
81 struct iscsi_pool r2tpool;
82 struct kfifo *r2tqueue;
83 void *dd_data;
84};
85
86enum {
87 ISCSI_TCP_SEGMENT_DONE, /* curr seg has been processed */
88 ISCSI_TCP_SKB_DONE, /* skb is out of data */
89 ISCSI_TCP_CONN_ERR, /* iscsi layer has fired a conn err */
90 ISCSI_TCP_SUSPENDED, /* conn is suspended */
91};
92
93extern void iscsi_tcp_hdr_recv_prep(struct iscsi_tcp_conn *tcp_conn);
94extern int iscsi_tcp_recv_skb(struct iscsi_conn *conn, struct sk_buff *skb,
95 unsigned int offset, bool offloaded, int *status);
96extern void iscsi_tcp_cleanup_task(struct iscsi_task *task);
97extern int iscsi_tcp_task_init(struct iscsi_task *task);
98extern int iscsi_tcp_task_xmit(struct iscsi_task *task);
99
100/* segment helpers */
101extern int iscsi_tcp_recv_segment_is_hdr(struct iscsi_tcp_conn *tcp_conn);
102extern int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,
103 struct iscsi_segment *segment, int recv,
104 unsigned copied);
105extern void iscsi_tcp_segment_unmap(struct iscsi_segment *segment);
106
107extern void iscsi_segment_init_linear(struct iscsi_segment *segment,
108 void *data, size_t size,
109 iscsi_segment_done_fn_t *done,
110 struct hash_desc *hash);
111extern int
112iscsi_segment_seek_sg(struct iscsi_segment *segment,
113 struct scatterlist *sg_list, unsigned int sg_count,
114 unsigned int offset, size_t size,
115 iscsi_segment_done_fn_t *done, struct hash_desc *hash);
116
117/* digest helpers */
118extern void iscsi_tcp_dgst_header(struct hash_desc *hash, const void *hdr,
119 size_t hdrlen,
120 unsigned char digest[ISCSI_DIGEST_SIZE]);
121extern struct iscsi_cls_conn *
122iscsi_tcp_conn_setup(struct iscsi_cls_session *cls_session, int dd_data_size,
123 uint32_t conn_idx);
124extern void iscsi_tcp_conn_teardown(struct iscsi_cls_conn *cls_conn);
125
126/* misc helpers */
127extern int iscsi_tcp_r2tpool_alloc(struct iscsi_session *session);
128extern void iscsi_tcp_r2tpool_free(struct iscsi_session *session);
129
130extern void iscsi_tcp_conn_get_stats(struct iscsi_cls_conn *cls_conn,
131 struct iscsi_stats *stats);
132#endif /* LIBISCSI_TCP_H */
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 192f8716aa9e..a109165714d6 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -381,6 +381,11 @@ static inline int scsi_is_wlun(unsigned int lun)
381#define DID_IMM_RETRY 0x0c /* Retry without decrementing retry count */ 381#define DID_IMM_RETRY 0x0c /* Retry without decrementing retry count */
382#define DID_REQUEUE 0x0d /* Requeue command (no immediate retry) also 382#define DID_REQUEUE 0x0d /* Requeue command (no immediate retry) also
383 * without decrementing the retry count */ 383 * without decrementing the retry count */
384#define DID_TRANSPORT_DISRUPTED 0x0e /* Transport error disrupted execution
385 * and the driver blocked the port to
386 * recover the link. Transport class will
387 * retry or fail IO */
388#define DID_TRANSPORT_FAILFAST 0x0f /* Transport class fastfailed the io */
384#define DRIVER_OK 0x00 /* Driver status */ 389#define DRIVER_OK 0x00 /* Driver status */
385 390
386/* 391/*
@@ -426,6 +431,7 @@ static inline int scsi_is_wlun(unsigned int lun)
426#define SCSI_MLQUEUE_HOST_BUSY 0x1055 431#define SCSI_MLQUEUE_HOST_BUSY 0x1055
427#define SCSI_MLQUEUE_DEVICE_BUSY 0x1056 432#define SCSI_MLQUEUE_DEVICE_BUSY 0x1056
428#define SCSI_MLQUEUE_EH_RETRY 0x1057 433#define SCSI_MLQUEUE_EH_RETRY 0x1057
434#define SCSI_MLQUEUE_TARGET_BUSY 0x1058
429 435
430/* 436/*
431 * Use these to separate status msg and our bytes 437 * Use these to separate status msg and our bytes
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index b49e725be039..01a4c58f8bad 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -159,8 +159,6 @@ struct scsi_device {
159 atomic_t iodone_cnt; 159 atomic_t iodone_cnt;
160 atomic_t ioerr_cnt; 160 atomic_t ioerr_cnt;
161 161
162 int timeout;
163
164 struct device sdev_gendev, 162 struct device sdev_gendev,
165 sdev_dev; 163 sdev_dev;
166 164
@@ -238,6 +236,16 @@ struct scsi_target {
238 * for the device at a time. */ 236 * for the device at a time. */
239 unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ 237 unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */
240 /* means no lun present */ 238 /* means no lun present */
239 /* commands actually active on LLD. protected by host lock. */
240 unsigned int target_busy;
241 /*
242 * LLDs should set this in the slave_alloc host template callout.
243 * If set to zero then there is not limit.
244 */
245 unsigned int can_queue;
246 unsigned int target_blocked;
247 unsigned int max_target_blocked;
248#define SCSI_DEFAULT_TARGET_BLOCKED 3
241 249
242 char scsi_level; 250 char scsi_level;
243 struct execute_work ew; 251 struct execute_work ew;
@@ -357,10 +365,11 @@ extern int scsi_is_target_device(const struct device *);
357extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, 365extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
358 int data_direction, void *buffer, unsigned bufflen, 366 int data_direction, void *buffer, unsigned bufflen,
359 unsigned char *sense, int timeout, int retries, 367 unsigned char *sense, int timeout, int retries,
360 int flag); 368 int flag, int *resid);
361extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, 369extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
362 int data_direction, void *buffer, unsigned bufflen, 370 int data_direction, void *buffer, unsigned bufflen,
363 struct scsi_sense_hdr *, int timeout, int retries); 371 struct scsi_sense_hdr *, int timeout, int retries,
372 int *resid);
364extern int scsi_execute_async(struct scsi_device *sdev, 373extern int scsi_execute_async(struct scsi_device *sdev,
365 const unsigned char *cmd, int cmd_len, int data_direction, 374 const unsigned char *cmd, int cmd_len, int data_direction,
366 void *buffer, unsigned bufflen, int use_sg, 375 void *buffer, unsigned bufflen, int use_sg,
diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h
index edb9525386da..b9006848b813 100644
--- a/include/scsi/scsi_ioctl.h
+++ b/include/scsi/scsi_ioctl.h
@@ -42,7 +42,7 @@ typedef struct scsi_fctargaddress {
42 42
43extern int scsi_ioctl(struct scsi_device *, int, void __user *); 43extern int scsi_ioctl(struct scsi_device *, int, void __user *);
44extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, 44extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
45 void __user *arg, struct file *filp); 45 void __user *arg, int ndelay);
46 46
47#endif /* __KERNEL__ */ 47#endif /* __KERNEL__ */
48#endif /* _SCSI_IOCTL_H */ 48#endif /* _SCSI_IOCTL_H */
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h
index cf4c219c0b5c..17231385cb37 100644
--- a/include/scsi/scsi_tcq.h
+++ b/include/scsi/scsi_tcq.h
@@ -140,8 +140,18 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag)
140 */ 140 */
141static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) 141static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth)
142{ 142{
143 shost->bqt = blk_init_tags(depth); 143 /*
144 return shost->bqt ? 0 : -ENOMEM; 144 * If the shared tag map isn't already initialized, do it now.
145 * This saves callers from having to check ->bqt when setting up
146 * devices on the shared host (for libata)
147 */
148 if (!shost->bqt) {
149 shost->bqt = blk_init_tags(depth);
150 if (!shost->bqt)
151 return -ENOMEM;
152 }
153
154 return 0;
145} 155}
146 156
147/** 157/**
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index 21018a4df452..6e04e6fe79c7 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -357,6 +357,7 @@ struct fc_rport { /* aka fc_starget_attrs */
357/* bit field values for struct fc_rport "flags" field: */ 357/* bit field values for struct fc_rport "flags" field: */
358#define FC_RPORT_DEVLOSS_PENDING 0x01 358#define FC_RPORT_DEVLOSS_PENDING 0x01
359#define FC_RPORT_SCAN_PENDING 0x02 359#define FC_RPORT_SCAN_PENDING 0x02
360#define FC_RPORT_FAST_FAIL_TIMEDOUT 0x04
360 361
361#define dev_to_rport(d) \ 362#define dev_to_rport(d) \
362 container_of(d, struct fc_rport, dev) 363 container_of(d, struct fc_rport, dev)
@@ -678,12 +679,15 @@ fc_remote_port_chkready(struct fc_rport *rport)
678 if (rport->roles & FC_PORT_ROLE_FCP_TARGET) 679 if (rport->roles & FC_PORT_ROLE_FCP_TARGET)
679 result = 0; 680 result = 0;
680 else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) 681 else if (rport->flags & FC_RPORT_DEVLOSS_PENDING)
681 result = DID_IMM_RETRY << 16; 682 result = DID_TRANSPORT_DISRUPTED << 16;
682 else 683 else
683 result = DID_NO_CONNECT << 16; 684 result = DID_NO_CONNECT << 16;
684 break; 685 break;
685 case FC_PORTSTATE_BLOCKED: 686 case FC_PORTSTATE_BLOCKED:
686 result = DID_IMM_RETRY << 16; 687 if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)
688 result = DID_TRANSPORT_FAILFAST << 16;
689 else
690 result = DID_TRANSPORT_DISRUPTED << 16;
687 break; 691 break;
688 default: 692 default:
689 result = DID_NO_CONNECT << 16; 693 result = DID_NO_CONNECT << 16;
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 8b6c91df4c7a..b50aabe2861e 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -113,10 +113,18 @@ struct iscsi_transport {
113 char *data, uint32_t data_size); 113 char *data, uint32_t data_size);
114 void (*get_stats) (struct iscsi_cls_conn *conn, 114 void (*get_stats) (struct iscsi_cls_conn *conn,
115 struct iscsi_stats *stats); 115 struct iscsi_stats *stats);
116
116 int (*init_task) (struct iscsi_task *task); 117 int (*init_task) (struct iscsi_task *task);
117 int (*xmit_task) (struct iscsi_task *task); 118 int (*xmit_task) (struct iscsi_task *task);
118 void (*cleanup_task) (struct iscsi_conn *conn, 119 void (*cleanup_task) (struct iscsi_task *task);
119 struct iscsi_task *task); 120
121 int (*alloc_pdu) (struct iscsi_task *task, uint8_t opcode);
122 int (*xmit_pdu) (struct iscsi_task *task);
123 int (*init_pdu) (struct iscsi_task *task, unsigned int offset,
124 unsigned int count);
125 void (*parse_pdu_itt) (struct iscsi_conn *conn, itt_t itt,
126 int *index, int *age);
127
120 void (*session_recovery_timedout) (struct iscsi_cls_session *session); 128 void (*session_recovery_timedout) (struct iscsi_cls_session *session);
121 struct iscsi_endpoint *(*ep_connect) (struct sockaddr *dst_addr, 129 struct iscsi_endpoint *(*ep_connect) (struct sockaddr *dst_addr,
122 int non_blocking); 130 int non_blocking);
@@ -135,7 +143,8 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt);
135/* 143/*
136 * control plane upcalls 144 * control plane upcalls
137 */ 145 */
138extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error); 146extern void iscsi_conn_error_event(struct iscsi_cls_conn *conn,
147 enum iscsi_err error);
139extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, 148extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,
140 char *data, uint32_t data_size); 149 char *data, uint32_t data_size);
141 150
@@ -207,7 +216,7 @@ extern void iscsi_host_for_each_session(struct Scsi_Host *shost,
207struct iscsi_endpoint { 216struct iscsi_endpoint {
208 void *dd_data; /* LLD private data */ 217 void *dd_data; /* LLD private data */
209 struct device dev; 218 struct device dev;
210 unsigned int id; 219 uint64_t id;
211}; 220};
212 221
213/* 222/*
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 9c309daf492b..251fc1cd5002 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -281,10 +281,12 @@
281/* specific - Analog Devices */ 281/* specific - Analog Devices */
282#define AC97_AD_TEST 0x5a /* test register */ 282#define AC97_AD_TEST 0x5a /* test register */
283#define AC97_AD_TEST2 0x5c /* undocumented test register 2 */ 283#define AC97_AD_TEST2 0x5c /* undocumented test register 2 */
284#define AC97_AD_HPFD_SHIFT 12 /* High Pass Filter Disable */
284#define AC97_AD_CODEC_CFG 0x70 /* codec configuration */ 285#define AC97_AD_CODEC_CFG 0x70 /* codec configuration */
285#define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */ 286#define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */
286#define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */ 287#define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */
287#define AC97_AD_MISC 0x76 /* Misc Control Bits */ 288#define AC97_AD_MISC 0x76 /* Misc Control Bits */
289#define AC97_AD_VREFD_SHIFT 2 /* V_REFOUT Disable (AD1888) */
288 290
289/* specific - Cirrus Logic */ 291/* specific - Cirrus Logic */
290#define AC97_CSR_ACMODE 0x5e /* AC Mode Register */ 292#define AC97_CSR_ACMODE 0x5e /* AC Mode Register */
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 2c4dc908a54a..1c02ed1d7c4a 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -575,6 +575,7 @@ enum {
575#define SNDRV_TIMER_GLOBAL_SYSTEM 0 575#define SNDRV_TIMER_GLOBAL_SYSTEM 0
576#define SNDRV_TIMER_GLOBAL_RTC 1 576#define SNDRV_TIMER_GLOBAL_RTC 1
577#define SNDRV_TIMER_GLOBAL_HPET 2 577#define SNDRV_TIMER_GLOBAL_HPET 2
578#define SNDRV_TIMER_GLOBAL_HRTIMER 3
578 579
579/* info flags */ 580/* info flags */
580#define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ 581#define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */
diff --git a/include/sound/core.h b/include/sound/core.h
index 35424a971b7a..f632484bc743 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -353,7 +353,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
353 * snd_printk - printk wrapper 353 * snd_printk - printk wrapper
354 * @fmt: format string 354 * @fmt: format string
355 * 355 *
356 * Works like print() but prints the file and the line of the caller 356 * Works like printk() but prints the file and the line of the caller
357 * when configured with CONFIG_SND_VERBOSE_PRINTK. 357 * when configured with CONFIG_SND_VERBOSE_PRINTK.
358 */ 358 */
359#define snd_printk(fmt, args...) \ 359#define snd_printk(fmt, args...) \
@@ -380,14 +380,40 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
380 printk(fmt ,##args) 380 printk(fmt ,##args)
381#endif 381#endif
382 382
383/**
384 * snd_BUG - give a BUG warning message and stack trace
385 *
386 * Calls WARN() if CONFIG_SND_DEBUG is set.
387 * Ignored when CONFIG_SND_DEBUG is not set.
388 */
383#define snd_BUG() WARN(1, "BUG?\n") 389#define snd_BUG() WARN(1, "BUG?\n")
390
391/**
392 * snd_BUG_ON - debugging check macro
393 * @cond: condition to evaluate
394 *
395 * When CONFIG_SND_DEBUG is set, this macro evaluates the given condition,
396 * and call WARN() and returns the value if it's non-zero.
397 *
398 * When CONFIG_SND_DEBUG is not set, this just returns zero, and the given
399 * condition is ignored.
400 *
401 * NOTE: the argument won't be evaluated at all when CONFIG_SND_DEBUG=n.
402 * Thus, don't put any statement that influences on the code behavior,
403 * such as pre/post increment, to the argument of this macro.
404 * If you want to evaluate and give a warning, use standard WARN_ON().
405 */
384#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond)) 406#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
385 407
386#else /* !CONFIG_SND_DEBUG */ 408#else /* !CONFIG_SND_DEBUG */
387 409
388#define snd_printd(fmt, args...) /* nothing */ 410#define snd_printd(fmt, args...) do { } while (0)
389#define snd_BUG() /* nothing */ 411#define snd_BUG() do { } while (0)
390#define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */ 412static inline int __snd_bug_on(int cond)
413{
414 return 0;
415}
416#define snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */
391 417
392#endif /* CONFIG_SND_DEBUG */ 418#endif /* CONFIG_SND_DEBUG */
393 419
diff --git a/include/sound/info.h b/include/sound/info.h
index 8ae72e74f898..7c2ee1a21b00 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -40,30 +40,34 @@ struct snd_info_buffer {
40struct snd_info_entry; 40struct snd_info_entry;
41 41
42struct snd_info_entry_text { 42struct snd_info_entry_text {
43 void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); 43 void (*read)(struct snd_info_entry *entry,
44 void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); 44 struct snd_info_buffer *buffer);
45 void (*write)(struct snd_info_entry *entry,
46 struct snd_info_buffer *buffer);
45}; 47};
46 48
47struct snd_info_entry_ops { 49struct snd_info_entry_ops {
48 int (*open) (struct snd_info_entry *entry, 50 int (*open)(struct snd_info_entry *entry,
49 unsigned short mode, void **file_private_data); 51 unsigned short mode, void **file_private_data);
50 int (*release) (struct snd_info_entry * entry, 52 int (*release)(struct snd_info_entry *entry,
51 unsigned short mode, void *file_private_data); 53 unsigned short mode, void *file_private_data);
52 long (*read) (struct snd_info_entry *entry, void *file_private_data, 54 long (*read)(struct snd_info_entry *entry, void *file_private_data,
53 struct file * file, char __user *buf, 55 struct file *file, char __user *buf,
56 unsigned long count, unsigned long pos);
57 long (*write)(struct snd_info_entry *entry, void *file_private_data,
58 struct file *file, const char __user *buf,
54 unsigned long count, unsigned long pos); 59 unsigned long count, unsigned long pos);
55 long (*write) (struct snd_info_entry *entry, void *file_private_data, 60 long long (*llseek)(struct snd_info_entry *entry,
56 struct file * file, const char __user *buf, 61 void *file_private_data, struct file *file,
57 unsigned long count, unsigned long pos); 62 long long offset, int orig);
58 long long (*llseek) (struct snd_info_entry *entry, void *file_private_data, 63 unsigned int(*poll)(struct snd_info_entry *entry,
59 struct file * file, long long offset, int orig); 64 void *file_private_data, struct file *file,
60 unsigned int (*poll) (struct snd_info_entry *entry, void *file_private_data, 65 poll_table *wait);
61 struct file * file, poll_table * wait); 66 int (*ioctl)(struct snd_info_entry *entry, void *file_private_data,
62 int (*ioctl) (struct snd_info_entry *entry, void *file_private_data, 67 struct file *file, unsigned int cmd, unsigned long arg);
63 struct file * file, unsigned int cmd, unsigned long arg); 68 int (*mmap)(struct snd_info_entry *entry, void *file_private_data,
64 int (*mmap) (struct snd_info_entry *entry, void *file_private_data, 69 struct inode *inode, struct file *file,
65 struct inode * inode, struct file * file, 70 struct vm_area_struct *vma);
66 struct vm_area_struct * vma);
67}; 71};
68 72
69struct snd_info_entry { 73struct snd_info_entry {
@@ -106,34 +110,37 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer);
106static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {} 110static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
107#endif 111#endif
108 112
109int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3))); 113int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) \
114 __attribute__ ((format (printf, 2, 3)));
110int snd_info_init(void); 115int snd_info_init(void);
111int snd_info_done(void); 116int snd_info_done(void);
112 117
113int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len); 118int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len);
114char *snd_info_get_str(char *dest, char *src, int len); 119char *snd_info_get_str(char *dest, char *src, int len);
115struct snd_info_entry *snd_info_create_module_entry(struct module * module, 120struct snd_info_entry *snd_info_create_module_entry(struct module *module,
116 const char *name, 121 const char *name,
117 struct snd_info_entry * parent); 122 struct snd_info_entry *parent);
118struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, 123struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
119 const char *name, 124 const char *name,
120 struct snd_info_entry * parent); 125 struct snd_info_entry *parent);
121void snd_info_free_entry(struct snd_info_entry * entry); 126void snd_info_free_entry(struct snd_info_entry *entry);
122int snd_info_store_text(struct snd_info_entry * entry); 127int snd_info_store_text(struct snd_info_entry *entry);
123int snd_info_restore_text(struct snd_info_entry * entry); 128int snd_info_restore_text(struct snd_info_entry *entry);
124 129
125int snd_info_card_create(struct snd_card * card); 130int snd_info_card_create(struct snd_card *card);
126int snd_info_card_register(struct snd_card * card); 131int snd_info_card_register(struct snd_card *card);
127int snd_info_card_free(struct snd_card * card); 132int snd_info_card_free(struct snd_card *card);
128void snd_info_card_disconnect(struct snd_card * card); 133void snd_info_card_disconnect(struct snd_card *card);
129int snd_info_register(struct snd_info_entry * entry); 134void snd_info_card_id_change(struct snd_card *card);
135int snd_info_register(struct snd_info_entry *entry);
130 136
131/* for card drivers */ 137/* for card drivers */
132int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp); 138int snd_card_proc_new(struct snd_card *card, const char *name,
139 struct snd_info_entry **entryp);
133 140
134static inline void snd_info_set_text_ops(struct snd_info_entry *entry, 141static inline void snd_info_set_text_ops(struct snd_info_entry *entry,
135 void *private_data, 142 void *private_data,
136 void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) 143 void (*read)(struct snd_info_entry *, struct snd_info_buffer *))
137{ 144{
138 entry->private_data = private_data; 145 entry->private_data = private_data;
139 entry->c.text.read = read; 146 entry->c.text.read = read;
@@ -146,21 +153,22 @@ int snd_info_check_reserved_words(const char *str);
146#define snd_seq_root NULL 153#define snd_seq_root NULL
147#define snd_oss_root NULL 154#define snd_oss_root NULL
148 155
149static inline int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) { return 0; } 156static inline int snd_iprintf(struct snd_info_buffer *buffer, char *fmt, ...) { return 0; }
150static inline int snd_info_init(void) { return 0; } 157static inline int snd_info_init(void) { return 0; }
151static inline int snd_info_done(void) { return 0; } 158static inline int snd_info_done(void) { return 0; }
152 159
153static inline int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len) { return 0; } 160static inline int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) { return 0; }
154static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } 161static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; }
155static inline struct snd_info_entry *snd_info_create_module_entry(struct module * module, const char *name, struct snd_info_entry * parent) { return NULL; } 162static inline struct snd_info_entry *snd_info_create_module_entry(struct module *module, const char *name, struct snd_info_entry *parent) { return NULL; }
156static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, const char *name, struct snd_info_entry * parent) { return NULL; } 163static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, const char *name, struct snd_info_entry *parent) { return NULL; }
157static inline void snd_info_free_entry(struct snd_info_entry * entry) { ; } 164static inline void snd_info_free_entry(struct snd_info_entry *entry) { ; }
158 165
159static inline int snd_info_card_create(struct snd_card * card) { return 0; } 166static inline int snd_info_card_create(struct snd_card *card) { return 0; }
160static inline int snd_info_card_register(struct snd_card * card) { return 0; } 167static inline int snd_info_card_register(struct snd_card *card) { return 0; }
161static inline int snd_info_card_free(struct snd_card * card) { return 0; } 168static inline int snd_info_card_free(struct snd_card *card) { return 0; }
162static inline void snd_info_card_disconnect(struct snd_card * card) { } 169static inline void snd_info_card_disconnect(struct snd_card *card) { }
163static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } 170static inline void snd_info_card_id_change(struct snd_card *card) { }
171static inline int snd_info_register(struct snd_info_entry *entry) { return 0; }
164 172
165static inline int snd_card_proc_new(struct snd_card *card, const char *name, 173static inline int snd_card_proc_new(struct snd_card *card, const char *name,
166 struct snd_info_entry **entryp) { return -EINVAL; } 174 struct snd_info_entry **entryp) { return -EINVAL; }
diff --git a/include/sound/jack.h b/include/sound/jack.h
index b1b2b8b59adb..2e0315cdd0d6 100644
--- a/include/sound/jack.h
+++ b/include/sound/jack.h
@@ -35,6 +35,8 @@ enum snd_jack_types {
35 SND_JACK_HEADPHONE = 0x0001, 35 SND_JACK_HEADPHONE = 0x0001,
36 SND_JACK_MICROPHONE = 0x0002, 36 SND_JACK_MICROPHONE = 0x0002,
37 SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, 37 SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE,
38 SND_JACK_LINEOUT = 0x0004,
39 SND_JACK_MECHANICAL = 0x0008, /* If detected separately */
38}; 40};
39 41
40struct snd_jack { 42struct snd_jack {
diff --git a/include/sound/l3.h b/include/sound/l3.h
new file mode 100644
index 000000000000..423a08f0f1b0
--- /dev/null
+++ b/include/sound/l3.h
@@ -0,0 +1,18 @@
1#ifndef _L3_H_
2#define _L3_H_ 1
3
4struct l3_pins {
5 void (*setdat)(int);
6 void (*setclk)(int);
7 void (*setmode)(int);
8 int data_hold;
9 int data_setup;
10 int clock_high;
11 int mode_hold;
12 int mode;
13 int mode_setup;
14};
15
16int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len);
17
18#endif
diff --git a/include/sound/s3c24xx_uda134x.h b/include/sound/s3c24xx_uda134x.h
new file mode 100644
index 000000000000..33df4cb909d3
--- /dev/null
+++ b/include/sound/s3c24xx_uda134x.h
@@ -0,0 +1,14 @@
1#ifndef _S3C24XX_UDA134X_H_
2#define _S3C24XX_UDA134X_H_ 1
3
4#include <sound/uda134x.h>
5
6struct s3c24xx_uda134x_platform_data {
7 int l3_clk;
8 int l3_mode;
9 int l3_data;
10 void (*power) (int);
11 int model;
12};
13
14#endif
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
new file mode 100644
index 000000000000..24247f763608
--- /dev/null
+++ b/include/sound/soc-dai.h
@@ -0,0 +1,231 @@
1/*
2 * linux/sound/soc-dai.h -- ALSA SoC Layer
3 *
4 * Copyright: 2005-2008 Wolfson Microelectronics. PLC.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Digital Audio Interface (DAI) API.
11 */
12
13#ifndef __LINUX_SND_SOC_DAI_H
14#define __LINUX_SND_SOC_DAI_H
15
16
17#include <linux/list.h>
18
19struct snd_pcm_substream;
20
21/*
22 * DAI hardware audio formats.
23 *
24 * Describes the physical PCM data formating and clocking. Add new formats
25 * to the end.
26 */
27#define SND_SOC_DAIFMT_I2S 0 /* I2S mode */
28#define SND_SOC_DAIFMT_RIGHT_J 1 /* Right Justified mode */
29#define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */
30#define SND_SOC_DAIFMT_DSP_A 3 /* L data msb after FRM LRC */
31#define SND_SOC_DAIFMT_DSP_B 4 /* L data msb during FRM LRC */
32#define SND_SOC_DAIFMT_AC97 5 /* AC97 */
33
34/* left and right justified also known as MSB and LSB respectively */
35#define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J
36#define SND_SOC_DAIFMT_LSB SND_SOC_DAIFMT_RIGHT_J
37
38/*
39 * DAI Clock gating.
40 *
41 * DAI bit clocks can be be gated (disabled) when not the DAI is not
42 * sending or receiving PCM data in a frame. This can be used to save power.
43 */
44#define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */
45#define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated */
46
47/*
48 * DAI Left/Right Clocks.
49 *
50 * Specifies whether the DAI can support different samples for similtanious
51 * playback and capture. This usually requires a seperate physical frame
52 * clock for playback and capture.
53 */
54#define SND_SOC_DAIFMT_SYNC (0 << 5) /* Tx FRM = Rx FRM */
55#define SND_SOC_DAIFMT_ASYNC (1 << 5) /* Tx FRM ~ Rx FRM */
56
57/*
58 * TDM
59 *
60 * Time Division Multiplexing. Allows PCM data to be multplexed with other
61 * data on the DAI.
62 */
63#define SND_SOC_DAIFMT_TDM (1 << 6)
64
65/*
66 * DAI hardware signal inversions.
67 *
68 * Specifies whether the DAI can also support inverted clocks for the specified
69 * format.
70 */
71#define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */
72#define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal bclk + inv frm */
73#define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert bclk + nor frm */
74#define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert bclk + frm */
75
76/*
77 * DAI hardware clock masters.
78 *
79 * This is wrt the codec, the inverse is true for the interface
80 * i.e. if the codec is clk and frm master then the interface is
81 * clk and frame slave.
82 */
83#define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & frm master */
84#define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & frm master */
85#define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */
86#define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & frm slave */
87
88#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f
89#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0
90#define SND_SOC_DAIFMT_INV_MASK 0x0f00
91#define SND_SOC_DAIFMT_MASTER_MASK 0xf000
92
93/*
94 * Master Clock Directions
95 */
96#define SND_SOC_CLOCK_IN 0
97#define SND_SOC_CLOCK_OUT 1
98
99struct snd_soc_dai_ops;
100struct snd_soc_dai;
101struct snd_ac97_bus_ops;
102
103/* Digital Audio Interface registration */
104int snd_soc_register_dai(struct snd_soc_dai *dai);
105void snd_soc_unregister_dai(struct snd_soc_dai *dai);
106int snd_soc_register_dais(struct snd_soc_dai *dai, size_t count);
107void snd_soc_unregister_dais(struct snd_soc_dai *dai, size_t count);
108
109/* Digital Audio Interface clocking API.*/
110int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
111 unsigned int freq, int dir);
112
113int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
114 int div_id, int div);
115
116int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
117 int pll_id, unsigned int freq_in, unsigned int freq_out);
118
119/* Digital Audio interface formatting */
120int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
121
122int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
123 unsigned int mask, int slots);
124
125int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
126
127/* Digital Audio Interface mute */
128int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute);
129
130/*
131 * Digital Audio Interface.
132 *
133 * Describes the Digital Audio Interface in terms of it's ALSA, DAI and AC97
134 * operations an capabilities. Codec and platfom drivers will register a this
135 * structure for every DAI they have.
136 *
137 * This structure covers the clocking, formating and ALSA operations for each
138 * interface a
139 */
140struct snd_soc_dai_ops {
141 /*
142 * DAI clocking configuration, all optional.
143 * Called by soc_card drivers, normally in their hw_params.
144 */
145 int (*set_sysclk)(struct snd_soc_dai *dai,
146 int clk_id, unsigned int freq, int dir);
147 int (*set_pll)(struct snd_soc_dai *dai,
148 int pll_id, unsigned int freq_in, unsigned int freq_out);
149 int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div);
150
151 /*
152 * DAI format configuration
153 * Called by soc_card drivers, normally in their hw_params.
154 */
155 int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt);
156 int (*set_tdm_slot)(struct snd_soc_dai *dai,
157 unsigned int mask, int slots);
158 int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
159
160 /*
161 * DAI digital mute - optional.
162 * Called by soc-core to minimise any pops.
163 */
164 int (*digital_mute)(struct snd_soc_dai *dai, int mute);
165
166 /*
167 * ALSA PCM audio operations - all optional.
168 * Called by soc-core during audio PCM operations.
169 */
170 int (*startup)(struct snd_pcm_substream *,
171 struct snd_soc_dai *);
172 void (*shutdown)(struct snd_pcm_substream *,
173 struct snd_soc_dai *);
174 int (*hw_params)(struct snd_pcm_substream *,
175 struct snd_pcm_hw_params *, struct snd_soc_dai *);
176 int (*hw_free)(struct snd_pcm_substream *,
177 struct snd_soc_dai *);
178 int (*prepare)(struct snd_pcm_substream *,
179 struct snd_soc_dai *);
180 int (*trigger)(struct snd_pcm_substream *, int,
181 struct snd_soc_dai *);
182};
183
184/*
185 * Digital Audio Interface runtime data.
186 *
187 * Holds runtime data for a DAI.
188 */
189struct snd_soc_dai {
190 /* DAI description */
191 char *name;
192 unsigned int id;
193 int ac97_control;
194
195 struct device *dev;
196
197 /* DAI callbacks */
198 int (*probe)(struct platform_device *pdev,
199 struct snd_soc_dai *dai);
200 void (*remove)(struct platform_device *pdev,
201 struct snd_soc_dai *dai);
202 int (*suspend)(struct snd_soc_dai *dai);
203 int (*resume)(struct snd_soc_dai *dai);
204
205 /* ops */
206 struct snd_soc_dai_ops ops;
207
208 /* DAI capabilities */
209 struct snd_soc_pcm_stream capture;
210 struct snd_soc_pcm_stream playback;
211
212 /* DAI runtime info */
213 struct snd_pcm_runtime *runtime;
214 struct snd_soc_codec *codec;
215 unsigned int active;
216 unsigned char pop_wait:1;
217 void *dma_data;
218
219 /* DAI private data */
220 void *private_data;
221
222 /* parent codec/platform */
223 union {
224 struct snd_soc_codec *codec;
225 struct snd_soc_platform *platform;
226 };
227
228 struct list_head list;
229};
230
231#endif
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index ca699a3017f3..7ee2f70ca42e 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -221,8 +221,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_codec *codec,
221 int num); 221 int num);
222 222
223/* dapm path setup */ 223/* dapm path setup */
224int __deprecated snd_soc_dapm_connect_input(struct snd_soc_codec *codec,
225 const char *sink_name, const char *control_name, const char *src_name);
226int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec); 224int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec);
227void snd_soc_dapm_free(struct snd_soc_device *socdev); 225void snd_soc_dapm_free(struct snd_soc_device *socdev);
228int snd_soc_dapm_add_routes(struct snd_soc_codec *codec, 226int snd_soc_dapm_add_routes(struct snd_soc_codec *codec,
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a1e0357a84d7..f86e455d3828 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -21,14 +21,13 @@
21#include <sound/control.h> 21#include <sound/control.h>
22#include <sound/ac97_codec.h> 22#include <sound/ac97_codec.h>
23 23
24#define SND_SOC_VERSION "0.13.2"
25
26/* 24/*
27 * Convenience kcontrol builders 25 * Convenience kcontrol builders
28 */ 26 */
29#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \ 27#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \
30 ((unsigned long)&(struct soc_mixer_control) \ 28 ((unsigned long)&(struct soc_mixer_control) \
31 {.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert}) 29 {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \
30 .invert = xinvert})
32#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ 31#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
33 ((unsigned long)&(struct soc_mixer_control) \ 32 ((unsigned long)&(struct soc_mixer_control) \
34 {.reg = xreg, .max = xmax, .invert = xinvert}) 33 {.reg = xreg, .max = xmax, .invert = xinvert})
@@ -144,105 +143,31 @@ enum snd_soc_bias_level {
144 SND_SOC_BIAS_OFF, 143 SND_SOC_BIAS_OFF,
145}; 144};
146 145
147/*
148 * Digital Audio Interface (DAI) types
149 */
150#define SND_SOC_DAI_AC97 0x1
151#define SND_SOC_DAI_I2S 0x2
152#define SND_SOC_DAI_PCM 0x4
153#define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */
154
155/*
156 * DAI hardware audio formats
157 */
158#define SND_SOC_DAIFMT_I2S 0 /* I2S mode */
159#define SND_SOC_DAIFMT_RIGHT_J 1 /* Right justified mode */
160#define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */
161#define SND_SOC_DAIFMT_DSP_A 3 /* L data msb after FRM or LRC */
162#define SND_SOC_DAIFMT_DSP_B 4 /* L data msb during FRM or LRC */
163#define SND_SOC_DAIFMT_AC97 5 /* AC97 */
164
165#define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J
166#define SND_SOC_DAIFMT_LSB SND_SOC_DAIFMT_RIGHT_J
167
168/*
169 * DAI Gating
170 */
171#define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */
172#define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated when not Tx/Rx */
173
174/*
175 * DAI Sync
176 * Synchronous LR (Left Right) clocks and Frame signals.
177 */
178#define SND_SOC_DAIFMT_SYNC (0 << 5) /* Tx FRM = Rx FRM */
179#define SND_SOC_DAIFMT_ASYNC (1 << 5) /* Tx FRM ~ Rx FRM */
180
181/*
182 * TDM
183 */
184#define SND_SOC_DAIFMT_TDM (1 << 6)
185
186/*
187 * DAI hardware signal inversions
188 */
189#define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bclk + frm */
190#define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal bclk + inv frm */
191#define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert bclk + nor frm */
192#define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert bclk + frm */
193
194/*
195 * DAI hardware clock masters
196 * This is wrt the codec, the inverse is true for the interface
197 * i.e. if the codec is clk and frm master then the interface is
198 * clk and frame slave.
199 */
200#define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & frm master */
201#define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & frm master */
202#define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */
203#define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & frm slave */
204
205#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f
206#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0
207#define SND_SOC_DAIFMT_INV_MASK 0x0f00
208#define SND_SOC_DAIFMT_MASTER_MASK 0xf000
209
210
211/*
212 * Master Clock Directions
213 */
214#define SND_SOC_CLOCK_IN 0
215#define SND_SOC_CLOCK_OUT 1
216
217/*
218 * AC97 codec ID's bitmask
219 */
220#define SND_SOC_DAI_AC97_ID0 (1 << 0)
221#define SND_SOC_DAI_AC97_ID1 (1 << 1)
222#define SND_SOC_DAI_AC97_ID2 (1 << 2)
223#define SND_SOC_DAI_AC97_ID3 (1 << 3)
224
225struct snd_soc_device; 146struct snd_soc_device;
226struct snd_soc_pcm_stream; 147struct snd_soc_pcm_stream;
227struct snd_soc_ops; 148struct snd_soc_ops;
228struct snd_soc_dai_mode; 149struct snd_soc_dai_mode;
229struct snd_soc_pcm_runtime; 150struct snd_soc_pcm_runtime;
230struct snd_soc_dai; 151struct snd_soc_dai;
152struct snd_soc_platform;
231struct snd_soc_codec; 153struct snd_soc_codec;
232struct snd_soc_machine_config;
233struct soc_enum; 154struct soc_enum;
234struct snd_soc_ac97_ops; 155struct snd_soc_ac97_ops;
235struct snd_soc_clock_info;
236 156
237typedef int (*hw_write_t)(void *,const char* ,int); 157typedef int (*hw_write_t)(void *,const char* ,int);
238typedef int (*hw_read_t)(void *,char* ,int); 158typedef int (*hw_read_t)(void *,char* ,int);
239 159
240extern struct snd_ac97_bus_ops soc_ac97_ops; 160extern struct snd_ac97_bus_ops soc_ac97_ops;
241 161
162int snd_soc_register_platform(struct snd_soc_platform *platform);
163void snd_soc_unregister_platform(struct snd_soc_platform *platform);
164int snd_soc_register_codec(struct snd_soc_codec *codec);
165void snd_soc_unregister_codec(struct snd_soc_codec *codec);
166
242/* pcm <-> DAI connect */ 167/* pcm <-> DAI connect */
243void snd_soc_free_pcms(struct snd_soc_device *socdev); 168void snd_soc_free_pcms(struct snd_soc_device *socdev);
244int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid); 169int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid);
245int snd_soc_register_card(struct snd_soc_device *socdev); 170int snd_soc_init_card(struct snd_soc_device *socdev);
246 171
247/* set runtime hw params */ 172/* set runtime hw params */
248int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, 173int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
@@ -262,27 +187,6 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
262 struct snd_ac97_bus_ops *ops, int num); 187 struct snd_ac97_bus_ops *ops, int num);
263void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); 188void snd_soc_free_ac97_codec(struct snd_soc_codec *codec);
264 189
265/* Digital Audio Interface clocking API.*/
266int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
267 unsigned int freq, int dir);
268
269int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
270 int div_id, int div);
271
272int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
273 int pll_id, unsigned int freq_in, unsigned int freq_out);
274
275/* Digital Audio interface formatting */
276int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
277
278int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
279 unsigned int mask, int slots);
280
281int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
282
283/* Digital Audio Interface mute */
284int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute);
285
286/* 190/*
287 *Controls 191 *Controls
288 */ 192 */
@@ -340,66 +244,14 @@ struct snd_soc_ops {
340 int (*trigger)(struct snd_pcm_substream *, int); 244 int (*trigger)(struct snd_pcm_substream *, int);
341}; 245};
342 246
343/* ASoC DAI ops */
344struct snd_soc_dai_ops {
345 /* DAI clocking configuration */
346 int (*set_sysclk)(struct snd_soc_dai *dai,
347 int clk_id, unsigned int freq, int dir);
348 int (*set_pll)(struct snd_soc_dai *dai,
349 int pll_id, unsigned int freq_in, unsigned int freq_out);
350 int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div);
351
352 /* DAI format configuration */
353 int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt);
354 int (*set_tdm_slot)(struct snd_soc_dai *dai,
355 unsigned int mask, int slots);
356 int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
357
358 /* digital mute */
359 int (*digital_mute)(struct snd_soc_dai *dai, int mute);
360};
361
362/* SoC DAI (Digital Audio Interface) */
363struct snd_soc_dai {
364 /* DAI description */
365 char *name;
366 unsigned int id;
367 unsigned char type;
368
369 /* DAI callbacks */
370 int (*probe)(struct platform_device *pdev,
371 struct snd_soc_dai *dai);
372 void (*remove)(struct platform_device *pdev,
373 struct snd_soc_dai *dai);
374 int (*suspend)(struct platform_device *pdev,
375 struct snd_soc_dai *dai);
376 int (*resume)(struct platform_device *pdev,
377 struct snd_soc_dai *dai);
378
379 /* ops */
380 struct snd_soc_ops ops;
381 struct snd_soc_dai_ops dai_ops;
382
383 /* DAI capabilities */
384 struct snd_soc_pcm_stream capture;
385 struct snd_soc_pcm_stream playback;
386
387 /* DAI runtime info */
388 struct snd_pcm_runtime *runtime;
389 struct snd_soc_codec *codec;
390 unsigned int active;
391 unsigned char pop_wait:1;
392 void *dma_data;
393
394 /* DAI private data */
395 void *private_data;
396};
397
398/* SoC Audio Codec */ 247/* SoC Audio Codec */
399struct snd_soc_codec { 248struct snd_soc_codec {
400 char *name; 249 char *name;
401 struct module *owner; 250 struct module *owner;
402 struct mutex mutex; 251 struct mutex mutex;
252 struct device *dev;
253
254 struct list_head list;
403 255
404 /* callbacks */ 256 /* callbacks */
405 int (*set_bias_level)(struct snd_soc_codec *, 257 int (*set_bias_level)(struct snd_soc_codec *,
@@ -425,6 +277,7 @@ struct snd_soc_codec {
425 short reg_cache_step; 277 short reg_cache_step;
426 278
427 /* dapm */ 279 /* dapm */
280 u32 pop_time;
428 struct list_head dapm_widgets; 281 struct list_head dapm_widgets;
429 struct list_head dapm_paths; 282 struct list_head dapm_paths;
430 enum snd_soc_bias_level bias_level; 283 enum snd_soc_bias_level bias_level;
@@ -434,6 +287,11 @@ struct snd_soc_codec {
434 /* codec DAI's */ 287 /* codec DAI's */
435 struct snd_soc_dai *dai; 288 struct snd_soc_dai *dai;
436 unsigned int num_dai; 289 unsigned int num_dai;
290
291#ifdef CONFIG_DEBUG_FS
292 struct dentry *debugfs_reg;
293 struct dentry *debugfs_pop_time;
294#endif
437}; 295};
438 296
439/* codec device */ 297/* codec device */
@@ -447,13 +305,12 @@ struct snd_soc_codec_device {
447/* SoC platform interface */ 305/* SoC platform interface */
448struct snd_soc_platform { 306struct snd_soc_platform {
449 char *name; 307 char *name;
308 struct list_head list;
450 309
451 int (*probe)(struct platform_device *pdev); 310 int (*probe)(struct platform_device *pdev);
452 int (*remove)(struct platform_device *pdev); 311 int (*remove)(struct platform_device *pdev);
453 int (*suspend)(struct platform_device *pdev, 312 int (*suspend)(struct snd_soc_dai *dai);
454 struct snd_soc_dai *dai); 313 int (*resume)(struct snd_soc_dai *dai);
455 int (*resume)(struct platform_device *pdev,
456 struct snd_soc_dai *dai);
457 314
458 /* pcm creation and destruction */ 315 /* pcm creation and destruction */
459 int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, 316 int (*pcm_new)(struct snd_card *, struct snd_soc_dai *,
@@ -483,9 +340,14 @@ struct snd_soc_dai_link {
483 struct snd_pcm *pcm; 340 struct snd_pcm *pcm;
484}; 341};
485 342
486/* SoC machine */ 343/* SoC card */
487struct snd_soc_machine { 344struct snd_soc_card {
488 char *name; 345 char *name;
346 struct device *dev;
347
348 struct list_head list;
349
350 int instantiated;
489 351
490 int (*probe)(struct platform_device *pdev); 352 int (*probe)(struct platform_device *pdev);
491 int (*remove)(struct platform_device *pdev); 353 int (*remove)(struct platform_device *pdev);
@@ -498,23 +360,26 @@ struct snd_soc_machine {
498 int (*resume_post)(struct platform_device *pdev); 360 int (*resume_post)(struct platform_device *pdev);
499 361
500 /* callbacks */ 362 /* callbacks */
501 int (*set_bias_level)(struct snd_soc_machine *, 363 int (*set_bias_level)(struct snd_soc_card *,
502 enum snd_soc_bias_level level); 364 enum snd_soc_bias_level level);
503 365
504 /* CPU <--> Codec DAI links */ 366 /* CPU <--> Codec DAI links */
505 struct snd_soc_dai_link *dai_link; 367 struct snd_soc_dai_link *dai_link;
506 int num_links; 368 int num_links;
369
370 struct snd_soc_device *socdev;
371
372 struct snd_soc_platform *platform;
373 struct delayed_work delayed_work;
374 struct work_struct deferred_resume_work;
507}; 375};
508 376
509/* SoC Device - the audio subsystem */ 377/* SoC Device - the audio subsystem */
510struct snd_soc_device { 378struct snd_soc_device {
511 struct device *dev; 379 struct device *dev;
512 struct snd_soc_machine *machine; 380 struct snd_soc_card *card;
513 struct snd_soc_platform *platform;
514 struct snd_soc_codec *codec; 381 struct snd_soc_codec *codec;
515 struct snd_soc_codec_device *codec_dev; 382 struct snd_soc_codec_device *codec_dev;
516 struct delayed_work delayed_work;
517 struct work_struct deferred_resume_work;
518 void *codec_data; 383 void *codec_data;
519}; 384};
520 385
@@ -541,4 +406,6 @@ struct soc_enum {
541 void *dapm; 406 void *dapm;
542}; 407};
543 408
409#include <sound/soc-dai.h>
410
544#endif 411#endif
diff --git a/include/sound/uda134x.h b/include/sound/uda134x.h
new file mode 100644
index 000000000000..475ef8bb7dcd
--- /dev/null
+++ b/include/sound/uda134x.h
@@ -0,0 +1,26 @@
1/*
2 * uda134x.h -- UDA134x ALSA SoC Codec driver
3 *
4 * Copyright 2007 Dension Audio Systems Ltd.
5 * Author: Zoltan Devai
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef _UDA134X_H
13#define _UDA134X_H
14
15#include <sound/l3.h>
16
17struct uda134x_platform_data {
18 struct l3_pins l3;
19 void (*power) (int);
20 int model;
21#define UDA134X_UDA1340 1
22#define UDA134X_UDA1341 2
23#define UDA134X_UDA1344 3
24};
25
26#endif /* _UDA134X_H */
diff --git a/include/sound/version.h b/include/sound/version.h
index 4aafeda88634..2b48237e23bf 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
1/* include/version.h */ 1/* include/version.h */
2#define CONFIG_SND_VERSION "1.0.18rc3" 2#define CONFIG_SND_VERSION "1.0.18a"
3#define CONFIG_SND_DATE "" 3#define CONFIG_SND_DATE ""
diff --git a/include/trace/block.h b/include/trace/block.h
new file mode 100644
index 000000000000..25c6a1fd5b77
--- /dev/null
+++ b/include/trace/block.h
@@ -0,0 +1,76 @@
1#ifndef _TRACE_BLOCK_H
2#define _TRACE_BLOCK_H
3
4#include <linux/blkdev.h>
5#include <linux/tracepoint.h>
6
7DECLARE_TRACE(block_rq_abort,
8 TPPROTO(struct request_queue *q, struct request *rq),
9 TPARGS(q, rq));
10
11DECLARE_TRACE(block_rq_insert,
12 TPPROTO(struct request_queue *q, struct request *rq),
13 TPARGS(q, rq));
14
15DECLARE_TRACE(block_rq_issue,
16 TPPROTO(struct request_queue *q, struct request *rq),
17 TPARGS(q, rq));
18
19DECLARE_TRACE(block_rq_requeue,
20 TPPROTO(struct request_queue *q, struct request *rq),
21 TPARGS(q, rq));
22
23DECLARE_TRACE(block_rq_complete,
24 TPPROTO(struct request_queue *q, struct request *rq),
25 TPARGS(q, rq));
26
27DECLARE_TRACE(block_bio_bounce,
28 TPPROTO(struct request_queue *q, struct bio *bio),
29 TPARGS(q, bio));
30
31DECLARE_TRACE(block_bio_complete,
32 TPPROTO(struct request_queue *q, struct bio *bio),
33 TPARGS(q, bio));
34
35DECLARE_TRACE(block_bio_backmerge,
36 TPPROTO(struct request_queue *q, struct bio *bio),
37 TPARGS(q, bio));
38
39DECLARE_TRACE(block_bio_frontmerge,
40 TPPROTO(struct request_queue *q, struct bio *bio),
41 TPARGS(q, bio));
42
43DECLARE_TRACE(block_bio_queue,
44 TPPROTO(struct request_queue *q, struct bio *bio),
45 TPARGS(q, bio));
46
47DECLARE_TRACE(block_getrq,
48 TPPROTO(struct request_queue *q, struct bio *bio, int rw),
49 TPARGS(q, bio, rw));
50
51DECLARE_TRACE(block_sleeprq,
52 TPPROTO(struct request_queue *q, struct bio *bio, int rw),
53 TPARGS(q, bio, rw));
54
55DECLARE_TRACE(block_plug,
56 TPPROTO(struct request_queue *q),
57 TPARGS(q));
58
59DECLARE_TRACE(block_unplug_timer,
60 TPPROTO(struct request_queue *q),
61 TPARGS(q));
62
63DECLARE_TRACE(block_unplug_io,
64 TPPROTO(struct request_queue *q),
65 TPARGS(q));
66
67DECLARE_TRACE(block_split,
68 TPPROTO(struct request_queue *q, struct bio *bio, unsigned int pdu),
69 TPARGS(q, bio, pdu));
70
71DECLARE_TRACE(block_remap,
72 TPPROTO(struct request_queue *q, struct bio *bio, dev_t dev,
73 sector_t from, sector_t to),
74 TPARGS(q, bio, dev, from, to));
75
76#endif
diff --git a/include/trace/boot.h b/include/trace/boot.h
new file mode 100644
index 000000000000..088ea089e31d
--- /dev/null
+++ b/include/trace/boot.h
@@ -0,0 +1,60 @@
1#ifndef _LINUX_TRACE_BOOT_H
2#define _LINUX_TRACE_BOOT_H
3
4#include <linux/module.h>
5#include <linux/kallsyms.h>
6#include <linux/init.h>
7
8/*
9 * Structure which defines the trace of an initcall
10 * while it is called.
11 * You don't have to fill the func field since it is
12 * only used internally by the tracer.
13 */
14struct boot_trace_call {
15 pid_t caller;
16 char func[KSYM_SYMBOL_LEN];
17};
18
19/*
20 * Structure which defines the trace of an initcall
21 * while it returns.
22 */
23struct boot_trace_ret {
24 char func[KSYM_SYMBOL_LEN];
25 int result;
26 unsigned long long duration; /* nsecs */
27};
28
29#ifdef CONFIG_BOOT_TRACER
30/* Append the traces on the ring-buffer */
31extern void trace_boot_call(struct boot_trace_call *bt, initcall_t fn);
32extern void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn);
33
34/* Tells the tracer that smp_pre_initcall is finished.
35 * So we can start the tracing
36 */
37extern void start_boot_trace(void);
38
39/* Resume the tracing of other necessary events
40 * such as sched switches
41 */
42extern void enable_boot_trace(void);
43
44/* Suspend this tracing. Actually, only sched_switches tracing have
45 * to be suspended. Initcalls doesn't need it.)
46 */
47extern void disable_boot_trace(void);
48#else
49static inline
50void trace_boot_call(struct boot_trace_call *bt, initcall_t fn) { }
51
52static inline
53void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn) { }
54
55static inline void start_boot_trace(void) { }
56static inline void enable_boot_trace(void) { }
57static inline void disable_boot_trace(void) { }
58#endif /* CONFIG_BOOT_TRACER */
59
60#endif /* __LINUX_TRACE_BOOT_H */
diff --git a/include/trace/sched.h b/include/trace/sched.h
new file mode 100644
index 000000000000..0d81098ee9fc
--- /dev/null
+++ b/include/trace/sched.h
@@ -0,0 +1,56 @@
1#ifndef _TRACE_SCHED_H
2#define _TRACE_SCHED_H
3
4#include <linux/sched.h>
5#include <linux/tracepoint.h>
6
7DECLARE_TRACE(sched_kthread_stop,
8 TPPROTO(struct task_struct *t),
9 TPARGS(t));
10
11DECLARE_TRACE(sched_kthread_stop_ret,
12 TPPROTO(int ret),
13 TPARGS(ret));
14
15DECLARE_TRACE(sched_wait_task,
16 TPPROTO(struct rq *rq, struct task_struct *p),
17 TPARGS(rq, p));
18
19DECLARE_TRACE(sched_wakeup,
20 TPPROTO(struct rq *rq, struct task_struct *p, int success),
21 TPARGS(rq, p, success));
22
23DECLARE_TRACE(sched_wakeup_new,
24 TPPROTO(struct rq *rq, struct task_struct *p, int success),
25 TPARGS(rq, p, success));
26
27DECLARE_TRACE(sched_switch,
28 TPPROTO(struct rq *rq, struct task_struct *prev,
29 struct task_struct *next),
30 TPARGS(rq, prev, next));
31
32DECLARE_TRACE(sched_migrate_task,
33 TPPROTO(struct task_struct *p, int orig_cpu, int dest_cpu),
34 TPARGS(p, orig_cpu, dest_cpu));
35
36DECLARE_TRACE(sched_process_free,
37 TPPROTO(struct task_struct *p),
38 TPARGS(p));
39
40DECLARE_TRACE(sched_process_exit,
41 TPPROTO(struct task_struct *p),
42 TPARGS(p));
43
44DECLARE_TRACE(sched_process_wait,
45 TPPROTO(struct pid *pid),
46 TPARGS(pid));
47
48DECLARE_TRACE(sched_process_fork,
49 TPPROTO(struct task_struct *parent, struct task_struct *child),
50 TPARGS(parent, child));
51
52DECLARE_TRACE(sched_signal_send,
53 TPPROTO(int sig, struct task_struct *p),
54 TPARGS(sig, p));
55
56#endif
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 6ad87f485992..0c864db1a466 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -38,7 +38,7 @@ struct atmel_lcdfb_info {
38 spinlock_t lock; 38 spinlock_t lock;
39 struct fb_info *info; 39 struct fb_info *info;
40 void __iomem *mmio; 40 void __iomem *mmio;
41 unsigned long irq_base; 41 int irq_base;
42 struct work_struct task; 42 struct work_struct task;
43 43
44 unsigned int guard_time; 44 unsigned int guard_time;
diff --git a/include/video/cyblafb.h b/include/video/cyblafb.h
index 717440575380..d3c1d4e2c8e3 100644
--- a/include/video/cyblafb.h
+++ b/include/video/cyblafb.h
@@ -4,7 +4,7 @@
4#endif 4#endif
5 5
6#if CYBLAFB_DEBUG 6#if CYBLAFB_DEBUG
7#define debug(f,a...) printk("%s:" f, __FUNCTION__ , ## a); 7#define debug(f,a...) printk("%s:" f, __func__ , ## a);
8#else 8#else
9#define debug(f,a...) 9#define debug(f,a...)
10#endif 10#endif
diff --git a/include/video/neomagic.h b/include/video/neomagic.h
index 38910da0ae59..08b663782956 100644
--- a/include/video/neomagic.h
+++ b/include/video/neomagic.h
@@ -123,7 +123,6 @@ typedef volatile struct {
123 123
124struct neofb_par { 124struct neofb_par {
125 struct vgastate state; 125 struct vgastate state;
126 struct mutex open_lock;
127 unsigned int ref_count; 126 unsigned int ref_count;
128 127
129 unsigned char MiscOutReg; /* Misc */ 128 unsigned char MiscOutReg; /* Misc */
diff --git a/include/video/radeon.h b/include/video/radeon.h
index 099ffa5e5bee..1cd09cc5b169 100644
--- a/include/video/radeon.h
+++ b/include/video/radeon.h
@@ -386,7 +386,7 @@
386#define SC_BOTTOM_RIGHT 0x16F0 386#define SC_BOTTOM_RIGHT 0x16F0
387#define SRC_SC_BOTTOM_RIGHT 0x16F4 387#define SRC_SC_BOTTOM_RIGHT 0x16F4
388#define RB2D_DSTCACHE_MODE 0x3428 388#define RB2D_DSTCACHE_MODE 0x3428
389#define RB2D_DSTCACHE_CTLSTAT 0x342C 389#define RB2D_DSTCACHE_CTLSTAT_broken 0x342C /* do not use */
390#define LVDS_GEN_CNTL 0x02d0 390#define LVDS_GEN_CNTL 0x02d0
391#define LVDS_PLL_CNTL 0x02d4 391#define LVDS_PLL_CNTL 0x02d4
392#define FP2_GEN_CNTL 0x0288 392#define FP2_GEN_CNTL 0x0288
@@ -532,6 +532,9 @@
532#define RB2D_DC_FLUSH_ALL (RB2D_DC_FLUSH_2D | RB2D_DC_FREE_2D) 532#define RB2D_DC_FLUSH_ALL (RB2D_DC_FLUSH_2D | RB2D_DC_FREE_2D)
533#define RB2D_DC_BUSY (1 << 31) 533#define RB2D_DC_BUSY (1 << 31)
534 534
535/* DSTCACHE_MODE bits constants */
536#define RB2D_DC_AUTOFLUSH_ENABLE (1 << 8)
537#define RB2D_DC_DC_DISABLE_IGNORE_PE (1 << 17)
535 538
536/* CRTC_GEN_CNTL bit constants */ 539/* CRTC_GEN_CNTL bit constants */
537#define CRTC_DBL_SCAN_EN 0x00000001 540#define CRTC_DBL_SCAN_EN 0x00000001
diff --git a/include/video/s1d13xxxfb.h b/include/video/s1d13xxxfb.h
index c99d261df8f7..fe41b8407946 100644
--- a/include/video/s1d13xxxfb.h
+++ b/include/video/s1d13xxxfb.h
@@ -14,7 +14,8 @@
14#define S1D13XXXFB_H 14#define S1D13XXXFB_H
15 15
16#define S1D_PALETTE_SIZE 256 16#define S1D_PALETTE_SIZE 256
17#define S1D_CHIP_REV 7 /* expected chip revision number for s1d13806 */ 17#define S1D13506_CHIP_REV 4 /* expected chip revision number for s1d13506 */
18#define S1D13806_CHIP_REV 7 /* expected chip revision number for s1d13806 */
18#define S1D_FBID "S1D13806" 19#define S1D_FBID "S1D13806"
19#define S1D_DEVICENAME "s1d13806fb" 20#define S1D_DEVICENAME "s1d13806fb"
20 21
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
new file mode 100644
index 000000000000..25144ab22b95
--- /dev/null
+++ b/include/video/sh_mobile_lcdc.h
@@ -0,0 +1,79 @@
1#ifndef __ASM_SH_MOBILE_LCDC_H__
2#define __ASM_SH_MOBILE_LCDC_H__
3
4#include <linux/fb.h>
5
6enum { RGB8, /* 24bpp, 8:8:8 */
7 RGB9, /* 18bpp, 9:9 */
8 RGB12A, /* 24bpp, 12:12 */
9 RGB12B, /* 12bpp */
10 RGB16, /* 16bpp */
11 RGB18, /* 18bpp */
12 RGB24, /* 24bpp */
13 SYS8A, /* 24bpp, 8:8:8 */
14 SYS8B, /* 18bpp, 8:8:2 */
15 SYS8C, /* 18bpp, 2:8:8 */
16 SYS8D, /* 16bpp, 8:8 */
17 SYS9, /* 18bpp, 9:9 */
18 SYS12, /* 24bpp, 12:12 */
19 SYS16A, /* 16bpp */
20 SYS16B, /* 18bpp, 16:2 */
21 SYS16C, /* 18bpp, 2:16 */
22 SYS18, /* 18bpp */
23 SYS24 };/* 24bpp */
24
25enum { LCDC_CHAN_DISABLED = 0,
26 LCDC_CHAN_MAINLCD,
27 LCDC_CHAN_SUBLCD };
28
29enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
30
31#define LCDC_FLAGS_DWPOL (1 << 0) /* Rising edge dot clock data latch */
32#define LCDC_FLAGS_DIPOL (1 << 1) /* Active low display enable polarity */
33#define LCDC_FLAGS_DAPOL (1 << 2) /* Active low display data polarity */
34#define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */
35#define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */
36
37struct sh_mobile_lcdc_sys_bus_cfg {
38 unsigned long ldmt2r;
39 unsigned long ldmt3r;
40 unsigned long deferred_io_msec;
41};
42
43struct sh_mobile_lcdc_sys_bus_ops {
44 void (*write_index)(void *handle, unsigned long data);
45 void (*write_data)(void *handle, unsigned long data);
46 unsigned long (*read_data)(void *handle);
47};
48
49struct sh_mobile_lcdc_board_cfg {
50 void *board_data;
51 int (*setup_sys)(void *board_data, void *sys_ops_handle,
52 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
53 void (*display_on)(void *board_data);
54 void (*display_off)(void *board_data);
55};
56
57struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */
58 unsigned long width;
59 unsigned long height;
60};
61
62struct sh_mobile_lcdc_chan_cfg {
63 int chan;
64 int bpp;
65 int interface_type; /* selects RGBn or SYSn I/F, see above */
66 int clock_divider;
67 unsigned long flags; /* LCDC_FLAGS_... */
68 struct fb_videomode lcd_cfg;
69 struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg;
70 struct sh_mobile_lcdc_board_cfg board_cfg;
71 struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
72};
73
74struct sh_mobile_lcdc_info {
75 int clock_source;
76 struct sh_mobile_lcdc_chan_cfg ch[2];
77};
78
79#endif /* __ASM_SH_MOBILE_LCDC_H__ */
diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h
index 919b5bdcb2bd..2090881c3650 100644
--- a/include/xen/interface/event_channel.h
+++ b/include/xen/interface/event_channel.h
@@ -9,6 +9,8 @@
9#ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__ 9#ifndef __XEN_PUBLIC_EVENT_CHANNEL_H__
10#define __XEN_PUBLIC_EVENT_CHANNEL_H__ 10#define __XEN_PUBLIC_EVENT_CHANNEL_H__
11 11
12#include <xen/interface/xen.h>
13
12typedef uint32_t evtchn_port_t; 14typedef uint32_t evtchn_port_t;
13DEFINE_GUEST_HANDLE(evtchn_port_t); 15DEFINE_GUEST_HANDLE(evtchn_port_t);
14 16